Saturday, January 29, 2011

Types of internet attacks part-2

Direct  internet attacks
Sometimes your computer is in attacked directly instead of using automated attacks like viruses, Trojans, worms etc. These attacks may be personal by someone in your neighbourhood and is attacking your system specifically or either someone just wants to add another zombie to his/her fleet.
These attacks may be of many types, like exploiting the defects of your operating system, which the attacker may already know or in internet applications that you use like an IRC (internet relay chat) system.
The first method is logon attack.

Logon Attacks

When you forgot your password of a internet web site you used to log on to it, you will be asked to try again to get it right as you may have mistyped it.
Few websites will block the login page at you system after too many unsuccessful attempts, but most of the websites will let you try until you have entered the right password. There are several programs that are written to crack the user’s passwords. They will use most known user account names and try a large number of commonly used passwords until they have got the right one. When they find the right one, they try to gain access to the user’s account. These attacks are also called dictionary attacks because they can use all the possible words listed in the dictionary to crack the passwords. These attacks usually tries to guess the passwords by using all possible keystroke combinations to get the password until it is finally cracked.

The second method is Buffer overflow attack.

Buffer Overflow Attacks

Badly written applications don’t know what to do when they are overloaded with too much data or badly formatted data thus most of the time the program simply breaks down and leaves an opening through which a properly written exploit program can insert commands or small programs into the host operating system.
These commands or programs can then perform actions such as opening a back door into the system, thus allowing the user of the command to completely control it. They can then install software that logs keystrokes to capture passwords, e-mail addresses, credit card numbers, or other sensitive information. They can use the victim system as a zombie to launch attacks against other systems.

How to make a traceable website in ASP.NET

If we want to make a traceable website in ASP.NET, so that we can trace the record  of our own ASP.NET website. To make a webpage traceable set trace property to true in HTML source page directory of the webpage document.
To make large number of pages traceable, follow the given steps:


  1. Open web.config file.
  2. In <System.web>, write the following.
  3. <trace enabled="true" localOnly="true" mostRecent="true" pageOutput="true" requestLimit="25"/> 
We can also view the trace report, thereafter at
~/your site/trace.axd 
or to check the intermediate values of any event, write following code in your code view of the page.
         int a=50;
        Trace.Warn(a.ToString());
        Trace.Write(a.ToString());


I have tried it and it has worked, i hope it worked for you too.


Sunday, January 23, 2011

Types of internet attacks part-1

Viruses
The most common type of computer bug is called the virus and thus had received a lot of attention from the media in recent years. You may remember names like I Love You virus. There are approximately 80,000 different types of viruses known. About 2,000 of them actually have spread havoc on computers. The rest of the viruses were not effective as they were either research viruses or the ones caused due to by wrong implementation of a computer program. They were never detected in large numbers.

Thursday, January 20, 2011

To create an File upload Form using html





To make users to upload files can be very useful. Here is an HTML form for uploading files:



<html>

<body>

<form action="upload_file.php" method="post" enctype="multipart/form-data">

<label for="file">Filename:</label>



<input type="file" name="file" id="file" />

<br />

<input type="submit" name="submit" value="Submit" />

</form>

</body>

</html>



Here the enctype attribute of the <form> tag specifies which content-type to use when submitting the form.

The type="file" attribute of the <input> tag specifies that the input is processed in form of a file.



some useful Keyboard Shortcuts for Windows 7

List of some useful Keyboard Shortcuts for Windows 7 operating system

Keys pressed in keyboard when windows explorer is at the screen.
1. Alt + Up = Go up one level
2. Alt + Left = Back one move
3. Alt + Right = Forward one move

Tuesday, January 18, 2011

How to repeatedly open a notepad in any computer

Repeated opening of notepad
Whenever you write the following code rename it as *.bat and it will become batch file
To Open Notepad continuously in any computer type the following code in notepad:
/////////////////
Here is the code:
/////////////////

To obtain your browser information using javascript

Browser information using javascript's navigator object







If it is needed to detect the visitor's browser, and the appropriate information can be obtained using navigator objects of javascript.

The best method to do this is to make your web pages smart enough to look one type to some browsers and another type to other browsers.

The Navigator object contains information about the visitor's browser name, version, cookies enabled, browser code name etc.

//////////////////////////////

here is the code for detecting various types of browser information.

//////////////////////////////



<html>

<head>

<title>

Browser information

</title>

</head>

<body>

<script type="text/javascript">

document.write("<br /><br />");

document.write("CodeName of the Browser : " + navigator.appCodeName);

document.write("<br /><br />");

document.write("Name of the Browser: " + navigator.appName);

document.write("<br /><br />");

document.write("User-agent's header information: " + navigator.userAgent);

document.write("<br /><br />");

document.write("Browser Version: " + navigator.appVersion);

document.write("<br /><br />");

document.write("Platform name: " + navigator.platform);

document.write("<br /><br />");

document.write("Are Cookies Enabled?: " + navigator.cookieEnabled);

</script>

</body>

</html>



This code will help you in gaining some of  information about the browser you are using.

Saturday, January 15, 2011

Reading XML files in ASP.NET

Reading XML Files


The following are ways to read and navigate the content of an XML file:
Using XmlDocument: You can load the document using the XmlDocument class mentioned
earlier. This holds all the XML data in memory once you call Load() to retrieve it from a file or
stream. It also allows you to modify that data and save it back to the file later. The XmlDocument
class implements the full XML DOM.
Using XPathNavigator: You can load the document into an XPathNavigator (which is located
in the System.Xml.XPath namespace). Like the XmlDocument, the XPathNavigator holds the
entire XML document in memory. However, it offers a slightly faster, more streamlined model
than the XML DOM, along with enhanced searching features. Unlike the XmlDocument, it
doesn’t provide the ability to make changes and save them.


Using XmlTextReader: You can read the document one node at a time using the XmlTextReader
class. This is the least expensive approach in terms of server resources, but it forces you to examine the data sequentially from start to finish.
The following sections demonstrate each of these approaches to loading the VIDEO list XML document.


Using the XML DOM


The XmlDocument stores information as a tree of nodes. A node is the basic ingredient of an
XML file and can be an element, an attribute, a comment, or a value in an element. A separate
XmlNode object represents each node, and nodes are grouped together in collections.
You can retrieve the first level of nodes through the XmlDocument.ChildNodes property. In this
example, that property provides access to the <VideoList> element. The <VideoList> element contains
other child nodes, and these nodes contain still more nodes and the actual values. To drill down
through all the layers of the tree, you need to use recursive logic, as shown in this example.


When the example page loads, it creates an XmlDocument object and calls the Load() method,
which retrieves the XML data from the file. It then calls a recursive function in the page class named
GetChildNodesDescr(). GetChildNodesDescr() takes an XmlNodeList object as an input and the
index of the nesting level. It then returns the string with the content for that node and all its child
nodes and attributes.
private void Page_Load(object sender, System.EventArgs e)
{
string xmlFile = Server.MapPath("VideoList.xml");
// Load the XML file in an XmlDocument.
XmlDocument doc = new XmlDocument();
doc.Load(xmlFile);
// Write the description text.
XmlText.Text = GetChildNodesDescr(doc.ChildNodes, 0);
}


When the Page.Load event handler calls GetChildNodesDescr(), it passes an XmlNodeList
object that represents the first level of nodes. (The XmlNodeList contains a collection of XmlNode
objects, one for each node.) The code also passes 0 as the second argument of GetChildNodes-
Descr() to indicate that this is the first level of the structure. The string returned by the GetChild-
NodesDescr() method is then shown on the page using a Literal control.
The interesting part is the GetChildNodesDescr() method. It first creates a string with three
spaces for each indentation level that it will later use as a prefix for each line added to the final
HTML text.


private string GetChildNodesDescr(XmlNodeList nodeList, int level)
{
string indent = "";
for (int i=0; i<level; i++)
indent += "&nbsp; &nbsp; &nbsp;";
...


Next, the GetChildNodesDescr() method cycles through all the child nodes of the XmlNodeList.
For the first call, these nodes include the XML declaration, the comment, and the <VideoList> element.
An XmlNode object exposes properties such as NodeType, which identifies the type of item
(for example, Comment, Element, Attribute, CDATA, Text, EndElement, Name, and Value). The code
checks for node types that are relevant in this example and adds that information to the string, as
shown here:


...
StringBuilder str = new StringBuilder("");
foreach (XmlNode node in nodeList)
{
switch(node.NodeType)
{
case XmlNodeType.XmlDeclaration:
str.Append("XML Declaration: <b>");
str.Append(node.Name);
str.Append(" ");
str.Append(node.Value);
str.Append("</b><br />");
break;
case XmlNodeType.Element:
str.Append(indent);
str.Append("Element: <b>");
str.Append(node.Name);
str.Append("</b><br />");
break;
case XmlNodeType.Text:
str.Append(indent);
str.Append(" - Value: <b>");
str.Append(node.Value);
str.Append("</b><br />");
break;
case XmlNodeType.Comment:
str.Append(indent);
str.Append("Comment: <b>");
str.Append(node.Value);
str.Append("</b><br />");
break;
}
...


Note that not all types of nodes have a name or a value. For example, for an element such as
Title, the name is Title, but the value is empty, because it’s stored in the following Text node.
Next, the code checks whether the current node has any attributes (by testing if its Attributes
collection is null). If it does, the attributes are processed with a nested foreach loop:
...


if (node.Attributes != null)
{
foreach (XmlAttribute attrib in node.Attributes)
{
str.Append(indent);
str.Append(" - Attribute: <b>");
str.Append(attrib.Name);
str.Append("</b> Value: <b>");
str.Append(attrib.Value);
str.Append("</b><br />");
}
}
...


Lastly, if the node has child nodes (according to its HasChildNodes property), the code recursively
calls the GetChildNodesDescr function, passing to it the current node’s ChildNodes collection
and the current indent level plus 1, as shown here:
...
if (node.HasChildNodes)
str.Append(GetChildNodesDescr(node.ChildNodes, level+1));
}
return str.ToString();
}


When the whole process is finished, the outer foreach block is closed, and the function returns
the content of the StringBuilder object.

How to obtain information about a website using command prompt

To obtain information about a website using command prompt:
This trick is used to find out the hosting provider which hosted the particular domain.
Follow the below mentioned method:
1.   Start->Run(Ctrl+R)->cmd(open Command prompt).
2.  Type the given command and then press enter(“tracert www.domainname.com”).
Enter the website name whose information is to be obtained in the above given command.
Once the enter is pressed, it will tell you all the information related to  a particular domain like, Location, Country and some details of that domain.

Thursday, January 13, 2011

Website blocking on local computer

Website blocking on local computer

If you want to block access to particular websites on your system you can use this method to block some websites.  Moreover, parents can also block certain websites from their children. It is most widely used in schools and colleges to restrict the use of some websites which are not allowed to be opened in these places, for example, Sites containing explicit material, social networking or free downloading sites. These are also used in business centres or offices to stop the employees for wasting time on various social networking sites.
   
This trick can be performed in this way.

What is javascript:void(0) Error?

javascript:void(0) Error
javascript:void(0) is an error message that occasionally appears in a web browser when there is a problem loading a JavaScript from a web page.
javascript:void(0) error message is caused by following problems:


1.      A  popup blocker has blocked the JavaScript.
2.      A web proxy is malfunctioned.
3.      JavaScript is not enabled.
4.      JavaScript ‘s web browser implementation is broken.
5.      JavaScript is improperly written.




javascript:void(0) error message can be removed using following methods:
1.      Don’t  blocks the pop-up for the respective sites.
2.      Don’t  use web proxy or instead disable it.
3.      JavaScript should be properly written.
4.      Enable the  JavaScript.
5.      Change your web browsers or obtain the latest vesion your web browser.


How to use javascript:void(0)
javascript:void(0) is used with the the HTML <a href=> tag. Thus, clicking on a hyperlink reloads a web page or redirects to another web page. This may not be feasible every time. Many times, clicking on a hyperlink may need to perform a client side script operation instead of redirecting or reloading  the web page.This can be achieved placing “javascript:void(0)” in the href attribute of the tag.

Wednesday, January 12, 2011

LINUX COMMANDS PART-2

id       Print user and group id's
  if       Conditionally perform a command
  ifconfig Configure a network interface
  ifdown   Stop a network interface
  ifup     Start a network interface up
  import   Capture an X server screen and save the image to file
  install  Copy files and set attributes
  join     Join lines on a common field
  kill     Stop a process from running
  killall  Kill processes by name
  less     Display output one screen at a time
  let      Perform arithmetic on shell variables •
  ln       Make links between files
  local    Create variables •
  locate   Find files
  logname  Print current login name
  logout   Exit a login shell •
  look     Display lines beginning with a given string
  lpc      Line printer control program
  lpr      Off line print
  lprint   Print a file
  lprintd  Abort a print job
  lprintq  List the print queue
  lprm     Remove jobs from the print queue
  ls       List information about file(s)
  lsof     List open files
  make     Recompile a group of programs
  man      Help manual
  mkdir    Create new folder(s)
  mkfifo   Make FIFOs (named pipes)
  mkisofs  Create an hybrid ISO9660/JOLIET/HFS filesystem
  mknod    Make block or character special files
  more     Display output one screen at a time
  mount    Mount a file system
  mtools   Manipulate MS-DOS files
  mv       Move or rename files or directories
  mmv      Mass Move and rename (files)
  netstat  Networking information
  nice     Set the priority of a command or job
  nl       Number lines and write files
  nohup    Run a command immune to hangups
  nslookup Query Internet name servers interactively
  open     Open a file in its default application
  op       Operator access

Monday, January 10, 2011

First Basic AJAX code for beginners


AJAX is asynchronous javascript and xml, and is most widely used technology to give dynamic content to other web development technologies like ASP.NET and PHP.
AJAX is a technique for creating fast and dynamic web pages.
AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page.Classic web pages, (which do not use AJAX) must reload the entire page if the content should change.
Examples of applications using AJAX : Google Maps, Gmail, Youtube, and Facebook tabs. AJAX is based on internet standards, and uses a combination of:

   1) XMLHttpRequest object (to exchange data asynchronously with a server)
   2) JavaScript/DOM (to display/interact with the information)
   3) CSS (to style the data)
   4) XML (often used as the format for transferring data)

 AJAX applications are browser- and platform-independent!

Here is the first code:

/////////////////////
In design view enter the following code
/////////////////////
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
 
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
         <asp:Label ID="Label1" runat="server">name</asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

            <br />
            <br />
            <asp:Label ID="Label2" runat="server"></asp:Label>

        <br />
        <br />
        <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
            <asp:UpdateProgress ID="UpdateProgress1" runat="server">
            <ProgressTemplate>
                <asp:Image ID="Image1" runat="server" ImageUrl="~/ajax-loader (1).gif" />
            </ProgressTemplate>
            </asp:UpdateProgress>
        </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>


///////////////////////
In code view enter the following:
//////////////////////
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Label2.Text = "hello " + TextBox1.Text;
        System.Threading.Thread.Sleep(5000);
    }
}
///////////////////////////////////////


In this method whenever the user fills the textbox and then clicks the command button, the animated image ajax-loader(1).gif will appear for 5 seconds before being vanished and then the value of textbox in the preceding label.

5 BEST META SEARCH ENGINES

5 best meta search engines


Meta search engines are search engines that search other search engines. Confused? To put it simply, a meta search engine submits your query to several other search engines and returns a summary of the results. Therefore, the search results you receive are an aggregate result of multiple searches.
While this strategy gives your search a broader scope than searching a single search engine, the results are not always better. This is because the meta search engine must use its own algorithm to choose the best results from multiple search engines. Often, the results returned by a meta search engine are not as relevant as those returned by a standard search engine.


Mamma
Mamma is an unusual meta search engine in that it only searches a few major indexes the 
rest of the sites queried are directories or paid-placement services.
Launched in 1996, Mamma was one of the Internet’s first tier 2 metasearch engines. With a 
simple user-interface, this metasearch engine allows users to search images, news, 
twitter and jobs besides web search.
The search results are quite relevant and deep compared to other search engines. However, 
it may be difficult for users to distinguish between the sponsored results and other 
results, especially informative articles. For example, my web search results for “cheese” 
returned a mix of sponsored and non-sponsored results, the main reason being the use of 
similar font color and style.Full marks to Mamma due to its less clutter, quick response 
and simple user interface.
Its link is:
http://www.mamma.com

Sunday, January 9, 2011

Creating a Dynamic left menu on a web page

A left menu acts like an sitemap, onmouseover action i.e whenever we hover a mouse on left menu a subdirectory will pop up for each main directory.


This can be quiet helpful in giving a better or more attractive look to your web page than with a site map.


You just create a leftmenu.ascx file drag it from solution explorer of visual studio to the desired location on your web page.


///////////////////


Here is the design code for the leftmenu.ascx file:


///////////////////


<%@ Control Language="C#" AutoEventWireup="true" CodeFile="leftMenu.ascx.cs" Inherits="leftMenu" %>


<script language="javascript" type="text/javascript">


function fun1()


{


 d1.style.visibility='visible';


}


function fun2()


{


 d1.style.visibility='hidden';


}


function fun3()


{


 d2.style.visibility='visible';


}


function fun4()


{


 d2.style.visibility='hidden';


}


function fun5()


{


 d3.style.visibility='visible';


}


function fun6()


{


 d3.style.visibility='hidden';


}


function fun7()


{


 d4.style.visibility='visible';


}


function fun8()


{


 d4.style.visibility='hidden';


}


</script>


<body>


<div style="Z-INDEX: 101; LEFT: 20px; WIDTH: 101px; POSITION: absolute; TOP: 80px; HEIGHT: 80px" >


<a href="" style="BACKGROUND:yellow;WIDTH:100px;HEIGHT:20px;TEXT-DECORATION:none" onmouseover="fun1();this.style.background='orange'"


onmouseout="fun2();this.style.background='yellow'">ABCD 1<font color="yellow">------&gt;</font></a><br />


<a href="" style="BACKGROUND:yellow;WIDTH:100px;HEIGHT:20px;TEXT-DECORATION:none" onmouseover="fun3();this.style.background='orange'"


onmouseout="fun4();this.style.background='yellow'">ABCD 2<font color="yellow">------&gt;</font></a><br />


<a href="" style="BACKGROUND:yellow;WIDTH:100px;HEIGHT:20px;TEXT-DECORATION:none" onmouseover="fun5();this.style.background='orange'"


onmouseout="fun6();this.style.background='yellow'">ABCD 3<font color="yellow">------&gt;</font></a><br />


<a href="" style="BACKGROUND:yellow;WIDTH:100px;HEIGHT:20px;TEXT-DECORATION:none" onmouseover="fun7();this.style.background='orange'"


onmouseout="fun8();this.style.background='yellow'">ABCD 4<font color="yellow">------&gt;</font></a>


</div>


<div id="d1" style="Z-INDEX:101;LEFT:120px;VISIBILITY:hidden;WIDTH:101px;POSITION:absolute;TOP:80px;HEIGHT:48px"


onmouseover="fun1()" onmouseout="fun2()">


<a onmouseover="this.style.background='orange'" style="BACKGROUND: yellow; WIDTH: 100px; HEIGHT: 20px; TEXT-DECORATION: none"


onmouseout="this.style.background='yellow'" href="default2.aspx">ABCD 11</a><br />


<a onmouseover="this.style.background='orange'" style="BACKGROUND: yellow; WIDTH: 100px; HEIGHT: 20px; TEXT-DECORATION: none" onmouseout="this.style.background='yellow'" href="WebForm1.aspx">ABCD 12</a><br />


<a onmouseover="this.style.background='orange'" style="BACKGROUND: yellow; WIDTH: 100px; HEIGHT: 20px; TEXT-DECORATION: none" onmouseout="this.style.background='yellow'" href="">ABCD 13</a><br />


<a onmouseover="this.style.background='orange'" style="BACKGROUND: yellow; WIDTH: 100px; HEIGHT: 20px; TEXT-DECORATION: none" onmouseout="this.style.background='yellow'" href="">ABCD 14</a>


</div>


<div id="d2" style="Z-INDEX:101;LEFT:120px;VISIBILITY:hidden;WIDTH:101px;POSITION:absolute;TOP:100px;HEIGHT:48px"


 onmouseover="fun3()" onmouseout="fun4()">


<a onmouseover="this.style.background='orange'" style="BACKGROUND: yellow; WIDTH: 100px; HEIGHT: 20px; TEXT-DECORATION: none" onmouseout="this.style.background='yellow'" href="">ABCD 21</a><br />


<a onmouseover="this.style.background='orange'" style="BACKGROUND: yellow; WIDTH: 100px; HEIGHT: 20px; TEXT-DECORATION: none" onmouseout="this.style.background='yellow'" href="">ABCD 22</a><br />


<a onmouseover="this.style.background='orange'" style="BACKGROUND: yellow; WIDTH: 100px; HEIGHT: 20px; TEXT-DECORATION: none" onmouseout="this.style.background='yellow'" href="">ABCD 23</a><br />


<a onmouseover="this.style.background='orange'" style="BACKGROUND: yellow; WIDTH: 100px; HEIGHT: 20px; TEXT-DECORATION: none" onmouseout="this.style.background='yellow'" href="">ABCD 24</a>


</div>


<div id="d3" style="Z-INDEX:101;LEFT:120px;VISIBILITY:hidden;WIDTH:101px;POSITION:absolute;TOP:120px;HEIGHT:48px"


onmouseover="fun5()" onmouseout="fun6()">


<a onmouseover="this.style.background='orange'" style="BACKGROUND: yellow; WIDTH: 100px; HEIGHT: 20px; TEXT-DECORATION: none" onmouseout="this.style.background='yellow'" href="">ABCD 31</a><br />


<a onmouseover="this.style.background='orange'" style="BACKGROUND: yellow; WIDTH: 100px; HEIGHT: 20px; TEXT-DECORATION: none" onmouseout="this.style.background='yellow'" href="">ABCD 32</a><br />


<a onmouseover="this.style.background='orange'" style="BACKGROUND: yellow; WIDTH: 100px; HEIGHT: 20px; TEXT-DECORATION: none" onmouseout="this.style.background='yellow'" href="">ABCD 33</a><br />


<a onmouseover="this.style.background='orange'" style="BACKGROUND: yellow; WIDTH: 100px; HEIGHT: 20px; TEXT-DECORATION: none" onmouseout="this.style.background='yellow'" href="">ABCD 34</a>


</div>


<div id="d4" style="Z-INDEX:101;LEFT:120px;VISIBILITY:hidden;WIDTH:101px;POSITION:absolute;TOP:140px;HEIGHT:48px"


onmouseover="fun7()" onmouseout="fun8()">


<a onmouseover="this.style.background='orange'" style="BACKGROUND: yellow; WIDTH: 100px; HEIGHT: 20px; TEXT-DECORATION: none" onmouseout="this.style.background='yellow'" href="">ABCD 41</a><br />


<a onmouseover="this.style.background='orange'" style="BACKGROUND: yellow; WIDTH: 100px; HEIGHT: 20px; TEXT-DECORATION: none" onmouseout="this.style.background='yellow'" href="">ABCD 42</a><br />


<a onmouseover="this.style.background='orange'" style="BACKGROUND: yellow; WIDTH: 100px; HEIGHT: 20px; TEXT-DECORATION: none" onmouseout="this.style.background='yellow'" href="">ABCD 43</a><br />


<a onmouseover="this.style.background='orange'" style="BACKGROUND: yellow; WIDTH: 100px; HEIGHT: 20px; TEXT-DECORATION: none" onmouseout="this.style.background='yellow'" href="">ABCD 44</a>


</div>


</body>





LINUX COMMANDS PART-1

  adduser  Add a user to the system
  addgroup Add a group to the system
  alias    Create an alias •
  apropos  Search Help manual pages (man -k)
  apt-get  Search for and install software packages (Debian)
  aspell   Spell Checker
  awk      Find and Replace text, database sort/validate/index
  basename Strip directory and suffix from filenames
  bash     GNU Bourne-Again SHell
  bc       Arbitrary precision calculator language
  bg       Send to background
  break    Exit from a loop •
  builtin  Run a shell builtin
  bzip2    Compress or decompress named file(s)
  cal      Display a calendar
  case     Conditionally perform a command
  cat      Display the contents of a file
  cd       Change Directory

Saturday, January 8, 2011

FAT to NTFS Conversion

How to Convert FAT to NTFS

The chance of corruption or data loss during the conversion from  FAT to NTFS is minimum.

But it is best to have a backup of the data of the drive, on another drive, that it is to be converted
before executing the convert command.

To convert a FAT partition to NTFS, perform the following steps.

Friday, January 7, 2011

Stopwatch in javascript

we an easily make a stopwatch in javascript. I have used two functions in making of javascript stopwatch by use of two functions namely timedCount() and stopCount() as they have been described in the code below.


we can make both incrementing and decrementing stop watch in javascript using the code below by making very few changes. we can change the starting value by making changes in variable c value accordingly.
///////////////////////////////////
Here is the code for incrementing:
//////////////////////////////////
<html>
<head>
<title>stopwatch</title>
</head>
<script type="text/javascript">
var c=0
var t
function stopCount()
{
clearTimeout(t)
}
function timedCount()
{
document.getElementById('txt').value=c
c=c+1
if(c==61)
{
alert("time over")
stopcount()
}
t=setTimeout("timedCount()",1000)
}
</script>
<body>
<center>
<form>
 <input type="text" id="txt">
 <input type="button" value="Start stopwatch" onClick="timedCount()">
 <p>Click on the Start button above to start the stopwatch.</p>
</form>
<center>
</body>
</html>
////////////////////////////////////
And here is the code for decrementing stopwatch:
////////////////////////////////////
<html>
<head>
<title>stopwatch</title>
</head>
<script type="text/javascript">
var c=60
var t
function stopCount()
{
clearTimeout(t)
}
function timedCount()
{
document.getElementById('txt').value=c
c=c-1
if(c==-1)
{
alert("time over")
stopcount()
}
t=setTimeout("timedCount()",1000)
}
</script>
<body>
<center>
<form>
 <input type="text" id="txt">
 <input type="button" value="Start stopwatch" onClick="timedCount()">
 <p>Click on the Start button above to start the stopwatch.</p>
</form>
<center>
</body>
</html>


please give comments and advices even if you liked it or not.