preload
Mar 11

This article is absolutely for beginners those who want to choose / learn best IDE for their project Development. Both IDE has lot of features and supporting major programming languages [ Java , C , C++ , PHP , HTML , Perl , Python , Ruby Etc .. ] . The Comparison of these IDE are given here
Eclipse IDE

Pros

  1. IDE Features [ Syntax Highlighting , Debugging , Preview ...]
  2. Full Java , J2EE Development Support.
  3. Various Flavors are available [Eclipse Classic , Eclipse for Java  , Eclipse for J2EE ... ]
  4. Plug-in Development Support
  5. Perl , Python , C , C++ , Ruby on Rails language support
  6. Plug-in s are more [ You can find from Eclipse Plug-in Site ]
  7. Execution Speed is good ,Memory Consumption is less, Eclipse will also work in 512 MB RAM ,
  8. Debugging support for all languages.
  9. Developer friendly

Cons

  1. Single Bundle or package is not available for all features.
  2. Lacks for Java Swing Designing
  3. No Internal Server for running Client / Server Script like apache or tomcat or glassfish

Netbeans IDE

Pros

  1. All IDE Features
  2. Java, C , C++ , PHP , Ruby , groovy languages support
  3. Bundled with single package for all features
  4. Various flavors are available [Netbeans Java , J2EE , C ..]
  5. Debugging is good
  6. WYSIWYG design for Java Swing Application
  7. Full Java Script and CSS support
  8. Tomcat and Glassfish serves are in built with Netbeans IDE
  9. Developer friendly
  10. Option for uploading project into open source community [ using Kenai]

Cons

  1. Occupying More Memory (Min 512 MB)
  2. Execution Speed is somewhat low comparing to eclipse [But its  based on processor and memory )
  3. Plug-ins are less

Final Words

In my working experience with IDEs , If you want to develop Java Swing and J2EE Related Applications, you can move for Netbeans , or always choose Eclipse to code.

Feb 09

Python client/server programming with Apache and mod-python in Ubuntu 9.10.

1. Goto Synaptic Package Manager and install the following packages

a) apache2                                   [Apache Web Server]
b) libapache2-mod-python      [Module for running Python Programs in Apache using mod-python ]
c) mysql-server                          [Mysql Database Server]
d) mysql-client                         [Mysql Client Terminal]
e) pyhton-mysqldb                  [Pyhton and Mysql database programming fucntions ]
f)  python3,1                             [optional but i strongly suggesting you to learn python 3.x ]

2. After Installation You can start , stop, or restart the apache and mysql server using this commands

# sudo su
# /etc/init.d/apache2 start/stop/restart
# /etc/init.d/mysqld start/stop/restart

3. If You want to create mysql database , use the given command

# mysql -u root -p

[Type the password which  you had already given while installation of mysql server ]

4. Now Lets write one small web application  , Open Your favorite editor vim , gedit or Eclipse

# sudo su
# vim first.py
#!/usr/bin/python3.1
print(“Content-Type: text/html\n”)
print(“<b>My First Web Application in Python<b>”)

Save and copy the file into

# cp first.py   /usr/lib/cgi-bin
# chmod a+x /usr/bin/cgi-bin/first.py

5. Now Open your web browser and type the address like

http://localhost/cgi-bin/first.py

Thats it … Enjoy the power of Python programming …

Sep 20

Most of technical people are trying to migrate from windows to Linux now a days , but they are facing lot of problems with Linux . they do not even know the forums and blogs of Linux which would be useful for finding answer to their query. The main problem of open source is choosing right one for user need. Because so many open source softwares are available for a single thing. Surely user need some supportive forum or website to find that one . open Peta is also doing that job. The idea of this  post coming to my mind from my college friend . One of my colleague asked me about computer graphics program in Linux using C programming language. the questions is

How to draw line, circle , or 2D graphics in Linux Using C or C++?

I was searching Internet and found some softwares for developing graphics applications in Linux. that softwares are listed here

  1. GTK+   – Gnome Tool Kit
  2. QT  -  The X toolkit
  3. SVGALIB   [ #include<vgagl.h> ]
  4. libgraph [ #include<graphics.h> ]

GTK and QT are simple and used for high level Graphical User Interface [ GUI ] development. SVGALIB and libgraph is used for 2D graphics in Linux .  the syntax and functions are some what different for beginners  [specially the user from windows ] but most of users familiar with windows graphics.h header file in C and C++ , so we can move for libgraph which is exact one for windows graphics user . libgraph is an implementation of the Turbo C graphics API (graphics.h) on GNU/Linux using SDL [ Simple Direct Media Player ]. The library requires SDL for primitive graphics and SDL. First you need to install the following dependency packages using synaptic package manager in Ubuntu Linux to develop the graphics applications properly.

  • SDL Library
Installing SDL Library

Installing SDL Library

  • GUILE – GNU’s Ubiquitous Intelligent Language for Extension

GUILE Installation

GUILE Installation

  • After installing these two packages , download the libgraph and install in your system

#sudo su

#tar -xzvf libgraph-1.0.2.tar.gz

#cd libgraph-1.0.2

#make

# make install

For better understanding , watch this video given here ….


Developing Graphics Application

1. Open your favorite text editor and type the following code

1
2
3
4
5
6
7
8
9
10
11
12
13
#include "stdio.h"
#include "graphics.h"
int main()
{
int gd=DETECT, gm=VGAMAX;
initgraph(&amp;gd,&amp;gm, 0);
moveto(0, 0);
setcolor(4);
rectangle(50,50,500,200);
while(!kbhit());
closegraph();
return 0;
}

2. Now compile the program with lgraph library

#gcc line.c -lgraph -o output

#./output

If you get any error in this line like

./output: error while loading shared libraries: libgraph.so.1: cannot open shared object file: No such file or directory

Do the following

sudo cp /usr/local/lib/libgraph.* /usr/lib

3. Now one new window will open , there you will get the output Rectangle in Red color.

Output Window

Output Window

The advantage of libgraph is very easy to remember the syntax  [ all functions are same as turbo c graphics.h ] . still if you are facing any problem to develop graphics applications using this , send your problems through comment page of this post.