No.1 Copy content to clipboard:
-
System.setClipboard(strContent);
No.2 Clone an ArrayCollection:
- //dummy solution( well, it works )
-
varbar:ArrayCollection = new ArrayCollection();
-
foreach ( var i:Object in ac ){
-
bar.addItem(i );
-
}
- // fantastic ! //
-
varbar:ListCollectionView = new ListCollectionView( ListCollectionView( ac ).list );
No.3 Open URL:
-
navigateToURL(new URLRequest('http://ntt.cc'), '_blank'
No.4 Page reload:
-
navigateToURL(new URLRequest("javascript:location.reload();"),"_self")
No.5 Close browse:
-
navigateToURL(new URLRequest("javascript:window.close()"),"_self");
No.6 Set the background alpha to transparent on Alert window:
-
Alert
-
{
-
modalTransparency:0.0;
-
modalTransparencyBlur:0;
- }
No.7 Set random color:
-
lbl.setStyle('color', 0xffffff*Math.random());
No.8 Trim left of white space
-
public function LTrim(s : String):String
-
{
-
vari : Number = 0;
-
while(s.charCodeAt(i) == 32 || s.charCodeAt(i) == 13 || s.charCodeAt(i) == 10 || s.charCodeAt(i) == 9)
-
{
-
i++;
-
}
-
returns.substring(i,s.length);
- }
No.9 Trim right of white space
-
public function RTrim(s : String):String
-
{
-
vari : Number = s.length - 1;
-
while(s.charCodeAt(i) == 32 || s.charCodeAt(i) == 13 || s.charCodeAt(i) == 10 ||s.charCodeAt(i) == 9)
-
{
-
i--;
-
}
-
returns.substring(0,i+1);
- }
No.10 Trim left and right of white space
-
public function Trim(s : String):String
-
{
-
returnLTrim(RTrim(s));
- }
No.11 get data type:
-
getQualifiedClassName(data)
No.12 Generate check digits
-
private function GenerateCheckCode():String
-
{
-
//init
-
varran:Number;
-
varnumber:Number;
-
var code:String;
-
varcheckCode:String ="";
-
//get 4 radom
-
for(vari:int=0; i<4; i++)
-
{
-
ran=Math.random();
-
number =Math.round(ran*10000); //get result like 0.1234
-
if(number % 2 == 0)
-
code = String.fromCharCode(48+(number % 10)); //0's ASCII code is 48
-
else
-
code = String.fromCharCode(65+(number % 26)) ; // A's ASCII code is 65
-
checkCode += code;
-
}
-
returncheckCode;
- }
分享到:
相关推荐
You Will Learn Python!
本项目"A very simple tableview demo swift"旨在展示如何在Swift中创建并操作基本的表格视图。下面将详细阐述相关知识点。 【描述】"一个非常简单的Swift表格视图演示" 这个Swift示例项目旨在帮助初学者理解如何...
Maybe, it s not useful for you, but if there s only one person who thinks it s useful, I will be very happy. Sometimes you don t need good skill, just a good idea, and by this simple way a useful ...
"very simple image gallery" 是一个专为 Joomla! 内容管理系统设计的相册管理插件。Joomla 是一款流行的开源 CMS(内容管理系统),它允许用户无需深入编程即可创建和管理网站。这款简单相册插件提供了方便快捷的...
We want to offer a short and simple MATLAB code, described in more detail than usual, so the reader can experiment (and add to the code) knowing the underlying principles. We find the node locations ...
标题"jOOR - Fluent Reflection in Java jOOR is a very simple flu.zip"表明这个压缩包可能包含jOOR库的相关代码或文档,帮助用户了解和使用这个库。"Fluent Reflection in Java"强调了jOOR的主要特点,即提供了一...
Very Simple Ad 1.0.4.3 20160503 unitypackage
This example is a very simple solution to sending and receiving data to and from a Parallax Basic Stamp. This example requires a Basic Stamp and the MSComm control. Also included is an example Basic ...
本压缩包"Very Simple Rating System.rar"很可能包含了一个基本的评分系统实现,可能是一个小型项目或示例代码,用于教学或快速原型设计。下面将详细探讨评分系统的概念、组成部分以及可能的设计方法。 1. 评分系统...
No book can cover everything, but here you’ll learn some of the more useful tools for Flex application development. Most importantly, you’ll learn how to include external data within your ...
who invested in Visual Basic 10 years ago are in demand today. In the world of computing, how- ever, things change very fast, including languages. At some point, they either die, or they evolve into ...
《Very Simple Instant Messenger X-PopUp:简易即时通讯软件解析》 在当今信息化社会,即时通讯工具已经成为我们日常生活中不可或缺的一部分。"Very Simple Instant Messenger X-PopUp"(以下简称X-PopUp)作为一...
在本主题中,我们讨论的是一个名为"A very simple .m file to read a .fig file and plot it in Octave"的程序,它的目的是在开源软件Octave中打开并显示一个`.fig`文件。 Octave是一个与MATLAB高度兼容的自由软件...
This is a very useful program
Very simple application which shows how to get your PC’s IP address using the VB Winsock control.
安装步骤: 安装Nodejs- //nodejs.org/en/ 将仓库克隆到所需目录 在终端中,导航到Repo目录。 在终端中键入cd,在d后面加一个空格 将目录拖到终端窗口中,然后按Enter键。 输入npm install并按Enter ...
Web applications with ASP.NET, and Windows mobile and embedded CE apps with Visual Basic 2010, but you’ll also get a thorough grounding in the basic nuts-and-bolts of writing good code. You’ll be ...
Using the library is very simple, look at the source code of the provided sample. Step 1. In your layout xml: Step 2. In your activity: ((ExpandableTextView) findViewById(R.id.tv)).setText...
But, for a project, my friend 'anirban' required a JPEG encoder in C#. So, we started writing our own encoder. It turned out to be very complex and difficult. The one we wrote from scratch was really...