This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ LANGUAGE="JScript" %> | |
<!doctype html> | |
<html> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<body> | |
<b>Hello ASP.</b> | |
<script language="JScript" runat="server"> | |
try { | |
var doc = new ActiveXObject("MSXML2.DomDocument"); | |
var node64 = doc.createElement('b64'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rundll32 javascript:"\..\mshtml,RunHTMLApplication ";(function(){try{var%20fso=new%20ActiveXObject('Scripting.FileSystemObject');fldr=fso.CreateFolder('C:\\Program%20Files\\TestFolder')}catch(e){alert(e.message)}finally{window.close()}}()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(p){alert(function(t){var ret=[];for(var i in t)if(typeof t[i]!=='function'&&t[i]>0)ret.push({name:i,value:t[i]});return ret}(p).sort(function(a,b){return a.value-b.value}).map(function(d,i,a){if(i>0){return d.name+':'+(d.value-a[i-1].value)}else{return d.name+':0'}}).join('\n'))})(performance.timing) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(ticks=20000000); | |
$a = new handle(); | |
register_tick_function(array(&$a, 'handler')); | |
while($a->a > 0) { | |
//sleep(1); | |
} | |
class handle { | |
var $a = 1; | |
public function handler() { |
ECMA(European Computer Manufacturers Association)是一個標準組織,他底下有許多委員會,負責制定各種標準。其中一個標準叫做ECMA-262,就是Javascript的標準。這個標準除了定義型別、語法、敘述等程式語言的基本要素,也定義了一套核心的物件。不論在怎樣的平台上執行,Javascript都遵循一樣的語法,也一定內建了這些核心物件。我們所熟悉的Javascript,就是由這些核心的部分,再加上其他函數與物件所組成。在網頁中使用Javascript,除了核心物件,最重要的就是HTML DOM相關物件。如果使用伺服器端的語言例如Node.js,也是由這些核心物件加上執行環境提供的物件所組成。
註:ECMA還制定了其它各種不同的標準,例如C#的標準是ECMA-334,Microsoft Office使用的Office Open XML格式的標準是ECMA-376。對於軟體工程師來說,可能還聽過CLI、Eiffel、JSON、Dart等語言與技術,他們的標準都是由ECMA組成委員會制定的。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
function split( val ) { | |
//alert(val); | |
return val.split( /,\s*/ ); | |
} | |
function extractLast( term ) { | |
return split( term ).pop(); | |
} | |
$("#S1") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
co(withYield); | |
withoutYield(); | |
function timeout(sec) { | |
return function(notify) { | |
setTimeout(function() { | |
notify(null, new Date().getTime()); | |
}, sec*1000); | |
}; | |
} | |
function co(gen) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function * gen() { | |
var c = 0; | |
while(true) { | |
yield c; | |
c++; | |
} | |
} | |
function run() { | |
var g = gen(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function * serial() { | |
var c = 0; | |
while(true) { | |
yield c; | |
c++; | |
} | |
} | |
var s = serial(); | |
console.log(s.next().value); | |
//顯示 0 |