Skip to content

Instantly share code, notes, and snippets.

View ifindev's full-sized avatar

Muhammad Arifin ifindev

View GitHub Profile
@ifindev
ifindev / query.sql
Created September 17, 2022 16:44
SQL Challenges
CREATE TABLE IF NOT EXISTS USERS (
ID serial primary key not null,
UserName varchar(200)null,
Parent int not null
);
INSERT INTO USERS (UserName, Parent) VALUES ('Ali', 2)
INSERT INTO USERS (UserName, Parent) VALUES ('Budi', 0)
INSERT INTO USERS (UserName, Parent) VALUES ('Cecep', 1)
@ifindev
ifindev / api.js
Last active September 8, 2022 15:29
REST API Transaction by Average Monthly Spending
'use strict';
const fs = require('fs');
process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
@ifindev
ifindev / employee.go
Last active July 4, 2022 17:06
Struct Composition Go
type Employee struct {
Name string
Age int
Height float32 // cm
Gender string
PositionName string
MonthsOfService int
Department string
}
@ifindev
ifindev / interface.go
Created July 4, 2022 10:38
Go Interface for Polymorphism
// You can edit this code!
// Click here and start typing.
package main
import (
"fmt"
"math"
)
type Shape interface {
@ifindev
ifindev / closure.go
Last active June 7, 2022 15:26
Golang Basic
// Closure is a function which can be stored on a variable
package main
import {
"fmt"
}
func main() {
var numbers = []int{2, 3, 4, 5, 6, 7, 8, 9}
@ifindev
ifindev / restaurant_with_menu.json
Created March 24, 2022 10:36 — forked from seahyc/restaurant_with_menu.json
Restaurants with Menu
This file has been truncated, but you can view the full file.
[
{
"cashBalance": 4483.84,
"menu": [
{
"dishName": "Postum cereal coffee",
"price": 13.88
},
{
"dishName": "GAI TOM KA: CHICKEN IN COCONUT CREAM SOUP WITH LIME JUICE GALANGA AND CHILI",
@ifindev
ifindev / App.js
Created June 16, 2021 07:36
Indeed Responsive Layout
import React from 'react';
import {
ChakraProvider,
Grid,
Box,
Flex,
List,
ListItem,
Heading,
} from '@chakra-ui/react';
@ifindev
ifindev / README.md
Last active June 15, 2021 11:41
Data Star Wars
@ifindev
ifindev / README.md
Created June 4, 2021 03:52
Side Navbar with React Router for Dashboard
@ifindev
ifindev / app.js
Created May 4, 2021 00:02
Set State Array
import { useState } from 'react';
function App() {
const [counters, setCounters] = useState([
{ id: 1, value: 0 },
{ id: 2, value: 0 },
{ id: 3, value: 0 },
{ id: 4, value: 0 },
]);