This file contains 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 hoge = [8, 3, 7, 5, 4, 11, 9, 10, 6, 1, 2]; | |
hoge.sort(function() {return 0;}); | |
// RESULT | |
// Google Chrome 12.0.742.112 | |
// node v0.4.8 | |
// [11, 8, 7, 5, 4, 3, 9, 10, 6, 1, 2] | |
// ActionScript 3 + Flash Player 10,2,159,1 | |
// [11, 3, 7, 5, 4, 8, 9, 10, 6, 1, 2] |
This file contains 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.wakuworks.com/test/jsdoc/ | |
/** | |
* 名前空間の説明 | |
* @namespace | |
*/ | |
var Namespace = Namespace || {}; | |
/** | |
* クラスの説明など |
This file contains 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 | |
// http://stackoverflow.com/questions/2226103/how-to-cast-objects-in-php | |
$a = new A(); | |
$b = cast($a, 'B'); | |
$a->foo(); // A! | |
$b->foo(); // B! | |
function cast($obj, $toClass) | |
{ |
This file contains 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 | |
// usage: | |
// youtube_proxy.php?url=http%3a%2f%2fwww%2eyoutube%2ecom%2fwatch%3fv%3dmxPXPv3oNY4%26feature%3dfvsr | |
define('YOUTUBE_DOMAIN', 'www.youtube.com'); | |
// fmt(優先度:左->右) | |
$fmtTbl = array(5, 18, 34, 22, 37); | |
$url = isset($_GET['url']) ? rawurldecode($_GET['url']) : ''; |
This file contains 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
/** | |
* jquery.cssFrag: Using (jQuery)CSS Selectors as Fragment Identifiers | |
* Author: Kazunori Ninomiya | |
* Version: 1.0.0 | |
* Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php | |
* Requires: jquery.js | |
* Requires: jquery.ba-hashchange.js | |
* http://benalman.com/code/projects/jquery-hashchange/docs/files/jquery-ba-hashchange-js.html | |
*/ | |
(function($, window, document, undefined) |
This file contains 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 PATTERN = /^(\d|[01]?\d\d|2[0-4]\d|25[0-5])\.(\d|[01]?\d\d|2[0-4]\d|25[0-5])\.(\d|[01]?\d\d|2[0-4]\d|25[0-5])\.(\d|[01]?\d\d|2[0-4]\d|25[0-5])\/(\d|[012]?\d|3[0-2])?$/; | |
var BIT_STR = "11111111111111111111111111111111"; | |
var MIN_BIT = 8; | |
var MAX_BIT = 30; | |
function calcIp(ip) | |
{ | |
var result = []; | |
var ip = ip.match(PATTERN); |
This file contains 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($, window, document, undefined) | |
{ | |
/** | |
* add browser zoom event | |
* @see http://novemberborn.net/2007/12/javascriptpage-zoom-ff3-128 | |
*/ | |
var ZOOM_CHECK_INTERVAL = 1; | |
$(function() { |
This file contains 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 | |
class Variables extends ArrayObject | |
{ | |
/** | |
* 取得候補の文字コード | |
* | |
* @var string | |
*/ | |
const DETECT_ORDER_ENCODING = 'UTF-8, SJIS-win, eucJP-win'; |
This file contains 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 | |
/** @see TwitterAOauth */ | |
require_once 'twitteroauth/twitteroauth.php'; | |
$consumer_key = 'xxx'; | |
$consumer_secret = 'xxx'; | |
$oauth_token = 'xxx'; | |
$oauth_token_secret = 'xxx'; |
This file contains 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
trace(" hogehoge ".replace(/^[\s\t\r\n\0\0xB ]*|[\s\t\r\n\0\0xB ]*$/sg, "")); |
OlderNewer