Skip to content

Instantly share code, notes, and snippets.

View shalahuddinn's full-sized avatar

Shalahuddin Al Ayyubi shalahuddinn

View GitHub Profile
@shalahuddinn
shalahuddinn / tes.java
Created November 9, 2018 00:34
Divkom
/*
* Percobaan 1
*/
public class Dog {
// Instance Variables
String breed;
String size;
int age;
@shalahuddinn
shalahuddinn / question.py
Last active May 17, 2019 04:30
Current Method
# This my current application code (Booking system have not been implemented)
# The Current Flow of this version:
# 1. The user selects the food/drinks.
# 2. The user enters his table number.
# 3. The user makes payment
# 4. The kiosk process the order. (POST to ORDER then POST to ORDERDETAIL).
# If Failed (The QTY is not sufficient), the KIOSK return the user's money.
# If success then continue to the next step.
# 5. Order is done. The kiosk print the receipt.
@shalahuddinn
shalahuddinn / JetbotCharger.sol
Created December 10, 2019 06:16
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.13+commit.5b0b510c.js&optimize=false&gist=
pragma solidity ^0.5.0;
contract ChargingStationDeviceDemo {
uint constant IMPOSSIBLE_INDEX = 99999999999;
address owner;
struct ChargingStationDeviceDemoStruct {
string status;
@shalahuddinn
shalahuddinn / kuzzle-react-js.js
Last active January 19, 2021 11:37
Modify the kuzzle example code to use React Hooks
import React, {useState, useEffect}from 'react';
import kuzzle from './services/kuzzle';
import './App.css';
const Message = ({ message, username }) => {
return (
<div className={(message.username === username ? 'fromMe' : 'fromOthers') + ' messages'}>
<span> User: <b>{message.username}</b> (</span>
<span> {new Date(message.createdAt).toLocaleString().split("GMT")[0]} )</span>