parameter-passing

Passing values between two windows forms

The case is this, I have two different forms from the same solution/project. What I need to do is to extract the value of a label in Form A and load it into Form B. As much as possible, I am staying away from using this code since it will only conflict my whole program: FormB myForm = new FromB(label.Text); myForm.ShowDialog(); What I...

How to pass parameters to actionscript 2 in flash ?

I read though this answer for as3, which is not working for as2. What's the most compatible way to handle parameters in flash? ...

C++ - pointer passing question

Does somebody have any idead on how to pass boost::shared_ptr - by value or by reference. On my platform (32bit) sizeof(shared_ptr) equals 8 bytes and it looks like I should pass them by reference, but maybe somebody has another opinion / did a profile / something like that? ...

How to pass parameters to XSLT ?

I have a problem. I have an XML file that contains information about 100 courses. I have an XSL file that nicely displays the list of 100 courses. But what if I want to only display 1 course. Can I pass a parameter to the XSLT file to tell it to only display "ENGL 100" ? The XML looks something like this: <document> <menu> <it...

jquery .click pass parameters to user function

I am trying to call a function with parameters using jquery .click, but I can't get it to work. This is how I want it to work: $('.leadtoscore').click(add_event('shot')); which calls function add_event(event) { blah blah blah } It works if I don't use parameters, like this $('.leadtoscore').click(add_event); function add_event...

Passing dynamic data to controller with ASP.NET MVC and jQuery on form submit

I have a website which is basically a single page containing a bunch of dynamic content. In normal operation the user should never leave this page. To handle/report certain errors though, I need to redirect to an error page. So on the error page I want to provide a link back to the normal page which provides the app the information requi...

where to pass quantifying data values for formula fields?

Hey guys, What is a common way to pass data for formula fields, to specify a quantifier. I would currently do as follows: <input type="text" name="myfield" class="inputfieldstyle quantified" id="q_12" value="foo" /> where q_12 is generic. But there some inherent problems with the approach: What if i want to give it an id for some ...

get URL Parameter in maplet?

I m working with maplet and wanted to get the parameter value of my URL. I know that in maplet if we have a same-named variable in my maplet class but it didnt fill automatically? what I have done wrong? I add my maplet class code here. please help me. package Model; import org.j2os.shine.maplet; import org.j2os.shine.jconnection.JDBC; ...

Passing condition as parameter

First of all to explain what I'm trying to do: void Foo(int &num, bool condition); Foo(x, x > 3); This code basically would evaluate the bool of the condition before calling the function and then pass pure true or false. I'm looking for a way to make it pass the condition itself, so I could do something like this: void Foo(int &num,...

passing search parameter through jquery

i have a form in which if the user enters the search query, its parameter should be passed through jquery and after getting the results it should load the results in the div container. since i'm not very well-versed with jquery, how would i do this? html: //currently the data is being displayed on pageload: $(document).ready(fu...

How should I pass parameters between separated parts in my system?

I have a large system working on a set of data. My system is combined of several separated parts (like services) - the separation is based on a platform of sort. Throughout the system flow the set of data is altered and updated to a DB. The platform I use allows communication between the different parts with XMLs. So, if one part needs ...

Nicer way of paramter checking?

Hi, We use the .NET 2.0 framework with C# 3.0 (I think it's the last version of C# which can run on the 2.0 version of the framework, correct me if I am wrong). Is there something built into C# which can make this type of parameter validation more convenient? public ConnectionSettings(string url, string username, string password, ...

How can I pass a Class as parameter and return a generic collection in Java?

I am designing a simple Data Access Object for my Java application. I have a few classes (records) that represents a single row in tables like User and Fruit. I would like to have a single method for getting all records of a specific type. For the moment I have it like this: public List<User> getAllUsers() { ... } public List<Fruit>...

How to make a typeless/generalized parameter in Java?

So say I have 2 methods: one adding two int's and the other adding two long's. Where the parameters are passed into the function. How can I make 1 method that generalizes the parameter and return value to perform this? ...

C# Thread Parameters change during thread execution - why?

So I have a method that gets a Dictionary of List<myObj>, then cycles through the keys of the dictionary and passes each List<myObj> to a separate thread. Here is some Code / Psuedo-Code: public static void ProcessEntries() { Dictionary<string, List<myObj>> myDictionary = GetDictionary(); foreach(string key in myDictionary.ke...

non-const actual param to a const formal param

The const modifier in C++ before star means that using this pointer the value pointed at cannot be changed, while the pointer itself can be made to point something else. In the below void justloadme(const int **ptr) { *ptr = new int[5]; } int main() { int *ptr = NULL; justloadme(&ptr); } justloadme function should not be...

JavaScript: Passing parameters to a callback function

Hi, I'm trying to pass some parameter to a function used as callback, how can I do that? function tryMe (param1, param2) { alert (param1 + " and " + param2); } function callbackTester (callback, param1, param2) { callback (param1, param2); } callbackTester (tryMe, "hello", "goodbye"); ...

Include sub-element inside JSF 2.0 component

This must be simple. I am trying to pass sub-element into a JSF component. I have my component declared as: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http...

use parametric function in thread in C#

hi this is my multi thread codes it works fine using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Net; using System.Threading; namespace searchIpAdresses { public partial class frmSearchI...

symfony : Form with one parameter

Hello, I have a form, and I want to pass it one parameter which must use to fill a widget. I pass the parameter in my url : url_for('myModule/new?parameter='.$myParam) I have tried to take the parameter in my action and display it in my tamplate, but it doesn't work. Action : $this->param = $request->getParameter('parameter'); T...