Much like my previous post about CSS buttons, here is some ultra-lean code for making tables look nice with CSS. And as with the previous post, much smarter code ideas can probably be found at the Yahoo! UI Library.
Some simple XHTML/CSS for tables. CSS Formatted Table (HTML)
Since the great 416/647 split of 2001 most of us living in Southern Ontario have become accustomed to dialling 10 digits to make local calls. I haven’t.
While I rarely forget to dial the area code (416, 647 or 905), I often mistakenly dial 1 first as if I were dialling long distance. In either instance, I am informed of my mistake by a robot and forced to hang up and dial again.
Dear POTS head executives:
- In the instance of a superfluous 1, why not connect me anyway? (warning optional)
- In the instance where I neglect to include the area code, why not assume I mean my area code and proceed with the call? (warning optional)
I love how Spotlight in OS X can find information I need inside files I had long forgotten about. All I need to do is type in a few letters of what I’m looking for and then prepare for the unpleasant experience of modern Whack-A-Mole. Spotlight returns files immediately in its pulldown menu, but also begins sorting, reordering and removing them before the loading is complete. Much bobbing and weaving required. What’s worse, if I have the patience to wait for the results to fully load, I am unable to reveal a selected file with the typical âŒ˜-R shortcut. I don’t always want to open files I’m looking for, and if i do, I don’t always want them opened in their default applications. I need to bring up a separate window, then perform âŒ˜-R. Why can’t I just have my right-click? And can’t the sorting and grouping be optional?
Apple, how did you ship Spotlight like this?
Like most people, I have difficulty writing my first cheque of the new year. I always write the wrong year. Apparently, I am also like most web sites.
If this was something that must be done manually, I could understand. But the content on a web page is not written with a Bic Grip Roller. It’s generated by a computer that knows the current year.
Here’s some code you can use to keep your copyright current. Examples for Perl, Python, etc. are appreciated!
<?php echo date("Y");?>
In parsed HTML (aka SHTML, must be enabled in Apache):
<!--#config timefmt=" %Y" --> <!--#echo var="DATE_LOCAL" -->
In Java (JSP, thanks to Tim!):
<%= (new SimpleDateFormat("yyyy")).format( new Date() ) %>
In Smalltalk (thanks to Tim!):
^Date today year asString
In Ruby (thanks to Scott Boms):
add the following to a helper (eg. application_helper)
def copyright_year t = Time.now t.year end
then in the view file, just put <%= copyright_year %>