Posts
 
Reputation
Joined
Last Seen
Ranked #301
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
26
Posts with Upvotes
20
Upvoting Members
19
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
11 Commented Posts
~53.5K People Reached
About Me

PhD student in Computer Science Education

Favorite Tags
Member Avatar for jozz3

The intent of C++ code is very simple, even though it doesn't compile. It simply takes the sum of the values in an array. When you understand the purpose of a program, it's much easier to port it, since you aren't blindly translating code. You really don't seem to show …

Member Avatar for Smartfitness33
0
8K
Member Avatar for mrgadgets

If you want to develop a game completely using C, the [Allegro library](http://alleg.sourceforge.net/) is a pretty comfortable choice. Other folks use engines like [SDL](http://www.libsdl.org/) and [OpenGL](http://www.opengl.org/) to power games. I find Allegro to be easier to get started with, since it's much easier to go from nothing to a graphical …

Member Avatar for DeanMSands3
0
163
Member Avatar for jbennet

Hi! I love the new site - very nice-looking. I got an issue when I tried to update my avatar - just look to the left and see. :P I'm on firefox 10.0.2 on Ubuntu LTS 10.04 with noscript disabled. I tried uploading pngs and jpgs between 50x50 and 100x100 …

Member Avatar for Airshow
0
2K
Member Avatar for IsharaComix

I've been unable to connect to the Daniweb IRC server for the past few days. Is it temporarily down? My life just doesn't feel complete unless I'm idling in there and not doing anything. :|

Member Avatar for blud
0
76
Member Avatar for caut_baia

This is an initiative I can definitely get behind. I've been idling there for over a year now, but things seem to have been picking up recently. Maybe there's hope after all. ;) /me changes his signature.

Member Avatar for royng
3
234
Member Avatar for IsharaComix

Recently, whenever I try to visit any user's profile here on DaniWeb, I get an ugly and intrusive browser dialog trying to push Flash on me. It's more than intrusive... it's very weirdly-worded. [quote] You need Adobe Flash Player 8 (or above) to view the charts. It is a free …

Member Avatar for WaltP
0
275
Member Avatar for rickster11

Your recursive method has no base cases. Even if they did, your entire program is written in tail recursion, so whenever you return to a previous point in the stack, you don't have any control there because the only time you make the recursive call is in a return statement. …

Member Avatar for pali185
0
941
Member Avatar for Dani

You know, since day one, I've tried to avoid looking at the reputation system as if it were some kind of a video game. It seems to be in bad taste and undermines the point of being part of the community. ... but this feature makes that [B][I]really[/I][/B] hard. I …

Member Avatar for peter_budo
3
671
Member Avatar for dspjm

On my system, this opens the 'nano' editor. To close out of nano, press 'Ctrl-x'. If you changed your command, then hit 'y' and Enter to save the changes. Once you exit, the command will run.

Member Avatar for dspjm
0
95
Member Avatar for jon.kiparsky

Out of your choices, I'd pick Nethack, but I've always been quite partial to [url=http://roguebasin.roguelikedevelopment.org/index.php?title=Dungeon_Crawl_Stone_Soup]Crawl[/url].

Member Avatar for Blazing Master
0
84
Member Avatar for coil

What version of Ubuntu are you using? If you're using a version that has 4.3 in the repositories, you will have a very hard time trying to upgrade it to 4.5. It might be easier to install a new version of Ubuntu than it is to upgrade the compiler.

Member Avatar for IsharaComix
0
150
Member Avatar for jaku78

So it looks like you're going out of the bounds of the array. Try to find out what the values of k and l are when the code fails. You could use the debugger, or just put a [icode]printf("%d %d\n,k,l);[/icode] before the if-statement and trace what the values are while …

Member Avatar for mitrmkar
0
144
Member Avatar for d00mhammers

OK, your function definitions are causing some errors for me. Whenever you are simply writing a function prototype, you use a semicolon. But when you are defining a function, you don't. [code] my_prototype( int a, char b ); my_function( int a ) { } [/code] After I did that, the …

Member Avatar for arnab sinha
0
310
Member Avatar for IsharaComix

Not sure where bug reports should go, so I'm posting mine in feedback. This morning when I logged in to DaniWeb, instead of getting the redirect page, I somehow obtained a 'login.php' file for the page instead. Opening the file in emacs, it contained (in this order): - A bunch …

Member Avatar for Dani
0
144
Member Avatar for florisvd

It looks like you have some code that's sitting outside of functions. For example, the switch statement that's between lines 17-30 is not contained within a function. You can't have code just sitting around like that. You've also got a function inside of another function... i2c_readbyte is inside of i2c_writebyte. …

Member Avatar for florisvd
0
2K
Member Avatar for kirennian

I remember having the same problem back when I was goofing off with OpenGL. I'm not sure how much it will help you, but I'll contribute this anyway. I wrote a brute-force method that allows me to rotate along any object's local axis, and then I can use that as …

Member Avatar for dineshguru
0
990
Member Avatar for alc6379

Happens to me every once in a while in Firefox on Ubuntu 9.04. Sometimes it goes away and sometimes it doesn't. It doesn't mess with my typing, though. Just thought I'd throw that out there.

Member Avatar for Dani
0
186
Member Avatar for turbomen

The path to the shell that is currently running in a terminal can be found in the 'SHELL' environment variable. You can run 'echo $SHELL', which, on my machine, prints out '/bin/bash'. Is this what you're looking for?

Member Avatar for IsharaComix
0
255
Member Avatar for Castiel1631

I'm assuming that 'student_file' is an array of strings? Do these changes help at all? [icode]11. sprintf(student_file[k], student_file, "%s %s %c", last, first, middle);[/icode] [icode]16. printf("%s\n", student_file[i]);[/icode] If they don't help, can you post your declaration of 'student_file'?

Member Avatar for IsharaComix
0
137
Member Avatar for Danny_501

My knowledge of signals is rusty, but here goes nothing... I think that after a handler is executed (in this cause, 'handleSIGCHLD'), the handle is released, and the function is no longer associated with the signal. Therefore, from inside the handler, you need to call the 'signal' function at the …

Member Avatar for Danny_501
0
109
Member Avatar for mrblippy

Here's a simple pseudocode solution. [code] boolean[10] array /* Array of all false values */ int count = 5 /* Number of true values we want */ while count > 0: int k = Math.random()*10 /* Random integer from 0 to 9, inclusive */ if array[k] == false: array[k] = …

Member Avatar for mrblippy
0
1K
Member Avatar for karthiken07

Double variables just don't have that much precision. If you need numbers that are that fine-tuned, you need to look for an "arbitrary/multiple precision" library - something like GMP [url]http://gmplib.org/[/url] Hope this helps.

Member Avatar for N1GHTS
0
163
Member Avatar for novice20

It's not really Python-specific, but I would use the 'tee' command here. On *nix, the invocation of the script would be [code] python myscript.py | tee out.txt [/code] I'm sure Windows has a similar command as well. Hope this helps.

Member Avatar for novice20
0
158
Member Avatar for gunjannigam

I changed your function in the following way: [CODE] public String parsePath(String path) { String parsedString=""; String[] arr = path.split("\\\\"); System.out.println(arr.length); for(int i=0;i<arr.length-1;i++) parsedString+=arr[i]+"/"; return parsedString; } [/CODE] The first change I made was to path.split. You will probably think that this looks pretty ridiculous. This function takes a regular …

Member Avatar for JamesCherrill
0
182
Member Avatar for gunneronaspooky

Your function 'slope' should return the value of 'm' when it finishes. [code] def slope(x1, y1, x2, y2): a = (float(y2 - y1)) b = (float(x2 - x1)) m = float(a / b) return m [/code]

Member Avatar for IsharaComix
0
168
Member Avatar for stranger_on_way

What platform are you compiling this on? Some compilers have built-in stack-smashing protection that would prevent this code from working as expected. If you're using GCC, for example, try the following command: [icode]gcc -fno-stack-protector programcode.c[/icode]

Member Avatar for IsharaComix
0
74
Member Avatar for SWEngineer

[icode]A*B[/icode] means 'A times B' [icode]A**B[/icode] means 'A to the power of B' Hope that helps you out.

Member Avatar for SWEngineer
0
76
Member Avatar for Danny_501

You're getting a timeval structure back. You need to do a little formatting before you can use it. Here are some highlights from the man page... [url]http://linux.die.net/man/3/localtime[/url] [LIST] [*] tm_year is the number of years since 1900... so add 1900 to your tm_year result. [*] tm_mon is the month where …

Member Avatar for IsharaComix
0
142
Member Avatar for insanely_sane

A Python for-loop is pretty much like Java's for-each loop, where instead of going through the loop with an incrementing value each time, you go over a list of values, instead. Here's a simple example. [code] classes = ["English","Math","History","Physics"] for s in classes: print s [/code] If you prefer the …

Member Avatar for insanely_sane
0
197
Member Avatar for revsin

[CODE] file.write ( "%-10s%6d" % (item[0], item[1]) ) ^ ^ [/CODE] Worked fine for me after I put these parentheses in.

Member Avatar for revsin
0
100