Skip to content

Instantly share code, notes, and snippets.

View harisfi's full-sized avatar
🎯
Focusing

Haris F. harisfi

🎯
Focusing
View GitHub Profile
public class ProductCatalog {
private List<Product> products;
private ProductRepository productRepository;
private ProductSearchService productSearchService;
private ProductUIService productUIService;
private ProductReportService productReportService;
private ProductNotificationService productNotificationService;
public ProductCatalog() {
products = new ArrayList<>();
noted_date temp out/in
30-11-2018 23:58 37 Out
30-11-2018 23:56 36 Out
30-11-2018 23:33 37 Out
30-11-2018 23:31 37 Out
30-11-2018 23:19 37 Out
30-11-2018 23:11 37 Out
30-11-2018 23:09 37 Out
30-11-2018 22:35 37 Out
30-11-2018 22:33 37 Out
buying maint lug_boot safety class
vhigh vhigh small low unacc
vhigh vhigh small med unacc
vhigh vhigh small high unacc
vhigh vhigh med low unacc
vhigh vhigh med med unacc
vhigh vhigh med high unacc
vhigh vhigh big low unacc
vhigh vhigh big med unacc
vhigh vhigh big high unacc
@harisfi
harisfi / 1.kt
Created October 4, 2023 06:31
T6
package com.hryzx.interactionhandlingexample
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.interaction.collectIsPressedAsState
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
@harisfi
harisfi / 8puzzle.txt
Created September 14, 2023 01:21
8puzzle.txt
h1 = 5
d1 = |2-0|+|2-0| = 4
d2 = |0-0|+|1-1| = 0
d3 = |2-0|+|1-2| = 3
d4 = |0-1|+|2-0| = 3
d5 = |1-1|+|1-1| = 0
d6 = |1-1|+|2-2| = 0
d7 = |0-2|+|0-0| = 2
d8 = |2-2|+|0-1| = 1
@harisfi
harisfi / postgresql-pgadmin4.md
Last active October 27, 2022 15:26
Script for starting and stopping postgresql service and pgadmin4

Script for starting and stopping postgresql service and pgadmin4

Place code below in pgadmin4 directory, set each file permission to executable, and you can use it.


start.sh

#!/bin/sh

sudo systemctl start postgresql
mongodump --uri "mongodb+srv://<your username>:<your password>@<your cluster>.mongodb.net/sample_supplies"
mongoexport --uri="mongodb+srv://<your username>:<your password>@<your cluster>.mongodb.net/sample_supplies" --collection=sales --out=sales.json
mongorestore --uri "mongodb+srv://<your username>:<your password>@<your cluster>.mongodb.net/sample_supplies" --drop dump
mongoimport --uri="mongodb+srv://<your username>:<your password>@<your cluster>.mongodb.net/sample_supplies" --drop sales.json
@harisfi
harisfi / splitTraffic.js
Created September 3, 2021 15:55
Split large traffic into pieces, so there will no more server down :)
function splitTraffic() {
const origServerList = [
'server1',
'server2',
'server3',
'server4',
];
const serverCount = origServerList.length;
const firstServer = origServerList[Math.floor(Math.random() * serverCount)];
let modServerList = origServerList.filter(serv => serv !== firstServer);
=== COMPETITION ===
// coming soon
https://hology.ub.ac.id/
https://www.arkavidia.id/
// active
http://creanomic.ub.ac.id/
https://www.compfest.id/
https://ittoday.id/
for(let i = 1; i <= 28; i++) {
var radio = document.getElementsByName(i)
for(let j=0; j<radio.length; j++) {
if(radio[j].value == 5) {
radio[j].checked = true
}
}
}
document.getElementById('saran').value = 'Pembelajaran sangat baik! Terima kasih atas materi yang disampaikan. Mohon maaf sebesar-besarnya apabila saya banyak salah.'