Skip to content

Instantly share code, notes, and snippets.

View wibus-wee's full-sized avatar
📚
Learning

Wibus wibus-wee

📚
Learning
View GitHub Profile
@wibus-wee
wibus-wee / 🔗 Coding Language
Last active January 16, 2022 12:01
Coding Language
TypeScript 23 hrs 16 mins ███████████████▉░░░░░ 75.6%
JavaScript 3 hrs 1 min ██░░░░░░░░░░░░░░░░░░░ 9.8%
JSON 1 hr 22 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.5%
CSS 1 hr 14 mins ▊░░░░░░░░░░░░░░░░░░░░ 4.0%
Markdown 44 mins ▌░░░░░░░░░░░░░░░░░░░░
@wibus-wee
wibus-wee / Wibus's GitHub Stats
Last active March 16, 2022 12:17
💻 My GitHub Stats
⭐ Total Stars: 103
➕ Total Commits: 1.4k
🔀 Total PRs: 8
🚩 Total Issues: 36
📦 Contributed to: 19
@wibus-wee
wibus-wee / Getter,Setter and super() Example.ts
Created January 23, 2022 13:04
It shows the use of getters, setters, and super() in TypeScript And the distinction between protected and private
class Person {
constructor(public name: string) {}
}
class People extends Person {
constructor(public age: number) {
super('here is my name') // super() is used to call the constructor of the parent class
}
}
let url = 'https://quest.myxxts.club/api/count'
let data = await fetch(url).then((res) => {return res.text()})
document.getElementById('test').innerHTML = await data
@wibus-wee
wibus-wee / ChangeLog Package.json
Created February 27, 2022 05:39
这是一份包含了 cz-conventional-changelog 包的package.json 默认版本为 3.3.0 也属于是稳定版本了 但是要先安装了 commitizen, conventional-changelog-cli(使用npm)
{
"name": "xxxx",
"scripts": {
"commit": "git add . && cz && git push",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"init:Cli": "npm install -g commitizen && npm install -g conventional-changelog-cli && brew install cloc",
},
"devDependencies": {
"cz-conventional-changelog": "3.3.0"
},
@wibus-wee
wibus-wee / Typecho Execute to TypeScript.ts
Last active April 12, 2022 09:33
Translate Typecho to TypeScript
/*
* @FilePath: /typecho 1.2.0-rc.1/Users/wibus/Desktop/test.ts
* @author: Wibus
* @Date: 2022-04-05 18:12:47
* @LastEditors: Wibus
* @LastEditTime: 2022-04-05 18:12:47
* Coding With IU
*/
export function execute() {
if (!this.parameter.parentId) { // 如果没有指定父级,则不需要进行execute
@wibus-wee
wibus-wee / ASCII-CAM.html
Created April 13, 2022 10:11
with ASCII-CAM.js, Fork from @iveseenthedatk
<html lang="en"><head>
<meta charset="UTF-8">
<meta name="author" content="iveseenthedark">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#333333">
<title>A S C I I C A M</title>
<style>#ascii-cam pre,body,html{width:100vw;height:100vh;margin:0}*{box-sizing:border-box}body{overflow:hidden;background-color:#000;color:#eee;font-family:monospace}#logo,#enable-cam-msg{transform:translate(-50%,-50%);position:absolute;left:50%;top:50%}.fade{transition:opacity 0.25s ease-in-out}#logo{line-height:1.5}#ascii-cam{opacity:0}#ascii-cam pre{position:absolute;top:0;left:0;overflow:hidden;line-height:0.6;user-select:none;mix-blend-mode:screen;font-size:1.2em;font-size:2vh}@media (max-height:50em){#ascii-cam pre{font-size:1em}}@media (min-height:60em){#ascii-cam pre{font-size:1.2em}}#ascii-cam #r-output{color:red}#ascii-cam #g-output{color:#0f0}#ascii-cam #b-output{color:#00f}#enable-cam-msg{opacity:0;font-size:3rem;background-color:white;color:
@wibus-wee
wibus-wee / ASCII-CAM.js
Created April 13, 2022 10:11
Fork from @iveseenthedatk
/**
* ASCII - CAM
* Fork from @iveseenthedatk
* https: //hellogithub.com/onefile/code/126093303b6b414dbab9d623c957fdd4
**/
(() => {
'use strict';
let interval; // 用于记录定时器的id
let r_layer, g_layer, b_layer; // 用于记录每个颜色通道的canvas
const collection1 = [ 1, 2, 3, 4 ];
const collection2 = [ 1, 2, 3, 4, 5 ];
// 比较两个集合的长度
// 如果集合1的长度小于集合2的长度,意味着集合1有可能是集合2的子集(如果集合1的元素都在集合2中)
// 反之,意味着集合1有可能是集合2的父集(如果集合2的元素都在集合1中)
// 但是无论如何,判断长度后都需要判断是否有交集
function compareLength(collection1, collection2) {
if (collection1.length < collection2.length) {
return -1;
# 分别输出百十个位数字
num = input("请输入一个数字:") # 输入一个数字
num = int(num) # 将字符串转换为整数
# 作答区域 1. 常规运算
print("---常规运算--- ps: num的类型是int")
print("百位数字是:", num // 100) # 取整数
print("十位数字是:", num // 10 % 10) # 取余数
print("个位数字是:", num % 10) # 取余数
# 结束作答