Showing posts with label a. Show all posts
Showing posts with label a. Show all posts

How to Learn to Program A Computer

Learning to program a computer is pretty much the same as learning to speak another language. This is so because in order to program you must learn a language which the computer understands. The only difference is that computer language is a written language. The following steps described will therefore sound familiar to that of learning to speak another language such as French, Spanish, or even English. No matter whether you want to learn some variant of BASIC, C, Cobol, Fortran, Pascal, Java, Perl, Python or even Assembly Language, it will follow these steps which are listed below that are common to learning French, Spanish, Chinese or any of the other languages of the world.

Instructions
  1. Step 1

    Of course the first place that you would think of going to learn to program computers would be an accredited school, which is not a bad place to start, but not everybody can afford the cost of a formal school. There are some community centers that offer courses on computers operations and programming. This courses are generally basic courses and work as a good starting point in your learning.

  2. Step 2

    No matter whether you are studying at a formal school, taking a community center course, or studying on your own the library is the place to be. That is you will find useful books on programming. Those books will give good examples to study and learn. The examples will also work as a reference and building block.

  3. Step 3

    When the public library is unable to supply you with books in the language you wish to learn then your locale chain bookstore, such as Borders or Barnes & Noble, should be able to help you out. An extra advantage of the books you find at the bookstore is that many of the computer books are accompanied with a cd/dvd with the lessons they are trying to teach on them.

  4. Step 4

    When the public library is unable to supply you with books in the language you wish to learn then your locale chain bookstore, such as Borders or Barnes & Noble, should be able to help you out. An extra advantage of the books you find at the bookstore is that many of the computer books are accompanied with a cd/dvd with the lessons they are trying to teach on them.

Read More..

In HSDPA how does the network manage the throughput on the Radio Interface for a user connection

Modulation (16QAM, QPSK etc), Coding (convolution coding, fire codes etc), number of codes allocated and scheduling (its a shared resource)

Read More..

Use windows 8 and windows 7 in one PC with a one time and with dual boot



The latest version of the Windows operatingsystem is Windows 8. Many people have already started to use it. But many people prefer the older version of Windows 7 has gone. Some are going to and fro. Many people are worried about whether you want to use any Windows 8. This option will
work for them. Install Windows 7 and use or enjoy Windows 8, with a pure mind dual boot it. Then you can take a look at the same time usingtwo versions of the ones you like, whereyou will feel comfortable. Lets have a look at the steps to dual boot.Now we will see that How to use windows 7 and Windows 8 in one pc with any time.

Take a backup of your system files tothe beginning, because a lot of your valuable datamay be lost during the partitioning process.Can be fully or partially deleted files no worth? Dual boot will keep backup before so sensible.

1.  First, add a new partition for Windows 7.

2. Then install Windows 8.

Now we will see how to create partition in windows 7.

Windows 7 will be adding a new partition:


Follow these steps.

Step-1: Press “Win + R” shortcut on your Windows 7 PC for open run options. Please type "diskmgmt.msc". Type in the Disk Management window will open immediately.

Step-2: Now the C drive, Windows will create space for new operating system windows 8. Right click on the C drive in Disk Management. Please select "Shrink Volume".

Step-3: A new window will open, "Querying volume for available shrink space, please wait". System to wait for responses. Then select how much space you want to shrink.

Step-4: You shrink to wait until the end of the task. Then unallocated partition-click on the Right. Then select New Simple Volume option. Then format the new partition. You can rename the volume label Windows 8.

Windows 8 InstallationProcess:


When you have completed the above process willbegin the process of installing Windows 8.

Step-1: Insert the DVD orUSB drive in Windows 8 PC Bothabale. Then reboot to install Windows 8.

Step-2: Windows setup during the Type of installation asCustom option selected.

Step-3: The setup process will get the option "Where do you want to install Windows". At the time you create a new partition to install Windows 8 choose.  In general, the Windows install process then ends.

Dual boot after the whole process will be completed and you can use the same PC for Windows 8 and Windows 7. After the installation is finished, your boot menu to show both Windows 8 and Windows  7.  Within 30 seconds from the boot menu in Windows 8 will start by default. However, if you want Windows 7 will start all-time you can set it as the default. That is why the boot menu "Change defaults or choose other options" option to enter the change.

Windows is the graphics are quite nice. Many new features have been added to the Microsoft. Sometime a little uncomfortableto use, but the beginning of a new environment, but ifyou can fixit. Windows 8 and Seven together better than theones you feel understood.

That’s it. Visit regular Web Tutorials for get more option of windows 8.

Read More..

How to Add a Google Sitemap to your Blogger Blog

Learn how to generate a complete sitemap of userr Blogger blog using an online sitemap generator and submit the XML sitemap to Google via robots.txt.

The XML Sitemap file is like a directory of all web pages that exist on userr website or blog. Search engines like Google and Bing can use these sitemap files to discover pages on userr site that the search bots may have otherwise missed during regular crawling.

The Problem with Blogger Sitemap Files

An complete sitemap file should mention all pages of a site but that’s not the case if userr blog is hosted on Blogger.
The default XML sitemap file of any Blogger blog will have only the 26 most recent blog posts – see example. That’s a limitation because some of userr older blog pages, that are missing in the default XML sitemap file, may never get indexed in search engines. There’s however a simple solution to fix this problem.

Generate a Complete Sitemap for userr Blogger Blog

This section is valid for both regular Blogger blogs (that use a .blogspot.com address) and also the self-hosted Blogger blogs that use a custom domain (like postsecret.com).
Here’s what user need to do to expose userr blog’s complete site structure to search engines with the help of an XML sitemap.
  1. Open the Sitemap Generator and type the full address of userr blogspot blog (or userr self-hosted Blogger blog).
  2. Click the Create Sitemap button and this tool will instantly generate the necessary text for userr sitemap. Copy the entire generated text to userr clipboard (see screenshot below).
  3. Next go to userr Blogger dashboard and under Settings – > Search Preferences, the enable Custom robots.txt option (available in the Crawling and Indexing section). Paste the clipboard text here and save userr changes.
And we are done. Search engines will automatically discover userr XML sitemap files via the robots.txt file and user don’t have to ping them manually.
PS: If user have
switched from Blogger to WordPress, it still makes sense to submit XML sitemaps of userr old Blogspot blog as that will aid search engines discover userr new WordPress blog posts and pages.
Read More..

A Complete Note Keeping Application

A Complete Note Keeping Application


In this post we are going to expand the Note
Keeping Application
, using MySQL
to create a complete multi-user Application which would be able to register
new users
as well. It’d be a multi-user system hence many users
can register and work on their notes simultaneously. Each user’s data
will be private to them. It’d also have the missing features such as editing
and deleting of existing notes, hence a complete Note Keeping Application.


In a multi-user application we need to separate each user’s data so that
every user is shown only the data belonging to them. As we’ll be using
MySQL database to store data, one option is to create a table for each user,
it’d be good but when you have like thousands of users, having a table
for each is not very efficient.


There is one very efficient technique however, to separate data of different
users using relational database structure. For this we’ll only need two
tables for the whole application. One will store user-data along with an unique
userID (serialized) for each row (or user). The second table will store note
data, such as serial number, title, body etc. along with one more column to
store the userID (from table 1) to know the user storing the note. The following
image will clarify this:


Foreign Key and Primary Key


ID field was a Primary
Key
in the first table while when it appears in the second table to
make relation between the two tables; it is called a ‘foreign key’.
Please note that we are not doing anything special to create a foreign key,
just using a logical relation.


So with this structure any note getting stored has a valid ID (according to
the user who is logged in) in the userID field of the second (notes) table.
Thus each row in the second table is logically separated and related with the
user who has stored it.


Apart from multi-user functionality, we’re also integrating other features
like editing and deleting existing notes, which are done using the following
SQL
queries
:


For editing a note:


UPDATE <table-name> SET <column1=new-data1>,

<column2=new-data2>,



WHERE <column0=some-data>


For deleting a note:


DELETE FROM <table-name>

WHERE <some-column=some-data>


Now we have enough knowledge to see the code:


login.php:



<html>

<head>

<title>My Notes | Login</title>

</head>



<body>

<h1>My Notes</h1>

<h2>Login </h2>

<?php

//if submit button was pressed

//that means form was submitted

if(isset($_POST[submit]))

{

    
//connect to MySQL

    //change -USER- and -PASS-

    
$db=new mysqli(localhost,-USER-,-PASS-);

    
$db->select_db(one);



    
//fetch other form data

    
$username=trim($_POST[username]);

    
$password=trim($_POST[password]);

    

    
//start a session

    
session_start();

    
$result=$db->query("select pass from user where uname=$username");

    if(
$result->num_rows>0

    {

        
$pass=$result->fetch_row();

        
$pass=$pass[0];

        if(
$password=$pass)

        {

            
//save session variable with the username

            //which will be unique

            
$_SESSION[user]=$username;

            
//redirect to homepage

            
header("Location: home.php");

        }

    }

    echo 
"<p style="color:#ff0000;">Incorrect Username/Password. Please Try Again.</p>";

    
//close db connection

    
$db->close();

}

else

//requesting the login page

{

    
//if requesting the login page

    //check if already logged in

    //and redirect to homepage if true



    //start session

    
session_start();

    if(isset(
$_SESSION[user]))

    {

        
//redirect to homepage

        //if already logged in

        
header("Location: home.php");

    }

}

//if not logged in show the login page

?>

<form name="form1" id="form1" method="post" action="">

  <table width="30%" border="0" cellspacing="0" cellpadding="0">

    <tr> 

      <td>Username</td>

      <td><input name="username" type="text" id="username" /></td>

    </tr>

    <tr> 

      <td>Password</td>

      <td><input name="password" type="password" id="password" /></td>

    </tr>

    <tr>

      <td>&nbsp;</td>

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

    </tr>

  </table>

</form>

<p>New User <a href="user_reg.php">Register Here</a></p>

</body>

</html>


user_reg.php: Please see Designing
a User-Registration Script in PHP
for this. Since this post has already
gotten so long.


home.php:



<html>

<head>

<title>My Notes</title>

</head>



<body>

<h1>My Notes</h1>

<p>Create A New Note</p>

<form name="form1" id="form1" method="post" action="home.php">

  <table width="100%" border="0" cellspacing="0" cellpadding="0">

    <tr> 

      <td width="22%"><font size="2">Title</font></td>

      <td width="78%"><input name="title" type="text" id="title" size="30"  /></td>

    </tr>

    <tr> 

      <td><font size="2">Body</font></td>

      <td><textarea name="body" cols="30" rows="7" id="body"></textarea></td>

    </tr>

    <tr> 

      <td><input name="post" type="submit" id="post" value="Post Note" /></td>

      <td><input type="reset" name="Submit2" value="Reset" /></td>

    </tr>

  </table>

</form>

<?php

//start session again

session_start();

//store the username

//that was stored by the login page

$uname=$_SESSION[user];

//if someone is requesting this page

//without logging in

if(!isset($uname))

    
//redirect to login page

    
header(Location: login.php);

    

//connect to MySQL 

//provide your USERNAME and PASSWORD 

//change localhost to the MySQL server 

//host, if not using on local server 

$db=new mysqli(localhost,root,26519877);



//if this is the first time

//and database is not craeted

if(!$db->select_db(one))

    
//create the database

    
$db->query(create database one);



//select the databasw to work with

$db->select_db(one);

            

//if table is not craeted, craete it

if(!$db->query(select * from notes))

    
$db->query(create table notes(id int auto_increment primary key, title varchar(100), date varchar(50), body varchar(1000), userid int));

        

//find the userid from the user table

//it is the unique id of the logged in user

//itd be needed to retrieve and save notes

$result=$db->query("select userid from user where uname=$uname");

$result=$result->fetch_row();

$userid=$result[0];

    

//if logged in

echo "<p style="background: #000; color: #fff;"><b>Hello: <i>".$_SESSION[user]."</b></i></p>";

echo 
"<a href="?action=logout">Log Out</a></p>";



//----PERFORM ACTION AS PER WHAT WAS CLICKED----

//if post button was pressed

//i.e note was posted

if(isset($_POST[post]))

{

    
$title=strip_tags($_POST[title]);

    
$body=strip_tags($_POST[body]);

    
//convert newlines in the body to <br />

    //so that formatting dont by user remains

    
$body=nl2br($body);

    
//have current date and time

    
$date=date(H:iA jS F Y);

    

    
//escape special characters that

    //can cause probs with MySQL

    
$title=addslashes($title);

    
$body=addslashes($body);

    
$date=addslashes($date);

    

    
//if body or title field was not blank

    
if($body!= && $title!=)

        
//ready to insert data

        
$db->query("insert into notes (title, date, body, userid) values ($title, $date, $body, $userid)");

}

//if edit button was clicked on from the edit

//page

if(isset($_POST[edit]))

{

    
$title=strip_tags($_POST[title]);

    
$body=strip_tags($_POST[body]);

    
$date=strip_tags($_POST[date]);

    
//fetch the Note ID sent by the hiddeen form element

    
$id=trim($_POST[id]);

    

    
//convert newlines in the body to <br />

    //so that formatting dont by user remains

    
$body=nl2br($body);

    
//have current date and time

    

    //escape special characters that

    //can cause probs with MySQL

    
$title=addslashes($title);

    
$body=addslashes($body);

    
$date=addslashes($date);

    

    
//if body or title field was not blank

    
if($body!= && $title!=)

        
//ready to updatedata

        
$db->query("update notes set title=$title, date=$date, body=$body where id=$id");

}



//if delete link is clicked w.r.t any note

if($_GET[action]==del)

{

    
//have the ID of note to be deleted

    
$noteid=$_GET[id];

    

    
$db->query("delete from notes where id=$noteid");

}

//if logout was clicked

if($_GET[action]==logout)

{

    unset(
$_SESSION[user]);

    
//redirect to login page

    
header(Location: login.php);

}

//----/ACTION PERFORMED----

    

//----SHOW THE PREVIOUS NOTES----

echo "<h2 style="background: #000; color: #fff;">Previous Notes</h2>";

//fetch all the notes of the user

//order by id desc to have in newest first order

$result=$db->query("select * from notes where userid=$userid order by id desc");

$num_rows=$result->num_rows;

for(
$i=0;$i<$num_rows;$i++)

{

    
$row=$result->fetch_row();

    
$id=$row[0];

    
$title=$row[1];

    
$date=$row[2];

    
$body=$row[3];

    

    
//wed escaped special chars

    //so de-escaping those

    
$title=stripslashes($title);

    
$body=stripslashes($body);

    
$date=stripslashes($date);

    

    echo 
"<h3>$title</h3>

          <p><i>$date</i></p>

          <p>$body<br />"
;

    
//echo deleting option

    
echo "<a href="?action=del&id=$id">Delete</a> | <a href="edit.php?id=$id">Edit</a></p>";

}

//----/NOTES SHOWN----

$db->close();

?>

</body>

</html>


edit.php:



<?php

//fetch the unique note id sent

$id=(int)$_GET[id];



//start session again

session_start();

//store the username

//that was stored by the login page

$uname=$_SESSION[user];

//if someone is requesting this page

//without logging in

if(!isset($uname))

    
//redirect to login page

    
header(Location: login.php);

    

//connect to MySQL 

//provide your USERNAME and PASSWORD 

//change localhost if required 

$db=new mysqli(localhost,root,26519877);



//select the databasw to work with

$db->select_db(one);



//query MySQL for the specific note

$result=$db->query("select * from notes where id=$id");

//there will only be one note with an id

//fetch the row and its data

$result=$result->fetch_row();

$title=$result[1];

$date=$result[2];

$body=$result[3];



$db->close();

?>

<html>

<head>


<title>My Notes | Edit</title>

</head>



<body>

<h1>My Notes</h1>

<p>Edit Note</p>

<form name="form1" id="form1" method="post" action="home.php">

  <table width="100%" border="0" cellspacing="0" cellpadding="0">

    <tr> 

      <td width="22%"><font size="2">Title</font></td>

      <td width="78%"><input name="title" type="text" id="title" value="<?php echo $title?>" size="30"  /></td>

    </tr>

       

      <td>Date</td>

      <td><input name="date" type="text" id="date" value="<?php echo $date?>" size="30">

      <!-- hidden field is used for sending some information that user doesnt need to edit -->

      <!--here we are using it to send the ID of the note, it is needed to UPDATE the row -->

        <input name="id" type="hidden" id="id" value="<?php echo $id?>"></td>

    <tr> 

      <td><font size="2">Body</font></td>

      <td><textarea name="body" cols="30" rows="7" id="body"><?php echo $body?></textarea></td>

    </tr>

    <tr> 

      <td><input name="edit" type="submit" id="edit" value="Save Changes" /></td>

      <td><input type="reset" name="Submit2" value="Reset" /></td>

    </tr>

    <tr>

    </tr>

  </table>

</form>


Previous Articles:


Read More..

Need A New Desktop Computer Learn Which Is The Best Bet Here

By Lee Smith


Are you in the market for a new computer? Have you begun shopping for a new computer, but dont know what you are looking for? You arent alone. Many people get confused when it comes to computer shopping. Read on to get some great suggestions how to simplify the entire process.

Always have anti virus on your desktop. Without such a program, malicious software may infect your system. Malicious software programs can hijack your personal information and slow down your computer processing speed. There are several programs available that can scan and repair your computer regularly.

Try and find somebody who is giving away their desktop computer. A lot of people are making the shift to laptops and tablets, so they are attempting to sell their desktop computers for an affordable price. Usually, these computers are in good shape, but before making an offer, be sure that the computer works fine.

If you desktop is slow you can do a boot check to get more speed. You will be able to find this information in the start menu. Then, check out programs that are starting when you start your computer. If there are some listed you do not use often, disable them. Your computer is going to run a lot faster when you do this.

Look for the desktop computer model that suits your needs without exceeding your budget by too much. A lot of people look for machines with too many expensive add-ons that they will really never use. Be selective about the features and components in your desktop purchase to save money.

Compile a list of the tasks you plan to use your computer for, prior to shopping. Which computer you buy is going to have to do with what operations and activities you will be doing. If you intend to do serious gaming, your hardware requirements are going to be much higher than someone who just surfs the Internet.

Check out various reputable tech sites to evaluate any computer before making the decision to buy it. The many available choices can be overwhelming, but checking out reviews or the "editors pick list" will help you decide which computer is worth the money.

Youll need to consider a few things when buying a high-end gaming computer. Your system needs a solid video card, no less than 4 GB in memory and a higher resolution display. You can also get keyboards and controllers specially designed for a better play experience.

Be diligent in your purchasing; a great deal of the information is now online instead of in a booklet. Check out the online information before you purchase to make sure it meets your needs.

Make sure the software on the computer you want to buy is legal. You always should have the key and CD to be sure you wont end up in legal hot water or arent allowed to get later software updates.

Does the computer have enough memory? This is important when purchasing a PC. Will you need a lot of space? Will you be adding a large number of pictures?

Read reviews about computers online. Dont choose a desktop solely on price or looks. Most of the time, cheap computers are that price for a reason.

Are you someone who needs storage for lots of pictures? Memory questions are very common from desktop computer shoppers and you should be able to get good advice from retail store personnel as well as the computer manufacturer about memory capacity and issues for specific desktop computers.

Do not be worried! You have gained more than enough information to begin searching for your perfect computer. It is even possible to print out this article and bring it with you. If youre still in need of assistance, an employee can assist you finding the computer that best fits your needs.




About the Author:



Read More..

Binary Search A Method of Searching

Binary Search method is popular for searching a specific item in an ordered
array (sorted). It can perform the search in minimum possible comparisons, but
it needs the array to be sorted in any order.


Practically, it is used when the data is itself sorted initially or needs to
be sorted for other activities also. This is because you don’t want to
first sort the data and then use binary search, in that case use of linear search
would be practical.


Binary Search Algorithm


Suppose,




  • The array to be AR[SIZE] having SIZE number of elements.




  • L is the index number of the lower element. We take it to be 0.




  • U is the index number of the upper (last) element. It will be (SIZE-1).




  • ITEM is the data that needs to be searched.




  • beg, last and mid are variables of type int(eger).




Here is the algorithm:




  1. LET beg = L AND last = U



  2. REPEAT STEPS 3 THROUGH 6 TILL beg<=last



  3. mid = ( (beg+last)/2)



  4. IF AR[mid] = ITEM THEN
    ITEM IS AT POSITION mid
    BREAK THE LOOP



  5. IF AR[mid] < ITEM THEN
    beg = mid+1



  6. IF AR[mid] > ITEM
    last = mid-1



  7. END OF LOOP



  8. IF AR[mid] = ITEM THEN
    SEARCH IS UNSUCCESSFULL



Here is the example program:


  // BINARY SEARCH PROGRAM
// example program in C++

#include<iostream.h>

void main(void)
{
int beg, last, mid, item, i;
int ar[5];

// sorted data needs to be input
cout<<"enter sorted data:
";
for(i=0; i<5; i++)
cin>>ar[i];

cout<<"enter search term:";
cin>>item;

// as per array
beg=0;
last=5;

// binary searching starts
while(beg<=last)
{
// calculate the middle
// of the array section
mid=((beg+last)/2);

if (ar[mid]==item)
{
cout<<"

";
cout<<item<<" found at index no. "<<mid;
break;
}

if(ar[mid]<item)
beg=mid+1;// should be beg=mid-1 for
// data in descending order

if(ar[mid]>item)
last=mid-1;// should be beg=mid+1 for
// data in descending order
}
// search end

if(!(ar[mid]==item))
cout<<"
Search unsuccessfull!";

cout<<endl;
}

Good-Bye guys!


Do check back for updates!


Related Articles:


Read More..