javaͼƬÑéÖ¤Âë
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Random;
import javax.imageio.ImageIO;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
public class ImageRandom extends HttpServlet {
/**
* Constructor of the object.
*/
public ImageRandom() {
super();
}
public void processRequest(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {
response.setContentType("image/jpeg");
response.setHeader("Pragma","No-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires", 0);
HttpSession session=request.getSession();
// ÔÚÄÚ´æÖд´½¨Í¼Ïó
int width=60, height=20;
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
// »ñȡͼÐÎÉÏÏÂÎÄ
Graphics graphics = image.getGraphics();
//Éú³ÉËæ»úÀà
Random random = new Random();
// É趨±³¾°É«
//graphics.setColor(this.getRandColor(100,150));
graphics.setColor(Color.gray);
graphics.clipRect(0, 0, width, height);
//É趨×ÖÌå
graphics.setFont(new Font("Times New Roman",Font.PLAIN,18));
//»±ß¿ò
//graphics.setColor(new Color());
//graphics.drawRect(0,0,width-1,height-1);
// Ëæ»ú²úÉú50Ìõ¸ÉÈÅÏߣ¬Ê¹Í¼ÏóÖеÄÈÏÖ¤Âë²»Ò×±»ÆäËü³ÌÐò̽²âµ½
graphics.setColor(getRandColor(100,200));
for (int i=0;i<50;i++) {
int x = ran
Ïà¹ØÎĵµ£º
1¡¢½«org.vssplugin_1.6.2Îļþ¼Ð¼°Îļþ¼ÐÖеÄÄÚÈÝcopyµ½...\Genuitec\Common\pluginsĿ¼Ï¡£
2¡¢ÔÚĿ¼...\Genuitec\MyEclipse 7.0\configuration\org.eclipse.equinox.simpleconfigurator µÄÎļþbundles.info×îºó¼ÓÒ»ÐÐ
org.vssplugin,1.6.2,file:plugins\org.vssplugin_1.6.2\,4,false
3¡¢ÖØÆôMyEclipse7.0¼´¿É  ......
½ñÌì±¾À´ÏëÊìϤһÏÂJ2SEµÄÄÚÈÝ£¬²»ÏëÔÚ±àд¹ý³ÌÖÐͻȻ¿¼Âǵ½Ò»¸öÎÊÌ⣬JAVAËã·¨µÄЧÂÊ£¬´ó¼ÒÏÈ¿´ÎÒ×Ô¼ºÐ´µÄÒ»¸öСÀý×Ó£º
public class NumSort {
public static void mian (String args[]) {
int a[] = new int[args.length];
for (int i=0;i<args.length;i++) {
......
JavaµÄºËÐÄAPIÊǷdz£ÅÓ´óµÄ,Õâ¸ø¿ª·¢ÕßÀ´Ëµ´øÀ´Á˺ܴóµÄ·½±ã£¬¾³£ÈËÓÐÆÀÂÛ,javaÈóÌÐòÔ±±äɵ¡£
µ«ÊÇһЩÄÚÈÝÎÒÈÏΪÊDZØÐëÕÆÎյģ¬·ñÔò²»¿ÉÒÔÊìÁ·ÔËÓÃjava£¬Ò²²»»áʹÓþͺÜÄÑ°ìÁË¡£
1¡¢java.lang°üϵÄ80£¥ÒÔÉϵÄÀàµÄ¹¦ÄܵÄÁé»îÔËÓá£
2¡¢java.util°üϵÄ80£¥ÒÔÉϵÄÀàµÄÁé»îÔËÓã¬ÌرðÊǼ¯ºÏÀàÌåϵ¡¢Õý¹æ±í´ïʽ¡¢Ê±¼ä¡ ......
Èí¼þ¿ª·¢Ö®Â·ÊdzäÂú¾£¼¬ÓëÌôս֮·,Ò²ÊdzäÂúÏ£Íû֮·¡£JavaѧϰҲÊÇÈç´Ë£¬Ã»Óнݾ¶¿É×ß¡£ÃÎÏëÏñ¡¶ÌìÁú°Ë²¿¡·ÖÐÐéÖñÒ»Ñù
±»ÎÞÑÂ×Óõ®õ¹à¶¥¶øÇáËÉ»ñµÃÒ»¼××Ó¹¦Á¦,ÊǺܲ»ÏÖʵµÄ¡£Ã¿ÌìÑöÌì´ó½Ð"ÌìÉñ°¡£¬Çë´Í¸øÎÒÒ»±¾¿û»¨±¦µä°É"£¬
Êâ²»Öª¼´Ê¹Äã»ñµÃÁË¿û»¨±¦µä£¬³ýÁËÊÜ×Ô¹¬ÆäÉíÖ®¿àÍ⣬ÄãÒ²²»Ò»¶¨³ÉµÃÁË"¶«·½²»°Ü"£¬µ¹ÊdzÉ"Î÷· ......
ϸ½ÚÉÏÐèÒª¸Ä½ø¡£
import java.util.*;
public class Map {
Vector<int[]> v = new Vector<int[]>();
Vector<Integer> vv = new Vector<Integer>();
Map() {
int[] array = { 1, 2, 3, 4, 5 };
Scanner s = new Scanner(System.in);
int x = s.nextInt();
pro(array, 0, x);
for(int i=0 ......