Search Results

Search found 7375 results on 295 pages for 'parameter'.

Page 17/295 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • How to get parameter values from an XmlNode in C#

    - by Brian
    How do I get the values for parameters in a XmlNode tag. For example: <weather time-layout="k-p24h-n7-1"> <name>Weather Type, Coverage, and Intensity</name> <weather-conditions weather-summary="Mostly Sunny"/> </weather> I want to get the value for the parameter 'weather-summary' in the node 'weather-conditions'.

    Read the article

  • pass Multilple paramets in struts action with same parameter name

    - by raju
    Hi I would like to pass Multiple parameters for single param in action tag. Ex: abc Answers.jsp I have getters and setters for hint (String) variable in my action. Currently i can be able to get parameter value for hint variable as abc if i send one. I would like to send multiple parameters for same variable(hint) ex: abc, xyz how can achieve the above. Thanks in advance Raju

    Read the article

  • scala currying by nested functions or by multiple parameter lists

    - by Morgan Creighton
    In Scala, I can define a function with two parameter lists. def myAdd(x :Int)(y :Int) = x + y This makes it easy to define a partially applied function. val plusFive = myAdd(5) _ But, I can accomplish something similar by defining and returning a nested function. def myOtherAdd(x :Int) = { def f(y :Int) = x + y f _ } Cosmetically, I've moved the underscore, but this still feels like currying. val otherPlusFive = myOtherAdd(5) What criteria should I use to prefer one approach over the other?

    Read the article

  • issue getting dynamic Config parameter in Grails taglib

    - by Mick Knutson
    I have a dynamic config parameter I want to get like: String srcProperty = "${attrs ['src']}.audio" + ((attrs['locale'])? "_${attrs['locale']}" : '') assert srcProperty == "prompt.welcomeMessageOverrideGreeting.audio" where my config has: prompt{ welcomeMessageOverrideGreeting { audio = "/en/someFileName.wav" txt = "Text alternative for /en/someFileName.wav" audio_es = "/es/promptFileName.wav" txt_es = "Texto alternativo para /es/someFileName.wav" } } While this works fine: String audio = "${config.prompt.welcomeMessageOverrideGreeting.audio}" and: assert "${config.prompt.welcomeMessageOverrideGreeting.audio}" == "/en/someFileName.wav" I can not get this to work: String audio = config.getProperty("prompt.welcomeMessageOverrideGreeting.audio")

    Read the article

  • Using a function with reference as a function with pointers?

    - by epatel
    Today I stumbled over a piece of code that looked horrifying to me. The pieces was chattered in different files, I have tried write the gist of it in a simple test case below. The code base is routinely scanned with FlexeLint on a daily basis, but this construct has been laying in the code since 2004. The thing is that a function implemented with a parameter passing using references is called as a function with a parameter passing using pointers...due to a function cast. The construct has worked since 2004 on Irix and now when porting it actually do work on Linux/gcc too. My question now. Is this a construct one can trust? I can understand if compiler constructors implement the reference passing as it was a pointer, but is it reliable? Are there hidden risks? Should I change the fref(..) to use pointers and risk braking anything in the process? What to you think? #include <iostream> using namespace std; // ---------------------------------------- // This will be passed as a reference in fref(..) struct string_struct { char str[256]; }; // ---------------------------------------- // Using pointer here! void fptr(const char *str) { cout << "fptr: " << str << endl; } // ---------------------------------------- // Using reference here! void fref(string_struct &str) { cout << "fref: " << str.str << endl; } // ---------------------------------------- // Cast to f(const char*) and call with pointer void ftest(void (*fin)()) { void (*fcall)(const char*) = (void(*)(const char*))fin; fcall("Hello!"); } // ---------------------------------------- // Let's go for a test int main() { ftest((void (*)())fptr); // test with fptr that's using pointer ftest((void (*)())fref); // test with fref that's using reference return 0; }

    Read the article

  • Pass function as parameter in PHP

    - by Casidiablo
    Hello everybody! I've been wondering whether is possible or not to pass a function as parameter in PHP; I want something like when you're programming in JS: object.exampleMethod(function(){ // some stuff to execute }); What I want is to execute that function somewhere in exampleMethod. Is that possible in PHP? Thank you so much.

    Read the article

  • @NamedQuery select parameter meaning

    - by sergionni
    Found some examples of @NamedQuery annotations,e.g.: @NamedQuery(name="employeeBySsn" query="select e from Employee e where e.ssn = :ssn") what does parameter e mean? the second usage of it seems like alias name of table and what does "select e" part mean?

    Read the article

  • passing custom object as parameter to a webmethod of asp.net web service

    - by Jon
    Hi, I have a custom class declared as follows (in vb.net) <Serializable()> _ Public Class NumInfo Public n As String Public f As Integer Public fc As char() Public t As Integer Public tc As char() Private validFlag As Boolean = True Public Sub New() End Sub 'I also have public properties(read/write) for all the public variablesEnd Class In my service.asmx codebehind class I have a webmethod as follows: <WebMethod()> _ <XmlInclude(GetType(NumInfo))> _ Public Function ConvertTo(ByVal info As NumInfo) As String Return mbc(info)'mbc is another function defined in my service.asmx "service" class End Function The problem is that when I start debugging it to test it, the page that I get does not contain any fields where I could input the values for the public fields of numInfo. How do I initialise the class? There is no "Invoke" button either. All I see are soap details as below: ConvertToTestThe test form is only available for methods with primitive types as parameters.SOAP 1.1The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.POST /Converter/BC.asmx HTTP/1.1Host: localhostContent-Type: text/xml; charset=utf-8Content-Length: lengthSOAPAction: "http://Services/ConvertTo"<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ConvertTo xmlns="http://Services/"> <info> <n>string</n> <f>int&lt/f> <fc> <char>char</char> <char>char>/char> </fc>..etc.. What am I doing wrong? For the record I tried replacing char() with string to see if it was the array causing problems but that didn't help either. I'm fairly new to web services. I tried replacing the custom object parameter with a primitive parameter just to check how things worked and it rendered a page with an input field and invoke button. I just can't seem to get it working with custom object. Help!

    Read the article

  • Does Java support default parameter values?

    - by gnavi
    I came across some Java code that had the following structure: public MyParameterizedFunction(String param1, int param2) { this(param1, param2, false); } public MyParameterizedFunction(String param1, int param2, boolean param3) { //use all three parameters here } I know that in C++ I can assign a parameter a default value. For example: void MyParameterizedFunction(String param1, int param2, bool param3=false); Does Java support this kind of syntax? Are there any reasons why this two step syntax is preferable?

    Read the article

  • Is passing NULL param exactly the same as passing no param

    - by park
    I'm working with a function whose signature looks like this afunc(string $p1, mixed $p2, array $p3 [, int $p4 = SOM_CONST [, string $p5 ]] ) In some cases I don't have data for the last parameter $p5 to pass, but for the sake of consistency I still want to pass something like NULL. So my question, does PHP treat passing a NULL exactly the same as not passing anything? somefunc($p1, $p2, $p3, $p4 = SOM_CONST); somefunc($p1, $p2, $p3, $p4 = SOM_CONST, NULL);

    Read the article

  • Changing css-class-wrapper parameter of liferay portlet at runtime

    - by 2DH
    As the title says - I need to change css-class-wrapper parameter at runtime, preferably in action class. I've found that Portlet interface has setCssClassWrapper method that could probably do what I want, but I can't seem to find any easy way to access current portlet object from my code. Could anyone please give me a hand with what I want to achieve. Thanks.

    Read the article

  • mysqldump parameter to ensure DROP VIEW IF EXISTS rather than incorrect DROP TABLE IF EXISTS

    - by doublejosh
    Wonder if there is a parameter I can pass in mmysqldump equivalent for SQL Servery mysqldump that will make the incorrect "DROP TABLE IF EXISTS" statements into "DROP VIEW IF EXISTS", so that populating a database in an automated development environment refresh will work? Clarification, I'm getting DROP TABLE IF EXISTS statements in my .sql dump file even though they aren't tables. FYI: This is a Drupal site. The tables in question are ubercart meta statistics tables.

    Read the article

  • request parameter using jquery/javascript

    - by Bunny Rabbit
    is it possible to stop the submission of a form,after submit button has been clicked and get the action attribute and the request parameters of the submission using javascript(preferably jQuery) ? I want to get the action and the parameter so that the it can be submitted to an alternate location ,what i am tryin to do is try writing a proxy website.

    Read the article

  • Struts2 converting empty string parameter to an "int"

    - by Kyle Partridge
    How does one convert an empty string to an int using Struts2. When the application encounters this parameter with no value, like from an empty text field, it throws the following exception. java.lang.NoSuchMethodException: com.XXXXXXXXXXXX.setID([Ljava.lang.String;) Where ID is an integer, and the URL is: Something.action?ID=&other=rawr Is there a way to do this without using an Integer (class)? Do I have to write a type converter?

    Read the article

  • Limit URL Parameter Length in Web.Config

    - by Alex
    Is it possible to add some kind of restriction to the web.config to limit URL parameter length? I want to prevent people at the earliest possible point from submitting too large URL parameters so the server doesn't get taxed more than necessary in the event that somebody tries to "attack" it with large invalid URL parameters.

    Read the article

  • HttpSessionState as parameter

    - by HeavyWave
    What is the highest class in the hierarchy I can use to pass HttpSessionState as a parameter and add values to it? For instance to a method like public void MyMethod(IDictionary<string, object> input) { input.Add("something", something); } I see that implements ICollection and IEnumerable, but that only allows me to read values, not add them.

    Read the article

  • Parameter has no walue

    - by Simon
    string queryString = "SELECT SUM(skupaj_kalorij)as Skupaj_Kalorij " + "FROM (obroki_save LEFT JOIN users ON obroki_save.ID_uporabnika=users.ID)" + "WHERE users.ID= " + a.ToString() + " AND obroki_save.datum =?"; using (OleDbCommand cmd = new OleDbCommand(queryString,database)) { cmd.Parameters.Add("@datum", OleDbType.Char).Value = DateTime.Now.ToShortDateString(); } Why doesn't the parametr datum get the date value? (the value of at least one complex parameter has not been determined )

    Read the article

  • passing uiimageview as a parameter in NStimer selector??

    - by hemant
    i created a function onTimer passing it a uiimageview parameter...but when i call this function in a NStimer call as shown below i get a syntax error?? is there any other way around it?? [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(onTimer:image) userInfo:nil repeats:YES];

    Read the article

  • about friendfeed search parameter.

    - by user285020
    has anyone find out why FriendFeed advanced search result url doesn't have not search field parameter? some example: contains the words field, when you inputs a text "ok" and push search, then response url is http://friendfeed.com/search?q=ok if you also inputs a text into words in the title field, like texts "I'm", response url is http://friendfeed.com/search?q=ok+intitle%3Ai%27m well, pretty beautiful. not like other site response all field even you don't push a text into. anyone know how to make this effect?

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >