const benda = {
a: function() {
this.v_a = 1;
let x = {
count_va: () =>{ // notice here, we're using () => {...}
return this.v_a;
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
/* | |
Hardian.js | |
Memudahkan kami untuk mestruktur template. | |
*/ | |
var nav = { | |
pengaturan: { | |
waktuTransisi: 500 | |
}, | |
init: function(){ | |
var aku = this; |
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> | |
<head> | |
<script src="https://code.jquery.com/jquery-2.2.3.min.js" type="text/javascript"/></script> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery-slimScroll/1.3.7/jquery.slimscroll.js" type="text/javascript"></script> | |
<title>Tes~</title> | |
</head> |
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> | |
<head> | |
<script src="https://code.jquery.com/jquery-2.2.3.min.js" type="text/javascript"/></script> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery-slimScroll/1.3.7/jquery.slimscroll.js" type="text/javascript"></script> | |
<title>Tes~</title> | |
</head> |
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 | |
$array = array ( | |
'foo', | |
'bar', | |
'baz' | |
); | |
$hasil = array(); | |
$count = count($array); | |
for ($i = 0; $i < $count; $i++) | |
$hasil=[$array[$count-$i-1]=>$hasil]; |
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
public class EasyBitString { | |
/** | |
* Generate BitString secara brutal | |
* Well, best option kalo cara yang dari modul nggak inget sama sekali. | |
* | |
* Cara: | |
* Buat komputer menghitung 1 hingga angka tertentu, lalu kita conver angka | |
* tersebut jadi bitstring. Kita dapat menggunakan kelas Integer untuk | |
* melakukan hal serupa. |
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
For symmetic encryption, you can use the following: | |
To encrypt: | |
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt | |
To decrypt: | |
openssl aes-256-cbc -salt -a -d -in encrypted.txt -out plaintext.txt | |
For Asymmetric encryption you must first generate your private key and extract the public key. |
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
public class Kambing { | |
public static void main(String[] args){ | |
int[] hive = {1,2,3,4,5,6,7,8,9,0}; | |
int needle = 8; | |
/* | |
Ada 3 buah method yang bisa digunakan, dan sama-sama jalan semua. | |
tapi mana yang lebih cepet dari 3-3nya ini? |
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
import java.util.Random; | |
public class Pool | |
{ | |
public static boolean validity(int min, int max){ | |
Random rd = new Random(); | |
int lottery1 = rd.nextInt(max-min)+min; | |
int lottery2 = rd.nextInt(max-min)+min; | |
int lottery3 = rd.nextInt(max-min)+min; | |
System.out.println(lottery1); | |
System.out.println(lottery2); |
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
public class Test { | |
public void test() { | |
Thread saver = new Thread(() -> { | |
try { | |
td.save(location); | |
} catch (IOException ex) { | |
Logger.getLogger(frmMain.class.getName()) | |
.log(Level.SEVERE, null, ex); | |
} | |
}); |
OlderNewer