Search Results

Search found 7418 results on 297 pages for 'argument passing'.

Page 51/297 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • C++ passing arguments to a program already running

    - by wyatt
    I'm reading through a tutorial on using voice commands to control applications and, in an example of controlling rhythmbox, it suggests commands such as the following can be executed: rhythmbox-client --play rhythmbox-client --pause Why does this not simply open a new instance of the program, and how can I emulate the functionality in my own programs? For example, how could I pass a string to a particular instance of a program? Thanks

    Read the article

  • MPI - passing function as a parameter

    - by Hmyzak
    Hi, is there any how how to pass function as a parameter when starting program in C? I am implementing app for integral aproximation, and all I need is to type a function I want to work with, when starting app. I tried (e.g.) 2/(2+2*x), but I only get back "2". When I write to application directly, there is no problem. Is there any simple way of getting this? Maybe redistribute it to more parametres? Like app.c number number*x number *x*x number *x*x*x... ? Thanks

    Read the article

  • Problem with passing folder path string to web service function via jQuery.ajax

    - by the_V
    Hello, I need to perform asp.net web-service function call via jQuery and pass asp.net application path to it. That's the way I'm trying to do it (code is located within asp.net page, e.g. aspx file): var d = "{'str':'<%=System.DateTime.Now.ToString() %>', 'applicationPath':'<%=GetApplicationPath() %>'}"; $.ajax({ type: "POST", url: "http://localhost/testwebsite/TestWebService.asmx/Test", data: d, contentType: "application/json; charset=utf-8", dataType: "json", error: function (xhr, status, error) { var err = eval("(" + xhr.responseText + ")"); alert(err.Message); }, success: function (msg) { } }); That's what GetApplicationPath method looks like: protected string GetApplicationPath() { return HttpUtility.HtmlEncode(Request.PhysicalApplicationPath); } And here is a header of web-service function which I'm trying to call: public void Test(string str, string applicationPath) Function call works well, but applicationPath parameter doesn't passed correctly. When I debug it I see that backslashes are removed, function gets "C:ProjectsSamplesmytestwebsite" instead of "'C:\Projects\Samples\mytestwebsite\'". How can I overcome this?

    Read the article

  • AS3 Passing data between objects/classes

    - by 1337holiday
    So i a building a categorized menu of different foods. I have a class for "categories" (buttons) which essentially will return a string "salads", "drinks", etc. I now have another class "menuItems" for items within categories and this handles sizes such as "small", "med", "large", etc. My problem now is that when i return "salads", i want to invoke an array which contains all the elements of salads, send it to menuItems which will populate the menu. So far i have both the category objects and the menu object setup. I just cant seem to be able to send the data that the category object is returning and pass it to the menu object. Both of which are added to the stage as shown below: If there was a way that i could say add all these classes to one class so that they can talk to each other that would be great but i dont know how to do this. Been stuck for hours, please any help is greatly appreciated.

    Read the article

  • Passing arguments to Shared Function - C

    - by SpyrosR
    I have used dlopen to load an object and dlsym to get a function pointer to a shared object function. Everything works fine. I have tested it calling then the shared function which (for now) only prints and it works-prints fine in the main program calling it. Now I want to pass two arguments to this function. An int and a char * .Can anyone help me understand how can I pass arguments to a shared function? I have searched in the web but I cannot understand how it works.

    Read the article

  • Passing an array of structures to an Oracle stored procedure (CFMX)

    - by Patti
    I'm looking to write a Oracle stored procedure where I would pass in (from ColdFusion) an array of structures and loop over each iteration to insert the bits and pieces within the structures to the DB., I haven't written this type of procedure / package before. I am planning to do an sp / package similar to what is sketched out in the second reply to this thread: How to pass a array of object to oracle stored procedure Assuming I do, how can I call the procedure from ColdFusion (I'm using MX) and pass in my array? As far as I can see, none of the CF_SQL_Types make sense.

    Read the article

  • Haskell Input & Passing Values to Functions

    - by Pradeep
    putStrLn "Enter the Artist Name" art <- getLine putStrLn "Enter the Number of CD's" num <- getLine let test= buyItem currentStockBase art num printListIO (showcurrentList test) the values i have to pass for buyItem is buyItem currentStockBase "Akon" 20 but i want to send "Akon" to art and for 20 i want to send num it gives me this error ERROR file:.\Project2.hs:126 - Type error in application *** Expression : buyItem currentStockBase art num *** Term : num *** Type : [Char] *** Does not match : Int please help me

    Read the article

  • passing a parameter from an other model on ruby

    - by MAGE
    I'm very newbie in ruby and need your help. I must save a "Topic" and make it like this : @topic = Topic.new(params[:topic]) But I would like to pass an other information to this topic. It has a field "community_id" that link it to a community. The logged user has this information on his table. How can I pass the "community_id" from the logged user to the "community_id" of the "topic" created ? thx for your help

    Read the article

  • passing an extra parameter in jobschedule in node.js

    - by Sush
    Is there any possible way to pass any extra parameter instead of date in schedule.scheduleJob(date,function(id)) The below code is not working var id =record.id; var date =record.date; jobsCollection.save({ id: record.id }, { $set: record }, function (err, result) { var j = schedule.scheduleJob(date, function (id) { return function () { console.log("inside----------") console.log(id) }; }(id)); if (!err) { return context.sendJson([], 404);; } }); i want to pass the date along with another data to schedule jobs. so that i can perform other operations based on the date schedule and that id

    Read the article

  • Passing trough a datagrid value

    - by Tonz
    I have a datagrid with 2 columns. One databound which display names and the other one is a hyperlink column. Column1 = databound column, Column2 = hyperlink column. column1: column2: --------------------- Name1 Modify Name2 Modify Next when i click on any of the values in Column2 i simply get redirected to a other page. This page contains 2 buttons/hyperlinks with Yes or No. (does not mather wich control, which one would bring the most easy to implement solution atm) When clicked on No it simply redirects back to the orignal page. Now the question is when i press "Yes" how exactly do i acces "Name1" (or Name2 if i press on the second modify)? Meaning if i press Yes i want to use this Name for certain opertions (xml). To put it short if i press on "modify" i want to be able to get that name associated with it (which is already displayed in the first bound column left of it). So the goal is to use that name in Xpath for example so i can make a query towards that node with that certain name. Hopefully this made some sence.

    Read the article

  • passing arg2 of 'listFind' from incompatible pointer type

    - by lego69
    Hello, I've got some problem with my function and don't know how to solve this problem, This is my code: ListResult result=listFind(currentLines, compareBasicLines, &linePrototype); <-here problem compareBasicLines pointer to function int compareBasicLines(ptrLine line1, ptrLine line2){ COMPARE_NUMBER_STRINGS(line1, line2); } COMPARE_NUMBER_STRINGS(line1, line2); defined in another file #define COMPARE_NUMBER_STRINGS(var1, var2) \ if(var1 == NULL || var2 == NULL){ \ return 0; \ } \ return strcmp(var1->strNumber, var2->strNumber); thanks in advance for everyone

    Read the article

  • ASP.NET MVC 2 Form Not Passing Values

    - by Wayne
    Hi, I have a strange problem happening today. I am running the latest version of the MVC V2 framework and have been having no trouble at all - I came in this morning and for some reason values aren't being passed in to actions. To clarify lets say I have something like this: <% using (Html.BeginForm("Register", "Registration", FormMethod.Post)) { %> .... <input type="submit" name="register" id="register" value="Register" /> <% } %> And in my controller I have the following: [HttpPost] public ActionResult Register(RegistrationModel model, string register) { // At this point the register string is null } This has been working fine for a while now and I have not changed anything that I can think of that would cause this to happen. Does that make sense and as anyone any idea what is going on or what I have messed up? Thanks.

    Read the article

  • c Pointer to pointer, or passing list to functions

    - by user361808
    Hi, I am new to c programming. Could anyone please tell me what's wrong with the following program? typedef struct Person_s { int age; char name[40]; } Person_t; int process_list(int *countReturned, Person_t **p_list) { Person_t *rowPtr=0; //the actual program will fethc data from DB int count =1; if(!((*p_list) = (Person_t *) malloc(sizeof(Person_t)))) { return -1; } rowPtr = *p_list; rowPtr[count-1].age =19; strcpy(rowPtr[count-1].name,"Prince Dastan"); *countReturned = count; return 0; } int main(int argc, char *argv[]) { Person_t *tmpPerson=0; Person_t **p_list=0; int *count=0; int i; process_list(count,p_list); tmpPerson = *p_list; for(i=0; i< *count; i++) { printf("Name: %s , age: %d\n",tmpPerson->name,tmpPerson->age); tmpPerson++; } //free(tmpPerson); return 0; }

    Read the article

  • Laravel Passing variable not working

    - by Friend
    Hello People here is my code i have used in controller... public function bulk() { return View::make('bulk')->with('message','hii there'); } my route file contains... Route::get('bulk',array('uses'=>'HomeController@bulk'))->before('auth'); In my view Iam testing it by ... @if(Session::has('message')) Present @else not Present @endif The page is making a view with the message 'not Present' why is it?? I even tried return Redirect::to('bulk')->with('message','hii there'); I get an erro mesage on Console mypro/public/bulk net::ERR_TOO_MANY_REDIRECTS What could be the problem?? is there any issues with name?? I tried this method earlier which worked fine for me.... :( Iam using Blade Template..

    Read the article

  • fancybox - passing 'this' to onClosed function

    - by Phil Jackson
    Hi this is probly really simple but I juast cant seem to figure it out! if( is_logged_out( html ) ) { var throughClick = $(this); $.fancybox( html, { 'autoDimensions' : false, 'width' : 'auto', 'height' : 'auto', 'transitionIn' : 'none', 'transitionOut' : 'none', 'hideOnOverlayClick' : false, 'showCloseButton' : false, 'onClosed' : function( throughClick ) { alert(throughClick.attr('name')); throughClick.trigger('click'); } }); }else{ All i want to do is pass the object of whichever button or link that was clicked, so once the user has logged back in it will process again. Any help is much appreciated.

    Read the article

  • Passing arguments to a function?

    - by dfjhdfjhdf
    I need to learn how to pass an associative array to a function so that I could do the following within the function: function someName($argums) { if (gettype($argums) != 'array' || !array_key_exists('myOneKey', $argums) || !array_key_exists('myOtherKey', $argums)) { return false; } /*do other stuff*/ } (That's how I would do in PHP what I am looking for in JavaScript.)

    Read the article

  • Codeigniter passing variable to URL

    - by CyberJunkie
    I have a list of posts and an edit link for each. When clicking edit it goes to a page where I can edit the specific post I clicked on. For this I will have to pull from the db the id of the post. Would this be the correct way to do it? <a href="<?php echo site_url("post/edit/$row->id"); ?>">Edit</a> post is my controller, edit is my function, and $row->id should pull the id of the post.

    Read the article

  • passing id to controller

    - by coure06
    I have 4-5 partial view files (.ascx) like abc.ascx, cde.ascx, fgh.ascx. I want to return different partial views based on the name of the view passed to url parameter like this /someservice/abc will go to action someservice and will return abc.ascx partial view. /someservice/cde will go to action someservice and will return cde.ascx partial view. How can achieve this?

    Read the article

  • Problem with passing array of pointers to struct among functions in C

    - by karatemonkey
    The Code that follows segfaults on the call to strncpy and I can't see what I am doing wrong. I need another set of eyes to look it this. Essentially I am trying to alloc memory for a struct that is pointed to by an element in a array of pointers to struct. #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_POLICY_NAME_SIZE 64 #define POLICY_FILES_TO_BE_PROCESSED "SPFPolicyFilesReceivedOffline\0" typedef struct TarPolicyPair { int AppearanceTime; char *IndividualFile; char *FullPolicyFile; } PolicyPair; enum { bwlist = 0, fzacts, atksig, rules, MaxNumberFileTypes }; void SPFCreateIndividualPolicyListing(PolicyPair *IndividualPolicyPairtoCreate ) { IndividualPolicyPairtoCreate = (PolicyPair *) malloc(sizeof(PolicyPair)); IndividualPolicyPairtoCreate->IndividualFile = (char *)malloc((MAX_POLICY_NAME_SIZE * sizeof(char))); IndividualPolicyPairtoCreate->FullPolicyFile = (char *)malloc((MAX_POLICY_NAME_SIZE * sizeof(char))); IndividualPolicyPairtoCreate->AppearanceTime = 0; memset(IndividualPolicyPairtoCreate->IndividualFile, '\0', (MAX_POLICY_NAME_SIZE * sizeof(char))); memset(IndividualPolicyPairtoCreate->FullPolicyFile, '\0', (MAX_POLICY_NAME_SIZE * sizeof(char))); } void SPFCreateFullPolicyListing(SPFPolicyPair **CurrentPolicyPair, char *PolicyName, char *PolicyRename) { int i; for(i = 0; i < MaxNumberFileTypes; i++) { CreateIndividualPolicyListing((CurrentPolicyPair[i])); // segfaults on this call strncpy((*CurrentPolicyPair)[i].IndividualFile, POLICY_FILES_TO_BE_PROCESSED, (SPF_POLICY_NAME_SIZE * sizeof(char))); } } int main() { SPFPolicyPair *CurrentPolicyPair[MaxNumberFileTypes] = {NULL, NULL, NULL, NULL}; int i; CreateFullPolicyListing(&CurrentPolicyPair, POLICY_FILES_TO_BE_PROCESSED, POLICY_FILES_TO_BE_PROCESSED); return 0; }

    Read the article

  • Passing values between web pages

    - by Khou
    I need to pass a dollar amount from one webpageto another webpage without letting the user modify the values when the values are passed between these pages. ie Page 1 (entry page) to Page 2 (confirmation page) What is the best way to do this?

    Read the article

  • passing a float as a pointer to a matrix

    - by numerical25
    Honestly, I couldnt think of a better title for this issue because I am having 2 problems and I don't know the cause. The first problem I have is this //global declaration float g_posX = 0.0f; ............. //if keydown happens g_posX += 0.03f; &m_mtxView._41 = g_posX; I get this error cannot convert from 'float' to 'float *' So I assume that the matrix only accepts pointers. So i change the varible to this.... //global declaration float *g_posX = 0.0f; ............. //if keydown happens g_posX += 0.03f; &m_mtxView._41 = &g_posX; and I get this error cannot convert from 'float' to 'float *' which is pretty much saying that I can not declare g_posX as a pointer. honestly, I don't know what to do.

    Read the article

  • Passing a variable that can be updated

    - by Rob Bonner
    This seems like a simple thing, but can't get it to work. I pass a variable into a UIViewController thourgh a standard property: [aViewController setProposedDate:proposedWorkLog.entryDate]; which is retained by the controller, and possible changed. I have verified that in the controller, the data is modified. But, after it is popped off the stack and I look in the calling view, the data has not been updated. Is there a way to pass this variable and have it retain the new value, or a way to pass back a response from a closing view controller? Thanks!

    Read the article

  • Passing a NSString to another ViewController using classes

    - by Jeff Kranenburg
    I know this insanely simple, but I am re-teaching myself the basics and trying to get my head around this:-) I have one ViewController called MainVC and I have one called ClassVC In ClassVC I have this code: @interface ClassVC : UIViewController { NSString *mainLine; } @property (nonatomic, retain) NSString *mainLine; @end and I have this in the implementation file: @synthesize mainLine = _mainLine; -(NSString *)_mainLine { _mainLine = @"This a string from a Class"; return _mainLine; } Now I was thinking that if I #import the ClassVC into MainVC I would be able to transfer that string along as well like so: This code is in the viewDidLoad _mainLabel.text = _secondClass.mainLine; NSLog(@"%@", _secondClass.mainLine); But that is not working - so cannot I not pass strings in through this way???

    Read the article

  • Passing Javascript value to PHP Variable using ajax

    - by shels
    I am trying to use a Flash detection script to assess whether Flash Plugin is enabled in the user browser so that a different page loads. The Flash detection script is as follows, using jquery 1.8.2 and jquery.jqplugin 1.0.2 <script type="text/javascript" src="jquery-1.8.2.min.js"></script> <script type="text/javascript" src="jquery.jqplugin.1.0.2.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#withflash").hide(); $("#noflash").hide(); if ($.browser.flash == true) $("#withflash").show (); else $("#noflash").show (); }); </script> <div id="withflash">Flash Supported</div> <div id="noflash">Flash Not Supported</div> I get the display that "Flash Supported" if Flash Plugin is present.. I need to capture the value whether flash plugin value is true in a php variable $hasFlashSupport as below: <?php echo " $hasFlashSupport"; exit; ?> I am aware that PHP is server based and Javascript is client based.. Hence Ajax would be a nice option to capture the javascript variable to my php variable. I am totally ignorant about Ajax syntax and how to achieve it. Request the experts here to help me out with the code on how this can be achieved... Thanking all of you in advance..

    Read the article

< Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >