import java.util.HashMap; public class Ten2Thirty { private static final String X36 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; private static final String[] X36_ARRAY = "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z
CREATE OR REPLACE FUNCTION IDFMS.func_dec236 (parm IN INT DEFAULT 0) RETURN VARCHAR2IS /* 10进制数转36进制数 */ src VARCHAR2 (36) := '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; --改成其它字符串,就是任意进制 LEN INT; res VARCHAR2 (10) := ''; tmp INT;
第一部分 --36转10进制 create or replace function f_36to10 (str varchar) return int is returnValue int; str36 varchar(36); subWork varchar(1); workIndex int; len int; i int; begin returnValue:= 0; str36 := '123456789ABCDEFGHIJK
感谢:http://blog.csdn.net/xiaofei2010/article/details/7434737 以及:http://www.cnblogs.com/nzbbody/p/3504199.html 1. int转string(更多参见:http://www.cnblogs.com/nzbbody/p/3504199.html) #include <iostream> #include <sstream> using namespace std; int main
//字符串转成16进制代码function strToHexStr(str:string):string;varc:char;ss:string;i:integer;beginwhile str<>'' do begin c:=str[1]; ss:=ss+format('%0x',[ord(c)]); delete(str,1,1);end;strtohexStr:= ss;end; //16进制字符串转换成字符串function HexStrToStr(const S
Faulty Odometer Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4278 Description You are given a car odometer which displays the miles traveled as an integer. The odometer has a defect, however: it proceeds from
直接举例说明: int i = 15;//一个10进制数 string txt = Convert.ToString(i,16);//将上面10进制以16进制形式显示为f string s = "15";//一个字符串15 int i = Convert.ToInt32(s,16);//注意:这里并不是将15转换为16进制的F,而是将字符串“15”转为10进制的0x15这个数字,10进制为21; 讲一个字节数组转为16字节格式的字符串: string s = string.Empty;