sudo apt install openjdk-8-jdk-headless
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
commit 7a78c009c4b073f90b97d9111b14ffd84662fb5e | |
Author: Gaubee <GaubeeBangeel@Gmail.com> | |
Date: Thu Dec 28 13:12:27 2023 +0800 | |
:bug: [kmp/core] 修复IpcBodySender的from函数延迟赋值metaBody的问题 | |
commit 40d88f0face4e374ffcae31992205fcda12e741f | |
Author: jackie-yellow <hl19081555@gmail.com> | |
Date: Thu Dec 28 09:45:23 2023 +0800 |
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 bin2hex (bin) | |
{ | |
var i = 0, l = bin.length, chr, hex = ''; | |
for (i; i < l; ++i) | |
{ | |
chr = bin.charCodeAt(i).toString(16) | |
hex += chr.length < 2 ? '0' + chr : chr | |
} | |
return hex | |
} |
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 { MongoClient } from 'mongodb'; | |
const url = 'mongodb://localhost:27017'; | |
const dbName = 'test-set'; | |
import { ConsolePro } from "console-pro"; | |
const console = new ConsolePro(); | |
/**等待n毫秒 */ | |
function sleep(ms: number) { | |
return new Promise(cb => setTimeout(cb, ms)); | |
} |
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
const color_flag_reg = /((\u001b\[\d+m)+)([\s\S]+?)((\u001b\[\d+m)+)/; | |
s.replace(color_flag_reg, "$3"); |
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
"use strict"; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
const cluster = require("cluster"); // const cluster = require("cluster") | |
const os = require("os"); // const os = require("os") | |
/* Share code */ | |
const prepare_job_promise = new Promise((resolve, reject) => { | |
// bootstrap modules | |
setTimeout(resolve, 1000); | |
}); | |
// or write like this |
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 { Directive, ElementRef, Input } from '@angular/core'; | |
import { Content, Platform } from 'ionic-angular'; | |
import { Keyboard } from '@ionic-native/keyboard'; | |
import { Subscription } from 'rxjs/rx'; | |
/** | |
* @name KeyboardAttachDirective | |
* @description | |
* The `keyboardAttach` directive will cause an element to float above the | |
* keyboard when the keyboard shows. Currently only supports the `ion-footer` element. |
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
// __op_temp_null_: 说明缓存取中没有东西 | |
Object.defineProperty(global, "__op_temp_null_", { | |
value: Symbol("Operators Object NULL") | |
}); | |
const op_temp_key = Symbol("Operators Object TEMP"); | |
Object.defineProperty(global, "__op_temp__", { | |
get() { | |
const res = this[op_temp_key]; | |
// 取值后马上移除引用关系 | |
this[op_temp_key] = global.__op_temp_null_; |
NewerOlder