/**//** * 自定义一个Flex的Application,继承于Application * */ public class CustomApplication extends Application { //文件上传列表 private var fileRefList:FileReferenceList; private var fileRefListener:Object; private var _totalSize:Number; private var _uploadedBytes:Number; private var _currentUpload:FileUpload; private var _uploadFileSize:Number; private var _totalUploadSize:Number; private var _fileTypeDescription:String; private var _fileTypes:String;
public var fileContainer:VBox; public var fileUploadBox:VBox; public var uploadStats:HBox; public var totalFiles:Text; public var totalSize:Text; public var totalProgressBar:ProgressBar; public var browseButton:Button; public var clearButton:Button; public var uploadButton:Button; public var cancelButton:Button; public var mytext:Text;
public function CustomApplication() { super(); addEventListener(FlexEvent.CREATION_COMPLETE,onLoad); }
public class FileUpload extends VBox { private var bar:ProgressBar; private var _file:FileReference; private var nameText:Text; private var _uploaded:Boolean; private var _uploading:Boolean; private var _bytesUploaded:uint; private var _uploadUrl:String; private var button:Button;
public function FileUpload(file:FileReference,url:String) { super(); //初始化参数 _file = file; _uploadUrl = url; _uploaded =false; _uploading =false; _bytesUploaded =0;
public class FileUploadEvent extends Event { private var _sender:Object;
public function FileUploadEvent(sender:Object,type:String,bubbles:Boolean=false,cancelable:Boolean=false) { super(type,bubbles,cancelable); _sender = sender; }
public function get Sender():Object { return _sender; } } }
package components { public class FileUploadProgressChangedEvent extends FileUploadEvent { private var _bytesUploaded:uint; public function FileUploadProgressChangedEvent(sender:Object,bytesUploaded:uint,type:String,bubbles:Boolean=false,cancelable:Boolean=false) { super(sender,type,bubbles,cancelable); _bytesUploaded = bytesUploaded; }
public function get BytesUploaded():Object { return _bytesUploaded; } } }
自定义ASP.NET控件代码 using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;
[Category("Behavior")] [Description("上传文件的ASP.NET处理页面")] [DefaultValue("")] publicstring UploadPage { get { object o = ViewState["UploadPage"]; if (o ==null) return""; return o.ToString(); } set { ViewState["UploadPage"] = value; } }
[Category("Behavior")] [Description("上传页参数")] [DefaultValue("")] publicstring QueryParameters { get { object o = ViewState["QueryParameters"]; if (o ==null) return""; return o.ToString(); } set { ViewState["QueryParameters"] = value; } }
[Category("Behavior")] [Description("文件上传后JavaScript调用的设置参数的方法.")] [DefaultValue("")] publicstring OnUploadComplete { get { object o = ViewState["OnUploadComplete"]; if (o ==null) return""; return o.ToString(); } set { ViewState["OnUploadComplete"] = value; } }
[Category("Behavior")] [Description("设置允许上传的最大文件大小")] publicdecimal UploadFileSizeLimit { get { object o = ViewState["UploadFileSizeLimit"]; if (o ==null) return0; return (decimal)o; } set { ViewState["UploadFileSizeLimit"] = value; } }
[Category("Behavior")] [Description("上传文件的总大小")] publicdecimal TotalUploadSizeLimit { get { object o = ViewState["TotalUploadSizeLimit"]; if (o ==null) return0; return (decimal)o; } set { ViewState["TotalUploadSizeLimit"] = value; } }
[Category("Behavior")] [Description("上传文件的类型描述 (如. Images (*.JPG;*.JPEG;*.JPE;*.GIF;*.PNG;))")] [DefaultValue("")] publicstring FileTypeDescription { get { object o = ViewState["FileTypeDescription"]; if (o ==null) return""; return o.ToString(); } set { ViewState["FileTypeDescription"] = value; } }
[Category("Behavior")] [Description("上传文件的类型(如. *.jpg; *.jpeg; *.jpe; *.gif; *.png;)")] [DefaultValue("")] publicstring FileTypes { get { object o = ViewState["FileTypes"]; if (o ==null) return""; return o.ToString(); } set { ViewState["FileTypes"] = value; } }
返回做IO数目最多的50条语句以及它们的执行计划。
select top 50
(total_logical_reads/execution_count) as avg_logical_reads,
(total_logical_writes/execution_count) as avg_logical_writes,
(tot
The CUDA 5 Release Candidate is now available at http://developer.nvidia.com/<wbr></wbr>cuda/cuda-pre-production. Now applicable to a broader set of algorithms, CUDA 5 has advanced fe
Essential Studio for WinRT界面控件包含了商业平板应用程序开发中所需的所有控件,如市场上运行速度最快的grid 和chart、地图、RDL报表查看器、丰富的文本查看器及图表等等。同时,该控件还包含了一组独特的库,用于从WinRT应用程序中生成Excel、Word以及PDF格式的文件。此文将对其另外一个强大的控件——网格控件进行专门的测评详述。
网格控件功能
1、
Project Euler是个数学问题求解网站,网站设计的很有意思,有很多problem,在未提交正确答案前不能查看problem的overview,也不能查看关于problem的discussion thread,只能看到现在problem已经被多少人解决了,人数越多往往代表问题越容易。
看看problem 1吧:
Add all the natural num
Adding id and class names to CMenu
We use the id and htmlOptions to accomplish this. Watch.
//in your view
$this->widget('zii.widgets.CMenu', array(
'id'=>'myMenu',
'items'=>$this-&g
Given a collection of integers that might contain duplicates, nums, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.
The solution set must not conta