arguments

Get number of arguments for a stored procedure

Hi! I would like to get the the number of arguments required for a stored procedure in MySql. Is that possible? My first thought was to try SELECT * FROM information_schema.ROUTINES; but therein lies no information about the number of arguments as far as I can see. Next try was SHOW PROCEDURE STATUS; but that just seems to return...

Erlang: How to access CLI flags (arguments) as application environment variables?

How does one access command line flag (arguments) as environment variables in Erlang. (As flags, not ARGV) For example: RabbitMQ cli looks something like: erl \ ... -sasl errlog_type error \ -sasl sasl_error_logger '{file,"'${RABBITMQ_SASL_LOGS}'"}' \ ... # more stuff here If one looks at sasl.erl you see the line: get_sasl_error_lo...

C++: Default values for template arguments other than the last ones?

Hi all, I have my templated container class that looks like this: template< class KeyType, class ValueType, class KeyCompareFunctor = AnObnoxiouslyLongSequenceOfCharacters<KeyType>, class ValueCompareFunctor = AnObnoxiouslyLongSequenceOfCharacters<ValueType> > class MyClass { [...] } Which means that ...

SCons: GCC Ignoring -c

Hi, I'm using a MinGW-based GCC cross-compiler to compile a project which uses SCons as its build system. The Python is a native 2.6.2 version, not specifically compiled for MinGW (or Cygwin). However, I am running into a problem with the build: F:/pedigree/compilers/bin/i686-elf-gcc -o build\src\user\applications\apptest\ma in.obj -...

PHP functions help

Hi there! I'm sorry for asking this question, but I'm not good in php (beginner). Could you please explain what $arg means in this piece of code? (it's from one of drupal modules) function node_add_review_load($arg) { global $user; $add_review = FALSE; $current_node = node_load($arg); $type =$current_node->type; $axes_count =...

Using the same decorator (with arguments) with functions and methods.

I have been trying to create a decorator that can be used with both functions and methods in python. This on it's own is not that hard, but when creating a decorator that takes arguments, it seems to be. class methods(object): def __init__(self, *_methods): self.methods = _methods def __call__(self, func): def...

How to pass command-line arguments to a PowerShell ps1 file

For years, I have used the cmd/dos/windows shell and passed command-line arguments to batch files. E.g., I have a file, "zuzu.bat" and in it, I access %1, %2, etc. Now, I want to do the same when I call a PowerShell script when I am in a Cmd.exe shell. I have a script "xuxu.ps1" (and I've added PS1 to my PATHEXT variable and associated P...

Drupal 6 Views 2: Setting Date Arguments

Passing uid as an argument works fine with this code: $bouts = views_get_view_result('Results', 'page_1', array($user->uid)); The key line in views_get_view_result that sets arguments is: $view->set_arguments($args); But what about passing date ranges? Also, if something is specified as a filter on a view, is there a way to proram...

Passing around command line $args in powershell , from function to function

Hi, This is a nasty issue I am facing. Wont be surprised if it has a simple solution, just that its eluding me. I have 2 batch files which I have to convert to powershell scripts. file1.bat --------- echo %1 echo %2 echo %3 file2.bat %* file2.bat -------- echo %1 echo %2 echo %3 On command line, I invoke this as C:> file1.bat ...

Start Process - then add to it later (MS Excel Example)

I've got a data collection routine that takes about 10 seconds to run, then it saves data to a CSV file: string file = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Book1.csv"); StreamWriter streamWriter1 = new StreamWriter(File.Open(file, FileMode.Create, FileAccess.Write)); DataTable table = GetMyData...

iPhone dev - How far down should I cast?

If I have a method that passes an argument of type void * (UIView animation did stop method, has to be a void pointer), or of type id, and I know that the argument is a UIBarButton item, and I need to disable it, [barbuttonitem setEnabled:NO];, should I cast the argument to a UIControl, which is as far as I need to be able to use setEnab...

Python - ambiguity with decorators receiving a single arg

I am trying to write a decorator that gets a single arg, i.e @Printer(1) def f(): print 3 So, naively, I tried: class Printer: def __init__(self,num): self.__num=num def __call__(self,func): def wrapped(*args,**kargs): print self.__num return func(*args,**kargs**) ret...

Converting a Javascript array to a function arguments list

Is it possible to convert an array into a function argument sequence? Example: run({ "render": [ 10, 20, 200, 200 ] }); function run(calls) { var app = .... // app is retrieved from storage for (func in calls) { // What should happen in the next line? var args = ....(calls[func]); app[func](args); // This is equivalent...

javascript function not get called when arguments from php

I am running the < a > tag in php. Whenever I pass an argument in js function it does not get called but if i pass empty arguments, the function gets called. js: function displayBigImage(img){ alert("inside func"); } php: //NOT WORKING: echo "<a href='javascript:displayBigImage('".$row['IMG_ID']."')'>Press</a>"; //WORKING: echo "...

String arrays as command line arguments for maven plugin

I'm writing a maven plugin that has a parameter that's a String[]. Like this: /** * @parameter expression="${args}" */ protected String[] args; This can be utilized through the POM like this: <args> <arg>arg1</arg> <arg>arg2</arg> <args> But I want to send it in from the command line -Dargs={arg1, arg2} Is this possible? ...

How to get JavaScript caller function line number? How to get JavaScript caller source URL?

I am using the following for getting the JavaScript caller function name: var callerFunc = arguments.callee.caller.toString(); callerFuncName = (callerFunc.substring(callerFunc.indexOf("function") + 8, callerFunc.indexOf("(")) || "anoynmous") Is there a way to discover the line number from which the method was called? Also, is there ...

Adding new args to a function while still maintaining backward compatibility in Ruby

I have an old function that is called many times in my application. I would like to update it a bit, which involves adding some new arguments. When I wrote the function, I did not understand the benefits has making a hash the only parameter (mentioned here: http://www.skorks.com/2009/08/more-advanced-ruby-method-arguments-hashes-and-bl...

Find where a function (or macro) is called with a given argument

I need to know if it's possible to use a tool like ctags or cscope to find all the usages of a function but filter the results depending on the value of one of its parameters. For example, let's assume we have a function void foo(int a, int b) that is used a thousand times along all the source tree and I need to check if it's being call...

c# setup project

c# visual studio 2008 , setup project ,file types on targed machine, &open-> Arguments http://msdn.microsoft.com/en-us/library/0ehs907t%28VS.71%29.aspx in this section i can write only characters, how can i specify file name (to open). Many Thanks ...

Naudio - 'WaveOut' does not contain a constructor that takes '3' arguments

Hi, this question derives from my previous thread Play mp3 from internet without FileOpenDialog I really hope someone knows anything about this. I was told to use a WebRequest to start a download stream and then play the stream instead of playing a locally stored file. However, trying to use the code from PlayMp3FromUrl gives me this e...