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
/** | |
* Copyright (c) 2014 pistatium | |
* | |
* This software is released under the MIT License. | |
* | |
* http://opensource.org/licenses/mit-license.php | |
*/ | |
import java.util.*; | |
import java.lang.Math; |
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 | |
from __future__ import absolute_import, division, print_function | |
import pickle | |
import functools | |
import redis | |
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 | |
import tornado.ioloop | |
import tornado.web | |
class MainHandler(tornado.web.RequestHandler): | |
def post(self): | |
print("Header---------") | |
print(self.request.headers) |
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
.box1 { | |
width: 100px; | |
height: 200px; | |
} | |
.box2 { | |
width: 300px; | |
height: 500px; | |
} | |
div { | |
position: relative; |
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 | |
$arr = array( | |
"first" => 1, | |
"second" => 2, | |
); | |
echo "\nBefore \n"; | |
print_r($arr); |
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
/* | |
データを手っ取り早くテーブルにして表示するための関数 | |
何を表示するかを定義したheaderと、 | |
配列形式で複数行のデータが入ったdataを渡すと | |
テーブルのHTMLを返す | |
*/ | |
var tableBuilder = function(header, data) { | |
var html = '<table class="table"><thead><tr>'; | |
for (var key in header) { | |
html += '<th id="label_' + key + '">' + header[key] + '</th>'; |
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
#!/usr/local/bin/python2.7 | |
import md5 | |
def hexTo64(hex): | |
result = [] | |
for i in range(8): | |
# 16 * 16 / 4 = 64 | |
tmp = int(hex[i * 2: i * 2 + 2],16) / 4 | |
if tmp < 26: | |
# A-Z |
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
package com.appspot.pistatium.tomorrow.service; | |
import java.util.Calendar; | |
import java.util.TimeZone; | |
import android.app.AlarmManager; | |
import android.app.PendingIntent; | |
import android.content.Context; | |
import android.content.Intent; |
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
import markdown | |
md = markdown.Markdown() | |
sample_makedown = ''' | |
An h1 header | |
============ | |
Paragraphs are separated by a blank line. |
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
<provider | |
android:name="com.activeandroid.content.ContentProvider" | |
android:authorities="APKのパッケージ名" /> |