pass

Passing template into boost function

template <class EventType> class IEvent; class IEventable; typedef boost::function<void (IEventable&, IEvent&)> behaviorRef; What is the right way for passing template class IEvent into boost function? With this code I get: error: functional cast expression list treated as compound expression error: template argument 1 is invalid err...

Haskell IO Passes to Another Function

This question here is related to http://stackoverflow.com/questions/3066956/haskell-input-return-tuple I wonder how we can passes the input from monad IO to another function in order to do some computation. Actually what i want is something like -- First Example test = savefile investinput -- Second Example maxinvest :: a maxinvest...

'this' pointer in macro and function

Hello guys, I have some code which use 'this' pointer of class which calls this code. For example: Some::staticFunction<templateType>(bind(FuncPointer, this, _1)); Here is I'm calling bind function from boost. But it doesn't matter. Now I have to wrap this code. I made a macro: #define DO(Type, Func) Some::staticFunction<Type>(bind(F...

How to pass asp.net value to javascript function ?

Hello, I have this code <asp:GridView ID="gvCentersList" runat="server" AutoGenerateColumns="False" DataKeyNames="CenterID" DataSourceID="SqlDataSource1" CssClass="gv-classic"> <Columns> <asp:TemplateField HeaderText=""> <ItemTemplate> <asp:CheckBox ID="GridCheckBox" runat="server" onclick="javas...

Sending Delphi string as a parameter to DLL

Hi. I want to call a dll function in Delphi 2010. This function take a string and write it to a printer with USB interface. I do not know in which language the dll is developed with. According to the documentation the syntax of the function is: int WriteUSB(PBYTE pBuffer,DWORD nNumberOfBytesToWrite); How can I declare and use my func...

Pass $this to function

How can I pass the $this (the self keyword) to a function in Jquery $(document).ready(function() { $('.nav a').click(function() { var direction = $(this).attr("name"); submit_form($(this)) }); function submit_form(this) { // do some stuff with 'this' ...

Pass a Variable Up the Navigation Stack? - iPhone

Hi, I am able to pass a variable forward from view controller to view controller by pushing its view controller onto the navigation stack. An example of how I do it would be this: MyViewController *controller = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil]; controller.myString = stringToPass; [self.navigatio...

Jquery - passing a duplicate of a <div> to another

When passing the contents of a <div> to another <div> with jquery as below, the original is removed. Is there a way to do this and still retain the original? Example Here - I want the document to read Item One, Item Two, Item One. function display() { $('#display').html($('#ItemOne')); } display(); ...

Referencing inserted elements in a single pass

I'm trying to insert unique IDs and references to those IDs using a single XSLT file. Given the XML: <Parent> <Name>Dr Evil</Name> <Child> <Name>Scott Evil</Name> </Child> </Parent> And this XSLT snippet after an identity transform: <xsl:template match="Parent"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:...

Pass ID from gridView row to Javasript function

On my Gridview, I've successfully created a link, as below (with a FIXED customerid of 3) <asp:HyperLinkField NavigateUrl="javascript:popUp(3)" Text="Detail" Target="_parent"> How can I pass the actual value for CustomerId on the same row? I have been searching trying for many days now. Please help. Please the link below. Som...

Javascript pass array attribute as parameter

var contact = { varWorkExperiences: [{ Experience: "aaa" },Experience: "bbb"}] }; I have a structure like this. I can use push method like this: contact.varWorkExperiences.push({ Experience: "ccc"}); but I want to do this paramaticly I cant do this: var x = "Experience"; contact.varWorkExperiences.push({ x: "ccc"}); How can I ...

pass scroll event from uibutton to uiscrollview

hi all, i have horizontal scroll view which is extended from UIScrollView and i added uibuttons horizontally. i can only scroll out of the buttons area, but if i want to scroll over any buttons is fires UIControlEventTouchUpInside event. i dont want this. i want to fire UIControlEventTouchUpInside action if i click and i want to scroll i...

Codeigniter from and uri

OK i have this problem: I'm creating a search function and to do that correctly i have to pass the word that is written in search field to uri eg. third segment. But since Codeigniter only supports post and not get method (it can be enabled but I'm looking for way around) I need to pass that variable via post to uri. Can anybody help me?...

[C#] Pass arguments to running application

Hey all, this is my first question I'm posting on this website so if it isn't the correct way to do it I would like to apologize upfront. I am making an image uploader (upload image to image hosting website) and I'm having some issues passing an argument (image location to an already running application) -First of all let's say MyApp.e...

JavaScript Pass Variables Through Reference

Hello! Is there an equivalent in JavaScript for PHP's reference passing of variables? [PHP]: function addToEnd( } $myVar="Hello"; addToEnd($myVar," World!"); print $myVar;//Outputs: Hello World! How would the same code look in JavaScript if possible? Thank you! ...

How can I pass a url or variable from Perl to PHP?

I have two existing scripts that work fine as individuals. The main script is Perl. I wish to execute the PHP script from a sub in the Perl script. Usually, the PHP script is just run via direct url e.g. http://me.com/phpscript.php?foo=bar I would like to just call the PHP script from the Perl and pass the foo var so, I don't need to ...

passing a 2 dimensional vector to a function

Hi Guys, How to pass a 2 dimensional Vector to a function in CPP ? I saw the examples for 1 dimension but not for 2 dimensions. If it is passed, is it passed by value or by reference ? vector< vector<int> > matrix1(3, vector<int>(3,0)); //Matrix Declaration. printMatrix(&matrix1); // Function call void printMatrix(vector< vector<int...