Rob Cheng's Blog

Importing Excel CSV’s using PHPMyAdmin

I have developed some new technologies for the web site which enables a dynamic slide show to be displayed through some simple SQL calls. The one thing that I have learned about importing CSV files is that it is far from easy. While trying to solve these problems, I did a lot of queries and again there was little to no solutions on the web. So in addition, to my last article, here are two more common problems and solutions when importing CSV files using Microsoft Excel.

Problem One

Excel Extra Commas in the CSV file

This problem was driving me nuts. Excel puts random commas in a CSV file. Guess what happens when you have extra commas in a Comma Separated Values File? It crashes and does not import. Google search shows that the common fix is to review the file for extra commas and edit them out manually. Since my database is now fairly big, this was not an option. There were literally thousands of extra commas that had to be edited out.

What’s the solution? Don’t use Excel. I started using Open Office and it does not have the same bug. In fact, I am going to start using Open Office as much as possible to see how difficult is the learning curve. Note: Excel has another bug, where it does not put the double quotes around certain text fields.

Problem Two

Be Careful with Character Sets

My database is stored in Latin_Swedish. This is very important to me, because I use foreign characters in my database and in my blogs. Characters such as é,ç, and ê. In order for this to work correctly, you have to be very consistent when importing your CSV’s or none of your foreign characters will be displayed in the database correctly. Instead of the foreign character, it will be stored with a ?.

The solution is simple. When importing the file, make sure you choose the proper character encoding. PHPMyAdmin defaults to UTF8, and then in my case, was the source of losing all my precious international characters.

I hope these two tips helps someone out there.

My First Political Cartoon

I really love ToonDoo. It seems to be a great outlet for my creative energy. I decided to make a political cartoon and go on record that I am an Obama supporter. To be honest, he is the only one of the candidates that does not insult my intelligence. So I decided to make fun of all the politicians, and then I threw a dark horse into the race for presidency. LOL.

Terzetto Slide Show

I might as well make it official. My favorite restaurant in the whole world is Terzetto. Here are the reason’s that I love Terzetto. They have a huge menu. I go often, and often like to try out different things. Each time I try something new, it turns out just as good as many of my old time favorites. They are very accommodating. Any change to a dish, and they will make it special order. Solange when she was pregnant, would invent special dishes while we drove there. Then she would describe it and they would cook it. It is simply fantastic.

When we returned to Rio, several of our friends were in town (Art Martinez, Scott Kay, Brian Wilcox, and Thomas Shang). So we threw a great dinner party. Art is quite the photo buff so he took a bunch of photos of the event, and now I’ve made a slide show of it. I’ve also added a new technology so that the photos pull out of the database and include all the people in the photo. Enjoy.

ToonDoo and Portuguese

I have always wanted to find a program to make cartoons, and now I found a great one – ToonDoo. ToonDoo really makes it easy to import objects, characters and text into your cartoon. It’s done with the latest in Web 2.0 technologies enabling ToonDoo to run in any browser.

The story below actually happened to me. Move your mouse over the cartoon to see the rest.

I met this guy in Brazil (name withheld for privacy reasons) and his Portuguese was poor. The problem was that he thought his Portuguese was better than every one else’s. It was beyond annoying the strange situations because his perceptions were so different than reality. He was constantly correcting my Portuguese, which was no problem. But he was always wrong. I guess I was being pacifist, but I never said anything. Just let it slide. But then one day in a taxi with a bunch of friends, he corrected my Portuguese one too many times (wrongly again), and I just exploded. I have not spoken to him since.

For whatever reason, I made this the subject of my first cartoon at ToonDoo. I hope to make many more cartoons in the future on a wide variety of subjects.

Battling the Tree

My apartment is on the fourth floor of a ten story building. When I first purchased my apartment in 2003, a good friend of mine Jamie from Philadelphia made a very prescient comment. As we were looking out over the beautiful views from my apartment, he said “Wonder what you’ll do when those trees grow a little?”

He was so right. One of the reasons that I love my apartment is that the views are incredible. I can see Christo from every room of my condo, but more importantly, I can see the beautiful Lagoa lake. It is a fantastic contrast to the hustle and bustle of Rio de Janeiro. After running the lake, it was absolutely one of my favorite things to cool down drinking an agua de coco while looking over the beautiful lake.
About two years ago, the tree was growing and beginning to block the view. Solange called the City of Rio de Janeiro every day for months. All to no avail. Eventually we gave up. But of course, the tree just kept on growing each day making my view a little bit worse.

My friend Augusto and I decided to take matters into our own hands. We went and bought a small saw, a long pipe, rope, and duct tape. Using this contraption, we would tie a branch, and slowly saw away at the branch. Once the branch fell, the rope would catch it, and then we would drag the branch in through the window and cut it into pieces. This photo represents just a small victory in the Battle Against the Tree.

This branch was actually larger than the sofa!