Check Digit of MyNumber
How to calculate the check digit of mynumber
\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
module.exports = (grunt) -> | |
require('load-grunt-tasks')(grunt) | |
grunt.initConfig | |
coffee: | |
compile: | |
files: [ | |
expand: true | |
cwd: 'src/coffeescripts' | |
src: ['**/*.coffee'] |
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あさきゆめみし ゑひもせす' |
<div class="tab-pane" ng-show="active" ng-transclude> | |
</div> |
app = angular.module 'MyApplication' | |
CLS_HOVER_DEFAULT = "hover" | |
CLS_ACTIVE_DEFAULT = "active" | |
app.directive 'clsHover', -> | |
restrict: 'A' | |
link: (scope, element, attrs, ctrl) -> | |
clsHover = attrs.clsHover || CLS_HOVER_DEFAULT |
package ${PACKAGE_NAME}; | |
import android.app.Activity; | |
import android.os.Bundle; | |
#parse("File Header.java") | |
public class ${NAME} extends Activity { | |
public static final String TAG = ${NAME}.class.getSimpleName(); | |
public void onCreate(Bundle savedInstanceState) { |
# app/models/concerns/multiparameter_attribute_assignment.rb | |
module MultiparameterAttributeAssignment | |
include ActiveModel::ForbiddenAttributesProtection | |
def initialize(params = {}) | |
assign_attributes(params) | |
end | |
def assign_attributes(new_attributes) |
class MyNumberValidator | |
def validate(num) | |
# write your code here... | |
end | |
end |
\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
{ | |
"src": { | |
"styles": { | |
"dir": "source/assets/styles", | |
"entries": [ | |
"style.scss" | |
], | |
"include-paths": [ | |
"node_modules/font-awesome/scss", | |
"node_modules/normalize.css" |
# 詰めると1行(68文字) | |
# s="";(print c=%w(ズン ドコ).sample;s+=c)until s[/(ズン){4}ド/];puts"キ・ヨ・シ!” | |
# きれいに書くとこんなかんじ | |
dic = %w(ズン ドコ) | |
msg = "" | |
# 「ズンドコが完成していない」間はループが回る |