Google Draw

(edit 579)

RemoteApp in Windows 7

This RemoteApp Article shows how to setup remote applications, so you can run a program installed on your home computer from far away through Remote Desktop. (edit 578)

Visual Studio 2008 64-bit: Editing While Debugging

This article: Setting Target Platform to AnyCPU explains how to get Visual Studio setup so that it won't compile to 64 bit. So you can edit the code while debugging. (edit 577)

Regular Expressions OR Operator

I almost never spot it in Regular Expression documentation, but it works in Linux and in PowerShell. The or operator in a regular expression.

"find this string" -match "this|that|other"
Not a very helpful example, but the regular expression will match any line with "this", "that" or "other" in it. Just separate each word with the pipe symbol |. (edit 575)

PowerShell

In PowerShell, when using the where cmdlet, you use spelled out operators like -eq for ==, and -lt for > (equals and less than). This is not unlike LINQ's where operator. To match string patterns, use regular expressions:

 dir | where {$_.Name -match "^\..*"} 
Or
 dir | where {$_.Name -notMatch "^\..*"}
Put the folder into a variable:
PS C:\> $a = Get-Item c:\store
PS C:\> $a | Get-Member
(edit 574)

C# Null Coalescing Operator

The ?? operator is handy. msdn article

int? x = null;
int y = x ?? 99999;
The y variable will be 99999 because x is null. (edit 573)

Backup Script

This is the script I've recently started using for backing up my SQL database.

declare @datetimestamp varchar(15) 
declare @bu_command varchar(4000)
declare @del_command varchar(4000)
declare @filename varchar(255)
declare @archive varchar(255)
declare @result int

set @datetimestamp = 
	substring(convert(varchar(32), getdate() ,120),1,4) 
	+ '-' + substring(convert(varchar(32), getdate() ,120),6,2) 
	+ '-' +  substring(convert(varchar(32), getdate() ,120),9,2) 
	+ '_' + substring(convert(varchar(32), getdate() ,120),12,2) 
	+ substring(convert(varchar(32), getdate() ,120),15,2) 
	+ '_' + substring(convert(varchar(32), getdate() ,120),18,2)
	

set @filename = 'c:\Backups\xfire_' + @datetimestamp + '.bak'
set @archive   = 'c:\backups\xfire_' + @datetimestamp + '.7z' 

BACKUP DATABASE xfire  TO DISK = @filename

set @bu_command = 'c:\7za.exe a -t7z ' + @archive + ' ' + @filename 
set @del_command = 'del ' + @filename

exec @result = master..xp_cmdshell @bu_command

if (@result = 0) 
	begin
	exec @result = master..xp_cmdshell @del_command
	end
else raiserror ('7Zip error', 1, 1)

(edit 572)

WPF Graphics

I'm thinking about how I want to implement a simple CAD type sprinkler system drawing, for drawing pipes and placing heads over a floor plan. I've been looking at wpf.

WPF Overview

DrawingVisual Objects

Hit testing on the Visual Layer (edit 571)

Microsoft Access Reference Errors

This is a good article about Microsoft Access references. (edit 570)

Sprinkler Calcs

Hydronics Eng has some cool stuff about hydraulic engineering.

An article about the differences between NFPA 13 and 13D calculations.

Someone said...

HzW only works for straight pipe with water!

For a Reducer,

Head loss, Hf = (1/Cc - 1)^2 * V2^2 / 2 / g
where,

Cc = 0.582 + 0.0418/(1.1-D2/D1)
D1 = upstream inside diameter
D2 = downstream inside diameter
V2 = downstream fluid velocity
g = acceleration due to gravity

For an Expander, divide the above Hf by 0.7

This is and ancient book about hydraulics. (edit 569)

rss

Click here for older web entries

Keywords: travels

Taipei Weather:
84 F (29 C) Scattered Clouds
Bellingham Weather:
65 F (18 C) Clear
Seattle Weather:
67 F (19 C) Clear

Web hosting Taiwan Blogs

The Google Map Location where I slept in Taiwan. 台北市同安街53

You can subscribe to the RSS feed of this blog so you don't have to check to see if I wrote a new one. Click here to subscribe to the RSS feed.

New Twitter thing. In case I can't access the Internet I can put little twitter right here. See. I'm still young and hip with the kids these days.

Taipei Pictures
Taipei Videos
Pictures not posted often

Temporary E-Mail: 8925@markdurham.com
(Just spell the name right!)
That's my other anti-spam trick, first is that this e-mail will expire, so don't put it in your address book, I'll e-mail you a permanent one.


Old Recorded Videos
Funny Kid
My Taipei Apartment
Taipei 101 - Worlds Tallest Building

Web 2.0 Junk
spaces.live.com<
youtube.com
twitter.com
picasa.com someday...
My Quick Links
J-Dude Linux
youtube.com
katiedurham.com
slashdot.org
wikipedia.org
osnews.com
BetaMax-HD-DVD Converter

Chinese Language
Animation of the Chinese character for my surname showing stroke order My Chinese name (Du)
ZhongWen.com
nciku.com Chinese Dictionary You can draw characters!
Adsotrans.com Translation
PinYin Keyboard

Sites of Usefulness

sourceforge.net
wikipedia.org
wikitionary.org
imdb.com
j-dude.com

Sites of Uselessness
dilbert.com
nbc.com






Notepad++ Logo


Valid XHTML 1.0 Transitional

As of 2008-10-20 this page is W3C XHTML 1.0 Compliant. Click to recheck it for me.


[Valid RSS]

This page has been hand coded using Notepad++ by Marc Durham under the consultation of James Yates.