H2 Driverのver. 2.1.210ではなくver. 1.4.200を使う。
問題点 IntellijのDatabase toolを使ってh2にアクセスしようとすると以下のエラーが起こる。
[HY000][50000] General error: "The write format 1 is smaller than the supported format 2 [2.1.210/5]" [50000-210] The write format 1 is smaller than the supported format 2 [2.1.210/5]. ドライバーのバージョンを2.1.210から1.4.200に変更することにより解決。
DBMS: H2 (ver. 1.4.200 (2019-10-14)) Case sensitivity: plain=upper, delimited=exact Driver: H2 JDBC Driver (ver. 1.4.200 (2019-10-14), JDBC4.1) Ping: 9 ms
routingを追加する
Routing.kt fun Application.configureRouting() { routing { static("/static") { resources("files") } ... ハマった点 Creating an interactive websiteを進めていたら画像が表示されなかった。
<img src="/static/ktor_logo.png">でも<img src="/filse/ktor_logo.png">でも画像が表示されなくてどうしようかと思ったらサンプルコードの方にはルーティングが記載されてた。
Error Ktorのチュートリアルで新規プロジェクト作った時点でエラーが起きてた。
https://ktor.io/docs/creating-http-apis.html
e: Serialization.kt: (11, 5): Not enough information to infer type variable B e: Serialization.kt: (11, 13): Unresolved reference: ContentNegotiation 解決方法 下記が必要
import io.ktor.server.plugins.contentnegotiation.* plugins/Routing.kt package t.net.plugins import io.ktor.serialization.kotlinx.json.* import io.ktor.server.application.* import io.ktor.server.plugins.contentnegotiation.* import io.ktor.server.response.* import io.ktor.server.routing.* fun Application.configureSerialization() { install(ContentNegotiation) { json() } routing { get("/json/kotlinx-serialization") { call.respond(mapOf("hello" to "world")) } } }
Install librsvg
brew install librsvg and run command below.
rsvg-convert -f pdf -o input.pdf output.svg That’s it! 🎉
I tried to generate to Localize file in SwiftGen, but I spent an hour wondering how to specify multiple lproj files inSwiftGen.
But in the end, I just specified a single file as described in the documentation, and it worked fine for other languages.
swiftgen.yml input_dir: ${PROJECT_DIR}/${TARGET_NAME}/Resources/ output_dir: ${PROJECT_DIR}/${TARGET_NAME}/Generated/ strings: inputs: - en.lproj # There is also ja.lproj in the same directory. outputs: - templateName: structured-swift5 output: Strings+Generated.swift I have specified en....