-
JSend - for API responses (with some adjustment)
https://github.com/omniti-labs/jsend -
Conventional commits - for writing commit messages
https://www.conventionalcommits.org/en/v1.0.0/
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
.header { | |
background-color: #f8f9fa; | |
padding: 50px 0; | |
} | |
@media (max-width: 767px) { | |
.header { | |
padding: 30px 0; | |
} | |
} |
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 | |
$monday = date("Y-m-d", strtotime('monday this week')); | |
$begin = new DateTime($monday); | |
$sunday = date("Y-m-d", strtotime('sunday this week')); | |
$end = new DateTime($sunday); | |
$end->modify('+1 day'); | |
$interval = DateInterval::createFromDateString('1 day'); |
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 | |
class Book { | |
private $author; | |
private $title; | |
function __construct($title, $author) { | |
$this->title = $title; | |
$this->author = $author; |
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 | |
$manager = EmployeeFactory::createManager("Imam"); | |
$staff = EmployeeFactory::createStaff("Sutono"); | |
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 | |
class Database { | |
// buat penampung objek | |
private static $instance = null; | |
public function __construct() { | |
// misalnya melakukan koneksi ke database | |
} |
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
const gaps = 101001000; | |
const gapsWithoutLeadingAndTrailingZero = String(gaps).replace(/^0+|0+$/g, ''); | |
let mostGapSplit = 0; | |
gapsWithoutLeadingAndTrailingZero.split('1').map(val => { | |
if (val.length > mostGapSplit) { | |
mostGapSplit = val.length; | |
} | |
}); |
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
document.getElementById('inputId').addEventListener('input', function(evt) { | |
this.value = this.value | |
.replace(/\./g, '') | |
.replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1.'); | |
}); |
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 java.util.Scanner; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class FamilyRestaurant { | |
private static final String S = "S"; | |
List<String[]> menuReguler = new ArrayList<String[]>(); | |
List<String[]> menuSpecial = new ArrayList<String[]>(); |
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 java.util.Scanner; | |
class CurrencyConverter { | |
public static void main(String[] args) { | |
int nilaiRupiah; | |
double nilaiValas, currencyValue = 0.00; | |
String namaValas, symbol = ""; | |
Scanner input = new Scanner(System.in); |
NewerOlder