parameters

How can I pass arguments from one Perl script to another?

十年热恋 提交于 2020-01-02 10:27:46
问题 I have a script which I run and after it's run it has some information that I need to pass to the next script to run. The Unix/DOS commands are like so: perl -x -s param_send.pl perl -x -s param_receive.pl param_send.pl is: # Send param my $send_var = "This is a variable in param_send.pl...\n"; $ARGV[0] = $send_var; print "Argument: $ARGV[0]\n"; param_receive.pl is: # Receive param my $receive_var = $ARGV[0]; print "Parameter received: $receive_var"; But nothing is printed. I know I am doing

Can't get POST parameters

人走茶凉 提交于 2020-01-02 07:45:29
问题 I'm developing a web app in Python using WebApp2 as framework. I can't get the http POST request parameters submitted by filling a form. That's the HTML code of the form I created <html> <head> <title>Normal Login Page </title> </head> <body> <form method="post" action="/loginN/" enctype="text/plain" > eMail: <input type="text" name="eMail"><br/> password: <input type="text" name="pwd"><br/> <input type="submit"> </form> </body> That's the result of the POST request after pressing the submit

Dealing with lots of input parameters, lots of outputs

孤街浪徒 提交于 2020-01-02 07:40:13
问题 I need to perform a complicated calculation. In my case it seemed most natural to create a Calculator class (abstracted using a strategy pattern). To perform the calculation the class needs to accept about 20 inputs, some of which are optional, some of which could change in the future etc. Once the Calculate() method is called, about 20 different variables need to be outputted. There are a number of ways this can be achieved. Inputs passed in as parameters to a calculate method Inputs passed

YouTube parameter to call split view for 360 degree video

三世轮回 提交于 2020-01-02 04:09:26
问题 I'm trying to find out if the "VR mode" with two eye splitview of some YouTube 360 videos can also be called via a parameter or via the API? Right now when playing back a #360 video on my iPhone I'm able to move around in 360 degrees but the splitview is not an option. If I do the same thing on an Android Device I have an option to enter "splitview" for Google Cardboard. Is it possible to trigger this splitview mode also from the iPhone or if a #360 video is embedded into a website with a

Dropdown selected based on URL parameter - PHP or jQuery?

北城以北 提交于 2020-01-02 03:26:32
问题 What's the best method to output "selected" for my form select based on the URL parameter? In my URL I might have this parameter &term=retail. How could I tell the below code to select the retail option? <select class="form-control" name="term" id="saleTerm"> <option value="all-residential" selected>All Residential</option> <option value="apartment">   Apartment</option> <option value="villa">   Villa</option> <option value="all-commercial">All Commercial</option> <option value="office">  

C++ abstract class parameter error workaround

别来无恙 提交于 2020-01-02 00:54:24
问题 The code snippet below produces an error: #include <iostream> using namespace std; class A { public: virtual void print() = 0; }; void test(A x) // ERROR: Abstract class cannot be a parameter type { cout << "Hello" << endl; } Is there a solution/workaround for this error other/better than replacing virtual void print() = 0; with virtual void print() = { } EDIT: I want to be able to pass any class extending/implementing the base class A as parameter by using polymorphism (i.e. A* x = new B() ;

Pass multi-word arguments to a bash function

偶尔善良 提交于 2020-01-02 00:50:30
问题 Inside a bash script function, I need to work with the command-line arguments of the script, and also with another list of arguments. So I'm trying to pass two argument lists to a function, the problem is that multi-word arguments get split. function params() { for PARAM in $1; do echo "$PARAM" done echo . for ITEM in $2; do echo "$ITEM" done } PARAMS="$@" ITEMS="x y 'z t'" params "$PARAMS" "$ITEMS" calling the script gives me myscript.sh a b 'c d' a b c d . x y 'z t' Since there are two

Eclipse RCP: org.eclipse.ui.views.showView Parameters

…衆ロ難τιáo~ 提交于 2020-01-01 15:34:14
问题 I want to show a specific view in my RCP application using a command. Using showView opens a dialog to select view. Is there any way to do without selection dialog? I tried parameters but didn't help. Related part of plugin.xml is below. com.dbtek.hyperbola.views.contactsView is my view ID 回答1: You need to add a command parameter with the id of the view to show. E.g. <extension point="org.eclipse.ui.menus"> <menuContribution locationURI="menu:org.eclipse.ui.main.menu"> <menu id="window" label

Strange underscore param in remote links

这一生的挚爱 提交于 2020-01-01 09:46:47
问题 I use Rails3, JQuery and will_paginate gem to make remote pagination links. Known solution for this is: $('.pagination a').live('click',function (){ $.getScript(this.href); return false; }); With this code I get links like: http://localhost:3000/products?_=1300468875819&page=1 or http://localhost:3000/products?_=1300468887024&page=2 . So the little question is: what is this strange param _=1300468887024 (looks like Unix-time). What is its purpose? As I know this can cause some problems with

asp.net mvc parameter from page to a partial view

心不动则不痛 提交于 2020-01-01 09:42:07
问题 I'm with a problem, I have a ajax link that pass a parameter, but, the page that it opens does not need that parameter. The page only load 2 partial views, one of those need that parameter passed to the page to load the data correctly, and the other just need to load a form, so, don't need that parameter. How can i acheive this? 回答1: In order to do what you want, you will need to add the id to the ViewData construct. var sysfunctions= UnisegurancaService.FunctionsRepository.All(); ViewData[