Forum: Coder's Corner Lounge
Sep 26th, 2007, 4:08 PM
|
|
Replies: 33
Views: 723
|
Forum: Python
Sep 26th, 2007, 4:06 PM
|
|
Replies: 6
Views: 267
|
Forum: C#
Jun 27th, 2007, 8:24 AM
|
|
Replies: 10
Views: 363
|
Forum: Python
Jun 15th, 2007, 2:01 PM
|
|
Replies: 8
Views: 280
|
Forum: Python
Jun 15th, 2007, 8:59 AM
|
|
Replies: 8
Views: 280
In Python, there are two types of variables:...
In Python, there are two types of variables: locals and globals. Locals are variables defined inside functions/methods without the 'global' keyword, ones at module level are global.
Just some code...
|
Forum: Python
Jun 14th, 2007, 12:32 PM
|
|
Replies: 9
Views: 527
|
Forum: Coder's Corner Lounge
Mar 12th, 2007, 3:32 PM
|
|
Replies: 10
Views: 315
|
Forum: Python
Mar 12th, 2007, 3:30 PM
|
|
Replies: 18
Views: 506
|
Forum: Python
Mar 12th, 2007, 3:27 PM
|
|
Replies: 9
Views: 527
|
Forum: Bash / Shell Scripting
Nov 18th, 2006, 3:01 AM
|
|
Replies: 9
Views: 649
you can create a script from any editor, so you...
you can create a script from any editor, so you could start an emacs from a csh or run an instance of SciTE on a remote computer and still write a bash script. 'bash' is the most commonly used shell,...
|
Forum: Bash / Shell Scripting
Nov 18th, 2006, 2:56 AM
|
|
Replies: 6
Views: 273
seams that you simply want to replace the ':'...
seams that you simply want to replace the ':' with a ','. This is best accomplished with sed (stream editor, has powerful regex capabilities...), so you make that last line
paste -d: temp1.fd...
|
Forum: Python
Oct 9th, 2006, 5:01 PM
|
|
Replies: 11
Views: 400
... and generator expressions are new in...
... and generator expressions are new in python2.4
luckily, python2.4 will enter debian stable soon (if etch is on time), which removes my last excuse to stick with python2.3 ;)
|
Forum: C
Sep 23rd, 2006, 5:06 AM
|
|
Replies: 9
Views: 370
If you want to target windows and unix, you...
If you want to target windows and unix, you should IMHO compile with gcc all the way or at least regularly test with gcc when developing on windows. If you want to write for unix on windows, using...
|
Forum: Other Programming Languages
Sep 23rd, 2006, 4:30 AM
|
|
Replies: 14
Views: 524
I'd like to recommend python over pascal since...
I'd like to recommend python over pascal since pascal is relatively dead outside teaching and I percieve python as easy and doesn't-get-into-your-way, but I don't have enough experience with pascal...
|
Forum: Python
Sep 23rd, 2006, 4:18 AM
|
|
Replies: 3
Views: 276
it looks good and fairly understandible at a...
it looks good and fairly understandible at a glance. But a relatively simple BBcode parser can also be written with regular expressions ;) Here is an incomplete set of BBCode->XHTML regexen in YAML...
|
Forum: Sed and Awk
Sep 5th, 2006, 6:58 AM
|
|
Replies: 3
Views: 535
|
Forum: Python
Jul 24th, 2006, 2:48 PM
|
|
Replies: 7
Views: 353
|
Forum: Python
Jul 14th, 2006, 10:47 AM
|
|
Replies: 18
Views: 252
vars() is just a copy of the local variables as...
vars() is just a copy of the local variables as changes do nothing. globals() gives you an object who's changes are propagated into the global namespace, but the deletition of a globals() output is...
|
Forum: Bash / Shell Scripting
Jul 14th, 2006, 10:10 AM
|
|
Replies: 5
Views: 303
|
Forum: Python
Jul 14th, 2006, 9:38 AM
|
|
Replies: 18
Views: 252
|
Forum: C++
Jul 12th, 2006, 3:35 PM
|
|
Replies: 7
Views: 360
|
Forum: C++
Jun 26th, 2006, 11:36 AM
|
|
Replies: 17
Views: 355
|
Forum: C++
Jun 26th, 2006, 7:22 AM
|
|
Replies: 26
Views: 505
by definition
(x[y] == *(x+y)) && (&x[y] ==...
by definition
(x[y] == *(x+y)) && (&x[y] == x+y)
is true for all pointers, so refering to a non-existant element is perfectly valid as long as the number doesn't cause an overflow. if you dereference...
|
Forum: C++
Jun 25th, 2006, 6:13 AM
|
|
Replies: 17
Views: 355
|
Forum: C++
Jun 24th, 2006, 12:35 PM
|
|
Replies: 22
Views: 410
system("\"C:/WINDOWS/system32/mrs.exe -d \""...
system("\"C:/WINDOWS/system32/mrs.exe -d \"" mrsName);
should be
system("\"C:/WINDOWS/system32/mrs.exe -d \"" + mrsName);
which will result in a runtime error as the executable does not exist; this...
|
Forum: C++
Jun 24th, 2006, 8:06 AM
|
|
Replies: 11
Views: 228
|
Forum: C++
Jun 24th, 2006, 5:10 AM
|
|
Replies: 23
Views: 347
|
Forum: C++
Jun 24th, 2006, 3:16 AM
|
|
Replies: 17
Views: 355
the code is unproblematic when none of the...
the code is unproblematic when none of the higlighted return statements is present. the code segfaults when it first encounters one of them.
return _curr_puzzle[y][x];
accessing _curr_puzzle[y][x]...
|
Forum: C++
Jun 24th, 2006, 2:44 AM
|
|
Replies: 17
Views: 355
I am pretty sure that it isn't that statement...
I am pretty sure that it isn't that statement either (all assignments to _curr_puzzle are value-checked from what I could see just now and that partucular statements is only invoked when there is a...
|
Forum: C++
Jun 23rd, 2006, 6:32 PM
|
|
Replies: 17
Views: 355
that's not it:
SudokuPuzzle::SudokuPuzzle()
: ...
that's not it:
SudokuPuzzle::SudokuPuzzle()
: _empty(9,std::vector<std::list<int> >(9,std::list<int>()))
// ...
_curr_puzzle = _empty;
// ...
thanks anyway
again, this happens in a destructor,...
|
Forum: C++
Jun 23rd, 2006, 4:34 PM
|
|
Replies: 17
Views: 355
empty std::list<int> destruction segfaults
I am working on a sudoku solver in c++ and have a problem that totally stumps me. I will start with the relevant code:
// part of header - for overview
class SudokuPuzzle
{
...
|
Forum: Coder's Corner Lounge
Jun 18th, 2006, 7:43 AM
|
|
Replies: 39
Views: 934
I personally own 2 (desktop and server), both...
I personally own 2 (desktop and server), both running debian gnu/linux most of the time. but the desktop has Windows and a bunch of other distros installed as well. there are 8 computers in the...
|
Forum: Coder's Corner Lounge
Jun 18th, 2006, 7:40 AM
|
|
Replies: 25
Views: 454
|
Forum: C++
Jun 1st, 2006, 7:37 AM
|
|
Replies: 9
Views: 276
which edition of Stroustrup ?
I have the third...
which edition of Stroustrup ?
I have the third edition open in front of me, in the STL chapter. the first one definately doesn't and I don't think the second one does.
oh, and don't try learning...
|
Forum: C++
Jun 1st, 2006, 7:26 AM
|
|
Replies: 13
Views: 330
never tried Code::Blocks, but my copy has a big...
never tried Code::Blocks, but my copy has a big play triangle that looks right. And there is "Run" in the "Build" menu. both possibilities seam to be very near a builing button. How more obvious can...
|
Forum: C++
May 31st, 2006, 6:41 AM
|
|
Replies: 10
Views: 394
|
Forum: C++
May 30th, 2006, 4:35 PM
|
|
Replies: 27
Views: 729
I just found this:...
I just found this: http://jcatki.no-ip.org/fncpp/C%2B%2B_Dev_tools
I'll be taking a look at Code::Blocks...
|
Forum: C
May 30th, 2006, 7:20 AM
|
|
Replies: 1
Views: 148
|
Forum: C++
May 30th, 2006, 7:13 AM
|
|
Replies: 2
Views: 174
|
Forum: C++
May 29th, 2006, 4:43 PM
|
|
Replies: 25
Views: 642
|