summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--c.html.markdown3
-rw-r--r--common-lisp.html.markdown2
-rw-r--r--css.html.markdown19
-rw-r--r--dart.html.markdown40
-rw-r--r--de-de/latex-de.html.markdown8
-rw-r--r--es-es/c-es.html.markdown3
-rw-r--r--es-es/factor-es.html.markdown200
-rw-r--r--es-es/hy-es.html.markdown176
-rw-r--r--it-it/bash-it.html.markdown19
-rw-r--r--it-it/elixir-it.html.markdown52
-rw-r--r--java.html.markdown10
-rw-r--r--pl-pl/bf-pl.html.markdown2
-rw-r--r--pt-br/c-pt.html.markdown3
-rw-r--r--pt-br/elisp-pt.html.markdown2
-rw-r--r--pt-br/haskell-pt.html.markdown4
-rw-r--r--pt-br/markdown-pt.html.markdown27
-rw-r--r--pt-br/pascal-pt.html.markdown2
-rw-r--r--pt-br/whip-pt.html.markdown2
-rw-r--r--python3.html.markdown4
-rw-r--r--ru-ru/c-ru.html.markdown2
-rw-r--r--ruby.html.markdown9
-rw-r--r--sql.html.markdown41
-rw-r--r--ta_in/css-ta.html.markdown42
-rw-r--r--ta_in/xml-ta.html.markdown52
-rw-r--r--tr-tr/c-tr.html.markdown2
-rw-r--r--typescript.html.markdown16
-rw-r--r--zh-cn/c-cn.html.markdown2
27 files changed, 661 insertions, 83 deletions
diff --git a/c.html.markdown b/c.html.markdown
index 7975a1c2..e5ffc379 100644
--- a/c.html.markdown
+++ b/c.html.markdown
@@ -10,6 +10,7 @@ contributors:
- ["himanshu", "https://github.com/himanshu81494"]
- ["Joshua Li", "https://github.com/JoshuaRLi"]
- ["Dragos B. Chirila", "https://github.com/dchirila"]
+ - ["Heitor P. de Bittencourt", "https://github.com/heitorPB/"]
---
Ah, C. Still **the** language of modern high-performance computing.
@@ -820,7 +821,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://c.learncodethehardway.org/book/).
+Another good resource is [Learn C The Hard Way](http://learncodethehardway.org/c/).
If you have a question, read the [compl.lang.c Frequently Asked Questions](http://c-faq.com).
diff --git a/common-lisp.html.markdown b/common-lisp.html.markdown
index b12e50ca..1f2bb366 100644
--- a/common-lisp.html.markdown
+++ b/common-lisp.html.markdown
@@ -69,7 +69,7 @@ t ; another atom, denoting true
;;; is a good starting point. Third party libraries can be easily installed with
;;; Quicklisp
-;;; CL is usually developed with a text editor and a Real Eval Print
+;;; CL is usually developed with a text editor and a Read Eval Print
;;; Loop (REPL) running at the same time. The REPL allows for interactive
;;; exploration of the program while it is running "live".
diff --git a/css.html.markdown b/css.html.markdown
index 64dc097c..b8adc886 100644
--- a/css.html.markdown
+++ b/css.html.markdown
@@ -164,14 +164,14 @@ selector {
max-width: 5in; /* inches */
/* Colors */
- color: #F6E; /* short hex format */
- color: #FF66EE; /* long hex format */
- color: tomato; /* a named color */
- color: rgb(255, 255, 255); /* as rgb values */
- color: rgb(10%, 20%, 50%); /* as rgb percentages */
- color: rgba(255, 0, 0, 0.3); /* as rgba values (CSS 3) Note: 0 <= a <= 1 */
- color: transparent; /* equivalent to setting the alpha to 0 */
- color: hsl(0, 100%, 50%); /* as hsl percentages (CSS 3) */
+ color: #F6E; /* short hex format */
+ color: #FF66EE; /* long hex format */
+ color: tomato; /* a named color */
+ color: rgb(255, 255, 255); /* as rgb values */
+ color: rgb(10%, 20%, 50%); /* as rgb percentages */
+ color: rgba(255, 0, 0, 0.3); /* as rgba values (CSS 3) Note: 0 <= a <= 1 */
+ color: transparent; /* equivalent to setting the alpha to 0 */
+ color: hsl(0, 100%, 50%); /* as hsl percentages (CSS 3) */
color: hsla(0, 100%, 50%, 0.3); /* as hsl percentages with alpha */
/* Borders */
@@ -179,7 +179,7 @@ selector {
border-style:solid;
border-color:red; /* similar to how background-color is set */
border: 5px solid red; /* this is a short hand approach for the same */
- border-radius:20px; /* this is a CSS3 property */
+ border-radius:20px; /* this is a CSS3 property */
/* Images as backgrounds of elements */
background-image: url(/img-path/img.jpg); /* quotes inside url() optional */
@@ -317,6 +317,7 @@ a new feature.
* [Dabblet](http://dabblet.com/) (CSS playground)
* [Mozilla Developer Network's CSS documentation](https://developer.mozilla.org/en-US/docs/Web/CSS) (Tutorials and reference)
* [Codrops' CSS Reference](http://tympanus.net/codrops/css_reference/) (Reference)
+* [DevTips' CSS Basics](https://www.youtube.com/playlist?list=PLqGj3iMvMa4IOmy04kDxh_hqODMqoeeCy) (Tutorials)
## Further Reading
diff --git a/dart.html.markdown b/dart.html.markdown
index 07f755f7..ce6f681b 100644
--- a/dart.html.markdown
+++ b/dart.html.markdown
@@ -503,6 +503,44 @@ example30() {
}
}
+// Optional Positional Parameter:
+// parameter will be disclosed with square bracket [ ] & square bracketed parameter are optional.
+example31() {
+ findVolume31(int length, int breath, [int height]) {
+ print('length = $length, breath = $breath, height = $height');
+ }
+
+ findVolume31(10,20,30); //valid
+ findVolume31(10,20); //also valid
+}
+
+// Optional Named Parameter:
+// parameter will be disclosed with curly bracket { }
+// curly bracketed parameter are optional.
+// have to use parameter name to assign a value which separated with colan :
+// in curly bracketed parameter order does not matter
+// these type parameter help us to avoid confusion while passing value for a function which has many parameter.
+example32() {
+ findVolume32(int length, int breath, {int height}) {
+ print('length = $length, breath = $breath, height = $height');
+ }
+
+ findVolume32(10,20,height:30);//valid & we can see the parameter name is mentioned here.
+ findVolume32(10,20);//also valid
+}
+
+// Optional Default Parameter:
+// same like optional named parameter in addition we can assign default value for this parameter.
+// which means no value is passed this default value will be taken.
+example33() {
+ findVolume33(int length, int breath, {int height=10}) {
+ print('length = $length, breath = $breath, height = $height');
+ }
+
+ findVolume33(10,20,height:30);//valid
+ findVolume33(10,20);//valid
+}
+
// Programs have only one entry point in the main function.
// Nothing is expected to be executed on the outer scope before a program
// starts running with what's in its main function.
@@ -514,7 +552,7 @@ main() {
example8, example9, example10, example11, example12, example13, example14,
example15, example16, example17, example18, example19, example20,
example21, example22, example23, example24, example25, example26,
- example27, example28, example29, example30
+ example27, example28, example29, example30, example31, example32, example33
].forEach((ef) => ef());
}
diff --git a/de-de/latex-de.html.markdown b/de-de/latex-de.html.markdown
index ee9c6e3e..8a952b15 100644
--- a/de-de/latex-de.html.markdown
+++ b/de-de/latex-de.html.markdown
@@ -39,13 +39,13 @@ filename: latex-de.tex
% Dieses Kommando kann man später benutzen.
\newcommand{\comment}[1]{}
-% Es können durchaus noch weitere Optione für das Dokument gesetzt werden!
+% Es können durchaus noch weitere Optionen für das Dokument gesetzt werden!
\author{Chaitanya Krishna Ande, Colton Kohnke \& Sricharan Chiruvolu}
\date{\today}
\title{Learn \LaTeX\ in Y Minutes!}
% Nun kann's losgehen mit unserem Dokument.
-% Alles vor dieser Zeile wird die Preamble genannt.
+% Alles vor dieser Zeile wird die Präambel genannt.
\begin{document}
\comment{
@@ -62,7 +62,7 @@ filename: latex-de.tex
% Inhalt erscheinen.
% Dieser Befehl ist in den Dokumentenklassen article und report verfügbar.
\begin{abstract}
- \LaTeX -Documentation geschrieben in \LaTeX ! Wie ungewöhnlich und garantiert nicht meine Idee!
+ \LaTeX -Dokumentation geschrieben in \LaTeX ! Wie ungewöhnlich und garantiert nicht meine Idee!
\end{abstract}
% Section Befehle sind intuitiv.
@@ -113,7 +113,7 @@ anderen Wissenschaften. Und deswegen müssen wir in der Lage sein, spezielle
Symbole zu unserem Paper hinzuzufügen! \\
Mathe kennt sehr viele Symbole, viel mehr als auf einer Tastatur zu finden sind;
-Symbole für Mengen und relationen, Pfeile, Operatoren und Griechische Buchstaben,
+Symbole für Mengen und Relationen, Pfeile, Operatoren und Griechische Buchstaben,
um nur ein paar zu nennen.\\
Mengen und Relationen spielen eine sehr wichtige Rolle in vielen mathematischen
diff --git a/es-es/c-es.html.markdown b/es-es/c-es.html.markdown
index 8bc1eabb..cae4349e 100644
--- a/es-es/c-es.html.markdown
+++ b/es-es/c-es.html.markdown
@@ -5,6 +5,7 @@ contributors:
- ["Adam Bard", "http://adambard.com/"]
translators:
- ["Francisco García", "http://flaskbreaker.tumblr.com/"]
+ - ["Heitor P. de Bittencourt", "https://github.com/heitorPB/"]
lang: es-es
---
@@ -423,7 +424,7 @@ libro de C, escrito por Dennis Ritchie, creador de C y Brian Kernighan. Aún as
se cuidadoso, es antiguo, contiene algunas inexactitudes, y algunas prácticas
han cambiado.
-Otro buen recurso es [Learn C the hard way](http://c.learncodethehardway.org/book/).
+Otro buen recurso es [Learn C the hard way](http://learncodethehardway.org/c/).
Si tienes una pregunta, lee [compl.lang.c Frequently Asked Questions](http://c-faq.com).
diff --git a/es-es/factor-es.html.markdown b/es-es/factor-es.html.markdown
new file mode 100644
index 00000000..67c60de7
--- /dev/null
+++ b/es-es/factor-es.html.markdown
@@ -0,0 +1,200 @@
+---
+language: factor
+contributors:
+ - ["hyphz", "http://github.com/hyphz/"]
+translators:
+ - ["Roberto R", "https://github.com/rrodriguze"]
+filename: learnfactor-es.factor
+
+lang: es-es
+---
+Factor es un lenguaje moderno basado en la pila, basado en Forth, creado por
+Slava Pestov.
+
+El código de este archivo puede escribirse en Factor, pero no importa
+directamente porque el encabezado del vocabulario de importación haria que el
+comienzo fuera totalmente confuso.
+
+```factor
+! Esto es un comentario
+
+! Como Forth, toda la programación se realiza mediante la manipulación de la
+! pila.
+! La intruducción de un valor literal lo coloca en la pila
+5 2 3 56 76 23 65 ! No hay salida pero la pila se imprime en modo interactivo
+
+! Esos números se agregan a la pila de izquierda a derecha
+! .s imprime la pila de forma no destructiva.
+.s ! 5 2 3 56 76 23 65
+
+! La aritmética funciona manipulando datos en la pila.
+5 4 + ! Sem saída
+
+! `.` muestra el resultado superior de la pila y lo imprime.
+. ! 9
+
+! Más ejemplos de aritmética:
+6 7 * . ! 42
+1360 23 - . ! 1337
+12 12 / . ! 1
+13 2 mod . ! 1
+
+99 neg . ! -99
+-99 abs . ! 99
+52 23 max . ! 52
+52 23 min . ! 23
+
+! Se proporcionan varias palabras para manipular la pila, conocidas
+colectivamente como palabras codificadas.
+
+3 dup - ! duplica el primer item (1st ahora igual a 2nd): 3 - 3
+2 5 swap / ! intercambia el primero con el segundo elemento: 5 / 2
+4 0 drop 2 / ! elimina el primer item (no imprime en pantalla): 4 / 2
+1 2 3 nip .s ! elimina el segundo item (semejante a drop): 1 3
+1 2 clear .s ! acaba con toda la pila
+1 2 3 4 over .s ! duplica el segundo item superior: 1 2 3 4 3
+1 2 3 4 2 pick .s ! duplica el tercer item superior: 1 2 3 4 2 3
+
+! Creando Palabras
+! La palabra `:` factoriza los conjuntos en modo de compilación hasta que vea
+la palabra`;`.
+: square ( n -- n ) dup * ; ! Sin salida
+5 square . ! 25
+
+! Podemos ver lo que las palabra hacen también.
+! \ suprime la evaluación de una palabra y coloca su identificador en la pila.
+\ square see ! : square ( n -- n ) dup * ;
+
+! Después del nombre de la palabra para crear, la declaración entre paréntesis
+da efecto a la pila.
+! Podemos usar los nombres que queramos dentro de la declaración:
+: weirdsquare ( camel -- llama ) dup * ;
+
+! Mientras su recuento coincida con el efecto de pila de palabras:
+: doubledup ( a -- b ) dup dup ; ! Error: Stack effect declaration is wrong
+: doubledup ( a -- a a a ) dup dup ; ! Ok
+: weirddoubledup ( i -- am a fish ) dup dup ; ! Além disso Ok
+
+! Donde Factor difiere de Forth es en el uso de las citaciones.
+! Una citacion es un bloque de código que se coloca en la pila como un valor.
+! [ inicia el modo de citación; ] termina.
+[ 2 + ] ! La cita que suma dos queda en la pila
+4 swap call . ! 6
+
+! Y así, palabras de orden superior. TONOS de palabras de orden superior
+2 3 [ 2 + ] dip .s ! Tomar valor de la parte superior de la pilar, cotizar, retroceder: 4 3
+3 4 [ + ] keep .s ! Copiar el valor desde la parte superior de la pila, cotizar, enviar copia: 7 4
+1 [ 2 + ] [ 3 + ] bi .s ! Ejecute cada cotización en el valor superior, empuje amabos resultados: 3 4
+4 3 1 [ + ] [ + ] bi .s ! Las citas en un bi pueden extraer valores más profundos de la pila: 4 5 ( 1+3 1+4 )
+1 2 [ 2 + ] bi@ .s ! Citar en primer y segundo valor
+2 [ + ] curry ! Inyecta el valor dado al comienzo de la pila: [ 2 + ] se deja en la pila
+
+! Condicionales
+! Cualquier valor es verdadero, excepto el valor interno f.
+! no existe un valor interno, pero su uso no es esencial.
+! Los condicionales son palabras de orden superior, como con los combinadores
+! anteriores
+
+5 [ "Five is true" . ] when ! Cinco es verdadero
+0 [ "Zero is true" . ] when ! Cero es verdadero
+f [ "F is true" . ] when ! Sin salida
+f [ "F is false" . ] unless ! F es falso
+2 [ "Two is true" . ] [ "Two is false" . ] if ! Two es verdadero
+
+! Por defecto, los condicionales consumen el valor bajo prueba, pero las
+! variantes con un
+! asterisco se dejan solo si es verdad:
+
+5 [ . ] when* ! 5
+f [ . ] when* ! Sin salida, pila vacía, se consume porque f es falso
+
+
+! Lazos
+! Lo has adivinado... estas son palabras de orden superior también.
+
+5 [ . ] each-integer ! 0 1 2 3 4
+4 3 2 1 0 5 [ + . ] each-integer ! 0 2 4 6 8
+5 [ "Hello" . ] times ! Hello Hello Hello Hello Hello
+
+! Here's a list:
+{ 2 4 6 8 } ! Goes on the stack as one item
+
+! Aqui está uma lista:
+{ 2 4 6 8 } [ 1 + . ] each ! Exibe 3 5 7 9
+{ 2 4 6 8 } [ 1 + ] map ! Salida { 3 5 7 9 } de la pila
+
+! Reduzir laços ou criar listas:
+{ 1 2 3 4 5 } [ 2 mod 0 = ] filter ! Solo mantenga miembros de la lista para los cuales la cita es verdadera: { 2 4 }
+{ 2 4 6 8 } 0 [ + ] reduce . ! Como "fold" en lenguajes funcinales: exibe 20 (0+2+4+6+8)
+{ 2 4 6 8 } 0 [ + ] accumulate . . ! Como reducir, pero mantiene los valores intermedios en una lista: { 0 2 6 12 } así que 20
+1 5 [ 2 * dup ] replicate . ! Repite la cita 5 veces y recoge los resultados en una lista: { 2 4 8 16 32 }
+1 [ dup 100 < ] [ 2 * dup ] produce ! Repite la segunda cita hasta que la primera devuelva falso y recopile los resultados: { 2 4 8 16 32 64 128 }
+
+! Si todo lo demás falla, un propósito general a repetir.
+1 [ dup 10 < ] [ "Hello" . 1 + ] while ! Escribe "Hello" 10 veces
+ ! Sí, es dificil de leer
+ ! Para eso están los bucles variantes
+
+! Variables
+! Normalmente, se espera que los programas de Factor mantengan todos los datos
+! en la pila.
+! El uso de variables con nombre hace que la refactorización sea más difícil
+! (y se llama Factor por una razón)
+! Variables globales, si las necesitas:
+
+SYMBOL: name ! Crea un nombre como palabra de identificación
+"Bob" name set-global ! Sin salída
+name get-global . ! "Bob"
+
+! Las variables locales nombradas se consideran una extensión, pero están
+! disponibles
+! En una cita ..
+[| m n ! La cita captura los dos valores principales de la pila en m y n
+ | m n + ] ! Leerlos
+
+! Ou em uma palavra..
+:: lword ( -- ) ! Tenga en cuenta los dos puntos dobles para invocar la extensión de variable léxica
+ 2 :> c ! Declara la variable inmutable c para contener 2
+ c . ; ! Imprimirlo
+
+! En una palabra declarada de esta manera, el lado de entrada de la declaración
+! de la pila
+! se vuelve significativo y proporciona los valores de las variables en las que
+! se capturan los valores de pila
+:: double ( a -- result ) a 2 * ;
+
+! Las variables se declaran mutables al terminar su nombre con su signo de
+! exclamación
+:: mword2 ( a! -- x y ) ! Capture la parte superior de la pila en la variable mutable a
+ a ! Empujar a
+ a 2 * a! ! Multiplique por 2 y almacenar el resultado en a
+ a ; ! Empujar el nuevo valor de a
+5 mword2 ! Pila: 5 10
+
+! Listas y Secuencias
+! Vimos arriba cómo empujar una lista a la pila
+
+0 { 1 2 3 4 } nth ! Acceder a un miembro específico de una lista: 1
+10 { 1 2 3 4 } nth ! Error: índice de secuencia fuera de los límites
+1 { 1 2 3 4 } ?nth ! Lo mismo que nth si el índice está dentro de los límites: 2
+10 { 1 2 3 4 } ?nth ! Sin errores si está fuera de los límites: f
+
+{ "at" "the" "beginning" } "Append" prefix ! { "Append" "at" "the" "beginning" }
+{ "Append" "at" "the" } "end" suffix ! { "Append" "at" "the" "end" }
+"in" 1 { "Insert" "the" "middle" } insert-nth ! { "Insert" "in" "the" "middle" }
+"Concat" "enate" append ! "Concatenate" - strings are sequences too
+"Concatenate" "Reverse " prepend ! "Reverse Concatenate"
+{ "Concatenate " "seq " "of " "seqs" } concat ! "Concatenate seq of seqs"
+{ "Connect" "subseqs" "with" "separators" } " " join ! "Connect subseqs with separators"
+
+! Y si desea obtener meta, las citas son secuencias y se pueden desmontar
+0 [ 2 + ] nth ! 2
+1 [ 2 + ] nth ! +
+[ 2 + ] \ - suffix ! Quotation [ 2 + - ]
+
+
+```
+
+##Listo para más?
+
+* [Documentación de Factor](http://docs.factorcode.org/content/article-help.home.html)
diff --git a/es-es/hy-es.html.markdown b/es-es/hy-es.html.markdown
new file mode 100644
index 00000000..bfad3b6e
--- /dev/null
+++ b/es-es/hy-es.html.markdown
@@ -0,0 +1,176 @@
+---
+language: hy
+filename: learnhy-es.hy
+contributors:
+ - ["Abhishek L", "http://twitter.com/abhishekl"]
+translators:
+ - ["Roberto R", "https://github.com/rrodriguze"]
+lang: es-es
+---
+
+Hy es un lenguaje de Lisp escrito sobre Python. Esto es posible convirtiendo
+código Hy en un árbol abstracto de Python (ast). Por lo que, esto permite a
+Hy llamar a código Pyhton nativo y viceversa.
+
+Este tutorial funciona para hy >= 0.9.12
+
+```clojure
+;; Esto es una intrucción muy básica a Hy, como la del siguiente enlace
+;; http://try-hy.appspot.com
+;;
+; Comentarios usando punto y coma, como en otros LISPS
+
+;; Nociones básicas de expresiones
+; Los programas List están hechos de expresiones simbólicas como la siguiente
+(some-function args)
+; ahora el esencial "Hola Mundo"
+(print "hello world")
+
+;; Tipos de datos simples
+; Todos los tipos de datos simples son exactamente semejantes a sus homólogos
+; en python
+42 ; => 42
+3.14 ; => 3.14
+True ; => True
+4+10j ; => (4+10j) un número complejo
+
+; Vamos a comenzar con un poco de arimética simple
+(+ 4 1) ;=> 5
+; el operador es aplicado a todos los argumentos, como en otros lisps
+(+ 4 1 2 3) ;=> 10
+(- 2 1) ;=> 1
+(* 4 2) ;=> 8
+(/ 4 1) ;=> 4
+(% 4 2) ;=> 0 o operador módulo
+; la exponenciación es representada por el operador ** como python
+(** 3 2) ;=> 9
+; las funciones anidadas funcionan como lo esperado
+(+ 2 (* 4 2)) ;=> 10
+; también los operadores lógicos igual o no igual se comportan como se espera
+(= 5 4) ;=> False
+(not (= 5 4)) ;=> True
+
+;; variables
+; las variables se configuran usando SETV, los nombres de las variables pueden
+; usar utf-8, excepto for ()[]{}",'`;#|
+(setv a 42)
+(setv π 3.14159)
+(def *foo* 42)
+;; otros tipos de datos de almacenamiento
+; strings, lists, tuples & dicts
+; estos son exactamente los mismos tipos de almacenamiento en python
+"hello world" ;=> "hello world"
+; las operaciones de cadena funcionan de manera similar en python
+(+ "hello " "world") ;=> "hello world"
+; Las listas se crean usando [], la indexación comienza en 0
+(setv mylist [1 2 3 4])
+; las tuplas son estructuras de datos inmutables
+(setv mytuple (, 1 2))
+; los diccionarios son pares de valor-clave
+(setv dict1 {"key1" 42 "key2" 21})
+; :nombre se puede usar para definir palabras clave en Hy que se pueden usar para claves
+(setv dict2 {:key1 41 :key2 20})
+; usar 'get' para obtener un elemento en un índice/key
+(get mylist 1) ;=> 2
+(get dict1 "key1") ;=> 42
+; Alternativamente, si se usan palabras clave que podrían llamarse directamente
+(:key1 dict2) ;=> 41
+
+;; funciones y otras estructuras de programa
+; las funciones son definidas usando defn, o el último sexp se devuelve por defecto
+(defn greet [name]
+  "A simple greeting" ; un docstring opcional
+  (print "hello " name))
+
+(greet "bilbo") ;=> "hello bilbo"
+
+; las funciones pueden tener argumentos opcionales, así como argumentos-clave
+(defn foolists [arg1 &optional [arg2 2]]
+  [arg1 arg2])
+
+(foolists 3) ;=> [3 2]
+(foolists 10 3) ;=> [10 3]
+
+; las funciones anonimas son creadas usando constructores 'fn' y 'lambda'
+; que son similares a 'defn'
+(map (fn [x] (* x x)) [1 2 3 4]) ;=> [1 4 9 16]
+
+;; operaciones de secuencia
+; hy tiene algunas utilidades incluidas para operaciones de secuencia, etc.
+; recuperar el primer elemento usando 'first' o 'car'
+(setv mylist [1 2 3 4])
+(setv mydict {"a" 1 "b" 2})
+(first mylist) ;=> 1
+
+; corte listas usando 'slice'
+(slice mylist 1 3) ;=> [2 3]
+
+; obtener elementos de una lista o dict usando 'get'
+(get mylist 1) ;=> 2
+(get mydict "b") ;=> 2
+; la lista de indexación comienza a partir de 0, igual que en python
+; assoc puede definir elementos clave/índice
+(assoc mylist 2 10) ; crear mylist [1 2 10 4]
+(assoc mydict "c" 3) ; crear mydict {"a" 1 "b" 2 "c" 3}
+; hay muchas otras funciones que hacen que trabajar con secuencias sea 
+; entretenido
+
+;; Python interop
+;; los import funcionan exactamente como en python
+(import datetime)
+(import [functools [partial reduce]]) ; importa fun1 e fun2 del module1
+(import [matplotlib.pyplot :as plt]) ; haciendo una importación en foo como en bar
+; todos los métodos de python incluídos etc. son accesibles desde hy
+; a.foo(arg) is called as (.foo a arg)
+(.split (.strip "hello world  ")) ;=> ["hello" "world"]
+
+;; Condicionales
+; (if condition (body-if-true) (body-if-false)
+(if (= passcode "moria")
+  (print "welcome")
+  (print "Speak friend, and Enter!"))
+
+; anidar múltiples cláusulas 'if else if' con condiciones
+(cond
+ [(= someval 42)
+  (print "Life, universe and everything else!")]
+ [(> someval 42)
+  (print "val too large")]
+ [(< someval 42)
+  (print "val too small")])
+
+; declaraciones de grupo con 'do', son ejecutadas secuencialmente
+; formas como defn tienen un 'do' implícito
+(do
+ (setv someval 10)
+ (print "someval is set to " someval)) ;=> 10
+
+; crear enlaces léxicos con 'let', todas las variables definidas de esta manera
+; tienen alcance local
+(let [[nemesis {"superman" "lex luther"
+                "sherlock" "moriarty"
+                "seinfeld" "newman"}]]
+  (for [(, h v) (.items nemesis)]
+    (print (.format "{0}'s nemesis was {1}" h v))))
+
+;; clases
+; las clases son definidas de la siguiente manera
+(defclass Wizard [object]
+  [[--init-- (fn [self spell]
+             (setv self.spell spell) ; init the attr magic
+             None)]
+   [get-spell (fn [self]
+              self.spell)]])
+
+;; acesse hylang.org
+```
+
+### Otras lecturas
+
+Este tutorial apenas es una introducción básica para hy/lisp/python.
+
+Docs Hy: [http://hy.readthedocs.org](http://hy.readthedocs.org)
+
+Repo Hy en GitHub: [http://github.com/hylang/hy](http://github.com/hylang/hy)
+
+Acceso a freenode irc con #hy, hashtag en twitter: #hylang
diff --git a/it-it/bash-it.html.markdown b/it-it/bash-it.html.markdown
index efc47969..099cc681 100644
--- a/it-it/bash-it.html.markdown
+++ b/it-it/bash-it.html.markdown
@@ -140,6 +140,25 @@ then
echo "Questo verrà eseguito se $Nome è Daniya O Zach."
fi
+# C'è anche l'operatore `=~`, che serve per confrontare una stringa con un'espressione regolare:
+Email=me@example.com
+if [[ "$Email" =~ [a-z]+@[a-z]{2,}\.(com|net|org) ]]
+then
+ echo "Email valida!"
+fi
+# L'operatore =~ funziona solo dentro alle doppie parentesi quadre [[ ]],
+# che hanno un comportamento leggermente diverso rispetto alle singole [ ].
+# Se vuoi approfondire, visita questo link (in inglese):
+# http://www.gnu.org/software/bash/manual/bashref.html#Conditional-Constructs
+
+# Usando `alias`, puoi definire nuovi comandi o modificare quelli già esistenti.
+# Ad esempio, così puoi ridefinire il comando ping per inviare solo 5 pacchetti
+alias ping='ping -c 5'
+# "Scavalca" l'alias e usa il comando vero, utilizzando il backslash
+\ping 192.168.1.1
+# Stampa la lista di tutti gli alias
+alias -p
+
# Le espressioni sono nel seguente formato:
echo $(( 10 + 5 ))
diff --git a/it-it/elixir-it.html.markdown b/it-it/elixir-it.html.markdown
index 60301b1a..48afe0c8 100644
--- a/it-it/elixir-it.html.markdown
+++ b/it-it/elixir-it.html.markdown
@@ -24,7 +24,7 @@ e molte altre funzionalità.
# Per usare la shell di elixir usa il comando `iex`.
# Compila i tuoi moduli con il comando `elixirc`.
-# Entrambi i comandi dovrebbero già essere nel tuo PATH se hai installato
+# Entrambi i comandi dovrebbero già essere nel tuo PATH se hai installato
# elixir correttamente.
## ---------------------------
@@ -65,7 +65,7 @@ coda #=> [2,3]
# le tuple hanno dimensione differente.
# {a, b, c} = {1, 2} #=> ** (MatchError) no match of right hand side value: {1,2}
-# Ci sono anche i binari
+# Ci sono anche i binari
<<1,2,3>> # binari (Binary)
# Stringhe e liste di caratteri
@@ -80,7 +80,7 @@ multi-linea.
#=> "Sono una stringa\nmulti-linea.\n"
# Le stringhe sono tutte codificate in UTF-8:
-"cìaò"
+"cìaò"
#=> "cìaò"
# le stringhe in realtà sono dei binari, e le liste di caratteri sono liste.
@@ -124,10 +124,11 @@ rem(10, 3) #=> 1
# Questi operatori si aspettano un booleano come primo argomento.
true and true #=> true
false or true #=> true
-# 1 and true #=> ** (ArgumentError) argument error
+# 1 and true
+#=> ** (BadBooleanError) expected a boolean on left-side of "and", got: 1
# Elixir fornisce anche `||`, `&&` e `!` che accettano argomenti
-# di qualsiasi tipo.
+# di qualsiasi tipo.
# Tutti i valori tranne `false` e `nil` saranno valutati come true.
1 || true #=> 1
false && 1 #=> false
@@ -147,7 +148,7 @@ nil && 20 #=> nil
1 < :ciao #=> true
# L'ordine generale è definito sotto:
-# numeri < atomi < riferimenti < funzioni < porte < pid < tuple < liste
+# numeri < atomi < riferimenti < funzioni < porte < pid < tuple < liste
# < stringhe di bit
# Per citare Joe Armstrong su questo: "L'ordine non è importante,
@@ -171,7 +172,7 @@ else
"Questo sì"
end
-# Ti ricordi il pattern matching?
+# Ti ricordi il pattern matching?
# Moltre strutture di controllo di flusso in elixir si basano su di esso.
# `case` ci permette di confrontare un valore a diversi pattern:
@@ -214,7 +215,7 @@ cond do
"Questa sì! (essenzialmente funziona come un else)"
end
-# `try/catch` si usa per gestire i valori lanciati (throw),
+# `try/catch` si usa per gestire i valori lanciati (throw),
# Supporta anche una clausola `after` che è invocata in ogni caso.
try do
throw(:ciao)
@@ -235,7 +236,7 @@ quadrato = fn(x) -> x * x end
quadrato.(5) #=> 25
# Accettano anche guardie e condizioni multiple.
-# le guardie ti permettono di perfezionare il tuo pattern matching,
+# le guardie ti permettono di perfezionare il tuo pattern matching,
# sono indicate dalla parola chiave `when`:
f = fn
x, y when x > 0 -> x + y
@@ -265,13 +266,13 @@ end
Matematica.somma(1, 2) #=> 3
Matematica.quadrato(3) #=> 9
-# Per compilare il modulo 'Matematica' salvalo come `matematica.ex` e usa
+# Per compilare il modulo 'Matematica' salvalo come `matematica.ex` e usa
# `elixirc`.
# nel tuo terminale: elixirc matematica.ex
# All'interno di un modulo possiamo definire le funzioni con `def` e funzioni
# private con `defp`.
-# Una funzione definita con `def` è disponibile per essere invocata anche da
+# Una funzione definita con `def` è disponibile per essere invocata anche da
# altri moduli, una funziona privata può essere invocata solo localmente.
defmodule MatematicaPrivata do
def somma(a, b) do
@@ -286,7 +287,11 @@ end
MatematicaPrivata.somma(1, 2) #=> 3
# MatematicaPrivata.esegui_somma(1, 2) #=> ** (UndefinedFunctionError)
-# Anche le dichiarazioni di funzione supportano guardie e condizioni multiple:
+# Anche le dichiarazioni di funzione supportano guardie e condizioni multiple.
+# Quando viene chiamata una funzione dichiarata con più match, solo la prima
+# che matcha viene effettivamente invocata.
+# Ad esempio: chiamando area({:cerchio, 3}) vedrà invocata la seconda definizione
+# di area mostrata sotto, non la prima:
defmodule Geometria do
def area({:rettangolo, w, h}) do
w * h
@@ -322,16 +327,25 @@ defmodule Modulo do
Questo è un attributo incorporato in un modulo di esempio.
"""
- @miei_dati 100 # Questo è un attributo personalizzato .
+ @miei_dati 100 # Questo è un attributo personalizzato.
IO.inspect(@miei_dati) #=> 100
end
+# L'operatore pipe |> permette di passare l'output di una espressione
+# come primo parametro di una funzione.
+# Questo facilita operazioni quali pipeline di operazioni, composizione di
+# funzioni, ecc.
+Range.new(1,10)
+|> Enum.map(fn x -> x * x end)
+|> Enum.filter(fn x -> rem(x, 2) == 0 end)
+#=> [4, 16, 36, 64, 100]
+
## ---------------------------
## -- Strutture ed Eccezioni
## ---------------------------
-# Le Strutture (Structs) sono estensioni alle mappe che portano
+# Le Strutture (Structs) sono estensioni alle mappe che portano
# valori di default, garanzia alla compilazione e polimorfismo in Elixir.
defmodule Persona do
defstruct nome: nil, eta: 0, altezza: 0
@@ -367,7 +381,7 @@ end
## -- Concorrenza
## ---------------------------
-# Elixir si basa sul modello degli attori per la concorrenza.
+# Elixir si basa sul modello degli attori per la concorrenza.
# Tutto ciò di cui abbiamo bisogno per scrivere programmi concorrenti in elixir
# sono tre primitive: creare processi, inviare messaggi e ricevere messaggi.
@@ -379,12 +393,12 @@ spawn(f) #=> #PID<0.40.0>
# `spawn` restituisce un pid (identificatore di processo). Puoi usare questo
# pid per inviare messaggi al processo.
# Per passare messaggi si usa l'operatore `send`.
-# Perché tutto questo sia utile dobbiamo essere capaci di ricevere messaggi,
+# Perché tutto questo sia utile dobbiamo essere capaci di ricevere messaggi,
# oltre ad inviarli. Questo è realizzabile con `receive`:
# Il blocco `receive do` viene usato per mettersi in ascolto di messaggi
# ed elaborarli quando vengono ricevuti. Un blocco `receive do` elabora
-# un solo messaggio ricevuto: per fare elaborazione multipla di messaggi,
+# un solo messaggio ricevuto: per fare elaborazione multipla di messaggi,
# una funzione con un blocco `receive do` al suo intero dovrà chiamare
# ricorsivamente sé stessa per entrare di nuovo nel blocco `receive do`.
defmodule Geometria do
@@ -405,7 +419,7 @@ pid = spawn(fn -> Geometria.calcolo_area() end) #=> #PID<0.40.0>
# Alternativamente
pid = spawn(Geometria, :calcolo_area, [])
-# Invia un messaggio a `pid` che farà match su un pattern nel blocco in receive
+# Invia un messaggio a `pid` che farà match su un pattern nel blocco in receive
send pid, {:rettangolo, 2, 3}
#=> Area = 6
# {:rettangolo,2,3}
@@ -421,7 +435,7 @@ self() #=> #PID<0.27.0>
## Referenze
* [Getting started guide](http://elixir-lang.org/getting_started/1.html) dalla [pagina web ufficiale di elixir](http://elixir-lang.org)
-* [Documentazione Elixir](http://elixir-lang.org/docs/master/)
+* [Documentazione Elixir](https://elixir-lang.org/docs.html)
* ["Programming Elixir"](https://pragprog.com/book/elixir/programming-elixir) di Dave Thomas
* [Elixir Cheat Sheet](http://media.pragprog.com/titles/elixir/ElixirCheat.pdf)
* ["Learn You Some Erlang for Great Good!"](http://learnyousomeerlang.com/) di Fred Hebert
diff --git a/java.html.markdown b/java.html.markdown
index ca0b04c2..4f45a268 100644
--- a/java.html.markdown
+++ b/java.html.markdown
@@ -289,7 +289,7 @@ public class LearnJava {
// interface. This allows the execution time of basic
// operations, such as get and insert element, to remain
// constant-amortized even for large sets.
- // TreeMap - A Map that is sorted by its keys. Each modification
+ // TreeMap - A Map that is sorted by its keys. Each modification
// maintains the sorting defined by either a Comparator
// supplied at instantiation, or comparisons of each Object
// if they implement the Comparable interface.
@@ -470,11 +470,11 @@ public class LearnJava {
// <second value>"
int foo = 5;
String bar = (foo < 10) ? "A" : "B";
- System.out.println("bar : " + bar); // Prints "bar : A", because the
+ System.out.println("bar : " + bar); // Prints "bar : A", because the
// statement is true.
// Or simply
System.out.println("bar : " + (foo < 10 ? "A" : "B"));
-
+
////////////////////////////////////////
// Converting Data Types
@@ -918,7 +918,7 @@ public class Lambdas {
planets.keySet().forEach(p -> System.out.format("%s\n", p));
// Tracing the above, we see that planets is a HashMap, keySet() returns
- // a Set of its keys, forEach applies each element as the lambda
+ // a Set of its keys, forEach applies each element as the lambda
// expression of: (parameter p) -> System.out.format("%s\n", p). Each
// time, the element is said to be "consumed" and the statement(s)
// referred to in the lambda body is applied. Remember the lambda body
@@ -998,6 +998,8 @@ The links provided here below are just to get an understanding of the topic, fee
* [Codewars - Java Katas](https://www.codewars.com/?language=java)
+* [University of Helsinki - Object-Oriented programming with Java](http://moocfi.github.io/courses/2013/programming-part-1/)
+
**Books**:
* [Head First Java](http://www.headfirstlabs.com/books/hfjava/)
diff --git a/pl-pl/bf-pl.html.markdown b/pl-pl/bf-pl.html.markdown
index 54772961..09c85362 100644
--- a/pl-pl/bf-pl.html.markdown
+++ b/pl-pl/bf-pl.html.markdown
@@ -7,7 +7,7 @@ contributors:
- ["Mathias Bynens", "http://mathiasbynens.be/"]
translators:
- ["Jakub Młokosiewicz", "https://github.com/hckr"]
- - ["Mateusz Burniak", "https://gitbub.com/matbur"]
+ - ["Mateusz Burniak", "https://github.com/matbur"]
lang: pl-pl
---
diff --git a/pt-br/c-pt.html.markdown b/pt-br/c-pt.html.markdown
index e1c27958..4e55f068 100644
--- a/pt-br/c-pt.html.markdown
+++ b/pt-br/c-pt.html.markdown
@@ -8,6 +8,7 @@ translators:
- ["João Farias", "https://github.com/JoaoGFarias"]
- ["Elton Viana", "https://github.com/eltonvs"]
- ["Cássio Böck", "https://github.com/cassiobsilva"]
+ - ["Heitor P. de Bittencourt", "https://github.com/heitorPB/"]
lang: pt-br
filename: c-pt.el
---
@@ -641,7 +642,7 @@ typedef void (*minha_função_type)(char *);
Este é *o* livro sobre C, escrito pelos criadores da linguagem. Mas cuidado - ele é antigo e contém alguns erros (bem,
ideias que não são mais consideradas boas) ou práticas ultrapassadas.
-Outra boa referência é [Learn C the hard way](http://c.learncodethehardway.org/book/).
+Outra boa referência é [Learn C the hard way](http://learncodethehardway.org/c/).
Se você tem uma pergunta, leia [compl.lang.c Frequently Asked Questions](http://c-faq.com).
diff --git a/pt-br/elisp-pt.html.markdown b/pt-br/elisp-pt.html.markdown
index fc2d1e40..aa611097 100644
--- a/pt-br/elisp-pt.html.markdown
+++ b/pt-br/elisp-pt.html.markdown
@@ -111,7 +111,7 @@ filename: learn-emacs-lisp-pt.el
(hello)
;; `C-xC-e' => Hello, I am Bastien
-;; Os parêntesis vazios na definição da função significam que ela
+;; Os parênteses vazios na definição da função significam que ela
;; não aceita argumentos. Mas sempre utilizar `my-name' é um tédio!
;; Vamos dizer à função para aceitar um argumento (o argumento é
;; chamado "name"):
diff --git a/pt-br/haskell-pt.html.markdown b/pt-br/haskell-pt.html.markdown
index 181aa471..c55a4c03 100644
--- a/pt-br/haskell-pt.html.markdown
+++ b/pt-br/haskell-pt.html.markdown
@@ -41,7 +41,7 @@ o desenvolvimento deste paradigma de programação.
7 * 7 -- 7 vezes 7
7 / 7 -- 7 dividido por 7
--- Divisões não são inteiras, são fracionádas por padrão da linguagem
+-- Divisões não são inteiras, são fracionadas por padrão da linguagem
28736 / 82374 -- 0.3488479374559934
@@ -67,7 +67,7 @@ not False -- Nega uma falácia
7 > 7 -- 7 é maior que 7 ?
-{- Haskell é uma linguagem que tem uma sintáxe bastante familiar na
+{- Haskell é uma linguagem que tem uma sintaxe bastante familiar na
matemática, por exemplo em chamadas de funções você tem:
NomeFunção ArgumentoA ArgumentoB ArgumentoC ...
diff --git a/pt-br/markdown-pt.html.markdown b/pt-br/markdown-pt.html.markdown
index 1a26e406..63afffd5 100644
--- a/pt-br/markdown-pt.html.markdown
+++ b/pt-br/markdown-pt.html.markdown
@@ -12,7 +12,7 @@ filename: learnmarkdown-pt.md
Markdown foi criado por John Gruber in 2004. Originado para ser fácil de ler e
escrever sintaxe que converte facilmente em HTML (hoje, suporta outros formatos também).
-Dê-me feedback tanto quanto você quiser! / Sinta-se livre para a garfar (fork) e
+Dê-me feedback tanto quanto você quiser! / Sinta-se livre para fazer uma bifurcação (fork) e
puxar o projeto (pull request)
```md
@@ -78,19 +78,20 @@ Termino com dois espaços (destacar-me para vê-los).
Há um <br /> acima de mim!
-<!-- Bloco de citações são fáceis e feito com o caractere >. -->
-
+<!-- Bloco de citações são fáceis e feitos com o caractere >. -->
+
> Este é um bloco de citação. Você pode
-> Enrolar manualmente suas linhas e colocar um `>` antes de cada linha ou você pode
-> deixar suas linhas ficarem muito longas e enrolar por conta própria. Não faz diferença,
+> Quebrar manualmente suas linhas e colocar um `>` antes de cada linha ou você pode
+> deixar suas linhas ficarem muito longas e quebrarem por conta própria. Não faz diferença,
> desde que eles começam com um `>`.
+
> Você também pode usar mais de um nível
>> De recuo?
> Como pura é isso?
<!-- Listas -->
-<!-- As listas não ordenadas podem ser feitas usando asteriscos, positivos ou hífens -->
+<!-- As listas não ordenadas podem ser feitas usando asteriscos, soma ou hífens -->
* Item
* Item
@@ -114,8 +115,8 @@ ou
2. Item dois
3. Item três
-<!-- Você não tem poder para rotular os itens corretamente e a remarcação será ainda
-tornar os números em ordem, mas isso pode não ser uma boa idéia -->
+<!-- Você não tem poder para rotular os itens corretamente e a remarcação ainda deixará os
+itens em ordem, mas isso pode não ser uma boa idéia -->
1. Item um
1. Item dois
@@ -138,14 +139,14 @@ uma linha com quatro espaços ou uma guia -->
Isto é código
É assim, sacou?
-<!-- Você pode também re-guia (ou adicionar mais quatro espaços adicionais) para o recuo
+<!-- Você pode também tabular (ou adicionar mais quatro espaços adicionais) para o recuo
dentro do seu código -->
my_array.each do |item|
puts item
end
-<!-- Código embutido pode ser criada usando o caractere de crase ` -->
+<!-- Código embutido pode ser criado usando o caractere de crase ` -->
John não sabia nem o que o função 'goto()' fazia!
@@ -156,13 +157,13 @@ ruby! -->
def foobar
puts "Hello world!"
end
-\`\`\` <!-- Aqui também, não barras invertidas, apenas ``` -->
+\`\`\` <!-- Aqui também, não use barras invertidas, apenas ``` -->
<-- O texto acima não requer recuo, mas o GitHub vai usar a sintaxe
destacando do idioma que você especificar após a ``` -->
<!-- Regra Horizontal (<hr />) -->
-<!-- Regras horizontais são facilmente adicionados com três ou mais asteriscos ou hífens,
+<!-- Regras horizontais são facilmente adicionadas com três ou mais asteriscos ou hífens,
com ou sem espaços. -->
***
@@ -176,7 +177,7 @@ o texto a ser exibido entre parênteses rígidos [] seguido pela url em parênte
[Click aqui!](http://test.com/)
-<!-- Você também pode adicionar um título link usando aspas dentro dos parênteses -->
+<!-- Você também pode adicionar um título para o link usando aspas dentro dos parênteses -->
[Click aqui!](http://test.com/ "Link para Test.com")
diff --git a/pt-br/pascal-pt.html.markdown b/pt-br/pascal-pt.html.markdown
index 3a37271a..82cce843 100644
--- a/pt-br/pascal-pt.html.markdown
+++ b/pt-br/pascal-pt.html.markdown
@@ -157,7 +157,7 @@ BEGIN
r := int; // um real pode receber um valor inteiro (mas não o contrário)
c := str[1]; //acessando elementos de um vetor: vetor[índice do elemento]
- str := 'hello' + 'world'; //concatenção de strings
+ str := 'hello' + 'world'; //concatenação de strings
my_str[0] := 'a'; { só se pode atribuir valores a vetores elemento
por elemento (não o vetor inteiro de uma vez) }
diff --git a/pt-br/whip-pt.html.markdown b/pt-br/whip-pt.html.markdown
index 7bdeec25..b11faf28 100644
--- a/pt-br/whip-pt.html.markdown
+++ b/pt-br/whip-pt.html.markdown
@@ -71,7 +71,7 @@ false
(= 1 1) ; => true
(equal 2 1) ; => false
-; Por exemplo, inigualdade pode ser verificada combinando as funções
+; Por exemplo, desigualdade pode ser verificada combinando as funções
;`not` e `equal`.
(! (= 2 1)) ; => true
diff --git a/python3.html.markdown b/python3.html.markdown
index d09c2819..6e8d2460 100644
--- a/python3.html.markdown
+++ b/python3.html.markdown
@@ -467,8 +467,8 @@ prints:
1 cat
2 mouse
"""
-list = ["dog", "cat", "mouse"]
-for i, value in enumerate(list):
+animals = ["dog", "cat", "mouse"]
+for i, value in enumerate(animals):
print(i, value)
"""
diff --git a/ru-ru/c-ru.html.markdown b/ru-ru/c-ru.html.markdown
index 389c8bc9..ba3c19ee 100644
--- a/ru-ru/c-ru.html.markdown
+++ b/ru-ru/c-ru.html.markdown
@@ -471,7 +471,7 @@ void str_reverse_through_pointer(char *str_in) {
Лучше всего найдите копию [K&R, aka "The C Programming Language"](https://en.wikipedia.org/wiki/The_C_Programming_Language)
Это **книга** написанная создателями Си. Но будьте осторожны, она содержит идеи которые больше не считаются хорошими.
-Другой хороший ресурс: [Learn C the hard way](http://c.learncodethehardway.org/book/).
+Другой хороший ресурс: [Learn C the hard way](http://learncodethehardway.org/c/).
Если у вас появился вопрос, почитайте [compl.lang.c Frequently Asked Questions](http://c-faq.com).
diff --git a/ruby.html.markdown b/ruby.html.markdown
index f437adcf..3fc2ed2d 100644
--- a/ruby.html.markdown
+++ b/ruby.html.markdown
@@ -23,6 +23,15 @@ contributors:
```ruby
# This is a comment
+=begin
+This is a multi-line comment.
+The beginning line must start with "=begin"
+and the ending line must start with "=end".
+
+You can do this, or start each line in
+a multi-line comment with the # character.
+=end
+
# In Ruby, (almost) everything is an object.
# This includes numbers...
3.class #=> Integer
diff --git a/sql.html.markdown b/sql.html.markdown
index 2bece208..5edf0f7c 100644
--- a/sql.html.markdown
+++ b/sql.html.markdown
@@ -9,14 +9,14 @@ Structured Query Language (SQL) is an ISO standard language for creating and wor
Implementations typically provide a command line prompt where you can enter the commands shown here interactively, and they also offer a way to execute a series of these commands stored in a script file. (Showing that you’re done with the interactive prompt is a good example of something that isn’t standardized--most SQL implementations support the keywords QUIT, EXIT, or both.)
-Several of these sample commands assume that the [MySQL employee sample database](https://dev.mysql.com/doc/employee/en/) available on [github](https://github.com/datacharmer/test_db) has already been loaded. The github files are scripts of commands, similar to the relevant commands below, that create and populate tables of data about a fictional company’s employees. The syntax for running these scripts will depend on the SQL implementation you are using. A utility that you run from the operating system prompt is typical.
+Several of these sample commands assume that the [MySQL employee sample database](https://dev.mysql.com/doc/employee/en/) available on [github](https://github.com/datacharmer/test_db) has already been loaded. The github files are scripts of commands, similar to the relevant commands below, that create and populate tables of data about a fictional company’s employees. The syntax for running these scripts will depend on the SQL implementation you are using. A utility that you run from the operating system prompt is typical.
```sql
-- Comments start with two hyphens. End each command with a semicolon.
-- SQL is not case-sensitive about keywords. The sample commands here
--- follow the convention of spelling them in upper-case because it makes
+-- follow the convention of spelling them in upper-case because it makes
-- it easier to distinguish them from database, table, and column names.
-- Create and delete a database. Database and table names are case-sensitive.
@@ -26,47 +26,47 @@ DROP DATABASE someDatabase;
-- List available databases.
SHOW DATABASES;
--- Use a particular existing database.
+-- Use a particular existing database.
USE employees;
-- Select all rows and columns from the current database's departments table.
--- Default activity is for the interpreter to scroll the results on your screen.
+-- Default activity is for the interpreter to scroll the results on your screen.
SELECT * FROM departments;
--- Retrieve all rows from the departments table,
--- but only the dept_no and dept_name columns.
+-- Retrieve all rows from the departments table,
+-- but only the dept_no and dept_name columns.
-- Splitting up commands across lines is OK.
SELECT dept_no,
dept_name FROM departments;
--- Retrieve all departments columns, but just 5 rows.
+-- Retrieve all departments columns, but just 5 rows.
SELECT * FROM departments LIMIT 5;
-- Retrieve dept_name column values from the departments
--- table where the dept_name value has the substring 'en'.
+-- table where the dept_name value has the substring 'en'.
SELECT dept_name FROM departments WHERE dept_name LIKE '%en%';
-- Retrieve all columns from the departments table where the dept_name
--- column starts with an 'S' and has exactly 4 characters after it.
+-- column starts with an 'S' and has exactly 4 characters after it.
SELECT * FROM departments WHERE dept_name LIKE 'S____';
-- Select title values from the titles table but don't show duplicates.
SELECT DISTINCT title FROM titles;
--- Same as above, but sorted (case-sensitive) by the title values.
+-- Same as above, but sorted (case-sensitive) by the title values.
SELECT DISTINCT title FROM titles ORDER BY title;
-- Show the number of rows in the departments table.
SELECT COUNT(*) FROM departments;
-- Show the number of rows in the departments table that
--- have 'en' as a substring of the dept_name value.
+-- have 'en' as a substring of the dept_name value.
SELECT COUNT(*) FROM departments WHERE dept_name LIKE '%en%';
--- A JOIN of information from multiple tables: the titles table shows
--- who had what job titles, by their employee numbers, from what
+-- A JOIN of information from multiple tables: the titles table shows
+-- who had what job titles, by their employee numbers, from what
-- date to what date. Retrieve this information, but instead of the
--- employee number, use the employee number as a cross-reference to
+-- employee number, use the employee number as a cross-reference to
-- the employees table to get each employee's first and last name
-- instead. (And only get 10 rows.)
@@ -85,12 +85,12 @@ WHERE TABLE_TYPE='BASE TABLE';
-- for how you specify the columns, such as their datatypes.
CREATE TABLE tablename1 (fname VARCHAR(20), lname VARCHAR(20));
--- Insert a row of data into the table tablename1. This assumes that the
--- table has been defined to accept these values as appropriate for it.
+-- Insert a row of data into the table tablename1. This assumes that the
+-- table has been defined to accept these values as appropriate for it.
INSERT INTO tablename1 VALUES('Richard','Mutt');
-- In tablename1, change the fname value to 'John'
--- for all rows that have an lname value of 'Mutt'.
+-- for all rows that have an lname value of 'Mutt'.
UPDATE tablename1 SET fname='John' WHERE lname='Mutt';
-- Delete rows from the tablename1 table
@@ -100,6 +100,11 @@ DELETE FROM tablename1 WHERE lname like 'M%';
-- Delete all rows from the tablename1 table, leaving the empty table.
DELETE FROM tablename1;
--- Remove the entire tablename1 table.
+-- Remove the entire tablename1 table.
DROP TABLE tablename1;
```
+
+## Further Reading
+
+* [Codecademy - SQL](https://www.codecademy.com/learn/learn-sql) A good introduction to SQL in a "learn by doing it" format.
+* [Database System Concepts](https://www.db-book.com) book's Chapter 3 - Introduction to SQL has an in depth explanation of SQL concepts.
diff --git a/ta_in/css-ta.html.markdown b/ta_in/css-ta.html.markdown
index cbe88f1e..4ea7f959 100644
--- a/ta_in/css-ta.html.markdown
+++ b/ta_in/css-ta.html.markdown
@@ -233,6 +233,48 @@ css முன்னுரிமை பின்வருமாறு
* `B` இது அடுத்தது.
* `D` இதுவே கடைசி .
+## Media Queries [மீடியா குரிஸ்]
+
+CSS மீடியா குரிஸ் CSS 3 அம்சங்கள். பயன்படுத்தும் கணினி, கைபேசி அல்லது சாதனத்தின் பிஸேல் டென்சிட்டிக்கு ஏற்றவாறு மீடியா குரிஸ் விதிகளை பயன்படுத்தலாம்.
+
+```css
+/* அனைத்து டேவிஸ்களுக்கும் பொதுவான விதி */
+h1 {
+ font-size: 2em;
+ color: white;
+ background-color: black;
+}
+
+/* பிரிண்ட் செய்யும்போது h1 கலர் மாற்ற */
+@media print {
+ h1 {
+ color: black;
+ background-color: white;
+ }
+}
+
+/* 480 பிஸேல்ளுக்கு மேல் சிகிரீன் அளவு உள்ள சாதனத்தில் எழுத்து அளவு மிகை படுத்த */
+@media screen and (min-width: 480px) {
+ h1 {
+ font-size: 3em;
+ font-weight: normal;
+ }
+}
+```
+
+மீடியா குரிஸ் வழங்கும் அம்சங்கள் :
+`width`, `height`, `device-width`, `device-height`, `orientation`, `aspect-ratio`, `device-aspect-ratio`, `color`, `color-index`, `monochrome`, `resolution`, `scan`, `grid`. இவையுள் பெரும்பான்மை `min-` அல்லது `max-` வுடன் பயன்படுத்தலாம் .
+
+`resolution` பழைய சாதனங்களில் பயன்படாது, எனவே `device-pixel-ratio` பயன்படுத்தவும்.
+
+பல கைபேசி மற்றும் கணினிகள், வீடு கணினி திரை அளவு காட்ட முற்படும். எனவே `viewport` மெட்டா டேக் பயன்படுத்தவும்.
+
+```html
+<head>
+ <meta name="viewport" content="width=device-width; initial-scale=1.0">
+</head>
+```
+
## css அம்சங்களின் பொருந்தகூடிய தன்மை
பெரும்பாலான css 2 வின் அம்சங்கள் எல்லா உலாவிகளிலும் , கருவிகளிலும் உள்ளன. ஆனால் முன்கூட்டியே அந்த அம்சங்களை பரிசோதிப்பது நல்லது.
diff --git a/ta_in/xml-ta.html.markdown b/ta_in/xml-ta.html.markdown
index d782399d..13aa9255 100644
--- a/ta_in/xml-ta.html.markdown
+++ b/ta_in/xml-ta.html.markdown
@@ -5,6 +5,7 @@ contributors:
- ["João Farias", "https://github.com/JoaoGFarias"]
translators:
- ["Rasendran Kirushan", "https://github.com/kirushanr"]
+ - ["Sridhar Easwaran", "https://github.com/sridhareaswaran"]
lang: in-ta
---
@@ -14,6 +15,57 @@ XML ஆனது ஒரு கட்டமைப்பு மொழி ஆகு
HTML போல் அன்றி , XML ஆனது தகவலை மட்டும் கொண்டு செல்ல்கிறது
+
+## சில வரையறை மற்றும் முன்னுரை
+
+பல கூறுகளால் அமைக்கப்பட்டது. ஒவொரு கூறுகளிலும் அட்ட்ரிபூட்க்கள் இருக்கும், அவை அந்தந்த கூறுகளை வரையறுக்க பயன்படும். மேலும் அந்த கூறுகளை தகவல் அல்லது கிளை கூறுகள் இருக்கலாம். அணைத்து கோப்புகளிலும் ரூட்/ஆரம்ப கூறு இருக்கும், அது தனக்குள் கிளை கூறுகளை கொண்டுருக்கும்.
+
+XML பாகுபடுத்தி மிகவும் கண்டிப்பான வீதிகளைக்கொண்டது. [XML தொடரியல் விதிகளை அறிய] (http://www.w3schools.com/xml/xml_syntax.asp).
+
+
+```xml
+<!-- இது ஒரு XML குறிப்ப -->
+<!-- குறிப்புக்கள்
+பலவரி இருக்கலாம் -->
+
+<!-- கூறுகள்/Elements -->
+<!-- Element எனப்படுவது அடிப்படை கூறு. அவை இருவகைப்பாடு. காலியான கூறு: -->
+<element1 attribute="value" /> <!-- காலியான கூறு - உள்ளடக்கம் இல்லாதது -->
+<!-- மற்றும் காலி-இல்லாத கூறு : -->
+<element2 attribute="value">Content</element2>
+<!-- கூற்றின் பெயர் எழுத்துக்கள் மற்றும் எண் கொண்டு மட்டுமே இருக்கவேண்டும்.. -->
+
+<empty /> <!-- காலியான கூறு - உள்ளடக்கம் இல்லாதது -->
+
+<notempty> <!-- காலி-இல்லாத கூற - துவக்கம் -->
+ <!-- உள்ளடக்கம் -->
+</notempty> <!-- முடிவு -->
+
+<!-- கூற்றின் பெயர்கள் எழுத்து வடிவுணர்வு கொண்டது-->
+<element />
+<!-- ஓட்றது அல்ல -->
+<eLEMENT />
+
+<!-- Attributes/பண்புகளை -->
+<!-- Attribute ஒரு மதிப்பு இணை -->
+<element attribute="value" another="anotherValue" many="space-separated list" />
+<!-- ஒரு கூற்றில் Attribute ஒருமுறைதான் தோன்றும். அது ஒரேயொரு பணப்பை கொண்டிருக்கும் -->
+
+<!-- கீழை கூறுகள் -->
+<!-- ஒரு கூரானது பல கீழை கூறுகளை கொண்டிருக்கலாம் : -->
+<parent>
+ <child>Text</child>
+ <emptysibling />
+</parent>
+
+<!-- XML இடைவெளி கான்கெடுக்கப்படும். -->
+<child>
+ Text
+</child>
+<!-- ஓட்றது அல்ல -->
+<child>Text</child>
+```
+
* XML வாக்கிய அமைப்பு
diff --git a/tr-tr/c-tr.html.markdown b/tr-tr/c-tr.html.markdown
index 6042a609..4ef12527 100644
--- a/tr-tr/c-tr.html.markdown
+++ b/tr-tr/c-tr.html.markdown
@@ -477,7 +477,7 @@ typedef void (*my_fnp_type)(char *);
[K&R, aka "The C Programming Language"](https://en.wikipedia.org/wiki/The_C_Programming_Language)'in bir kopyasını bulundurmak mükemmel olabilir
-Diğer bir iyi kaynak ise [Learn C the hard way](http://c.learncodethehardway.org/book/)
+Diğer bir iyi kaynak ise [Learn C the hard way](http://learncodethehardway.org/c/)
It's very important to use proper spacing, indentation and to be consistent with your coding style in general.
Readable code is better than clever code and fast code. For a good, sane coding style to adopt, see the
diff --git a/typescript.html.markdown b/typescript.html.markdown
index 00f0cbc5..7e857cc0 100644
--- a/typescript.html.markdown
+++ b/typescript.html.markdown
@@ -257,8 +257,24 @@ for (const i in list) {
console.log(i); // 0, 1, 2
}
+// Type Assertion
+let foo = {} // Creating foo as an empty object
+foo.bar = 123 // Error: property 'bar' does not exist on `{}`
+foo.baz = 'hello world' // Error: property 'baz' does not exist on `{}`
+// Because the inferred type of foo is `{}` (an object with 0 properties), you
+// are not allowed to add bar and baz to it. However with type assertion,
+// the following will pass:
+
+interface Foo {
+ bar: number;
+ baz: string;
+}
+
+let foo = {} as Foo; // Type assertion here
+foo.bar = 123;
+foo.baz = 'hello world'
```
diff --git a/zh-cn/c-cn.html.markdown b/zh-cn/c-cn.html.markdown
index 8566e811..8eecc56e 100644
--- a/zh-cn/c-cn.html.markdown
+++ b/zh-cn/c-cn.html.markdown
@@ -612,7 +612,7 @@ typedef void (*my_fnp_type)(char *);
最好找一本 [K&R, aka "The C Programming Language", “C程序设计语言”](https://en.wikipedia.org/wiki/The_C_Programming_Language)。它是关于C最重要的一本书,由C的创作者撰写。不过需要留意的是它比较古老了,因此有些不准确的地方。
-另一个比较好的资源是 [Learn C the hard way](http://c.learncodethehardway.org/book/)
+另一个比较好的资源是 [Learn C the hard way](http://learncodethehardway.org/c/)
如果你有问题,请阅读[compl.lang.c Frequently Asked Questions](http://c-faq.com/)。