Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Flex Java ÉÏ´« ÏÂÔØ ×é¼þ

Flex Java ÉÏ´« ÏÂÔØ ×é¼þ ÊÕ²Ø
ÊÂǰ׼±¸¾ÍÊǵ½http://commons.apache.orgÏÂÔØcommon-fileupload-1.1.1.jarÒÔ¼°common-io-1.2.jarÁ½¸ö°ü¡£
ǰ̨Flex´úÂ룺
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns="*" creationComplete="init();">
<mx:Script>
<![CDATA[
import flash.net.FileReference;
import mx.controls.Alert;
import mx.events.CloseEvent;
import flash.events.*;
private var file: FileReference;
private function init(): void{
Security.allowDomain("*");
file = new FileReference();
file.addEventListener(ProgressEvent.PROGRESS, onProgress);
file.addEventListener(Event.SELECT, onSelect);
file.addEventListener(Event.COMPLETE, completeHandle);
}
private function completeHandle(event:Event):void{
     Alert.show("¹§Ï²Ä㣬ÉÏ´«³É¹¦");
}
private function upload(): void{
var imageTypes:FileFilter = new FileFilter("Images (*.jpg, *.jpeg, *.png)", "*.jpg;*.jpeg;*.png");
var allTypes:Array = new Array(imageTypes);
file.browse(allTypes);
file.browse();
}
private function onSelect(e: Event): void{
Alert.show("ÉÏ´« " + file.name + " (¹² "+Math.round(file.size)+" ×Ö½Ú)?",
"È·ÈÏÉÏ´«",
Alert.YES|Alert.NO,
null,
proceedWithUpload);
}
private function onProgress(e: ProgressEvent): void{
lbProgress.text = " ÒÑÉÏ´« " + e.bytesLoaded
+ " ×Ö½Ú£¬¹² " + e.bytesTotal + " ×Ö½Ú";
var proc: uint = e.bytesLoaded / e.bytesTotal * 100;
bar.setProgress(proc, 100);
bar.label= "µ±Ç°½ø¶È: " + " " + proc + "%";
}
private function proceedWithUpload(e: CloseEvent): void{
if (e.detail == Alert.YES){
var request: URLRequest = new URLRequest("http://localhost:8080/FileUploaded/FileUploaded");
try {
file.upload(request);
} catch (error:Error) {
trace("ÉÏ´«Ê§°Ü");
}
}
}
]]>
</mx:Script>
<mx:Canvas width="100%" height="100%" x="10" y="170" fontSize="15">
<mx:VBox width="100%" horizontalAlign="center">
<mx:Label id="lbProgress" te


Ïà¹ØÎĵµ£º

Java SE ¶à̬

/*¶à̬ʾÀý*/
package demo;
class AA {
 public void f(){
  System.out.println("f in AA");
 }
}
class BB extends AA{
 public void f(){
  System.out.println("f in BB");
 }
 
}
public class Test_Dt {
 public static void main(String[] args) ......

Java SE ÄÚ²¿ÀàÓ뾲̬±äÁ¿

package demo;
class InOut{
 String str=new String("Between");
 static int i=666;
  int j=888;
  final int k=999;
 public void amethod(final int iArgs){
  int it315;
  final int x=111;
 /*static*/ class Bicycle
  { 
//&n ......

ÀûÓÃSocketʵÏÖC++ÓëFlexͨÐÅ


ÀûÓÃSocketʵÏÖC++ÓëFlexͨÐÅ
Ò»¡¢C++·þÎñÆ÷¶Ë
£¨ÓõÄÊÇVisual Studio 2008£¨05£¬03µÄÓ¦¸ÃÒ²¿ÉÒÔ£¬VC++µÄ¿ÉÄÜÐèÒªÉÔ΢¸Ä¶¯£©£©
´úÂëÈçÏ£º
#include <winsock2.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
using namespace std;
#pragma comment(lib,"ws2_32.lib ......

¡¾×ª¡¿Ê¹ÓÃFlex Bison ºÍLLVM±àд×Ô¼ºµÄ±àÒëÆ÷v

Ô­Îijö´¦£ºhttp://gnuu.org/2009/09/18/writing-your-own-toy-compiler
1¡¢½éÉÜ
ÎÒ×ÜÊǶԱàÒëÆ÷ºÍÓïÑԷdz£¸ÐÐËȤ£¬µ«ÊÇÐËȤ²¢²»»áÈÃÄã×ߵĸüÔ¶¡£´óÁ¿µÄ±àÒëÆ÷µÄÉè¼Æ¸ÅÄî¿ÉÒÔ¸ãµÄÈκÎÒ»¸ö³ÌÐòÔ±ÃÔʧÔÚÕâЩ¸ÅÄîÖ®ÖС£²»ÓÃ˵£¬ÎÒÒ²Ôø
½ñ³¢ÊÔ¹ý£¬µ«ÊDz¢Ã»ÓÐÈ¡µÃÌ«´óµÄ³É¹¦£¬ÎÒÒÔǰµÄ³¢ÊÔ¶¼Í£ÁôÔÚÓïÒå·ÖÎö½×¶Î¡£±¾ÎĵÄÁé¸ÐÖ÷Ò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ