Thursday, 7 August 2014

Script For Page Reload Page One Time After Loading the Page

Given Script load the page one time after loading the page ....

<script type='text/javascript'>

(function()
{
  if( window.localStorage )
  {
    if( !localStorage.getItem( 'firstLoad' ) )
    {
      localStorage[ 'firstLoad' ] = true;
      window.location.reload();

    }
    else
      localStorage.removeItem( 'firstLoad' );
  }
})();

</script>

Friday, 1 August 2014

Generating a Thumbnail from a YouTube Video

Websites, blogs and web applications regularly embed video content from various video service providers such as YouTubeand Vimeo. Videos are usually depicted using image thumbnails, tweaked to fit the graphics design of the website. When a video thumbnail is clicked, the actual video content starts playing.
 
In this post we wanted to explain how Cloudinary can help you to easily generate thumbnails from public videos. These thumbnails can be generated while applying any required image transformation in order to match your graphic design requirements.

Generating a Thumbnail from a YouTube Video

Let’s assume that we want to display the thumbnail of the following YouTube video:
 
This can be easily accomplished by adding the video ID to the URL. 'o-urnlaJpOA' in this example:
http://res.cloudinary.com/demo/image/youtube/o-urnlaJpOA.jpg


Thursday, 24 July 2014

How To Share Internet Connection Via Bluetooth Between Two Computers?

I use Icom bluetooth usb device for my pc  and I wanted to share internet between my computer and laptop over Bluetooth.
It was not an easy job. It cannot be done by Windows Internet Connection Sharing (ICS)  But finally I figured out a way to do it.
You have two computers with Bluetooth
Computer 1 has internet connection
Computer 2 You want to share internet connection with.
1. Install a proxy server on Computer 1. I used ezProxy. (http://www.brothersoft.com/ezproxy-download-19060.html)
2. Join two computers by Bluetooth Personal Area Networking (PAN).
3. On computer 2 go to Tools > Internet Options > Connections > LAN Settings.
Check use a Proxy Server for your LAN box.
4. Give IP address and Port Number assigned to Proxy by Computer1.
5. Enjoy surfing net on Computer 2. Happy Browsing

Saturday, 12 July 2014

Hindi Textbox using Google Translator API

To type in Hindi in Text Box use following Java Script API.

Read More

How to Put a Video Clip in a Website

A basic understanding of how HTML coding works can help you understand how to put a video clip on your website or blog. The HTML code is used to tell your website which video it should display, what kinds of controls it should make available and how large the screen on which the clip will play should be. The controls also can tell the page if it is allowed to open to a full screen.

Read More

Friday, 11 July 2014

How to Create Random Numbers & Characters

This page shows you how to create a random sequence of numbers and/or text. The function which generates the random string can be called from any event handler - the example below uses a button.
Step 1
Add the following code to your head:
<script language="javascript" type="text/javascript">
function randomString() {
 var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
 var string_length = 8;
 var randomstring = '';
 for (var i=0; i<string_length; i++) {
  var rnum = Math.floor(Math.random() * chars.length);
  randomstring += chars.substring(rnum,rnum+1);
 }
 document.randform.randomfield.value = randomstring;
}
</script>
Variables to set:
  1. chars - The random string will be created from these characters.
  2. string_length - The length of the random string.

Step 2

Use the following code for your text field and button:
<form name="randform">
<input type="button" value="Create Random String" onClick="randomString();">&nbsp;
<input type="text" name="randomfield" value="">
</form>