What happens when a geek is waiting on Windows Update and finds that strings don't support XOR in .Net?

by Mwwhited 29. April 2009 02:04
Using this struct you may implicitly cast string's or char[]'s to "MyString" and it has one current overridden operator... and that would be XOR. Also wanting an insane excuse to play with unsafe code I decided to do it with pointers. It’s may not be the most graceful code in the world… but hey quick and dirty is just as fun. public struct MyString { public MyString(string value) { _value = value.ToCharArray(); } public MyString(char[] v... [More]

Tags: ,

Duff's Device in C#

by Mwwhited 29. April 2009 02:04
One of the features that are "lost" in C# from C/C++ is the ability for switch cases to "fall though".  This feature may be explicitly added back to your code simple by using a "goto" pointed to a particular case.  Another way to implement this would be to use unsafe code and use pointers instead of array indexers. public static void DuffsDevice(T[] from, T[] to) { int count = from.Length; int position = 0; switch ( count % 8 ) ... [More]

Tags:

Programming

WOW... some people are INSANE!!!!

by Mwwhited 29. April 2009 00:04
Okay... calculating PI can be crazy enough. But to do it in BF... that's just insane. The guy that wrote this deserves a gold star and a metal. http://dl.getdropbox.com/u/35146/PI16.txt

Tags: , ,

Programming

Ahh... the good old days... Serial Ports and Null Modems

by Mwwhited 23. April 2009 00:04
While digging around my heap of old code I ran across this beauty. Simple chat program for QBasic that allows two people to chat over RS-232... Guess you could even hook up a modem if you wanted to handle all of the AT commands on your own. This program was written for when I was in an Explorer scouts program at Lucent Technologies. We had a presentation day and no one gave my group a heads up. So while the leaders were talking with the incomming kids I wired up a null modem cable and wrote this... [More]

Tags:

Telnet + Sockets = Fun

by Mwwhited 23. April 2009 00:04
Here is a simple Telnet server implmented using C#. This is a very simple introduction to Socket, TCPListener, and Network Streams. using System; using System.Diagnostics; using System.IO; using System.Net.Sockets; using System.Text; using System.Threading; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { TcpListener listener = new TcpListener(23); listener.Start(); while (true) ... [More]

Tags:

Programming

Fires back

by Mwwhited 20. April 2009 23:04
While looking at someone that attacked another of my posts I found this survey on his blog. I figured to be fair to him and his fellow Linux fanboys I would complete the same survey. (Also after responding to him I read more of his blog to find… while he is almost twice my age and attacking my reputation I have been using Linux longer than him… go figure) Since when are you a Linux user? Freshman Year… so 1996 Was it difficult to do your first install? Not really, Slack... [More]

Tags: ,

Linux

Helpful Build/Run Scipt (.cmd)

by Mwwhited 20. April 2009 23:04
@ECHO OFF IF "%1"=="D" GOTO debugIt IF "%1"=="d" GOTO debugIt IF "%1"=="debug" GOTO debugIt IF "%1"=="B" GOTO buildIt IF "%1"=="b" GOTO buildIt IF "%1"=="build" GOTO buildIt REM IF "%1"=="A" GOTO doneWithIt IF NOT "%1"=="" GOTO :errorCmd boottest.cmd mypc.vmc GOTO doneWithIt :buildIt echo Build DistroWorld.proj ms... [More]

Tags:

Programming

Windows Home Server: 6 months later

by Mwwhited 20. April 2009 23:04
Back in 1998 to 2000 I ran Slackware Linux as my primary operating system on my home computer. This was my access to the internet, web development and just plain programming for 2 years. I did have the system configured to dual boot with Windows 98 for the occasions when I wanted to play games (WINE and all that other stuff was just [and still is] crap). After 2000 I decided that I was don’t with the dual boot thing I and setup a full home network using Linux as my file and internet se... [More]

Tags: ,

Linux | Windows

Greetings Programs!!!

by admin 20. April 2009 23:04
Welcome to "Hackers Basement".  This is a small window into the insane world of my hobbies.  Stick around and enjoy the ride.

Tags:

New favorite coding project

by Mwwhited 20. April 2009 23:04
Seeing that I went to school for electronics I am always interested in trying to get more of a bang out of a transistor. I so far have been very impressed at what I have seen Microsoft pull off with Singularity. I know there are a lot of people complaining about how they licensed it, but the only real reason they released it for academic use is it is a test platform. And being the geek that I am, I enjoy looking under the hoods of cars and the cases of computers. So feel free to stay tuned a... [More]

Tags:

Programming

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

RecentPosts

Badges