This is where I put my code and some projects I have to write for school. Most of what you will finde here will be python or c# the two languages I seem to be programming in most of the time. Every once in a whill I might throw in some php or java script, and on verry rare ocasions I will put up some vb code.

So I needed to make my latest WPF application so only one instance of it would work. I tried a lot of things then I ran into a little form thread on a Microsoft web site talking about it. There was a couple solutions that didn't work for me then at the bottom a simple little code snip it that works wonders for what i need.
public App()
{ if(Process.GetProcessesByName("{appnanme}").Len. . . [
more]. . .

I recently needed to get access to command line prams in a GUI program it is easy if you know where to look. The code is:
string[] args = Environment.GetCommandLineArgs();
Just a small little note for the programmer that struggles like me.
[Open]

So with my new job I ran into the need to rename lots of files in a directory. I could have done it one at a time or used some bash script to do it but I like python so I went with a python solution.
renameFiles.py
import os
dirpath = "desired path"
oldName = "old naem you wnat to replace here"
newName = "new name you wnat put in there"
oldNameList = os.listdir(dirpath)
newNameList . . . [
more]. . .

So today was my first day at the new job. I have shed the shackles of a tester and moved on to being a PHP developer.... Ok so I traded one set of shackles for different set that are padded and don't chafe as bad.
So I went into my office today to see what I would be working with and it was all new and nice. This is a strange feeling for me. Having worked in testing for the last 7 years t. . . [
more]. . .

I found an interesting behavior with the document review screen. You can put an exsisting discussion in the discussion list by adding it to the linked documents of a document you are going to review. This allows you to place the same discussion on several documents. Keeping one place for all of your notes. The easiest way to do this is to create a discussion then link it with all the documents y. . . [
more]. . .

I needed a lot of files to test part of NetDocuments so I went to project Gutenberg and downloaded all the files in zip format. I needed an easy way to unzip them. This is what I came up with. It will walk a folder tree. Unzip the files and save them to the same folder, and after it is done unzipping the file it will delete the zip. It was much easier then doing it by hand.
unzipper.py
#. . . [
more]. . .

About 5 weeks ago our database crashed. It was a testing database so no one in the real world was affected, but the testing world went away. We lost 6 years of data. Well we didn't we almost did. I convinced my boss and one of the developers to let me recover the data from the files on disk that had the same data in them. The recovery went well. I got all the necessary info back but I did. . . [
more]. . .

So yesterday I was talking with my friend about first class functions and closures and how they can be useful. We wore talking about C# ver 3 and how it was going to support first class functions. As well and have the map and filter functions in it. After we got done talking I realized I could consolidate all of my little utility scripts into one file using a closure to minimize the duplicate c. . . [
more]. . .

Here is the code I tested with the unit testing program.
#Erin Houston
#Project 2
#cns 4230
import re
class invalidInput(Exception):
pass
def detectTriangle(edge1,edge2,edge3):
'''This little function will detect if triangle is scalene,
isosceles, or equilateral. It also will return an error message
in error condishions.'''
isScalene = Tr. . . [
more]. . .

So my software testing class had an assignment to write a simple program and test it using a unit testing harness. The teacher supplied the class with a harness for c++ but who really wants to program in c++ when you can use python. Granted if I had used c++ I wouldn't have had as many test cases but I also wouldn't have enjoyed it as much. So I did mine in python and I didn't want . . . [
more]. . .