Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lmj01 committed Mar 29, 2024
1 parent 4067834 commit 541a5f6
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 10 deletions.
14 changes: 13 additions & 1 deletion cg/Color.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion cpl/c.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
- [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)
22 changes: 16 additions & 6 deletions dev-note/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,13 @@
分支
- git branch -d <branch_name> 删除本地分支
- git push origin --delete <branch_name> 删除远程分支
- git checkout -b <branch_local> <branch_remote> // git checkout -b dev-local origin/dev 从远程dev分支创建本地分支dev-local
- git branch -m newName 在当前分支
- git branch -m oldName newName 修改不在旧分支上
- git push --delete origin oldName 删除远程分支
- git push origin newName 把本地新的分支推送到远程
- 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)

Expand All @@ -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 <new-branch-name> [<existing-branch>]
基于存在的分支创建,未指定即当前分支
相当于执行git branch 和git checkout 命令组合

- git checkout -b feature-branch origin/feature-branch
创建并切换到远程分支

## 配置

### config
Expand Down Expand Up @@ -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里的那一部分
Expand Down
1 change: 1 addition & 0 deletions html/pinyin.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<div class="container-xl d-flex flex-column">
<h1>拼音</h1>
<h6><a class="mx-3" href="https://fayin.love/">爱发音</a></h6>
<h6><a class="mx-3" href="https://aspoem.com/zh-Hans">aspoem.com</a></h6>
<div class="w-100 d-flex flex-column">
<h4 id="section1">汉字转换拼音</h4>
<div class="w-100 d-flex my-3 flex-column justify-content-evenly">
Expand Down
10 changes: 8 additions & 2 deletions index/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -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服务对象配对,
- SOPs Service-Object Pairs服务对象配对,

## 开源Tools

- [这是一款开源、多语言、自托管的项目管理工具,兼容了 Trello 和 Notion 的特点](https://www.focalboard.com/)
- [github](https://github.com/mattermost/focalboard)
- [款开源、安全、跨平台的密码管理器。该项目是采用 C++ 开发的免费、离线、无广告的密码管理工具](https://github.com/keepassxreboot/keepassxc)
10 changes: 10 additions & 0 deletions web/css.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 541a5f6

Please sign in to comment.