Skip to content

Instantly share code, notes, and snippets.

(function(d,f,s){
s=d.createElement("script");
s.src="//code.jquery.com/jquery-2.1.3.min.js";
s.onload=function(){f(jQuery.noConflict(1))};
d.body.appendChild(s);
})(document,function($){
//onloadうぜーーー
//のろいをとく
var x = setTimeout('');
@elnikkis
elnikkis / compressed_kyuko.js
Created April 13, 2016 05:46
圧縮済み休講ページ用ブックマークレット
javascript:(function(c,b,a){a=c.createElement("script");a.src="//code.jquery.com/jquery-2.1.3.min.js";a.onload=function(){b(jQuery.noConflict(1))};c.body.appendChild(a)})(document,function(c){var h=setTimeout(function(){});for(var d=0;d<h;d++){clearTimeout(d)}var f="#grvCancel";var e="#grvSupplement";var a=function(k,i){c(k+" tr").css("visibility","visible").css("display","table-row");if(i!="ALL"){c(k+" tr:not(:contains('"+i+"'))").css("visibility","collapse").css("display","none");c(k+" tr:first").css("visibility","visible").css("display","table-row")}};line1=c('<tr id="line1">');line2=c('<tr id="line2">');for(var d=0;d<9;d++){line1.append("<td>");line2.append("<td>")}c("#grvCancel tr:first").after(line1);c("#grvSupplement tr:first").after(line2);var j=function(n,p,m,o){var k=c("<select>").attr("name",n).css({width:"100%"});for(var l=0;l<p.length;l++){c("<option>").attr("value",p[l]).text(p[l]).appendTo(k)}c("#line"+o+" td:eq("+m+")").css({margin:"0",padding:"0"}).append(k);k.change(function(){console.log(th
# coding: utf-8
'''
論理パズルを解く
https://twitter.com/hikitashisan/status/723557720930951168
'''
import itertools
def constraints(params):
# coding: utf-8
'''
入力ファイルをn分割する。
出力ファイルはdデフォルトでsplitted0~splitted[n]
'''
import sys
def parse_args():
@elnikkis
elnikkis / file2.txt
Last active July 7, 2017 13:06
緯度経度から住所を取得する ref: http://qiita.com/elnikkis/items/def3f325446ce7a54eff
$ python findcity.py
Shapefiles: ['data/japan-shape/A002005212010DDSWC35208/h22ka35208.shp', 'data/japan-shape/A002005212010DDSWC35207/h22ka35207.shp', 'data/japan-shape/A002005212010DDSWC35201/h22ka35201.shp', 'data/japan-shape/A002005212010DDSWC35203/h22ka35203.shp', 'data/japan-shape/A002005212010DDSWC35206/h22ka35206.shp', 'data/japan-shape/A002005212010DDSWC35202/h22ka35202.shp', 'data/japan-shape/A002005212010DDSWC35204/h22ka35204.shp']
35208602 山口県岩国市装束町6丁目
class ScoreBox
{
/**
* 倒したピンの数(-1は未入力)
*/
private int pins;
private boolean isFirstBox;
public ScoreBox(boolean isFirstBox)
{
class BinarySearchTest
{
public static void main(String[] args)
{
BinarySearchTree<Integer> tree = new BinarySearchTree<Integer>(8);
tree.add(3);
tree.add(10);
tree.add(6);
tree.add(4);
tree.add(7);
# coding: utf-8
import random
import math
def fall():
rad = random.random() * math.radians(360)
c = random.random() + math.fabs(math.cos(rad))
if c > 1:
return 1
import java.util.regex.*;
/*
* 文字列定数を受理する正規表現
*/
class StringRegex
{
String[] testcase = {
"\"This is a string.\"",
"\"This is a \"string\".\"",
#include <stdio.h>
int main(){
int a1 = 1;
int a2 = 3;
int a3 = 5;
int b1 = 0;
int b2 = 4;