- 浏览: 47105 次
- 来自: ...
最新评论
-
宋建勇:
org.mozilla.intl.chardet.HtmlCh ...
批量修改文件的编码 -
fhtwins:
报错!通过DEBUG可知:InputStream instre ...
识别图片数字-验证码 -
leifeng2:
不行啊,报错!
10:26:27.321 [http-8080 ...
识别图片数字-验证码
文章列表
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
...
java 通过 JNI 调用开源的OCR 来识别验证码, 这样不要通过调用exe 生成临时文件来获得验证码
//演示程序
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String url = req.getParameter("j_imgurl"); InputStream instream = InitEnv.class.getResource ...
package com;
public class UTF8Tester {
private static String HEX = "0123456789ABCDEF";
private static String toBin(int n) { StringBuffer stringBuffer = new StringBuffer(); n = n & 0x000000FF;
for (int i = 7; i >= 0; i--) { if (1 == ((n >> i) & 1)) { stringBuf ...
gcc -o msg stdsoap2.c soapC.c soapClient.c client.c stdsoap2.c更多使用例子,可以查看gsoap附带的sample目录。编码转换的例子,保证使用utf8传输int GBKtoUTF8(char *fromstr,size_t fromlen,char *tostr,size_t tolen){ int r; iconv_t cd;
if ((cd = iconv_open("GBK","UTF-8")) == (iconv_t)-1) { fprintf( ...
- 2009-11-10 14:36
- 浏览 2091
- 评论(0)
号码含义 ----------------------------------------- "100":Continue "101":witchingProtocols "200":OK "201":Created "202":Accepted "203":Non-AuthoritativeInformation "204":NoContent "205":ResetContent "206":PartialCon ...
- 2009-10-22 12:16
- 浏览 794
- 评论(0)
sc delete svn sc create svn binpath= "G:\test\setup\CollabNet Subversion Server\svnserve.exe --service -r G:\test\svn\svn_repository\test" displayname= "Subversion Server" depend= Tcpip start= auto <location> DAV svn SVNParentPath G:\test\svn\svn_repository AuthType Basic Au ...
- 2009-09-27 14:55
- 浏览 906
- 评论(0)
Flex中利用ByteArray与BitmapData互相转换实现图片的二进制保存与复原 近日在项目当中需要将图片保存到共享对象当中,开始用了俩天的时间做了对象的序列化,并以BitmapData的形式进行了图片的序列化保存共享,因为系统没有提供更好的接口所以无法测试,前天写好了测试代码,结果对象的其他类型的属性都可以访问了,但图片就是复原不了,到各大论天,技术网站考究了一天也没有答案, 只有“KingLong's”的“[AS3]BitmapBytes类-实现BitmapData与ByteArray(Base64)之间互转功能”一篇文章,看了半天,研究了半天,结果他把一个核心的类没有公开,我发了几 ...
- 2009-09-04 20:17
- 浏览 1943
- 评论(0)
package com.overseas;
import java.util.regex.Matcher;import java.util.regex.Pattern;
public class DownLoadDB { public static void main(String[] args) throws Exception{ String sCurrentLine; String sTotalString; sCurrentLine=""; sTotalString=""; java.io.InputStream l_urlStre ...
- 2009-08-06 15:44
- 浏览 2080
- 评论(0)
package org;
import java.util.regex.Matcher;import java.util.regex.Pattern;
public class Tests {
/** * @param args */ public static void main(String[] args) { String input = ""; String regex = ""; input = "陈-俊哥 #_com.overseas.AggregaPicture01 , m ...
- 2009-07-05 21:10
- 浏览 951
- 评论(0)
package com.overseas;
import java.awt.Graphics2D;import java.awt.image.BufferedImage;import java.io.ByteArrayOutputStream;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import java.io.InputStream;impo ...
- 2009-07-01 22:34
- 浏览 1844
- 评论(0)
<script language="JavaScript" >
function splitJS(){ var str = "01020304050607080900"; var len = Math.floor((str.length)/2); var regex = "^"; for(var i=0; i<len; i++){ regex += "(\\d{2})"; } regex +=".*$"; ...
- 2009-06-30 17:07
- 浏览 1101
- 评论(0)
package com.goldgrid.socket.client;
import java.awt.Graphics2D;import java.awt.Image;import java.awt.image.BufferedImage;import java.io.ByteArrayOutputStream;import java.io.File;
import javax.imageio.ImageIO;import javax.swing.ImageIcon;
import org.apache.log4j.Logger;
public class Alpha { pr ...
- 2009-06-29 17:09
- 浏览 3424
- 评论(0)
char* jstringToWindows( JNIEnv *env, jstring jstr ){ int length = (env)->GetStringLength(jstr ); const jchar* jcstr = (env)->GetStringChars(jstr, 0 ); char* rtn = (char*)malloc( length*2+1 ); int size = 0; size = WideCharToMultiByte( CP_ACP, 0, (LPCWSTR)jcstr, length, rtn,(length*2+1), NULL, N ...
- 2009-06-05 16:27
- 浏览 1149
- 评论(0)
public class EncodeUtil {
public static String encodingString(String oldstring, String oldEncoding, String newEncoding){ OutputStreamWriter outputStreamWriter = null; System.out.println(oldstring); ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(oldstring.getByte ...
- 2009-06-02 14:44
- 浏览 3620
- 评论(0)
shell = cmd.exeCPP = g++.exeCC = gcc.exeWINDRES = windres.exeRES = OBJ = ./com/Cmpnt.o ./com/GUIDS.o ./com/Registry.o $(RES)LINKOBJ = ./com/Cmpnt.o ./com/GUIDS.o ./com/Registry.o $(RES) $(RES)LIBS = -L"C:/MinGW/lib" -fmessage-length=0 --no-export-all-symbols --add-stdcall-alias -lker ...
- 2009-05-26 11:07
- 浏览 3204
- 评论(0)