Google+ Sandeepa On Life: tips

Pages

Search this blog

Showing posts with label tips. Show all posts
Showing posts with label tips. Show all posts

Tuesday, November 20, 2012

How To Take Screenshot In Sony Ericsson Xperia

How to take screenshot in Sony Ericsson Xperia phone(and may be with other Sony Ericsson phones)?

Sounds trivial? Turns out it's not much so. I remember taking screenshot with this phone earlier. All I had to do is just press and hold the power button and I'd get option for screenshot.

Problem started  after I updated my phone to Android 4.0 (Ice Cream Sandwich). The old method stopped working and it took quite a bit of Googling before I found out the new method.

The new method to capture screenshot is little tricky.

Simultaneously hold 'Power' and 'Volume Low' button for ~2 seconds. 

I'll show how to do that in this video.



Wednesday, May 25, 2011

How to display Ads on your blog using Google AdSense


You might have heard about people making money by displaying ads on their blogs using services like Google AdSense.

If you have a Blogger blog, setting up AdSense is fairly simple. Just follow these steps.

Step 1:
          Sign up for Google AdSense. The approval may take anywhere between few hours to many days. 

Step 2: Once you have an activated AdSense account,
  • Login to Blogger.
  • Goto Monetize tab of your blog by clicking on Montize from your blogger dashboard.
  • Monetize link in Dashboard
    In 'Adsense overview' tab, configure how and where you want the ads to appear.
Configure ads
  • Choose/login to your adsense account that you created in step 1.
  • And you are done! Now you track the ad statistics from this tab! Congrats :)
Track your earnings!
P.S: I just did this to my blog.

Monday, March 28, 2011

Syntax Highlighting for Blogs

Code snippets inside blog posts can be very difficult to read if they are written using normal font.

Consider the following piece of code.

int i, sum=0;
for(i=0; i<n; i++)
{
sum = sum + i;
}
Code without any special formatting.


HTML <pre>...</pre> and <code>...</code> can be used to preserve the white spaces and long lines.
Here's the same code put inside a <pre><code> block..

int i, sum=0;
for(i=0; i<n; i++)
{
    sum = sum + i;
}
Structure of the code preserved using <pre> & <code>

This version looks much better than the first one. The monospaced text makes it easier to read.

However, this is not enough. These generic <pre>&<code> do not highlight the keywords in the code snippet. This is where Syntax Highlighting comes into picture.

Syntax highlighting is a feature of some text editors that display text—especially source code—in different colors and fonts according to the category of terms. This feature eases writing in a structured language such as a programming language or a markup languageas both structures and syntax errors are visually distinct. Highlighting does not affect the meaning of the text itself; it's made only for human readers/editors. (Read more on Wiki..)
Let us apply Syntax Highlighting to the above code.
int i, sum=0;
for(i=0; i<n; i++)
{
    sum = sum + i;
}

Now, this looks much better! This is achieved using a third party Syntax Highlighter plugin.
There are many plugins and other tools available on the internet for Syntax Highlighting.

I am using SyntaxHighlighter for this blog. I chose this because it's easy to use and supports many languages. Will talk about plugin integration with blogger in my next post.


Cheers,
Sandeepa Nadahalli