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
FROM python:3.7-alpine | |
ENV LANG C.UTF-8 | |
ENV LC_ALL C.UTF-8 | |
RUN mkdir /app | |
COPY ./project/requirements.txt /app | |
# Install required package | |
RUN apk update && \ |
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> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Form</title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | |
</head> | |
<body> |
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
<script> | |
////////////////////////////////////////////// | |
//////////////// Variables | |
////////////////////////////////////////////// | |
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
var kalimat = "belajar pemrograman javascript"; | |
// split() digunakan untuk memisahkan (men-split) sebuah string berdasarkan separator, dan hasilnya akan berbentuk array. | |
// contoh dibawah akan men-split kalimat "belajar pemrograman javascript" berdasarkan separator spasi. | |
var array_kalimat = kalimat.split(" "); | |
console.log(array_kalimat); | |
// OUTPUT : ["belajar", "pemrograman", "javascript"] | |
var buah = ["apel", "belimbing", "cempedak"]; |
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
String.prototype.ucwords = function() { | |
var arr_split = this.split(" "); | |
var arr_str = []; | |
for(var i = 0; i < arr_split.length; i++) { | |
arr_str.push(arr_split[i].charAt(0).toUpperCase() + arr_split[i].slice(1)); | |
} | |
return arr_str.join(" "); | |
} |
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
var nama = "frey"; | |
// Mengambil satu character dari sebuah string sesuai no index | |
nama.charAt(0); // "f" | |
nama.charAt(1); // "r" | |
nama.charAt(2); // "e" | |
nama.charAt(3); // "y" | |
// Mengubah suatu string menjadi huruf kapital (Upper Case) | |
nama.toUpperCase(); // "FREY" |
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
String.prototype.ucfirst = function() { | |
return this.charAt(0).toUpperCase() + this.slice(1); | |
} | |
var kalimat = "belajar pemrograman javascript"; | |
kalimat.ucfirst(); // "Belajar pemrograman javascript" |
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 | |
$arr = array('name' => 'frey', 'alamat' => 'jogja'); | |
echo json_encode($arr); | |
?> |
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; // mendeklarasikan nama package | |
import java.util.Scanner; // meng-import atau memasukkan fungsi Scanner kedalam program | |
public class while_satu { // mendeklarasikan public class dengan nama while_satu | |
public static void main(String[] args) { // mendeklarasikan method main yang digunakan untuk mengawali segala bentuk eksekusi dalam program java | |
Scanner masuk = new Scanner(System.in); // mendeklarasikan Scanner baru dengan nama masuk | |
int bil; // mendeklarasikan variabel bil dengan tipe data int | |
bil = 1; // memberikan nilai 1 ke variabel bil | |
while (bil<=5) { // melakukan perulangan while. perulangan akan terus berjalan selama nilai variabel bil kurang dari sama dengan 5 | |
System.out.println(bil); // menampilkan nilai variabel bil |
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
<html> | |
<head> | |
<title></title> | |
</head> | |
<body bgcolor="white"> | |
<table width="80%" border="1px" style="margin:0 auto;"> | |
<tr> | |
<td rowspan="2" width="20%">Hai 1</td> | |
<td>Tes 1</td> | |
</tr> |