Search Results

Search found 3440 results on 138 pages for 'returning'.

Page 52/138 | < Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >

  • What is more correct class name or object name in UML sequence diagram?

    - by atch
    I was just wondering if it is more correctly to as a label of objects in UML sequence diagram instead of object name (which is irrelevant in my opinion and less informative than class name) provide class name. Another thing, while returning information instead of listing all objects names would it be a better solution to just write collection; Diagram with object names: Diagram with class names: As it's clearly visible from the second diagram that it is much more informative than the first one, and I think it is more practical.

    Read the article

  • JSONResult to String

    - by Dustin Laine
    I have a JsonResult that is working fine, and returning JSON from some POCO's. I want to save the JSON as a string in a DB. public JsonResult GetJSON() { JsonResult json = new JsonResult { Data = GetSomPocos() }; return json; } I need to audit the response, so I want to save the json into a DB. I am having trouble finding a way to get the JSON as a string. Any help is appreciated.

    Read the article

  • How can I manually interpolate string escapes in a Perl string?

    - by Ryan Thompson
    In perl suppose I have a string like 'hello\tworld\n', and what I want is: 'hello world ' That is, "hello", then a literal tab character, then "world", then a literal newline. Or equivalently, "hello\tworld\n" (note the double quotes). In other words, is there a function for taking a string with escape sequences and returning an equivalent string with all the escape sequences interpolated?

    Read the article

  • Is HTTP 404 appropriate for out of range page number on paged content?

    - by WooYek
    I have a site that is mainly showing a paged list of content (articles, data element's, etc.), and I'm wondering about returning HTTP 404 when user navigates outside of the available list range. Some sites just display "No results/Page number out of range" and some return additionally return HTTP 404 status. What's your take on that, and why? UPDATE It's not and api response. This question is in regard to user viewed pages that among other things show a list/table in the main area.

    Read the article

  • Best way to get a Web Service to return a database result as XML?

    - by John
    I am building a webservice using jax-rs and querying a DB2 z/OS database with SQLJ and getting the result set as an arraylist. I would like to return this list as XML, but not sure how to do it. Does anyone have an example of returning a result set as XML and is using an Arraylist the best way to do this? Should I use JAXB? if so how?

    Read the article

  • Nginx: check content-length before file upload takes place

    - by robw
    I'm trying to prevent users from uploading (accidentally or maliciously) very large files to my website. I have nginx max_client_body_size set to 4M, but if a file larger than this is uploaded, then it uploads the entire file before returning 413 (entity too large). I want to make nginx check the Content-Length header, so that it rejects the request before it's uploaded. Alternatively, a Rails solution would also be acceptable. Any help appreciated.

    Read the article

  • Displaying Data on the Form with C#

    - by The.Anti.9
    I'm searching files and returning lines that include the search text, and I'm not really sure the best way to display the information I get. Every time I get a match, I want to show, in some sort of control, the File it came from, and the whole text line. (aka streamreader.ReadLine() result). First I tried just putting it all in a read-only text box, but it doesn't have a scroll bar. What is the best form control to help me display this data neatly?

    Read the article

  • How do I check if a Linq to SQL entity has grandchildren?

    - by EdenMachine
    How can I find out if a Linq to SQL entity has grandchildren or not? Pseudo-code below: Return From p In dc.Processes Where p.Signers.Count > 0 and p.Signers.Signatures.Count > 0 Obviously I can't run the code above but I need to make sure that all the returning Processes have at least one Signer and that all of those Signers have at least one Signature. TIA!

    Read the article

  • java api design - NULL or Exception

    - by srini.venigalla
    Is it better to return a null value or throw an exception from an API method? Returning a null requires ugly null checks all over, and cause a major quality problem if the return is not checked. Throwing an exception forces the user to code for the faulty condition, but since Java exceptions bubble up and force the caller code to handle them, in general, using custom exceptions may be a bad idea (specifically in java). Any sound and practical advice?

    Read the article

  • How to use Spanish characters in Handlebars templates

    - by Jon Rose
    I am wondering what the idiomatic way to render special language characters is using Handlebars.js templates. When I render the normal html I can use something like the Spanish lowercase e, &#233, and it renders as expected. When I pass the same text as a string to my Handlebars template I just see the characters &#233. I have tried creating a Handlebars helper that used jquery to render the text using .html() then returning the .html() of the tmp element and I get the same results.

    Read the article

  • Struts:JSON:return multiple objects

    - by cp
    Hello Is it possible to return multiple JSON objects in the request header with Struts1? I am presently returning a single JSON objects, however the need now is to return a second data structure. All the client-side processing works perfectly for the single data structure in the single JSON objects, I really do not want to complicate it by putting two hetrogenous data structures in a single return JSON object. tia.

    Read the article

  • RESTful resource not found. 404 or 204? Jersey returns 204 on null being returned from handler.

    - by jr
    If you are looking for /Resource/Id and that resource does not exist, I had always though that 404 was the appropriate response. However, when returning "null" from a Jersey handler, I get back a "204 No Content". I can likely work with either one, but am curious to others thoughts on this. To answer my own next question. To get jersey to return 404 you must throw an exception. if (a == null) throw new WebApplicationException(404);

    Read the article

  • Best way to return result from business layer to presentation layer when using LINQ-to-SQL

    - by samsur
    I have a business layer that has DTOs that are used in the presentation layer. This application uses entity framework. Here is an example of a class called RoleDTO: public class RoleDTO { public Guid RoleId { get; set; } public string RoleName { get; set; } public string RoleDescription { get; set; } public int? OrganizationId { get; set; } } In the BLL I want to have a method that returns a list of DTO. I would like to know which is the better approach: returning IQueryable or list of DTOs. Although I feel that returning IQueryable is not a good idea because the connection needs to be open. Here are the 2 different methods using the different approaches: First approach public class RoleBLL { private servicedeskEntities sde; public RoleBLL() { sde = new servicedeskEntities(); } public IQueryable<RoleDTO> GetAllRoles() { IQueryable<RoleDTO> role = from r in sde.Roles select new RoleDTO() { RoleId = r.RoleID, RoleName = r.RoleName, RoleDescription = r.RoleDescription, OrganizationId = r.OrganizationId }; return role; } Note: in the above method the DataContext is a private attribute and set in the constructor, so that the connection stays opened. Second approach public static List<RoleDTO> GetAllRoles() { List<RoleDTO> roleDTO = new List<RoleDTO>(); using (servicedeskEntities sde = new servicedeskEntities()) { var roles = from pri in sde.Roles select new { pri.RoleID, pri.RoleName, pri.RoleDescription }; //Add the role entites to the DTO list and return. This is necessary as anonymous types can be returned acrosss methods foreach (var item in roles) { RoleDTO roleItem = new RoleDTO(); roleItem.RoleId = item.RoleID; roleItem.RoleDescription = item.RoleDescription; roleItem.RoleName = item.RoleName; roleDTO.Add(roleItem); } return roleDTO; } } Please let me know, if there is a better approach.

    Read the article

  • Simple jquery console log

    - by Kevin Brown
    I'm trying to log the change of a value in the console (Firefox/Firefly, mac). if(count < 1000) { count = count+1; console.log(count); setTimeout("startProgress", 1000); } This is only returning the value 1. It stops after that. Am I doing something wrong or is there something else affecting this?

    Read the article

  • Question about JSON?

    - by Alex
    Hi all, I have a fairly simple question: In Javascript how can I return the boolean (if its found in the JSON) rather than the actual value? Example: var myJSON = { "foo" : "bar", "bar" : "foo" }; var keyToLookFor = "foo"; var found = myJSON[keyToLookFor]; if (found) { // I know I can test if the string exists in the if } // but is there a way I could just return something like: return found; // instead of testing found in the if statement and then returning true?

    Read the article

  • Stored procedure with output parameters vs. table-valued function?

    - by abatishchev
    Which approach is better to use if I need a member (sp or func) returning 2 parameters: CREATE PROCEDURE Test @in INT, @outID INT OUT, @amount DECIMAL OUT AS BEGIN ... END or CREATE FUNCTION Test ( @in INT ) RETURNS @ret TABLE (outID INT, amount DECIMAL) AS BEGIN ... END What are pros and cons of each approach considering that the result will passed to another stored procedure: EXEC Foobar @outID, @outAmount

    Read the article

  • How to handle when SSRS does not automatically update fields based on database query?

    - by badpanda
    So I am trying to change the number of fields in my dataset in SSRS and the refresh button is not picking up the added field from the SQL server. The query is definitely returning the correct data, as I have double checked in the server engine itself. Also, I have tried manually adding the field using the SSRS menu, but as soon as I execute it disappears. Any suggestions or similar experiences?

    Read the article

< Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >