t*t
5 楼
要只用0-9A-Z也不是不可以,不过就要做一点运算而已
100*12*31=37200 < 46656=36*36*36
【在 c**t 的大作中提到】
: It's easy to use one character to reprent either month or day; The maximun
: one
: is 31. (we have 0-9A-Z total 36 to use); but for year, assuming using two
: digits, there are 100 possibilities, may use ascii to reprent....
: Is there better idea to encode a date?
100*12*31=37200 < 46656=36*36*36
【在 c**t 的大作中提到】
: It's easy to use one character to reprent either month or day; The maximun
: one
: is 31. (we have 0-9A-Z total 36 to use); but for year, assuming using two
: digits, there are 100 possibilities, may use ascii to reprent....
: Is there better idea to encode a date?
O*d
10 楼
Using first 4 bits of the first char to represent month 1 - 12. The last 4
bits to represent day 1-16. Using one bit in the second char to represent a
flag which indicates whether to add 15 to the day. You will then have 15
remaining bit to represent year that will be from 0 to 32767.
bits to represent day 1-16. Using one bit in the second char to represent a
flag which indicates whether to add 15 to the day. You will then have 15
remaining bit to represent year that will be from 0 to 32767.
c*t
12 楼
I used the offset (days) by 2000-1-1 and 35 base. There is some limit: shoul
d be always three characters (0-9A-Z).
Actually I don't have 24 bits to use.
【在 g*****g 的大作中提到】
: Use a number of offset by 1900-1-1 for example.
: You have 24 bits, that's more than enough.
: Actually time is done that way internally in Unix.
d be always three characters (0-9A-Z).
Actually I don't have 24 bits to use.
【在 g*****g 的大作中提到】
: Use a number of offset by 1900-1-1 for example.
: You have 24 bits, that's more than enough.
: Actually time is done that way internally in Unix.
相关阅读
Python 可不可以一次读数据给一个 web service 后,然后一直用这个数据Graphlab的platform 在machine learning里用的多吗Angular难题:angular.js:12477 SyntaxError: Unexpected token >像ionic这种怎么处理image loading?干脆谁谁起个头Java/Web Developer Job in Silver Spring, MDng-style height=100% not working ?Have a try on Vert.x-shell不想当码工,Systems Analyst方向发展如何?angular实际项目有啥可操性?linkedin就是一流氓公司求react-bootstrap和node/express一起使用的例子vNext有没有人用过python + django可以作multi-threading,php multi-threading貌react, angular2 哪个有前途大家一般用芒果存什么样的数据开源图片/文本分析embedded Java有串口吗?java 8就是一坨屎web set test color方法都这么多了