`
philip01
  • 浏览: 47136 次
  • 来自: ...
社区版块
存档分类
最新评论
文章列表
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( ...
 号码含义 ----------------------------------------- "100":Continue "101":witchingProtocols "200":OK "201":Created "202":Accepted "203":Non-AuthoritativeInformation "204":NoContent "205":ResetContent "206":PartialCon ...
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 ...
Flex中利用ByteArray与BitmapData互相转换实现图片的二进制保存与复原 近日在项目当中需要将图片保存到共享对象当中,开始用了俩天的时间做了对象的序列化,并以BitmapData的形式进行了图片的序列化保存共享,因为系统没有提供更好的接口所以无法测试,前天写好了测试代码,结果对象的其他类型的属性都可以访问了,但图片就是复原不了,到各大论天,技术网站考究了一天也没有答案, 只有“KingLong's”的“[AS3]BitmapBytes类-实现BitmapData与ByteArray(Base64)之间互转功能”一篇文章,看了半天,研究了半天,结果他把一个核心的类没有公开,我发了几 ...
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 ...
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 ...
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 ...
<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 +=".*$";    ...
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 ...
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 ...
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 ...
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 ...
Global site tag (gtag.js) - Google Analytics