Archive for July, 2009

MySql import with crlf

If your text file lines end with carriage return / line feed, you will need \r in addition to \n to have clean data import:


LOAD DATA LOCAL INFILE 'c:\\www\\package.txt'
INTO TABLE businesscategory
LINES TERMINATED BY '\r\n'
(businesscategory);

Fort Apache, The Bronx

Well written with flawed, empathetic characters.

Fort Apache, The Bronx

YYYYMMDD for derived column in SSIS

I think SSIS is great, but date formatting still remains a bit tricky. Would be nice to have a straight format function, but this is what I needed to use in the expression portion of the Derived Column Transformation Editor in order to get the date format YearMonthDay :

(DT_STR,4,1252) DatePart("yyyy",Trans_Dttm) +
Right("0" + (DT_STR,4,1252) DatePart("m",Trans_Dttm),2) +
Right("0" + (DT_STR,4,1252) DatePart("d",Trans_Dttm),2)

Tricks

One of the better non-Carrella based 87th books.

Tricks

Fortune’s Formula

The computer and gambling chapters were interesting along with the sections involving Milken and Boesky. Some of the math discussions were a little much for late night reading.

Fortune’s Formula: The Untold Story of the Scientific Betting System That Beat the Casinos and Wall Street

Delete WINDOWS when emptying Recycle Bin

Needless to say, this isn’t a very comforting message to get when you try to clear the Recycle Bin. What made it even weirder was there was nothing in the Recycle Bin.

To fix:

Start / Run / %systemdrive%\Recycler – this will give you the weird folder names for Recycle Bin – Something like : S-1-5-21-507921405-527237240-1801674531-1029

I had two folders under c:\recycler – went to CMD – cd \Recycler – then deleted all files / folders in Recycler and then deleted the c:\Recycler directory and rebooted.

That fixed the issue.

Black Betty

Still a good read the second time through

Black Betty : Featuring an Original Easy Rawlins Short Story “Gator Green”

Perish Twice

Not much to recommend in this one.

Perish Twice (Sunny Randall)

Reference ClickOnce publish version

If you are trying to keep your About window in sync with the published version in ClickOnce, rather than the assembly version, you can reference My.Application.Deployment.CurrentVersion. However, this only works on the installed application, not in Visual Studio.


If System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed Then
Me.LabelVersion.Text = String.Format("Version {0}", My.Application.Deployment.CurrentVersion)
Else
Me.LabelVersion.Text = String.Format("Version {0}", My.Application.Info.Version.ToString)
End If

How to move ToolStripMenuItems

Pretty basic stuff, but it can drive you crazy if you don’t remember how.

Move menu items

A Time To Love and A Time to Die

Orwellian and insightful. You know it won’t end well but still have to see it through.

Time To Love and A Time to Die

Sudden Mischief

Spenser gets a look at the past.

Sudden Mischief (Spenser)

The Last Dance

Fat Ollie gets it done.

The Last Dance

A Right To Die

A period piece that didn’t hold my interest.

A Right to Die

Pastime

“Spenser, rite of passage.”

Pastime (Spenser)