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) Permalink
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) Permalink
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) Permalink
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) Permalink
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) Permalink
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)
Permalink
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.
This is a good article about Microsoft Access references. (edit 570) Permalink
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) Permalink
Click here for older web entries
Keywords: travels
Taiwan Blogs
My Chinese name (Du)As of 2008-10-20 this page is W3C XHTML 1.0 Compliant. Click to recheck it for me.
This page has been hand coded using Notepad++ by Marc Durham under the consultation of James Yates.