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 hello; | |
import javax.sql.DataSource; | |
import jp.sf.amateras.mirage.SqlManager; | |
import jp.sf.amateras.mirage.SqlManagerImpl; | |
import jp.sf.amateras.mirage.dialect.HyperSQLDialect; | |
import jp.sf.amateras.mirage.integration.spring.SpringConnectionProvider; | |
import org.apache.commons.dbcp.BasicDataSource; |
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
/* | |
******************************************************************************** | |
Golang - Asterisk and Ampersand Cheatsheet | |
******************************************************************************** | |
Also available at: https://play.golang.org/p/lNpnS9j1ma | |
Allowed: | |
-------- | |
p := Person{"Steve", 28} stores the value |
elixir が結局速いのかそうでもないのか検証してみたいから、誰か isucon4 qual のアプリを elixir で。
— そのっつ (SEO Naotoshi) (@sonots) 2015, 9月 5
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
とかてきとうなことをつぶやいていたら、なんと @ma2ge さんが実装してくれました!
@sonots まずは動くところまで作ってみました。手元のマシンですが ruby との比較結果だけ README に載せています。benchmarker は通ったのですがバグなどあるかもしれません。 https://t.co/6WaI4LAbME
— taka (@ma2ge) 2015, 9月 7
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
この投稿では、iOSのファイルシステムについて理解し、データを永続化(iCloud含む)する方法を紹介する。尚、サンプルコードは動かない可能性もあるので参考程度にして下さい。
アプリがファイルシステムとやり取り出来る場所は、ほぼアプリのサンドボックス内のディレクトリに制限されている。新しいアプリがインストールされる際、インストーラーはサンドボックス内に複数のコンテナを作成し、図1に示す構成をとる。各コンテナには役割があり、Bundle Containerはアプリのバンドルを保持し、Data Containerはアプリとユーザ両方のデータを保持する。Data Containerは用途毎に、さらに複数のディレクトリに分けられる。アプリは、例えばiCloud Containerのように、実行時に追加のコンテナへのアクセスをリクエストすることもある。
図1. An iOS app operating within its own sandbox
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use IO::Socket; | |
my $socket = IO::Socket::INET->new( | |
PeerAddr => 'localhost', |
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 React from "react"; | |
import { createStore, Store } from "redux"; | |
import { Provider, connect } from "react-redux"; | |
import { render, fireEvent, cleanup } from "react-testing-library"; | |
// implements | |
type State = { count: number }; | |
function reducer(state = { count: 0 }, action: any) { |
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 ts, { factory } from "typescript"; | |
export function transformerFactory(context: ts.TransformationContext) { | |
function visitNode(node: ts.Node): ts.Node { | |
const newNode = ts.visitEachChild(node, visitNode, context); | |
if ( | |
ts.isJsxOpeningElement(newNode) || | |
ts.isJsxSelfClosingElement(newNode) | |
) { | |
return appendSourceMapAttribute(newNode.getSourceFile(), newNode); |
OlderNewer