Showing posts with label Trick. Show all posts
Showing posts with label Trick. Show all posts

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


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>


 

Font Converter Utility

About Font converter Utility
Utility is for Persons working with KrutiDev and Mangal font. This utility is for converting text typed in Mangal font to KrutiDev or for converting KrutiDev to Mangal font. User can either paste or type the text in textbox and get text in required Font.

Click Here