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
public class WebClientWrapper | |
{ | |
public static void WebGetAsync( string url, System.Action<string> callback_func ) | |
{ | |
System.Net.WebClient wc = new System.Net.WebClient(); | |
// 本来の引数型は void ( object, System.Net.DownloadStrignCompletedEventArgs ) | |
// ラムダ関数でラップしてWebGetAsyncの第二引数の関数(System.Action<string> callback_func)を呼び出す。 | |
wc.DownloadStringCompleted += new System.Net.DownloadStringCompletedEventHandler( ( o, e ) => { | |
callback_func( e.Result ); |
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
class YoutubeItemJson | |
{ | |
public String id; | |
public String uploaded; | |
public String updated; | |
public String uploader; | |
public String category; | |
public String title; | |
public String description; | |
public List<String> tags; |
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 | |
/* | |
... ここで適当に処理 | |
*/ | |
/* Case:1 意図しない挙動 */ | |
$a = current( $a ); |
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 | |
// APC : version 3.1.9 | |
$retval = apc_add('key', array(1,2,3,4,5)); | |
echo $retval; // true | |
$retval = apc_fetch('key'); |
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
syntax on | |
set number | |
set si | |
set sw=2 | |
set ts=2 | |
set expandtab | |
set incsearch | |
set encoding=utf8 | |
set hidden |
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
//================================================================================ | |
//! @file OAuth_v1.cs | |
//! @brief OAuth認証 | |
//! @date 07/25/2012 | |
//! @author kogarasi | |
//================================================================================ | |
using UnityEngine; | |
using System; | |
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
using JsonFx.Json; | |
public class SimpleGeneric { | |
// 呼び出し側 | |
public void hoge(){ | |
var decodeObject = simpleDecode( "{ a:1; }", new { a=1 } ); // 第二引数は型の指定 | |
} | |
public T simpleDecode<T>( string jsonString, T _type ){ |
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
buildscript { | |
repositories { | |
mavenCentral() | |
mavenRepo urls: 'http://twitter4j.org/maven2' | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.5.+' | |
classpath 'com.googlecode.androidannotations:androidannotations:2.7.1' | |
classpath 'com.googlecode.androidannotations:androidannotations-api:2.7.1' | |
classpath 'com.h2database:h2:1.3.173' |
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
#include "cocos2d.h" | |
template <typename T> | |
class BaseScene : public cocos2d::Layer { | |
public: | |
static cocos2d::Scene* createScene(){ | |
auto scene = cocos2d::Scene::create(); | |
auto layer = T::create(); | |
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
Preference->Plugins->Install JetBrain Plugins |
OlderNewer