166 Posted Topics

Member Avatar for robotakid

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)

Member Avatar for TrustyTony
0
371
Member Avatar for eldiablo1121

// 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);

Member Avatar for eldiablo1121
0
223
Member Avatar for zawpai
Member Avatar for stealthless

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"

Member Avatar for edward.okech.5
0
228
Member Avatar for Jake.20

[SqlDataReader.IsDBNull](http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.isdbnull.aspx), from MSDN

Member Avatar for kRod
0
267
Member Avatar for waqas.zafar.125

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, …

Member Avatar for Unimportant
0
192
Member Avatar for overwraith
Member Avatar for udorngrul
Member Avatar for L-D
Member Avatar for Zagga
0
264
Member Avatar for adil.ghori
Member Avatar for piczim

You'll want to use a resource editor, In MSVC, Add -> Resource -> Icon -> New

Member Avatar for piczim
0
268
Member Avatar for andrew12s
Member Avatar for MWEB
Member Avatar for nadiah.izzati

In my observation, you have no function which remotely attempts to search for price data.

Member Avatar for ddanbe
0
161
Member Avatar for markjames2012

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.

Member Avatar for markjames2012
0
167
Member Avatar for london-G

WC_Cart::get_fees() is undefined. You'll have to write the function.

Member Avatar for Atli
0
396
Member Avatar for aVar++

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;

Member Avatar for Unimportant
0
177
Member Avatar for hg_fs2002

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.

Member Avatar for Unimportant
0
388
Member Avatar for Zdneth_1

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;

Member Avatar for Unimportant
0
131
Member Avatar for cgull
Member Avatar for Rahul47

[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.

Member Avatar for Rahul47
0
206
Member Avatar for mmcdonald

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.

Member Avatar for mmcdonald
0
847
Member Avatar for Suzie999

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.

Member Avatar for Suzie999
0
4K
Member Avatar for MWEB
Member Avatar for mmcdonald

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.

Member Avatar for mmcdonald
0
290
Member Avatar for layman114

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 …

Member Avatar for layman114
0
194
Member Avatar for OsaMasw

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.

Member Avatar for OsaMasw
0
282
Member Avatar for Jahliah

string before = "Deleting 11 files.ABC: Total Time = 01:16:30, Remaining Time = 00:00:00"; string after = Regex.Replace( before, @"[,= ]", "" );

Member Avatar for Ketsuekiame
0
4K
Member Avatar for bops

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.

Member Avatar for bops
0
322
Member Avatar for ??!!

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 …

Member Avatar for rubberman
-4
158
Member Avatar for hazel.lanavio
Member Avatar for PoisonedHeart

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.

Member Avatar for PoisonedHeart
0
769
Member Avatar for TheTimeCat

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 …

Member Avatar for TheTimeCat
0
167
Member Avatar for Djmann1013

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 …

Member Avatar for Rik_
0
232
Member Avatar for dlaverick
Member Avatar for slamshuffle
Member Avatar for cocopium

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, …

Member Avatar for Unimportant
0
193
Member Avatar for newbie26

$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 …

Member Avatar for newbie26
0
319
Member Avatar for waqas.zafar.125

You can phrase this as a 1D array, array[n] == array[ width * y + x ]

Member Avatar for Kanoisa
0
165
Member Avatar for ImZick
Member Avatar for broj1
0
2K
Member Avatar for gbhs
Member Avatar for ??!!

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 …

Member Avatar for mike_2000_17
-1
239
Member Avatar for virendra_sharma
Member Avatar for bradly.spicer

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. …

Member Avatar for bradly.spicer
0
278
Member Avatar for amrita111

[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.

Member Avatar for Momerath
0
91
Member Avatar for hassanalisalama
Member Avatar for JamesCherrill

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.

Member Avatar for masijade
1
237
Member Avatar for nitin1

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.

Member Avatar for deceptikon
0
134
Member Avatar for gerard4143

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 …

Member Avatar for gerard4143
0
368
Member Avatar for Rishikeshan

@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 …

Member Avatar for Rishikeshan
0
272

The End.