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
| #ifndef RBTREE_RBTREE_H_ | |
| #define RBTREE_RBTREE_H_ | |
| #include <cstddef> | |
| #include <cassert> | |
| #include <utility> | |
| namespace upsuper { | |
| namespace learning { |
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
| #!/usr/bin/env python | |
| # - * - coding: UTF-8 - * - | |
| class Constants(object): | |
| __slots__ = ['_d'] | |
| def __init__(self, d): | |
| self._d = d | |
| for k, v in self._d.items(): | |
| if isinstance(v, dict): |
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
| #!/usr/bin/env ruby | |
| require "socket" | |
| require "OpenSSL" | |
| Group = OpenSSL::PKey::EC::Group.new("secp160k1") | |
| def send(server, data) | |
| puts ">>> #{data}" | |
| server.puts data |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <assert.h> | |
| #include <sys/wait.h> | |
| #include <sys/types.h> | |
| #include <sys/ptrace.h> | |
| const char *name; | |
| void usage() |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int main(int argc, char** argv) | |
| { | |
| if (argc < 3) { | |
| printf("usage: %s inputfile outputfile\n", argv[0]); | |
| exit(2); | |
| } |
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
| #!/usr/bin/env python3 | |
| # - * - coding: UTF-8 - * - | |
| import sys | |
| import json | |
| import concurrent.futures as futures | |
| from pathlib import Path | |
| from difflib import Differ | |
| from urllib.request import urlopen |
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
| #!/bin/sh | |
| files=$(hg status | awk '$1 == "?" && $2 ~ /\.(orig|rej)$/ { print $2 }') | |
| echo "$files" | |
| read -r -p "Remove these files? [y/N]" resp | |
| case $resp in | |
| [yY][eE][sS]|[yY]) | |
| rm $files | |
| ;; | |
| *) |
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
| #include <iostream> | |
| template<class T> | |
| class Out | |
| { | |
| private: | |
| T& mValue; | |
| public: | |
| explicit Out(T& aValue) |
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
| #!/usr/bin/env python3 | |
| import sys as _sys | |
| import json as _json | |
| import base64 as _base64 | |
| import logging as _logging | |
| import mimetypes as _mimetypes | |
| import urllib.parse as _url | |
| import configparser as _configparser |
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 lang="zh-TW"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Polyfill demo for tone mark positioning</title> | |
| <style> | |
| body { | |
| -webkit-writing-mode: vertical-rl; | |
| -ms-writing-mode: tb-rl; | |
| writing-mode: vertical-rl; |