Skip to content

Instantly share code, notes, and snippets.

View EmingK's full-sized avatar
🐦
咕咕咕

Eming Kwok EmingK

🐦
咕咕咕
  • Shopee
  • Beijing, CN
View GitHub Profile
@EmingK
EmingK / p60.cpp
Created September 15, 2015 18:07
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
vector<long long> *primeTable;
long long nextPrime()
{
long long lastPrime = *--(primeTable->end());
@EmingK
EmingK / ImageLoadVC.h
Created January 11, 2016 13:03
Test image rendering with kCAFilterTrilinear on iPhone 5C
//
// ImageLoadVC.h
// touchtest
@import UIKit;
@interface ImageLoadVC : UIViewController
@end
@EmingK
EmingK / wubi86.custom.yaml
Created April 21, 2018 08:56
Rime wubi config for hardware colemak keyboard layout
patch:
key_binder:
import_preset: default
bindings:
- {accept: f, send: e, when: always}
- {accept: p, send: r, when: always}
- {accept: g, send: t, when: always}
- {accept: j, send: y, when: always}
- {accept: l, send: u, when: always}
- {accept: u, send: i, when: always}
@EmingK
EmingK / Patchable.swift
Created September 24, 2021 11:56
脑洞(
struct Test1 {
var ww: Int
var xx: String
}
struct Partial<T> {
internal var values: [PartialKeyPath<T>: Any] = [:]
subscript<V>(key: KeyPath<T, V>) -> V? {
get {
@EmingK
EmingK / tmp-base64.cc
Created February 18, 2023 02:39
A Base64 Encoding Implementation using C++ Template Metaprogramming
#include <iostream>
#include <type_traits>
template <char ...chars>
using TString = std::integer_sequence<char, chars...>;
template <typename T, T ...chars>
constexpr TString<chars...> operator""_tstr() { return { }; }
template <typename>