mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-09 00:06:47 +02:00
Merge remote-tracking branch 'adambard/master'
This commit is contained in:
@@ -1066,7 +1066,7 @@ The more information you give the Chapel development team about issues you encou
|
|||||||
Feel free to email the team and other developers through the [sourceforge email lists](https://sourceforge.net/p/chapel/mailman).
|
Feel free to email the team and other developers through the [sourceforge email lists](https://sourceforge.net/p/chapel/mailman).
|
||||||
|
|
||||||
If you're really interested in the development of the compiler or contributing to the project,
|
If you're really interested in the development of the compiler or contributing to the project,
|
||||||
[check out the master Github repository](https://github.com/chapel-lang/chapel).
|
[check out the master GitHub repository](https://github.com/chapel-lang/chapel).
|
||||||
It is under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).
|
It is under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).
|
||||||
|
|
||||||
Installing the Compiler
|
Installing the Compiler
|
||||||
|
@@ -53,7 +53,7 @@ __Stejně jako tento.__
|
|||||||
**_Jako tento!_**
|
**_Jako tento!_**
|
||||||
*__A tento!__*
|
*__A tento!__*
|
||||||
|
|
||||||
<!-- Ve verzi Markdownu od Githubu, máme k dispozici taky prošktrnutí: -->
|
<!-- Ve verzi Markdownu od GitHubu, máme k dispozici taky prošktrnutí: -->
|
||||||
|
|
||||||
~~Tento text je prošktrnutý.~~
|
~~Tento text je prošktrnutý.~~
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ Tento box bude zašktrnutý
|
|||||||
|
|
||||||
Jan nevědel, jak se dělá `go_to()` funkce!
|
Jan nevědel, jak se dělá `go_to()` funkce!
|
||||||
|
|
||||||
<!-- V Markdownu od Githubu , můžete použít speciální syntaxi pro kód -->
|
<!-- V Markdownu od GitHubu , můžete použít speciální syntaxi pro kód -->
|
||||||
|
|
||||||
\`\`\`ruby <!-- vyjma zpětných lomítek, jenom ```ruby ! -->
|
\`\`\`ruby <!-- vyjma zpětných lomítek, jenom ```ruby ! -->
|
||||||
def neco
|
def neco
|
||||||
@@ -160,7 +160,7 @@ def neco
|
|||||||
end
|
end
|
||||||
\`\`\` <!-- zde taky, žádné zpětná lomítka, pouze ``` -->
|
\`\`\` <!-- zde taky, žádné zpětná lomítka, pouze ``` -->
|
||||||
|
|
||||||
<!-- Text výše nepotřebuje odsazení a navíc Github použije zvýraznění označeného
|
<!-- Text výše nepotřebuje odsazení a navíc GitHub použije zvýraznění označeného
|
||||||
jazyka. -->
|
jazyka. -->
|
||||||
|
|
||||||
<!-- Horizontální čára (<hr />) -->
|
<!-- Horizontální čára (<hr />) -->
|
||||||
@@ -232,13 +232,13 @@ Dejte text, který chcete zobrazit, do [] následovaný url v závorkách () a j
|
|||||||
Chci napsat *tento text obklopený hvězdičkami*, ale nechci aby to bylo kurzívou, tak udělám: \*tento text obklopený hvězdičkami\*.
|
Chci napsat *tento text obklopený hvězdičkami*, ale nechci aby to bylo kurzívou, tak udělám: \*tento text obklopený hvězdičkami\*.
|
||||||
|
|
||||||
<!-- Klávesové zkratky -->
|
<!-- Klávesové zkratky -->
|
||||||
<!-- V Markdownu od Githubu, můžete použít tag <kbd> k reprezentování klaves na počítači -->
|
<!-- V Markdownu od GitHubu, můžete použít tag <kbd> k reprezentování klaves na počítači -->
|
||||||
|
|
||||||
Váš počítač přestal pracovat? Zkuste
|
Váš počítač přestal pracovat? Zkuste
|
||||||
<kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Del</kbd>
|
<kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Del</kbd>
|
||||||
|
|
||||||
<!-- Tabulky -->
|
<!-- Tabulky -->
|
||||||
<!-- Tabulky jsou povolené pouze v Markdownu od Githubu a jsou trochu podivně,
|
<!-- Tabulky jsou povolené pouze v Markdownu od GitHubu a jsou trochu podivně,
|
||||||
ale když je opravdu chcete: -->
|
ale když je opravdu chcete: -->
|
||||||
|
|
||||||
| Sloupec1 | Sloupec2 | Sloupec3 |
|
| Sloupec1 | Sloupec2 | Sloupec3 |
|
||||||
|
@@ -56,7 +56,7 @@ __Genau wie dieser.__
|
|||||||
**_Dieser auch!_**
|
**_Dieser auch!_**
|
||||||
*__Und dieser genau so!__*
|
*__Und dieser genau so!__*
|
||||||
|
|
||||||
<!-- In "Github Flavored Markdown", dem von Github verwendeten Dialekt / Parser,
|
<!-- In "GitHub Flavored Markdown", dem von GitHub verwendeten Dialekt / Parser,
|
||||||
gibt es auch noch durchgestrichenen Text: -->
|
gibt es auch noch durchgestrichenen Text: -->
|
||||||
|
|
||||||
~~Dieser Text wird durchgestrichen dargestellt.~~
|
~~Dieser Text wird durchgestrichen dargestellt.~~
|
||||||
@@ -148,7 +148,7 @@ indem du eine Zeile mit vier Leerzeichen oder einem Tabulator einrückst -->
|
|||||||
|
|
||||||
Hermann hatte nicht die leiseste Ahnung, was dieses `go_to()` bedeuten könnte!
|
Hermann hatte nicht die leiseste Ahnung, was dieses `go_to()` bedeuten könnte!
|
||||||
|
|
||||||
<!-- In "Github Flavored Markdown" gibt es für Code nocheinmal eine
|
<!-- In "GitHub Flavored Markdown" gibt es für Code nocheinmal eine
|
||||||
besondere Syntax -->
|
besondere Syntax -->
|
||||||
|
|
||||||
\`\`\`ruby <!-- in "echt" musst du die Backslashes entfernen: ```ruby ! -->
|
\`\`\`ruby <!-- in "echt" musst du die Backslashes entfernen: ```ruby ! -->
|
||||||
@@ -157,7 +157,7 @@ def foobar
|
|||||||
end
|
end
|
||||||
\`\`\` <!-- hier auch keine Backslashes, nur ``` -->
|
\`\`\` <!-- hier auch keine Backslashes, nur ``` -->
|
||||||
|
|
||||||
<-- der obige Block muss nicht extra eingerückt werden, außerdem fügt Github
|
<-- der obige Block muss nicht extra eingerückt werden, außerdem fügt GitHub
|
||||||
Syntax-Highlighting für die nach dem ``` angegebene Sprache hinzu -->
|
Syntax-Highlighting für die nach dem ``` angegebene Sprache hinzu -->
|
||||||
|
|
||||||
<!-- Horizontale Linie (<hr />) -->
|
<!-- Horizontale Linie (<hr />) -->
|
||||||
@@ -233,7 +233,7 @@ Ich würde *diesen Teil gerne mit Sternen umschließen*, doch ohne dass er kursi
|
|||||||
wird. Also mache ich folgendes: \*Ich umschließe diesen Text mit Sternen\*!
|
wird. Also mache ich folgendes: \*Ich umschließe diesen Text mit Sternen\*!
|
||||||
|
|
||||||
<!-- Tabellen -->
|
<!-- Tabellen -->
|
||||||
<!-- Tabellen gibt es bis jetzt nur in "Github Flavored Markdown".
|
<!-- Tabellen gibt es bis jetzt nur in "GitHub Flavored Markdown".
|
||||||
Zudem sind sie ziemlich mühselig, aber wenn du es wirklich wissen willst: -->
|
Zudem sind sie ziemlich mühselig, aber wenn du es wirklich wissen willst: -->
|
||||||
|
|
||||||
| Spalte1 | Spalte2 | Spalte3 |
|
| Spalte1 | Spalte2 | Spalte3 |
|
||||||
@@ -253,4 +253,4 @@ Ganz schön hässlich | vielleicht doch lieber | wieder aufhören
|
|||||||
|
|
||||||
Mehr Informationen gibt es in [John Gruber's offiziellem Blog-Post](http://daringfireball.net/projects/markdown/syntax)
|
Mehr Informationen gibt es in [John Gruber's offiziellem Blog-Post](http://daringfireball.net/projects/markdown/syntax)
|
||||||
und bei Adam Pritchards [grandiosem Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet).
|
und bei Adam Pritchards [grandiosem Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet).
|
||||||
Infos zu Github Flavored Markdown [gibt es hier](https://help.github.com/articles/github-flavored-markdown).
|
Infos zu GitHub Flavored Markdown [gibt es hier](https://help.github.com/articles/github-flavored-markdown).
|
@@ -57,8 +57,8 @@ __Al igual que este texto.__
|
|||||||
**_Al igual que este!_**
|
**_Al igual que este!_**
|
||||||
*__¡Y este!__*
|
*__¡Y este!__*
|
||||||
|
|
||||||
<!-- En Github Flavored Markdown, el cual es usado para mostrar archivos
|
<!-- En GitHub Flavored Markdown, el cual es usado para mostrar archivos
|
||||||
Markdown en Github, también tenemos: -->
|
Markdown en GitHub, también tenemos: -->
|
||||||
|
|
||||||
~~Este texto está tachado.~~
|
~~Este texto está tachado.~~
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ para indentar dentro del código -->
|
|||||||
|
|
||||||
¡John no sabía lo que la función `go_to()` hacía!
|
¡John no sabía lo que la función `go_to()` hacía!
|
||||||
|
|
||||||
<!-- Con Github Flavored Markdown, puedes usar una sintaxis especial para código -->
|
<!-- Con GitHub Flavored Markdown, puedes usar una sintaxis especial para código -->
|
||||||
|
|
||||||
\`\`\`ruby <!-- quita esas comillas cuando lo hagas, deja sólo ```ruby ! -->
|
\`\`\`ruby <!-- quita esas comillas cuando lo hagas, deja sólo ```ruby ! -->
|
||||||
def foobar
|
def foobar
|
||||||
@@ -158,7 +158,7 @@ def foobar
|
|||||||
end
|
end
|
||||||
\`\`\` <!-- aquí también, sin comillas, sólo ``` -->
|
\`\`\` <!-- aquí también, sin comillas, sólo ``` -->
|
||||||
|
|
||||||
<!-- El texto de arriba no necesita indentación, aparte Github usará
|
<!-- El texto de arriba no necesita indentación, aparte GitHub usará
|
||||||
resaltará la sintaxis del lenguaje que especifiques después de ``` -->
|
resaltará la sintaxis del lenguaje que especifiques después de ``` -->
|
||||||
|
|
||||||
<!-- Regla horizontal (<hr />) -->
|
<!-- Regla horizontal (<hr />) -->
|
||||||
@@ -231,7 +231,7 @@ Quiero escribir *este texto rodeado por asteriscos* pero no quiero que esté en
|
|||||||
así que hago esto: \*Este texto está rodeado de asteriscos\*.
|
así que hago esto: \*Este texto está rodeado de asteriscos\*.
|
||||||
|
|
||||||
<!-- Tablas -->
|
<!-- Tablas -->
|
||||||
<!-- Las tablas sólo están disponibles en Github Flavored Markdown y son un poco pesadas,
|
<!-- Las tablas sólo están disponibles en GitHub Flavored Markdown y son un poco pesadas,
|
||||||
pero si de verdad las quieres: -->
|
pero si de verdad las quieres: -->
|
||||||
|
|
||||||
| Col1 | Col2 | Col3 |
|
| Col1 | Col2 | Col3 |
|
||||||
|
@@ -50,8 +50,8 @@ __Kuten on tämäkin teksti.__
|
|||||||
**_Kuten tämäkin!_**
|
**_Kuten tämäkin!_**
|
||||||
*__Kuten tämäkin!__*
|
*__Kuten tämäkin!__*
|
||||||
|
|
||||||
<!-- Github-tyylisessä Markdownissa, jota käytetään tiedostojen esittämiseksi
|
<!-- GitHub-tyylisessä Markdownissa, jota käytetään tiedostojen esittämiseksi
|
||||||
Githubissa, meillä on käytössämme myös yliviivaus: -->
|
GitHubissa, meillä on käytössämme myös yliviivaus: -->
|
||||||
|
|
||||||
~~Tämä teksti on yliviivattua.~~
|
~~Tämä teksti on yliviivattua.~~
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ rivin neljällä välilyönnillä tai tabulaattorilla. -->
|
|||||||
|
|
||||||
John ei tiennyt edes mitä `go_to()` -funktio teki!
|
John ei tiennyt edes mitä `go_to()` -funktio teki!
|
||||||
|
|
||||||
<!-- Githubin Markdownissa voit käyttää erityissyntaksia koodille. -->
|
<!-- GitHubin Markdownissa voit käyttää erityissyntaksia koodille. -->
|
||||||
|
|
||||||
\`\`\`ruby <!-- paitsi että poista nuo kenoviivat, vain ```ruby ! -->
|
\`\`\`ruby <!-- paitsi että poista nuo kenoviivat, vain ```ruby ! -->
|
||||||
def foobar
|
def foobar
|
||||||
@@ -158,7 +158,7 @@ def foobar
|
|||||||
end
|
end
|
||||||
\`\`\` <!-- tästä myös, ei kenoviivoja, vain ``` -->
|
\`\`\` <!-- tästä myös, ei kenoviivoja, vain ``` -->
|
||||||
|
|
||||||
<!-- Yllä oleva teksti ei vaadi sisennystä. Lisäksi Github käyttää ``` jälkeen
|
<!-- Yllä oleva teksti ei vaadi sisennystä. Lisäksi GitHub käyttää ``` jälkeen
|
||||||
mainitsemasi kielen syntaksin korostusta -->
|
mainitsemasi kielen syntaksin korostusta -->
|
||||||
|
|
||||||
<!-- Vaakaviiva (<hr />) -->
|
<!-- Vaakaviiva (<hr />) -->
|
||||||
@@ -231,13 +231,13 @@ haluan kirjoittaa *tämän tekstin jonka ympärillä on asteriskit* mutta en hal
|
|||||||
sen kursivoituvan, joten teen näin: \*tämän tekstin ympärillä on asteriskit\*.
|
sen kursivoituvan, joten teen näin: \*tämän tekstin ympärillä on asteriskit\*.
|
||||||
|
|
||||||
<!-- Näppäimistön näppäimet -->
|
<!-- Näppäimistön näppäimet -->
|
||||||
<!-- Githubin Markdownissa, voit käyttää <kbd> -tagia esittämään näppäimiä -->
|
<!-- GitHubin Markdownissa, voit käyttää <kbd> -tagia esittämään näppäimiä -->
|
||||||
|
|
||||||
Tietokoneesi kaatui? Kokeile painaa
|
Tietokoneesi kaatui? Kokeile painaa
|
||||||
<kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Del</kbd>
|
<kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Del</kbd>
|
||||||
|
|
||||||
<!-- Taulukot -->
|
<!-- Taulukot -->
|
||||||
<!-- Taulukot ovat saatavilla vain Githubin markdownissa ja ne ovat melko
|
<!-- Taulukot ovat saatavilla vain GitHubin markdownissa ja ne ovat melko
|
||||||
vaivalloisia käyttää, mutta jos todella haluat: -->
|
vaivalloisia käyttää, mutta jos todella haluat: -->
|
||||||
|
|
||||||
| Kolumni1 | Kolumni2 | Kolumni3 |
|
| Kolumni1 | Kolumni2 | Kolumni3 |
|
||||||
|
@@ -62,8 +62,8 @@ __Celui-là aussi.__
|
|||||||
**_Pareil ici_**
|
**_Pareil ici_**
|
||||||
*__Et là!__*
|
*__Et là!__*
|
||||||
|
|
||||||
<!-- Dans le "Github Flavored Markdown", utilisé pour interpréter le Markdown
|
<!-- Dans le "GitHub Flavored Markdown", utilisé pour interpréter le Markdown
|
||||||
sur Github, on a également le strikethrough ( texte barré ) : -->
|
sur GitHub, on a également le strikethrough ( texte barré ) : -->
|
||||||
|
|
||||||
~~Ce texte est barré avec strikethrough.~~
|
~~Ce texte est barré avec strikethrough.~~
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ fonctionne aussi à l'intérieur du bloc de code -->
|
|||||||
|
|
||||||
La fonction `run()` ne vous oblige pas à aller courir!
|
La fonction `run()` ne vous oblige pas à aller courir!
|
||||||
|
|
||||||
<!-- Via Github Flavored Markdown, vous pouvez utiliser
|
<!-- Via GitHub Flavored Markdown, vous pouvez utiliser
|
||||||
des syntaxes spécifiques -->
|
des syntaxes spécifiques -->
|
||||||
|
|
||||||
\`\`\`ruby
|
\`\`\`ruby
|
||||||
@@ -183,7 +183,7 @@ puts "Hello world!"
|
|||||||
end
|
end
|
||||||
\`\`\` <!-- pareil, pas de backslashes, juste ``` en guise de fin -->
|
\`\`\` <!-- pareil, pas de backslashes, juste ``` en guise de fin -->
|
||||||
|
|
||||||
<-- Pas besoin d'indentation pour le code juste au dessus, de plus, Github
|
<-- Pas besoin d'indentation pour le code juste au dessus, de plus, GitHub
|
||||||
va utiliser une coloration syntaxique pour le langage indiqué après les ``` -->
|
va utiliser une coloration syntaxique pour le langage indiqué après les ``` -->
|
||||||
|
|
||||||
<!-- Ligne Horizontale (<hr />) -->
|
<!-- Ligne Horizontale (<hr />) -->
|
||||||
@@ -264,7 +264,7 @@ Pour taper *ce texte* entouré d'astérisques mais pas en italique :
|
|||||||
Tapez \*ce texte\*.
|
Tapez \*ce texte\*.
|
||||||
|
|
||||||
<!-- Tableaux -->
|
<!-- Tableaux -->
|
||||||
<!-- les Tableaux ne sont disponibles que dans le Github Flavored Markdown
|
<!-- les Tableaux ne sont disponibles que dans le GitHub Flavored Markdown
|
||||||
et c'est ce n'est pas super agréable d'utilisation.
|
et c'est ce n'est pas super agréable d'utilisation.
|
||||||
Mais si vous en avez besoin :
|
Mais si vous en avez besoin :
|
||||||
-->
|
-->
|
||||||
|
@@ -169,6 +169,6 @@ This tutorial is just a very basic introduction to hy/lisp/python.
|
|||||||
|
|
||||||
Hy docs are here: [http://hy.readthedocs.org](http://hy.readthedocs.org)
|
Hy docs are here: [http://hy.readthedocs.org](http://hy.readthedocs.org)
|
||||||
|
|
||||||
Hy's Github repo: [http://github.com/hylang/hy](http://github.com/hylang/hy)
|
Hy's GitHub repo: [http://github.com/hylang/hy](http://github.com/hylang/hy)
|
||||||
|
|
||||||
On freenode irc #hy, twitter hashtag #hylang
|
On freenode irc #hy, twitter hashtag #hylang
|
||||||
|
@@ -418,5 +418,5 @@ lua-users.org에 있는 <a href="http://lua-users.org/files/wiki_insecure/users/
|
|||||||
learn.lua로 저장한 후 "lua learn.lua"를 실행해 보세요!
|
learn.lua로 저장한 후 "lua learn.lua"를 실행해 보세요!
|
||||||
|
|
||||||
이 글은 tylerneylon.com에 처음으로 써본 글이며,
|
이 글은 tylerneylon.com에 처음으로 써본 글이며,
|
||||||
<a href="https://gist.github.com/tylerneylon/5853042">Github의 Gist</a>에서도 확인할 수 있습니다.
|
<a href="https://gist.github.com/tylerneylon/5853042">GitHub의 Gist</a>에서도 확인할 수 있습니다.
|
||||||
루아로 즐거운 시간을 보내세요!
|
루아로 즐거운 시간을 보내세요!
|
||||||
|
@@ -72,8 +72,8 @@ __And so is this text.__
|
|||||||
*__And this!__*
|
*__And this!__*
|
||||||
```
|
```
|
||||||
|
|
||||||
In Github Flavored Markdown, which is used to render markdown files on
|
In GitHub Flavored Markdown, which is used to render markdown files on
|
||||||
Github, we also have strikethrough:
|
GitHub, we also have strikethrough:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
~~This text is rendered with strikethrough.~~
|
~~This text is rendered with strikethrough.~~
|
||||||
@@ -200,7 +200,7 @@ Inline code can be created using the backtick character `
|
|||||||
John didn't even know what the `go_to()` function did!
|
John didn't even know what the `go_to()` function did!
|
||||||
```
|
```
|
||||||
|
|
||||||
In Github Flavored Markdown, you can use a special syntax for code
|
In GitHub Flavored Markdown, you can use a special syntax for code
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<code class="highlight">```ruby
|
<code class="highlight">```ruby
|
||||||
@@ -209,7 +209,7 @@ def foobar
|
|||||||
end
|
end
|
||||||
```</code></pre>
|
```</code></pre>
|
||||||
|
|
||||||
The above text doesn't require indenting, plus Github will use syntax
|
The above text doesn't require indenting, plus GitHub will use syntax
|
||||||
highlighting of the language you specify after the \`\`\`
|
highlighting of the language you specify after the \`\`\`
|
||||||
|
|
||||||
## Horizontal rule
|
## Horizontal rule
|
||||||
@@ -298,7 +298,7 @@ in italics, so I do this: \*this text surrounded by asterisks\*.
|
|||||||
|
|
||||||
### Keyboard keys
|
### Keyboard keys
|
||||||
|
|
||||||
In Github Flavored Markdown, you can use a `<kbd>` tag to represent keyboard keys.
|
In GitHub Flavored Markdown, you can use a `<kbd>` tag to represent keyboard keys.
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Your computer crashed? Try sending a
|
Your computer crashed? Try sending a
|
||||||
@@ -306,7 +306,7 @@ Your computer crashed? Try sending a
|
|||||||
```
|
```
|
||||||
### Tables
|
### Tables
|
||||||
|
|
||||||
Tables are only available in Github Flavored Markdown and are slightly
|
Tables are only available in GitHub Flavored Markdown and are slightly
|
||||||
cumbersome, but if you really want it:
|
cumbersome, but if you really want it:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
|
218
pt-br/amd.html.markdown
Normal file
218
pt-br/amd.html.markdown
Normal file
@@ -0,0 +1,218 @@
|
|||||||
|
---
|
||||||
|
category: tool
|
||||||
|
tool: amd
|
||||||
|
contributors:
|
||||||
|
- ["Frederik Ring", "https://github.com/m90"]
|
||||||
|
translators:
|
||||||
|
- ["Felipe Tarijon", "http://nanoincub.com/"]
|
||||||
|
lang: ptr-br
|
||||||
|
filename: learnamd-pt.js
|
||||||
|
---
|
||||||
|
|
||||||
|
## Começando com AMD
|
||||||
|
|
||||||
|
A API de Definição de Módulos Assíncrona **Asynchronous Module Definition**
|
||||||
|
especifica um mecanismo para definição de módulos em JavaScript para os quais o
|
||||||
|
módulo e suas dependências podem ser carregados de forma assíncrona. Isso é
|
||||||
|
particularmente bem adequado para o ambiente do browser onde o carregamento de
|
||||||
|
módulos de forma síncrona fica sujeito a problemas de performance, usabilidade,
|
||||||
|
debugging e problemas de acesso em requisições cross-domain.
|
||||||
|
|
||||||
|
### Conceito básico
|
||||||
|
```javascript
|
||||||
|
// O básico da API de AMD consiste de nada mais que dois métodos: `define` e `require`
|
||||||
|
// e isso é tudo sobre a definição de módulo e consumo:
|
||||||
|
// `define(id?, dependências?, factory)` define um módulo
|
||||||
|
// `require(dependências, callback)` importa uma série de dependências e
|
||||||
|
// consome elas no callback passado como parâmetro.
|
||||||
|
|
||||||
|
// Vamos começar usando o define para definir um novo módulo
|
||||||
|
// que não tem dependências. Nós vamos fazer isso passando um nome
|
||||||
|
// e uma função factory para definir:
|
||||||
|
define('awesomeAMD', function(){
|
||||||
|
var isAMDAwesome = function(){
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
// O valor retornado da função de factory do módulo é
|
||||||
|
// o que os outros módulos ou chamadas de require irão
|
||||||
|
// receber quando requisitarem nosso módulo `awesomeAMD`.
|
||||||
|
// O valor exportado pode ser qualquer coisa, (construtor) funções,
|
||||||
|
// objetos, primitives, até mesmo undefined (apesar de que não irão ajudar muito).
|
||||||
|
return isAMDAwesome;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Agora, vamos definir outro módulo que depende do nosso módulo `awesomeAMD`.
|
||||||
|
// Perceba que existe um argumento adicional definindo nossas dependências do
|
||||||
|
// módulo agora:
|
||||||
|
define('loudmouth', ['awesomeAMD'], function(awesomeAMD){
|
||||||
|
// dependências serão passadas como argumentos da factory
|
||||||
|
// na ordem que elas forem especificadas
|
||||||
|
var tellEveryone = function(){
|
||||||
|
if (awesomeAMD()){
|
||||||
|
alert('Isso é tãaaao loko!');
|
||||||
|
} else {
|
||||||
|
alert('Bem estúpido, né não?');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return tellEveryone;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Agora que nós sabemos como usar o define, vamos usar o `require` para
|
||||||
|
// começar nosso programa. A assinatura do `require` é `(arrayDedependências, callback)`.
|
||||||
|
require(['loudmouth'], function(loudmouth){
|
||||||
|
loudmouth();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Para fazer esse tutorial executável, vamos implementar uma versão muito básica
|
||||||
|
// (não-assíncrona) de AMD bem aqui nesse lugar:
|
||||||
|
function define(nome, deps, factory){
|
||||||
|
// perceba como os módulos sem dependências são manipulados
|
||||||
|
define[nome] = require(factory ? deps : [], factory || deps);
|
||||||
|
}
|
||||||
|
|
||||||
|
function require(deps, callback){
|
||||||
|
var args = [];
|
||||||
|
// primeiro vamos recuperar todas as dependências necessárias
|
||||||
|
// pela chamada requerida
|
||||||
|
for (var i = 0; i < deps.length; i++){
|
||||||
|
args[i] = define[deps[i]];
|
||||||
|
}
|
||||||
|
// corresponder todas as dependências da função de callback
|
||||||
|
return callback.apply(null, args);
|
||||||
|
}
|
||||||
|
// você pode ver esse código em ação aqui: http://jsfiddle.net/qap949pd/
|
||||||
|
```
|
||||||
|
|
||||||
|
### Uso na vida real com require.js
|
||||||
|
|
||||||
|
Em contraste com o exemplo introdutório, `require.js` (a biblioteca mais popular de AMD) na verdade implementa o **A** do **AMD**, permitindo que você carregue os módulos e suas
|
||||||
|
dependências via XHR:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
/* file: app/main.js */
|
||||||
|
require(['modules/algumaClasse'], function(AlgumaClasse){
|
||||||
|
// o callback é deferido até que a dependencia seja carregada
|
||||||
|
var coisa = new AlgumaClasse();
|
||||||
|
});
|
||||||
|
console.log('Então aqui estamos nós, esperando!'); // isso vai rodar primeiro
|
||||||
|
```
|
||||||
|
|
||||||
|
Por convenção, você geralmente guarda um módulo em um arquivo. `require.js` pode resolver nome de módulos baseado no caminho das pastas, então você não precisa nomear os seus módulos, mas sim simplesmente referenciar eles usando sua origem. No exemplo `algumaClasse` é adotado a pasta `modules`, relativa a configuração da sua `baseUrl`:
|
||||||
|
|
||||||
|
* app/
|
||||||
|
* main.js
|
||||||
|
* modules/
|
||||||
|
* algumaClasse.js
|
||||||
|
* algunsHelpers.js
|
||||||
|
* ...
|
||||||
|
* daos/
|
||||||
|
* coisas.js
|
||||||
|
* ...
|
||||||
|
|
||||||
|
Isso significa que nós podemos definir `algumaClasse` sem especificar o id de um módulo:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
/* arquivo: app/modules/algumaClasse.js */
|
||||||
|
define(['daos/coisas', 'modules/algunsHelpers'], function(coisasDao, helpers){
|
||||||
|
// definição de módulo, claro, irá acontecer também de forma assíncrona
|
||||||
|
function AlgumaClasse(){
|
||||||
|
this.metodo = function(){/**/};
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
return AlgumaClasse;
|
||||||
|
});
|
||||||
|
```
|
||||||
|
Para alterar o comportamento padrão de mapeamento de caminho de pastas utilize
|
||||||
|
`requirejs.config(configObj)` em seu `main.js`:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
/* arquivo: main.js */
|
||||||
|
requirejs.config({
|
||||||
|
baseUrl : 'app',
|
||||||
|
paths : {
|
||||||
|
// você pode também carregar módulos de outros locais
|
||||||
|
jquery : '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min',
|
||||||
|
coolLibFromBower : '../bower_components/cool-lib/coollib'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
require(['jquery', 'coolLibFromBower', 'modules/algunsHelpers'], function($, coolLib, helpers){
|
||||||
|
// um arquivo `main` precisa chamar o require pelo menos uma vez,
|
||||||
|
// caso contrário, o código jamais rodará
|
||||||
|
coolLib.facaAlgoDoidoCom(helpers.transform($('#foo')));
|
||||||
|
});
|
||||||
|
```
|
||||||
|
Apps baseados em `require.js` geralmente terão u´m único ponto de acesso (`main.js`) que é passado à tag script do `require.js` como um data-attribute. Ele vai ser automaticamente carregado e executado com o carregamento da página:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Umas 100 tags de script? Nunca mais!</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script src="require.js" data-main="app/main"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Otimizando um projeto inteiro utilizando r.js
|
||||||
|
|
||||||
|
Muitas pessoas preferem usar AMD para sanar a organização do código durante o desenvolvimento, mas continuam querendo colocar um único arquivo de script em produção ao invés de realizarem centenas de requisições XHRs no carregamento da página.
|
||||||
|
|
||||||
|
`require.js` vem com um script chamado `r.js` (que você vai provavelmente rodar em node.js, embora Rhino suporte também) que você pode analisar o gráfico de dependências de seu projeto, e fazer em um único arquivo contendo todos os seus módulos (corretamente nomeados), minificados e prontos para serem consumidos.
|
||||||
|
|
||||||
|
Instale-o utilizando `npm`:
|
||||||
|
```shell
|
||||||
|
$ npm install requirejs -g
|
||||||
|
```
|
||||||
|
|
||||||
|
Agora você pode alimentá-lo com um arquivo de configuração:
|
||||||
|
```shell
|
||||||
|
$ r.js -o app.build.js
|
||||||
|
```
|
||||||
|
|
||||||
|
Para o nosso exemplo acima a configuração pode ser essa:
|
||||||
|
```javascript
|
||||||
|
/* file : app.build.js */
|
||||||
|
({
|
||||||
|
name : 'main', // nome do ponto de acesso
|
||||||
|
out : 'main-built.js', // nome o arquivo para gravar a saída
|
||||||
|
baseUrl : 'app',
|
||||||
|
paths : {
|
||||||
|
// `empty:` fala para o r.js que isso ainda deve ser baixado da CDN, usando
|
||||||
|
// o local especificado no `main.js`
|
||||||
|
jquery : 'empty:',
|
||||||
|
coolLibFromBower : '../bower_components/cool-lib/coollib'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
Para usar o arquivo gerado, em produção, simplesmente troque o `data-main`:
|
||||||
|
```html
|
||||||
|
<script src="require.js" data-main="app/main-built"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
Uma incrível e detalhada visão geral [de build options](https://github.com/jrburke/r.js/blob/master/build/example.build.js) está disponível no repositório do GitHub.
|
||||||
|
|
||||||
|
### Tópicos não abordados nesse tutorial
|
||||||
|
* [Plugins de carregamento / transforms](http://requirejs.org/docs/plugins.html)
|
||||||
|
* [CommonJS style carregamento e exportação](http://requirejs.org/docs/commonjs.html)
|
||||||
|
* [Configuração avançada](http://requirejs.org/docs/api.html#config)
|
||||||
|
* [Shim configuration (carregando módulos sem AMD)](http://requirejs.org/docs/api.html#config-shim)
|
||||||
|
* [Carregando e otimizando CSS com require.js](http://requirejs.org/docs/optimization.html#onecss)
|
||||||
|
* [Usando almond.js para builds](https://github.com/jrburke/almond)
|
||||||
|
|
||||||
|
### Outras leituras:
|
||||||
|
|
||||||
|
* [Especificação oficial](https://github.com/amdjs/amdjs-api/wiki/AMD)
|
||||||
|
* [Por quê AMD?](http://requirejs.org/docs/whyamd.html)
|
||||||
|
* [Universal Module Definition](https://github.com/umdjs/umd)
|
||||||
|
|
||||||
|
### Implementações:
|
||||||
|
|
||||||
|
* [require.js](http://requirejs.org)
|
||||||
|
* [dojo toolkit](http://dojotoolkit.org/documentation/tutorials/1.9/modules/)
|
||||||
|
* [cujo.js](http://cujojs.com/)
|
||||||
|
* [curl.js](https://github.com/cujojs/curl)
|
||||||
|
* [lsjs](https://github.com/zazl/lsjs)
|
||||||
|
* [mmd](https://github.com/alexlawrence/mmd)
|
@@ -171,6 +171,6 @@ Este tutorial é apenas uma introdução básica para hy/lisp/python.
|
|||||||
|
|
||||||
Docs Hy: [http://hy.readthedocs.org](http://hy.readthedocs.org)
|
Docs Hy: [http://hy.readthedocs.org](http://hy.readthedocs.org)
|
||||||
|
|
||||||
Repo Hy no Github: [http://github.com/hylang/hy](http://github.com/hylang/hy)
|
Repo Hy no GitHub: [http://github.com/hylang/hy](http://github.com/hylang/hy)
|
||||||
|
|
||||||
Acesso ao freenode irc com #hy, hashtag no twitter: #hylang
|
Acesso ao freenode irc com #hy, hashtag no twitter: #hylang
|
||||||
|
@@ -56,7 +56,7 @@ __E este também está._
|
|||||||
*--Danouse! Este também__*
|
*--Danouse! Este também__*
|
||||||
|
|
||||||
<!-- Em GitHub Flavored Markdown, que é usado para processar arquivos Markdown
|
<!-- Em GitHub Flavored Markdown, que é usado para processar arquivos Markdown
|
||||||
Github, nós também temos: -->
|
GitHub, nós também temos: -->
|
||||||
|
|
||||||
~~Este texto é processado com tachado.~~
|
~~Este texto é processado com tachado.~~
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ dentro do seu código -->
|
|||||||
|
|
||||||
John não sabia nem o que o função 'goto()' fazia!
|
John não sabia nem o que o função 'goto()' fazia!
|
||||||
|
|
||||||
<!-- Em Github Flavored Markdown, você pode usar uma sintaxe especial para o código -->
|
<!-- Em GitHub Flavored Markdown, você pode usar uma sintaxe especial para o código -->
|
||||||
|
|
||||||
\`\`\`ruby <!-- exceto remover essas barras invertidas quando você faz isso, apenas ```
|
\`\`\`ruby <!-- exceto remover essas barras invertidas quando você faz isso, apenas ```
|
||||||
ruby! -->
|
ruby! -->
|
||||||
@@ -157,7 +157,7 @@ def foobar
|
|||||||
end
|
end
|
||||||
\`\`\` <!-- Aqui também, não barras invertidas, apenas ``` -->
|
\`\`\` <!-- Aqui também, não barras invertidas, apenas ``` -->
|
||||||
|
|
||||||
<-- O texto acima não requer recuo, mas o Github vai usar a sintaxe
|
<-- O texto acima não requer recuo, mas o GitHub vai usar a sintaxe
|
||||||
destacando do idioma que você especificar após a ``` -->
|
destacando do idioma que você especificar após a ``` -->
|
||||||
|
|
||||||
<!-- Regra Horizontal (<hr />) -->
|
<!-- Regra Horizontal (<hr />) -->
|
||||||
@@ -230,7 +230,7 @@ Quero digitar * Este texto entre asteriscos *, mas eu não quero que ele seja
|
|||||||
em itálico, então eu faço o seguinte: \*Este texto entre asteriscos \*.
|
em itálico, então eu faço o seguinte: \*Este texto entre asteriscos \*.
|
||||||
|
|
||||||
<!-- Tabelas -->
|
<!-- Tabelas -->
|
||||||
<!-- Tabelas estão disponíveis apenas no Github Flavored Markdown e são ligeiramente
|
<!-- Tabelas estão disponíveis apenas no GitHub Flavored Markdown e são ligeiramente
|
||||||
complicadas, mas se você realmente quer: -->
|
complicadas, mas se você realmente quer: -->
|
||||||
|
|
||||||
| Col1 | Col2 | Col3 |
|
| Col1 | Col2 | Col3 |
|
||||||
|
@@ -61,7 +61,7 @@ __И этот тоже.__
|
|||||||
**_И тут!_**
|
**_И тут!_**
|
||||||
*__И даже здесь!__*
|
*__И даже здесь!__*
|
||||||
|
|
||||||
<!-- В Github Flavored Markdown (версии Markdown, использующейся в Github,
|
<!-- В GitHub Flavored Markdown (версии Markdown, использующейся в GitHub,
|
||||||
для рендеринга Markdown-документов) текст можно сделать зачёркнутым: -->
|
для рендеринга Markdown-документов) текст можно сделать зачёркнутым: -->
|
||||||
|
|
||||||
~~Зачёркнутый текст.~~
|
~~Зачёркнутый текст.~~
|
||||||
@@ -157,7 +157,7 @@ __И этот тоже.__
|
|||||||
|
|
||||||
Например, можно выделить имя функции `go_to()` прямо посреди текста.
|
Например, можно выделить имя функции `go_to()` прямо посреди текста.
|
||||||
|
|
||||||
<!-- Github Flavored Markdown позволяет указать для блока кода синтаксис оного.
|
<!-- GitHub Flavored Markdown позволяет указать для блока кода синтаксис оного.
|
||||||
В этом случае синтаксис внутри блока будет подсвечен. Пример: -->
|
В этом случае синтаксис внутри блока будет подсвечен. Пример: -->
|
||||||
|
|
||||||
\`\`\`ruby <!-- Только нужно будет убрать символы "\", оставив лишь "```ruby" -->
|
\`\`\`ruby <!-- Только нужно будет убрать символы "\", оставив лишь "```ruby" -->
|
||||||
@@ -167,7 +167,7 @@ end
|
|||||||
\`\`\` <!-- И здесь тоже backslashes нужно убрать, т.е. оставить "```" -->
|
\`\`\` <!-- И здесь тоже backslashes нужно убрать, т.е. оставить "```" -->
|
||||||
|
|
||||||
<-- Обратите внимание: фрагмент, указанный выше, не предваряется отступами,
|
<-- Обратите внимание: фрагмент, указанный выше, не предваряется отступами,
|
||||||
поскольку Github сам в состоянии определить границы блока - по строкам "```" -->
|
поскольку GitHub сам в состоянии определить границы блока - по строкам "```" -->
|
||||||
|
|
||||||
<!-- Горизонтальный разделитель (<hr />) -->
|
<!-- Горизонтальный разделитель (<hr />) -->
|
||||||
<!-- Разделители добавляются вставкой строки из трёх и более
|
<!-- Разделители добавляются вставкой строки из трёх и более
|
||||||
@@ -253,7 +253,7 @@ end
|
|||||||
\*текст, заключённый в звёздочки!\*
|
\*текст, заключённый в звёздочки!\*
|
||||||
|
|
||||||
<!-- Таблицы -->
|
<!-- Таблицы -->
|
||||||
<!-- Таблицы официально поддерживаются только в Github Flavored Markdown,
|
<!-- Таблицы официально поддерживаются только в GitHub Flavored Markdown,
|
||||||
да и синтаксис имеют не слишком удобный.
|
да и синтаксис имеют не слишком удобный.
|
||||||
Но если очень нужно, размечайте таблицы так: -->
|
Но если очень нужно, размечайте таблицы так: -->
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@ Feedback highly appreciated! Reach me at [@jigyasa_grover](https://twitter.com/j
|
|||||||
|
|
||||||
`"Comments are enclosed in quotes"`
|
`"Comments are enclosed in quotes"`
|
||||||
|
|
||||||
`"Period (.) is the statement seperator"`
|
`"Period (.) is the statement separator"`
|
||||||
|
|
||||||
## Transcript:
|
## Transcript:
|
||||||
```
|
```
|
||||||
@@ -305,7 +305,7 @@ result := (switch at: $B) value.
|
|||||||
x := 4. y := 1.
|
x := 4. y := 1.
|
||||||
[x > 0] whileTrue: [x := x - 1. y := y * 2]. "while true loop"
|
[x > 0] whileTrue: [x := x - 1. y := y * 2]. "while true loop"
|
||||||
[x >= 4] whileFalse: [x := x + 1. y := y * 2]. "while false loop"
|
[x >= 4] whileFalse: [x := x + 1. y := y * 2]. "while false loop"
|
||||||
x timesRepeat: [y := y * 2]. "times repear loop (i := 1 to x)"
|
x timesRepeat: [y := y * 2]. "times repeat loop (i := 1 to x)"
|
||||||
1 to: x do: [:a | y := y * 2]. "for loop"
|
1 to: x do: [:a | y := y * 2]. "for loop"
|
||||||
1 to: x by: 2 do: [:a | y := y / 2]. "for loop with specified increment"
|
1 to: x by: 2 do: [:a | y := y / 2]. "for loop with specified increment"
|
||||||
#(5 4 3) do: [:a | x := x + a]. "iterate over array elements"
|
#(5 4 3) do: [:a | x := x + a]. "iterate over array elements"
|
||||||
@@ -320,7 +320,7 @@ y := x isUppercase. "test if upper case"
|
|||||||
y := x isLetter. "test if letter"
|
y := x isLetter. "test if letter"
|
||||||
y := x isDigit. "test if digit"
|
y := x isDigit. "test if digit"
|
||||||
y := x isAlphaNumeric. "test if alphanumeric"
|
y := x isAlphaNumeric. "test if alphanumeric"
|
||||||
y := x isSeparator. "test if seperator char"
|
y := x isSeparator. "test if separator char"
|
||||||
y := x isVowel. "test if vowel"
|
y := x isVowel. "test if vowel"
|
||||||
y := x digitValue. "convert to numeric digit value"
|
y := x digitValue. "convert to numeric digit value"
|
||||||
y := x asLowercase. "convert to lower case"
|
y := x asLowercase. "convert to lower case"
|
||||||
|
@@ -52,7 +52,7 @@ __Bu yazı da kalın.__
|
|||||||
**_Bu da öyle!_**
|
**_Bu da öyle!_**
|
||||||
*__Hatta bu bile!__*
|
*__Hatta bu bile!__*
|
||||||
|
|
||||||
<!-- Github Flavored Markdown'da ayrıca üstü çizgili karakter de desteklenir: -->
|
<!-- GitHub Flavored Markdown'da ayrıca üstü çizgili karakter de desteklenir: -->
|
||||||
~~Bu yazı üstü çizili olarak gözükecek.~~
|
~~Bu yazı üstü çizili olarak gözükecek.~~
|
||||||
|
|
||||||
<!-- Paragraflar bir veya daha fazla boş satırla ayrılır. -->
|
<!-- Paragraflar bir veya daha fazla boş satırla ayrılır. -->
|
||||||
@@ -151,7 +151,7 @@ kullanabilirsiniz -->
|
|||||||
|
|
||||||
Ahmet `go_to()` fonksiyonun ne yaptığını bilmiyor!
|
Ahmet `go_to()` fonksiyonun ne yaptığını bilmiyor!
|
||||||
|
|
||||||
<!-- Github Flavored Markdown'da, kod içerisinde aydınlatma kullanabilirsiniz -->
|
<!-- GitHub Flavored Markdown'da, kod içerisinde aydınlatma kullanabilirsiniz -->
|
||||||
|
|
||||||
\`\`\`ruby <!-- buradaki ters slaş (\) işaretlerini kullanmayın, sadece ```ruby ! -->
|
\`\`\`ruby <!-- buradaki ters slaş (\) işaretlerini kullanmayın, sadece ```ruby ! -->
|
||||||
def foobar
|
def foobar
|
||||||
@@ -159,7 +159,7 @@ def foobar
|
|||||||
end
|
end
|
||||||
\`\`\` <!-- burada da (\) işaretlerini kullanmayın, sadece ``` -->
|
\`\`\` <!-- burada da (\) işaretlerini kullanmayın, sadece ``` -->
|
||||||
|
|
||||||
<!-- Yukarıdaki örnekte girinti kullanmanıza gerek yok, Github da
|
<!-- Yukarıdaki örnekte girinti kullanmanıza gerek yok, GitHub da
|
||||||
``` işaretinden sonra belirttiğiniz yazılım diline göre gerekli
|
``` işaretinden sonra belirttiğiniz yazılım diline göre gerekli
|
||||||
syntax aydınlatmaları uygulanacaktır -->
|
syntax aydınlatmaları uygulanacaktır -->
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@ Bu yazının *yıldızlar arasında gözükmesini* istiyorum fakat italik olmama
|
|||||||
bunun için, şu şekilde: \*bu yazı italik değil, yıldızlar arasında\*.
|
bunun için, şu şekilde: \*bu yazı italik değil, yıldızlar arasında\*.
|
||||||
|
|
||||||
<!-- Tablolar -->
|
<!-- Tablolar -->
|
||||||
<!-- Tablolar sadece Github Flavored Markdown'da destekleniyor ve açıkçası
|
<!-- Tablolar sadece GitHub Flavored Markdown'da destekleniyor ve açıkçası
|
||||||
performansı çok yoruyorlar, fakat illa ki kullanmak isterseniz: -->
|
performansı çok yoruyorlar, fakat illa ki kullanmak isterseniz: -->
|
||||||
|
|
||||||
| Sütun1 | Sütun 2 | Sütün 3 |
|
| Sütun1 | Sütun 2 | Sütün 3 |
|
||||||
|
@@ -53,7 +53,7 @@ __此文本也是__
|
|||||||
**_或者这样。_**
|
**_或者这样。_**
|
||||||
*__这个也是!__*
|
*__这个也是!__*
|
||||||
|
|
||||||
<!-- 在 Github 采用的 Markdown 中 -->
|
<!-- 在 GitHub 采用的 Markdown 中 -->
|
||||||
|
|
||||||
~~此文本为删除线效果。~~
|
~~此文本为删除线效果。~~
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ __此文本也是__
|
|||||||
|
|
||||||
John 甚至不知道 `go_to()` 方程是干嘛的!
|
John 甚至不知道 `go_to()` 方程是干嘛的!
|
||||||
|
|
||||||
<!-- 在Github的 Markdown中,对于代码你可以使用特殊的语法 -->
|
<!-- 在GitHub的 Markdown中,对于代码你可以使用特殊的语法 -->
|
||||||
|
|
||||||
\`\`\`ruby <!-- 插入时记得移除反斜线, 仅留```ruby ! -->
|
\`\`\`ruby <!-- 插入时记得移除反斜线, 仅留```ruby ! -->
|
||||||
def foobar
|
def foobar
|
||||||
@@ -150,7 +150,7 @@ def foobar
|
|||||||
end
|
end
|
||||||
\`\`\` <!-- 这里也是,移除反斜线,仅留 ``` -->
|
\`\`\` <!-- 这里也是,移除反斜线,仅留 ``` -->
|
||||||
|
|
||||||
<!-- 以上代码不需要缩进,而且 Github 会根据```后表明的语言来进行语法高亮 -->
|
<!-- 以上代码不需要缩进,而且 GitHub 会根据```后表明的语言来进行语法高亮 -->
|
||||||
|
|
||||||
<!-- 水平线 (<hr />) -->
|
<!-- 水平线 (<hr />) -->
|
||||||
<!-- 水平线可由三个或以上的星号或者减号创建,可带可不带空格。 -->
|
<!-- 水平线可由三个或以上的星号或者减号创建,可带可不带空格。 -->
|
||||||
@@ -220,7 +220,7 @@ end
|
|||||||
斜体化, 所以我就: \*这段置文字于星号之间\*。
|
斜体化, 所以我就: \*这段置文字于星号之间\*。
|
||||||
|
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<!-- 表格只被 Github 的 Markdown 支持,并且有一点笨重,但如果你真的要用的话: -->
|
<!-- 表格只被 GitHub 的 Markdown 支持,并且有一点笨重,但如果你真的要用的话: -->
|
||||||
|
|
||||||
| 第一列 | 第二列 | 第三列 |
|
| 第一列 | 第二列 | 第三列 |
|
||||||
| :---------- | :------: | ----------: |
|
| :---------- | :------: | ----------: |
|
||||||
|
Reference in New Issue
Block a user