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
number = ARGV[0] | |
tmp = nil | |
number.to_s.each_char do |i| | |
tmp = i unless tmp | |
if i == tmp | |
tmp = i | |
else | |
puts "Not Zorome!" |
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...100).each do |i| | |
if i % 3 == 0 | |
print "Fizz" | |
flag = true | |
end | |
if i % 5 == 0 | |
print "Buzz" | |
flag = true | |
end | |
unless flag |
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/bin/env python | |
import requests | |
import os | |
from jinja2 import Environment,FileSystemLoader | |
sites = [] | |
dirs = os.listdir('/home') | |
for dir in dirs: |
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
/** | |
* Created by Kota Nonaka on 2016/06/03. | |
*/ | |
public class GabaGabaCalc { | |
public static int gcd(int a, int b){ | |
int r; | |
while(true){ | |
r = a % b; | |
if(r == 0){ | |
break; |
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 random | |
import sys | |
baseText = '今日の亀田' | |
isSuccess = False #文字列がそろったときにTrueになる | |
count = 0 #試行回数をカウントする変数 | |
recentChars = [] #直近の文字を入れておく(?)配列。len(baseText)個だけ保持する。 | |
print('試行を開始します') |
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
let fb | |
if(fb = (n) => {console.log(n % 3 == 0 ? 'fizz' : n % 5 == 0 ? 'buzz' : n % 3 == 0 && n % 5 == 0 ? 'fizzbuzz' : n)}) { | |
Array.apply(null, Array(100)).map((n,v) => {fb(v)}) | |
} |
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 datetime import date | |
fromDate = date(2017,5,15) | |
toDate = date(2017,11,15) | |
print(toDate - fromDate) |
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 datetime import date | |
fromDate = date(2017,5,15) | |
toDate = date(2017,11,15) | |
print(toDate - fromDate) |
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
$(() => { | |
$('#comment-area button').click(() => { | |
$.post('api/comment', {comment: $('#comment').val()}) | |
.done(() => { | |
console.log('success!') | |
}) | |
}) | |
}) |
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 e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
exports.sayHello = () => { | |
console.log('Hello browserify!') | |
} | |
},{}],2:[function(require,module,exports){ | |
const hello = require('./hello.js') | |
hello.sayHello() |
OlderNewer