This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def detail_indonesia(): | |
print('*** DETAIL COVID-19 INDONESIA') | |
url = "https://api.kawalcorona.com/indonesia/provinsi/" | |
data = requests.get(url).text | |
obj = json.loads(data) | |
pTable = PrettyTable() | |
pTable.field_names = ['No.', 'Propinsi', 'Positif', 'Sembuh', 'Meninggal'] | |
# Mengatur posisi text r=right, l=left, c=center | |
pTable.align['No'] = 'r' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def total_dunia(): | |
print('*** TOTAL COVID-19 DUNIA') | |
print('----------------------------------------') | |
url = "https://api.kawalcorona.com/positif/" | |
data = requests.get(url).text | |
confirmed = json.loads(data) | |
print(f'Confirmed : {confirmed["value"]}') | |
url = "https://api.kawalcorona.com/sembuh/" | |
data = requests.get(url).text | |
recovered = json.loads(data) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def detail_dunia(): | |
print('*** DETAIL COVID-19 DUNIA') | |
url = "https://api.kawalcorona.com/" | |
data = requests.get(url).text | |
obj = json.loads(data) | |
pTable = PrettyTable() | |
pTable.field_names = ['No.', 'Country/Region', 'Confirmed', 'Recovered', 'Deaths', 'Active'] | |
# Mengatur posisi text r=right, l=left, c=center | |
pTable.align['No'] = 'r' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import requests | |
from prettytable import PrettyTable | |
import json | |
def total_indonesia(): | |
url = "https://api.kawalcorona.com/indonesia/" | |
data = requests.get(url).text | |
obj = json.loads(data) | |
#print(data) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import './bootstrap' | |
import Vue from 'vue' | |
import App from './components/ExampleComponent.vue' | |
const vm = new Vue({ | |
el: '#app', | |
render: h => h(App) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Laravel + Vuejs</title> | |
<link rel="stylesheet" href="{{ mix('css/app.css') }}"> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Support\Facades\Route; | |
Route::get('/(any}', function () { | |
return view('layouts.vue'); | |
})->where('any', '.*'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import VueRouter from 'vue-router' | |
import Home from './views/Home.vue' | |
import About from './views/About.vue' | |
import Contact from './views/Contact.vue' | |
Vue.use(VueRouter) | |
const router = new VueRouter({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import './bootstrap' | |
import Vue from 'vue' | |
import router from './router' | |
import App from './layouts/App.vue' | |
new Vue({ | |
router, | |
el: '#app', | |
render: h => h(App) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<!-- navbar --> | |
<nav class="navbar navbar-expand-sm navbar-light bg-white shadow-sm"> | |
<a href="#" @click.prevent="" class="navbar-brand">Lara7vuejs</a> | |
<div class="collapse navbar-collapse" id="navbarSupportedContent"> | |
<ul class="navbar-nav"> | |
<li class="nav-item"> | |
<router-link class="nav-link" :to="{ name:'home' }"> | |
Home |