summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--de-de/go-de.html.markdown20
-rw-r--r--es-es/markdown-es.html.markdown6
-rw-r--r--fa-ir/brainfuck-fa.html.markdown (renamed from fa-ir/brainfuck.html.markdown)0
-rw-r--r--fa-ir/javascript-fa.html.markdown (renamed from fa-ir/javascript.html.markdown)0
-rw-r--r--fsharp.html.markdown6
-rw-r--r--go.html.markdown3
-rw-r--r--hu-hu/go-hu.html.markdown (renamed from hu-hu/go.html.markdown)0
-rw-r--r--hu-hu/ruby-hu.html.markdown (renamed from hu-hu/ruby.html.markdown)0
-rw-r--r--javascript.html.markdown87
-rw-r--r--latex.html.markdown3
-rw-r--r--lua.html.markdown2
-rw-r--r--scala.html.markdown23
-rw-r--r--ta_in/css-ta.html.markdown (renamed from ta_in/css.html.markdown)0
-rw-r--r--ta_in/javascript-ta.html.markdown (renamed from ta_in/javascript.html.markdown)0
-rw-r--r--ta_in/json-ta.html.markdown (renamed from ta_in/json.html.markdown)0
-rw-r--r--ta_in/xml-ta.html.markdown (renamed from ta_in/xml.html.markdown)0
16 files changed, 85 insertions, 65 deletions
diff --git a/de-de/go-de.html.markdown b/de-de/go-de.html.markdown
index 7e61bf81..d3a192fe 100644
--- a/de-de/go-de.html.markdown
+++ b/de-de/go-de.html.markdown
@@ -25,7 +25,7 @@ aktive Community.
zeiliger Kommentar */
// Eine jede Quelldatei beginnt mit einer Paket-Klausel.
-// "main" ist ein besonderer Pkaetname, da er ein ausführbares Programm
+// "main" ist ein besonderer Paketname, da er ein ausführbares Programm
// einleitet, im Gegensatz zu jedem anderen Namen, der eine Bibliothek
// deklariert.
package main
@@ -38,7 +38,7 @@ import (
"strconv" // Zeichenkettenmanipulation
)
-// Es folgt die Definition einer Funktions, in diesem Fall von "main". Auch hier
+// Es folgt die Definition einer Funktion, in diesem Fall von "main". Auch hier
// ist der Name wieder besonders. "main" markiert den Eintrittspunkt des
// Programms. Vergessen Sie nicht die geschweiften Klammern!
func main() {
@@ -56,7 +56,7 @@ func beyondHello() {
var x int // Deklaration einer Variable, muss vor Gebrauch geschehen.
x = 3 // Zuweisung eines Werts.
// Kurze Deklaration: Benutzen Sie ":=", um die Typisierung automatisch zu
- // folgern, die Variable zu deklarieren und ihr einen Wert zu zuweisen.
+ // folgern, die Variable zu deklarieren und ihr einen Wert zuzuweisen.
y := 4
// Eine Funktion mit mehreren Rückgabewerten.
@@ -147,7 +147,7 @@ func learnFlowControl() {
if false {
// nicht hier
} else {
- // sonder hier! spielt die Musik
+ // sondern hier! spielt die Musik
}
// Benutzen Sie ein "switch" Statement anstatt eine Anreihung von if-s
@@ -166,7 +166,7 @@ func learnFlowControl() {
// Ab hier gilt wieder: x == 1
// For ist die einzige Schleifenform in Go, sie hat aber mehrere Formen:
- for { // Endloschleife
+ for { // Endlosschleife
break // nur ein Spaß
continue // wird nie ausgeführt
}
@@ -263,10 +263,10 @@ func learnConcurrency() {
// Auslesen und dann Ausgeben der drei berechneten Werte.
// Man kann nicht im voraus feststellen in welcher Reihenfolge die Werte
// ankommen.
- fmt.Println(<-c, <-c, <-c) // mit dem Kannal rechts ist <- der Empfangs-Operator
+ fmt.Println(<-c, <-c, <-c) // mit dem Kanal rechts ist <- der Empfangs-Operator
- cs := make(chan string) // ein weiterer Kannal, diesmal für strings
- cc := make(chan chan string) // ein Kannal für string Kannäle
+ cs := make(chan string) // ein weiterer Kanal, diesmal für strings
+ cc := make(chan chan string) // ein Kanal für string Kanäle
// Start einer neuen Goroutine, nur um einen Wert zu senden
go func() { c <- 84 }()
@@ -283,7 +283,7 @@ func learnConcurrency() {
fmt.Println("wird nicht passieren.")
}
// Hier wird eine der beiden Goroutines fertig sein, die andere nicht.
- // Sie wird warten bis der Wert den sie sendet von dem Kannal gelesen wird.
+ // Sie wird warten bis der Wert den sie sendet von dem Kanal gelesen wird.
learnWebProgramming() // Go kann es und Sie hoffentlich auch bald.
}
@@ -301,7 +301,7 @@ func learnWebProgramming() {
// Methode implementieren: ServeHTTP
func (p pair) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// Senden von Daten mit einer Methode des http.ResponseWriter
- w.Write([]byte("Sie habe Go in Y Minuten gelernt!"))
+ w.Write([]byte("Sie haben Go in Y Minuten gelernt!"))
}
```
diff --git a/es-es/markdown-es.html.markdown b/es-es/markdown-es.html.markdown
index d90e3eb5..bc481df7 100644
--- a/es-es/markdown-es.html.markdown
+++ b/es-es/markdown-es.html.markdown
@@ -11,7 +11,7 @@ lang: es-es
Markdown fue creado por John Gruber en 2004. Su propósito es ser una sintaxis fácil de leer y escribir que se convierta
fácilmente a HTML (y, actualmente, otros formatos también).
-¡Denme todo la retroalimentación que quieran! / ¡Sientanse en la libertad de hacer forks o pull requests!
+¡Denme toda la retroalimentación que quieran! / ¡Sientanse en la libertad de hacer forks o pull requests!
```markdown
@@ -44,7 +44,7 @@ Esto es un h2
-------------
<!-- Estilos para texto plano -->
-<!-- El texto puede ser fácilmente estilizaedo con italicas, negritas o tachado
+<!-- El texto puede ser fácilmente estilizado con italicas, negritas o tachado
usando markdown -->
*Este texto está en itálicas.*
@@ -62,7 +62,7 @@ Markdown en Github, también tenemos: -->
~~Este texto está tachado.~~
-<!-- Los párrafos son una o múltuples líneas de texto adyacentes separadas por
+<!-- Los párrafos son una o múltiples líneas de texto adyacentes separadas por
una o múltiples líneas en blanco-->
Este es un párrafo. Estoy escribiendo un párrafo, ¿No es divertido?
diff --git a/fa-ir/brainfuck.html.markdown b/fa-ir/brainfuck-fa.html.markdown
index ef2bcba3..ef2bcba3 100644
--- a/fa-ir/brainfuck.html.markdown
+++ b/fa-ir/brainfuck-fa.html.markdown
diff --git a/fa-ir/javascript.html.markdown b/fa-ir/javascript-fa.html.markdown
index fe3555af..fe3555af 100644
--- a/fa-ir/javascript.html.markdown
+++ b/fa-ir/javascript-fa.html.markdown
diff --git a/fsharp.html.markdown b/fsharp.html.markdown
index 76318d7d..b5c47ed7 100644
--- a/fsharp.html.markdown
+++ b/fsharp.html.markdown
@@ -248,7 +248,7 @@ module SequenceExamples =
// sequences can use yield and
// can contain subsequences
let strange = seq {
- // "yield! adds one element
+ // "yield" adds one element
yield 1; yield 2;
// "yield!" adds a whole subsequence
@@ -297,7 +297,7 @@ module DataTypeExamples =
let person1 = {First="John"; Last="Doe"}
// Pattern match to unpack
- let {First=first} = person1 //sets first="john"
+ let {First=first} = person1 //sets first="John"
// ------------------------------------
// Union types (aka variants) have a set of choices
@@ -426,7 +426,7 @@ module ActivePatternExamples =
// -----------------------------------
// You can create partial matching patterns as well
- // Just use undercore in the defintion, and return Some if matched.
+ // Just use underscore in the defintion, and return Some if matched.
let (|MultOf3|_|) i = if i % 3 = 0 then Some MultOf3 else None
let (|MultOf5|_|) i = if i % 5 = 0 then Some MultOf5 else None
diff --git a/go.html.markdown b/go.html.markdown
index a857a76c..dc684227 100644
--- a/go.html.markdown
+++ b/go.html.markdown
@@ -108,12 +108,13 @@ can include line breaks.` // Same string type.
bs := []byte("a slice") // Type conversion syntax.
// Because they are dynamic, slices can be appended to on-demand.
- // To append elements to a slice, built-in append() function is used.
+ // To append elements to a slice, the built-in append() function is used.
// First argument is a slice to which we are appending. Commonly,
// the array variable is updated in place, as in example below.
s := []int{1, 2, 3} // Result is a slice of length 3.
s = append(s, 4, 5, 6) // Added 3 elements. Slice now has length of 6.
fmt.Println(s) // Updated slice is now [1 2 3 4 5 6]
+
// To append another slice, instead of list of atomic elements we can
// pass a reference to a slice or a slice literal like this, with a
// trailing ellipsis, meaning take a slice and unpack its elements,
diff --git a/hu-hu/go.html.markdown b/hu-hu/go-hu.html.markdown
index 638c9489..638c9489 100644
--- a/hu-hu/go.html.markdown
+++ b/hu-hu/go-hu.html.markdown
diff --git a/hu-hu/ruby.html.markdown b/hu-hu/ruby-hu.html.markdown
index 169f2b8e..169f2b8e 100644
--- a/hu-hu/ruby.html.markdown
+++ b/hu-hu/ruby-hu.html.markdown
diff --git a/javascript.html.markdown b/javascript.html.markdown
index c1c59de1..cd75b0d2 100644
--- a/javascript.html.markdown
+++ b/javascript.html.markdown
@@ -16,13 +16,14 @@ JavaScript isn't just limited to web browsers, though: Node.js, a project that
provides a standalone runtime for Google Chrome's V8 JavaScript engine, is
becoming more and more popular.
-Feedback would be highly appreciated! You can reach me at
-[@adambrenecki](https://twitter.com/adambrenecki), or
-[adam@brenecki.id.au](mailto:adam@brenecki.id.au).
+JavaScript has a C-like syntax, so if you've used languages like C or Java,
+a lot of the basic syntax will already be familiar. Despite this, and despite
+the similarity in name, JavaScript's object model is significantly different to
+Java's.
```js
-// Comments are like C's. Single-line comments start with two slashes,
-/* and multiline comments start with slash-star
+// Single-line comments start with two slashes.
+/* Multiline comments start with slash-star,
and end with star-slash */
// Statements can be terminated by ;
@@ -40,7 +41,7 @@ doStuff()
// JavaScript has one number type (which is a 64-bit IEEE 754 double).
// Doubles have a 52-bit mantissa, which is enough to store integers
-// up to about 9✕10¹⁵ precisely.
+// up to about 9✕10¹⁵ precisely.
3; // = 3
1.5; // = 1.5
@@ -140,7 +141,7 @@ undefined; // used to indicate a value is not currently present (although
// character.
var someVar = 5;
-// if you leave the var keyword off, you won't get an error...
+// If you leave the var keyword off, you won't get an error...
someOtherVar = 10;
// ...but your variable will be created in the global scope, not in the scope
@@ -149,7 +150,7 @@ someOtherVar = 10;
// Variables declared without being assigned to are set to undefined.
var someThirdVar; // = undefined
-// if you wan't to declare a couple of variables, then you could use a comma
+// If you want to declare a couple of variables, then you could use a comma
// separator
var someFourthVar = 2, someFifthVar = 4;
@@ -198,8 +199,6 @@ myObj.myFourthKey; // = undefined
///////////////////////////////////
// 3. Logic and Control Structures
-// The syntax for this section is almost identical to Java's.
-
// The `if` structure works as you'd expect.
var count = 1;
if (count == 3){
@@ -227,15 +226,15 @@ for (var i = 0; i < 5; i++){
// will run 5 times
}
-//The For/In statement loops iterates over every property across the entire prototype chain
+// The for/in statement iterates over every property across the entire prototype chain.
var description = "";
var person = {fname:"Paul", lname:"Ken", age:18};
for (var x in person){
description += person[x] + " ";
}
-//If only want to consider properties attached to the object itself,
-//and not its prototypes use hasOwnProperty() check
+// To only consider properties attached to the object itself
+// and not its prototypes, use the `hasOwnProperty()` check.
var description = "";
var person = {fname:"Paul", lname:"Ken", age:18};
for (var x in person){
@@ -244,8 +243,9 @@ for (var x in person){
}
}
-//for/in should not be used to iterate over an Array where the index order is important.
-//There is no guarantee that for/in will return the indexes in any particular order
+// For/in should not be used to iterate over an Array where the index order
+// is important, as there is no guarantee that for/in will return the indexes
+// in any particular order.
// && is logical and, || is logical or
if (house.size == "big" && house.colour == "blue"){
@@ -260,7 +260,7 @@ var name = otherName || "default";
// The `switch` statement checks for equality with `===`.
-// use 'break' after each case
+// Use 'break' after each case
// or the cases after the correct one will be executed too.
grade = 'B';
switch (grade) {
@@ -507,6 +507,10 @@ myNumber === myNumberObj; // = false
if (0){
// This code won't execute, because 0 is falsy.
}
+if (new Number(0)){
+ // This code will execute, because wrapped numbers are objects, and objects
+ // are always truthy.
+}
// However, the wrapper objects and the regular builtins share a prototype, so
// you can actually add functionality to a string, for instance.
@@ -534,28 +538,39 @@ if (Object.create === undefined){ // don't overwrite it if it exists
## Further Reading
-The [Mozilla Developer
-Network](https://developer.mozilla.org/en-US/docs/Web/JavaScript) provides
-excellent documentation for JavaScript as it's used in browsers. Plus, it's a
-wiki, so as you learn more you can help others out by sharing your own
-knowledge.
+The [Mozilla Developer Network][1] provides excellent documentation for
+JavaScript as it's used in browsers. Plus, it's a wiki, so as you learn more you
+can help others out by sharing your own knowledge.
+
+MDN's [A re-introduction to JavaScript][2] covers much of the concepts covered
+here in more detail. This guide has quite deliberately only covered the
+JavaScript language itself; if you want to learn more about how to use
+JavaScript in web pages, start by learning about the [Document Object Model][3].
+
+[Learn Javascript by Example and with Challenges][4] is a variant of this
+reference with built-in challenges.
+
+[JavaScript Garden][5] is an in-depth guide of all the counter-intuitive parts
+of the language.
+
+[JavaScript: The Definitive Guide][6] is a classic guide and reference book.
+
+[Eloquent Javascript][8] by Marijn Haverbeke is an excellent JS book/ebook with attached terminal
-MDN's [A re-introduction to
-JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript)
-covers much of the concepts covered here in more detail. This guide has quite
-deliberately only covered the JavaScript language itself; if you want to learn
-more about how to use JavaScript in web pages, start by learning about the
-[Document Object
-Model](https://developer.mozilla.org/en-US/docs/Using_the_W3C_DOM_Level_1_Core)
+[Javascript: The Right Way][9] is a guide intended to introduce new developers to JavaScript and help experienced developers learn more about its best practices.
-[Learn Javascript by Example and with Challenges](http://www.learneroo.com/modules/64/nodes/350) is a variant of this reference with built-in challenges.
-[JavaScript Garden](http://bonsaiden.github.io/JavaScript-Garden/) is an in-depth
-guide of all the counter-intuitive parts of the language.
+In addition to direct contributors to this article, some content is adapted from
+Louie Dinh's Python tutorial on this site, and the [JS Tutorial][7] on the
+Mozilla Developer Network.
-[JavaScript: The Definitive Guide](http://www.amazon.com/gp/product/0596805527/) is a classic guide / reference book.
-In addition to direct contributors to this article, some content is adapted
-from Louie Dinh's Python tutorial on this site, and the [JS
-Tutorial](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript)
-on the Mozilla Developer Network.
+[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript
+[2]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript
+[3]: https://developer.mozilla.org/en-US/docs/Using_the_W3C_DOM_Level_1_Core
+[4]: http://www.learneroo.com/modules/64/nodes/350
+[5]: http://bonsaiden.github.io/JavaScript-Garden/
+[6]: http://www.amazon.com/gp/product/0596805527/
+[7]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript
+[8]: http://eloquentjavascript.net/
+[9]: http://jstherightway.org/
diff --git a/latex.html.markdown b/latex.html.markdown
index 9b7b4feb..31231a70 100644
--- a/latex.html.markdown
+++ b/latex.html.markdown
@@ -106,6 +106,9 @@ Here's how you state all y that belong to X, $\forall$ x $\in$ X. \\
% However, the math symbols only exist in math-mode.
% We can enter math-mode from text mode with the $ signs.
% The opposite also holds true. Variable can also be rendered in math-mode.
+% We can also enter math mode with \[\]
+
+\[a^2 + b^2 = c^2 \]
My favorite Greek letter is $\xi$. I also like $\beta$, $\gamma$ and $\sigma$.
I haven't found a Greek letter that yet that LaTeX doesn't know about!
diff --git a/lua.html.markdown b/lua.html.markdown
index 0809215f..3d95c146 100644
--- a/lua.html.markdown
+++ b/lua.html.markdown
@@ -190,7 +190,7 @@ end
--------------------------------------------------------------------------------
-- A table can have a metatable that gives the table operator-overloadish
--- behavior. Later we'll see how metatables support js-prototypey behavior.
+-- behavior. Later we'll see how metatables support js-prototypey behaviour.
f1 = {a = 1, b = 2} -- Represents the fraction a/b.
f2 = {a = 2, b = 3}
diff --git a/scala.html.markdown b/scala.html.markdown
index 7f545196..192e03d7 100644
--- a/scala.html.markdown
+++ b/scala.html.markdown
@@ -278,21 +278,21 @@ val text = if (x == 10) "yeah" else "nope"
/////////////////////////////////////////////////
val a = Array(1, 2, 3, 5, 8, 13)
-a(0)
-a(3)
+a(0) // Int = 1
+a(3) // Int = 5
a(21) // Throws an exception
val m = Map("fork" -> "tenedor", "spoon" -> "cuchara", "knife" -> "cuchillo")
-m("fork")
-m("spoon")
+m("fork") // java.lang.String = tenedor
+m("spoon") // java.lang.String = cuchara
m("bottle") // Throws an exception
val safeM = m.withDefaultValue("no lo se")
-safeM("bottle")
+safeM("bottle") // java.lang.String = no lo se
val s = Set(1, 3, 7)
-s(0)
-s(1)
+s(0) // Boolean = false
+s(1) // Boolean = true
/* Look up the documentation of map here -
* http://www.scala-lang.org/api/current/index.html#scala.collection.immutable.Map
@@ -313,15 +313,16 @@ s(1)
// Why have this?
val divideInts = (x: Int, y: Int) => (x / y, x % y)
-divideInts(10, 3) // The function divideInts gives you the result and the remainder
+// The function divideInts gives you the result and the remainder
+divideInts(10, 3) // (Int, Int) = (3,1)
// To access the elements of a tuple, use _._n where n is the 1-based index of
// the element
-val d = divideInts(10, 3)
+val d = divideInts(10, 3) // (Int, Int) = (3,1)
-d._1
+d._1 // Int = 3
-d._2
+d._2 // Int = 1
/////////////////////////////////////////////////
diff --git a/ta_in/css.html.markdown b/ta_in/css-ta.html.markdown
index 56f94ed0..56f94ed0 100644
--- a/ta_in/css.html.markdown
+++ b/ta_in/css-ta.html.markdown
diff --git a/ta_in/javascript.html.markdown b/ta_in/javascript-ta.html.markdown
index f0b0a36a..f0b0a36a 100644
--- a/ta_in/javascript.html.markdown
+++ b/ta_in/javascript-ta.html.markdown
diff --git a/ta_in/json.html.markdown b/ta_in/json-ta.html.markdown
index d85e0d82..d85e0d82 100644
--- a/ta_in/json.html.markdown
+++ b/ta_in/json-ta.html.markdown
diff --git a/ta_in/xml.html.markdown b/ta_in/xml-ta.html.markdown
index a9bfa9cd..a9bfa9cd 100644
--- a/ta_in/xml.html.markdown
+++ b/ta_in/xml-ta.html.markdown