In the controller, how can I add a variable at the end of a params[]?
If I try this I get an error: params[:group_] + variable
How should it be done?
Edit per request
Ok, I have a form that sets groups of radio buttons with names like this:
group_01DRN0
Obviously I have different groups in the form (group_01AAI0, group_01AUI0, et...
Hey,
I appears to me as though there is a bug/inconsistency in the C# compiler.
This works fine (first method gets called):
public void SomeMethod(string message, object data);
public void SomeMethod(string message, params object[] data);
// ....
SomeMethod("woohoo", item);
Yet this causes "The call is ambiguous be...
I am using rails3 beta3 and couchdb via couchrest. I am not using active record.
I want to add multiple "Sections" to a "Guide" and add and remove sections dynamically via a little javascript. I have looked at all the screencasts by Ryan Bates and they have helped immensely. The only difference is that I want to save all the section...
Hi. I want to know how to configure your environment to execute some command with specific params everytime you use it.
So, if I have a command named:
spec
I want to know where I configure my bash to always use:
spec -c --format nested
instead of just 'spec'
I tried to put this like an alias on my .bashrc file, like:
al...
Hey,Guys!
In rails , I met a question!
when i use the multiple select ,i don't know ,how can i get the all parameter values ,it likes
in javaEE,
String[] strs=request.getParameters("aaa");
so,who can tell me the method in rails to realize the function?
Thank you in advance!
...
In Rails, I have a question on how to get the multiple params !
for example:
the string in log like this
Processing ConfigurationsController#emergency_config (for 192.168.1.124 at 2010-05-31 11:45:53) [POST]
Parameters: {"authenticity_token"=>"I3GPKyrjmDRLkMIxFVS/47mgEI4ETO/+YW+R8R5Q2GM=", "tid"=>"1", "emergency"=>{"department"=>[...
C# spec. allows you to call a function
void foo(params int[] x)
with zero parameters. However, I didn't find in C# Lang. Spec. a word on further behaviour -- will foo get empty array or null reference? I checked also MSDN -- nothing.
Where the behaviour is defined?
NOTE: I am not asking how VS behaves, I am asking about design of ...
I'm having an extremely frustrating time getting some images to upload. They are obviously being uploaded as rack/multipart but the way that I'm iterating over my params hash must be causing the problem. I could REALLY use some help, so I can stop pulling out my hair.
So I've got a params hash that looks like this:
Parameters: {"commi...
Our app provides an API that people can use to submit URLs like this:
curl -X POST http://app.local/resource -d'url=http://news.google.com/newshl=en&q=obama&um=1&ie=UTF-8&output=rss'
Unfortunately, it seems that Rails messes up with this param. Any idea on how to fix this?
See the log below :
Processing ApplicationC...
I am playing a video using VideoView in my app. When I play it on Droid with linearlayout params FILL_PARENT, FILL_PARENT, it plays well. The same params do not work well for a myTouch.
What params can I use that will work well with most devices?
Thanks
Chris
...
My common usecase for my Struts2 application is that I have Actions that collect data which are presented on an JSP page. I'll call these view-actions.
But then I also have logic actions, which "do" something in the background (like registering a user). These might also have a bean that needs to be shown on an JSP, but I need to redirec...
Suppose I have two functions:
Foo(params INotifyPropertyChanged[] items)
{
//do stuff
}
Foo<T>(IEnumerable<T> items) where T : INotifyPropertyChanged
{
Foo(items.ToArray();
}
The second one allows me to call Foo from a generic class with the constraint where T : INotifyPropertyChanged, but the second resolves to itself so I get...
hello,
I have one Class with 2 methods.
The first method is called by the view with some GET parameters ( params[:page] ).
I would like to save those params and send them by a render action to my second method.
class exemple
def first
## sql save of params[:page]
render :action => "second"
end
def second
##
## H...
My app plays a video using VideoView. I am using a LinearLayout to add some text, the video and then some buttons.
My question is what kind of layout params can I use for the VideoView to make sure it plays well in all phones? Basically, when in portrait mode, I want the complete width to be used, and video height to be used. When in l...
If I have a method that has a params parameter, can it be passed by reference and updated every time a yield is called.
Something like this:
public static void GetRowsIter(ref params valuesToUpdate)
{
foreach(row in rows)
{
foreach(param in valuesToUpdate
{
GetValueForParam(param)
}
yield;...
Say I have the following methods:
public static void MyCoolMethod(params object[] allObjects)
{
}
public static void MyCoolMethod(object oneAlone, params object[] restOfTheObjects)
{
}
If I do this:
MyCoolMethod("Hi", "test");
which one gets called and why?
...
Using the rails button_to helper I'm trying to run the update method in a controller. I need to set the ID of the object being updated manually. The code I have I think should be right, but rails keeps trying to put the ID as part of a route.
in the view:
button_to ">", :controller=>'people', :action=>'update', 'person'=>{:team=>team...
What I would like to do is be able to pass any number of variables into a function, manipulate those variables inside of the function, and have access to those manipulations outside of the scope of the function.
Example
void FunctionA()
{
int x = 1;
string s = "blah";
int y = 4;
FunctionB(out x, out s, out y);
Conso...
I have an URL and need to extract a part of it.
The url is like this:
http://website.com/get.php?url=http://www.website2.com/index.html?articleID=123456
And I need to extract this part:
http://www.website2.com/index.html?articleID=123456
How would I do this in Objective-C?
...
According to documentaion, FILL_PARENT basically lets the view take up the entire extra space. Weight also dictates how much of the extra space can be taken by the view. What is the difference?
For eg: What happens when I use,
new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 1.0f)
...