Monday, 20 May 2013

what is the Best programming Language to learn in 2013


An interesting article caught my eye at jobstractor.com — the programming language trends review. The company analyzed more than 60,000 job vacancies during 2012 to produce a chart of the most sought-after technologies:

                            
                Language                              Jobs
                            PHP                                                                      12,664
                            Java                                                                      12,558
                            Objective C                                                          8,925 
                            SQL                                                                       5,165                                           
                            Android(java)                                                       4,981
                            Ruby                                                                     3,859            
                            Javascript                                                             3,742
                            c#                                                                           3,549
                            c++                                                                         1,908
                            Actionscript                                                           1,821
                            Python                                                                   1,649
                            C                                                                            1,087
                            Asp.net                                                                  818


Despite developer complaints, demand for PHP and Java (server/Android) remains strong. You would also expect those jobs to require some SQL knowledge although that has a strong showing in its own right. ActionScript is a dying art so it’s rapidly falling off the chart.

WORLD TOP TEN PROGRAMMING LANGUAGES

1.JAVA :
     An object-oriented programming language developed in the late 1990s by James Gosling and colleagues at Sun Microsystems.

2.C:
    C, a general purpose programming language built by Dennis Ritchie when he was a part of Bell Telephone labs, is the bass of C++ and other programming languages. It was built to work with the Unix operating system.

3.C#:
   This general-purpose programming language developed by Microsoft evolved from C and C++ as a part of the software company’s .NET initiative.

4.C++:
    C++ is a general purpose multi-paradigm spanning compiled language that has both high-level and low-level languages’ features. It was started as an enhancement to the C programming language,Bjarne Stroustrup in 1979.

5.Objective-c:
     This object-oriented programming language created first by Brad Cox and Tom Love at their company Stepstone in the early 1980s, adds Smalltalk-like messaging to the C programming language.

6.PHP:
    This language is especially suited for Web development because of it easy embedding into HTML pages. It is an open-source, server-side, cross-platform, interpretive HTML scripting language

7.VB :
   This is an event-driven programming language which is implemented on Microsoft’s .Net framework.

8.Python :
    This is an event-driven programming language which is extensively used by Google because of its simplicity. It is managed by the Python Software Foundation.

9.perl :
    Being a high-level programming language, its emphasis lies in code readability and clear syntax. It combines Object-oriented and functional programming styles, and is often used as a scripting language. Perl is an open-source language used widely to process text through CGI programs.

10.Javascript :
    JavaScript is an object-oriented scripting language that is smaller than Java. Being a client-side language, it runs in the web browser on the client-side with a simplified set of commands, easier code and no need for compilation.


Monday, 6 May 2013

javascript conform box


<script type="text/javascript">
function Validate(event) 
{
var thereturn = confirm("Are you sure want to delete the profile?");
if (event) 
{
        if (!thereturn)
{
event.preventDefault();
}
} 
else 
{
return thereturn;
}
}
window.onload = function()
{ 
document.getElementById('delete-form').onsubmit = Validate;
};
</script>
<input type="submit" class="submit redform" value="delete"  onclick="Validate(event)" />

Tuesday, 23 April 2013

CRUD operation using checkbox in PHP


<!--jquery for check box selecting  -->
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script>
$(document).ready(function ()
{
$('#d').click(function()
{
if (this.checked==true)
{
$('input[name="a[]"]').prop('checked', true);
}
if (this.checked==false)
{

$('input[name="a[]"]').prop('checked', false);
}
});
});
</script>
<!--new registeration form -->
Register here !!
<form action="" method="post">
username : <input type="text" name="uname"/></br>
password : <input type="password" name="pas"/></br>
Postion  :<input type="text" name="pos"/></br>
<input type="submit" value="register" name="reg"/>
</form>
<!--new chk box editing-->
<?php
$cn=mysql_connect("localhost","root","123");
mysql_select_db("hotel",$cn);
$wue=mysql_query("select * from user");
echo '<form action="" method="post">';
?>
<!--Displaying db values with check box-->
<table>

<tr>
<td><input type="checkbox" name="act" value="" id="d"></td>
<td>ID</td>
<td>USERNAME</td>
<td>POSITION</td>
</tr>
<?php
while($row=mysql_fetch_array($wue))
{
?>
<tr>
<td>
<input type="checkbox" name="a[]" value="<?php echo $row['user_id'];?>"></td>
<?php<
echo '<td>'.$row['user_id'].'</td>';
echo '<td>'.$row['username'].'</td>';
echo '<td>'.$row['position'].'</td>';
echo '</tr>';
}
?>
</table>
<?php
echo '<input type="submit" name="subval" value="edit"/>'.'<input type="submit" name="subdelete" value="delete"/>'.'</form>';
//check box selected value will be displayed in text box
if(isset($_POST['subval']))
{
$ar=$_POST['a'];
echo '<form action="" method="post">';
foreach($ar as $ty)
{
$ru=mysql_query("select * from user where user_id='$ty'");
$ew=mysql_fetch_array($ru);
?>
username :<input type="text" value="<?php echo $ew['username'];  ?>" name="name<?php echo $ty ?>"/>
Position :<input type="text" value="<?php echo $ew['position']; ?>" name="pos<?php echo $ty ?>"/>
<input type="hidden" name="id[]" value="<?php echo $ew['user_id']; ?>">
</br>
<?php
}
echo '<input type="submit" name="subupdate" value="update"/>'.'</form>';
}
//update the text box value after editing
if(isset($_POST['subupdate']))
{
$u=$_POST['id'];
foreach($u as $i)
{
$updt=mysql_query("update user set username='".$_POST['name'.$i]."' , position='".$_POST['pos'.$i]."' where user_id='$i'");
if($updt)
{
echo '<script>window.location=""</script>';
}
}
}
//delete the selected values by using check box
if(isset($_POST['subdelete']))
{
$uio=$_POST['a'];
foreach($uio as $yu)
{
$delt=mysql_query("delete from user where user_id='$yu'");
if($delt)
{
echo '<script>window.location=""</script>';
}
}
}
if(isset($_POST['reg']))
{
$insr=mysql_query("insert into user ( `username`, `password`, `position`) values('".$_POST['uname']."','".$_POST['pas']."','".$_POST['pos']."')");
if($insr)
{
echo '<script>window.location=""</script>';
}
}
?>

OUTPUT:
Download

Monday, 22 April 2013

how to display Facebook Likes in Your Web-site / blog

Step 1: go to this link
https://developers.facebook.com/docs/reference/plugins/like/

Step 2:
Paste your fb page url


Step 3:
press get code button u ll get code preview like this

Step 4:
copy and Paste the code [html-5 given in above prev image]
in your web page
note: paste the given code before body tag
like
<html>
<head>
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=433000033432471";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-href="http://www.facebook.com/akblog28" data-send="true" data-width="450" data-show-faces="true"></div>
<head>
<body>
</html>
Step 5:
Click save and see your web page
note : this code will run only in Ftp server this code not supported to localhost like [wamp,lamp,mamp]

Step 6:
Finally u got output like this

Sunday, 21 April 2013

Steps To become a Programmer


HOW TO BECOME A PROGRAMMER :
Becoming a programmer is a Advancing process that builds up your skills day by day and year by year, and programming can be fun and rewarding (mentally, spiritually and financially). This guide does not promise to give a magically easy way to becoming a programmer, and the ordering of the steps is not sacred, but you'll get a general outline of how to become a programmer in one of the modern programming fields.


Step 1 :
  Take the preliminary course


Step 2:
Learn Database concepts such as tables,views,triggers,procedures
you can learn any simple database packages, such as
-Msaccess
-Mssql
-Mysql
this are all good database to learn and database are commonly accessed by sql queries

Step 3: 
Decide what programming you want to be
-web programmer
-Desktop Application programmer
    -Operating system (OS) oriented programmer
    -Platform-independent programmer
-Distributed applications programmer
-Library/platform/framework/core programmer
-System programmer
   -Kernel programmer
   -Driver programmer
   -Compiler programmer
-Programming scientist

Step 4:
Learn the technologies and programming languages related to your programming field of choice.

Step 5:
Do projects from what are the technologies u learnt , be strong in that

Step 6:
Learn advanced concepts day by day and implement it .



Saturday, 20 April 2013

want a mind sharpness, 10 things to do it !


Exercise
Book Reading
Eat Healthy food
Maintain good posture
Sleep well
Do painting,drawing and do some doodle works
Listen to Music
Learn something new
Puzzle solve
Do Blogging 

Friday, 19 April 2013

Login with google


First go to
https://code.google.com/apis/console/?pli=1

you will get

do like this

After that create outh

please give details 

after that go to index.php 
########## Google Settings.. Client ID, Client Secret #############
$google_client_id  = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';  //give your client id
$google_client_secret  = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx';    //give ur client secret id
$google_redirect_url  = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx';    //give redirect url
$google_developer_key  = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';//give developer key


########## MySql details (Replace with yours) #############
$db_username = ""; //Database Username
$db_password = ""; //Database Password
$hostname = "localhost"; //Mysql Hostname
$db_name = ''; //Database Name
//please made change all info given above and use it !! 


Download

Login with facebook And twitter


In Dbconfig.php : 
<?php
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'dbusername');
define('DB_PASSWORD', 'dbpassword');
define('DB_DATABASE', 'databasename');
$connection = mysql_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD) or die(mysql_error());
$database = mysql_select_db(DB_DATABASE) or die(mysql_error());
?>


In fbconfig.php:

<?php
define('APP_ID', 'xxxxxxxxxxxxxxxxxx');//add your App id
define('APP_SECRET', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx');//add your App secret id
?>

in twconfig.php
<?php
define('YOUR_CONSUMER_KEY', 'xxxxxxxxxxxxxxxxxxxxxxxxxx');//add your twitter consumer key
define('YOUR_CONSUMER_SECRET', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');//add your consume secret key 
?>

in logintwitter.php
$request_token = $twitteroauth->getRequestToken('http://redirect url');


Download

Thursday, 18 April 2013

Display number of Files in a Folder using PHP

<?php
   $path = "d://songs/2013 songs";
   // Open the folder
   $dir_handle = @opendir($path) or die("Unable to open $path");
   // Loop through the files
   while ($file = readdir($dir_handle))
   { 
    echo "<a href=\"$file\">$file</a><br />";
   }
   closedir($dir_handle);
?>

Download