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
/* | |
Pastikan sudah memasukan pustaka berikut ini ke dalam project: | |
+ jfreechart-1.0.19.jar | |
+ jcommon-1.0.23.jar | |
*/ | |
// Method untuk membuat histogram | |
public void bikinHistogram(BufferedImage gmbr, String judul) { |
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 | |
/** | |
* Example of password hashing and verification with password_hash and | |
* password_verify | |
* | |
* Skrip ini dieksekusi melalui command line (CLI) | |
* Contoh: 'php -f password_hash_example.php' | |
* | |
* @bacalah http://stackoverflow.com/a/20809916/1134565 |
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
/* CSS untuk embed Gist */ | |
.gist{font-size:13px;line-height:18px;margin-bottom:20px;width:100%} | |
.gist-file .gist-data {max-height: 500px} | |
.gist pre {font-family:Menlo,Monaco,'Bitstream Vera Sans Mono','Courier New',monospace !important} | |
.gist-meta {font-family:Helvetica,Arial,sans-serif;font-size:13px !important} | |
.gist-meta a{color:#239ea3 !important;text-decoration:none} | |
.gist-meta a:hover{color:#5cc2c0 !important} |
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 os | |
cahaya = open('/sys/class/backlight/intel_backlight/brightness') | |
maxCahaya = open('/sys/class/backlight/intel_backlight/max_brightness') | |
minCahaya = int(maxCahaya.readline()) / 14 | |
kurangCahaya = int(cahaya.readline()) - minCahaya | |
if(kurangCahaya > minCahaya): | |
os.system('echo '+str(kurangCahaya)+' > /sys/class/backlight/intel_backlight/brightness') |
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 os | |
cahaya = open('/sys/class/backlight/intel_backlight/brightness') | |
maxCahaya = open('/sys/class/backlight/intel_backlight/max_brightness') | |
minCahaya = int(maxCahaya.readline()) / 14 | |
tambahCahaya = int(cahaya.readline()) + minCahaya | |
if(tambahCahaya < minCahaya*14 + minCahaya): | |
os.system('echo '+str(tambahCahaya)+' > /sys/class/backlight/intel_backlight/brightness') |
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
package pertemuan2; | |
import java.util.Scanner; | |
public class LuasSegitia { | |
public static void main(String[] args) { | |
// deklarasi | |
Double luas; | |
int alas, tinggi; |
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
package pertemuan3; | |
import java.util.Scanner; | |
public class OperatorAritmatika { | |
public static void main(String[] args) { | |
int angka1; | |
int angka2; | |
int 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
package pertemuan3; | |
public class OperatorPenugasan { | |
public static void main(String[] args) { | |
int a; | |
int b; | |
// Pengisian nilai | |
a = 5; |
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
package pertemuan3; | |
public class OperatorPembanding { | |
public static void main(String[] args) { | |
int nilaiA = 12; | |
int nilaiB = 4; | |
boolean hasil; | |
// apakah A lebih besar dari B? |
OlderNewer