
Wednesday, May 04, 2011
Struts2 Framework with Eclipse

Friday, October 08, 2010
Install Eclipse (Helios) on your Ubuntu 10.4

Tuesday, March 17, 2009
Construction of an Efficient Overlay Multicast Infrastructure for Real-time Applications

Here I have done an article review on Suman, Christopher, Koushik, Bobby, and Samir’s paper. This paper talks about an overlay system called Multicast Service Nodes (MSN) on a large internet scale. Moreover, this semester my project work will also be related to this work and so if any one of you out there is interested can see my slides (on the reviewed article) which I presented in my class. Click Here
Monday, March 02, 2009
Calculate multiplicative inverse of a mod m
The Question was: Write a C++ program using the GNU Multiple Precision Library to compute, a to the power of -1 (mod m), given a and m (in that order). For instance, first compile your program as follows:
% g++ myfile.cpp -lgmp -lgmpxx
Then run the program:
% a.out
If you provide the following numbers 32 701, then it will give you the inverse answer 241
The solution you can find Here
Sunday, February 22, 2009
Simulate OS "Timer (Scheduler)"
The first time the function (Mem_dist) runs, it initializes the array with twelve values. The value is randomly determined.
After the first time, the function alternates among three different processes:
1.Starting with the second pass, it adds another item to the array.
2.Starting with the third pass, it sorts the items in ascending order.
3.Starting with the fourth pass, it removes a randomly chosen item from the array.
You can find the READ_ME file: Here
You can find the HEADER.H file: Here
You can find the TIMER.C file: Here
You can find the MEM_DIST.C file: Here
Happy coding.....and special thanks to Prof. Ekblaw
ML Problem Solutions

* Question_1: Define a function "occurrences" which takes a list of integers ls and an integer n and returns the number of occurrences of n in ls. For instance,
- occurrences(nil, 2); Output will be: val it = 0 : int
- occurrences([3], 2); Output will be: val it = 0 : int
- occurrences([1,2,3], 2); Output will be: val it = 1 : int
- occurrences([1,2,3,2,2], 2); Output will be: val it = 3 : int
- occurrences([1,2,3,2,2], 3); Output will be: val it = 1 : int
* Question_2: Define a function alltwice which takes a list of integers ls and checks whether every element in it occurs exactly twice in it. For instance,
- alltwice nil; Output will be: val it = true : bool
- alltwice [1,2,1,2]; Output will be: val it = true : bool
- alltwice [1,2,1,3]; Output will be: val it = false : bool
Solutions for these two problems are Here
Friday, November 14, 2008
: : GNU-PLOT ::

- Download GNUPLOT - version 4.4 (Choose any OS)
- Tutorial –Learn everything about GNU
- Home Page –for GNU (Learn more)
********************************************************************************
A sample work of mine is here: Click
********************************************************************************
Friday, August 22, 2008
Simulate OS "Monitor"
Program Code : Click Here
Program Output : Click Here
Documentation : Click Here
Best of luck for those who are looking for this kind of sample work and trying to build up something exceptional...
Thursday, May 29, 2008
Connect to a remote machine (Ubuntu 8.04)
Suppose you want to connect to a remote machine which is running the ssh-server. You can do so by following any one of two methods I am explaining below:
(Assuming that you are running Ubuntu 8.04)
Method-1 (From Terminal):
Start your terminal (From Applications → Accessories → Terminal)
Type as follows:
“sudo ssh
{username}@ {Remote Machine's Name or IP}” It will as whether you want to continue or not
Accept this by typing “yes”
Then it will ask about your password
Enter your password and then finally you can access the target remote machine
Method-2 (GUI-Interface):
Here I have chosen a nice handy software name “PuTTY”
Install that software first from your terminal by typing as follows:
“sudo apt-get install putty”
When the installation will be done, then run the software.
You will find the software here: Applications → Internet → PuTTY SSH Client
As a beginner just provide the Remote machine's name or IP (in the given Host Name text field) with which you want to connect with.
Keep everything as default and press OPEN
A new POP-UP window will appear and will ask for username and password
Provide the right username and password and start your remote login session
Monday, May 26, 2008
Fix the Sound Card for TOSHIBA-Satellite (A135-S4527)
I was trying to install Ubuntu 7.10 on my TOSHIBA-Satellite machine. The very first problem I was facing with my sound card. Everything was running fine but the sound card....was showing a RED sign. I browsed through and suddenly got the following clues:
Open the Terminal
Make sure that your “apt-get” is updated
Then just copy and paste the following command:
“
sudo apt-get install linux-backports-modules-generic”Reboot your machine...Can u hear the sound....???
I believe it will be solving other's problem, who are as novice Ubuntu user as like me...!!!
Friday, May 02, 2008
How to set VLC Media Server
++++++++++++++++++++++++++++++++++++++++
1) Start VLC player
2) Go to File tab
3) Go to Wizard...
4) Select “Stream to network” then click on Next>
5) It will give you the option to input
6) Click choose button (Another window will open)
7) Under the File--> Open tab, click Brows...
8) Choose your song (which you want to stream) and then click Open
9) Click ok (It will bring you to the original screen of the VLC soft)
10) Click Next>
11) You can choose the streaming option such as Unicast, Multicast or HTTP
12) Type the Client IP address under the space provided (Example: for Ipv4: 10.101.93.1 or for Ipv6 3ffe::501:8:260:97ff:fe40:efab
13) Click on Next>
14) Choose what kind of Encapsulation format you want (By default it will be MPEG TS)
15) Click on Next>
16) For Time-to-live (TTL), you can put 1 or just leave it as it is
17) Click of Finish
18) Your Player's role as a Media Server on a Network will start
++++++++++++++++++++++++++++++++++++++++
How to set VLC Media Client
++++++++++++++++++++++++++++++++++++++++
1) Start the VLC player
2) Under the File tab choose “Open Network Stream...”
3) From the new window you can choose the protocol option (By default it will be UDP/RTP)
4) For Ipv6, you have to select “fource Ipv6” option (You can see it at the top right most corner)
5) For Ipv4, no need to select the above option. Leave it unselect as it is by default
6) Under the Advance option, select Stream/Save (It is must-or else srteaming will not start)
7) Finally click ok and your Player's role as a Media client on a Network will start
++++++++++++++++++++++++++++++++++++++++
Friday, March 21, 2008
Some Great Links (Programming)
- At the left side u will find all the classes in that Library
- Nicely arranged and very clear to understand
- Examples are very effective and clear
- Will rate 10* (Where 10 is Superior)
Monday, March 17, 2008
Simple C -code
*****************************************************
{Note: Both begining of stdio.h and conio.h and their end there will be <> sign}
#include stdio.h
#include conio.h
int main()
{
FILE *out;
out=fopen("FaisalOutput.log", "w");
fprintf(out, "Hi...this is Faisal");
fclose(out);
return 0;}
*****************************************************
Sample-2: To get target the data from raw data file:
*****************************************************
{Note: Both begining of stdio.h and conio.h and their end there will be <> sign}
#include stdio.h
#include conio.h
void main()
{
FILE *in, *out;
int packet;
float time;
char temp1[100],temp2[100],temp3[100],temp4[100],temp5[100],
temp6[100],temp7[100],temp8[100],temp9[100];
in=fopen ("client4.dat", "r");
out=fopen ("LinuxClient4.log", "w");
while(fscan(in, "%i",&packet)>0)
{
fscan(in, "%f", &time);
fscan(in, "%s %s %s %s %s %s %s %s %s",
&temp1,&temp2,&temp3,&temp4,&temp5,&temp6,
&temp7,&temp8,&temp9);
fprint(out, "%f %i\n",time,packet);
}
fclose(in);
fclose(out); }
*****************************************************
Sample-3: To get the average delay:
*****************************************************
{Note: Both begining of stdio.h and conio.h and their end there will be <> sign}
#include stdio.h
#include conio.h
#include math.h
void main(){
FILE *first, *second, *third;
int packet;
float time, time1, time2;
float sum()=0;
int counter=0;
//char temp1[100], temp2[100];
//char temp3[100], temp4[100];
first=fopen("Server6.log", "r");
second=fopen("Client6.log", "r");
third=fopen("delay6.log", "w");
while(fscanf(first, "%f",&time1)>0 && fscanf(second, "%f", &time2)>0)
{
counter = counter+1;
time = time1-time2;
if(time <0)
{
time = time *(0-1);
}//if
fscanf(first, "%i", &packet);
fscanf(scond, "%i", &packet);
fprint(third, "%f", time);
fprint(third, "%i\n", packet);
//fscanf(first, "%s %s", &temp1,&temp2);
//fscanf(second, "%s %s", &temp3,&temp4);
sum = sum + time;
}//while
printf("counter = %i, sum = %f", counter, sum);
printf("Average delay = %f", sum/counter);
fclose(first);
fclose(second);
fclose(third); }
*****************************************************
Sample-4: Calculate Jitter :
*****************************************************
{Note: Both begining of stdio.h and conio.h and their end there will be <> sign}
#include conio.h
#include math.h
void main ()
{
FILE *first, *second;
float time, time2, jitter;
float sum = 0;
int packet1, packet2, counter=0;
//char temp3[100], temp4[100];
first=fopen ("LinuxDelay6.log", "r");
second=fopen ("LinuxJitter6.log", "r");
while(fscan(first, "%i", &time)>0
{
fscanf(first, "%i", &packet1);
counter = counter +1;
fscanf(first, "%f", &time2);
fscanf(first, "%i", &packet2);
jitter = time2-time;
if(jitter <0) { jitter = jitter *(0-1); }//if fprintf(second, "%i\t", counter); fprintf(second, "%f\n",jitter); sum = sum +jitter; }//while printf("counter = %i, sum = %f\t", counter sum); printf("Average jitter = %f\n\n", sum/counter); fclose(first); fclose(second); } *****************************************************
>> The full credit goes to Bro. Shariq
Tuesday, July 17, 2007
:::.. VMware Stuff ..:::
Download VMware:
- Go to this site (This is the official site for VMware: http://www.vmware.com/download/
- Scroll down the page and try to find “VMware Workstation” under “Desktop Virtualization Products”
- Click on Download, it will redirect the page to: http://www.vmware.com/download/ws/
- Now (plz) read a bit.....under Download VMware workstation you will see that they are recommending you to register for an evaluation
- So click on the link for evaluation and do the registration ;-)
- By the way, the window for registration will redirect you to the following link; http://www.vmware.com/download/ws/eval.html
- Now click on “Register for your free 30-day evaluation license” at the top of your window
- Though u r a New Customers so the right side link is for u.....click on “Register” button.
- Now for the registration these are the important points: your email add, product host platform-choose the windows, timeframe for a possible purchase-choose for 30 days, how many license-choose 1, how do u plan to use-choose development and testing.
- Now click on continue....they will redirect you to the download page and will send a password to ur email account by saying GOOD LUCK ;-)
- Click the link for the download. It will bring u to the download agreement page. Scroll down the page till the end......u will see two buttons...”Yes” or “No”. So click “Yes”
- Thats it......it will bring u to the page where u will get the .exe file for VMware ;-)
- Finally click the link namely- Vmware-workstation-6.0.0-45731.exe
- And download it on ur Desktop........by the way give me Thanks for everything ;-)
Install VMware and Fedora Core-5:
(Step-1)
- Double click on VMware .exe file
- Click on “Run” then “continue”
- “VMware Product Installation” -window you will see
- It will bing you to the window for VMware workstation 6-”Welcome to the Installation wizard for VMware workstation”
- Click the “Next” button to proceed
- Don't change the setup type “Typical”- Just click on “Next”
- Then for Destination folder, keep the default one and click “Next”
- For “Configure Shortcuts”......I selected only the Desktop one and clicked “Next”
- Finally proceed with the Installation....
- At one stage it will ask the “Registration Information”, where under the serial number text box you have to put the 30-days trial license
- Then press “Enter” and thus “finish” the installation by RESTARTING your PC
(Step-2)
- You will find a VMware Workstation icon on your Desktop, where you have to double click
- The “License Agreement” window will come where you are bound to choose “Yes” option followed by pressing “OK” button
- It is recommended to read the “Tip of the Day” (At least once)
- Congratulation !!! You are now ready to install any OS in your VMware workstation
(Step-3)
- Put the Fedora installation CD into your CD-ROM
- On VMware Workstation window, under the “Home” tab you can see an icon name “New Virtual Machine”
- Click on that link to start “New virtual machine wizard” followed by clicking the “Next”
- For selecting the Appropriate configuration-keep the “Typical” setup
- For selecting a guest OS, first choose the Linux option and then from the drop down “version” menu choose “Other Linux 2.6.x kernel”
- Click “Next” and then change the name of your Virtual Machine to “Fedora Core”
- For the location-keep the default path and then click “Next”
- For the Network connection keep the bridged networking
- You will see “Specify Disk Capacity”....but no need to change anything....except followed by “Next”
- You will see a new window by saying “Virtual machine created successfully”
- Finally you will see a sub-window called “Fedora Core” (though i have chosen that name for my Virtual Machine)
- Under the Commands tab, click the “start this virtual machine” link
- It will show an informative window. Choose the “Never show this hint again” and then press “OK”
- Whatever window comes in front of you just click “Ok” and the wait ;-)
- Bring your cursor into the VMware window area (black area) where you can see the Fedora Core setup menu.....just click on it and wait
- Fedora core 5 -installation will start
- It will ask to test the CD-media........whatever i just skipped that portion and pressed
- Well now one question.......Leave that VMware stuff......can u click any icon or button or anything else from your real window? Just try to locate your cursor outside of your virtual machine......can u do that? .........hmm......Remember, every time to release your cursor you have to press “Ctrl+Alt”
- It may ask to setup driver manually.......just skipped that portion
- The Fedora core release Notes window will come where you have to click “Next” button
- Choose the language ENGLISH then click Next
- Select the appropriate keyboard for the system as U.S ENGLISH then click “Next”
- A warning window may appear about partition table......and some ....bla....bla.....just click on “Yes” to proceed
- A new window will come where you will see some of the lines as follows: “Installation requires partitioning of your hard drive. By default.........to use this or create your own.” Look don't worry too much about it.....nothing will happen with your Real Machine....Remember that u r here installing a Virtual Machine.......so if any problem occurs then it will effect negatively only on your Virtual Machine
- You may get another working message such like “You have chosen to remove all Linux partitions (and ALL DATA on them) on the following drives: /dev/sda. Are you sure you want to do this?”........Yaar........just click YES !!!
- For “Network Device”-directly click “Next”
- For Time setting.....well you can play around but i wanna click on “Next”
- Give your root password and make it confirm
- For the software installation preferences, keep the default option “Office and Productivity”
- Now u have to wait for long.....because this is the final or ending stage for your Installation. Read all the instructions which come to you and when the Installation CD will come out automatically then just remove it and puss back your CD-ROM as like before by accepting the REBOOT option.
Congratulation !!!......You are done
Note: Do u know that you can capture the Video of your screen through VMware? Yap....thats the great feature this software is having and which is also very important for any of our IT research work to make a proper documentation or presentation.
:::.. First program on PERL ..:::
Compile the First program on PERL:
Well, previously you checked that your PERL was running nicely. Now lets write the traditional incantation to the programming gods “Hello World”.
The steps are as follows:
- First, you need a nice text editor to write the program. For those who are using Linux or Unix system they all are failure with “vi” or “vim” editor. Thats perfectly ok......but what does the Window user do? Should they use “Notepad” or the “WordPad” to write the program? As i went through some manuals, most of the programmer did mention that those two for Windows sometimes work like SUCK. The specific problem for those two softwares i am not mentioning here because that should be your responsibility to find it out.......but what i am going to do here is to introduce a GREAT editing software for Windows which is exactly like “vi” or “vim” and most importantly, it is free. Furthermore, if anyone really wants to learn that software for Windows through its nice documentation, he/she won't face any problem (because of their similarity) to work with the real “vi” or “vim” for Linux system.
- The name of that software is “gvim” and you can download that from the following link (there is another great link which i can't find right now.......so let me find that again):
http://www.vim.org/download.php - After the “gvim” installation just crate a folder to your c:\ drive by the name “BegPerl”
- Now open the “gvim” editor and rite the following program:
.......................................
#!/usr/bin/perl -w
print “Hello, World.\n”;
....................................... - Now click on “save current file” from the title menu of your “gvim” software. Direct the path to your c:\ and select that newly created folder “BegPerl”.
- Choose the file name with the extension .plx (for an example: hello.plx) and save as type to All Files (*.*) and then finally press the save button
- Now open your Command Prompt window. Type cd c:\BegPerl and press enter
- Type perl hello.plx and press enter. If Perl is in your path and all is well, this is what you should see:
>perl hello.plx
Hello, world.
Congratulation !!! You've successfully run your first piece of code
Monday, July 16, 2007
::.. Perl Installation ..::
The installation steps are as follows: (For OS-Windows Vista)
- Go to the “Comprehensive Perl Active Network” CPAN's official website
- From the page under the “Browsing” tab click on 'Perl binary distribution (“ports”)'
- It will redirect you to the following URL: http://www.cpan.org/ports/index.html
- From that new page you will get a long list for different platforms (choose your OS where i have chosen here “Win32”)
- From the Win32, you can choose ActivePerl or others but you may note that ActivePerl on Vista platform sometimes may not work properly, as it did with me.
- However, SiePerl-Win32 by Siemens seems perfect to me.
- If you click on SiePerl then that will redirect you to the following URL: http://www.cpan.org/authors/id/G/GR/GRAHAMC/
- Now so many documents you can add to your own IT virtual library (as i have done too) ;-) but before that let me finish this tutorial
- From the list your target should be the following file: “SiePerl-5.8.8-bin-1.0-Win32.INSTALL.exe”
- Thats it !!! Congratulation......you have done the installation of PERL on your machine.
Check the status:
> Check the Windows PATH, whether it edited correctly or not. For checking the PATH, do the following:
- Go to “Control Panel”
- Click on “System” folder
- Choose the “Advanced system settings”
- A pop-up security permission box may appear. Just click on “Continue”
- A new window will appear namely “System Properties”
- Click on “Environment Variables...”button
From the new window double click on “PATH” which is under System Variables. You will get as follows:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\QuickTime\QTSystem\;C:\Perl\bin
Can u see “C:\Perl\bin” at the end of your list...which is newly added ;-)
> Check from the Command Prompt:
- To start the Command Prompt, click on Start (the windows start button) and then type “cmd” into the text box (Start Search) which is under “All Programs”. The 'cmd' starter link will appear above. Just do double click on it...
- When the black Command Prompt will appear just type 'perl -v'. It will show you the latest version of PERL INTERPRETER you are having in your machine....
Congratulation again........and Good Luck for a PERL week ahead.
Saturday, July 14, 2007
Change ur Time Comment
Do the following: (For OS-Windows Vista)
1) Go to “Control Panel”
2) Select “Regional and Language Option”....double click
3) Under Formats tab click on “Customize this format...”
4) Under “Customize this format...” tab click on “Time”
5) Now change the AM symbol & the PM symbol text box
6) Write anything u want..... ;-)
7) Select [Apply].....then [ok]
Thats it........now look at ur PC clock -Interesting right?
Tuesday, February 13, 2007
SMS from Dr. Jalal
Friday, February 02, 2007
: : Paper at Virginia : :
Here want to share just one comment about my paper:
“A work extremely important and well done, though I find graphs a bit unreadable. I wonder if IPv4 had IPSEC turned ON or not, as IPSEC is a mandatory part of IPv6 (and I assume it is included in the OS kernel as part of IPv6). I would be interested that authors in future look into this as a separate problem. Another observation is that it is not clear from the results whether the differential in performance metrics between Windows and Linux could be eliminated. I would like to see a comment on this. Overall, I recommend the paper to be considered for best paper award”
: : Gold Medal : :
It is my First Research Work in the field of IPv6. First means, first in my academic career. And when my great Father said, ur career starts with Gold….I can’t remember how I praised to my Lord at that moment. Thanks to Him, Thanks to Allah, to my Supervisor, and thanks to my all sweetest family members too.
Sunday, October 01, 2006
~ Fedora Core-5 ~
Problem-1:
I was trying to use “Yum” for the installation. But every time after checking, it was saying that “…Nothing to do…”-the last few words which I can remember right now :-( very irritating-right?
In the first step I did update the “freshrpms” by having the Root privilege (type su…..then enter the root password). My command on the terminal was as follows:
[root@localhost Faisal]# rpm –ivh http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/5/freshrpms-release/freshrpms-release-1.1-1.fc.noarch.rpm
Note: It may take sometime to update your packages
Finally for installing the “VideoLAN” and “Ethereal” do the following:
For "VideoLAN"-type: [root@localhost Faisal] # yum –y install vlc
For "Ethereal"-type: [root@localhost Faisal] # yum –y install ethereal
By the way, here also I am giving u one great site from where you can download Genome-Ethereal. The URL is as follows:
…For everything…
Thanks Shuaib-for ur kind support and greatness.

Personal Website by Faisal is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.
Based on a work at faisalnet6.blogspot.com.