Forum: PHP
Jul 2nd, 2008, 10:48 PM
|
|
Replies: 6
Views: 85
Re: easy way to find the line number
There are a variety of free editors out there, and (arguably) every single one of them is better than notepad. Here are just a few I've used over the years, in no particular order:
Notepad++...
|
Forum: Coder's Corner Lounge
Jun 26th, 2008, 11:58 PM
|
|
Replies: 7
Views: 127
Re: Ubuntu 8.04 Questions.
Well, like the error says, at some point you probably interrupted an update. The message also helpfully tells you how to fix it, by running dpkg --configure -a. Do that, then try again.
|
Forum: Visual Basic .NET
Jun 19th, 2008, 7:00 PM
|
|
Replies: 3
Views: 147
|
Forum: Other Programming Languages
Jan 18th, 2008, 7:34 PM
|
|
Replies: 8
Views: 331
|
Forum: PHP
Jan 17th, 2008, 11:07 AM
|
|
Replies: 5
Views: 222
|
Forum: PHP
Jan 14th, 2008, 1:32 AM
|
|
Replies: 3
Views: 210
|
Forum: Coder's Corner Lounge
Jan 1st, 2008, 10:09 PM
|
|
Replies: 28
Views: 608
|
Forum: HTML / XHTML / CSS
Dec 22nd, 2007, 8:55 PM
|
|
Replies: 1
Views: 227
|
Forum: Python
Dec 5th, 2007, 10:20 AM
|
|
Replies: 6
Views: 452
Re: Object-Oriented Habits
For now its mostly just style, though old-style classes will be gone in 3.0.
New style-classes are mostly useful for the descriptor protocol and some meta-class goodness, neither of which you need...
|
Forum: Python
Dec 4th, 2007, 6:27 PM
|
|
Replies: 6
Views: 452
Re: Object-Oriented Habits
Personally, I think it depends on the program. If the two inheriting classes would be implemented substantially differently, then definitely go with inheritance. If the differences are fairly small,...
|
Forum: Python
Nov 27th, 2007, 4:38 AM
|
|
Replies: 2
Views: 189
Re: Question Number 2 - printTwice
Because, presumably, you haven't defined printTwice in that script / interactive session. My guess is you're reading a bit too fast and missed something like:
def printTwice(arg):
print arg
...
|
Forum: Coder's Corner Lounge
Nov 26th, 2007, 5:47 PM
|
|
Replies: 10
Views: 418
Re: Think
If thats the case, its a solution to a problem that should not have existed in the first place. And if you did have to solve it, you could use a one line regex instead of some big ugly behemoth.
|
Forum: Coder's Corner Lounge
Nov 25th, 2007, 5:03 AM
|
|
Replies: 10
Views: 418
Re: Think
It was on The Daily WTF (http://worsethanfailure.com/Articles/Taking-a-Good-Thing-Too-Far.aspx) earlier this month. Great blog.
Edit: Oh, right, its called "Worse Than Failure" now. I liked the old...
|
Forum: Coder's Corner Lounge
Nov 7th, 2007, 5:50 AM
|
|
Replies: 7
Views: 347
Re: Entertaining read
Some quick googling reveals that computer in the story cost $47,000 in 1957 dollars (The equivalent of $341,819 today!)
It used 31 bit words, and the drum could store 4096 of them, for a grand total...
|
Forum: Perl
Nov 6th, 2007, 11:30 PM
|
|
Replies: 5
Views: 626
Re: 1 line if code blocks; easier to read
Huh... Apparently I've just revived a long, long dead thread. How in the world did I get here? I was just on the front page....
Weird.
Sorry, everybody! :icon_redface:
|
Forum: Perl
Nov 6th, 2007, 11:26 PM
|
|
Replies: 5
Views: 626
Re: 1 line if code blocks; easier to read
Lance: Its probably not a common pet peeve, but i *hate* those if statements, because they hide the condition. If you need to make a change to someone else's code and you're reading it quickly its...
|
Forum: Visual Basic
Oct 29th, 2007, 8:40 PM
|
|
Replies: 1
Views: 228
Re: How to dubug DLL?
A DLL is really just a dynamically loaded library of functions, they can't really be run alone. You'd probably have to write some code that loads the functions from the DLL and does whatever testing...
|
Forum: Existing Project Development
Oct 29th, 2007, 8:38 PM
|
|
Replies: 1
Views: 317
Re: Cheap TrackIr?
Well, if you're doing it yourself, I'd recommend you do it in Python. The VideoCapture module (http://videocapture.sourceforge.net/) makes capturing images from a webcam pretty darn easy (a bit slow...
|
Forum: Python
Oct 11th, 2007, 12:38 PM
|
|
Replies: 8
Views: 1,067
I took a quick stab at it. I'm not done, but...
I took a quick stab at it. I'm not done, but heres a strategy I was working on.
First, find the maximum value for x (by minimizing y) and then a max value for y (by minimizing x)
to find the max...
|
Forum: Coder's Corner Lounge
Oct 3rd, 2007, 3:46 AM
|
|
Replies: 3
Views: 120
|
Forum: C++
Oct 2nd, 2007, 9:09 PM
|
|
Replies: 6
Views: 312
truBlu:
I quite like the problems on...
truBlu:
I quite like the problems on projecteuler.net.
Many of them are trivial to brute-force, but writing efficient algorithms to solve some of them can be quite a challenge. Do some of them, and...
|
Forum: C
Oct 1st, 2007, 12:10 AM
|
|
Replies: 12
Views: 430
|
Forum: Assembly
Sep 30th, 2007, 11:56 PM
|
|
Replies: 1
Views: 293
EAX, EBX, ECX, EDX, EBP, ESP, ESI, and EDI are...
EAX, EBX, ECX, EDX, EBP, ESP, ESI, and EDI are all "general purpose" 32-bit registers. AX, BX, CX and DX are the lower 16 bits of EAX, EBX, etc, etc.
Just as AX is the lower 16 bits of EAX, AH is the...
|
Forum: Assembly
Sep 30th, 2007, 11:50 PM
|
|
Replies: 17
Views: 933
|
Forum: C
Sep 30th, 2007, 11:44 PM
|
|
Replies: 12
Views: 430
You could use conio.h, though thats a pretty...
You could use conio.h, though thats a pretty crufty old library.
The easiest way to do what you're talking about, though, is through something like curses, though you'll have to get over not using...
|
Forum: C
Sep 28th, 2007, 2:33 AM
|
|
Replies: 4
Views: 197
|
Forum: Coder's Corner Lounge
Sep 28th, 2007, 2:29 AM
|
|
Replies: 17
Views: 555
I tend to keep major milestones on my calendar,...
I tend to keep major milestones on my calendar, with per-project TODO lists as well.
In code, I tend to throw together skeletons for stuff that needs to be done, and label it with a TODO: tag so i...
|
Forum: HTML / XHTML / CSS
Sep 24th, 2007, 9:32 PM
|
|
Replies: 2
Views: 249
In general, combining divs and tables can be...
In general, combining divs and tables can be pretty nasty. If you're using the table for layout purposes (and not to display tabular information, like tables were designed for) you should probably...
|
Forum: C++
Jul 25th, 2007, 4:29 PM
|
|
Replies: 4
Views: 164
|
Forum: Python
Jul 11th, 2007, 2:11 AM
|
|
Replies: 12
Views: 419
|
Forum: Project Ideas
Mar 27th, 2007, 8:05 PM
|
|
Replies: 14
Views: 604
Ooble
OK, to replace iTunes, you need to:
1....
Ooble
OK, to replace iTunes, you need to:
1. make it easy to use. iTunes is in serious need of functionality, but the tiny amount of features it does have are very easy to get your head around and...
|
Forum: C
Mar 26th, 2007, 7:39 PM
|
|
Replies: 21
Views: 586
You can also pull true random numbers from...
You can also pull true random numbers from random.org's (http://www.random.org) via HTTP, SOAP, or CORBA, if you don't have a hardware random number generator. One of the things on my project list is...
|
Forum: Project Ideas
Mar 26th, 2007, 7:33 PM
|
|
Replies: 14
Views: 604
|
Forum: Python
Mar 21st, 2007, 3:41 PM
|
|
Replies: 19
Views: 717
|
Forum: Python
Mar 20th, 2007, 2:29 PM
|
|
Replies: 19
Views: 717
i've used Eclipse, IDLE, SPE, and emacs... and so...
i've used Eclipse, IDLE, SPE, and emacs... and so far my favorite is emacs. SPE is really good, though, if you're into the feature-bloated IDE thing. For minor editing, i use emacs, but the tools it...
|
Forum: Python
Mar 19th, 2007, 7:58 AM
|
|
Replies: 21
Views: 497
|
Forum: Java
Dec 12th, 2006, 4:53 PM
|
|
Replies: 6
Views: 157
|
Forum: Software Design and Algorithms
Oct 1st, 2006, 12:04 AM
|
|
Replies: 36
Views: 2,771
For your edu-tainment, I present,...
For your edu-tainment, I present, BOGOSORT!
(Implemented (badly) in Java for extra points!)
import java.util.Random;
public class Bogosort {
public static void main(String[] args) {
int[]...
|
Forum: Coder's Corner Lounge
Jan 31st, 2006, 9:28 AM
|
|
Replies: 10
Views: 361
|
Forum: Existing Project Development
Jan 10th, 2006, 1:40 AM
|
|
Replies: 8
Views: 196
|