java ÖеÄÑéÖ¤Âë
<%@ page language="java" import="java.util.*" pageEncoding="GBK"
import="java.awt.*,java.awt.image.*,javax.imageio.*"%><%
/*
ʹÓ÷½·¨£ºÔÚÐèÒªÏÔʾÑéÖ¤ÂëµÄhtml´úÂëÖÐʹÓÃ<img p">
ÔÚÐèÅжÏsessionµÄʱºòÅжÏsession.getAttribute("vcode")
*/try{
int codeLength=4;//ÑéÖ¤Â볤¶È
int mixTimes=0;//Ä£ºý³Ì¶È²ÎÊý
Color bgColor=getRandColor(200, 250);//±³¾°ÑÕÉ«
Color bfColor=new Color(0,0,0);//×ÖÌåÑÕÉ«
boolean ifRandomColor=true;//µ¥¸ö×Ö·ûÊÇ·ñÑÕÉ«Ëæ»ú
boolean ifMixColor=true;//Ä£ºýÏßÊÇ·ñÑÕÉ«Ëæ»ú
//ÉèÖÃÒ³Ãæ²»»º´æ
// ÔÚÄÚ´æÖд´½¨Í¼Ïó
int width = 13*codeLength+6, height = 20;
BufferedImage image = new BufferedImage(width, height,BufferedImage.TYPE_INT_RGB);
// »ñȡͼÐÎÉÏÏÂÎÄ
Graphics g = image.getGraphics();
// É趨±³¾°É«
g.setColor(bgColor);
g.fillRect(0, 0, width, height);
//É趨×ÖÌå
g.setFont(new Font("Times New Roman", Font.PLAIN, 18));
//»±ß¿ò
g.setColor(new Color(33,66,99));
g.drawRect(0,0,width-1,height-1);
// Ëæ»ú²úÉú¸ÉÈÅÏߣ¬Ê¹Í¼ÏóÖеÄÈÏÖ¤Âë²»Ò×±»ÆäËü³ÌÐò̽²âµ½
g.setColor(getRandColor(160, 200));
for (int i = 0; i < mixTimes*codeLength/10; i++) {
if(ifMixColor)
{
g.setColor(getRandColor(160, 200));
}
int x = random.nextInt(width);
int y = random.nextInt(height);
int xl = random.nextInt(12);
int yl = random.nextInt(12);
g.drawLine(x, y, x + xl, y + yl);
}
// È¡Ëæ»ú²úÉúµÄÈÏÖ¤Âë(4λÊý×Ö)
String sRand = "";
for (int i = 0; i < codeLength; i++) {
String rand = String.valueOf(random.nextInt(10));
sRand += rand;
// ½«ÈÏÖ¤ÂëÏÔʾµ½Í¼ÏóÖÐ
if(ifRandomColor)
g.setColor(getRandColor(20,110,0));
else
g.setColor(bfColor);
//µ÷Óú¯Êý
Ïà¹ØÎĵµ£º
Öø×÷Ȩ±£»¤ÉùÃ÷
Chinaitlab¸ß¶ÈÖØÊÓ֪ʶ²úȨ±£»¤²¢×ñÊØÖйú¸÷Ïî֪ʶ²úȨ·¨ÂÉ¡¢·¨¹æºÍ¾ßÓÐÔ¼ÊøÁ¦¹æ·¶ÐÔÎļþ¡£¸ù¾Ý·¨ÂÉ¡¢·¨¹æºÍ¹æ·¶ÐÔÎļþÒªÇó,Chinaitlab
Öƶ¨ÁËÖ¼ÔÚ±£»¤ÖªÊ¶²úȨȨÀûÈ˺Ϸ¨È¨ÒæµÄ´ëÊ©ºÍ²½Ö裬µ±Öø×÷ȨÈ˺Í/»òÒÀ·¨¿ÉÒÔÐÐʹÖø×÷ȨµÄȨÀûÈË£¨ÒÔϼò³Æ“ȨÀûÈË”£©·¢ÏÖÔÚ±¾Õ¾ÍøÒ³µÄÄÚÈÝ»òÏÂ
&nbs ......
Óöµ½Ò»¸öjava±à³ÌÃæÊÔÌ⣬µ±Ê±Ã»ÓÐд³öÀ´£¬»ØÀ´×ÐϸÏëÁËÏ룬д³ö´ð°¸£¬Ò»¹²ÒÔºó²Î¿¼£¡
ÒªÇ󣺽«×Ö·û´®"I am a good student."ת»»³É"student. good a am I"
java´úÂëΪ£º
public class Application
{
private String s;
public void setS(String s)
{
s=s;
}
public S ......
SAX¸ÅÄî
SAXÊÇSimple API for XML
µÄËõд£¬Ëü²¢²»ÊÇÓÉW3C¹Ù·½ËùÌá³öµÄ±ê×¼£¬¿ÉÒÔ˵ÊÇ“Ãñ¼ä”µÄÊÂʵ±ê×¼¡£Êµ¼ÊÉÏ£¬ËüÊÇÒ»ÖÖÉçÇøÐÔÖʵÄÌÖÂÛ²úÎï¡£ËäÈ»Èç´Ë£¬ÔÚXMLÖжÔSAXµÄÓ¦ÓÃË¿ºÁ²»±ÈDOMÉÙ£¬¼¸ºõËùÓеÄXML½âÎöÆ÷¶¼»áÖ§³ÖËü¡£
Óë
DOM±È½Ï¶øÑÔ£¬SAXÊÇÒ»ÖÖÇáÁ¿Ð͵ķ½·¨¡£ÎÒÃÇÖªµÀ£¬ÔÚ´¦ÀíDOMµÄʱºò£¬Î ......
JAVA IOÁ÷µÄÓ¦ÓÃ
IOÁ÷µÄµäÐÍÓ¦ÓÃ
¾¡¹Ü¿âÄÚ´æÔÚ´óÁ¿IOÁ÷À࣬¿Éͨ¹ý¶àÖÖ²»Í¬µÄ·½Ê½×éºÏµ½Ò»Æ𣬵«Êµ¼ÊÉÏÖ»Óм¸ÖÖ·½Ê½²Å»á¾³£Óõ½¡£È»¶ø£¬±ØÐëСÐÄÔÚÒâ²ÅÄܵõ½ÕýÈ·µÄ×éºÏ¡£ÏÂÃæÕâ¸öÏ൱³¤µÄÀý×ÓչʾÁ˵äÐÍIOÅäÖõĴ´½¨ÓëʹÓ㬿ÉÔÚд×Ô¼ºµÄ´úÂëʱ½«Æä×÷Ϊһ¸ö²Î¿¼Ê¹Óá£×¢Òâÿ¸öÅäÖö¼ÒÔÒ»¸ö×¢ÊÍÐ ......
package protest;
import java.sql.*;
/**
create proc proc_select
@lname varchar(20),
@address varchar(20) output
as
&n ......