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
* { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
font-size: 98%; | |
font-family: 'helvetica' | |
} | |
body { | |
margin: 1.0cm; |
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> | |
<title>Pilih Keahlian</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"></script> |
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
Table name: users Migration File: 2019_05_04_000000_create_users_table.php | |
<?php | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class CreateUsersTable extends Migration | |
{ |
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` |
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
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
(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
<?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
<?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 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]); | |
} |
OlderNewer