Search Results

Search found 2 results on 1 pages for 'cadwag'.

Page 1/1 | 1 

  • Java: confirm method Binary division and find remainder is correct?

    - by cadwag
    I am parsing binary files and have to implement a CRC algorithm to ensure the file is not corrupted. Problem is that I can't seem to get the binary math working when using larger numbers. The example I'm trying to get working: BigInteger G = new BigInteger("11001", 2); BigInteger M = new BigInteger("1110010000", 2); BigInteger R = M.remainder(G); I am expecting: R = "0101" But I am getting: R = "1100" I am assuming the remainder of 0101 is correct since it is given to me in this book I am using as a reference for the CRC algorithm (it's not based in Java), but I can't seem to get it working. I can get small binary calculations to work that I have solved by hand, but not the larger ones. I'll admit that I haven't worked the larger ones by hand yet, that is my next step, but I wanted to see if someone could point out a glaring flaw I have in my code. Can anyone confirm or deny that my methodology is correct? Thanks

    Read the article

  • Easiest way to programmatically create email accounts for use by web app?

    - by cadwag
    I have a web app that create groups. Each group gets their own discussion board. I would like to add the feature of allowing users to send emails to their "group" within the web app to start a new discussion or reply to an email from the "group" to make a new post in an already ongoing discussion. For example, to start a new discussion a user would send: From: [email protected] To: [email protected] Subject: Hey guys! Meet up on Tuesday? Body: Yes? No? All members of the group would receive an email: From: [email protected] Subject: Hey guys! Meet up on Tuesday? Body: Yes? No? Reply-To: group1@ example.com And, the app would start a new discussion with: Author: Bill Fake Subject: Hey guys! Meet up on Tuesday? Body: Yes? No? This is a pretty standard feature for Google Groups and other big sites. So how do us mere mortals go about implementing this? Is there an easy way? Or do I: 1. Install postfix 2. Write scripts to create new accounts for each new group 3. Access the server periodically via pop3 (or imap?) to retrieve the email messages sent to each account? 4. Parse the message for content If it's the latter, did I miss a step?

    Read the article

1