Search Results

Search found 4088 results on 164 pages for 'params keyword'.

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

  • Sending url params and POST body to a MVC 2 Controller

    - by Luiggi
    Hi, I'm having some issues trying to make a HTTP PUT (or POST) using WebClient against a MVC 2 controller. The exception is: The parameters dictionary contains a null entry for parameter 'total' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Company(System.Guid, Int32, Int32, System.String)' The controller action is: [HttpPut] public ActionResult Company(Guid uid, int id, int total, string url) The route is: routes.MapRoute( "CompanySet", "job/active/{uid}/company/{id}", new { controller = "Job", action = "Company" } ); As you may see, what I want is to send the 'uid' and 'id' parameters via url, but the 'total' and 'url' parameters as part of the PUT or POST body. I've also tried to merge the latter parameters into a class (i.e., CompanySetMessage), doing it no longer raises an exception but I dont receive the values on the server side. Any ideas? Thank you!

    Read the article

  • SQL IF ELSE with output params stored proc help

    - by Kettenbach
    Hi All, I have a stored proc (SS2008) that takes a couple int ids and needs to look up if they exist in a table before adding a record. I have an int output param I would like to return and set its value based on what occrured. I have this so far, but it always returns 1. Can someone point me in the right direction? BEGIN TRY IF EXISTS ( SELECT * FROM tbMap WHERE (cId= @CId) ) SET @result = -1; -- This C User is already mapped ELSE IF EXISTS ( SELECT * FROM tbMap WHERE (dId = @DId) ) SET @result = -2; -- This D User is already mapped ELSE INSERT INTO tbMap ( Login , Email , UserName , CId , DId) SELECT @UserName , usr.EmailAddress , usr.UserName , @CId , @DId FROM tbUser usr WHERE usr.iUserID = @DId SET @result = 1; RETURN END TRY What am I missing? Thanks for any tips. Cheers, ~ck in San Diego

    Read the article

  • Startup params for Silverlight 4 app

    - by Number8
    Hello -- We are moving our SL3 app to SL4. First step was to open it in VS2010; it converted w/o problem. However, parameters specified for the start page are not passed along. That is, if we specify ourStartPage.aspx?Slam=Dunk&Glass=Sun in app.xaml.cs, Application_Startup(), e.InitParams is empty. How do we fix this? Thanks for any advice.... (Note that the very same startup string worked in VS2008.)

    Read the article

  • Can't get a SQlcommand to recognise the params added

    - by littlechris
    Hi, I've not used basic SQLCommands for a while and I'm trying to pass a param to a sproc and the run it. However when I run the code I get a "Not Supplied" error. Code: SqlConnection conn1 = new SqlConnection(DAL.getConnectionStr()); SqlCommand cmd1 = new SqlCommand("SProc_Item_GetByID", conn1); cmd1.Parameters.Add(new SqlParameter("@ID", itemId)); conn1.Open(); cmd1.ExecuteNonQuery(); I'm not really sure why this would fail. Apologies for the basic question, but I'm lost! Thanks in advance.

    Read the article

  • Ruby and jQuery -- $(document).ajaxSend() not modifying the params as expected

    - by Jason
    I cannot get jquery's ajaxSend (http://api.jquery.com/ajaxSend/) to properly modify the parameters. I have: $(document).ajaxSend(function(event, request, settings) { settings.data = $.deparam(settings.data); settings.data['random'] = new Date().getTime(); settings.data['_method'] = 'get'; settings.data = $.param(settings.data) $.log(settings); }); $(document).ready(function() { //...snip... $.ajaxSetup({ data : { remote : 1, authenticity_token : encodeURIComponent(AUTH_TOKEN) } }); }); The idea here is that we always want 4 param sent across: remote and auth_token always get set properly. However, random and _method (both needed for IE issues) do not get set. Logging settings inside ajaxSend shows me that they are set to settings.data: "remote=1&authenticity_token=6GA9R_snip_253D&random=1270584905846&_method=get" but when it gets sent across the wire, I only have the following: authenticity_token 6GA9R_snip_253D remote 1 Why in the world is this not working?

    Read the article

  • mod_rewrite params inversion

    - by Fernando Constantino
    How can I create the mod_rewrite rule so I can convert the following URLs: From: domain/something/param/action ex:domain/cities/Chicago/view to: domain/something/action.php?param1=param ex: domain/cities/view.php?city=Chicago Changing to cities/view/Chicago cannot be an alternative. Thanks in advance.

    Read the article

  • where is POST params for WCF REST

    - by Costa
    Hi Can u put some code sample to get Post parameters sent by client to WCF REST webservice. The request is though a HttpWebRequest. The client will not serialize anything if I will request a certain XML format from PHP programmer, how to make WCF convert this XML to one parameter. currently I am trying to send the request like this and I am stuck HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("http://100.100.1.4000:2805/Something.svc/Bomba/Data.php"); request.ContentType = "text/xml"; request.Method = "POST"; StreamWriter stream = new StreamWriter(request.GetRequestStream()); { stream.Write("FirstName=0&LastName=2"); } request.GetResponse(); stream.Close(); Thanks

    Read the article

  • Method params match signature, but still getting error

    - by Jason
    I am in the midst of converting a VB library to C#. One of my methods has the following signature in VB: Private Shared Sub FillOrder(ByVal row As DataRowView, ByRef o As Order) In C# I converted it to: private static void FillOrder(DataRowView row, ref Order o) From my constructor inside my Order class, I am calling the FillOrder() method like so: DataView dv = //[get the data] if (dv.Count > 0) { FillOrder(dv[0], this); } In VB, this works: Dim dv As DataView = '[get data]' If dv.Count > 0 Then FillOrder(dv.Item(0), Me) End If However, in VS10 in the C# file I am getting a red squiggle under this call with the following error: The best overloaded method match for [the method] has some invalid arguments This was working code in VB. What am I doing wrong?

    Read the article

  • built in Soap extension php5 passing in params as associative array

    - by Ageis
    I have this xml I'm wanting to pass to this web service function <UserName>myuser</UserName> <Password>password</Password> <User> <AddCoverCode /> <title>sdadasdsa</title> </User> </CreateNewUser>','',array(),'document', 'literal'); I'm using the soap extension buit in php5. Is this what I'm supposed to be passing in the soapcall function as parameters? array('CreateNewUser' => array( 'UserName' => 'sc', 'Password' => 'i82372', 'Registration' => array('username' =>'new','password' =>'ss'));

    Read the article

  • Update Params in Python During Infinite Loop

    - by python Dude
    Hello, I was hoping to get some help on a question. I have an infinite loop that I need run and I need to update a set of variables (x in this case) at random times from the command-line. Is there any way to do this? For example: x = 0 while True: x = x + 1 if x < 30: do something and I need to update x's value from the command-line periodically

    Read the article

  • Add params before submit form ROR

    - by Jorge Najera T
    It's possible to add some parameters before submit an form? My problem is that I need to send the ticket id to my payment controller. A possibility is to send it through an hidden input field, but there's any other secure way to achieve this? Any help will be appreciated. Thanks. The process of buying a ticket 0) Select the event 1) User select the kind of ticket he wants to buy. 2) User add his personal information 3) Finally the Checkout (payment controller)

    Read the article

  • NodeJS + Express: res.redirect('back'); with params

    - by Ilya Rusanen
    I have register form on every page of my website. During registration some error may occur. After cathing error, I have to return user to previous page, showing some error tips. The problem is I dont know from which page user performs registration. That's why I use res.redirect('back');. However, I cant just redirect user back, I have to show him whats wrong. Thats why I have to pass some parameter. But res.redirect('back', (reg_error:'username')}) can not be used directly 'cause res.redirect() doesn't support parameters. How can I render prevous page with some parameter? Thanks!

    Read the article

  • How can I tell the number of replacements in a formatter string?

    - by sdanna
    Given the following method: (real method has a few more parameters, but the important ones are below...) public string DoSomething(string formatter, params string[] values) { // Do something eventually involving a call to String.Format(formatter, values); } Is there a way to tell if my values array has enough objects in it to cover the formatter, so that I can throw an exception if there aren't (short of doing the string.Format; that isn't an option until the end due to some lambda conversions)?

    Read the article

  • What's the best way to match a query to a set of keywords?

    - by Ryan Detzel
    Pretty much what you would assume Google does. Advertisers come in and big on keywords, lets say "ipod", "ipod nano", "ipod 60GB", "used ipod", etc. Then we have a query, "I want to buy an ipod nano" or "best place to buy used ipods" what kind of algorithms and systems are used to match those queries to the keyword set. I would imagine that some of those keyword sets are huge, 100k keywords made up of one or more actual words. on top of that queries can be 1-n words as well. Any thoughts, links to wikipedia I can start reading? From what I know already I would use some stemmed hash in disk(CDB?) and a bloom filter to check to see if I should even go to disk.

    Read the article

  • search a collection for a specific keyword

    - by icelated
    What i want to do is search a hashset with a keyword.. I have 3 classes... main() Library Item(CD, DVD,Book classes) In library i am trying to do my search of the items in the hashsets.. In Item class is where i have the getKeywords function.. here is the Items class... import java.io.PrintStream; import java.util.Collection; import java.util.*; class Item { private String title; private String [] keywords; public String toString() { String line1 = "title: " + title + "\n" + "keywords: " + Arrays.toString(keywords); return line1; } public void print() { System.out.println(toString()); } public Item() { } public Item(String theTitle, String... theKeyword) { this.title = theTitle; this.keywords = theKeyword; } public String getTitle() { return title; } public String [] getKeywords() { return keywords; } } class CD extends Item { private String artist; private String [] members; // private String [] keywords; private int number; public CD(String theTitle, String theBand, int Snumber, String... keywords) { super(theTitle, keywords); this.artist = theBand; this.number = Snumber; // this.keywords = keywords; } public void addband(String... member) { this.members = member; } public String getArtist() { return artist; } public String [] getMembers() { return members; } // public String [] getKeywords() // { // return keywords; //} public String toString() { return "-Music-" + "\n" + "band: " + artist + "\n" + "# songs: " + number + "\n" + "members: " + Arrays.toString(members) + "\n" + super.toString() // + "keywords: " + Arrays.toString(keywords) + "\n" + "\n" ; } public void print() { System.out.println(toString()); } } class DVD extends Item { private String director; private String [] cast; private int scenes; // private String [] keywords; public DVD(String theTitle, String theDirector, int nScenes, String... keywords) { super(theTitle, keywords); this.director = theDirector; this.scenes = nScenes; // this.keywords = keywords; } public void addmoviecast(String... members) { this.cast = members; } public String [] getCast() { return cast; } public String getDirector() { return director; } // public String [] getKeywords() // { // return keywords; // } public String toString() { return "-Movie-" + "\n" + "director: " + director + "\n" + "# scenes: " + scenes + "\n" + "cast: " + Arrays.toString(cast) + "\n" + super.toString() // + "keywords: " + Arrays.toString(keywords) + "\n" + "\n" ; } public void print() { System.out.println(toString()); } } class Book extends Item { private String author; private int pages; public Book(String theTitle, String theAuthor, int nPages, String... keywords) { super(theTitle, keywords); this.author = theAuthor; this.pages = nPages; // this.keywords = keywords; } public String getAuthor() { return author; } //public String [] getKeywords() // { // return keywords; //} public void print() { System.out.println(toString()); } public String toString() { return "-Book-" + "\n" + "Author: " + author + "\n" + "# pages " + pages + "\n" + super.toString() // + "keywords: " + Arrays.toString(keywords) + "\n" + "\n" ; } } I hope i didnt confuse you? I need help with the itemsForKeyword(String keyword) function.. the first keyword being passed in is "science fiction" and i want to search the keywords in the sets and return the matches.. What am i doing so wrong? Thank you

    Read the article

  • How to search for alphanumeric word before or after a keyword in perl?

    - by aliocee
    I have sentences as shown in the below examples: $sen1 = "The quick brown fox jump KEYWORD over123 the3 lazy dog, fox is quick"; $sen2 = "The quick brown fox jump123 KEYWORD over the lazy dog, fox is quick"; i want to use the keyword 'KEYWORD' as my search string to extract the alphanumeric words before and after the search string using Perl regular expression. sample output: over123 jump123 NB: The word 'the3' is left out because i'm only searching for alphanumeric words exactly before or after the 'KEYWORD'. Thanks

    Read the article

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