Skip to content

Instantly share code, notes, and snippets.

View achjailani's full-sized avatar
🏠
Learning from home

Jay achjailani

🏠
Learning from home
View GitHub Profile
@achjailani
achjailani / sunday.php
Last active April 1, 2021 16:11
JS auto change element with select element
<!DOCTYPE html>
<html>
<head>
<title>JS - Test</title>
</head>
<body>
<h3>JS - Document</h3>
<table>
<tr>
<th>No</th>
@achjailani
achjailani / bubble-sort.py
Created April 1, 2021 16:10
Bubble sort algorithm in python
lists = [3, 5, 7, 1, 10, 8, 9, 15];
tmp=0
'''
SORTING PROCESS IS HERE
'''
for i in range(len(lists)):
for y in range(0, len(lists) -1):
if lists[y] > lists[y+1]:
tmp = lists[y]
@achjailani
achjailani / rsa-crypto.py
Created April 1, 2021 16:14
RSA Cryptography sample in python
import math
'''
p = 10009, 401, 1019
q = 10039, 409, 1021
'''
p = int(input("Nilai P: "))
q = int(input("Nilai Q: "))
plantext = input("Plan Text: ")
# n = p * q
@achjailani
achjailani / moveable.html
Created August 17, 2022 07:48
Moveable and resizeable element
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#main {
@achjailani
achjailani / strategy_patten.go
Last active March 29, 2023 05:32
Strategy Pattern in Go
package main
import (
"fmt"
)
// Strategy is a strategy interface which should be implemented by
// the concrete strategies
type Strategy interface {
execute(p *Route)