The Reddest

The Reddest


  • Name: Brandon Cannaday
  • Favorite Languages: C#, Javascript, C++
  • Website: http://www.paranoidferret.com
  • Location: Lafayette, IN
  • About Me:
    Even though I'm a programmer, I enjoy spending a lot of time outdoors - hiking, camping, etc. I spend most of my programming time in high level languages and user interface design. Most of my tutorials on this blog are about WPF, C#, or Javascript.

Published Tutorials (93)

Recent Comments

  • C# Tutorial - Simple Threaded TCP Server
    03/18/2010 - 12:49

    There's nothing special required to know when you can send the client information. Simply surround the Send function with a try-catch. If Send throws an exception, that client has disconnected.

    As for "send it something", let's say we're building a chat client. You've got two clients connected to the server and they want to communicate with each other. One client sends a message to the server that needs to be relayed to another client. Somehow you've got to find the client to relay the message to. The message might contain a user ID, which you'd associate with each client using a dictionary - or something similar.

  • C# Tutorial - Simple Threaded TCP Server
    03/18/2010 - 08:30

    I've never reused a TcpClient object. In the example code, the client only lives in the scope of its thread. There's no way for the server to find a client when it's needed. What I meant by "keep it around" was to put it in some sort of collection so the server can look up a client when it needs to send it something.

  • C# Tutorial - Simple Threaded TCP Server
    03/16/2010 - 08:49

    When a connection is made, a socket will be formed between the server and the client. Each port can have several active sockets. The .NET framework and the OS maintain this information.

    http://www.freesoft.org/CIE/Course/Section4/6.htm

    http://en.wikipedia.org/wiki/Internet_socket

  • Link From window form to WPF
    03/15/2010 - 15:37

    We've got two tutorials about how to host Winforms in WPF and WPF in Winforms. Are these what you're looking for?

    WPF Tutorial - Using WPF In WinForms

    WPF Tutorial - Using WinForms In WPF

  • iPhone Tutorial - Reading the Accelerometer
    03/05/2010 - 16:47

    I'd create an NSMutableArray to hold the UIAcceleration objects. Whenever it's read, simply call addObject on the array and supply the object.

  • An Absolute Beginner's Guide to iPhone Development
    03/04/2010 - 15:50

    Sounds like it doesn't know what viewController is. Do you have it as a member on the class?

    @interface HelloWorldAppDelegate : NSObject <UIApplicationDelegate> {
        UIWindow *window;
     
      HelloWorldViewController *viewController;
     
    }

  • color Picker
    02/18/2010 - 11:48

    Here's a forum topic that appears to list several possibilities. We also have a Javascript Color Picker you could try.

  • Notepad++ Subversion Plugin
    02/17/2010 - 18:57

    Hey everyone. I've created a new version, 1.2, that provides the ability revert files.

  • PHP Tutorial - Creating and Modifying SQLite Databases
    02/15/2010 - 15:27

    I have fixed the post, so if you've used the code recently, you'll receive the correct output.

  • Notepad++ Subversion Plugin
    02/12/2010 - 13:37

    This plugin uses Tortoise commands that have been there for a very long time. I cannot say for sure if 1.4 is supported, but I don't know why it wouldn't be. It looks to me like whatever file you're attempting to commit is not actually within an SVN repository. If you attempt to use Tortoise directly to commit the file, do you receive the same error?

Sponsors