複数の名前空間に定義されるスキーマを別パッケージのオブジェクトとして生成したい。sbtで。
packageName in scalaxb in Compile := "api.model"
sourceGenerators in Compile <+= scalaxb in Compile
NSStringEncoding enc; | |
NSError* error = nil; | |
NSString* html = [NSString stringWithContentsOfURL:url | |
usedEncoding:&enc | |
error:&error]; | |
if (error){ | |
UIAlertView* alertView = [[[UIAlertView alloc] initWithTitle:@"Error" | |
message:[error localizedDescription] |
createuser -PdE crowd | |
createdb -E UNICODE crowddb |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.Future; | |
import java.util.concurrent.TimeUnit; | |
// ネタ元はこちら → http://d.hatena.ne.jp/language_and_engineering/20120205/p1 |
# 前提:クローンしたgitリポジトリに対してsvnリポジトリを設定して同期を行う。 | |
# 設定ファイルを編集のが手間。 | |
$ git clone ssh://localhsot/repos/app.git app | |
# .git/config にSVNのリポジトリの設定を追加する | |
[svn-remote "svn"] | |
url = http://junichi_kato@svn-server | |
fetch = project/app/trunk:refs/remotes/trunk | |
branches = project/app/branches/*:refs/remotes/* |
# 前提:git-svnでクローンしたリポジトリで外部のリモートリポジトリを指定して同期する方法 | |
# gitコマンドだけでsvnへ同期可能。 | |
# git-svnでsvnリポジトリをクローンする | |
$ git svn clone -s http://svn-server/app/ app | |
# 最初の1回だけ設定する | |
app$ git remote add central ssh://git-server/app/central.git | |
# SVNリポジトリの最新情報を取得する |
# 事前にgitにtagを作成しておきリモートリポジトリにpushする | |
central$ git tag v1.0.0 | |
central$ git push origin v1.0.0 | |
# 最新のgitリモートリポジトリを取得する | |
git-to-svn$ git remote update | |
# central/v1.0.0があることを確認 | |
git-to-svn$ git branch -a | |
remotes/central/v1.0.0 | |
# central/v1.0.0に切り替える |
.DS_Store | |
Thumnail.db | |
target/ | |
lib_managed/ | |
src_managed/ | |
project/boot/ |
class Respond extends Service[Request, Response] with Logger { | |
def apply(request: Request) = { | |
try { | |
request.method -> Path(request.path) match { | |
case GET -> Root / "todos" => Future.value { | |
val data = Todos.allAsJson | |
debug("data: %s" format data) | |
Responses.json(data, acceptsGzip(request)) | |
} | |
case GET -> Root / "todos" / id => Future.value { |
- XMLスキーマ | |
<?xml version="1.0" encoding="UTF-8"?> | |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> | |
<xs:element name="hoge"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element ref="fuga"/> | |
</xs:sequence> | |
</xs:complexType> | |
</xs:element> |