Search Results

Search found 47805 results on 1913 pages for 'return address'.

Page 84/1913 | < Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >

  • python return class

    - by William P
    Hi I new to python and I read from someone else of the example code below: class A: def current(self): data = Data(a=a,b=b,c=c) return data class B(A): #something here #print data a b c How do I print out the data a, b, and c?

    Read the article

  • return an address of a double

    - by bks
    i'm having an issue understanding why the following works: void doubleAddr(double* source, double** dest) { *dest = source; } i get a pointer to a double and want to change the double that dest points to: //usage: int main() { double* num; double* dest; doubleAddr(num, &dest); return 0; } thanks in advance

    Read the article

  • return the variable used for using inside the using C#

    - by di3go
    Hello, I am returning the variable I am creating in a using statement inside the using statement (sounds funny): public DataTable foo () { using (DataTable properties = new DataTable()) { // do something return properties; } } Will this Dispose the properties variable?? After doing this am still getting this Warning: Warning 34 CA2000 : Microsoft.Reliability : In method 'test.test', call System.IDisposable.Dispose on object 'properties' before all references to it are out of scope. Any Ideas? Thanks

    Read the article

  • Persist UIWebView content and address after changing views

    - by Momeks
    I am using UIWebView as a web browser on my application and when I open an url with my browser and return back to the main view, then go to browser view, my webview doesn't save the content. So, if I go to google.com and switch views, then again go to the browser view, I have to type the url again to open the webpage! How can I save the web browser's content?

    Read the article

  • How to use jQuery to make a call to c# webservice to get return value

    - by aspdotnetuser
    I want to use jQuery to make a call to a c# web service called c.ashx which checks whether that username is valid and returns an error message as a string. What should I put for data: and content type: if the return value of the c# webservice is a string value? jQuery.ajax({ type: "GET", url: "/services/CheckUserName.ashx", data: "", contenttype: "", success: function (msg) { alert("success"); }, error: function (msg, text) { alert(text); } });

    Read the article

  • Why does this code sometimes return NaN?

    - by carrots
    This often returns NAN ("Not A Number") depending on input: #define PI 3.1415f GLfloat sineEaseIn(GLfloat ratio) { return 1.0f-cosf(ratio * (PI / 2.0f)); } I tried making PI a few digits smaller to see if that would help. No dice. Then I thought it might be a datatype mismatch, but float and glfloat seem to be equivalent: gl.h typedef float GLfloat; math.h extern float cosf( float ); Is this a casting issue?

    Read the article

  • How to return number of rows in the template

    - by xRobot
    In my view I return all posts of one blog: posts = Post.objects.filter(blog=blog) and pass it to context. But.. How can I get the number of posts in the template ? This is my template: <h1>Number of posts: {{ ??? }} </h1> {% for post in posts %} {{ post.title }} {{ post.body }} {% endfor %}

    Read the article

  • mysql insert multiple rows, return rows that failed

    - by Glenn
    When I try to insert (lets say) 30 rows in my table. For example INSERT INTO customers(cust_name, cust_address, cust_city, cust_state, cust_zip, cust_country) VALUES( 'Pep E. LaPew', '100 Main Street', 'Los Angeles', 'CA', '90046', 'USA' ), ( 'M. Martian', '42 Galaxy Way', 'New York', 'NY', '11213', 'USA' ), ... ; And cust_name has to be unique. How can I then identify the records that failed to insert because their cust_name already exists? Is it possible to return them?

    Read the article

  • asp.net mvc3 return multiple json list

    - by Acid
    Im asp.net mvc3 c# code returns json list like this: return Json(new { name = UserNames, imageUrl = ImageUrls }); UserNames and ImageUrls are both List types And this is my jquery function StartSearch(text) { $.ajax({ url: '/Shared/Search', type: 'POST', data: { SearchText: text }, dataType: 'json', success: function (result) { $.each(result, function (i, item) { alert(result[i].name); }); } }); } How i can get names and umageUrls? Thanks

    Read the article

  • Jquery toggle function that doesn't return false?

    - by Tom
    Hi, Is it possible to stop the automatic preventDefault() from applying in a simple Jquery toggle function? $(".mydiv").toggle( function () { $(this).addClass("blue"); }, function () { $(this).removeClass("blue"); } ); The above prevents elements inside the div from responding normally to the click. It doesn't have to be the toggle() function - anything that allows toggling a class on and off AND doesn't return false would be great. Thanks.

    Read the article

  • C segmentation fault before/during return statement

    - by wolfPack88
    I print the value that I'm returning right before my return statement, and tell my code to print the value that was returned right after the function call. However, I get a segmentation fault after my first print statement and before my second (also interesting to note, this always happens on the third time the function is called; never the first or the second, never fourth or later). I tried printing out all of the data that I'm working on to see if the rest of my code was doing something it maybe shouldn't, but my data up to that point looks fine. Here's the function: int findHydrogen(struct Amino* amino, int nPos, float* diff, int totRead) { struct Atom* atoms; int* bonds; int numBonds; int i; int retVal; int numAtoms; numAtoms = (*amino).numAtoms; atoms = (struct Atom *) malloc(sizeof(struct Atom) * numAtoms); atoms = (*amino).atoms; numBonds = atoms[nPos].numBonds; bonds = (int *) malloc(sizeof(int) * numBonds); bonds = atoms[nPos].bonds; for(i = 0; i < (*amino).numAtoms; i++) printf("ATOM\t\t%d %s\t0001\t%f\t%f\t%f\n", i + 1, atoms[i].type, atoms[i].x, atoms[i].y, atoms[i].z); for(i = 0; i < numBonds; i++) if(atoms[bonds[i] - totRead].type[0] == 'H') { diff[0] = atoms[bonds[i] - totRead].x - atoms[nPos].x; diff[1] = atoms[bonds[i] - totRead].y - atoms[nPos].y; diff[2] = atoms[bonds[i] - totRead].z - atoms[nPos].z; retVal = bonds[i] - totRead; bonds = (int *) malloc(sizeof(int)); free(bonds); atoms = (struct Atom *) malloc(sizeof(struct Atom)); free(atoms); printf("2 %d\n", retVal); return retVal; } } As I mentioned before, it works fine the first two times I run it, the third time it prints the correct value of retVal, then seg faults somewhere before it gets to where I called the function, which I do as: hPos = findHydrogen((&aminoAcid[i]), nPos, diff, totRead); printf("%d\n", hPos);

    Read the article

  • Wait For Return Key Press Using Java Scanner

    - by Gordon
    What would be the best way to wait for a return key press from the user using the Java Scanner Class? In a command line tool I would like the user to confirm before carrying out an action. Please correct me if there a more standard way of doing this in a command line tool.

    Read the article

  • Why does /**[newline] not always insert the Javadoc template including @param and @return in Eclipse

    - by Bas van den Broek
    I'm documenting code in Eclipse and have been using the /** followed by Enter alot to insert the Javadoc template. However this does not always work for some reason, it will create the template for writing comments but it won't automatically insert the @param and @return text. If I copy the exact same method to another class it will insert the full template. It would be a big help if anyone could tell me why it won't do this in some situations.

    Read the article

  • removeAttribute do not return true or false

    - by Sourabh
    Hi , I am trying to remove attributes of a DOM element using below statement in javascript. var res = nodes.removeAttribute("style"); but the res is always "undefined" it seems that the removeAttribute function does not return anything (I tested it on firefox browser) How can I identify that the attribute is successfully removed or not ? Thanks, Sourabh

    Read the article

  • How to return something in Matlab?

    - by Ben Fossen
    I have a simple function function increase(percent, number) low = number- number*percent; end I want to return low so I can use it as an argument for another function mitoGen(asp, arg, increase(.2,234), glu) Is there a way to do this?

    Read the article

< Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >