C++ reference not to be confused with Java/Python/... reference

c++ java python

This program assigns a new object of class A to reference a. It looks as expected, reference changes to new object ( see line 23,24,25): #include <iostream> using namespace std; class A { string name; public: A(string n): name(n) { } A(): name("NO ONE") { } void print() { cout << "I am "<< name << "!"<< endl; } }; int main(int argc, char *argv[]) { A matrix = A("the matrix"); A &amp;a = matrix; a.print(); // What happens here?

Read more →

Getting started with Maven!

maven java

I installed Maven on my Fedora 12 box and fired the command listed at How_do_I_make_my_first_Maven_project : $ mvn archetype:create \ -DarchetypeGroupId=org.apache.maven.archetypes \ -DgroupId=com.mycompany.app \ -DartifactId=my-app /usr/lib/jvm/java [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid version could be found [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: &amp;lt; 1 second [INFO] Finished at: Thu May 20 13:15:56 GMT+05:30 2010 [INFO] Final Memory: 13M/26M [INFO] ----------------------- I tried to debug it further by adding -X and -e options to the commandline.

Read more →

Its time to leave autotools and learn other build tools

autotools build

The most promising tools I found are SCons, CMake and Waf ( little brother of SCons ) SCons is written in Python and very extensible, but it might be slow for other large projects [1]. CMake is written in C++, is faster than SCons but is arguably not as extensible as SCons [1]. [1] Evalutation of various build tools Here is another article: Battle of the build systems

Read more →

Installing TOra on Fedora 12

tora mysql linux

Installing TOra( http://torasql.com/about ) for MySQL on Fedora 12 Get the Fedora 12 RPM package tora-2.1.2-1.fc12.x86_64.rpm from http://sourceforge.net/projects/tora/files/ Download oracle-instantclient11.2-basic- from Oracle’s website http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxx86_64soft.html $ sudo yum install qscintilla $ sudo yum install qt-mysql $ sudo yum localinstall --nogpgcheck oracle-instantclient11.2-$ basic- $ cd /usr/lib/oracle/11.2/client64/lib/ $ sudo ln -s libclntsh.so.11.1 libclntsh.so $ sudo yum localinstall --nogpgcheck tora-2.1.2-1.fc12.x86_64.rpm Now tell linker to find oracle client libraries: $ export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib/ Run tora $

Read more →

All about linkers

linkers compilers

All about linkers: Linkers part 01: click Linkers part 02: click Linkers part 03: click Linkers part 04: click Linkers part 05: click Linkers part 06: click Linkers part 07: click Linkers part 08: click Linkers part 09: click Linkers part 10: click Linkers part 11: click Linkers part 12: click Linkers part 13: click Linkers part 14: click Linkers part 15: click Linkers part 16: click Linkers part 17:

Read more →

How does live linux disk work without any swap for applications bigger than available RAM?

swap OS Linux UNIX

How does live linux disk work without any swap for applications bigger than available RAM? This question has occurred to me a lot of times. In the normal scenario I configure enough swap space on the harddis for my GNU/Linux installation. It looks clear that whenever a new request for memory is made by an application, the Linux kernel (OS) gives that request by swapping out a page into swap space ( when there wasn’t enought space available in RAM).

Read more →

Explore. Dream. Discover.

thoughts inspiration

Twenty years from now you will be more disappointed by the things you didn’t do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sail. Explore. Dream. Discover. Mark Twain

Read more →

Object Oriented programming in C!

Glib-C C

Glib-C: C as an alternative Object Oriented Environment book PDF Glib Tutorials: https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?source=dw-linux-glib&S_TACT=105AGX59&S_CMP=GR&ca=dgr-lnxw16GLibCollections http://www.ibm.com/developerworks/linux/library/l-glib.html http://www.ibm.com/developerworks/linux/library/l-glib2.html GObject: http://library.gnome.org/devel/gobject/stable/ Compiling GLib Applications: http://library.gnome.org/devel/glib/stable/glib-compiling.html

Read more →

JDB - Java Debugger

java jdb debugger

Debugging Java Code jdb supports fairly primitive support for debugging, which is sufficient ( sort of ) when used as a backend for an IDE ( like NetBeans, Eclipse etc. ). However when I compare it with GDB ( the GNU Debugger ), as a tool to be used on the terminal, it seems to be pretty old. JDB lacks in features and commands which GDB specializes in. I was mainly interested in abbreviation of commands.  Like s ( step ) c (continue) bt ( backtrace ) etc.

Read more →



Branching and Merging Creating a branch: git checkout -b branch-name OR git branch branch-name git checkout branch-name Example: $ git branch rm123 $ git checkout rm123 Merging a branch: $ git checkout master $ git merge rm123

Read more →