How To – Convert MySQL Timestamp/Datetime to Unix Timestamp

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);

How To – Installing Swish-e v2.4.5

Background Knowledge


The installation of Swish-e v2.4.5 is being installed on a system with OpenBSD v3.7 i386 and Perl v5.8.6 using BASH as the command prompt interrupter.

What is Swish-e?


As quotes by Swish-e.org…

“Swish-e is a fast, flexible, and free open source system for indexing collections of Web pages or other files. Swish-e is ideally suited for collections of a million documents or smaller. Using the GNOME™ libxml2 parser and a collection of filters, Swish-e can index plain text, e-mail, PDF, HTML, XML, Microsoft® Word/PowerPoint/Excel and just about any file that can be converted to XML or HTML text. Swish-e is also often used to supplement databases like the MySQL® DBMS for very fast full-text searching. Check out the full list of features.”

Continue reading

Visual Studio 2005 – Change Default Debug Browser

I began play with Visual Studio 2005 and discovered that Internet Explorer is used for debugging. In the past one could change the default browser before going to the file menu then to “Browse With” in Visual Studio however this seems to have changed. Here is a couple solutions I found out how to change your default browser in Visual Studio 2005.

Solution One


  1. Go to File menu > New > Web Site.
  2. Go to File menu > Browse With.
  3. The “Browse With” dialog will appear, click on Add and then select your preferred browser.
  4. Click on your preferred browser in the list and click on “Set as Default”.
  5. Click on “Browse” or “Cancel”.

Solution Two


  1. Left click on a aspx file in the “Solution Browser” and click “Browse With”.
  2. The “Browse With” dialog will appear, click on Add and then select your preferred browser.
  3. Click on your preferred browser in the list and click on “Set as Default”.
  4. Click on “Browse” or “Cancel”.

Source: Changing your debug browser to Fire Fox in Visual Studio 2005