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
#-*- coding: utf-8 -*- | |
@@elements = ["ビ","ビ","ド","レ","ド","オ","ペ","レ","ショ"] | |
def bbop() | |
indice = [] | |
matches = 0 | |
for i in [*0..8] do | |
indice[i] = [*0..8].sample() | |
if @@elements[i]==@@elements[indice[i]] |
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
/// <reference path="typings/node/node.d.ts" /> | |
/// <reference path="bower_components/dt-request/request.d.ts" /> | |
import http = require("http"); | |
var request:Request.IRequest = require("request"); | |
request.get("http://lacolaco.net/", (error:Error, response:http.ClientResponse, body:string)=> { | |
console.log(response.statusCode); | |
console.log(error); | |
console.log(body.length); |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace BBOP | |
{ | |
public class BBOP | |
{ |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var initial = new Item[] { | |
new Item() { value = "Hoge", count = 10000 }, | |
new Item() { value = "Fuga", count = 10000 }, | |
new Item() { value = "Piyo", count = 10000 }, | |
}; | |
var sw = new Stopwatch(); |
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
----sample: IEnumerable<T>---- | |
--OrderBy-- | |
29947 | |
--ElementAt-- | |
757 | |
--Skip-- | |
735 | |
----sample: Array<T>---- | |
--OrderBy-- | |
28894 |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
namespace RandomPerformance | |
{ | |
class Program | |
{ |
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
static Random _Rand = new Random(); | |
static T RandomOrderBy<T>(IEnumerable<T> ie) | |
{ | |
return ie.OrderBy(x => _Rand.Next()).First(); | |
} | |
static T RandomElementAt<T>(IEnumerable<T> ie) | |
{ | |
return ie.ElementAt(_Rand.Next(ie.Count())); |
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
import java.util.List; | |
import java.util.Timer; | |
import java.util.TimerTask; | |
import android.app.Activity; | |
import android.app.ActivityManager; | |
import android.app.ActivityManager.RunningServiceInfo; | |
import android.app.AlarmManager; | |
import android.app.PendingIntent; | |
import android.content.Context; |
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
@{ | |
var db = Database.Open("lacolaco"); | |
var Count = db.QueryValue("SELECT COUNT (Date) FROM Data"); | |
Func<object> Tweet = () => System.Diagnostics.Process.Start("https://twitter.com/intent/tweet?text=らこらこらこ~w"); | |
Func<object> Countup = () => db.Query("INSERT INTO Data (Date) VALUES ('" + DateTime.Now + "')"); | |
} | |
<!DOCTYPE html> | |
<html lang="ja"> |
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
public enum EnumHogehoge | |
{ | |
hoge, | |
fuga, | |
piyo; | |
} |