Who is Anna Hazare ?

1. Who is Anna Hazare?

An ex-army man. Fought 1965 Indo-Pak War

2. What’s so special about him?

He built a village Ralegaon Siddhi in Ahamad Nagar district, Maharashtra

3. So what?
This village is a self-sustained model village. Energy is produced in the village itself from solar power, biofuel and wind mills.

In 1975, it used to be a poverty clad village. Now it is one of the richest village in India. It has become a model for self-sustained, eco-friendly & harmonic village.

4. Ok,…?

This guy, Anna Hazare was awarded Padma Bhushan and is a known figure for his social activities.

5. Really, what is he fighting for?

He is supporting a cause, the amendment of a law to curb corruption in India.

6. How that can be possible?

He is advocating for a Bil, The Lok Pal Bill (The Citizen Ombudsman Bill), that will form an autonomous authority who will make politicians (ministers), beurocrats (IAS/IPS) accountable for their deeds.

7. It’s an entirely new thing right..?

In 1972, the bill was proposed by then Law minister Mr. Shanti Bhushan. Since then it has been neglected by the politicians and some are trying to change the bill to suit thier theft (corruption).

8. Oh.. He is going on a hunger strike for that whole thing of passing a Bill ! How can that be possible in such a short span of time?

The first thing he is asking for is: the government should come forward and announce that the bill is going to be passed.

Next, they make a joint committee to DRAFT the LOK PAL BILL. 50% goverment participation and 50% public participation. Because you cant trust the government entirely for making such a bill which does not suit them.

9. Fine, What will happen when this bill is passed?

A LokPal will be appointed at the centre. He will have an autonomous charge, say like the Election Commission of India. In each and every state, Lokayukta will be appointed. The job is to bring all alleged party to trial in case of corruptions within 1 year. Within 2 years, the guilty will be punished. Not like, Bofors scam or Bhopal Gas Tragedy case, that has been going for last 25 years without any result.

mysql error while executing propel:insert-sql in symfony 1.4

[propel-sql-exec] SQLSTATE[42000]: Syntax error or access violation: 106 you have an error in your SQL syntax; check the manual that corresponds to you
server version for the right syntax to use near ‘Type=InnoDB’ at line 16
>> propel Running “insert-sql” phing task
[propel-sql-exec] Failed to execute:

CREATE TABLE `tblName`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`description` TEXT,
`image` VARCHAR(255),
`created_at` DATETIME,
PRIMARY KEY (`id`),
)Type=InnoDB

[propel-sql-exec] SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘Type=InnoDB’ at line 16

Some problems occurred when executing the task:
If the exception message is not clear enough, read the output of the task for more information
>> file- D:/xampp/htdocs/s…1_4/config/generated-schema.xml

The solution to this is
Edit the file D:/xampp/htdocs/symfony_1_4/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/classes/propel/engine/builder/sql/mysql/MysqlDDLBuilder.php
Line 156, change
$script .= “Type=$mysqlTableType”;
to
$script .= “Engine=$mysqlTableType”;

London shop to make breast milk ice cream

Women breast milk ice-cream
LONDON (Reuters Life!) – A specialist ice cream parlour plans to serve up breast milk ice cream and says people should think of it as an organic, free-range treat.

The breast milk concoction, called the “Baby Gaga”, will be available from Friday at the Icecreamists restaurant in London’s Covent Garden.

Icecreamists founder Matt O’Connor was confident his take on the “miracle of motherhood” and priced at a hefty 14 pounds ($23) a serving will go down a treat with the paying public.

The breast milk was provided by mothers who answered an advertisement on online mothers’ forum Mumsnet.

Victoria Hiley, 35, from London was one of 15 women who donated milk to the restaurant after seeing the advert.

Hiley works with women who have problems breast-feeding their babies. She said she believes that if adults realised how tasty breast milk actually is, then new mothers would be more willing to breast-feed their own newborns.

“What could be more natural than fresh, free-range mother’s milk in an ice cream? And for me it’s a recession beater too — what’s the harm in using my assets for a bit of extra cash,” Hiley said in a statement.

“I tried the product for the first time today — it’s very nice, it really melts in the mouth.”

The Baby Gaga recipe blends breast milk with Madagascan vanilla pods and lemon zest, which is then churned into ice cream.

O’Connor said the Baby Gaga was just one of a dozen radical new flavours at the shop.

“Some people will hear about it and go, ‘yuck’ but actually it’s pure, organic, free-range and totally natural,” he said. “I had a Baby Gaga just this morning and I feel great.”

(Reporting by Paul Casciato; Editing by Steve Addison)

How to check if requested url exits or not

$requestedUrl = “http://www.example.com/abc.php”;
$tags = get_headers($requestedUrl);
if(preg_match(“/Not Found/i”,$tags[0]) || preg_match(“/Service Unavailable/i”,$tags[0]))
{
echo “Requested Url does not exists”;
}
else
{
echo “Requested Url exists”;
}

select multiple column from multiple table in cakePHP

$markers = $this->Post->find(‘all’, array( ‘joins’ => array(
array(
‘table’ => ‘cp_user’,
‘alias’ => ‘users’,
‘type’ => ‘left’,
‘foreignKey’ => false,
‘conditions’=> array(‘Post.postauthor = users.id’)
)
),
‘conditions’=>’Post.poststatus = 1’,
‘fields’=>array(‘Post.postid’,
‘Post.postdate’,
‘Post.posttitle’,
‘Post.postmessage’,
‘Post.poststatus’,
‘Post.commentstatus’,
‘Post.commenttotal’,
‘Users.id’,
‘Users.firstname’
)
)
);

$this->set(‘cp_post’,$markers);

This will generate the below query in mysql
—————————————————-
SELECT `Post`.`postid`, `Post`.`postdate`, `Post`.`posttitle`, `Post`.`postmessage`, `Post`.`poststatus`, `Post`.`commentstatus`, `Post`.`commenttotal`, `Users`.`id`, `Users`.`firstname` FROM `cp_posts` AS `Post` left JOIN cp_user AS `users` ON (`Post`.`postauthor` = `users`.`id`) WHERE `Post`.`poststatus` = 1

export data to excel file (.xls format)

By using the below code you can export your data from the database to excel file.
When you run the below code, the excel file get generated and get downloaded to the client machine.

How to fetch multi-lingual content from database

The basic purpose of this post is to guide you all about fetching multilingual content from database.
I mean to say that, if you have stored japanese text in your database, So in order to fetch the japanese content , you need to set the character encoding to UTF-8 format, while communication with the database for fetching the result.

In Case of MYSQLi

query(“SELECT ColumnName FROM tableName “)) {
printf(“Select returned %d rows.\n”, $result->num_rows);

/* free result set */
$result->close();
}
$mysqli->close();
?>

In case you are using multiple database

If you don’t pass in “true” to mysqli_connect() in the example below, $link1 and $link2 will have the same resource id# and both database connections will end up being set to utf-8 charsets.

How to use FCKeditor in symfony

1. Download the FCKeditor source from http://ckeditor.com/download

2. Extract the source to /web/js/ directory of your symfony project directory

3. To use the editor in symfony, add (edit if present)the below line //config/settings.yml

.settings:
rich_text_fck_js_dir: js/fckeditor

4. You have to edit /web/js/fckeditor/fckconfig.js

var _FileBrowserLanguage = ‘php’ ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = ‘php’ ; // asp | aspx | cfm | lasso | php

Depending on the technology you are using you have to set the above two parameter

5. In newer versions of FCKEditor you also have to enable the PHP connector in file /web/js/fckeditor/editor/filemanager/connectors/php/config.php on line 28, and also set your upload directory (on line 32).

$Config[‘Enabled’] = false;
$Config[‘UserFilesPath’] = ‘/uploads/assets/’ ;

You can set the UserFilesPath to whatever folder you want to store the uploaded file

6. Now you are ready to use the fck editor in your page

$options = array(
‘rich’ => ‘fck’,
‘height’ => 500,
‘width’ => 500,
);
echo textarea_tag(‘inputname’, ‘Lorem ipsum’, $options );

Thats All 🙂