- Prison Code Breaker Diary -

=> aka: Nhật Kí Code Tù

Categories

Busy w/ daytime working hours, I spend my little night on study more on several subjects. However, I'm troubling w/ Windows Memory Management...how it works, what is virtual address (VA), what is base address, physical address....a lot of stuffs.
I'm just going crazy. I'm know I'm not that bad, and I believe hard-work will pay the price of knowledge. I will make them mine.

For MSSQL Server:


USE table_name
SHOW ALL TABLES


For MySQL Server:

SHOW TABLES IN database_name


Have fun!@

The game: http://apps.facebook.com/bejeweledblitz/

In order to hack this game, you need to prepare these:

1. Firefox browser

2. Get add-ons: GreaseMonkey (Google, ok?)

3. Install the script made by CyberShadow: Click here

Visit the game then just find the rest yourself :D

Have fun!@

I was reading books and there I found one hilarious letter.

Dear Eliza,

Grandma and I were so sorry to hear that you’ve got the chicken socks. We didn’t know chickens wore socks, so we were very surprised. What’s that? You say you have the chicken fox. What kinda of an animal is a chicken fox anyway? What’s that? You say you have the chicken box. Are you going to raise chickens in it? Oh, excuse me, you have the chicken rocks. We’ve never heard of them. Are they the latest fad, like pet rocks? Oho! We’ve got it now. You’ve got the CHICKEN POX. Maybe by the time you’ve read this long letter, you will be feeling a little better.

Grandma said to tell you to be sure not to scratch, but I’m sure you won’t.

In a few days when you feel better we’ll give you a call and you can tell us yourself how you’re feeling.

Love,

I have found a new MMOFPS game and it’s very interesting. Well, worth of playing!

Game Name: Battlefield Heroes

Developer: EA – Electronic Arts

Homepage: https://www.battlefieldheroes.com/

Type: FPS mixed RPG

Why is that? Because you need to gain EXP in order to level up. When you level to a certain, you will have a special point, namely Hero Point, to upgrade your abilities.

Game Info:

1. There are two groups: Nationals (GER) and BRI (Royals)

2. There are 3 classes in total for each group: each class has different abilities…

+ Soldier: close combat, submachine-gun…medium health (110)

+ Gunner: mid-range combat, heavy guns equipped like: machine-gun, tank booster… high health (150)

+ Commando: far-range combat or close assassination, weapons like: knife (+poison), sniping rifle, Bomb trap (Troop Trap – explode on enemy close trigger or fire)….low health (80)

3. Maps:

+ There are two types of map: Infantry ‘n Vehicle

+ Vehicles including: Tank, Jeep, Air-craft.

4. Mission (or Quest)

+ There are various mission for players to achieve, In facts, it’s just a requirement to make some certain kills, deals a certain damage, maybe unlimited time or just in a round.

5. Store

+ You can buy stuffs from store to equip your characters.

+ There are two kinds of currency:

a. Battle Funds: you have to pay actually $ to get this. BF is required to buy extra cool items and some special widgets like EXP Boosters…

b. Valor Point: you can earn this by playing games.

Well, still under development but the game is pretty cool up to now.

Let’s give it a try!

One of the utility required for tracking network via packet is a Packet Sniffer or Packet Editor.
WPE is one of those famous ones; but it's hard to find where to download.

However, you can download it here => WPE Pro 9.0a - Upload by [JaPh]

Have fun!@

It’s kinda weird…Under this summer, it must be hot, hot and very very hot like every year; but I don’t really know what the heck is going on, the weather here, where I live, is freaking cold, cold like winter… evening even down to 10oC !!!

Additionally, for around nearly 2 months, one sunny day, one rainy day frequently exchange under weather. IT’S CRAZY, CANNOT BELIEVE IN THIS !

IS THIS REALLY THE EFFECTS OF GLOBAL WARMING ???

This is a small tip about sending mails via Perl code.


sub mail {
my( $to, $from, $sub, $msg ) = @_;
my( $send ) = "/usr/lib/sendmail";

open MAIL, "| $send -oi -t";
print MAIL "From: $from\n";
print MAIL "To: $to\n";
print MAIL "Subject: $sub\n\n";
print MAIL "$msg\n";
close MAIL;
}


Have fun!@

The default web root directory of Apache Web Server is in "/var/www/html".
However, if you want to change it to different folder, then edit the value DocumentRoot in config files.

1. Find the config files:


[root@localhost ~]# locate httpd.conf

2. Open the ~/httpd.conf, look for value DocumentRoot and change as you want, like this

DocumentRoot "/home/xjaphx/public_html"


Have fun!@

Some commands you should know to control Apache web server:

1. Start server:


[root@localhost ~]# apachectl start

or

[root@localhost ~]# httpd -k start

2. Stop server

[root@localhost ~]# apachectl stop

or

[root@localhost ~]# httpd -k stop

3. Restart server

[root@localhost ~]# apachectl restart

or

[root@localhost ~]# httpd -k restart

4. Check version

[root@localhost ~]# apachectl -v

or

[root@localhost ~]# httpd -v

5. List compiled modules

[root@localhost ~]# httpd -l

6. Show all loaded modules

[root@localhost ~]# httpd -t -D DUMP_MODULES

7. Syntax check for config files ~/httpd.conf

[root@localhost ~]# httpd -t


Have fun!@

This is a quick trick to identify which operating system you are on:

#!/usr/bin/perl -v
print "The current operating system is: " . $^O;


The built-in variable $^O holds the value:
+ if you are under Windows: "MSWin32" or "Win32"
+ if you are under Linux: "linux"

Have fun!@

Eclipse is a good open-source IDE w/ wide range of programming languages, all developed and supported by community.
Especially, for a Perl IDE, I suggest you just need to stick with Eclipse and add the Perl Editor plugin. That's all! You'll have a greate Perl IDE, from editor including grammar check, syntax highlight, built-in interpretation.
Moreover, it's easier for you to organize a project.

You should check it out: EPIC - Eclipse Perl Integration
It's worth of use and great!

Have fun!@

Have you done practice GtkWindow and GtkLabel well?
Now, it's time to introduce new widget: GtkButton, simply a button, which can be pressed in order to do something. This is a very common widget used in every application.

First thing first, you need to look over the reference for GtkButton: GtkButton Reference

Practice 1: Create a button on a window labeled as "Exit", the button-clicking event will exit program.


#include <gtk/gtk.h>

int
main( int argc, char *argv[] )
{
GtkWidget *window;
GtkWidget *button;

gtk_init( &argc, &argv );

window = gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_window_set_title( GTK_WINDOW( window ), "[JaPh]Lesson 3: GtkButton" );
gtk_widget_set_size_request( window, 50, 50 );

// create a new button with label: Exit
button = gtk_button_new_with_label( "Exit" );

// if you want to use combination with Alt + X
//button = gtk_button_new_with_mnemonic( "E_xit" );

// add button to main window
gtk_container_add( GTK_CONTAINER( window ), button );

g_signal_connect( G_OBJECT(window), "destroy", G_CALLBACK( gtk_main_quit ), NULL );
// connect button click event
g_signal_connect( G_OBJECT(button), "clicked", G_CALLBACK( gtk_main_quit ), NULL );

gtk_widget_show_all( window );

gtk_main( );

return 0;
}


Practice 2: Click a button will increase a count value by 1, if the count value is divisible by 3, then exit immediately.


#include <gtk/gtk.h>
#include <glib.h>

static gint count = 0;

void
btn_count_clicked_event( GtkButton *button, gpointer p )
{
++count;
g_print("Count = %d\n", count );
if( count % 3 == 0) {
g_print("Exit\n");
gtk_main_quit( );
}
}

int
main( int argc, char *argv[] )
{
GtkWidget *window;
GtkWidget *btn_count;

gtk_init( &argc, &argv );

window = gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_window_set_title( GTK_WINDOW( window ), "[JaPh]Lesson 3: GtkButton" );
gtk_widget_set_size_request( window, 100, 50 );

btn_count = gtk_button_new_with_mnemonic(" C_ount ");

gtk_container_add( GTK_CONTAINER( window ), btn_count );

g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_main_quit), NULL );
g_signal_connect( G_OBJECT( btn_count ), "clicked", G_CALLBACK( btn_count_clicked_event ), NULL );

gtk_widget_show_all( window );

gtk_main( );

return 0;
}

GtkButton is a quite very easy widget, so you just need to practice for a while.

The next tutorial lesson will talk about container classes, GtkContainer.

Keep on practice w/ Gtk+ programming everyday, ok?

Have fun!@

TagList - a plugin for source code browser and quick file manipulate in Gvim.

It's a good one to pick up.
First, you should make sure Vim is installed on your system properly.
Then, download it here: Vim Plugin - TagList Download
You also need to install the Excuberant CTags in order for TagList to run properly.
Get Excuberant CTags

Locate your vimrc then add these lines:
note: use command: locate vimrc to search


let Tlist_Ctags_Cmd = "/usr/local/bin/ctags"
let Tlist_WinWidth = 50
map <f4> :TlistToggle<cr>

Here the explanation:
Tlist_Ctags_Cmd is the variable that holds the ctags binary utility
Tlist_WinWidth is the width of source code browser width on the screen.
TlistToggle is the boolean value of toggling the browser.

I'd better say this plugin is for Gvim specifically.

Have fun!@

Pick your favorite theme for gvim.

Download here: http://www.vim.org/scripts/script.php?script_id=625

Have fun!@

A-A-P makes it easy to locate, download, build and install software. It also supports browsing source code, developing programs, managing different versions and distribution of software and documentation. This means that A-A-P is useful both for users and for developers.

Homepage: The A-A-P Project
Download: Visit download page

Installation: Visit instruction page

Have fun!@

Quote from: http://www.nasm.us/doc/nasmdoc9.html

9.1.2 Function Definitions and Function Calls

The C calling convention in 32-bit programs is as follows. In the following description, the words caller and callee are used to denote the function doing the calling and the function which gets called.

  • The caller pushes the function's parameters on the stack, one after another, in reverse order (right to left, so that the first argument specified to the function is pushed last).
  • The caller then executes a near CALL instruction to pass control to the callee.
  • The callee receives control, and typically (although this is not actually necessary, in functions which do not need to access their parameters) starts by saving the value of ESP in EBP so as to be able to use EBP as a base pointer to find its parameters on the stack. However, the caller was probably doing this too, so part of the calling convention states that EBP must be preserved by any C function. Hence the callee, if it is going to set up EBP as a frame pointer, must push the previous value first.
  • The callee may then access its parameters relative to EBP. The doubleword at [EBP] holds the previous value of EBP as it was pushed; the next doubleword, at [EBP+4], holds the return address, pushed implicitly by CALL. The parameters start after that, at [EBP+8]. The leftmost parameter of the function, since it was pushed last, is accessible at this offset from EBP; the others follow, at successively greater offsets. Thus, in a function such as printf which takes a variable number of parameters, the pushing of the parameters in reverse order means that the function knows where to find its first parameter, which tells it the number and type of the remaining ones.
  • The callee may also wish to decrease ESP further, so as to allocate space on the stack for local variables, which will then be accessible at negative offsets from EBP.
  • The callee, if it wishes to return a value to the caller, should leave the value in AL, AX or EAX depending on the size of the value. Floating-point results are typically returned in ST0.
  • Once the callee has finished processing, it restores ESP from EBP if it had allocated local stack space, then pops the previous value of EBP, and returns via RET (equivalently, RETN).
  • When the caller regains control from the callee, the function parameters are still on the stack, so it typically adds an immediate constant to ESP to remove them (instead of executing a number of slow POP instructions). Thus, if a function is accidentally called with the wrong number of parameters due to a prototype mismatch, the stack will still be returned to a sensible state since the caller, which knows how many parameters it pushed, does the removing.

There is an alternative calling convention used by Win32 programs for Windows API calls, and also for functions called by the Windows API such as window procedures: they follow what Microsoft calls the __stdcall convention. This is slightly closer to the Pascal convention, in that the callee clears the stack by passing a parameter to the RET instruction. However, the parameters are still pushed in right-to-left order.

Woke up late at 8.53pm …Get to work..the whole day was so gloomy. It was raining , just thought it would have been cooler; however, it got hotter . In a sudden, it became foggy the whole place then rained again. I felt so tired of this kind of weather.

Not yet, try to head back and test the new Closed Beta game, WonderKing. What the heck??? I’ve tried all kinds to fix the f&*x silly error:

Game guard error: 114

GameGuard initialization error. Please try again after rebooting or exit other programs.

Look up the community, still not find the way to fix it.

Launch VMware with XP SP3, game loaded successfully but performance is like s^*t…

My eyes are now heavy…DARK & GLOOMY…

I've found a good tool to clean up the remnants of uninstalled programs.
Actually, if you uninstall Antivirus softwares, something might still reside and run in background.

This tool, EnumProcess, may help you this troublesome.

Click here to Download!

Have fun!

We will practice on a new GtkWidget, a widget that show text descriptions, or GtkLabel.
First, you should look through documentation: GtkLabel

It has a lot of properties; well, you will not use them all, except you want to do something else, out of ordinary topi.

Head first to a small application, a window pops up containing a label show your name.


/*
* @author [JaPh]
* @date July 16, 2009
* @file GtkLabelApp_01.c
* @site http://xjaphx.blogspot.com/
*/

#include <gtk/gtk.h>

int
main( int argc, char *argv[] )
{
GtkWidget *window;
GtkWidget *label;

gtk_init( &argc, &argv );

window = gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_window_set_title( GTK_WINDOW(window), "[JaPh]Lesson 2: GtkLabel" );
gtk_widget_set_size_request( window, 400, 400 );

/* create a new label */
label = gtk_label_new( "Pete Houston" );
/* add label to window */
gtk_container_add( GTK_CONTAINER(window), label );

g_signal_connect( G_OBJECT(window), "destroy", G_CALLBACK( gtk_main_quit ), NULL );

gtk_widget_show_all( window );

gtk_main( );

return 0;
}
Note at my comments, that's how I constructed a new label, and simply use gtk_container_add() to add label to window.

Now do something else harder.
Let's make a program that the window title shows your first name, the label shows your last name at beginning. When users press any key then your names are switched.
Let's do this!
We will the above code but add more things to it.
1. We have to use "key-press-event"=> reference event here
The function handler for event must be in type subjected in documetation.
2. While we switch the value between window title and label text, we need to temporarily store one value in a variable, which must be in type of a string.
For practice, we will use GString of Glib Library => GString reference

Try to make it yourself and compare to mine.

/*
* @author [JaPh]
* @date July 16, 2009
* @file GtkLabelApp.c
* @site http://xjaphx.blogspot.com/
*/

/* A - HEADER */
#include <gtk/gtk.h>

/* @ Declare functions */
gboolean
key_press_event_func( GObject *, GdkEventKey *, GtkLabel *);

/* B - MAIN */
int
main( int argc, char *argv[] )
{
/* 1. declare var */
GtkWidget *window;
GtkWidget *label;

/* 2. init gtk app */
gtk_init( &argc, &argv );

/* 3. widgets attributes */
window = gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_window_set_title( GTK_WINDOW(window), "Pete");
gtk_widget_set_size_request( window, 400, 400 );

label = gtk_label_new("Houston");
/* add label to window */
gtk_container_add( GTK_CONTAINER( window ), label);

/* 4. connect signals */
g_signal_connect( G_OBJECT( window ), "destroy", G_CALLBACK( gtk_main_quit ), NULL );
g_signal_connect( G_OBJECT( window ), "key-press-event", G_CALLBACK( key_press_event_func ), GTK_LABEL( label ));

/* 5. show widgets */
gtk_widget_show_all( window );

/* 6. activate gtk app */
gtk_main();

/* 7. program return */
return 0;
}

/* C - Define functions */
gboolean
key_press_event_func( GObject *window, GdkEventKey *event, GtkLabel *label )
{
/* temp var */
GString *tmp;
/* store title */
tmp = g_string_new( gtk_window_get_title(GTK_WINDOW(window)) );
/* switch title */
gtk_window_set_title(GTK_WINDOW(window), gtk_label_get_text(label));
/* switch label */
gtk_label_set_text(label, tmp->str);
g_string_free( tmp );
}

Still eazy huh?
Do something else, then....When window shows up, the label show your full name, if key A is pressed, label shows your age; if key B is press, show your birthday; if key J is pressed show your job; if X is pressed or double mouse click then Exit program immediately.
You may need this paper on Events to support coding: Events

When you done, try mine

/*
* @author [JaPh]
* @date July 16, 2009
* @file GtkLabel_02.c
* @site http://xjaphx.blogspot.com/
*/

#include <gtk/gtk.h>

gboolean
button_press_handler( GObject *, GdkEventButton *, gpointer );
gboolean
key_press_handler( GObject *, GdkEventKey *, GtkLabel *);

int
main( int argc, char *argv[] )
{
GtkWidget *window;
GtkWidget *label;

gtk_init( &argc, &argv );

window = gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_window_set_title( GTK_WINDOW(window), "[JaPh]Lesson 2: GtkLabel" );
gtk_widget_set_size_request( window, 400, 400 );

label = gtk_label_new( "Fullname: Pete Houston" );

gtk_container_add( GTK_CONTAINER(window), label );

gtk_widget_add_events( window, GDK_BUTTON_PRESS_MASK ); /* mask should be set for button press event */
g_signal_connect( G_OBJECT(window), "button-press-event", G_CALLBACK( button_press_handler ), NULL );
g_signal_connect( G_OBJECT(window), "key-press-event", G_CALLBACK( key_press_handler ), GTK_LABEL(label) );
g_signal_connect( G_OBJECT(window), "destroy", G_CALLBACK( gtk_main_quit ), NULL );

gtk_widget_show_all( window );

gtk_main( );

return 0;
}

gboolean
button_press_handler( GObject *window, GdkEventButton *event, gpointer p)
{
/* double click event */
if( event->type == GDK_2BUTTON_PRESS ) {
gtk_main_quit( );
}
}

gboolean
key_press_handler( GObject *window, GdkEventKey *event, GtkLabel *label )
{
switch( event->keyval ) {
case 'A':
case 'a':
gtk_label_set_text( label, "Age: 22" ); break;
case 'B':
case 'b':
gtk_label_set_text( label, "Birthday: 11-1-1982" ); break;
case 'J':
case 'j':
gtk_label_set_text( label, "Job: Chief Warrior" ); break;
case 'X':
case 'x':
gtk_main_quit( );
}
}
That's all I can tell about GtkLabel, try to practice more about it.

Have fun!@

[Note: source code - (example 2+3) updated - 13 August 2009 ]

Below is the NASM Jump Table for reference kenyit
Have fun!@

Here some helpful documentations and papers for Linux/NASM

Linux Assembly Tutorial: Step-by-Step
Write a useful program with NASM
NASM Documentation
Introduction to UNIX Assembly Programming
Linux Assembler Tutorial
* Linux System Call Table

They also includes many references and other document links inside, just visit and check it out!

Have fun!@

I'm kinda new to assembly language; also, it's very much difficult than C. sedih

Well, as you search throughout Internet, it's very hard to find a long and complete tutorial on assembly programming under Linux. You may find it in several books about assembly like Professional Assembly Programming, Art of Assembly, Assembly Step-by-step Guide... but it merely talks about assembly under Linux environment. It's quite uncommon while programming under Linux...I just don't know why around!!! If you know, tell me please!

As I read a simple tutorial about programming assembly under Linux, the language used is Netwide Assembler (NASM: http://www.nasm.us/).
Well then, let's take a look at what they guide about it.

@ The assembly program divides into three parts
1. The .data section: is used to declare initialized data and constants
- Instructions use: DB, DW, DD, DQ and DT
Samples:


section .data
message db 'Hello World!',10 ;declare a message with initialized bytes 'Hello World!", plus LF character

2. The .bss section: is used to declare uninitilized data, or called variables; memory space is reserved for variables.
- Instruction use: RESB, RESD, RESQ and REST
Samples:

section .bss
filename resb 255 ;reserve 255 bytes for filename variable

3. The .text section: the actual assembly program is written here. It begins with GLOBAL indicator to mark the entry of program, just like main() function in C/C++.
Sample:

section .text
global _main

_main:
... ;assembly code instructions here

@ Linux system calls
1. Assembly uses interrupt to create a system call. Often, int 80h
2. The order of parameters for system calls: EBX, ECX, EDX, ESI, EDI and EBP. So, you can use up to 6 parameters for a system call; well, it's enough since you cannot find any Linux system call use more than 6 parameters.
3. The register EAX always stores return value of the call.
4. The order of system call interrupt in NASM is straightforward: system call numbers then parameters from left to right.
That's some notes I take after reading a long journal on NASM.

Let's do a simple code:
I = A program uses exit() system call.

section .text
global _main

_main:
mov eax,1 ;system call number of exit() is 1
mov ebx,0 ;next is the first parameter, which will be stored in ebx; well here, we set exit code is 0
int 80h ;activate the exit() call by interrupting, postfix h indicates the value of hex, or you can write 0x80, show the same meaning

II - Compile and Link program
1. Compilation: use terminal to do the job

~ ] $ nasm -f elf exit.asm

It will produce the object file *.o

2. Linking: to connect object file and product the executable binary

~ ] $ ld -s -o exit exit.o

The binary hello will be created.

3. Run program:

~ ] $ ./exit

If it's correct, it will run smoothly w/o error or warning.

That's all I can say about NASM 'til this time.
If you wanna know more about it, why not go ahead and try. then write a tutorial for it.
People really appreciate if you like to share the rare and hard things :inlove:.

Have fun!@

Let's start our Gtk+ programming section after everything has been setup perfectly.

To begin with Gtk+ programming, let's head first to the most fundamental or basic control of graphical user interface (GUI), Window.
In Gtk+ framework, we call Widget instead of Control. Well, I will use Widget from now on.

First, we need to look up where documetation about window in Gtk+, or GtkWindow.

Refer this link: GtkWindow Reference

And then, we begin with a small GtkWindow program and dissect.


/*
* @author [JaPh]
* @date July 14, 2009
* @file GtkWindowApp.c
* @site http://xjaphx.blogspot.com/
*/

/* A - HEADERS */
#include <gtk/gtk.h>

/* B - MAIN */
int
main( int argc, char *argv[] )
{
/* 1. declare */
/* declare a widget, which will be a main window */
GtkWidget *window;

/* 2. Init */
/* initiate Gtk+ application */
gtk_init( &argc, &argv );

/* 3. properties settings */
/* set Window Type, TOP LEVEL */
window = gtk_window_new( GTK_WINDOW_TOPLEVEL );
/* set window title */
gtk_window_set_title( GTK_WINDOW(window), "[JaPh]Lesson 1: GtkWindow" );
/* set window size, apply for all kinds of widgets */
gtk_widget_set_size_request( window, 400, 400 );

/* 4. signal & event connection */
/* signal handler on destroy application */
g_signal_connect( window, "destroy", G_CALLBACK( gtk_main_quit ), NULL );

/* 5. display & activate */
/* show window interface */
gtk_widget_show_all( window );

/* activate main application */
gtk_main( );

/* 6. return */
/* program return */
return 0;
}

Go ahead and try to compile it.

~ ] $ gcc -Wall -g -o GtkWindowApp GtkWindowApp.c $(pkg-config --cflags --libs gtk+-2.0)

If you're using any IDE, then make sure you configure them correctly.

The code is self-explained already. However, I want to notice something about structure of the code.

The above code is also an example of basic structure of an Gtk+ application.
The sample shows 2 sections: A & B. Under section B, there are 6 steps following main code structure. And that's all you need to do.
Usually, there'll be section C, which will show up below to define functions used in program.

The code above is just a simple window show up with title, nothing else.
Now, let's do something else.
Learn a new function: g_print ( click here to view g_print reference )

There you go, now we will print out the opacity level of our window created above.
Add this line before step 4:


g_print("Window Opacity: %1.2f", gtk_window_get_opacity( GTK_WINDOW(window) ));

After compile and run, you'll see the result show in console window about the window opacity level.
It's fun, isn't it?

Now, it's your turn to change something inside the code and see the effects.
Also, look up the documentation to use more functions.

Have fun!@

I have several posts about Gtk+ but I forgetsigh to mention about what need to prepare for programming Gtk+.

1. A Programming Language
~ Well, first as you read my blog entries, I use C to program Gtk+; however, there're Gtk+ libraries support for other programming, too. Such as Perl, Ruby, Python, C++, PHP. It's your choice to pick up any of those languages that fit you most. Make your style and improve your skills.
On the other hand, if you tend to focus on code performance, I suggest C since almost all of the programming languages are based on traditional C language.

2. Utilities & Tools
~ If you want a simple style, then just pick a text editor and use command prompt or shell terminal to compile sources. That's fine! Also, you can setup your own programming environment by taking advantages off all-in-one (AIO) IDE, such as: CodeBlocksIDE, Eclipse, NetBeansIDE, KDevelop, QtCreator (new), Anjunta.
~ Taking advantages of visual interface design for Gtk+, you'd better use Glade Designer. Don't design UI manually! gigitjariIt's freaking tiring and time-consuming like crazy...

3. Documentation
~ Things cannot be understood without guidance. It's true, isn't it? Make sure you check and loop up Gtk+ documentation always for references. It's a good habit to confirm everything and memory them.kenyit
~ Well, just original documentation doesn't seem to work on you, why not searching out of Internet for examples and guidesnerd? It would be much clearer from other sources' references, too. Learn yourself good searching skills over the network through Google, Live Search (bing.com), Y! Search... they're pretty helpful for you, not only for programming but also other facets of life.

That's all I want to say! Any question? Ask below.....

Have fun!@

Gtk+ aka. GIMP Tools Kit is a framework what support GUI for Linux application (mainly). It's used under Gnome Environment in most of Linux distributions.
If you have interests in programming Gtk+ to create GUI application under Gnome or any others, why not try a simple Gtk+ app with me first?

The following code is self-explained and easy-to-understand. peace


/*
* @author [JaPh]
* @date July 13, 2009
* @source GtkApp_01.c
* @site http://xjaphx.blogspot.com/
*/

/* HEADERS */
#include <gtk/gtk.h>

/* MAIN */
int
main( int argc, char *argv[] )
{
/* declare new Gtk Widget */
GtkWidget *window;

/* initiate gtk app */
gtk_init( &argc, &argv );

/* create new Gtk Top-Level Window */
window = gtk_window_new( GTK_WINDOW_TOPLEVEL );
/* set window title */
gtk_window_set_title( GTK_WINDOW( window ), "Begin GTK+ w/ [JaPh]");
/* set window border */
gtk_container_set_border_width( GTK_CONTAINER( window ), 10 );
/* set window size */
gtk_widget_set_size_request( window, 400, 300 );

/* connect signals on destroy app */
g_signal_connect( GTK_WINDOW( window ), "destroy", G_CALLBACK( gtk_main_quit ), NULL );

/* show Gtk window */
gtk_widget_show_all( window );

/* Gtk main app activate */
gtk_main( );

/* app return */
return 0;
}

Well, try to modify to see some effects. senyumkenyit

Have fun!@

Tired of coding Gtk+ w/ other text editors or IDEs?
Ever tried Eclipse? Yes, it's open-source, free and easy-to-use, of course.
It worths a try, believe me ! :sweaty:

Follow my instructions step-by-step below:

1. Use your Linux system to install Eclipse first, make sure you're running under Gnome.
note: make sure you install Eclipse CDT (C/C++ Development Tools) and Gtk+ 2.0 Development Headers and Libraries.

2. Launch Eclipse then create a new empty C project.

3. Under menu Project, choose Properties. Locate C/C++ General => Paths and Symbols

4. Under tab Include => choose GNU C then click button Add, a dialog pops up. Here you place the path of include folders need for Gtk+ headers.
- In order to find out headers need for Gtk+, use pkg-config tools, I mentioned in previous post. Check it out.minum

5. Locate C/C++ Build => Settings, under tab Tools Settings, select GNU C Linker => Libraries, then add libraries into text 'Libraries (-l)'. Again, use pkg-config tools to check required libraries for Gtk+.

6. Finally, add a new source C/C++ file and rock! :woooh:

Have fun!@

Well, there's a tool in Linux call pkg-config, which helps us here.

Simple sample:

~ ] $ pkg-config --cflags gtk+-2.0

It will return this:

-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12

So you can check dependencies for your libraries.

Have fun!@

Have you ever tried to mount ISO or any Image Files in Linux before? Give it a try, know more tricks of using Linux with me .:hi:

1. Open shell / terminal under `root`.

2. Create a mount folder first
root ~ ] $ mkdir /mnt/diskiso
note: diskiso is the name of folder you want to name.

3. Start to mount iso to that folder
root ~ ] $ mount -o loop disk.iso /mnt/diskiso

Well done!
Enjoy your mounted virtual disk...:inlove:

Have fun!@

I’m not kidding. It not just sucks network but also sucks your everything inside your lovely computer.

Here the reasons that make me hate this product

1. It’s freaking heavy,   even if your hardware are good, Norton sucks all best of your hardware.

2. Tons of services load at startup and run in background mode. It sucks on timing there.

3. After installation, it’s everywhere in your data and documents. However, when you uninstall it, either through Windows Uninstaller or Norton Removal Tools, you’ll never get rid of it. It still remains the leftover somewhere in your computer . Therefore, it sucks on management.

4. If you’re on network connection, you will get disconnect very often. Firefox goes on a “Failed to Connect”, IE just keeps on a “Webpage cannot display”, it’s because of Norton product. As you see, it sucks your network.

5. Finally, it’s so expensive . That’s it! It sucks your bank account.

That’s why I hate it very very much since it SUCKs your life. My suggestion, don’t burn your money for this product.

Don’t believe me? Well then, go ahead and give it a try. Remember, don’t complain because you’ll suck your own    afterward.

I’m currently working on a small project with my friends.

This is the information about it, you download file below.

Download Project Information

However, only members of this project are allowed to read this information. Password is known by members.

Hope it’ll be done soon!@

There're some pre-defined macros in C, and we can make use of them to save programming code.

__FILE__ - a string that holds the path/name of the compiled file;
__LINE__ - an integer that holds the number of the current line number;
__DATE__ - a string that holds the current system date;
__TIME__ - a string that holds the current system time;
__STDC__ - defined as the value '1' if the compiler conforms with the ANSI C standard;
__cplusplus - determines if your compiler is in C or C++ mode. Usually used in headers.


#include <stdio.h>>

int
main( void )
{
printf("The path/name of this file is %s\n", __FILE__);
printf("The current line is %d\n", __LINE__);
printf("The current system date is %s\n", __DATE__);
printf("The current system time is %s\n", __TIME__);
#ifdef __STDC__
printf("The compiler conforms with the ANSI C standard\n");
#else
printf("The compiler doesn't conform with the ANSI C standard\n");
#endif
#ifdef __cplusplus
printf("The compiler is working with C++\n");
#else
printf("The compiler is working with C\n");
#endif

return 0;
}
It's self-explained source ^^!

Have fun!@

Well, Y! 360 has announced that it will officially close its social network in July 13, 2009. It's close now, 3 days count down. 'N it's time to say goodbye for the sunken blog.
Y! 360 has done enough in initiating the social network, it took the first step to empower the strength of blogs 'n e-community.
Thru time, the betters stay, 'n the rests are left behind 'til dead.
Well done, Y! 360.

'n you, wanna say something or last words to Y! 360?

Let's count down....3 - 2 - 1 => July 13, 2009

Have you ever heard or thought of it "run php script w/o extension"?
It's really really fun, actually. Wanna try it? Follow me below.
There are many methods, well, pick one for you.

A – Using Handler

1. Make sure you have Apache server config and run correctly with php script. No kidding here, I have no idea if you use anything other than Apache HTTPD Server ... (suck urself )

2. Open Apache config file, I mean: ~/Apache/conf/httpd.conf

3. Now, look for section: <IfModule mime_module>

Insert these lines, make sure you don’t duplicate anything already exist.

AddHandler server-parsed .php
SetHandler application/x-httpd-php
AddHandler application/x-httpd-php .php

4. Save then restart Apache to reload configuration.

B – Using mod_rewrite

Step 1, 2 do as above.

3. Uncomment to load rewrite module

4. Input these code at the end of the file to define action for rewrite module (mod_rewrite)


 RewriteEngine On 
RewriteRule ^[^.]+$ - [T=application/x-httpd-php,L]

5. Save then restart Apache.

Try to redo if you failed , and make sure everything is just right.

If you fail to do, it means you SUCK, dude

Have fun!@

If you're dealing with iPod trouble of hanging screen "Do not Disconnect" or "Ok to Disconnect", follow my instructions, it'll be fine.

1. Unplug iPod from any cable connection.
2. Press and hold Menu button and Center button at the same time for about 10-15 seconds.
3. When a rebooting screen appears ( a white apple ), wait for seconds then enjoy again....!

Have fun!

Personally, I get used to with Avira AntiVir. It seems working quite well.

You may wanna try it!

Click here to download FREE EDITION
You also can offer to PREMIUM EDITION

Have fun!

Let’s work out together with Gtk+ 2.0.

Well, you need to setup your environment with Gtk+, already support by Gnome if using Gnome/Linux.

Let’s do this: “Hello World


#include 

void
destroy( void )
{
gtk_main_quit( );
}

int
main( int argc, char *argv[] )
{
GtkWidget *window;
GtkWidget *button;

gtk_init( &argc, &argv );

window = gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_container_border_width( GTK_CONTAINER( window ), 10 );

g_signal_connect( GTK_OBJECT(window ), "destroy", G_CALLBACK( destroy ), NULL );

button = gtk_button_new_with_label( "Hello World" );

g_signal_connect( GTK_OBJECT( button ), "clicked", G_CALLBACK( hello ), NULL );
g_signal_connect_object( GTK_OBJECT( button ), "clicked", G_CALLBACK( gtk_widget_destroy ), GTK_OBJECT( window ) );

gtk_container_add( GTK_CONTAINER ( window ), button );

gtk_widget_show( button );
gtk_widget_show( window );

gtk_main ();

return 0;
}

There you have the source, well, named it “hello.c”

To make it work, let’s compile

japh@server ~] $ gcc -Wall -g -o hello hello.c $(pkg-config --cflags --libs gtk+-2.0 gmodule-2.0)

Then just run ….

Have fun….


[Note: source code updated - 13 August 2009]

It took me 20min to setup this templates:

INSTALLATION INSTRUCTION

1. Download and extract the zip file.
2. Login to your GooglePages http://pages.google.com and upload all of the images under /images folder
3. Edit the XML file (itheme-techno.xml) and replace http://YOURGOOGLEPAGES.googlepages.com with your Google account.
4. Login to your Blogger Dashboard
5. Go to Layout > Edit HTML
6. Upload XML Template file (DO NOT copy and paste the code directly to template editor box)
7. PLEASE DO NOT PREVIEW YOUR BLOG. Go to Layout > Page Element
8. Edit "Top Menu" widget. Add at least one link, for example you can make a link to your blog homepage with "Home" anchor text
9. Edit "Archives" widget. Chose "Flat List" Style and "MM YY" Date Format style, for example "February 2008"
10. Edit "Recent Posts" widget. Change Feed URL to http://YOURBLOGNAME.blogspot.com/feeds/posts/default
11. Edit "Recent Comments" widget. Change Feed URL to http://YOURBLOGNAME.blogspot.com/feeds/comments/default
12. Go to Settings > Formatting, choose Timestamp style: "Wednesday, Januari 30, 2008"
13. Finish. Preview your blog to see the result.

Click here to download

Passing through lots of blogs already, Blogspot is my next footstep.
Ya wanna know wut kinda blogs I've been thru? Here...

1. Yahoo 360! : this guy sucks...it's non-sense for the thing called "customized templates"...Yo's blog would always end up w/ a Y! ad header...
2. Opera: tooooo simple...nothing's cool for development.
3. Bo-blog: Chinese? hum....I hate complicated configuration.
4. MS Live Space: cool, nice; however, lacks of templates, no customizing; tons of gadgets, well, they're all not cool in term of size and the annoying scroll bars o_O;;. The thing I hate most about Space is that I'm limited to create more categories for blogs, around 8-10. I'm a well-organized person, everything must be in its group and order.
5. Blogspot: the latest one, I'm checking whether it's worthy to use or not