object | detail |
---|---|
chage date | 2018/5/12 |
version | fabic 2.0.0 |
os | ubuntu 18.04 |
python | 3.6.5 |
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
// @flow | |
import { MixpanelConsumer } from 'react-mixpanel' | |
import { fromRenderProps } from 'recompose' | |
const enhancer = fromRenderProps(MixpanelConsumer, (mixpanel) => ({ | |
mixpanel, | |
})) | |
export default enhancer |
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
// Template Tree | |
global.templateIDsByPath = global.templateIDsByPath || { | |
'404': undefined | |
} | |
// Get template for given path | |
const getComponentForPath = path => { | |
path = cleanPath(path) | |
return global.componentsByTemplateID[global.templateIDsByPath[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
PatternsSpec.scala | |
PoolSpec.scala | |
PipelineSpec.scala |
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
# #load "str.cma";; | |
# List.map int_of_string (Str.split (Str.regexp "[^0-9]+") "1234");; | |
- : int list = [1234] | |
# List.map int_of_string (Str.split (Str.regexp "") "1234");; | |
- : int list = [1; 2; 3; 4] |
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 akka.actor.IO._ | |
import akka.actor.{Props, IO, IOManager, Actor, ActorSystem} | |
import akka.event.Logging | |
import akka.util.ByteString | |
import java.net.InetSocketAddress | |
class TCPEchoServer(port: Int) extends Actor { | |
val log = Logging(context.system, this) | |
val state = IterateeRef.Map.async[IO.Handle]()(context.dispatcher) |
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
swagger: '2.0' | |
info: | |
version: v2 | |
title: YourName. API | |
host: yourname.nulab-inc.com | |
basePath: /api/v2 | |
schemes: | |
- https | |
produces: | |
- application/json |
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 me.masahito; | |
import java.io.*; | |
import java.nio.channels.FileChannel; | |
public class FileCopyMain { | |
private static void copyFileUsingStream(File source, File dest) throws IOException { | |
try( |
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 HelloWorld { | |
def main(args: Array[String]): Unit = { | |
println("Hello, world!") | |
} | |
} |
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 datetime | |
>>> from unittest import mock | |
>>> with mock.patch('__main__.datetime') as m: | |
... datetime.now() > datetime.now() | |
... | |
Traceback (most recent call last): | |
File "<stdin>", line 2, in <module> | |
TypeError: '>' not supported between instances of 'MagicMock' and 'MagicMock' |