Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Showing results 1 to 40 of 58
Search took 0.01 seconds.
Search: Posts Made By: free-zombie
Forum: Coder's Corner Lounge Sep 26th, 2007, 4:08 PM
Replies: 33
Views: 723
Posted By free-zombie
That beauty should easily run vi and, every now...

That beauty should easily run vi and, every now and again, a C compiler. What else would I need to code ? ;-)
Forum: Python Sep 26th, 2007, 4:06 PM
Replies: 6
Views: 267
Posted By free-zombie
If you want to check whether any data can be...

If you want to check whether any data can be read, the select (http://docs.python.org/lib/module-select.html) module is what you're looking for.
Forum: C# Jun 27th, 2007, 8:24 AM
Replies: 10
Views: 363
Posted By free-zombie
I don't know how it's done in C# with whatever...

I don't know how it's done in C# with whatever MySQL API you're using, but this is the same thing in python:

cursor.execute('insert into profilet (id, firstn, lastn) values (%s, %s, %s)',...
Forum: Python Jun 15th, 2007, 2:01 PM
Replies: 8
Views: 280
Posted By free-zombie
I think I explained that in my code. You might...

I think I explained that in my code. You might want to read it carefully, especially lines 3, 4 and 6.
Forum: Python Jun 15th, 2007, 8:59 AM
Replies: 8
Views: 280
Posted By free-zombie
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
Posted By free-zombie
modwsgi ? Thanks for linking it, that rocks . I...

modwsgi ? Thanks for linking it, that rocks . I myself mostly use WSGI in combination with FastCGI (via flup) and lighttpd..
Forum: Coder's Corner Lounge Mar 12th, 2007, 3:32 PM
Replies: 10
Views: 315
Posted By free-zombie
an email address with a constant flood of genuine...

an email address with a constant flood of genuine spam is VERY useful for training spamassassin.

tjollans@jollybox.de
Forum: Python Mar 12th, 2007, 3:30 PM
Replies: 18
Views: 506
Posted By free-zombie
"%" can be expressed with...

"%" can be expressed with <b>e-2</b>.
Forum: Python Mar 12th, 2007, 3:27 PM
Replies: 9
Views: 527
Posted By free-zombie
you're really missingt WSGI there - it's...

you're really missingt WSGI there - it's undoubtedly the way to build python web apps now and in future (can be run with fastcgi, cgi, mod_python, alone, etc etc)
Forum: Bash / Shell Scripting Nov 18th, 2006, 3:01 AM
Replies: 9
Views: 649
Posted By free-zombie
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
Posted By free-zombie
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
Posted By free-zombie
... 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
Posted By free-zombie
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
Posted By free-zombie
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
Posted By free-zombie
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
Posted By free-zombie
use sed -i (edit in-place)

use sed -i
(edit in-place)
Forum: Python Jul 24th, 2006, 2:48 PM
Replies: 7
Views: 353
Posted By free-zombie
I have used the MySQLdb module. It's s...

I have used the MySQLdb module. It's s straightforward SQL-centric module complying with the pyhon DB API 2. It works for me.
No idea about performance
Forum: Python Jul 14th, 2006, 10:47 AM
Replies: 18
Views: 252
Posted By free-zombie
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
Posted By free-zombie
you should rely on the narion part of the locale,...

you should rely on the narion part of the locale, i.e.
% echo $LANG | sed 's/.._\(..\).*/\1/'

note: I am in Germany and use en_GB.UTF-8 and have used en_US.ISO-8859-1 in the past. Meaning: you...
Forum: Python Jul 14th, 2006, 9:38 AM
Replies: 18
Views: 252
Posted By free-zombie
*args is more like va_list with friends.

*args is more like va_list with friends.
Forum: C++ Jul 12th, 2006, 3:35 PM
Replies: 7
Views: 360
Posted By free-zombie
you might want to look at existing...

you might want to look at existing implementation, e.g. use libgaim for that.
Forum: C++ Jun 26th, 2006, 11:36 AM
Replies: 17
Views: 355
Posted By free-zombie
Thanks, The Dark. note to self: if you want to...

Thanks, The Dark.
note to self: if you want to change sequences, ask the sequence to change.
Forum: C++ Jun 26th, 2006, 7:22 AM
Replies: 26
Views: 505
Posted By free-zombie
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
Posted By free-zombie
The Dark: thanks for trying it. I have attached a...

The Dark: thanks for trying it. I have attached a modified version which can be used without a GUI. (it reads a sudoku as in sudoku1.txt or hardsudoku.txt from stdin and writed the solved sudoku to...
Forum: C++ Jun 24th, 2006, 12:35 PM
Replies: 22
Views: 410
Posted By free-zombie
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
Posted By free-zombie
Mac has traditionally used \r instead of \n - so...

Mac has traditionally used \r instead of \n - so maybe OSX has the distinction.
DaWei: you should mention somwhere to use namespace std for that code. apart from that, _open etc are not standard I...
Forum: C++ Jun 24th, 2006, 5:10 AM
Replies: 23
Views: 347
Posted By free-zombie
type *foo; has tradition in C; I use type*...

type *foo;

has tradition in C; I use

type* foo

as I want to declare foo of type pointer-to-type - the * logically belongs to the type.
Forum: C++ Jun 24th, 2006, 3:16 AM
Replies: 17
Views: 355
Posted By free-zombie
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
Posted By free-zombie
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
Posted By free-zombie
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
Posted By free-zombie
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
Posted By free-zombie
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
Posted By free-zombie
gentoo is a really good distro, but compiling...

gentoo is a really good distro, but compiling everything just ain't my cup'a'tee
Forum: C++ Jun 1st, 2006, 7:37 AM
Replies: 9
Views: 276
Posted By free-zombie
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
Posted By free-zombie
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
Posted By free-zombie
as an STL function, std::swap probably expects...

as an STL function, std::swap probably expects iterators...
Forum: C++ May 30th, 2006, 4:35 PM
Replies: 27
Views: 729
Posted By free-zombie
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
Posted By free-zombie
froma programmer point of view the internet and...

froma programmer point of view the internet and the LAN are equal. Assuming you use sockets that is.
for people to be able to connect, you must make sure they can get your IP address (dymanic DNS...
Forum: C++ May 30th, 2006, 7:13 AM
Replies: 2
Views: 174
Posted By free-zombie
TCP/IP is the same no matter if you are on the...

TCP/IP is the same no matter if you are on the internet or a LAN - on the internet you need open ports somewhere though (on the LAN as well, but it's easier there)
Forum: C++ May 29th, 2006, 4:43 PM
Replies: 25
Views: 642
Posted By free-zombie
int bind(int sockfd, const struct sockaddr...

int bind(int sockfd, const struct sockaddr *my_addr, socklen_t
addrlen);
is this what you need ?
Showing results 1 to 40 of 58

 
Forum Jump



DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:40 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC