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
drawikr7 = function(x, y, size,flag){ | |
// hook draw function | |
if(Math.round(x)==0 && flag==null) { | |
var n = 1; | |
(function animate(){ | |
ctx.save(); | |
for(var r=0; r<360; r++){ | |
var x = Math.cos(r*3.14/180 * n) * r/2 + w/2; | |
var y = Math.sin(r*3.14/180 * n) * r/2 + h/2; | |
drawikr7(x,y,size,true); |
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(){ | |
function exec($){ | |
$("head").append("<style>.ui-sortable-placeholder{display: block;}</style>") | |
$.getScript("//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js") | |
.then(function(){ | |
$(".compact-items").sortable(); | |
}); | |
} |
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(){ | |
var urlRegExp = [/.+/, /.+/]; | |
var outputs = []; | |
var ifrm = $("<iframe>").appendTo($("body")); | |
var lists = $("a").filter(function(i){ | |
return | |
$(this).attr("target") == "_blank" && | |
$(this).attr("href").match(urlRegExp[0]); | |
}); | |
var index = 0, max = lists.length; |
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 UrlEncodeAll(s) { | |
return s.split("").map(function(v){ return "%" + v.charCodeAt(0).toString(16); }).join(""); | |
} |
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 jQuery_load(){ | |
var head = document.getElementsByTagName("head")[0]; | |
var sc = document.createElement("script"); | |
sc.src = "//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"; | |
head.appendChild(sc); | |
sc.onload = function(){ | |
jQuery.noConflict(); | |
window.$jQ = jQuery; | |
}; | |
})(); |
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 inversefb(data) { | |
var _base = "1211213", base = ""; | |
var _value = [3,5,6,9,10,12,15], value = []; | |
data = data.map(function(v){ return v == "Fizz" ? "1" : v == "Buzz" ? "2" : "3"}).join(""); | |
while(data.length > base.length) { | |
base += _base; | |
value = value.concat(_value); | |
} |
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 GomibacoEncode = (function() { | |
var translateTable = "ごみばこ".split(""); | |
return { | |
Encode : function(str) { | |
return str.split("").map(function(cur){ | |
var enc = cur.charCodeAt(0).toString(translateTable.length); | |
for(var i = enc.length; i < translateTable.length; i++) { | |
enc = "0" + enc; | |
} | |
translateTable.forEach(function(translateWord, idx){ |
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
// | |
// calcHTMLColor("#00FFAA + #112233"); | |
// calcHTMLColor("#00FFAA - #445566"); | |
// | |
function calcHTMLColor(expression) { | |
var replacer = [ | |
{ | |
regexp: /\#([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})/g, | |
callback: function(str, r, g, b) { | |
return "rgb(" + [r,g,b].map(function(n){ return parseInt(n, 16); }).join(",") + ")"; |
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 | |
if (isset($_POST['audio'])) { | |
try { | |
$postData = str_replace('data:audio/wav;base64,', '', $_POST['audio']); | |
$credentials = 'test:test'; | |
$ch = curl_init(); | |
curl_setopt_array($ch, [ |
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 | |
# In[14]: | |
get_ipython().magic(u'matplotlib inline') | |
from PIL import Image | |
import os | |
import sys | |
from matplotlib import pyplot as plt |