Skip to content

Instantly share code, notes, and snippets.

View swdevbali's full-sized avatar
:octocat:
Bringing back my golden era of programming! Wohoo!

Eko Suprapto Wibowo swdevbali

:octocat:
Bringing back my golden era of programming! Wohoo!
View GitHub Profile
Warganegara Jumlah Emas
Joni 10gr
Agus 20gr
Siti 20gr
Sur 1gr
// Command
$ solana-keygen pubkey
// Return
<PUBKEY>
// Conditional statement
// https://docs.swift.org/swift-book/LanguageGuide/ControlFlow.html
if tomato.name.contains("Swift") {
print("Good for you!")
}else{
print("That's fine. You can use Flutter or ReactNative too. It even cross platfrom solution!")
}
// Loop
let languages = ["Python", "Golang", "Swift", "Java"]
//class version
class TomatoClass {
var name: String
var state: Bool // true=active, false=pause
var start_time: Date
var finish_time: Date?
var elapsed_time: TimeInterval?
init(name: String, state: Bool, start_time: Date){
"""
This project will get the latest information about earthquake from bmkg.go.id
"""
import requests
from bs4 import BeautifulSoup
author = 'Eko SW'
date = '1 November 2022'
url = 'https://www.bmkg.go.id/'
"""
This project will get the latest information about earthquake from bmkg.go.id
"""
from bs4 import BeautifulSoup
author = 'Eko SW'
date = '1 November 2022'
url = 'https://www.bmkg.go.id/'
import requests
"""
This project will get the latest information about earthquake from bmkg.go.id
"""
author = 'Eko SW'
date = '1 November 2022'
url = 'https://www.bmkg.go.id/'
import requests
result = requests.get(url)
print(result.status_code)
beautifulsoup4==4.10.0
certifi==2021.10.8
charset-normalizer==2.0.7
idna==3.3
requests==2.26.0
soupsieve==2.2.1
urllib3==1.26.7
struct Tomato {
var name: String
var state: Bool // true=active, false=pause
var start_time: Date
var finish_time: Date
var elapsed_time: TimeInterval
mutating func toggle() {
state = !state
}
var current_time = String(DateFormatter.localizedString(
from: Date(),
dateStyle: .none,
timeStyle: .medium))
current_time = current_time.replacingOccurrences(of: ".", with: ":")
// change into function
func getCurrentTime()->String{
var start_time = String(DateFormatter.localizedString(
from: Date(),