Acara Catch
December 29th, 2009
Here we are approximately 1800 lines of code my first flash game Acara Catch! It’s a fishing game with an online highscore table.
Play the game
Play the game
HEJPSlideshow v1.0
June 14th, 2009
HJEPSlideshow is a simple, yet highly customisable, image slideshow that can be embeded into any webpage. The transitions, layout and font of the slideshow are customised using clean easy to understand CSS.
Features:
Download (13.2KB)
The download is a zip archive containing the pre-compiled swf file, an example html page and the source code (if you need it).
- Resizable
- Neat transitions from image to image
- Customisable transitions, layout and fonts
- Quickly add/remove photos (no re-compilation)
MySQL++ Example
May 29th, 2009
MySQL++ is a C++ API for MySQL, if you have ever used MySQL with PHP then this will all be very familiar…
Here is a short example piece of code for people that have just started using MySQL++.
#include <stdio.h>
#include "mysql++.h"
MYSQL *con;
MYSQL_RES *result;
MYSQL_ROW row;
int main(int argc, char* argv[]){
con = mysql_init(NULL);
printf("Attempting to connect\n");
con=mysql_real_connect(con, "localhost", "username", "password", "database", 0, NULL, 0);
if(con == NULL){
printf("Failed to connect.\n");
return 0;
}
printf("Connected to the database\n");
mysql_query(con,"SELECT * FROM test");
result = mysql_store_result(con);
if(result==NULL){
printf("Result equals NULL.");
mysql_close(con);
printf("Connection Terminated\n");
return 0;
}
while ((row = mysql_fetch_row(result)) != NULL){
for (int i = 0; i<mysql_num_fields(result); i++){
printf("\nRow: %s\n",row[i]);
}
}
mysql_close(con);
printf("Connection Terminated\n");
return 0;
}
To compile:
g++ -o test test.cpp -I /usr/include/mysql -I /usr/include/mysql++ -L/usr/lib/mysql -lmysqlclient