summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--c.html.markdown48
-rw-r--r--coq.html.markdown8
-rw-r--r--de-de/nix-de.html.markdown3
-rw-r--r--docker.html.markdown13
-rw-r--r--es-es/typescript-es.html.markdown2
-rw-r--r--fr-fr/typescript-fr.html.markdown2
-rw-r--r--hd-hd/json-hd.html.markdown86
-rw-r--r--pt-br/typescript-pt.html.markdown2
-rw-r--r--python.html.markdown4
-rw-r--r--ru-ru/forth-ru.html.markdown3
-rw-r--r--set-theory.html.markdown2
-rw-r--r--sv-se/nix-sv.html.markdown5
-rw-r--r--zh-cn/java-cn.html.markdown4
13 files changed, 145 insertions, 37 deletions
diff --git a/c.html.markdown b/c.html.markdown
index a57be1dc..ff396d21 100644
--- a/c.html.markdown
+++ b/c.html.markdown
@@ -224,10 +224,18 @@ int main (int argc, char** argv)
(float)i1 / i2; // => 0.5f
i1 / (double)i2; // => 0.5 // Same with double
f1 / f2; // => 0.5, plus or minus epsilon
+
// Floating-point numbers and calculations are not exact
+ // for instance it is not giving mathematically correct results
+ (0.1 + 0.1 + 0.1) != 0.3; // => 1 (true)
+ // and it is NOT associative
+ 1 + (1e123 - 1e123) != (1 + 1e123) - 1e123; // => 1 (true)
+ // this notation is scientific notations for numbers: 1e123 = 1*10^123
- // Modulo is there as well
- 11 % 3; // => 2
+ // Modulo is there as well, but be careful if arguments are negative
+ 11 % 3; // => 2 as 11 = 2 + 3*x (x=3)
+ (-11) % 3; // => -2, as one would expect
+ 11 % (-3); // => 2 and not -2, and it's quite counter intuitive
// Comparison operators are probably familiar, but
// there is no Boolean type in C. We use ints instead.
@@ -236,12 +244,12 @@ int main (int argc, char** argv)
// operators always yield 0 or 1.)
3 == 2; // => 0 (false)
3 != 2; // => 1 (true)
- 3 > 2; // => 1
- 3 < 2; // => 0
+ 3 > 2; // => 1
+ 3 < 2; // => 0
2 <= 2; // => 1
2 >= 2; // => 1
- // C is not Python - comparisons don't chain.
+ // C is not Python - comparisons do NOT chain.
// Warning: The line below will compile, but it means `(0 < a) < 2`.
// This expression is always true, because (0 < a) could be either 1 or 0.
// In this case it's 1, because (0 < 1).
@@ -349,25 +357,30 @@ int main (int argc, char** argv)
break;
}
/*
- using "goto" in C
+ Using "goto" in C
*/
typedef enum { false, true } bool;
// for C don't have bool as data type before C99 :(
bool disaster = false;
int i, j;
- for(i=0;i<100;++i)
- for(j=0;j<100;++j)
+ for(i=0; i<100; ++i)
+ for(j=0; j<100; ++j)
{
if((i + j) >= 150)
disaster = true;
if(disaster)
- goto error;
+ goto error; // exit both for loops
}
- error :
+ error: // this is a label that you can "jump" to with "goto error;"
printf("Error occurred at i = %d & j = %d.\n", i, j);
/*
- https://ideone.com/GuPhd6
- this will print out "Error occurred at i = 51 & j = 99."
+ https://ideone.com/GuPhd6
+ this will print out "Error occurred at i = 51 & j = 99."
+ */
+ /*
+ it is generally considered bad practice to do so, except if
+ you really know what you are doing. See
+ https://en.wikipedia.org/wiki/Spaghetti_code#Meaning
*/
///////////////////////////////////////
@@ -741,11 +754,12 @@ typedef void (*my_fnp_type)(char *);
// Order of Evaluation
///////////////////////////////////////
+// From top to bottom, top has higher precedence
//---------------------------------------------------//
// Operators | Associativity //
//---------------------------------------------------//
// () [] -> . | left to right //
-// ! ~ ++ -- + = *(type)sizeof | right to left //
+// ! ~ ++ -- + = *(type) sizeof | right to left //
// * / % | left to right //
// + - | left to right //
// << >> | left to right //
@@ -783,8 +797,8 @@ as the C file.
/* included into files that include this header. */
#include <string.h>
-/* Like c source files macros can be defined in headers and used in files */
-/* that include this header file. */
+/* Like for c source files, macros can be defined in headers */
+/* and used in files that include this header file. */
#define EXAMPLE_NAME "Dennis Ritchie"
/* Function macros can also be defined. */
@@ -823,7 +837,7 @@ Best to find yourself a copy of [K&R, aka "The C Programming Language"](https://
It is *the* book about C, written by Dennis Ritchie, the creator of C, and Brian Kernighan. Be careful, though - it's ancient and it contains some
inaccuracies (well, ideas that are not considered good anymore) or now-changed practices.
-Another good resource is [Learn C The Hard Way](http://learncodethehardway.org/c/).
+Another good resource is [Learn C The Hard Way](http://learncodethehardway.org/c/) (not free).
If you have a question, read the [compl.lang.c Frequently Asked Questions](http://c-faq.com).
@@ -833,4 +847,4 @@ Readable code is better than clever code and fast code. For a good, sane coding
Other than that, Google is your friend.
-[1] [Why isn't sizeof for a struct equal to the sum of sizeof of each member?](http://stackoverflow.com/questions/119123/why-isnt-sizeof-for-a-struct-equal-to-the-sum-of-sizeof-of-each-member)
+[1] [Why isn't sizeof for a struct equal to the sum of sizeof of each member?](https://stackoverflow.com/questions/119123/why-isnt-sizeof-for-a-struct-equal-to-the-sum-of-sizeof-of-each-member)
diff --git a/coq.html.markdown b/coq.html.markdown
index 4c1ad690..3a924a19 100644
--- a/coq.html.markdown
+++ b/coq.html.markdown
@@ -61,8 +61,8 @@ Locate "+".
(* Calling a function with insufficient number of arguments does not cause
an error, it produces a new function. *)
-Definition make_inc x y := x + y. (* make_inc is int -> int -> int *)
-Definition inc_2 := make_inc 2. (* inc_2 is int -> int *)
+Definition make_inc x y := x + y. (* make_inc is nat -> nat -> nat *)
+Definition inc_2 := make_inc 2. (* inc_2 is nat -> nat *)
Compute inc_2 3. (* Evaluates to 5 *)
@@ -370,7 +370,7 @@ Close Scope string_scope.
power series and results,...)
• Relations : Relations (definitions and basic results)
• Sorting : Sorted list (basic definitions and heapsort correctness)
-• Strings : 8-bits characters and strings
+• Strings : 8-bit characters and strings
• Wellfounded : Well-founded relations (basic results)
*)
@@ -472,7 +472,7 @@ Proof.
intros A B ab. destruct ab as [ a b ]. apply a.
Qed.
-(* We can prove easily prove simple polynomial equalities using the
+(* We can easily prove simple polynomial equalities using the
automated tactic ring. *)
Require Import Ring.
diff --git a/de-de/nix-de.html.markdown b/de-de/nix-de.html.markdown
index ea02e81d..ffe8dffc 100644
--- a/de-de/nix-de.html.markdown
+++ b/de-de/nix-de.html.markdown
@@ -356,3 +356,6 @@ with builtins; [
* [Susan Potter - Nix Cookbook - Nix By Example]
(https://ops.functionalalgebra.com/nix-by-example/)
+
+* [Rommel Martinez - A Gentle Introduction to the Nix Family]
+ (https://web.archive.org/web/20210121042658/https://ebzzry.io/en/nix/#nix)
diff --git a/docker.html.markdown b/docker.html.markdown
index 24f85247..1dad267a 100644
--- a/docker.html.markdown
+++ b/docker.html.markdown
@@ -3,9 +3,10 @@ language: docker
filename: docker.bat
contributors:
- ["Ruslan López", "http://javapro.org/"]
+ - ["Michael Chen", "https://github.com/ML-Chen"]
---
-```
+```bat
:: download, install and run hello-world image
docker run hello-world
@@ -37,12 +38,12 @@ docker run hello-world
:: For more examples and ideas, visit:
:: https://docs.docker.com/get-started/
-:: now lets see currently running images
+:: now let's see currently running images
docker ps
:: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
:: NAMES
-:: lets see the images we have ran previously
+:: let's see the images we have ran previously
docker ps -a
:: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
@@ -54,7 +55,7 @@ docker ps -a
:: let's remove our previously generated image
docker rm happy_poincare
-:: lets test if it was really deleted
+:: let's test if it was really deleted
docker ps -a
:: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
:: NAMES
@@ -89,7 +90,7 @@ docker ps -a
:: test_container
:: as you can see the name is now what we have specified
-:: retireve logs from a named container
+:: retrieve logs from a named container
docker logs test_container
:: Hello from Docker!
:: This message shows that your installation appears to be working correctly.
@@ -143,4 +144,4 @@ docker ps -a
:: nifty_goldwasser
docker rm nifty_goldwasser
-``` \ No newline at end of file
+```
diff --git a/es-es/typescript-es.html.markdown b/es-es/typescript-es.html.markdown
index c42da4a4..fbe1290b 100644
--- a/es-es/typescript-es.html.markdown
+++ b/es-es/typescript-es.html.markdown
@@ -12,7 +12,7 @@ TypeScript es un lenguaje cuyo objetivo es facilitar el desarrollo de aplicacion
TypeScript añade conceptos comunes como clases, módulos, interfaces, genéricos y (opcionalmente) tipeo estático a JavaScript.
Es un superset de JavaScript: todo el código JavaScript es código válido en TypeScript de manera que se puede integrar fácilmente a cualquier proyecto . El compilador TypeScript emite JavaScript.
-Este artículo se enfocará solo en la sintáxis extra de TypeScript, y no en [JavaScript] (../javascript/).
+Este artículo se enfocará solo en la sintáxis extra de TypeScript, y no en [JavaScript] (../javascript-es/).
Para probar el compilador de TypeScript, diríjase al [Área de Pruebas] (http://www.typescriptlang.org/Playground) donde podrá tipear código, y ver como se auto-completa al tiempo que ve el código emitido JavaScript.
diff --git a/fr-fr/typescript-fr.html.markdown b/fr-fr/typescript-fr.html.markdown
index 52d34650..8a761f61 100644
--- a/fr-fr/typescript-fr.html.markdown
+++ b/fr-fr/typescript-fr.html.markdown
@@ -12,7 +12,7 @@ TypeScript est un langage visant à faciliter le développement d'applications l
TypeScript ajoute des concepts classiques comme les classes, les modules, les interfaces, les génériques et le typage statique (optionnel) à JavaScript.
C'est une surcouche de JavaScript : tout le code JavaScript est valide en TypeScript ce qui permet de l'ajouter de façon transparente à n'importe quel projet. Le code TypeScript est transcompilé en JavaScript par le compilateur.
-Cet article se concentrera seulement sur la syntaxe supplémentaire de TypeScript, plutôt que celle de [JavaScript] (../javascript/).
+Cet article se concentrera seulement sur la syntaxe supplémentaire de TypeScript, plutôt que celle de [JavaScript] (../javascript-fr/).
Pour tester le compilateur de TypeScript, rendez-vous au [Playground] (http://www.typescriptlang.org/Playground) où vous pourrez coder, profiter d'une autocomplétion et accéder directement au rendu JavaScript.
diff --git a/hd-hd/json-hd.html.markdown b/hd-hd/json-hd.html.markdown
new file mode 100644
index 00000000..dd1657cd
--- /dev/null
+++ b/hd-hd/json-hd.html.markdown
@@ -0,0 +1,86 @@
+---
+language: json
+contributors:
+ - ["Anna Harren", "https://github.com/iirelu"]
+ - ["Marco Scannadinari", "https://github.com/marcoms"]
+ - ["himanshu", "https://github.com/himanshu81494"]
+ - ["Michael Neth", "https://github.com/infernocloud"]
+ - ["Athanasios Emmanouilidis", "https://github.com/athanasiosem"]
+translators:
+ - ["Namami Shanker", "https://github.com/NamamiShanker"]
+lang: hd-hd
+---
+
+जैसन(JSON) इस अत्यंत सरल डाटा-इंटरचेंज फॉर्मेट है| जैसा [json.org](https://json.org) कहती है, ये इंसानो के पढ़ने और लिखने के लिए भी आसान है और और मशीन के लिए इसे पार्स और उतपन्न करना भी बेहद सरल है|
+
+जैसन(JSON) के एक अंश को इनमे से किसी एक का प्रतिनिधित्व(represent) करना चाहिए:
+
+* एक नाम/वैल्यू जोड़े का कलेक्शन (`{ }`). कई दूसरी भाषाओ में इसे ऑब्जेक्ट, रिकॉर्ड, स्ट्रक्ट, डिक्शनरी, हैश टेबल, कीड लिस्ट, या असोसिएटिव ऐरे का भी नाम दिया जाता है|
+* वैल्यूज की एक व्यवस्थित लिस्ट(ordered list) (`[ ]`). कई दूसरी भाषाओ में इसे ऐरे, वेक्टर, लिस्ट, या सीक्वेंस भी कहा जाता है|
+
+जैसन(JSON) अपने शुद्धतम रूप में कमैंट्स सपोर्ट नहीं करता है, पर ज़्यादातर पारसर C स्टाइल की कमैंट्स (`//`, `/* */`) सपोर्ट करेंगे| कुछ पारसर्स अंतिम कॉमा भी स्वीकार करते हैं (जब आप किसी ऐरे के अंतिम एलिमेंट या किसी ऑब्जेक्ट की अंतिम प्रॉपर्टी के बार एक कॉमा छोड़ देते हैं), पर ऐसी गलतियों से बचना चाहिए बेहतर कम्पेटिबिलिटी के लिए|
+
+ ये उदाहरण १०० प्रतिशत मान्य जैसन(JSON) है| किस्मत से, जैसन(JSON) डॉक्यूमेंट को पढ़ के ही आप इसे समझ जायेंगे|
+
+समर्थित डाटा टाइप्स:
+
+* स्ट्रिंग्स(Strings): `"नमस्ते"`, `"\"एक उद्धरण\""`, `"\u0abe"`, `"नयी पंक्ति|\n"`
+* अंक(Numbers): `23`, `0.11`, `12e10`, `3.141e-10`, `1.23e+4`
+* ऑब्जेक्ट्स(Objects): `{ "की": "मूल्य" }`
+* ऐरे(Arrays): `["बहुत सारे मूल्य"]`
+* विविध(Miscellaneous): `true`, `false`, `null`
+
+```json
+{
+ "की": "मूल्य",
+
+ "की": "हमेशा दोहरे उद्धरण चिह्नों में संलग्न होना चाहिए",
+ "अंक": 0,
+ "स्ट्रिंग्स": "नमस्ते| यूनिकोड और \"एस्केप\" सीक्वेंस की अनुमति है|",
+ "बूलियन है?": true,
+ "शून्यता ": null,
+
+ "बड़े अंक": 1.2e+100,
+
+ "ऑब्जेक्ट्स": {
+ "टिप्पणी": "आपके जैसन(JSON) ऑब्जेक्ट को ज़्यादातर ऑब्जेक्ट से ही ढांचा मिलेगा|",
+
+ "ऐरे": [0, 1, 2, 3, "ऐरे में आप कुछ भी रख सकते हैं|", 5],
+
+ "एक और ऑब्जेक्ट": {
+ "टिप्पणी": "आप एक ऑब्जेक्ट दूसरे ऑब्जेक्ट के अंदर रख सकते हैं| ये बहुत उपयोगी होता है|"
+ }
+ },
+
+ "फ़र्ज़ी": [
+ {
+ "पोटेशियम के स्रोत": ["केला"]
+ },
+ [
+ [1, 0, 0, 0],
+ [0, 1, 0, 0],
+ [0, 0, 1, "नव"],
+ [0, 0, 0, 1]
+ ]
+ ],
+
+ "वैकल्पिक शैली": {
+ "टिप्पणी": "ये देखिये!"
+ , "कॉमा के स्थान": "से फरक नहीं पड़ता, अगर आपने उसे अगली की से पहले लगाया है तो वो मान्य है|"
+ , "एक और टिप्पणी": "कितनी अच्छी बात है"
+ },
+
+
+
+ "खाली स्थान": "से फरक नहीं पड़ता",
+
+
+
+ "ये काफी छोटा था :>": "और ख़तम| अब आपको जैसन(JSON) के बारे में सब कुछ पता है|"
+}
+```
+
+## और जानकारी के लिए
+
+* [JSON.org](https://json.org) पूरा जैसन(JSON) फ्लोचार्ट के माध्यम से खूबसूरत तरह से दर्शित|
+* [JSON Tutorial](https://www.youtube.com/watch?v=wI1CWzNtE-M) जैसन(JSON) का एक संक्षिप्त परिचय|
diff --git a/pt-br/typescript-pt.html.markdown b/pt-br/typescript-pt.html.markdown
index ed76959c..7d28bf53 100644
--- a/pt-br/typescript-pt.html.markdown
+++ b/pt-br/typescript-pt.html.markdown
@@ -12,7 +12,7 @@ Typescript é uma linguagem que visa facilitar o desenvolvimento de aplicações
Typescript acrescenta conceitos comuns como classes, módulos, interfaces, genéricos e (opcional) tipagem estática para JavaScript.
É um super conjunto de JavaScript: todo o código JavaScript é TypeScript válido então ele pode ser adicionado diretamente a qualquer projeto. O compilador emite TypeScript JavaScript.
-Este artigo irá se concentrar apenas na sintaxe extra do TypeScript, ao contrário de [JavaScript](javascript-pt.html.markdown).
+Este artigo irá se concentrar apenas na sintaxe extra do TypeScript, ao contrário de [JavaScript](../javascript-pt/).
Para testar o compilador TypeScript, vá para o [Playground](http://www.typescriptlang.org/Playground), onde você vai ser capaz de escrever código, ter auto conclusão e ver diretamente o JavaScript emitido.
diff --git a/python.html.markdown b/python.html.markdown
index e21d7dde..39e60455 100644
--- a/python.html.markdown
+++ b/python.html.markdown
@@ -482,7 +482,7 @@ except (TypeError, NameError):
pass # Multiple exceptions can be handled together, if required.
else: # Optional clause to the try/except block. Must follow all except blocks
print("All good!") # Runs only if the code in try raises no exceptions
-finally: # Execute under all circumstances
+finally: # Execute under all circumstances
print("We can clean up resources here")
# Instead of try/finally to cleanup resources you can use a with statement
@@ -735,7 +735,7 @@ class Human:
return "*grunt*"
# A property is just like a getter.
- # It turns the method age() into an read-only attribute of the same name.
+ # It turns the method age() into a read-only attribute of the same name.
# There's no need to write trivial getters and setters in Python, though.
@property
def age(self):
diff --git a/ru-ru/forth-ru.html.markdown b/ru-ru/forth-ru.html.markdown
index 05316578..2fc4ad7c 100644
--- a/ru-ru/forth-ru.html.markdown
+++ b/ru-ru/forth-ru.html.markdown
@@ -12,9 +12,10 @@ lang: ru-ru
Внимание: эта материал использует реализацию Форта - Gforth, но большая часть написанного будет работать в других средах.
+
```
\ Это комментарий
-( Это тоже комментарий, но использыется для предоределённых слов )
+( Это тоже комментарий, но используется для предоределённых слов )
\ --------------------------------- Прекурсор --------------------------------
diff --git a/set-theory.html.markdown b/set-theory.html.markdown
index 6be7aa00..ae8b5388 100644
--- a/set-theory.html.markdown
+++ b/set-theory.html.markdown
@@ -41,7 +41,7 @@ The cardinality, or size, of a set is determined by the number of items in the s
For example, if `S = { 1, 2, 4 }`, then `|S| = 3`.
### The Empty Set
-* The empty set can be constructed in set builder notation using impossible conditions, e.g. `∅ = { x : x =/= x }`, or `∅ = { x : x ∈ N, x < 0 }`;
+* The empty set can be constructed in set builder notation using impossible conditions, e.g. `∅ = { x : x ≠ x }`, or `∅ = { x : x ∈ N, x < 0 }`;
* the empty set is always unique (i.e. there is one and only one empty set);
* the empty set is a subset of all sets;
* the cardinality of the empty set is 0, i.e. `|∅| = 0`.
diff --git a/sv-se/nix-sv.html.markdown b/sv-se/nix-sv.html.markdown
index 15d9456b..647575fe 100644
--- a/sv-se/nix-sv.html.markdown
+++ b/sv-se/nix-sv.html.markdown
@@ -365,4 +365,7 @@ with builtins; [
(https://medium.com/@MrJamesFisher/nix-by-example-a0063a1a4c55)
* [Susan Potter - Nix Cookbook - Nix By Example]
- (http://funops.co/nix-cookbook/nix-by-example/)
+ (https://ops.functionalalgebra.com/nix-by-example/)
+
+* [Rommel Martinez - A Gentle Introduction to the Nix Family]
+ (https://web.archive.org/web/20210121042658/https://ebzzry.io/en/nix/#nix)
diff --git a/zh-cn/java-cn.html.markdown b/zh-cn/java-cn.html.markdown
index 27003f3e..1de7f3e6 100644
--- a/zh-cn/java-cn.html.markdown
+++ b/zh-cn/java-cn.html.markdown
@@ -297,8 +297,8 @@ class Bicycle {
// Bicycle 类的成员变量和方法
public int cadence; // Public: 任意位置均可访问
private int speed; // Private: 只在同类中可以访问
- protected int gear; // Protected: 可以在同类与子类中可以访问
- String name; // default: 可以在包内中可以访问
+ protected int gear; // Protected: 可以在同类与子类中访问
+ String name; // default: 可以在包内访问
// 构造函数是初始化一个对象的方式
// 以下是一个默认构造函数