shadowkimi520 / one_algorithm_one_day Goto Github PK
View Code? Open in Web Editor NEW每天一道算法题
每天一道算法题
- 通过HTTPS方式 clone 的仓库每次提交都需要输入用户名/密码,这样比较麻烦;可以修改为通过 SSH 方式提交;
- 生成SSH的密钥对,把公钥拷贝到 GitHub 个人配置当中去;
- 通过
git remote set-url origin [email protected]:user_name/repository_name.git
修改远程库的访问方式
- 我们在访问 GitHub 时,均是通过 GitHub 提供的对每个repository 中的目录或者文件的 web 页面,GitHub 在后端会处理 md 文件,并对其中的代码进行固定方式的高亮显示;
- 可以通过 highlight.js 提供的 js 和 css 文件修改默认的高亮方式;
- 当前 repository 中在配置 highlight.js 时进行了配置,使得所有的代码都自动推导为 c# ,因为我想用 GitHub 的样式文件中为 c# 代码提供的 font-style: italic ,谁让我中意你呢。当然,也可以把 highlight 中对应的 css 文件下载到本地,然后直接修改该样式文件获得该效果,谁让我不想改呢,谁让我想追求完美呢!
- GitHub的 ```js 语法仅仅是在生成 html 文件的最外层标签中添加
language-js class
,并不会影响 highligth.js的 automatic language detection;而通过直接使用<pre><code></code></pre>
的方式,GitHub直接按 html 解析,并不会在外面在包裹一层 class 属性为 "highlight" 的<div>
,导致我想要的 font-style: italic 又适用不到了。因此,在 md 文件里,保留使用 ```js 来表示JS代码,highlight.js 配置的时候 hljs.configure({languages: ['cs']}) 仅自动推导到csharp.
- GitHub 的 markdown 文件在生成对应的 html 文档时会给每个 # 表示的标题添加对应的 id 属性,属性值为标题的文本;这样就不需要用另外的 标签包裹标题。
- 如果使用 标签包裹标题,则 GitHub 在项目主页中丢弃该 id 属性,改用自身设置的 id 值;而通过 GitHub Pages的方式访问该项目的 GitHub repository 的时候会采用自定义的 id。为了在两种情况下都能使用锚链接,直接采用 GitHub 生成 id 值即可。(注意 GitHub 在生成 id 时的特殊处理,比如 '#' ':' '/' 等符号都丢弃,空格用 '-' 代替)
- GitHub 会使用生成的 id 属性来进行导航,从而点击该标题的时候可以将其滚动到视口的最顶端(所以我们将鼠标移动到一个标题上的时候会出现一个超链接一样的图标)。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.