Search Results

Search found 15081 results on 604 pages for 'passing by reference'.

Page 65/604 | < Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >

  • Passing Multiple values Through Query String?

    - by Googler
    Hi all, I tried to pass more than one value through Query String from page1.aspx to page2.aspx. This is my Query string in the Grid View <a href="javascript:void(0);" onclick='javascript:window.open("Update.aspx?Regno= <%#Eval ("ID") %>'+ ","'&Fn=<%#Eval ("FIRSTNAME") %>' +", "'&Ln=<%#Eval ("LASTNAME") %>'")';> Edit</a> On My Page2.aspx, my code behind on PageLoad is: if (Page.IsPostBack) return; string id = Request.QueryString["ID"]; string Firstname = Request.QueryString["FIRSTNAME"]; string LastName = Request.QueryString["LASTNAME"]; My Visual Studio IDE shows a syntax error on this query string. I dont know the exact way to pass multiple values through Query String. How to make it work? Can anyone pls help me on this.. Which is the right syntax to pass multiple query string?

    Read the article

  • SQLite join selection from the same table using reference from another table

    - by daikini
    I have two tables: table: points |key_id | name | x | y | ------------------------ |1 | A |10 |20 | |2 | A_1 |11 |21 | |3 | B |30 |40 | |4 | B_1 |31 |42 | table: pairs |f_key_p1 | f_key_p2 | ---------------------- |1 | 2 | |3 | 4 | Table 'pairs' defines which rows in table 'points' should be paired. How can I query database to select paired rows? My desired query result would be like this: |name_1|x_1|x_2|name_2|x_2|y_2| ------------------------------- |A |10 |20 |A_1 |11 |21 | |B |30 |40 |B_1 |31 |41 |

    Read the article

  • Please help with passing multidimensional arrays

    - by nn
    Hi, I'm writing a simple test program to pass multidimensional arrays. I've been struggling to get the signature of the callee function. void p(int (*s)[100], int n) { ... } In the code I have: int s1[10][100], s2[10][1000]; p(s1, 100); This code appears to work, but it's not what I intended. I want to the function p to be oblivious whether the range of values is 100 or 1000, but it should know there are 10 pointers. I tried as a first attempt: void p(int (*s)[10], int n) // n = # elements in the range of the array and also: void p(int **s, int n) // n = # of elements in the range of the array But to no avail can I seem to get this correct. I don't want to hardcode the 100 or 1000, but instead pass it in, but there will always be 10 arrays. Obviously, I want to avoid having to declare the function: void p(int *s1, int *s2, int *s3, ..., int *s10, int n) FYI, I'm looking at the answers to a similar question but still confused.

    Read the article

  • fortran complications passing arrays in function

    - by user1514188
    I'm trying to write a program to calculate a cross product of two vectors (input is of "real" type, so for example [1.3 3.4 1,5]). But I keep getting numerous errors: program Q3CW implicit none REAL :: matA(3), matB(3) REAL :: A11, A12, A13 REAL :: B11, B12, B13 real :: productc(3), answer(3) read*,A11, A12, A13 read*,B11, B12, B13 matA = (/A11, A12, A13/) matB = (/B11, B12, B13/) answer = productc(matA, matB) print*,'Answer = ', answer(1), answer(2), answer(3) end program real function productc(matIn1, matIn2) real, dimension(3) :: matIn1, matIn2 productc(1)=(/matIn1(2)*matIn2(3)-matIn1(3)*matIn2(2)/) productc(2)=(/matIn1(3)*matIn2(1)-matIn1(1)*matIn2(3)/) productc(3)=(/matIn1(1)*matIn2(2)-matIn1(2)*matIn2(1)/) end function This is the error I get: Error: Q33333.f95(20) : Statement function definition for pre-existing procedure PRODUCTC; detected at )@= Error: Q33333.f95(21) : Statement function definition for pre-existing procedure PRODUCTC; detected at )@= Error: Q33333.f95(22) : Statement function definition for pre-existing procedure PRODUCTC; detected at )@= Warning: Q33333.f95(23) : Function PRODUCTC has not been assigned a value; detected at FUNCTION@<end-of-statement> Build Result Error(3) Warning(1) Extension(0) Any idea what the problem could be ?

    Read the article

  • Passing Activity A's data into Activity B

    - by user1058153
    What i am trying to show here is that I am trying to pass the data in Activity A to Activity B. Activity A mainly there are 3 textbox for me to key in something then a button to go to Activity B(Confirmation Page) and in Activity B, i am able to show what i have keyed in Activity A. I am new to Android, so can someone guide me through this? In Activity A @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activitya); Textview01 = (EditText) this.findViewById(R.id.txtView1); Textview02 = (EditText) this.findViewById(R.id.txtView2); Textview03 = (EditText) this.findViewById(R.id.txtView3); mButton = (Button) findViewById(R.id.button); mButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Intent i = new Intent(ActivityA.this, ActivityB.class); i.putExtra("Textview01", txtView1.getText().toString()); i.putExtra("Textview02", txtView2.getText().toString()); i.putExtra("Textview03", txtView3.getText().toString()); startActivity(i); In Activity B. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.confirmbooking); TextView txtPickup = (TextView) this.findViewById(R.id.txtPickup); TextView txtLocation = (TextView) this.findViewById(R.id.txtLocation); TextView txtDestination = (TextView) this.findViewById(R.id.txtDestination); txtLocation.setText(getIntent().getStringExtra("Location")); txtPickup.setText(getIntent().getStringExtra("Pick Up Point")); txtDestination.setText(getIntent().getStringExtra("Destination")); In my Activity B XML <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="txtView01:" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/txtView01"></TextView> <TextView android:id="@+id/TextView02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="txtView02:"></TextView> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/txtView02"></TextView> <TextView android:id="@+id/TextView02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="txtView03:"></TextView> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/txtView03"></TextView> <Button android:id="@+id/btnButton" android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="Book now" /> </LinearLayout> Can someone tell me if this is correct? I'm getting some error like a popup Instrumental.class. LogCat shows : 11-26 17:27:40.895: INFO/ActivityManager(52): Starting activity: Intent { cmp=ActivityA/.ActivityB (has extras) } 11-26 17:27:42.956: DEBUG/dalvikvm(252): GC_EXPLICIT freed 156 objects / 11384 bytes in 346ms 11-26 17:27:47.815: DEBUG/dalvikvm(288): GC_EXPLICIT freed 31 objects / 1496 bytes in 161ms

    Read the article

  • LINQ query null reference exception

    - by user289082
    Hi! I have the next query: var bPermisos = from b in ruc.Permisos where b.IdUsuario == cu.Id select new Permisos(){ Id=b.Id, IdUsuario=b.Id, IdPerfil=b.Id, Estatus=b.Estatus }; var qSisPer = from perm in bPermisos select new { perm.IdPerfil,perm.Cat_Perfil.Nivel,perm.Cat_Perfil.Nombre,Nombre_Sistem=perm.Cat_Perfil.Cat_Sistema.Nombre}; And is throwing me an exception, plz help!

    Read the article

  • Using static variable in function vs passing variable from caller

    - by Patrick
    I have a function which spawns various types of threads, one of the thread types needs to be spawned every x seconds. I currently have it like this: bool isTime( Time t ) { return t >= now(); } void spawner() { while( 1 ) { Time t = now(); if( isTime( t ) )//is time is called in more than one place in the real function { launchthread() t = now() + offset; } } } but I'm thinking of changing it to: bool isTime() { static Time t = now(); if( t >= now() ) { t = now() + offset; return true; } return false; } void spawner() { if( isTime() ) launchthread(); } I think the second way is neater but I generally avoid statics in much the same way I avoid global data; anyone have any thoughts on the different styles?

    Read the article

  • Passing filtering functions to Where() in LINQ-to-SQL

    - by Daniel
    I'm trying to write a set of filtering functions that can be chained together to progressively filter a data set. What's tricky about this is that I want to be able to define the filters in a different context from that in which they'll be used. I've gotten as far as being able to pass a very basic function to the Where() clause in a LINQ statement: filters file: Func<item, bool> returnTrue = (i) => true; repository file: public IQueryable<item> getItems() { return DataContext.Items.Where(returnTrue); } This works. However, as soon as I try to use more complicated logic, the trouble begins: filters file: Func<item, bool> isAssignedToUser = (i) => i.assignedUserId == userId; repository file: public IQueryable<item> getItemsAssignedToUser(int userId) { return DataContext.Items.Where(isAssignedToUser); } This won't even build because userId isn't in the same scope as isAssignedToUser(). I've also tried declaring a function that takes the userId as a parameter: Func<item, int, bool> isAssignedToUser = (i, userId) => i.assignedUserId == userId; The problem with this is that it doesn't fit the function signature that Where() is expecting: Func<item, bool> There must be a way to do this, but I'm at a loss for how. I don't feel like I'm explaining this very well, but hopefully you get the gist. Thanks, Daniel

    Read the article

  • Swig C++ Lua Pass class by reference

    - by Jeremy
    I don't know why I'm having a hard time with this. All I want to do is this: class foo { public: foo(){} ~foo(){} float a,b; }; class foo2 { public: foo2(){} foo2(const foo &f){*this = f;} ~foo2(){} void operator=(const foo& f){ x = f.a; y = f.b; } float x,y; }; /* Usage(cpp): foo f; foo2 f2(f); //or using the = operator f2 = f; */ The problem I'm having is that, after swigging this code, I can't figure out how to make the lua script play nice. /* Usage(lua) f = example.foo() f2 = example.foo2(f) --error */ The error I get is "Wrong arguments for overloaded function 'new_Foo2'": Possible c/c++ prototypes are: foo2() foo2(foo const &) The same thing happens if I try and use do f2 = f. As I understand it everything is stored as a pointer so I did try adding an additional constructor that took a pointer to foo but to no avail.

    Read the article

  • Beginning OS X & iPhone Development: Reference texts

    - by twinbornJoint
    My programming experience is limited to xhtml, css, php, sql and some javascript. The books I have are: Programming in Objective-C 2nd Edition Beginning iPhone Development Cocoa(R) Programming for Mac(R) OS X (Paperback) Is there anything else I will need to get started on my journey into iPhone/OS X development?

    Read the article

  • QtScript: Passing an array of objects to C++

    - by Plow
    Hi, I want to pass an array of objects from my QtScript to C++ but I have not been able to figure out how to achieve this. As soon as I create an array, the elements inside it are converted to strings before I can access them. This is what I have been trying so far: class myObject : public QObject, public QScriptable { Q_OBJECT public Q_SLOTS: void test(QVariantList list); }; void myObject::test(QVariantList list) { for (QVariantList::const_iterator it = list.begin(); it != list.end(); ++it) { QVariant element = *it; qDebug() << "List element type: " << element.typeName(); if (element.canConvert<QVariantMap>()) { // Not getting here } } } The following script myObject.test([{"foo": 1, "bar": 2}, {"baaz": 3, "baaaz": 4}]); prints List element type: "QString" List element type: "QString" I am using Qt 4.6...

    Read the article

  • Passing a parameter to ant from CruiseControl Dashboard

    - by MSUDrew
    I am working on incorporating CruiseControl into my teams build process. What we need is a way to pass a Clearcase view name into the ant script so it knows what view to use when building. Sometimes a developer needs to create a build that is used for their testing only and not on the main integration branch. Is there a way to do this?

    Read the article

  • WPF passing the Int argument to a data object provider method

    - by SAD
    Hi, I'm trying to produce a master/detail datagrid view. I'm using object data providers. Now I have seen many examples when the argument of a method for returning the records for the detail view is a string, like in this example: <!-- the orders datasource --> <ObjectDataProvider x:Key="OrdersDataProvider" ObjectType="{x:Type local:OrdersDataProvider}"/> <ObjectDataProvider x:Key="Orders" MethodName="GetOrdersByCustomer" ObjectInstance="{StaticResource OrdersDataProvider}" > <ObjectDataProvider.MethodParameters> <x:Static Member="system:String.Empty"/> </ObjectDataProvider.MethodParameters> </ObjectDataProvider> But in my case, the argument that I want to pass is the int ID not the string. Can I still somehow use the object data provider to return all the records from the database for the detail view if the argument passed to a method has to be an int? How could it be implemented in MVVM? Thanks a lot for any advice1

    Read the article

  • opening a fancybox from a drop down box and passing the selected value to it directly

    - by andy
    <select name="mySelectboxsituation_found" id="mySelectboxsituation_found"> <option value="100">Firecall</option> <option value="200">FireAlarm</option> <option value="300">FireAlarm2</option> <option value="400">FireAlarm4</option> </select> < a href="#" class="incidenttype" name="all" onClick="JavaScript:var dropdown=document.getElementById('mySelectboxsituation_found');this.href='main_situation_found.php?incident_maincateid='+dropdown.options[dropdown.selectedIndex].value;return true;"/>CLICK HERE < / a> function cleanUp(){ var subsituation_found1 = $("#fancybox- frame").contents().find('input:radio[name=incident_subcate]:checked').val(); } $(".incidenttype").fancybox({ 'width' : 900, 'height' : 600, 'autoScale': false, 'transitionIn': 'none', 'transitionOut': 'none', 'type': 'iframe', 'onCleanup': cleanUp ); }); clicking on "CLICK HERE" opens the fancybox and transfers the value selected in the drop down box. What I would like to do is open the fancy box when i change the value in the dropdown box...without having to click on the click here link.....i know it is posisble using something like _this....but i am not sure and am looking for some direction... ideally some thing like this ... <select name="mySelectboxsituation_found" id="mySelectboxsituation_found" onChange="JavaScript:var dropdown=document.getElementById('mySelectboxsituation_found');this.href='main_situation_found.php?incident_maincateid='+dropdown.options[dropdown.selectedIndex].value;return true;"> <option value="100">Firecall</option> <option value="200">FireAlarm</option> <option value="300">FireAlarm2</option> <option value="400">FireAlarm4</option> </select> does any have an idea how to do it.... I have also tried... function test_fan() { alert(document.getElementById('mySelectboxsituation_found').options[document.getElementById('mySelectboxsituation_found').selectedIndex].value); var dropval =document.getElementById('mySelectboxsituation_found').options[document.getElementById('mySelectboxsituation_found').selectedIndex].value; return dropval; } $(document).ready(function(){ $("#autostart").fancybox({ 'onStart':test_fan, 'width': 800, 'height': 700, 'type': 'iframe', href:'main_situation_found.php?incident_maincateid='+document.getElementById('mySelectboxsituation_found').options[document.getElementById('mySelectboxsituation_found').selectedIndex].value }); <a href="#" id="autostart" style="display:none"></a> <form><select id="mySelectboxsituation_found" onchange="$('#autostart').trigger('click');"> <option value="">select</option> <option value="100">option 1</option> <option value="200">trigger</option> <option value="300">option 3</option> <option value="400">option 4</option> </select> </form> the really funny that happens there is that .... on the alert id do get the value i selected so if i selected alert fancybox window 100 100 nothing shows up empty 200 200 100 300 300 200 400 400 300 the fancybox seems to me the the previously selected values and i am not sure why that is happening... thanks andy

    Read the article

  • Passing arguments and values form HTML to jQuery (events)

    - by Jaroslav Moravec
    What is the practice to pass arguments from HTML to jQuery events function. For example getting id of row from db: <tr class="jq_killMe" id="thisItemId-id"> ... </tr> and jQuery: $(".jq_killMe").click(function () { var tmp = $(this).attr('id).split("-"); var id = tmp[0] // ... } What's the best practise, if I want to pass more than one argument? Is it better not to use jQuery? For example: <tr onclick="killMe('id')"> ... </tr> I didn't find the answer on my question, I will be glad even for links. Thanks.

    Read the article

  • ASP.NET control in one content area needs to reference a control in another content area

    - by harrije
    I have a master page that divides the main content into two areas. There are two asp:ContentPlaceHolder controls in the body section of the master page with IDs cphMain and cphSideBar respectively. One of the corresponding content pages has a control in cphMain that needs to refer to a control in cphSideBar. Specifically, a SqlDataSource in cphMain references a TextBox in cphSideBar to use as a parameter in the select command. When the content page loads the following run-time error occurs: Could not find control 'TextBox1' in ControlParameter 'date_con'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Could not find control 'TextBox1' in ControlParameter 'date_con'. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [InvalidOperationException: Could not find control 'TextBox1' in ControlParameter 'date_con'.] System.Web.UI.WebControls.ControlParameter.Evaluate(HttpContext context, Control control) +1753150 System.Web.UI.WebControls.Parameter.UpdateValue(HttpContext context, Control control) +47 System.Web.UI.WebControls.ParameterCollection.UpdateValues(HttpContext context, Control control) +114 System.Web.UI.WebControls.SqlDataSource.LoadCompleteEventHandler(Object sender, EventArgs e) +43 System.EventHandler.Invoke(Object sender, EventArgs e) +0 System.Web.UI.Page.OnLoadComplete(EventArgs e) +8698566 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +735 I kinda know what the problem is... ASP.NET does not like the fact that the SqlDataSource and TextBox are in different asp:Content controls within the content page. As a workaround, I have another TextBox in cphMain with the SqlDataSource which has Visible=False. Then in the Page_Load() event handler the contents of the TextBox in cphSideBar is copied into the contents of the non-visible TextBox in cphMain. I get the results I want with the work around I've come up with, but it seems like such a hack. I was wondering if there is a better solution I'm missing. Please advise.

    Read the article

  • Passing GET variables from Flash to PHP with Chinese characters

    - by WillDonohoe
    Hi Everyone, I'm calling a php file from Flash and adding variables afterwards like so: http://www.randomwebsite.com/something.php?title=?? It works fine if I copy and paste this directly into the web browser, however if I call it through flash, the address bar would end up like this: something.php?title=?? Is there anything I can do from PHP or flash to encode/decode the string? Any help is greatly appreciated. Thanks, Will

    Read the article

  • Passing an array of data as an input parameter to an Oracle procedure

    - by Sathya
    I'm trying to pass an array of (varchar) data into an Oracle procedure. The Oracle procedure would be either called from SQL*Plus or from another PL/SQL procedure like so: BEGIN pr_perform_task('1','2','3','4'); END; pr_perform_task will read each of the input parameters and perform the tasks. I'm not sure as to how I can achieve this. My first thought was to use an input parameter of type varray but I'm getting Error: PLS-00201: identifier 'VARRAY' must be declared error, when the procedure definiton looks like this: CREATE OR REPLACE PROCEDURE PR_DELETE_RECORD_VARRAY(P_ID VARRAY) IS To summarize, how can I pass the data as an array, let the SP loop through each of the parameters and perform the task ? I'm using Oracle 10gR2 as my database.

    Read the article

  • Passing BLOB/CLOB as parameter to PL/SQL function

    - by Ula Krukar
    I have this procedure i my package: PROCEDURE pr_export_blob( p_name IN VARCHAR2, p_blob IN BLOB, p_part_size IN NUMBER); I would like for parameter p_blob to be either BLOB or CLOB. When I call this procedure with BLOB parameter, everything is fine. When I call it with CLOB parameter, I get compilation error: PLS-00306: wrong number or types of arguments in call to 'pr_export_blob' Is there a way to write a procedure, that can take either of those types as parameter? Some kind of a superclass maybe?

    Read the article

  • String from Httpresponse not passing full value.

    - by Shekhar_Pro
    HI i am in desperate need for help here, I am making a web request and getting a json string with Response.ContentLenth=2246 but when i parse it in a string it gives only few 100 characters, i traked it down that it is only getting values less than 964. strings length is still 2246 but remaining values are just (\0) null characters. Its also giving an error Unterminated string passed in. (2246): at following line FacebookFeed feed = sr.Deserialize<FacebookFeed>(data); It works fine if the response stream contains characters less than 964 chars. Following is the extract from the full code error encountered in last line. System.Web.Script.Serialization.JavaScriptSerializer sr = new System.Web.Script.Serialization.JavaScriptSerializer(); System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(@"https://graph.facebook.com/100000570310973_181080451920964"); req.Method = "GET"; System.Net.HttpWebResponse res = (System.Net.HttpWebResponse)req.GetResponse(); byte[] resp = new byte[(int)res.ContentLength]; res.GetResponseStream().Read(resp, 0, (int)res.ContentLength); string data = Encoding.UTF8.GetString(resp); FacebookFeed feed = sr.Deserialize<FacebookFeed>(data); error given is Unterminated string passed in. (2246): {"id":"100000570310973_1810804519209........ (with rest of data in the string data including null chars) following is the shape of classes used in my code: public class FacebookFeed { public string id { get; set; } public NameIdPair from { get; set; } public NameIdPair to { get; set; } public string message { get; set; } public Uri link{get;set;} public string name{get; set;} public string caption { get; set; } public Uri icon { get; set; } public NameLinkPair[] actions { get; set; } public string type { get; set; } public NameIdPair application { get; set; } //Mentioned in Graph API as attribution public DateTime created_time { get; set; } public DateTime updated_time { get; set; } public FacebookPostLikes likes { get; set; } } public class NameIdPair { public string name { get; set; } public string id { get; set; } } public class NameLinkPair { public string name { get; set; } public Uri link{get; set;} } public class FacebookPostLikes { public NameIdPair[] data { get; set; } public int count { get; set; } }

    Read the article

  • Passing parameters to a JQuery function.

    - by jmpena
    Hello, ive a problem using JQuery.. Im creating a HTML with a loop and it has a column for Action, that column is a HyperLink that when the user click the link call a JavaScript function and pass the parameters... example: <a href="#" OnClick="DoAction(1,'Jose');" > Click </a> <a href="#" OnClick="DoAction(2,'Juan');" > Click </a> <a href="#" OnClick="DoAction(3,'Pedro');" > Click </a> ... <a href="#" OnClick="DoAction(n,'xxx');" > Click </a> i want that function to Call an Ajax JQuery function with the correct parameters. any help ??

    Read the article

  • MVP - asp.net - passing information via views - confused

    - by ekynox
    Hi, I've just started to play around with MVP in asp.net. One thing I quite cant figure out is how do I pass information, i.e. an integer variable from one view(webform) to another. Let's I have a customerlistView which is mapped to a customerlist.aspx page. From it I select a customer and it's record id. Say I want to display the customer's details in another view (i.e customerDetailView, customerdetail.aspx). How do I achieve that ? Does that mean customerlistView would call the presenter of the customerdetail and cause a page redirect ? Any ideas ? thanks

    Read the article

< Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >