Thursday, February 23, 2006

I blogged before about a great text editor named pspad.  This editor is great for heavy lifting and it's full of features.  Those features come at a price and that price is start up time.  When I just want a quick no frills editor notepad is king.  However, I've come across metapad and it seems to be a great notepad replacement.

It's number one feature?  Hyperlinking in plain text files.  I have been using Outlook notes as a catchall note storage for sites, user names etc b/c of the hyperlinking that built into the Outlook notes.  Now I can put my links in a plain text file and enjoy hyperlinked freedom.  It also compares favorably to the popular Notepad2 but the hyperlinking feature makes metapad the king.

Don't forget to get the registry files so you can make it the default editor for html, reg, txt and the text viewer for Internet Explorer's view source command.

Thursday, February 23, 2006 9:20:36 PM (Central Standard Time, UTC-06:00)  #    Comments [0]

I've decided to attempt a paperless revolution. 

I'm going to scan most of my paper doc's and store them on my pc and then shred the originals.  Of course I will keep the originals where necessary.  I then plan on archiving to CD or even DVD on a regular basis and storing a copy off site, maybe in my desk at work.

The Equipment:

HP Officejet 6210 All-in-One

This seems to be working ok but I still need to figure out how to scan multiple documents and then split the scan into multiple files.

The Files:

Searchable PDF's created with the OCR features of the HP 6210 and the HP Director software. 

The System:

Sort the files into folders as appropriate and use Google desktop to search for relevant information.  This is the big benefit.  I can search through all of the text of my documents with the power of Google.

Thursday, February 23, 2006 7:49:05 PM (Central Standard Time, UTC-06:00)  #    Comments [0]

Here's how:

http://www.imilly.com/tools.htm#ole

Download and follow the included directions. 

One thing you may need to change is the location of the firefox executable in the InFirefox.htm and InFirefoxPage.htm files. 

Why would I do this?:

Until IE 7 comes out of beta, IE is missing the great developer features that firefox has.  So this is a nice shortcut to open pages in firefox and use the web developer tools.

Firefox already has an extension that let's you open a file in IE and I use this extension instead of this hack.

 |  | 
Thursday, February 23, 2006 11:23:14 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Thursday, February 16, 2006

Here's another area where the documentation that comes with Visual Studio 2005 and the suff online as MSDN make a simple topic complicated.

To add a connection string to the App.Config:

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

   <connectionStrings>

      <add name="aConnectionString"

      connectionString="Data Source=localhost;Initial Catalog=Northwind;Integrated Security=True"

      providerName="System.Data.SqlClient"/>

   </connectionStrings>

</configuration>

 

To retrieve it in your program:

 

1. Add a reference to System.Configuration (no this is not automagically included).

 

2. Add a using statement:

   

   using System.Configuration;

   

   Optionally add another using statement for the sqlclient:

 

   using System.Data.SqlClient;

 

3. Use this code to grab the connection string:

 

   string cnString = ConfigurationManager.ConnectionStrings["aConnectionString"].ConnectionString;
   SqlConnection cn = new SqlConnection(cnString);

Note:  You can also add the connection string information to the connectionStrings section of the machine.config.  This is handy if you have a machine that runs many automated script type programs.

Thursday, February 16, 2006 2:31:44 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Wednesday, February 15, 2006

I came across this page with some useful code samples:

http://www.personalmicrocosms.com/html/dotnettips.html

I used the XML pretty printing one today.  Of course most of the material is stuff you can figure out rather quickly but I would rather work on solving other problems.

Wednesday, February 15, 2006 11:05:22 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Tuesday, February 14, 2006

This seems to be an under documented feature of ASP.NET 2.0.

You can easily embed resources (text files, images, etc) in you assemblies.  This is very handy for server control deployment.  However the documentation for this is somewhat lacking.

Here goes:

At the top of your class add an attribute to allow an embedded attribute:

[assembly: WebResource("MyProject.ResourcesFolder.JavascriptFolder.AutoCompleteTextBox2.js", "text/javascript")]

(This can also go in the AssemblyInfo.cs)

One big gotcha here is the fact that the first argument is the default namespace + folder location + the actual name of the file to embed.

So if my default namespace is "MyProject" and the file is located in /Resources/Javascript and named AutoCompleteTextBox2.js then the resource will be embedded correctly. 

Then to make sure that the javascript link is embedded in the page:

protected override void OnPreRender(EventArgs e)
{
    this.Page.ClientScript.RegisterClientScriptResource(

       typeof(MyType), 

       "MyProject.ResourcesFolder.JavascriptFolder.AutoCompleteTextBox2.js");

    base.OnPreRender(e);
}

You need to place this in the PreRender event handler for the code to be placed correctly in the page.

Finally, make sure your resource is compiled into your assembly.  By Changing the build action on EACH resource that you want to include.  Check out the image below.  the date_control.js file is now an embedded resource and can be accessed using the methods listed above.


Tuesday, February 14, 2006 3:42:04 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Monday, January 23, 2006

I came across this while searching for a CD recorder for Windows XP.  I haven't burned a CD in a long time and I realized that I hadn't copied one since I re-imaged my system back in May of 2005.  I used to use Nero but I was too lazy to find the software so I downloaded this:

http://isorecorder.alexfeinman.com/isorecorder.htm

It seems to be a bit faster then the built in Windows XP facility for copying data disks via drag and drop.  It also lets you burn ISO's which is a plus.  I'm not sure it's ready for the toolkit yet as it hasn't proven its mettle in combat yet.

---Updated 06/02/2006---

I've used this a few times now and it did the job.  One problem I ran into is that you can't record the ISO's off network drives or drives that are aliased with the subst command.  So just keep that in mind if you are having any problems burning an ISO.

Monday, January 23, 2006 8:30:27 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Thursday, January 12, 2006

PSPad is still the winner.   There are some odd things I don't like but for the most part I think it's pretty good.  It still loads fairly fast.  It has GREAT HTML, CSS and JavaScript support along with the color picking ability.  It integrates with TopStyle (and the free Lite) version but with the included intellisense and color support I don't think you necessarily need TopStyle. 

PSPad has made it only 3 of my 4 machines and the fourth I don't use often for development so it's not a big deal. 

All in all I will say that PSPad is the king of development oriented text editor.  For Now...

PSPad Site

Thursday, January 12, 2006 9:42:28 AM (Central Standard Time, UTC-06:00)  #    Comments [1]
 Monday, January 02, 2006

I was under the weather this weekend so I spent some time looking for a new text editor.  I had a few requirements:

  • File explorer
  • ability to view differences between 2 files
  • syntax support for Ruby
  • pretty print features

I tried out CPad and it was very promising.  However there is a little bug with CPad where the program will not close without killing it in taskmgr.  I posted the bug on the CPad form and we will see if it gets fixed.

So I tried quite a few others but none had the features I listed above.

Then I came upon PSPad.  It has the features I need plus the kitchen sink.  This thing has everything from a color picker to an ASCII table to the ability to handle ruby embedded in HTML.  Something only sophisticated IDE's are usually able to handle. 

I'm still playing with the PSPad but I think it may replace my current favorite Crimson Editor and earn a place in the Pragmatic SDK.

Update:

Yes it does do Ruby fairly well.  I must admit however that since ASP.NET 2.0 came out I haven't used Ruby or Ruby on Rails much.  I'm exploring the new features of ASP.NET and C# and enjoying the new IDE.

See the comment below for enabling Ruby syntax support.

Monday, January 02, 2006 8:08:24 PM (Central Standard Time, UTC-06:00)  #    Comments [2]