求高手翻译JAVA TO VB 在线等
function utf8(wide) {
var c, s;
var enc = "";
var i = 0;
while(i <wide.length) {
c= wide.charCodeAt(i++);
// handle UTF-16 surrogates
if (c>=0xDC00 && c <0xE000) continue;
if (c>=0xD800 && c <0xDC00) {
if (i>=wide.length) continue;
s= wide.charCodeAt(i++);
if (s <0xDC00 || c>=0xDE00) continue;
c= ((c-0xD800) < <10)+(s-0xDC00)+0x10000;
}
// output value
if (c <0x80) enc += String.fromCharCode(c);
else if (c <0x800) enc += String.fromCharCode(0xC0+(c>>6),0x80+(c&0x3F));
else if (c <0x10000) enc += String.fromCharCode(0xE0+(c>>12),0x80+(c>>6&0x3F),0x80+(c&0x3F));
else enc += String.fromCharCode(0xF0+(c>>18),0x80+(c>>12&0x3F),0x80+(c>>6&0x3F),0x80+(c&0x3F));
}
return enc;
}
var hexchars = "0123456789ABCDEF";
function toHex(n) {
return hexchars.charAt(n>>4)+hexchars.charAt(n & 0xF);
}
var okURIchars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-";
function encodeURIComponentNew(s) {
var s = utf8(s);
var c;
var enc = "";
for (var i= 0; i <s.length; i++) {
if (okURIchars.indexOf(s.charAt(i))==-1)
enc += &qu
相关问答:
我现在想用ssh整合来做一个论坛,但数据库方面不行,我主要不会涉及数据库,不知道发帖表,和回帖表要如何设计和区分。不知道谁有一个简单的思路,来设计这些表。谢谢了。
发帖和回帖用同一张表 。发帖 id user ......
我想用Java写一个程序,就是我想在运行代码后,在指定的时间打开某程序,例如我运行代码后,讲在12:00打开"D:\Program Files\Tencent\QQ2009\Bin\QQ.exe"这个程序,求高人指点。还有可能的话在指定的时间 ......
看了一些VB ini文件写入读取的方法 但是还是不知道怎么写,上面写了很长 很多,但是我不知道怎么用,我想问一下怎样写才能实现在TEXT1中写字,然后点Command1提交,然后TEXT1里面的数字就写进INI里面[Section]的Key1 ......
我希望在编辑文字后把发送键改到屏幕中间,具体说就是
在kb.class中的部分作出修改
部分代码:
V = new TextBox(ld.a(383), "", 190, 0);
X = new Comma ......