Friday, November 4, 2011

Let’s talk HTML and CSS: about DIV and SPAN

During my web development years, I got these questions a lot: How to convert an HTML table to DIVs and SPANs? How to put several DIVs on the same line? How to make give a SPAN width and height? Etcetera DIV, etcetera SPAN. So to make it easier to explain and refer to again later, allow me to present this ‘demo’ slash step-by-step tutorial. Hope this helps!

Thursday, October 27, 2011

Using Microsoft Download Manager to download large files

We are having a big project in my company. A pretty big one, which requires a couple of new servers running Windows 2008 R2 64-bit and SQL Server 2008 R2, with IIS (Internet Information Services) running and hosting local websites. And this project will save us time and money when it's live.

Unfortunately the project is confidential so I can't disclose it's nature :D But at least I can share with you readers and fellow IT professionals about my experience with downloading---and redownloading for soooo many times---stuff from MSDN, and also the discovery of a free program that allowed me to resume/retry interrupted downloads. Read on if you are also having problem with your downloads and are looking for a solution.

Google Mobile sites can’t remember your login?

This happened to me recently: Somehow I have to keep logging into my iGoogle mobile site on my Treo 800w. I used all I could: cleared the cached pages and cookies, restarted, switched to both Opera Mobile 10 and Pocket/Mobile Internet Explorer, and all failed :(

I googled this Google login problem to no avail. Unbelievably unlucky I was---Looks like I was the only person having this problem??? (Pssst: or perhaps Google removed these from the search result?)

But anyway, it works fine now, and I'm a happy person again (hyperbolically speaking :D). Read more to see how I solved it.

Monday, February 7, 2011

Practice makes perfect: Basic algrebra spreadsheet

One adage that I keep telling myself is as stated in the title above: Practice makes perfect. Want to be good at computer programming? Practice! Want to be good in writing articles? Practice! Want to be good at web development? Taking picture? Problem solving? Practice, practice, practice!

And with my son studying first-grade math now, the same maxim holds true to him as well---"Practice makes perfect, son," I keep telling him.

Don't get me wrong; he is good a math. In fact, he is a GATE student, an avid reader with a keen interest for scientific facts, and a future ocean animal scientist slash doctor slash inventor, whatever his final decision be. But still, silly math mistakes happen, and one way to prevent it is to practice more. I had him done more additions and subtractions, and I DO see the result of the drill.

So what tool did I use? Just a simple Excel sheet printout! With formulas, of course---this is a perfect 'practice' opportunity for me too, don't you think?

Friday, January 21, 2011

Beware: Too many invalid cPanel logins can cause you unable to see your site!

"Bro, we have a problem with the webmail," my client called me on one windy afternoon. "Can you help?"

"Sure! What's the problem?" I replied.

Client: "Can't go to the website. Internet Explorer said something wrong with the connection."

Me: "Other websites OK?"

Client: "Yep. Google, eBay, Facebook are all okay. Only 21watches.com webmail has problem."

Hmm.. perhaps the webmail server is having problem, I thought. But to make sure: "So you can still go to 21watches.com?"

Client: "Yep, I can go ther---oh hold on... No man, it's down too looks like. But yesterday was OK though."

Good, so everything on that site was down... except that it's NOT! I was on that website in that very second---using Firefox, in case the problem with my client was due to his IE misbehaving.

Me: "Perhaps your network guy did something bad? Like blocking your site by accident...."

Client: "No, he's on vacation since last week. Yesterday no problem, and nobody else has access to the router. Heck, nobody here even KNOW what is a router."

What a mystery... Anybody care to guess why?

Tuesday, January 18, 2011

Facebook Grid Picture

Psst.. wanna have fun with your Facebook Photo Album? Or you just want to jazz up your Facebook pic? Then you've come to the right place---I'll show you how!

If you haven't notice, your pictures in Facebook are organized in a grid structure. To be exact: they will be in a four-column grid. And just like the screenshot below (or the real thing here), you can see that it's very easy to take advantage of this layout. The key is to know how to count. In pixels, that is!

Facebook Grid Picture

Monday, November 22, 2010

Use the jQuery, Luke!

If you're asking me what's the most useful thing I ever come across when developing websites, my answer will be jQuery. In fact, that's one of the top entries in my to-do list when doing website projects. So important and so useful to me, that it has saved my life!!! Well, actually it's not THAT dramatic really... but with jQuery, it makes implementation faster, easier, and fun-er, thus giving me back those precious long-lost portion of time to get more family time, more game time, and--of course--more sleep.

How so? Quoted from their website:

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

......say what???

Allow me to break it down so it's easier for you to understand.

Wednesday, October 27, 2010

Can't Verify/Link Google Webmaster to Google Analytics: "We weren't able to verify your site"

Last week I set up a blog mirror at Blogger. Since it's free, and it's useful to add more channel/exposure to my site, so why waste it?

Anyway, I added the posts, created the pages, linked it to my Google Analytics account, and everything were checked. Monetization was also set up properly. And lastly: added it to my Google Webmaster Tools and tried to do verification via Analytic. Result? Big red fail:

We weren't able to verify your site:
http://behindthecodes.blogspot.com/

What's going on here??? Apparently lots of people are also in loss.

My Analytics account were good, and I could see the data from this new blogspot site coming in. Also to be able to link to my Analytics, Webmaster said:

You can use this option if your site already has a Google Analytics tracking code that uses the asynchronous snippet. You must be an administrator on the Analytics account.

... and both were fulfilled already. So the problem was neither on the Analytics site nor my blogspot site. Well Google, thanks for your simplistic and unhelpful error message :(

Anyway, the problem turned out to be due to the placement of my Analytics tracking code: I put the code before the closing BODY tag, where Webmaster expected it to be in the HEAD tag. So off I went: edit the HTML code of my blogspot template, move the tracking code to end of HEAD element, and tried verification again. It worked!!!

So as a summary, I just want to give this solution (fix) to the world:

In Google Webmaster, if you want to verify/link your site to your Google Analytics account, make sure you use the asynchronous tracking code (ie. the latest one from Google), and make sure you put it in the HEAD section.

Hope this helps!

Friday, October 22, 2010

Use XAMPP to serve data-driven personal websites

Related to the previous post on serving websites using a Windows 7 computer , my friend was asking if it's possible to host PHP-based data-driven websites (using MySQL as the data storage) on his Windows 7 computer. Well, why not? Let's talk about this a little bit....

Thursday, October 21, 2010

Use IIS to serve websites from your Windows 7

Thursday, 11PM. I was cleaning up my desk, getting ready for my lunch break, when the Marketing Manager stepped into my office.

"Ohai! All ready for your gaming expo?" I asked her casually.

"Yep, pretty much. We're also set for a survey-slash-raffle program, where our booth visitors can fill in their contact info and play a jackpot-machine minigame to get into the instant raffle."

"That sounds gr---" I tried to reply, but she kept on going.

"It's a flash webpage, and we're using Microsoft Access as the database storage. So we'll run everything off the browser on our two laptops. They both are running on Windows 7."

Suddenly I had a funny feeling down my brain. "Sooo... you want me to copy the program files to our website?" I asked, trying to guess where this talk led to. "No problemo!"

"Actually, THAT'S the problem..." she told me, sighing. "We won't have any internet access in the expo. And we're leaving by 3..."

Aha! So my feeling was right. Being a helpful coworker, I gave her a promise worthy of the next Presidential candidate: "Give me your laptops, and in 30 minutes I'll make it work locally."

And there she went, dashing to her office and back, presenting me with 2 high-end laptops and a big wide smile on her face.

So how did I tackle this? With the help of Microsoft's IIS, it's super easy! Follow these steps, and you can do it too!

Wednesday, October 20, 2010

Hello, World!

Hello, and welcome to my blog site.

Currently I host this at 000webhost.com (for free!), with domain name in namecheap.com. Asides from occasional hiccups related to the free hosting account, it's been pretty okay. I just need to remember to reconnect the FTP before saving my files, or else the save will fail. Well I know it's free, but still... free or not, this I think is not a good way to show one's reliability. (I hope 000webhost is reading this... :D)

Edit on 11/23/2010: I finally fed up with 000webhost's free hosting quality, and moved to Namecheap hosting instead. Now it's more stable, and so far no downtime.

Anyway, I hope you like my blog site. Please enjoy my posts, click on the ads (please please please :D), leave some comments, etc. Oh, please give me suggestions as well on how to make this a better blog site.

Thanks!