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 it(o) { | |
const l = Object.keys(o.n).length; | |
if (l === 0) return o.c; | |
if (l === 1) return `${o.c||''}${Object.keys(o.n).map(x => it(o.n[x])).join('|')}`; | |
return `${o.c||''}(${Object.keys(o.n).map(x => it(o.n[x])).join('|')})`; | |
})(["123", "124", "abc"].reduce((o, s) => { | |
s.split('').reduce((oo, c) => { | |
oo.n[c] ||= { c, n: {} }; | |
return oo.n[c]; | |
}, o); |
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
JSON +955/ -0 █████████████████████100.0% |
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
⭐ Total Stars: 75 | |
➕ Total Commits: 3,129 | |
🔀 Total PRs: 25 | |
🚩 Total Issues: 88 | |
📦 Contributed to: 4 |
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 axios = require('axios'); | |
const ffmpeg = require('fluent-ffmpeg'); | |
const http = require('http'); | |
const server = http.createServer((req, resp) => { | |
const parts = req.url.split('?'); | |
const url = parts.slice(1).join('?'); | |
axios({ | |
method: 'get', | |
url, |
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
let data = require('./data.json'); | |
data = data.filter(d => | |
d.timestamp > +new Date(2019,5,17,0) && d.timestamp < +new Date(2019,5,18,0)).sort((d1, d2) => d1.timestamp - d2.timestamp); | |
const json = { | |
title: { text: 'mem usage' }, | |
tooltip: { trigger: 'axis' }, | |
legend: { data: null }, | |
xAxis: { | |
type: 'category', |
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
# -*- coding: utf-8 -*- | |
import mysql.connector | |
from docx import Document | |
db = 'lanyun' | |
host = 'localhost' | |
user = 'root' | |
password = 'lanyun' | |
port = 3306 |
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
/* | |
* // USAGE | |
* interface TestEvent { | |
* pass_string: string; | |
* pass_number: number; | |
* not_pass: void; | |
* } | |
* | |
* class TestClass extends EventEmitter {} | |
* const test: StrictEventEmitter<EventEmitter, TestEvent> = new TestClass(); |
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="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> | |
<textarea id="input"></textarea> |
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
CREATE OR REPLACE FUNCTION convert_id() RETURNS void AS $$ | |
DECLARE | |
len integer DEFAULT 0; | |
t integer DEFAULT 0; | |
num integer DEFAULT 0; | |
i integer DEFAULT 0; | |
e varchar(70) DEFAULT ''; | |
result varchar(70) DEFAULT ''; | |
cur CURSOR FOR SELECT id, enemy FROM drop_records; | |
BEGIN |
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
require 'net/http' | |
require 'timeout' | |
require 'cgi' | |
$username = 'xxxxxx' | |
$password = 'xxxxxx' | |
$classes = [ | |
{ | |
'id' => '3311100933', | |
'name' => '研究生英语科技写作', |
NewerOlder