Skip to content

Instantly share code, notes, and snippets.

View affandes's full-sized avatar
💜
Lovin n Codin

Muhammad Affandes affandes

💜
Lovin n Codin
View GitHub Profile
@affandes
affandes / localhost.bpn.arsip-tanah.conf
Created December 14, 2019 06:12
Konfig yang biasa ane pake di localhost untuk NGINX
server {
charset utf-8;
client_max_body_size 128M;
server_name arsip.bpn.localhost;
root www/symfony/arsip-tanah/public;
index index.php;
listen 8000; ## listen for ipv4
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
@affandes
affandes / start.bat
Created December 14, 2019 06:16
Konfig yang biasa ane pake di WPN-XM
@echo off
:: Konfigurasi
SET PHP_HOME=php-7.3.1-nts-Win32-VC15-x64
SET MYSQL_HOME=mysql-8.0.14-winx64
SET NGINX_HOME=nginx-1.15.8
if exist "%~dp0temp" (
echo Menghapus Temporary files...
del /F/S/Q "%~dp0temp\" > nul
public class OcaJavaSe7Soal001 {
public static void main(String[] args) {
int[][] data = {
{1,0,2},
{2,1,0},
{0,2,1}
};
System.out.printf(
"%d %B %d",
public class OcaJavaSe7 {
public static void main(String[] args) {
String valid = "true";
if(valid)
System.out.println("valid");
else
System.out.printf("invalid");
}
import java.io.ByteArrayInputStream;
public class ByteStream {
public static void main(String[] args) {
// Contoh input dari String
String teks = "ABC";
// Buat input stream
ByteArrayInputStream input = new ByteArrayInputStream(teks.getBytes());
import java.io.IOException;
import java.io.FileReader;
public class CharacterStream {
public static void main(String[] args) {
// Contoh input dari File
String file = "hello.txt";
try {
public class JavaLang extends ProgrammingLang {
public void compileAndRun() {
System.out.println(JavaLang.class.getName());
System.out.println("Compiling...");
System.out.println("Running...");
}
}
import java.io.*;
public class ByteStreamVsCharStream {
public static void main(String[] args) {
// Input source
String souce = "Affandes";
// Create Byte Stream and Character Stream
ByteArrayInputStream inputByte = new ByteArrayInputStream(souce.getBytes());
import java.io.*;
import java.util.Arrays;
public class ByteStreamVsCharStream {
public static void main(String[] args) {
// Create source
String source = "Affandes";
// Create Byte Stream & Character Stream
public class HitungIpk {
public static void main(String[] args) {
Nilai daftarNilai[] = {
new Nilai(NilaiHuruf.A, 3),
new Nilai(NilaiHuruf.B, 3),
new Nilai(NilaiHuruf.A, 2),
new Nilai(NilaiHuruf.B, 2),
};
double totalNilai = 0;