I wrote Python code which shows Correlation between NASDAQ price, Corn and Gold(Corr=0.945). Corn and Gold are best mix I have found. https://gist.github.com/Kouhei-Takagi/a1a9b073f6cd6dacb7eb1ea871d8fd3c I changed some important parts. https://gist.github.com/Kouhei-Takagi/5becaf7c3a24d63ac9c56856e81297f2
2020/2/16. The Timer with Swift
I was suffering about how to use timer with swift…
import SwiftUI
struct ContentView: View {
@State var count = 0
func timerStart() {
_ = Timer.scheduledTimer(withTimeInterval: 1, repeats: true, block:{
timer in self.count += 1
})
}
var body: some View {
VStack{
Button(action:{self.timerStart()}) {
Text("Timer Start")
}
Text(String(count))
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Above code is very easy, but reaching to it, I was very suffered…
Xcode prints too much errors…
Comments
Post a Comment