Binary Expressions

« Previous Page

2008-10-7

How To - Remove Leading Zeros

Filed under: — Adam @ 11:49 am

Solutions

Using PHP function intval().

Code example: echo intval(”05″);
Returned value: 5

Using PHP function ltrim().

Code example: echo ltrim(”005″,”0″);
Returned value: 5

How To - Convert MySQL Timestamp/Datetime to Unix Timestamp

Filed under: — Adam @ 11:35 am

Background Knowledge


Since MySQL v4.1 timestamp and datetime data types are formatted “YYYY-MM-DD HH:MM:SS”. Prior to MySQL v4.1 the timestamp was formatted as YYYYMMDDHHMMSS” and datetime formatted as “YYYY-MM-DD HH:MM:SS”. Refer to MySQL Reference Manual for further details.

The Unix timestamp differs from MySQL. Unix’s timestamp is a integer value of seconds since January 1, 1970. For further explanation of Unix timestamps refer to Wikiepedia or UnixTimestamp.com.

Solutions


In MySQL you can use Unix_Timestamp() function.

Query Example: SELECT Unix_Timestamp(Date_Entered) FROM Foo;

Using PHP you can use strtotime() function.

PHP Example: $nUnixTimestamp = strtotime($nTimestamp);

2008-10-3

Cool Stuff

Filed under: — Adam @ 1:03 pm

Print Free Graph Paper
http://www.printfreegraphpaper.com/

Graph Paper
http://konigi.com/tools/graph-paper

PocketMod: The Free Disposable Personal Organizer
http://www.pocketmod.com/

Printers Invading your Privacy

Filed under: — Adam @ 12:20 pm

I know this sounds hard to believe but unfortunately its a reality. Printer manufactures are now invading your right to privacy by encoding each page with identifying information. This is without public knowledge or consent and worse, there is no laws to stop abuse. I do not understand this view point of having to do this to defeat crime. In reality they are treating every single individual as a criminal before a crime has even been committed. In my eyes this is breaking laws already existing. The right to privacy and the right to be “innocent until proven guilty”. Get informed and read the entire publication on this matter by the EFF.

Source: Electronic Frontier Foundation - Printers
Source: Tracking Printers to Fight Crime
Source: Secret Dots Trigger Privacy Debate
Source: EFF - List of Printers

Unique Products by Jello

Filed under: — Adam @ 11:41 am

I came across this cool company called Jello and I have to say they make some of the coolest products. For one who wouldn’t want to have a Rubik’s Cube table (smile). One thing I would have to say is the products are quite expensive to me at least. Granted they are unique and specialized. Some people may have seen Jello’s products on the iCarly Show.

Source: Jello

« Previous Page

Take back your mailbox - CAUCE.org

Powered By Wordpress PHP: Hypertext Preprocessor MySQL Powered Download Juice, the cross-platform podcast receiver
Proud To Be Canadian Get Firefox Valid XHTML Valid CSS
<NO>OOXML Logo


25 queries. 0.356 seconds.
Copyright © 2004 - 2005 by Adam Douglas