Play your age
A lady is having a bad day at the tables in Vegas. Down to her last $100, completely exasperated, she cries, “What rotten luck! What in the world should I do now?”
A gent next to her, trying to calm her down a bit, calmly suggests, “I don’t know… Why don’t you play your age?”
He walks away. Moments later, his he is intrigued to hear a great commotion at the roulette table. Maybe, she won!
Code::Blocks won't edit wxSmith file, sloved
While I'm using Code::Blocks, it crashed suddenly and when I reopen the project, one of the newest panel created by wxSmith won't open in Resources mode, instead, it opened as text file. Thus I can't change the GUI in wxSmith. Here's steps to fix the issue.
1. Add the .h, .cpp and .wxs into the project if it's not there
2. Close project
3. Open cbp file in a text editor, btw I like PSPad and Notepad++ the most on Windows and Geany on Linux
4. Find the section in the cbp file:
Debugging and Logging in wxWidgets with wxLogWindow
wxLogWindow make it much easier to debugging and logging.
in the constructor add the following code:
#if defined(__WXDEBUG__ )
//logging and debugging
wxLogWindow *w= new wxLogWindow(this, wxT("Logger"));
w->Show();
#endif
Then, in anywhere, add the following:
wxLogDebug(wxT("Debug message"));
Setup C++ Development using MinGW, Code::Blocks on Windows Vista
Download and install MinGW: 1. download MinGW-5.1.4.exe, create c:\MinGW, and run it. It'll download and install the current stable version of GCC, G++ etc. 2. set the environment, add c:\MinGW\bin;C:\MinGW\libexec\gcc\mingw32\3.4.5 to PATH 2.1 download gdb and extract to c:\MinGW 2.2 start a console, make sure you can run gcc -v and gdb -v 3. download code::blocks 8.02, install and start it 3.1 in code::blocks, settings->Global compiler settings, selected compiler=GNU GCC Compiler, then add the following into Search directories
Compiler tab
Switching Debian repository
While running apt-get update, I found one of the source repository debian.cn99.com is not responding, so I checked the Debian mirror page, there's another repository "www.anheng.com.cn" good enough in China, so I decide to switch my repository to it. Here's the steps:
Install flash plugin on Debian 4.0
- download install_flash_player_9_linux.tar.gz from www.adobe.com
- extract to a folder, close your browser, then run ./flashplayer-installer
- when asking installation path of the Mozilla, Netscape, or Opera browser, typein /usr/lib/iceweasel
- start browser, in the address type in about:plugins
Flex in a week video training: Day 2
http://www.adobe.com/devnet/flex/videotraining/
Day 2. Here's the finished exercise.
Flex in a week video training: Day 1
http://www.adobe.com/devnet/flex/videotraining/
Finished Day 1 training. Here's the result file of exercise 1.1-1.3
Simple function to parse RGB value
Here’s a simple function to parse RGB string (#00ff00) into array, so it can be used in GD functions.
Hope it can save a little time for you.
list($r, $g, $b)= parse_RGB("#123456");
function parse_RGB($color)
{
$r= hexdec(substr($color, 1, 2));
$g= hexdec(substr($color, 3, 2));
$b= hexdec(substr($color, 5, 2));
return array($r, $g, $b);
}
Nice barchart with HTML/CSS only
http://concepts.waetech.com/bargraph/ Checkout this page.


