Search Results

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

Page 79/604 | < Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >

  • Passing report values to a query

    - by Beavis
    I'm a novice with Microsoft Access as my background is mostly .NET. I'm sure what I'm trying to accomplish is dead simple but I need some direction. I have a report and a query. The query returns a single numeric value based on a single numeric criteria. Select total from table where id = [topic] I have placed a text box on my report so I can feed the id to this query and in return get the total. It seems like DLookUp is what I want but no matter how I construct it, I get an "#Error" in the text box when I run the report. Currently my DLookUp looks like this (I just hard-coded now for simplicity): =DLookUp("[total]","myquery","[topic] = 3") How can I pass a value from a field on my report to a query so I can return the query's single numeric value? Thanks.

    Read the article

  • Passing URIs as URL arguments in Drupal 6

    - by wynz
    I'm running into problems trying to pass absolute URIs as parameters with clean URLs enabled. I've got hook_menu() set up like this: function mymodule_menu() { return array( 'page/%' = array( 'title' = 'DBpedia Display Test', 'page callback' = 'mymodule_dbpedia_display', 'page arguments' = array(1), ), ); } and in the page callback: function mymodule_dbpedia_display($uri) { // Make an HTTP request for this URI // and then render some things return $output; } What I'm hoping to do is somehow pass full URIs (e.g. "http://dbpedia.org/resource/Coffee") to my page callback. I've tried a few things and nothing's worked so far... http://mysite.com/page/http%3A%2F%2Fdbpedia.org%2Fresource%2FCoffee Completely breaks Drupal's rewriting http://mysite.com/page/?uri=http%3A%2F%2Fdbpedia.org%2Fresource%2FCoffee Gives a 404 http://mysite.com/page/http://dbpedia.org/resource/Coffee Returns just "http:", which makes sense I could probably use $_GET to pull out the whole query string, but I guess I'm hoping for a more 'Drupal' solution. Any suggestions?

    Read the article

  • How to copy referenced assembly's dependecies to ASP.NET output bin folder?

    - by LD2008
    Hi all, In Visual Studio 2010, I have project A (asp.net application). Project A references project B (class library). Project B references assembly C (direct reference to a DLL). When building project A, only project A and project B binaries are present in the /bin directory of project A, but not the assembly C. Why is that? If project B depends on assembly C, why is assembly C not copied together to the output folder? "Copy local" is already set to "true" for assembly C. Any information would be appreciated. Thanks!

    Read the article

  • Passing derived objects in a constructure

    - by Clarence Klopfstein
    This is a bit of a convoluted question, hopefully I can make it clear. I am finding that this may not be possible, but am trying to see if anybody has a solution. I have four classes, two are core classes and two are those core classes extended: extUser Extends coreUser extSecurity Extends coreSecurity In the constructor for coreUser you have this: public coreUser(string id, ref coreSecurity cs) When trying to extend coreUser you would have this: public extUser(string id ref extSecurity es) : base(id, ref es) This fails because es is of type, extSecurity and the base class expects a type of coreSecurity. I've not found anyway to cast this to allow for me to override this base class in C#. In VB it works just fine. Ideas?

    Read the article

  • Django url rewrites and passing a parameter from Javascript

    - by William T Wild
    As a bit of a followup question to my previous , I need to pass a parameter to a view. This parameter is not known until the JS executes. In my URLConf: url(r'^person/device/program/oneday/(?P<meter_id>\d+)/(?P<day_of_the_week>\w+)/$', therm_control.Get_One_Day_Of_Current_Thermostat_Schedule.as_view(), name="one-day-url"), I can pass it this URL and it works great! ( thanks to you guys). http://127.0.0.1:8000/personview/person/device/program/oneday/149778/Monday/ In My template I have this: var one_day_url = "{% url personview:one-day-url meter_id=meter_id day_of_the_week='Monday' %}"; In my javascript: $.ajax({ type: 'GET', url: one_day_url , dataType: "json", timeout: 30000, beforeSend: beforeSendCallback, success: successCallback, error: errorCallback, complete: completeCallback }); When this triggers it works fine except I dont necessarily want Monday all the time. If I change the javascript to this: var one_day_url = "{% url personview:one-day-url meter_id=meter_id %}"; and then $.ajax({ type: 'GET', url: one_day_url + '/Monday/', dataType: "json", timeout: 30000, beforeSend: beforeSendCallback, success: successCallback, error: errorCallback, complete: completeCallback }); I get the Caught NoReverseMatch while rendering error. I assume because the URLconf still wants to rewrite to include the ?P\w+) . I seems like if I change the URL conf that breaks the abailty to find the view , and if I do what I do above it gives me the NoREverseMatch error. Any guidance would be appreciated.

    Read the article

  • Passing data between blocks using sinatra

    - by Dan Galipo
    Hi All I'm trying to pass data between blocks using sinatra. For example: @data = Hash.new post "/" do @data[:test] = params.fetch("test").to_s redirect "/tmp" end get "/tmp" do puts @data[:test] end However whenever i get to the tmp block @data is nil and throws an error. Why is that?

    Read the article

  • reference to XML file is not a member of the R file

    - by yoavstr
    how can i had to class layout in R another xml file ? it should b autmatic as i had new resources to res but it's not someone knows what i did wrong ? i open an activity and now i want to open another activity that will work with another xml example i have menu and main.xml now i want to go for anther activity called gamescreen using this method : newGameButton.setOnClickListener(new OnClickListener() { public void onClick(View view) { Intent i = = new Intent(this, gameScreen.class); startActivity(i); } } i want to move to another "page" to another activity called gameScreen which should b associated to the xml called gameScreen.xml but in his onCreate : public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.gameScreen); } and gameScreen is not a member of the R file please help me i am sitting for the last 4 hours felling like an idiot ...

    Read the article

  • passing variables with JQuery

    - by vick
    <script type="text/javascript" charset="utf-8"> $(document).ready(function() { $("a").click(function() { $("#myDiv").load( "job_board_data.php", { pageNo: $(this).text()} ); return false; }); }); </script> <a href="job_board_data.php?p=1">1</a> How can I pass variables to my job_board_data.php script???? I want to pass variables such as page, sort by .. anyone?

    Read the article

  • Passing User Data with SetTimer

    - by GJ
    I am calling SetTimer in a function of a Class. SetTimer(NULL, 0, 10000, (TIMERPROC) TimerCallBack); Where TimerCallBack is: static VOID CALLBACK TimerCallBack(HWND, UINT, UINT, DWORD) Now my need is to call one of the method of class which initiated timer, since TimerCallBack is static it has no access to the class object anymore. I cant find any way to pass object pointer along with the SetTimer so that I can receive it back on Callback function. Is there any other way to achieve this, if its not supported using SetTimer then which other way I can implement this.

    Read the article

  • Passing NULL values into mysql Stored procedure

    - by McNabbToSkins
    I am trying to pass a few NULL values to a stroed procedure but PHP always retains the varaibles to be empty strings '' and not NULL. My DB insert function looks like this. (I am using a Framework and ADODB so if it looks weird thats why). function insert_emp($f_name, $last_name, $dob) { if(!isset($dob)){ $dob = NULL; } $this->DB->setConnection("CALL insert_emp('$f_name', '$l_name', '$dob')"); } I have ensured that $dob is being passed an empty string ''. But for some reason when it calls the stored proc it is not changed to NULL. dob is a datetime field and mysql complains that you can not enter an empty string as a DATETIME. If I hard code the insert such as this $this->DB->setConnection("CALL insert_emp('Test1', 'Test2', 'NULL')"); it will work. Thanks for the help.

    Read the article

  • Pointer reference and dereference

    - by ZhekakehZ
    I have the following code: #include <iostream> char ch[] = "abcd"; int main() { std::cout << (long)(int*)(ch+0) << ' ' << (long)(int*)(ch+1) << ' ' << (long)(int*)(ch+2) << ' ' << (long)(int*)(ch+3) << std::endl; std::cout << *(int*)(ch+0) << ' ' << *(int*)(ch+1) << ' ' << *(int*)(ch+2) << ' ' << *(int*)(ch+3) << std::endl; std::cout << int('abcd') << ' ' << int('bcd') << ' ' << int('cd') << ' ' << int('d') << std::endl; } My question is why the pointer of 'd' is 100 ? I think it should be: int('d') << 24; //plus some trash on stack after ch And the question is why the second and the third line of the stdout are different ? 6295640 6295641 6295642 6295643 1684234849 6579042 25699 100 1633837924 6447972 25444 100 Thanks.

    Read the article

  • passing variables when calling methon in new thread (iphone)

    - by Mouhamad Lamaa
    dear stacks i need to pass variables to the thread method when creating a new thread my code is the follwing //generating thread [NSThread detachNewThreadSelector:@selector(startThread) toTarget:self withObject:nil]; thread job - (void)startThread:(NSInteger *)var img:(UIImageView *) Img{ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [NSThread sleepForTimeInterval:var]; [self performSelectorOnMainThread:@selector(threadMethod) withObject:nil waitUntilDone:NO]; //i need to pass Img to threadMethod: [pool release]; } thread Method - (void)threadMethod:(UIImageView *) Img { //do some coding. } so how i can do this (pass parameter to both of methods

    Read the article

  • Passing arguments to a python service

    - by Grim
    Hi, I need some help with a python service. I have a service written in Python. What I need to do is to pass it some arguments. Let me give you an example to explain it a bit better. Lets say I have a service, that does nothing but writes something to a log. I'd like to write the same thing into the log several times, so I use a loop. I would like to pass the counter for the loop when I start the service, but I have no idea how. I start the service with: win32serviceutil.HandleCommandLine(WinService) I'm looking for something like win32serviceutil.HandleCommandLine(WinService,10) I don't really care how its done, as long as I can pass arguments to it. Have been trying to get this to work for the better part of the day with no luck. Also, the service isn't run directly, but is imported and then run from there.

    Read the article

  • 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

  • Bitmap manipulation as a referenced object

    - by John Maloney
    I am working with a Bitmap object that I add annotations or copyright material to the image and then return the modified bitmap. My problem is that the Bitmap won't hold the changes made to it as it moves along the chain. I am treating it as a reference type and would assume that as it gets passed to each class it would carry the changes made to it. I have verified that the code inside of the MarkImage() classes does function, but which ever one gets called last is the one that has changes. Public Shared Function GetImage(ByVal imageDef As IImageDefinition) As Bitmap Dim image As Bitmap = Drawing.Image.FromFile(imageDef.Path) If Not imageDef.Authorization.IsAllowed(AuthKeys.CanViewWithoutCopyright) Then image = New MarkCopyrightImage(image).MarkImage() End If If Not imageDef.Authorization.IsAllowed(AuthKeys.CanViewWithoutAnnotations) Then image = New MarkAnnotateImage(image).MarkImage() End If Return image End Function How do I write changes to a bitmap object and then pass that object to another class while maintaining the changes? Answers in C# or VB are fine? Thanks

    Read the article

  • passing parameter to dowork?

    - by safi
    How can i Pass parameter to background_DoWork? public void bgw1_DoWork(Object sender, DoWorkEventArgs e) { make_zip_file argumentest = e.Argument as make_zip_file; Thread.Sleep(100); argumentest.return_path = argumentest.Makezipfile(files, IsOriginal); e.Result = argumentest; } i need to pass files,isOrginal parameter...? i am calling this method: public string run_async() { bgw1.DoWork += bgw1_DoWork; bgw1.RunWorkerCompleted += bgw1_RunWorkerCompleted; make_zip_file mzf2 = new make_zip_file(); bgw1.RunWorkerAsync(); return return_path; }

    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 array of pointers to another class

    - by user310153
    Hi, I am trying to do the following: in main.cpp: // Create an array of pointers to Block objects Block *blk[64]; for (i=0; i<8; i++) { for (j=0; j<8; j++) { int x_low = i*80; int y_low = j*45; blk[j*8+i] = new Block(30, x_low+40.0f, y_low+7.5f, &b); } } And then I am trying to pass it to the graphics object I have created: Graphics g(640, 480, &b, &p, blk[0], number_of_blocks); the graphics constructor looks like: Graphics::Graphics(int width, int height, Ball *b, Paddle *p, Block *blk, int number_of_blocks) { if I look at what is contained in the array from the graphics object, only the first item exists and then all the other items are in hyperspace: for (int i=0; i<64; i++) { printf("for block %d, %f, %f ", i, (_blk+(sizeof(_blk)*i))->_x_low, (_blk+(sizeof(_blk)*i))->_y_low); printf("blah %d\n", (_blk+(sizeof(_blk)*i))); } and if I look at the addresses, they are different (6956552 rather than 2280520 when I examine the addresses in the main class using: printf(" blah %d\n", &blk[j*8*i]); I am sure there must be something subtle I am doing wrong as its like I have copied the first item from the blk array to a new address when passed to the graphics object. Does this make sense? Any ideas? Cheers, Scott

    Read the article

  • Passing Data to Multi Threads

    - by alaamh
    I study this code from some book: #include <pthread.h> #include <stdio.h> /* Parameters to print_function. */ struct char_print_parms { /* The character to print. */ char character; /* The number of times to print it. */ int count; }; /* Prints a number of characters to stderr, as given by PARAMETERS, which is a pointer to a struct char_print_parms. */ void* char_print(void* parameters) { /* Cast the cookie pointer to the right type. */ struct char_print_parms* p = (struct char_print_parms*) parameters; int i; for (i = 0; i < p->count; ++i) fputc(p->character, stderr); return NULL; } /* The main program. */ int main() { pthread_t thread1_id; pthread_t thread2_id; struct char_print_parms thread1_args; struct char_print_parms thread2_args; /* Create a new thread to print 30,000 ’x’s. */ thread1_args.character = 'x'; thread1_args.count = 30000; pthread_create(&thread1_id, NULL, &char_print, &thread1_args); /* Create a new thread to print 20,000 o’s. */ thread2_args.character = 'o'; thread2_args.count = 20000; pthread_create(&thread2_id, NULL, &char_print, &thread2_args); usleep(20); return 0; } after running this code, I see different result each time. and some time corrupted result. what is wrong and what the correct way to do that?

    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

  • 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

  • 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

  • Passing a multi-line string as an argument to a script in Windows

    - by Zack Mulgrew
    I have a simple python script like so: import sys lines = sys.argv[1] for line in lines.splitlines(): print line I want to call it from the command line (or a .bat file) but the first argument may (and probably will) be a string with multiple lines in it. How does one do this? Of course, this works: import sys lines = """This is a string It has multiple lines there are three total""" for line in lines.splitlines(): print line But I need to be able to process an argument line-by-line. EDIT: This is probably more of a Windows command-line problem than a Python problem. EDIT 2: Thanks for all of the good suggestions. It doesn't look like it's possible. I can't use another shell because I'm actually trying to invoke the script from another program which seems to use the Windows command-line behind the scenes.

    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

< Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >