オフラインリアルタイムどう書く という、 @Nabetani さん主催のイベントを模したものを ESM の社内向けに行ったものです。
出題者: @mtsmfm スペシャルサンクス: @mattsan
<interactive>:72:1: | |
No instance for (RealFrac a0) arising from a use of `split' | |
The type variable `a0' is ambiguous | |
Possible fix: add a type signature that fixes these type variable(s) | |
Note: there are several potential instances: | |
instance RealFrac Double -- Defined in `GHC.Float' | |
instance RealFrac Float -- Defined in `GHC.Float' | |
instance Integral a => RealFrac (GHC.Real.Ratio a) | |
-- Defined in `GHC.Real' | |
In the expression: split 10 10 |
valList :: Int -> Int -> [Int] | |
valList x n = map (n^) [numDigits, (numDigits-1)..0] | |
where numDigits = floor $ logBase (fromIntegral n) (fromIntegral x) | |
convert :: Int -> Int -> [Int] | |
convert x n | |
| x < n = [x] | |
| otherwise = map (snd) $ tail $ scanl (\acc y -> let z = floor $ fromIntegral(fst acc) / fromIntegral(y) in ((fst acc) `mod` y, z)) (x, 0) xs | |
where xs = valList x n |
{"name"=>"set_debug", "args"=>[true]} | |
{"response"=>true} | |
{"name"=>"visit", "args"=>["http://127.0.0.1:37796/users/new"]} | |
poltergeist [1398005093288] state default -> loading | |
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message. | |
poltergeist [1398005093702] state loading -> default | |
{"response"=>{"status"=>"success"}} | |
{"name"=>"find", "args"=>[:css, "body"]} | |
{"response"=>{"page_id"=>1, "ids"=>[0]}} | |
{"name"=>"visible", "args"=>[1, 0]} |
source 'https://rubygems.org' | |
gem 'capybara' | |
gem 'poltergeist', require: 'capybara/poltergeist' |
{ | |
"app/assets/javascripts/components/*.js.cjsx": { | |
"command": "jcomponent", | |
"template": "@{camelcase|capitalize|colons} = React.createClass\n render: ->" | |
}, | |
"app/assets/javascripts/actions/*.js.coffee": { | |
"command": "jaction", | |
"template": "class @{camelcase|capitalize|colons}" | |
}, | |
"app/assets/javascripts/constants/*.js.coffee": { |
require 'active_support' | |
require 'active_support/core_ext/object/to_query' | |
require 'active_support/core_ext/string/strip' | |
params = { | |
title: '問題を一言で', | |
labels: %w(bug), | |
body: <<-EOS.strip_heredoc | |
## 出す前に確認しよう |
CSON = require 'season' | |
ObjectAssign = require 'object-assign' | |
linuxCson = CSON.readFileSync('linux.cson') | |
darwinCson = CSON.readFileSync('darwin.cson') | |
obj = {} | |
for k1, v1 of linuxCson | |
obj[k1] = {} |
オフラインリアルタイムどう書く という、 @Nabetani さん主催のイベントを模したものを ESM の社内向けに行ったものです。
出題者: @mtsmfm スペシャルサンクス: @mattsan
source 'https://rubygems.org' | |
gem 'activesupport', require: 'active_support/all' | |
gem 'pry-byebug' |
source "https://rubygems.org" | |
gem 'pry' | |
gem 'activesupport', require: 'active_support/all' |