Search Results

Search found 3518 results on 141 pages for 'arguments'.

Page 10/141 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • interactive lua: command line arguments

    - by mr calendar
    I wish to do lua prog.lua arg1 arg2 from the command line Inside prog.lua, I want to say, for instance print (arg1, arg2, '\n') Lua doesn't seem to have argv[1] etc and the methods I've seen for dealing with command line arguments seem to be immature and / or cumbersome. Am I missing something?

    Read the article

  • Griffon command line arguments

    - by jjchiw
    How to use getStartupArgs() Since 0.9.1 it seems you can read the command line arguments issue #245 with the getStartupArgs() method (documentation) But I do know how to use it, I've put it in in all the Griffon lifecycle, Controller, Service, and I get the exception org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: [LifeCycle|Controller|Service].getStartupArgs() is applicable for argument types: () values: [] Caused by: groovy.lang.MissingMethodException: No signature of method: [LifeCycle|Controller|Service].getStartupArgs() is applicable for argument types: () values: [ ]

    Read the article

  • ruby keyword arguments of method

    - by Yang
    How can I declare a method with keyword arguments just like rails do. some examples may be Person.find(:all, :conditions => "..."). How can I use symbols to create methods similar to the above? I am very new to ruby. Thanks in advance!

    Read the article

  • C++ [] array operator with multiple arguments?

    - by genesys
    Can I define in C++ an array operator that takes multiple arguments? I tried it like this: const T& operator[](const int i, const int j, const int k) const{ return m_cells[k*m_resSqr+j*m_res+i]; } T& operator[](const int i, const int j, const int k){ return m_cells[k*m_resSqr+j*m_res+i]; } But I'm getting this error: error C2804 binary operator '[' has too many parameters

    Read the article

  • complex arguments for function

    - by myPost1
    My task is to create function funCall taking four arguments : pointer for 2d array of ints that stores pairs of numbers variable int maintaining number of numbers in 2d array pointer for table of pointers to functions int variable storing info about number of pointers to functions I was thinking about something like this : typedef int(*funPtr)(int, int); funPtr arrayOfFuncPtrs[]; void funCall( *int[][]k, int a, *funPtr z, int b); { }

    Read the article

  • SEL performSelector and arguments

    - by madmik3
    Hello, It seems like there should be an easy way to call a selector with some arguments when all you have is a SEL object. I can't seem to find the correct syntax. -(MyClass*) init: (SEL)sel owner:(NSObject*) parent { int i =10; [parent performSelector:sel:i ]; }

    Read the article

  • Bash, no-arguments warning, and case decisions

    - by Werner
    Hi, I am learning bash. I would like to do a simple script that, when not arguments given, shows some message. And when I give numers as argument,s depending on the value, it does one thing or another. I would also like to know suggestions for the best online manuals for beginners in bash Thanks

    Read the article

  • Variable number of arguments in VB

    - by Kratz
    How to create a function with variable number of arguments in visual basic? ex. x = Sum(1,2,3) y = Sum(1,2) Function Sum('how to declare argument here') 'Is there any special argument manipulation inside function before it is usable? End Function

    Read the article

  • diffstrings.py : how do you specify path arguments?

    - by rudifa
    I am trying to use diffstrings.py from Three20 on my iPhone project, and I can't find the proper format for the path arguments (as in "Usage: diffstrings.py [options] path1 path2 ..."). For example, when I run the script in my Xcode project directory like this ~/py/diffstrings.py -b it analyzes just the main.m and finds 0 strings to localize, then it diffs against existing fr.lproj and others, and finds that thes contain "obsolete strings". Can anyone post examples of successful comand line invocations of diffstrings.py, for options -b, -d and -m?

    Read the article

  • Sending / Forwarding variable arguments in ObjectiveC

    - by Authman Apatira
    I know this is possible in other programming languages. Suppose we have the following arrangement: - (void) myMethod:(NSString*)variables, ... { // Handle business here. } - (void) anotherMethod:(NSString*)variables, ... { // We want to pass these variable arguments for handling [self myMethod:variables, ...]; // Do not pass GO } // Start the party: [self anotherMethod:@"arg1", @"arg2", @"arg3", @"arg4", nil]; What's the trick to get this working in ObjC?

    Read the article

  • Unable to get ls to recognise LS_OPTIONS or LS_COLORS?

    - by A T
    Trying to get --color=auto as the default ls argument. $ ls --version ls (GNU coreutils) 8.21 … $ echo $LS_COLORS no=00:fi=00:di=00;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=00;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35: $ echo $LS_OPTIONS --color=auto Unfortunately when I run ls I still get non-colored output (running ls --color=auto manually gives me colors). How do I make --color=auto a default ls argument?

    Read the article

  • How to pass a filename by drag-and-drop to a shortcut in Windows

    - by Kendall Frey
    I have a program program.exe and a document document.txt, and to open the document, I can drag document.txt onto program.exe. So far so good. Now I want to call it with a command-line parameter -param so that the full command line is program.exe -param document.txt Unfortunately, I can't do this with drag and drop, so I need to fire up cmd and type in the command manually. This takes too long, and I need an easier way. How can I create a shortcut that I can drop the file onto, and have it call the program with the command-line parameter? I tried setting the shortcut to program.exe -param "%1", but that didn't work, because it appeared to pass only the file name, and not the path, and since the current directory was the one with the program and not the one with the document, it couldn't find the document.

    Read the article

  • How to pass a filename to a shortcut in Windows

    - by Kendall Frey
    I have a program program.exe and a document document.txt, and to open the document, I can drag document.txt onto program.exe. So far so good. Now I want to call it with a command-line parameter -param so that the full command line is program.exe -param document.txt Unfortunately, I can't do this with drag and drop, so I need to fire up cmd and type in the command manually. This takes too long, and I need an easier way. How can I create a shortcut that I can drop the file onto, and have it call the program with the command-line parameter? I tried setting the shortcut to program.exe -param "%1", but that didn't work, because it appeared to pass only the file name, and not the path, and since the current directory was the one with the program and not the one with the document, it couldn't find the document.

    Read the article

  • How to pass an argument to a Windows Scheduled Task with spaces in it

    - by Rodney
    I need to set up a Windows Scheduled Task. It accepts 1 parameter/argument which is a path and can contain spaces. My Scheduled task does not work - it "breaks" the parameter up at the first space. If I run it in the Command Prompt I can just wrap the argument in " " and it works fine, however, this does not work in the Scheduled Task UI. e.g. C:\Program Files\xyz\FTP File Transfer\FTPFileTransferTask.exe "C:\Program Files\xyz\The Interface\Folder Path" I have tried wrapping the argument with " " ' ' [ ] () and have tried filling in the spaces with %20, ~1 etc. with no luck. I know of one solution to make a bat file and use " " around my argument but I don't want to add more complexity. I tried it on Windows 7 and Windows 2008 Server and both failed. There seems to be no discussions on this?

    Read the article

  • How To Boot with "mem=1024m" Argument using GRUB - Ubuntu 10.04

    - by nicorellius
    I am still working on this question. This new one is a different question so I thought it would be good to post a new question. Is this the proper protocol or should I have just edited the other question? I'm running Ubuntu 10.04 with the kernel 2.6.32-22-generic on a Toshiba Satellite laptop. When I enter the GRUB menu (I have Ubuntu 9.10 installed as well), I can choose which kernel to boot. I use scroll down to the one I want and press "e" and I expect to be able to enter mem=1024m and force the kernel to use this much memory. But when I run cat /proc/meminfo or look in the process manager after booting wth this argument I still see all the RAM: ~2 GB. Am I using this boot argument incorrectly? The boot configuration (before I add anything) looks like this: insmod ext2 set root=(hd0,1) search --no-floppy --fs-uuid --set 10270f21-1c42-494b-bd3f-813c23f6d\ 518 linux /boot/vmlinuz-2.6.32-22-generic root=UUID=10270f21-1c42-494b-b\ d3f-813c23f6d518 ro quiet splash initrd /boot/initrd.img-2.6.32-22-generic The way I did this was that I added the mem=1024m after the last line and pressed Ctrl+x (Emacs save and boot the kernel) and the system booted. I tried adding mem=1024m to the end and the beginning of this list and it appeared to not change the RAM allocation.

    Read the article

  • How do I start Chrome using a specified "user profile"?

    - by Danny Tuppeny
    I use the new built-in "Users" feature of Chrome to switch between Home/Work accounts easily. However, Chrome remembers the "last" user profile you had selected when launching new windows. This is a problem if I close down my "Home" profile last, because when I then click the Email shortcut on my taskbar, because it goes to mail.mycompany.com using my Home profile, and I'm not logged in. I'd like to change the shortcut to the company webmail to pass a switch that tells Chrome to always start as the "Default" user, regardless of the last one used. Note: I have tried user-data-dir, and this seems to do something very different, completely isolated from the Users functionality built in to Chrome. It's possible I'm using it wrong, but please test this before assuming it does the same thing and posting an answer ;-)

    Read the article

  • Function signature-like expressions as C++ template arguments

    - by Jeff Lee
    I was looking at Don Clugston's FastDelegate mini-library and noticed a weird syntactical trick with the following structure: TemplateClass< void( int, int ) > Object; It almost appears as if a function signature is being used as an argument to a template instance declaration. This technique (whose presence in FastDelegate is apparently due to one Jody Hagins) was used to simplify the declaration of template instances with a semi-arbitrary number of template parameters. To wit, it allowed this something like the following: // A template with one parameter template<typename _T1> struct Object1 { _T1 m_member1; }; // A template with two parameters template<typename _T1, typename _T2> struct Object2 { _T1 m_member1; _T2 m_member2; }; // A forward declaration template<typename _Signature> struct Object; // Some derived types using "function signature"-style template parameters template<typename _Dummy, typename _T1> struct Object<_Dummy(_T1)> : public Object1<_T1> {}; template<typename _Dummy, typename _T1, typename _T2> struct Object<_Dummy(_T1, _T2)> : public Object2<_T1, _T2> {}; // A. "Vanilla" object declarations Object1<int> IntObjectA; Object2<int, char> IntCharObjectA; // B. Nifty, but equivalent, object declarations typedef void UnusedType; Object< UnusedType(int) > IntObjectB; Object< UnusedType(int, char) > IntCharObjectB; // C. Even niftier, and still equivalent, object declarations #define DeclareObject( ... ) Object< UnusedType( __VA_ARGS__ ) > DeclareObject( int ) IntObjectC; DeclareObject( int, char ) IntCharObjectC; Despite the real whiff of hackiness, I find this kind of spoofy emulation of variadic template arguments to be pretty mind-blowing. The real meat of this trick seems to be the fact that I can pass textual constructs like "Type1(Type2, Type3)" as arguments to templates. So here are my questions: How exactly does the compiler interpret this construct? Is it a function signature? Or, is it just a text pattern with parentheses in it? If the former, then does this imply that any arbitrary function signature is a valid type as far as the template processor is concerned? A follow-up question would be that since the above code sample is valid code, why doesn't the C++ standard just allow you to do something like the following, which is does not compile? template<typename _T1> struct Object { _T1 m_member1; }; // Note the class identifier is also "Object" template<typename _T1, typename _T2> struct Object { _T1 m_member1; _T2 m_member2; }; Object<int> IntObject; Object<int, char> IntCharObject;

    Read the article

  • Problem of * in Command line argument

    - by Nithya
    Hi, This is simple question only... i did a program in java that accepts input via command line arguments. I get input of two numbers and operator in command line. multiplying two numbers, i have to give input as 5 3 *. But if i give like this, i cant get answer. Y its not accept * in cmd.... waiting for reply guys...

    Read the article

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