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
marshall@LAPTOP-EVQ4LJKC:~/bjb/bjb-dev-local$ cat docker-compose.yaml | |
version: '2.2' | |
services: | |
bjbmq: | |
image: registry.bankbjb.co.id/ace-mq:11.0.0.9 | |
environment: | |
- LICENSE=accept | |
- ACE_SERVER_NAME=BJB | |
- USE_QMGR=true | |
- MQ_QMGR_NAME=BJB.QM |
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 | |
function DrawAngka($angka) { | |
for ($i = 0; $i < ($angka / 3); $i++) { | |
echo $i+1 . " "; | |
echo $i+5 . " "; | |
echo $i+9 . "<br>"; | |
} | |
} |
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 | |
function Maksimal($arr) { | |
for ($i = 0; $i < (count($arr) - 1); $i++) { | |
$cursor = 0; | |
if($arr[$cursor] > $arr[$i+1]) { | |
$cursor = $i; | |
return $arr[$cursor]; | |
} | |
} | |
} |
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 | |
function bubble_sort($arr) { | |
$size = count($arr)-1; | |
for ($i=0; $i<$size; $i++) { | |
for ($j=0; $j<$size-$i; $j++) { | |
$k = $j+1; | |
if ($arr[$k] < $arr[$j]) { | |
list($arr[$j], $arr[$k]) = array($arr[$k], $arr[$j]); | |
} |
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 | |
function cetak($max) { | |
$bucket = []; | |
for($i = 0; $i < $max; $i++) { | |
array_push($bucket,($i + 1)); | |
for ($j = 0; $j < count($bucket); $j++) { | |
echo $bucket[$j] . " "; | |
} | |
echo "<br>"; |
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 | |
function isPrime($number) | |
{ | |
return ( $number%2 == 0) ? 'bilangan prima' : 'bukan bilangan prima'; | |
} | |
$angka = 21; |
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
(function euler008() { | |
var digit = '73167176531330624919225119674426574742355349194934' + | |
'96983520312774506326239578318016984801869478851843' + | |
'85861560789112949495459501737958331952853208805511' + | |
'12540698747158523863050715693290963295227443043557' + | |
'66896648950445244523161731856403098711121722383113' + | |
'62229893423380308135336276614282806444486645238749' + | |
'30358907296290491560440772390713810515859307960866' + | |
'70172427121883998797908792274921901699720888093776' + | |
'65727333001053367881220235421809751254540594752243' + |
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
function recur(digits, i, n, str) { | |
if (i == n && typeof(str) != 'undefined') { | |
//console.log(str) | |
return; | |
} | |
var alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
var sum = 0; |
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 | |
$string = 'ABDCKDHJABDCBDAUOQJDBADCLDLCHBCBABCBAABCDAJDBABDCABDABDBCADBCASSJGABCDAUTACBDBQWUDNCDBCADKDHABDJGBDABCBDBADCACADBADBCBAD'; | |
$pattern = 'ABCD'; | |
$total_match = 0; | |
function is_anagram($a, $b) { | |
return(count_chars($a, 1) == count_chars($b, 1)); | |
} | |
//var_dump(is_anagram('ab','ba')); | |
for($i=0; $i< strlen($string); $i++) { |
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
select b.email, b.username, b.password, a.`tbl_groups_id` as role | |
from group_user as a | |
join users as b on a.`tbl_users_id` = b.`id` | |
join groups as c on a.`tbl_groups_id` = c.`id` |
NewerOlder