array object in javascript

array object in javascript

<!doctype html>
<html lang="en">
      var a = new Array(10,10.5,'a',"abcd",true,null);
        for(var i=0;i<a.length;i++){

create a html timer with neat css

html count down timer
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="Generator" content="EditPlus®"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> <title>Document</title> <style> #timer { font-size: -webkit-xxx-large; color: lightskyblue; font-size: 120px; text-align: center; } label#minutes,label#seconds { background: yellow; } </style> </head> <body> <div id="timer"> <label id="minutes">00</label>:<label id="seconds">00</label> <script type="text/javascript"> var minutesLabel = document.getElementById("minutes"); var secondsLabel = document.getElementById("seconds"); var totalSeconds = 0; setInterval(setTime, 1000); function setTime() { ++totalSeconds; secondsLabel.innerHTML = pad(totalSeconds%60); minutesLabel.innerHTML = pad(parseInt(totalSeconds/60)); } function pad(val) { var valString = val + ""; if(valString.length < 2) { return "0" + valString; } else { return valString; } } </script> </div> </body> </html>

how to indexdb database

indexdb database example

<!doctype html>
<html lang="en">
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
    // This works on all devices/browsers, and uses IndexedDBShim as a final fallback 
  var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
  // Open (or create) the database
  var open ="MyDatabase", 1);
  // Create the schema
  open.onupgradeneeded = function () {
   var db = open.result;
   var store = db.createObjectStore("MyObjectStore", {keyPath: "id"});
   var index = store.createIndex("NameIndex", ["name.last", "name.first"]);
  open.onsuccess = function() {
   // Start a new transaction
   var db = open.result;
   var tx = db.transaction("MyObjectStore", "readwrite");
   var store = tx.objectStore("MyObjectStore");
   var index = store.index("NameIndex");
   // Add some data
   store.put({id: 12345, name: {first: "John", last: "Doe"}, age: 42});
   store.put({id: 67890, name: {first: "Bob", last: "Smith"}, age: 35});
   // Query the data
   var getJohn = store.get(12345);
   var getBob = index.get(["Smith", "Bob"]);
   getJohn.onsuccess = function() {
    console.log(getJohn.result);  // => "John"
   getBob.onsuccess = function() {
    console.log(getBob.result);   // => "Bob"
   // Close the db when the transaction is done
   tx.oncomplete = function() {

Ubuntu commands list for daily use

 Ubuntu commands list for daily use

list of ubuntu commands for daily use and interview questions

                 File Commands

1. ls - Directory listing
2. ls –al - Formatted listing with hidden files
3. ls -lt - Sorting the Formatted listing by time modification
4. cd dir - Change directory to dir
5. cd - Change to home directory
6. pwd - Show current working directory
7. mkdir dir - Creating a directory dir
8. tail file - Output the last 10 lines of the file
9. tail -f - file Output the contents of file as it grows,starting withthe last 10 lines
10. touch - file Create or update file
11 rm -rf - dir Force to remove the directory dir
12. cp file1 file2 - Copy the contents of file1 to file2
13. cp -r dir1 dir2 - Copy dir1 to dir2;create dir2 if not present
14. mv file1 file2 - Rename or move file1 to file2,if file2 is an existingdirectory

                        Process management

1. ps - To display the currently working processes
2. top - Display all running process Unix/Linux Command Reference
3. pkill - pattern Will kill all processes matching the pattern

                         File permission

1. chmod octal file Change the permission of file to octal,which can be found separately for
user,group,world by adding,
• 4-read(r)
• 2-write(w)
• 1-execute(x)
2. chown - change file owner and group
-h - no-dereference affect each symbolic link instead of any referencedfile
-R, - recursive operate on files and directories recursively

                           System Info

1. date - Show the current date and time
2. uptime - Show current uptime
3. w - Display who is on line
4. whoami - Who you are logged in as
5. df - Show the disk usage
6. du - Show directory space usage
7. free - Show memory and swap usage


1. tar xf file.tar - Extract the files from file.tar
2. tar xzf file.tar.gz - Extract a tar using Gzip
3. tar xjf file.tar.bz2 - Extract a tar using Bzip2


1. ping - host Ping host and output results
2. wget - file Download file
3. ifconfig - ip address of the machine
1.apt-get update - updating the packages list from the repository
2. apt-cache search {package-name} - Search package name in the repository
3. apt-get install {package-name} - Installing the selected package

basic cdn links for java developers

basic cdn links for java developers

list of cdn links for easy use and access

<!--  bootstrap cdn -->

  <link rel="stylesheet" href="">
  <script src=""></script>
  <script src=""></script>

 <!-- jquery cdn -->
  <script src=""></script>

   <!-- Include jQuery Mobile stylesheets -->
  <link rel="stylesheet" href="">

  <!-- Include the jQuery library -->
  <script src=""></script>

  <!-- Include the jQuery Mobile library -->
  <script src=""></script>

 <!-- angular cdn -->
  <script src=""></script>

  <!-- w3 cdn -->
  <link rel="stylesheet" href="">

  <!-- google maps -->
  <script src=""></script>

  <!-- fonts asome cdn -->
  <link rel="stylesheet" href="">

  <!-- code mirror cdn link -->

java8 installation in ubuntu server

java8 installation  in ubuntu server
in this method you don't need to manually configure java path it will be set by default

Enter step by step in command promt

sudo apt-add-repository ppa:webupd8team/java
sudo update-alternatives --config java
sudo apt-get install oracle-java8-set-default

best blog tips for blogger

Basic SEO Guide For Blogger with best blog tips  

basic seo guide for blogger with best blog tips

Be No one blogger and word press by following these ideas ,blog best practices and little to know blog basics.Start today for  free.

these are the  best winning strategies that you could ever get for blogger.if you follow the below  steps you would likely to get great organic and live search traffic that may not be viral but you will get there soon.if are a free loader like me with no money start with blogger get some experience and move to word press. there is a saying no pain no gain. so bear the pain now so you can enjoy the gain later.

choosing a  right  custom domain name :

choosing a  right  custom domain name

it will nearly cost you around $1 to $2 dollars think it as a investment to your future and you wont be needing anymore than this.

you can choose a domain name in two ways 
1. name relevant to the type of blog or niche you are building not relevant to anything
and finding a right domain name that exists is a little tiresome but take your time in finding a right domain. 
you can't go in the middle of your website and change its name whatever the work you have done will go in vain as google provides
page rank and domain authority and indexing to your blog's domain name.

easier indexing with backlinkg strategy:

in order to get easier indexing with google you need to place some back links(link building) in the web 2.0 place your link not more than 2 times
otherwise it may be treated as duplicate content penalty. use tools like freeseotools for linkbuilding and plugraism checking.

internal linking strategy:

use internal linking like linking one of your blog post to your other related content posts
which improves your indexing

blog's title:

blog's title

what is your blog all about in one or two words about 70 characters.
blog's description : 
about a sentence  and half regarding your blog and niche
privacy :make your content available for public use 

meta description :

meta description

Help users choose to click on your blog in search results by writing a compelling summary of what your blog is all about
should not be greater than 150 words.make it more cache and enabling meta description search description will also be enabled in your blog.

search description:

search description

not more than 150 words.about your specific blog post .it plays a import role in page ranking so make sure that use relevant keywords.

custom robots.txt

custom robots.txt

User-agent: Mediapartners-Google
User-agent: *
Disallow: /search
Allow: /

Don’t forget to change url with your own

Custom Robots Header Tags:

Custom Robots Header Tags

title customization:

Find this code

And replace it with this
<b:if cond='data:blog.pageType == "item"'>
        <data:blog.pageName/> | <data:blog.title/>

image optimization:

don't copy images from the google because most of the images are copyrighted it leads to removal of ad sense in the future.better to use own images
or search images which are not copyrighted or use advance google search feature that allows copyright free images for commercial use.use alt tag for images. bogger gives you 1gb of fee image upload space use it for the best use image compression tools to reduce the image size.

keyword's search:

use long tail keywords with low competition and higher search volume by monthly views to get better ranking . use tools like KeywordPlanner(, keywordtool use some italicized and bold words for keys.

high cpc keywords:

high cpc keywords

its important right from the start to know how much does cost per click (cpc) is going to effect your ad sense 
revenue to get high cpc keywords you keyword spy tool this the best tool you could get .

blog's post content:

content  plays a big role in getting clicks from users .blog post title will become your blog URL use keywords carefully in your blog post title.use shot and sweet as they perform better in the body basically around 7 to 16 keywords for every five hundred to thousand words . write in simpler and easy words so don't you high terminology,use less fillers like is,and,are ,there etc... . use relevant and reusable  content for grouping and internal linking. don't ever copy content from other website but use can reuse the same in different styles and formats. write blog posts that can live for longer without any further modifications.use word counter to know keyword density and relevance. 

using mobile friendly templates:

mobile friendly

its better to have your own custom template for blogger because by default blogger templates are not optimized for SEO .you can get free custom
templates or paid templates for around $5 to $10 otherwise footer-ed templates would be available .If you have some programming knowledge you could easily customize and edit 
the template or you could take help from others who has the knowledge. 

use social media for traffic:

the best and easier way to get fast traffic is to share on google plus and social media plugins like 'add this' and getsitecontrol makes it easier to integrate
with blogger for this you need to go to your blog's html and edit it to place before the blog closing body tag </body>. use printerest ,linked in,buffer,tumbler 
and Instagram,reddit .use feed burner for site feed.

email subscribers: 

email subscribers

email subscribers plays important role in the long run which helps to make you blog or website live for longer .so get mail subscribers right
from the start.if you can afford money use something like mail chimp and aweber.

use forums and comments:

discus forums for blog's feed

 but last not the least comments and forums also makes impact so ask your users to comment on your post's. use discus comments in place of blogs comments.


blog seo

use webmasters and google analytics tools to track your visitors .it is a continuous iteration process .