Search Results

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

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

  • Passing HTML form data in the URL on local machine (file://)

    - by atzz
    Hi, I'm building a small HTML/JS application for primary use on local machine (i.e. everything is accessed via file:// protocol, though maybe in the future it will be hosted on a server within intranet). I'm trying to make a form with method="get" and action="target.html", in the hope that the browser will put form data in the URL (like, file://<path>/target.html?param1=aaa&param2=bbb). However, it's not happening (target.html opens fine, but no parameters is passed). What am I doing wrong? Is it possible to use forms over file:// at all? I can always build the url manually (via JS), but being lazy I'd prefer the browser do it for me. ;) Here is my sample form: <form name='config' action="test_form.html" method="get" enctype="application/x-www-form-urlencoded"> <input type="text" name="param1"> <input type="text" name="param2"> <input type="submit" value="Go"> </form>

    Read the article

  • Passing values for method

    - by Kasun
    I beginner for programming. So can you please show me how to pass values for your compile() method. class CL { private const string clexe = @"cl.exe"; private const string exe = "Test.exe", file = "test.cpp"; private string args; public CL(String[] args) { this.args = String.Join(" ", args); this.args += (args.Length > 0 ? " " : "") + "/Fe" + exe + " " + file; } public Boolean Compile(String content, ref string errors) { //remove any old copies if (File.Exists(exe)) File.Delete(exe); if (File.Exists(file)) File.Delete(file); File.WriteAllText(file, content); Process proc = new Process(); proc.StartInfo.UseShellExecute = false; proc.StartInfo.RedirectStandardOutput = true; proc.StartInfo.RedirectStandardError = true; proc.StartInfo.FileName = clexe; proc.StartInfo.Arguments = this.args; proc.StartInfo.CreateNoWindow = true; proc.Start(); //errors += proc.StandardError.ReadToEnd(); errors += proc.StandardOutput.ReadToEnd(); proc.WaitForExit(); bool success = File.Exists(exe); return success; } }

    Read the article

  • JQUERY ajax passing null value from MVC View to Controller

    - by Piyush Sardana
    hi guys i'm posting some data to controller using jquery ajax, but i am getting null values in my controller, jQuery code is: $('#registerCompOff').click(function() { var compOff = []; $('div').each(function() { var curRow = {}; curRow.Description = $(this).find('.reason').val(); curRow.CompOffDate = $(this).find('.datefieldWithWeekends').val(); if (curRow.Description != null && curRow.CompOffDate != null) { compOff.push(curRow); } }); $.ajax({ type: 'POST', url: this.href, dataType: 'json', data: compOff }); return $('form').valid(); });? compOff is not null I have checked that... controller is: [HttpPost] public ActionResult RegisterCompOff(RegisterCompOff[] registerCompOff) { //return View(); } can you tell me where i'm going wrong?

    Read the article

  • Passing CMD Results to Variable in a Batch File

    - by TripleNad
    I am trying to install an application and a group of services using PSTools, but I want to take into account that the computer I am trying to connect to may be turned off or on a different network, which is not reachable from the internal network. Basically if the machine is not able to be accessed through the admin share, this is the message that I am getting: Couldn't access MachineName: The network path was not found. Make sure that the default admin$ share is enabled on MachineName. This is the syntax I am using to try to capture the "Error Message" and then report back that if installation was successful or not (depending on if it can contact the machine) @echo off set /p name=What is the machine name?: psexec.exe \\\%name% -u *useraccount* -p *password* \\\ServerName\installation.bat FOR /F "tokens=*" %%A IN ('COMMAND ^| FIND "Couldn't access"') DO SET Error=%%A If "%Error%"=="Couldn't access" ECHO Installation Failed. Else ECHO Installtion complete. Pause exit Currently it hangs right at the point it's defining the Error Variable. Can't quite figure out what I am going wrong here.

    Read the article

  • Passing Request Object into Service Layer

    - by SpringTrickery
    In a spring mvc + spring core app, we have have a view layers, a facade, a service layer, a dao layer and a stored-proc based persistance layer. The service layer is unaware of the clients that utilitize its methods. Is it fine to propagate raw http requests into the service layer? Or is it bad practice and a violation of the loose coupling principles? If it is, then what's a clean workaround?

    Read the article

  • Passing GPS speed via the Eclipse Emulator Control

    - by Nick
    Hi, my app queries the GPS-speed using .getSpeed() on a LocationListener. Is there a way to set this speed using the Eclipse Emulator Control or the command line? I tried to feed multiple sets of coordinates to the emulator via the manual GPS-control, but it didn't pick up a speed from that. Also, using a pre-defined GPX-file and playing it doesn't work for me. I would like to test my app without having to take it on a test-drive in my car every time ;)! Thanks!

    Read the article

  • passing info from facebook to UITabBarController

    - by EquinoX
    When my app first start, it shows up a main page showing to login to facebook and then it goes to the UITabBarController. The code that I have in my app delegate is the following: //this is the .h @interface NMeAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; MainViewController *controller; UITabBarController *tabBar; } @property (nonatomic, retain) IBOutlet UITabBarController *tabBar; @property (nonatomic, retain) MainViewController *controller; @property (nonatomic, retain) IBOutlet UIWindow *window; @end //this is the .m of the app delegate #import "NMeAppDelegate.h" @implementation NMeAppDelegate @synthesize window; @synthesize tabBar; @synthesize controller; #pragma mark - #pragma mark Application lifecycle - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. controller = [[MainViewController alloc] init]; [window addSubview:tabBar.view]; [window addSubview:controller.view]; [window makeKeyAndVisible]; return YES; } Inside of MainViewController, I actually have a Facebook * facebook object, which basically has all of the information that I need. Every information that I need for this apps is queried in the MainViewController. The problem is that after getting this info and now I am in the UITabViewController... how do I get those information that I already queried facebook for? I have a class called UserInfo as well, which basically has everything essential I need. I need to have the info from UserInfo so that the other ViewController in the UITabBarController have access to it.... I hope my question makes sense

    Read the article

  • passing xml to a webservice

    - by Neale
    I have a simple web service that will have one method: DoTransactions(xlm) Now the reason that i am using XML as a parameter is due to the fact that the parameters will often change. So for example it could be: <payload> <userId>1234</userid> <partnerId>ptn654</partnerId> </payload> OR <payload> <partnerId>ptn654</partnerId> <items> <item1> <cost>10</cost> <description>This is item 1</description> </item1> </items> </payload> As you can see the XML string will always change (this is due to a client request) Would it be better to rather pass in a string and parse the XML in the method or should is there a better way to do it. This web service will be used for varios different code languages.

    Read the article

  • Passing function-specific variables

    - by Simon Carlson
    Say I got two functions that looks like this: function main(Index) { doStuff(); } function doStuff() { if(Index == 1) { document.write("Hello world!") } } And some HTML: <input type="button" value="Click me" onclick="main(1)" /> I realize this is a very stupid way to use function-specific variables and such, but it's just out of curiosity. So is it possible to pass the variable Index from the main function to the doStuff function?

    Read the article

  • passing Func<TSource, TKey> keySelector error

    - by user338429
    static void Main() { string[] a = { "a", "asd", "bdfsd", "we" }; a = a.OrderBy(fun).ToArray(); } private static int fun(string s) { return s.Length; } its is giving compile time error . I know that we can do this with Lambda expression like this. a.OrderBy(s=>s.Length).ToArray(); but i want to this do by defining different function . What mistake i have done?

    Read the article

  • 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

  • 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

  • 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 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

  • 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 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 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 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

  • 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

  • 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

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