• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Zorm

#1
General Discussion / Re: What do YOU do?
December 21, 2008, 12:21 PM
College student, also an undergrad research assistant at NOAA's National Severe Storms Laboratory
#2
General Discussion / Re: happy belated bday z0rm
December 21, 2008, 12:13 PM
Hahaha, good memories man!
#3
Quote from: MyndFyre[vL] on October 29, 2007, 04:40 PM
The reason I did that is because strcmp is null-terminated (strncmp would have been another choice).

Using == is not the proper way to compare char[] in C.  The string literal "TAG" will always be in a static place in memory, as opposed to what he's reading from disk.  == will compare the memory locations for equality (unless he's using an STL std::string or MFC CString), which would only return true if they're the same reference, which we know they're not.

By doing it the way I suggested, he's able to use a standard library string compare function, we're sure that it's going to not run into any unchecked-input security issues, and he avoids the interned-string issue.

To respond to your other questions, the reason the header is "returning" "TAGGet Up, Stand Up" is because there isn't a null terminator at the end of "TAG" (as someone else already pointed out).  You could do a binary compare as well, but it's kind of awkward since it's only three bytes, which is why I opted for the copy-and-strcmp.

Why not just use memcmp? That would save you an extra copy...

Also while it looks like its not happening in your case, you'll probably eventually run into a situation where the compiler aligns a struct and you'll get nastiness where its not really the size you want.
#4
EM_EXGETSEL
#5
Web Development / Re: HTTP Protocol Client and PHP
September 11, 2007, 09:53 PM
Uh huh, looks like its pretty clear to me. Its the length of the data following it. So you read the first line of the first data section, get the length, read that much more. Once you have read length you repeat the process until length == 0.
#6
Web Development / Re: HTTP Protocol Client and PHP
September 11, 2007, 07:16 PM
Looks to me like it might be related to chunked transfer encoding or something fun like that. Note how the length ('d', 'e', '0') is changing for people. Why its actually 'd' and '0' I have no clue...
#7
Did you get this figured out yet?
If not I highly suggest you learn how to use your IDE's debug mode. Then when your program crashes you can get a callstack and look back to see where the crash actually happened at. This will allow you to come to a consensus of what code is causing the problem instead of wildly guessing.
Not to mention that this is an incredibly powerful tool to be able to weild correctly. Once you learn how to use it you won't have to do things like pasting huge chunks of code for people on forums. You'll be able to post a small little chunk, say what the problem is, where the problem is occurring and what you've already tried to resolve it. Its amazing how much faster you'll get a reply if you do this and how much faster you can get back to doing what really matters, programming and making your program rock!
#8
I was actually kinda curious because this sounds cool. A quick google search revealed that you're probably SOL in regards to not having the needed network cards as everything I have seen suggests you need atleast two in each box.

I also came across a pdf file for setting up a cluster using vmware http://www.blkmtn.org/system/files/VMware+clustering+1.0.pdf. Sure it doesn't apply to your exact situation but it will atleast give you a brief overview of the steps involved in setting everything up. I imagine you found this document as well though since its one of the first hits.
#9
There were actually a lot of bots built off of mIRC since it has socket support as part of its scripting language. Several people therefore wrote bots in it using the telnet gateway to connect to battle.net.
Later on after the telnet gateway as made more or less unusable people wrote 'binary gateways' that were basically locally hosted severs which translated between the telnet gateway and the binary connection that the games use so that the mIRC clients and other bots could continue to operate.
#10
Thing-O-Rama ™ / Re: Tell us now!
April 05, 2007, 12:28 AM
Quote from: ♥ on April 01, 2007, 03:28 PM
Quote from: Zorm on April 01, 2007, 02:45 PM
By 'sketched out' I mean that it might be something other than a sensor malfunctioning... We had two fire alarms last night and two the night before so...

Are you serious? Your first thought was actually "sensor malfunction"? lol. Welcome to the dorms, where you have no peace and quiet, and will not get good sleep.

Yes, and thats pretty much what it was. My dorm is pretty quiet, none of this insane noise and such that everyone else talks about... I guess the people on my floor are just non-cool.
#11
Thing-O-Rama ™ / Re: Tell us now!
April 01, 2007, 02:45 PM
By 'sketched out' I mean that it might be something other than a sensor malfunctioning... We had two fire alarms last night and two the night before so...
#12
Thing-O-Rama ™ / Re: Tell us now!
April 01, 2007, 05:55 AM
The fire alarm for my dorm has gone off 3 times in the last 24 hours. Always during the middle of the night too, I'm starting to get sketched out.
#13
General Discussion / Re: WTF
March 11, 2007, 01:43 PM
I think the post count god rolled the dice.
#14
Thing-O-Rama ™ / Re: Tell us now!
February 15, 2007, 12:03 AM
Quote from: Shout on February 14, 2007, 10:22 PM
I did it. In June I go to boot camp. Woot?

Awesome, which service?!
#15
Web Development / Re: Web Developer needed?
January 14, 2007, 07:08 PM
Depends on what all you need. Teh User reminded me that I suck at web design...