Wednesday, December 30, 2009

CodeBlocks Can Not Find SDL Library

I am using CodeBlocks 8.02 on Winodws XP. When I try to create a new project using SDL template, I met the problem that it can not recognize the SDL's installation path (unpacked only) properly. It seems there is a mismatch between SDL versions and Codeblocks versions. Luckily someone already solved this:


On the "New Project" page, right-click your mouse on SDL template, choose "Edit this script", then you can find the following code for patch.

Index: src/plugins/scriptedwizard/resources/sdl/wizard.script
===================================================================
--- src/plugins/scriptedwizard/resources/sdl/wizard.script (revision 5680)
+++ src/plugins/scriptedwizard/resources/sdl/wizard.script (working copy)
@@ -47,8 +47,15 @@
local dir_nomacro_inc = GetCompilerIncludeDir(dir, SDLPathDefault, SDLPathDefaultInc);
if (dir_nomacro_inc.IsEmpty())
return false;
- if (!VerifyFile(dir_nomacro_inc, _T("SDL.h"), _T("SDL's include")))
- return false;
+
+ if (!IO.FileExists(dir_nomacro_inc + wxFILE_SEP_PATH + _T("SDL.h")))
+ {
+ if (VerifyFile(dir_nomacro_inc, _T("SDL/SDL.h"), _T("SDL's include")))
+ SDLPathDefaultInc = SDLPathDefaultInc + _T("/SDL");
+ else
+ return false;
+ }
+

// verify library dependencies
local dir_nomacro_lib = GetCompilerLibDir(dir, SDLPathDefault, SDLPathDefaultLib);

Saturday, December 12, 2009

WiFi Radio Analyzer

Cisco Spectrum Expert can be used to analysis your radio spectrum status for debugging purpose. However, it does not capture packet trace. A H/W card is required to work with it. You can download this software from Cisco if you are authorized. Unfortunately I am not. :)
Image Quality Tuning Kit


Honestly, this is the first time I've had a chance to know anything about camera R&D. The website above sells kits for tuning.

Enjoy!

Thursday, December 10, 2009

Congratulations! Ubuntu is Popular Enough Now! Literally!

It is popular enough that someone decided to write some malware for it.

http://www.omgubuntu.co.uk/2009/12/malware-found-in-screensaver-for-ubuntu.html

Good thing is we know we should avoid install .deb files now.

Bad thing is you can not install any stuff if you can't use .deb.

The happiest one would be cloud computing service providers that
eventually we all suffer from malware, virus, and so on. Besides
cloud services.

But the really happiest one would be hackers who can hack into
cloud computing farm because they can have one stop shopping
experience. No more fighting against different versions of OS
and patches....

Wednesday, December 09, 2009

Enabling Ubuntu Remote X11 Desktop Access

I modified the following two lines in /etc/gdm/gdm.conf:

DisallowTCP=false

Enable=true (in [xdmcp] section.)

Restart the gdm by sudo /etc/init.d/gdm restart

Now I can use xming to connect to my desktop without a problem.

Is there a way I can disconnect and connect again without terminating the session?

Monday, November 23, 2009

Identifying Where The Illegal Instruction Is

I am debugging an application which generates illegal instruction error for unknown reason and under unknown conditions. Some one pointed me to a web page for root causing it. Here is how:

1. Enable CONFIG_DEBUG_USER feature in the kernel.
2. Set the kernel variable user_debug to 1 (only bit 0 matters in debugging this problem).
3. Do the test.

One thing not so important here, lxr seems to have trouble location user_debug in the kernel source tree it has cross-referenced. But it ought to.

Saturday, November 07, 2009

How to Force Subclipse to Use English

Subclipse detects the system locale and uses the language matching the system locale that I am not familiar with when I am working. I found this can be solved with this article, the solution I took was to add two lines at the begining of eclipse.ini:

-nl
en_us

which forces the locale to be English, United States. After restart, it works after refreshing the menus of subclipse.

Wednesday, September 02, 2009

TFTP Servers

They are something many RD uses daily. Just to list a few of them for tracking purpose only:

On Linux, this one is good to use and with security in mind:

TFTPgui - I found it at http://code.google.com/p/tftpgui/

On Windows, these two are good to use:

TFTPD32 - It is a legacy among many engineers I know.
Pumpkin - I knew about this one lately, it seems to be a good one, too.

None of them is perfectly I want. An ideal one to me should include:

1. multiple directories search capability.
2. warns properly for download / upload activities.
3. forwarding requests to another server.

I'd like to explain 3 a little bit more. It is typical that we have a dedicated build server. We typically connect the test net to our own computer's 2nd NIC to disconnect it from Intranet. When the target device needs to download, it can only talk to our computer, and the built code is one the primary NIC. So it would be optimal to forward the TFTP requests from our target device. Does it make sense?

Saturday, August 29, 2009

Open E-Book Format

I happend to found this today: http://en.wikipedia.org/wiki/Epub

It is pretty interesting to me that such a format exists. I do not have the money to buy an E-book reader such as Kindle. Before today, I thought the de facto format for E-books must be pdf.

I am not sure what is going to dominate the universe in the end. But a unified format definitely will help reform this publishing industry. Some would call it a thing that extincts publishing business. But hey, I don't think so. This E-book technology will face lift this industry. Not to extinct it but to make it circulate faster.

I can't stop to think about the current problem of newspapers in countries with widespread Internet. They got their business shrinking because they did not do good enough to become a portal site that attracts enough eyeballs. Without enough scale, their ad business is going out to companies that knows how to do this on the Internet.

With the evolution/revolution of Internet technology, many has to make a decision now. They can choose to create their own business model in Internet age. Or to close the door and turn themselves into some expensive watch makers that becomes something for rich people's exhibit.

Staying still is not the way out.

Thursday, August 13, 2009

A Special Crash Report

I've never seen something like this, but this one is really cute. (At least to me...)


'import site' failed; use -v for traceback
Sorry, command-not-found has crashed! Please file a bug report at:
https://bugs.launchpad.net/ubuntu/+source/command-not-found
Please include the following information with the report:
No module named CommandNotFound
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 10, in
from CommandNotFound import CommandNotFound
ImportError: No module named CommandNotFound
Python version: 2.5.2 final 0