parameters

Trying to insert a row using stored procedured with a parameter binded to an expression.

Environment: asp.net 3.5 (C# and VB) , Ms-sql server 2005 express Tables Table:tableUser ID (primary key) username Table:userSchedule ID (primary key) thecreator (foreign key = tableUser.ID) other fields I have created a procedure that accepts a parameter username and gets the userid and inserts a row in Table:userSchedule Problem: ...

Can I get parameter names/values procedurally from the currently executing function?

I would like to do something like this: public MyFunction(int integerParameter, string stringParameter){ //Do this: LogParameters(); //Instead of this: //Log.Debug("integerParameter: " + integerParameter + // ", stringParameter: " + stringParameter); } public LogParameters(){ //Look up 1 level in the ...

How to pass a parameter to a javascript through a url and display it on a page ?

For instance, I have a url like this : www.mysite.com/my_app.html How do I pass a value " Use_Id = abc " to it and use javascript to display on that page ? ...

ASP MVC Controller Method not always called from $.getJSON request

I have a controller method that returns a jSON object and in one calling situation, it works and in another calling situation, it does not work. When the URL in my browser is this: http://localhost:65247/Client -- it works. But, when my url looks like this: http://localhost:65247/Client/UserAdmin?id=6 -- it DOES NOT work In a nutshel...

jqgrid with asp.net webmethod and json working with sorting, paging, searching and LINQ -- but needs dynamic operators

THIS WORKS! .. but still needs one more thing... Okay, so this is both a "comment" and question. First, is the working example that may help others in search of a asp.net webmethod / jqGrid approach. The code below completely works for sending/receiving JSON parameters from and to jqGrid in order to have correct paging, sorting, filteri...

How can I pass a mouse-click method as a parameter?

I want to make an extension method which fills a stackpanel with buttons. In order to do this I have to pass in a mouse-click-handler. What type does the mouseClickHandler parameter have to be here? I know it's something like these but they all don't work: delegate Func<object, RoutedEventArgs> Action<> Code: public static void F...

Why does my Perl program print the help message when an arguments has 0 as a value?

If i do this: GetOptions( 'u=s' => \$in_username, 'r=i' => \$in_readonly, 'b=i' => \$in_backup ); exit usage() unless $in_username && $in_readonly && $in_backup; and call the program like this: ./app.pl -u david -r 12 -b 0 it always results in calling usage(), so obviously the 0 is not seen as an integer value...

Operand type clash: nvarchar is incompatible with image

I'm using a SQL Server 2008 stored procedure to create a new record with this syntax: cmd.Parameters.Add("@photo", DBNull.Value) cmd.ExecuteNonQuery() but the result is a: Operand type clash: nvarchar is incompatible with image Photo is not the only parameter but is the only image one, I am not passing a nvarchar but a null v...

How to pass parameters dynamically in PHP?

I need to pass the $route to its inner function,but failed: function compilePath( $route ) { preg_replace( '$:([a-z]+)$i', 'pathOption' , $route['path'] ); function pathOption($matches) { global $route;//fail to get the $route } } I'm using php5.3,is there some feature that can help? ...

sending parameters to a jquery function

I have the following function which works very well within a $(document).ready(function(){ $('.threadWrapper > .littleme').click(function() { $(this).next().toggle(); $(this).toggle(); $('.littleme').not(this).next().hide(); $('.littleme').not(this).show(); // re-run masonry $('#mainConte...

Wordpress auto-generated "canonical" links - how to add a custom URL parameter?

Hello - Does anyone know how to modify the Wordpress canonical links to add a custom URL parameter? I have a Wordpress site with a page that queries a separate (non-Wordpress) database. I passed the URL parameter "pubID" to display individual books and it is working OK. Example: http://www.uglyducklingpresse.org/catalog/browse/item/...

Erlang ODBC parameter query with null parameters

Is it possible to pass null values to parameter queries? For example Sql = "insert into TableX values (?,?)". Params = [{sql_integer, [Val1]}, {sql_float, [Val2]}]. % Val2 may be a float, or it may be the atom, undefined odbc:param_query(OdbcRef, Sql, Params). Now, of course odbc:param_query/3 is going to complain if Val2 is undefi...

Textfield - what is wxTextCtrlNameStr?

Question I'm trying to create a basic wxWidgets program with a text entry box, in the constructor there is a variable wxTextCtrlNameStr - in researching I can't seem to find wxTextCtrlNameStr? any help? Given Code documentation: wxTextCtrl(wxWindow* parent, wxWindowID id, const wxString& value = "", const wxPoint& pos = wxDefaul...

Objective C Default parameters?

Possible Duplicates: Optional arguments in Objective-C 2.0? Objective-C Default Argument Value I'm writing a C function in Objective C. I want a default value for my last parameter. I've tried: foo(int a, int b, int c = 0); but that's C++ I've also tried foo(int a, int b, int c) { ... } foo(int a, int b) { foo(a, ...

How to differentiate two constructors with the same parameters?

Suppose we want two constructors for a class representing complex numbers: Complex (double re, double img) // construct from cartesian coordinates Complex (double A, double w) // construct from polar coordinates but the parameters (number and type) are the same: what is the more elegant way to identify what is intended? Adding a thir...

Inheritance of TCollectionItem

I'm planning to have collection of items stored in a TCollection. Each item will derive from TBaseItem which in turn derives from TCollectionItem, With this in mind the Collection will return TBaseItem when an item is requested. Now each TBaseItem will have a Calculate function, in the the TBaseItem this will just return an internal v...

How to reference the same parameter more than once in a Informix query?

I have a query which I am executing through ODBC on an Informix database. The query is being passed a Parameter (StartDate). I need to use the year of the StartDate numerous times get the data from the correct fields. When I use the query as listed below, it thinks there are 9 parameters. Therefore, I know this syntax is incorrect, h...

apache mod_rewrite regex problem with multiple parameter

Regular expressions have always been my pet peeves. Every time I think that I finally got it I have a new problem ! I want to catch url like this : http://www.mydomain.com/boutique/blabla-1/bla-bla2/99/104 http://www.mydomain.com/boutique/blabla1/99 and eventually : http://www.mydomain.com/boutique/blabla-1/bla-bla2/product1/99/104/...

Bash: using commands as parameters (specifically cd, dirname and find)

This command and output: % find . -name file.xml 2> /dev/null ./a/d/file.xml % So this command and output: % dirname `find . -name file.xml 2> /dev/null` ./a/d % So you would expect that this command: % cd `dirname `find . -name file.xml 2> /dev/null`` Would change the current directory to ./a/d. Strangely this does not work. ...

Share xml-documentation accross overloads

Hey, is there a way to share xml-documentation of the parameters to all the overloads? Lets say I have 10 overloads of a method but they all share the first 5 parameter (I use C# so I cannot have optional parameters). How do I do so that I do not have to write the same text for all of the parameters? ...