I asked my boss if he'd be interested in sending me to an MCAD "Boot camp" certification training class, and it seems like it might be getting approved (I hope). Anyway, when you sign up, they offer you one of three free gifts: * Microsoft XBOX * Palm Tungsten E * IPod Mini Well, the XBOX is out - not because I don't want it, but because my wife would divorce me if I got one more thing to play video games on. So... Which would you choose, and why? The Palm? Or the IPod? -Todd Davis (toddhd@gmail.com)
Todd Davis
Posts
-
Which "free gift" should I pick? -
Would you move to Redmond just to work for Microsoft?Wife, 3yr old, two in college, one very old dog. I love my job. I'm a webmaster/developer - I make my own hours. I work from home when I want to. I can come in late, take a long lunch, leave early, or not come in at all. It doesn't matter to my company as long as my job is done and our customers are happy. I have a lot of creative freedom and they value my input. My boss lets me run with whatever I like. Life is good. Having said all that - I would still jump at the chance to work for MS. I know all the flack they take, but they are still the greatest minds in programming. I have enormous respect for what they do, how they approach and solve problems, and their involvement and empowerment in the development community. I would love to be part of that team. So yeah, I'd be there, even if meant living in shoebox. As long as its shoebox with high speed internet, of course.:-D -Todd Davis (toddhd@gmail.com)
-
Getting a Type of MeI have several classes in my project that I need to persist as XML. I achieved this by using serialization - I have load/save function in each class. Since I'm using the same routines in each class, it makes more sense to me to create a class with these routines in it, and then derive each class from this one. With me so far? So, here is my base class (which the other classes will derive from): Imports System.IO Imports System.Xml.Serialization Public MustInherit Class XMLSerializationBase Public Sub SavetoXML(ByVal Filename As String) Dim writer As StreamWriter = Nothing Try Dim ser As XmlSerializer = New XmlSerializer(Me.GetType) writer = New StreamWriter(Filename) ser.Serialize(writer, Me) Catch ex As Exception Dim strErr As String = String.Format("Unable to save file. Error: ", ex.Message) MessageBox.Show(strErr, "File Save Error", MessageBoxButtons.OK, MessageBoxIcon.Error) Finally If Not writer Is Nothing Then writer.Close() writer = Nothing End Try End Sub Public Function LoadfromXML(ByVal filename As String) Dim reader As StreamReader = Nothing Try Dim ser As XmlSerializer = New XmlSerializer(Me.GetType) reader = New StreamReader(filename) Dim o = CType(ser.Deserialize(reader), XMLSerializationBase) '<------ HERE IS THE PROBLEM If o Is Nothing Then Throw New NullReferenceException("Invalid file") Return o Catch ex As Exception Dim strErr As String = String.Format("Unable to load file. Error: ", ex.Message) MessageBox.Show(strErr, "File Open Error", MessageBoxButtons.OK, MessageBoxIcon.Error) Finally If Not reader Is Nothing Then reader.Close() reader = Nothing End Try End Function End Class Ok, so here is the problem When I deserialize the info, I need to convert it into a type of class - whatever type of class the base class is. So what I really want to do is this: Dim o = CType(ser.Deserialize(reader), Me) The problem is, this doesn't work - the IDE won't accept it. I also tried MyBase, Me.GetType, MyBase.GetType - none of these work, the IDE says that the object is not defined, or that it is an invalid type. How to I tell CType to convert the info to whatever type of class my base class is??? -Todd Davis (toddhd@gmail.com)
-
Bush's a Done Deal...or is it?I know they were an issue for me. A lot of the debates hinged on Iraq and security and terrorism. But the history of countries like Israel have taught us this much - you can't stop terrorists with security measures. Period. If you stop them from getting on planes, then they'll bomb the malls, and if you stop them in the malls, then they'll bomb the schools, and so on. Israeli's have been bombed in night clubs, restaurants, busses - you can't stop terrorists, other than to find them and get them. Anyway, my point is, given the above, neither Bush not Kerry can gaurantee my safety and security, so it makes it a non issue for me. The troops are also a non-issue - in that despite their best promises, there is just no way that we can pull out of Iraq in short order. There is too much to be done there, and too much at stake. Whether Bush or Kerry is in the Whitehouse, we will still be in Iraq 4 years from now. So it's a non issue. I don't really have much faith in either Kerry or Bush when it comes to the economy and healthcare issues. That's just me, but I think they are both useless in those areas. So again, for me, a non-issue. That leaves cultural issues. Gay marriage. Stem cell research. Prayer in schools. The mixing of church of state. For me, these are important issues. I support gay marriage. I support stem cell research. I don't support prayer in school. I don't like it when federal law is based on religious beliefs. So I had to vote on those issues alone. -Todd Davis (toddhd@gmail.com)
-
More Gmail accountsThank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! -Todd Davis (toddhd@hotmail.com)
-
More Gmail accountsTodd Davis todd.davis@ceridian.com (Please use this address, as Hotmail is known to strip the invite) Thanks! -Todd Davis (toddhd@hotmail.com)
-
Creating a windows forms control with no (or minimal) GUIYup, you are right. I figured that out shortly after posting this. I had defined the class as a source code file, but we needed it to be a *.dll, and I got hung up on choosing Windows Forms Library from the new project wizard. I instead chose Class library, and now life is good... thanks! Never code when it is past your bedtime... :) -Todd Davis (toddhd@hotmail.com)
-
Creating a windows forms control with no (or minimal) GUII have created several ASP.NET server controls, but this is my first attempt at a control for Windows Forms. I need to build a control that has no visual component (for example, like an ImageList control). When I inherit from Control, it brings along a ton of properties and methods that I don't need or want (i.e. backcolor, font, anchor). What should I inherit from in order to create a control with no design time or visual properties? Just the properties and methods I dictate? -Todd Davis (toddhd@hotmail.com)
-
Comparing "Similar" StringsI know this is a toughie, but I figured I'd ask... I am writing an internal application for my company. We have thousands of Articles on our web server in HTML (actually ASP) format. These articles are technical in nature, and support the various software programs we write. This tool is meant to scan the text of those articles, and convert the information into a new format that we'll be storing in a database. Part of that conversion process will include identifying the product and version that each article is associated with. This is really easy when the product name is spelled correctly and formatted the same as what I'd expect it to be. Unfortunately, people make mistakes (lots and lots of mistakes) and what I expect is rarely what is there. For a silly example, let's say that I'm scanning the text for the word "Microsoft" to see if this article is associated with a Microsoft product. Easy enough, right? But as I start looking at articles, I see: Micro Soft Microssoft Microsoff MS Microsucks MSoft .. .. Well, you get the idea. Doing a simple InStr(Article, "Microsoft") doesn't always find what I want. What I need is a more "fuzzy" compare method. Microsoft SQL Server has a function called LIKE that is kind of close to this - better yet, I can use the FreeText or Contains methods to provide a fuzzy search. Is there a similar function or technique in VB that would allow me to do a compare like this? -Todd Davis (toddhd@hotmail.com)