A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a re ...
分类:
其他好文 时间:
2018-07-28 12:07:02
阅读次数:
126
由于 python3 包括python2.7 以后的round策略使用的是decimal.ROUND_HALF_EVEN 即Round to nearest with ties going to nearest even integer. 也就是只有在整数部分是奇数的时候, 小数部分才逢5进1; 偶 ...
分类:
编程语言 时间:
2018-07-25 23:58:30
阅读次数:
400
The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers from 1 to N. F ...
分类:
其他好文 时间:
2018-07-24 23:51:17
阅读次数:
299
1、十进制转换为二进制 Objective C / 十进制转换为二进制 @param decimal 十进制数 @return 二进制数 / + (NSString )getBinaryByDecimal:(NSInteger)decimal { NSString binary = @""; whi ...
分类:
移动开发 时间:
2018-07-23 12:42:01
阅读次数:
274
JDBC Type Java Type CHAR String VARCHAR String LONGVARCHAR String NUMERIC java.math.BigDecimal DECIMAL java.math.BigDecimal BIT boolean BOOLEAN boolea ...
分类:
数据库 时间:
2018-07-23 12:39:49
阅读次数:
180
初始化测试数据 创建一个测试用的表 create table dept(id int primary key auto_increment , deptName varchar(32) not null unique,salary decimal(12,6) not null,remark varc ...
分类:
数据库 时间:
2018-07-22 15:23:21
阅读次数:
191
defaultdict(set_type) 可以定义字典多值映射,入参类型决定value类型。 例子: deque:(int) 保留最后N个元素 例子: Decimal(float) 直接对浮点数进行计算有微小误差,Decimal可以对浮点数进行精确计算。 例子: dropwhile(callabl ...
分类:
编程语言 时间:
2018-07-19 21:14:36
阅读次数:
148
数据类型分类 MySQL的数据类型分为五大类,整数类型,浮点数类型,字符串类型,日期类型,其他数据类型。 整数类型:bit, bool, tiny int, small int, mediun int, int, big int 浮点数类型:float, double, decimal 字符串类型: ...
分类:
数据库 时间:
2018-07-18 19:03:44
阅读次数:
138
/** * 计算两点地理坐标之间的距离 * @param Decimal $longitude1 起点经度 * @param Decimal $latitude1 起点纬度 * @param Decimal $longitude2 终点经度 * @param Decimal $latitude2 终... ...
分类:
其他好文 时间:
2018-07-17 16:25:42
阅读次数:
113
create table salary (userid int,salary decimal(9,2)); -- mysqlinsert into salary values(1,1000),(2,2000), (3,3000),(4,4000),(5,5000), (1,null),(2,500) ...
分类:
数据库 时间:
2018-07-15 11:22:02
阅读次数:
178