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
| javascript:(function(){ | |
| var f=function(){ | |
| var a=[]; | |
| function d(){ | |
| a.shift().apply(d,arguments); | |
| } | |
| d.add=function(f){ | |
| a.push(f); | |
| return d; | |
| }; |
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 aaa() { | |
| var i = 100 / 10;// aaa | |
| // aaa | |
| i++; | |
| /* | |
| alert(i); | |
| */ | |
| /*/*/ |
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(){ | |
| var acme = {}; if (this.acme == null) this.acme = acme; | |
| /// ---------------------- /// | |
| /// !!! acme.ByteArray !!! /// | |
| /// ---------------------- /// | |
| acme.ByteArray = function ByteArray(n) { | |
| if (!(this instanceof ByteArray)) return new ByteArray(n); |
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(){ | |
| var df1 = document.createDocumentFragment(); | |
| df1.appendChild(document.createElement('A')); | |
| var df2 = document.createDocumentFragment(); | |
| df2.appendChild(df1); | |
| alert(df1.firstChild && df1.firstChild.nodeName); // null | |
| alert(df2.firstChild && df2.firstChild.nodeName); // A |
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
| ウェブ全体から検索 | |
| http://www.google.co.jp/ |
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
| // ==UserScript== | |
| // @name Quicktime Movie Download | |
| // @include http://* | |
| // ==/UserScript== | |
| (function() { | |
| function evaluate(xpath, context) { | |
| var eles = document.evaluate(xpath, context || document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
| var arr = []; | |
| for (var i = 0, len = eles.snapshotLength; i < len; i++) { |
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
| //at www.google.co.jp on Opera 10.50 Beta (Build 3275) | |
| (function(){ | |
| var xhr = new XMLHttpRequest(); | |
| xhr.open('GET', 'http://www.google.co.jp/logos/olympics10-shorttrack-hp.png', false); | |
| xhr.overrideMimeType('text/plain; charset=x-user-defined'); | |
| xhr.send(null); | |
| //alert(xhr.responseText); | |
| //alert(xhr.responseText.length); // not 0! | |
| //alert(encodeURI(xhr.responseText)); |
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
| var createDocumentFragment = (function() { | |
| if (document.createRange) { | |
| return function(contextElement, htmlStr) { | |
| var range = contextElement.ownerDocument.createRange(); | |
| range.selectNodeContents(contextElement); | |
| var df = range.createContextualFragment(htmlStr); | |
| range.detach(); | |
| return df; | |
| }; | |
| } |
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
| private void Hoge(string kubun) | |
| { | |
| var dataList = new[] { | |
| new { Value1 = "aaa", Value2 = (string)null }, | |
| new { Value1 = "bbb", Value2 = (string)null }, | |
| new { Value1 = (string)null, Value2 = "aaa" }, | |
| new { Value1 = (string)null, Value2 = "bbb" }, | |
| }; | |
| var data1 = dataList.First(n => kubun == "1" ? n.Value1 == "aaa" : n.Value2 == "bbb"); |
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
| GitHubへログイン中でないと使えません。 |