Categories

Archives

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

Force SSL on a subdomain

Thanks to some help from this article I was able to force SSL on some of the pages.

RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

DateTime data in a C# 2005 Masked Text Box

I had some problems getting DateTime information to display correctly in a Masked TextBox. Each time I assigned DateTime.ToShortDateString to the masked text box it would drop the leading zeros. For example the date 02/04/2007 would show up in the masked text box as 24/20/07 . The format of the ToShortDateString’s output was all wrong for what I needed. After some playing around with it this is the solution that I came up with after reading and playing with the program.

DateTimeFormatInfo myDTFI = new CultureInfo( “en-US”, false ).DateTimeFormat;
myDTFI.ShortDatePattern = “MMddyyyy”;
txtFutureDate.Text = DateTime.Now.ToString(myDTFI.ShortDatePattern);

Silly Me:
Much easier to use the following code. It is much more simplified.

txtFutureDate.Text = String.Format(“{0:MMddyyyy}”, DateTime.Now);

Copying a MySQL tables structure

CREATE TABLE new_table AS SELECT * FROM table_to_copy WHERE 1 = 0;

Applescript Notes

http://www.macosxhints.com/article.php?story=20030307123412518

There are other variables available with system attribute: “HOME”: posix path to users home directory “SHELL”: posix path to users shell “USER”: users short name “LANG”: user system language as two-letter code e.g. “en_US” “PATH”: content of the PATH variable “__CF_USER_TEXT_ENCODING”: Don’t know the meaning of this

AND

http://www.macos.utah.edu/documentation/AppleScript/MountVolume/MountVolume.html

The name of it is…

It is a Ternary Coditional Operator! I always forget the actual name so here is a note…

$num = isset($value) ? $value : 256;