This file contains 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 { parseArgs } from "jsr:@std/cli/parse-args" | |
// Define the option names, their default values, and (implicitly) their types, using a DRY (dont repeat yourself) way | |
// The option name itself will be used as the command line switch, and the keys in config json file | |
// This object is also used to enumerate all options | |
// Supported type: number, string, boolean, string array | |
const defaultConfig = { | |
area: 'Recording', | |
steps: ['ocv', 'classify', 'excel'] as 'ocv'|'classify'|'excel'[], | |
startDate: '', |
This file contains 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
export type V3D = [number, number, number] | |
export type V2D = [number, number] | |
// degree should be multiply of 90 | |
// axis: 0 = x, 1 = y, 2 = z | |
function rotatePoint(point:V3D, axis: number, degree: number) : V3D { | |
const [x, y, z] = point | |
const d = (degree % 360 + 360) % 360 // 0, 90, 180, 270 | |
const s = d === 90? 1 : (d === 270? -1 : 0) | |
const c = d === 0? 1 : (d === 180? -1 : 0) |
This file contains 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
ae29937 Add gn flag to control mitigations for untrusted code | |
6b30393 [turbofan] Kill transition-kind source map in load elimination. | |
48d436b [test] Add "trusted" testing variant to a subset of bots | |
bbcdb1e Update V8 DEPS. | |
055aa9b Beautify help output of flag names | |
05fe364 [wasm] Fix memory size dcheck in WasmContext | |
c22737a [turbofan] Make dangerous bitcasts effectful. | |
a97298b Use --untrusted-code-mitigations flag also for JS | |
2b4cc83 [builtins] Port EnqueueMicrotask to CSA. | |
204441b [wasm] Make some fields const in WasmGraphBuilder |
This file contains 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
--keep @**.MainDex class * { | |
- *; | |
-} | |
- | |
-keepclasseswithmembers class * { | |
public static ** asInterface(android.os.IBinder); | |
} | |
-# Required when code coverage is enabled. | |
--keep class com.vladium.** { |
This file contains 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
#pragma once | |
#include <stdint.h> | |
struct crc32 | |
{ | |
static void generate_table(uint32_t(&table)[256]) | |
{ | |
uint32_t polynomial = 0xEDB88320; | |
for (uint32_t i = 0; i < 256; i++) |
This file contains 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 GetWordOutline(docfilename) { | |
/** Get word document outlines | |
* @tag dev | |
* | |
* @param {filename} docfilename - .doc(x) file | |
* | |
*/ | |
var word = new ActiveXObject("Word.Application"); | |
var doc = word.Documents.Open(docfilename, false, true); |
This file contains 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
; 这个snippet实现在EMACS中左键点击用缺省浏览器打开,右键点击用FIREFOX打开。 | |
; 先要把org mode的右键功能禁用。(注意org mode 的mouse-3跟mouse-1并不一样,看你能否接受) | |
(add-hook 'org-mode-hook | |
(lambda () (org-defkey org-mouse-map [mouse-3] nil))) | |
; 建一个function绑定到mouse-3 | |
(add-to-list 'exec-path "c:/Program Files (x86)/Mozilla Firefox/") | |
(defun browse-url-at-mouse-with-firefox (event) | |
"browse the url with firefox" |