\begin{align*} d &= 11 - \Biggl( \sum^{11}{n=1} P_n \times Q_n \Biggr) \bmod 11 \ & \text{ただし,$\Biggl( \sum^{11}{n=1} P_n \times Q_n \Biggr) \bmod 11 \leq 1$の場合は$d=0$} \ P_n &= \text{ 個人番号を構成する検査用数字以外の十一桁の番号の最下位の桁を1桁目としたときの$n$桁目の数字} \ Q_n &= \begin{cases}
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
require "join_detector_ext" | |
ActiveRecord::Relation.prepend JoinDetectorExt |
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 main | |
import ( | |
"context" | |
"fmt" | |
"reflect" | |
"sort" | |
"sync" | |
"time" | |
) |
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
{ | |
"dependencies": { | |
"axios": "^0.15.3", | |
"babel-polyfill": "^6.16.0", | |
"dexie": "^1.5.1", | |
"font-awesome": "^4.7.0", | |
"fuse.js": "^2.6.1", | |
"immutable": "^3.8.1", | |
"menubar": "^5.1.0", | |
"moment": "^2.16.0", |
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
app = angular.module 'MyApplication' | |
app.filter 'noHTML', -> | |
(text) -> text.replace(/</g, '<').replace(/>/g, '>').replace(/&/, '&') if text? | |
app.filter 'newlines', ($sce) -> | |
(text) -> $sce.trustAsHtml(if text? then text.replace(/\n/g, '<br />') else '') | |
app.controller 'testCtrl', ($scope) -> | |
$scope.iroha = 'いろはにほへと ちりぬるを\nわかよたれそ つねならむ\nうゐのおくやま けふこえて\nあさきゆめみし ゑひもせす' |
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
#include <iostream> | |
#include <string> | |
int main() | |
{ | |
const std::string id = "#3"; | |
std::cout << "id // => " << id << std::endl; | |
std::cout << "id[0] // => " << id[0] << std::endl; | |
std::cout << "id.c_str() // => " << id.c_str() << std::endl; | |
std::cout << "(id.c_str() + 1) // => " << (id.c_str() + 1) << std::endl; |
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
# 詰めると1行(68文字) | |
# s="";(print c=%w(ズン ドコ).sample;s+=c)until s[/(ズン){4}ド/];puts"キ・ヨ・シ!” | |
# きれいに書くとこんなかんじ | |
dic = %w(ズン ドコ) | |
msg = "" | |
# 「ズンドコが完成していない」間はループが回る |
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
{ | |
"src": { | |
"styles": { | |
"dir": "source/assets/styles", | |
"entries": [ | |
"style.scss" | |
], | |
"include-paths": [ | |
"node_modules/font-awesome/scss", | |
"node_modules/normalize.css" |
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
<div class="tab-pane" ng-show="active" ng-transclude> | |
</div> |
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
class MyNumberValidator | |
def validate(num) | |
# write your code here... | |
end | |
end |
NewerOlder