Archive for the ‘Techie’ Category

IE really Sucks!!!!

Internet Explorer really sucks when it comes to executing JavaScript. I shall detail u d problem as well as d solution {If I find}.

But, for now join me in abusing MS for such a creepy IE stuff :)

Cheerz
SHri

If you are reading article, you might also be interested in the PHP and Scriptaculous Book I have authored.

The book gives you insights about effects, drag-n-drop, slideshows, applications, auto-completion, in-place editing and more. Complete code snippets and explanations.

CHECK out and BUY the PHP and Script.aculo.us book {My Book} at Packt official site
http://www.packtpub.com/php-and-script-aculo-us-web-2-0-application-interface/book

Breaking News!!!!

Read this piece of information Here

DesiMartini.com  has been acquired by Hindustan Media’s Internet group :)

Cheerz to the team @ Desimartini

–Shri

Advanced Word Count for PHP!!!!!

If you have tried counting words in a string in PHP, you sure must have used “explode” function.

Its a pretty simple function and can be used in N-ways. A general simple function can be written as


$String = "This is my blog";
$words = explode(" ",String);
$num = count($words);

Now, this should give you the number of words (4) and following with the count of number of words{This, is, my, blog}.

BUT, the real problem is if your string is “Hello     World”, the number of words here are 7 and count is also 7. How come? THats coz, of the fact the function explode takes delimiter as a space and will count the spaces, commas, etc also as words.

I have found a better way of doing the same. So here I am sharing with you.

Instead use this function, in which we check wheather the word is having any integer, charcter etc in it or not. If its a space we can royally ignore it :)


function wordCount($string){
     $words = "";
     $string = eregi_replace(" +", " ", $string);
     $array = explode(" ", $string);
     for($i=0;$i < count($array);$i++)
   {
         if (eregi("[0-9A-Za-zÀ-ÖØ-öø-ÿ]", $array[$i]))
             $words[$i] = $array[$i];

     }
     return $words;
 }

In this way, we can get the words as the user must have typed omitting the spaces and junk characters.

This function will return you a array of words in the string, and further we can even make it only Words++ to count how many words are there. So this function can actually work for 2 purposes.

1. Count the number of Words in a string
2. Get the words in array

Hope you find this useful.

CHeerz
Shri

If you are reading article, you might also be interested in the PHP and Scriptaculous Book I have authored.

The book gives you insights about effects, drag-n-drop, slideshows, applications, auto-completion, in-place editing and more. Complete code snippets and explanations.

CHECK out and BUY the PHP and Script.aculo.us book  at Packt official site
mybook

http://www.packtpub.com/php-and-script-aculo-us-web-2-0-application-interface/book

Yahoo Open Hackday: Awesome Event!!!!

In this post, I am only talking about the event, my experience and in the next post follows the actual details of the hack!!!! 

I started from my place at 13.00pm, reached Taj Residency @MG Road.

Went upstairs, and Met Joe Arnold, I met him during D-Camp as well. Bhosky was already there. Vibhash, Prashant Mishra, Shourya Sarcar, Yousuf, Bala, Alagu were all there.

Finally around 15:30pm it all started with talks from Chirstian Heilman, Shivku and other folks.

At 1700pm the Hackday began and everyone started working on their hacks.

We formed a team, Me, Bala, Vibhash and Yousuf and after a lot of brainstroming, we decided to work on Yahoo Search Mashup!!!!
<wink>The details follow in next post, with code and demo :) </wink>

We@ Workingworking.jpgwith_heilman.jpgwith_bharat.jpg

While the hack, we even had fun on the IRC Channel. Ventat from Y! even helped us with Y! Answers API.

The arrangements were just perfect from wireless setups to bean bags to coffee to food to drinks to video games to just everything.

During break session, I even met Sidu and we shared some thoughts on Start-ups, Entrepreneurship etc etc. It was informative.

I got even chance to speak to Mr.Bharat Vijay, the man who started Yahoo India operations :)

We had to present our hack in 90 seconds, and everyone showcased the stuff they worked on. I must admit, every idea was brilliant, lot of thought process and hard work behind it. The best part was that everyone present were awake for more than 24 straight hrs and still charged!!!! Amazing, thanks to tons of cofee and Red Bull

We didnt get any prize , but some people appreciated the efforts. We were happy about it :)

During Dinner, I even got a chance to speak to Yahoo’s Co-founder David Fil0. Yusuf quickly catched the moment in the camera. Even, got a snap with Chirstian Heilman as well.

Finally, when the time came to say goodbye, we all got a bean bag from Yahoo as well.

The best part was the gathering of some many talented people under one roof, you interact, you learn so many things and the energy was just flowing all around!!!!

I will soon be updating the post with pictures as well. Next post is abt the Yahoo Search Mash-up we have hacked!!!! So stay tuned.

For complete coverage:
1. Loads of Flickr images
2. List of Winners
3. Developer Network post

One of the best weekend, I have ever spent in my life. Thanks to all the folks at Yahoo!!!!

CHeerz
Shri

PS: Photo courtesy from hackers who have uploaded in Flickr.

HackDay begins!!!!

Me@Yahoo Open HackDay, Taj Residency!!!

And, the hacking begins now….

Cheerz
Shri

Yahoo SDK & YUI are simply awesome!!!!

I must appreciate the fact on how much Yahoo gives freedom and power to developers through libraries and toolkits.

I am currently using YUI and Yahoo SDK for building a small application and I am highly impressed with the libraries.

For sure Y! are doing great job, making our life lil more simpler :)

I have been using some libraries like Rico, scriptaculous, Dojo and trust me when I say, YUI stands tall here.

If you havent tried it yet, get yourself hooked on http://developer.yahoo.com. Loads of tutorials, code, demos. For FREE

Try it now…

Cheerz
Shri

If you are reading article, you might also be interested in the PHP and Scriptaculous Book I have authored.

The book gives you insights about effects, drag-n-drop, slideshows, applications, auto-completion, in-place editing and more. Complete code snippets and explanations.

CHECK out and BUY the PHP and Script.aculo.us book {My Book} at Packt official site
http://www.packtpub.com/php-and-script-aculo-us-web-2-0-application-interface/book

Im coming to Yahoo Open HackDay!!!! R u?

Yup, I am coming to Yahoo Open HackDay. I got a confirmation from Yahoo about this today.

So, now what next? Think of an idea we can build during those 2 days and enjoy it.

I have thought of a small widget kind of an application called “Mini-Yahoo”

If you also have got Invitation for HackDay, please drop me a mail. we can discuss on the idea and build it.

CHeerz
Shri

PS: Did I tell you, hacking in Taj Residency could really be fun!!!!

Yahoo HackDay!!!!!

Yahoo HackDay is on 5-6th Oct 07

Its the first time in India, Yahoo has opened HackDay for everyone.

You can find the details and can also register it here

http://Hackday.org

Cheerz
Shri

PS: Thanks to Alagu for the info :)

Creating cheap Indic web pages!!!

Yes, “cheap” in terms of ease to create a Indic language web pages.

For instance, first have a look at this Yahoo site in Hindi language. That would give a clear picture.

http://in.hindi.yahoo.com

Now, how many apps we have which helps us create simple Indic web pages? Yes, we have enough CMS packages available and great applications like Yudit. But how much easy it is actually?

I figured out it is not “really” simple to do that, simple for me is something which a lay man can also understand and use.

So what can be the solutions for the problem?
1. Create a application like Yudit from scratch
2. Just build a simple Plug-In for the existing CMS editors which can be used with ease and effectively.

I am trying on something which if it works, could add up as second solutions. And, yes it is ofcourse under OpenKey project.

Any other solutions have u tried? or come across which helps u build simple Indic Web pages? Drop in comments and share with us.

Cheerz
Shri

If you are reading article, you might also be interested in the PHP and Scriptaculous Book I have authored.

The book gives you insights about effects, drag-n-drop, slideshows, applications, auto-completion, in-place editing and more. Complete code snippets and explanations.

CHECK out and BUY the PHP and Script.aculo.us book {My Book} at Packt official site
http://www.packtpub.com/php-and-script-aculo-us-web-2-0-application-interface/book

Why should bloggers have all the fun????

And, when I use the word bloggers here, it refers to people who are using http://blogger.com

After the launch of Google indic translator, now bloggers can easily type in Hindi but what about WordPress users? <wink>I perosnally love wordpress platform</wink>

So, now Im trying to create a plugin by integrating my project OpenKey with TinyMCE{ the editor which WP is using}

Yes, we already have one such thing, thats from Indic Joomla group. But that doesnt fill the gap. So Im trying to that :)

For now, you take a look at how it would look when we are using it.

Hindi Text

The picture you are looking at is TinyMCE editor being hacked for indic purpose.

What do u think about it? Would it be useful for u? Drop in ur comments

Cheerz

Shri

Tutorial: How to store UTF8 (indian language) data in mysql?

Well, let me put it straight this tutorial also applies to any other native languages like latin, spanish etc. But, since I have tried for Indian languages I am writing exclusive for it.

Okay, so before we say code I must tell you this tutorial intends, a thought provoking stuff :)

Lately, we have seen enough number of Indic-translators, and you must have got your hands on with typing in ur mail/blog. Now, just think for a while, when u sent a mail, and try to read it back from “Sent Mail”, u still see the indian language or even in that case blog articles. For that case, even in Orkut.

How are they stored inside database? Was what I was trying.

Again, I am not sure for any other DB, I have tried with MySQL. But, I guess should be same.

Quick Explanation:

We assume we have a DB with table articles, and a column named posts, which will save the article written in your blog. Best part, we know that all major DB’s support UTF8. And we shall explore that feature.

Now we write a article in hindi, हेल्लो वर्ल्ड

If the UTF8 is not specified, you should see something like ?????? in ur DB else u shud see the hindi data. Clear? Koool lets see the code

Quick Code:

First check for UTF8 compatibility with this query. If it supports you should see the output as “Character_set_system”| “UTF8″

SHOW VARIABLES LIKE ‘character_set_system’;

Now that being checked, alter the table and just modify the column, Posts in our above example and specify it as UTF8

ALTER TABLE articles MODIFY Posts VARCHAR(20) CHARACTER SET UTF8;

Now, try to insert the hindi value and save it. Query it and u shud see the hindi text :)

We have go ahead and use many other options as well, like Collate etc. But this tutorial intends to keep it simple.

I hope you find this useful and interesting. If you have tried any hacks similar to this, pls drop in comments and share with us.

Cheerz
Sridhar

If you are reading article, you might also be interested in the PHP and Scriptaculous Book I have authored.

The book gives you insights about effects, drag-n-drop, slideshows, applications, auto-completion, in-place editing and more. Complete code snippets and explanations.

CHECK out and BUY the PHP and Script.aculo.us book at Packt official site

PHP and Script.aculo.us Book

PHP and Script.aculo.us Book

http://www.packtpub.com/php-and-script-aculo-us-web-2-0-application-interface/book

Been reallllllly busy!!!!

Last few days, was really busy due to some personal work and above all with my “30-day project” :)

Finally, as it comes close to 15-days now, I thought of writing the update.

Well, today in Cognizant, inter-volleyball competitions are going on, I was passing by. stopped there. Drank 2 RedBulls, eat snacks and yeah ofcourse played volleyball too :)

Dont ask what happened!!! Yes, we lost, and proudly, NOT because of me :)

And, coming back to our mini-hack, its has grown beautifully getting its shape to some useful product.

More about it in next post, but for now, enjoy the snaps of the progress.

Look at this snaps, and u will get a peak idea that, we can have 4 different types of keyboard layouts.

pic

Can u see the hindi keyboard out there? now, even if u dont know how to type, we have keyboard support for you.

pic3

You can actually type or choose from the keyboard as well.

Well, I know ur interested in knowing more about it, so I am in developing it. But wait for the next post tomorrow.

Cheerz
Sridhar

PS: when u take Cabs, u come late, but u have to leave at time :D

30 Day Project : Starts Today!!!

“Leave complex problems to BIG people, try to solve simple-small issues”

Yes, thats exactly what I am starting today. NO big deal. Just simple applications.

To start with today I got hooked with a small problem. So I got this idea.

I wont reveal much of what the app will be, what it shud be, or how I wud be wasting my time :)

The idea is to get something UP & Running,Quickly, very Quickly and then can keep on improving it!!!!

So write to u in detail on 15th September!!!

Keep guessing!!!!
Cheerz
Sridhar

<Hint>No Rocket Science, it has something to do with IndicComputing!!!!! </Hint>

37Signals vs TechCrunch : A Ridiculous debate!!!!!

Michael Arrington of TechCrunch has gone crazy to post such an article attacking 37signals, which has led to heavy debate over web.

The debate is about should software be given free or should be charged?

Michael says it should be free and I guess he probably mis-understood, the concept of 37signals. 37Signals has a array of web based simple applications some of which are free and some of which are paid services.

Yes, you cannot charge every software product, but if some products have extra features, value and above useful stuff. Why wudnt anyone pay?

Give free version of your product, if people like it and find it useful, they would surely want to have a Paid version of the same.

I mean if you cannot ask people to “Pay-N-Search’ but it is not applicable. But, project management suites need more security, features and simplicity. So they can be charged.

What do u think? Should software be free? or charged?

Drop in comments……

<span style=”color:#008080;”><em>If you are reading article, you might also be interested in the PHP and Scriptaculous Book I have authored. </em></span>

<span style=”color:#008080;”><em>The book gives you insights about effects, drag-n-drop, slideshows, applications, auto-completion, in-place editing and more. Complete code snippets and explanations.</em></span>

<span style=”color:#008080;”><strong>CHECK out and BUY the PHP and Script.aculo.us  book {My Book} at Packt official site</strong>
<a title=”PHP and Scriptaculous Book” href=”http://www.packtpub.com/php-and-script-aculo-us-web-2-0-application-interface/book”> http://www.packtpub.com/php-and-script-aculo-us-web-2-0-application-interface/book</a></span>

How to learn Programming????

Most of the time, I hear people saying I am NOT good at programming but at “XYZ”, yes this is completely okay, but if you have some inclination towards learning programming or be a good programmer, here are few simple tips, I follow them so I thought I would share with you pals.

1. Join some Developer Network.

With lot of developer network platforms, half-of the work of the developer is already done and distributed in the form of “Packages”.

Im hooked to Yahoo Developer Network, for many reasons. One, it supports all the languages be it .Net, Java, PHP, Python etc etc.

More reasons for using any Developer Network, I can feel are

1. Cross Browser compatibility, one doesnt have to worry about the small issues of browsers

2. Loads of tutorials, code and examples

3. Forums and discussion boards

You can even learn a lot by looking at the code, examples and tutorials.

Some of the developer networks available are

1. Yahoo Developer Network

2. Google Code

3. Facebook Developer Network

4. Script.aculo.us Network

If you have used or know of any other developer network, drop in comments.

Cheerz

Next Page »