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
test |
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
CREATE TABLE IF NOT EXISTS `user_cards` ( | |
`id` int(11) NOT NULL COMMENT 'ID', | |
`user_id` int(11) NOT NULL COMMENT 'ユーザーID', | |
`card_id` int(11) NOT NULL COMMENT 'カードID', | |
`created_at` datetime NOT NULL COMMENT '作成日時', | |
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日時', | |
PRIMARY KEY (`id`), | |
UNIQUE KEY `unique_key` (`user_id`,`card_id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='ユーザーが保持してるカード一覧'; |
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 | |
/** | |
* オブジェクト指向ではないプログラム | |
*/ | |
echo 'オブジェクト指向ではないプログラム'. PHP_EOL; | |
echo rand(10, 100) > 90 ? '当たり' : 'ハズレ'; echo PHP_EOL; | |
echo rand(10, 100) > 90 ? '当たり' : 'ハズレ'; echo PHP_EOL; | |
echo rand(10, 100) > 90 ? '当たり' : 'ハズレ'; echo PHP_EOL; | |
echo rand(10, 100) > 90 ? '当たり' : 'ハズレ'; echo PHP_EOL; | |
echo rand(10, 100) > 90 ? '当たり' : 'ハズレ'; echo PHP_EOL; |
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 org.sisioh.dddbase.core.model.{Entity, Identifier} | |
import org.specs2.mutable.Specification | |
class EntitySpec extends Specification { | |
case class ManId(value: Long) | |
extends Identifier[Long] |
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
object OptionSample extends App { | |
def stringEmptyToNone(code: Option[String]): Option[String] = { | |
code match { | |
case Some(s: String) => { | |
s.nonEmpty match { | |
case true => Some(s) | |
case _ => None | |
} |
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.example.collection | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.duration.Duration | |
import scala.concurrent.{Await, Future} | |
/** | |
* Queueサンプル | |
*/ | |
object QueueSample extends App { |
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
CSV.open("/Users/a_nishiyama/Kokodayo.com/ruby_examples/data/sample_new.csv", 'w') do |write| | |
CSV.foreach("/Users/a_nishiyama/Kokodayo.com/ruby_examples/data/sample.csv") do |columns| | |
# columns.each {|header, field| field += "test";p field } | |
# columns.each { |head, field| columns[head] = "test" } | |
columns.unshift("hoge") # 行の先頭に追加 | |
columns[1] = "置換" # 行の置き換え | |
columns.push $. == 1 ? 'head' : 'hoge' # 行の先頭に追加 | |
write << columns | |
end |
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
def rotation(file_path, max_history) | |
if max_history.nil? | |
return | |
end | |
allow_filenames = 1.upto(max_history).to_a.map { |i| | |
date = Date.today.prev_day(i) | |
"#{file_path}.#{date.strftime('%Y%m%d')}" | |
} | |
allow_filenames.unshift(file_path) |
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
# frozen_string_literal: true | |
require 'yosenabe/config' | |
module Yosenabe | |
module Mixin | |
# 基本のconfigload用 | |
module MixinConfig |
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
$ npm outdated | |
Package Current Wanted Latest Location | |
truffle 4.1.3 4.1.5 4.1.5 study_solidity | |
zeppelin-solidity 1.7.0 1.8.0 1.8.0 study_solidity |
OlderNewer