Skip to content

Instantly share code, notes, and snippets.

View donchan922's full-sized avatar
🐶
I'm fine.

donchan922 donchan922

🐶
I'm fine.
View GitHub Profile
<build>
<testResources>
<testResource>
<directory>src/test/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
<plugins>
myproject/
├── pom.xml
└── src
└── test
└── java
├── examples
│ ├── ExamplesTest.java # 全シナリオのテスト実行クラス
│ └── users
│ ├── UsersRunner.java # シナリオごとのテスト実行クラス
│ └── users.feature # テストシナリオ
$ mvn archetype:generate \
-DarchetypeGroupId=com.intuit.karate \
-DarchetypeArtifactId=karate-archetype \
-DarchetypeVersion=0.9.5 \
-DgroupId=com.mycompany \
-DartifactId=myproject
- Java 11.0.2
- Maven 3.6.3
- macOS Catalina 10.15.4
$ touch ~/.bash_sessions_disable
$ history
1 cd Documents/
2 ls
3 history
# ターミナル終了→ターミナル起動
# コマンド履歴が消えている。。
$ history
1 history
struct ContentView: View {
@Environment(\.managedObjectContext) var context
@State private var isShowingModal = false
var body: some View {
Button(action: {
self.isShowingModal.toggle()
}) {
Text("go to SubView")
}.sheet(isPresented: $isShowingModal) {
Fatal error: Unresolved error Error Domain=Foundation._GenericObjCError Code=0 "(null)", [:]: file /Users/donchan922/Documents/swiftui-demo/swiftui-demo/ContentView.swift, line 50
2020-05-10 15:53:53.524880+0900 swiftui-demo[27664:1128900] Fatal error: Unresolved error Error Domain=Foundation._GenericObjCError Code=0 "(null)", [:]: file /Users/donchan922/Documents/swiftui-demo/swiftui-demo/ContentView.swift, line 50
(lldb)
@donchan922
donchan922 / ContentView.swift
Last active July 14, 2020 12:57
SwiftUIのタイマーアプリのサンプル。バックグラウンド再生対応で、タイマー完了時に通知する
import SwiftUI
import UserNotifications
struct TimerView: View {
@State var start = false
@State var to: CGFloat = 0
@State var count = 0
@State var time = Timer.publish(every: 1, on: .main, in: .common).autoconnect()
var body: some View {