1. 字符串转换为16进制字符串 import binascii binascii.b2a_hex(string) 可以把一个字符串转化为一个16进制的字符串 2. 十六进制字符串转化为int int("ffff",16) 把一个十六进制字符串转化为Int 3.base64.b64encode ba... ...
分类:
编程语言 时间:
2016-06-28 21:47:25
阅读次数:
180
在实际的应用中,我们经常需要对字符串进行编解码,Apache Commons家族中的Commons Codec就提供了一些公共的编解码实现,比如Base64, Hex, MD5,Phonetic and URLs等等。 一、官方网址: http://commons.apache.org/codec/ ...
分类:
其他好文 时间:
2016-06-27 23:08:49
阅读次数:
190
在剖析该问题前请看如下代码 public static String bytes2HexString(byte[] b) { String ret = ""; for (int i = 0; i < b.length; i++) { String hex = Integer.toHexString( ...
分类:
编程语言 时间:
2016-06-27 11:54:36
阅读次数:
150
一、ABS ABS(x) 返回x的绝对值 二、BIN/OCT/HEX BIN(x) 返回x的二进制(OCT返回八进制,HEX返回十六进制) 三、CEILING/FLOOR CEILING(x):返回大于x的最小整数值 FLOOR(x):返回小于x的最大整数值 四、EXP EXP(x) 返回值e(自然 ...
分类:
数据库 时间:
2016-06-22 10:37:10
阅读次数:
182
颜色表及html代码 颜色名称及色样表(HTML版) 颜色名 中文名称 Hex RGB 十进制 Decimal LightPink 浅粉红 #FFB6C1 255,182,193 Pink 粉红 #FFC0CB 255,192,203 Crimson 深红(猩红) #DC143C 220,20,60 ...
分类:
Web程序 时间:
2016-06-17 00:49:25
阅读次数:
366
Given a code (not optimized), and necessary inputs, you have to find the output of the code for the inputs. The code is as follows: int a, b, c, d, e, ...
分类:
其他好文 时间:
2016-06-10 12:21:41
阅读次数:
202
visitlog表里存的IP是看不出来IP地址的,PIWIKFAQ:http://piwik.org/faq/how-to/faq_158/HowdoIselectIPaddressesorVisitorIDdirectlyfromthedatabase?SELECTinet_ntoa(conv(hex(location_ip),16,10))asip,conv(hex(idvisitor),16,10)asvisitorIdFROMpiwik_log_visit;可以看出..
分类:
其他好文 时间:
2016-06-08 10:49:18
阅读次数:
956
一、内置函数 1、abs 2、bool 3、all 4、any 5、bin 6、oct 7、hex 8、bytes 9、str 10、callable 11、chr 12、ord() 13、random() 14、compile() 15、eval() 16、dir() 17、help() 18、d ...
分类:
编程语言 时间:
2016-06-04 13:20:41
阅读次数:
488
python 基础(四) 一. 本章主要内容简介: 1. Python内置函数的功能用途(继续上一章讲解) 内置函数: 1)数字运算、类型转换、集合类操作: bin()、oct()、int()、hex() 进制转换,round()四舍五入,pow()返回x的y次幂,range() 生成序列,sum( ...
分类:
其他好文 时间:
2016-06-04 13:20:10
阅读次数:
256
1.常用的python函数 abs 求绝对值 all 判断迭代器中所有的数据是否为真或者可迭代数据为空,返回真,否则返回假 any 判断迭代器中的数据是否有一个为真,有返回真,可迭代数据为空或者没有真,返回假 bin 转换整数为二进制字符串 hex 转换整数为十六进制字符串 oct 转换整数为八进制 ...
分类:
编程语言 时间:
2016-06-01 00:00:14
阅读次数:
549