Skip to content

Instantly share code, notes, and snippets.

View KSXGitHub's full-sized avatar

Khải KSXGitHub

  • Earth, Solar System, Orion Arm, Milky Way
  • X @hvksmr1996
View GitHub Profile
#include <iostream>
#include <fstream>
#include <ctime>
#include <chrono>
using std::cout;
using std::endl;
using std::chrono::time_point;
using std::chrono::system_clock;
#include <iostream>
#include <fstream>
#include <ctime>
#include <chrono>
using std::cout;
using std::endl;
using std::chrono::time_point;
using std::chrono::system_clock;
@KSXGitHub
KSXGitHub / .cpp
Created October 25, 2015 14:32
test
#include <iostream>
int main() {
std::cout << "Hello, World!!\n";
return 0;
}
@KSXGitHub
KSXGitHub / deep-iterable-circular-deeper.js
Created January 7, 2016 15:13
A particular `DeepIterableBase.CIRCULAR_DEEPER` returns `true` for any particular value for once
var DeepIterable = require('x-iterable/deep-iterable');
var sub0 = ['sub0'];
var sub1 = ['sub1'];
var target = ['abcdef', sub0, sub1];
var REUSE = DeepIterable.CIRCULAR_DEEPER;
console.log({
@KSXGitHub
KSXGitHub / config.cson
Created January 10, 2016 05:30
my config.cson for command-executor
"*":
welcome:
showOnStartup: false
core:
themes: [
"ksx-matrix-ui"
"ksx-matrix"
]
projectHome: "D:\\AtomProjects"
disabledPackages: [
@KSXGitHub
KSXGitHub / keymap.cson
Created January 10, 2016 05:35
example for command-executor
'atom-workspace':
'f6': 'run:cpp-exe'
'ctrl-f6': 'gnu-compile:cpp-exe'
@KSXGitHub
KSXGitHub / dec.emu8086.asm
Created May 7, 2016 12:12
Inputing and Outputing decimal integer numbers in emu8086-asm
.model small
.stack 0x100
.data
ask db 10, 13, 'Nhap mot so nguyen (0 - 255): $'
reply db 10, 13, 'So nguyen vua nhap: $'
@KSXGitHub
KSXGitHub / end57.asm
Created May 10, 2016 01:54
Liệt kê các số nguyên kết thúc bằng 5 hoặc 7
.model small
.stack 0x100
.data
ask db 10, 13, 'Nhap mot so nguyen (0 - 255): $'
reply db 10, 13, 'Cac so ket thuc voi 5 hoac 7:$'
@KSXGitHub
KSXGitHub / test.csv
Last active October 4, 2016 08:58
Test CSV
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 32 columns, instead of 15. in line 5.
1527, 2361, 4152, 9625, 5454, 9126, 4035, 352, 5176, 823, 9537, 1315, 1598, 9384, 4476, 8377, 4812, 5989, 7885, 8468, 4964, 508, 2282, 4192, 5456, 8954, 7391, 3999, 1522, 5299, 9763, 941
9145, 7107, 329, 7300, 8577, 6874, 9261, 106, 6049, 7967, 5083, 2473, 8309, 9593, 7447, 7495, 6031, 4998, 7011, 6287, 1582, 4610, 6620, 7759, 3565, 965, 9763, 2197, 2722, 5780, 3210, 1725
3287, 7876, 7029, 5670, 9351, 3419, 192, 4510, 4354, 5971, 4948, 6003, 4594, 5688, 3747, 3841, 6861, 6225, 2254, 8011, 6909, 1092, 4797, 2702, 330, 575, 8117, 8974, 2086, 9533, 7469, 5852
6995, 7353, 8087, 9056, 3314, 137, 8417, 2388, 4430, 6550, 7851, 1186, 5091, 2437, 1927, 8777, 3578, 1205, 495, 9511, 5783, 9987, 1838, 2847, 4678, 1131, 981, 7181, 6988, 4777, 980, 5998
9156, 4460, 8758, 6186, 7775, 7128, 3462, 1996, 6465, 6832, 5587, 1803, 2923, 9435, 8678, 3583, 7660, 3183, 3859, 8272, 3571, 3635, 9476, 7359, 8194, 5532, 7671, 6449, 6063, 6386, 4399, 1280
7788, 384, 6879, 1308, 3671, 4450, 5136, 563, 1878, 6495, 1483, 634, 4935, 6830, 10
@KSXGitHub
KSXGitHub / object.prototype.foo.accessor.js
Last active October 2, 2016 13:47
Create a property accessor for `Object.prototype.foo` and create `{foo: bar}` to see whether `foo`'s setter being called or not
// I tested this in Node.js and Chrome browser
'use strict'
// Set things up
Object.defineProperty(Object.prototype, 'foo', {
set (x) {
console.log('Setter is called: ' + x)
this._foo = x
},