Setup
bin/kafka-topics.sh \
--zookeeper zookeeper.example.com:2181 \
--create \| new Vue({ | |
| el:'#app', | |
| data:{ | |
| kodepos : [],search : '', awal:0,akhir:10,halaman:1,tampil:true | |
| }, | |
| created(){ | |
| this.getData(); | |
| console.log(this.awal) | |
| }, | |
| methods:{ |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title>Modul PWA</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> | |
| <link rel="shortcut icon" href="icon/192.ico" type="image/x-icon" /> | |
| <link rel="icon" href="https://upload.wikimedia.org/wikipedia/commons/f/f2/Lambang_Kota_Semarang.png" sizes="32x32" /> |
| <?php | |
| $conn = mysqli_connect("localhost", "root", "", "test") or die(mysql_error()); | |
| function check_len($arr, $index, $key){ | |
| if(array_key_exists($index, $arr)){ | |
| return $arr[$index][$key]; | |
| } | |
| return ""; | |
| } |
| key:"string value" | |
| int_key:22 |
| # Author : Fanny Hasbi | |
| # Web : fannyhasbi.id | |
| # Reference : https://medium.com/rahasak/kafka-and-zookeeper-with-docker-65cff2c2c34f#d972 | |
| # Run Zookeper | |
| docker run -d \ | |
| --name zookeeper \ | |
| -p 2181:2181 \ | |
| jplock/zookeeper |
| /* | |
| * Handling Errors using async/await | |
| * Has to be used inside an async function | |
| */ | |
| try { | |
| const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
| // Success 🎉 | |
| console.log(response); | |
| } catch (error) { | |
| // Error 😨 |
| #!/bin/bash | |
| check_wired_network() { | |
| networkServices=$(networksetup -listallnetworkservices | tail -n +2) | |
| while IFS= read -r service; do | |
| if [[ "$service" == \** ]]; then | |
| continue | |
| fi |