Adobe Has not Feared From iPad and HTML5, Says some Analyst

Adobe Has not Feared From iPad and HTML5, Says some Analyst. Adobe haw hit lowercase to vexation most from Googles ingest of HTML5 in YouTube and Apple rejection Flash for the iPhone and iPad, according to a newborn shrink inform from investigate concern Jefferies amp; Co. That report follows past blogosphere noisy over whether the demand
iphone-flash-300x220
“Apple’s exclusion of Flash from the iPhone/iPad and Google’s YouTube beta that uses a HTML5 video tag are recent events that have caused investors to raise concern over the future of Flash (which is today’s leading Internet rich media/video container),” Jefferies & Co. analyst Ross MacMillan wrote in a Feb. 10 research note. “We think Flash will remain a leading (but not the only) rich media platform, and, more importantly, this has almost zero bearing on numbers over the next 18 months.”

Source Link

How to install Nginx and PHP on Ubuntu

For this tutorial I am using the Ubuntu 8.10 linux version. We given very easy steps for installing php and ngnix and configuration details.

How to install Nginx and PHP on Ubuntu

Install Nginx
# sudo apt-get install nginx

If apache server is installed on your machine then please stop the apache server first.

#sudo /etc/init.d/nginx start

#sudo update-rc.d nginx defaults

Install PHP5

#sudo apt-get install php5-cgi php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

Open the PHP.ini file

#sudo vim /etc/php5/cgi/php.ini

Insert following line at the end of php.ini file
cgi.fix_pathinfo = 1

Install the lighttpd server

#sudo apt-get install lighttpd

You will see an error message saying that lighttpd couldn’t start because port 80 is already in use.

For removing the error message use following command

#sudo update-rc.d -f lighttpd remove

Start the FastCGI daemon service

#sudo /usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -g www-data -f /usr/bin/php5-cgi -P /var/run/fastcgi-php.pid

If you want run following command whenever you boot the system. Open following file.

#sudo vim /etc/rc.local

Copy paste following following lines in file.

/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -g www-data -f /usr/bin/php5-cgi -P /var/run/fastcgi-php.pid

Configuration Nginx

#sudo vim /etc/nginx/nginx.conf
Just copy paste the following code in end of httpd block. Dont paste outside of http block.

server {
listen 80;
server_name _;

access_log /var/log/nginx/localhost.access.log;

location / {
root /var/www/nginx-default;
index index.php index.html index.htm;
}

location /doc {
root /usr/share;
autoindex on;
allow 127.0.0.1;
deny all;
}

location /images {
root /usr/share;
autoindex on;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/nginx-default;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
#proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name;
include fastcgi_params;
}

# deny access to .htaccess files, if Apache’s document root
# concurs with nginx’s one
#
location ~ /\.ht {
deny all;
}
}

How to install Nginx and PHP on Ubuntu
How to install Nginx and PHP on Ubuntu

Just restart the Nginx server.

#sudo /etc/init.d/nginx restart

9 Things You Wish Google Would Announce

Virtually everyone expects Google to announce something to do with social networking today, when the company holds a press conference at 1 PM ET. Maybe it’s some Twitter-like functionality inside of Gmail. But Google isn’t telling, and the result is all guesswork. What if everyone is wrong? Here are a bunch of ideas from Twitter of all the things people would like to hear Google announce today.

Wish Google Would Announce

Wish Google Would Announce
Wish Google Would Announce

1.) “We’re Buying Twitter”: Well, this is wishful thinking. Google has bought its share of companies and technologies, but I think Twitter’s valuation might be too high for Google’s blood.
2.) Preview Panes in Gmail: Nice, simple upgrade to the popular web mail app. If they do, it’ll show up quietly in Gmail Labs.
3.) Google Reveals Exactly What’s it’s Doing with the NSA: There have been reports that Google is working closely with the National Security Agency, but no one seems to know why. Don’t expect Google to talk about this.
4.) Google Voice is Going Open: You don’t need an invite; you could simply go to Google voice and sign up today. It would be nice, but it’s definitely not newsworthy.
5.) Google Lowers the Price on Unsubsidized Nexus Ones: Wouldn’t it really be HTC lowering the price? Google’s not making money on this phone, but HTC probably is. I doubt they’ll want that to change.
6.) Google Announces Rescue Plan for NASA: With the Obama Administration pretty much abandoning the program, this would be a great opportunity for the space-loving Google to step in. Again, doubtful—even Google doesn’t have that much money.
7.) A Promise Never to Allow Data Mining: Google needs to mine its data to deliver valuable insight to clients and partners. They do it in ways that do not reveal private data. Don’t expect any of that to change.
8.) Google Unveils a Shipping Chrome Netbook or Tablet: The Chrome OS is months, if not a year, away from commercial availability. This will not happen.
9.) Google Updates Android: Android 2.1 is just arriving on Droids, but there is a chance, I guess, that this could be a big Android 3.0 announcement.

Source Link

 

how to install wine in fedora

Linux tutorial, As we wine is windows emulator for linux box. So many people thinking how to install the Wine package on Linux box.

how to install wine in fedora

how to install wine in fedora
how to install wine in fedora

That is so easy just follow my steps. Commands will look like as follows:

[root@kapilk-pc kapil]# yum install wine*
Loaded plugins: refresh-packagekit
Setting up Install Process
Package wine-tools is obsoleted by wine-core, trying to install wine-core-1.1.32-1.fc11.i586 instead
Resolving Dependencies
–> Running transaction check
—> Package wine.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-alsa.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-capi.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-cms.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-common.noarch 0:1.1.32-1.fc11 set to be updated
—> Package wine-core.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-desktop.noarch 0:1.1.32-1.fc11 set to be updated
—> Package wine-devel.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-docs.noarch 0:1.0-2.fc11 set to be updated
—> Package wine-esd.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-fonts.noarch 0:1.1.32-1.fc11 set to be updated
—> Package wine-jack.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-ldap.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-nas.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-openal.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-oss.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-pulseaudio.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-twain.i586 0:1.1.32-1.fc11 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

==================================================================================
Package Arch Version Repository Size
==================================================================================
Installing:
wine i586 1.1.32-1.fc11 updates 27 k
wine-alsa i586 1.1.32-1.fc11 updates 88 k
wine-capi i586 1.1.32-1.fc11 updates 31 k
wine-cms i586 1.1.32-1.fc11 updates 47 k
wine-common noarch 1.1.32-1.fc11 updates 86 k
wine-core i586 1.1.32-1.fc11 updates 14 M
wine-desktop noarch 1.1.32-1.fc11 updates 31 k
wine-devel i586 1.1.32-1.fc11 updates 2.7 M
wine-docs noarch 1.0-2.fc11 fedora 1.9 M
wine-esd i586 1.1.32-1.fc11 updates 41 k
wine-fonts noarch 1.1.32-1.fc11 updates 190 k
wine-jack i586 1.1.32-1.fc11 updates 43 k
wine-ldap i586 1.1.32-1.fc11 updates 94 k
wine-nas i586 1.1.32-1.fc11 updates 29 k
wine-openal i586 1.1.32-1.fc11 updates 41 k
wine-oss i586 1.1.32-1.fc11 updates 93 k
wine-pulseaudio i586 1.1.32-1.fc11 updates 50 k
wine-twain i586 1.1.32-1.fc11 updates 57 k

Transaction Summary
=========================================================================================
Install 18 Package(s)
Upgrade 0 Package(s)

Total download size: 19 M
Is this ok [y/N]: y
Downloading Packages:
(1/18): wine-1.1.32-1.fc11.i586.rpm | 27 kB 00:00
(2/18): wine-alsa-1.1.32-1.fc11.i586.rpm | 88 kB 00:00
(3/18): wine-capi-1.1.32-1.fc11.i586.rpm | 31 kB 00:00
(4/18): wine-cms-1.1.32-1.fc11.i586.rpm | 47 kB 00:00
(5/18): wine-common-1.1.32-1.fc11.noarch.rpm | 86 kB 00:00
(6/18): wine-core-1.1.32-1.fc11.i586.rpm | 14 MB 00:25
(7/18): wine-desktop-1.1.32-1.fc11.noarch.rpm | 31 kB 00:00
(8/18): wine-devel-1.1.32-1.fc11.i586.rpm | 2.7 MB 00:05
(9/18): wine-docs-1.0-2.fc11.noarch.rpm | 1.9 MB 00:02
(10/18): wine-esd-1.1.32-1.fc11.i586.rpm | 41 kB 00:00
(11/18): wine-fonts-1.1.32-1.fc11.noarch.rpm | 190 kB 00:00
(12/18): wine-jack-1.1.32-1.fc11.i586.rpm | 43 kB 00:00
(13/18): wine-ldap-1.1.32-1.fc11.i586.rpm | 94 kB 00:00
(14/18): wine-nas-1.1.32-1.fc11.i586.rpm | 29 kB 00:00
(15/18): wine-openal-1.1.32-1.fc11.i586.rpm | 41 kB 00:00
(16/18): wine-oss-1.1.32-1.fc11.i586.rpm | 93 kB 00:00
(17/18): wine-pulseaudio-1.1.32-1.fc11.i586.rpm | 50 kB 00:00
(18/18): wine-twain-1.1.32-1.fc11.i586.rpm | 57 kB 00:00
——————————————————————————————————————————–
Total 251 kB/s | 19 MB 01:18
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : wine-fonts-1.1.32-1.fc11.noarch 1/18
Installing : wine-docs-1.0-2.fc11.noarch 2/18
Installing : wine-core-1.1.32-1.fc11.i586 3/18
Installing : wine-pulseaudio-1.1.32-1.fc11.i586 4/18
Installing : wine-twain-1.1.32-1.fc11.i586 5/18
Installing : wine-capi-1.1.32-1.fc11.i586 6/18
Installing : wine-ldap-1.1.32-1.fc11.i586 7/18
Installing : wine-cms-1.1.32-1.fc11.i586 8/18
Installing : wine-openal-1.1.32-1.fc11.i586 9/18
Installing : wine-nas-1.1.32-1.fc11.i586 10/18
Installing : wine-esd-1.1.32-1.fc11.i586 11/18
Installing : wine-jack-1.1.32-1.fc11.i586 12/18
Installing : wine-oss-1.1.32-1.fc11.i586 13/18
Installing : wine-devel-1.1.32-1.fc11.i586 14/18
Installing : wine-alsa-1.1.32-1.fc11.i586 15/18
Installing : wine-common-1.1.32-1.fc11.noarch 16/18
Installing : wine-desktop-1.1.32-1.fc11.noarch 17/18
Installing : wine-1.1.32-1.fc11.i586 18/18

Installed:
wine.i586 0:1.1.32-1.fc11 wine-alsa.i586 0:1.1.32-1.fc11 wine-capi.i586 0:1.1.32-1.fc11 wine-cms.i586 0:1.1.32-1.fc11 wine-common.noarch 0:1.1.32-1.fc11 wine-core.i586 0:1.1.32-1.fc11
wine-desktop.noarch 0:1.1.32-1.fc11 wine-devel.i586 0:1.1.32-1.fc11 wine-docs.noarch 0:1.0-2.fc11 wine-esd.i586 0:1.1.32-1.fc11 wine-fonts.noarch 0:1.1.32-1.fc11 wine-jack.i586 0:1.1.32-1.fc11
wine-ldap.i586 0:1.1.32-1.fc11 wine-nas.i586 0:1.1.32-1.fc11 wine-openal.i586 0:1.1.32-1.fc11 wine-oss.i586 0:1.1.32-1.fc11 wine-pulseaudio.i586 0:1.1.32-1.fc11 wine-twain.i586 0:1.1.32-1.fc11

Complete!
[root@kapilk-pc kapil]#

have fun!

How to get Short Url from using PHP API WITH is.gd, api.tr.im, hex.io

Creating the short url is now becoming the popular trend because of twitter and facebook. Tutorial about How to get Short Url from using PHP API WITH is.gd, api.tr.im, hex.io.

 

get Short Url from using PHP
get Short Url from using PHP

If you want to use API in php for creating the short URL. use following code:


<?php //Get short URL from free API with purabtech.in/files/ function get_short_url($long_url,$provider='isgd') { $ch = curl_init(); $timeout = 5; switch(strtolower(trim($provider))) { case "isgd": curl_setopt($ch,CURLOPT_URL,'http://is.gd/api.php?longurl='.$long_url); break; case "hexio": curl_setopt($ch,CURLOPT_URL,'http://hex.io/api-create.php?url='.$long_url); break; case "trim": $return = "http://api.tr.im/v1/trim_url.xml?url=%s"; curl_setopt($ch,CURLOPT_URL,'http://api.tr.im/v1/trim_url.xml?url='.$long_url); break; default: curl_setopt($ch,CURLOPT_URL,'http://is.gd/api.php?longurl='.$long_url); } curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); $content = curl_exec($ch); curl_close($ch); // return the short URL return $content; } //uage $short_url = get_short_url('http://images.purabtech.in/'); echo $short_url; ?>

<br>

Sample ofHow to Use<br><br>


<?php
$long_url = 'http://images.purabtech.in/';
$short_url = get_short_url($long_url,'hexio');
echo $short_url;
echo '
';
$short_url = get_short_url($long_url,'isgd');
echo $short_url;
echo '
';
$short_url = get_short_url($long_url,'trim');
echo $short_url;
echo '
';

?>

check html 5 is support in browsers through javascript

HTML5 is new version of HTML and many people does not aware of it.  In article, we checked html 5 is support in browsers through javascript. HTML5 is a new version of HTML and XHTML. The HTML5 draft specification defines a single language that can be written in HTML and XML.

check html 5 is support in browsers through javascript

It attempts to solve issues found in previous iterations of HTML and addresses the needs of Web Applications, an area previously not adequately covered by HTML.

check html 5 is support in browsers through javascript
check html 5 is support in browsers through javascript

In one of my project I need to use HTML5 methods and properties through javascript. So first I need to check or dectect with multiple browsers is there way to find HTML5 compability with browsers.I

Main introduced features are like canvas, video, or geolocation. Using that we can easily dectect the browsers compability.


if (navigator.geolocation) {
/* geolocation is available */
} else {
alert("I'm sorry, but geolocation services and HTML5 are not supported by your browser.");
}

or

if (window.postMessage) {
/* postMessage method is available */
} else {
alert("I'm sorry, but postMessage method and HTML5 are not supported by your browser.");
}

I am still searching for better solution…

install the YII on local machine (PHP framework)

Yii — a high-performance component-based PHP framework best for developing large-scale Web applications. Yii comes with a full stack of features, including MVC, DAO/ActiveRecord, I18N/L10N, caching, jQuery-based AJAX support, authentication and role-based access control, scaffolding, input validation, widgets, events, theming, Web services, and so on.

Written in strict OOP, Yii is easy to use and is extremely flexible and extensible. here in this article I given the steps for install the YII on local machine (PHP framework)

install the YII on local machine (PHP framework)

You can download the YII framework from following URL

http://www.yiiframework.com/download/

Yii PHP Framework: Best for Web 2.0 install the YII on local machine
install the YII on local machine

I copied the folder in my ROOT directory. I am using the fedora on my machine.

 

install the YII on local machine

 

Just follow my commands:


[kapil@kapilk-pc ~]$ cd /var/www/html/yii/
[kapil@kapilk-pc yii]$ cd framework/
[kapil@kapilk-pc framework]$ ./yiic webapp ../testdrive
PHP Warning:  Module 'memcache' already loaded in Unknown on line 0
Create a Web application under '/var/www/html/yii/testdrive'? [Yes|No] y
unchanged css/bg.gif
unchanged css/main.css
unchanged css/form.css
unchanged css/print.css
unchanged css/screen.css
unchanged css/ie.css
unchanged index.php
unchanged themes/classic/views/.htaccess
unchanged index-test.php
unchanged protected/components/Controller.php
unchanged protected/components/UserIdentity.php
unchanged protected/yiic.php
unchanged protected/config/main.php
unchanged protected/config/console.php
unchanged protected/config/test.php
unchanged protected/yiic
unchanged protected/models/ContactForm.php
unchanged protected/models/LoginForm.php
unchanged protected/data/schema.mysql.sql
unchanged protected/data/testdrive.db
unchanged protected/data/schema.sqlite.sql
unchanged protected/.htaccess
unchanged protected/controllers/SiteController.php
unchanged protected/yiic.bat
unchanged protected/views/site/pages/about.php
unchanged protected/views/site/index.php
unchanged protected/views/site/error.php
unchanged protected/views/site/contact.php
unchanged protected/views/site/login.php
unchanged protected/views/layouts/main.php
unchanged protected/tests/bootstrap.php
unchanged protected/tests/WebTestCase.php
unchanged protected/tests/phpunit.xml
unchanged protected/tests/functional/SiteTest.php

Your application has been created successfully under /var/www/html/yii/testdrive.
[kapil@kapilk-pc framework]$

How to schedule events in wordpress

As we all know cron job can be scheduled in linux systems. So scheduling the any job in wordpress is easy because scheduling the events in wordpress is provided by wordpress itself.

How to schedule events in wordpress

How to schedule events in wordpress
How to schedule events in wordpress

WordPress provides the following functions to schedule the events.

wp_schedule_event(); //using this method you can schedule events.

You can pass following parameters to this method.

wp_schedule_event(time(), ‘hourly’, ‘your_event’);

Following params you need to pass to this method.

$timestamp
(integer) (required) The first time that you want the event to occur. This must be in a UNIX timestamp format.

Default: None

$recurrance
(string) (required) How often the event should reoccur. Valid values:

* hourly
* twicedaily
* daily

Default: None

$hook
(string) (required) The name of an action hook to execute.

Default: None

$args
(array) (optional) Arguments to pass to the hook function(s).

Default: None

You can Schedule an hourly event. Example as follows:

register_activation_hook(__FILE__, ‘my_activation’);
add_action(‘my_hourly_event’, ‘do_this_hourly’);

function my_activation() {
wp_schedule_event(time(), ‘hourly’, ‘my_hourly_event’);
}

function do_this_hourly() {
// do something every hour
}

Don’t forget to clean the scheduler on deactivation:

register_deactivation_hook(__FILE__, ‘my_deactivation’);

function my_deactivation() {
wp_clear_scheduled_hook(‘my_hourly_event’);
}

Now I am going to tell you how to extend the wp_schedule_event().
We can add the more recurrences adding following code.

function ten_minute_reccurences() {
return array(
‘ten_minute_reccurences’ => array(‘interval’ => 60*10, ‘display’ => ‘Once in Ten Mintues’),
);
}
add_filter(‘cron_schedules’, ‘ten_minute_reccurences’);

If you want check this recurrences added to wp_schedule_event or not. You need to just use following code to print recurrences

php print_r(wp_get_schedules());  ?>

I found useful following URLs.

http://codex.wordpress.org/Function_Reference/wp_schedule_event
http://codex.wordpress.org/Plugin_API/Filter_Reference/cron_schedules
http://codex.wordpress.org/Plugin_API

If you have PHP knowledge than you should open wp-includes/cron.php file. This file has best information and methods about scheduler.

How to customize read more for every wordpress post

So many clients had requirement about customize read more link for every post. Tutorial for, How to customize read more for every wordpress post.

So achieving this functionality in easiest way is following.

Just add following code in your functions.php file.


<?php
//The Query
query_posts('posts_per_page=1');

//The Loop
if ( have_posts() ) : while ( have_posts() ) : the_post();

global $post;
$thePostID = $post->ID;
$custom_read_more = get_post_meta($post->ID, 'custom_read_more', true);

if ($custom_read_more) {
add_post_meta($thePostID, 'custom_read_more', 'You need to read this article');  //custom read more value
}

endwhile;
endif;
?>
customize read more for every wordpress post
customize read more for every wordpress post

Now you are set to use the custom read more value for each post. You need to just copy paste the following code in your index.php and page.php and single.php file.

<?php $custom_read_more = get_post_meta($post->ID, 'custom_read_more', true); ?>

<?php if (!$custom_read_more) { $custommore = 'Read More &raquo;'; } ?>

<?php the_content($custom_read_more); ?>

How to add Meta box to wordpress admin post page

This article will tell you about, How to add Meta box to wordpress admin post and page.Use following code and create wordpressapi.php file and upload this file to wp-content/plugins/ folder.


<?php
/*
Plugin Name:  WordPressapi Meta Box
Plugin URI: http://images.purabtech.in/
Description: Adding the Meta box to admin panel -> post
Version: 0.0
Author: WordPressapi
Author URI: http://images.purabtech.in/
*/

function wordpressapi_meta_box() {
add_meta_box(
'wordpressapi',
'Wordpressapi Box', //Meta box title
'write_in_meta_box',
'post' // You can define here where to add the Meta box(post, page, link)
);
}

function write_in_meta_box(){
echo "Wordpressapi is writing something in admin meta box";
}

if (is_admin())
add_action('admin_menu', 'wordpressapi_meta_box');
?>
add Meta box to wordpress admin
add Meta box to wordpress admin

Go to your Plugin tab and activate the “WordPressapi Meta Box” plugin.
After activating the plugin you are able to see the Meta box on post page.