
算法
duanbeibei
这个作者很懒,什么都没留下…
展开
-
adler32
Adler-32From Wikipedia, the free encyclopediaAdler-32 is a checksum algorithm which was invented by Mark Adler in 1995,[1] and is a modification of the Fletcher checksum. Compared to转载 2015-08-04 13:25:41 · 751 阅读 · 0 评论 -
闰年计算方法
编程中经常遇到这样的问题:给定一个数字,其值的含义是距离'1970-01-01'或'1900-01-01'的天数,求这个数字对应的是哪年哪月哪天?问题的难处在于并不是每一年都是365天,有些年份是366天,比如今年2016。科学上把一年中有366天的年份,定义为闰年。那么哪些年份是闰年,怎样计算?公式如下满足下列两个条件之一的,即为闰年1. 年份能被4整除,且不能被1原创 2016-01-21 15:23:34 · 1360 阅读 · 0 评论