I'm having an issue doing conditional tests and sorts using params passed into the xsl file from PHP. I can do a match based on testing a string value, and can sort using an explicit name, but cannot get the variables to work in doing either. Here is the XSL and a fragment of the relevant XML.
<Products xmlns:b="http://www.viator.com/af...
Is it possible to have a C# lambda/delegate that can take a variable number of parameters that can be invoked with a Dynamic-invoke?
All my attempts to use the 'params' keyword in this context have failed.
** UPDATE WITH WORKING CODE FROM ANSWER **
delegate void Foo(params string[] strings);
static void Main(string[] args) ...
I am setting a xslt param with PHP, and then calling the transform. I want to use the param value in an XPath expression to grab the proper nodes, but this doesn't seem to be working. I am guess it's possible, I think I am just missing the syntax. Here what I have...
PHP:
$xslt->setParameter('','month','September');
XSL:
<?xml versi...
Hi, I tried to create a an link - image that changes the language of a page. But I encountered an issue, that the GET url params got lost after the ajax call, so not only the language changed, but also the content changed because of no params. The solution I found is to write down every single param that I use accross the whole website a...
hi
Through nc.call("sendMessage",null,str,boo);
i would like to pass both str is a string variable and boo is a boolean variable parameters to red5 and from there i would llike to get both the values in flex application. i can send one parameter and can retrieve it, but 2nd parameter if i m passing wat will be the server side code and ho...
Had some old code that on some condition would modify params. I believe it was working before (not 100%). We are now getting params set to nil whether or not the condition is met.
The culprit is within the condition, I perform a params = tmp.dup. Even when the condition is false, this is causing an error in the update action.
I was abl...
Let's say we are passing in something like :mash => true
Now inside of params I want to
takeit = params[:mash]
What class is takeit? It's not boolean of course.
Thanks for helping.
...
Basically, I know that some apps when called in command line with "/?" spit back a formatted list of how to call the app with params from the command line. Also, these apps sometimes even popup a box alerting the user that the program can only be run with certain params passed in and give this detailed formatted params (similar to the co...
I've asked the exact same question on nabble here
I'm trying to send params or different domains in the controller integration test.
But can't get them to bind to the domain class with the prefix of "book"
//Controller action being tested
def saveBook = {
def book = new Book()
bindData(book, params["book"], [include: ['publicPrivacy'...
I'm using a GSP for sending out emails based on the MailService plug-in. The sendMail closure passes (amongst others) body(view:..., model:myModel)
I know that I can access every item of the myModel Map just using ${itemName} in the GSP. However as I sometimes want to build the item name dynamically like 'item'+i, I need to have some su...
Given the following url:
http://example.com?arr[]=hello&arr[]=to&arr[]=you
Am I able to bank on the fact that:
params[:arr] == ['hello', 'to', 'you']
?
I ask because I have some additional data that will be sent with the request that needs to be mapped to each of the values in params[:arr].
...
I have a Bike model and a Component model. Several models inherit from Component: Frame, Chain, Crankset etc.
When I submit my form, my params look like this:
"bike" => { "frame" => { "id" => "4" }, "chain" => { "id" => "19" }, ... }
In my controller, the following code breaks:
@bike = Bike.new(params[:bike])
> Frame(#90986230) expe...
Hey!
In IronPython I am trying to call a PythonFunction with different numbers of arguments from C#. For instance;
I want to do:
def foo(a, b):
print a, b
def bar(a, b, c = None):
print a, b, c
p = App.DynamicEvent()
p.addHandler(foo)
p.addHandler(bar)
p.invoke("Not", "Working")
where addHandler takes a single argument ...
I've got an iPhone app requesting an API, and it uses a nested param structure to pass in a username and password to login.
In my Rails controller, I'm successfully retrieving this information normally using:
username = param[:session][:username]
I'd like to test my API from shell, using cURL. But I can't figure out how to provide n...
How would I either create a helper or use the built-in link_to helper to combine URL params?
For instance, say I'm on a page with the URL parameter of status:
http://example.com/items?status=new
I have another link for carriers that I'd basically want to append to that, like so:
http://example.com/items?status=new&carrier=fedex
...
I have a map with name/value pairs:
def myMap = [
"username" : "myname",
"age" : 30,
"zipcode" : 10010
]
I have a class called User defined:
class User {
def username;
def age;
def zipcode;
}
I would like to invoke the appropriate setters on the bean. Is there a nice groovy way of doing this? Note, I might have extra...
Hello,
I am trying to accomplish something like a vertical bar chart.
This is done dynamically in Java. For some reason the TextViews (bars) are not aligned at the total bottom of the LinearLayout but ~20px above. When the height is set I can see by different and growing sizes that it first stretches to the bottom and then the to the top...
How can i create a method that has optional parameters and params together?
static void Main(string[] args)
{
TestOptional("A",C: "D", "E");//this will not build
TestOptional("A",C: "D"); //this does work , but i can only set 1 param
Console.ReadLine();
}
public static void TestOptional(string A, int B = 0, params string[...
I'm working on a moderating feature for my application, which is based on a basic scaffold structure. What I need, is to edit several records with the boolean parameter publised on false. In moderate.html I'm getting the list of all unpublished entries with the ability to change their parameters which, what and published. The error appea...
Does anyone have advice for using the params in C# for method argument passing. I'm contemplating making overloads for the first 6 arguments and then a 7th using the params feature. My reasoning is to avoid the extra array allocation the params feature require. This is for some high performant utility methods. Any advice? Is it a waste o...