mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
Update highlighting languages
This commit is contained in:
parent
52efd27986
commit
216018a02e
@ -1,6 +1,6 @@
|
||||
---
|
||||
language: D
|
||||
filename: learnd-de.d
|
||||
language: D
|
||||
filename: learnd-de.d
|
||||
contributors:
|
||||
- ["Nick Papanastasiou", "www.nickpapanastasiou.github.io"]
|
||||
translators:
|
||||
@ -8,7 +8,7 @@ translators:
|
||||
lang: de-de
|
||||
---
|
||||
|
||||
```c
|
||||
```d
|
||||
// Es war klar, dass das kommt...
|
||||
module hello;
|
||||
|
||||
@ -28,7 +28,7 @@ Low bis High Level verwendet werden kann und dabei viele Stile anbietet.
|
||||
D wird aktiv von Walter Bright und Andrei Alexandrescu entwickelt, zwei super schlaue,
|
||||
richtig coole leute. Da das jetzt alles aus dem Weg ist - auf zu den Beispielen!
|
||||
|
||||
```c
|
||||
```d
|
||||
import std.stdio;
|
||||
|
||||
void main() {
|
||||
@ -73,7 +73,7 @@ Structs und unions werden as-value (koppiert) an Methoden übergeben wogegen
|
||||
Klassen als Referenz übergeben werden. Templates können verwendet werden um
|
||||
alle Typen zu parameterisieren.
|
||||
|
||||
```c
|
||||
```d
|
||||
// Hier, T ist ein Type-Parameter, Er funktioniert wie Generics in C#/Java/C++
|
||||
struct LinkedList(T) {
|
||||
T data = null;
|
||||
@ -134,7 +134,7 @@ Wo wir schon bei Klassen sind - Wie wäre es mit Properties! Eine Property
|
||||
ist eine Funktion, die wie ein Wert agiert. Das gibt uns viel klarere Syntax
|
||||
im Stil von `structure.x = 7` was gleichgültig wäre zu `structure.setX(7)`
|
||||
|
||||
```c
|
||||
```d
|
||||
// Diese Klasse ist parameterisiert mit T, U
|
||||
|
||||
class MyClass(T, U) {
|
||||
@ -201,7 +201,7 @@ puren Funktionen und unveränderbaren Daten.
|
||||
Zusätzlich können viele funktionale Algorithmen wie z.B
|
||||
map, filter, reduce und friends im `std.algorithm` Modul gefunden werden!
|
||||
|
||||
```c
|
||||
```d
|
||||
import std.algorithm : map, filter, reduce;
|
||||
import std.range : iota; // builds an end-exclusive range
|
||||
|
||||
@ -231,7 +231,7 @@ Methode auf A anwenden.
|
||||
|
||||
Parrallel Computing ist eine Tolle sache, findest du nicht auch?
|
||||
|
||||
```c
|
||||
```d
|
||||
import std.stdio;
|
||||
import std.parallelism : parallel;
|
||||
import std.math : sqrt;
|
||||
|
@ -26,7 +26,7 @@ yourself.
|
||||
|
||||
# Key Notation
|
||||
|
||||
``` text
|
||||
```text
|
||||
The Emacs manual and the community in general uses a convention to refer to different key combinations used within Emacs. Specifically, Emacs has the notion of a "modifier key" that is pressed along with another key to modify its action.
|
||||
|
||||
An example of this notation is "C-c". In this key combination "C" is the modifier and stands for the "Ctrl" key and "c" is the key whose action is being modified (the literal character "c").
|
||||
@ -83,7 +83,7 @@ buffer.
|
||||
|
||||
# Navigation Basics
|
||||
|
||||
``` text
|
||||
```text
|
||||
The GUI version of Emacs can be navigated with the mouse like you would expect from a conventional GUI text editor.
|
||||
|
||||
The aim here is to focus on navigation solely using the keyboard as this enhances productivity immensely.
|
||||
@ -157,7 +157,7 @@ character).
|
||||
|
||||
# File editing basics
|
||||
|
||||
``` text
|
||||
```text
|
||||
* Quitting Emacs [ Now you can't say you don't know how to quit Emacs :-) ]
|
||||
|
||||
C-x C-c --> Quit Emacs and get prompted to save any unsaved files (buffers not visiting a file will simply be discarded unless you're running in client-server mode)
|
||||
@ -183,7 +183,7 @@ C-u 3 C-_ --> Undo the last 3 changes.
|
||||
|
||||
# Executing Elisp Functions
|
||||
|
||||
``` text
|
||||
```text
|
||||
You can execute any currently loaded Elisp functions (including ones you have written yourself) via "M-x"
|
||||
|
||||
M-x RET --> Prompts you for name of function to execute (Tab completion is available).
|
||||
@ -227,7 +227,7 @@ Emacs features a pretty powerful help system that allows you to discover
|
||||
new functionality all the
|
||||
time.
|
||||
|
||||
``` text
|
||||
```text
|
||||
Obtaining help on specific topics. Tab completion is available for function and variable names.
|
||||
|
||||
C-h f RET --> Prompts you for the name of an elisp function and
|
||||
|
@ -11,7 +11,7 @@ translators:
|
||||
Less es un pre-procesador CSS, que añade características como variables, anidación, mixins y más.
|
||||
Less (y otros pre-procesadores como [Sass](http://sass-lang.com/) ayudan a los desarrolladores a escribir código mantenible y DRY (Don't Repeat Yourself).
|
||||
|
||||
```css
|
||||
```less
|
||||
//Los comentarios de una línea son borrados cuando Less es compilado a CSS.
|
||||
|
||||
/* Los comentarios multi-línea se mantienen. */
|
||||
|
@ -23,7 +23,7 @@ desarrollo activo para traer aún más funciones.
|
||||
La retroalimentación siempre es bienvenida, así que sientete libre de
|
||||
contactarme en [@kurisuwhyte](https://twitter.com/kurisuwhyte) :)
|
||||
|
||||
```coffeescript
|
||||
```livescript
|
||||
# Justo como su primo CoffeeScript, LiveScript usa símbolos de gato para
|
||||
# comentarios de una sola línea
|
||||
|
||||
@ -31,8 +31,7 @@ contactarme en [@kurisuwhyte](https://twitter.com/kurisuwhyte) :)
|
||||
Comentarios multi-línea son escritos con estilo de C. Usa este estilo si quieres
|
||||
que los comentarios se preserven en el output de Javascript
|
||||
*/
|
||||
```
|
||||
```coffeescript
|
||||
|
||||
# En lo que a la sintaxis se refiere, LiveScript usa indentación para delimitar
|
||||
# bloques en lugar de llaves {} y espacios para aplicar funciones, en lugar de
|
||||
# paréntesis.
|
||||
|
@ -25,7 +25,7 @@ Vous pouvez contacter l'auteur du guide original en anglais ici :
|
||||
[@kurisuwhyte](https://twitter.com/kurisuwhyte)
|
||||
|
||||
|
||||
```coffeescript
|
||||
```livescript
|
||||
# Comme son cousin CoffeeScript, LiveScript utilise le symbole dièse pour les
|
||||
# commentaires sur une ligne.
|
||||
|
||||
@ -33,8 +33,7 @@ Vous pouvez contacter l'auteur du guide original en anglais ici :
|
||||
Les commentaires sur plusieurs lignes utilisent la syntaxe du C. Utilisez-les
|
||||
si vous voulez préserver les commentaires dans la sortie JavaScript.
|
||||
*/
|
||||
```
|
||||
```coffeescript
|
||||
|
||||
# LiveScript utilise l'indentation pour délimiter les blocs de code plutôt que
|
||||
# les accolades, et les espaces pour appliquer les fonctions (bien que les
|
||||
# parenthèses soient utilisables).
|
||||
|
@ -12,7 +12,7 @@ the engine. It's a perfect fit for game development.
|
||||
|
||||
## Basics
|
||||
|
||||
```nim
|
||||
```gdscript
|
||||
# Single-line comments are written using hash symbol.
|
||||
"""
|
||||
Multi-line
|
||||
@ -209,7 +209,7 @@ func use_inner_class():
|
||||
|
||||
## Accessing other nodes in the scene tree
|
||||
|
||||
```nim
|
||||
```gdscript
|
||||
extends Node2D
|
||||
|
||||
var sprite # This variable will hold the reference.
|
||||
@ -258,7 +258,7 @@ onready var reference = get_node(nodepath) as Node
|
||||
Signal system is Godot's implementation of the observer programming
|
||||
pattern. Here's an example:
|
||||
|
||||
```nim
|
||||
```gdscript
|
||||
class_name Player extends Node2D
|
||||
|
||||
var hp = 10
|
||||
@ -285,7 +285,7 @@ func _on_death():
|
||||
|
||||
GDScript can optionally use static typing.
|
||||
|
||||
```nim
|
||||
```gdscript
|
||||
extends Node
|
||||
|
||||
var x: int # define typed variable
|
||||
|
@ -12,7 +12,7 @@ Swf/ActionScript, JavaScript, Java, PHP, Python, Lua, HashLink, and Neko bytecod
|
||||
Haxe version 3. Some of the guide may be applicable to older versions, but it is
|
||||
recommended to use other references.
|
||||
|
||||
```csharp
|
||||
```haxe
|
||||
/*
|
||||
Welcome to Learn Haxe 3 in 15 minutes. http://www.haxe.org
|
||||
This is an executable tutorial. You can compile and run it using the haxe
|
||||
|
@ -8,7 +8,7 @@ contributors:
|
||||
Less is a CSS pre-processor, that adds features such as variables, nesting, mixins and more.
|
||||
Less (and other preprocessors, such as [Sass](http://sass-lang.com/)) help developers to write maintainable and DRY (Don't Repeat Yourself) code.
|
||||
|
||||
```css
|
||||
```less
|
||||
//Single line comments are removed when Less is compiled to CSS.
|
||||
|
||||
/*Multi line comments are preserved. */
|
||||
|
@ -22,7 +22,7 @@ Feedback is always welcome, so feel free to reach me over at
|
||||
[@kurisuwhyte](https://twitter.com/kurisuwhyte) :)
|
||||
|
||||
|
||||
```coffeescript
|
||||
```livescript
|
||||
# Just like its CoffeeScript cousin, LiveScript uses number symbols for
|
||||
# single-line comments.
|
||||
|
||||
@ -30,8 +30,7 @@ Feedback is always welcome, so feel free to reach me over at
|
||||
Multi-line comments are written C-style. Use them if you want comments
|
||||
to be preserved in the JavaScript output.
|
||||
*/
|
||||
```
|
||||
```coffeescript
|
||||
|
||||
# As far as syntax goes, LiveScript uses indentation to delimit blocks,
|
||||
# rather than curly braces, and whitespace to apply functions, rather
|
||||
# than parenthesis.
|
||||
|
@ -16,7 +16,7 @@ para versões anteriores, mas é recomendado que você busque outras referência
|
||||
para essas versões.
|
||||
|
||||
|
||||
```csharp
|
||||
```haxe
|
||||
/*
|
||||
Bem vindo ao Aprenda Haxe 3 em 15 minutos. http://www.haxe.org
|
||||
Este é um tutorial executável. Você pode compilar e rodar este tutorial
|
||||
|
@ -10,7 +10,7 @@ lang: pt-br
|
||||
Less é um pré-processador de CSS, que adiciona recursos como variáveis, aninhamento, mixins e muito mais.
|
||||
Less (e outros pré-processadores, como o [Sass](http://sass-lang.com/)) ajudam os desenvolvedores a escreverem código que pode ser mantido e DRY (não se repita).
|
||||
|
||||
```css
|
||||
```less
|
||||
//Comentários de linha única são removidos quando Less é compilado para CSS.
|
||||
|
||||
/*Comentários de várias linhas são preservados.*/
|
||||
|
@ -15,7 +15,7 @@ A sintaxe do Stylus é muito flexivel podendo utilizar a sintaxe padrão do CSS
|
||||
Stylus não fornece novas opções de estilos, mas dá funcionalidades que permitem deixar seu CSS muito mais dinâmico.
|
||||
|
||||
|
||||
```scss
|
||||
```sass
|
||||
/* Estilo de código
|
||||
==============================*/
|
||||
|
||||
|
@ -15,7 +15,7 @@ Stylus syntax is very flexible. You can use standard CSS syntax and leave the se
|
||||
|
||||
Stylus does not provide new style options, but gives functionality that lets you make your CSS much more dynamic.
|
||||
|
||||
```scss
|
||||
```sass
|
||||
/* Code style
|
||||
==============================*/
|
||||
|
||||
|
@ -10,7 +10,7 @@ lang: vi-vn
|
||||
|
||||
Less là một CSS pre-processor (bộ tiền xử lí CSS), nó thêm các tính năng như biến (variable), lồng (nesting), mixin và nhiều thứ khác. Less cùng với các CSS pre-processor khác như [Sass](http://sass-lang.com/) giúp lập trình viên viết được các đoạn CSS bảo trì được và không bị lặp lại (DRY - Don't Repeat Yourself).
|
||||
|
||||
```css
|
||||
```less
|
||||
// Comment (chú thích) một dòng sẽ bị xóa khi Less được biên dịch thành CSS
|
||||
|
||||
/* Comment trên nhiều dòng sẽ được giữ lại */
|
||||
@ -388,4 +388,4 @@ Less có thể được dùng trong bất kì dự án nào miễn là ta có ch
|
||||
|
||||
## Tìm hiểu thêm
|
||||
* [Tài liệu chính thức](http://lesscss.org/features/)
|
||||
* [Less CSS - Hướng dẫn cho người mới bắt đầu](http://www.hongkiat.com/blog/less-basic/)
|
||||
* [Less CSS - Hướng dẫn cho người mới bắt đầu](http://www.hongkiat.com/blog/less-basic/)
|
||||
|
@ -13,7 +13,7 @@ GDScript 是一种动态类型的脚本语言,专门为免费开源游戏引
|
||||
|
||||
## 基础
|
||||
|
||||
```nim
|
||||
```gdscript
|
||||
# 单行注释使用 # 号书写。
|
||||
"""
|
||||
多行
|
||||
@ -204,7 +204,7 @@ func use_inner_class():
|
||||
|
||||
## 访问场景树中其他节点
|
||||
|
||||
```nim
|
||||
```gdscript
|
||||
extends Node2D
|
||||
|
||||
var sprite # 该变量将用来保存引用。
|
||||
@ -250,7 +250,7 @@ onready var reference = get_node(nodepath) as Node
|
||||
|
||||
信号系统是 Godot 对观察者编程模式的实现。例子如下:
|
||||
|
||||
```nim
|
||||
```gdscript
|
||||
class_name Player extends Node2D
|
||||
|
||||
var hp = 10
|
||||
@ -277,7 +277,7 @@ func _on_death():
|
||||
|
||||
GDScript 可以选择性地使用静态类型。
|
||||
|
||||
```nim
|
||||
```gdscript
|
||||
extends Node
|
||||
|
||||
var x: int # 定义带有类型的变量
|
||||
@ -314,4 +314,4 @@ signal example(arg: int) # 错误!信号不能接受类型参数!
|
||||
* [NodePath](https://docs.godotengine.org/en/stable/classes/class_nodepath.html)
|
||||
* [Signals](https://docs.godotengine.org/en/stable/getting_started/step_by_step/signals.html)
|
||||
* [GDQuest](https://www.gdquest.com/)
|
||||
* [GDScript.com](https://gdscript.com/)
|
||||
* [GDScript.com](https://gdscript.com/)
|
||||
|
@ -12,7 +12,7 @@ lang: zh-cn
|
||||
Less是一种CSS预处理器,它增加了诸如变量、嵌套、mixin等功能。
|
||||
Less(以及其它预处理器,如[Sass](http://sass-lang.com/))能帮助开发人员编写易维护,DRY (Don't Repeat Yourself) 的代码。
|
||||
|
||||
```css
|
||||
```less
|
||||
//单行注释在编译成CSS后会被删除。
|
||||
|
||||
/* 多行注释将保留. */
|
||||
|
@ -21,14 +21,13 @@ LiveScript 目前已释出稳定版本,开发中的新版本将会加入更多
|
||||
[@kurisuwhyte](https://twitter.com/kurisuwhyte) 与我连系 :)
|
||||
|
||||
|
||||
```coffeescript
|
||||
```livescript
|
||||
# 与 CoffeeScript 一样,LiveScript 使用 # 单行注解。
|
||||
|
||||
/*
|
||||
多行注解与 C 相同。使用注解可以避免被当成 JavaScript 输出。
|
||||
*/
|
||||
```
|
||||
```coffeescript
|
||||
|
||||
# 语法的部份,LiveScript 使用缩进取代 {} 来定义区块,
|
||||
# 使用空白取代 () 来执行函数。
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user