Skip to content

Instantly share code, notes, and snippets.

(function(){
alert(f1(f2)(f3)(4));
function f1(f) {
alert('f1');
return f;
}
function f2(f) {
alert('f2');
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Oppai
{
class Oppai
{
static void Main(string[] args)
// ==UserScript==
// @name Google Suggest Oopera gkbr
// @include http://www.google.co.jp/*
// ==/UserScript==
(function() {
function main() {
var qn = document.getElementsByName('q');
for (var i = 0; i < qn.length; i++) {
qn[i].addEventListener('keypress', function(e) { if (e.keyCode == 38 || e.keyCode == 40) e.preventDefault(); }, false);
}
(function(){
var user = 'miya2000', password = '?????????';
var follows = '6489432'; // csv
var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://stream.twitter.com/1/statuses/filter.json', true, user, password);
xhr.setRequestHeader('Content-Type' , 'application/x-www-form-urlencoded');
xhr.onreadystatechange = onReadyStateChange;
xhr.send('follow=' + follows);
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");
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;
};
}
//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));
// ==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++) {
ウェブ全体から検索
http://www.google.co.jp/