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
<p>test</p> |
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 clsName = "bnr_nenga"; | |
var div = document.getElementsByClassName(clsName); | |
var a = div[0].getElementsByTagName("a") | |
var url = a[0].href; | |
// parse | |
var params = url.split("?"); | |
// さらに & でわける... |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<title>おせろ</title> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<style> |
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 | |
// 利用する文字 | |
$nums = array( | |
2, 3, 5, 6, 7, 8, 9 | |
); | |
$perm = pc_permute($nums); | |
foreach($perm as $clue) { | |
list($spade, $heart, $diamond, $club, $x, $y, $z) = $clue; | |
if (solve($spade, $heart, $diamond, $club, $x, $y, $z) !== false) { |
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
from django.db import models | |
# Create your models here. | |
class Order(models.Model): | |
#id = models.CharField(max_length=10) | |
num = models.CharField(max_length=10) | |
purchase_method_code = models.CharField(max_length=10) | |
input_staff_id = models.CharField(max_length=10) | |
member_id = models.CharField(max_length=10) | |
store_id = models.CharField(max_length=10) |
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 | |
error_reporting(E_ALL); | |
while($line=fgets(STDIN)) | |
{ | |
echo trim(solve($line)) . "\n"; | |
} | |
function solve($str) { | |
for ($i = 0; $i < 26; $i++) { |
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 padZero(v) { | |
return v < 10 ? "0" + new String(v) : new String(v); | |
} | |
function getBars(str) { | |
var result = 0; | |
var bars = {0: 6, 1: 2, 2: 5, 3: 5, 4: 4, 5: 5, 6: 6, 7: 4, 8: 7, 9: 6}; | |
for (var i=0; i < str.length; i++) { | |
result += bars[str[i]]; | |
} | |
return result; |
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 Util_() { | |
/** | |
* mb_strwidth | |
* @param String | |
* @return int | |
* @see http://php.net/manual/ja/function.mb-strwidth.php | |
*/ | |
this.mb_strwidth = function(str){ | |
var i=0,l=str.length,c='',length=0; | |
for(;i<l;i++){ |
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 GoogleAnalytics_() { | |
this.apiBase = "https://www.googleapis.com/analytics/v3/data/ga"; | |
this.tokenUrl = "https://accounts.google.com/o/oauth2/token"; | |
/** | |
* 認証用のヘッダーを作る | |
*/ | |
this.buildAuthorizationHeader = function(token) { | |
headers = { | |
"Authorization" : "Bearer" + " " + token |
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
/** | |
* スプレッドシート内のデータからXMLデータを生成します | |
* 1行目にXMLのタグ名を入れると、それに応じてデータをXML化します | |
* XMLオブジェクトを使うことで、& -> & などの処理をAppsScript側に任せています | |
* | |
* 例) | |
* | |
* id | name | no | |
* 1 | miura | 18 | |
* 2 | blanco | 42 |