Skip to content

Instantly share code, notes, and snippets.

View thepriefy's full-sized avatar

thepriefy

View GitHub Profile
@thepriefy
thepriefy / IndexedDB101.js
Created December 19, 2017 09:44 — forked from JamesMessinger/IndexedDB101.js
Very Simple IndexedDB Example
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
// Open (or create) the database
var open = indexedDB.open("MyDatabase", 1);
// Create the schema
open.onupgradeneeded = function() {
var db = open.result;
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"});
@thepriefy
thepriefy / gist:57d32dba85516bdea9fc381aa67a1369
Created December 13, 2017 01:13 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@thepriefy
thepriefy / README-Template.md
Created October 18, 2017 05:21 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@thepriefy
thepriefy / The Technical Interview Cheat Sheet.md
Created August 11, 2017 01:54 — forked from iamsarin/The Technical Interview Cheat Sheet.md
data stucture โครงสร้างข้อมมูลทางคอมพิวเตอร์ฉบับย่อ. fork มาจาก https://gist.github.com/TSiege/cbb0507082bb18ff7e4b

Cheat Sheet (คู่มือ) นี้จะช่วยให้คุณทบทวน และเข้าใจโครงสร้างข้อมูลทางคอมพิวเตอร์

นี่เป็นคู่มือโครงสร้างข้อมูลทางคอมพิวเตอร์ฉบับย่อ เอกสารนี้อนุญาตให้คุณ fork เพื่อแก้ไข ปรับปรุง หรืออะไรก็ได้ที่คุณต้องการ โดยหากพบข้อผิดพลาดของเอกสารไม่ว่าจะเป็นคำผิด หรือข้อมูลที่คาดเคลื่อนได้โปรดแจ้งเพื่อจะได้ปรับปรุงให้เอกสารมีความถูกต้องมากขึ้น

ข้อมูลนี้มาจากต้นฉบับ โดย TSiege แปลเป็นภาษาไทยโดย iamsarin

โครงสร้างข้อมูลมูลฐาน (หน่อยย่อยที่สุด)

Array

คำจำกัดความ:

  • เก็บข้อมูลเป็นลำดับแถว โดยมากจะมีลำดับเริ่มต้นที่ 0 เช่น ภาษา JavaScript, Java, PHP, C, C++ แต่บางภาษาจะเริ่มต้นที่ 1 เช่น ภาษา Lua, MATLAB, COBOL
  • มีพื้นฐานมาจากคณิตศาสตร์เรื่อง set แบบ tuples