Skip to content

Instantly share code, notes, and snippets.

View acmu's full-sized avatar
📖
Do awesome things~

MingYuan acmu

📖
Do awesome things~
View GitHub Profile
@acmu
acmu / j1.java
Created March 20, 2022 15:31
Java 继承示例代码
public class Penguin {
private String name;
private int id;
public Penguin(String myName, int myid) {
name = myName;
id = myid;
}
public void eat(){
System.out.println(name+"正在吃");
}
const p = new Promise((resolve, reject) => {
setTimeout(() => {
resolve();
}, 1000);
});
p.then(() => console.log(3)).then(() => console.log(4));
p.then(() => console.log(1));
p.then(() => console.log(2));
@acmu
acmu / bookmarks_2019_6_25.html
Created June 25, 2019 00:01
s12@g 账号 书签
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1561344241" LAST_MODIFIED="1561390726" PERSONAL_TOOLBAR_FOLDER="true">书签栏</H3>
<DL><p>
@acmu
acmu / settings.json
Created June 18, 2019 02:23
vsc settings
{
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"editor.fontSize": 19,
"editor.tabSize": 2,
"workbench.statusBar.feedback.visible": false,
"window.menuBarVisibility": "default",
"workbench.sideBar.location": "left",
"telemetry.enableTelemetry": false,
"files.insertFinalNewline": true,
"files.associations": {
@acmu
acmu / tem.html
Created March 22, 2019 16:12
css 三列布局
<div class="container">
<div class="left">left</div>
<div class="middle">
测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试
</div>
<div class="right">right</div>
</div>
@acmu
acmu / twoSum.js
Last active March 21, 2019 15:38
前端面试算法题
const nums = [2, 7, 11, 15],
target = 9
/**
* 二分查值
*
* @param {Array} arr the data
* @param {nubmer} left the start index
* @param {number} right the end index
* @param {number} val the target value
@acmu
acmu / Array.prototype.mul.js
Created March 10, 2019 03:55
给Array加函数
const arr = Array.from({ length: 5 }).map((v, i) => i + 1)
console.log(arr)
Array.prototype.mul = function() {
return [...this, ...this.map(v => v * v)]
}
console.log(arr.mul(), arr)
@acmu
acmu / ownkeys.js
Created February 12, 2019 03:50
Reflect.ownKeys( function )
let func = (a, b, c) => {
return 1
}
Reflect.ownKeys(func).forEach(k => {
console.log(k, func[k])
})
// length 3
// name func