会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Ajanuw
做自己的King
博客园
首页
管理
上一页
1
2
3
4
5
6
7
···
40
下一页
2021年9月15日
dayjs 使用笔记
摘要: 全局配置 local 和 插件,通常在你的入口函数中调用 import dayjs from "dayjs"; import weekday from "dayjs/plugin/weekday"; import "dayjs/locale/zh-cn"; // config dayjs dayjs
阅读全文
posted @ 2021-09-15 12:37 Ajanuw
阅读(1585)
评论(0)
推荐(0)
2021年9月13日
TypeScript: 创建单例
摘要: 在创建单例时,你可能会偷懒创建下面这样的代码 class A { static ins: A; arr = []; constructor() { return (A.ins ??= this); } } 上面的代码能创建单例,但是你却发现编译后的es6代码却是这鸟样 class A { const
阅读全文
posted @ 2021-09-13 20:21 Ajanuw
阅读(120)
评论(0)
推荐(0)
2021年9月4日
Uniapp: H5 压缩图片
摘要: uni.chooseImage... uni.getImageInfo({ src: res.tempFilePaths[0], success: (res) => { const blobUrl = res.path; const canvas = document.createElement("
阅读全文
posted @ 2021-09-04 07:32 Ajanuw
阅读(931)
评论(0)
推荐(1)
2021年8月3日
c++ win32 遍历进程列表
摘要: 使用 CreateToolhelp32Snapshot #include <iostream> #include <Windows.h> #include <TlHelp32.h> #include <Psapi.h> int main() { HANDLE hSnap = CreateToolhe
阅读全文
posted @ 2021-08-03 16:31 Ajanuw
阅读(450)
评论(0)
推荐(0)
React Prompt组件 阻止用户离开页面
摘要: import { Prompt } from "react-router-dom"; const Login = () => { return ( <> <Prompt message={(location, action) => { // 返回 true 表示不拦截, 你可也检查当前页面数据,提示
阅读全文
posted @ 2021-08-03 14:59 Ajanuw
阅读(557)
评论(0)
推荐(0)
2021年8月1日
JS 浏览器上生成 UUID API
摘要: console.log( window.crypto.randomUUID() ) See also: crypto.randomUUID()
阅读全文
posted @ 2021-08-01 09:44 Ajanuw
阅读(405)
评论(0)
推荐(0)
2021年7月18日
vim 命令行 格式化文件缩进
摘要: 格式化单文件 $ vim s.perl -c 'normal! gg=G' -c ':wq!' 多文件,手动退出 $ vim -c ':bufdo execute "normal! gg=G" | update' ./*
阅读全文
posted @ 2021-07-18 14:17 Ajanuw
阅读(80)
评论(0)
推荐(0)
2021年6月11日
HBuilderX 修改默认的终端
摘要: 修改D:\dev\tool\HBuilderX\plugins\builtincef3terminal\script\main.js文件 大概16行的位置 if(isWin){ shell = 'D:\\dev\\tool\\cmder\\vendor\\git-for-windows\\bin\\
阅读全文
posted @ 2021-06-11 17:47 Ajanuw
阅读(1093)
评论(0)
推荐(0)
2021年6月9日
LLVM 工具使用
摘要: opt opt -S -instcombine src.ll -o out.ll 使用instcombine参数优化ll,很像LLVM PASS 优化器 更多的优化可以查看 opt -h clang clang.exe -emit-llvm -S main.c -o main.ll 将c代码编译为L
阅读全文
posted @ 2021-06-09 17:07 Ajanuw
阅读(438)
评论(0)
推荐(0)
2021年6月8日
LLVM 获取Value Type
摘要: void llvtype(std::string_view k, Value* v) { std::cout << std::format("{}:{}:{}", k, (int)v->getType()->getTypeID(), v->getName().str() ) << "\n"; } .
阅读全文
posted @ 2021-06-08 18:27 Ajanuw
阅读(217)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
40
下一页