You can download here a small apllication which will show in fullscreen a video taken from one of your capture device (for example: a "Pinnacle Systems Studio DC10 Plus Video Capture Card", any TV-capture card or a simple webcam: creative webcam and philips webcam have been tested). The interface has been reduced to allow a very simple use: There is only one right-click-menu in which you select your capture device and that's all! Everything is done automatically (For example, the program will attempt to use the "overlay mode" of your capture device to give an animation as smooth as possible). There is usuallly a problem with "Studio DC10" cards: they can't play fullscreen: this has been solved: you can now watch TV in fullscreen without any problem. The code has been compiled in static mode so that you don't need any special library to run it: It will run on all Windows versions without problem (Win 98, Win 2000, Win XP). It's also very small: only 124KB to download! A great Tool! This program has been written by my fiancée Sabrina Wenig, using DirectX/DirectShow technology.
Improvements of V2.0:
You can download here an implementation of a TFTP client (command-line tool) and a TFTP server (source code available). The code has been develloped under unix (solaris and linux). The TFTP protocol is build over UDP/IP. Thus, the programs do not require TCP/IP stack and are easily portable to any low-end system. It is completely written in C in pure structural programmation style (no 'goto' instruction). You only need standard POSIX libraries to access the network and create threads. This code has been tested in depth and is now currently used on-line in factory in a DOS-based pc. It's highly customizable: The normal implementation of the TFTP protocol is to transfer files cutted in small blocks of 512 bytes each: The bloks are (read from/written to) files. It is really easy to modify the code to (send/receive) the blocks (from /to) something else.
You can download here a continuous optimization tool based on state-of-the-art Genetic Algorithm. This tools uses the latest techniques in hybrid GA with some 'simplex steps' inbedded in. However, GA's are complete crap to optimize continuous function (maybe when there are many local optima's but I don't really believe it). The package contains an example of use. In this example, we try to optimize the classical rosenbrock function. I takes more than 3000 evalutation of the objective function to go relatively near the optimum. Useless... Except for demonstration purposes... (some people trust GA's are the ultimate solution to everything)
Once you have manage to write correctly the program described above, you can read this small C++ primer (in french) to know (nearly) everything about Object Oriented programmation is C++.
The first program a student usually write when learning Java programmation is the SNAKE game (or tron game). This game is usually found in GSM's. You can download the source code of a snake game here (a big part of the code has been auto-generated by the free Netbeans IDE). It has been voluntarily simplified to be more comprehensible.
The first program a student usually write when learning TCP/IP socket programmation under java is a small client/server based "internet chat" (like IRC). You can find here the solution of the exercise.Before running the client ('client.java'), you must first start the server ('server.java'). There are command line to specify the tcp/ip port of the application, the ip-adress of the server. The code has been voluntarily simplified to be more comprehensible.
I have made a very simple program in JAVA to illustrate the "back-propagation of the error" learning algorithm in an artificial neural network (NN) constituted of 3 layers (input layer, hidden layer, output layer). You can download the code here. This (very basic) algorithm allows to train a NN to "learn" a dataset of (input, output) pair. This kind of NN has been proven to be an universal approximator. In other words, it means that if you set high enough the number of neurons in the hidden layer, then the NN is able to "fit" any continuous function (=any dataset). To test the code, you will find in the ZIP file a small example in which we learn the standard XOR truth table (number of examples in the dataset=4, dimension of the input space=2, dimension of the output space=1):
|The XOR truth table|
One major feature of JAVA programs is that the link between the different classes are determined at run-time (it's, at my knowledge, the only language which does that). It means that you can create an instance of an object at run-time (using the 'Reflection package') without knowing anything about this object at compile time. A good illustration of this is the following exercise (simplified java implementation of the crond deamon under unix): connect to a DB (using JDBC). Every second, compare the current time with the time stored in the first column of table 'notif' (on each line), if they are equal, then instanciate (in a new thread) the class which has the name specified on the second column (same line). With this tool, you can program the automatic execution of a java classes in the future. The class to instanciate is completely unknow at compilation time (impossible to do in C/C++ !). Make a class to send e-mail. Use that class to send to yourself an e-mail automatically in 2 minutes. The solution of the exercice is here.
During my studies at the ULB I had written a small java applet to demonstrate how to calculate constraints in an object using a technique called "Mohr's circle". You can download the applet (and the code) here. You can see it in action here.
Imagine you want to binary compare two huge files. You can use the standard dos-command "fc.exe" with option "/b" OR you can use this small tool which is speed-optimized for big files (650 MB) (more than 100 times faster) (source code available).
Do you love TETRIS? Do you know that you can play TETRIS against other people on internet ? See "la ligue francophone de jeu en réseau (they have a great TETRINET server!) or http://www.tetrinet.org/. Suppose you are stuck in programmation class. It's boring. The teacher is slow... The computers are old DOS pc's. You can now play tetris against your friends! You can download here a small two players resident tetris game. What is a resident program? It's a program which stays inside the computer memory and "pop up, out of nowhere" suddently when you press (here) ctrl-alt-T. Suppose you are programming inside the borland C++, then you press ctrl-alt-T, play a little, when the teacher comes close, press F1 (=it pauses the game: you are instantaneously returned in borland C++ so that the teacher see nothing unusual), when he goes away, press ctrl-alt-T and continue your game! The game is highly customizable. The original setup is a copy of the 2 players gameboy tetris. (You can press the S key to adjust the sensitivity of the keyboard.)
Do you know what ".reg" files are? These ASCII files contain informations to put inside the "registry". If you are tired to edit these files to replace "directory names" to match your system, try this simple tool: REGsetup (windows executable+source code). REGSetup is a replacement tool for 'regedit'. However, there is a small difference with 'regedit': REGSetup replace all the '%d' inside the key values with the current directory. It's very usefull to install rapidly games during a LAN party!
There exists spamming tools which browse the internet to search and collect valid e-mail addresses. These e-mails are then used to send unsolicited (often pornographic) e-mails. Suppose you want to give your e-mail address on your webpage BUT you don't want to receive offers for "free penis enlargement pills". The solution is simple: use this simple e-mail encryption script. Your e-mail address will appear correctly in any browser BUT the spamming tools won't see them anymore.