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
const char ADDR[] = {22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52}; | |
const char DATA[] = {39, 41, 43, 45, 47, 49, 51, 53}; | |
#define CLOCK 2 | |
#define READ_WRITE 3 | |
void setup() { | |
for (int n = 0; n < 16; n += 1) { | |
pinMode(ADDR[n], INPUT); | |
} | |
for (int n = 0; n < 8; n += 1) { |
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
import os | |
import sys | |
import unicodedata | |
def scan_files(base_dir, recursive=True, dry_run=True): | |
for (root, dirs, files) in os.walk(base_dir): | |
for f in files: | |
new_name = unicodedata.normalize('NFC', f); | |
if new_name != f: | |
print(f'{root}/{f} -> {new_name}') |
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
import java.io.File; | |
import java.text.Normalizer; | |
import java.util.Set; | |
public class NFC { | |
public static void scanFiles(File dir, boolean recursive, boolean dryRun) { | |
for (File file: dir.listFiles()) { | |
var oldName = file.getName(); | |
var newName = Normalizer.normalize(file.getName(), Normalizer.Form.NFC); | |
if (!oldName.equals(newName)) { |
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
import { TuringMachine } from './turing-machine.mjs'; | |
const transitionFunction = { | |
q0: { | |
0: ['q0', '0', 'R'], | |
1: ['q0', '1', 'R'], | |
END: ['q1', 'END', 'L'], | |
}, | |
q1: { | |
0: ['q2', '1', 'R'], |
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
var SNAKE_CASE_REGEXP = /[_-]([a-z])/g; | |
function toCamelCase(str) { | |
return String(str) | |
.replace(SNAKECASE_REGEXP, function (match, match1) { | |
return match1.toUpperCase(); | |
}); | |
} |
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
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import javax.crypto.Cipher; | |
import javax.crypto.spec.SecretKeySpec; | |
import java.security.Key; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.Base64; |
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 parseQueryString() { | |
return location.search.substring(1).split('&') | |
.map(function(s){ | |
return s.split('='); | |
}) | |
.reduce(function (r, x) { | |
r[x[0]] = x[1]; | |
return r; | |
}, {}); | |
} |
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
package kr.iolo.common.collection; | |
import java.util.LinkedHashMap; | |
import java.util.Map; | |
/** | |
* LRU 정책에 근거하여 맵의 항목을 유지하는 초간단 LRU 맵 구현. | |
* | |
* @author iolo | |
*/ |
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
<project> | |
<dependencyManagement> | |
<dependency> | |
<groupId>org.apache.phoenix</groupId> | |
<artifactId>phoenix-core</artifactId> | |
<version>4.2.1</version> | |
<exclusions> | |
<exclusion> | |
<artifactId>hbase-testing-util</artifactId> | |
<groupId>org.apache.hbase</groupId> |
NewerOlder