params

rails - passing :params in url

Hi folks, I am stuck one more time ... and one more time I suspect it's a stupid syntax problem: I want to pass 2 vaiables in the url with my super simple search form. I was expecting a URL like this: http://mydomain/categories/search?search=pdf&os=2 But I get this: http://mydomain/categories/search?search=pdf&os[]= I though...

Multiple Block Parameters with Sinatra

I'm trying to get this Sinatra GET request to work: get '/:year/:month/:day/:slug' do end I know you can get one param to work with block parameters: get '/:param' do |param| "Here it is: #{param}." end But how can I use multiple block parameters with the first code block? I'm open to other methods. ...

C#: params keyword vs. list

What are the pro/cons of using the params keyword vs. a List as input to some c# function? Mainly what are the performance considerations and other trade offs. ...

Params IEnumerable<T> c#

Why cant I use an IEnumerable with params? Will this change in the future? ...

What is the difference between pre($ENV{'QUERY_STRING}) and ($cgi->param()) ?

for a perl cgi script, what is the difference (technically) between these two? #!/usr/bin/perl use CGI; $cgi = new CGI; print $cgi->header(), $cgi->start_html(), $cgi->pre($cgi->param()), $cgi->end_html(); and #!/usr/bin/perl use CGI; $cgi = new CGI; print $cgi->header(), $cgi->start_html(), $cgi->pre($ENV{'QUERY_STRING'}), ...

Why does my Perl subroutine return false even though the parameters are valid?

I am trying to write a function which validates the username for an alphanumeric value and in the case of failure it should log my custom error message and return 0 to the called function instead of die-ing: sub insertUser{ my ( $username, $password, $email, $name) = validate_pos( @_, { type => SCALAR, ...

Django redirecting to external url that contains parameters (for development)

When developing with Django without a web server (serving directly from Django) I have a problem with external urls that lack the domain part and have parameters. Let's say I'm using a javascript library that does an ajax call to "/prefix/foo/bar?q=1" (the url is not something I can change). It is not a problem for the production serve...

is there a way to cover a flash with a div when wmode is 'gpu' ?

i know this can be done by changing wmode to "transparent or opaque". But is there any way to show the div over the flash file using wmode "gpu" .. ...

jQuery AJAX POST long params problem

I am using jQuery to send larger document via POST method to server (which should store it in the database). If I send the same request multiple times, sometimes it works fine (completes in ~500ms) and sometimes it fails. When it fails, it waits about 1 minute and then I get server error (indicating that no params were recieved). I ca...

C# Method Using Params Keyword

An example of a method that uses the params keyword is String.Format("", foo, bar, baz) But how would I make a method that accepts an array of enums like so: class MyClass { public enum Foo { Bar, Baz } public static void MyMethod(params enum[] Foo) {} public static void TestMethod() { MyMethod(); MyMe...

How to pass Object tag PARAM value into Flash?

Hey everyone, today I'm trying to get a link to an XML file passed from the Object Embed code into my Flash movie. (Not using SWFobject). I have 1 swf file that should be able to connect to 3 different XML files. Attempt 1 Below is the HTML code (I'm trying to get theXML path): <div class="left"> <h2>300 x 353 Green Accent Color</h2...

Richfaces a4j achtionparam set null value

I am trying to reset some values in a form using the a4j:actionParam tag. But it seams that null values never arrive in the target bean. The converter receives it correctly, returns null, but it is never set in the bean. The target is to fill in the start and endDate for different predefined values (last week, last month etc). For the "...

keep params and add another from a form

Hey Guys, I have the following 3 urls: http://www.test.com?a=1 http://www.test.com?a=1&amp;b=3 http://www.test.com?a=1&amp;b=2&amp;c=99 Now in a form i have a drop down menu like so: <select name="b"> <option value="1">1</option> ... </select> Now i want to either add that param to the list of existing params or edit th...

How To Pass Class As Params to Function

How can I pass the Parameter to a function. for example public void GridViewColumns(params ClassName[] pinputparamter) { } and Class is as given below public Class ClassName { public string Name{get;set;} public int RecordID{get;set;} } can anyone has idea? ...

ruby on rails params injection

Hello everyone, I have a question about ruby on rails and the process of assigning variables using the params variable passed through a form class User attr_accessible :available_to_admins, :name end Let's say that I have a field that is only available to my admins. Assuming that you are not an admin, I am going to not display the a...

Include params/request information in Rails logger?

Hi everyone, I'm trying to get some more information into my Rails logs, specifically the requested URI or current params, if available (and I appreciate that they won't always be). However I just don't seem able to. Here's what I've done so far: #config/environments/production.rb config.logger = Logger.new(config.log_path) config.log_...

Rhino - Convert Paramater Map to Native JS object

What's the "right" way to convert the parameters from request into a native JS object? It seems that no matter what I do, I end up with a java object. ...

How to create multiple arrays from 2? (actionscript, flash)

so I have array like ParamsArray {a,b,a,a,...b} (so i have 2 kinds of parameters in this array - a and b) (here I have N strings) and another array - DataArray {data1,data2,...dataN} (different strings) (here I have N strings) Now I created 2 new arrays ArrayA and ArrayB and I wanta want to feel arra ArrayA with all data (strings) fr...

Joomla template parameters and params.ini - file becomes unwritable after save.

I am using wamp on Win XP SP3 and creating a Joomla template with changeable parameters. initially the message is The parameter file \templates\ssc_2010\params.ini is writable! once I make changes everything works as expected, except now i get the message: The parameter file \templates\ssc_2010\params.ini is unwritable! ...

Extjs Form Action Submit - Custom override?

Looking at the source code of Action.Submit, I'm trying to figure out where ext is appending the form's fields to the parameters. Instead of sending each field as a separate parameter, I want to send something like: formObj:{field1:value, field2:value} Currently, each of those values are simply added to the parameter list along with a...