Posts

JDeveloper Flickering Issue

Ok, I have to admit that I am trying to shift my JAVA development to JDeveloper, though natively I am an Eclipse user. I found some issues in the JDeveloper, thought better to report them to you since I am unaware of any fix/issue/bug tracking system. In JDeveloper if you have the Application Navigator opened, and you just expand and collapse the > Projects, it flickers alot. I switched to Classic theme. This is propotional to the items within the project. The more the number of items, the more the flickering is.  I am using Ubuntu 10.04 LTS, Running on Lenovo X200. Anti-aliasing Not able to deleted in a newly created java file in a newly create java project

Imote2 with Camera setup IMB400 over Ubuntu 9.10/10.04

Imote2 Camera driver for TinyOS is available in contribution directory of  TinyOS 2.x . It goes by the name of  tinyos-2.x-contrib . Its location within is  tinyos-2.x-contrib/intelmote2/apps I am assuming that you have tinyos-2.1.1 installed, this is required to have Camera Driver build. If you dont have it installed... than better have it done by invoking: apt-get install tinyos-2.1.1 From here on to get the driver working,  the procedure is as follows: Browse to opt directory. cd /opt The recommended way to get the source of tinyos-2.x and tinyos-2.x-contribis is through CVS. echo "Getting TinyOS 2.x and TinyOS 2.x-contrib from CVS" echo "Press enter when asked for password." cvs -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos login cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co -P tinyos-2.x cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co -P tinyos-2.x-contrib --OR--  e...

Using pthread in a C++ class, having thread function a member function

Recently we faced an issue of calling a pthread from within the class. Normally in C programming when using pthread, the pthread_create method takes the second argument as the thread entry function, i.e. the function which will run forever in the thread unless stopped. The address of the function is passed, but since the function name itself is the address of the function, hence just the name is specified. e.g. pthread_create(&m_threads, NULL, threadFunction, NULL); To achieve the similar thing in C++ having the thread function as a member function, the problem is faced with the address of the method. C++ assumes that the thread function should be static and able to run independently. So a static function within the class is expected. Since static function cannot invoke members which are non static, therefore we need the following solution. pthread_create(&m_thread, 0, &CClass::threadFunction, this);                 ...

SVN Client for Ubuntu: RabbitVCS

The best SVN Client would definitely be an integrated file manager in which you can actually checkout, export, commit files without dealing in to the committing issues. On Ubuntu it would be Nautilus as a file browser. TortoiseSVN is the one I was used to when working on Windows machine.  But on Ubuntu RabbitVCS  http://rabbitvcs.org/  comes to the rescue. Noticed the analogy, Tortoise on windows and Rabbit on Ubuntu :). Just download the plugin from  http://wiki.rabbitvcs.org/wiki/download  which is available for most Ubuntu releases, hardy, karmic, interpid, jaunty and you will see the  http://wiki.rabbitvcs.org/wiki/about/screenshots Enjoy SVN-ing

NesC Development

Since developing using TinyOS's NesC language is really very difficult, hence as always,  Eclipse comes to rescue. Below is the Plugin location for Eclipse for NesC development. http://tos-ide.ethz.ch/wiki/index.php It is required to put the above plugin in the plugins folder in the eclipse home directory. Also it is possible to practically debug NesC code using GDB which comes in by default with Eclipse CDT.  Below is the link to proceed on howto achieve it. http://www.tinyos.net/tinyos-1.x/doc/nesc/nesc-debugging.htm l Look into my post about Eclipse over Ubuntu to begin with. http://talhaobaid.blogspot.com/2009/04/development-on-unix-using-cc-over.html TJ now you owe a coffee to me :)

How to locate a memory leak in C?

Though it is an extremely programming intensive task to fix a memory leak, still if possible to get any help in finding the leaking source hint, it is really very helpful, trust me. On Ubuntu you may get many memory leak fix solutions. But the best which did saved the day turned up to be   Valgrind ... tada... If you don't have valgrind installed you can install it by apt-get install valgrind Valgrind comes with a command prompt interface. Although its GUI clients are also available like Valkyrie etc, but command line interface is enough. To check memory leak location you can execute the following command definitely with all the supportive arguments valgrind --leak-check=full ./executable arg1 arg2 This will show the memory leak in the bottom up fashion showing the stack. For instance if there is a memory leak in func1(), than the stack would show something like: malloc() func1() main() You have to intutively identify the hint of the stack. For exa...

Evolution email client over Ubuntu

Since I am expecting that you would be spending more time over your Ubuntu machine, than on Windows, therefore if you were an Outlook savvy person like me, you cannot live without   Evolution 2.28.1   on   Ubuntu 9.10 .  Ubuntu comes with a default Email client named  Evolution . Evolution cannot connect with  MS Exchange Sever 2007 . By default Evolution will never let you connect to MS Exchange Server 2007 with "Exchange Server" selected as  Server Type  during Account creation wizard at the start of Evolution. Moreover if you select "Exchange Server" it takes OWA path which is the web interface for Exchange Server. So you would be expecting authentication failure with the error message about  Exchange connector . The solution is to install "evolution-mapi" from System->Administration->Synaptic Packager Manager. If this would still not solve your problem as it did with me, than you need to install the latest stable version of evolu...

Development on Unix using C/C++ over Ubuntu

For Development over Ubuntu in C/C++, you don't need to go through complex terminal commands. Just download Eclipse for C/C++. Remember if you run the command  apt-get install eclipse , it will install Eclipse for JAVA not for C/C++. Eclipse for C/C++ should be downloaded specifically from the www. eclipse.org  site. From the following: http://www.eclipse.org/downloads/ Click  Eclipse IDE for C/C++ Developers. The best thing about this IDE is that it come with pre-configured GNU Debugger for C/C++ and with pre-configured Makefile build. Another option would be Sun Studio, Sun Studio is not for JAVA. It is for c/C++/Fortran. I would recommend you go for Sun Studio only if you are familiar with Makefiles

Learning Algorithms(and other subjects) from MIT

For those of your who are interested in polishing  Algorithm  skills either for your or for any  Bachelor's level course work  or for any  interview , here is an  excellent  resource from a very accredited institution, MIT. http://ocw.mit. edu/OcwWeb/ Electrical- Engineering- and-Computer- Science/6- 046JFall- 2005/CourseHome/ index.htm (6.046J / 18.410J Introduction to Algorithms (SMA 5503), Fall 2005) It includes  Video lecture series  which is indeed very easy and informative to learn from. I have taken few lectures and no doubt the subject is really very well explained. The Lecture slides and Video and Audio downloads are available at  http://ocw.mit. edu/ OcwWeb/Electrical- Engineering- and-Computer- Science/6- 046JFall- 2005/LectureNote s/index.htm Interestingly, this is Bachelor's level course with both Basic and Advanced topics covered and it follows the same book which we are using now for our Algorithm course in UET-CS ( Introd...