arguments

[self arguments] in NSScriptCommand

I've created a subclass of NSScriptCommand with wich I get my URI. It works well and with [self directParameter] I get the url. Now I found the great method [self arguments]. if([self isWellFormed] == YES) { NSLog(@"is well formed"); NSDictionary *dic = [self arguments]; NSLog(@"dic = %@", dic); } But dic is empty. =( Also when...

Using devenv arguments /Build and /ResetSettings

Our automated build system builds a variety of Visual Studio 2005 solutions using devenv solution.sln /Build config|platform We have a need to use a specific set of Visual C++ directory settings for a given solution file, these settings have been exported from Visual Studio as a .vssettings files. If I start Visual Studio with dev...

C#: I want to pass messages like a file path to my forms application like a console application, how would I do that?

C#: I want to pass messages like a file path to my forms application like a console application, how would I do that? I was told I needed to find my main method to add string[] args, but I wouldn't know which one that would be in Windows Forms. Which would my main method be in C# windows forms application? ...

Is there a good command line argument processing API for Java?

Is there library support for parsing command line arguments in Java? Preferably in the APIs that are with the default JRE, and supporting UNIX-like arguments Something along the lines of PERL's GetOpt? ...

Is it possible to pass properties as "out" or "ref" parameters?

Hi All, Can I pass a property as an "out" or "ref" parameter if not then why not? e.g. Person p = new Person(); . . . public void Test(out p.Name); ...

Is there a way to change effective process name in Python?

Can I change effective process name of a Python script? I want to show a different name instead of the real name of the process when I get the system process list. In C I can set strcpy(argv[0],"othername"); But in Python argv[0] = "othername" doesn't seem to work. When i get process list (with ps ax in my linux box) the real name...

Passing and storing pointers to immutable types and strings in C#

Is there a way to store a pointer to immutable types like strings in C#? How can execute: Instance1.SomeFunction(out MyString); ,and store a pointer to MyString inside of Instance1? ...

Javascript Functions and optional arguments

I have two nearly identical javascript functions that are used to initiate a jquery $.get call. The arguments to the function are passed to the script being called. The problem is that one set of calls requires an additional argument that the other does not. To accomplish this I'm using the two nearly identical javascript functions I'v...

Invalid arguments

i am expanding on the XNA game studio 2D tutorial and adding menus from the microsoft XNA Game studio website. i thought it would be just plug in and run, but is much more complicated than i thought. here is one error, i will post more as i get them. Here is the debug window: C:\Users\Ian\Desktop\GameStateManagementSample - Copy\GameSta...

Select template argument at runtime in C++

Suppose I have a set of functions and classes which are templated to use single (float) or double precision. Of course I could write just two pieces of bootstrap code, or mess with macros. But can I just switch template argument at runtime? ...

How does WriteLn() really work?

Since the age of the dinosaurs, Turbo Pascal and nowadays Delphi have a Write() and WriteLn() procedure that quietly do some neat stuff. The number of parameters is variable; Each variable can be of all sorts of types; you can supply integers, doubles, strings, booleans, and mix them all up in any order; You can provide additional para...

Should I escape shell arguments in Perl?

When using system() calls in Perl, do you have to escape the shell args, or is that done automatically? The arguments will be user input, so I want to make sure this isn't exploitable. ...

Edit#3* Need help with counter-controlled repetition and arguments in c language

Okay, so I need to have the output look like a diamond of asterisks, with each row increasing by 2 asterisks until the middle has 9 asterisks...and then the rows decrease. function main has to be: int main (void){ int i; i = 0; while (i < 5){ printline (4-i, i*2+1); i = i + 1; } i = 3; w...

Powershell and logparser arguments

Hi Guys, Im trying to run some logparser commands from powershell but Im having issues with passing the arguments across correctly, heres the excert from my script; d:\scripting\smtplogs\logparser\logparser.exe "SELECT TOP 50 Receiver, COUNT() INTO %TMPOutput%\TopReceiversNDRALL.gif FROM %TempDir%\PostAll.log WHERE Sender LIKE '<>' AND...

Looking for a Command Line Argument Parser for .NET

I'm looking for a command line argument parser, such as "Command line parser" from http://www.sellsbrothers.com/tools/Genghis/ . Features I'm looking for: Auto-generation of usage Should able to check required and optional parameters Parameters should support IEnumerable with separator support Should support flag parameters Would be n...

Nullable Method Arguments in C#

Duplicate Question http://stackoverflow.com/questions/271588/passing-null-arguments-to-c-methods/271600 Can I do this in c# for .Net 2.0? public void myMethod(string astring, int? anint) { //some code in which I may have an int to work with //or I may not... } If not, is there something similar I can do? ...

In Django, how can I iterate over the result of a custom template tag that requires arguments?

If I have created a template tag: @register.simple_tag def last_books(a_cat, cutoff=5): objects = Books.objects.filter(category=a_cat) return objects[:cutoff] How can I do something like this in my template: {% for book in last_books 'Sports' 3 %} I am currently getting this error: 'for' statements should use the format...

Byte array as an out parameter not recognized

I had a webmethod working which returned a byte array to the caller: public byte[] DownloadPDF(string URI) I had to change this to return another output (a string). So, I decided to change the method completely by now returning void and having 3 parameters like this: public void DownloadFile(string URI, out byte[] docContents, out st...

wrong argument conversion preferred when calling function

I'm writing a program under MS Visual C++ 6.0 (yes, I know it's ancient, no there's nothing I can do to upgrade). I'm seeing some behavior that I think is really weird. I have a class with two constructors defined like this: class MyClass { public: explicit MyClass(bool bAbsolute = true, bool bLocation = false) : m_bAbsolute(bAbso...

In Python 2.6, How Might You Pass a List Object to a Method Which Expects A List of Arguments?

I have a list full of various bits of information that I would like to pass to several strings for inclusion via the new string format method. As a toy example, let us define thelist = ['a', 'b', 'c'] I would like to do a print statement like print '{0} {2}'.format(thelist) and print '{1} {2}'.format(thelist) When I run this, I rece...