- AFAIK == as far as I know
- IMO == in my opinion
- IMHO == in my humble opinion
- LGTM == look good to me
- AKA == also know as
- ASAP == as sone as possible
- BTW == by the way
- FAQ == frequently asked questions
When is it appropriate to use CRC for error detection versus more modern hashing functions such as MD5 or SHA1? Is the former easier to implement on embedded hardware?
http://stackoverflow.com/questions/996843/when-is-crc-more-appropriate-to-use-than-md5-sha1
by @defines http://stackoverflow.com/a/996873/775783
CRC works fine for detecting random errors in data that might occur, for example, from network interference, line noise, distortion, etc.
CRC is computationally much less complex than MD5 or SHA1. Using a hash function like MD5 is probably overkill for random error detection. However, using CRC for any kind of security check would be much less secure than a more complex hashing function such as MD5.
Introduction to the YUI Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://codeforces.com/contest/236/problem/A | |
function judge(str) { | |
var arr = str.split(''); | |
var obj = {}; | |
var len = 0; | |
for (var i = 0; i < arr.length; i++) { | |
if (!obj[arr[i]]) { | |
obj[arr[i]] = 1; | |
len ++; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="instanceof cross iframe" /> | |
<meta charset="utf-8"> | |
<title>instanceof cross iframe</title> | |
</head> | |
<body> | |
<iframe id="fr" ></iframe> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var animal = { eats: true } | |
var rabbit = { jumps: true } | |
rabbit.__proto__ = animal // inherit | |
console.log(rabbit.eats) // true | |
var animal = { eats: true } | |
rabbit = Object.create(animal); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @description check dot whether in a triangle | |
* @author zhiyelee | |
*/ | |
/** | |
* for tri like below: | |
* A | |
* * * | |
* B * * * C |