Posts

Showing posts from October, 2011

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...