ï»??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品一区二区电影,丝瓜av网站精品一区二区,高清免费观看在线http://www.aygfsteel.com/yuhaibo736/zh-cnThu, 03 Jul 2025 20:03:59 GMTThu, 03 Jul 2025 20:03:59 GMT60javaž®†svg囄¡‰‡è½¬æ¢ä¸ºpng格式囄¡‰‡http://www.aygfsteel.com/yuhaibo736/archive/2015/10/19/427819.htmlyuhaibo736yuhaibo736Mon, 19 Oct 2015 07:17:00 GMThttp://www.aygfsteel.com/yuhaibo736/archive/2015/10/19/427819.htmlhttp://www.aygfsteel.com/yuhaibo736/comments/427819.htmlhttp://www.aygfsteel.com/yuhaibo736/archive/2015/10/19/427819.html#Feedback0http://www.aygfsteel.com/yuhaibo736/comments/commentRss/427819.htmlhttp://www.aygfsteel.com/yuhaibo736/services/trackbacks/427819.html有时候在客户端ä‹É用svgç”Õd›¾åQŒè€Œåœ¨æœåŠ¡å™¨ç«¯éœ€è¦åŒæ ïLš„囄¡‰‡åQŒåœ¨æœåŠ¡å™¨ç«¯é‡æ–°ç”ÖM¸€éæ˜¯éžå¸¸è´¹äº‹çš„。这时候我们就可以利用已有的svg直接通过下面的类转换成png格式ã€?/p>

使用˜q™ä¸ªæ–ÒŽ(gu¨©)³•需要引用batic相关的包åQŒmaven pomæ–‡äšg如下åQ?br />

<!-- svg 生成png格式囄¡‰‡  -->
<dependency><groupId>batik</groupId><artifactId>batik-svggen</artifactId><version>1.6</version></dependency>        
<dependency><groupId>batik</groupId><artifactId>batik-awt-util</artifactId><version>1.6</version></dependency>
<dependency><groupId>batik</groupId><artifactId>batik-bridge</artifactId><version>1.6</version></dependency>
<dependency><groupId>batik</groupId><artifactId>batik-css</artifactId><version>1.6</version></dependency>
<dependency><groupId>batik</groupId><artifactId>batik-dom</artifactId><version>1.6</version></dependency>
<dependency><groupId>batik</groupId><artifactId>batik-gvt</artifactId><version>1.6</version></dependency>
<dependency><groupId>batik</groupId><artifactId>batik-parser</artifactId><version>1.6</version></dependency>
<dependency><groupId>batik</groupId><artifactId>batik-script</artifactId><version>1.6</version></dependency>
<dependency><groupId>batik</groupId><artifactId>batik-svg-dom</artifactId><version>1.6</version></dependency>
<dependency><groupId>batik</groupId><artifactId>batik-transcoder</artifactId><version>1.6</version></dependency>
<dependency><groupId>batik</groupId><artifactId>batik-util</artifactId><version>1.6</version></dependency>
<dependency><groupId>batik</groupId><artifactId>batik-xml</artifactId><version>1.6</version></dependency>
<!-- 此处不能使用2.9.1版本åQŒä‹Éç”?.9.1生成png会失è´?-->
<dependency><groupId>xerces</groupId><artifactId>xercesImpl</artifactId><version>2.5.0</version></dependency>
<dependency><groupId>xml-apis</groupId><artifactId>xmlParserAPIs</artifactId><version>2.0.2</version></dependency>
<dependency><groupId>org.axsl.org.w3c.dom.svg</groupId><artifactId>svg-dom-java</artifactId><version>1.1</version></dependency>
<dependency><groupId>xml-apis</groupId>    <artifactId>xml-apis</artifactId><version>2.0.0</version></dependency>
<dependency><groupId>org.w3c.css</groupId> <artifactId>sac</artifactId>    <version>1.3</version></dependency>
<!-- svg 生成png格式囄¡‰‡¾l“束  -->
package com.yhb.web.util;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import org.apache.batik.transcoder.TranscoderException;
import org.apache.batik.transcoder.TranscoderInput;
import org.apache.batik.transcoder.TranscoderOutput;
import org.apache.batik.transcoder.image.PNGTranscoder;
public final class FileUtil {
/** 
     *@Description: ž®†svg字符串è{æ¢äØ“png 
     *@Author: 
     *@param svgCode svg代码 
     *@param pngFilePath  ä¿å­˜çš„èµ\å¾?nbsp;
     *@throws IOException io异常 
     *@throws TranscoderException svg代码异常 
    */  
public static void convertToPng(String svgCode,String pngFilePath) throws IOException,TranscoderException{  
 
        File file = new File (pngFilePath);  
  
        FileOutputStream outputStream = null;  
        try {  
            file.createNewFile ();  
            outputStream = new FileOutputStream (file);  
            convertToPng (svgCode, outputStream);  
        } finally {  
            if (outputStream != null) {  
                try {  
                    outputStream.close ();  
                } catch (IOException e) {  
                    e.printStackTrace ();  
                }  
            }  
        }  
    }  
/** 
     *@Description: ž®†svgCode转换成pngæ–‡äšgåQŒç›´æŽ¥è¾“出到‹¹ä¸­ 
     *@param svgCode svg代码 
     *@param outputStream 输出‹¹?nbsp;
     *@throws TranscoderException 异常 
     *@throws IOException io异常 
     */  
    public static void convertToPng(String svgCode,OutputStream outputStream) throws TranscoderException,IOException{  
        try {  
        byte[] bytes = svgCode.getBytes ("UTF-8");  
            PNGTranscoder t = new PNGTranscoder ();  
            TranscoderInput input = new TranscoderInput (new ByteArrayInputStream (bytes));  
            TranscoderOutput output = new TranscoderOutput (outputStream);  
            t.transcode (input, output);  
            outputStream.flush ();  
        } finally {  
            if (outputStream != null) {  
                try {  
                    outputStream.close ();  
                } catch (IOException e) {  
                    e.printStackTrace ();  
                }  
            }  
        }  
    }  
}



]]>
Oracle 中汉字排序问é¢?http://www.aygfsteel.com/yuhaibo736/archive/2014/08/29/417496.htmlyuhaibo736yuhaibo736Fri, 29 Aug 2014 06:13:00 GMThttp://www.aygfsteel.com/yuhaibo736/archive/2014/08/29/417496.htmlhttp://www.aygfsteel.com/yuhaibo736/comments/417496.htmlhttp://www.aygfsteel.com/yuhaibo736/archive/2014/08/29/417496.html#Feedback0http://www.aygfsteel.com/yuhaibo736/comments/commentRss/417496.htmlhttp://www.aygfsteel.com/yuhaibo736/services/trackbacks/417496.htmlæ–ÒŽ(gu¨©)³•1: 讑֮šçŽ¯å¢ƒå˜é‡
set NLS_SORT=SCHINESE_RADICAL_M ;export NLS_SORT åQˆshåQ?
or setenv NLS_SORT SCHINESE_RADICAL_M (csh)
or regedit 
HKLC/SOFTWARE/ORACLE/home0/NLS_SORT        (win)

æ–ÒŽ(gu¨©)³•2: 在session中修æ”?
alter session set NLS_SORT='SCHINESE_RADICAL_M'

æ–ÒŽ(gu¨©)³•3: 直接使用NLSSORT函数 (推荐)
select name,id from t
order by NLSSORT(name,'NLS_SORT = SCHINESE_STROKE_M')

讄¡½®NLS_SORTå€?

SCHINESE_RADICAL_M 按照部首åQˆç¬¬ä¸€™åºåºåQ‰ã€ç¬”划(½W¬äºŒ™åºåºåQ‰æŽ’åº?nbsp;

SCHINESE_STROKE_M 按照½W”划åQˆç¬¬ä¸€™åºåºåQ‰ã€éƒ¨é¦–(½W¬äºŒ™åºåºåQ‰æŽ’åº?nbsp;

SCHINESE_PINYIN_M 按照拼音排序



]]>
mybatis + oscachež®ç»“http://www.aygfsteel.com/yuhaibo736/archive/2014/08/11/416823.htmlyuhaibo736yuhaibo736Mon, 11 Aug 2014 10:22:00 GMThttp://www.aygfsteel.com/yuhaibo736/archive/2014/08/11/416823.htmlhttp://www.aygfsteel.com/yuhaibo736/comments/416823.htmlhttp://www.aygfsteel.com/yuhaibo736/archive/2014/08/11/416823.html#Feedback0http://www.aygfsteel.com/yuhaibo736/comments/commentRss/416823.htmlhttp://www.aygfsteel.com/yuhaibo736/services/trackbacks/416823.html    在mybatis中,开发组¾l‡åªæä¾›äº†ä¸€äº›é»˜è®¤çš„二çñ”¾~“存实现的机åˆÓž¼Œòq¶æ²¡æœ‰ç›´æŽ¥å†…¾|®çš„æ”¯æŒOSCacheå’ŒEHCache½{‰äºŒ¾U§ç¼“存机åˆÓž¼Œè€Œæ˜¯ä½œäؓ一个集成jar包来提供二çñ”¾~“存的实玎ͼŒåœ¨å®˜æ–¹ç½‘站上我们可以扑ֈ°mybatis-ehcache-1.0.1-bundle.zipåQŒmybatis-oscache-1.0.1-bundle.zip½{‰ehcacheå’Œoscache提供二çñ”¾~“存的独立工具包. ˜q™é‡Œæˆ‘就拿oscache在mybatis中的使用来ä‹D例说明:

       1.   ž®†mybatis-oscache-1.0.1-bundle.zip中涉及到的jar包放入到classpath路径ä¸?nbsp;
             maven下可以这样配¾|?br />               <dependencies>  
                    
... 

                    <dependency> 

                        <groupId>org.mybatis.caches</groupId> 

                        <artifactId>mybatis-oscache</artifactId>      
                         <version>1.0.2-SNAPSHOT</version> 

                    </dependency>             

                    <dependency>
                        <groupId>javax.jms</groupId>
                        <artifactId>jms</artifactId>
                        <version>1.1</version>
                    </dependency>

                    <dependency>
                         <groupId>opensymphony</groupId>
                         <artifactId>oscache</artifactId>
                         <version>2.4</version>
                         <exclusions>       
                               <exclusion>
                                   <groupId>com.sun.jdmk</groupId>
                                   <artifactId>jmxtools</artifactId>
                               </exclusion>
                           <exclusion>
                           <groupId>com.sun.jmx</groupId>
                           <artifactId>jmxri</artifactId>
                       </exclusion>
                     </exclusions>
                </dependency>

                    ... 

                </dependencies>

       2.   åœ¨mapperæ–‡äšg中的配置如下åQ?/span>

             <mapper namespace="org.test.AuthMapper" >         

                 <cache  type="org.mybatis.caches.oscache.OSCache"/>

             </mapper>
            æ³¨æ„ä¸‹é¢ä¸¤ç‚¹
             (a)åœ?/span><select id="getAuth" parameterType="Map" resultType="Auth"  useCache="false">中ä‹É用useCache="false"或useCache="true"来决定是否ä‹É用二¾U§ç¼“å­˜ã€?nbsp;   
             (b)在增删改ä¸?lt;insert id="insertAuth" parameterType="Auth"  flushCache="true">使用flushCache="true"或flushCache="flase"来决定对˜q™äº›˜q›è¡Œæ“ä½œåŽæ¸…½Iø™¯¥xmlæ–‡äšg中所有查询语句的二çñ”¾~“å­˜ã€?/font> 

       3.  在src目录下创å»ÞZ¸€ä¸ªoscache.properties的属性文ä»Óž¼Œåœ¨é‡Œé¢æŒ‡å®šç¼“存的各种属性的讄¡½®åQ?br />             cache.memory=true             
             cache.path=c:\\myapp\\cache
             cache.persistence.class=com.opensymphony.oscache.plugins.diskpersistence.DiskPersistenceListener
             cache.persistence.overflow.only=true
             cache.capacity=100000

            



]]>
iText生成PDFæ–‡äšghttp://www.aygfsteel.com/yuhaibo736/archive/2014/06/24/415071.htmlyuhaibo736yuhaibo736Tue, 24 Jun 2014 08:27:00 GMThttp://www.aygfsteel.com/yuhaibo736/archive/2014/06/24/415071.htmlhttp://www.aygfsteel.com/yuhaibo736/comments/415071.htmlhttp://www.aygfsteel.com/yuhaibo736/archive/2014/06/24/415071.html#Feedback0http://www.aygfsteel.com/yuhaibo736/comments/commentRss/415071.htmlhttp://www.aygfsteel.com/yuhaibo736/services/trackbacks/415071.htmlimport java.awt.Color;
import java.io.FileOutputStream;

import com.itextpdf.text.BaseColor;
import com.itextpdf.text.Document;
import com.itextpdf.text.Element;
import com.itextpdf.text.Font;
import com.itextpdf.text.PageSize;
import com.itextpdf.text.Phrase;
import com.itextpdf.text.Rectangle;
import com.itextpdf.text.pdf.BaseFont;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;

public class CellEvents {


 /**
  * @param args
  */
 public static void main(String[] args) {
  Object[] objArr = new Object[]{100,20,300};
  
  Document document = new Document(PageSize.A4.rotate(),50,50,50,50);
  try{
   //bfSongti = BaseFont.createFont("/simsun.ttc,1", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
   Font songtiSFivefont = new Font(BaseFont.createFont("/simsun.ttc,1", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED), 9f);//宋体ž®äº”号字
         //讄¡½®å­˜æ”¾ä½ç½®
         PdfWriter.getInstance(document, new FileOutputStream("D:/test.pdf"));
         document.open();
 
         PdfPTable table = new PdfPTable(5);
   table.setSpacingBefore(10f);
   table.getDefaultCell().setPadding(5);
   //HowbuyBorderPdfPTableEvent event = new HowbuyBorderPdfPTableEvent();
   //table.setTableEvent(event);
   //table.getDefaultCell().setBorder(Rectangle.NO_BORDER);
   table.getDefaultCell().setVerticalAlignment(Element.ALIGN_MIDDLE);
   table.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
   PdfPCell cellTitle = new PdfPCell(new Phrase("总资产\nåQˆä¸‡å…ƒï¼‰",songtiSFivefont));
   cellTitle.setBorderWidth(2f);
   cellTitle.setBackgroundColor(new BaseColor(new Color(153, 51, 0)));
   cellTitle.setBorderColor(new BaseColor(new Color(153, 51, 0)));
   cellTitle.setHorizontalAlignment(Element.ALIGN_CENTER);
   cellTitle.setVerticalAlignment(Element.ALIGN_MIDDLE);
   cellTitle.setMinimumHeight(25);
   table.addCell(cellTitle);
 
   cellTitle = new PdfPCell(new Phrase(""));
   cellTitle.setBorder(Rectangle.NO_BORDER);
   cellTitle.setHorizontalAlignment(Element.ALIGN_CENTER);
   cellTitle.setVerticalAlignment(Element.ALIGN_MIDDLE);
   table.addCell(cellTitle);
   
   cellTitle = new PdfPCell(new Phrase("当前收益\nåQˆä¸‡å…ƒï¼‰",songtiSFivefont));
   cellTitle.setBorderWidth(2f);
   cellTitle.setBackgroundColor(new BaseColor(new Color(153, 51, 0)));
   cellTitle.setBorderColor(new BaseColor(new Color(153, 51, 0)));
   cellTitle.setHorizontalAlignment(Element.ALIGN_CENTER);
   cellTitle.setVerticalAlignment(Element.ALIGN_MIDDLE);
   table.addCell(cellTitle);
 
   cellTitle = new PdfPCell(new Phrase("",songtiSFivefont));
   cellTitle.setBorder(Rectangle.NO_BORDER);
   cellTitle.setHorizontalAlignment(Element.ALIGN_CENTER);
   cellTitle.setVerticalAlignment(Element.ALIGN_MIDDLE);
   table.addCell(cellTitle);
   
   
   cellTitle = new PdfPCell(new Phrase("累计收益\nåQˆä¸‡å…ƒï¼‰",songtiSFivefont));
   cellTitle.setBorderWidth(2f);
   cellTitle.setBackgroundColor(new BaseColor(new Color(153, 51, 0)));
   cellTitle.setBorderColor(new BaseColor(new Color(153, 51, 0)));
   cellTitle.setHorizontalAlignment(Element.ALIGN_CENTER);
   cellTitle.setVerticalAlignment(Element.ALIGN_MIDDLE);
   table.addCell(cellTitle);
   
   float[] widths2 = { 24.5f, 12.25f,24.5f,12.25f,24.5f};

   table.setWidths(widths2);
   
   table.setHorizontalAlignment(Element.ALIGN_LEFT);//
   table.setWidthPercentage(70);
   double zzc = objArr[0]==null ? 0:Double.parseDouble(objArr[0].toString());
   double dqsy = objArr[1]==null ? 0:Double.parseDouble(objArr[1].toString());
   double ljsy = objArr[2]==null ? 0:Double.parseDouble(objArr[2].toString());
   PdfPCell cell1 = new PdfPCell(new Phrase(String.valueOf(zzc),songtiSFivefont));
   cell1.setBorderWidth(2f);
   cell1.setBorderColor(new BaseColor(new Color(153, 51, 0)));
   cell1.setHorizontalAlignment(Element.ALIGN_CENTER);
   cell1.setVerticalAlignment(Element.ALIGN_MIDDLE);
   cell1.setMinimumHeight(20);
   table.addCell(cell1);
   
   cell1 = new PdfPCell(new Phrase("",songtiSFivefont));
   cell1.setBorder(Rectangle.NO_BORDER);
   cell1.setHorizontalAlignment(Element.ALIGN_CENTER);
   cell1.setVerticalAlignment(Element.ALIGN_MIDDLE);
   table.addCell(cell1);
   
   cell1 = new PdfPCell(new Phrase(String.valueOf(dqsy),songtiSFivefont));
   cell1.setBorderWidth(2f);
   cell1.setBorderColor(new BaseColor(new Color(153, 51, 0)));
   cell1.setHorizontalAlignment(Element.ALIGN_CENTER);
   cell1.setVerticalAlignment(Element.ALIGN_MIDDLE);
   table.addCell(cell1);
   
   cell1 = new PdfPCell(new Phrase("",songtiSFivefont));
   cell1.setBorder(Rectangle.NO_BORDER);
   cell1.setHorizontalAlignment(Element.ALIGN_CENTER);
   cell1.setVerticalAlignment(Element.ALIGN_MIDDLE);
   table.addCell(cell1);
   
   cell1 = new PdfPCell(new Phrase(String.valueOf(ljsy),songtiSFivefont));
   cell1.setBorderWidth(2f);
   cell1.setBorderColor(new BaseColor(new Color(153, 51, 0)));
   cell1.setHorizontalAlignment(Element.ALIGN_CENTER);
   cell1.setVerticalAlignment(Element.ALIGN_MIDDLE);
   table.addCell(cell1);
   document.add(table);
  }catch(Exception ex){
   ex.printStackTrace();
  }
        document.close();

 }

}



]]>
tomcat¾l“合nginx使用ž®ç»“http://www.aygfsteel.com/yuhaibo736/archive/2014/06/17/414845.htmlyuhaibo736yuhaibo736Tue, 17 Jun 2014 07:24:00 GMThttp://www.aygfsteel.com/yuhaibo736/archive/2014/06/17/414845.htmlhttp://www.aygfsteel.com/yuhaibo736/comments/414845.htmlhttp://www.aygfsteel.com/yuhaibo736/archive/2014/06/17/414845.html#Feedback0http://www.aygfsteel.com/yuhaibo736/comments/commentRss/414845.htmlhttp://www.aygfsteel.com/yuhaibo736/services/trackbacks/414845.html 说到反向代理åQŒå¯èƒ½å¾ˆå¤šäh都听è¯ß_¼Œä½†å…·ä½“什么是反向代理åQŒå¾ˆå¤šäh估计ž®×ƒ¸æ¸…楚了。摘一ŒD늙¾åº¦ç™¾¿U‘上的描˜qŽÍ¼š

Html代码 复制代码 收藏代码
  1. 反向代理åQˆReverse ProxyåQ‰æ–¹å¼æ˜¯æŒ‡ä»¥ä»£ç†æœåŠ¡å™¨æ¥æŽ¥å—internet上的˜qžæŽ¥è¯äh±‚åQŒç„¶åŽå°†è¯äh±‚转发¾l™å†…部网¾lœä¸Šçš„æœåС噍åQŒåƈž®†ä»ŽæœåŠ¡å™¨ä¸Šå¾—åˆ°çš„ç»“æžœè¿”å›žç»™internet上请求连接的客户端,此时代理服务器对外就表现ä¸ÞZ¸€ä¸ªæœåС噍ã€?nbsp;