166 Posted Topics
Re: class Hero: rope = false batteries = false radio = false room = "start" def move(self, dest): # define room change def get(self, item): # get item by symbol (flag true) # if batteries && radio then (OK to call for backup) | |
Re: // How about a relative position change? bool changeLevel( int velocity ) { // It may simply your problem currentFloorNum += velocity; cout << "You are on floor number " << currentFloorNum << "\r\n"; return velocity; } // changeLevel(3); changeLevel(-2); changeLevel(1); | |
Re: `If lvData.SelectedItems.Count < 1 Then Exit Sub` | |
Re: if user_input == "done" then output the answer and quit, ELSE, add user_input to the list of inputs. Not-- add user_input to the list THEN if user_input == "done" | |
Re: [SqlDataReader.IsDBNull](http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.isdbnull.aspx), from MSDN | |
Re: Why not getline by line? So a line returns, "111 Guru Singh" ;) \r\n Then delimit with ' ', however you want. Store the results in an array. std::string lineData[8] std::vector<std::string> lineData; Access them in any sane order. For example, lineData[0] // -> This is the number. lineData[1, 2, 3, … | |
Re: dec counter cmp 0,counter jz resetCounter | |
Re: Are you trying to do this? `if( isset( $_SESSION['alogin'] ) )` ![]() | |
Re: Check in the textbook your teacher assigned to you for this class. | |
Re: You'll want to use a resource editor, In MSVC, Add -> Resource -> Icon -> New | |
Re: Looks like it compiles in C++, grats, you're done. | |
Re: What if there is only one possible simultaneous alert? | |
Re: In my observation, you have no function which remotely attempts to search for price data. | |
Re: There is a lot of missing context, and honestly I didn't take that long to understand your question... however... `ListView1.Items(0).Selected = True` Items(0) is the first item, so it sounds like that's your problem. | |
Re: WC_Cart::get_fees() is undefined. You'll have to write the function. | |
Re: You have 19 activities but you're trying to access the 20th one, which crashes your script. Counting starts from 0. Also, feel free to increment x outside of the if statement, since you increment it either way. if (choice == "1") theirChoices.push(activityName[x]); ++x; | |
Re: int add( int * a, int * b ) { return *a + *b; } register int * a( & var1 ), * b( & var 2); int c( add( a, b ) ); Considering you didn't define a type, I suggest you avoid using registers for the time being. | |
Re: Format SELECT (column list) FROM (primary table) JOIN (seconary, tertiary, ...) ON (comparator) SELECT a.column, a.nother, b.for, b.cause FROM `table` AS a JOIN `table2` AS b ON a.id = b.id; | |
Re: Include the relevant code, such as that which you use to draw it. | |
![]() | Re: [Beej's guides](www.beej.us/guide/) contain intros to [network programming](http://www.beej.us/guide/bgnet/) and [interprocess communication](http://www.beej.us/guide/bgipc/) which are both excellent. ![]() |
Re: Please give a sample of the tables. For example, every column name and perhaps a brief description. You can make 1 query return information from 2 or more tables using INNER JOIN. | |
Re: I don't believe you can "absorb" a process this way... However, if you open the process within the context of the parent, you'll probably be fine. | |
Re: POST to the URL of the php script. | |
Re: That's already page scope, and you could use $row anywhere on the page. If $row appeared in a function, you could only use it within that function. The scope is important, perhaps you should provide the code you're using which causes your actual problem. | |
Re: From what you've given, there is no way to tell if you failed to submit. I don't know what code library you're using and I don't really care to find out about its semantics, either. For all I know, this data is successfully passed to getdata.php. Why don't you make … | |
Re: Specify a width of 20 - 33% for each item; display each one within <li>, such that if you had no styling, it would be a single bulleted list of pictures. | |
Re: string before = "Deleting 11 files.ABC: Total Time = 01:16:30, Remaining Time = 00:00:00"; string after = Regex.Replace( before, @"[,= ]", "" ); | |
Re: Make a column called parents and list every parent in some order of inheritance which is sane to you, as a comma delimited list of IDs. | |
Re: In the copy constructor or method, copy all data or change all relevant pointers. For example, struct Basic { char ** deep; int num; Basic & operator=(const Basic & b) { if( this == &b ) return *this; for(int i=0;i<num;++i) delete [] *(deep+i); delete [] deep; deep = new char … | |
Re: g.DrawImage(mybitmap, 0, 0, DRAW_WIDTH, DRAW_HEIGHT); | |
Re: in the file where you set $_SESSION['var'] make it do this `<?php echo $_SESSION['var']; ?>` then in the other file, $.get( "session_page.php", function(data) { $("#my_field_id").html(data); } ); and it will probably do what you're trying to accomplish. Though, I'm using jQuery. | |
Re: So create some function (fun(a, b)) such that, 1) 'a' creates a unique array of the input, bool[10], marking which digits exist 2) 'b' creates a unique array of the input, bool[10], which must have at least 3 elements in common 3) returns true if UNION(array_a, array_b) contains at least … | |
Re: The problem is that the LAN is infact exposed to external connection through routing. You would have to explain to her the principles of routing and how the router's firewall really operates. To be fair, it is possible to make your server public (as I'm sure you're aware). I don't … | |
| |
Re: `super(YOUR_SUBCLASS_NAME,self).__init__()` | |
Re: OK, are you ready? Don't fall asleep now. Letters are numbers in a computer. When you establish an array, you allocate a chunk of contiguous memory to crunch with. In this case, you will need (1) times the number of characters required to hold your information. That is to say, … | |
Re: $files = array( ); // or a class object $dir = opendir( $name ); while( false !== ($file = readdir($dir)) ) { if( $file != '.' && $file != '..' ) { $pop = explode('.',$file); $ext = ""; if(count($pop)>1) $ext = array_pop($pop); $files[implode('.',$pop)][] = $ext; // You may want to … | |
Re: You can phrase this as a 1D array, array[n] == array[ width * y + x ] | |
Re: Create a list... Or a table... These are <ul><li> and <table><tr><td> | |
Re: Does the column hold numeral type or string type...? Which is it? | |
Re: Rectangle * rectangles(NULL); // You can resize this in place. rectangles = realloc( rectangles, number_of_rects * sizeof( Rectangle ) ); free( rectangles ); // Once you're finished. rectangles = NULL; // Just for the sake of sanity in more complex cases. Plus, you probably want a container class to handle … | |
| |
Re: While this won't answer your question, I thought I should bring it to your awareness... echo "\t<option value=\" $data['ID'] \"> $data['Employer'] </option>\r\n"; Is totally valid, and you don't have to end php to produce HTML. I say this because I feel that it would improve the readability of your code. … | |
Re: [internal keyword](http://msdn.microsoft.com/en-us/library/7c5ka91b%28v=vs.80%29.aspx) It means the member can only be accessed within a certain scope. The scope is the scope of the assembly. So for example, if you have a DLL which does some stuff internally, the external code which uses the DLL can't access the internal stuff. | |
| |
Re: That depends on how replaceAll parses the string you provide. Would you mind posting the code you use in replace all? Besides, what language is this anyway? Many languages ship with regex_replace() type functionality by default. | |
Re: In simplest terms, you have a table of numbers in pre-determined but guassian or semi random order. If you pick a random starting point (seed), then you'll get what appears to be a random result. | |
Re: It looks like the problem could be with ostream_iterator, though I'm not familiar with the copy algorithm, it seems like something I'd use a void function pointer for, or boost lambda if I was being lazy. Would you mind posting the errors the call to copy generates (if any)? Yes … | |
Re: @ganesh That's a little bit misleading, the sizeof operator won't work for sizes unknown at compile time. In this case, the size is certainly dynamic and what he'll likely get from sizeof(dynamic_array) is (4), or, the size in bytes of the pointer to its base address. Note how this is … |
The End.