Friday, October 14, 2005

Writing Science Fiction and Fantasy Online Course

Welcome to Science Fiction and Fantasy Writing!

"Have you always harbored a secret (or not so secret) yearning to write? This course is designed to help you learn many of the skills you need to write successful science fiction and fantasy stories. You can use the skills you'll learn here in other kinds of storytelling, as well.

Whether you're trying to write for the first time, or have been at it for a while, you'll probably find some useful tips here. The course is intended mainly for younger (high school and middle school) writers, but it covers fundamentals you can build on no matter what your age. ..."


One of my secret dreams (which is no longer all that secret with this post) is to write science fiction...

(via Rod Trent at myITforum.com - Aspiring Sci-Fi writers...)

Determine Possible Row Size for SQL Server Table

How do I determine the row size of all tables in a particular DB?

"...

SELECT OBJECT_NAME (sc.[id]) tablename
, COUNT (1) nr_columns
, SUM (sc.length) maxrowlength
FROM syscolumns sc
join sysobjects so
on sc.[id] = so.[id]
WHERE so.xtype = 'U'
GROUP BY OBJECT_NAME (sc.[id])
ORDER BY SUM (sc.length) desc

..."


As I mentioned before I'm currently playing in Unicode land. I'm in the process of updating a number of SQL Server tables to support unicode/non-ascii text (i.e. varchar to nvarchar, etc).

Given than nvarchar's take twice as many bytes as varchar's, row length management is an important part of this conversion.

To help, I needed a quick way to get the existing possible row sizes for my tables. A quick google brought me the above SQL, which fit the bill perfectly...

And I'm sure I'll need it again, so in order to find it I'm posting it here.

Reference Manager for Visual Studio 2005

Reference Manager for Visual Studio 2005 RC

"If you are working with references (assembly or project references) in VS probably sometimes you have to do some annoying tasks:

Case 1) Where am I using this reference (i.e.: System.Data) in this solution?

Solution: I have to traverse all the projects in the solution and depending on the kind of project expand the references item or even worst open the properties dialog to see the references!!

Case 2) Remove a reference from multiple projects.

Solution: I have to go project by project removing the reference!!

Case 3) Add a reference to multiple projects

Solution: Project by project call to Add Reference dialog!!

Case 4) we have installed a new version of some assembly so we need to replace all references

Solution: You have to apply 1, 2 and 3!!!

So that I decided to make my life easier and I developed a tool called "Reference Manager"

You will have this tool available on the solution context menu. I tried to solve the above use cases. So now the solution for each case is easier. ..."


I had some "reference fun" the other day where a tool like this might have come in handy.

"Using WSUS without Active Directory"

Using WSUS without Active Directory - The Lazyadmin.com

"Windows Software Update Server (WSUS) is a great product that can be used to push out updates to your Windows computers. If you are deploying it in an Active Directory domain, you can use a GPO to quickly and easily configure your computers to use Automatic Updates and look to the WSUS server for those updates. But what if you are not using AD, can you still use WSUS? Yes.....

WSUS works just as well in Non-AD enviroments although the configuration is a bit more work on the client side. In order to control the behaviour of Automatic Updates and point the computers to the WSUS server there are a number of registry entries that have to be modified and/or created. To begin, open up regedit ..."


I've recently needed to start looking again at automated patching. While the machines I would be using WSUS with are members of a AD domain, I may not be able to get the settings pushed out with GPO (Think "segmented" WSUS... not silo'ed/rouge... um... yeah, "segmented" that's it... :| ).

Now I just need to find the time to install WSUS, configure, test, deploy the reg file to client pc's, train the operators and turn over operations...

(via Tiernans Comms Closet - using WSUS without Active Directory)

Thursday, October 13, 2005

"Searching encoded strings in SQL Server 2000?"

Sorting It All Out : Searching encoded strings in SQL Server 2000?

"A guy named Michael (who is not me) asked the following question in the Suggestion Box:
Is it possible to search an NVARCHAR column containing string data encoded in a number of different encoding types?

I'm dealing with iso-8859-15, big5, utf-8, iso-8859-1, us-ascii encoding types and need to search the strings for keywords using either full-text indexing or the LIKE clause.

The quick answer is no. ..."


As I am now playing in Unicode (aka non-ASCII) land I found this interesting...

Wednesday, October 12, 2005

Competition Is good... (Blogger adds Hotkey Nav)

Bloglines

"You can now navigate through Bloglines with hotkeys! You will find this legend at the bottom of each feed display page.
Hotkeys: j - next article k - previous article s - next sub f - next folder A - read all r - refresh left pane"


I love the power of competition... While Google Reader doesn't do it for me, it IS a positive influence forcing all the players in the same space to take a hard look at themselves.

It seems that Blogger first response is to add hotkey nav.

And I'm already wondering what I did without them... ;)

eBay: Classic Vintage PC Collection

eBay: Classic Vintage PC Collection (item 8706273723 end time Oct-15-05 10:00:00 PDT)

"... Includes over 430 vintage computers. From Altair to Zenith!

Includes over 40 vintage printers including early Epson, Apple, IBM models and more.

Includes Several hundred hardware items including vintage terminals, monitors, modems, acoustic couplers, mice, joysticks, accessories, S-100 computer boards and more.

Includes countless books, software, marketing brochures and accessories.

Includes set of Byte Magazines plus many duplicates. 100's more Magazines for TRS-80, Commodore, Popular Electronics, Radio Electronics, Osborne, Amiga, Texas Instruments, DEC, Sinclair, Microsystems CP/M Journal, Dr. Dobbs and more. Copy of all photos are included in the sale. Does not include the website. ...

WINNING BIDDER WILL PAY FOR ALL SHIPPING COST, HANDLING AND PACKAGING FEES! TOTAL COST WILL BE DETERMINED AT THE END OF AUCTION. APPROXIMATE WEIGHT ON THIS LOT IS 6,000 LBS. ..."


Oh I so want this... Talk about being #1 in any geek one-up-man-ship fest! Since they are pretty much local, I can rent a truck and pick it up myself! What a deal!

Now to ask my wife...

[No honey... not "THE LOOK"! Anything but "THE LOOK"... ]

Index.DAT Viewer

Index Dat Spy - index.dat file viewer!

"Index Dat Spy is a powerful and easy-to-use application that exposes the contents of any index.dat file - even if the file is currently in use by Windows. It translates a great deal of binary data - i.e. internal computer information - into a more human-readable form. And you don't have to be a programmer to read it either!

index.dat files have been the subject of much discussion since Microsoft has released relatively little information about them. Even after clearing your browser history, emptying your cache and deleting your cookies from Internet Explorer, there still remains information about where you've been surfing hidden away in these index.dat files. Although Microsoft claims that their is nothing special or secretive about these files, all versions of Windows tend to go to great lengths to obscure these files. ..."


Interesting... Not that I need to hide anything on my machine (um... yeah...) but given my current project (i.e. EDD), I find this professionally interesting.

What would be really cool is a library/COM component/assembly/API where I can extract this info for my own usage (cause I'm just too damn lazy to reinvent the wheel Steven's already invented).

Oh well, just another thing on my list of stuff to R&D (without which what fun would life be? :)

(via SHELL EXTENSION CITY)

"How to use del.icio.us for Blogger categories"

How to use del.icio.us for blogger categories - Freshblog

"I've wanted to add categories to this blog for a while, and I was able to do it this week thanks to del.icio.us and a couple of bookmarklets. Since this is a great addition to any blogger blog, I've been inspired to write my first How-to.

This will tell you how to add categories to your blogger blog using del.icio.us, and have the tags that you choose appear in the Technorati tag search. ..."


Lack of categories is a big beef I have with Blogger. Posting for years and with 1368 entries to date makes it somewhat hard to find stuff on my blog. Also I have a tendency to post about many things, but with a general Microsoft'ish theme.

Well this tags as categories scheme, while a hack, looks pretty cool. Something worth trying? I'll decide once I drink my morning coffee... ;)

(via del.icio.us/katy8439/outlook - GTD Wannabe Blog - Categories in Blogger)

Tuesday, October 11, 2005

Microsoft Remote Desktop Control in VB.Net

At work we use Terminal Services a great deal. It allows us to use many PC’s all without getting up or having our cubes filled with them. Also we often have a “when you’re awake you work” processing load so we’re connecting from home, vacation, the parents, hotels, etc, etc, all the time. Terminal Services/Remote Desktop all makes this possible

To date we’ve used the Terminal Services MMC snap-in to manage our connections. While this works, it’s pretty bare bones and there are few configuration options.

So as a side/personal project I’ve want to create our own TS connection wrapper app. I had some time tonight, so I started with the R&D.

Of course I want to build this in VB7.1…

Well long story short, it’s been a pain. The hard part is getting the RD control to host on a form. The funny part is that it’s easy in VB6… Dogh!

Googling this for a while helped me find a couple sites that really helped me over this hump. I wanted to make sure I captured them here (leach a little their data in case they go away) for any future need.

Between the two of these and some minor open heart surgery on the VB.Net sample I now have a working starting point for my app…

Failure to add msrdp.ocx control to C#.NET or VB.NET form
“… First of all, I would like to confirm my understanding of your issue. From your description, I understand that when you have drag and drop a Terminal Services Control on a windows form, a compiler error was generated. If there is any misunderstanding, please feel free to let me know.

Based on my research, this is a known issue. The wrapper generater fails to
generate correct method for returning an enum value. Here is a workaround.

1. md c:\temp
2. cd c:\temp
3. %<SDK bin directory>%\aximp.exe %windir%\system32\mstscax.dll
This will generate MSTSCLib.dll and AxMSTSCLib.dll.
Make sure Interop.MSTSCLib.dll and AxInterop.MSTSCLib.dll have been deleted in the obj and bin\Debug directories.
4. Copy the generated files (without renaming) - MSTSCLib.dll and AxMSTSCLib.dll into the project's obj directory.
5. In the project's references, add MSTSCLib.dll and AxMSTSCLib.dll from the obj directories.
6. Now, instead of drag-drop'ing the control from the toolbox, write code to add the control:
Goto Form.cs code view
Declare: private AxMSTSCLib.AxMsTscAx axMsTscAx1;
In InitializeComponent:
this.axMsTscAx1 = new AxMSTSCLib.AxMsTscAx(); ((System.ComponentModel.ISupportInitialize)(this.axMsTscAx1)).BeginInit();

//
// axMsTscAx1
//
this.axMsTscAx1.Enabled = true;
this.axMsTscAx1.Location = new System.Drawing.Point(58, 17);
this.axMsTscAx1.Name = "axMsTscAx1"
this.axMsTscAx1.OcxState =
((System.Windows.Forms.AxHost.State)(resources.GetObject("axMsTscAx1.OcxStat
e")));
this.axMsTscAx1.Size = new System.Drawing.Size(192, 192);
this.axMsTscAx1.TabIndex = 1;
....

this.Controls.Add(this.axMsTscAx1);
((System.ComponentModel.ISupportInitialize)(this.axMsTscAx1)).EndInit();

HTH.

Kevin Yu”

http://dev.remotenetworktechnology.com/news.htm
“… MsRdpNET  - a simple demo of wrapping Microsoft's redistributable RDP web client inside a VB.NET project. …”


Here’s the “magic” from the above VB sample (which can be thought of as a C# translation of the above forum post).

“Friend WithEvents AxMsRdpClient21 As AxMSTSCLib.AxMsRdpClient

<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
….
  Me.AxMsRdpClient21 = New AxMSTSCLib.AxMsRdpClient
  CType(Me.AxMsRdpClient21, System.ComponentModel.ISupportInitialize).BeginInit()
  Me.SuspendLayout()
  '
  'AxMsRdpClient21
  '
  Me.AxMsRdpClient21.Dock = System.Windows.Forms.DockStyle.Top
  Me.AxMsRdpClient21.Enabled = True
  Me.AxMsRdpClient21.Name = "AxMsRdpClient21"
  Me.AxMsRdpClient21.OcxState = _
CType(resources.GetObject("AxMsRdpClient21.OcxState"), System.Windows.Forms.AxHost.State)
  Me.AxMsRdpClient21.Size = New System.Drawing.Size(792, 600)
  Me.AxMsRdpClient21.TabIndex = 0

‘…

  CType(Me.AxMsRdpClient21, System.ComponentModel.ISupportInitialize).EndInit()
  Me.ResumeLayout(False)

End Sub”

When everything is right (with both the aximp’ed assemblies and the VB code), you’ll see the RDP Client control on the form at runtime and be ready for the races…

"Gathering Computer Information Using WMI"

Gathering computer information using WMI

"After a ton of questions regarding the the DriveInfo examples (Determine Hard Drive Serial Numbers and Revenge of DriveInfo) asking how to determine other information such as CPU identification, motherboard serial number and BIOS serial numbers I'm updated the WMI version of the application to read this information. ..."

Nice. I dig WMI...

Just last Friday I horked out a quick VB.Net WMI utility to take a text file list of PCs, enumerate through them and pull the physical memory configuration and dump it to a XML file (we are upgrading the RAM on them and needed to know what kinds of sticks were already there and thereby see what we needed... etc). Excel 2003 was able read the XML into a list on a worksheet so the end user could easily slice and dice the date...

I think the hard part of WMI is deciding WHAT you want from the billions of classes...

EyeToy: Kinetic Review

EyeToy: Kinetic Review on TotalVideoGames.com

"... Working with Nike Motion Works, SCEE has developed EyeToy: Kinetic, a twelve-week programme designed to increase fitness and tone the body. Set across four main areas (Cardio, Combat, Tone, and Mind & Spirit), EyeToy: Kinetic looks set to revolutionise the fitness of gamers everywhere. But does it actually work or is it just another gimmick?

...

With the EyeToy increasingly seen as a gimmick, Kinetic is more than a welcome edition truly opens itself to another market. With a regimental programme of exercises broken up into mini-games and more 'traditional' moves such as squats and push-ups the title certainly offers those willing to take the plunge an alternative to the gym or impact sports. This is an EyeToy title with actual substance and far exceeds our expectations. "


Sounds kind of cool... My son has tried to convince me that playing EyeToy is exercise, but to date I've invalidated that categorization. With this title, I might have to eat my words.

The only problem is that it comes with the EyeToy camera. Crud, I've already got two (the original and the one that came with AntiGav). Now a third? Well they are USB cam's, so I wonder if I can use them on a PC? (Yep, check out this)

In any case, I think this is a good x-mas gift item. Added to my Amazon wish list. :)

(via The Lazy Trainer - EyeToy Kinetic Review)

Monday, October 10, 2005

"Implementing file compression and encryption in VB6 using the Microsoft .NET Framework"

Implementing file compression and encryption in VB6 using the Microsoft .NET Framework

"In this two-part article series, you’ll see how you can easily add encryption and data compression (ZIP) capabilities to existing VB6 applications using the .NET Framework. ..."

I don't know about you, but call .Net from VB6 just feels weird.

Given the right problem to solve, and I had little choice, I'd do it but still paying the price for both runtimes seems a little overboard.

I'd much rather just rewrite the app in VB.Net ;)
[... Yeah, I know... sometimes we don't have that choice]

Anyway, it's an interesting enough thought that I wanted to capture it here.

FreeImage VB.NET Code Sample

FreeImage Support in VB.NET!!!! - .NET, DotNet, C#, ASP.NET, VB.NET, C++.Net, M

"This is a *must* have for anyone that wants to extend the supported image formats of their .NET applications. Using the FreeImage library you can open many new image formats, including... BMP,Dr. Halo,ICO,IFF,JBIG,JNGJPEG/JIF,KOALA,LBM, Kodak PhotoCD,MNG,PCX,PBM,PGM,PNG,PPM,PhotoShop,Sun RAS,TARGA,TIFF,WBMP,XBM,XPM. FreeImage can do more than just read images, it can also write them, but this example just shows you the quickest and easiest way to open an image using FreeImage ..."

I've recently rediscovered FreeImage and this VB.Net sample caught my eye...

Past Post XRef:
The FREEIMAGE Project
The FREEIMAGE Project
(Looks like I "discovered" it twice in 2003... dogh!)

(via http://del.icio.us/jeff_hanna/VB.NET)