From 541a5f65aceff312cf862a1f4cd419d9c6326280 Mon Sep 17 00:00:00 2001 From: lmj01 Date: Fri, 29 Mar 2024 17:32:19 +0800 Subject: [PATCH] update --- cg/Color.md | 14 +++++++++++++- cpl/c.md | 6 +++++- dev-note/git.md | 22 ++++++++++++++++------ html/pinyin.html | 1 + index/community.md | 10 ++++++++-- web/css.md | 10 ++++++++++ 6 files changed, 53 insertions(+), 10 deletions(-) diff --git a/cg/Color.md b/cg/Color.md index 5b58597..c1be971 100644 --- a/cg/Color.md +++ b/cg/Color.md @@ -66,7 +66,19 @@ HDR高动态范围High dynamic range,就是添加更多的动态范围到图 - 明度Brightness、Value - 辉度Luma,把使用色觉校正的结果称为辉度 -## JS +## web-color + +在canvas中或CSS中,可以使用某个属性来表示颜色,纯色、渐变色等 +```js +// CanvasRenderingContext2D.strokeStyle property of the Canvas 2D API specifies the color, gradient, or pattern to use for the strokes (outlines) around shapes. +const canvasGradient = ctx.createLinearGradient(50, 50, 250, 50); +canvasGradient.addColorStop(0, 'blue'); +canvasGradient.addColorStop(0.2, 'green'); +canvasGradient.addColorStop(1, 'red'); +ctx.strokeStyle = canvasGradient; +``` + +### JS - [iro-core实现了颜色的转换核心](https://github.com/irojs/iro-core) - [Using JavaScript to Adjust Saturation and Brightness of RGB Colors](https://css-tricks.com/using-javascript-to-adjust-saturation-and-brightness-of-rgb-colors/#top-of-site) diff --git a/cpl/c.md b/cpl/c.md index 014e19f..2081450 100644 --- a/cpl/c.md +++ b/cpl/c.md @@ -28,4 +28,8 @@ base_s *base = (base_s*)parent; linux内核中使用的C语言的面向对象的设计思考参考 - [Object-oriented design patterns in the kernel, part 1](https://lwn.net/Articles/444910/) -- [Object-oriented design patterns in the kernel, part 2](https://lwn.net/Articles/446317/) \ No newline at end of file +- [Object-oriented design patterns in the kernel, part 2](https://lwn.net/Articles/446317/) + +## 工具 + +- [build-once run-anywhere c library可移植portable的C库编译工具](https://github.com/jart/cosmopolitan) \ No newline at end of file diff --git a/dev-note/git.md b/dev-note/git.md index 27d0f6c..abdbbeb 100644 --- a/dev-note/git.md +++ b/dev-note/git.md @@ -37,7 +37,6 @@ 分支 - git branch -d 删除本地分支 - git push origin --delete 删除远程分支 -- git checkout -b // git checkout -b dev-local origin/dev 从远程dev分支创建本地分支dev-local - git branch -m newName 在当前分支 - git branch -m oldName newName 修改不在旧分支上 - git push --delete origin oldName 删除远程分支 @@ -45,11 +44,6 @@ - git remote add upstream repo-url 添加上游仓库地址 - git fetch upstream 从上游更新 - git merge upstream/branch-name 合并上游分支到本地,如果出现**fatal: refusing to merge unrelated histories**, 是两个库的commit历史不同,放在错误的设置,加上--allow-unrelated-histories即可 -- git remote prune origin 删去本地显示远程已经删除的分支 -- git checkout --orphan branchName // 创建空的分支 - - git rm -rf . // 删除当前目录下的文件 - - 添加新的文件 - ### [stash](https://www.git-scm.com/docs/git-stash) @@ -66,6 +60,19 @@ - git diff parentCommitId commitId src/path/file.xxx > logYYYYMMDD.log - git diff branch1 branch2 --stat +## 分支 + +### git checkout + +- git checkout --orphan branchName // 创建空的分支 + +- git checkout -b [] +基于存在的分支创建,未指定即当前分支 +相当于执行git branch 和git checkout 命令组合 + +- git checkout -b feature-branch origin/feature-branch +创建并切换到远程分支 + ## 配置 ### config @@ -147,9 +154,12 @@ git reset --hard commit-id 回滚分支XXX上的某个提交点 - git rebase 以服务器远程仓库为基准 ## 删除 + +- git remote prune origin 删去本地显示远程已经删除的分支 - git rm --cached file.ext 删除file.ext的跟踪, 并保留本地的 - git rm -f file.ext 删除跟踪,并删除本地文件 - git rm --cached modulename 删除子模块 +- git rm -rf . // 删除当前目录下的文件 子模块删除 - 删除.gitsubmodule里的那一部分 diff --git a/html/pinyin.html b/html/pinyin.html index d904d32..0ff6257 100644 --- a/html/pinyin.html +++ b/html/pinyin.html @@ -23,6 +23,7 @@

拼音

爱发音
+
aspoem.com

汉字转换拼音

diff --git a/index/community.md b/index/community.md index 39db83b..9dccd3b 100644 --- a/index/community.md +++ b/index/community.md @@ -62,7 +62,13 @@ SWIG is a software development tool that connects programs written in C and C++ languages including common scripting languages such as Javascript, Perl, PHP, Python, Tcl and Ruby. -## DICOM +### DICOM - IODs Information Object Definitions信息对象定义 -- SOPs Service-Object Pairs服务对象配对, \ No newline at end of file +- SOPs Service-Object Pairs服务对象配对, + +## 开源Tools + +- [这是一款开源、多语言、自托管的项目管理工具,兼容了 Trello 和 Notion 的特点](https://www.focalboard.com/) + - [github](https://github.com/mattermost/focalboard) +- [款开源、安全、跨平台的密码管理器。该项目是采用 C++ 开发的免费、离线、无广告的密码管理工具](https://github.com/keepassxreboot/keepassxc) \ No newline at end of file diff --git a/web/css.md b/web/css.md index f86d168..6a18d15 100644 --- a/web/css.md +++ b/web/css.md @@ -201,6 +201,16 @@ div { border-image: linear-gradient(90deg, #B3ADD3 0%, #96BED7 21%, #EB9582 41%, #C3C68C 62%, #FAACAC 81%, #FED09F 99%) 1; ``` +### Sprite + +也称雪碧图,是一种图像合成技术,使用时截取一部分。这种技术减少了请求资源与避免 +```css +background-image: url('sprite.png'); +background-position: 60px 60px; +width: 48px; +height: 48px; +``` + ## Tools ### WebAIM:web accessibility in mind