Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : java

java»ñµÃÍøÒ³ÄÚÈÝ

Íøַץȡ Java API ¸ÅÊö
 
http://code.google.com/intl/zh-CN/appengine/docs/java/urlfetch/usingjavanet.html
App Engine Ó¦ÓóÌÐò¿ÉÒÔÓëÆäËûÓ¦ÓóÌÐò½øÐÐͨÐÅ»òͨ¹ýץȡÍøÖ··ÃÎÊÍøÂçÉϵÄÆäËû×ÊÔ´¡£Ó¦ÓóÌÐò¿ÉÒÔʹÓÃÍøַץȡ·þÎñÀ´·¢³ö HTTP ºÍ HTTPS ÇëÇó²¢½ÓÊÕÏìÓ¦¡£³öÓÚЧÂʺÍÀ©Õ¹ÐÔ¿¼ÂÇ£¬Íøַץȡ·þÎñʹÓà Google µÄÍøÂç»ù´¡½á¹¹¡£
Óà java.net ץȡÍøÖ·
Ìá³öÇëÇó
°²È«Á¬½ÓºÍ HTTPS
ÇëÇó±êÍ·
ÏìÓ¦
ÁªÏµ¹«Ë¾·À»ðǽ֮ºóµÄÖ÷»ú
ÍøַץȡºÍ¿ª·¢·þÎñÆ÷
Åä¶îºÍÏÞÖÆ
Óà java.net ץȡÍøÖ·
Äú¿ÉÒÔʹÓà Java ±ê×¼¿âÖÐµÄ java.net.URLConnection ºÍÏà¹ØÀ࣬ͨ¹ý Java Ó¦ÓóÌÐò´´½¨ HTTP ºÍ HTTPS Á¬½Ó¡£App Engine ʹÓÃÍøַץȡ·þÎñʵÏִ˽ӿڣ»ÄúµÄÓ¦ÓóÌÐòûÓÐÖ±½Ó´´½¨Ì×½Ó×ÖÁ¬½Ó¡£
»ñȡijÍøÖ·µÄÒ³ÃæÄÚÈݵÄÒ»ÖÖ¼òµ¥·½·¨ÊÇ´´½¨ java.net.URL ¶ÔÏó£¬È»ºóµ÷ÓÃÆä openStream() ·½·¨¡£¸Ã·½·¨¿É´¦Àí´´½¨Á¬½ÓµÄÏêÇ飬·¢³ö HTTP GET ÇëÇó£¬È»ºó¼ìË÷ÏìÓ¦Êý¾Ý¡£
import java.net.MalformedURLException; 
import java.net.URL; 
import java.io.BufferedReader; 
import java.io.InputStreamReader; 
import java.io.IOException;&n ......

JAVA»­³öwavÒôƵ²¨ÐÎͼ


×ֺţº´ó ÖРС
import java.awt.Graphics;
import java.io.File;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.SourceDataLine;
public class Musicline extends javax.swing.JFrame implements Runnable{
private byte[] audioData=null;
private int intBytes = 0;
private byte[] ml=new byte[1];
private int[] drawl=null;
/** Creates new form Musicline */
public Musicline() {
initComponents();
Graphics g;
g=this.getGraphics();
}
public void paint(Graphics g)
{
g.clearRect(0,0,900,900);
//System.out.print(drawl.length);
if(audioData!=null)
{
drawl=new int[audioData.length];
for(int i=0;i<audioData.length;i++)
{
ml[0]=audioData;
//String s=new String(ml);
drawl=Math.abs((int)ml[0]);
}
System.out.println(drawl[0]);
for(int i=0;i<drawl.length-1;i++)
{
g.drawLine(i*this.getWidth()/256,dr ......

JavaÖÐÈçºÎÖ´ÐÐJavaScript

   ÎÒÃÇÔÚ½øÐÐWEB¿ª·¢µÄʱºò£¬¾­³£ÐèÒªÔÚ¿Í»§¶Ë±àдһЩjsº¯Êý£¬ÕâЩº¯ÊýÈç¹ûÐèÒªÔÚ·þÎñ¶ËÖ´ÐеĻ°£¬Èç¹ûÖØбàдµÄ»°£¬¾ÍÏÔµÃÊ®·ÖÈßÓ࣬Òò´ËÎÒÃÇ¿ÉÒÔ³¢ÊÔÔÚ·þÎñ¶Ë£¬Ö±½ÓÖ´ÐÐjs£¬ÕâÑùµÄ»°¾Í¿ÉÒÔ±ÜÃâÖظ´ÀͶ¯£¬Í¬Ê±£¬µ÷ÓÃjsÒ²Óиöº¯Êý£¬¾ÍÊǷdz£·½±ãµ÷ÊÔ¡£
×î¹Ø¼üµÄÒ»²½¾ÍÊǵ÷ÓÃ
conext.evaluateString(scope, "scriptÄÚÈÝ", "", 1, null); ½«js×°Èë·þÎñ¶ËÈÝÆ÷ÖÐ ¶øÕâ¸öÍùÍùÖ»ÐèÒª³õʼ»¯Ò»´Î¼´¿É
ÏÂÃæ¸ø³öÒ»¸ö¾ßÌåµÄÓÃÀý£¬¹©²Î¿¼£º
/*
  * (non-Javadoc)
  *
  * @see ygfmis.fw.system.scripting.ScriptEvaluator#evaluateExpression(java.lang.String,
  *      java.util.Map, java.lang.Class)
  */
 public Object evaluateExpression(String expr) {
  initJavaScriptContext();
  java.lang.Object eval;
  try {
   if (log.isDebugEnabled()) {
    log.debug("Evaluating javascript expression:" + expr);
   }
   eval = conext.evaluateString(scope, expr, "", 1, n ......

javaÖжÑÓëÕ»µÄÇø±ð

JavaµÄ¶ÑÊÇÒ»¸öÔËÐÐʱÊý¾ÝÇø,ÀàµÄ(¶ÔÏó´ÓÖзÖÅä¿Õ¼ä¡£ÕâЩ¶ÔÏóͨ¹ýnew¡¢newarray¡¢anewarrayºÍmultianewarrayµÈ Ö¸ÁÁ¢£¬ËüÃDz»ÐèÒª³ÌÐò´úÂëÀ´ÏÔʽµÄÊÍ·Å¡£¶ÑÊÇÓÉÀ¬»ø»ØÊÕÀ´¸ºÔðµÄ£¬¶ÑµÄÓÅÊÆÊÇ¿ÉÒÔ¶¯Ì¬µØ·ÖÅäÄÚ´æ´óС£¬Éú´æÆÚÒ²²»±ØÊÂÏȸæËß±àÒëÆ÷£¬ÒòΪËüÊÇÔÚÔËÐÐʱ ¶¯Ì¬·ÖÅäÄÚ´æµÄ£¬JavaµÄÀ¬»øÊÕ¼¯Æ÷»á×Ô¶¯ÊÕ×ßÕâЩ²»ÔÙʹÓõÄÊý¾Ý¡£µ«È±µãÊÇ£¬ÓÉÓÚÒªÔÚÔËÐÐʱ¶¯Ì¬·ÖÅäÄڴ棬´æÈ¡ËٶȽÏÂý¡£
Õ»µÄÓÅÊÆÊÇ£¬´æÈ¡ËٶȱȶÑÒª¿ì£¬½ö´ÎÓڼĴæÆ÷£¬Õ»Êý¾Ý¿ÉÒÔ¹²Ïí¡£µ«È±µãÊÇ£¬´æÔÚÕ»ÖеÄÊý¾Ý´óСÓëÉú´æÆÚ±ØÐëÊÇÈ·¶¨µÄ£¬È±·¦Áé»îÐÔ¡£Õ»ÖÐÖ÷Òª´æ·ÅһЩ»ù±¾Àà Ð͵ıäÁ¿£¨,int, short, long, byte, float, double, boolean, char£©ºÍ¶ÔÏó¾ä±ú¡£
Õ»ÓÐÒ»¸öºÜÖØÒªµÄÌØÊâÐÔ£¬¾ÍÊÇ´æÔÚÕ»ÖеÄÊý¾Ý¿ÉÒÔ¹²Ïí¡£¼ÙÉèÎÒÃÇͬʱ¶¨Ò壺
int a = 3;
int b = 3£»
±àÒëÆ÷ÏÈ´¦Àíint a = 3£»Ê×ÏÈËü»áÔÚÕ»Öд´½¨Ò»¸ö±äÁ¿ÎªaµÄÒýÓã¬È»ºó²éÕÒÕ»ÖÐÊÇ·ñÓÐ3Õâ¸öÖµ£¬Èç¹ûûÕÒµ½£¬¾Í½«3´æ·Å½øÀ´£¬È»ºó½«aÖ¸Ïò3¡£½Ó×Å´¦Àíint b = 3£»ÔÚ´´½¨ÍêbµÄÒýÓñäÁ¿ºó£¬ÒòΪÔÚÕ»ÖÐÒѾ­ÓÐ3Õâ¸öÖµ£¬±ã½«bÖ±½ÓÖ¸Ïò3¡£ÕâÑù£¬¾Í³öÏÖÁËaÓëbͬʱ¾ùÖ¸Ïò3µÄÇé¿ö¡£
Õâʱ£¬Èç¹ûÔÙÁîa=4£»ÄÇô±àÒëÆ÷»áÖØÐÂËÑË÷Õ»ÖÐÊÇ·ñÓÐ4Öµ£¬Èç¹ ......

javaÒì³£´¦Àí£¨1£©

Äã¾õµÃ×Ô¼ºÊÇÒ»¸öJavaר¼ÒÂð£¿ÊÇ·ñ¿Ï¶¨×Ô¼ºÒѾ­È«ÃæÕÆÎÕÁËJavaµÄÒì³£´¦Àí»úÖÆ£¿ÔÚÏÂÃæÕâ¶Î´úÂëÖУ¬ÄãÄܹ»Ñ¸ËÙÕÒ³öÒì³£´¦ÀíµÄÁù¸öÎÊÌâÂð£¿
OutputStreamWriter out = ...
java.sql.Connection conn = ...
try { // ¢É
Statement stat = conn.createStatement();
ResultSet rs = stat.executeQuery(
"select uid, name from user");
while (rs.next())
{
out.println("ID£º" + rs.getString("uid") // ¢Ê
"£¬ÐÕÃû£º" + rs.getString("name"));
}
conn.close(); // ¢Ç
out.close();
}
catch(Exception ex) // ¢Æ
{
ex.printStackTrace(); //¢Å£¬¢È

¡¡¡¡×÷Ϊһ¸öJava³ÌÐòÔ±£¬ÄãÖÁÉÙÓ¦¸ÃÄܹ»ÕÒ³öÁ½¸öÎÊÌâ¡£µ«ÊÇ£¬Èç¹ûÄã²»ÄÜÕÒ³öÈ«²¿Áù¸öÎÊÌ⣬Çë¼ÌÐøÔĶÁ±¾ÎÄ¡£
¡¡¡¡±¾ÎÄÌÖÂ۵IJ»ÊÇJavaÒì³£´¦ÀíµÄÒ»°ãÐÔÔ­Ôò£¬ÒòΪÕâЩԭÔòÒѾ­±»´ó¶àÊýÈËÊìÖª¡£ÎÒÃÇÒª×öµÄÊÇ·ÖÎö¸÷ÖֿɳÆΪ“·´Àý”£¨anti-pattern£©µÄÎ¥±³ÓÅÐã±àÂë¹æ·¶µÄ³£¼û»µÏ°¹ß£¬°ïÖú¶ÁÕßÊìϤÕâЩµäÐ͵ķ´ÃæÀý×Ó£¬´Ó¶øÄܹ»ÔÚʵ¼Ê¹¤×÷ÖÐÃôÈñµØ²ì¾õºÍ±ÜÃâÕâЩÎÊÌâ¡£
¡¡¡¡·´ÀýÖ®Ò»£º¶ªÆúÒì³£
¡¡¡¡´úÂ룺15ÐÐ-18ÐС£
¡¡¡¡Õâ¶Î´úÂ벶»ñÁË ......

˵˵javaÓë.NET

     ½ñÌìºÍÅóÓÑÈ¥º£±õ·Åܲ½£¬´µ´µº£·ç£¬ÎÒÃÇ×øÔÚÒ»¸ö·ÏÆúµÄ´¬°å°åÉÏ£¬ÁÄÆðÁËjavaÓë.NET¡£ÎÒÊǾö¶¨¶ÁjavaµÄ£¬¿ÉÊÇÎÒÄÇÅóÓÑÊÇÏëѧ.NET¡£
     ÆäʵÎÒÃǸ÷Óи÷µÄÏë·¨£¬ÎÒÈÏΪ¶ÁjavaÔÚÂß¼­·½Ã棬»¹ÓÐÓï·¨·½Ãæ»áÓиüºÃµÄÒ»¸öÁ˽âÓëѧϰ¡£ÒòΪjavaµÄ¿ª·¢Æ½Ì¨Ã»ÓÐ.NETµÄ¿ª·¢Æ½Ì¨ÄÇôÈËÐÔ»¯£¬Ëû¼¸ºõ¶¼ÊÇÓ¢Ó¶øÇÒ°ïÖúÎĵµÒ²ÊÇÓ¢ÓËùÒÔÎÒÃÇÏëҪѧºÃjava£¬¾Í²»µÃ²»È¥Ñ§Ó¢ÓÒòΪÄãÖ»ÓаÑÓ¢Óïѧ¶®ÁË£¬Äã²ÅÓпÉÄÜȥʹÓÃjavaµÄ°ïÖúÎĵµ¡£¾ÍËã¿´²»¶®£¬ÎÒÃÇÔÚѧУ»¹ÓÐÀÏʦºÍͬѧ¿ÉÒÔÇë½Ì¡£ÕâÑùÒ»À´£¬»¹¿ÉÒÔÌá¸ßÎÒÃǵÄ×ÔѧÄÜÁ¦¡£¶øÇÒÈí¼þÕâ¸öÐÐÒµÊÇÐèÒªÄãºÜÇ¿µÄ×ÔÏ°ÄÜÁ¦µÄ¡£ËùÒÔÎÒÃÇÔÚÒÔºóѧϰÆäËûÓïÑÔÒ²»á±È½ÏºÃÉÏÊÖ¡£¶ø.NETÊǼ¯java£¬C++£¬CÓïÑÔÒ»ÉíÓŵ㿪·¢³öµÄÒ»Öָ߼¶ÓïÑÔ£¬ËûµÄƽ̨¿ÉÒÔ˵ÊÇËùÓпª·¢Æ½Ì¨ÖÐ×îÈËÐÔ»¯µÄÒ»¸öƽ̨¡£¿ÉÊÇ£¬Ñ§Ï°.NET£¬ÄãÒªÊÇûÓÐÇ¿ÁҵĺÃÆæÐÄ£¬ÄãÊÇÎÞ·¨Ñ§ÉîµÄ£¬ÒòΪ΢ÈíÒѾ­°ÑºÜ¶à¹¦ÄÜʵÏÖºÃÁË£¬¶øÆäÖоÍÓúܶàÊÇÉæ¼°Âß¼­Ëã·¨µÄ¹¦ÄÜ£¬¾ÍµÈÄãÈ¥À­³öÀ´Óã¬ÕâÑùÒ»À´£¬ÎÒÃǸù±¾¾Í²»Á˽âÕâ¸ö¹¦ÄÜÊÇÈçºÎʵÏֵģ¬³ý·ÇÄãÈ¥¿´ËûµÄÖмäÓïÑÔ¡£»¹ÉÙÁË˼¿¼ÎÊÌâµÄ»ú»á£¬»¹ÓÐÒòΪ.NETµÄÈËÐÔ»¯£¬ËûÒѾ­°ÑºÜ¶àÓ¢ÎĶ¼·­Òë³ÉÖÐÎÄÁË ......
×ܼǼÊý:6386; ×ÜÒ³Êý:1065; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [5] [6] [7] [8] 9 [10] [11] [12] [13] [14]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ