mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-01-17 05:28:37 +01:00
Correct highlighted lanugages
This commit is contained in:
parent
e1bc8441e8
commit
12ecedd4f5
@ -4,7 +4,7 @@ contributors:
|
|||||||
- ["Btup"]
|
- ["Btup"]
|
||||||
filename: learnbc.bc
|
filename: learnbc.bc
|
||||||
---
|
---
|
||||||
```c
|
```bc
|
||||||
/*This is a multi-
|
/*This is a multi-
|
||||||
line comment.*/
|
line comment.*/
|
||||||
# This is also a (one-line) comment! (in GNU bc).
|
# This is also a (one-line) comment! (in GNU bc).
|
||||||
@ -29,12 +29,12 @@ hour = read() /*Input a number*/
|
|||||||
|
|
||||||
if(hour < 12) { /*Operators are exactly like C.*/
|
if(hour < 12) { /*Operators are exactly like C.*/
|
||||||
print "Good morning\n" /*"print" outputs strings or variables
|
print "Good morning\n" /*"print" outputs strings or variables
|
||||||
separated by commas.*/
|
separated by commas.*/
|
||||||
} else if(hour == 12) {
|
} else if(hour == 12) {
|
||||||
print "Hello\n"
|
print "Hello\n"
|
||||||
/*Escaping sequences start with a \ in a string.
|
/*Escaping sequences start with a \ in a string.
|
||||||
In order to make the escaping sequences clearer, here
|
In order to make the escaping sequences clearer, here
|
||||||
is a simplified list of them that will work in bc:
|
is a simplified list of them that will work in bc:
|
||||||
\b: backspace
|
\b: backspace
|
||||||
\c: carriage return
|
\c: carriage return
|
||||||
\n: newline
|
\n: newline
|
||||||
|
@ -5,7 +5,8 @@ contributors:
|
|||||||
filename: learnbc-de.bc
|
filename: learnbc-de.bc
|
||||||
lang: de-de
|
lang: de-de
|
||||||
---
|
---
|
||||||
```c
|
|
||||||
|
```bc
|
||||||
/* Das ist ein mehr-
|
/* Das ist ein mehr-
|
||||||
zeiliger Kommentar */
|
zeiliger Kommentar */
|
||||||
# Das ist ein (einzeiliger) Kommentar (in GNU bc).
|
# Das ist ein (einzeiliger) Kommentar (in GNU bc).
|
||||||
@ -14,11 +15,11 @@ zeiliger Kommentar */
|
|||||||
num = 45 /* Alle Variablen speichern nur Doubles und es ist
|
num = 45 /* Alle Variablen speichern nur Doubles und es ist
|
||||||
nicht möglich String-Konstanten direkt zu speichern */
|
nicht möglich String-Konstanten direkt zu speichern */
|
||||||
num = 45; /* Es kann nach jedem Statement ein optionales Semikolon
|
num = 45; /* Es kann nach jedem Statement ein optionales Semikolon
|
||||||
hinzugefügt werden */
|
hinzugefügt werden */
|
||||||
/* Blöcke werden mit den Operatoren {} (ähnlich wie in C) bezeichnet */
|
/* Blöcke werden mit den Operatoren {} (ähnlich wie in C) bezeichnet */
|
||||||
while(num < 50) {
|
while(num < 50) {
|
||||||
num += 1 /* äquivalent zu num=num+1.
|
num += 1 /* äquivalent zu num=num+1.
|
||||||
a = a Op b ist äquivalent zu a Op= b*/
|
a = a Op b ist äquivalent zu a Op= b*/
|
||||||
}
|
}
|
||||||
/* Ausserdem gibt es ++ (Inkrement) und -- (Dekrement) Operatoren */
|
/* Ausserdem gibt es ++ (Inkrement) und -- (Dekrement) Operatoren */
|
||||||
/* Es gibt 3 spezielle Variablen:
|
/* Es gibt 3 spezielle Variablen:
|
||||||
@ -30,21 +31,21 @@ hour = read() /*Eingabe einer Zahl*/
|
|||||||
|
|
||||||
if(hour < 12) { /*Operatoren sind genau wie in C*/
|
if(hour < 12) { /*Operatoren sind genau wie in C*/
|
||||||
print "Guten Morgen\n" /*"print" Gibt Strings oder Variablen
|
print "Guten Morgen\n" /*"print" Gibt Strings oder Variablen
|
||||||
mit einem Komma separiert aus.*/
|
mit einem Komma separiert aus.*/
|
||||||
} else if(hour == 12) {
|
} else if(hour == 12) {
|
||||||
print "Hallo\n"
|
print "Hallo\n"
|
||||||
/* Escape-Sequenzen starten mit einem \ in einem String.
|
/* Escape-Sequenzen starten mit einem \ in einem String.
|
||||||
Um Escape-Sequenzen klarer zu machen, ist hier eine vereinfachte
|
Um Escape-Sequenzen klarer zu machen, ist hier eine vereinfachte
|
||||||
Liste, welche in bc funktioneren:
|
Liste, welche in bc funktioneren:
|
||||||
\b: Backspace
|
\b: Backspace
|
||||||
\c: carriage return
|
\c: carriage return
|
||||||
\n: Zeilenumbruch
|
\n: Zeilenumbruch
|
||||||
\t: Tab
|
\t: Tab
|
||||||
\\: Backslash*/
|
\\: Backslash*/
|
||||||
} else {
|
} else {
|
||||||
/* Standardmässig sind Variablen global. */
|
/* Standardmässig sind Variablen global. */
|
||||||
thisIsGlobal = 5
|
thisIsGlobal = 5
|
||||||
/*Variablen können lokal gemacht werden. Benutze das Schlüsselwort "auto"
|
/*Variablen können lokal gemacht werden. Benutze das Schlüsselwort "auto"
|
||||||
in einer Funktion.*/
|
in einer Funktion.*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,4 +101,3 @@ das Programm beendet. Diese Codezeile ist optional.*/
|
|||||||
Viel Spass mit diesem einfachen Rechner! (Oder dieser Programmiersprache, um exakt zu sein.)
|
Viel Spass mit diesem einfachen Rechner! (Oder dieser Programmiersprache, um exakt zu sein.)
|
||||||
|
|
||||||
Das ganze Programm wurde in GNU bc geschrieben. Um es auszuführen, benutze ```bc learnbc.bc```.
|
Das ganze Programm wurde in GNU bc geschrieben. Um es auszuführen, benutze ```bc learnbc.bc```.
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ contributors:
|
|||||||
filename: learn-emacs-lisp.el
|
filename: learn-emacs-lisp.el
|
||||||
---
|
---
|
||||||
|
|
||||||
```scheme
|
```elisp
|
||||||
;; This gives an introduction to Emacs Lisp in 15 minutes (v0.2d)
|
;; This gives an introduction to Emacs Lisp in 15 minutes (v0.2d)
|
||||||
;;
|
;;
|
||||||
;; First make sure you read this text by Peter Norvig:
|
;; First make sure you read this text by Peter Norvig:
|
||||||
|
@ -16,7 +16,7 @@ The syntax of F# is different from C-style languages:
|
|||||||
|
|
||||||
If you want to try out the code below, you can go to [https://try.fsharp.org](https://try.fsharp.org) and paste it into an interactive REPL.
|
If you want to try out the code below, you can go to [https://try.fsharp.org](https://try.fsharp.org) and paste it into an interactive REPL.
|
||||||
|
|
||||||
```csharp
|
```fsharp
|
||||||
// single line comments use a double slash
|
// single line comments use a double slash
|
||||||
(* multi line comments use (* . . . *) pair
|
(* multi line comments use (* . . . *) pair
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ di tempo, ti apparirà la stessa interfaccia per il contratto nella parte
|
|||||||
inferiore dello schermo.
|
inferiore dello schermo.
|
||||||
|
|
||||||
|
|
||||||
```javascript
|
```solidity
|
||||||
// Iniziamo con un semplice contratto su una Banca
|
// Iniziamo con un semplice contratto su una Banca
|
||||||
// Permette di depositare, prelevare e fare l'estratto conto
|
// Permette di depositare, prelevare e fare l'estratto conto
|
||||||
|
|
||||||
@ -800,7 +800,7 @@ contract SomeOracle {
|
|||||||
|
|
||||||
Prova l'esempio completo qui sotto [usando remix e la `Javascript VM`](https://remix.ethereum.org/#version=soljson-v0.6.6+commit.6c089d02.js&optimize=false&evmVersion=null&gist=3d12cd503dcedfcdd715ef61f786be0b&runs=200)
|
Prova l'esempio completo qui sotto [usando remix e la `Javascript VM`](https://remix.ethereum.org/#version=soljson-v0.6.6+commit.6c089d02.js&optimize=false&evmVersion=null&gist=3d12cd503dcedfcdd715ef61f786be0b&runs=200)
|
||||||
|
|
||||||
```javascript
|
```solidity
|
||||||
// *** ESEMPIO: Un esempio di crowdfunding (molto simile a Kickstarter) ***
|
// *** ESEMPIO: Un esempio di crowdfunding (molto simile a Kickstarter) ***
|
||||||
// ** START EXAMPLE **
|
// ** START EXAMPLE **
|
||||||
|
|
||||||
@ -944,7 +944,7 @@ contract CrowdFunder {
|
|||||||
|
|
||||||
Qualche altra funzionalità.
|
Qualche altra funzionalità.
|
||||||
|
|
||||||
```javascript
|
```solidity
|
||||||
// 10. ATRE FUNZIONALITA' NATIVE
|
// 10. ATRE FUNZIONALITA' NATIVE
|
||||||
|
|
||||||
// Unità di valuta
|
// Unità di valuta
|
||||||
|
@ -7,7 +7,7 @@ translators:
|
|||||||
lang: pt-br
|
lang: pt-br
|
||||||
filename: learnbc-pt.bc
|
filename: learnbc-pt.bc
|
||||||
---
|
---
|
||||||
```c
|
```bc
|
||||||
/*Este é um comentário
|
/*Este é um comentário
|
||||||
multi-linhas*/
|
multi-linhas*/
|
||||||
# Este é um comentário de uma única linha! (em bc GNU).
|
# Este é um comentário de uma única linha! (em bc GNU).
|
||||||
@ -33,7 +33,7 @@ hora = read() /*Lê a entrada de um número*/
|
|||||||
|
|
||||||
if(hora < 12) { /*Os operadores são idênticos ao C.*/
|
if(hora < 12) { /*Os operadores são idênticos ao C.*/
|
||||||
print "Bom dia\n" /*"print" imprime strings ou variáveis
|
print "Bom dia\n" /*"print" imprime strings ou variáveis
|
||||||
separados por vírgula (,).*/
|
separados por vírgula (,).*/
|
||||||
} else if(hora == 12) {
|
} else if(hora == 12) {
|
||||||
print "Olá\n"
|
print "Olá\n"
|
||||||
/*Para escapar strings, inicie a string com \.
|
/*Para escapar strings, inicie a string com \.
|
||||||
@ -97,7 +97,7 @@ for(i = 0; i <= 3; i++) {
|
|||||||
/*Para acessar um array, faça assim:*/
|
/*Para acessar um array, faça assim:*/
|
||||||
print a[0], " ", a[1], " ", a[2], " ", a[3], "\n"
|
print a[0], " ", a[1], " ", a[2], " ", a[3], "\n"
|
||||||
quit /*Adicione essa linha no final do código
|
quit /*Adicione essa linha no final do código
|
||||||
para garantir que o programa encerre. Essa linha é opcional.*/
|
para garantir que o programa encerre. Essa linha é opcional.*/
|
||||||
```
|
```
|
||||||
|
|
||||||
Aproveite bem essa simples calculadora! (Ou essa linguagem de programação, para ser exato.)
|
Aproveite bem essa simples calculadora! (Ou essa linguagem de programação, para ser exato.)
|
||||||
|
@ -38,7 +38,7 @@ Como Solidity e Ethereum ainda estão sob desenvolvimento, funcionalidades beta
|
|||||||
e experimentais são tipicamente marcadas e sujeitas à mudanças. Pull requests
|
e experimentais são tipicamente marcadas e sujeitas à mudanças. Pull requests
|
||||||
são bem-vindos.
|
são bem-vindos.
|
||||||
|
|
||||||
```javascript
|
```solidity
|
||||||
// Primeiramente, um contrato de um Banco simples
|
// Primeiramente, um contrato de um Banco simples
|
||||||
// Permite depósitos, retiradas e checagens de saldo
|
// Permite depósitos, retiradas e checagens de saldo
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ on its standard output.
|
|||||||
You can suppress the default output by specifying the `-n` command-line
|
You can suppress the default output by specifying the `-n` command-line
|
||||||
argument.
|
argument.
|
||||||
|
|
||||||
```perl
|
```sed
|
||||||
#!/usr/bin/sed -f
|
#!/usr/bin/sed -f
|
||||||
# Files that begin with the above line and are given execute permission
|
# Files that begin with the above line and are given execute permission
|
||||||
# can be run as regular scripts.
|
# can be run as regular scripts.
|
||||||
|
@ -93,7 +93,7 @@ This will use whatever network is currently selected in your metamask as the net
|
|||||||
For now, please continue to use the `Javascript VM` unless instructed otherwise. When you deploy to a testnet, metamask will pop up to ask you to "confirm" the transaction. Hit yes, and after a delay, you'll get the same contract interface at the bottom of your screen.
|
For now, please continue to use the `Javascript VM` unless instructed otherwise. When you deploy to a testnet, metamask will pop up to ask you to "confirm" the transaction. Hit yes, and after a delay, you'll get the same contract interface at the bottom of your screen.
|
||||||
|
|
||||||
|
|
||||||
```javascript
|
```solidity
|
||||||
// First, a simple Bank contract
|
// First, a simple Bank contract
|
||||||
// Allows deposits, withdrawals, and balance checks
|
// Allows deposits, withdrawals, and balance checks
|
||||||
|
|
||||||
@ -720,7 +720,7 @@ contract SomeOracle {
|
|||||||
|
|
||||||
Work with the full example below using the [`Javascript VM` in remix here.](https://remix.ethereum.org/#version=soljson-v0.6.6+commit.6c089d02.js&optimize=false&evmVersion=null&gist=3d12cd503dcedfcdd715ef61f786be0b&runs=200)
|
Work with the full example below using the [`Javascript VM` in remix here.](https://remix.ethereum.org/#version=soljson-v0.6.6+commit.6c089d02.js&optimize=false&evmVersion=null&gist=3d12cd503dcedfcdd715ef61f786be0b&runs=200)
|
||||||
|
|
||||||
```javascript
|
```solidity
|
||||||
// *** EXAMPLE: A crowdfunding example (broadly similar to Kickstarter) ***
|
// *** EXAMPLE: A crowdfunding example (broadly similar to Kickstarter) ***
|
||||||
// ** START EXAMPLE **
|
// ** START EXAMPLE **
|
||||||
|
|
||||||
@ -860,7 +860,7 @@ contract CrowdFunder {
|
|||||||
|
|
||||||
Some more functions.
|
Some more functions.
|
||||||
|
|
||||||
```javascript
|
```solidity
|
||||||
// 10. OTHER NATIVE FUNCTIONS
|
// 10. OTHER NATIVE FUNCTIONS
|
||||||
|
|
||||||
// Currency units
|
// Currency units
|
||||||
|
@ -19,7 +19,7 @@ F#'ın söz dizimi C-stili dillerden farklıdır:
|
|||||||
|
|
||||||
Aşağıdaki kodu denemek istiyorsanız, [tryfsharp.org](http://www.tryfsharp.org/Create)'a gidin be interaktif REPL'e kodu yapıştırın.
|
Aşağıdaki kodu denemek istiyorsanız, [tryfsharp.org](http://www.tryfsharp.org/Create)'a gidin be interaktif REPL'e kodu yapıştırın.
|
||||||
|
|
||||||
```csharp
|
```fsharp
|
||||||
// tek satır yorumlar ikili bölme işareti ile başlar
|
// tek satır yorumlar ikili bölme işareti ile başlar
|
||||||
(* çok satırlı yorumlar ( * . . . * ) ikilisini kullanır
|
(* çok satırlı yorumlar ( * . . . * ) ikilisini kullanır
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ translators:
|
|||||||
- ["Oleh Hromiak", "https://github.com/ogroleg"]
|
- ["Oleh Hromiak", "https://github.com/ogroleg"]
|
||||||
---
|
---
|
||||||
|
|
||||||
```
|
```wast
|
||||||
;; learnwasm-ua.wast
|
;; learnwasm-ua.wast
|
||||||
|
|
||||||
(module
|
(module
|
||||||
|
@ -5,7 +5,7 @@ contributors:
|
|||||||
- ["Dean Shaff", "http://dean-shaff.github.io"]
|
- ["Dean Shaff", "http://dean-shaff.github.io"]
|
||||||
---
|
---
|
||||||
|
|
||||||
```
|
```wast
|
||||||
;; learn-wasm.wast
|
;; learn-wasm.wast
|
||||||
|
|
||||||
(module
|
(module
|
||||||
|
@ -26,9 +26,9 @@ Section headings are bracketed by `=`. They go from `= One equal sign =` to `===
|
|||||||
|
|
||||||
Note that the `= One equal sign =` heading actually corresponds to the title of the page, and so cannot actually be used within a page. Consequently, the least number of equal signs is `== Two equal signs ==`.
|
Note that the `= One equal sign =` heading actually corresponds to the title of the page, and so cannot actually be used within a page. Consequently, the least number of equal signs is `== Two equal signs ==`.
|
||||||
|
|
||||||
Subscripts and superscripts can be written as `x<sub>1</sub>` and `x<sup>1</sup>`. Alternatively they can be written by the `<math>` tag (see below). `<small>Small</small>` and `<big>big</big>` texts are rarely used.
|
Subscripts and superscripts can be written as `x<sub>1</sub>` and `x<sup>1</sup>`. Alternatively they can be written by the `<math>` tag (see below). `<small>Small</small>` and `<big>big</big>` texts are rarely used.
|
||||||
|
|
||||||
```
|
```wikitext
|
||||||
Colons allow indentation
|
Colons allow indentation
|
||||||
:Each colon creates an indentation three characters wide.
|
:Each colon creates an indentation three characters wide.
|
||||||
::and they can be nested.
|
::and they can be nested.
|
||||||
@ -42,21 +42,22 @@ The syntax for tables is [very complicated](https://en.wikipedia.org/wiki/Help:T
|
|||||||
|
|
||||||
```wikitext
|
```wikitext
|
||||||
{| class="wikitable"
|
{| class="wikitable"
|
||||||
|+
|
|+
|
||||||
! column title A
|
! column title A
|
||||||
! column title B
|
! column title B
|
||||||
|-
|
|-
|
||||||
| cell A1
|
| cell A1
|
||||||
| cell B1
|
| cell B1
|
||||||
|-
|
|-
|
||||||
| cell A2
|
| cell A2
|
||||||
| cell B2
|
| cell B2
|
||||||
|-
|
|-
|
||||||
| ...
|
| ...
|
||||||
| ...
|
| ...
|
||||||
|}
|
|}
|
||||||
```
|
```
|
||||||
which renders to
|
|
||||||
|
which renders to
|
||||||
| **column title A** | **column title B** |
|
| **column title A** | **column title B** |
|
||||||
|---|---|
|
|---|---|
|
||||||
| cell A1 | cell B1 |
|
| cell A1 | cell B1 |
|
||||||
@ -67,13 +68,16 @@ Be warned that the newlines in a wikitext table are meaningful. Deleting a singl
|
|||||||
You can insert images, audios, videos, or other forms of media by `[[File:Image.png|thumb|right|Image caption]]`. All media files must be hosted on [Wikimedia Commons](https://commons.wikimedia.org/wiki/Main_Page).
|
You can insert images, audios, videos, or other forms of media by `[[File:Image.png|thumb|right|Image caption]]`. All media files must be hosted on [Wikimedia Commons](https://commons.wikimedia.org/wiki/Main_Page).
|
||||||
|
|
||||||
You can insert quotations either by HTML-like tag
|
You can insert quotations either by HTML-like tag
|
||||||
|
|
||||||
```wikitext
|
```wikitext
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>Quotation text.</p>
|
<p>Quotation text.</p>
|
||||||
<p>Name, source, reference</p>
|
<p>Name, source, reference</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
```
|
```
|
||||||
|
|
||||||
or [template](#templates)
|
or [template](#templates)
|
||||||
|
|
||||||
```wikitext
|
```wikitext
|
||||||
{{Quote|text=Quotation text.|title=Title|author=Author|source=Location in the publication}}
|
{{Quote|text=Quotation text.|title=Title|author=Author|source=Location in the publication}}
|
||||||
```
|
```
|
||||||
@ -82,7 +86,8 @@ A "[non-breaking space](https://en.wikipedia.org/wiki/Non-breaking_space)" is a
|
|||||||
|
|
||||||
Extra whitespaces can be specified by `pad` tag. For example, `{{pad|4.0em}}` is a white space with length 4.0 [em-dashes](https://en.wikipedia.org/wiki/Dash#Em_dash).
|
Extra whitespaces can be specified by `pad` tag. For example, `{{pad|4.0em}}` is a white space with length 4.0 [em-dashes](https://en.wikipedia.org/wiki/Dash#Em_dash).
|
||||||
|
|
||||||
Longer code blocks can be done by
|
Longer code blocks can be done by
|
||||||
|
|
||||||
```wikitext
|
```wikitext
|
||||||
<syntaxhighlight lang="cpp">
|
<syntaxhighlight lang="cpp">
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -91,7 +96,9 @@ int m2 (int ax, char *p_ax) {
|
|||||||
return 0;
|
return 0;
|
||||||
}</syntaxhighlight>
|
}</syntaxhighlight>
|
||||||
```
|
```
|
||||||
which renders to
|
|
||||||
|
which renders to
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
int m2 (int ax, char *p_ax) {
|
int m2 (int ax, char *p_ax) {
|
||||||
@ -102,13 +109,13 @@ int m2 (int ax, char *p_ax) {
|
|||||||
|
|
||||||
## Linking
|
## Linking
|
||||||
|
|
||||||
Basic `[[linking]]` is done by double brackets.
|
Basic `[[linking]]` is done by double brackets.
|
||||||
|
|
||||||
The `|` symbol allows displaying a `[[Actual page title|different text]]`.
|
The `|` symbol allows displaying a `[[Actual page title|different text]]`.
|
||||||
|
|
||||||
The `#` symbol allows linking to sections within a text, like `[[Frog#Locomotion]]` or `[[Frog#Locomotion|locomotion in frogs]]`.
|
The `#` symbol allows linking to sections within a text, like `[[Frog#Locomotion]]` or `[[Frog#Locomotion|locomotion in frogs]]`.
|
||||||
|
|
||||||
If a word is interrupted by a link, it is "blended" into the link. For example, `[[copy edit]]ors` renders to [copy editors](https://en.wikipedia.org/wiki/copy_edit).
|
If a word is interrupted by a link, it is "blended" into the link. For example, `[[copy edit]]ors` renders to [copy editors](https://en.wikipedia.org/wiki/copy_edit).
|
||||||
|
|
||||||
To suppress this behavior, use `<nowiki>`. For example, `[[micro-]]<nowiki />second` renders to [micro-](https://en.wikipedia.org/wiki/micro-)second.
|
To suppress this behavior, use `<nowiki>`. For example, `[[micro-]]<nowiki />second` renders to [micro-](https://en.wikipedia.org/wiki/micro-)second.
|
||||||
|
|
||||||
@ -130,6 +137,7 @@ The most (in)famous one is the \[citation needed\]`{{cn}}` template. Note that `
|
|||||||
An `infobox` template is, as it says, a template for a box containing information. Usually, each page contains at most two infoboxes, one on top and one on bottom. For particularly detailed pages, there can be more than two.
|
An `infobox` template is, as it says, a template for a box containing information. Usually, each page contains at most two infoboxes, one on top and one on bottom. For particularly detailed pages, there can be more than two.
|
||||||
|
|
||||||
The infobox on the top is usually used to compactly display tabular information. They are common for biographies, geographical locations, and such. For example, the top infobox for [Euler](https://en.wikipedia.org/wiki/Leonhard_Euler) is:
|
The infobox on the top is usually used to compactly display tabular information. They are common for biographies, geographical locations, and such. For example, the top infobox for [Euler](https://en.wikipedia.org/wiki/Leonhard_Euler) is:
|
||||||
|
|
||||||
```wikitext
|
```wikitext
|
||||||
{{Infobox scientist
|
{{Infobox scientist
|
||||||
| name = Leonhard Euler
|
| name = Leonhard Euler
|
||||||
@ -144,12 +152,11 @@ The infobox on the top is usually used to compactly display tabular information.
|
|||||||
|
|
||||||
The infobox at the bottom is usually used to display a curated table of related links. For example, the bottom infobox for [Euler–Lagrange equation](https://en.wikipedia.org/wiki/Euler%E2%80%93Lagrange_equation) is just `{{Leonhard Euler}}`, which displays a box containing links to many of the things named after Euler.
|
The infobox at the bottom is usually used to display a curated table of related links. For example, the bottom infobox for [Euler–Lagrange equation](https://en.wikipedia.org/wiki/Euler%E2%80%93Lagrange_equation) is just `{{Leonhard Euler}}`, which displays a box containing links to many of the things named after Euler.
|
||||||
|
|
||||||
|
|
||||||
`~~~~` is used to sign on talk pages, and expands to something like `Username (talk) 10:50, 12 June 2023 (UTC)`.
|
`~~~~` is used to sign on talk pages, and expands to something like `Username (talk) 10:50, 12 June 2023 (UTC)`.
|
||||||
|
|
||||||
### Mathematics
|
### Mathematics
|
||||||
|
|
||||||
`<math>` tag renders $\LaTeX$ inline like `$`, while `<math display=block>` renders it on a separate line like `$$`.
|
`<math>` tag renders $\LaTeX$ inline like `$`, while `<math display=block>` renders it on a separate line like `$$`.
|
||||||
|
|
||||||
`<math>E = mc^2</math>` renders to $E = mc^2$.
|
`<math>E = mc^2</math>` renders to $E = mc^2$.
|
||||||
|
|
||||||
@ -157,9 +164,9 @@ The infobox at the bottom is usually used to display a curated table of related
|
|||||||
|
|
||||||
One can also include math using [HTML renders](https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Mathematics#Using_HTML) or even by [plain Unicode](https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode). These are less flexible but more compatible with older browsers. Further, parts of Wikipedia syntax themselves are incompatible with `<math>`, such as in section titles or some templates, forcing the use of HTML or Unicode in such cases.
|
One can also include math using [HTML renders](https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Mathematics#Using_HTML) or even by [plain Unicode](https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode). These are less flexible but more compatible with older browsers. Further, parts of Wikipedia syntax themselves are incompatible with `<math>`, such as in section titles or some templates, forcing the use of HTML or Unicode in such cases.
|
||||||
|
|
||||||
Theorems and proofs can be boxed and named:
|
Theorems and proofs can be boxed and named:
|
||||||
|
|
||||||
```
|
```wikitext
|
||||||
{{Math theorem
|
{{Math theorem
|
||||||
|name=Pythagorean theorem
|
|name=Pythagorean theorem
|
||||||
|note=Pythagoras, 500s BC
|
|note=Pythagoras, 500s BC
|
||||||
@ -171,12 +178,11 @@ Theorems and proofs can be boxed and named:
|
|||||||
|title=Proof by similar triangles
|
|title=Proof by similar triangles
|
||||||
|proof=Drop a perpendicular from point C to side AB. Now argue by proportionality. <math>\blacksquare</math>
|
|proof=Drop a perpendicular from point C to side AB. Now argue by proportionality. <math>\blacksquare</math>
|
||||||
}}
|
}}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
References are the backbone of Wikipedia `{{citation needed}}`. There are in general two ways to do citations.
|
References are the backbone of Wikipedia `{{citation needed}}`. There are in general two ways to do citations.
|
||||||
|
|
||||||
| type | inline citation | expanded citation |
|
| type | inline citation | expanded citation |
|
||||||
| ---- | ---- | ---- |
|
| ---- | ---- | ---- |
|
||||||
@ -187,11 +193,10 @@ References are the backbone of Wikipedia `{{citation needed}}`. There are in gen
|
|||||||
|
|
||||||
As expanded citations are just inline citations without the `<ref>` tag, we will describe just inline citations.
|
As expanded citations are just inline citations without the `<ref>` tag, we will describe just inline citations.
|
||||||
|
|
||||||
The most basic form is a plaintext citation, like `<ref>Author, Title, date, [url](https://example.com/), etc</ref>`.
|
The most basic form is a plaintext citation, like `<ref>Author, Title, date, [url](https://example.com/), etc</ref>`.
|
||||||
|
|
||||||
One should generally use a templated citation, like `<ref>{{cite web|url=https://example.com/|title=Example|date=2001|access-date=2023}}</ref>`. There are three forms of citation templates: [`cite web`](https://en.wikipedia.org/wiki/Template:Cite_web), [`cite journal`](https://en.wikipedia.org/wiki/Template:Cite_journal), [`cite book`](https://en.wikipedia.org/wiki/Template:Cite_book).
|
One should generally use a templated citation, like `<ref>{{cite web|url=https://example.com/|title=Example|date=2001|access-date=2023}}</ref>`. There are three forms of citation templates: [`cite web`](https://en.wikipedia.org/wiki/Template:Cite_web), [`cite journal`](https://en.wikipedia.org/wiki/Template:Cite_journal), [`cite book`](https://en.wikipedia.org/wiki/Template:Cite_book).
|
||||||
|
|
||||||
|
|
||||||
A citation can be named as `<ref name="X">...</ref>`. It can then be invoked as `<ref name="X" />`. The instance `<ref name="X">...</ref>` can go before or after `<ref name="X" />`. Any ordering would render to the same page.
|
A citation can be named as `<ref name="X">...</ref>`. It can then be invoked as `<ref name="X" />`. The instance `<ref name="X">...</ref>` can go before or after `<ref name="X" />`. Any ordering would render to the same page.
|
||||||
|
|
||||||
## Typical Wikipedia page
|
## Typical Wikipedia page
|
||||||
@ -234,7 +239,7 @@ Something about the relation between X and Y.
|
|||||||
|
|
||||||
== References ==
|
== References ==
|
||||||
<!-- generates list of references from inline reference tags, with columns with a minimum width of 30 em-dashes. -->
|
<!-- generates list of references from inline reference tags, with columns with a minimum width of 30 em-dashes. -->
|
||||||
{{Reflist|30em}}
|
{{Reflist|30em}}
|
||||||
|
|
||||||
<!-- extra, non-inlined references below -->
|
<!-- extra, non-inlined references below -->
|
||||||
{{Refbegin|30em}}
|
{{Refbegin|30em}}
|
||||||
@ -255,6 +260,6 @@ Something about the relation between X and Y.
|
|||||||
## Further reading
|
## Further reading
|
||||||
|
|
||||||
* [Wikipedia's manual of style](https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style)
|
* [Wikipedia's manual of style](https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style)
|
||||||
* [Wikitext cheatsheet](https://en.wikipedia.org/wiki/Help:Cheatsheet)
|
* [Wikitext cheatsheet](https://en.wikipedia.org/wiki/Help:Cheatsheet)
|
||||||
* [Wikitext, full reference](https://en.wikipedia.org/wiki/Help:Wikitext).
|
* [Wikitext, full reference](https://en.wikipedia.org/wiki/Help:Wikitext).
|
||||||
* [Tables, full reference](https://en.wikipedia.org/wiki/Help:Table#Simple_straightforward_tables)
|
* [Tables, full reference](https://en.wikipedia.org/wiki/Help:Table#Simple_straightforward_tables)
|
||||||
|
@ -30,7 +30,7 @@ Solidity 代码中存在高风险和高成本的错误,因此你必须非常
|
|||||||
由于 Solidity 和以太坊正在积极开发,通常会标记为实验或 beta 特性,并很可能会更改。因此欢迎
|
由于 Solidity 和以太坊正在积极开发,通常会标记为实验或 beta 特性,并很可能会更改。因此欢迎
|
||||||
提交更改请求。
|
提交更改请求。
|
||||||
|
|
||||||
```javascript
|
```solidity
|
||||||
// 首先,一个简单的银行合约
|
// 首先,一个简单的银行合约
|
||||||
// 允许存款、取款、以及检查余额
|
// 允许存款、取款、以及检查余额
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user