Saturday, May 1, 2010
What is RDFa?
Thursday, January 7, 2010
Saturday, December 26, 2009
A Look at Motorola Droid
Motorola Droid seems to get a buzz around on its arrival into the mobile market...
What is it that makes us think it’s a great gizmo and will it overtake the I phone.
Let’s see some quick fact sheet on the Droid.
- Android™ 2.0
- CDMA CDMA 1X 800/1900, EVDO rev. A
- SLIDER
- Wifi
- GPS
- 5 MP camera
- Email sync
- MSOffice and PDF viewers.
- Close integration with Google apps.
I certainly appreciate that Motorola made it available as unlocked though exclusive offers are given by Verizon.
I like it hoping the price would come down much further to get my own Driod…
This site has an good comparison have a look http://www.infoworld.com/d/mobilize/mobile-deathmatch-motorola-droid-vs-iphone-side-side-875¤t=2&last=1#
Wednesday, June 10, 2009
Advantage PostgreSQL XML power
Monday, August 4, 2008
Get Reviewboard running using apache.
ServerName yourservername
DocumentRoot /var/www/html/reviewboard
ErrorDocument 500 /errordocs/500.html
# Serve django pages
PythonPath "['/var/www/html/'] + ['/var/www/html/reviewboard'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings
SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonAutoReload Off
PythonDebug Off
# Serve static media without running it through mod_python (overrides the above)
SetHandler None
# Alias static media requests to filesystem
Alias /media /usr/lib/python2.4/site-packages/django/contrib/admin/media
Alias /css /var/www/html/reviewboard/htdocs/css
Alias /images /var/www/html/reviewboard/htdocs/images
Alias /scripts /var/www/html/reviewboard/htdocs/scripts
Alias /errordocs/ /var/www/html/reviewboard/htdocs/errordocs
The /var/www/html/reviewboard is the path of the my review board installation and
/usr/lib/python2.4/site-packages/django/contrib/admin/media is the path of the django installation.
Thursday, October 18, 2007
Sethu Canal Project
I would like to express my view on the sethu Canal project (so called Ram Sethu), I neither offend or defend the existence of Ram here. But the political parties mainly caste parties are taking it a issue and everyone including the ruling government is trying to make votes in the election of of it.
Does it not affects the progress of our nation , Are we going to hurdle each projects this way.
We have to think forward, lets for an argument lets take Rama has built that bridge. Wasn't he doing it against the nature that time and what the problem now coming up.
Its all in the minds of politicians to grab votes from the people.
Crores of money will go wasted which have been invested in that so far, who bears the burden , not the politician but the tax payers.
Development projects with a true concerned should be appreciated and carried out without hurdles.
That is the only way to get in the vision 2020.
Friday, August 24, 2007
PHP PDO
Sounds like a catchy word, but true its is a very good module that has been available with PHP 5.
In quick terms I would say this is like a generic odbc database abstraction method, IE you could write applications that can work seamlessly with different databases with it.
Here is the explanation from PHP site
The PHP Data Objects (PDO) extension defines a lightweight, consistent interface for accessing databases in PHP. Each database driver that implements the PDO interface can expose database-specific features as regular extension functions. Note that you cannot perform any database functions using the PDO extension by itself; you must use a database-specific PDO driver to access a database server.
PDO provides a data-access abstraction layer, which means that, regardless of which database you're using, you use the same functions to issue queries and fetch data. PDO does not provide a database abstraction; it doesn't rewrite SQL or emulate missing features. You should use a full-blown abstraction layer if you need that facility.
How to get it
Its available as PECL and also as a PHP module.
The PHP module is best and performance and speed. For configuring goto PHP site
How do I use it
$db = new PDO('mysql:host=localhost;dbname=$database', $dbuser, $dbpass)or
class myclass extends pdo{
function __construct(){
parent::construct(
'mysql:host=localhost;dbname=$database', $dbuser, $dbpass);}
/***
my code */
}
and now
$db=new myclass();
There are three important things in the PDO we need to understand
PDO object
PDO Statement object
PDO Error handler
PDO object is the object we insantiate
ie $db=
new pdo('mysql:host=localhost;dbname=$database', $dbuser, $dbpass);
where $db is the pdo object.
Lets see an example of connecting and updating a record in a table test
$db=new pdo('mysql:host=localhost;dbname=$database', $dbuser, $dbpass);
$db_stmt=$db->prepare("update test set name=:name,address=:address where id=:id");
now $db_stmt is the PDO statement handle.
We had made the sql prepare here this is very effective when you want to update an array of users like
$users=array(
0=>array("name"=>"name1","address"=>"test1","id"=>1),
1=>array("name"=>"name2","address"=>"test2","id"=>2),
2=>array("name"=>"name3","address"=>"test3","id"=>3));
//note you have to
foreach($users as $key=>$user){
foreach($user as $col=>$val){
//bind the value for :name , :address ,:id here
$db_stmt->bindValue(":".$col,$val);
//to my knowledge the bindValue will work for binding all values.
//I see this bindParam is not working for the values in where class
//refer php manual for more options
}
//execute it
$db_stmt->execute();
}
There you go you should have updated 3 records.
you can always execute in the old way of
$db->exec("DELETE FROM test WHERE id=1");
which will return the no of affected rows for this.
Please put comments if you have any doubts.