This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"1":{"name":"Thành phố Cần Thơ","districts":{"66":"Huyện Cờ Đỏ","67":"Huyện Phong Điền","68":"Huyện Thới Lai","69":"Huyện Vĩnh Thạnh","70":"Quận Bình Thủy","71":"Quận Cái Răng","72":"Quận Ninh Kiều","73":"Quận Ô Môn","74":"Quận Thốt Nốt"}},"2":{"name":"Thành phố Đà Nẵng","districts":{"76":"Huyện Hòa Vang","77":"Huyện Hoàng Sa","78":"Quận Cẩm Lệ","79":"Quận Hải Châu","80":"Quận Liên Chiểu","81":"Quận Ngũ Hành Sơn","82":"Quận Sơn Trà","83":"Quận Thanh Khê"}},"3":{"name":"Thành phố Hà Nội","districts":{"85":"Huyện Ba Vì","86":"Huyện Chương Mỹ","87":"Huyện Đan Phượng","88":"Huyện Đông Anh","89":"Huyện Gia Lâm","90":"Huyện Hoài Đức","91":"Huyện Mê Linh","92":"Huyện Mỹ Đức","93":"Huyện Phú Xuyên","94":"Huyện Phúc Thọ","95":"Huyện Quốc Oai","96":"Huyện Sóc Sơn","97":"Huyện Thạch Thất","98":"Huyện Thanh Oai","99":"Huyện Thanh Trì","100":"Huyện Thường Tín","101":"Huyện Từ Liêm","102":"Huyện ứng Hòa","103":"Quận Ba Đình","104":"Quận Cầu Giấy","105":"Quận Đống Đa","106":"Quận Hà Đông","107":"Quận Hai Bà Trưng","108":"Q |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Randomize array element order in-place. | |
* Using Durstenfeld shuffle algorithm. | |
*/ | |
function shuffleArray(array) { | |
for (var i = array.length - 1; i > 0; i--) { | |
var j = Math.floor(Math.random() * (i + 1)); | |
var temp = array[i]; | |
array[i] = array[j]; | |
array[j] = temp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function bodau(str,isLowerCase, isUnderLine) { | |
if(isLowerCase) {str = str.toLowerCase()} | |
str = str.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g, 'a'); | |
str = str.replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g, 'e'); | |
str = str.replace(/ì|í|ị|ỉ|ĩ/g, 'i'); | |
str = str.replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g, 'o'); | |
str = str.replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g, 'u'); | |
str = str.replace(/ỳ|ý|ỵ|ỷ|ỹ/g, 'y'); | |
str = str.replace(/đ/g, 'd'); | |
if(isUnderLine) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(t){"use strict";function r(t,r,e){var n=y[r];return n||(n=t(r,e),n.feature&&++N[r>>8&255]>c&&(y[r]=n)),n}function e(t,r,e){var n=65280&r,i=F.udata[n]||{},o=i[r];return o?new F(r,o):new F(r,h)}function n(t,r,e){return e?t(r,e):new F(r,null)}function i(t,r,e){var n;if(l>r||r>=l+g&&p>r||r>p+m)return t(r,e);if(r>=l&&l+g>r){var i={},o=(r-l)*v;for(n=0;v>n;++n)i[C+n]=p+w*(n+o);return new F(r,[,,i])}var s=r-p,u=s%w,f=[];if(0!==u)f[0]=[p+s-u,d+u];else for(f[0]=[l+Math.floor(s/B),C+Math.floor(s%B/w)],f[2]={},n=1;w>n;++n)f[2][d+n]=r+n;return new F(r,f)}function o(t,r,e){return 60>r||r>13311&&42607>r?new F(r,h):t(r,e)}function s(t){return z("NFD",t)}function u(t){return z("NFKD",t)}function f(t){return z("NFC",t)}function a(t){return z("NFKC",t)}for(var h=[null,0,{}],c=10,p=44032,l=4352,C=4449,d=4519,g=19,v=21,w=28,B=v*w,m=g*B,F=function(t,r){this.codepoint=t,this.feature=r},y={},N=[],x=0;255>=x;++x)N[x]=0;var S=[o,r,n,i,e];F.fromCharCode=S.reduceRight(function(t,r){return function(e,n){return r(t,e,n)}},null), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Tính Can Chi</title> | |
<style id="jsbin-css"> | |
@import url('https://fonts.googleapis.com/css?family=Comfortaa'); | |
body { | |
font-family: 'Comfortaa'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Nam 0 Canh Than | |
CAN=( "Canh" "Tân" "Nhâm" "Qúy" "Giáp" "Ất" "Bính" "Đinh" "Mậu" "Kỷ" ) | |
CAN_HANTU=( "庚" "辛" "壬" "癸" "甲" "乙" "丙" "丁" "戊" "己") | |
CAN_NGUHANH=( "Kim" "Kim" "Thủy" "Thủy" "Mộc" "Mộc" "Hỏa" "Hỏa" "Thổ" "Thổ" ) | |
CAN_AMDUONG=( "Dương" "Âm" "Dương" "Âm" "Dương" "Âm" "Dương" "Âm" "Dương" "Âm" ) | |
CHI=("Thân" "Dậu" "Tuất" "Hợi" "Tý" "Sửu" "Dần" "Mão" "Thìn" "Tỵ" "Ngọ" "Mùi" ) | |
CHI_HANTU=( "申" "酉" "戌" "亥" "子" "丑" "寅" "卯" "辰" "巳" "午" "未" ) | |
#color |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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"}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> | |
<title>Get selected text </title> | |
</head> | |
<body> | |
<form class="w3-container"> |
NewerOlder