Expresso Regular Expression Tool#

Expresso is a free tool that you can download and run to aid you in building and testing regular expressions.

It's pretty handy!

Categories:  |  |  | 
Monday, July 31, 2006 9:19:54 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Validating XML document against an XML Schema with VB.Net#

It seems like validating an XML document against a schema would be a pretty simple thing to do in the .Net framework, seeing as how they have such deep support for dealing with XML.

But as of yet, I haven't found a simple way to do it.

Here is the code I have been using to validate XML against an XML Schema.

Imports System.IO
Imports System.Xml
Imports System.Xml.Schema


Private schemaValidation As New ValidationEventHandler(AddressOf ValidationHandler)

Private Function ValidateXml(ByVal xmlFileName As String, ByVal xmlSchemaName As String) As Boolean
Using myFile As New FileStream(xmlFileName, FileMode.Open, FileAccess.Read, FileShare.None)
Dim xDoc As New Xml.XmlDocument()
xDoc.Load(myFile)
xDoc.Schemas.Add(GetSchema(xmlSchemaName))
Try
xDoc.Validate(schemaValidation)
Return True
Catch ex As XmlSchemaValidationException
Console.Write(ex.ToString)
Return False
Catch ex As XmlSchemaException
Console.Write(ex.ToString)
Return False
Catch ex As Exception
Console.Write(ex.ToString)
Return False
End Try
End Using
End Function

Private Function GetSchema(ByVal filePath As String) As XmlSchema
Dim schema As XmlSchema
Using s As New System.IO.FileStream(filePath, FileMode.Open)
Using reader As New StreamReader(s)
schema = XmlSchema.Read(reader, Nothing)
End Using
End Using
Return schema
End Function

Private Sub ValidationHandler(ByVal sender As Object, ByVal e As System.Xml.Schema.ValidationEventArgs)
Throw e.Exception
End Sub
 
Categories:  |  |  |  | 
Saturday, July 29, 2006 3:35:25 PM (Central Standard Time, UTC-06:00) #    Comments [2]  | 

 

CSLA Contrib #

CSLA Contrib is supposed to be a community for sharing CSLA tools, templates, and ideas.

http://www.codeplex.com/Wiki/View.aspx?ProjectName=CSLAcontrib

Worth checking out.

Categories:  | 
Sunday, July 23, 2006 11:48:39 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

YourOS web based operating system#

I saw a link from fark to www.YourOs.com which is supposed to be a web based operating system.  I tried to do a demo but it was too busy from the /. crowd.

This would be interesting to try, they say they have MP3 players, word processors etc.

Categories:
Sunday, July 23, 2006 11:29:52 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Resetting a PIX password#

Here is a quick trick for resetting a pix password:

http://www.tech-recipes.com/cisco_firewall_tips639.html

You need console access to do so.

Categories:  |  | 
Friday, July 21, 2006 12:25:58 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Here Is A Article Talking About The Ability To Put Some Of Your Config Info In Another Config File When Using Aspnet#

Here is a article talking about the ability to put some of your .config info in another config file when using asp.net

http://www.beansoftware.com/ASP.NET-Tutorials/Multiple-Config.aspx

What I found most interesting is that it says that changing the otherFile.config will not reset your app.

I am guessing that it also means that it won't find your new values until the app is reloaded, but if it DID find the new values w/o a reload that would be great.

<?xml version="1.0"?>
<configuration>
    <appSettings/>
    <connectionStrings/>
    <system.web>
        <compilation debug="false" strict="false" explicit="true" />
    </system.web>
    <appSettings file="externalSettings.config"/>
</configuration>

I also wonder if you could have more than 1 appSettings external file.

Categories:  |  | 
Thursday, July 20, 2006 2:52:58 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Some Good Links For Updating Cisco PIX Devices#
Categories:  |  | 
Wednesday, July 19, 2006 3:01:43 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Sorting a generic List(Of T) using IComparable(Of T) #

List(Of T) supports sorting through it's Sort method.  When you call Sort it will use the default comparer for the items it contans.  So if you have a custom class in there, you need to implement IComparable or IComparable(Of T). 

Here is some code that shows how to do this.  This code sorts lowest to highest.

    Public Function CompareTo(ByVal other As CustomClass) As Integer Implements System.IComparable(Of CustomClass).CompareTo
Dim myscore As Integer = Me.SomeValue
Dim otherscore As Integer = other.SomeValue
If myscore > otherscore Then
Return 1
ElseIf myscore = otherscore Then
Return 0
Else
Return -1
End If
End Function
Categories:  |  | 
Sunday, July 16, 2006 2:15:15 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

My Sansa e200 Review#

I figure I should put up a review of my Sansa e200 incase anyone else is thinking of getting one.

I had a couple trips I had to take last month and my old Archos mp3 player decided to die on me.  Luckly for me I was able to find a Sankdisk Sansa e200 or e220 or e2XX whatever.  My model is the 6GB version, which is the largest they offer at the moment.

The unit cost $280 at Circuit City and while I could have got it online for $250 or so, I was going to be on a plane the next day so I didn't mind paying a little extra to have it with me on the trip.  Have I mentioned that I hate Circuit City?  Why is it that every time I got there I end up getting frustrated or pissed off?  I guess the one time I went there to see a TiVo demoed was ok... except now that I think about it they didn't know how to work the Tivo.  I ended up buying one and loving it though (this was back in '99).

Anyway, I have to say I am very pleased with the Sansa.  It was exactly what I hoped it would be in almost every way.

Battery life is awesome.  I think I read somewhere that it does 15 hours, which sounds about right.  I haven't had it run out on me yet.  Oh, this does bring me to one of the few things I don't like about it.  You can't listen to it while you have it connected to your computer, which means you can't listen to it while you are charging it thorough the USB.  Maybe you could "disconnect" through windows and have it still get power, but I don't know.

Playback quality and volume are good.

Navigation is IPod-like, which is ok, but rather than use a "touch wheel" they have an actual wheel you can turn that makes navigating easier in my opinion.  The only thing I don't like about navigation is that if you want to change to a song on another album by the same artist, you have to click Menu (down), Back To List (Middle), and then "Back" (Right).  I guess there is not obvious way to improve that, so overall I can't really complain.

FM Radio / Video: Well I will never be using the video, and I am sorry to say that as soon as I started using the FM radio I realized how much I would have rather had AM.  Oh well.

Audio Recorder: Haven't used it.

Graphics: I was a little suprised that there were now "Themes" to choose from, only the 1 default theme.  It's not bad, just something I would have figured they would do.  They show the album cover if you downloaded it, which is cool.

PC Integration: Awesome.  My winXP computer saw it right away as some kinda media device, no driver installs or anything.  You go to My Computer, click on the Sansa icon (it's almost like an external hard drive), and you just drag over your folders.  Once loaded, the Sansa will look at your MP3 tag info and index them all like the IPod does.

My wife bought me a little rubber case for it that I leave on all the time, and I have no worries about it breaking.  The thing feels really solid. 

Size: It looks bigger in these pictures than it is.  It's smaller than a large pack of gum.  Very nice.

Overall I am very happy with it!!  I would really recommend it to anyone who wants a great MP3 player, but doesn't want to get stuck with an IPod.

 

Categories:  |  |  | 
Friday, July 14, 2006 9:37:28 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Funny Messages#

"Entropy collection"

 

"Left is best"

Categories:
Monday, July 10, 2006 12:07:54 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

MusicBrainz#

This website www.MusicBrainz.org has a great piece of software called "Tagger" and a not so great, but supposedly getting great program called "Picard."

I am still trying to figure out Picard, to see if it can download album covers for me, but I am not having much luck as of yet.

But Tagger is awesome.  You basically point it to your MP3 collection, and it will attempt to match up your MP3s with their database based on a "music fingerprint" and then it will automatically set all the tag info as well as rename the file.

So this means if you have an MP3 of Pink Floyd's Breath from Dark Side of the Moon but the MP3 has no ID3 info and is named PinkF.-Breath.mp3, it will most likely look at the audio and match up the mp3 with their database and put it into \Pink Floyd\Dark Side Of The Moon\01 - Breath.mp3 or however you tell it to rename files.

Pretty sweet!

I just need to find a similar program to get album covers too.

Categories:  |  | 
Friday, July 07, 2006 12:48:56 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

IBiz Quickbooks Integrator#

nSoftware just released a product called IBiz Integrator for Quickbooks, which is supposed to enable one to integrate their applicaiton with Quickbooks via QBXML.

A comprehensive suite of Internet-enabled components for QuickBooks (QBXML) Integration. Includes easy-to-use components for accessing QuickBooks constructs and automating accounting tasks.

Should be work looking into for QB applications.

Categories:  |  | 
Friday, July 07, 2006 10:44:48 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Backing up Cisco router settings#

Working with Cisco products is not an everyday event for me, but when I do work with them I want to make sure I backup the config files before I do anything.

To do this you can follow the instructions on this page:
http://www.cisco.com/en/US/products/sw/iosswrel/ps1835/products_tech_note09186a008020260d.shtml#tftp

You can also download a free TFTP server at this location:
http://www.solarwinds.net/Tools/Free_tools/TFTP_Server/

 

Categories:  |  | 
Thursday, July 06, 2006 8:07:02 AM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

All content © 2008, Christopher May, Inc
Open Job Positions
On this page
Google Ads
This site
Calendar
<August 2008>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456
Archives
Sitemap