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
35进制的目的是防止0和O造成的视觉误差 BEGIN DECLARE m_StrHex35 VARCHAR(100); -- 返回35进制表示的结果 DECLARE m_Remainder BIGINT; -- 余数 DECLARE m_Base35 VARCHAR(1); SET m_Remainder=0; SET m_StrHex35=''; WHILE p_Hex10>=35 DO SET m_Remainder=p_Hex10%35; SET
//字符串转成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