Eric Kepes' crummy little weblog RSS 2.0
 Thursday, January 03, 2008

So, there will be another one, and there is a date - April 12, 2008, same place as last year. Wanna present something? Let me know - its possible I may be being referred to here.

I should point out that I'm just a helper on the planning committee - the heavy lifting is being done by Dave Hoerster, Craig Oaks (who don't have blogs), Greg Akin, and Jared Roberts at the Pgh Tech Council.

Thursday, January 03, 2008 9:22:53 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
News | UserGroups
 Thursday, February 15, 2007

All of the SysInternals tools (except for some "toys") have been released as one big suite. Get it now!

Thursday, February 15, 2007 10:17:08 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
News
 Thursday, January 11, 2007

Saturday, April 14, 2007 - we're doing it again.

If you think you might want to get up in front of people interested in the things you are passionate about, this is your chance. The speaker slate is wide open right now. This is your chance to tell the world (or at least the Pittsburgh .Net community) about your favorite tool or project!

If you're not interested in speaking, but wish to attend - watch that site or this space - registration will be opening soon.

Thursday, January 11, 2007 8:42:05 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
News | UserGroups
 Wednesday, November 08, 2006

I had no idea you could do it, but I figured I'd give it a try and see what happens. Turns out, you can have a property with mixed accessibility, so you can allow public "getting", but only private "setting". This comes in handy when there is a value you want to wrap in a lock - I like to wrap items that may be accessed from multiple threads in a property, and control the locking there, to help ensure that I am always locking the same way.

Here's how you have mixed accessibility:

public bool IsRunning
{
   get
   {
      lock (_Lock)
      {
         return _IsRunning;
      }
   }
   private set
   {
      lock (_Lock)
      {
         _IsRunning = value;
      }
   }
}

One thing to note, you have to go from more "public" to less. This won't work:

private bool IsRunning
{
   public get
   {
      lock (_Lock)
      {
         return _IsRunning;
      }
   }
   set
   {
      lock (_Lock)
      {
         _IsRunning = value;
      }
   }
}

Wednesday, November 08, 2006 10:23:01 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Code Snippets
 Wednesday, October 18, 2006

So, anyway, I just got nailed with several hundred (approaching 1000) trackback spams. Cleanup was fun - at first, I tried to do it through the web UI, but that quickly induces carpal tunnel.

So, the next course of action, which you might have noticed, was to upgrade to dasBlog 1.9. Then, while I was waiting for the old version to ftp back to me (always backup first, right? :)), I went through the content and remove the trackbacks with a good old text editor - much quicker...

I think I got everything back up, and didn't screw up to much, but anyway - if you see anything strange, let me know. Since I made the switch, I haven't gotten any trackback spam, but I don't know if it's just because they had already abused me and moved on, or if dasBlog 1.9 really works to prevent trackback spam.

Wednesday, October 18, 2006 7:13:31 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Administrivia
 Sunday, October 15, 2006

OK, it's not really new, I'm still sitting in the same desk, but now I actually work for the client. As of October 1, I am an employee of McKesson Automation. It's a decent company (less screwed up than most any other larger company in Pittsburgh), and close to home, so when they approached me to roll over to full-time, I agreed.

This actually gives me more freedom than I had as a consultant to do some projects I had been hoping to work on, so maybe I might even blog more. Yeah, right... :)

Sunday, October 15, 2006 8:13:42 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Administrivia | News
 Wednesday, June 14, 2006

This is mostly so I don't forget how to do this again...

.Net 2.0 gives us the ability to find a specific item in a generic list, and it is pretty flexible - you can search on any criteria. But to do it right, you need to use an anonymous delegate. The syntax is a little tricky, but it goes like this:

  Predicate<Document> itemMatch = delegate(Document testMatchValue)

      { return (testMatchValue.DocumentId == documentId); };

  

  Document result = _Documents.Find(itemMatch);

Wednesday, June 14, 2006 12:42:40 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Code Snippets
 Friday, May 05, 2006

The slides and code for most of the presentations at Pittsburgh Code Camp are now available.

Looks pretty likely that there will be another one sometime in late September or early October. Get your presentations ready - we'll probably need to have at least one more track.

Friday, May 05, 2006 7:21:09 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
News

I have a base class, and two child classes. I wanted to use a static field in the base class that would reference a fresh object in each child class. I'll have to find another way - turns out a static in the base is static across the children as well. Useful in most scenerios, I suppose.

Here is the code I used to test it out (with SnippetCompiler, of course):

using System;

public class BaseCrap
{
   protected static string stuff;

   public void SetStuff(string newStuff) { stuff = newStuff; }

   public string GetStuff() { return stuff; }
}

public class Crap1 : BaseCrap { }

public class Crap2 : BaseCrap { }

public class MyClass
{
   public static void Main()
   {
      Crap1 crap1 = new Crap1();

      crap1.SetStuff("Crap1");

      Crap2 crap2 = new Crap2();

      crap2.SetStuff("Crap2");

      Console.WriteLine("Crap1.Stuff={0}, Crap2.Stuff={1}",
         crap1.GetStuff(),
         crap2.GetStuff());

      Console.ReadLine();
   }
}

The results:

Crap1.Stuff=Crap2, Crap2.Stuff=Crap2

So, both child classes actually use the same static field.

 

Friday, May 05, 2006 7:18:51 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Code Snippets
Navigation
Archive
<February 2008>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
2425262728291
2345678
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2009
Eric W. Kepes
Sign In
Statistics
Total Posts: 100
This Year: 0
This Month: 0
This Week: 0
Comments: 12
Themes
All Content © 2009, Eric W. Kepes
DasBlog theme 'Business' created by Christoph De Baene (delarou)