Posts

Followed a tutorial from VectorTuts to draw an alien using Adobe Illustrator Creative Suite 5.1

Image
http://vector.tutsplus.com/tutorials/illustration/quick-tip-create-an-alien-character-using-the-width-tool/ My first time using Adobe Illustrator to do some vector artwork.  For someone who cannot draw at all, I feel quite accomplished :p Finished "artwork" Original Pencil sketch

New version of WordXML document using OpenXML SDK 2.0 with bold, color and font size formatting

Image
  I first dabbled with the OpenXML SDK 2.0 in January 2011 . At that time, there was a problem which I could not solve: specifying different font sizes, font colors and bolding effects for different words on the same line. I managed to achieve different formatting effects for sentences on different lines, but never managed to get it working if the words were on the same line. Today, I finally figured out how to do it, and scroll down if you are interested to look at the code. Oh, and do remember to add in the reference for OpenXML SDK and add the imports. A screenshot of how the generated Word document looks like: using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Wordprocessing; public void GenerateWord(){ WordprocessingDocument doc = WordprocessingDocument.Create(filename, WordprocessingDocumentType.Document); MainDocumentPart mainPart = doc.AddMainDocumentPart(); mainPart.Document = new Do...

How I solved Error -23 while updating my iPhone4 to ios5

Encountered this error both times while using iTunes 1) Windows XP 2) Lion OS. Turned out that the problem occurred because I wasn't using the original USB cable that came with my iPhone but was using a cheap cable bought off DragonExt. Once I swapped the cable to my original cable, everything worked flawlessly. Let me know if you encountered the same error and managed to resolve the problem the same way or if you solved the problem with a different resolution so that I can share it with others who might be facing the same problem?

Output ColdFusion database query as Excel file with filename specified

I guess the title of this post tells it all.  And really, it is no different from your normal ColdFusion queries except that you add in the first two lines at the top. You can refer to Adobe's docs on this as well. <cfcontent type="application/msexcel"> <cfheader name="content-disposition" value="attachment;filename=customers.xls"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Customers</title> </head> <body> <cfquery name="getcustomers" datasource="custDB" dbtype="ODBC" > select * from customers where companyid='#companyid#' </cfquery> <h1>Customers</h1> <table width="100%" border=1> <tr> <th>Customer name</th> <th>Customer email</th> </tr> <cfoutput query="getcustomers"> <tr> <td>#customername#</...

Reducing space between bullet list items where there is a form element

Image
If you are like me, quite sticky about small nuances that affect the appearance of a webpage, you might have come across this problem as I have done so today. I have this little page where I arrange a list of links in an ordered list like this (Figure 1) Figure 1 Well, what irks me is that I don’t like the spacing between the numbers 3 and 4.  If you noticed, there is NO SPACING between 1 and 2, and I like my layout to look consistent , so rightfully, there shouldn’t be a spacing between 3 and 4 either. Of course I could have put a <br> tag after the “Get all companies” and “Get all customers” text and created a consistent look, but no, I preferred the “no line spacing” look as it looks more compact.  Something like this in Figure 2! :) Figure 2 And really, it is quite easy to achieve, only that such things are typically not documented, that’s all. Basically, why there is an automatic spacing in Figure 1 is that, by default, a <form> element creates margins...

Singapore Social Media Statistics 2011 [Infographic]

Image
Spent a few hours today researching and creating this infographic that summarises some social media statistics of Singapore.  You can click on the image to get a 1024x768 version of it. Social Media in Singapore [Infographic] For companies who are looking for ways to reach out to their customers, these numbers are yet another reminder to the need to expand their social media presence. More than half of Singaporeans are on Facebook and a large proportion of these are the up-and-coming Gen-Y and Gen-Z youngsters who are already part of the consumer markets with dollars to spend.  Many Gen-Xers are also active social media users.  Add up the numbers for these groups, you get a staggering 72% which means that targeting these two groups will definitely translate into high customer equity for the company which implements a consistent and long-term social media strategy. And for companies whose target  consumers are the seniors, do not ignore social media in...

Facebook - New Update Options

Image
In my last post , I showed a screenshot of how the new Facebook "Timeline" has changed the way you can show off your own "story" to your friends and how you can view the "stories" of your friends as well. Besides the revamped interface, Facebook has also introduced new ways you can reflect lifestage changes in your Timeline, besides adding status updates and photos which were already present in the older versions of the Facebook Profile. If you see the screenshot right below this paragraph (Figure 1), you can see that beside the familiar Status Updates and Photo icons, there are several new icons beside them. Figure 1: Spot the new icons on the right which look like: a briefcase, a heart, a house, an apple, a flag So what can these new icons do? Basically here's a short explanation of their purposes and a screenshot to accompany the explanation. The "briefcase" icon lets you fill in information about your work and education (Fig...