Archives
-
Passphrase vs. Passwords
There have been a lot of postings the last few months talking about the topic of passphrases vs. passwords and I have finally got around to reading them.
-
Generic version of string.Join
Have you ever had a list of something other than strings and wanted to combine the list in someway to get a single string? You could use string.Join if you could get your list into a string[] but that is not always so easy. Usually I end up writing my own join method.
-
Code Htmler
Code Htmler is a simple program that will translate plain text code into a colorized html version of the code. Currently there exist language definitions for C#, JScript, VB.Net and XML.
It uses regular expressions to match language structures, such as keywords and literals (strings, integer, real, etc.). The language definitions are stored in xml files and so languages can be customized or new languages can be created rather easily. -
Storing VS projects on a Network drive
I have a centralized file server where I store pretty much all of my data. When I got my file server I moved all my data to it including my Visual Studio projects. This was about a year ago.
-
Google Scholar
Google does it again.
-
Outlook macro to permanently delete items in junk email folder
If you are anything like me you hate using the mouse to right click on your Outlook Junk E-mail Folder to select Empty "Junk E-mail" Folder and then on top of that you have to click Yes when it asks you "Are you sure you want to permanently delete all the items and subfolder in the "Junk E-mail" folder?". I hate doing that and I'm more of a hotkey kind of person so I wanted some way to do this with a hotkey.
-
The Spec# programming language
I'm working on my MS Thesis project (I hope to post more on this soon) and I came across Spec# which is a new programming language that is being worked on by Microsoft Research.
-
C++ static variables
I'm working on a project in C++ and I created a static member function and a static data member in one of my classes. When I tried to compile I kept getting an unresolved external error that was pointing to my static data member and I couldn't figure out what the problem was. Finally after some research (via Google, Msdn, and Stroustrup) I figured out that you have to define the static data member outside the class declaration.
-
Using LinearGradientBrush in C#
Well during my CSS change over I needed some background images for my headers. I wanted some simple gradient looks, but I only have 2 picture programs installed mspaint and Paint.Net, neither one of those does gradients (at least that I could find). I could download and install some picture program that has gradients but that is too much work and not much fun :)
-
I updated my Blog CSS
I ran across JS Greenwood's blog the other day and I liked his layout so I stole some some of his CSS (with his permission of course). Thanks for the layout James!
-
C# Tips and Tricks
I have been starting to participate more in newsgroups, in particular microsoft.public.dotnet.languages.csharp. I figured I have learned a lot from the .Net community and I should share my knowledge. It truly is amazing how much better you understand things when you have to explain it to others.
-
Project Distributor
I just signed up on Project Distributor, a web application that Darren Neimke created to help distribute small pieces of software to the rest of the world. It has a feed so you can stay up to date.
-
Virtual PC 2004 SP 1
Get it while its hot: SP1 for Microsoft VPC is available at Microsoft Downloads.
-
Why can't you create a Generic Class that inherits from Attribute in C#?
Today I was creating a set of attributes for a project I'm working on and I attempted to create a generic class that inherits from Attribute and I didn't think anything more about it until I compiled and got the error: "error CS0698: A generic type cannot derive from 'Attribute' because it is an attribute class".
-
echo %RANDOM% ... {0, 32767}
I knew there are environment variables for SystemRoot, UserProfile, etc, but I didn't know about the %RANDOM% variable that when used will generate a random number between 0 and 32767.I remember a few years ago I needed to generate a unique name for something in a batch file and I had to use an external program to generate a random number. This can come in handy for generating temporary and/or unique file names.For a complete list of Windows XP Environment variables see Command shell overview. -
Run++ Beta 0.7.2.0 released
I have released a new version of Run++With this release I also put up a discussion forum to more easily get feedback from the community. -
How to create a stream from a string in .Net
Yesterday I needed a way to take a string and create a stream from it. I did some searching but I didn't find any clean way. Here what I came up with in C#:
-
Weblogs @ ASP.Net MainFeed...?
I just now noticed that http://weblogs.asp.net/MainFeed.aspx == http://weblogs.asp.netMainFeed.aspx?GroupID=2, meaning that the MainFeed now only has Microsoft Bloggers. Did I miss an announcement about this or is this just a mistake? I was thinking that Weblogs @ ASP.NET has been a little light as of late. I only subscribe to the Main Feed so I have been missing some posts lately.I hope this is only a mistake and will be fixed soon because I get most of my traffic from the MainFeed or Google, I don't think anyone subscribes directly to my blog. Maybe I will need to start following Scoble's advice How your blog will get discovered. -
First Beta Release of Run++
Features
-
Tooltip now has the ability to be displayed as a Balloon
While adding tooltips to the application I'm working on in C# Express (more on that later) I noticed the property IsBalloon and though hmmmm. So I set it true and now my tooltips display as balloons instead of the normal rectangular popups. There are a few more changes to the ToolTip Members. Two others properties I think are helpful are ToolTipTitle and ToolTipIcon (ie Info, Warning, Error).Also on a side note when getting the links from the MSDN beta documentation for .Net 2.0, I noticed that the site is different. Does anyone know what is with the change to the MSDN beta documentation? -
Copernic Desktop Search
Copernic Desktop Search - They claim to be "The Search Engine for your PC".I just installed it and it is indexing my files right now, we'll see if it is as good as they say. The first thing I see that I don't like about it is their Web Search, it uses http://www.alltheweb.com with no option to change it, that I can find, however I will over look this since that is not its main purpose. -
Using C# Generics on Static Classes
I was playing around with some C# generics today and I began thinking about different things I could do with them. Then I began to wonder what happens if you give a static class generic type parameters? I wasn't even sure it would compile but sure enough it did. Then I tried to come up with an example where this might come in handy. Here is a simple factory pattern example using a C# generics:
-
How to store secrets on a machine... Using the new ProtectData class in the .Net Framework 2.0
If you haven't read How to store secrets on a machine from Keith Brown's book-in-a-wiki, you should it is a great read. It talks about how to use the DPAPI to store data locally on a machine. Here is an excerpt from it about the ProtectedData class provided in .Net 2.0:
-
Standard Windows Password Character
I was writing a login form for an application I'm working on and I decided I didn't want to use the standard '*' as my password character. I wanted to use the black circle (●), the same one that windows login uses. I figured out what the Unicode value for it was (0x25CF) and then I tried to set that as the password character for my textbox through the designer but no luck it would only take standard ASCII characters. So I decided to set in my form constructor, like:
-
Determine if an executable is a Console Application in C#
Thanks to Scott's comment I went on the hunt to figure out how to tell if an executable is a console application or not. After much hunting I figured out how to do it, here is what I came up with. Enjoy!
-
Windows Run Command Wish List
In order to get more familiar with the new features in version 2.0 of .NET and C# I have been working on a side project using C# Express Beta 1. The project that I have been working on is a replacement for the windows run command. I for one use the run command a lot and there has always been some features lacking. Currently the run command provides a drop down list of the last 26 typed commands and the auto complete functionality for the file system / browser history as described here. Some features that I have already implemented for my new run command are:- Auto complete commands - as you type you are given a suggestion list matching what you have typed and the command that matches the closest is filled in for you
- Smart suggestion list - the commands you use the most often appear at
the top of the suggestion list, and the commands are pre-populated with common
commands that someone might run like:
- Start Menu Shortcuts
- Control Panel Applets
- Favorites
- Recently Opened Documents
- Common Windows Commands - i.e. My Computer, My Pictures, Administrative Tools, etc.
- All Executables in the Path
Turn AutoCompletion on for Run Command
Help prevent windows startup clutter
I have been planning on talking about cleaning up your windows startup for a while but it looks like Jonathan Hardwick bet me too it with his excellent post What is all this stuff doing on my computer?. I do however have a couple more things to add.
My blogging philosophy and my need to analyse my referral log
One of the primary reasons that I blog is to help the community, I don't really expect anyone to directly subscribe to by blog (just out of curiosity does anyone?). I depend on people finding my information through search engines. Most of my posts are technical things that for what ever reason I spent some time figuring out how to accomplish.
Recusive GetFiles for DirectoryInfo via a C# Iterator
I have been working on a project using C# Express and so I have been playing around with some of the new C# 2.0 features. In my project I had a need to get all the files of a particular type in a given directory including all sub-directories. The DirectoryInfo class has a method GetFiles that takes a search pattern (ie "*.exe") but it only searches that directory it doesn't search sub-directories. So I figured this would be a good chance for me to play with these new things called iterators. At any rate I wrote a recursive version of GetFiles using an iterator so that I could do a simple foreach loop to get all the files recursively.
RoboForm - Bookmark/Password manager
Well I started using RoboForm a couple of days ago after reading the comments on Dan's post. So far I have to say I really like it. It fills in form data. It acts as a bookmark manager and if that bookmark needs login information then it will fill in that information and login so you don't have to login every time you visit that page. Another feature I like is that all the bookmarks (passcards as they call them) show up in both Firefox and IE. I'm almost thinking of using this as my standard bookmark manager as well as my password database. For security it has a master password so I only need to remember that one password. Also if I want more security I could store my data on a USB key drive.
Finished my internship
I have not been blogging much over the summer because I was busy with my internship but I'm back now so you will see a few more blog posts from me.
Variable number of parameters... C/C++ vs C#
A friend and I were talking about variable length parameter lists in C/C++ the other day and neither of us knew how to do it. We knew there must be some way because of the printf function. Just out of curiosity I did some googling and figured out how to do it.
Notepad2, Disable Reusing the same window
After reading about notepad2 from some other bloggers in the community (Omar), I downloaded it and have been using it for a couple weeks. If you desire more from notepad I would highly suggest you take a look at it. I took Omar's advise and just replaced the existing notepad with it and I haven't had any problems. The only thing that bothers me is that it resuses the window by default. So you can't open more than one file by clicking on the files themselves you would have to do it through notepad2, by the open new window option.
Finally Finals over... Here I come Redmond
Finally this semester has come to an end, my Masters is now half over and I only 2 more courses and my MS Thesis to finish next year.
Spam-me-not
I found this mentioned on a list serve that I'm on and found it interesting so I figured I would pass it on. http://www.zapyon.de/spam-me-not/index.html
Reflector 4.0 Released
Cool Reflector 4.0 is released. This is an awesome tool for any .Net Developer.
nGallery v1.6.1 released!
nGallery v1.6.1 is now available for download!
Ditigal Camera Reviews
This semester I'm taking a digital picture processing class at Virginia Tech and my professor pointed me to http://www.dpreview.com. If you are in the market for a new digital camera I highly recommend checking out this site for very detailed reviews of a ton of digital cameras. About a month ago I bought a new digital camera, a Cannon Powershot S50, but of course I didn't know about this site at that time luckily after checking its review at dpreview it seems to rate pretty good so I'm happy.
Photo Gallery
I have create a photo gallery using nGallery, its an open source ASP.NET web application. If you haven't looked at it yet please do it is a very nice application. There are still some things that need to be improved but all in all it serves my needs.
Customizing Windows Run Command...
If you are like me you use windows run command all the time. I hate using the mouse to point and click a shortcut on the start menu. WIN-R are probably the two most over used keys on my keyboard. After thinking about if awhile I hunted down how the run command works. It turns out that it makes a call to ShellExecute, which I guess is not too surprising. The next thing I wanted to find out was exactly how the commands are resolved. The following is an ordered list of how they are resolved ([1]):
Javascript UP Bookmarklet
Sometime last June I posted about a Javascript Bookmarklet that lets you move up one directory level. I had a comment from a user about allowing it to dig into sub-domains when it was at the root. So I have revised it to allow for this as well as fixed some other bugs that were in it.
Google Labs Adds Personalized Web Search and Web Alerts
Google Labs today added two new features:
FireFox Tweaks
Thanks for the Tips, I have been wanting the ability to rearrange my Tabs for a while.
Firefox.... Firebird Renamed
Well they just released Firebird v0.8, well not exactly it is now been renamed to Firefox 0.8. But anyways if you aren't using it as your primary browser then I suggest that you check it out. I have been using it for a while now and I love it, I can't get enough of the tabbed-browsing and its clean feel.
ClickOnce
I finally got a chance to look at Click Once: MSDN TV Wow, am I impressed. We have written a lot of NTD code to do what this is going to do for us. I look forward to working with this. Via [Greg Robinson's Blog]
Update on Internship Offers
Well just for those of you that don't know, I was given an official offer from Microsoft and IBM's Extreme Blue Program for summer internships. It was a very tough decision to make. After many hours of thinking and discussing with my wife, I have come to the decision to accept Microsoft's Software Design Engineer Internship Offer.
My Microsoft Software Design Engineer Internship Interview
My Microsoft Software Design Engineer Internship Interview:
Results are in....
I felt my interview with Microsoft last week went well.
Online Bookmark Manager
Well thanks to a comment on an old post. I'm now using Crutons as my bookmark manager. So far I like what I see. I have tried a lot of them and this one meets my needs the best out of all of them (If you look at the comments of the old post there were a lot of recommendations and I looked at everyone). It doesn't have very much documentation but it is pretty simple to use but I would still like a to see a little more documentation. As for features it has most of the features that I was looking for, including rearranging nodes via drag and drop, support for Firebird and IE sidebars, and a search feature.
Virtual CDRom Drive
Do you have a few CD ISO's and hate burning a CD every time to access the data?
Microsoft Internship Interview
Well I have my plane, hotel, and car reservations for my internship interview with Microsoft on Jan 30. I'm going to be interviewing for a software design engineer position. Besides for Chris Sell's Microsoft Interview Tips, does anyone have any tips or pointers for me?
Trip to India
Well it has been a while since I last blogged its also been a while since I’ve been on my computer (luckily I some how survived without my computer for 3 weeks). I just got back Sunday from a 3 week trip to India. I meet my wife's family members for the first time, I have no idea how many people I met but it was a whole lot. I was in Mumbai with her parents most of the time but I did get to visit New Deli, Agra (Taj Mahal), Jodhpur, and the deserts of Jaisalmer.