Friday, September 15, 2006

Checking and Setting File Types/Associations in .Net 2.0

BlackWasp - Programmatically Checking and Setting File Types

"When developing a Windows Forms application that loads documents, setting custom file types adds greatly to the professional feel of the software. This article explains how to programmatically check your file type is registered and register it if not.

Why Not Register during Set-Up?

Generally the installation package for an application will modify the registry of the end user's Windows installation and set up all of the file types that are required.  This is an ideal place in which to perform this action.  However, it can be problematic should the user accidentally remove or reconfigure the file type.  Also, with Xcopy deployment of software now a viable solution, it is possible that the installation package will never be executed.  In these cases, another solution is required.

..."

This is a nice short and focused article on programmatically setting file associations (i.e. what happens when someone double clicks or right clicks on a given file).

The code snips are in C# but very easily VB.Net'ed (mostly just removing the trailing semi-colon ;)

Visual Studio 2005 SDK V3 (September 2006) Released

http://www.vsipmembers.com/ or from MS Downloads

"The September 2006 v3 RTM is the next milestone in the VS 2005 SDK. The v3 release contains the final release of the DSL Tools v1, contents and samples for Team Foundation Server and Team Test extensibility, IronPython website and web project samples, 5 new Visual Studio PowerToys, managed parser & lexer generator tools (MPPG/MPLEX), updated documentation and many more IDE integration samples. ..."

The DSL Tools RTM and TFS stuff is what draws me to this release...

(via Rob Caron - Now Available: Visual Studio 2005 SDK v3)

Update #1 9/15/2006 @ 1:11PM PDT:

"...A couple of other exciting news around this release are:

  • Updated License - We have revamped the license and lifted the platform targeting restrictions. This removes a key adoption blocker and enables our partners to build tools inside Visual Studio that target alternative platforms.
  • Easy Download - in previous releases, customers needed to register with the VSIP member site before they can download the SDK. We have now made the SDK downloadable without any sort of registration or sign-in, directly from the Microsoft Download Center.

..."

Just saw that you can get this directly from MS Downloads now (I.e. no registration is required anymore)

Visual Studio 2005 SDK version 3.0

(via James Lau's WebLog - It's Here... VS 2005 SDK ver. 3.0 RTM)


Related Past Post XRef:
Visual Studio SDK V2 RTM
"V2 of the VS SDK almost ready to ship"

Wednesday, September 13, 2006

Call SQLCMD from .Net with Output Capture

Stark's Blog - Execute sqlcmd (oSql) from .NET and capture the output

"I have recently seen quite a few questions about executing sqlcmd (oSql for those on 2000) from .NET code.  I have a bunch of utilities that I have written that do this and thought I would share the basic code to do it.

You can also easily capture the output as a stream and do whatever you want with it. In the example below I dump it to a file....I also use the -o to output the results of the sql that was excuted.

Just use the RedirectStandardOutput and RedirectStandardError ..."

Nice.

I was asked just last week if I knew of a way to execute SQL scripts from within .Net2 against SQL2k5 DB's.

I think this might just be the ticket...

Now THAT's a Wallpaper...

I've found my new wallpaper...

Besides being beyond cool, the crash and burn metaphor can be used for so many things.... ;)

(via XBox360 FanBoy - Use the next gen Force)

Tuesday, September 12, 2006

1st Annual Simi Valley Freedom Walk Pictures

I've uploaded my pictures from yesterday's 1st annual Simi Valley Freedom Walk to my LiveSpace personal blog (let's not get me started about Blogger's current photo uploading...  :| )

Here are just a few (of the 50 ;)...

You can see them all in my Freedom Walk 9/11/2006 album.

While I'm paying for the walk today, there's nothing else I would have rather done yesterday...

Related Past Post XRef:
9/11 - Never Forget

CoPilot - Fee based, Easy to Use Remote Support Tool

Ken Robertson asked yesterday, "A while ago, I remember someone blogging about a remote desktop style tool that was very easy for people to use.  It was where you went to a website, got a key, and then someone else went to the site and entered in the key.  Then you cold get onto their system.

Trying to find the site, since my sister has been having some spyware problems and she isn't tech savvy, so walking her through it over the phone is painful. ..."

This sounded like something I run into quite often with my daughter and parents, so I was interested to see he got his answer, Fog Creek's CoPilot.

I've not not heard of that service, but in checking it out it looks pretty cool. It's not free, but it does look very easy for the "less than tech savvy person in need" to use.

As the "helper" you enter your name. At that point you decide how to pay. $9.95 for a day pass, let the helpee pay or subscribe to minutes (from $0.25 a minute to different monthly minute plans, etc. Think Cell phone plans).

Ten bucks is a little much, but much cheaper than the brain cramp of trying to walk a parent/daughter/friend through an issue remotely.

I wish Windows XP Remote Assistance was just as easy (I know, RA is not all that hard, but it's not this easy either)...

Monday, September 11, 2006

9/11 - Never Forget

Five years later and the emotional impact of 9/11 is still strong.

I had friends in NYC five years ago, but luckily they were many blocks away from Ground Zero. As a matter of fact, that was how I learned of the attacks....

We had been emailing each other back and forth that morning, when I get an frantic reply from her. The land line and cell phones where down and she asked me to call her parents to let them know she was okay... After calling her parents, waking them up (We where both in California) I told them, "She's okay". The thing is I (and they) didn't know what she was "ok" FROM! So I turned to CNN.com and...

That day still feels so... weird? Out of phase? Draining? Unthinkable? Heart wrenching? All of the above and more...

Even though I'm 40 year old overweight guy, I still want to "Do Something." I heard the US Army raised their enlistment age to 42. I can't help but wonder if that applies to re-enlisting troops too? Then again, I have my family to think off. But damn it, I want to "Do Something!"... sigh...

Anyway, this evening my family and I will be taking part in the local Freedom Walk (register here). I think being with my family and others in the community will help (and the walk won't hurt... much)...

 

Never Forget

Saturday, September 09, 2006

WLW Text Template v1.1 Beta Test

Are you interested in playing with/beta testing v1.of my Text Template Windows Live Writer Plugin?

If so, shoot me an email (address is on the right sidebar of my blog) and I'll send you the bits.

All goes well I'll do a general release next week'ish...

 

What's new, you ask? Now that there's a little interest in it (i.e. I threw it against the wall and it seems to be sticking a little) I've fleshed it out, adding those nice to have features you expect to see in a more mature product.

Mind you it's still a hack, but it's a nice, prettier and more complete hack... ;)

Here's some more information on what's in v1.1.0.1...

Revision History (as of right now).

*** V1.1.0.1, 9/9/2006

Corrected Copyright and Company version information

  • This incorrectly included my employer's name. I have confirmation that this is a personal, non-work related project and my employer has no responsibilities, liabilities or rights to the project, source code or results.

Fixed Options dialog not saving the Path.

  • This was a pure and simple developer bug that has been fixed.

Updated the Options dialog

  • Added some error checking when creating a new path
  • Added "Open Folder" link label. This will open the Text Template Path (if it exists) in Windows Explorer.
  • Made the dialog sizable
  • The dialog now remembers its last size and position and uses that the next time it's shown
  • If a new Text Template Path is entered, the user will be asked if they want to copy any old/existing text template XML files into the new folder.

Updated the Select Template dialog

  • Replaced Add button, with Add Link Label
  • Made the dialog sizable
  • The dialog now remembers its last size and position and uses that the next time it's shown
  • Added simple usage text/tip label on the top of form
  • Multiple Template Selection is now enabled. Selecting more than one template and clicking OK will insert them all.
  • Added "Open Template Folder" link label. This will open the Text Template Path (if it exists) in Windows Explorer.
  • Added the "Delete Template(s)" link label where all the selected templates will be deleted.
  • Added the "Edit Template(s)" link label where all the selected templates will be loaded for editing, one by one.

Updated Add Text Template dialog

  • Made the dialog sizable
  • The dialog now remembers its last size and position and uses that the next time it's shown
  • Added "Open Template Folder" link label. This will open the Text Template Path (if it exists) in Windows Explorer.
  • Updated to support an Edit mode.
    • If the dialog is passed an existing template file path, the Title and Insert/HTML will be loaded for editing.
    • When the user clicks on OK, the file will be saved over the old version.
  • The Text Template's Title is used as the default file name, if possible, when saving the new file.

Refactored parts of the application making it a little more real (i.e. less of a quick and dirty hack), reliable and easier to maintain.

 

And some screenshots;

 

Related Past Post XRef:
WLW - Text Templates Plugin on WLWPlugins.com
My Windows Live Writer Plugin - Text Template

NxBRE 3.0 Released

NxBRE - NxBRE v3.0.0 Released

"Finally, after weeks of refactoring, a general beefing up of the documentation, version 3.0.0 is officially out! Check the readme file for discovering the extent of what has been done between version 2.5 and version 3.0. ..."

This is one of those projects I keep thinking that I'll need one day...

Yes, there may be some overlap with Windows Workflow (WF), but NxBRE is out today, includes the source (OSS license = LGPL), is simpler to deploy (i.e. xcopy, etc) and is a little more mature (It's a v3!  ;)

Just a reminder as to what NxBRE is (http://nxbre.org);

"NxBRE is the first open-source rule engine for the .NET platform and a lightweight Business Rules Engine (aka Rule-Based Engine) that offers two different approaches:

  • the Inference Engine, which is a forward-chaining (data driven) deduction engine and that supports concepts like Facts, Queries and Implications (as defined in RuleML Naf Datalog sub-language) and like Rule Priority, Mutual Exclusion and Precondition (as found in many commercial engines). It is designed in a way that encourages the separation of roles between the expert who designs the business rules and the programmer who binds them to the business objects.
  • the Flow Engine, which uses XML as a way to control process flow for an application in an external entity. It is basically a wrapper on C#, as it offers all its flow control commands (if/then/else, while, foreach), plus a context of business objects and results. It is a port of JxBRE v1.7.1 (SourceForge Project from Sloan Seaman) to .NET's Visual C#.

NxBRE 's interest lies first into its simplicity, second in the possibility of easily extending its features by delegating to custom code in the Flow Engine or by writing custom RuleBase adapters or Business Objects binders in the Inference Engine.

..."

Related Past Post XRef:
SourceForge.net: NxBRE v2.1 Released
NxBRE: Edit Inference Engine Rules in Visio 2003
NxBRE (.NET Business Rule Engine)

Thursday, September 07, 2006

Tesseract 1.01

Tesseract-1.01

Notes: Tesseract release notes, Sep 7 2006 - V1.01. Fixes for this release: Added mfcpch.cpp and getopt.cpp for VC++. ...

Building Tesseract:

Windows: Unpack the tar.gz archive

Open tesseract.dsw in DevStudio (preferably version 6, higher versions will be more difficult)

Set Win32 - Release as the active configuration.

Build.

Copy tesseract.exe from bin.rel up one directory level.

Run 'tesseract phototest.tif phototest'

This will create phototest.txt. ..."

Tesseract has already been rev'ed, fixing the missing file issue I ran into with v1.0. This version, 1.01, built the first time (in VC++ 6) and the resulting EXE ran like a charm.

It's still not in a shape for heavy production usage, but that's today. I feel there's a good chance this will flower under Google's care and feeding...

Again, it's worth keeping on eye on this (and with RSS feeds that is just so easy  ;)

Related Past Post XRef:
Tesseract OCR - Released as Open Source

Do you know what's REALLY happening when your screensaver is on?

Now you do... Icon Wars

LOL. This killed me... ;)

(via Janus Pienaar - What happens when your screensaver is on?)

Code Snippets Library

GotDotNet - Code Snippets Library

"Reads and writes Code Snippet files (*.snippet)"

This is a cool VB.net project that provides an library/object model/etc for VS2005 snippets.

The download includes the binary and VB source for both the library and example application.

Wednesday, September 06, 2006

Turbo Delphi, Turbo Delphi for .Net and Turbo C# Available for Download

Turbo Downloads

There's something about the name, Turbo Delphi, Turbo C#, etc that strikes a cord, doesn't it?

That is if Turbo Pascal/C is not before your time... ;)

I'm not sure if I'm ready to play with another C# IDE or get back into Delphi, but I'm still downloading it...

Heck it's Turbo Delphi/Delphi.Net/C# from Borland!

(via Rudolf Henning - Turbo Delphi available)

WLW - Text Templates Plugin on WLWPlugins.com

Windows Live Writer Plugins - Text Template

Cynthia just let me know that she posted about my WLW Text Template plugin on Windows Live Writer Plugins.

I think she did a much better job presenting my plugin than I did... sigh... :0

The post was very positive (yeah) and she made a number of suggestions, all of them good ones (double yeah)... IMHO, few things are cooler to a coder than good suggestions from someone who really wants to improve the product.

I'll try to code these in this weekend. I think the biggest is the "options/filepath" bug (dogh! I really thought I tested that... grr  :|  ) and the ability to edit existing templates (It's lame++ to have to edit them in notepad... ).

In any case, I really dig constructive feature requests (lol... can you tell?). I get jazzed about coding when someone bounces me new ideas...

Thanks Cynthia!

BTW, All you Windows Live Writer users.. you ARE going to WLWPlugins.com, right? It's one of the top Windows Live Writer related sites...

Related Past Post XRef:
My Windows Live Writer Plugin - Text Template

BlogML 2.0 Released

CodePlex - BlogML

"You can download BlogML 2.0 from here and find more about it on these blog posts: 1, 2

About BlogML
BlogML is an XML format for storing the entire content of a blog.  You can use BlogML as a way to archive the contents of blogs or to act as a standard format for transferring content from one blog to another - this could include migrating a blog from one blogging engine to another.  There are currently several blogging engines that provide support for BlogML including:

  • Community Server
  • Das Blog
  • Subtext
  • SingleUserBlog

There are also implementations that exist for converting Blogger content to BlogML.

..."

When I write my Blogger Backup utility (yeah, yeah, I know... I've been talking about this for about a billion years or so... but I might still build it... really... hopefully.. maybe... ;) I'm 99% certain I'll use BlogML as the output. Seems pretty silly to invent my own schema (be it DB or XML), doesn't it?

Seeing the Blogger snip on the BlogML home page, I did a quick search and found a couple implementations. The problem is that they will not work for me. Some require template tweaks and others only grab the last 99/100 posts.

Still BlogML solves one my major problems, what to do with the data once I extract it...

Tesseract OCR - Released as Open Source

Google Code - Announcing Tesseract OCR

"We wanted to let you all know that a few months ago we quietly released - or actually re-released - an Optical Character Recognition (OCR) engine into open source. You might wonder why Google is interested in OCR? In a nutshell, we are all about making information available to users, and when this information is in a paper document, OCR is the process by which we can convert the pages of this document into text that can then be used for indexing.

This particular OCR engine, called Tesseract, was in fact not originally developed at Google! It was developed at Hewlett Packard Laboratories between 1985 and 1995....

...A few things to know about Tesseract OCR: for now it only supports the English language, and does not include a page layout analysis module (yet), so it will perform poorly on multi-column material. It also doesn't do well on grayscale and color documents, and it's not nearly as accurate as some of the best commercial OCR packages out there. Yet, as far as we know, despite its shortcomings, Tesseract is far more accurate than any other Open Source OCR package out there..."

This could be an interesting project...

Currently the SourceForge download doesn't include a binary and won't compile for me (it seems to me missing a ccutil\mfcpch.cpp?) and I don't have the bandwidth to CVS the source.

Still now with Google behind it, I'm adding this project to my watch list...

(via TheMadAdmin - Google Open Sources an OCR program.)

Tuesday, September 05, 2006

My Windows Live Writer Plugin - Text Template

I've posted my WLW Text Template plugin to GotDotNet, both the bin and the VB.Net 2 source... This is a simple plugin, but does the job.

Download (Posted as a GotDotNet User Sample)

Currently you have to manually install it by copying it to your Windows Live Writer\Plugins folder.

What is a text template? It's a snip of text/html  you commonly use when posting. For example, I use it for my "Related Past Post XRef:" snip. It's very generic and can host any kind of text/html. You can use it as a quick and dirty "moods" insert, or kind of thing...

Included in this project is the Textbox with Prompt/Cue user control (on the Add Text Template dialog) and a Folder Picker composite user control (I was tired of wiring up a textbox, folder browser and button, so created a single composite control that included has three and makes it a drag and drop to add to a WinForm...)

Again, this is a simple plugin, with limited testing (i.e. "it works on my machines") and limited error checking (i.e. um... none really). Use at your own risk, I take no responsibility for anything it does to your machine (unless it's good), etc, etc, yada, yada, yada...

 


  

 

Download (Posted as a GotDotNet User Sample)

Related Past Post XRef:
My First Windows Live Writer Plugin (Text Templates)
Guide to Writing a Windows Live Writer Plugin in C#
TextBox with Cue/Prompt

Friday, September 01, 2006

Free Icon's via the Neat Icons Core Set

Neat Icons Core Set

"Free toolbar icon set. The set consists of the icons that are primarily used by software developers. When creating these icons, the most attention was devoted to a neat design and Microsoft standards compatibility, as well as the metaphor that enables the user to feel comfortable when using the software.

Software developers' needs weren't ignored. Each icon is presented in several states, sizes and formats, which makes it possible to use it in the development of Win32/Win64/NET applications and also in web applications for the Internet and intranet

..."

Because I can always use more free icons...

There are the 30 above icons, broken into normal, hot and disabled states and in 9 different formats & sizes (GIF, BMP, PNG in 16x16, 24x24 & 32x32). For a total of 810 icons...

(via WindowsForms.net - Neat Icons Core Set)

Thursday, August 31, 2006

Los Angeles Disaster Response Wiki (LADRWiki)

LADRWiki (http://www.losangelesdisasterresponse.com) - Welcome message

"Greetings! I am the news director at KNBC, Channel 4 in Los Angeles. The purpose of this wiki is to solicit ideas for better serving the public in the aftermath of our next disaster, natural or otherwise..."

Our big quake is coming. Of that, there is no doubt.

The important thing is to prepare NOW. It's not hard, and not doing it will not keep the quake away... Make it a family project. Or a "Christmas Gift Theme." Or a end of month item. Or a "just cause I want to buy cool disaster stuff" day... Or a church project... Or anything, just as long as you get starting preparing.

Call me weird (believe me, I've been called worse), but that was my gift theme last x-mas... Disaster Preparedness. I bought many of the critical things that you just don't normally buy or think about. Red Cross Thee Day backpacks for all the cars. Boxes of 5 year fresh water and survival food. Portable sanitary systems (including privacy tents), emergency sleeping bags, shade canopy, lots of first aid stuff, extra pet supplies, etc, etc, etc.

You guys know it. You know that we'll be on our own for 3-7+ days after the big quake. You KNOW THIS. So prepare now... (If you do it now, you won't have to worry about it anymore... believe me it's a huge weight off your shoulders).

Sorry, the public service announcement is over (for now)...  ;)

(via Metroblogging Los Angeles - KNBC Southland disaster wiki)

"Drop and Forget Dialog Buttons"

The Code Project - Drop and Forget Dialog Buttons

"If you are anything like me, you've been spoiled by Intellisense and want everything to go as quickly as possible when coding. So, when I make dialog boxes (as I am sure you do too), why should I have to set 4-5 things every time I want an OK or Cancel button on a form?

Whenever I drop a button on a form, I inevitably forget one of the following 4 steps (except #3, that one's kind of obvious).

  1. Set the Name to something resembling "OK" or "Cancel" so that it's not just called "button1".
  2. Set the DialogResult to DialogResult.OK or DialogResult.Cancel.
  3. Set the Text to "OK" or "Cancel".
  4. Set the Form's AcceptButton/CancelButton to your new OK/Cancel button (or pressing Enter/ESC won't press OK/Cancel).

I can't tell you how many times I have hit OK or Cancel and then wondered why it didn't do anything. Or the right thing. Or only half of the right thing--the half in the OK button's event handler but not the half in the form's if (dialog.ShowDialog() == DialogResult.OK) block. It seems like when it comes to OK and Cancel buttons, they should "just work".

Out of completeness, I have added "Yes" and "No" buttons as well, which allows us to do Yes/No and Yes/No/Cancel scenarios as well. I'll leave the useless Abort/Retry/Ignore scenario as a reader exercise.

..."

I dig these kinds of simple time/brain cell saving/I hate re-inventing the wheel projects...