ʹÓÃJavaµÈ±ÈÀýËõ·ÅͼÏñ
±¾ÎÄΪԴ´£¬ÈçÐè×ªÔØ£¬Çë×¢Ã÷×÷Õߺͳö´¦£¬Ð»Ð»£¡
Ëõ·ÅͼÏñµÄ»ù±¾ÔÀíÊÇ´´½¨Ò»¸öÄ¿±ê´óСµÄ»²¼£¬È»ºó¶ÁȡԴͼÏñ£¬²¢½«¸ÃͼÏñ»æÖÆÕâ¸ö»²¼ÉÏ¡£ÎªÁËʹ³ÌÐòͨÓã¬Ô´Í¼ÏñºÍËõ·ÅºóµÄÄ¿±êͼÏñÓ¦Ó÷ֱðʹÓÃ
InputStreamºÍOutputStreamÀ´±íʾ£¬´úÂëÈçÏ£º
public
static
void
scaleImage(InputStream imgInputStream,
OutputStream imgOutputStream,
int
scale)
{
try
{
Image src
=
javax.imageio.ImageIO.read(imgInputStream);
int
width
=
(
int
) (src.getWidth(
null
)
*
scale
/
100.0
);
int
height
=
(
int
) (src.getHeight(
null
)
*
scale
/
100.0
);
BufferedImage bufferedImage
=
new
BufferedImage(width, height,
BufferedImage.TYPE_INT_RGB);
bufferedImage.getGraphics().drawImage(
src.getScaledInstance(width, height, Image.SCALE_SMOOTH),
0
,
0
,
null
);
&nb
Ïà¹ØÎĵµ£º
1.´´½¨²âÊÔ±í
create table users(
userid int primary key,
username varchar2(20),
userpwd varchar2(20)
);
insert into users values(1,'test','test');
insert into users values(2,'test','test');
insert into users values(3,'test','test');
insert into users values(4,'test','test');
insert i ......
WindowsϵÄMemcache°²×°£º
1. ÏÂÔØmemcacheµÄwindowsÎȶ¨°æ£¬½âѹ·Åij¸öÅÌÏÂÃæ£¬±ÈÈçÔÚc:\memcached
2. ÔÚÖÕ¶Ë£¨Ò²¼´cmdÃüÁî½çÃæ£©ÏÂÊäÈë ‘c:\memcached\memcached.exe -d install’ °²×°
3. ÔÙÊäÈ룺 ‘c:\memcached\memcached.exe -d start’ Æô¶¯¡£NOTE: ÒÔºómemcached½«×÷ΪwindowsµÄÒ»¸ö· ......
1.ÈçºÎ»ñµÃÊý×éµÄ³¤¶È£¿
Êý×éÃû.length
2.·ÃÎÊÐÞÊηû“public/private/protected/ȱʡµÄÐÞÊηû”µÄʹÓÃÀà?
public : ¹«¹²,¾ù¿É·ÃÎÊ
private: ˽ÓеÄ,ͬһ¸öjavaÀàÖпÉÒÔ·ÃÎÊ.×ÓÀ಻ÄÜ·ÃÎÊ.
protected: ͬһ¸ö°üÖеÄÀà¶¼¿É·ÃÎÊ.×ÓÀà¿ÉÒÔ·ÃÎÊ.
ȱʡ,friendly :µ±Ç°Àà,ͬһ¸ö°ü,¶¼¿ÉÒÔ·ÃÎÊ.
×÷ÓÃÓò µ± ......
×òÌìÔÚдÍêjavaÏÂÔØµÄÎÄÕºó¾ÍÔÚ½ñÌì·¢ÏÖÁËÒ»¸öÎÊÌ⡣ͨ¹ýÕâ¸öÎÊÌâÒ²·´Ó¦³ö¶ÔHttpURLConnectionÕâ¸öÀ໹²»Á˽⡣³Ã´Ë»ú»áÔÙÌí¼ÓһЩ¶ÔÕâ¸öÀàµÄÁ˽â°É¡£Ê×ÏÈ¿´¿´Ç°ÃæÄǶϴúÂëÔÚÎҵijÌÐòÖгöÏÖÁËʲôÎÊÌ⣺
ÔÚÎҵijÌÐòÖ ......
ÒªÀí½â javaÖÐStringµÄÔË×÷·½Ê½£¬±ØÐëÃ÷È·Ò»µã£ºStringÊÇÒ»¸ö·Ç¿É±äÀࣨimmutable£©¡£Ê²Ã´ÊǷǿɱäÀàÄØ£¿¼òµ¥ËµÀ´£¬·Ç¿É±äÀàµÄʵÀýÊDz»Äܱ»Ð޸ĵģ¬Ã¿¸öʵÀýÖаüº¬µÄÐÅÏ¢¶¼±ØÐëÔÚ¸ÃʵÀý´´½¨µÄʱºò¾ÍÌṩ³öÀ´£¬²¢ÇÒÔÚ¶ÔÏóµÄÕû¸öÉú´æÖÜÆÚÄڹ̶¨²»±ä¡£javaΪʲôҪ°ÑStringÉè¼ÆÎª·Ç¿É±äÀàÄØ£¿Ä ......