This came to me late last year but regardless it qualifies as a perennial favorite in my book.

Holiday Decorations SpecCant remember the proper signage for the rooftop landing strip? Don’t know what type of brace to use when attaching the star to the tree? The folks at Winzler & Kelly have got you covered.

With this detailed PDF you can deck your halls safely and accurately. For best results extra attention should be paid to the structural notes.


christmas, xmas, decorations, holiday, holiday decorating

Right up there with the Cursor Kite this guy has made a Google Earth marker just about big enough to be seen from space!

Google Earth Marker


I’ll bet this was a fun project and got a few strange looks from people.

Via Make

google, google earth, art, performance art

Ying pointed out on my article about finding the last Saturday of the year that adding a year to a DATE datatype works great with syntax like this:

SQL> select sysdate+numtoyminterval(1, 'YEAR') from dual;

SYSDATE+N
---------
27-NOV-07

It works great right up until you hit February, 29:

SQL> select to_date('02/29/2004', 'MM/DD/YYYY')+numtoyminterval(1, 'YEAR') from dual;
*
ERROR at line 1:
ORA-01839: date not valid for month specified

So what can we do about this? Well, as far as I can guess there are only two options. First, you could avoid ever using +numtoyminterval(1, 'YEAR') in your code and instead use +numtodsinterval(365, 'DAY') like this:

SQL> select to_date('02/29/2004', 'MM/DD/YYYY')+numtodsinterval(365, 'DAY') from dual

TO_DATE('
---------
28-FEB-05

This may cause some confusion as 365 days after January 15, 2004 would be January 14, 2005 and 365 days after January 1, 2004 is actually December 31, 2004, but it should never throw an ORA- error.

UPDATE: Ying commented with this solution which is probably better in most scenarios. By using the add_months function we can step forward a number of months and Oracle will automatically truncate to the last day of the month if the resulting month has fewer days than the starting month.

SQL> SELECT Add_Months(to_date('02/29/2004', 'MM/DD/YYYY'), 12) from dual;

ADD_MONTH
---------
28-FEB-05

The other alternative is to handle the exception programmatically. Either avoid inserting a February 29 or avoid using the +numtoyminterval(1, 'YEAR') only when handling a February 29.

I’d say option 1 is the better choice, but both have their drawbacks.

This is the same error you get if you attempt to add a month to, say January 30th since there is never a February 30th.

SQL> select to_date('01/30/2006', 'MM/DD/YYYY')+numtoyminterval(1, 'MONTH') from dual;
select to_date('01/30/2006', 'MM/DD/YYYY')+numtoyminterval(1, 'MONTH') from dual
*
ERROR at line 1:
ORA-01839: date not valid for month specified

I guess this is why most things are good for “30 days” not “1 month”.

Thanks Ying for pointing out this anomaly.

database, oracle, date, to_date, timestamp, time, database administration, database development

Why would you want to follow a true bonehead through a chapter of his life in corporate America? Because it’s hilarious.

The Management Secrets of T. John DickIn the book “The Management Secrets of T. John Dick: a truly professional novel by Augustus Gump” we are taken into the world of the title character, the Marketing Manager of SuperPumps, Inc. Marketing Manager at a company like SuperPumps, a flagging pump manufacturer, is a tough job, but T. J. is committed to its success. T. J.’s unique gift of organization (his secretary can quickly find any needed files in his office) and vision (two words, “mission statement”) make him a great leader in his own mind, but perhaps his greatest strength is pointing out what his greatest strength is… which is just about everything according to T. J.

“One of the secrets behind my management success is to keep a very tidy desk. I always emphasize the importance of this to my team and make sure to set an example with my own desk. Half an hour each morning and evening arranging papers, writing utensils, calculator etc. is time well spent in my opinion, and American business would run more smoothly and efficiently if more people realized the value of a tidy desk.”

We’ve all hear of the Peter Principle which proposes that an employee will rise to the level of their incompetence. Unfortunately the Peter Principle falls short in describing the main character of “The Management Secrets of T. John Dick”. To do proper justice to this character we would need a new principle, the Dick Principle. The Dick Principle would have to state that “Once an employee has exhausted their advancement in accordance with the Peter Principle it is possible, largely due to a lack of proper accountability in upper level positions, for them to advance even further and faster.”

A quick and fun read, “The Management Secrets of T. John Dick” won’t teach you how to be a more effective manager, but it’s sure to amuse those who deal with the absurdity of corporate culture. If you need a corporate executive to laugh at that won’t get you fired, T. J. is here for you.

book, books, book review, humor, office humor, management, corporate, funny

A little trick that some Linux users like to implement to prevent accidental file deletion is via the use of an alias. Aliases are similar to variables and can either be set in a session or by placing the alias command in the .profile or .bash_profile file with a text editor.

By adding this alias the user will be prompted to confirm each file before it is deleted; otherwise Linux, unlike Microsoft Windows, will delete whatever files match the filename criteria without warning!

$ alias rm='rm -i'
$ touch touch1.fil touch2.fil touch3.fil
$ rm touch*
rm: remove regular empty file `touch1.fil'? y
rm: remove regular empty file `touch2.fil'? y
rm: remove regular empty file `touch3.fil'? y

Easy Linux CommandsFor more tips like this check out my book Easy Linux Commands, only $19.95 from Rampant TechPress.

Buy it now!


linux, unix, system administration, sysadmin, bash

« Previous PageNext Page »