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
/** | |
* Created with JetBrains WebStorm. | |
* User: bao_bao | |
* Date: 2013/03/31 | |
* Time: 22:07 | |
* To change this template use File | Settings | File Templates. | |
*/ | |
var Helloworld = 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
# -*- coding: utf-8 -*- | |
''' | |
ネイバーまとめから画像をダウンロードするスクリプトpython版 | |
MatomeLinkCollector | |
画像のリンク先が外部サイトの場合は未対応。 | |
@Author Shunsuke Ohba | |
2013.04.28 | |
''' |
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
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; |
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 str:String = " hoge hoge "; | |
var reg:RegExp = /^[ ]+|[ ]+$/g; | |
var result:String = str.replace(reg, ""); | |
trace("|" + result + "|"); //ourpur::hoge hoge |
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 | |
mb_language("Japanese"); | |
mb_internal_encoding("UTF-8"); | |
$mail_to = '[email protected]'; | |
$subject = 'test'; | |
$mail_text = 'テストメール'; | |
$reply_to = 'From: [email protected]'; | |
$result = mb_send_mail($mail_to, $subject, $mail_text, $reply_to); | |
if ($result) { | |
echo 'success'; |
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 tree(str:String):void | |
{ | |
var trees:Array = str.split(","); | |
var retisters:Array = []; | |
var map:Object = {}; | |
for (var i:int = 0; i < trees.length; i++) | |
{ | |
var t:String = trees[i]; | |
var temp:Array = t.split("/"); | |
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 checkFlg(keta:uint, value:uint):Boolean | |
{ | |
if (keta == 0) throw new Error("error"); | |
var checkNum:int = keta > 2 ? Math.pow(2, keta) : keta; | |
value /= checkNum; | |
value *= 128; | |
if (value >= 256) | |
{ | |
// 8ビットなので256以上は巻き戻る | |
while (value >= 256) |
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
/// <summary> | |
/// Scene List Editor Window | |
/// @author Shunsuke Ohba | |
/// </summary> | |
using UnityEngine; | |
using UnityEditor; | |
using System.IO; | |
using System.Collections; | |
using System.Collections.Generic; |
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 arr = transform.GetComponentsInChildren<Transform> (); | |
for (int i = 0; i < arr.Length; i++) { | |
Debug.Log (arr [i]); | |
} |
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
// マップの全ての共有マテリアルの参照を取得する | |
if (bg_materials == null) | |
bg_materials = new List<Material>(); | |
Renderer[] rens = go.GetComponentsInChildren<Renderer>(); | |
foreach(Renderer ren in rens) { | |
if (ren == null | |
|| ren.sharedMaterial == null | |
|| ren.particleSystem != null) { | |
continue; | |
} |