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: The Dark
Forum: Java Yesterday, 1:59 AM
Replies: 18
Views: 193
Posted By The Dark
Re: GUI problem.

I would have done it with a variable flag, same as you. There may be a proper way to switch off the PropertyChangeEvent firing altogether, but I don't know of it. I hadn't even heard of a...
Forum: Java Yesterday, 1:12 AM
Replies: 18
Views: 193
Posted By The Dark
Re: GUI problem.

What about putting another text output next to (or below) the field and put the error message in that? It would be very frustrating to type in a team name, accidently transpose two letters, then have...
Forum: Java Jul 22nd, 2008, 10:22 PM
Replies: 18
Views: 193
Posted By The Dark
Re: GUI problem.

This page: http://java.sun.com/developer/JDCTechTips/2005/tt0518.html#1 shows how to use an InputVerifier to check the contents of a field before allowing you to move off it. It might do what you...
Forum: Java Jul 22nd, 2008, 5:32 PM
Replies: 18
Views: 193
Posted By The Dark
Re: GUI problem.

Don't print out the source - you already know that it is teamField1, use the getPropertyName() method on the PropertyChangeEvent to get the property name.
Forum: PHP Jul 22nd, 2008, 8:42 AM
Replies: 3
Views: 56
Posted By The Dark
Re: Could use some suggestions for improvement

I wouldn't be too concerned with the calculation speed, as most of the time will be spent doing the read. You could move the bcdiv calculation out of the loop, so it is only calculated once.
Having...
Forum: Java Jul 21st, 2008, 7:41 PM
Replies: 18
Views: 193
Posted By The Dark
Re: GUI problem.

I'd say that the problem is that the property that is changing isn't the value - it is one of the other properties (probably the "focusable Window state", but it could be the font, or the foreground...
Forum: Software Design and Algorithms Jul 1st, 2008, 7:55 PM
Replies: 1
Views: 121
Posted By The Dark
Re: SMAC #2 [06-08] - Results

Ahh, forgot to enter again!
Nice work Sane, the SMAC is interesting to read, even if I keep forgetting to enter.
Forum: C Jun 27th, 2008, 9:30 AM
Replies: 10
Views: 347
Posted By The Dark
Re: Errors with realloc() w.r.t. writing managing shared memory

After your call to realloc, your original memory area may have been moved (if realloc couldn't extend the original block). If this happened in your second ALLOC call in your main() this would mean...
Forum: C Jun 21st, 2008, 9:36 PM
Replies: 6
Views: 302
Posted By The Dark
Re: Correct use of malloc?

One problem I can see is that the realloc call might change the location of the allocated memory - it does this if it can't grow the memory in-place.
This will mean that your "dest" variable now...
Forum: C Jun 18th, 2008, 9:43 PM
Replies: 6
Views: 302
Posted By The Dark
Re: Correct use of malloc?

This code

buffer = (char *) realloc(buffer, sizeof(buffer) + sizeof(char));

won't work, because sizeof(buffer) is the size of the buffer pointer, not the size of the memory that is allocated....
Forum: Java Jun 12th, 2008, 7:10 PM
Replies: 1
Views: 160
Posted By The Dark
Re: Ordered Linked List

If you want OrderedLinkedList class to have the methods from the LinkedList class you would have to inherit from that class.
Forum: C# Jun 12th, 2008, 6:54 PM
Replies: 4
Views: 202
Posted By The Dark
Re: Thread.AllocateNamedDataSlot

From this link http://msdn.microsoft.com/en-us/library/system.threading.thread.allocatenameddataslot.aspx
it says

So it looks like each thread gets its own data.
Forum: C# Jun 9th, 2008, 1:45 AM
Replies: 3
Views: 202
Posted By The Dark
Re: Relative File References

Oops, my bad - didn't notice the forum :(

Maybe the second part of my reply is still valid.
Forum: C# Jun 8th, 2008, 5:49 PM
Replies: 3
Views: 202
Posted By The Dark
Re: Relative File References

You need to use \\ to put a backslash into a hard coded string in c++. Otherwise the \ character is used to escape the next character on.

string ErrorFile = @"..\\Logs\\Error.log";


Also note that...
Forum: C Jun 2nd, 2008, 5:28 PM
Replies: 2
Views: 176
Posted By The Dark
Re: Need help getting an API app started/working

You should return TRUE in your callback function when you handle a message, this might be causing the problem, as Windows thinks you haven't handled the INITDIALOG message.
You can use GetLastError...
Forum: Other Scripting Languages May 30th, 2008, 8:35 PM
Replies: 2
Views: 165
Posted By The Dark
Re: [Batch] Wait until an operation is complete

Is convert.exe a console program? If so, just take the "start" out from in front of it.
If it is a GUI program, then I don't think you can wait for it to finish.
Forum: Coder's Corner Lounge May 25th, 2008, 6:51 AM
Replies: 3
Views: 252
Posted By The Dark
Re: Want to know about the company before joining!!!

Yes, I think this thread leads me to think that one company I definitely do not want to work for is Pastjob.
Forum: PHP May 25th, 2008, 6:44 AM
Replies: 4
Views: 236
Posted By The Dark
Re: Strange fopen Problem

In the first one your are getting the file size before you open the file again, in the second you open the file for reading before you get the file size. I suspect there that the write isn't being...
Forum: C May 7th, 2008, 8:23 AM
Replies: 6
Views: 271
Posted By The Dark
Re: Setting up

Yes, you can use printf in c++.
Forum: C May 5th, 2008, 7:00 PM
Replies: 11
Views: 478
Posted By The Dark
Re: Help!!!!!!!!!!!

See my reply in your other thread.
Forum: C May 5th, 2008, 6:57 PM
Replies: 6
Views: 271
Posted By The Dark
Re: Setting up

pthread.h is a posix (linux/unix) include file. It is not included in Visual C++. For threading under Visual C++, you would need to use something like the _beginthreadex function, which is in...
Forum: Coder's Corner Lounge Apr 30th, 2008, 12:37 AM
Replies: 16
Poll: Star Trek
Views: 518
Posted By The Dark
Re: Star Trek

Wow, it must be dredge up old thread day!
Forum: C++ Apr 30th, 2008, 12:24 AM
Replies: 3
Views: 222
Posted By The Dark
Re: array issue

In your Fill_Array function, you don't set the number_used variable to the number of items found.

In your print_array function:

void Print_Array(int Size[], int count)
{
int number_used =...
Forum: C Apr 28th, 2008, 12:24 AM
Replies: 1
Views: 163
Posted By The Dark
Re: structure with an array in shared memory

I haven't used shmget, but I would imagine you need to allocate the sharearr array using smget as well. This means that your structure would need to contain the sharearr id rather than the pointer....
Forum: C++ Apr 17th, 2008, 5:08 PM
Replies: 3
Views: 238
Posted By The Dark
Re: Feedback On Algorithm With C++

It probably won't help, given the size of the input data. If you were talking millions of names, I think it would be faster though.
Note that vectors have to maintain their data in a contiguous...
Forum: C++ Apr 17th, 2008, 9:28 AM
Replies: 3
Views: 238
Posted By The Dark
Re: Feedback On Algorithm With C++

A few things to consider:

The vector<string> in the tree map may end up with the same name in it several times (e.g. if two authors publish together more than once). It might be better to use a...
Forum: Coder's Corner Lounge Apr 5th, 2008, 2:15 AM
Replies: 18
Views: 545
Posted By The Dark
Re: Thank-you PFO!

Congrats Sane, and good luck!
Forum: Other Scripting Languages Mar 28th, 2008, 6:13 PM
Replies: 4
Views: 221
Posted By The Dark
Re: [Batch] Setting up Visual Studio build script

You have to use the "call" command, otherwise the other batch file runs instead of your own (think goto, rather than function call).

call "%VS90COMNTOOLS%vcvars32.bat"
Forum: C++ Mar 28th, 2008, 12:50 AM
Replies: 13
Views: 391
Posted By The Dark
Re: C++ cross-platform Regular Expression Library

Ah I see where I went wrong. After you extract the zip, you have to create the pcre.h (and other files) using the configure and make commands. There are instructions in the INSTALL file (its in upper...
Forum: Software Design and Algorithms Mar 28th, 2008, 12:45 AM
Replies: 7
Views: 289
Posted By The Dark
Re: Techniques For Overcoming Stack Overflow In DP

You could keep your own stack of items to work on (separate from the program stack) and use a loop to pick the last item on the stack. This depends on being able to keep all your context in your own...
Forum: C++ Mar 23rd, 2008, 10:49 AM
Replies: 13
Views: 391
Posted By The Dark
Re: C++ cross-platform Regular Expression Library

They were in the base of the library. Probably the best thing to do would be to download the zip file from the site and use the source code that comes with it. It should compile OK on OS X (I think a...
Forum: C++ Mar 23rd, 2008, 7:29 AM
Replies: 13
Views: 391
Posted By The Dark
Re: C++ cross-platform Regular Expression Library

Have a look at the pcrecpp.h file - it should be in the pcre directory. It is a wrapper for use with c++. This makes it a lot easier to use the library. There is a lot of instructions and examples in...
Forum: C++ Mar 22nd, 2008, 9:17 PM
Replies: 13
Views: 391
Posted By The Dark
Re: C++ cross-platform Regular Expression Library

I can recommend PCRE (http://www.pcre.org/).
Forum: C# Mar 19th, 2008, 7:20 PM
Replies: 9
Views: 292
Posted By The Dark
Re: Assigning Values into Random Index's in Array

I can't see anything in that code that puts any values into the array before it starts shuffling. That probably explains the zeros.
Also as lectricpharaoh said, you need "ref" parameters in your swap...
Forum: C Mar 12th, 2008, 5:58 PM
Replies: 11
Views: 340
Posted By The Dark
Re: Troubleshooting with fread and fopen

Try

wavfile =fopen("cwav1.wav", "rb");
wavfile1 =fopen("cwav2.wav", "rb");
wavfile2 =fopen("cwav3.wav", "rb");
if(wavfile == NULL || wavfile1 == NULL || wavfile2 == NULL)
Forum: C Mar 12th, 2008, 1:12 AM
Replies: 11
Views: 340
Posted By The Dark
Re: Troubleshooting with fread and fopen

It sounds a bit like you have made almost all the necessary changes :)

Can you post your current code, along with the line numbers for the errors?
Forum: Java Mar 12th, 2008, 1:10 AM
Replies: 7
Views: 205
Posted By The Dark
Re: Help why doesnt it work

You have to tell the compiler that 4000000002 is a long, rather than an integer. Sticking an L on the end does that:


k = 4000000002L ; // k to 4,000,000,002
Forum: C Mar 10th, 2008, 9:11 PM
Replies: 11
Views: 340
Posted By The Dark
Re: Troubleshooting with fread and fopen

Apart from the missing braces and the fact that your code isn't actually inside a function, I think the main problem is that you are reading the data into the data1 variable and then trying to access...
Forum: Assembly Mar 10th, 2008, 3:09 AM
Replies: 7
Views: 490
Posted By The Dark
Re: [x86]Instruction test setting the zero flag

I wasn't having a go at you because you haven't posted much, if that is what you mean by "argument of repertoire". Extra helpers here are always welcome. Calling people who are asking questions and...
Forum: Assembly Mar 9th, 2008, 4:17 PM
Replies: 7
Views: 490
Posted By The Dark
Re: [x86]Instruction test setting the zero flag

Dredging up a six month old thread to call people stupid, and having your first two posts in a forum call people stupid, is a sure way to make a name for yourself. Unfortunately, that name isn't a...
Showing results 1 to 40 of 500

 
Forum Jump



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

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