Saturday, November 19, 2011

At Sachin's home

Ajay Kulkarni


Re-narration by Ajay K in Kannada targeting Karnataka for this web page

Monday, October 24, 2011

Was testing ..

About what?? Sign In where?? Sample of what types??

Thursday, July 15, 2010

Installing CDT( C/C++ Development Tool ) in Eclipse and Running C/C++ program

Hi, I could write this blog only after visiting many sites, Thanks for those websites.
As you all know Eclipse a famous IDE compiler for Java. Here why I'm choosing Eclipse (Galileo) instead of other IDE compiler because Eclipse is used vastly and stable one, in eclipse you can easily trace out the flow of control of Java code and also you can easily understand the program.

Do you also know, we can install other compilers in eclipse as a plug-ins? Yes, we can install as plug-in. "Thanks for the Development Team". Here I'm blogging how we can install it but before that we need to install Eclipse IDE Compiler and we can install it by command

sudo apt-get install eclipse

Installing CDT

1. Run the Eclipse and in Main menu go-to Help->Install New Softwares. It will open a window with option "Work with" .
2. In "Work with" field paste the below link
CDT - http://download.eclipse.org/tools/cdt/releases/galileo

3. It will show the below two options,
+ CDT Main Features &
+ CDT Optional Features

check these two and also the four options in the "Details" field and Click "Next". (The downloading size of package is 100-120 MB)

4. Once it is finished then your are ready to run the C/C++ program.


Running C/C++ program in Eclipse

Running C/C++ program in eclipse is not easy, its a bit longer process than installing CDT :-)
For Windows Click here.
For Linux follow the below steps. And before that write the code in simple file with the extension C. Ex:- HelloWorld.C or first.c

Step 1: Open C/C++ perspective
1. Run the Eclipse and go-to "Windows-> Open Perspective-> Others

2. In "Open Perspective" window select C/C++ and click OK


Step 2: Create a C/C++ project
1. In Main menu "File->New->C Project"


2. In "C Project" window mention the "Project Name", select the "Project Type" and Select proper "Tool Chains" as show in below fig. Then click "Next".
3. Next it shows the two options of "Debug & Releases", select both and click "Finish".

Step 3: Adding files to the C Project.
1. Right click on Project name->New->Source File
2. Mention the "Source File" name with extension "C".
3. Again right click on Project name and Import files.
(REMEMBER) Where Importing file should contain C code.

4. In Import Source File, "General-> File System" and click Next.
5. Now browse the file in which your C code of Hello World.
6. Now select the file in which your "Hello World" C code should be there.
7. Now it will open that file. As shown below

Step 4: Build and Run the project manually
1. In Main menu go-to "Project-> Build Project"
2. Now Run the program as shown below or press "Ctrl+F11"
3. Observe the output in "Console" window.


Comments are welcomed.

Saturday, April 25, 2009

Connect Internet through mobile in Linux

Hi again, have you ever connected the internet through your mobile in linux platform?? i guess no, because the pc-suite for linux has not yet developed and using wine pc-suite won't install properly. But here are the 5 steps to connect.

Before you follow these steps 1st connect the mobile to pc by cable or bluetooth. If you are connecting by cable then select Nokia mode. Use these commands in terminal.


1. lsusb

You will get some lines of values which ranges of particular hardware connected to pc.
For example in my case.
Eg:-
Bus 004 Device 004: ID 0421:005e Nokia Mobile Phones
Bus 004 Device 003: ID 046d:c03d Logitech, Inc.
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 005: ID 0a5c:2101 Broadcom Corp.
Bus 001 Device 001: ID 0000:0000
Bus 005 Device 005: ID 0bda:0158 Realtek Semiconductor Corp.
Bus 005 Device 001: ID 0000:0000


Now note down the range of your phone connected.
Eg:- 0421: 005e (in my case, see 1st line of above Eg)


2. sudo /sbin/modprobe usbserial vendor=0x421 product=0x05e

Here 421 and 05e is the range in my case. Use only last 3 digits.


3. wvdialconf create

When you use this command you will get a long output like this eg

Eg:- Editing `create'.
Scanning your serial ports for a modem.
Modem Port Scan<*1>: S0 S1 S2 S3
WvModem<*1>: Cannot get information for serial port.
ttyACM0<*1>: ATQ0 V1 E1 -- OK
ttyACM0<*1>: ATQ0 V1 E1 Z -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyACM0<*1>: Modem Identifier: ATI -- Nokia
ttyACM0<*1>: Speed 4800: AT -- OK
ttyACM0<*1>: Speed 9600: AT -- OK
ttyACM0<*1>: Speed 19200: AT -- OK
ttyACM0<*1>: Speed 38400: AT -- OK
ttyACM0<*1>: Speed 57600: AT -- OK
ttyACM0<*1>: Speed 115200: AT -- OK
ttyACM0<*1>: Speed 230400: AT -- OK
ttyACM0<*1>: Speed 460800: AT -- OK
ttyACM0<*1>: Max speed is 460800; that should be safe.
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
WvModem<*1>: Cannot get information for serial port.
ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud
ttyUSB0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
Found an USB modem on /dev/ttyACM0.
Modem configuration written to create.
ttyACM0: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"

Here note down the maximum speed, (in my case its 460800, in last line).


4. sudo gedit /etc/wvdial.conf

You will get a opened file with some lines. Now delete all the lines and paste the below Eg code and save it.

Eg:-
[Dialer Defaults]
Modem = /dev/ttyACM0
Baud = 460800
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
Phone = *99#
Username = username
Password = password
Stupid Mode = 1


5. wvdial

This is the last command to be used and whenever you want connect the internet just use this last command. Now use the above cmd. You wil get like this
Eg:-
--> WvDial: Internet dialer version 1.60
--> Can get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#


Now minimize the terminal and use.
If you want to DISCONNECT the connection then hit Ctrl+c

Monday, March 23, 2009

Installation & Run of PHP program


Hi, are you struggling with installation of PHP or Apache server in Linux Operating system???, here are some tips to install it. Use your terminal, here are some commands. Use all commands without quotes.

1.
"sudo apt-get install apache2" - To install the apache2 server, which helps you to link the server to your browser.

2."sudo apt-get install php5-cli"- To install php packages of version 5 (client side). While installing it asks for new password, enter any password and proceed.

3."sudo apt-get install cvs" The command cvs is an important component of Source Configuration Management (SCM) from which you can record the history of sources files, and documents.

Now everything is ready to run any php program.


If you dont know how to run a php program then follow this....(with sample program)

1. Using an editor create a file with an extension php or php3
Ex:- vim test.php -(Use it in terminal)
Here vim is an editor which is opening a file with a name test and extension with php. (For freshers it will be easy to use "gedit" instead of "vim" editor).

2. Now an editor is opened with plan page. Now hit the Insert key and write your php code. (If you use "gedit" instead of "vim" then you will get plan window, in which you can start writing code directly. No need of hitting the Insert button. But save it before close and continue)
Ex:- See above picture

3. Now hit Esc, :, w and q. To write(save) and quit from editor.
Ex:- :wq or :x (after hitting escape). (You can skip this step if you are using gedit editor)

4. Now all you need to do is copy a test.php file into /var/www directory. Copy it by cp command, if it doesnt work then you need to install mc.

5. "sudo apt-get install mc" -Visual shell for Unix-like systems.

6. "sudo mc" -which opens mc

7. There you will get a list of directories and files. Select your file (test.php) and copy it by pressing C key or in file tab you can use copy.

8. You will get a window which asks for destination, by default it will be /home/username, repalce it by /var/www. (username="your login name"). Now hit ctrl+z, so you will return to terminal.

9. Now you are almost done with everything just you need to locate http://
Ex:- http://localhost/test.php
(Type it in an URL of any browsers like IE/Mozilla/Opera etc)


There goes your page with display "Hello World"

Saturday, March 14, 2009

Installing Xubuntu or XFCE on Ubuntu (LINUX based OS)

Hi, if you have a computer with lower specification (between 128 -256MB RAM), you may find that KDE and Gnome desktop-environment in Ubuntu are too slow on your computer. There is an another desktop-environment called XFCE which is relatively lighter weight.

To install XFCE desktop environment in an already existing Ubuntu/Kubuntu paste this command in Terminal without quotes

" sudo aptitude update && sudo aptitude install xubuntu-desktop "

and restart the PC for better measure. In the login screen use session and select Xubuntu