Archive | Techie RSS for this section

Hello BLR-DEL-LON-DOH-NYC!

God it’s not a spam post!

There has been quite a lot of things happenings and life has been on a fast track so much that the title you read are the places I was all around.

And currently I am in New York City, to be precise Wall Street 😉

So its going to be a long, long, I really mean very long post.

Let me know are your ready? Got your coffee? Great…Just hang in there!

 

 

 

I am Alive ;)

The title says it all. And I promise I will try to be more frequent here.

Expect some good write-ups, experiences some good, some not-so-good soon.

It’s show down for the year 2014.

Keep hope. Keep praying.

Luv,
Shri

Wecome Home, Pratyush.

Its been a while I got time to jot down things happening around…so many things happened and in such fast way…cudnt account one!!

But gud news first…I am a proud MAMA…of my boy…Pratyush…Welcome home, buddy!!!

On other side, granny passed away, dad was not well…things were not dat great…but hope things will fall in place.

Its taking some toll on me…on more  gud news..stay tuned 🙂

Praying Lips…..Helping Hands….The story goes on….

I have many friends.

Some Muslims, some Hindu, some Sikh, some Rajasthani, Tamil, Telugu, Bengali and  some pakka Marathas.

I am kind of fusion. Telugu guy born in Orrisa, bought up in between Maratha’s and formative years of my life in between Punjabi’s.

Studied in Chennai between majority of Tamil speaking folks. Working and living between Kannadiga’s from 6 years.

Who am I? I don’t know.

Over period of time, living with different sects and religion, I have learned that

  • No religion is bad
  • Every religion teaches to do “seva” {community service}
  • Spread peace and love. Need comes pick up sword.
  • Just coz u don’t like non-veg, doesn’t make you any veggie
  • And, non-veg price has gone high coz, Brahmin, like me eat all kinds of things walking, crawling, or whtvever.

Plus just remember, a helping hand is always better than praying lips.

If you can serve or contribute anyway, step up, coz it’s not about only you.

It’s about who we are. And how we will be treated next.

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;  } [/sourcecode] 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