Saturday, September 13, 2008

Note To Self: Activator.CreateInstance(Type.GetTypeFromProgID(“ProgID”)) is the new CreateObject(“ProgID”)

CodeProject - Spell Check in .NET without adding a reference ahead of time - version agnostic!

“Very often, when developing software, we have to include a spelling and grammar check function, and don't want to shell out the cash for a proprietary solution. We search the web and find ways to incorporate the MS Word interop capabilities - it always starts with, create a solution, add a reference.

Then, we build it and run it, and it works great. Then, we run it on someone else's computer who either doesn't have MS Word or has a different version, and we have all kinds of problems - assemblies not found in the GAC, etc. Why can't we add the reference at runtime so we can use any version of Word?

Using the System.Reflection namespace, we can!

…”

There are a number of times, now and in the future, where I need to dynamically (i.e. at runtime) invoke a COM object via its ProgID and so this caught my eye. I know you all know this, but I am still trying to delete/re-purpose my VB6 mental pathways and when I saw this code snip in the project I knew that I wanted to capture it for future reference.

Yes, the .Net VisualBasic namespace has a CreateObject (and GetObject, etc) but as one of my personal goals is to start using C# in my personal projects…

Friday, September 12, 2008

Third Annual Simi Valley Freedom Walk, 9/11/2008

DCP_3234

HandBill-Outside

Handbill-Inside

DCP_3238 DCP_3247
Colonel James B Seaton, USMC, , Commanding Officer, Camp Pendleton

 

DCP_3249
Steve Blankenship, Director of Veterans Initiatives for American Airlines

 

DCP_3254
Brad Burlingame, whose brother, Captain Charles Burlingame III, lost his life as the pilot of American Airlines flight 77 when it was hijacked and flown into the U.S. Pentagon.

 

DCP_3259 
Sergeant Neil Duncan, who, while in the service of his country, lost both of his legs in 2005 when an IED ripped through his humvee in Afghanistan. His resilience and drive is shown here, as he stands and gives his speech. The standing ovation he received still touches me…

 

DCP_3262 DCP_3265

DCP_3269 DCP_3274 DCP_3275

DCP_3281 DCP_3283

 

DCP_3284

My son, wife and dad walked with me on this day… A day that is best spent with friends, family and community to remember 9/11 together and to honor those who, past or present, fight for our freedom.

 

Related Past Post XRef:
3rd Annual Simi Valley Freedom Walk – See you there…
Second Annual Simi Valley Freedom Walk, 9/11/2007
Second Annual Simi Valley Freedom Walk
1st Annual Simi Valley Freedom Walk Pictures

Is that a bootable Vista install on a USB thumbdrive in your pocket or are you just…

Dave Glover "Down Under (Oz)" - Creating a Bootable USB Windows Vista Drive

“I've been wanting to create one of these for ages, mostly to install Vista on to DVDLess Laptops and I spotted Jorke doing an OS from his USB Memory stick, ok, so just how did you create it??  Well here's what you need to do!!

Format the USB stick as NTFS
Make USB Volume Active

Load up an (elevated) command prompt window

Run diskpart.exe and then set your drive and partition to point to the stick. Make sure you set the partition as Active.

and you should be good to go!!

hmmm, now for a nice speedy install on my DVDless ASUS Eee PC 1000H, which btw rocks!!

…”

A quick “how to” getting a bootable Vista install on a USB thumbdrive.

Life is but a D20…

WWdN: In Exile - in which i get to hurl polyhedrons

image 

This made me chuckle (and want to break out my D&D gear… LOL )  Geekdom as its finest!

Still trying to figure out what DI/IoC but are afraid to speak up?

CodeProject - Design pattern – Inversion of control and Dependency injection

  • “Introduction
  • The problem – tight coupling
  • Solution
  • Principles of IOC
  • Ways of implementing IOC
  • Implementing the DI
  • What’s wrong with DI FACTORY?
  • The container way
  • Implementation using Windsor
  • References
  • Other Interview question PDF's

In this section we will discuss about how IOC and DI can help us build loosely coupled software architecture. I am not sure should we call this a design pattern or more of a approach. If you search around the web you will see lot of controversy on whether IOC is a design pattern or not. From my point of view it is a design pattern as it solves a problem context.
It would be great to see actual architectures implementing IOC using container oriented approaches. I am sure it will change the way we think about interaction between components.
So let’s understand in detail about IOC and DI.
…”
I’m not afraid to say it… I’m still trying to wrap my head around DI/IoC. There, I said it! I mean I get it but I am not sure I really "GET” it, know what I mean? (Note to Self: And I probably won't until I start coding with it, so start coding with it dummy!  ;)  (You can tell it's a Friday and I start talking to myself and calling myself a dummy... lol)

And I'd bet there's a silent developer majority our there who might be in the same boat as me. We've heard about it, seen few casts, read a few articles, but have yet to actually jump in...

The above Code Project has a few translation issues, but I liked it. I thought it presented one of the problems DI/IoC is trying to solve well and did a good job (with pictures! ;) explaining why DI/IoC is a good solution. The code samples, using Castle Windsor, are also easy to follow and understand.

This article will not be your only stop on the groking DI/IoC, but it's work a quick pitstop...
 

Beyond the DemoWare – A complex (i.e. real world’ish) start to finish Policy Based Management SQL Server 2008 example, brought to us via its ExecuteSQL function.

Bart Duncan's SQL Weblog - Defining Complex Server "Health" Policies in SQL 2008

“Policy Based Management (PBM) is a new feature in SQL Server 2008 that allows you to define a set of policies that capture the intended state for a group of servers. For example, you could define a policy that says that your user databases should all have the auto update statistics database option enabled. (If you’re not yet familiar with PBM, you can read more about it in Books Online or in the PBM blog.)

In SQL 2008, the focus of PBM is primarily on static aspects of server management – policies covering things like schema requirements, or server and database configuration settings. However, there are certain more dynamic aspects of server state that are equally important, but much harder to monitor. Server “health” monitoring (e.g. uptime, responsiveness) is one example. I’m going to show you how you can use the ExecuteSql function to extend the normal capabilities of PBM by defining policies that ensure your servers are servicing queries effectively. You can use live Dynamic Management View (DMV) queries, or even query historical data that you are capturing in a Management Data Warehouse.

IMPORTANT: Before going on, read through this blog post for an overview of the PBM ExecuteSql function.

For an initial example, we’ll use a query that identifies excessive disk response time (>100ms average) for any of the files in a database:

…”

Bart (go Duncan’s!  ;) walks us through creating a more complex Policy Based Management (PBM) than you see in normal SQL Server 2008 demo’s. From the initial SQL creation all the way through to the SQL Health Monitoring Policies and Management Data Warehouse.

The cool thing about this demo is that it’s a pattern we can reuse. Pretty much if you can SQL it, you can PBM it.

These kinds of soup to nuts examples will come in handy once I get the “Go” to look into using SQL Server 2008 at work…

Thursday, September 11, 2008

Get to the core of it… CoreInfo v1.0 from the Sysinternals team

Sysinternals Site Discussion - New Tool: Coreinfo v1.0; A new blog post from Mark - Where in the world is Mark Russinovich?

Coreinfo v1.0: This is a new command-line utility that shows you the mapping between logical processors and the physical processor, NUMA node, and socket on which they reside, as well as the cache's assigned to each logical processor.

…”

Sysinternals - Coreinfo v1.0

“Coreinfo is a command-line utility that shows you the mapping between logical processors and the physical processor, NUMA node, and socket on which they reside, as well as the cache’s assigned to each logical processor. It uses the Windows’ GetLogicalProcessorInformation function to obtain this information and prints it to the screen, representing a mapping to a logical processor with an asterisk e.g. ‘*’. Coreinfo is useful for gaining insight into the processor and cache topology of your system

image

I’m looking forward to my first 16 core, each with 4 hardware threads, machine (what’s that? Next year? lol… ;)

Never Forget

“…One nation under god, indivisible, with liberty and justice for all”

9/11 - Never Forget

See you this evening at the Simi Valley Freedom Walk

Wednesday, September 10, 2008

This is my kind of “Social”… Cheers, a free set of “Social” icons

Smashing Magazine - Cheers: A Free “Social” Icon Set

“…

Today we are happy to release Cheers: a free set of 12 “social” glasses, designed by Helen Gkizi from Webtoolkit4me, especially for Smashing Magazine and its readers.

Download the Set for Free!

You can use the set for all of your projects for free and without any restrictions. However, it’s forbidden to sell them. Please link to this article if you would like to spread the word.

…”

image

I need some RSS right about now… ;)

 

Related Past Post XRef:
Because you can just never have too many icons – 55 Icon Sets from Smashing Magazine
Some Icon Sets via Smashing Magazine - Royal and Pirates (argh...)
35 Very Cool (and Free) Icon Sets From Smashing Magazine
700 Free 16x16 PNG Bitmaps

Spooky cool directions service for your Dash GPS - Call in and directions are sent directly to your Dash

Gizmodo - Dial Directions 411 Phone Service Automatically Beams Routes to Your Dash GPS

Call up "DIR-ECT-IONS" (clever) on your way to the car and tell the friendly robot who answers where you want to go, and you can have a route beamed to your Dash GPS over the web instantly. Dial Directions already works with a few other online and mobile services, but this Dash integration is a pretty great trick…"

www.DialDirections.com

image

I’m hoping to get a Dash unit in the near future and think this service is something I would use. While I'd not use it all the time, but it's one of those when you need it, you NEED it.

I mean how many times have you been somewhere, you don't have access to mapping software/gps, you need to get to point X and don't want to play the "hunt the address down in this darn GPS UI game?" Yeah, me too...

Simple Sudo command line tool for Vista (with C# Source) [Insert clever Phil Collins “Sussudio” quip here]

CraigBlog - Announcing Sudo for Windows

“If you’ve used a Unix much, I’m sure you’re familiar with sudo, a command-line utility that lets you run things as the superuser. Not only it is very handy, but it is the basis for one of the better XKCD strips.

Sudo is one of those things I find myself wishing for in Windows, especially given the new(ish) UAC features in Vista/Windows 2008. There are lots of times when I just want to run something as administrator, dammit. Typing “sudo notepad2 C:\somewhere\foo.txt” would fit the bill.

…All it does is execute whatever arguments get passed to it, but the program itself has the “require administrator” bit in the manifest, so the target program winds up running elevated as well.

…”

Su Do

“Launches other processes with elevated privileges. Like the sudo command in Unix.

Installing

Just unzip the binaries into your PATH somewhere.

Usage

Note : not a GUI app. Use it from a command line.

sudo <program> [ <arg1> [ <arg2> [ ... <argn> ] ] ]

Examples

 sudo cmd

…”

Am I dating myself if I say when I see “sudo” the first thing that comes to mind is the Sussudio from Phil Collins?

Simple, small (7k), easy, yet one that I’m going to use all the time, utility. No install, just copy the exe to your path. And like I mentioned in the title, the C# source is available for download too.

“It’s is Alive!”(Sort of) – SQL Server Notification Services on SQL Server 2008

Joe Webb - Running SQL Server Notification Services in 2008! 

“Late yesterday afternoon, Microsoft posted to their download site a Release Candidate (RC1) for the Notification Services Components Package. This is essentially the same package that was released back in February 2007, with one really major exception - it supports SQL Server 2008!

As one who has worked quite a bit with Notification Services (and still I received calls and emails from around the world regarding Notification Services), I'm very glad to see this. Not only because I'm glad to see a good feature persisted a bit longer, but because Microsoft stepped up and in my opinion made good on an implicit agreement that was entered into when SSNS was incorporated into SQL Server. A feature that some of us, not many I'll freely admit but some of us, used in good faith with the understanding that it would be available in at least one more product revision. And although this component release in no way incorporates SSNS into the SQL Server 2008 product, it does allow SSNS 2005 to be used with 2008.

…”

Microsoft Downloads - SQL Server 2005 Notification Services Components Package RC1

“…

Version: 9.00.4014
Date Published: 9/8/2008
Language: English
Download Size: 2.1 MB - 9.6 MB*

The SQL Server 2005 Notification Services components package provides the following server and client components that are required to deploy and run Notification Services:

  • Service components that enable the SQL Server 2005 Notification Services service to execute and provide notification-processing capabilities.
  • APIs that can be used within custom applications that include SQL Server 2005 Notification Services functionality:
    • Subscription management APIs that enable developers to create subscriptions and subscribers, and to manage subscriber devices.
    • Event submission APIs that enable users to specify events by using the event APIs or stored procedures.


The SQL Server 2005 Notification Services components package does not include the SQL Server Management Studio components of Notification Services.

This release of the SQL Server 2005 Notification Services components provides interoperability for running SQL Server 2005 Notification Services against either an instance of the SQL Server 2005 Database Engine or SQL Server 2008 Database Engine.

Note: This release is a pre-release version and is available only for testing. Product support is not available for this pre-release version.

…”

So SQL Server Notification Services (SSNS) on SQL Serve 2008 is not yet totally dead, yet not fully alive either. Still much better than totally buried and gone though…

I think this was a good move by Microsoft and goes a good bit toward giving me a warm fuzzy feeling about using the new stuff in SQL Server 2008 (i.e. lessens the “should I use this or not as it might be killed like SSNS in the next rev.” feelings).

This gives users of SSNS another 3-5’ish years to move off the it and still lets them take advantage of all the coolness that’s in SQL 2008.

Nice…

 

Related Past Post XRef:
Notification Services in SQL Server 2008 - Not so much... (Notification Services are gone from SQL Server 2008. Dead, gone, no more, say goodbye, etc, etc)

Tuesday, September 09, 2008

Drooling for a free/OSS rules engine for .Net? The DROOLS.NET Primer

CodeProject - Getting Started with Drools.NET

“This Article discusses using the Drools.NET project in a Visual Studio 2008 Forms application. It goes through the steps to use the project files, as well as a brief discussion of the Drools Rule Syntax.

Background

There are lots of articles on the web explaining why applications should have the business logic separated from the application logic. During my time with Blaze Software, Neuron Data, and Inference Corporation, I must have given that presentation a thousand times. I am not going to go into all of that here.

Instead, I will attempt to show what can be done with a Business Rules System -- even if you don’t have the six figure budgets necessary to implement a solution using one of the commercial Rules Management systems, (such as Fair Isaac’s Blaze Advisor or Ilog’s JRules -- or whatever it will be called now they have been bought by IBM.)

JBOSS Rules and DROOLS.NET

An open source alternative to the commercial business rules engines is DROOLS -- re-branded now as JBOSS rules. It has recently given its internal algorithm a speed boost, and it has announced that it will support the legacy syntax used by Inference’s ART, and NASA’s CLIPS project. (as well as several other rules syntaxes.) Honestly, I was never overly fond of the ART syntax – which was too LISP-like for my tastes. However, there is no arguing that it was a very successful language, and there are a lot of examples and applications still available today for it. The main thing is that with DROOLS, you have several syntaxes to choose from, which is always a good thing.

This article is my somewhat expanded example which describes how rules are used in DROOLS.NET, and gives some explanation on how a rules system is implemented. It is not meant to be an in-depth tutorial, it is simply a starting point that I hope is useful.

I have the full application as part of the article so you can download and follow along – that way you don’t end up with typos like the unfortunate Drools.Net developer who did the online docs ;-) I should note that I am using the commercial version of Visual Studio 2008. I have not tested this in the free version, nor in 2005 – and, though I would expect it to run there, YMMV.

…”

There’s something about rules engines that attract me… Yeah, I know, I know, I need a life… Still I dig the dream of having my source and rules separate, with the rules being human readable, easily formatted and written by domain experts (i.e. let the business write the business rules… imagine that!  ;)

 

Related Past Post XRef:
Java Implementation for Mono/.Net
"Converting PDF to Text in C#" with PDFBox/IVKM.Net

OpenXML PowerTools updated – Cell your Excel via PowerShell

Johann Granados - New SpreadSheetML cmdlets at Power Tools for Open Xml

“I have recently added the following new cmdlets to Power Tools for Open Xml for working with SpreadSheetML documents:

Cmdlet  Description

Add-OpenXmlSpreadSheetTable  Adds a new table to a worksheet

Set-OpenXmlSpreadSheetCellValue Sets a value for a cell (or cell range) in a worksheet

Set-OpenXmlSpreadSheetCellType Sets a Cell Style for a cell (or cell range) in a worksheet

Set-OpenXmlSpreadSheetColumnWidth Sets the width for a column (or column range) in a worksheet

And finally, because a sample worth more than thousand words here is a script showing how to use the previously described cmdlets. Enjoy them!!!!”

CodePlex - PowerTools for Open XML

“Combining the technologies of PowerShell and Open XML is a powerful and convenient way to do server-side document processing. The PowerTools for Open XML are sample source code and guidance for developers showing how to build PowerShell cmdlets that can create and modify Open XML documents. Also included are a number of examples of PowerShell scripts that use the cmdlets.

To install and use the PowerTools for Open XML:

…”

Incase you need to poke data into your XlsX via PowerShell… (Just a reminder that the C# source for these cmdlets is available too  ;)

(via Eric White - New Spreadsheet cmdlets for PowerTools for Open XML)

 

Related Past Post XRef:
Powering into OpenXML with PowerShell

[Humor] Maaaaaa Bell

Windows Mobile for Australia - Telephone Recycling

Where old phones go! . . ..everyone of these sheep is made from telephones and cords . . check out their feet!!!

clip_image001_thumb

…”

This made me laugh…

National Preparedness Month: Don’t be afraid.. Be Ready

LAFD News & Information - Terrorism Forces Us to Make a Choice...

Emergency and Disaster Preparedness...

Terrorism forces us to make a choice. We can be afraid... or we can be ready. To prepare your home, family and workplace for an emergency, please visit www.ready.gov

If you see an actual emergency or pending act of terrorism, call 9-1-1.
Those witnessing suspicious activity in Los Angeles should report their observations to the Los Angeles Police Department Terrorism Tip Hotline at 1-877-A-THREAT (1-877-284-7328).

In other parts of the United States, suspicious activity should be reported to local law enforcement or the nearest field office of the Federal Bureau of Investigation.

Submitted by Brian Humphrey, Spokesman
Los Angeles Fire Department” [Post leached in full]

As was said, don’t be afraid, just be ready…

Being ready is not hard, just do a little at a time, over a long time and you’ll be ready by default.

Also remember, it IS our business if you see something funky going on.

Monday, September 08, 2008

CodeTextBox – Syntax highlighting, intellisense all in a simple package

CodeProject - CodeTextBox - another RichTextBox control with syntax highlightning and intellisense

CodeTextBox_Sample_www_kepfeltoltes_hu_

I needed a script-editor control for one of my projects - with syntax highlightning and intellisense for more comfort.
I did a search on CodeProject and Google, but haven't found any - just separate solutions for one of the two functions... The one I found with both syntax highlightning and intellisense just wasn't flexible enough for me, because it could be used only for C#, and only could handle classes (intellisense popped up after pressing the . key). As I wanted to use this mostly for LUA, this simly wasn't enough. I decided to use this control as a sampe, and write my own, flexible one. …”

I thought this was a neat project, one that I think I could use at some point. It’s simple and easy with everything controlled via properties.

Sunday, September 07, 2008

SpeedyFx, MASH and Fast Text Extraction for indexing, searching and classification

Extremely Fast Text Feature Extraction for Classification and Indexing

“Most research in speeding up text mining involves algorithmic improvements to induction algorithms, and yet for many large scale applications, such as classifying or indexing large document repositories, the time spent extracting word features from texts can itself greatly exceed the initial training time. This paper describes a fast method for text feature extraction that folds together Unicode conversion, forced lowercasing, word boundary detection, and string hash computation. We show empirically that our integer hash features result in classifiers with equivalent statistical performance to those built using string word features, but require far less computation and less memory.

7. CONCLUSIONS & FUTURE WORK
We have shown that using SpeedyFx integer hashes in place of actual words is faster, requires less memory for transmission and use of multiple classifiers, and has an effect on classification performance that is practically noise compared to the effect of other common parameters in model selection. We showed that MASH has strong, uniform performance for words, though not appropriate for long blocks of text. Moreover, we have demonstrated the ability to classify a text by many classifiers many times faster than is possible with typical code.

…”

There’s some interesting work here in this 16 page PDF from HP Labs that I’d like to take a closer look at, given the time. We do a great deal of text extraction and anything that can speed that up would be welcome…

(via Complex Discovery - Extremely Fast Text Feature Extraction)

Want to have a contest/drawing/give-away/thing on your blog, but don’t want the management/selection/admin headache? Then the ContestMachine might just be what you are looking for…

TechCrunch - ContestMachine: A Product Giveaway Widget For Bloggers

“Giving away products can be a logistical pain. For instance, when we give away a T-shirt or laptop, we have to go through hundreds of comments, contact the person, and do a lot of manual processing. A new Y Combinator startup called ContestMachine that just launched makes giving stuff away as easy as putting a widget on your blog.

You create a contest widget by entering all the details of the giveaway: prizes, deadlines, rules. Winners can be randomly chosen by ContestMachine or judged by the blogger. It automates the process of creating giveaways, and opens up contests to any blogger or small business who has a Website. The service is free to try out for up to two contests a month, and then charges $9 a month or $90 a year for more contests.

…”

ContestMachine

image

Run a contest or giveaway on your blog or website. We handle it all, from collecting entries to choosing and contacting winners…”

Now if only I had some cool Greg’s Cool Thing of the Day swag thing to give away… LOL.

Let’s look around the office here, what can I give away (oh the pain… must keep it all! Yes, my precious, must keep it all!  ;)

 

Okay, I have three of these, I guess I can give one away… ;)

Enter in to the random drawing below, running from today to mid day next Saturday, where one luckily winner will get this many of a kind figurine! Yes, it has nothing to do with this blog, but hey I have three, and want to try out the ContestMachine, so here you go!

Using Visual Studio to debug a Mono process running on Linux

Miguel de Icaza's web log - Using Visual Studio to Debug Mono

“The following screenshots shows Visual Studio debugging a remote Mono process running on a Linux box.

medium-Breakpoints

Breakpoints, current line, and stack traces.

The setup works like this: you run a debugging server on Linux. On Windows you install a Visual Studio extension that provides a Debugging Engine and the configuration tools to start your application.

Then you start your application from Visual Studio (Tools/Launch with Mono) which will send the binaries and debug information over to Linux and execute it.

…”

Is it just me or does this seem magical? Man, that’s just officially pretty cool…

Interesting how cross machine/process/etc debugging has improved in the last few years. Like the breakpoint, trace, debugging of SilverLight 2 apps running on a Mac and on my Zune and XBox360, etc.

(via tweet from Jon Galloway)

Embrace your home town cultural heritage - More on Simi Valley’s Bottle Village

BV Buzz - Bottle Village Stuff

image

“Grandma Prisbrey's Bottle Village
is located and can be viewed from the street at:

4595 Cochran
Simi Valley CA 93063
on the North side of Cochran between Stearns and Tapo St.

(From the 118, exit at Stearns, turn South, proceed to Cochran, Turn Right)

…”

www.BottleVillage.com

menu_1_home

“Welcome to the official home page for Grandma Prisbrey's Bottle Village.

This folk art environment is the single handed work of self taught senior citizen Tressa "Grandma " Prisbrey.

Located in Simi Valley California, Bottle Village is lauded by art scholars, The State of California, The National Register of Historic Places and in exhibitions, as a major artistic achievement.

Unfortunately, Grandma Prisbrey's Bottle Village is disintegrating. The 1994 Northridge earthquake struck 8 miles away and badly damaged the Village. We hope this web site will get the word out that help is needed now. Furthermore, it's a wonderful way for you to become educated, enlightened, and entertained by a remarkably inventive everyday woman and her famous creation.

…”

Bottle Village is one of those very cool cultural heritage and historical sites that seem to hide in plain site, on the fringes of our modern society, the kind where you just love it and can see through to the beauty inherit in it… (or not for those who think it’s just a eye sore and should be bulldozed to make room for another couple cookie-cutter track homes… “boo, I say… boo on you!”)

Thanks to JJ for the heads up about this site. :)

 

Related Past Post XRef:
Simi Valley's Bottle Village
Simi Valley Bottle Village Movie