Wednesday, January 14, 2009

Windows Cloud Now – 15 minute guide to Windows, IIS and ASP.NET with Amazon’s EC2

BillS IIS Blog Posts - How to Run Windows, IIS and ASP.NET in the Cloud on Amazon EC2 (in 15 mins)

“…

The purpose of this post is to provide a quick walkthrough of how to setup your own EC2 account and run Windows and IIS in about 15 mins.  Amazon’s approach to cloud computing will be familiar to anyone who is already running Windows Server themselves, as it essentially offers Administrative access to virtual server instances running on Amazon’s infrastructure.  Once you’ve created your first instance of Windows server in EC2, you can log on to your Amazon-based Windows Server via Remote Desktop and install software and manage the server the same way you would if it was running in your home or office.  Amazon just released their EC2 Web Console, which makes deploying new instances of Windows Server, and connecting to them, very easy.

…”

If you want to “Cloud Now” and would like, are are more comfortable with, a more traditional virtual machine like environment, then Amazon EC2 and this guide is for you…

 

Related Past Post XRef:
EC2 for Windows/SQL Server now in open beta – Windows in the Cloud, today…
Amazon EC2 to support Windows and SQL Server (later this fall)…

Tuesday, January 13, 2009

Firebird ADO.NET Provider (with source) for Entity Framework Beta Released

ADO.NET team blog - Beta of Firebird ADO.NET Provider with Entity Framework Support Available

“I'm pleased to announce that a beta of the Firebird ADO.NET provider with Entity Framework support is now available.  Congratulations to Jiří Činčura and to everyone else who has worked on this project so far!

For more information, please see Jiří's blog post here or access the download page for the provider here.

…” [Post leached level: 99%]

Jiří {x2} Činčura - Firebird ADO.NET Data Provider 2.5.0 Beta 1 for .NET 3.5/2.0 [with Entity Framework support]

“I'm pleased to announce 2.5.0 Beta 1 for .NET 3.5/2.0 [with Entity Framework support] version. It contains several bugfixes as well as brand new Entity Framework support (still beta!). Looking forward to your feedback.

Binary as well as sources can be downloaded from http://www.firebirdsql.org/index.php?op=files&id=netprovider.” [Post leached in full]

Firebird - Firebird .Net Providers Downloads

image

It’s been a few years since I’ve posted about Firebird, so after seeing this I felt it was time…

 

Related Past Post XRef:
Enterprise Library Data Provider for Firebird
DotNetFirebird - Using Firebird SQL in .NET
MS SQL Server to FireBird migration

LiveZoom with the new ZoomIt v3.0

Sysinternals Site Discussion - Updates: ZoomIt v3.0, Process Explorer v11.32, Autoruns v9.38

ZoomIt v3.0: This major update to ZoomIt, the Sysinternals screen magnification and annotation utility, adds a LiveZoom mode on Windows Vista and higher, allows you to change the typing and break timer font, adds the ability to copy the magnified screen to the clipboard with Ctrl+C, and introduces a new configuration interface.

Process Explorer v11.32: This update fixes a bug in the process security page's name resolution and uses history graph tooltips that track the mouse.

Autoruns v9.38: This fixes a bug that prevented v9.37 from viewing the system account's profile on 32-bit Windows.” [Post leached in full]

I really hate to say this, but I’ve never used ZoomIt. Yeah, I know, no wonder my presentations byte (and why I tend to walk so much between my PC and the screen, gesturing wildly in front the the projector).

I think it’s about time I join the professional presenter club, at least tool wise, and start using ZoomIt (or like tool).

Sunday, January 11, 2009

Natively booting to a VHD with Windows 7 - 10 Steps to VHD’ness

Cesar de la Torre – BLOG - Windows 7 - Natively Booting from a .VHD file (Virtual PC image)

“Most important thing to keep in mind is that we currently cannot boot from any kind of .VHD.

Actually, I have just managed to boot from a Windows 7 installed on a new .VHD, and I installed it right from the Windows 7 DVD. We can do a similar process with "Windows Server 2008 R2 (beta)" installed on a .VHD file, as well.

If you'd use Virtual PC 2007 to install the Virtual image, the produced .VHD wouldn't work when trying to boot from the .VHD.

A.-  Creating the .VHD file and Windows 7 installation on that .VHD file

1. Boot the machine using the Windows 7 DVD

10. Reboot, and you got it!!!!

B.- Configure boot options

…”

Hardware 2.0 - How-to: Getting started with .VHD files in Windows 7 

“Some of you seem confused about how Windows 7 goes about supporting .VHD files as used by Virtual PC, Windows Server 2008 R2 and Hyper-V. Here’s a quick how-to work with .VHD files in Windows 7.

OK, let’s begin with a Windows 7 beta 1 install. Fire up a Command Prompt and type the following:

…”

This is something I’ve wanted to see since it was mentioned at PDC. There’s just something I find too cool about booting to a VHD. Now if I can configure it in such a way as to have differencing disks (i.e. to have the base OS on the main and then later “new” stuff on the diff’s, making it drop dead easy to revert back to a clean/base OS, or to start a new chain off of that base… etc)

Ora, The Region Alternative

CodePlexOra

“Ora is a Visual Studio 2008 add-in that provides an instant grouped overview of the class, interface or struct you are viewing or editing. Because the members are grouped in the order of your choosing, and the view instantly appears when you click in the code of a class, there is no need to abuse the #region feature. Just keep Ora docked next to the source editor and the equivalent groupings just appear automatically.

orascreenshot

Forget using cumbersome #region statements to group together class members. What if you want to see them grouped a different way? And isn't it a bad idea to repeat the same information twice in source code? What if the region structure doesn't reflect the truth? Regions, like comments, should be used to supply information that can't be recovered automatically by an add-in, such as Ora.

Ora is latin for region, amongst other things.

…”

An interesting Visual Studio add-in for those who looking beyond regions for access/grouping. It’s kind of like the Class Diagram but on steroids * 10. And one of cooler things is that sample code is provided so you can add your own grouping. So you’re not tied to how the author decided to group the methods…

Oh yeah, it works for VB projects too.  ;)

(via Visual Studio GalleryOra)

Saturday, January 10, 2009

Greg’s “Weight Toss” – This is my one year Fat-iversary

Last year I decided it was time to get serious about managing my weight. I’ve always fought my weight as has my father and his family. I looked to him and them as an example, and excuse. Last year I was tired of excuses. It was time I lead by example and took ownership of my weight. To truly own the problem, for if you don’t own it in your heart, it’s very hard to change it. Last year it was time I finally owned my weight.

On 1/9/2008 my official weight was 266 pounds, total cholesterol 223, LDL 187 and HDL 38 and my pants were 44’s. Yeah, ouch.

With professional advice and guidance, I made an wild and insane seeming at the time weight goal of 200 pounds. My initial daily calorie intake goal was 2200, which we’ve since adjusted downward to my current, self imposed, daily goal of 1,600’ish. On 1/10/2008 I started logging my calorie and fat intake and walking at least 30+ minutes a day, five days a week.

Yesterday at my “official” weigh-in I was 198, total cholesterol 152, LDL 93 and HDL 41 and I’m wearing 35’s. Oh cool is that!

image

One way to think about weight management, is that it’s not weight “loss”. You don’t want to find this weight again, do you? Then it’s not a loss. You’re not losing anything. You are the weight tossing! Tossing it out with the garbage. Just as you don’t want to find that garbage back in your house, you don’t want to “find” that weight again either… Not a loss but a toss.

So how do you toss the weight? First, accept that you are going to make an ongoing life style change. That you don’t need to diet, as diets end, but instead to make a basic and long term change to your eating habits and life style.

Second, I suggest professional advice and guidance. My insurance covered my visits with a licenses dietitian (minus co-pay of course). Yours might too. In any case, GET PROFESSIONAL ADVICE. They are trained to help you, they can provide you tips and guidance you might never find if to try to go it alone. It’s not hard, nor painful and they are there to help you… (Thank you Tami, for all your help and advice! You rock! :)

Third, log what you eat, calories at the very least. You will be amazed at the calorie cost of food you are taking in. Yes, it can be hard to get started, but it’s vital that you do this. If you don’t know what you’re taking in, then it’s hard to know how much you need to burn. Just the very act of logging helps make you aware of what you’re eat. I have a log of everything I ate in the last year (in Excel, cause I’m a geek, with charts, daily summary, etc  ;) that without which I wouldn’t have been able to make the life style change I needed to make.

It’s like not having a gas gauge on your car. Imagine the gas tank could get bigger as needed and we didn’t have a gas gauge. We would fill it all the time and keep it full “just in case”? We’d probably also overfill it, not even realizing we were doing it, wouldn’t we? A food log can be your body’s gas gauge.

If you do nothing else, at least be aware of the calorie cost of your current diet. Don’t “cheat” and don’t skip entries. Just be honest with yourself and look at what you’re eating, in hard numbers. I’m telling you, you’ll be shocked at the cost of that dinner you had last night. Or the lunch, or that snack.

You don’t need an expensive program or some fad diet. You need to know what you’re taking in so you know how much to burn. And if you’re not burning much, say because you’re a programmer and sit on your butt most of the day, then you just need to take in less. Sounds simple, but it will take work. Just as important is a willingness to be honest with yourself and to realize that this is a life style change and that only YOU can do it.

Finally, there’s should be no guilt. If you want some ice cream, then have some. Want a cookie? Have one. Just log it and realize you might now have to do more to burn it off. Don’t punish yourself, don’t deny yourself and don’t starve yourself. Remember, “ongoing eating and life style change”. Drastic behavior is not sustainable.

 

Okay, enough for now.

BTW, my new goal is 180. I’d really like to comfortably wear 34’s, and Large T-Shirts (last year I was wearing XXL’s). How cool would it be to say, “I lost a foot… 44’s to 34’s…”   ;)

Friday, January 09, 2009

Using console GHTMDOC utility to convert HTML/ASPX files into PDF’s

CodeProject - Convert aspx pages to pdf

“…

There have been some articles on converting local files to pdf on this site, but I was looking for a solution to serve dynamic pages directly as PDF. This should be done by using the user's session, eg rendering a user-specific report. 

This article shows a quick and dirty way to accomplish this using ghtmldoc. Ghtmldoc is a GPL licensed program that converts a html file on disk to pdf. I have included a binary version of the program, but feel free to create your own as I'm not sure that it's the latest version. You can find more info on htmldoc at http://www.easysw.com/htmldoc/ (I am not in any way connected to them.)

…”

I guess I’m a serious console app kick…

Anyway I’ve been keeping my eyes open from a good, cheap (free) HTML to PDF conversation utility that I can use from .Net for a feature I want to add to my Blogger Backup utility.

All the good conversion libraries I’ve found have all been commercial, and since my utility is open source/source available (and there’s no way I can justify to me DFO spending the funds), the feature has been stalled.

I don’t know if this is the “one” but it looks worth a try…

 

Related Past Post XRef:
Using Tesseract (Open Source OCR from Google) as a tool to learning .Net console application launching and monitoring
Deadlock avoidance when using redirected StandardInput, StandardOutput and StandardError with System.Diagnostics.Process
A C# class to make running, and capturing their output, command line/console applications “slick” and easy (From the author of PoshConsole)
.NET and integration with BCP

Using Tesseract (Open Source OCR from Google) as a tool to learning .Net console application launching and monitoring

Rick Minerich's Development Wonderland - Processes in .NET Part 3 – Interfacing With Simple Console Programs by Example, Tesseract OCR

“Did you know that .NET provides an easy way to interact and control console programs?  In this article I will walk you through this process by creating a wrapper class for Google’s Tesseract OCR application.  At the end of this post, I will provide a complete WinForms-based frontend for Google’s Tesseract OCR Engine

You would think that this is a particularly simple case as Tesseract only needs to be passed in parameters and requires no flow control.  Ideally, we will simply leverage the Process class to control how Tesseract is launched and read from it’s output.  Initially, this is only a small jump from what we learned in Processes in .NET Part 2.  The only real difference here is that instead of using Verbs we are specifying behavior through the ProcessStartInfo’s Arguments property

Unfortunately, while this very simple example will work in many cases, this is not one.  This is because Tesseract.exe secretly launches a separate process and immediately exits.  This makes the WaitForExit() call look like it was successful but, as OCR takes a while, when you try to read from the output file it will either not yet exist or it will be locked for writing by the Tesseract process.

There are many different ways to approach this problem.  In this case an easy method would be to try repeatedly to access Tesseract’s log file using a timeout to ensure our program doesn't lock up. …

Designing a Wrapper Class

Tesseract has a number of quirks which makes it somewhat annoying to deal with, at least when compared with most other command line applications.  It’s important to be on the lookout for these kinds of small quirks when building an interface to an application.  For completeness, I’ll list what I’ve found for Tesseract here along with solutions.

An Asynchronous Wrapper for Easy WinForms Integration

Once you have all of the little quirks of your application covered, the only issue left is that calling your ExtractText method leaves your application locked up for it has returned.  The best way to deal with this is to use an DynamicInvoke on a delegate and managing the update to your console application via a callback.  To make this easy I wrote an asynchronous child class.

…”

There’s a ton of cool lessons in this post, from dealing with Tesseract, to handling unusual command line/console app’s to writing non-blocking WinForm code…

(via Reflective Perspective - The Morning Brew #261)

 

Related Past Post XRef:
Tesseract 1.01
Tesseract OCR - Released as Open Source
.NET and integration with BCP

Thursday, January 08, 2009

“Query Analyzer” for SimpleDB – Visual Studio 2008 Add-in that makes querying SimpleDB almost too easy?

Mindscape Blog - SimpleDB Management Tools Released

“With the present buzz around cloud computing, it’s proved a timely moment for Amazon’s SimpleDB database service to come out of beta. And since it’s free for low-volume usage there’s been a big uptick of interest in SimpleDB. However, although Amazon provide APIs and libraries for programming against SimpleDB, they don’t provide any off the shelf tools for quickly managing or viewing your SimpleDB data.

We’re therefore pleased to announce the release of SimpleDB Management Tools, a Visual Studio add-in that you can use to manage your Amazon SimpleDB domains and data from within VS2008.

sqlquery

Using SimpleDB Management Tools, you can create and delete domains, view the contents of your domains, run queries and edit and save data, using the kind of visual interface familiar from traditional databases such as SQL Server or MySQL. SimpleDB Management Tools installs itself as a data provider in Server Explorer, from where you can navigate your domains and launch query windows …

There’s a free version of SimpleDB Management Tools available. The free version only allows you to view or edit the first 20 results of a query, but is otherwise fully functional and is not time-restricted. Please note that you’ll need Visual Studio 2008 Standard edition or above. Purchasing a license is inexpensive at only $29 per seat and is available immediately …”

Why too easy? Because now they’ve made me really want to play with SimpleDB! Grrr! It’s not like I don’t have enough “Greg Project’s” already!  LOL

What caught me eye was the interface. There just something about writing SQL statements… Yeah I know, I need help. I also liked the price point. Both that there’s a free (limited) one and that the commercial version is $29. $29 is nice price point for something like this. Not too cheap, yet still affordable for hobbyist dev (or Pro who has to justify this to his DFO, his Domestic Financial Officer… ;)

BTW, if you’re interested in this, then you might want to check out their LightSpeed product. This is their ORM product (for which they are also offering a Free Express version) which has, or will have in the very near future, native support for SimpleDB. Yep, a Cloud enabled ORM… How cool is that?

Thanks to John-Daniel for the heads up.

 

Related Past Post XRef:
Amazon's new SimpleDB Service

Want the source code and unit tests for the managed Silverlight 2 controls included in System.Windows.dll, System.Windows.Controls.dll, and System.Windows.Controls.Data.dll? Here you go…

Microsoft Downloads - Sample Source Code for Silverlight 2 Runtime and SDK Controls

“This download contains the source code and unit tests for the managed Silverlight 2 controls included in System.Windows.dll, System.Windows.Controls.dll, and System.Windows.Controls.Data.dll.

File Name: Silverlight 2 Control Sample Source Code and Apps.exe
Version: 2
Date Published: 1/7/2009
Language: English
Download Size: 881 KB


To develop Silverlight-based applications that use the Silverlight 2 controls, you do not need this source code. The source code for the Silverlight 2 controls enables you to learn the inner workings of the controls. This is useful if you want to extend the controls or use them as a reference implementation when you implement your own controls. Complete unit tests provide additional guidance in developing polished, professional controls.

The source code for the Silverlight 2 controls includes implementations for the following controls:

  • ButtonBase
  • Button
  • HyperlinkButton
  • CheckBox
  • RadioButton
  • CheckBox
  • ToogleButton
  • RepeatButton
  • RangeBase
  • Slider
  • ScrollBar
  • ProgressBar
  • Calendar
  • DataGrid
  • DatePicker
  • GridSplitter
  • TabControl

…”

The download is a self extracting zip file with a ton of source (C#) and tests. Just the thing to get the blood pumping on a Thursday… ;)

image

BTW, you’ll need the “Microsoft® Silverlight™ Tools for Visual Studio 2008 SP1” installed in order to open these projects/solutions (funny that… lol ;)

Wednesday, January 07, 2009

IE8 Windows Update Blocker Toolkit Released

Microsoft Downloads - Toolkit to Disable Automatic Delivery of Internet Explorer 8

“The Internet Explorer 8 Blocker Toolkit enables IT Administrators to disable automatic delivery of Internet Explorer 8 as a high-priority update via Automatic Updates and the Windows Update and Microsoft Update sites.

File Name: IE8BlockerToolkit.EXE
Version: 1
Date Published: 1/5/2009
Language: English
Download Size: 115 KB


To help our customers become more secure and up-to-date, Microsoft will distribute Windows Internet Explorer 8 as a high-priority update through Automatic Updates for Windows XP Service Pack 2 (SP2) and higher, Windows XP Professional x64 Edition, Windows Server 2003 SP2 for x64 and x86, Windows Vista for x64 and x86, Windows Vista SP1 for x64 and x86, and Windows Server 2008 for x64 and x86. This Blocker Toolkit is intended for organizations that would like to block automatic delivery of Internet Explorer 8 to machines in environments where Automatic Updates is enabled. The Blocker Toolkit will not expire.

Note:

  • For computers running Windows XP or Windows Server 2003, the Blocker Toolkit prevents the machine from receiving Internet Explorer 8 as a high-priority update via Automatic Updates and the Express install option on the Windows Update and Microsoft Update sites; Internet Explorer 8 will be listed as an optional update with the Custom install option.
  • For computers running Windows Vista or Windows Server 2008, the Blocker Toolkit prevents the machine from receiving Internet Explorer 8 as an important update via Automatic Updates on the Windows Update and Microsoft Update sites; Internet Explorer 8 will be listed as an optional update.
  • The Blocker Toolkit will not prevent users from manually installing Internet Explorer 8 as a Recommended update from the Windows Update or Microsoft Update sites, from the Microsoft Download Center, or from external media.

…”

While I wish I lived in a world where I wouldn’t need this, I don’t. So I’m sure I’ll need this (as I need the IE7 Blocker).

 

Related Past Post XRef:
"Toolkit to Disable Automatic Delivery of Internet Explorer 7"

Monday, January 05, 2009

code2plan – Free Agile project management for the single developer or dev team

code2plan

image image

This is a pretty cool looking project written in .Net 3.51, WPF and LINQ to SQL. While the source is not available, the basic edition will be free for forever.

If you’re looking for a simple project management tool for your project and/or team, are doing agile based dev (XP, Scrum, etc), then this might be something to check out. Since it’s in beta I’m sure the team (two coding till their fingers bleed guys) will be very open to your comments and suggestions…

Thanks for the Jesse for the heads up

SQL Server VARBINARY vs FILESTREAM – The code and performance trade offs saving the right sized files to the right datatype.

CodeProject - How to store and fetch binary data into a file stream column

“File streams were introduced in SQL Server 2008. They offer the capability to store binary data to the database but outside the normal database files. Earlier, varbinary used to be stored inside database files, which had many side-effects. Because SQL Server stores data in blocks which are arranged as extents, the data in earlier varbinary columns had to conform to the block structure (although a bit different from normal data blocks).

In SQL Server 2008, if a varbinary column is defined to be stored as a file stream, the binary data is stored in a special folder structure which is managed by the SQL Server engine. The only thing that remains inside the database is a pointer to the file along with a mandatory GUID column in order to use the file stream from the Win32 client.

File stream data can be used from the .NET Framework using the traditional SqlParameter, but there is also a specialized class called SqlFileStream which can be used with .NET Framework 3.5 SP1 or later. This class provides mechanisms, for example, for seeking a specific position from the data.

With a small amount of binary data, it's not efficient to use a file stream. This is because it needs extra overhead like file creation and handling. These operations are not needed when predefined database files are used. However, with larger files, file streams are quite efficient. The following charts show the elapsed times for upload in milliseconds using different techniques, on my development box. The key specifications for the computer used were:

  • SQL Server and client application on the same machine
  • Processor: Intel Core2 Duo, 1.8 MHz
  • 4 GB physical memory
  • Database files on drive C:
  • Files uploaded from drive E:
  • Drives C: and E: on separate physical SATA disk drives

The charts show average upload times for:

  • 100 KB file repeated 3 times for each measurement
  • 1 MB file repeated 3 times for each measurement
  • 10 MB file repeated 3 times for each measurement

…”

What I liked about this article is that not only is the sample a complete soup-to-nuts, SQL Create all the way through to sample code, but it also provides a harness for performance comparison using storage different techniques (as well as data run charts ;).

It makes clear, what is becoming more commonly known, that FILESTREAM is good for larger files and VARBINARY for smaller ones. But of course, YMMV. Also make sure you listen to the Run As Radio show I link to below, Run to Run As Radio for a great SQL Server 2008 FILESTREAM show, for some great FILESTREAM configuration/performance tips.

 

Related Past Post XRef:
SQL Server 2008 FileStream and VB.Net – The Sample
SQL Server FileStream Whitepaper – A DBA/IT focused FILESTREAM paper
Run to Run As Radio for a great SQL Server 2008 FILESTREAM show
SQL Server 2008 FILESTREAM Attribute from Start to C#
SQL Server 2008, the FILESTREAM Attribute and Partitioning - Apparently not as easy as it looks (yet at least)...
A future world without the SQL Server Image/Text/NText data types. Now's the time to start planning for that future...
SQL Server 2008 FILESTREAM - Writing a file to a FILESTREAM column
More SQL Server 2008 FileStream Fun
Playing with the SQL Server 2008 FileStream Attribute

Two new Lucene.Net Articles, Text Analysis and Custom Synonym Analyzer

CodeProject - Lucene.Net - Text Analysis

“Lucene.Net is a high performance Information Retrieval (IR) library, also known as a search engine library. Lucene.Net contains powerful APIs for creating full text indexes and implementing advanced and precise search technologies into your programs. Some people may confuse Lucene.net with a ready to use application like a web search/crawler, or a file search application, but Lucene.Net is not such an application, it's a framework library. Lucene.Net provides a framework for implementing these difficult technologies yourself. Lucene.Net makes no discriminations on what you can index and search, which gives you a lot more power compared to other full text indexing/searching implications; you can index anything that can be represented as text. There are also ways to get Lucene.Net to index HTML, Office documents, PDF files, and much more.

What are Analyzers?

An Analyzer has a single job, and that is to be a advanced work breaker. Which an object that will read a stream of text and break apart the words into objects called Tokens. The Token class will generally hold the results of the analysis as individual words. This is a very brief summary of what an Analyzer can do and how it affects your full text index. A good Analyzer will not only break the words apart, but it is also performs a transformation of the text to make it more suitable for indexing. One simple transformation an Analyzer can do is to lowercase everything it comes across, that way your index will be case insensitive. 

In the Lucene framework there are two major spots where an Analyzer is used, and that is when indexing and then searching. For the indexing portion, the direct results of the Analyzer is what gets indexed. So for example, in a previous example of an Analyzer that will convert everything to lowercase, if we come across the word "CAT", the analyzer will output "cat", and in the full text index, a Term of "cat" will be associated with the Document. For an even bigger example if we use an Analyzer that will break the words apart with the spaces, and then the Analyzer will convert it all to lowercase the follow the results should look something like this.

Attached to this article is the the Analyzer Viewer application, that I made. Attached are both the source and a ready to run binary of the application.. The sample is more like a little utility to see how the basic Analyzers included with Lucene.Net will view text. The application will allow you to directly input some text, and it will show you all the results of the text analysis, and how it split them up into tokens and what transformations it applied.

Some interesting things to looks at include, typing in email addresses, numbers with letters, numbers alone, acronyms, alternating cases, and just anything else you want to play with to see how the indexing process goes. 

Implementations of a Tokenizer.

As i mentioned earlier the Tokenizer class is an abstract base class of a TokenStream. Lucene.Net provides a few implementations of a Tokenizer that it uses in some of the Analyzers. Here is a couple of them and a small description of each.

KeywordTokenizer - This Tokenizer will read the entire stream of text and return the whole things as a single Token.

…”

CodeProject - Lucene.Net – Custom Synonym Analyzer

“…

How Do I Get Lucene.Net to Work with Synonyms?

The goal here is to be able to search for a word and be able to retrieve results that contain words that have the same meaning as the words you are searching for. This will allow you to be able to kind of search by meaning than search by the keywords.

We can easily get Lucene.Net to work with synonyms by creating a custom Analyzer class. The Analyzer will be able to inject the synonyms into the full text index. For some details on the internals of an Analyzer, please see my previous article Lucene.Net – Text Analysis.

Points of Interest

The SynonymAnalyzer is really great for indexing, but I think it might junk up a Query if you plan to use the SynonymAnalyzer for use with a QueryParser to construct a query. One way around this is to modify the SynonymFilter, and SynonymAnalyzer to have a bool switch to turn the synonym injection on and off. That way you could turn the synonym injection off while you are using it with a QueryParser.

The code attached includes the Analyzer Viewer application that I had in my last article, but it also includes an update to include our brand new synonym analyzer.

..”

 

Two new cool Lucene.net articles from Andrew Smith (blog). I swear that I’m going to use Lucene.Net one of these days… ;)

 

Related Past Post XRef:
Five pages to getting started with Lucene.Net - Introducing Lucene.Net
Lucene.Net & C# Indexing and Searching WinForm Example
Lucene.Net Resource List – Books, links and API’s, oh my…
LINQ to Lucene
Using Lucene.Net to Index And Search C# Source
Lucene.Net 2.0 Final Released
"DotLucene / Lucene.Net has moved to ASF"
Indexing Database Content with dotLucene
DotLucene: Full-Text Search for Your Intranet or Website using 37 Lines of Code

Friday, January 02, 2009

See behind the SQL Server curtain with the Internals Viewer for SQL Server

Notes from SQL Server Premier Field Engineer - Internals viewer for SQL Server

“…

I am guessing I won't be making big news if I tell you that SQL Server database is just a collection of 8K pages. Each page serves different purpose. There are data pages, which hold actual rows in tables, there are index pages which make up index, SGAM/GAM pages which track extents, PFS pages which track free space on pages in the database, IAM pages, overfow pages and many others... … If all this sounds familiar, let me tell you that there is actually a better way :). Danny Gould developed an awesome tool Internals Viewer for SQL Server which integrates with SQL Server Management Studio and allows you easily drill into individual pages and better understand the relationships between them and overall architecture of SQL Server storage engine.

Give it a serious try and have fun playing and learning internals of Microsoft DBMS !”

CodePlex - Internals Viewer for SQL Server

“Internals Viewer is a tool for looking into the SQL Server storage engine and seeing how data is physically allocated, organised and stored.

All sorts of tasks performed by a DBA or developer can benefit greatly from knowledge of what the storage engine is doing and how it works

Features

  • Integration with SSMS (SQL Server Management Studio) 2005 and 2008
    • The application is installed as a SSMS add-in
    • Internals information integrated into the Object Explorer
    • Transaction Log viewer integrated into the Query Results
  • Allocation Map
    • Displays the physical layout of tables and indexes
    • Displays PFS status
    • Overlay pages in the Buffer Pool
  • Page Viewer
    • Displays Data pages including forwarding records and sparse columns
    • Displays Index pages
    • Displays allocation pages (IAM, GAM, SGAM, DCM, and BCM pages)
    • Displays pages with SQL Server 2008 row and page compression

…”

Sometimes you need to see behind the curtain and into the depths. This utility, for which the C# source is available too, sounds like it is one of those tools that can come in handy during a SQL Server spelunking expedition.

This utility also provides a working example of how to integrate into SQL Server Management Studio, so it’s like a two for one deal ;)

Free Download Manager (FDM) 3.0 Released

Free Download Manager - FDM 3.0 is released!

“Dear all! We have released Free Download Manager 3.0!
We are happy to announce that FDM is seeing the New Year in with a different look and feel of its own.

What’s new:

  • Manage your downloads in Apple Safari and Google Chrome, making use of the seamless FDM integration
  • Set priorities within a single torrent download, or even exclude separate files from downloading
  • Share your data with other users in a peer-to-peer network
  • Automate the virus checking of your downloads
  • New structure of FDM’s settings

Free Download Manager 3.0 is available for free download here. Enjoy! “ [Post leached in full]

Some interesting new features for a cool tool…

Wednesday, December 31, 2008

Top Office Templates – Not just business stuff going on…

Office At Work - Most popular templates in 2008

“So we've seen which how-to articles were the most popular this year, but what about templates? I'm a big fan of the free Office Online templates and regularly try to point out some of the hidden gems contained on the website, so I was really interested to see which templates have been downloaded the most over the year...

  1. Fax cover sheet (Professional design)
  2. Technology business brochure (2-pg, 11 x 17)
  3. Memo (professional theme)
  4. PTA agenda
  5. Chronological CV (minimalist theme)

…”

Seeing a PTA Agenda in the Top 5 Office templates downloaded just struck me as funny. And given the year we’ve had, we need some funny in our lives… ;)

Actually I think it’s pretty cool, and the Office Online team should be pretty happy, having a template like that in the top 5. I feel it seems to mean that “normal/causal” consumers are using the Office Online site. The other four can be chalked up to power and business users, but the PTA Agenda… well… (of course the little voice in my head is telling me that it was the business and power users who found and downloaded that template for their partner in parenting because they were tired of having to do it manually or seeing them do it on paper… in any case, it’s a win… ;)

7-Zip Update Released (v4.63)

7-Zip - SourceForgeRelease Name: 4.63

Changes:
- 7-Zip now can unpack ZIP archives encrypted with PKWARE-AES.
- Some bugs were fixed.

…”

image

7-Zip is my compression tool of choice and so an update is always nice to see…

 

Related Past Post XRef:
.Net (C#) Interface for the 7-Zip DLL (7z.DLL)
7zSharp to your .Net Archive/Unarchiving Rescue - LGPL .Net Wrapper for 7z

Tuesday, December 30, 2008

Deadlock avoidance when using redirected StandardInput, StandardOutput and StandardError with System.Diagnostics.Process

Lucian's VBlog - System.Diagnostics.Process: redirect StandardInput, StandardOutput, StandardError

“Sometimes you want to launch an external utility and send input to it and also capture its output. But it's easy to run into deadlock this way...

The deadlock in this case arises because "cat" (a standard unix utility) first reads from StandardInput, then writes to StandardOutput, then reads again, and so on until there's nothing left to read. But if its StandardOutput fills up with no one to read it, then it can't write any more, and blocks.

The MSDN documentation says, "You can use asynchronous read operations to avoid these dependencies and their deadlock potential. Alternately, you can avoid the deadlock condition by creating two threads and reading the output of each stream on a separate thread." So that's what we'll do...

Using threads to redirect without deadlock

' GOOD CODE: this will not deadlock.

Using p As New Diagnostics.Process

    p.StartInfo.FileName = "sort"

    p.StartInfo.UseShellExecute = False

    p.StartInfo.RedirectStandardOutput = True

    p.StartInfo.RedirectStandardInput = True

    p.Start()

    Dim op = ""

    ' do NOT WaitForExit yet since that would introduce deadlocks.

    p.InputAndOutputToEnd("world" & vbCrLf & "hello", op, Nothing)

    p.WaitForExit()

    p.Close()

    Console.WriteLine("OUTPUT:") : Console.WriteLine(op)

End Using

[GD: Click through for the InputAndOutputToEnd code block]

…”

I’ve got a redirect StdIn/StdOut/StdErr related project on the books and this tip might come in handy

Monday, December 29, 2008

A little VSTS VPC download help – Steve lists all 10 parts for easier FDM’ing

How Steve Got Burned Today - TFS and VSTS 2008 "All-up" Hyper-V Image Links for Free Download Manager

“Here are the download links for the Hyper-V version of the new TFS/VSTS 2008 "all-up" virtual machines that I posted about last week.  I'm mostly putting these here so that I can find them, but I think others may find them useful as well.

These links are compatible with the Free Download Manager tool.  Just copy them to the clipboard then open FDM and select File | Import | Import list of URLs from clipboard or just use the Ctrl + Shift + V hotkey.

…”

Steve provides a simple list of the new Hyper-V VSTS VHD links, making it much easer to download all 10 parts of the RAR via a download utility like FDM.

 

Related Past Post XRef:
Visual Studio Team System & TFS VPCs Updated – Now all the updates, Power Tools, SP’s, 12/31/2009 expiration AND Hyper-V versions!

Sunday, December 28, 2008

File and Directory Path help from the man who brought us NDepend

CodePlex - NDepend.Helpers.FileDirectoryPath

“NDepend.Helpers.FilePathDirectory is the library used by the tool NDepend to handle common path operations. Benefits of the NDepend.Helpers.FilePathDirectory over the .NET Framework class System.IO.Path include:

  • Strongly typed File/Directory path.
  • Relative / absolute path conversion.
  • Path normalization API
  • Path validity check API
  • Path comparison API
  • Path browsing API.
  • Path rebasing API
  • List of path operations (TryGetCommonRootDirectory, GetListOfUniqueDirsAndUniqueFileNames, list equality…)

NDepend.Helpers.FilePathDirectory is 100% unit-tested and tests code is provided with the source code.

…”

There are some features here that we reinvented recently ourselves, plus tons I really like the sound of (plus I dig that the unit tests are already there ;)… Next update to that project I’m going to have to see if we can use this instead. We’ll have to get approval from “on high” since this is a LGPL licensed project, but that should pose too much of a hindrance…

(via Patrick Smacchia [MVP C#] - What is Microsoft waiting for providing a descent path API?)

Visual Studio Snippet Editor v2 Released – Formerly known as the “Visual Basic Snippet Editor” it now lives on in the source (VB) available world.

CodePlex - Snippet Editor

“The Snippet Editor allows for easy management and creation of code snippets for Visual Studio.

This is the Snippet Editor, formely known as the VB Snippet Editor as linked to from the MSDN VB site.
Features include:

  • Complete snippet file management
  • basic syntax coloring
  • replacement highlighting
  • drag and drop file organisation

snippet_editor

The Snippet Editor is a stand-alone exe suitable for all versions
of Visual Studio 2005 and 2008 including the Express editions:

…”

Nice! Very cool to see this quite old utility updated and its source released.

(via @ Head - Snippet Editor is now on CodePlex)

 

Related Past Post XRef:
Snippet Designer Released – Making VB, C#, XML Snippets the easy way… (VS2008)
Visual Basic Snippet Editor 2005 version 1.1 Released
Visual Basic (and C#, J#, XML) Code Snippet Editor

Thursday, December 25, 2008

Windows into Azure, the Azure Storage Viewer

Sergei Meleshchuk – blog - Azure storage viewer

“If you have registered for Azure Services at http://www.microsoft.com/azure/register.mspx, you may want to explore what is in your storage – your queues, blobs and tables. You can use the “Azure storage viewer” to browse your storage. To a limited extent, you can also add and delete objects in Azure storage (under your account, of course).

The two screen shots below show messages in one of the queues, and contents of a small table.

Azure storage viewer supports both mouse and keyboard navigation. It can be used as a learning tool, or as a content browser for small experimental projects.

System requirements

I tested on Windows 2003 SP2, Vista x32 and x64, Windows 2008 x64 (Standard and DC). I was admin on all machines. Viewer doesn’t need to run elevated.

1

2

…”

How cool is that?

No source released for it yet (that I found) and for some reason the app, installed via ClickOnce, wasn’t a happy camper on Vista machine.  Yet I still think this is a pretty neat sounding utility, one that makes the Azure cloud a little easer to grasp and manage…

Wednesday, December 24, 2008

Visual Studio Team System & TFS VPCs Updated – Now all the updates, Power Tools, SP’s, 12/31/2009 expiration AND Hyper-V versions!

PluralSight - Happy Holidays and look what Santa’s brought

“…

I’m happy to report that the VSTS virtual machines are all updated with fresh bits and expiration dates. You now can test and evaluate (since these images are NOT licensed for production use) Team System 2008 with SP1.

First off, the new expiration date is December 31, 2009.

Second, we didn’t produce two images this time. We produced FOUR!

What’s different is that we’ve produced both Virtual PC 2007/Virtual Server 2005 R2 compatible images AND Hyper-V compatible images. Download the ones that make you happy!

  • the latest virtual machine additions or integration services components
  • all of the latest Windows Updates as of December 1, 2008
  • Team Foundation Server 2008 SP1
  • Visual Studio 2008 Team Suite SP1
  • Team System Web Access 2008 SP1
  • Team Foundation Power Tools, October 2008 update
  • the latest MSSCCI provider
  • Team Explorer 2005 (this allows you to work with TFS from Visual Studio 2005 which is installed so that you can edit and customize TFS reports)
  • the GDR for the product formally known as Visual Studio 2008 Database Edition (aka Data Dude)
  • current Process Explorer, Process Monitor, and Background Info
  • Naturally at this point, you’re wondering, where are the goods? Here they are:
    [GD: Click through for the download links… Didn’t want to leach their traffic ;]

  • VSTS “all-up” Virtual PC/Virtual Server image (6 GB download, expands to 15 GB)
  • TFS “only” Virtual PC/Virtual Server image (3 GB download, expands to 8 GB)
  • VSTS “all-up” Hyper-V image (6 GB download, expands to 15 GB)
  • TFS “only” Hyper-V image (3 GB download, expands to 8 GB)
  • …”

    If you need a test/eval environment for TFS or VSTS, then these VM’s are a must have. 

    Cool to see both Virtual PC/Server and Hyper-V versions. I wonder how long we’ll have to deal with both VM “formats” (i.e. wouldn’t it be cool with Windows 7 had Hyper-V baked in? ;)

     

    Related Past Post XRef:
    New Team Foundation Server 2008 VPC Released (with 12/31/2008 Expire date)

    Spork – Zork via “M”

    Marquee de Sells - If you liked Zork, you'll love Spork!

    Spork is a sample of an end-to-end application using M and the Repository. It starts by defining a set of M types that describe the data needed for a text adventure along the lines of the famous Infocom game Zork (and hence the corporate bad-café-inspired name). …”

    Spork ReadMe

    “Spork is a sample of an end-to-end application using M and the Repository. It starts by defining a set of M types that describe the data needed for a text adventure along the lines of the famous Infocom game Zork (and hence the corporate bad-café-inspired name). The M instances are generated by running a custom compiler developed with the VBA (Visual Basic for Adventures) MGrammar grammar. We also provide a runtime driven by adventure data loaded into the Repository in multiple versions of the types called AdvRunner.

    Follow along with the video to see Spork in action or follow along with the Setup & Usage section of this document.

    Requirements

    You need the Microsoft Oslo SDK October 2008 CTP (aka the PDC08 drop) installed and the repository database created to run this sample. You’ll need Visual Studio 2008 installed to build it.

    …”

    image

    Interesting…

    For me M/Oslo is on a very low priority background thread, one that I’m going to let idle for a while yet, yet still I see a promise in its Textual DSL (TDSL) concept.

    I’d love to be able to provide a TDSL for my business processes, allowing my dev team to focus on the actual business problems and not on the underlying goo. API’s/SDK’s/Frameworks only go so far, and, all to often, internal ones don’t go far enough yet add significant overhead, in both code and training. I’m thinking that M and TDSL’s might help with that…

    Monday, December 22, 2008

    Managed ESENT v1 released – Managed/.Net access to the free embedded database (“Extensible Storage Engine/ESE”) that ships with Windows

    ESE/ESENT Database Stuff - Managed interface to Esent released

    “I just published the first release of the Esent .NET managed interface on Codeplex.

    http://www.codeplex.com/ManagedEsent

    This is an interop layer can be used to write managed applications that use esent. There is a straightforward translation of the unmanaged API and some helper methods/objects built on top of those methods. …

    …”

    CodePlex - ESENT Managed Interface

    “…

    ESENT is an embeddable database storage engine (ISAM) which is part of Windows. It provides reliable, transacted, concurrent, high-performance data storage with row-level locking, write-ahead logging and snapshot isolation. This is a managed wrapper for the ESENT Win32 API.

    Version 1.0 of the ESENT Managed Interop has been released

    ESENT is an embedded database storage engine (ISAM) which is part of Windows (http://msdn.microsoft.com/en-us/library/ms684493(VS.85).aspx) It provides reliable, transacted, concurrent and high-performance data storage. It can be used for small databases (a few MB) or huge datasets (hundreds of GB). The engine provides logging, recovery, transactions and concurrent access with row-level locking and snapshot isolation.

    The Microsoft.Isam.Esent.Interop namespace provides managed access to ESENT and will be developed with these principles:

    • Any program written with this Api should work with the ESENT.dll from either Windows XP, Windows Server 2003, Windows Vista or Windows Server 2008.
    • A comprehensive test suite for all the interop code.
    • The Esent.Interop DLL should only require version 2.0 of the .NET Framework.
    • Full and complete documentation. Intellisense should be able to provide useful and extensive help.

    …”

    If you’re ESE’ing or thinking about it then this project, with its recent release, will help.

    Why am I interest in this? A couple reasons.

    In relation to work, where I do Electronic Data Discovery, I may one day get one of these databases from an image and be asked to transform it into a “discoverable” form.

    On the home front, I think its kind of cool and given there’s no distribution/includes/bin’s/third parties/etc it is something I might want to check out in more detail. Yes, some of the other embedded database solutions might be “better”, but sometimes you just need quick and easy and already in the box… ;)

     

    Related Past Post XRef:
    Did you know Windows (since Windows Server 2000) comes with a transactional database engine already baked into the OS, which you can use in your applications today, no download required?

    Dual Screen, 11 pound desktop replacement (I mean “Mobile workstation”), ThinkPad W700 – Not your father’s ThinkPad…

    InfoWorld - Lenovo to release ThinkPad laptop with 2 LCD screens

    “Lenovo Group Ltd. Friday announced the release of a ThinkPad laptop that takes the "desktop replacement" category of notebook PCs to a new level.

    The ThinkPad W700ds appears to be the first laptop ever to sport two LCD screens -- a 17-inch primary and a 10.6-inch secondary screen.

    The souped-up "mobile workstation," as Lenovo calls it, also comes with customers' choice of quad-core Intel Core 2 processors and Nvidia Quadro mobile graphics CPU with as many as 128 cores. It also comes with as much as 8GB of DDR3 memory and a pair of hard drive/solid-state drive bays for up to 960GB of storage.

    It's all in an 11-pound brick -- five times the weight of netbooks, such as the Asus Eee 701, and at least double the weight of typical laptops -- that is encased in the ThinkPad's trademark ebony exterior.

    …”

    The ThinkPad W700 series

    w700

    The ThinkPad W700 series mobile workstation is thoughtfully designed to give users uncompromised performance, stability, and the ultimate visual experience

    The ThinkPad W700 is the first mobile workstation to deliver:

    • Intel Core 2 Extreme processors
    • High-capacity RAID HDDs
    • Integrated color calibration
    • Onboard digitizer and pen

    What's new

    • Intel Core 2 Quad Core Q9100 processors
    • 10.6-in diagonal second display panel
    • Intel Turbo memory 4 GB support
    • 4 GB memory DIMM

    System features

    • RAID DASD high-speed storage
    • Integrated color calibration
    • Integrated WACOM palm rest digitizer and pen
    • Displays
      • 17-in WUXGA with CCFL backlight and 1920 x 1200 resolution
      • 10.6-in WXGA with white LED backlight second display and 768 x 1280 resolution
    • High-performance mobile graphics:
      • NVIDIA Quadro FX 2700M, 512 MB dedicated video memory
      • NVIDIA Quadro FX 3700M, 1 GB dedicated video memory
    • Intel Centrino® 2 with vPro and Core 2 Extreme technologies
    • Intel PM45 Express chip set
    • PC3-8500 double data rate 3 (DDR3) SDRAM 1067 MHz SODIMM high-speed memory
    • Intel Active Management Technology 4.0
    • WLAN: Intel WiFi Link 5300 AGN (3 x 3)1
    • 64 GB solid state drive (SSD) for fast, reliable, lightweight, energy-efficient storage
    • DisplayPort
    • Dual Link DVI
    • Integrated camera

    …”

    Dual monitors on a notebook? Dude, that’s cool. Perfect for developers on the go (or who remote ;)

    I wonder if I can talk work into getting me one of these when they ship?

    Saturday, December 20, 2008

    Picture from my walk today… From the top of Mt McCoy looking to the east

    Out on my walk and this is a shot of Simi from the top of Mt McCoy…

    This picture is direct from my LG Dare and its built in landscape mode. Pretty cool and very easy to use. Have the panorama directly on the phone/camera is cool.  :)