Posts

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...

Final Year/Semester Project Ideas...

There are few good project ideas below, do explore: http://dea.brunel. ac.uk/ugprojects /bystaff/ http://dea.brunel. ac.uk/ugprojects /ece-eng/ http://student. bton.ac.uk/ engineering/ project/project. html http://mictechcente r.org/fy_ projects. xls

Embrace Eclipse

For those of you who don’t know,   Eclipse Framework   ( http://www.eclipse.org/ ) is a freeware IDE. It’s SDK and documentation is freely downloadable from  http://eclipse.org/downloads/  without any registration or fee required. Eclipse primarily is an   IDE to make IDEs. Many Silicon Valley Giants are either contributing or using Eclipse Framework for their Main Line Flagship software products, Following is the list of companies to name a few which are part of Eclipse Foundation : Actuate, Agitar, Aldon, Avant Soft,   BEA,   Bedera Research,   Borland,   BZMedia,   CA , Catalyst Systems, CodeNovo Consulting, Collabnet, db4Objects,   Ericsson,   ERTI, Espirity, Exadel, Genuitec,   Hewlett Packard,   Hitachi,   IBM,   ILOG, Innoopract, Innovent, Instantiations, Intel,   ITG, Lombardi,   Mentor   Graphics,   Monta Vista,   Novell,   NTT Com, Omondo,   Nokia, Open Sys...

Escape Sequences in C++

On UNIX new line in text files is LF (line feed character, ASCII 10). On DOS/Windows, the new line characters are CRLF (carriage return + line feed, ASCII 13, 10). To write a new line in DOS/Windows, the exact sequence is “\r\n”. You might have noticed this in some programs. However, to make DOS compatible with UNIX conventions, some functions internally translate “\n” to “\r\n”. For example, printf does this translation so you only need to say “hello\n” but the DOS-specific cprintf (this used to be in Borland C) does not perform this translation because this function is not available on UNIX so it expects DOS-specific codes, so you must use “hello\r\n” with this function, otherwise it would print lines with a stair-case effect:   Like “Hello\nWorld” may appear as: Hello        World

Exception System.Arithmaticoverflow .NET

I happened to face exactly the same problem. This problem appeared on my machine when I was trying to work with  two versions of .NET framework 1.1 and 2.0 Beta  concurrently installed. It was very annoying indeed as it was not letting any drawing/showing of dialogs as it would popup a message that unable to calculate because of Arithmatic Exception.   Anyway I figured out that this problem was because of corrupted version of .NET framework. And the binaries (.exes and .dlls) are either missing or corrupted in the installed .NET path. The .NET contains all the required libraries and executables to compile and run the .NET application. My problem was solved when i  reinstalled .NET  only. The CDs that comes with VS.NET installation have a separate CD containing the Windows Component Update. On this CD there is a specific folder having only the .NET installation setup with name something like dotnetfx etc. Just run this executable and hopefully yo...

Connecting Oracle8i with Java

Bear this in mind that whenever you use Oracle DON'T use Microsoft provided Driver. Always go for the one provided by Oracle itself e.g. "oracle odbc driver" Next is instead of using the following:        Class.forName ( "sun.jdbc.odbc.JdbcOdbcDriver" );        String url = " jdbc:odbc:thin@localhost:1521:orcl "; You can also use       Class.forName (" oracle.jdbc.driver.OracleDriver ");       String url = " jdbc:oracle:thin@localhost:1521:orcl "; As far as the Datasource name is concerned, the default datasource name is                  beq-local.world   PS:Oracle is bit tough when it comes to running server on Windows box. Anyway the best pair for both Oracle and Windows is "Oracle 8.0.5 for Windows NT" and "Windows NT 4.0 Server" respectively. Also the old Oracle Developer works qui...

Images vs Graphs - Zooming In/Out

About Zooming In or Out, the concept is fairly logical. When dealing with  images  we follow a different technique as compared to  graphs .   In case of  Images  Zooming In ( making the picture bigger ) actually copies each pixel's value arround itself in all directions. For instance consider the following is pixels values from an arbitrary location within an image.                           89  56  74                   82 82 82   4  82   5    When Zoomed    82 82 82  i.e. The pixel at the middle 66   2  19                   82 82...

Graph Implementation

For  C++ Implementation  of Graph Abstract Data Types ADT:   The Graph Template Library - Stable branch http://freshmeat.net/projects/thegraphtemplatelibrary/   based on STL, Standard Template Library   Java Implementation   JGraphT - Default branch http://freshmeat.net/projects/jgrapht/   JGraph - Default branch http://freshmeat.net/projects/jgraph/   based on SWING.

Bjarne Stroustrup: The Design of C++0x

Bjarne Stroustrup The Design of C++0x Reinforcing C++’s proven strengths, while moving into the future http://www.informit.com/content/images/art_stroustrup_2005/elementLinks/rules.pdf

Google "20 percent time" policy for its Employees

http://www.pcma.org/resources/convene/archives/displayArticle.asp?ARTICLE_ID=5074 "To a person, these Googlers pointed to so-called “20 percent time” as a key ingredient of the company’s innovation effort. Put simply, 20 percent time allows Google’s technical people (the vast majority of the company’s employees are engineers) to spend 20 percent of their time working on new ideas large or small. Although it is not a new idea (3M has had a 15 percent rule in place for many years), it is interesting to consider just how vital this mechanism for creativity is to Google’s current success." Also http://www.eightypercent.net/Archive/2005/03/24.html

Integrating Matlab files w/ other languages

MATLAB provides a compiler which can convert .m files into dll or even C code. MCC  is MATLAB to C/C++ compiler. It can compile m-files to executable files with  exe  or  dll  extension. Consult the following article: MATLAB MEX-files http://www.codeproject.com/samples/mexFunction.asp   Visual Basic can used to call dlls using Declare   Function  matfunname  Lib  "dllname"  Alias  "matfunnameA" (ByVal/ByRef  arg1  As   String, ByVal/ByRef  arg2  As String,...  )  As String syntax. Moreover with the full version of Matlab available from market contained on two cds, the compiler is also available. I hope that above explaination will suffice.

Convert 2D points (screen coordinates) into 3D points

The monitor/lcd screen is actually a 2D space. Any point having both x and y values can be plotted over a monitor/lcd screen. How is it possible to have a third coordinate or a 3D look on a 2D space? The concept of 3D in the above mentioned case is a third coordinate namely 'z'. The effect of using the 3rd coordinate on a 2D space appears in terms of   1. " ZOOMING In or Out "  2. " Which object/item/thing should come to forth or back ".  In case of GUI development a very infamous term  Z-order  is used which decides  which object/control should come above which object etc.  Whereas  Zooming In (object is magnified/bigger) or  Out (object is de-magnified/smaller),  either of the two to choose, the z coordinate decides.   Also the  lightening-effect  and the  shadow-effect  plays a very important role in case of 3D games. The concept related to them is called " Ray Tracing ". I hope the above wo...

Oracle doesn't have the scrollable cursor support?

Whenever accessing Database I would highly recommend that you maintain a  table cache  of your own inside the program and traverse through the table within that cache.   Better not to use ResultSet and replace it with your own  Data Structure . There are two reasons why this technique should be followed.  First  a ResultSet contains mostly redundant info as well and it occupies space in memory for all the time.  Secondly  most of the time ResultSet if bounded with Database itself and causing delay for extremely large tables, because of the rule of Thumb that HardDisk seek time is much greater than memory access time.   A custom data structure (a structure or class) can be very easy to implement since the table entries obtained from the ResultSet are mostly parsed as Strings.   We can use any of  java.util.Vector  or  java.util.ArrayList . The  ArrayList  class is also available in C# under  Syst...

Branch and bound algorithm in C#- Article by AsiF Munir

A very authoritative Article along with Implementation by Asif Munir ( http://www.navicosoft.com ) on  Branch and bound algorithm in C#  h ttp://www.codersource.net/microsoft-net/c-image-processing/branch-and-bound-algorithm-in-c.aspx It was also selected as a   Top Pick of the month at  http://www.codersource.net/default.aspx A very encouraging contribution indeed.

The DEMISE of Visual Basic 6.0

Microsoft MVPs move to save Visual Basic http://www.zdnet.com/news/microsoft-mvps-move-to-save-visual-basic/141731 Microsoft walks VB tight rope http://news.cnet.com/Microsoft-walks-VB-tight-rope/2100-1007_3-5620821.html