mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Correct highlighted lanugages
This commit is contained in:
parent
e1bc8441e8
commit
12ecedd4f5
@ -4,7 +4,7 @@ contributors:
|
||||
- ["Btup"]
|
||||
filename: learnbc.bc
|
||||
---
|
||||
```c
|
||||
```bc
|
||||
/*This is a multi-
|
||||
line comment.*/
|
||||
# This is also a (one-line) comment! (in GNU bc).
|
||||
|
@ -5,7 +5,8 @@ contributors:
|
||||
filename: learnbc-de.bc
|
||||
lang: de-de
|
||||
---
|
||||
```c
|
||||
|
||||
```bc
|
||||
/* Das ist ein mehr-
|
||||
zeiliger Kommentar */
|
||||
# Das ist ein (einzeiliger) Kommentar (in GNU bc).
|
||||
@ -100,4 +101,3 @@ das Programm beendet. Diese Codezeile ist optional.*/
|
||||
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```.
|
||||
|
||||
|
@ -7,7 +7,7 @@ contributors:
|
||||
filename: learn-emacs-lisp.el
|
||||
---
|
||||
|
||||
```scheme
|
||||
```elisp
|
||||
;; This gives an introduction to Emacs Lisp in 15 minutes (v0.2d)
|
||||
;;
|
||||
;; 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.
|
||||
|
||||
```csharp
|
||||
```fsharp
|
||||
// single line comments use a double slash
|
||||
(* multi line comments use (* . . . *) pair
|
||||
|
||||
|
@ -118,7 +118,7 @@ di tempo, ti apparirà la stessa interfaccia per il contratto nella parte
|
||||
inferiore dello schermo.
|
||||
|
||||
|
||||
```javascript
|
||||
```solidity
|
||||
// Iniziamo con un semplice contratto su una Banca
|
||||
// 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)
|
||||
|
||||
```javascript
|
||||
```solidity
|
||||
// *** ESEMPIO: Un esempio di crowdfunding (molto simile a Kickstarter) ***
|
||||
// ** START EXAMPLE **
|
||||
|
||||
@ -944,7 +944,7 @@ contract CrowdFunder {
|
||||
|
||||
Qualche altra funzionalità.
|
||||
|
||||
```javascript
|
||||
```solidity
|
||||
// 10. ATRE FUNZIONALITA' NATIVE
|
||||
|
||||
// Unità di valuta
|
||||
|
@ -7,7 +7,7 @@ translators:
|
||||
lang: pt-br
|
||||
filename: learnbc-pt.bc
|
||||
---
|
||||
```c
|
||||
```bc
|
||||
/*Este é um comentário
|
||||
multi-linhas*/
|
||||
# Este é um comentário de uma única linha! (em bc GNU).
|
||||
|
@ -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
|
||||
são bem-vindos.
|
||||
|
||||
```javascript
|
||||
```solidity
|
||||
// Primeiramente, um contrato de um Banco simples
|
||||
// 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
|
||||
argument.
|
||||
|
||||
```perl
|
||||
```sed
|
||||
#!/usr/bin/sed -f
|
||||
# Files that begin with the above line and are given execute permission
|
||||
# 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.
|
||||
|
||||
|
||||
```javascript
|
||||
```solidity
|
||||
// First, a simple Bank contract
|
||||
// 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)
|
||||
|
||||
```javascript
|
||||
```solidity
|
||||
// *** EXAMPLE: A crowdfunding example (broadly similar to Kickstarter) ***
|
||||
// ** START EXAMPLE **
|
||||
|
||||
@ -860,7 +860,7 @@ contract CrowdFunder {
|
||||
|
||||
Some more functions.
|
||||
|
||||
```javascript
|
||||
```solidity
|
||||
// 10. OTHER NATIVE FUNCTIONS
|
||||
|
||||
// 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.
|
||||
|
||||
```csharp
|
||||
```fsharp
|
||||
// tek satır yorumlar ikili bölme işareti ile başlar
|
||||
(* çok satırlı yorumlar ( * . . . * ) ikilisini kullanır
|
||||
|
||||
|
@ -8,7 +8,7 @@ translators:
|
||||
- ["Oleh Hromiak", "https://github.com/ogroleg"]
|
||||
---
|
||||
|
||||
```
|
||||
```wast
|
||||
;; learnwasm-ua.wast
|
||||
|
||||
(module
|
||||
|
@ -5,7 +5,7 @@ contributors:
|
||||
- ["Dean Shaff", "http://dean-shaff.github.io"]
|
||||
---
|
||||
|
||||
```
|
||||
```wast
|
||||
;; learn-wasm.wast
|
||||
|
||||
(module
|
||||
|
@ -28,7 +28,7 @@ Note that the `= One equal sign =` heading actually corresponds to the title of
|
||||
|
||||
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
|
||||
:Each colon creates an indentation three characters wide.
|
||||
::and they can be nested.
|
||||
@ -56,6 +56,7 @@ The syntax for tables is [very complicated](https://en.wikipedia.org/wiki/Help:T
|
||||
| ...
|
||||
|}
|
||||
```
|
||||
|
||||
which renders to
|
||||
| **column title A** | **column title B** |
|
||||
|---|---|
|
||||
@ -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 quotations either by HTML-like tag
|
||||
|
||||
```wikitext
|
||||
<blockquote>
|
||||
<p>Quotation text.</p>
|
||||
<p>Name, source, reference</p>
|
||||
</blockquote>
|
||||
```
|
||||
|
||||
or [template](#templates)
|
||||
|
||||
```wikitext
|
||||
{{Quote|text=Quotation text.|title=Title|author=Author|source=Location in the publication}}
|
||||
```
|
||||
@ -83,6 +87,7 @@ 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).
|
||||
|
||||
Longer code blocks can be done by
|
||||
|
||||
```wikitext
|
||||
<syntaxhighlight lang="cpp">
|
||||
#include <iostream>
|
||||
@ -91,7 +96,9 @@ int m2 (int ax, char *p_ax) {
|
||||
return 0;
|
||||
}</syntaxhighlight>
|
||||
```
|
||||
|
||||
which renders to
|
||||
|
||||
```cpp
|
||||
#include <iostream>
|
||||
int m2 (int ax, char *p_ax) {
|
||||
@ -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.
|
||||
|
||||
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
|
||||
{{Infobox scientist
|
||||
| name = Leonhard Euler
|
||||
@ -144,7 +152,6 @@ 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.
|
||||
|
||||
|
||||
`~~~~` is used to sign on talk pages, and expands to something like `Username (talk) 10:50, 12 June 2023 (UTC)`.
|
||||
|
||||
### Mathematics
|
||||
@ -159,7 +166,7 @@ One can also include math using [HTML renders](https://en.wikipedia.org/wiki/Wik
|
||||
|
||||
Theorems and proofs can be boxed and named:
|
||||
|
||||
```
|
||||
```wikitext
|
||||
{{Math theorem
|
||||
|name=Pythagorean theorem
|
||||
|note=Pythagoras, 500s BC
|
||||
@ -171,7 +178,6 @@ Theorems and proofs can be boxed and named:
|
||||
|title=Proof by similar triangles
|
||||
|proof=Drop a perpendicular from point C to side AB. Now argue by proportionality. <math>\blacksquare</math>
|
||||
}}
|
||||
|
||||
```
|
||||
|
||||
## References
|
||||
@ -191,7 +197,6 @@ The most basic form is a plaintext citation, like `<ref>Author, Title, date, [ur
|
||||
|
||||
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.
|
||||
|
||||
## Typical Wikipedia page
|
||||
|
@ -30,7 +30,7 @@ Solidity 代码中存在高风险和高成本的错误,因此你必须非常
|
||||
由于 Solidity 和以太坊正在积极开发,通常会标记为实验或 beta 特性,并很可能会更改。因此欢迎
|
||||
提交更改请求。
|
||||
|
||||
```javascript
|
||||
```solidity
|
||||
// 首先,一个简单的银行合约
|
||||
// 允许存款、取款、以及检查余额
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user