Glide is the easiest way to create useful slide for all of your Gists.
- input key
<-
to go backward. - input key
->
to go forward.
import scala.scalajs.js | |
import scala.scalajs.js.Dynamic.{global, literal} | |
import js.annotation.JSExport | |
import scala.concurrent.{Promise, Future} | |
import scala.util.{Failure, Success} | |
import scala.scalajs.concurrent.JSExecutionContext.Implicits.runNow | |
@JSExport | |
object Main { | |
def defer:Future[Int] = { |
watchMomentumScrolling = ($el) -> $.Deferred (d) => | |
last = $el.scrollTop() | |
do watcher = => | |
setTimeout => | |
current = $el.scrollTop() | |
if last is current | |
d.resolve() | |
else | |
last = current | |
do watcher |
createCube = ([x, y, z], color = obelisk.ColorPattern.GRAY) -> | |
new obelisk.Cube( | |
new obelisk.CubeDimension(x, y, z) | |
new obelisk.CubeColor().getByHorizontalColor(color) | |
) | |
createBrick = ([x, y], color = obelisk.ColorPattern.GRAY) -> | |
new obelisk.Brick( | |
new obelisk.BrickDimension(x, y) | |
new obelisk.SideColor().getByInnerColor(color) | |
true |
db = new Momic.DB | |
name: 'app' | |
collections: | |
items: | |
itemType: String | |
name: String | |
value: Number | |
db.items.drop().then => | |
a = db.items.insert({ itemType: 'weapon', name: 'ひのきのぼう', value: 10}) |
Momic = {} | |
class Momic.Collection | |
constructor: (@key, {@schema, @hasInstance, @hasPersistence, @endpoint, @autoSave}) -> | |
@autoSave ?= true | |
@hasPersistence ?= true | |
@hasInstance ?= true | |
unless @hasPersistence or @hasPersistence | |
throw new Error('hasInstance or hasPersistence must be true') | |
@_count = 0 |
p = new Promise (d) -> | |
throw 'error' | |
d() |
uuid = -> ~~(Math.random() * 100000) | |
n = 1000000 | |
list = | |
for i in [1..n] | |
id: uuid | |
find = (list, fn) -> | |
for i in list | |
ret = fn(i) |
Component = require 'components/base/component' | |
Vue.component 'composition', module.exports = Component.extend | |
template: (require 'templates/composition/composition')() | |
created: -> | |
@$data.message = 'レシピを選んでください' | |
@$data.recipeIds = [ | |
'IronIngot' | |
] | |
computed: |