Programming Forums
User Name Password Register
 

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

Showing results 1 to 40 of 500
Search took 0.08 seconds.
Search: Posts Made By: Jessehk
Forum: C++ Jul 4th, 2008, 9:00 AM
Replies: 3
Views: 111
Posted By Jessehk
Re: do while loop error or not

I know this isn't related to your problem, but have you considered using std::string's and C++ methods of converting strings?

I usually do something like this when I encounter this sort of thing in...
Forum: Software Design and Algorithms Jul 2nd, 2008, 11:17 PM
Replies: 11
Views: 251
Posted By Jessehk
Re: Sane's Monthly Algorithms Challenge #3 [07-08]

Yay! I think I've got the ideal algorithm at this point. Thanks for the interesting test case Sane. :)

Here's another test case. It's nothing special, I figure it'll help somebody.

6...
Forum: Software Design and Algorithms Jul 2nd, 2008, 5:53 PM
Replies: 11
Views: 251
Posted By Jessehk
Re: Sane's Monthly Algorithms Challenge #3 [07-08]

I was so proud that I had a working algorithm and now you've gone and crushed my spirits. ;)

Are we supposed to be able to handle that? :-O
Forum: Software Design and Algorithms Jul 2nd, 2008, 5:27 PM
Replies: 11
Views: 251
Posted By Jessehk
Re: Sane's Monthly Algorithms Challenge #3 [07-08]

Anyone want to share test cases (pipe maps) for the advanced problem?
Forum: C Jul 2nd, 2008, 11:47 AM
Replies: 5
Views: 177
Posted By Jessehk
Re: syntax error before printf

There are two big problems with your code.

1) You have no notion of "standard" indenting and block practises so it is almost completely unreadable.

2) You have several misunderstandings of how the...
Forum: Software Design and Algorithms Jul 1st, 2008, 11:26 PM
Replies: 11
Views: 251
Posted By Jessehk
Re: Sane's Monthly Algorithms Challenge #3 [07-08]

There is a particular algorithm that Boost offers that would really help in the Junior class. Do you have Boost installed?

EDIT: Nevermind; ignore the question. I'll keep my post intact for clarity,...
Forum: C++ Jun 30th, 2008, 10:10 PM
Replies: 8
Views: 138
Posted By Jessehk
Re: Declaration of ‘Class’ with no type

It looks like you need to get rid of the pointer dereference (the *) when you access the specific piece on the board.
Forum: C Jun 29th, 2008, 9:12 PM
Replies: 10
Views: 295
Posted By Jessehk
Re: Errors with realloc() w.r.t. writing managing shared memory

Thanks for that (very) in-depth reply. It looks like something I can have fun with over the next few days (do I need a new hobby? ;)).
Forum: C++ Jun 29th, 2008, 3:24 PM
Replies: 3
Views: 100
Posted By Jessehk
Re: segmentation fault with sprintf

This little snippet works perfectly:

#include <stdio.h>

char buff[256];

int main( void ) {
int lines = 10;

sprintf( buff, "lines: %d", lines );
Forum: C Jun 29th, 2008, 9:07 AM
Replies: 10
Views: 295
Posted By Jessehk
Re: Errors with realloc() w.r.t. writing managing shared memory

That sounds interesting. Could you post a quick example with an int or something? I'm having a little difficulty understanding exactly what you mean. :)
Forum: C Jun 28th, 2008, 11:46 AM
Replies: 10
Views: 295
Posted By Jessehk
Re: Errors with realloc() w.r.t. writing managing shared memory

Thanks for the replies all of you. Is there an easy to fix this situation?

The first thought I had was that I have to "re-map" the nodes of the data structure on to the new memory block -- but then...
Forum: C Jun 26th, 2008, 11:42 PM
Replies: 10
Views: 295
Posted By Jessehk
Errors with realloc() w.r.t. managing shared memory

I have some free time now between high school and University so naturally I'm killing it by playing around with C unnecessarily. ;)

Just for the hell of it, I'm trying to write some code that will...
Forum: Coder's Corner Lounge Jun 26th, 2008, 8:47 PM
Replies: 7
Views: 127
Posted By Jessehk
Re: Ubuntu 8.04 Questions.

If I remember correctly, the package for Flash is flashplugin-nonfree.

In that case, the command to run would be

sudo aptitude update


to first update the repositories and then

sudo aptitude...
Forum: Coder's Corner Lounge Jun 21st, 2008, 10:25 AM
Replies: 15
Views: 298
Posted By Jessehk
Re: Engaged!

Congratulations! :)
Forum: Other Programming Languages Jun 17th, 2008, 11:23 AM
Replies: 18
Views: 564
Posted By Jessehk
Re: D Programing Language-To replace C/C++?

I was initially smitten by D (as grumpy can attest to), but I've lost most of my interest in it.
While it offers some very nice solutions to C++, it is plagued by 3 things in my opinion:

1)...
Forum: C++ Jun 17th, 2008, 11:17 AM
Replies: 9
Views: 296
Posted By Jessehk
Re: Starting C++ GUI Programming

My vote goes for Qt. It's extremely well documented, it 100% cross-platform, and very easy to use (from a programmer's perspective).

I'm not the biggest fan of C++, but I'd use it just to use Qt....
Forum: Other Programming Languages Jun 12th, 2008, 9:22 PM
Replies: 3
Views: 173
Posted By Jessehk
Re: Learning haskell

Could you expand on what doesn't work with foldl? Are you getting incorrect results? Compile errors? I'm a novice with Haskell (too much like a puzzle, IMHO), but I know a little bit.

Here's some...
Forum: Coder's Corner Lounge Jun 7th, 2008, 9:59 AM
Replies: 16
Views: 551
Posted By Jessehk
Re: Who is your favorite PFO MemBer?

No love for Zoidberg...


;)
Forum: Coder's Corner Lounge Jun 6th, 2008, 7:35 AM
Replies: 5
Views: 160
Posted By Jessehk
Re: Programmers and their cats

http://youtube.com/watch?v=mHXBL6bzAR4
Forum: Software Design and Algorithms Jun 1st, 2008, 3:34 PM
Replies: 6
Views: 218
Posted By Jessehk
Re: SMAC #1 [05-08] - Results

Damn. :)

Now I just want to know why I got the first one wrong for the junior level problem. I'm still happy with 100/100 and 90/100.

I'm assuming you wrote a program to do all the evaluations/keep...
Forum: Coder's Corner Lounge May 30th, 2008, 10:19 PM
Replies: 11
Views: 338
Posted By Jessehk
Re: Ubuntu- which flavor?

They're all very similar. AFAIK, they only differ by the desktop environment (DE) they use.

Any choice would likely work equally well, though normal Ubuntu (which uses Gnome as the DE) is the most...
Forum: Coder's Corner Lounge May 30th, 2008, 10:17 PM
Replies: 16
Views: 490
Posted By Jessehk
Re: Yeeaaaah! I did it!!

Sounds amazing. I'm sure you'll make us proud, eh?

Did you get my submission email, oh C.S. master? ;)
Forum: C++ May 28th, 2008, 6:00 PM
Replies: 4
Views: 200
Posted By Jessehk
Re: Classes : Using data from outside the class

Well, I'm not too familiar with design patterns and such, but what you're describing doesn't sound like a typical solution.

Without you actually posting code, my question would be: Why are you...
Forum: Bash / Shell Scripting May 25th, 2008, 9:38 AM
Replies: 2
Views: 149
Posted By Jessehk
Re: if condition and grep

#!/bin/bash

if grep "found" "example.sh" > /dev/null; then
echo "Found"
else
echo "Not found"
fi
Forum: C May 22nd, 2008, 8:22 PM
Replies: 9
Views: 389
Posted By Jessehk
Re: Implement a queue using share memory?

In the time you wrote that sentence, you could have scrolled up three posts and checked for yourself. Congratulations.
Forum: C May 19th, 2008, 11:27 AM
Replies: 9
Views: 389
Posted By Jessehk
Re: Implement a queue using share memory?

I'm not entirely sure, but it might mean that instead of allocating memory on the heap for every node in the queue, that you instead allocate a "pool" of memory for the whole structure and assign...
Forum: Software Design and Algorithms May 3rd, 2008, 2:29 PM
Replies: 31
Views: 1,423
Posted By Jessehk
Re: Sane's Monthly Algorithms Challenge #1 [05-08]

Ah, sorry. One more question.

Can I write C99 (with stuff like stdbool.h, variables declared inside for loops, etc) or should I stick with C89?

Oh, and thanks for putting so much work into this,...
Forum: Software Design and Algorithms May 3rd, 2008, 2:14 PM
Replies: 31
Views: 1,423
Posted By Jessehk
Re: Sane's Monthly Algorithms Challenge #1 [05-08]

Sane, I have a question. In the beginner class, you state that



Which to me implies that n must decrease by one except when it is prime. But your sample data seems to indicate otherwise.

For...
Forum: Software Design and Algorithms May 3rd, 2008, 1:40 PM
Replies: 31
Views: 1,423
Posted By Jessehk
Re: Sane's Monthly Algorithms Challenge #1 [05-08]

PDF's instead of DOC's please. :)

EDIT: Also, while I've been programming for a while, I haven't had a lot of competition experience. I'll probably write the first two "classes" only.
Forum: C++ Apr 29th, 2008, 11:31 PM
Replies: 2
Views: 140
Posted By Jessehk
Re: Cannot Function C++ Linked List

Your code as it stands is very confusing to me, but that may just be because it's midnight where I am.

At the moment, your player class contains a list of players. What that means is that every...
Forum: C++ Apr 28th, 2008, 4:19 PM
Replies: 6
Views: 261
Posted By Jessehk
Re: initilizer incmplete type

Jabo, the const there indicates that when the method is called, it does not modify the object.
Forum: C++ Apr 27th, 2008, 10:13 AM
Replies: 9
Views: 300
Posted By Jessehk
Re: Returning to the main function from another

#include <iostream>
#include <cmath>
#include <stdlib.h>


using namespace std;

void Sobiranje()
{
float v_broj,rezultat=0;
Forum: C++ Apr 26th, 2008, 3:27 PM
Replies: 9
Views: 300
Posted By Jessehk
Re: Returning to the main function from another

The best analogy I can come up with regarding this is like digging a hole.
When you call a function, you dig a hole into the ground. To get back to where you started, you have to climb out of the...
Forum: C++ Apr 26th, 2008, 7:50 AM
Replies: 9
Views: 300
Posted By Jessehk
Re: Returning to the main function from another

In your Sobiranje() function, to return to main(), just replace your return main() code (which makes absolutely no sense :)) with a return statement.

If you'd like to know why, I (or someone else...
Forum: Python Apr 25th, 2008, 10:20 PM
Replies: 12
Views: 437
Posted By Jessehk
Re: I am looking for

We will help you, but you seem to think that "help[ing] me" is the same as "writing my programs for me".

We can help you by explaining fundamental concepts if they are unclear, by clarifying the...
Forum: Python Apr 19th, 2008, 6:01 PM
Replies: 2
Views: 163
Posted By Jessehk
Re: Invalid Syntax error

On line 29, you don't use a closing ')'. Post the actual error next time please. :)

http://pastebin.com/m2c434db5
Forum: C Apr 19th, 2008, 11:15 AM
Replies: 4
Views: 271
Posted By Jessehk
Re: stdio.h what language is it

Any header files used by C (stdio.h, math.h, stdlib.h, string.h, etc) are all written in C. Where you might be getting confused is that most implementations of the C standard library that I've seen...
Forum: C Apr 15th, 2008, 7:03 AM
Replies: 5
Views: 248
Posted By Jessehk
Re: port scan detection

I don't know anything about this, but if I wanted to, I would look at the source for nmap. nmap is a fairly popular port-scanner for (Li, U)nix and you might get some ideas from it.
Forum: Python Apr 14th, 2008, 8:08 PM
Replies: 5
Views: 328
Posted By Jessehk
Re: 'C'oo'P'eration!

I had heard about Lua through an article and I had never done any extending or embedding before so I thought I'd try something.

Lua is extremely light, both in terms of memory footprint and standard...
Forum: Python Apr 8th, 2008, 4:57 PM
Replies: 5
Views: 328
Posted By Jessehk
Re: 'C'oo'P'eration!

http://docs.python.org/ext/ext.html
http://www.boost.org/doc/libs/1_35_0/libs/python/doc/index.html
Showing results 1 to 40 of 500

 
Forum Jump



DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:10 AM.

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