Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

Kr0d

@Kr0d
About
Posts
9
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Naming
    K Kr0d

    If you're really stuck use http://online-generator.com/name-generator/project-name-generator.php as it gives random names like Black Pure Poseidon Aggressive Full Firecracker Eastern Screwdriver Big Moose The big trend at the moment is adding a 'er' on the end of what its for. This is my most common technique. I.E. An app that keeps track of stock: Stock Tracker.

    The Lounge question

  • What are 'the basics'?
    K Kr0d

    The single most valuable course I ever took in my Computer Systems Engineering course was... ahh.... i forgot the name but it started out like this.... 1. Get a Motorola 68HC12 dev board. 2. Program it with machine code in HEX to print to blink an LED. No assembly, no compilers, no libraries. The IO on this microcontroller was memory mapped so the program would simply write a bit high and low but we had to look up the hex for each processor command and use the memory diagram to know where to write our program to, write to IO and jump to functions. Later in the course we move up to assembly and even C on the same platform. In my opinion, you dont need to do this for a programming career but if you want to be a half decent programmer, do this until you understand it.

    The Lounge csharp com json help

  • Formula 1 2010
    K Kr0d

    There is a nice game similar to footy tipping for F1 that just popped up. http://guessthegrid.com/[^] Looks pretty good.

    The Lounge com json question

  • So there was this guy sitting next to me on the train with a Mac notebook...
    K Kr0d

    ah, if only every OS was perfect in the business place and you can actually deploy "build once, run everywhere" apps. In my humble opinion, windows(desktop, server, mobile) = average consumer, businesses osx = artsy types (photographers, audio/video editors, etc), people who want to stick it to the man but still like to follow people like sheep. linux = nerds, smarter (new age?) businesses, people who want to stick it to the man and know how its done. In all honesty, I havent used osx for a decent amount of time but I do run (ranked by hours of use) linux (android) on my phone (relevance? yeah i know, i added this in after i wrote the rest) xp on my work pc (windows mobile/asp/desktop development) eeeubuntu on my eeepc 701 (browsing and remote desktopping mostly) ubuntu server edition on my web server windows 7 RC on my desktop pc (probably switch to linux when my RC runs out) xp on my fiancee's slow ass laptop (which she wont let me format) so i think that i am well enough informed to sum up the OS wars to this... They all suck AND they all rule, in their own way. take that to the bank!

    The Lounge com help tutorial question

  • Programming's Foul Language
    K Kr0d

    COM and Interop

    The Lounge tutorial question

  • 3.69122E+12
    K Kr0d

    Mark Miller wrote:

    I wonder what the Earth will look like in the year 307601668674?

    "The humans are dead. They used poisonous gasses, to poison our asses. Actually, our lungs."

    The Lounge com question

  • The problem with Australia
    K Kr0d

    I guess someone's pet spider got off its leash. Its so cute though.

    The Lounge php visual-studio linq com beta-testing

  • Job title? Vote please
    K Kr0d

    5 for job title. 0 for company.

    The Lounge c++ com architecture question career

  • TCP Checksum Generator
    K Kr0d

    Hey all, I'm writing a program that can modify packets in c#. Everything is going fine except my TCP checksum generator where it seems to work for some packets but with a few slight changes it generates the wrong thing. It only seems to be doing this when sending packets to my test box, otherwise it works fine. Could the community please have a look at my code and try and find out what is wrong? i know my programming style Isn't exactly neat although any help would be appreciated. I pass it the whole packet and it sends back a string of the checksum in hex format. Cheers -Glen private static string GenerateTCPChecksum(byte[] packet) { //Clears the existing checksum packet[0x32] = 0x00; packet[0x33] = 0x00; int sum = 0; //Gets the IP header length string ipHeaderLength = Convert.ToString(packet[0x0e], 16); ipHeaderLength = "" + ipHeaderLength[1]; //Gets the packet size not including the ethernet part int packetSize = Convert.ToInt32(Convert.ToString(packet[0x10], 16).PadLeft(2, '0') + Convert.ToString(packet[0x11], 16).PadLeft(2, '0'), 16); //TCP packet size int length = packetSize - (Int32.Parse(ipHeaderLength) * 4); //TCP packet size //Adds up the whole TCP packet for (int i = 0x22; i < packet.Length; i++) { try { sum = sum + Convert.ToInt32(Convert.ToString(packet, 16).PadLeft(2, '0') + Convert.ToString(packet[i + 1], 16).PadLeft(2, '0'), 16); } catch (IndexOutOfRangeException) { sum = sum + Convert.ToInt32(Convert.ToString(packet, 16).PadLeft(2, '0') + "00", 16); } i++; } //Adds the psudoheader which is the IP addresses, protocol (TCP) and length sum = sum + (Convert.ToInt32(Convert.ToString(packet[0x1a], 16).PadLeft(2, '0') + Convert.ToString(packet[0x1b], 16).PadLeft(2, '0'), 16)) + (Convert.ToInt32(Convert.ToString(packet[0x1c], 16).PadLeft(2, '0') + Convert.ToString(packet[0x1d], 16).PadLeft(2, '0'), 16)) + (Convert.ToInt32(Convert.ToString(packet[0x1e], 16).PadLeft(2, '0') + Convert.ToString(packet[0x1f], 16).PadLeft(2, '0'), 16)) + (Convert.ToInt32(Convert.ToString(packet[0x20], 16).PadLeft(2, '0') + Convert.ToString(packet[0x21], 16).PadLeft(2, '0'), 16)) + 0x06 + length; string s = Convert.ToString(sum, 16); string carry = "00"; //Seperates carry and the rest if (s.Length >= 5) { carry = s.Substring(0, s.Length - 4); s = s.Substring(s.Length - 4, 4); } //Adds the carry to the rest sum = Convert.ToInt32(s, 16); sum = sum + Convert.ToInt32(carry, 16); //Inverts number(one's complement) sum = 0xffff - sum; s = Convert.ToString(sum

    C# question csharp json help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups