This file contains 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
package helper | |
func PanicIfError(err error) { | |
if err != nil { | |
panic(err) | |
} | |
} |
This file contains 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
/* Learn Donut */ | |
/* file: donut.c */ | |
/* compile: gcc donut.c -o donut.exe */ | |
/* out: 2024 */ | |
/* Refrense: | |
- https://www.youtube.com/watch?v=DEqXNfs_HhY | |
- https://www.a1k0n.net/2011/07/20/donut-math.html | |
- https://gist.github.com/gcr/1075131 | |
*/ |
This file contains 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 | |
namespace App\Helpers; | |
/** | |
* Format response. | |
*/ | |
class ResponseFormatter | |
{ | |
/** |
This file contains 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
/** | |
* TODO: | |
* 1. Buatlah fungsi bernama minimal dengan ketentuan berikut: | |
* - Menerima dua buah argumen number, a dan b. | |
* - Mengembalikan nilai terkecil antara a atau b. | |
* - Bila nilai keduanya sama, maka kembalikan dengan nilai a | |
* | |
* contoh: | |
* minimal(1, 4) // 1 | |
* minimal(3, 2) // 2 |
This file contains 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
/** | |
* TODO: | |
* 1. Buatlah variabel currency yang merupakan Map dengan kriteria: | |
* - key "USD", value 14000 | |
* - key "JPY", value 131 | |
* - key "SGD", value 11000 | |
* - key "MYR", value 3500 | |
* 2. Buatlah variabel priceInIDR yang bernilai dari hasil perkalian: | |
* - priceInJPY dengan nilai currency JPY | |
*/ |
This file contains 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
/** | |
* TODO | |
* 1. Buatlah variabel dengan nama restaurant yang object dengan ketentuan berikut: | |
* - Memiliki properti bernama "name" | |
* - Bertipe data string | |
* - Bernilai apa pun, asalkan tidak string kosong atau null. | |
* - Memiliki properti bernama "city" | |
* - Bertipe data string | |
* - Bernilai apa pun, asalkan tidak string kosong atau null. | |
* - Memiliki properti "favorite drink" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.