fix(guide): Fix all frontmatter

This commit is contained in:
Bouncey
2018-10-19 13:53:51 +01:00
committed by Stuart Taylor
parent 569bd7c3a7
commit 6d511c558a
146 changed files with 926 additions and 1469 deletions

View File

@@ -1,5 +1,5 @@
---
title : Features of BlockTech
title: Features of BlockTech
localeTitle: BlockTech的特点
---
## 区块链技术的特点

View File

@@ -1,5 +1,6 @@
---
title: Smart Contracts
localeTitle: undefined
localeTitle: Smart Contracts
---
## 智能合约

View File

@@ -1,5 +1,5 @@
---
title : Types of Blockchain
title: Types of Blockchain
localeTitle: 区块链的类型
---
![Blockchain](https://github.com/Vagisha16/Hw3/blob/master/blockchain-what-and-why-19-638.jpg?raw=true)

View File

@@ -1,6 +1,6 @@
---
title: Create a Gradual CSS Linear Gradient
localeTitle: 创建渐进的CSS线性渐变
---
title: Create a Gradual CSS Linear Gradient
localeTitle: 创建渐进的CSS线性渐变
---
##创建渐进式CSS线性渐变
@@ -8,7 +8,7 @@
语法总是:
```
background-image: linear-gradient(angle, color-stop1, color-stop2);
background-image: linear-gradient(angle, color-stop1, color-stop2);
```
颜色可以以hex和rgb格式使用。尝试一下你会明白使用它是多么容易和美丽。

View File

@@ -1,18 +1,21 @@
title: Add a Submit Button to a Form
localeTitle: undefined
--- ## 向表单添加提交按钮
---
title: Add a Submit Button to a Form
localeTitle: 向表单添加提交按钮
---
## 向表单添加提交按钮
在此挑战中,您希望将提交按钮作为表单的最后一个元素(在`</form>`结束标记之前)插入,并为其提供属性`type="submit"` (全部小写)和文本内容“提交” “(第一个字母大写),在挑战指令中指定。
1属性`type` `submit`值也在`input`标记内有效,它将呈现具有几乎相同行为的按钮,但这不是您要在此挑战中使用的标记。
```
<input type="submit">
<input type="submit">
```
如果您未指定值,则该按钮将具有您的用户代理选择的默认值(通常这类似于“提交”或“提交查询”)。
如果您希望指定类似“发送请求”的值,您可以这样做:
```
<input type="submit" value="Send Request">
<input type="submit" value="Send Request">
```

View File

@@ -1,5 +1,5 @@
---
title: Heroku
title: Heroku
localeTitle: Heroku的
---
\## Heroku

View File

@@ -1,5 +1,5 @@
---
title: Rackspace Cloud
title: Rackspace Cloud
localeTitle: Rackspace Cloud
---
\## Rackspace Cloud

View File

@@ -1,32 +0,0 @@
Types of Motherboards. Motherboards come in different sizes, known as form factors. The most common motherboard form factor is ATX. The different types of ATX are known as micro-ATX (sometimes shown as µATX, mini-ATX, FlexATX, EATX, WATX, nano-ATX, pico-ATX, and mobileATX).localeTitle: 母板
---
## 标题:主板
## 母板
主板是连接层允许计算机的组件相互交互。主板通常具有用于随机存取存储器RAM硬盘驱动器图形处理单元GPU和中央处理单元CPU的连接。在台式机中主板是所有这些组件都连接到的物理板。然而在笔记本电脑中由于笔记本电脑的空间限制主板通常集成了一些这些组件。
主板为计算机的组件提供电源和连接并充当所有组件间通信的交换机。例如如果CPU需要处理存储在RAM中的信息则主板提供CPU和RAM之间的连接称为存储器总线以允许数据访问。主板包括用于扩展卡包括GPURAM和硬盘驱动器的总线。
主板的顶级制造商是INTELASUSACERGIGABYTEIBMSIMMTRONICS等等。
## 主板的部分
如果你打开电脑并取出主板,你可能会对所有不同部分感到困惑。根据计算机的品牌和型号,它可能看起来像这样。 要了解计算机的工作原理,您无需了解主板的每个部件。但是,了解一些更重要的部件以及主板如何将计算机系统的各个部分连接在一起是很好的。以下是一些典型的部分:
* CPU插槽 - 实际CPU直接焊接到插槽上。由于高速CPU会产生大量热量因此CPU插槽旁边的风扇有散热片和安装点。 请注意CPU仅支持单个插槽类型因此它与主板插槽匹配才能工作。套接字类型通常每隔几代就会更改一次并且每个标签也会有所不同消费级CPUHEDT服务器CPU
* 用于将电源分配给CPU和其他组件的电源连接器。
* 系统主存储器的插槽通常采用DRAM芯片的形式。
* 芯片形成CPU主存储器和其他组件之间的接口。在许多类型的主板上这被称为北桥。该芯片还包含一个大型散热器。近年来北桥的功能已越来越多地集成到CPU本身中。
* 第二个芯片控制输入和输出I / O功能。它不直接连接到CPU而是连接到北桥。该I / O控制器称为南桥。北桥和南桥的组合被称为芯片组。
* 几个连接器,提供输入和输出设备与主板之间的物理接口。南桥处理这些连接。
* 用于存储文件的一个或多个硬盘驱动器的插槽。最常见的连接类型是集成驱动电子设备IDE和串行高级技术附件SATA
* 只读存储器ROM芯片包含固件或计算机系统的启动指令。这也称为BIOS。
* 用于视频或图形卡的插槽。有许多不同类型的插槽包括加速图形端口AGP和外围组件互连高速PCIe。 附加插槽用于连接外围组件互连PCI插槽形式的硬件。
#### 更多信息:
* [母板](https://www.computerhope.com/jargon/m/mothboar.htm)
* [芯片组(维基百科)](https://en.wikipedia.org/wiki/Chipset)
主板类型。 主板有不同的尺寸称为外形尺寸。最常见的主板外形是ATX。不同类型的ATX被称为micro-ATX有时显示为μATXmini-ATXFlexATXEATXWATXnano-ATXpico-ATX和mobileATX

View File

@@ -1,5 +1,5 @@
---
title:Switch Statement
title: Switch Statement
localeTitle: undefined
---
switch语句允许测试变量与值列表的相等性。每个值都称为一个案例并且针对每种情况检查要打开的变量。

View File

@@ -1,5 +1,5 @@
---
title:While-loop
title: While-loop
localeTitle: undefined
---
只要给定条件为真while循环语句就会重复执行目标语句。
@@ -11,21 +11,21 @@ while循环的一个关键点是循环可能永远不会运行。 当测试条
例:
```C++
#include <iostream>
using namespace std;
int main () {
// Local variable declaration:
int a = 10;
// while loop execution
while( a < 20 ) {
cout << "value of a: " << a << endl;
a++;
}
return 0;
}
#include <iostream>
using namespace std;
int main () {
// Local variable declaration:
int a = 10;
// while loop execution
while( a < 20 ) {
cout << "value of a: " << a << endl;
a++;
}
return 0;
}
```
输出:

View File

@@ -1,5 +1,5 @@
---
title : Interface
title: Interface
localeTitle: 接口
---
* * *
@@ -29,11 +29,11 @@ localeTitle: 接口
接口示例:
```csharp
public Interface IUserFavoriteFood
{
void AddFood();
Task<User> EatFavoriteFood(int id);
}
public Interface IUserFavoriteFood
{
void AddFood();
Task<User> EatFavoriteFood(int id);
}
```
* * *
@@ -41,19 +41,19 @@ public Interface IUserFavoriteFood
接口继承和实现:
```csharp
public class UserHungry : IUserFavoriteFood
{
public AddFood()
{
// Implementation:
// A method to add food.
}
public Task<User> EatFavoriteFood(int id)
{
// Implementation:
// A method to Eat food by id.
}
}
public class UserHungry : IUserFavoriteFood
{
public AddFood()
{
// Implementation:
// A method to add food.
}
public Task<User> EatFavoriteFood(int id)
{
// Implementation:
// A method to Eat food by id.
}
}
```

View File

@@ -1,40 +0,0 @@
CSlocaleTitle: undefined
S框架旨在简化排字机的工作消除创建项目时的错误并摆脱相同代码的无聊单调写作。
CSS框架的优点
```
* Cross-browser compatibility
* Ability to create the correct HTML layout even for a not very experienced specialist.
* Code uniformity
* Increase development speed
```
劣势:
```
* Attachment to CSS style library
* Redundant code
```
## 引导
迄今为止最着名的CSS框架之一。包括用于绘制按钮侧边栏导航栏表单和其他网站元素的模板。包括自己的JavaScript扩展。
Bootstrap与所有主流现代浏览器兼容但旧版浏览器可能存在问题。支持适应性。使用Less和Sass语言。
## 骨架
它基于JavaScript和CSS用于快速准确地创建在大型监视器和小型小工具屏幕上正确显示的响应式网站。一个大加骷髅 - 它可以适应任何设计。标记网格包含12列基本宽度为960像素。兼容所有主流浏览器。
## KUBE
开发人员完全自由而不强加风格。提供最大的设计灵活性它有几个网格选项由创建者定位为专业CSS开发人员的框架。使用Less支持响应式设计。
## 基础
常见的CSS框架。与其他主要元素一起包括几个HTML模板页面上具有不同的块排列。它在JavaScript中有很多组件。该框架的能力和构成非常严肃。使用Sass。与所有主流浏览器兼容的代码。
## 语义UI
支持FirefoxChromeSafariInternet ExplorerAndroid 4Blackberry10。包含大量组件图标图像标签菜单和其他标准组件。它支持最新版本的HTML和CSS并且有很多脚本模块和API可供选择。使用更少。适用性与bootstrap竞争。
每个任务都有自己的工具。一个很好的步骤是尝试框架并理解“你的”与否。您可以使用框架中提供的代码的骨架作为备忘单,并从中获取解决方案和代码。

View File

@@ -1,33 +0,0 @@
#localeTitle: undefined
#W3 CSS容器 W3.css提供了一个容器类它为任何html元素添加了16个像素的左右填充以及0.01em的 顶部和底部填充。 这使得它非常适用于包含`<header>, <div>, <footer>, <section>`等元素的html。但也可以在`<img> and <p>.`等元素上使用效果很好`<img> and <p>.`
### 简单的例子
```
<header class="w3-container">
<h1>Header With W3 Container</h1>
</header>
```
```
<header>
<h1>Header Without W3 Container</h1>
</header>
```
会产生以下结果。
![标头img](https://github.com/OcelotDive/randomImages/blob/master/images/WithWithout.PNG)
### 使用W3.Css容器
只需将常规样式表链接添加到网页的头部,如下所示:
```
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
```
或者将最新的css文件下载到本地计算机。这里https://www.w3schools.com/w3css/4/w3.css
#### 有关W3.Css容器的更多信息
##### W3schools.comhttps://www.w3schools.com/w3css/w3css\_containers.asp

View File

@@ -1,5 +1,5 @@
---
title: Tableau
title: Tableau
localeTitle: 表
---
# 画面

View File

@@ -1,5 +1,5 @@
---
title: kubernetes
title: kubernetes
localeTitle: kubernetes
---
# Kubernetes

View File

@@ -1,7 +1,6 @@
---
title: Git Show
localeTitle: undefined
localeTitle: Git Show
---
## Git Show
@@ -10,7 +9,7 @@ localeTitle: undefined
该命令的语法如下:
```bash
git show [<options>] [<object>…​]
git show [<options>] [<object>…​]
```
对于不同的git对象 `git show`给出了不同的输出。
@@ -23,33 +22,33 @@ git show [<options>] [<object>…​]
`git show`的最常见用法是与git commit对象相关联
```bash
git show 3357d63
git show 3357d63
```
你会得到类似的输出,
```
commit 3357d63d8f44104940e568a1ba89fa88a16dc753
Author: John Doe <johndoe@acme.com>
Date: Tue Oct 2 00:57:38 2018 +0530
add a section on git commit --amend --author
diff --git a/src/pages/git/git-commit/index.md b/src/pages/git/git-commit/index.md
index fc9f568..8f1c8eb 100644
--- a/src/pages/git/git-commit/index.md
+++ b/src/pages/git/git-commit/index.md
@@ -73,5 +73,11 @@ Premature commits happen all the time in the course of your day-to-day developme
Amended commits are actually entirely new commits and the previous commit will no longer be on your current branch. When you're working with others, you should try to avoid amending commits if the last commit is already pushed into the repository.
+With `--amend`, one of the useful flag you could use is `--author` which enables you to change the author of the last commit you've made. Imagine a situation you haven't properly set up your name or email in git configurations but you already made a commit. With `--author` flag you can simply change them without resetting the last commit.
+
+```
+git commit --amend --author="John Doe <johndoe@email.com>"
+```
+
### More Information:
- Git documentation: [commit](https://git-scm.com/docs/git-commit)
commit 3357d63d8f44104940e568a1ba89fa88a16dc753
Author: John Doe <johndoe@acme.com>
Date: Tue Oct 2 00:57:38 2018 +0530
add a section on git commit --amend --author
diff --git a/src/pages/git/git-commit/index.md b/src/pages/git/git-commit/index.md
index fc9f568..8f1c8eb 100644
--- a/src/pages/git/git-commit/index.md
+++ b/src/pages/git/git-commit/index.md
@@ -73,5 +73,11 @@ Premature commits happen all the time in the course of your day-to-day developme
Amended commits are actually entirely new commits and the previous commit will no longer be on your current branch. When you're working with others, you should try to avoid amending commits if the last commit is already pushed into the repository.
+With `--amend`, one of the useful flag you could use is `--author` which enables you to change the author of the last commit you've made. Imagine a situation you haven't properly set up your name or email in git configurations but you already made a commit. With `--author` flag you can simply change them without resetting the last commit.
+
+```
+git commit --amend --author="John Doe <johndoe@email.com>"
+```
+
### More Information:
- Git documentation: [commit](https://git-scm.com/docs/git-commit)
```
您可以使用`git show` 它将显示最新git提交的内容。

View File

@@ -1,19 +0,0 @@
# localeTitle: undefined
WebSockets
_Web套接字_是一种技术允许您在客户端和服务器之间创建交互式连接以实时交换数据。 WebSockets允许您在两个流中工作从而将此技术与HTTP区分开来。
## WebSockets如何工作
WebSockets不需要重复调用来响应。只需提出一个请求并等待响应就足够了。您可以收听服务器该服务器会在准备就绪时发送答案。
## 我什么时候可以使用WebSockets
* 实时应用程序
* 聊天应用
* 物联网应用
* 多人游戏
## 什么时候不使用WebSockets
95的浏览器已经支持WebSockets但有时这种技术并不是必需的。例如如果您要创建一个不需要实时功能的简单CMS。

View File

@@ -1,7 +1,6 @@
---
title: Simplify Square Roots
localeTitle: undefined
localeTitle: 简化平方根
---
## 简化平方根

View File

@@ -1,5 +0,0 @@
tlocaleTitle: 逆逆对立
itleConverse Inverse Contrapositive
在离散数学中给出条件语句“if athen b”我们 可以有3个相关的陈述 任何条件陈述由两部分组成: i假设“如果” ii结论“当时” “如果a那么b”可以表示为 a→b 举一个例子:“如果没有学校,那就是周末。” p→q •要获得上述条件陈述的匡威,交换假设 - esis和结论。 q→p 因此,反过来说:“如果是周末,那么就没有学校。” •要获得上述条件语句的反转,请取消 假设和结论。 ¬p→¬q 因此,相反的是:“如果有学校,那就是工作日。” •要获得上述条件陈述的Contrapositive交换 逆句的假设和结论。 ¬q→¬p 因此,对立面将是:“如果是工作日,那么就有学校。”

View File

@@ -1,5 +1,8 @@
##localeTitle: undefined
文件系统
---
title: File System
localeTitle: 文件系统
---
## 文件系统
Node.js文件系统模块允许您使用计算机上的文件系统。
@@ -8,7 +11,7 @@ Node.js有一组内置模块无需进一步安装即可使用。类似地
要包含模块,请使用`require()`函数和模块名称。
```javascript
const fs = require('fs');
const fs = require('fs');
```
文件系统模块的常用用法:
@@ -26,15 +29,15 @@ const fs = require('fs');
Node.js代码从您的计算机读取文件并将内容返回到控制台。
```javascript
const fs = require('fs');
fs.readFile('input.txt', 'utf-8', (err, data) => {
if(err){
console.log(err);
}
else{
console.log("Content present in input.txt file : " + data.toString());
}
});
const fs = require('fs');
fs.readFile('input.txt', 'utf-8', (err, data) => {
if(err){
console.log(err);
}
else{
console.log("Content present in input.txt file : " + data.toString());
}
});
```
上面的代码从您的计算机读取文件_input.txt_并将内容返回到控制台。
@@ -55,15 +58,15 @@ _注意_ input.txt文件应该存在于Node.js代码文件所在的同一目
Node.js代码将内容写入文件。
```javascript
const fs = require('fs');
fs.writeFile('output.txt', "New content added", (err, data) => {
if(err){
console.log(err);
}
else{
console.log("The file is saved");
}
});
const fs = require('fs');
fs.writeFile('output.txt', "New content added", (err, data) => {
if(err){
console.log(err);
}
else{
console.log("The file is saved");
}
});
```
上面的代码创建了一个文件_output.txt_并添加了_添加_到其中的_新内容_ 。

View File

@@ -1,5 +1,8 @@
##localeTitle: undefined
HTTP
---
title: HTTP
localeTitle: HTTP
---
## HTTP
Node.js有一组内置模块无需进一步安装即可使用。类似地 **HTTP模块**包含通过超文本传输协议HTTP传输数据所需的一组功能。
@@ -8,7 +11,7 @@ HTTP模块可以创建一个HTTP服务器该服务器侦听服务器端口并
要包含模块,请使用`require()`函数和模块名称。
```javascript
const http = require('http');
const http = require('http');
```
## Node.js作为Web服务器
@@ -16,16 +19,16 @@ const http = require('http');
`createServer()`方法用于创建HTTP服务器。 `res.writeHead()`方法的第一个参数是状态代码, `200`表示一切正常,第二个参数是包含响应头的对象。
```javascript
const http = require('http');
//create a server object:
http.createServer((req, res) => {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write('Hello World!'); //write a response to the client
res.end(); //end the response
}).listen(8000); //the server object listens on port 8000
console.log("Server is listening on port no : 8000");
const http = require('http');
//create a server object:
http.createServer((req, res) => {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write('Hello World!'); //write a response to the client
res.end(); //end the response
}).listen(8000); //the server object listens on port 8000
console.log("Server is listening on port no : 8000");
```
### 执行步骤:

View File

@@ -1,47 +1,47 @@
---
title: Relationships between * and args
localeTitle: *和args之间的关系
localeTitle: '*和args之间的关系'
---
## 在函数定义中存在\*
```Python
# How does *args work in a function definition
def hardFunc(arg1, arg2):
# create a tuple and pollute it with arguments passed to hardFunc
args=(arg1, arg2)
# print out results
print(args[0])
print(args[1])
hardFunc('hard_one', 'hard_two')
# output — Try it yourself now and in sequential snippets!
def softFunc(*args):
# at this point after calling softFunc a tuple with a name of a word
# followed by * is created automatically (in this case the name is args)
# print out results
print(args[0])
print(args[1])
softFunc('soft_one', 'soft_two')
# Now try to do something illegal
hardFunc('one', 'two', 'three')
# Now do things legally
softFunc('one', 'two', 'three')
# or even
softFunc('one', 'two', 'three', 'infinity')
# softFunc handles arbitrary amount of arguments easily by virtue of * syntax
# So using a single variable name in conjuction with * we gained the ability
# to invoke a function with arbitrary amount of arguments.
# Once again when softFunc is called the newly args
# tuple filled with provided arguments is created
# Conclusion softFunc is a more flexible/dynamic verson of a hardFunc
# How does *args work in a function definition
def hardFunc(arg1, arg2):
# create a tuple and pollute it with arguments passed to hardFunc
args=(arg1, arg2)
# print out results
print(args[0])
print(args[1])
hardFunc('hard_one', 'hard_two')
# output — Try it yourself now and in sequential snippets!
def softFunc(*args):
# at this point after calling softFunc a tuple with a name of a word
# followed by * is created automatically (in this case the name is args)
# print out results
print(args[0])
print(args[1])
softFunc('soft_one', 'soft_two')
# Now try to do something illegal
hardFunc('one', 'two', 'three')
# Now do things legally
softFunc('one', 'two', 'three')
# or even
softFunc('one', 'two', 'three', 'infinity')
# softFunc handles arbitrary amount of arguments easily by virtue of * syntax
# So using a single variable name in conjuction with * we gained the ability
# to invoke a function with arbitrary amount of arguments.
# Once again when softFunc is called the newly args
# tuple filled with provided arguments is created
# Conclusion softFunc is a more flexible/dynamic verson of a hardFunc
```

View File

@@ -1,6 +1,6 @@
---
title: R
localeTitle: [R
localeTitle: R
---
## 什么是R
@@ -21,23 +21,23 @@ R是用于统计计算和图形的开源编程语言和软件环境。它是数
## 在哪里免费学习R.
* [R Studio](https://www.rstudio.com/online-learning/)
* [代码学校](http://tryr.codeschool.com/)
* [Coursera-允许免费审核课程,但支付认证。](https://www.coursera.org/learn/r-programming)
* [DataCamp - 允许免费完成介绍部分。](https://www.datacamp.com)
* [R for Data Science-是一本可以免费在线阅读的书。](http://r4ds.had.co.nz/)
* [edX - 允许免费审核课程,但支付认证。](https://www.edx.org/learn/r-programming)
* [高级R](https://adv-r.hadley.nz/)
* [RSeek](http://rseek.org/)
## 参考
* [在Windows上安装R](http://youtu.be/Ohnk9hcxf9M)
* [在Mac上安装R](https://youtu.be/uxuuWXU-7UQ)

View File

@@ -1,5 +1,8 @@
# localeTitle: undefined
R适用于初学者的eact Router
---
title: React Router
localeTitle: React Router
---
# R适用于初学者的 React Router
# 安装
@@ -22,7 +25,7 @@ React Router已分为三个包 `react-router` `react-router-dom`和`react
# 进口声明
```javascript
import { BrowserRouter as Router, Switch, Route, Link } from 'react-router-dom';
import { BrowserRouter as Router, Switch, Route, Link } from 'react-router-dom';
```
## IndexRoute和链接
@@ -36,11 +39,11 @@ import { BrowserRouter as Router, Switch, Route, Link } from 'react-router-dom';
允许用户浏览应用程序的主要方法。 将使用正确的href呈现完全可访问的锚标记。 为此我们首先创建一个Nav组件。我们的Nav组件将包含`<Link>`组件,如下所示:
```javascript
const Nav = () => (
<div>
<Link to='/'>Home</Link>&nbsp;
<Link to='/address'>Address</Link>
</div>
)
const Nav = () => (
<div>
<Link to='/'>Home</Link>&nbsp;
<Link to='/address'>Address</Link>
</div>
)
```