Jun 23, 2009

partprobe is a program that tells the operating system kernel about the partition table changes by requesting the operating system to re-read the partition table again so that you do not have to reboot for the changes to appear on the partition table. A reboot is what the system administrators just cannot do on the system running web server's so for them this command is of utmost importance.

The command and its option

partprobe [-d] [-s] [-h] [device]

-d : Don't update the partition table, it is what you normally don't intend to do when you change the partition tables

-s : for showing summary of the devices and their partitions

-h: To show summary of options

device: The hardware device /dev/hda , /dev/hdb etc


Posted on Tuesday, June 23, 2009 by Unknown

The netstat command displays the network connections that have been established, the port's which these connections are using, the routing table, the statistics related to an interface(eth0 etc) and statistics for a particular protocol(ipv4,ipv6,icmp). You can use it to see whether a trojan or a backdoor connection is established with your pc acting as a server to a client (remote pc).

The netstat command and its options are explained below:-

NETSTAT [-a] [-b] [-e] [-n] [-o] [-p proto] [-r] [-s] [-v] [interval]

The options:-

-a :It displays all the connections and listening ports(the server listens for a connection to be established).

-b : It displays the program(executable) that is used for establishing connection.

-e: It displays the packet statistics at ethernet level. One often uses it along with the -s option.

-n: It displays the addresses in the numerical form(ip addresses) rather than using their names.

-o: It displays the owning process id that is a process id of the process that is using the connection. The process id's obtained can be used to check whether the process is malicious or not. You can check it by using the tasklist command with /SVC switch or can use process monitor to do the same and then by comparing the PID of the output with the output of the tasklist command, you can see whether the process is a malware and if it is the case then you should immediately check your computer for trojans and backdoors and try and terminate the process manually.

-p protocol: It displays the connection's that are established for the protocol mentioned. The protocol can be IPV4,IPV6,TCP,UDP etc.

-r : It displays the routing table. A routing table shows the interfaces, active routes under which it shows the gateway, the destination address, the subnet mask etc.

-s :It displays the statistics that are listed for each protocol seperately

-v: It is used along with -b and shows the sequence of components (ie dll's) used to establish connection.

interval: It displays the statistics after the seconds specified by the interval.

Example usages:

1) netstat -b -v : It shows the sequence of components used to establish connection for the processes listed by b option.

2) netstat -e -s: It displays the total bytes that are sent or received and the per protocol statistics.

Posted on Tuesday, June 23, 2009 by Unknown

Jun 16, 2009

What is the File Extension JSON ?

JSON is a lightweight, language independent "data " interchange format. It was derived from ECMAScript programming language standard. The MIME content type for it is application/json.
The file extension for it is .json. JSON defines a small set of formatting or rules for portable or language independent representation of data. JSON can represent four primitive types namely string, number, boolean, null and it can also be used to represent two structured types namely objects and arrays.

An object is a name-value pair similar to the dictionary data type in python where the name is a string and value can be string, number, null or boolean, object or array.
For example
:- A car can be represented in an object representation as;-
"cars":{"model":"2006", "manufacturer":"Audi","price":"20000 USD"} .
An array on the other hand is an ordered collection of similar data items.

JSON was designed to be minimal, portable and as a subset of Javascript. The JSON text is encoded in Unicode and default encoding is UTF-8. The code for generating JSON text from the XML representaion is available for programming languages like java, python, php.

The File Extension JSON is readily recognized and the JSON data is easily consumed by a simple javascript based script because it does not have to do any additional parsing. The following code snippet shows how you can use it to represent data with utmost ease.


{
"customers" : {
"customer" : {
"@attributes" : {
"id" : "2314"
},
"name" : "Raman deep",
"phone" : "9967345612",
"purchases": "30000 USD"
"address" : {
"street" : "23/25 Rajouri garden",
"city" : "New Delhi",
"state" : "Delhi",
"zip_code" : "654321"
}
}
}
}


whereas its xml representation is shown below and as can be seen by comparing these two representations that the former one is easy to parse as it uses javascript object and array data types to represent data and hence is used more nowadays.


<customer>
<customer id="2314">
<name>Raman deep</name>
<phone>9967345612</phone>
<purchases>30000 USD <purchases>
<address>
<street>23/25 Rajouri Garden</street>
<city>New Delhi</city>
<state>Delhi</state>
<zipcode>654321</zipcode>
</address>
</contact>
</contacts>


I hope this tutorial was brief and concise representation of the File Extension JSON .

Posted on Tuesday, June 16, 2009 by Unknown

Jun 11, 2009

Safari 4 : "The fastest web browser"

The one thing that you expect from apple when they launch a new product is the "design and functionality" of the product and the safari 4 web browser is just one example of how much attention software developers at apple pay to it.

The safari 4 browser is the fastest browser as endorsed by apple. It has incorporated newest features that are yet to be found in other web browsers, which makes Safari 4 special. The features that really stand out are as mentioned below:-

  • "Cover Flow" history feature: The browser provides a cover flow history feature by which you can actually see the web pages that you visited in a cover flow view, so that you can recognize the page you want to visit again. This feature stands out of the lot as by using this feature it becomes much easier to visit a web site that you visited in the past because it is easier to visually remember the web site rather than remembering the url you visit.
















  • The Revamped History search feature: We know that all browsers provide url based search feature that you can use to find the web site you visited but the only concern is that "it is difficult" to remember the url of the web page you visited. So to overcome this drawback Safari 4 employs a search strategy by which one can search "inside the content" of the page that you visited which can be coupled with the " Cover flow " feature to give tremendous results. As can be seen from the following snapshot the browser's history search feature, the search is also done in the content of the page also.
























  • The browser also provides advanced caching scheme of the most visited web pages, which makes them load much faster. The most visited web pages are represented in a nice, well laid out, panoramic view.
  • Lightning fast speed: It gives you lightning fast speed compared to other browsers as the page load time is drastically reduced in safari-4. It has the so called "Nitro Java script Engine" that enhances speeds for the javascript based sites. I have tweaked my mozilla firefox for best performance and yet it comes nowhere near to the performance offered by it.

Following is the video of Craig Federighi showing of the aforementioned features of Safari 4 :-



So go ahead and download the safari browser for yourself and feel the difference in browsing experience.

Posted on Thursday, June 11, 2009 by Unknown

Jun 8, 2009

What is the use of pivot table ?

The pivot table provides support for a sequence of values for ex: In case you want to have sequential values from 1 to 100 . These sequential values are required and can be used in numerous cases. In pivot tables values are not inserted directly but they are inserted inside a support table which is then concatenated with itself to populate pivot tables.

How to create a pivot table ?

To create a pivot table and insert values into it, you would have to create 2 following tables:-

1) Pivot table 2) Temporary/Support table

1) Pivot table: It has a pretty simple structure. To create a pivot table in sql execute the following query

create table if not exists pivot (
c int,
primary key (c))

The primary key on c is taken so that no repetitive value are entered.

2) Support table:- The next step is to create a support/ temporary table which will be used to fill up the pivot table. To create a support table execute the following simple query.

create table if not exists temp (
ch char(1))

the field is taken as char so that it can be concatenated with itself easily. For ex: the character concatenation operation '1'+'1'= '11'.

Then we have to insert 10 values (0 through 9) into the temp table. So execute the following insert statements one at a time.

insert into temp values('0')
insert into temp values('1')
insert into temp values('2')
insert into temp values('3')
insert into temp values('4')
insert into temp values('5')
insert into temp values('6')
insert into temp values('7')
insert into temp values('8')
insert into temp values('9')


3. Inserting values into the pivot table:- Now using 10 rows of the temp table, to generate 100 rows of pivot table all you have to do is concatenate temp to itself 2 times. The concatenation operation was explained above.

Execute the following query, if you are using microsoft sql:-

Insert into pivot
select t1.ch+t2.ch
from temp t1, temp t2
Else if you are using mysql execute the following query:-

Insert into pivot
select concat(t1.ch,t2.ch)
from temp t1, temp t2
The query will produce elements from 0 through 99.

Example usage of pivot table:-

As a simple example you can use it to print ascii chart of the ascii characters from 48 through 96. In this case the query would be as shown in the following code box:-


select c ascii_code, char(c) ascii_value
from pivot
where c between 48 and 96

Posted on Monday, June 08, 2009 by Unknown

Jun 7, 2009

The problem that you might face when you install ubuntu is it's default window manager GNOME is quite heavy on resources and tends to be buggy (for my pc configuration at least) so to cope up with resource crunch you can shift to a light window manager like fluxbox, XFCE etc as they tend to provide better performance than GNOME or KDE but are a little un-user friendly.

To change the window manager follow these steps:-

1) Install MENU:- The precondition for changing to any new window manager is to install the program MENU that manages the application menus so that you can launch the applications without the need of Gnome or KDE launchers.

To install MENU
  • Open terminal i.e Application->Accesories->Terminal or press ALT+F2 and choose run in terminal

  • Then type the following command in the terminal :-

    sudo apt-get install menu
    you will be asked for your password, enter it and the package menu will be installed.
2) Install the window manager :- The next step is to install the window manager itself. I would be explaining about how to install the FLUXBOX window manager.

The fluxbox window manager provides tab options, styles menu from which you can change the theme and wallpapers, configuration menu for configuring window display (including transparency,icons etc), wsm (text browser) and by default comes with 4 workspaces that you can toggle between, more workspace windows can be added. The thing that i like about it is that it's very fast.

To install fluxbox execute the following command:-

sudo apt-get install fluxbox

3) Changing the window manager
:- Now all you have to do is logout from ubuntu and then from the options on the login screen choose select session, choose Fluxbox and choose the window manager for current session only so that you can try it out before choosing to make it default.

The following is the snapshot of fluxbox:-

Posted on Sunday, June 07, 2009 by Unknown

Jun 5, 2009

The installation is very easy just follow these steps:-

  1. Installing Wine :- the wine package helps run windows executables on linux like systems. You can get any package with ease by using a single command or you can use synaptic package manager. I'll explain the procedure by using the command line (it's very easy).

    • Open the terminal :- Go to Applications->Accessories->Terminal


    • Then type the following command :-

      sudo apt-get install wine

      Then you will be asked for your password , enter it and press y when asked whether you want to install the package or not

    • Then type exit at the prompt to exit the terminal.


  2. Installing uTorrent : Download the uTorrent package for windows-xp and after it is downloaded, right click on it and choose open with "wine windows program loader" and after that you can choose the location of install (let it be default) , this will complete the installation of uTorrent.


  3. Launch the program : Now you can run the uTorrent program on ubuntu.

Note: If you have a dual boot os (windows-xp+ubuntu) then you should download torrent files using ubuntu which i feel utilises the maximum bandwidth available to you. Also if you receive a virus instead of the original intended file you will have no risk of it affecting your pc as linux based systems are generally virus safe and you can then transfer it to windows -xp by mounting it's partition on ubuntu.

Posted on Friday, June 05, 2009 by Unknown

May 31, 2009

This collection is made from deviant art's some of the most beautiful wallpapers, you can download some of these from below by clicking on the wallpaper image and opening them in a new tab and other wallpapers come in a pack so they can be downloaded in a rar archive format:-


1. Ultra Beam by Yethzart:-


















2. High Definition Nature wallpaper by CurtiXs:- This a high definition wallpaper representing nature's pulchritude.




















3. Music wallpaper By Zababuga:- This one is a naive looking wallpaper for music lovers.




























4. Dandelion Wallpaper for Vista by kamekai :- A great looking wallpaper for windows vista.























5. One of the Wallpaper's from Artspace's 2009 collection:- This one is a eclectic mixture of light and dark colors.























6. Lamborghini wallpaper by Lil Milan :- This one is for people who are fanatic about car wallpaper's and obviously Lamborghini























7. Four Extreme wallpaper's by Bartoszf:- A tribute to music lovers as this wallpaper represents one of the finest musical instrument . I am showing here only one sample but it is available in four background colors and you can download all of them by clicking on the download link (image)





























8. Water drop wallpaper by JK89:- This represents the pulchritude of a water droplet on the leaves. This comes in four resolutions and can be downloaded in a rar archive format by clicking on the download link ( download image).




























9. Fire wallpaper's by rubina :- This wallpaper comes in three resolutions (1280*800, 1440*900, 1680*1050) and can be downloaded in a rar archive format by clicking on the download link (download image).

























10. Vulcan's fury collection by Exntrik :- This is a collection of wallpaper's representing the fury of vulcan where Vulcan is considred to be the god of beneficial and hindering fire. The collection unlike others contains different wallpapers. I am showing here only one sample but there are three different wallpaper's in different resolution's and you can download all of them by clicking on the download link (image).
















Posted on Sunday, May 31, 2009 by Unknown