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
package { | |
import flash.display.Sprite; | |
public class Main extends Sprite | |
{ | |
public function Main() | |
{ | |
var sample:Sample = new Sample(); | |
sample.addEventListener(SampleEvent.SEND_MESSAGE, sendMessageHandler); | |
sample.sendMessage("テストです", "this is test"); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>addEventListenerとdispatchEvent(AS3)を関数型パターン+jQueryのonとtrigger(JS)で再現する【2:JS版】</title> | |
</head> | |
<body> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script type="text/javascript" src="sample.js"></script> | |
<script type="text/javascript"> | |
var sample = Sample(), |
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
<html> | |
<head> | |
<title>module pattern + Singleton (JavaScript)</title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
var Hoge = (function(){ | |
var _fromGetInstance = false, | |
_instance, | |
_construct = function() { |
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
cd ~/Sites/ | |
ln -s 元となるディレクトリのパス 公開する時のディレクトリ名 | |
(例 : ln -s /Volumes/www/apache_on_osx/ apache_on_osx) |
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
// @see http://www.designscripting.com/2012/09/as3-randomize-an-array-order-in-flash/ | |
var rawArr:Array = ["1","2","3","4","5"]; | |
trace(randomizeArray(rawArr)); | |
function randomizeArray(myArray:Array, count:int=1):Array { | |
count--; | |
for (var i:uint = 0; i < myArray.length; i++) | |
{ | |
var rand:uint = int(Math.random() * myArray.length); | |
myArray.push( myArray.splice( rand, 1 )[0] ); | |
} |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> | |
<title>scroll cat</title> | |
</head> |
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
・サービス | |
Net Applications(要登録) | |
http://www.netmarketshare.com/browser-market-share.aspx | |
StatCounter | |
http://gs.statcounter.com/ | |
w3Counter | |
http://www.w3counter.com/trends |
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
//@see http://creatorish.com/weblog/6331 | |
function appendHTML(elm,htm) { | |
if (document.createRange) { // all browsers, except IE before version 9 | |
var rangeObj = document.createRange (); | |
rangeObj.selectNodeContents(document.body); | |
if (rangeObj.createContextualFragment) { | |
// all browsers, except IE | |
var documentFragment = rangeObj.createContextualFragment(htm); | |
elm.insertBefore (documentFragment, elm.firstChild); | |
} else { |
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 a;a=window.location.pathname.split("/");a="https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=${USER_NAME}".replace("${USER_NAME}",a[a.length-1]);window.open(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
<?php | |
header("Content-Type: {$_GET[contenttype]};" ); | |
header("Access-Control-Allow-Origin: *"); | |
readfile( $_GET[url] ); |