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 Store { | |
constructor() { | |
this.obj = {} | |
} | |
get(key) { | |
return this.obj[key] | |
} | |
set(key, val) { | |
this.obj[key] = val | |
} |
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 | |
import sys | |
import numpy as np | |
import cv2 | |
def split_image(filename): | |
cascade_file="./lbpcascade_animeface.xml" | |
cascade = cv2.CascadeClassifier(cascade_file) | |
if cascade.empty(): |
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 | |
import sys | |
import os.path | |
import datetime | |
import numpy as np | |
import cv2 | |
def export(filename, output="output.m4v"): |
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 cv2 | |
import sys | |
import os.path | |
def detect(filename, cascade_file="./lbpcascade_animeface.xml"): | |
# ファイルがなければエラー | |
if not os.path.isfile(cascade_file): | |
raise RuntimeError("{}: not found".format(cascade_file)) | |
# カスケードのロード |
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 compilir; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.*; | |
public class Calculator { | |
// 変数の名前と値の組を格納する HashMap (値は整数限定) | |
private HashMap<String, Double> symbolMap; |
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 javazoom.jlgui.basicplayer.BasicPlayer; | |
import javazoom.jlgui.basicplayer.BasicPlayerException; | |
import javax.swing.*; | |
import java.awt.*; | |
import java.awt.event.ActionEvent; | |
import java.io.File; | |
public class SamplePlayer extends JPanel { | |
BasicPlayer player; |
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
" ツリー型タブの自動開閉 {{{ | |
js <<EOM | |
var timer=false; | |
window.addEventListener('resize',function () { | |
if(timer !== false) { | |
clearTimeout(timer); | |
} | |
timer = setTimeout(function() { | |
if(window.outerWidth < 700) { | |
if(TreeStyleTabService.isAutoHide == 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
@font-face { | |
font-family: "MS Pゴシック"; | |
src: local(""); | |
} | |
@font-face { | |
font-family: "MS PGothic"; | |
src: local(""); | |
} |
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
// ==UserScript== | |
// @name selector_fi | |
// @namespace https://twitter.com/akameco | |
// @include http://www.cue.im.dendai.ac.jp/* | |
// @include https://www.mlab.im.dendai.ac.jp/* | |
// @include http://www.mlab.im.dendai.ac.jp/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
(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
# coding: utf-8 | |
fizz = -> (n) { n % 3 == 0 } | |
buzz = -> (n) { n % 5 == 0 } | |
fizzbuzz = -> (n) { fizz.call(n) and buzz.call(n) } | |
(1..30).each do |v| | |
case v | |
when fizzbuzz | |
puts "fizzbuzz" |