Search Results

Search found 3836 results on 154 pages for 'argument'.

Page 12/154 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • [Google Maps] Trouble with invalid argument when switching jQueryUI based tabs

    - by Chad
    Here's a page with the issue To reproduce the error, using IE - click the directions tab, then any of the others. What I'm trying to do is this: On page load, do nothing really. However, when the directions tab loads - setup the map. Like so: $('#tabs').bind('tabsshow', function(event, ui) { if (ui.panel.id == "tabs-5") { // get map for directions var dirMap = new GMap2($("div#dirMap").get(0)); dirMap.setCenter(new GLatLng(35.79648921414565,139.40663874149323), 12); dirMap.enableScrollWheelZoom(); dirMap.addControl(new PanoMapTypeControl()); geocoder = new GClientGeocoder(); $("#dirMap").resizable({ stop: function() { dirMap.checkResize(); } }); // clear dirText $("div#dirMapText").html(""); dirMap.clearOverlays(); var polygon = new GPolygon([new GLatLng(35.724496338474104,139.3444061279297),new GLatLng(35.74748750802863,139.3363380432129),new GLatLng(35.75765724051559,139.34303283691406),new GLatLng(35.76545779822543,139.3418312072754),new GLatLng(35.767547103447725,139.3476676940918),new GLatLng(35.75835374997911,139.34955596923828),new GLatLng(35.755149755962755,139.3567657470703),new GLatLng(35.74679090345495,139.35796737670898),new GLatLng(35.74762682821177,139.36294555664062),new GLatLng(35.744422402303826,139.36346054077148),new GLatLng(35.74860206266584,139.36946868896484),new GLatLng(35.735644401200986,139.36843872070312),new GLatLng(35.73843117306677,139.36174392700195),new GLatLng(35.73592308277646,139.3531608581543),new GLatLng(35.72686543236113,139.35298919677734),new GLatLng(35.724496338474104,139.3444061279297)], "#f33f00", 5, 1, "#ff0000", 0.2);dirMap.addOverlay(polygon); // load directions directions = new GDirections(dirMap, $("div#dirMapText").get(0)); directions.load("from: [email protected],139.37083393335342 to: Ruby [email protected],139.40663874149323"); } }); What the heck is causing the error? The IE javascript debugger claims the error lies in main.js, line 139 character 28. (the google maps api file). Which is this line: function zf(a,b){a=a.style;a.width=b.getWidthString();a.height=b.getHeightString()} Any ideas? Thanks in advance!

    Read the article

  • Invalid argument exception - Navigation bar, tab bar, UIView.

    - by Tejaswi Yerukalapudi
    Class 1 has the following code that generates the exception - -(IBAction) searchAllAction: (id) sender { AddDiagSearchController *search = [[AddDiagSearchController alloc] initWithNibName:@"DiagSearch" bundle:nil]; [self.navigationController pushViewController:search animated:YES]; } the pushViewController part generates the following exception - 2010-04-14 14:03:31.060 Nav[10314:207] *** -[UIView addTarget:action:forControlEvents:]: unrecognized selector sent to instance 0x3956a80 And the class I'm trying to push has the following code. All the connections for IBOutlets were made through the interface builder. It's has a tableView, search text bar and a tabbar at the bottom and I'll be adding this to a UINavigationController. @interface AddDiagSearchController : UIViewController <UITableViewDataSource, UITableViewDelegate>{ UIBarButtonItem *quickAdd; UIBarButtonItem *searchAll; UITextField *searchTxt; } @property (nonatomic, retain) IBOutlet UITextField *searchTxt; -(IBAction) searchAllClicked:(id) sender; -(IBAction) quickAddClicked:(id) sender; -(IBAction) searchBtnClicked; -(IBAction) resignResponder: (id) sender; @end

    Read the article

  • XDS file, where to get xmlns argument?

    - by Daok
    <?xml version="1.0" encoding="utf-8"?> <xs:schema id="abc" targetNamespace="http://schemas.businessNameHere.com/SoftwareNameHere" elementFormDefault="qualified" xmlns="http://schemas.businessNameHere.com/SoftwareNameHere" xmlns:mstns="http://schemas.businessNameHere.com/SoftwareNameHere" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="..." type="..." /> <xs:complexType name="..."> I am working on a project using XSD to generate .cs file. My question is concerning the string "http://schemas.businessNameHere.com/SoftwareNameHere" If I change it, it doesn't work. But the http:// is not a valid one... what is the logic behind and where can I can information about what to put there or how to change it?

    Read the article

  • python duration of a file object in an argument list

    - by msw
    In the pickle module documentation there is a snippet of example code: reader = pickle.load(open('save.p', 'rb')) which upon first read looked like it would allocate a system file descriptor, read its contents and then "leak" the open descriptor for there isn't any handle accessible to call close() upon. This got me wondering if there was any hidden magic that takes care of this case. Diving into the source, I found in Modules/_fileio.c that file descriptors are closed by the fileio_dealloc() destructor which led to the real question. What is the duration of the file object returned by the example code above? After that statement executes does the object indeed become unreferenced and therefore will the fd be subject to a real close(2) call at some future garbage collection sweep? If so, is the example line good practice, or should one not count on the fd being released thus risking kernel per-process descriptor table exhaustion?

    Read the article

  • Invalid argument in sendfile() with two regular files

    - by Daniel Hershcovich
    I'm trying to test the sendfile() system call under Linux 2.6.32 to zero-copy data between two regular files. As far as I understand, it should work: ever since 2.6.22, sendfile() has been implemented using splice(), and both the input file and the output file can be either regular files or sockets. The following is the content of sendfile_test.c: #include <sys/sendfile.h> #include <fcntl.h> #include <stdio.h> int main(int argc, char **argv) { int result; int in_file; int out_file; in_file = open(argv[1], O_RDONLY); out_file = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC, 0644); result = sendfile(out_file, in_file, NULL, 1); if (result == -1) perror("sendfile"); close(in_file); close(out_file); return 0; } And when I'm running the following commands: $ gcc sendfile_test.c $ ./a.out infile The output is sendfile: Bad file descriptor Which means that the system call resulted in errno = -EINVAL, I think. What am I doing wrong?

    Read the article

  • Shell script argument parsing

    - by Peter Coulton
    There are a number of questions about this sort of thing but lets imagine we are targeting a generic Linux system with both getopt and getopts installed (not that we'll use either, but they seem popular) How do I parse both long (--example | --example simple-option) and short argruments (-e | -esimple-example | -e simple-example)

    Read the article

  • Passing const CName as this argument discards qualifiers

    - by Geno Diaz
    I'm having trouble with passing a constant class through a function. // test the constructors auto CName nameOne("Robert", "Bresson"); const CName nameTwo = nameOne; auto CName nameThree; // display the contents of each newly-constructed object... // should see "Robert Bresson" cout << "nameOne = "; nameOne.WriteFullName(); cout << endl; // should see "Robert Bresson" again cout << "nameTwo = "; nameTwo.WriteFullName(); cout << endl; As soon as the compiler hits nameTwo.WriteFullName() I get the error of abandoning qualifiers. I know that the class is a constant however I can't figure out how to work around it. The function is in a header file written as so: void const WriteFullName(ostream& outstream = cout) { outstream << m_first << ' ' << m_last; } I receive this error when const is put in back of the function header main.cpp:(.text+0x51): undefined reference to CName::CName()' main.cpp:(.text+0x7c): undefined reference toCName::WriteFullName(std::basic_ostream &) const' main.cpp:(.text+0xbb): undefined reference to CName::WriteFullName(std::basic_ostream<char, std::char_traits<char> >&) const' main.cpp:(.text+0xf7): undefined reference toCName::WriteFullName(std::basic_ostream &) const' main.cpp:(.text+0x133): undefined reference to operator>>(std::basic_istream<char, std::char_traits<char> >&, CName&)' main.cpp:(.text+0x157): undefined reference tooperator<<(std::basic_ostream &, CName const&)' main.cpp:(.text+0x1f4): undefined reference to operator<<(std::basic_ostream<char, std::char_traits<char> >&, CName const&)' main.cpp:(.text+0x22b): undefined reference tooperator<<(std::basic_ostream &, CName const&)' main.cpp:(.text+0x25f): undefined reference to operator<<(std::basic_ostream<char, std::char_traits<char> >&, CName const&)' main.cpp:(.text+0x320): undefined reference tooperator<<(std::basic_ostream &, CName const&)' main.cpp:(.text+0x347): undefined reference to `operator(std::basic_istream &, CName&)'

    Read the article

  • Flexible argument list in LibreOffice Calc Macro

    - by Patru
    I want to write a function that geometrically links performance data which is usually provided as percentages, so the function will basically return (1+a)*(1+b)*(1+c)* … *(1+x)-1 This should be done using LibreOffice-calc and it should behave similarly to the regular sum function. As you may throw any number of arguments at sum I would like to be able to do the same with my alternative geoSum function but I am unable to find suitable documentation on handling a variable number of arguments with variable types (i.e. an arbitrary mix of numbers, cells and ranges). How would I have to specify the arguments to my LibreOffice-Basic function and how would I have to interpret it?

    Read the article

  • XSD file, where to get xmlns argument?

    - by Daok
    <?xml version="1.0" encoding="utf-8"?> <xs:schema id="abc" targetNamespace="http://schemas.businessNameHere.com/SoftwareNameHere" elementFormDefault="qualified" xmlns="http://schemas.businessNameHere.com/SoftwareNameHere" xmlns:mstns="http://schemas.businessNameHere.com/SoftwareNameHere" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="..." type="..." /> <xs:complexType name="..."> I am working on a project using XSD to generate .cs file. My question is concerning the string "http://schemas.businessNameHere.com/SoftwareNameHere" If I change it, it doesn't work. But the http:// is not a valid one... what is the logic behind and where can I can information about what to put there or how to change it?

    Read the article

  • Why protected superclass member cannot be accessed in a subclass function when passed as an argument

    - by KNoodles
    I get a compile error, which I'm slightly confused about. This is on VS2003. error C2248: 'A::y' : cannot access protected member declared in class 'A' class A { public: A() : x(0), y(0) {} protected: int x; int y; }; class B : public A { public: B() : A(), z(0) {} B(const A& item) : A(), z(1) { x = item.y;} private: int z; }; The problem is with x = item.y; The access is specified as protected. Why doesn't the constructor of class B have access to A::y?

    Read the article

  • Passing a var as an argument

    - by Lienau
    On a site I'm making I need to have a progress bar, I found one that suited my needs. By default it will incrementally change the color when a certain percentage is reached (0-30 red, 30-70 orange, etc). My only problem is changing them, I can set them easily with a static number such as 50, but when I try to do it dynamically (ie: 2000*.3 = 600) it fails. I don't know much js/jquery so this is especially difficult for me, if you could help that would be great. I'm pretty sure it's something really simple I'm missing. The code that Fails: var barmax = 2000; var orangeBound = Math.round(barmax * .3); var greenBound = Math.round(barmax * .7); //alert(orangeBound+":"+greenBound); $("#pb1").progressBar({ max: barmax, textFormat: 'fraction', barImage: { 0: 'images/progressbg_red.gif', orangeBound: 'images/progressbg_orange.gif', greenBound: 'images/progressbg_green.gif'} }); The code that works but I can't use because it has to be dynamic: $("#pb1").progressBar({ max: barmax, textFormat: 'fraction', barImage: { 0: 'images/progressbg_red.gif', 600: 'images/progressbg_orange.gif', 1400: 'images/progressbg_green.gif'} }); If you need to see the source, here. Thanks again!

    Read the article

  • Advanced command line argument parsing in Java?

    - by Bishop87
    Does anyone have any java examples for parsing a series of command line arguements in a robust way? I'm looking to be able to handle something like: java myapp [-l language] [-d int] [-f file1 file2 file3] I want to do this in a robust way so I can provide logical error messages to the user if they mistake a command line-option. Some of these options I'd like to make optional, etc, etc. Also, the -f file list should be able to handle a list of files. Is there some library out there to assist me in handling this?

    Read the article

  • NSArray multiply each argument

    - by seaworthy
    Is the there a way to multiply each NSNumber contained in the array by 10? Here is what I have so far: NSMutableArray *vertex = [NSMutableArray arrayWithCapacity:3]; [vertex addObject:[NSNumber numberWithFloat:1.0]]; [vertex addObject:[NSNumber numberWithFloat:2.0]]; [vertex addObject:[NSNumber numberWithFloat:3.0]]; [vertex makeObjectsPerformSelector:@selector(doSomethingToObject:)]; I am not sure what selector to use to do this, please help!

    Read the article

  • Kohana 3 and CRON always accessing index.php (not following the URI argument)

    - by alex
    OK, I hope this is my last question about CRON jobs and Kohana 3. Note: others are not duplicates, just other problems. Here is my CRON job (setup in cPanel) php /home/user/public_html/index.php --uri=properties/update As per this answer. I have set it up so it emails me the output. It is running every 5 mins. Unfortunately, it always emails me the source of the home page of my site (index.php or /). I can access that URL fine in my browser, i.e. http://www.example.com/properties/update and it works and does it's job correctly. I can tell the Cron is never hitting the script because I have a file logger in place. Would this have anything to do with .htaccess? Has this happened to anyone before, and how did they fix it? Many thanks.

    Read the article

  • C# function normal return value VS out or ref argument

    - by misha-r
    Hi People, I've got a method in c# that needs to return a very large array (or any other large data structure for that matter). Is there a performance gain in using a ref or out parameter instead of the standard return value? I.e. is there any performance or other gain in using void function(sometype input, ref largearray) over largearray function(sometype input) ? Thanks in advance!

    Read the article

  • LINQ DefaultIfEmpty(), generating inferred argument error

    - by Refracted Paladin
    I am trying to get the below linq query to return -1 if there isn't any current value. I was looking at this article on MSDN, here, and it seemed that DefaultIfEmpty() was what I wanted. Unfortunately, I am getting a The type arguments cannot be inferred from the usage. Try specifying the type arguments explicitly. error. I guess I am not sure what that means or what it is telling me to do. Can someone explain, please. public static int CheckForDRIID(int personID) { using (var context = ConnectDataContext.Create()) { var masterIndex = (from applicationAssociation in context.tblApplicationAssociations where applicationAssociation.ApplicationID == 1 && applicationAssociation.PersonID == personID select applicationAssociation.PersonApplicationID).DefaultIfEmpty(-1).Single(); return Convert.ToInt32(masterIndex); } }

    Read the article

  • Using a function with variable argument strings

    - by wrongusername
    I was playing around a bit with functions with variable arguments, and decided to make a function to create vectors with the arguments. My function for creating an int vector worked... vector<int> makeIntVector(int numArgs, ...) { va_list listPointer; va_start(listPointer, numArgs); vector<int> made; for(int a = 0; a < numArgs; a++) made.push_back(va_arg(listPointer, int)); va_end(listPointer); return made; } but not my function for creating a string vector: vector<string> makeStringVector(int numArgs, string something, ...) { va_list listPointer; va_start(listPointer, something); vector<string> made; for(int a = 0; a < numArgs; a++) made.push_back(va_arg(listPointer, string)); va_end(listPointer); return made; } which crashes the program. What am I doing wrong?

    Read the article

  • User defined conversion operator as argument for printf

    - by BC
    I have a class that defined a user defined operator for a TCHAR*, like so CMyClass::operator const TCHAR*() const { // returns text as const TCHAR* } I want to be able to do something like CMyClass myClass; _tprintf(_T("%s"), myClass); or even _tprintf(_T("%s"), CMyClass(value)); But when trying, printf always prints (null) instead of the value. I have also tried a normal char* operator, as well variations with const etc. It only works correctly if I explicitly call the operator or do a cast, like _tprintf(_T("%s\n"), (const TCHAR*)myClass); _tprintf(_T("%s\n"), myClass.operator const TCHAR *()); However, I don't want to cast. How can this be achieved? Note, that a possibility is to create a function that has a parameter of const TCHAR*, so that it forcible calls the operator TCHAR*, but this I also don't want to implement.

    Read the article

  • Variable argument lists in m4

    - by waffleman
    Anyone know how to write an m4 macro to accepts an arbitrary list of parameters? Here is an example for what I want to implement: ADD_OBJECTS_TO_LAYOUT(`LAYOUT_1', (`OBJ_ID_SQUARE', `COLOR_ID_RED')) ADD_OBJECTS_TO_LAYOUT(`LAYOUT_2', (`OBJ_ID_SQUARE', `COLOR_ID_RED'), (`OBJ_ID_CIRCLE', `COLOR_ID_GREEN')) ADD_OBJECTS_TO_LAYOUT(`LAYOUT_3', (`OBJ_ID_CIRCLE', `COLOR_ID_GREEN'), (`OBJ_ID_CIRCLE', `COLOR_ID_BLUE'), (`OBJ_ID_TIRANGLE', `COLOR_ID_RED'))

    Read the article

  • php variable-less argument?

    - by imin
    hi just wondering. i've seen sites with this kind of url http://www.something.com/?somedata with the 'somedata' is the value of some 'unmentioned' variable how can i do something like that? all I know is the traditional http://www.something.com/index.php?arg=somedata thanks a lot

    Read the article

  • How to define a predicate as a function argument

    - by devoured elysium
    I want to be able to write something as void Start(some condition that might evaluate to either true or false) { //function will only really start if the predicate evaluates to true } I'd guess it must be something of the form: void Start(Predicate predicate) { } How can I check inside my Start function whenever the predicate evaluated to true or false? Is my use of a predicate correct? Thanks

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >