Subscribe:

Monday 10 August 2015

Why is Ratan Tata not in the world's richest list?

TATA Group is running 96 businesses and out of which 28 Companies are
publicly  listed on the various stock exchanges. 

Tata Group is world's top 50  Group according to Market capitalization and Reputation.

Have you ever thought why Ratan Tata's name is not in the list of
billionaire's club? Why Ratan Tata is not a billionaire on the Forbes
magazine list of billionaire people of the world?

 




The  reason is that, TATA Group's 96 companies are held by its main company  "TATA Sons" and the main owner of this TATA Sons is not Ratan Tata but  various charitable organizations developed and run by TATA Group. Out of  which JRD TATA Trust & Sir Ratan Tata Trust are the main groups.

65%  ownership of TATA Sons which is the key holding company of the other 96  TATA Group Company is held by various charitable organizations. So this  65% ownership of Tata Sons Limited is not reflected on Ratan Tata's  personal Financial Statement but on the various charitable  organizations. and this is the reason why Ratan Tata is not in the list  of Billionaire club.

if we put this 65% ownership of Tata Sons in Ratan Tata’s own personal financial statement then Ratan Tata's Net worth can become more than $ 70 billion and that's much more than the Warren Buffet's Current Net Worth of $ 62  billion, the world's richest person according to Forbes magazine 2008.

However, it doesn't mean that  Ratan Tata is poor. In one of the interviews he had told the reporter  that, "I have my own Capital". He is the chairman of Tata Group, so  obviously he earns lots of money every year as a bonus, remuneration and  salary. However, Ratan Tata's Net worth is not $ 1 Billion. He is not a  billionaire on paper. but in reality he is the richest person of the  world


 If we put this 65% ownership of Tata Sons in Ratan TATA’s own personal financial statement, then Ratan Tata’s net worth can becomes more than $70 billion and that’s much more than the Warren Buffet’s net worth of $62 billion, the world’s richest person according to Forbes magazine 2008.

So  the good thing about Tata Group is that, They do Charity out of their  money and that is the reason TATA Group has generated so much of  Goodwill
over last 5 generations.

Tuesday 7 July 2015

Increase blog page rank and pageviews using dofollow links

Increase blog page rank and pageviews This trick is based on mainly rel tag in anchor tag.This is well for all html developers who insurence their website,blog with this powerful tag for grabbing better and best traffic.When ever blogger thinks for seo then few things flash in his/her mind like nofollow,dofollow,noindex,index all etc. Dont worry i already posted simple tips and tricks on how to increase pageviews for all bloggers ,random posts widget for blogger let keep these things aside get back to our topic

In this tutorial i will make you learn all about the dofollow,nofollow and how to use them to drive better traffic for your blog.I guess you know the famous formula Pageviews = Traffic + PageRank.
So i mainly concentrate on this formula only.

What is DOFOLLOW and NOFOLLOW :

I already mention about this as its an rel attribute in anchor tag see below things for better understanding
<a href="http://www.poornarebel.blogspot.com" rel="nofollow">Tech News</a>
Above we added rel="nofollow" then search engine will not follow the link in recognizing page rank.A simple link by default having DoFollow link
 eg: <a href="http://www.poornarebel.blogspot.com" >Tech News</a>
The above link having dofollow that is when search engine find above link it will follow the link and will use to determine the pagerank.Dont forget to see how to protect your blog from plagerism i mean copy paste,seo trick to increase pageviews.

How To Make Comment DoFollow:

Well Comments can drive many dofollow links for us,But to Protect from span blogger by default uses nofollow attribute in comments we can change this for better traffic and pagerank.
  • Login to your Blogger 
  • Now in Template > Edit HTML now search for below small code
  • <a expr:href='data:comment.authorUrl' rel='nofollow'><data:comment.author/></a>
  • Now replace the above existing code with below code
  • <a expr:href='data:comment.authorUrl'><data:comment.author/></a>
  • Save your template and you are done
Hope you got this else see my tutorial on how to add dynamic metatags for blogger template , else you might be interested in check my post on seo ptimized templates.
How to Increase PageViews,google rank,alex rank:
You need to go below forums registered there and in your profile add your blog url and post in that forum then that forum will provide you dofollow links this is few list which i recommend you:
Well other recommended site :
The below listing having page rank from page rank 5,page rank 6,page rank 7, so check below links and use the links as you like:
  •  http://www.educause.edu/blog
  • http://dig.csail.mit.edu/breadcrumbs/blog/4
  • http://pressblog.uchicago.edu/
  • http://blogs.nyu.edu/fas/dri/aidwatch/
  • http://delong.typepad.com/
  • http://weblogtoolscollection.com/
  • http://socialtimes.com/
  • http://eartheasy.com/blog/
  • http://themallblog.com/
  • http://interactiondesign.sva.edu/
  • http://hurryupharry.org/
  • http://thevirtualhandshake.com/blog/
  • http://blog.photography.si.edu/
  • http://justintadlock.com
  • http://businessfinancemag.com
  • http://jiscdigitalmedia.ac.uk/blog
  • http://brazencareerist.com/
  • http://moritzlaw.osu.edu/blogs/tokaji/
  • http://themallblog.com
  • http://blog.mofuse.com/
  • http://midasoracle.org/
  • http://carlgalloway.com/
  • http://currybet.net/
  • http://www.burningbird.net/
  • http://sirpi.org/
  • http://profitsfinancesite.com/
  • http://blog.dmbcllc.com/
  • http://justaddwater.dk/
  • http://www.hobo-web.co.uk/seo-blog/
  • http://www.layercake.net/
  • http://www.communityspark.com/
  • http://newcritics.com/blog1/
  • http://www.seobythesea.com/
  • http://elleeseymour.com/
  • http://blogs.cetis.ac.uk/asimong/
  • http://www.knrn.org/
  • http://links.org.au/
  • http://www.uncommonphotographers.net/
  • http://www.krisbuytaert.be/blog/
  • http://therenegadewriter.com/
  • http://www.lifeinthefastlane.ca/
  • http://www.iayork.com/MysteryRays/
  • http://focusorganic.com/
  • http://www.oilman.ca/
  • http://andybeard.eu/
Hope you like my article how to increase blogger traffic using dofollow links see my post on add page numbers for easy page navigation here.
have a beautiful day,feel free to write to us

Google adsense rejected apllication solution to get approved

Google Adsense application rejected then don't worry i got solution to resolve the page type error you got and relavent solution in a understandable format.So that your Google  adsense application will approve quickly. This solution is purely based on the experience which i gained after applying for Google Adsense I want to give my experience in this tutorial so that your Apllication Approved Quickly.I guess you have gone through my previous post how to increase pageviews for better google rank  using dofollow link, protect your blog from copy(plagiarism). ( Note:google logo right reserves with google.I just using for user understanding.Its just for educational purpose )



This tutorial is for who applied and got rejected and for those who going to apply in future.Its irritates when we got Rejected and also lose hope in applying.please be patience there is great saying Price baby wont recognize with out crown .Unless until you present your blog,website in proper manner Adsense wont approve lets see the page type errors and page issues and approach to solve these.

Copyrighted or copy content issue:

This will occur due to usage of copyrighted content,images,copy paste content from other websites .
Solution : Dont remove the backlinks or else desiner credits in your template.If you using any content copy pasted add backlink to that site like source from that sitename.If using images do same and even better upload image on your own rather than linking back to same site.

Insufficient Content error:

This is the most frequent issuse by which every one faces.Although you have 50+ posts still gets this issue.
Solution:The reason behind this is even you have 50+ posts google considers your content as crap because your each post should have more than atleast 300 words.Better provide articles with 500 words around 15 posts and it should be reside for few days i mean the posts should be atleast 10 days old before you apply.

PageNavigation error or Poor navigation:

This what your template reveals about your blog.Means your home page not navigating to all content your page.
Solution: Add archieved pages widget if you are blogger else add all links in one page name it as sitemap like wise.Add page numbers for better navigation see my post how to add pagenumbers plugin widget to blogger.Add menu to your page,Add categories or labels in expanded manner not like dropdown list.

Non Complienece with Google Adsense Terms:

This is improper usage of content keywords,domain selection,mature content in your blog
Solution: remove the keywords else alter them which not suits for google adsense,Add your own privacy policy in your site,avoid free domain which are not fitted with google.

Insufficient traffic :

Solution: Make users stick to your content add random posts you can get how to add random posts here, you should have more pageviews see here how to increase pageviews.

Meta tags error or design error:

This is why because poor design of your site and google faces problem in crawl to your site.
Solution: Make seo optimized site, custom page error pages,proper meta tags using these you can solve this issue

Other changes you should do:

Add contact page you can see my article on how to add blogger official contact page, seo optimized templates for clear navigation, About page,Privacy Policy page, attributes about author page.

Things before you apply for Adsense:

  • Your domain/web site/blog should be 6 months old(for indians).
  • Your blog should resolve issues(if you already applied and rejected)
  • Remove un necessary java/ajax script to reduce page burden
  • You should recieve atleast 100 unique users per day.
Then see the magic your application will approve very quickly, Have a great day.

Blogger random post widget with rounded style


Blogger random post widget with rounded style ::
Hi! previously i posted on bubble count for comments in blogger , keyboard layout in blogger posts now here i want to post blogger random post widget with rounded style using style sheet and small java script.




STEPS TO FOLLOW ::
  • Login to your Blogger / blogspot
  • Now click on Layout > Add widget (click where you want to add widget) >Add html/java script
  • Now paste the below code into it
  • <style>
    .random-posts ul{padding-left:0px}
    .random-posts ul li:hover {border:2px solid #FCE070}
    .random-posts ul li a:hover {text-decoration:none}
    .random-posts ul li {background: #FFF url() no-repeat scroll 5px 10px;list-style-type: none;margin:0 0 5px 0px;padding:5px 5px 5px 20px !important;border: 2px solid #FCE070;border-radius:10px;
    -moz-border-radius:10px;
    -webkit-border-radius:10px;
    }
    </style>
    <div class="random-posts"><script type="text/javascript">
    var randarray = new Array();var l=0;var flag;
    var numofpost=7;function randomposts(json){
    var total = parseInt(json.feed.openSearch$totalResults.$t,10);
    for(i=0;i < numofpost;){flag=0;randarray.length=numofpost;l=Math.floor(Math.random()*total);for(j in randarray){if(l==randarray[j]){ flag=1;}}
    if(flag==0&&l!=0){randarray[i++]=l;}}document.write('<ul>');
    for(n in randarray){ var p=randarray[n];var entry=json.feed.entry[p-1];
    for(k=0; k < entry.link.length; k++){if(entry.link[k].rel=='alternate'){var item = "<li>" + "<a href=" + entry.link[k].href + ">" + entry.title.$t + "</a> </li>";
    document.write(item);}}
    }document.write('</ul>');}
    </script>
    <script src="/feeds/posts/default?alt=json-in-script&start-index=1&max-results=1000&callback=randomposts" type="text/javascript"></script></div>
  •  Now save your widget
  • thats it now you will see the random posts in your blogger / blogspot
Note:  change Var numofpost=7; (change number 7 with no of posts you want to show)

How to add page numbers in blog

How to add the blogger page numbers instead of the very old home,previous,next buttons with this new page navigation trick for all bloggers and blogspot users

limit the search results in blogger,page number for blogspot,blogger page navigation trick
Above is the screen shot of this trick you can say this as widget for blogger as we not touching the template of the blog see merits of this trick
MERITS OF THIS PAGE NAVIGATION TRICK:
  • Fast loading which makes your seo rank increase
  • No external links for script total code added in this
  • No need to edit your template
  • This feature also applicable for search,label result
You can say using this you can limit the search results of blogger as well as showing limited posts on particular lable
STEPS TO BE FOLLOWED FOR THIS TRICK:
  1. Login to your blogger account
  2. In your home page click on Layout ( you can find on left side of your home panel)
  3. Click on Add gadget any where in layout (dont worry this will replace the home,previous,next buttons so you can add any where)
  4. In gadget menu click on HTML/JAVA SCRIPT 
  5. Now copy paste the below code into it
  6. <style type='text/css'>
    .showpageArea a {
    text-decoration:underline;
    }
    .showpageNum a {
    border:1px solid #aeaeae;
    margin:0 3px;
    padding:3px 7px;
    text-decoration:none;
    }
    .showpageNum a:hover {
    background-color:#0a8be5;
    border:1px solid #000000;

    }
    .showpagePoint {
    -moz-background-clip:border;
    -moz-background-inline-policy:continuous;
    -moz-background-origin:padding;
    background:#aeaeae none repeat scroll 0 0;
    border:1px solid #aeaeae;
    color:#333333;
    margin:0 3px;
    padding:3px 7px;
    text-decoration:none;
    }
    .showpageOf {
    margin:0 3px 0 0;
    padding:3px 7px;
    text-decoration:none;
    }
    .showpage a {
    border:1px solid #aeaeae;
    padding:3px 7px;
    text-decoration:none;
    }
    .showpage a:hover {
    text-decoration:none;
    }
    .showpageNum a:link, .showpage a:link {
    color:#333333;
    text-decoration:none;
    }
    </style>

    <script type='text/javascript'>

    var home_page_url = location.href;

    var pageCount=7;
    var displayPageNum=3;
    var upPageWord ='Previous';
    var downPageWord ='Next';

    function showpageCount(json) {
    var thisUrl = home_page_url;
    var htmlMap = new Array();
    var thisNum = 1;
    var postNum=1;
    var itemCount = 0;
    var fFlag = 0;
    var eFlag = 0;
    var html= '';
    var upPageHtml ='';
    var downPageHtml ='';

    for(var i=0, post; post = json.feed.entry[i]; i++) {

    var timestamp1 = post.published.$t.substring(0,19)+post.published.$t.substring(23,29);
    timestamp = encodeURIComponent(timestamp1);

    var title = post.title.$t;

    if(title!=''){
    if(itemCount==0 || (itemCount % pageCount ==(pageCount-1))){
    if(thisUrl.indexOf(timestamp)!=-1 ){
      thisNum = postNum;
    }

    if(title!='') postNum++;
    htmlMap[htmlMap.length] = '/search?updated-max='+timestamp+'&max-results='+pageCount;
    }
    }
    itemCount++;

    }

    for(var p =0;p< htmlMap.length;p++){
    if(p>=(thisNum-displayPageNum-1) && p<(thisNum+displayPageNum)){
    if(fFlag ==0 && p == thisNum-2){
    if(thisNum==2){
     upPageHtml = '<span class="showpage"><a href="/">'+ upPageWord +'</a></span>';
    }else{
     upPageHtml = '<span class="showpage"><a href="'+htmlMap[p]+'">'+ upPageWord +'</a></span>';
    }

    fFlag++;
    }

    if(p==(thisNum-1)){
    html += '<span class="showpagePoint">'+thisNum+'</span>';
    }else{
    if(p==0){
      html += '<span class="showpageNum"><a href="/">1</a></span>';

    }else{
     html += '<span class="showpageNum"><a href="'+htmlMap[p]+'">'+ (p+1) +'</a></span>';
    }
    }

    if(eFlag ==0 && p == thisNum){
    downPageHtml = '<span class="showpage"> <a href="'+htmlMap[p]+'">'+ downPageWord +'</a></span>';
    eFlag++;
    }
    }
    }

    if(thisNum>1){
    html = ''+upPageHtml+' '+html +' ';
    }

    html = '<div class="showpageArea"><span  class="showpageOf"> Pages ('+(postNum-1)+')</span>'+html;

    if(thisNum<(postNum-1)){
    html += downPageHtml;
    }

    if(postNum==1) postNum++;
    html += '</div>';

    var pageArea = document.getElementsByName("pageArea");
    var blogPager = document.getElementById("blog-pager");

    if(postNum <= 2){
    html ='';
    }

    for(var p =0;p< pageArea.length;p++){
    pageArea[p].innerHTML = html;
    }

    if(pageArea&&pageArea.length>0){
    html ='';
    }

    if(blogPager){
    blogPager.innerHTML = html;
    }

    }

    function showpageCount2(json) {

    var thisUrl = home_page_url;
    var htmlMap = new Array();
    var isLablePage = thisUrl.indexOf("/search/label/")!=-1;
    var thisLable = isLablePage ? thisUrl.substr(thisUrl.indexOf("/search/label/")+14,thisUrl.length) : "";
    thisLable = thisLable.indexOf("?")!=-1 ? thisLable.substr(0,thisLable.indexOf("?")) : thisLable;
    var thisNum = 1;
    var postNum=1;
    var itemCount = 0;
    var fFlag = 0;
    var eFlag = 0;
    var html= '';
    var upPageHtml ='';
    var downPageHtml ='';

    var labelHtml = '<span class="showpageNum"><a href="/search/label/'+thisLable+'?&max-results='+pageCount+'">';
    var thisUrl = home_page_url;

    for(var i=0, post; post = json.feed.entry[i]; i++) {

    var timestamp1 = post.published.$t.substring(0,19)+post.published.$t.substring(23,29);
    timestamp = encodeURIComponent(timestamp1);

    var title = post.title.$t;

    if(title!=''){
    if(itemCount==0 || (itemCount % pageCount ==(pageCount-1))){
    if(thisUrl.indexOf(timestamp)!=-1 ){
     thisNum = postNum;
    }

    if(title!='') postNum++;
    htmlMap[htmlMap.length] = '/search/label/'+thisLable+'?updated-max='+timestamp+'&max-results='+pageCount;

    }
    }
    itemCount++;
    }

    for(var p =0;p< htmlMap.length;p++){
    if(p>=(thisNum-displayPageNum-1) && p<(thisNum+displayPageNum)){
    if(fFlag ==0 && p == thisNum-2){
    if(thisNum==2){
     upPageHtml = labelHtml + upPageWord +'</a></span>';
    }else{
     upPageHtml = '<span class="showpage"><a href="'+htmlMap[p]+'">'+ upPageWord +'</a></span>';
    }

    fFlag++;
    }

    if(p==(thisNum-1)){
    html += '<span class="showpagePoint">'+thisNum+'</span>';
    }else{
    if(p==0){
     html = labelHtml+'1</a></span>';
    }else{
     html += '<span class="showpageNum"><a href="'+htmlMap[p]+'">'+ (p+1) +'</a></span>';
    }
    }

    if(eFlag ==0 && p == thisNum){
    downPageHtml = '<span class="showpage"> <a href="'+htmlMap[p]+'">'+ downPageWord +'</a></span>';
    eFlag++;
    }
    }
    }

    if(thisNum>1){
    if(!isLablePage){
    html = ''+upPageHtml+' '+html +' ';
    }else{
    html = ''+upPageHtml+' '+html +' ';
    }
    }

    html = '<div class="showpageArea"><span  class="showpageOf"> Pages ('+(postNum-1)+')</span>'+html;

    if(thisNum<(postNum-1)){
    html += downPageHtml;
    }

    if(postNum==1) postNum++;
    html += '</div>';

    var pageArea = document.getElementsByName("pageArea");
    var blogPager = document.getElementById("blog-pager");

    if(postNum <= 2){
    html ='';
    }

    for(var p =0;p< pageArea.length;p++){
    pageArea[p].innerHTML = html;
    }

    if(pageArea&&pageArea.length>0){
    html ='';
    }

    if(blogPager){
    blogPager.innerHTML = html;
    }

    }

    </script>
    <script type='text/javascript'>

    var thisUrl = home_page_url;
    if (thisUrl.indexOf("/search/label/")!=-1){
    if (thisUrl.indexOf("?updated-max")!=-1){
    var lblname1 = thisUrl.substring(thisUrl.indexOf("/search/label/")+14,thisUrl.indexOf("?updated-max"));
    }else{
    var lblname1 = thisUrl.substring(thisUrl.indexOf("/search/label/")+14,thisUrl.indexOf("?&max"));
    }
    }

    var home_page = "/";
    if (thisUrl.indexOf("?q=")==-1){
    if (thisUrl.indexOf("/search/label/")==-1){
    document.write('<script src="'+home_page+'feeds/posts/summary?alt=json-in-script&callback=showpageCount&max-results=99999" ><\/script>')
    }else{document.write('<script src="'+home_page+'feeds/posts/full/-/'+lblname1+'?alt=json-in-script&callback=showpageCount2&max-results=99999" ><\/script>')
    }
    }
    </script>
    Note:Change the blue color number 7 to how many posts you want to show
  7. Save your gadget and see your blog added with the latest page navigation 
Hope this article finds best solution for your page navigation problem
enjoy the day

seo trick to increase pageviews

Hello there  , here i would like to share trick on how to increase page views in Google tips and tricks, I am really sorry for saying trick as its open secret for all how to get more page views so that indexed in google faster well with this post i will provide some idea for all those who don't have any idea regarding this mean while you may have look on my previous posts blogger css tool tip code , add page number in blogger blog, make your blog seo friendly



I would like to share this valuable trick for those who started blog and waiting for more pageviews.
Following are the ways to increase google rank:
  • Submit your blog or website to google through google webmaster , bing webmaster ,submit your feed to this webmaster tools.
  • Make your visitors stick to your site by adding random posts , navigation to your pages ,related posts so that users will stick to your blog for more time
  • Add proper seo tags so that search engine find your website details.
  • Add error pages so that users get good idea instaed searching for non existing content.
  • Mainly proper meta tags for your blog ,which are relavent.
  • Make your site to earn more pageviews find tutorial here.
  • don't leave <img> tags blank add alt,title tag with your keywords so that your page relavance will increase.
  • Last but not least your blog template must be easily naviagable and user friendly.
using above tricks you can get your pageviews from google more and more. have a great blogging.

Add Bubble numbered count for blogger comments

Add Bubble numbered count for blogger comments / blogspot comments
Lets quickly get into the process on how to add numberd comments in the blogger / blogspot simple tutorial

add bubble number for comments blogger blogspot

STEP 1)

Those who using Old Blogger interface:
  • Go to Dashboard > Design > Edit HTML > (check the check box)Expand Widget Template

Those who using New Blogger interface:

  • Go to Dashboard - Template - Edit HTML - Proceed - Expand Widget Template (make a backup)


STEP 2) Now find (CTRL+F) this code in the template:

<b:loop values='data:post.comments' var='comment'>

STEP 3) Immediately above/before that, paste this code:

<script type='text/javascript'>var CommentsCounter=0;</script>

STEP 4) Now find this code:

<data:commentPostedByMsg/>

STEP 5) And immediately below/after it, paste this code:

<!--comments-counter-starts-->
<span class='comments-number'>
<a expr:href='data:comment.url' title='Comment Link'>
<script type='text/javascript'>
CommentsCounter=CommentsCounter+1;
document.write(CommentsCounter)
</script>
</a>
</span>
<!--comments-counter-stops-->

Step 6) Find (CTRL+F) this code in the template:

</head>

Step 7) And immediately above/before it, paste this code:

<!-- comments-counter-starts-->
<style type="text/css">
.comments-number a:link, .comments-number a:visited {
color: black !important;
text-decoration: none !important;
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimumBNDbdRB8tjvD0tzNDhImm-6pTRFPC-haKDil4_COQbwGKplL8QXqyGzsmyOWVLY4JJkUuKxw7ubBUZrkXgNjcUcX-vI6wF-v2oFA8QGJ1Syd9eDWNOcJpcAWhuFkFHaxCSsY52_ibG/s1600/blue+comment+bubble.png) no-repeat;
width: 50px; /*image-width size*/
height: 48px; /*image-height size*/
float: right;
display: block;
margin-right: 5px;
margin-top: -15px; /*comments-counter position*/
text-align: center;
font-family: 'Century Gothic','Lucida Grande',Arial,Helvetica,Sans-Serif;
font-size: 15px;
font-weight: normal;
}
.comments-number a:hover, .comments-number a:active {
color: #1BA0E1 !important;
text-decoration: none !important;
}
</style>
<!-- comments-counter-stops-http://gugly4u.blogspot.com-->

Note:
  • Edit the above red code to your image you like
  • Edit the above blue color code to change the color of number in comment

Here are few images which may you like to use in this tutorial:


how to add numbered buble comment in blogger blogspotblogger blogspotblogspot blogger, how to blogwidget blogger blogspotblogs, how to blogblogspot or blogger, how to blogtutorials, how tocomments, how to, blogspot bloggernew comment, how to blogblog design, bloggerblogger.com



STEP 8) Finally save the template... voila you can see the magic in comments

keyboard button effect for wordpress and blogspot

Hello ! previously i added tutorial on how to add bubble number for comments , now here i want to show how to add nice keyboard button effect in your posts while writing tutorials, this blogger tips and tricks tutorial help you in creating good looking tutorial for your blogger so lets get into the steps:



STEPS TO FOLLOW: 
STEP1:  Find  <head> tag after that paste below code
g4u{
-moz-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px;
border:1px solid gray;
padding:1px 5px;
margin:0 5px;
font-family:courier new;
font-size:1.2em;
-webkit-box-shadow:1px 0 1px 0 #fff, 0 2px 0 2px lightGray, 0 2px 0 3px #333;
-moz-box-shadow:1px 0 1px 0 #fff, 0 2px 0 2px lightGray, 0 2px 0 3px #333;
box-shadow:1px 0 1px 0 #fff, 0 2px 0 2px lightGray, 0 2px 0 3px #333;
background:-moz-linear-gradient(left, #fff 0%, #e2e2e2 25%);
background:-webkit-gradient(linear, left top, right top, color-stop(0%, #ffffff), color-stop(25%, #e2e2e2));
background:-webkit-linear-gradient(left, #fff 0%, #e2e2e2 25%);
background:-o-linear-gradient(left, #fff 0%, #e2e2e2 25%);
background:-ms-linear-gradient(left, #fff 0%, #e2e2e2 25%);
background:linear-gradient(left, #fff 0%, #e2e2e2 25%);
filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e2e2e2', GradientType=1 )}
g4u.space{padding:0 90px}g4u:hover{cursor:default}

Now save your template

STEP2: now where ever you want this effect use
<g4u>YOUR TEXT</g4u>
hope you like my blogger tutorial

Make seo optimized template blogger with meta title tags

In this article i will like to share how to Make blogger template seo optimized using simple five steps, Make your template seo optimized using my tutorial so that you can gain good google page rank . you can also have a look on my previous articles on make custom error pages for your blogger loads faster and quick, Add bubble numbered count for the comments in blogspot, Keyboard button effect for all blogger and wordpress users . ok further tricks can be searched in my blog. lets get into seo optimization.


I Divided the tutorial into five steps so that you can powered your blogger template with this powerful meta tags so that it can get into search engine fastly with in no time i mean less time. the steps which you can made seo optimization as as follows:

The seo optimized template techniques are as follows:

  1. SEO optimized meta tags and titles
  2. Seo optimized Archieves
  3. SEO optimized Labels
  4. seo optimized Comments
  5. seo optimized page loading 

Before going to edit template backup your template so that you can retrieve it back if you want so. to edit template simply login to your blogger > left side bar select Template > now Click on Edit Html .
Step 1 : SEO OPTIMIZED META TAGS AND TITLES:
 I have developed few codes which collected from internet and made few changes so that users can understand it properly so i made this in two parts 1)static metatags 2)dynamic metatags

  • Static Meta tags : These are few lines of code you have to add in your template before </head> tag you can find complete tutorial on how to make blog seo optimized here. ( i want to give tutorial on dynamic tags so please go to link if you want static tags).
  • Dynamic Meta Tags : This is best part to drive huge traffic to your blog and make your blog responsive too to do so follow my below steps
    1. Search for the tag below
    2. <title><data:blog.pageTitle/></title>
    3. Now replace the above tag with below code
    4. <!--[Meta Title ErrorPage/404]-->
      <b:if cond='data:blog.pageType == &quot;error_page&quot;'>
      <title>404: Sorry the page you are looking is not found | Your_BlogName</title>
      </b:if>
      <b:if cond='data:blog.pageType != &quot;item&quot;'>
      <!--[Meta Title Search Page]-->
      <b:if cond='data:blog.searchQuery'>
      <title>Keyword search for :: <data:blog.searchQuery/> :: | Your_BlogName</title>
      </b:if>
      <b:if cond='data:blog.pageType == &quot;archive&quot;'>
      <!--[Meta Title Archive Page]-->
      <title>Post Archive by Month <data:blog.pageName/> | Your_BlogName</title>
      <!--[Meta Description Archive Page]-->
      <meta expr:content='&quot;Post Archive by Month &quot; + data:blog.pageName + &quot; learn more please visit &quot; Your_BlogName &quot;' name='description'/>
      <b:else/>
      <b:if cond='data:blog.pageType == &quot;static_page&quot;'>
      <!--[Meta Title Pages]-->
      <title><data:blog.pageName/> | <data:blog.title/></title>
      <!--[Meta Description Pages]-->
      <meta expr:content='data:blog.pageName + &quot;. Please read the article &quot; + data:blog.pageName + &quot; learn more please visit Your_BlogName &quot;' name='description'/>
      <b:else/>
      <!--[Meta Title Label Page]-->
      <b:if cond='data:blog.searchLabel'>
      <title>Search for Label :: <data:blog.pageName/> :: Your_BlogName </title>
      <!--[Meta Description Label Page]-->
      <meta expr:content='&quot;Search for category ::&quot; + data:blog.pageName + &quot;:: learn more please visit Your_BlogName &quot;' name='description'/>
      <b:else/>
      <!--[Meta Title Homepage]-->
      <title><data:blog.pageTitle/></title>
      <!--[Meta Description Homepage]-->
      <meta expr:content='data:blog.pageTitle + &quot; Write your blog description here.&quot;' name='description'/>
      </b:if>
      </b:if>
      </b:if>
      <!--[Meta Keyword Homepage]-->
      <meta content='keyword11, keyword12, etc' name='keywords'/>
      <b:else/>
      <!-- Meta Title Post Page -->
      <title><data:blog.pageName/> - <data:blog.title/></title>
      <!--[Meta Description Active Post Page]-->
      <b:if cond='data:blog.metaDescription'>
      <meta expr:content='data:blog.metaDescription' itemprop='description'/>
      <b:else/>
      <!-- Show if the Meta Description post Page is not active-->
      <meta expr:content='data:blog.pageName + &quot;. Please read the article &quot; + data:blog.pageName + &quot; learn more please visit Your_BlogName &quot;' name='description'/>
      </b:if>
      <!--[Meta Keyword Post Page]-->
      <meta expr:content='data:blog.pageName + &quot;, keyword11, keyword12,etc&quot;' name='keywords'/>
      </b:if>
    5. No need to worry of editing any thing in above tag as its dynamic automatically fetches your blogger name,tittle,labels ..etc But replace keyword11, keyword12,etc with your keywords, and replace Write your blog description here. with your description, Your_BlogName with your blog name ( as keyword ,Blog name and description depends on blog i cant make it as dynamic so do your self).
Step 2: SEO OPTIMIZED ARCHEIVES :
As far the archieves should should also be seo optimized as our previous posts will be in archieved so to do so for better seo rank of your blog we need to optimize archieves also to do so follow below steps
  1. Find the below code in your template
  2. <a class='post-count-link' expr:href='data:i.url'>
  3. Now replace the above code with below
  4. <a rel="archives" class='post-count-link' expr:href='data:i.url'>
  5. Now your blog is having seo optimized archieves
Step 3 : SEO OPTIMIZED LABELS:
  We all know that labels play a key role in search engines which should perfectly match with the keywords so we need to optimize the labels for better seo see below steps to achieve this
  1. search for the below code in your template
  2. <a expr:href='data:label.url'
  3. Now remove code and paste below code in to your template
  4. <a expr:href='data:label.url' rel='tag'
  5. Now the labels are optimized
Step 4: SEO OPTIMIZED COMMENTS:
I can say that comments are best part for better traffic as its having text filled by users so that our blog content increase and we can have lots of tags from the users comments to make use of this we need to optimize this for better seo so do the changes as below
  1. Check for the below code in your blogger template
  2. expr:href='data:post.createLinkUrl'
  3. Now delete above code and add below code
  4. rel='external nofollow' expr:href='data:post.createLinkUrl'
  5. Now the comments are optimized for better seo
Step 5: SEO OPTIMIZED PAGE LOADING : (optional) (lazy load for blog)
Page loading plays a key role in seo as the page loads fast your page having more seo points so that it can get into search engine fastly as well users wont get irritate as our page loads fastly to optimize our web page loading we need to do have changes as mention right below:
  1. Just keep the code which located below with in <head> </head> tag still get confusion just add below code before </head> tag
  2. code located here
  3.      <script charset='utf-8' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'/>
        <script src='http://gugly4u.googlecode.com/files/lazyload-min.js' type='text/javascript'/>
        <script charset='utf-8' type='text/javascript'>
        $(function() {
        $(&quot;img&quot;).lazyload({placeholder : &quot;http://gugly4u.googlecode.com/files/dot.gif&quot;,threshold : 200});
        });
        </script>
  4. Now save your template
Note : On end of every step save your template
Now your blog template is seo optimized see my posts on how to  increase pageviews of your website here , hope you like our article .

make your blog seo friendly search engine optimization technique

Making your blog seo(search engine optimization) friendly that is search engine friendly is compulsory for boost your blog rank and to make rich traffic to your blog ,seo if the basic need for all blogger templates to get ranked top in the search engines like google,bing,yahoo and so on so making your template or theme seo friendly is very much needed and here is my trick how to make your normal template theme seo friendly template theme

seo tricks to get good traffic,high traffic with seo trick
 So don't wait lets get into procedure very soon and in glance

STEPS YOU SHOULD FOLLOW CAREFULLY :

  • Go to blogspot or blogger dash board (you can get this after login to your account)
  • Now click on  template in your left panel
  • Now click on edit Html
  • Now find the below code

  • <b:include data=’blog’ name=’all-head-content’/> .............  <b:skin><![CDATA[/*

  • Just select the code which i given ie upto the <b:skin><!CDATA{/*
  • Now replace with the code given below

  • <b:include data='blog' name='all-head-content'/>
    <b:if cond='data:blog.url == data:blog.homepageUrl'>
    <meta content='Your Blog Description ' name='description'/>
    <meta content='Your Blog Keywords ' name='keywords'/>
    <meta content='Your Name Here' name='author'/>
    <meta content='all' name='robots'/>
    <meta content='index, follow' name='robots'/>
    <meta content='EN' name='language'/>
    <meta content='IN' name='geo.country'/>
    <meta content='global' name='distribution'/>
    <meta content='1 days' name='revisit-after'/>
    <meta content='India' name='geo.placename'/>
    </b:if>
    <!-- Start www.poornarebel.blogspot.com: SEO Title Tag -->
    <b:if cond='data:blog.pageType == &quot;index&quot;'>
    <title><data:blog.pageTitle/></title>
    <b:else/>
    <title><data:blog.pageName/> | <data:blog.title/></title>
    </b:if>
    <!-- End www.poornarebel.blogspot.blogspot.com: SEO Title Tag -->

    <link href='Your Favicon URL' rel='shortcut icon' type='image/vnd.microsoft.icon'/>

    <b:skin><![CDATA[/*

  • Please make sure to change the above tags according to your needs and save template
  • Viola your template is now seo friendly can be indexed fastly in all search engines
 Note :  
  1. Your Blog description replace with the blog deascryption like  poornarebel.blogspot.com is ultimate blog for all seo and mobile tricks , You can use 150-200 characters to do so
  2. Your Blog keywords replace with your key words like seo,mobile,template seo,blogger tricks,
  3. Your Name here replace with your name
  4. language EN-english,FR-france.. so on use your own
  5. Country with your country like me india
  6. Your Favicon URL with the url to your favicon
Hope you got every thing as i explain , have a nice day

Wednesday 22 April 2015

64-bit Android* and Android Run Time

Introduction

The new buzz in the mobile marketplace is about Android 64-bit systems. In September 2013, Apple released the iPhone* 5 with a 64-bit A7 processor onboard. Thus began the mobile technology race.
It turns out that the Android-based kernel GNU/Linux* has been supporting processors with 64-bit registers for a long time. Ubuntu is "GNU/Linux" while Android is "Dalvik/Linux". Dalvik is the process virtual machine (VM) in Google's Android operating system, which specifically executes applications written for Android. This makes Dalvik an integral part of the Android software stack, which is typically used on mobile devices such as mobile phones and tablet computers, as well as more recently on devices such as smart TVs and wearables. Nevertheless, all developers who use the NDK have to rebuild their programs under the latest architecture, and the ease or difficulty of this process depends on the tools that Google will provide. In addition, Google should provide backward compatibility, i.e., NDK 32-bit applications should run in Android 64-bit.
The first Intel 64-bit processors for mobile devices were created in the 3rd quarter of 2013 and were the new powerful multicore System on a Chip (SoC) for mobile and desktop devices. This new SoC family consists of Intel® AtomTM processors for tablets and 2 in 1 devices, Intel® Celeron® processors, and Intel® Pentium® processors for 2 in 1 devices, laptops, desktop PCs and All in One PCs.
In October 2014, Google released a preview emulator image of the 64-bit Android L for developers. This allowed them to test their programs and rewrite code, if necessary, before the OS is released. In a Google+ blog developers indicated that programs entirely created with Java* do not require porting. They ran them “as is” in the L- version of the emulator, which supports 64-bit architecture. Those using other languages, especially C and C++, will have to perform some steps to build against the new Android NDK. Several older versions of Android-based devices with 64-bit processors are on the market. However, manufacturers may have to update them rather quickly; otherwise, there will be a lack of software apps for users.

Android 64-bit L emulator

In June 2014, Google announced that Android would support 64-bit in the coming L release. This is great news for those who want the most performance possible out of their devices and apps. The list of benefits highlighted by Google in this update include a larger number of registers, increased addressable memory space, and new instruction sets.
The Android emulator supports many hardware features likely to be found on mobile devices, including:
  • An ARM* v5 CPU and the corresponding memory-management unit (MMU)
  • A 16-bit LCD display
  • One or more keyboards (a Qwerty-based keyboard and associated Dpad/Phone buttons)
  • A sound chip with output and input capabilities
  • Flash memory partitions (emulated through disk image files on the development machine)
  • A GSM modem, including a simulated SIM Card
  • A camera, using a webcam connected to your development computer.
  • Sensors like an accelerometer, using data from a USB-connected Android device
This is a great step forward for building our favorite devices and apps. Unfortunately, we’ll have to wait for Android L to drop before we can enjoy these new performance boosts. A few weeks after Android L releases, Revision 10 of the Native Development Kit (NDK) should be posted with support for the three 64-bit architectures that will be able to run the new version of Android: arm64-v8a, x86_64, and mips64. If you’ve built an app using Java, your code will automatically have better performance on the new x86 64-bit architecture. Google has updated the NDK to revision 10b and added an emulator image developers can use to prepare their apps to run on devices built with Intel's 64-bit chips.
Keep in mind, the NDK is only for native apps, not those built with Java on the regular Android SDK. If you have been looking forward to getting your apps running on 64-bit, or if you need to update to the latest version of the NDK, hit the developer portal to get your download started.

Developing with the x86_64 Android NDK

The Native Development Kit (NDK) is a toolset that allows you to implement parts of your app using native code languages such as C and C++. For certain types of apps, this can be helpful so you can reuse existing code libraries written in these languages, but most apps do not need the Android NDK. You need to balance the benefits of using the NDK against its drawbacks. Notably, using native code on Android generally does not result in a noticeable performance improvement, but it always increases your app complexity. You should only use the NDK if it is essential to your app and not because you simply prefer to program in C/C++.
You can download the latest version of Android NDK from: https://developer.android.com/tools/sdk/ndk/index.html
In this section I'll review how to compile a sample application using the Android NDK.

We will use the sample application, san-angeles, located in the Android NDK samples directory:

$ANDROID_NDK/samples/san-angeles
Native code is located in the jni/ directory:
$ANDROID_NDK/samples/san-angeles/jni
Native code is compiled for specified CPU architecture(s). Android applications may contain libraries for several architectures in one apk file.
To set target architectures you need to create the Application.mk file inside the jni/ directory. The following line will compile the native libraries for all supported architectures:
APP_ABI := all
Sometimes, it’s better to specify a list of target architectures. This line compiles the libraries for x86 and ARM architectures:
APP_ABI := x86 armeabi armeabi-v7a
Because we are building a 64-bit app, we need to compile the libraries for x86_64 architectures:
APP_ABI := x86_64
Run the following command inside the sample directory to build libraries:
cd $ANDROID_NDK/samples/san-angeles
After the successful build, open the sample in Eclipse* as an Android application and click “Run”. Select the emulator or a connected Android device where you want to run the application.
To support all available devices you need to compile the application for all architectures. If the apk file size with libraries for all architectures is too big, consider following the instructions in Google Play Multiple APK Support to prepare a separate apk file for each platform.
Checking supported architectures
You can use this command to check what architectures are included in apk file:
aapt dump badging file.apk
The following line lists all architectures:
native-code: 'armeabi', 'armeabi-v7a', 'x86', 'x86_64'
Another method is to open the apk file as a zip file and view subdirectories in the lib/ directory.

Optimization of 64-bit programs

Reducing the amount of memory an app consumes

When a program is compiled in the 64-bit mode, it consumes more memory than its 32-bit version. This increase often goes unnoticed, but memory consumption can sometimes be two times higher than 32-bit apps. The amount of memory consumption is determined by the following factors:
  • Some objects, like pointers, require larger amounts of memory
  • Data alignment and data structure padding
  • Increased stack memory consumption
64-bit systems have a larger amount of memory available to user applications than 32-bit systems. So if a program takes 300 Mbytes on a 32-bit system with 2 Gbytes of memory but needs 400 Mbytes on a 64-bit system with 8 Gbytes of memory, in relative units, the program takes three times less memory on a 64-bit system. The one disadvantage is performance loss. Although 64-bit programs are faster, extracting larger amounts of data from memory might cancel all the advantages and even reduce performance. Transferring data between the memory and microprocessor (cache) is not very cheap.
One way to reduce memory consumption is to optimize data structures. Another way is to use memory-saving data types. For instance, if we need to store a lot of integer numbers and we know that their values will never exceed UINT_MAX, we may use the type "unsigned" instead of "size t", as discussed in the next section.

Using memsize-types in address arithmetic

Using ptrdiff_t and size_t types in address arithmetic might give you an additional performance gain along with making the code safer. For example, using the type int, whose size differs from the pointer's capacity, as an index results in additional data conversion commands in the binary code. We might have 64-bit code and the pointers' size is 64 bits while the size of int type remains the same - 32 bits.
It is not easy to give a brief example to show that size_t is better than unsigned. To be impartial, we have to use the compiler's optimizing capabilities. But two variants of the optimized code often get too different to easily demonstrate their difference. We managed to create something like a simple example after six tries. But the sample is far from ideal because instead of the code containing the unnecessary conversions of data types discussed above, it shows that the compiler can build a more efficient code when using size_t. Consider this code, which arranges array items in the reverse order:
01<code1.txt>
02unsigned arraySize;
03...
04 
05for (unsigned i = 0; i < arraySize / 2; i++)
06{
07  float value = array[i];
08  array[i] = array[arraySize - i - 1];
09  array[arraySize - i - 1] = value;
10}
The variables "arraySize" and "i" in the example have the type unsigned. You can easily replace it with size_t and compare a small fragment of assembler code shown in Table 1.
Table 1 - Comparing the 64-bit assembler code fragments using the types unsigned and size_t
array [arraySize - I - 1] = value;
arraySize, i : unsigned
arraySize, i : size_t
mov eax, DWORD PTR arraySize$[rsp]
sub eax, r11d
sub r11d, 1
add eax, -1
movss DWORD PTR [rbp + rax*4], xmm0

mov rax, QWORD PTR arraySize$[rsp]
sub rax, r11
add r11, 1

movss DWORD PTR [rdi + rax*4 - 4], xmm0

The compiler managed to build a more concise code when using 64-bit registers. We do not want to say that the code created using the type unsigned (column 1) will be slower than the code using the type size_t (column 2). It is difficult to compare the speed of code execution on contemporary processors. But you can see in this example that the compiler built a briefer and faster code when using 64-bit types.
Now let us consider an example showing the advantages of the types ptrdiff_t and size_t from the viewpoint of performance. For the purposes of demonstration, we will take a simple algorithm of calculating the minimum path length.
The function FindMinPath32 is written in classic 32-bit style with unsigned types. The function FindMinPath64 differs from it only in the way that all the unsigned types in it are replaced with size_t types. There are no other differences! Now let us compare the execution speeds of these two functions (Table 2).
Table 2 - The time of executing the functions FindMinPath32 and FindMinPath64
  Mode and function Function's execution time
1 32-bit compilation mode. Function FindMinPath32 1
2 32-bit compilation mode. Function FindMinPath64 1.002
3 64-bit compilation mode. Function FindMinPath32 0.93
4 64-bit compilation mode. Function FindMinPath64 0.85
Table 2 shows reduced time relative to the speed of execution of the function FindMinPath32 on a 32-bit system. This table was developed for the purpose of clarity. The operation time of the
FindMinPath32 function in the first line is 1 on a 32-bit system. This represents our baseline as a unit of measurement.
In the second line, we see that the operation time of the FindMinPath64 function is also 1 on a 32-bit system. No wonder, because the type unsigned coincides with the type size_t on a 32-bit system, and there is no difference between the FindMinPath32 and FindMinPath64 functions. A small deviation (1.002) only indicates a small error in measurements.
In the third line, we see a performance gain of 7%. We could well expect this result after recompiling the code for a 64-bit system.
The fourth line is of the most interest for us. The performance gain is 15%. By merely using the type size_t instead of unsigned, the compiler built a more effective code that works even 8% faster!
This simple and obvious example shows how data that are not equal to the size of the machine word slow down algorithm performance. Mere replacement of the types int and unsigned with ptrdiff_t and size_t may result in a significant performance gain. This result applies first of all to those cases where these data types are used in index arrays, in address arithmetic and to arrange loops.
Note: PVS-Studio is a commercial static program analysis tool for C, C++, and C++11. Although it is not specially designed to optimize programs, it may assist you in code refactoring and therefore make the code more efficient. For example, you can use memsize-types when fixing potential errors related to address arithmetic, thus allowing the compiler to build a more optimized code.

Intrinsic functions

Intrinsic functions are special system-dependent functions that perform actions that cannot be performed at the C/C++ level of code or that perform these functions much more effectively. Actually, they let you get rid of inline assembler code because it is often undesirable or impossible to use.
Programs may use intrinsic functions to create faster code due to the lack of overhead expenses on calling common functions. The code size is a bit larger of course. MSDN gives a list of functions that can be replaced with their intrinsic versions. Examples of these are memcpy, strcmp, etc.
Besides automatic replacement of common functions with their intrinsic versions, you may use intrinsic functions explicitly in your code. This might be helpful due to these factors:
  • Inline assembler is not supported by the Visual C++ compiler in the 64-bit mode while intrinsic code is.
  • Intrinsic functions are simpler to use as they do not require knowledge of registers and other similar low-level constructs.
  • Intrinsic functions are updated in compilers while assembler code must be updated manually.
  • The built-in optimizer does not work with assembler code.
  • Intrinsic code is easier to port than assembler code.
Using intrinsic functions in automatic mode (with the help of the compiler switch) will let you get some percentage of performance gain and using the "manual" switch helps even more. That is why using intrinsic functions is a good way to go.

Alignment

Data structure alignment is the way data is arranged and accessed in computer memory. It consists of two separate but related issues: data alignment and data structure padding. When a modern computer reads from or writes to a memory address, it will do this in word-sized chunks (e.g., 4-byte chunks on 32-bit systems) or larger. Data alignment means putting the data at a memory offset equal to some multiple of the word size, which increases the system's performance due to the way the CPU handles memory. To align the data, it may be necessary to insert some meaningless bytes between the end of the last data structure and the start of the next, which is data structure padding.
For example, when the computer's word size is 4 bytes (which is 8 bits on most machines, but could be different on some systems), the data to be read should be at a memory offset that is some multiple of 4. When this is not the case, e.g., the data starts at the 14th byte instead of the 16th byte, then the computer has to read two 4-byte chunks and do some calculation before the requested data has been read, or it may generate an alignment fault. Even though the previous data structure ends at the 13th byte, the next data structure should start at the 16th byte. Two padding bytes are inserted between the two data structures to align the next data structure to the 16th byte.
Although data structure alignment is a fundamental issue for all modern computers, many computer languages and computer language implementations handle data alignment automatically
It is good in some cases to help the compiler by defining the alignment manually to enhance performance. For example, Streaming SIMD Extensions (SSE) data must be aligned on a 16-byte boundary. You may do this in the following way:
1// 16-byte aligned data
2__declspec(align(16)) double init_val[2] = {3.14, 3.14};
3// SSE2 movapd instruction
4_m128d vector_var = __mm_load_pd(init_val);

Android Runtime

Android Runtime (ART) applications were developed by Google as a replacement of Dalvik. This runtime offers a number of new features that improve performance and smoothness of the Android platform and apps. ART was introduced in Android 4.4 KitKat; in Android 5.0 it will completely replace Dalvik. Unlike Dalvik, ART uses a Just-In-Time (JIT) compiler (at runtime), meaning that ART compiles an application during its installation. As a result, the program executes faster and that improves battery life.
For backward compatibility, ART uses the same byte code as Dalvik.
In addition to the potential speed increase, using ART can provide a second important benefit. As ART runs app machine code directly (native execution), it doesn't hit the CPU as hard as just-in-time code compiling on Dalvik. Less CPU usage results in less battery drain, which is a big plus for portable devices in general.
So why wasn't ART implemented earlier? Let's look at the downsides of Ahead-of-time (AOT) compilation. First, the generated machine code requires more space than the existing byte code. Second, the code is pre-compiled at install time, so the installation process takes a bit longer time. Finally, it also corresponds to a larger memory footprint at execution time. This means that fewer apps can be run concurrently. When the first Android devices hit the market, memory and storage capacity were significantly smaller and presented a bottleneck for performance. This is the reason why a JIT approach was the preferred option at that time. Today, memory is much cheaper and thus more abundant, even on low-end devices, so ART is a logical step forward.
In perhaps the most important improvement, ART now compiles your application to native machine code when installed on a user’s device. Known as ahead-of-time compilation, you can expect to see large performance gains as the compilers are set for specific architectures (such as ARM, x86, or MIPS). This eliminates the need for just-in-time compilation each time an application is run. Thus it takes more time to install your application, but it will boot faster when launched as many tasks executed at runtime on the Dalvik VM, such as class and method verification, have already taken place.
Next, the ART team worked to optimize the garbage collector (GC). Instead of two pauses totaling about 10ms for each GC in Dalvik, you’ll see just one, usually under 2ms. They’ve also parallelized portions of the GC runs and optimized collection strategies to be aware of device states. For example, a full GC will run only when the phone is locked and responsiveness to user interaction is no longer important. This is a huge improvement for applications that are sensitive to dropping frames. Additionally, future versions of ART will include a compact collector that will move chunks of allocated memory into contiguous blocks to reduce fragmentation and the need to kill older applications to allocate large memory regions.
Lastly, ART makes use of an entirely new memory allocator called Rosalloc (runs of slots allocator). Most modern systems use allocators based on Doug Lea’s design, which has a single global memory lock. In a multithreaded, object-oriented environment, this interferes with the garbage collector and other memory operations. In Rosalloc, smaller objects common in Java are allocated in a thread-local region without locking and larger objects have their own locks. Thus when your application attempts to allocate memory for a new object, it doesn’t have to wait while the garbage collector frees an unrelated region of memory.
Currently, Dalvik is the default runtime for Android devices and ART is optionally available on a number of Android 4.4 devices, such as Nexus phones, Google Play edition devices, Motorola phones running stock Android, and many other smartphones. ART is currently in development, and seeking developer and user feedback. ART will eventually replace Dalvik runtime once it becomes completely stable. Until then, users with compatible devices can switch from Dalvik to ART if they’re interested in trying out this new functionality and experience its performance.
To switch or enable ART, your device must be running Android 4.4 KitKat and be compatible with ART. You can easily turn on ART runtime from “Settings” -> “Developer options” -> “Runtime option”. (Tip: If you can’t see Developer options in Settings, then go to “About phone”, scroll down, and tap the Build number 7 times to enable developer options.) The phone will reboot and start optimizing the apps for ART, which can take around 15-20 minutes, depending on the number of apps installed on your phone. You will also notice an increase in the size of installed apps after enabling ART runtime.
Note: After switching to ART, when you reboot your device for the first time, it will optimize all the apps once again; which is kind of annoying.
As Dalvik is the default runtime on Android devices, some apps might not work on ART, though, most existing apps are compatible with ART and should work fine. But in case you experience any bugs or app crashes with ART, then it’s wise to switch back and stay with ART.
Switching to ART on devices requires you to know where to find the switching option on the device. Google has hidden it under Settings. Fortunately, there is a trick to enable ART runtime on device that are based on Android 4.4 KitKat.
Disclaimer: Before trying this, you should make a backup of your data. Intel won’t be responsible if your device gets bricked (won’t turn on regardless of what you try). Try it at your own risk!
  • Requires Root
  • Don’t try if you have WSM Tools installed as they don’t support ART.
To enable ART, carefully follow these steps:
  1. Make sure your device is rooted.
  2. Install ‘ES File Explorer’ from the Play store.
  3. Open ES File Explorer, tap the menu icon from top left corner and select Tools. In tools, enable the ‘Root Explorer’ option and grant full root access to ES explorer when prompted.
  4. In ES explorer, open the Device (/) directory from Menu -> Local-> Device. Go to the /data/property folder. Open the persist.sys.dalvik.vm.lib file as Text and then select ES note editor.
  5. Edit the file by selecting the edit option from top right corner. Rename the line from libdvm.so to libart.so
  6. Go back to the persist.sys.dalvik.vm.lib file and select ‘Yes’ to save the file. Then reboot the phone.
  7. The phone will reboot now and start optimizing the apps for ART. It can take time to reboot depending on the number of apps installed on your device.
In case you want to revert back to Dalvik runtime, simply follow the above steps and rename the text in persist.sys.dalvik.vm.lib file to libdvm.so.

Conclusion

Google has released a 64-bit emulator image for the forthcoming Android L - but only for the Intel x86 chip. The new emulator will allow developers to build or optimize older apps for the upcoming Android L OS and its new 64-bit architecture. Moving to 64-bit increases the addressable memory space, and allows a larger number of registers and a new instructions set for developers, but 64-bit apps aren't necessarily faster.
Java apps automatically gain the benefits of 64-bit because their byte code will be interpreted by the new ART VM which is 64-bit.This also implies that no changes to pure Java apps are necessary. Those built on the Android NDK will need some optimization to include the x86_64 build target. Intel has advice on how to go about porting code that targets ARM to x86/x64. Using the new emulator, developers will only be able to create apps for Intel® Atom™ processor-based chips.
Intel has been providing developers with tools and good system support for Android particularly its Intel® Hardware Accelerated Execution Manager (Intel® HAXM) and a range of Intel Atom OS images. Many Android programmers regularly test on emulated Intel architecture even though most of their deployment is to ARM devices. As well as the new emulator there is a 64-bit upgrade to the HAXM accelerator which should make using HAXM even more attractive. To quote Intel:
"This commitment is evident not only in the delivery of the industry’s first 64-bit emulator image for Intel architecture, and 64-bit Intel HAXM within the Android L Developer Preview SDK, but also in many other innovations along the way such as the first 64-bit kernel for Android KitKat earlier this year, the 64-bit Android Native Development Kit (NDK), and other 64-bit advancements over the last decade."
Could it be that a change to Intel architecture might happen as part of the change from 32-bit mobile to 64-bit mobile?
The Android SDK includes a virtual mobile device emulator that runs on your computer. The emulator lets you prototype, develop, and test Android applications without using a physical device. The Android emulator mimics all of the hardware and software features of a typical mobile device, except that it cannot place actual phone calls. It provides a variety of navigation and control keys, which you can "press" using your mouse or keyboard to generate events for your application. It also provides a screen in which your application is displayed, along with any other active Android applications.
To let you model and test your application more easily, the emulator utilizes Android Virtual Device (AVD) configurations. AVDs let you define certain hardware aspects of your emulated phone and allow you to create many configurations to test many Android platforms and hardware permutations. Once your application is running on the emulator, it can use the services of the Android platform to invoke other applications, access the network, play audio and video, store and retrieve data, notify the user, and render graphical transitions and themes.

Related Articles and Resources

  • Get information and download Android NDK, Revision 10d here.
  • For more information about Android 5.0 Lollipop here.
  • Read about developing apps using x86 Android* 4.4 (KitKat) emulator here.

Got Lollipop? 10 cool things to try with Android 5.0

Android 5.0 Lollipop Features

Google's Android 5.0 release is more than just a pretty makeover. Here are 10 fun features you'll definitely want to explore once you have Lollipop in front of you.

 

All right -- you've heard all about Google's Android 5.0 Lollipop release. You've read the reviews. Now what should you do once you actually get your hands on the software? 
There's plenty of new stuff to see, of course -- but once you've finished exploring all the fresh and fancy visuals, here are 10 cool things to try with Lollipop on your Android phone or tablet:

Android 5.0 Lollipop


1. Set up a trusted Bluetooth device.

If you have a Moto phone, you may have done this before -- but for the rest of the world, it's uncharted terrain: the ability to have your Android device stay unlocked anytime a specific Bluetooth device is present and paired. 
To set it up, head into your phone or tablet's system settings and tap "Security." Make sure you have "Screen lock" set to something other than "Swipe"; you'll need to have a pattern, password, or PIN established so your phone can automatically secure itself whenever your trusted Bluetooth device isn't around.Once you've done that, tap "Smart Lock" on that same menu and then tap "Trusted devices." Tap the red plus sign and follow the prompts to pair your smartwatch, car stereo, portable speaker, or practically anything else -- then sit back and enjoy having easy access to your Android gadget whenever the Bluetooth device is nearby.
(You probably don't have access to it yet, by the way, but you'll soon be able to set a trusted place as well. An incoming update to Google Play Services should add that option to all Lollipop devices within the coming days.)

2. Check out the revamped Face Lock feature.

While you're in that same "Security" menu, go back into "Smart Lock" and tap "Trusted face." Follow the prompts to train the system to recognize your face, then press the power button and give it a whirl. 
Android 5.0 Lollipop Face Unlock
As you'll see, Face Lock works far faster and more reliably than it did in the past, when it was novel but just too darn finicky and slow to be practical. With Lollipop, the system starts working to identify your face the second the screen is activated. More often than not, by the time you swipe away the clock, it'll already have you recognized and ready to get through without the need for further security.

3. Take Lollipop's always-listening voice command system out for a spin.

Provided your phone or tablet supports it, you can now give voice commands anytime -- even when your device's display is off. 
The option to activate the feature is a bit buried: Head into your system settings, tap "Language & input" and then "Voice input," then tap the gear icon next to "Enhanced Google services" and look for a line labeled "'Ok Google' Detection."
Tap it, then tap the line labeled "Always on" and follow the prompts to train the system to recognize your voice. While you're in that menu, think about whether you want voice commands to work even when your phone is locked with a pattern, PIN, or password; if you do, tap the line labeled "When locked" before you exit out.
Once you're all done, just say "Okay, Google" and your phone will start listening. You can then ask it a question or give it all sorts of commands and have it work for you whether it's in your hands or not.

4. Interact with a notification on the lock screen.

Lollipop brings a whole new look to the Android lock screen, and your personal notifications are the main attraction. Next time you press your device's power button and see a notification waiting, try swiping it horizontally in either direction to dismiss it. You can also tap on it twice to open it or swipe downwards on it to expand it and gain access to any quick commands available (like archiving or replying to an email).

5. Set up and try priority notification mode.

One of Lollipop's more complex but also potentially useful features is the system's new priority notification mode -- essentially a customizable "do not disturb"-style setting for your tablet or phone. Whenever the priority mode is active, only notifications that are considered "high priority" will make a sound and alert you; any other notifications will show up but remain silent. 
To get started, press your device's volume up or volume down key while the display is on and then tap "Priority" in the panel that appears at the top of the screen. Select either to leave that mode on indefinitely (the default) or to specify a finite amount of time -- an hour, two hours, whatever -- for which it'll remain active.
Android 5.0 Lollipop Priority Notifications
While you have that panel open, take a minute to visit the priority notification settings to make sure it's set up the way you want: After pressing a volume key and tapping "Priority," tap the gear icon next to the words "Priority interruptions only." Now think about what types of notifications you want to alert you when you have the priority mode active. You can opt to allow any combination of events and reminders, calls, and messages -- and with the latter two, you can either allow any calls and messages to come through or allow only calls and messages from approved contacts.

6. Schedule a recurring priority notification mode.

Lollipop's priority notification mode can automatically activate itself at certain recurring times -- if, say, you want your phone to remain silent except for emergency calls and messages during the night. 
Go back into that same menu we were just in (you can also get to it by going into the main system settings and tapping "Sound & notification," then "Interruptions"). Scroll down to the bottom of the screen and select what days and times you want the priority mode to activate.
Once you've done that, your device will automatically go into priority notification mode during those windows -- and you'll be bothered only by the notifications you absolutely need.

7. Customize how app notifications behave.

Want to take things a step further? Lollipop lets you customize notifications on an app-by-app basis so that any app's alerts can be considered "high priority" all the time. 
If you set an app to be high priority, you're effectively whitelisting it: Any notifications generated by that app will always alert you, even if your device is in priority-only mode. The app's notifications will also always appear at the top of your notification panel, above any others.
Android 5,0 Lollipop App Notifications
All you have to do is head into your system settings, select "Sound & notifications" and then select "App notifications." Tap any app you want to customize, then toggle the switch for "Priority" to whitelist it.

8. Prepare your phone for guest access.

If you ever pass your phone or tablet off to a friend, Lollipop's new guest mode is well worth exploring. 
To see how it works, open up your device's Quick Settings panel by swiping down from the top of the screen and then swiping down a second time. Tap the circular avatar at the far right corner, then tap "Guest."
When you're ready to switch back to your own account, do that same thing but tap your name instead of "Guest." If you have a security pattern, PIN, or password set, you'll be prompted to enter it before proceeding.

9. Pin something to your device's screen.

We've all been there: Someone you know needs to borrow your phone "for a quick sec" to make a call or look something up online. Or maybe you want to hand your device over to the little one so she can play a game while the grown-ups talk. A new Lollipop feature called Screen Pinning is designed to let you do those types of things without any hassle -- and without having to worry about the person getting into something they shouldn't. 
Take a moment now to enable it: Go into the main system settings, select "Security," scroll down to "Screen Pinning," and set it to "On."
Then take it for a test run: Tap the Recent Apps key (the square to the right of the Home key) and scroll upward. You'll see a pushpin icon on the most recent app or process you've had open. Tap it and then confirm that you want to pin that process.
Android 5,0 Lollipop Pinning
Your device is now locked to that one process -- so if you hand it off to anyone, it's the only thing they'll be able to use. No returning to the home screen, no seeing notifications, no opening up anything else on the device.
To exit the pinned mode, press the Back and Recent Apps (apparently also now known as "Overview") buttons at the same time. If you have a PIN, pattern, or password set -- which you should if you want this feature to have much meaning -- you'll need to enter it in order to return the device to its normal state.

10. Beam something to another device.

Android Beam has been around for a while, but it's always been hard to know exactly when and how it can work. With Lollipop, Beam is integrated into the system sharing function and is consequently easier to use and more versatile than ever. 
See for yourself: Open up the Photos app on your device and tap any image you like. Then tap the share icon at the bottom of the screen and select "Android Beam" from the list of choices that appears.
Your phone or tablet will instruct you to bring another Android device against its back. Just make sure the other device is unlocked, then bring them back to back -- and shazam: The photo you selected will transfer wirelessly from one device to the other, even if the other device isn't on Lollipop. No wires, no special apps, no third-party services required.
(Both devices will need to support NFC in order for this to work, but pretty much every reasonable Android device released in the past few years does.)
You can do the same thing anywhere the share command is available -- a social media app, a file manager, you name it. Images, links, contacts, and any other type of shareable content should work.

Bonus: Try your hand at Lollipop's hidden Flappy Bird game.

Google loves including fun little Easter eggs in its products, and Lollipop is no exception. Go into your system settings, select "About phone" (or tablet) and then tap the line labeled "Android version" a bunch of times in a row.
When you see a large Lollipop graphic appear on your screen, tap the circle part of the image about five times and then press and hold your finger to it. You'll then be taken into an Android-themed Flappy Bird-like game, with lots o' lollipop obstacles to jump through and avoid.
Flap, flap, flap. One final tip: If you find yourself playing for more than 10 minutes, put down your device and smack yourself in the head with the nearest rubber mallet. You'll thank me later.