Skip to content

Instantly share code, notes, and snippets.

View aliifam's full-sized avatar

Aliif Arief aliifam

View GitHub Profile
@aliifam
aliifam / Vue-options-API-lifescycle .vue
Created July 20, 2022 06:43
Vue options API lifescycle visualization
<template>
<div id="lifecycle">{{ message }}</div>
<button v-on:click="message = 'tulisan setelah di render ulang'">
Update!
</button>
</template>
<script>
import ChildComponent from "./components/ChildComponent.vue";
<div id="sitemap-blog"> <table> <tbody> <tr> <td>
<label for="feed-order">Urutkan artikel berdasarkan:</label>
</td> <td> <select id="feed-order">
<option selected="" value="published">Artikel terbaru</option>
<option value="updated">Artikel yang terakhir di update</option>
</select> </td> </tr> <tr> <td>
<label for="label-sorter">Filter artikel berdasarkan kategori:</label>
</td> <td> <select disabled="" id="label-sorter">
<option selected="">Loading....</option>
</select> </td> </tr> <tr> <td>
@aliifam
aliifam / applause-count.html
Created March 31, 2022 16:19
fetch method to get totqal applause count in one page using applause-button.com
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
color: #fcbe24;
font-size: 200px;
@aliifam
aliifam / LinkedList.py
Created March 14, 2022 02:50
implementation of Single Linked List data structure with python 3
class Node:
def __init__(self, nim=None, nl=None, np=None):
self.nim = nim
self.nl = nl
self.np = np
self.next = None
class LinkedList:
def __init__(self):
self.head = None
@aliifam
aliifam / simple- binary-search.py
Created September 9, 2021 01:42
simple binary search algorithtm implemented with python language
#binanry searching algorithm
item = int(input())
def binary_search(list, item): #parameter is a item want we search and list where the item located
low = 0 #index of first element in list
high = len(list) - 1 #index of last element in list
while low <= high:
mid = (low + high) // 2
guess = list[mid]