error-detection

Finding hamming distance of code

偶尔善良 提交于 2019-12-31 23:00:09
问题 A question asks: find the hamming distance of the following code: 11111 10101 01010 11100 00011 11001 The answer is 2. How does this work? I thought hamming distance is only between two strings? 回答1: The Hamming distance of a code is defined as the minimum distance between any 2 codewords. So, in your case, finding the Hamming distance between any 2 of the listed codewords, no one is less than 2. 回答2: Here is some Python-code to find it automatically: code = [ (0,0,0,0,0,0), (0,0,1,0,0,1), (0

Detect errors on web page with Firebug

心不动则不痛 提交于 2019-12-13 15:13:18
问题 What is the best way to check our web applications for errors such as "duplicate attribute"? My development team tends to use Firefox and Firebug for web development. We've noticed some errors creeping into the codebase, usually duplicate attributes such as: <div id="MyDiv" class="hide" class="interestingDiv"> We see no errors in Firebug's console nor can see anyway to get Firebug to report that there are errors. We have noticed that Firefox itself IS aware of these errors. By clicking on

Checking the error detection capabilities of CRC polynomials

老子叫甜甜 提交于 2019-12-07 07:27:15
问题 I tried to find out how to calculate the error detection capabilities of arbitrary CRC polynomials. I know that there are various error detection capabilities that may (or may not) apply to an arbitrary polynomial: Detection of a single bit error: All CRCs can do this since this only requires a CRC width >= 1. Detection of burst errors: All CRCs can detect burst errors up to a size that equals their width. Detection of odd numbers of bit errors: CRC with polynomials with an even number of

What is CRC? And how does it help in error detection?

▼魔方 西西 提交于 2019-12-07 07:16:35
问题 What is CRC? And how does it help in error detection? 回答1: CRC stands for Cyclic Redundancy Check. it helps in error detection.. It consists of the following b(x)-> transmitted code word q(x)-> quotient i(x)-> information polynomial r(x)-> remainder polynomial g(x)-> generated polynomial step 1: x^(n-k) * i(x) step 2: r(x) = (x^(n-k) * i(x))%g(x) step 3: b(x) = (x^(n-k) * i(x)) XOR with r(x) which results in a transmitted code word. this b(x) is send to the reciever end from the sender and if

Checking the error detection capabilities of CRC polynomials

孤者浪人 提交于 2019-12-05 14:32:46
I tried to find out how to calculate the error detection capabilities of arbitrary CRC polynomials. I know that there are various error detection capabilities that may (or may not) apply to an arbitrary polynomial: Detection of a single bit error: All CRCs can do this since this only requires a CRC width >= 1. Detection of burst errors: All CRCs can detect burst errors up to a size that equals their width. Detection of odd numbers of bit errors: CRC with polynomials with an even number of terms (which means an even number of 1-bits in the full binary polynomial) can do this. Detection of

Is there a global approach to catch network errors in javascript

守給你的承諾、 提交于 2019-12-03 15:33:58
问题 I'm researching the possibility of automated on-page error detection via Javascript. I have found several questions where the answer allows you to catch Javascript compilation and runtime errors globally via window.onerror , but no answers mention other types of non-Javascript errors that are often reported in browser error consoles. I'm primarily interested in network errors (invalid URI's, SSL errors, HTTP errors, timeouts) and resource interpretation errors (mismatching types resulting in

Why does BCL GZipStream (with StreamReader) not reliably detect Data Errors with CRC32?

半城伤御伤魂 提交于 2019-11-27 08:45:45
The the other day I ran into the question GZipStream doesn't detect corrupt data (even CRC32 passes)? (Of which this might very well be a "duplicate", I have mixed feelings on the subject. I was also the one who added the CRC32 to the title, but in retrospect that feels out of place with the remainder of the post). After exploring the problem a bit on my own, I think that the issue is far greater than the other question initially portrays. I expanded upon the other question and made the test code runnable under LINQPad and attempt to better showcase the CRC32 (Cyclic Redundancy Check) issue,

Is there a way to determine whether an e-mail reaches its destination?

左心房为你撑大大i 提交于 2019-11-27 02:54:05
问题 I have a PHP script that sends out critical e-mails that needs to reach its destination. I know how to check whether the e-mail sent successfully, the only issue is knowing whether it actually got to its recipient. Any suggestions? If there is no way of knowing, how would you handle this situation? 回答1: If you make the email HTML based, you can include images in it which contain URLs with information unique to the recipient. You could structure your application so that these URLs trigger some

Why does BCL GZipStream (with StreamReader) not reliably detect Data Errors with CRC32?

十年热恋 提交于 2019-11-26 17:46:32
问题 The the other day I ran into the question GZipStream doesn't detect corrupt data (even CRC32 passes)? (Of which this might very well be a "duplicate", I have mixed feelings on the subject. I was also the one who added the CRC32 to the title, but in retrospect that feels out of place with the remainder of the post). After exploring the problem a bit on my own, I think that the issue is far greater than the other question initially portrays. I expanded upon the other question and made the test