Hi friends,
Yesterday Google introduced a new product in their labs(Google labs). It looks awesome. Swiffy will convert all the swf flash files to HTML5 equivalent, which support all the modern browsers. It may not support IE as of now ( I need to verify it).This version of Swiffy will not convert all the flash contents, but will be very useful in converting all the Flash advertisements in our websites.
Swiffy uses JSON for it's animation, which can be rendered using SVG, HTML5 and CSS3. All the actionscript are rendered as JSON objects and is interpreted as javascript in the browser.
Pieter Senster, is the brain behind this awesome product.
You can see some of the examples of Swiffy from here http://swiffy.googlelabs.com/gallery.html
Hi, i am Praveen from Kochi, Kerala. I am a web developer and an open source enthusiast.
Wednesday, July 20, 2011
Monday, July 11, 2011
Youtube video thumbnail using php
Youtube video thumbnail using php
php function to convert youtube url to video id
function getYouTubeIdFromURL($url)
{
$url_string = parse_url($url, PHP_URL_QUERY);
parse_str($url_string, $args);
return isset($args['v']) ? $args['v'] : false;
}
{
$url_string = parse_url($url, PHP_URL_QUERY);
parse_str($url_string, $args);
return isset($args['v']) ? $args['v'] : false;
}
Calling the above function
$youtube_id = getYouTubeIdFromURL("http://www.youtube.com/watch?v=4OoC8ycuCo0&feature=topvideos_sports");
echo $youtube_id."<br/>";
echo "http://img.youtube.com/vi/".$youtube_id."/0/.jpg"; */
The javascript version of the above code can be found in this blog
Youtube video thumbnail image using javascript
Javascript function to get video thumbnail image from youtube
The code
function getScreen( url, size )
{
if(url === null){ return ""; }
size = (size === null) ? "big" : size;
var vid;
var results;
results = url.match("[\\?&]v=([^&#]*)");
vid = ( results === null ) ? url : results[1];
if(size == "small"){
return "http://img.youtube.com/vi/"+vid+"/2.jpg";
}else {
return "http://img.youtube.com/vi/"+vid+"/0.jpg";
}
}
{
if(url === null){ return ""; }
size = (size === null) ? "big" : size;
var vid;
var results;
results = url.match("[\\?&]v=([^&#]*)");
vid = ( results === null ) ? url : results[1];
if(size == "small"){
return "http://img.youtube.com/vi/"+vid+"/2.jpg";
}else {
return "http://img.youtube.com/vi/"+vid+"/0.jpg";
}
}
Calling the javascript function and alerting the result
var result = '';
result = getScreen( 'http://www.youtube.com/watch?v=4OoC8ycuCo0&feature=topvideos_sports', 'small' );
var result = '';
result = getScreen( 'http://www.youtube.com/watch?v=4OoC8ycuCo0&feature=topvideos_sports', 'small' );
alert(result);
The php version of the above code can be found in this blog
How to check system configuration in ubuntu?
System Configuration in Ubuntu
Command to find cpu information cat /proc/cpuinfo
The output of the above command will be
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 95
model name : AMD Athlon(tm) 64 Processor 3000+
stepping : 2
cpu MHz : 1000.000
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow up extd_apicid pni cx16 lahf_lm svm extapic cr8_legacy
bogomips : 2000.17
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc
Command to find RAM details free -m
You can use the following command to find out the total RAM
grep MemTotal /proc/meminfo
vendor_id : AuthenticAMD
cpu family : 15
model : 95
model name : AMD Athlon(tm) 64 Processor 3000+
stepping : 2
cpu MHz : 1000.000
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow up extd_apicid pni cx16 lahf_lm svm extapic cr8_legacy
bogomips : 2000.17
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc
Saturday, July 9, 2011
Google Scribe
I would like to introduce you a new Google product for SEO purposes, called the Google Scribe. Why do we use scribe? Now google started to look at spelling and grammar of the content they index and Scribe is the best way to rectify all the spelling and grammar mistakes.
The googe scribe is still at Google labs. You can try it and "Submit Product Ideas". Google Scribe uses wonderful auto suggestion. On the left side of the toolbar you will see an option to select multiple suggestions. There is an option to add automatic anchor text for a link. In the new Google Scribe, they will show some suggestions for us to select.
The most wonderful thing about the Google Scribe is that it can be used in our website and we can create content using it. To activate the Google Scribe in your web, you have to use the Scribe Bookmarklet.
The googe scribe is still at Google labs. You can try it and "Submit Product Ideas". Google Scribe uses wonderful auto suggestion. On the left side of the toolbar you will see an option to select multiple suggestions. There is an option to add automatic anchor text for a link. In the new Google Scribe, they will show some suggestions for us to select.
The most wonderful thing about the Google Scribe is that it can be used in our website and we can create content using it. To activate the Google Scribe in your web, you have to use the Scribe Bookmarklet.
Subscribe to:
Comments (Atom)