FAQ Database Discussion Community


Is there a Parameter Tree implementation in Java?

java,parameters,io,tree,parameter-passing
Java program takes a long list of inputs(parameters), churns a bit and spits some output. I need a way to organize these parameters in a sane way so in the input txt file I want to write them like this: parameter1 = 12 parameter2 = 10 strategy1.parameter1 = "goofy" strategy2.parameter4...

How to passing the pointer parameters and return them right?

c,parameter-passing
Here is my code sample: #include <stdio.h> #include <stdlib.h> void foo(int size, int new_size, int * ptr1, double * ptr2) { int i; new_size = size * 2; ptr1 = (int *) calloc(new_size, sizeof(int)); ptr2 = (double *) calloc(new_size, sizeof(double)); for (i = 0; i < new_size; i++) { ptr1[i]...

Issue in passing a structure to a function accepting void * parameter

c,pointers,struct,parameter-passing,void
I want to call a function of type foo(void * data) having as input parameter a struct variable. I have heard that when the input format is of type void, it accepts every type of input variable type. Nevertheless, I get an error message. struct info{ int element; }; struct...

How to pass or declare array members in c?

c,arrays,debugging,parameter-passing
I developed a program that is supposed to pass the following members of the array of double purchase from the following function: float beverages () { char response; double purchase [8]= {3.50, 3.80, 3.90, 4.20, 4.00, 4.30, 3.00, 3.10}; printf("\nEnter your order: "); scanf("%c", response); if (response == 'l') {...

Optimise string building with concatenation in PHP loop

php,arrays,for-loop,parameter-passing,concatenation
I have a PHP function that do batch insertion into a MYSQL table. The function take input parameter as an array, it then loop thru the array to build the insert query like this: public function batchInsert($values){ $nbValues = count($values); $sql = 'INSERT INTO vouchers (`code`,`pin`,`owner_id`,`value`,`description`,`expire_date`,`lifetime`) VALUES '; for ($i=0;...

How could I put a constraint on a literal string parameter

c#,constraints,parameter-passing
I have to say that the title is too poor to be able to describe the problem but that was the only thing I could think of. Anyway, suppose I've been given the following enum: public enum DocumentType{ IdCard=0, Passport, DriversLicense } And I have a method that accepts a...

How to check if a linked list is a palindrome or not in Java?

java,reference,linked-list,parameter-passing,value
I wrote a code to check if a singly linked list is a palindrome. And I made two steps: 1st. reverse the original linked list. 2nd. Check if the original and reversed linked list have the same element. public static Boolean isPalindrome(Node input){ Node reversed= reverse(input); while (input!=null){ if(input.item!=reversed.item) return...

After passing Boolean Value from 0 to 1 nothing happened

ios,objective-c,parameter-passing
I am passing a BOOL Value from GameViewController to ChooseLevelViewController. If BOOL = 0 the normal Image of my Button1Pressed in ChooseLevel should be shown. If BOOL = 1 i want a other Image. My Code: ChooseLevel.h @property (nonatomic) BOOL isSomethingEnabled; ChooseLevel.m if (_isSomethingEnabled) { [_button1Pressed setImage:[UIImage imageNamed:@"buttonChanged.png"] forState:UIControlStateNormal]; }...

How to use dynamic column names in an UPDATE or SELECT statement in a function?

sql,postgresql,parameter-passing,plpgsql,dynamic-sql
In PostgreSQL 9.1, PL/pgSQL, given a query: select fk_list.relname from ... where relname is of type name (e.g., "table_name"). How do you get the appropriate value for "relname" that can be used directly in an UPDATE statement as: Update <relname> set ... within the PL/pgSQL script? Using quote_ident(r.relname) as: Update...

Pass string to JavaScript function results in undefined

javascript,string,parameters,parameter-passing
So what I am trying to do is very simple and straightforward. Passing a String to a JavaScript function and print it as following. brightRoom('bedroom'); Then function brightRoom(room){ console.log("bright " . room); } What I get is undefined. Which I am not sure what may caused that issue....

Passing variables between classes

java,android,object,parameter-passing,getter-setter
My question is how do I pass variables between classes which both the classes extends Activity, yes I have 2 main classes for example, I have a object class that has all the setters and getters which is then put in an ArrayList<object>, but when I set the variables in...

PHP - urlencoded() ampersand in url perceived as actual ampersand

php,parameter-passing,urlencode,ternary-operator
There is an dummy example PHP application which shows what causes me problems. <?PHP echo ((isset($_GET['P'])) ? print_r($_GET) : "<a href='http://example.com/a.php?P=" . urlencode('One & Two') . "'>One & Two</a>"); ?> If we visit page without P parameter page will output: http://example.com/One+%26+Two And that's fine, but if we visit the link,...

Is it a mistake or inappropriate if i pass a 2D array and it's size indicator to the same function in C?

c,arrays,function,parameter-passing
for example : void size(int a, int array[a][a]){ .......... } (I mean is it ok to pass int a and also have varaible a as size of an array im also passing to the same function? I would also like to ask if is it possible to pass 2D array...

how to pass string arguments in java as argument at runtime

java,runtime,parameter-passing
I am new to Java I need help with as how can I take values at runtime when a Java file is executed. I have Java program where the values of host,user, password and command is hardcoded, how can I parmeterize it. eg, public static void main(String[] args) { String...

How to return two values from F# to C#

c#,f#,parameter-passing
I have an F# function returning a string and an array to some C# code. I tried a few ways and did some searching to no avail. How is this done? My F# function (Gen.Best) ends with: (T1 Best).ToString,T2 Best // return a (string) and a (float []) to C#...

Understanding x86 syntax regarding a C 'bomb'

c,assembly,x86,parameter-passing,reverse-engineering
I've been given an executable file written originally in C, that plays a guessing game. I as the player am supposed to guess 5 numbers, and if I do it right, the bomb does not go off. However, as soon as I miss one, I lose and the bomb explodes....

why is my query isnt excecuting while i set the parameters

java,sql-server,spring,parameter-passing
I have a java file which interacts with the backend db and retrieves rows for me, the code part where my java interacts with the db is as follows, try { con = DBconnection.getConnection(); System.out.println("in get_camplist"); String brand = request.getParameter("brand_id"); System.out.println(brand); int bid = Integer.parseInt(brand); System.out.println(bid); String start_date = request.getParameter("s_date");...

Passing a variable to JavaScript function

javascript,php,function,variables,parameter-passing
I would like to call a JavaScript function from my php page, which looks like this: xyz.php for ($i = 0; $i < count($temp2a); $i++) { $URL = "xyz.php?eingabe=".$temp2a[$i]."&eingabe2=".$datei; echo '<p><a href="#" onClick="test("'.$URL.'")">link</a></p>'; } <script src="java.js"></script> java.js function test(para){ alert(para); alert("Para"); } Calling the function without a variable works. test()...

r shiny error Error in as.vector(x, “character”) : cannot coerce type 'closure' to vector of type 'character'

sql,r,parameter-passing,shiny,shiny-server
While trying to pass an user entered input (empId) from Shiny UI into a sql query on shiny server.r not sure how to debug this error. Error in as.vector(x, "character") : cannot coerce type 'closure' to vector of type 'character' UI.r library(shiny) shinyUI(fluidPage( titlePanel("Employee Table (AdventureWorks)"), sidebarLayout( sidebarPanel((""), textInput("idnumb", "Employee...

Intent and getSerializableExtra value return

android,android-intent,android-activity,parameters,parameter-passing
In onCreate I get an extra serializable from intent into itemsList of my activity itemsList = (ArrayList<HashMap<String, String>>) intent .getSerializableExtra("sliding_menu_content"); then in the activity I add some other map elements to the itemsList array. My surprise is that, changing the orientation of the device, getSerializableExtra returns the updated state of...

brace initialization for specialized vector template

c++,templates,c++11,initialization,parameter-passing
I have this 3D vector template template <class TYPE, class VEC> class Vec3TYPE{ public: union{ struct{ TYPE x,y,z; }; struct{ TYPE a,b,c; }; TYPE array[3]; }; inline void set( const VEC& a ){ x=a.x; z=a.y; z=a.z; }; inline void add( const VEC& a ){ x+=a.x; z+=a.y; z+=a.z; }; // +...

Error:No matching function for call to

c++,arrays,multidimensional-array,parameter-passing,function-call
I am very very new to C++ and I am trying to call the function "jacobi" which performs a user specified number of iterations for the jacobi method (or at least I hope so). On the line where I call 'jacobi' I get the error "No matching function to call...

MEAN stack: sending a string to client through a web service, can't access my string

angularjs,web-services,parameter-passing,mean-stack
Like the title says, I need a web service to send a string back to the client. I'll give you a little code example. This is my route file: /*log.js*/ var express = require('express'); var router = express.Router(); router.get('/myRoute', function(req, res){ var greeting = "Hello there!"; res.json({"myMsg" : greetings}); }...

Passing a reference of a global variable to a function

javascript,global-variables,parameter-passing
Is it possible to send a link to a global variable to a function in JavaScript? This guy says no. But I cannot believe, there is no workaround. What I mean is something like the following. It is not working, but it shall explain what I mean: var data_1; var...

How to pass parameter ending with “!” to another bat file?

windows,batch-file,parameters,cmd,parameter-passing
I have two bat files and i need to pass three parameter from one bat file to the other. However if the parameter ends in an "!" the parameter is not receieved caller.bat impl.bat param1 param2! param3 impl.bat echo %1 echo %2 echo %3 Expected Result after running caller.bat: param1...

Java - Parameter and Enhanced For Loop copy issue

java,foreach,parameter-passing,arraycopy
assume i have code like this; public void insert(Student[] stus) { int count = 0; for(Student s: stus) { s.setId( bla bla); stus[count].setId(bla bla) // is this line needed? count++; } } So if i change anything on s from enhanced for loop, can i see the change in stus...

Cannot pass parameters from View to Controller by using JavaScript

javascript,jquery,ajax,asp.net-mvc,parameter-passing
Although I manage to send the grid's selected row id to the controller, the url for opening action view cannot be built up (it is created /Controller/Action instead of /Controller/Action/id. So, when I try to open the view with /Controller/Action/id it is open, but it cannot be opened by button...

Passing parameters - Python to HTML with Javascript

java,python,html,parameter-passing
I have a simple Python file which uses the QtWebkit.QWebView to display a google maps page. This is done by calling the HTML which includes some java script. What I don't know how to do is get the co-ordinates from Python to the java script in the HTML file. Perhaps...

Passing an Application Class Reference to Constructor (Java)

java,javascript-events,parameter-passing,actionlistener
I have an application class, as shown directly below, which instantiates objects from i) a UI class I wrote that extends JFrame and implements ActionListener, and ii) a simple "Invoice" class. The former will be used as a main interface that accepts text entry, for particular values ("invoice number"), and...

Passing string “classValue” from a C# Class to a C# form string “formValue”

c#,string,class,parameter-passing,argument-passing
I would like to complete a command in C# using a class called GenerateKeys inside the class there is a function called GenKeyA(classValue); this is called from the default button1_click event handler in Visual Studio 13, using the form string variable formValue like so. GenKeyA(formValue), and by doing this i...

void pointer in function parameter

c++,pointers,parameter-passing,void-pointers
Consider following program: #include <iostream> void f(void* a) { std::cout<<"(void*)fun is called\n"; std::cout<<*(int*)a<<'\n'; } int main() { int a=9; void* b=(int*)&a; f(b); return 0; } If I change the function call statement like this: f(&b); It still compiles fine & crashes at runtime. Why? What is the reason? Should I...

How to reload report with same parameters in SSRS?

reporting-services,parameter-passing,reload,ssrs-2012
Scenario - I have a multi-value visible (user defined) parameter that I use in the dataset query, and I have a link in the report that directs the user to the same report (but it does something else that is irrelevant to this topic). However, when the report reloads, the...

why it is allowed to pass insufficient number of parameters when calling a function in C?

c,printf,parameter-passing,function-call
I know that function prototyping is mandatory in C++ if the function is defined after the main() function, but it is optional (but recommended) in C. I recently wrote a simple program that performs addition of 2 numbers, but by mistake used the dot operator instead of a comma when...

How to pass a parameter into a date function

sql,postgresql,parameter-passing,plpgsql,date-arithmetic
I am trying to create a simple function and I cannot seem to pass in a parameter into the date function. Here is the function: CREATE OR REPLACE FUNCTION test(source int,days text) RETURNS integer AS $totals$ declare totals integer; BEGIN select count(id) into totals from ad where createdate::date = date(current_date...

How to pass deployment dependant parameters to webapp

java,tomcat,servlets,parameter-passing,servlet-container
In projects I work(ed) on, deployment parameters - such as storage path or DB login - are usually given through a parameter file, which is stored in the war file. I find that unsuitable because those values needs to be changed each time the webapp is packaged for a different...

Intersystems cache Object Script pass property as parameter by reference

syntax,parameter-passing,intersystems-cache,objectscript
Given: A class "A" with an %Integer property "intA" A class "B" with a classMethod foo(ByRef num As %integer) that gets a parameter byRef and does some calculations. And knowing that in caché Object Script: If you want to pass a parameter by ref you need to put a dot...

Golang: Passing a URL as a GET parameter

url,go,get,parameter-passing,url-parameters
I want to get an URL as a get aparameter ex: example.com?domain=site.come?a=val&b=val the problem when i use query := r.URL.Query() domain := query.Get("domain") to get the domain name it give just domain=site.come?a=val I think because when the r.URL.Query() meet & it consider it as a new parameter does anyone know...

Why do we need Value-Result arguments in socket programming? (Clarification required)

c++,c,sockets,parameter-passing
I am a little confused when asked a question such as "What is a Value-Result argument and WHY is it needed in Socket Programming?" I am struggling to fully understand what exactly a value result argument is, despite reading countless pages and other questions on here. My understanding is that...

C++: Why is the created vector not passing to the next set of for loops?

c++,sorting,vector,parameter-passing
I have it so that the user defines the size of the vector and then a vector is filled. Then that vector is sorted using bubble sort (homework assignment). However, when the "sorted" vector is displayed, there are different numbers in it than what were in the original creation. How...

How can I make an html button that passes a parameter?

html,forms,button,hyperlink,parameter-passing
I want a html button with parameter functionality. new/?sorting=desc is the url that it should link to. But when I try, the parameter is not passed. How should it be done? I tried both the methods below but none worked. <FORM METHOD="GET" ACTION="./?sorting=desc"> <INPUT TYPE="submit" VALUE="Äldst först"> </FORM> I want...

MVC 4 Passing a model from a view to a generic method

asp.net-mvc,asp.net-mvc-4,generics,parameter-passing
I am trying to create an export-to-excel button on various intranet reporting pages which takes in a generic viewmodel. I would like to access this method from any view within my application but for now I'm attempting it from a single controller. (NOTE: The viewmodel must be passed from the...

Uncaught TypeError When Passing Variable from FancyBox Into Parent

javascript,php,fancybox,parameter-passing,parent-child
i have a problem when i passing variable value from FancyBox. First, i will tell the code : Here is the code in the FancyBox : JavaScript function post_value(no){ parent.setSelectedUser(document.forms[no]["NO_INDUK"].value); parent.$.fancybox.close(); } html while($baris = mysqli_fetch_assoc($hasil)) { //1 item($baris); $no++; ?> <tr> <form name="<?php echo $no ?>" method='post'> <td><?php echo...

django form: pass parameter to is_valid

django,forms,validation,parameter-passing,abstract
I have an abstract form and 2 forms using it. In the is_valid method of the abstract form, I check for a condition and that condition depends on the form calling the method. The line is: if eval(self.cleaned_data.get("validated_modif")): According to the form, it should be replaced by one of the...

Select @field From table as parameter

asp.net,sql-server,parameter-passing
I have a database table with some columns like "col_a", "col_b" and I want to retrieve just one column of it. But the column is depended on some user selection. Some times could be the col_a, the col_b, c .... So my question is if I can select a field...

Python 2.7 passing an object to a class function

python,python-2.7,object,parameter-passing
I'm trying to test out my 2D coordinate and vector classes in python. Here is the code where the vector and coordinate classes are defined: class coord(object): def __init__(self,x,y): self.x = x self.y = y def resolve(endCoord): return vector((self.x-endCoord.x),(self.y-endCoord.y)) class vector(object): def __init__(self, xTrans, yTrans): self.xTrans = xTrans self.yTrans =...

How to allow variable parameters passed to function

c,function,parameter-passing
I have a function that accepts 3 parameters, however I also want it to only accept the first two and not care about the third. How can I do this in C. I tried just declaring the function in the header file as void list() thinking this might imply that...

vbscript error: Name Redifiined; Line 43: ExecuteGlobal sFileContents

function,vbscript,parameter-passing,call
Question from a amatuer scripter with informal coding background: I've researched this on stack, msdn, random scripting websites but can't seem to glean a concrete solution. So please be advised this request for help is a last resort even if the solution is simple. To put it simply, I'm trying...

Why is this structure being sent by parameter?

c,visual-studio,data-structures,parameter-passing,pass-by-reference
I'm using a structure for my DES Algorithm: typedef struct { int size; int capacity; unsigned char *block; }Blocks64; I already did a lot of things to it, so i have some information on the unsigned char. I'm in a function that i call it iterations, and i need to...

How does an anonymous class access parent class' parameters?

java,parameter-passing,anonymous-class
Given this SSCE: public class AnonymousClassTest { String param = "initial"; void test() { Runnable runnalbe = new Runnable() { @Override public void run() { System.out.println(param); } }; runnalbe.run(); param = "after"; runnalbe.run(); } public static void main(String[] args) { new AnonymousClassTest().test(); } } Could anyone point to a part...

Handling large strings in Javascript

javascript,string,parameters,parameter-passing
I've made a function in Javascript to encrypt/encode a string before passing it to another page. The problem is that it isn't able to handle (editing, passing, returning etc...) large strings. Is there a way to do this in Javascript? Note: At the moment I do not use jQuery because...

JAVA pass column of 2d array as 1d array

java,arrays,parameter-passing
I need to pass a column of 2d array as 1d array. I have made this example to explain, and i don't know how to call print function. public static void main(String[] args) { double[][] matrix = {{ 0,1,2}, {3,4,5}, }; } public void print(double[] vector){ for(int i = 0;...

Java returning value after recursion (bucket fill tool)

java,recursion,parameter-passing,bucket
I made a program that generates tiles/pixels. Within this program is a function that is used to fill in gaps and holes, and here is how I intended it to work: A method is given an integer limit. This method then goes through paint bucket-like recursion where it repaints its...

VB passing Parameter Value ByRef does not change value until Method exits?

vb.net,visual-studio-2010,parameter-passing,inotifypropertychanged
I have a Class in .Net Entity Framework which implements INotifyPropertyChanged. I have found an interesting problem in that my property changed setter fires a notification event, but the value of the change is not visible until the setter exits. I implemented the following to test if a property value...

Why can't a function change its argument object's address/reference value?

c++,reference,parameter-passing,pass-by-reference
I learned that in Java and C, you can assign a pointer, pass the pointer to a method, follow the pointer in the method and change the data that was pointed to. However, you cannot change where that pointer points. I thought I could see a different behavior in C++...

Find or Initialize By Parameter Confusion Rails 4

ruby-on-rails-4,parameter-passing
I'm trying to use 'find_or_initialize_by' in my orders controller. I need to find the record by two parameters, user_id and item_id. If that particular order combination doesn't exist then I would like to create it. Here is what I have in the orders controller: def create @order = Order.find_or_initialize_by(#not sure...

How to send the parameter in a string using Laravel

php,laravel,parameter-passing,laravel-5
When I use Form::select, inside I can pass an attribute parameter that is an array, but I have problems concatenating the Id with the rest of the string {!! Form::select('product_category_id', $categories, null, ['class' => '','onchange' => 'addComboCategory(this, null,\'ajax_product_category\', \'ajax_product_info\', \'?parameter_id=2\')']) !!} The method: 'onchange' => 'addComboCategory(this, null,\'ajax_product_category\', \'ajax_product_info\', \'?parameter_id=2\') The...

Casting a pointer by reference

c++,casting,parameter-passing,pass-by-reference
I came across something I don't understand well. Let's suppose I want to pass a character pointer to a function that takes a reference to a void pointer. void doStuff(void*& buffer) { // do something } I would usually do something like this : int main() { unsigned char* buffer...

pass variables to jade template

node.js,express,parameters,parameter-passing,jade
I am trying to pass variables from page.js to page.jade but for some reason this is not working. here's my code: page.js res.render('page', {param1: 'xxx', param2: 'yyy'} ); page.jade #{param1} br #{param2} br ...

Stored procedure syntax with IN condition

arrays,postgresql,stored-procedures,parameter-passing,plpgsql
(1) =>CREATE TABLE T1(id BIGSERIAL PRIMARY KEY, name TEXT); CREATE TABLE (2) =>INSERT INTO T1 (name) VALUES ('Robert'), ('Simone'); INSERT 0 2 (3) SELECT * FROM T1; id | name ----+-------- 1 | Robert 2 | Simone (2 rows) (4) CREATE OR REPLACE FUNCTION test_me(id_list BIGINT[]) RETURNS BOOLEAN AS $$...

defining parameters of multiple types in Nim

parameter-passing,nim
Say I have a two classes and a procedure that modifies either class in the same manner. How do I specify that a parameter can be either class (instead of rewriting or overloading the function for each class)? A simple example: type Class1[T] = object x: T Class2[T] = object...

Passing user input values from a JOptionPane dialog box in Main to other classes in package

java,parameter-passing
I am rather new to java programming, so I am probably making hundreds of mistakes, especially in the way I am using classes and organization of my program. What I would like to do is use a JOptionPane to obtain a few integer and double inputs from the user (with...

JQuery toggle function, JS parameter passing

javascript,jquery,html,function,parameter-passing
I've made a button with toggle action to display data (show/hide on click). It all works as expected, data is hidden at start because of display: none and then whenever I click on it once it appears, and second click hides the data. Goal: I'm trying to make a polymorphic...

Passing a param containing a path to a controller

laravel,laravel-4,routes,parameter-passing,laravel-routing
I'm trying to pass a variable who contains a path from a form to a controller function in Laravel 4, for then download an image. I tryed a lot of things, but don't works for me. If I doesn't pass the parameter in the route, obviously I get a missing...

How do you pass a multi dimensional array from view to controller?

php,arrays,parameter-passing
It was easy passing data from controller to view. Also, to pass data from view to controller you need form tags. But, how do you pass an array from an input form? any idea guys? here's what the array looks like: $test = array ( array($employee_id[0],$name[0],$days_worked[0],$overtime_hours[0]), array($employee_id[1],$name[1],$days_worked[1],$overtime_hours[1]), array($employee_id[2],$name[2],$days_worked[2],$overtime_hours[2]) ); and...

Correct usage of `for_each_arg` - too much forwarding?

c++,lambda,parameter-passing,c++14,perfect-forwarding
I'm really happy to have discovered for_each_arg(...), which makes dealing with argument packs much easier. template<class F, class...Ts> F for_each_arg(F f, Ts&&...a) { return (void)initializer_list<int>{(ref(f)((Ts&&)a),0)...}, f; } I'm, however, confused on its correct usage. There are many arguments that need to be perfectly forwarded, but am I performing any unnecessary...

ODE - Solving Parameter Dependent on Variable [Matlab]

matlab,parameter-passing,ode
Lets say I have a function file of the ODE that goes like this function xprime = RabbitTemp(t,X) % Model of Rabbit Population % where, % Xo = Initial Population of Rabbits % X(1) = Population density of Rabbit % X(2) = Temperature T (that varies with time) % a...

How to return a string value from a Delphi application as output parameter

delphi,batch-file,parameter-passing,delphi-2009
I have a small Delphi 2009-application that serves as a way to call some SQL procedures and do some background work. It can be called with a path to a text file containing a SQL statement as input parameter and executes it. Now I want the Delphi-application to return an...

How to pass a switch variable?

powershell,parameter-passing
& "$THIS_SCRIPTS_DIRECTORY_PATH\New-NuGetPackage.ps1" -PushOptions "$pushOptions" ` -Verbose -ProjectFilePath $project -PO "$packOptions" -NPFPPTNG So if I provide the command line above in PowerShell the call works correctly. If I try something like this: if ($NoPromptForPushPackageToNuGetGallery) { $xtraOptions += " -NPFPPTNG " } & "$THIS_SCRIPTS_DIRECTORY_PATH\New-NuGetPackage.ps1" -PushOptions "$pushOptions" ` -Verbose -ProjectFilePath $project -PO "$packOptions"...

C++ , Member function passed as template argument

c++,function,templates,arguments,parameter-passing
I would like to pass the function eval2(T c, T &d), which is the member function in the class Algo1 Algo1.h #ifndef ALGO1_H #define ALGO1_H #include "Algo2.h" template <typename T> class Algo1 { private: T a, b; public: Algo1() : a(0), b(0) {} Algo1(T a_, T b_) : a(a_), b(b_)...

Passing parameter id onto another page

java,spring,parameter-passing
I want to pass the id of the student from the display.jsp table in to my student.jsp. I have problem getting the id of the student. I can't get to display or get its values. Please do help. Thanks Here is my jdbc to select the id public Student getStudentInfo(String...

Receiving POST from external application in AngularJS

javascript,angularjs,parameter-passing
I'm writing an application which uses AngularJS 1.4.0 which requires the ability to receive POST data from an external application. I know that routes in AngularJS often do parameters in the URL such as this: .when('/section/:param', { templateUrl: 'views/home.html', controller: 'AppCtrl' }) The problem with this style is that in...

Passing A Parameter for a VBA Recordset

vba,ms-access,access-vba,parameter-passing,recordset
I have a query that has a parameter that is not part of the results columns as below. It usually pops up when I execute the query. PARAMETERS SelectedDate DateTime; Select col1,col2, col3 from qry where col4 = [SelectedDate] I need to create a VBA recordset for only col1 &...

Pass parameters between method name

methods,language-agnostic,parameter-passing
I was wondering if you know of any programming language in which we can pass parameters inside method name. I'm guessing this could improve the code readability. I.e. Lets say I want to multiply to integers in a method. Normally my method declaration would be something like: function multiply(int a,...

Pass values from URL in HTML form

forms,url,parameter-passing
I want to pass two values from a URL to a simple HTML form. What is the easiest way to do that. I've found answers for one value but I'm not very good at JS so I failed to adapt them :( This is the URL with the valuescom www.myurl.be?title=titlevalue&startdate=startdatevalue...

Error: Reference not found. Binding an ActionListener method to a button in

jsf,parameter-passing,actionlistener,oracle-adf
I am creating a program using Jdeveloper 12c. This program will use a user generated input of an address which is then marked on a map. The map used is the thematic map feature of Jdeveloper. The problem I am having is with the button's actionListener. It is supposed to...

How to Use DateTime Web Form Field to Pass DateTime Parameter into Database using Stored Procedure?

c#,asp.net,datetime,webforms,parameter-passing
I am trying to use a datetime field in a webform to pass a datetime parameter into a database. The datetime format in the database is: 2015-05-18 00:00:00.000 The webform input field is: <asp:TextBox ClientIDMode="Static" ID="txtEffDate" runat="server" CssClass="calendarImg" Width="100px"></asp:TextBox> <asp:ImageButton runat="Server" ID="ImageButton1" ImageUrl="~/images/cal.gif" BorderStyle="None" AlternateText="Click to show calendar" TabIndex="300" Style="cursor:...

Pass dynamically generated parameters to command inside script

bash,parameters,parameter-passing
I have a script which calls the rsync command with some dynamically generated parameters but I'm having trouble passing them correctly. Here's some excerpt: logfile="$logDir/$(timestamp) $name.log" echo "something" >> "$logfile" params="-aAXz --stats -h --delete --exclude-from $exclude --log-file=$logfile $src $dest" if [ "$silent" = "" ]; then params="-v $params --info=progress2" fi...

efficient way of passing Data between Matlab functions

matlab,function,optimization,parameter-passing
I am solving a very large optimization problem. The objective function and constraint function needs numerous data. Currently I am passing the data as structure to them. myFS(X,Dat,g_Index, f_Index) % Dat is a structure which includes many variables Do you think, it's an efficient way to reduce the elapsed time?...

How to use mixed int and numeric arguments in a Postgres 9.1+ function

sql,postgresql,parameter-passing,plpgsql,iif
I'm looking for a way to create an icase() function which works with any second and third parameter compatible data types. I tried in Postgres 9.4: CREATE OR REPLACE FUNCTION public.icase( cond1 boolean, res1 anyelement, conddefault anyelement) RETURNS anyelement AS ' SELECT CASE WHEN $1 THEN $2 ELSE $3 END;...

Java square brackets behind parameter name “int g[]”?

java,arrays,parameter-passing
I have to translate code from Java to OpenCL I have this function given in Java: float dot(int g[], double x, double y, double z) { return g[0]*x + g[1]*y + g[2]*z; } This is a possible call: dot(g[i], x, y, z); Where: i = int and g = usual...

Can default function arguments “fill in” for expanded parameter packs?

c++,c++11,parameter-passing,variadic-templates,c++14
The following code fails to compile : #include <iostream> template<typename F, typename ...Args> static auto wrap(F func, Args&&... args) { return func(std::forward<Args>(args)...); } void f1(int, char, double) { std::cout << "do nada1\n"; } void f2(int, char='a', double=0.) { std::cout << "do nada2\n"; } int main() { wrap(f1, 1, 'a', 2.);...

Prism Command Binding using Parameter?

c#,wpf,command,parameter-passing,prism
I have a working hyperlink as follow: XAML: <TextBlock > <Hyperlink Command="{Binding NavHomeViewCommand}" > <Run Text="{Binding PersonSelected.PersonKnownName}" /> </Hyperlink> </TextBlock> Constructor: navHomeViewCommand = new DelegateCommand(NavHomeView); Command: private readonly ICommand navHomeViewCommand; public ICommand NavHomeViewCommand { get { return navHomeViewCommand; } } private void NavHomeView() { int val; val = PersonSelected.PersonKnownID); var...

Can I pass a parameter from a layout XML to a method in the MainActivity?

java,android,xml,methods,parameter-passing
I'm sorry if this is a noob question but I'm new to XML and Android as a whole. I am making a basic calculator in Android, and basically I want to write a method to handle all of the numerical button presses. I want to pass in a parameter into...

Does inout parameter make any difference with reference type?

swift,reference,parameter-passing
I know what inout does for value types. With objects or any other reference type, is there a purpose for that keyword in that case, instead of using var? Code example: private class MyClass { private var testInt = 1 } private func testParameterObject(var testClass: MyClass) { testClass.testInt++ } private...

Appending parameters to PHP URL is not returning anything, but hard coded works perfectly

php,ios,json,parameter-passing
Alright, so here goes nothing. the URL: http://tandemenvoy.michaeldvinci.com/forum/repliesJSON.php?rID=2 returns me absolutely nothing. if I hard code the SQL query to "SELECT * FROM replies WHERE replyID = 2" I get the correct JSON formatted request, but when I try passing it as a parameter in the URL. is just displays...

AngularJS pass function with dynamic parameter to directive

angularjs,angularjs-directive,parameter-passing
TL;DR version: I'm trying to write a directive to show various objects in a table, and add an edit / delete button at the end of the table rows. The example entity will be ProjectType, so: project-type.controller.js // determines which attributes we want to show in the table $scope.attr =...

how to post parameter like {“register_id”:“3”} in AFNetwroking

post,methods,parameter-passing,afnetworking,raw-data
i Tried it but didn't work in AFNetworking only showing parameters error but i used postman to check and when i send data via key and value it showing error but from raw data i send {"register_id":"3"} then it will show me data so how to post parameter like this...

ParameterMissing param is missing or the value is empty

ruby-on-rails,ruby-on-rails-4,view,controller,parameter-passing
i have the following situation: I have a controller for admins , that i use to manage the users (model generated by Devise). So, i use the actions of another controller to manage the resources "users". Here my files: admins_controller.rb before_action :set_user, only: [:show, :edit, :update, :destroy] def update respond_to...

Passing variable parameters in Java

java,parameters,parameter-passing
I would like to create a method that will, sometimes have two arguments passed to it, but only one at other times without passing a null (empty) argument. I know I could do method overloading, but I was looking for a feature like below, without the need for iteration later...

Use the same lambda parameter across multiple filters

c#,linq,entity-framework,parameter-passing,expression-trees
I am writing a class that allows users to search for entities based on a search term, working against Entity Framework under the hood. Every searchable field is registered with the class. For string fields, the search simply calls String.Contains. For look-up values, a call out to the database lookup...

Trouble with interfaces and parameters of objects

java,interface,constructor,parameter-passing,instance-variables
This is a difficult problem to describe so I will do my best. Basically my program has two concrete classes: MovablePoint and MovableCircle. Both implement the interface Movable which has four methods: moveUp Down left right. Now where I am stuck is that when I am constructing my MovableCircle I...

knockout component parameter handling

knockout.js,parameter-passing,knockout-components
I just don't seem to understand the following: I have a html page that uses a knockout component see code below: HTML: <h2>Home</h2> <p data-bind='text: message'></p> <examlist params="list: StartList"></examlist> So passing a parameter to the examlist In my knockout examlist component viewmodel: define(['knockout', 'text!./examlist.html'], function(ko, templateMarkup) { function Examlist(params) {...

How to pass attribute of one model as a param to a different model?

ruby-on-rails,ruby-on-rails-4,parameter-passing,params
I have a Favorite model and an Article model. The Favorite has an attribute .fav_id that is equal to the the .id of Article. I want to create a link_to @article.title and pass a param of :id=>@favorite.fav_id. favorites controller def show @favorite = Favorite.find(params[:id]) @article = Article.find(params[:id]) end view/favorite/show <%=...

What Is The Difference Between Passing Parameters By Output And By Reference In C#

c#,methods,parameters,parameter-passing,pass-by-reference
I have been making an effort on C# methods. There are three ways that parameters can be passed to a C# methods. Value parameters : This method copies the actual value of an argument into the formal parameter of the function. In this case, changes made to the parameter inside...

Execute stored procedure with a nullable parameter from SQL server management studio

sql-server,stored-procedures,parameter-passing
I have a stored procedure, uspUser_GetUserDetails, with several parameters. It gets called something like this: uspUser_GetUserDetails 'LastName','FirstName', 'UserId', 'dtDate', 'DistrictId' How do I run the stored procedure if the dtDate parameter is null. I tried uspUser_GetUserDetails 'LastName','FirstName','UserId','','DistrictId' but it doesn't do anything. Will something like this work? uspUser_GetUserDetails 'LastName','FirstName','UserId',null,'DistrictId' This...