This file contains hidden or 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
| { | |
| "description": "シフトキーを単体で押したときに、英数・かなキーを送信する。(左シフトキーは英数、右シフトキーはかな)", | |
| "manipulators": [ | |
| { | |
| "from": { | |
| "key_code": "left_shift", | |
| "modifiers": { | |
| "optional": [ | |
| "any" | |
| ] |
This file contains hidden or 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
| const showHtml = (html: Html) => console.log(`${html}`); | |
| const html = Html("tagged html sample"); | |
| showHtml(html); // tagged html sample | |
| const css = Css("tagged css sample"); | |
| showHtml(css); | |
| /* | |
| error TS2345: Argument of type 'TaggedString<"css">' is not assignable to parameter of type 'TaggedString<"html">'. | |
| Types of property 'type' are incompatible. |
This file contains hidden or 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
| # http://scalameta.org/scalafmt/#Configuration | |
| align { | |
| openParenCallSite = false | |
| openParenDefnSite = false | |
| } | |
| align = false | |
| assumeStandardLibraryStripMargin = true |
This file contains hidden or 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 controllers | |
| import play.api.mvc.{ActionBuilder, AnyContent, BaseController, BodyParser, Request, Result} | |
| import scala.concurrent.{ExecutionContext, Future} | |
| case class CustomRequest[A](underlying: Request[A]) { | |
| def body: A = underlying.body | |
| } |
This file contains hidden or 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
| "gitlens.blame.line.enabled": false, | |
| "gitlens.codeLens.enabled": false |
This file contains hidden or 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 React from 'react'; | |
| import { connect } from 'react-redux'; | |
| import { counterButton } from './counterButton'; | |
| const SamplePageView = props => { | |
| const button = props.counterButton(); | |
| return ( | |
| <div className='react-sample-area'> | |
| <button type='button' onClick={button.onClick}> | |
| {button.label} |
This file contains hidden or 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
| export class Animator { | |
| constructor() { | |
| this._current = 0; | |
| this._running = false; | |
| this._interval = 200;// [msec] | |
| } | |
| run({ from, to, onTick, onFinish }) { | |
| if (this._running) { | |
| this._cancelAnimation(); | |
| } |
This file contains hidden or 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 continuation | |
| import close.Closer | |
| object Close { | |
| def apply0[A: Closer](res: => A): Continuation0[A] = | |
| Continuation0 { f => | |
| val target = res | |
| try f(target) |
This file contains hidden or 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
| const onUnknown = key => new Proxy({}, { | |
| get(target, name) { | |
| switch (name) { | |
| case 'or': | |
| Console.debug(`unknown key [${key}]`); | |
| return initial => initial; | |
| default: | |
| return onUnknown(key); | |
| } | |
| }, |
This file contains hidden or 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 Sample { | |
| def main(args: Array[String]): Unit = { | |
| val x = Seq( | |
| Seq("F", "F", "M", "M", "M") map ("SEX" -> _), | |
| Seq(158, 162, 177, 173, 166) map ("HEIGHT" -> _), | |
| Seq(51D, 55D, 72D, 57D, 64D) map ("WEIGHT" -> _) | |
| ).transpose |