A Blog by Scott Isaacs

Tag: Development Page 4 of 6

Update: Image Converter

A couple weeks ago, I posted a “slightly useful piece of software” which could be used to convert a bunch of BMP files to JPG.  We’ll I just updated it to allow you to select the source and destination file types.

I’ve replaced the old download with the modified one, and you can get it here.  Use at your own risk.

It’s pretty simple to use, but see the original post for more info.  Let me know if you have any questions or suggestions.  I probably won’t put too much work into it, but if it’s a good suggestion, I may.

An Introduction to F#

The next WI .NET Users Group meeting is on February 21st.  I’m looking forward to the next meeting where our very own optionsScalper (OS) will be presenting “An Introduction to F#” (register here). 

Why am I so interested?  Is it because OS is such a hottie?  While one could make that case, I’d have to say, “No”.  It’s because F# has been described to me as the “math language” of .NET, and you may not know it, but I have a B.S. in Applied Mathematics.    It’s been a while since I’ve had to do any serious “math-like” development, and even longer since I’ve done anything remotely academic, but talking to OS about this has definitely piqued my interest.

If you have any interest in math, finance, a “scripted/functional/imperative/object-oriented programming language”, or just cool, new stuff in general, then you owe it to yourself to attend. Get the details and register here.

Update: More IE Stuff

A couple weeks ago, I posted about a ZIP of stuff for IE context menus.  I just updated the ZIP file to include a context menu item for getting a map for a highlighted address from Google Maps.

Here is the updated ZIP.  Download and use at your own risk.  See readme.txt for summary and instructions.  These will modify your registry and if you don’t know what that implies, then you probably won’t want to install them.

More IE Stuff

Some time back, I posted a little thing I hacked out to let me open un-linked URLs in a new window (in IE).  Well, I actually have a few very similar, ummm, things.  There are five parts in this ZIP.  You can pick and choose which ones you want to use.  Here they are:

In a nutshell, these each add a new menu item to your right-click menu in IE when you have text selected.  Once installed, select some text, right-click, pick the new option.  Pretty simple, hey?

Here is the ZIP.  Download and use at your own risk.  See readme.txt for summary and instructions.  These will modify your registry and if you don’t know what that implies, then you probably won’t want to install them.

Update: I’ve since added another “thing”.  Read the update post here.

Another (Slightly) Useful Piece of Software

OK, so this one may only be useful to one other person on the planet, but here it is.  (If you’re a .NET developer, then this is a trivial application.)

Anyway, my wife had a need to convert a bunch of BMP files into JPGs, and she doesn’t have Photoshop, or anything like that installed.  She could have done the conversion with MS Paint, one at a time, but that was cumbersome for a lot of images.  So I “whipped this together” for her.  In a nutshell, you specify a folder, and it creates JPG versions of all BMP files in that folder.  It doesn’t do any resizing, resampling, cropping, or anything else.  It just saves a copy in the new format — pretty basic.

For the .NET geek that might read this, I got 95% of the way (which was approximately equal to a whopping 20 lines of code) through this in VB 2005, then remembered that she doesn’t have the new framework installed.  So rather than spend the time installing that for her, I just copied the code into VB 2003 and finished there.  What can I say.  I’m lazy…  🙂

Anyway, here is the download.  Use at your own risk.  I zipped the entire solution, but if you’re not a developer and just want to use it, then look for the EXE in the “bin” folder.  You must have version 1.1 of the .NET framework installed for this to run, but if you’ve run Windows Update anytime in the last couple years, you probably do.

Couldn’t Debug ASP.NET 1.1

I am setting up a computer, and I installed VS 2003 and VS 2005.  I opened 2003 today and found myself unable to debug any web apps.  I went through the help file, and every setting was as it should be, but I still couldn’t debug.

Well, I finally found the problem/solution, and since Gerry always tells me to blog everything, you get to read it.  Basically, when I installed VS 2005 it set my IIS (5.1, WinXP Pro) to use the 2.0 framework instead of the 1.1 framework.  (I don’t know why it did that.  I don’t remember that happening last time I installed 2005.)  Since I always use VS 2005’s built-in web server when developing ASP.NET 2.0, I just changed the setting back to 1.1 at the default level.

All is well again.

Newsletter Sender

OK, so that’s a really lame name for a program, but I named it so I wouldn’t forget what it was.  I could have called it PhireFaacs, but really, do you think I would know what that was in two weeks?  Forget for a moment how much ridicule I would receive from my peers for choosing such a stupid name — that’s an even dumber name than “Newsletter Sender”.

Anyway, I wrote a simple little WinForms program last night (screenshots below) to help me send out the newsletter for the WI .NET Users Group.  (See how I decided on the name???)  In a nutshell it does a mail merge of some comma delimeted text datasource against an e-mail template.  “So what?”, you ask.  Yeah, I asked that, too, but it does make my newsletter sending a little easier.

Basic instructions (because there is no help file or tooltips):

  • Specify an SMTP mail server, and optional SMTP username and password.
  • Load a data file.  This can be any CSV formatted file, but there must be row headers.
  • Specify which field in the data file contains e-mail addresses.
  • Enter the “from” address.
  • Enter the message subject.
  • Enter the message body.
  • Specify a priority.
  • Click “Send”

The SMTP mail server, SMTP username, and from address can be stored in an XML file that gets created the first time you run the program (you have to edit it manually).  The subject and body can contain placeholders ({0}, {1}, etc.) that will be replaced with data from that column (note that this is zero-based index).

That’s basically it.

The ZIP download is available here.  Blah blah blah your own risk blah blah blah I’m not responsible blah blah blah.

Screenshots (also included in ZIP download)

The UI:

A Merged E-mail:

Cropper and TinyPic

By now you may have heard about Cropper by Brian Scott (I’ve even mentioned it before).  It’s a nifty screen capture utility that I originally found linked from Scott Hanselman’s Ultimate Tools list.  I’ve used it a few times, and it’s pretty cool.  You can optionally choose to create thumbnails of each screen capture.

Well, Patrick Altman is a self-proclaimed Cropper fan, and he has written a nice little plugin for it.  His plugin will take a standard Cropper screen capture in PNG format and upload it to TinyPic.  Then it places the URL of the image into the clipboard for easy pasting into blogs, etc.  You should try it!  (Note:  This image was added using this method.)

One important thing to note, though: Patrick’s plugin is compiled against a previous Cropper BETA.  I had to use Reflector to disassemble it and recompile it.  I didn’t have to change anything — just a recompile.  If you don’t want to go through that hassle (or don’t know how), send me a quick note and I’ll forward you my recompiled version.  I don’t want to post it here because it’s not my code to post, but until Patrick has a chance to update it, or tell me to stop, I’ll share.

I do also have a couple suggestions for Patrick (which I sent him via e-mail earlier today):

  1. Right now, if Cropper is configured to create a thumbnail image, that image does not get uploaded to TinyPic.  That would be a nice feature.
  2. Because I really love my clipboard, I have found that I might use the Cropper -> TinyPic option, and then copy some other text before I paste the TinyPic URL someplace meaningful.  So I have suggested that he consider some type of log file.

But don’t let those two things keep you from trying this out.  I know I’ll be using it for a while.

Update: Patrick Altman has e-mailed me and said that he doesn’t use this plugin anymore, and that he has no plans to update it.  He said that I should feel free to update my decompiled version and redistribute it.  Well, I don’t exactly have a lot of spare time right now myself (more on this later…), but now I feel comfortable posting my updated DLL.  So here it is.  It works with Cropper 1.6.  If anyone wants to make updates to it, knock yourself out — just let me know if you come up with something useful.  🙂

Weird Cookie Issue

At work, I’m working on a web app that allows both “users” and “admins” to login.  I’m using ASP.NET’s (1.1) built-in support for the “Remember Me” cookie.  Until now, I’ve been working pretty exclusively on functionality for one or the other (user or admin), so, to save time, I would log in and check the box.

Now, I find myself needing to switch between user screens and admin screens as I test my code.  So I figured I’d use Firefox to test admin changes and IE to test user changes.  That way I could still use the “Remember Me” functionality to save time.

Well, the weird thing is that IE and Firefox seem to be sharing cookies.  When I login as user in IE, I am a user in FF, and if I log out in FF, I am logged out in IE.

Has it always been this way?  Are they really sharing cookies?  Or am I missing something?

Code Generator 1.1

If you’ve read the blog for a while, you might have seen my previous posts about a code generator I wrote.

As I’ve used it for a couple months, I’ve decided that I have a lot (LOT) of changes I want to make to it.  I’m not quite a genius yet (like all of the people at the Q# launch), but I’ve learned a ton since I first started writing this.

However, as things go, I haven’t had time to really re-engineer it.  It’s hard to take time to fix something that works, even though it doesn’t work as well as it could or should.  (Can I get an “Amen”?!)  So, in the meantime, I’ve just fixed a few bugs and made a few enhancements.  Most noticably, there is a progress bar at the bottom of the window now.

So anyway, for what it’s worth, here is the updated version.  Use it at your own risk, blah blah blah.

To see a “real” code generator, check out Codus by Sean McCormack from Adapdev Technologies.  Adapdev has a few good tools that have been released to the development community.  On a (sort of) related note, Sean will be speaking to the WI .NET Users Group on September 13 about Automated Testing for .NET.  You can register at the UG site.

Page 4 of 6

Powered by WordPress & Theme by Anders Norén