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 | |
$first_crypt = "AB"; | |
$second_crypt = "AB"; | |
$result_crypt = "BCC"; | |
function calc($first_crypt, $second_crypt, $result_crypt, $operator = 'add') { | |
$crypt_input = str_split($first_crypt . $second_crypt . $result_crypt); | |
$merge_input = array_unique($crypt_input); | |
sort($merge_input); |
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
/*-------------------------------------------------------------------- | |
Moch Diki Widianto - PT BUMI LANCANG KUNING PUSAKA | |
Soal | |
Cari kemungkinan banyaknya pola yang dapat ditemukan | |
dari pattern "ABCD" | |
Contoh: | |
"ABCDASABCDSA" | |
index 0 "ABCD" |
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 | |
$datas = [ | |
['id'=> 1, 'parent_id' => 0, 'type' => 'HEADER', 'sequence_no' => 1], | |
['id'=> 2, 'parent_id' => 1, 'type' => 'OTHER', 'sequence_no' => 2], | |
['id'=> 3, 'parent_id' => 1, 'type' => 'OTHER', 'sequence_no' => 3], | |
['id'=> 4, 'parent_id' => 0, 'type' => 'HEADER', 'sequence_no' => 4], | |
['id'=> 5, 'parent_id' => 4, 'type' => 'OTHER', 'sequence_no' => 5], | |
['id'=> 6, 'parent_id' => 4, 'type' => 'OTHER', 'sequence_no' => 6], | |
['id'=> 7, 'parent_id' => 0, 'type' => 'HEADER', 'sequence_no' => 7], |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Bootstrap CSS --> | |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous"/> |
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
#sudo wget https://github.com/shiftkey/desktop/releases/download/release-2.1.0-linux1/GitHubDesktop-linux-2.1.0-linux1.deb | |
#sudo gdebi GitHubDesktop-linux-2.1.0-linux1.deb | |
# UPDATE (2021-03-05): Thanks to PaoloRanzi81's comment, the updated code is as follows https://gist.github.com/PaoloRanzi81 | |
sudo wget https://github.com/shiftkey/desktop/releases/download/release-2.6.3-linux1/GitHubDesktop-linux-2.6.3-linux1.deb | |
### Uncomment below line if you have not installed gdebi-core before | |
# sudo apt-get install gdebi-core | |
sudo gdebi GitHubDesktop-linux-2.6.3-linux1.deb |
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 | |
// init | |
$flow = [ | |
'pertama' => 'Bismillah dan Perencanaan', | |
'kedua' => 'Lamaran', | |
'ketiga' => 'Akad dan Resepsi' | |
]; | |
$status = "Lajang"; | |
$days = 365; | |
$plan = true; |
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 | |
/* ------------------------------------------------------------------------- | |
Penjelasan sintaks: Digunakan untuk grouping array key "serial_no" sekaligus | |
mengakumulasi array key "qty" dengan "serial_no" yang sama. | |
---------------------------------------------------------------------------*/ | |
$array = [ | |
['serial_no' => '009-AZ', 'name' => 'BSI COIL Z009 1000-PCE', 'qty' => 91], | |
['serial_no' => '009-AZ', 'name' => 'BSI COIL Z009 1000-PCE', 'qty' => 20], | |
['serial_no' => '009-AZ', 'name' => 'BSI COIL Z009 1000-PCE', 'qty' => 102], | |
['serial_no' => '049-BZ', 'name' => 'GEM COIL Z100 0900-CSE', 'qty' => 91], |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Membuat Form</title> | |
</head> | |
<body> | |
<form action="#" method="POST"> | |
<p>Username:</p> |
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 | |
$ip = "localhost"; | |
$username = "pma"; // default xampp "root" | |
$password = "admin123"; // default xampp "" | |
$database = "belajar"; | |
$conn = new mysqli($ip,$username,$password,$database); | |
if ($conn->connect_errno) { | |
echo "Failed to connect to MySQL: " . $conn->connect_error; | |
exit(); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Tabel</title> | |
</head> | |
<body> | |
<table border="1" style="width: 100%;"> | |
<thead> |
NewerOlder