ZhangZisu's recent timeline updates
ZhangZisu's repos on GitHub
Vue · 32 watchers
pku-elective
PKU Elective | 北大傻瓜化自动选课
JavaScript · 10 watchers
answerstar
The most powerful user script for wjx.cn
Shell · 10 watchers
ocproxy-oci
OCI Image for https://github.com/cernekee/ocproxy
JavaScript · 6 watchers
wechat-uos
C · 5 watchers
homeworks
Homeworks and writeups at PKU
TypeScript · 5 watchers
pku-elective-lib
TypeScript · 3 watchers
openbrowsermcp
Vue · 3 watchers
zisu.dev
My website
TypeScript · 2 watchers
chi
Bring Geek Tools to General Users
Vue · 2 watchers
classroom-helper
Classroom helper
Rust · 2 watchers
forever
TypeScript · 2 watchers
nutrition
TypeScript · 2 watchers
pkutools
Dockerfile · 2 watchers
tunsocks
OCI Image for https://github.com/russdill/tunsocks
CSS · 1 watchers
assets
Shared static assets
TypeScript · 1 watchers
libpku
LibPKU
TypeScript · 1 watchers
node-sandbox-lxc
Sandbox to run untrusted programs using LXC w/ Podman
C · 1 watchers
pintos
The pintos source distribution for PKU Operating System Course projects
TypeScript · 1 watchers
telehole
TypeScript · 1 watchers
tgcloud
0 watchers
aoi
The Ultimate Online Judge Platform.
Vue · 0 watchers
aow-viewer
Previewer for ArchiveOnWeb format
0 watchers
archiver
Go · 0 watchers
bltrader
🤗 trader
0 watchers
browser-use
Make websites accessible for AI agents
TypeScript · 0 watchers
cfgkeeper
JavaScript · 0 watchers
cloudflare-ddns
Cloudflare Dynamic DNS
0 watchers
deno
A modern runtime for JavaScript and TypeScript.
MDX · 0 watchers
docs
JavaScript · 0 watchers
droidnode
Node-side launcher for Factory's droid CLI, sidesteps Bun 1.3.x standalone-init NULL-allocator crash on `droid --resume`
Rust · 0 watchers
EasyTier
A simple, decentralized mesh VPN with WireGuard support.
C++ · 0 watchers
elastic-todo-client
C · 0 watchers
esp32-cam-demo
Demo for ESP32 Cam
TypeScript · 0 watchers
fastify-typeful
Build Typeful REST API with Fastify
TypeScript · 0 watchers
git-repo-deploy-action
Deploy to Arbitrary Git Repo
0 watchers
gitea
Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
TypeScript · 0 watchers
github-api-proxy
CORS Proxy For Github API
TypeScript · 0 watchers
happypanda
Make sad panda happy
0 watchers
koishi
现代、高效的跨平台聊天机器人框架
Vue · 0 watchers
kpi
KPI Personal Infrastructure
0 watchers
libarchivejs
Archive library for browsers
Vue · 0 watchers
lymphedema-symptom-warning
Lymphedema Symptom Warning Tool
HTML · 0 watchers
mailer
TypeScript · 0 watchers
mc-herdr
Herdr integration plugin for MiMo Code
Go · 0 watchers
memos
An open source, lightweight note-taking service. Easily capture and share your great thoughts.
0 watchers
merge-pr-action
0 watchers
metapi
0 watchers
microsat
microsat
0 watchers
misc
0 watchers
moon-bridge
Moon Bridge 是一个用 Go 编写的协议转换与模型路由代理。对外暴露 OpenAI Responses API(/v1/responses),对内支持 Anthropic Messages、Google Gemini(GenAI)、OpenAI Chat Completions 等多种上游协议。客户端指定不同模型别名时,自动将请求路由到对应上游 Provider 并在协议间自动转换。
0 watchers
new-api
AI模型接口管理与分发系统,支持将多种大模型转为统一格式调用,支持OpenAI、Claude等格式,可供个人或者企业内部管理与分发渠道使用,本项目基于One API二次开发。🍥 The next-generation LLM gateway and AI asset management system supports multiple languages.
TypeScript · 0 watchers
nitro
Build and deploy universal web servers. The open engine powering Nuxt and open to everyone.
TypeScript · 0 watchers
nuxt-hono-monorepo
0 watchers
open-interpreter
A natural language interface for computers
0 watchers
overleaf
A web-based collaborative LaTeX editor
0 watchers
pinduoduo_backdoor
拼多多apk内嵌提权代码,及动态下发dex分析
0 watchers
PKUAutoElective
北大选课网补退选阶段自动选课小工具
Vue · 0 watchers
pkuhole
JavaScript · 0 watchers
pkulib-downloader
0 watchers
prettier
Prettier is an opinionated code formatter.
0 watchers
puppeteer-heap-snapshot
API and CLI tool to fetch and query Chome DevTools heap snapshots.
TypeScript · 0 watchers
rc9
Read/Write config couldn't be easier!
0 watchers
red-team-codespace
Codespace template for Red Teams
TypeScript · 0 watchers
rescuer
Rescue your web application
0 watchers
rolldown
Fast Rust bundler for JavaScript/TypeScript with Rollup-compatible API.
0 watchers
SCOW
Super Computing On Web
TypeScript · 0 watchers
scow-api
API for PKUHPC/SCOW
0 watchers
sink
TypeScript · 0 watchers
site
Shell · 0 watchers
skills
TypeScript · 0 watchers
sms-gateway
0 watchers
system-prompts-and-models-of-ai-tools
FULL v0, Cursor, Manus, Same.dev, Lovable, Devin & Replit Agent System Prompts, Tools & AI Models.
0 watchers
testrace
convenient to test your traceroute
0 watchers
tg
Local Telegram chat history CLI for macOS and Linux
0 watchers
thezzisu
0 watchers
tsinghua-lib-downloader
清华教参平台爬虫,仅供编程学习
CSS · 0 watchers
twentysixteen-z
TypeScript · 0 watchers
typeful-fetch
Fetch Endpoints with Types
Vue · 0 watchers
ucenter-plugin-pku332
Vue · 0 watchers
ucenter-plugin-pkuhole
JavaScript · 0 watchers
uomtiles
Cloudflare Workers serve for UOM 适飞 (CAAC airspace) + DJI flysafe overlay — XYZ/WMS/WMTS
0 watchers
zurk
A generic process spawner
Shell · 0 watchers
zzshell
Shell theme for zsh and posh
ZhangZisu

ZhangZisu

CODE IS PHILOSOPHY
🏢  镇海中学 / 学生
V2EX member #384448, joined on 2019-02-16 16:26:24 +08:00
ZGVsdXNpb24=
ZhangZisu's recent replies
May 30, 2021
Replied to a topic by Rrrrrr Vue.js Vue 回复组件提问
既然有循环,还是用 inject/provide 或 vuex 记录显示的 ID 。或者用 event hub 每开一个新的让其他的关闭
May 24, 2021
Replied to a topic by ZhangZisu 程序员 开发者的友链接力-Dev2Dev
@xoxo419 Cloudflare Pages 好像有 gfw 干扰……
备用域名
https://dev2dev.zisu.dev
https://dev2dev.netlify.app
@ipwx 对,是一个大哈希表更好。

如果完整建 trie 是难以承受的。如果只建前几层,后面挂链表遍历,空间时间权衡一下应该也还行。
直接用 stl 就够了。

C++ unordered_map: 150MB
C++ map: 155MB
```cpp
std::unordered_map<std::string, int> hmap;
// std::map<std::string, int> hmap;

const char *charset = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+=";

int main()
{
for (int i = 0; i < 1000000; i++)
{
std::string str;
for (int j = 0; j < 64; j++)
str += charset[(int)(1. * rand() / RAND_MAX * 64)];
int val = rand();
hmap[str] = val;
}
int mem = getValue();
printf("Total memory in KB: %d\n", mem);
return 0;
}

```
@ZhangZisu 说错了,应该是用前三个字符建树,复杂度是 O(64*3)(平均链表长度为 3 )。

不过直接用 C++的 hashmap 应该就够了。(或者 map )

或者直接上 redis
理论只要 (64+4)*1000000/1024/1024~=64M
考虑直接 c 手写 trie 实现。若为 base64,前 2 位建树,挂链表。时间复杂度 O(64),占用空间比 64m 大个 2m ( 64*64*64*8/1024/1024 )
May 23, 2021
Replied to a topic by ZhangZisu 程序员 开发者的友链接力-Dev2Dev
@rayluo 高考改革取消,不是金牌自主招生根本没优势…只能走高考,自暴自弃 (浙江)
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2906 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 27ms · UTC 01:56 · PVG 09:56 · LAX 18:56 · JFK 21:56
♥ Do have faith in what you're doing.