Skip to content

Instantly share code, notes, and snippets.

View HKhademian's full-sized avatar
🏠
Working from home

Hossain Khademian HKhademian

🏠
Working from home
View GitHub Profile
@HKhademian
HKhademian / TreeElement.java
Last active February 10, 2016 10:12
Android TreeView using ListViews
public interface TreeElement extends Serializable {
public void addChild(TreeElement child);
public String getId();
public void setId(String id);
public String getOutlineTitle();
public void setOutlineTitle(String outlineTitle);
@HKhademian
HKhademian / RatingView.java
Created February 11, 2016 22:10
A simple Android Rating View that extends LinearLayout and fill it with ImageViews
package hco.widget;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
@HKhademian
HKhademian / python-lists-video.py
Created May 5, 2020 19:20
This file contains console texts wrote and responded in a learning video:
[1, "hi", 'h']
[1, 'hi', 'h']
list1 = []
list2 = [ "red", "blue", "yellow" ]
list2[0]
'red'
list2[2]
'yellow'
list2[3]
Traceback (most recent call last):
@HKhademian
HKhademian / LCP.js
Created June 13, 2020 10:30
Tri Data Struct in JavaScript
// to run this code :
// node ./LCP.js
const Tri = require("./Tri.js");
Tri.prototype.LCP = function() {
var node = this.root, keys = undefined;
while((keys=Object.keys(node.children)).length == 1) {
node = node.children[keys[0]];
}
import {useEffect, useState} from "preact/hooks";
export const useFetch = (
{
url, // request url
parse = 'json', // default body parser
placeholder = undefined, // when error|loading return this as data
key = undefined, // to track different changes (latter to cache)
...options // fetch() options like methods , ...
} = {}
import {useState, useEffect} from 'preact/hooks';
export const getStorage = (key, initValue = undefined, session = false, decode = data => data) => {
if (typeof window == "undefined") return initValue;
const item = session ?
window.sessionStorage.getItem(key) :
window.localStorage.getItem(key);
return item !== undefined && item !== null ? decode(item) : initValue;
};
@HKhademian
HKhademian / objective.md
Created March 17, 2022 05:41
Sample objectives you can inspire to put in your CV

https://bestresumeobjectiveexamples.com/top-20-education-resume-objective-examples-you-can-apply-right-away/

  1. Enthusiastic and self-motivated individual looking for a Preschool Teacher position at Treasure School; coming with ability to recognize and evaluate the educational needs and potentials of young children and develop suitable educational plans that can meet their needs and potentials.

  2. To secure a position as an Elementary School Teacher that will enhance my dedication to children’s educational essentials and development.

  3. Smart and intelligent high school graduate with proficiencies in math and language skills seeks to add value as an Assistant Teacher at Mayfield School.

  4. Conscientious child care worker with very strong ability to coordinate, go along with, and provide activities suitable for the opportunity age of children, desires the position of Child Care Worker at Priceless Children Center.

#!/usr/bin/env bun
import { EventButs } from "./EventBu";
enum MyEvents1 {
Val1 = 'Val1',
Event1 = 'Event1',
Event2 = 'Event2',
Event3 = 'Event3',
};