Skip to content

Instantly share code, notes, and snippets.

象道 Kejia

  • Nepean, Ontario, Canada
Block or report user

Report or block Kejia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Kejia
Kejia / linear_probing.java
Last active Sep 18, 2017
java: linear probing.
View linear_probing.java
// linear probing a null slot in an M-length array (M >= N)
for (i = start; myarray[i] != null && myarray[i] != target; i = (i+1) % M)
...
@Kejia
Kejia / sleep_with_promise.es
Created Jul 26, 2017
使用promise定义的sleep函
View sleep_with_promise.es
const sleep = second => {
const millisecond = second * 1000;
const r = new Promise((resolve, reject) => setTimeout(() => resolve(`this slept ${second} seconds`),
millisecond));
return r.then(alert);
};
You can’t perform that action at this time.