Search Results

Showing results 1 to 40 of 76
Search took 0.01 seconds.
Search: Posts Made By: CrazyDieter
Forum: Java Aug 19th, 2009
Replies: 4
Views: 198
Posted By CrazyDieter
if you want to use X objects as keys in hashmaps, you don't have to implement Compareable (that's what you do for treemaps).

In hashmaps, the keys are considered equal according to the values of...
Forum: C++ Aug 10th, 2008
Replies: 2
Views: 1,239
Posted By CrazyDieter
You may also have a look to the implementation of the Boost C++ library :

http://www.boost.org/doc/libs/1_35_0/doc/html/hash.html (http://www.boost.org/doc/libs/1_35_0/doc/html/hash.html)
Forum: Java Feb 16th, 2008
Replies: 2
Solved: problem
Views: 702
Posted By CrazyDieter
c= firstNameAsEntered.charAt(0)

This will surely fail if the character string is empty ...

first check the length of the string, before translating the first letter into uppercase, and maybe...
Forum: C++ Jan 5th, 2008
Replies: 2
Views: 2,296
Posted By CrazyDieter
thx, i'll have a look to these books.
... it seems to be a quite annoying technology, though
Forum: C++ Jan 4th, 2008
Replies: 4
Views: 7,962
Posted By CrazyDieter
I'm glad to see that you remembered of me :)
I'm happy to see you again, too
Forum: C++ Jan 4th, 2008
Replies: 2
Views: 2,296
Posted By CrazyDieter
Is there a simple way for writing ActiveX components with minGW ? (ie without using activeX or ATL) ?

I have to write an activeX but a don't want a buy a visual studio licence just for this <:)
Forum: C++ Jan 4th, 2008
Replies: 3
Views: 4,223
Posted By CrazyDieter
Hie,

1) please try to ask more a more precize question next time

2) MAC address and MAC Frames are two different things. The Media Access Control protocol (IEEE 802.x) defines a way for...
Forum: C++ Jan 4th, 2008
Replies: 4
Views: 7,962
Posted By CrazyDieter
When you use win32-specific code, you have to know about the different windows API's specific symbol.

Maybe you forgot to include the right header file, at the beginning:


#include <windows.h>
Forum: C Jul 4th, 2006
Replies: 4
Views: 6,318
Posted By CrazyDieter
Thx dear dragon,

My attempt refers to an article I've read on :

http://support.microsoft.com/default.aspx?scid=kb;en-us;197571

I missed my copy/paste in my last post : The real name of the...
Forum: C Jul 4th, 2006
Replies: 5
Views: 2,253
Posted By CrazyDieter
in C, functions are defined just like variable.

The adress of a function can be assimiled to its adress in memory, so the following code is valid :

#include <stdio.h>


void something()
{
...
Forum: C Jul 4th, 2006
Replies: 9
Views: 1,177
Posted By CrazyDieter
euhh.. you might be using a broken computer

In all the cases, your code always prints 1.

1) i++/i = 10/10, and afterwards i=11

2) i/++i = 11/11 and afterwards i=11

3) i++/++i = 11/11,...
Forum: C Jul 4th, 2006
Replies: 4
Views: 6,318
Posted By CrazyDieter
Hie,

I'm trying to get a code in a DLL runned each time a program is launched.

1) I have put this value in the registery key :

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows...
Forum: C++ Dec 12th, 2005
Replies: 2
Views: 1,217
Posted By CrazyDieter
I would work better if your code was in C++, and not in CSharp....
Forum: C Oct 17th, 2005
Replies: 6
Views: 2,782
Posted By CrazyDieter
Forum: C Oct 14th, 2005
Replies: 3
Views: 2,270
Posted By CrazyDieter
see the ansi time() function, decribed in the C time.h header file.


Here is my code, in C :


#include <stdlib.h>
#include <stdio.h>
#include <time.h>
Forum: C Oct 14th, 2005
Replies: 6
Views: 2,782
Posted By CrazyDieter
gaim is compatible with the aim protocol, that's why it has been written for. The advantage of using the libgaim dll is that you will not require user of your program to install a 3rd party program...
Forum: C Oct 13th, 2005
Replies: 6
Views: 2,782
Posted By CrazyDieter
I don't think that the AIM software enables user to force a message to be sent using the commanline, or ShellExecute action. You may use instead an external C library that allows to do such things.
...
Forum: C++ Oct 13th, 2005
Replies: 2
Views: 1,935
Posted By CrazyDieter
The 'far' keywork only makes sense under DOS, and is useless with minGW.

if you are trying to port code from djgpp, you may neutralize it. For example, add '-Dfar' to the compiler commandline...
Forum: C Oct 5th, 2005
Replies: 0
Views: 1,921
Posted By CrazyDieter
Hie,

Do you know how to read the activity of a serial device (COMx) under windows ?
I would like to write a program that could sniff the serial/ port.
Forum: C++ Oct 3rd, 2005
Replies: 1
Views: 1,261
Posted By CrazyDieter
is it what you needed ?


#include <cstdlib>
#include <cmath>
#include <iostream>
using namespace std;

//Taylor formula applied to exp(x):
//exp(x) = 1 + x + x^2/2! + x^3/3! + x^4/4!...
Forum: C Oct 3rd, 2005
Replies: 1
Views: 1,515
Posted By CrazyDieter
I'm sorry to critisize your code, but it's design is quite poor. Now that you understand how to execute the code, what about cleaning this mess, in order to make the thing a little more reusable an...
Forum: Python Sep 27th, 2005
Replies: 1
Views: 5,261
Posted By CrazyDieter
pyOgre is a library that does not wraps the DirectX library directly, but the Ogre3D library, that uses DirectX.

http://www.ogre3d.org/index.php?option=com_content&task=view&id=311&Itemid=2
Forum: Python Sep 27th, 2005
Replies: 1
Views: 17,402
Posted By CrazyDieter
(module sys) :

exit( [arg])

Exit from Python. This is implemented by raising the SystemExit exception, so cleanup actions specified by finally clauses of try statements are honored, and it is...
Forum: Python Sep 27th, 2005
Replies: 5
Views: 46,702
Posted By CrazyDieter
x=0
def static_num() :
global x
x=x+1
return x

for i in range(0,10) :
print static_num
Forum: C++ Sep 27th, 2005
Replies: 2
Views: 2,240
Posted By CrazyDieter
because 'operator new' returns a pointer to a 'Dog' instance (a Dog*), and m is not a Dog*.

polymorphism works in c++ only when dealing with pointers. You can make your dog speak (sure you can !)...
Forum: C Sep 26th, 2005
Replies: 3
Views: 9,308
Posted By CrazyDieter
when you write '-1', you do not write the VALUE -1, but the character string { '-', '1' }

your program will not stop, except if you type ctrl+D under linux, or ctrl+Z+enter under windows.
Forum: C Sep 26th, 2005
Replies: 4
Views: 2,675
Posted By CrazyDieter
correction : about get_whole_file() :

As usual i posted code that do not compile ! (all my apologies, I wont do that again ;) )

replace fseek(f, SEEK_END) by fseek(f, 0, SEEK_END)
replace...
Forum: C Sep 26th, 2005
Replies: 4
Views: 2,675
Posted By CrazyDieter
in fact your code actually reads the 200 bytes that you request, but it wont display it entirely as a string if there is \0 characters in the middle.

You could choose to transform \0 into spaces :...
Forum: C Sep 22nd, 2005
Replies: 4
Views: 2,675
Posted By CrazyDieter
please post a sample of the code where you use ReadFile(). Your problem may come from a bad use of the function.

anyway, a more portable way to read files in C is to use the functions from the...
Forum: C Sep 19th, 2005
Replies: 5
Views: 1,378
Posted By CrazyDieter
in your first example, the 'name' variable stores the address of an area of the memory that you do not know. this can be any value. When you try to print it, using 'cout<<', This should always crash,...
Forum: C++ Sep 17th, 2005
Replies: 1
Views: 4,118
Posted By CrazyDieter
#include <cstdlib>
#include <iostream>

class Base {
};

class Derived : public Base {};

using namespace std;
int main(void)
Forum: C++ Sep 17th, 2005
Replies: 1
Views: 2,035
Posted By CrazyDieter
could you send your "source.cpp" file too ?
Forum: C++ Sep 17th, 2005
Replies: 1
Views: 2,045
Posted By CrazyDieter
here you can find a prebuilt version of the libtiff library for dev-cpp :

http://www.devpaks.org/details.php?devpak=29
Forum: C Sep 12th, 2005
Replies: 1
Views: 1,403
Posted By CrazyDieter
It may mean that the compiler does the severals passes without writing on the disk :

For example, gcc (without the -pipe option) writes a temporary file on the disk between each compilation step....
Forum: C Aug 12th, 2005
Replies: 2
Views: 9,328
Posted By CrazyDieter
If you are dealing with Windows, See the posts I wrote a few weeks ago :

http://www.daniweb.com/techtalkforums/thread27589.html
Forum: C++ Aug 12th, 2005
Replies: 2
Views: 2,937
Posted By CrazyDieter
What about just trying, and THEN post your questions when it does not work.
I'm sure that your compiler is faster than your web browser when dealing with c++ code.
Forum: C++ Aug 12th, 2005
Replies: 1
Views: 1,293
Posted By CrazyDieter
Many techniques and features are available when dealing with memory managment :

algorithms /libraries :
garbage collection (boehm garbage collector)
memory file mapping (using mmap under unix or...
Forum: C++ Aug 12th, 2005
Replies: 4
Views: 4,582
Posted By CrazyDieter
It seems that your version of the MatLab dynamic library relies on a version of the C library that is more recent than the one installed with your redhat.

I see 2 solutions

The simplest :...
Forum: C++ Aug 12th, 2005
Replies: 5
Views: 3,095
Posted By CrazyDieter
1- Install or verify that an ODBC driver is installed for your database.

2 - In your C source code
a- connect to the data source (using the driver, or a DSN as the example above)
...
Forum: C++ Aug 2nd, 2005
Replies: 5
Views: 3,095
Posted By CrazyDieter
There is a layer for accessing databases from any native program. This is called ODBC.
ODBC is a library that allows accessing to any database, using a specific "Driver" (probably shipped with SQL...
Showing results 1 to 40 of 76

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC