iGeek Blog

Jignesh Patel's Blog

categories

recent posts

recent comments



Its the last day of the year 2008. I m confused, I should be happy or not!
So many things happened for me in the last year. Some of the things from those, I will not get in future.. that's sure. If today one can restart the year 2008, I will be agreed. Doing that I want to enjoy it again, want to fix the mistakes I did in that span of a year. But unfortunately, its not possible.

Today I want to decide, anyhow I will make the year 2009 more enjoyable than the 2008 for me. Bye.. 2008..

Welcome.. 2009. Let me be a part of all happiness you going to give you the world.

Its simple and sober to assign value to a variable in Smarty. However assign an array to a variable in .tpl file is not simply available. You can create ab array in PHP and assign it to the variable to be used in smarty template, but its on PHP side.

But what if you want to do something like this ?

{assign var=$col_width value=array('2%','10%','17%','13%','20%','10%','19%')}

No, we cant do that. For doing the same thing you have to put a compiler.set.php file inside smarty directory. Can be downloaded from here : http://smarty.incutio.com/?page=set
Put it here: smarty/libs/plugins

To create array use the syntax below:

{set var=$col_width value=array('2%','10%','17%','13%','20%','10%','19%')}

Today.. is my day, its my birthday. And I'm happy. The reason is obvious.
But another reason for being happy is the PC release of Grand Theft Auto 4. Yes Its going to be launched on 18th Nov 2008 in North America. I'm waiting for it. Yes, I'm a big fan of the GTA series of games. Now let see in how many days I will get it in India. Cheers.. :)

Congratulations Obama, and America! Obama has been elected the 44th President of the United States. American Dreams will be fulfilled by Obama, dont know very well how, but world is talking like that only.

As I am in IT field, I am interested to know how he will be beneficial to me. Comprehensive immigration reform, including the H1-B visa programme will be a ‘top priority’ of the Barack Obama administration, the Democratic presidential candidate has said. But still the issue of H1-B visas not cleared.

As he said, "I will support a temporary increase in the H-1B visa program as a stopgap measure until we can reform our immigration system comprehensively." He has also talked about creating more jobs for American workers here at home.

Asked about his views on the demand to increase the number of H1-B visas by several US companies including Microsoft, Mr. Obama said he supported comprehensive immigration reform to attract some of the world's most talented people to America.

I'm confused, whether he is beneficial for people like me, who wants to go US for $s.

It took not more than 10 days to decide the shifting the Nano plant from Singur(WB) to Sanand(GJ). All it happened because of a bit effort shown by the CM of Gujarat, Narendra Modi. It was just an SMS.. "Swagatam" by CM to TATA, which leads TATA motors to Gujarat for setup of the Nano car plant.
The Nano project will open the gateway to global invest-ments in manufacturing, engineering and automobile sector, will create about 1500 jobs. Nano is just beginning, will see more business houses following the same.

Congratulations NaMo.. Congratulaitons Gujarat.

There are many tools & scripts providing exporting MySQL Data to Excel files.
But when it comes to export only database tables structure, in other words design, at least I failed in finding such tools or scripts.

As a developer, I always need to provide DB Structures along with all table names with their fields & types as well. So I have to make the .xls file for that manually. So we know that, every project will require those things. Sometimes its pathetic when we have large no. of tables.

As a solution, I made a web based tool or say script, which can be used to export MySQL DB Stucture to .xls file. I named it "Export MySQL DB Structure to Excel" .

First release on sourceforge.net can be download from the link below:

https://sourceforge.net/project/showfiles.php?group_id=236953

tsclient (Terminal Server Client) is a tool for rdesktop and other remote desktop tools.
It is a GNOME application. Its options include color depth, screen resolution etc.

To open tsclient's GUI, press Alt+F2, In the 'Run Application' box, enter 'tsclient' and press enter. That will open a tsclient's GUI.
Under Display tab These are default screen resolutions, you can set.
640 x 480, 800 x 600, 1024 x 768, 1152 x 864, 1280 x 960, 1400 x 1250
Full screen mode is also supported.

I'm using thin clients running Ubuntu feisty 7.04. I need to connect to Windows machine running Windows Xp. I'm working on 1280 x 768 resolution on my thin client. I also need the same resolution on tsclient.
So I need is custom resolution settings in tsclient.
I googled for it & I found something helpful.

Open a Terminal windows, and type:

rdesktop -g 1280x768 -a 24

You will get 1280 x 768 screen resolution on tsclient.

For more options type:

man rdesktop

Last Monday, Ashok sir took a very good session on 'Effective Time Management'.
One of the key things he explained was about 'Important Urgent Matrix', also called 'The Time Management Matrix'.
Currently I have started categorized my weekly tasks with this matrix.
As per the matrix, Tasks you have decided or assigned can be categorized as urgent or not urgent & important or not important. So we have 4 quadrants.
Now its up to you to choose the perfect quadrant for each task you decided to do.



Few examples for each quadrant.

Quadrant 1: Crises, Projects with short deadline
Quadrant 2: Planning, Recreation, Analysis
Quadrant 3: Interruptions like phone calls, Replying emails, Some meetings
Quadrant 4: Some time-pass mails, Chatting, Watching meaningless TV Shows, In short all the things which wastes your valuable time.

Based on The Seven Habits of Highly Effective People (1989) by Stephen R. Covey

Are you a Web Developer?
We know that, there are so many web developers, who called themselves master of web technologies or they consider themselves the best.
But the real thing is.. if you are a web developer, you must be having the knowledge of these web techniques.
Amit Kumar Singh, project manager at 'Pune IT Labs' is saying about the 5 key skills of a successful web developer. I just read that, let me tell you all that in very short and I also added few things from point view as well.

  • Layout of site : HTML
  • Look n feel of site : CSS
  • Client side scripting : JavaScript
  • Database : SQL
  • Server side scripting language
HTML

Front-end of most of the site is because of HTML only. Website is nothing without proper look n feel & proper layout. May be server side scripting is optional, but HTML is must.
If you only know about only 'tr', 'td' tags, that's not enough. Get a look into 'div's as well. Follow the w3C standards for HTML or XHTML.

CSS

The design of the website, made using CSS. There are lots of attributes in CSS. Get a knowledge of the basic CSS applications. Also make sure you understand the browser capabilities as well.

JavaScript

Doing anything dynamically on client side needs JavaScript. In old days it was used only for the purpose like alert, open pop-ups, animate mouse etc. But these days, there are the lot many JavaScript frameworks in market. You will hardly find a popular site, which is not using any JavaScript framework. You, as a web developer might have used or at least heard about Ajax. Its in JavaScript only.
Another thing that you should keep in mind is, the DOM (Document Object Model). Just go through it. JavaScript is much easy if you know the DOM very well.

Database

Database driven sites are common now a days & since long. Yes, as a web developer you are knowing the basic thing of SQL. Be a master of not only SELECT, UPDATE queries, but also of Database design as well. Implement Stored Procedures if required, and the most important thing Joins.If you know the Joins, you can reduce the number of database calls.

Server side scripting

I don't want to tell more here, because you already doing these. PHP is my favorite language, so I will tell you all here in terms of it. Make sure you must be having the basic knowledge of core of the languare. Because most of the people are using frameworks from starting of the career. So they never have to look into basic syntaxes.

Rank yourself out of 10 for each of the above skill, then consider yourself, whether you are a successful web developer.

Ahmedabad, the economical capital of Gujarat was hit by series of more than 17 bomb blasts on Saturday, Jul 27, 2008.

Few minutes before the blasts.

Around 6:25 pm, Shailesh called me, "What you doing yaar, lets have some snacks, I'm hungry."
"I'm sleeping, let me sleep", I replied on the phone.
"Ok, I will be at your home, after few minutes.", he said.
I told him. "k, fine, come after 10-15 minutes, I'll be ready."

"As I need to fix my spectacles' frame, lets have some snacks, & after that we will go to the the "Drashti chasma ghar", I told him.
He said, "OK".

On the bike, We about to reach 'Karnavalti vada-pau', near the location of first blast and suddenly bike started coughing, Shailesh found that the bike was in reserved. He told me to give some fuel for the bike first. I agreed & he changed the path towards the patrol-pump instead of 'Karnavalti vada-pau'. We went through Lilanagar, the area was normal as usual. Patrol-pump was in totally different direction from the 'Drashti chasma ghar'. I don't know why, but now Shailesh was not in mood to go to the pump. He turned the bike towards Thakkarbapa nagar. As we reached there, the area was crowded with lots of people near 'Kuldevi Tea-stall'. Also more and more people were rushing to the location. But we thought, there might be small issue between some people & they were fighting. So we reached to the shop of spectacles, I gave my spectacles to the person in the shop. Inbetween, people inside the shop were talking about the crowd, they told me, there was a bomb blast there. In just 2 minutes the person fixed my specs & returned me.

Now we were outside the shop, on the main road, everybody talking about the blasts, somebody told us there were blasts near 'Sardar Patel Diamond Market' & in Sarangpur area as well. I called my dad on his cell, but the line was jammed. So I called on land-line phone at my home. I told about the blasts to my mom, as she wasn't aware about the blasts.

We left the bike there only, and started a walk towards the 'Kuldevi Tea-stall' with the people, as road was blocked for the vehicles. We reached the sight of blasts. This was the place, at which me & my friends enjoyed Tea lots of time. But this time, Terrorists enjoyed the blasts over there. Police pulled the people back, so we also had to pulled ourselves back & we left the place. We were eager to know about the other blasts near 'Sardar Patel Diamond Market'. We decided to go over there on the bike. We reached near that, but road was blocked. Now, instead of going anywhere, we decieded to go home. So we had to choose the long path which leads towards our home. At about 7:10 pm we reached the home. At that time news channels were giving news about 5-6 blasts in Ahmedabad.

At the end of the day, figure of blasts reached to 17 and death toll rised to 40.

4 of the total blasts were in Bapunagar area only, In which I live.

Two blasts were outside the main building of 'Sardar Patel Diamond Market', which you will find always crowded with diamond merchants. After the first blast at this location, police found a live bomb & was trying to take the people away from it & suddenly it blasted, but luckily nobody injured.
Other two blasts were near 'Kuldevi Tea-stall'.
Another live bomb was found in Lilanagar, which is a sub-area of Bapunagar, luckily it was defused.
All three locations I mentioned above are just few meters away from my Home. Its like, these locations are on the perimeter of a circle and I live in the center point of that circle.

Not only me, nobody in Ahmedabad can forget this evening.

Here are some differences, I noticed between Bill Gates & Steve Jobs.

Bill Gates Steve Jobs
He is a PC He is a Mac
He does rethinking after launching new product He does inventive thinking, then launch new product.
Always try to add cool features to pathetic old things Always find new cool things
Presentations

He wears Suit with Tie and well polished shoes or wears Sweater in cold.He always wears cool black jersey with full sleeves, blue denim jeans and sports shoes
His speech is more vague and filled with abstractionsHe's relaxed so the audience is relaxed
His slides contains lot many characters and small images His slides contain very less no. of characters and bigger images
Uses Blue, Green, Yellow etc. colors in slides.Uses White and Black & Blue colors mostely
Uses terms like "rich capabilities," "rich fonts," "rich way".Uses terms like "cool way," "cool features", "amaizing..".
Drinks water in a glass. He puts the neck of a sports water bottle in his mouth and drinks water
Others
Has a home with lots of Windows His Home, may be called iHome with no Windows
Has windows explorer, can run on Mac, in which Bill gates can hide himself. Has a Finder which can find Bill gates as well.


If you know more or want to share more, post your comments.

Freedom Writers, after very long time I watched a movie, which touched my heart. Especially, the way Hilary Swank teaches her students, actually the gang members.

Movie is based on true story of a young teacher, Erin Gruwell, teaches in Wilson High School in Long Beach, Calif. A recent college graduate, Erin landed her first job in Room 203, only to discover many of her students had been written off by the education system and deemed “unteachable.” As teenagers living in a racially divided urban community, they were already hardened by first-hand exposure to gang violence, juvenile detention, and drugs.

Its a must watch movie for those teachers who are willing to provide & contribute something valuable.
After watching a movie, my friend told me, "I feel tears in my eyes while watching the movie".
I liked the sound tracks as well of the movie.

Wanna get fresh vegetables & fruits directly from farms? How far the farm is, if you live in the forest of cement & concrete?
What if skyscrapers nearby provide you all that things?

Yes, in near future you will be able to find & get the fresh fruits & vegetables just few steps away from your home.

Dickson Despommier, a professor of public health at Columbia University, has thought about a project, “vertical farm,” a concept he created in 1999.

Here are some concept pictures.



Finally, iPhone will be launched in India by October/November '08.
I was amazed when I heard the price that won't be more than $199 (across 70 countries worldwide), although you wont get it in that amount, you will have to tie up with your service provider. In India, Vodafone is going to launch it with minimum plan of around Rs. 23,000 with 2 year subscription.

As Steve Jobs said in recent WWDC, Price was the major factor for the people who didn't buy the iPhone in the countries where iPhone launched. So Apple slashed the price 50% less!

But.. will we the new iPhone 3G with all the feature & accessories provided with previous version of iPhone (iPhone EDGE), thats the big question.

Lets hope in India, we will get the same as we can see in this video
Lets unpack the iPhone.


What you will need to setup Subversion on windows

Install Subversion


Download the subversion installer for Windows from: http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91

I installed the version 1.4.6, you can download the same or 1.4.5 or 1.4.4 also.

Run the installer, and install the subversion on your local machine.

To hold your repositories you will need to creatd a folder anywhere in your machine. I created the folder here: 'e:\subversion

Install svnserve as a Windows service


To install svnserve as a service, which allows it to run in the background automatically on start-up, download SVNService from:

SVNService.exe

Just copy SVNService.exe file into 'bin' directory of Subversion's install directory.

I installed subversion in 'C:\Program Files\Subversion'. So I copied 'SVNService.exe' to 'C:\Program Files\Subversion\bin'

Open comman prompt.

In order to customize the root directory from which svnserve will serve the repository, I provided the parameters as 'e:\subversion', which was my repositories folder, you can replace it with your repositories folder. Type in command prompt:

svnservice -install -d -r e:\subversion

To start the service with in windows startup, set the service start to 'Auto'

sc config svnservice start= auto

To start the service immediately

net start svnservice


Add an environment variable for SVN_EDITOR. You can do this by right-click on my Computer > Properties. Go to advanced. Hit the Environmental Variables button. Just add another in there called SVN_EDITOR with a value of C:\windows\notepad.exe

Create a project


To create a new project in svn enter the following command. I created 'firstproject' as new project

svn mkdir svn://localhost/firstproject


At this point, Notepad should launch:

Simply exit the notepad.


Congo! You just created a new project into Subversion!

Test the new service by listing all the files in the repository:

svn ls svn://localhost/


Checkout your project


To checkout firstproject from svn repository, you will need a svn client like 'Zend Development Environment'

If you already installed the Zend, follow the steps below:

Open Zend.

In Menu bar select Tools » Preferences. Select 'Source Control' tab.
Select 'Source Control Tool' as 'Subversion' from the combobox.

Under General Settings select the 'Path to SVN', browse for the location of 'svn.exe', where you installed the SVN.

I browsed for "C:\Program Files\Subversion\bin\svn.exe". Press OK.

Now we will create a new project in Zend, in which we will checkout the project 'firstproject' from SVN

To create a new project in Zend,
select Project »New Project. It will open a New Project Wizard.



On the first screen enter the name of your project. I entered 'firstproject'. Press 'Next'.

On the second screen, Add path by pressing 'Add Path' button, select the location of directory where you wish checkout the files from 'firstproject' from SVN repository. I select 'C:\firstproject'. Click Next, nothing to do on third screen, click Next. on the fourth screen, click Finish.

Now its time to checkout a project from from SVN repository.

From Menu bar, select Tools » Subversion » Checkout

Enter the 'Module URL' as shown in image below & select 'Working directory' (which is the root path of your Zend project 'firstproject'). Press OK.



Congo! you have checked out 'firstproject' from SVN repository.

So many Firefox extensions are doing the same thing which I have just made. And its about downloading YouTube videos.
I made a PHP script to download YouTube videos. Thanks to Open Source Communities, from which I taken some part of script. I just implemented it on the site below.



Visit : YouTube Video Downloader

Just enter the YoutTube video URL as mentioned there.
By default you will be prompted to save video with name 'get_video' with no file type specified. Just change the file name to 'get_video.flv' to save it as flv file.

The Indian Skyscraper Race is ON. India’s tallest commercial skyscraper planned in Gujarat.
The latest project named Gujarat International Finance Tec-City (GIFT), is planned , located at Gandhinagar, the capital city of the industrial Indian state of Gujarat, and nearby the state’s commercial capital of Ahmedabad.
These are some of the Information about proposed GIFT.

  • GIFT city will have 312 large buildings
  • More than 40 buildings will have 50 floors
  • The tallest building, being the signature 86-storey, 405 mt (1,328 ft) “Diamond Tower"
  • Another tower, the Gateway building will have 75 floors while the 65-storey Crystal Tower.
  • An artificial island
  • Integrated mass transit and dedicated expressways
  • Residential townships
  • Creation of 5,00,000 (approximately) direct and indirect jobs
  • Total Investment: 70,000 cr, Area: 500 HA



The 500 acre GIFT aims to be Global Financial Services hub.

Here are some pictures..


Diamond Tower: Tallest tower in GIFT





Fun Fridays at Magnet are always great. But this time it was extreme, as the Dance Competition was organized.
Most of us don't know dancing, but we can. The theme was 'Back to 70s', then how we can do it, in damn Couple Dancing?


Nidhi & Padma




Shailesh & Minal




Anil & Shruti




Jaldip & Maitry




Jignesh & Bhakti




Vandit & Twinkle



The largest Indian telecom company, BSNL is planning to build a mobile WiMax network covering three states on the subcontinent capable of serving 250 million people.
State-owned Bharat Sanchar Nigam Limited is leaning on Soma Networks to build the broadband-speed network in response to government requirement that 20 million broadband lines be in service by 2010.
The WiMax rollout will first hit the largest and most-connected states, but BSNL is planning on extending the network if things go well. When it's done, 400 Indian cities will be covered, with downstream speeds of 1.5 megabits per seconds. No word on when that might be, but the race is officially on, Sprint.

On the 19th & 20th of January '07 Ahmedabad Magneteers were in Mumbai to attend a wedding of The Chairman of Magnet, Nirav Mehta. Wedding was on 19th.
On 20th we just hanged out there with a bit of planned plan.

Snaps are here..


These are the videos, taken while Steamer Ka Safar started from Gateway of India.





The Crunchies is an internet and technology competition without geographic boundaries. No companies are restricted from consideration. Certain awards have specified criteria (i.e. best unfunded start-up or best start-up launched in 2007) but, otherwise, all companies and products are eligible for consideration based on their business accomplishments made during calendar 2007.

Best Overall: Facebook

Facebook revolutionized the idea of what social networking could be.

Best technology innovation / achievement:
Earthmine

Earthmine picks up where Google Earth leaves off, bringing deep semantic data to 3D panoramas of the real world. Earthmine’s system can keep track of the objects found in the real world and attribute information to each of them, such as latitude, longitude, elevation, and other attributes.

Best Clean Tech Startup: Tesla Motors

Tesla’s green sports car has captured the imagination of a public who had come to expect electric cars to be dull are boring. Due to be released this year, the company has pre-orders from some of the biggest names in Entertainment and Technology.

Best video startup: Hulu

Hulu put television online. Their broadcasting system was modeled on the success of social video sites and drawn the praise of its previous critics.

Best user-generated content site: Digg

Digg’s simple voting system defined the emerging social media revolution. Getting “dugg” quickly became a badge of honor and established a coveted place in the geek lexicon.

Best mobile start-up: Twitter

Twitter, the new addictive microblogging platform. It wasn’t until after the South by Southwest conference that people realized the value of the incredibly simple microblogging platform.

Best International startup: Netvibes

Based in London, Tariq Karim and Freddy Mini’s Netvibes has made waves in the U.S. as a top personalized web portal.

Best consumer startup: Meebo

Meebo made instant messaging ubiquitous by bringing it online. They then developed it into a platform where anyone could add chat to their applications.

Best enterprise startup: Zoho

Zoho’s comprehensive online suite of 14 business applications ranging from document editing to CRM continues to lead the way in the move away from desktop computing to working in the cloud.

Best design: SmugMug

SmugMug is professional photo site. SmugMug’s attention to detail and design can command as much as $150 per year from their users.

Best new gadget/ device: Apple iPhone. See the Apple acceptance speech here.

Best business model: Zazzle

Looking for a Star Wars hat or memorable mug? Zazzle is an on-demand factory of consumer goods for top brands. It also lets consumers become producers by uploading their own images onto that T-shirt, mug, or mousepad. . Consumers can also receive a commission on products that they sell and design themselves

Best bootstrapped startup: Techmeme.

Founded and developed solely by Gabe Rivera, Techmeme serves as the front page of the tech blogosphere. The site’s advanced algorithms identify the day’s top stories by making sense of conversations across the web’s best blogs.

Best Startup Founder: Mark Zuckerberg (Facebook)

Does this really need any explanation? At 23 Mark has built one of the world’s leading online destinations that has recently been valued at $15 billion. A remarkable achievement for anyone, let alone someone at the still relatively young 23. A well deserved award.

Best Startup CEO: Toni Schneider (Automattic)

Schnieder has lead the company from its roots as a open source alternative to Movable Type into a multi-million dollar enterprise that saves the world from blog spam and offers a free hosted blogging solution that competes with Google’s Blogger.

Best new startup: iMedix

iMedix combines search and social networking to change the way people find health information online. Users are encouraged to help each other by sharing health experiences and links from around the web.

Most likely to succeed: Automattic (WordPress)

The open source blogging platform that powers the long tale and turned into a multi-million dollar spam fighting and hosted blogging service.

Best use of viral marketing: StumbleUpon

StumbleUpon’s service lets users bookmark and discover new sites they love. With only a $1.5 million investment in 2005, StumbleUpon gew to over 4 million Stumblers and was bought by eBay in 2007 for $75 million

Best time sink site: Kongregate

CEO Jim Greer describes Kongregate as XBox live for casual games. This site hosts some of the webs most addictive casual games. Remember Desktop Tower Defense? Moreover, the games are not only played by users, but also created by them in exchange for a share of advertising revenue and other rewards.

Most likely to make the world a better place: DonorsChose

DonorsChoose.org is dedicated to connecting classrooms in need with individuals who want to help.


I found website named Quotes DB, where u can find some useful, funny & interesting talks done on internet.
It allows you to submit your talks.
Quotes DB is a database of talks, chat logs.
Visit here : Quotes DB

I found a PHP code sample that somebody had written as following line of code:


   1: <?php
   2: System.out.print($result);
   3: ?>

What you say about that code ?
This actually works in php. It will not print anything, but It doesn;y produce any error.
It just sees them as constants which do not exist and are interpreted as strings, and apparently, this is a valid PHP statement as well:

   1: <?php
   2: "this"."is"."a"."string";
   3: ?>

My friend Jignesh Thummar forwarded me a link of Presentation on 'Getting Rich with PHP 5' by Rasmus Lerdorf, the founder of PHP at O'Reilly's Open Source conference.

The Slides available online here.

This is one of the video taken during Sari & Tie wearing game on the Monday Blast 2007 at Magnet.



This video was taken on one of the Fun Fridays we have in Magnet.
Pumping the Balloons..Game

me

Hello,
I am Jignesh Patel, a Web Developer based in India.
About Me

Feeds RSS Feeds RSS