summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ansible.html.markdown24
-rw-r--r--clojure-macros.html.markdown9
-rw-r--r--de-de/dynamic-programming-de.html.markdown6
-rw-r--r--dynamic-programming.html.markdown6
-rw-r--r--es-es/pyqt-es.html.markdown82
-rw-r--r--fr-fr/dynamic-programming-fr.html.markdown6
-rw-r--r--kotlin.html.markdown4
-rw-r--r--mercurial.html.markdown36
-rw-r--r--ms-my/clojure-macros-my.html.markdown9
-rw-r--r--nl-nl/dynamic-programming-nl.html.markdown6
-rw-r--r--pt-br/csharp-pt.html.markdown36
-rw-r--r--pt-br/dynamic-programming-pt.html.markdown6
-rw-r--r--pt-br/paren-pt.html.markdown8
-rw-r--r--pt-br/python3-pt.html.markdown6
-rw-r--r--pt-br/ruby-pt.html.markdown2
-rw-r--r--pt-br/typescript-pt.html.markdown7
-rw-r--r--pt-br/whip-pt.html.markdown10
-rw-r--r--pt-br/xml-pt.html.markdown3
-rw-r--r--pt-br/yaml-pt.html.markdown4
-rw-r--r--sql.html.markdown105
-rw-r--r--typescript.html.markdown21
-rw-r--r--zh-cn/clojure-macro-cn.html.markdown10
22 files changed, 291 insertions, 115 deletions
diff --git a/ansible.html.markdown b/ansible.html.markdown
index a319a89d..cb365e0f 100644
--- a/ansible.html.markdown
+++ b/ansible.html.markdown
@@ -6,7 +6,7 @@ contributors:
filename: LearnAnsible.txt
---
-```yml
+```yaml
---
"{{ Ansible }}" is an orchestration tool written in Python.
@@ -14,7 +14,7 @@ filename: LearnAnsible.txt
## Example
An example playbook to install apache and configure log level
-```yml
+```yaml
---
- hosts: apache
@@ -163,7 +163,7 @@ This example-playbook would execute (on all hosts defined in the inventory) two
* `ping` that would return message *pong*
* `shell` that execute three commands and return the output to our terminal
-```yml
+```yaml
- hosts: all
tasks:
@@ -213,7 +213,7 @@ It is a great way to introduce `object oriented` management for your application
Role can be included in your playbook (executed via your playbook).
-```yml
+```yaml
- hosts: all
tasks:
@@ -427,7 +427,7 @@ You can use the jinja in the CLI too
ansible -m shell -a 'echo {{ my_variable }}` -e 'my_variable=something, playbook_parameter=twentytwo" localhost
```
In fact - jinja is used to template parts of the playbooks too
-```yml
+```yaml
#check part of this playbook: playbooks/roles/sys_debug/tasks/debug_time.yml
- local_action: shell date +'%F %T'
register: ts
@@ -638,18 +638,19 @@ But ansible is way more! It provides an execution plans, an API, library, callba
It is an agent-less tool - every agent consumes up to 16MB ram - in some environments, it may be noticable amount.
It is agent-less - you have to verify your environment consistency 'on-demand' - there is no built-in mechanism that would warn you about some change automatically (this can be achieved with reasonable effort)
-Official GUI Tool (web inferface) - Ansible Tower - is great, but it is expensive. There is no 'small enterprice' payment plan. Easy workaround with Rundeck or Jenkins is possible with reasonable workload.
+Official GUI Tool (web inferface) - Ansible Tower - is great, but it is expensive. There is no 'small enterprice' payment plan, however Ansible AWX is the free open source version we were all waiting for.
#### Pros
-It is an agent-less tools In most scenarios, it use ssh as a transport layer.
+It is an agent-less tools In most scenarios, it use ssh as a transport layer.
In some way you can use it as 'bash on steroids'.
It is very-very-very easy to start. If you are familiar with ssh concept - you already know Ansible (ALMOST). My personal record is: 'I did show "how to install and use ansible" (for simple raspberry pi cluster management) - it took me 30 seconds to deliver a complete working example !!!)'
I do provide a training services - I'm able to teach a production-ready person - in 8 hours (1 training day)! It covers all needed to work aspects! No other tool can match this ease of use!
It executes 'as is' - other tools (salt, puppet, chef - might execute in different scenario than you would expect)
Documentation is at the world-class standard!
The comunity (github, stackOverflow) would help you very fast.
-Writing own modules and extension is fairly easy.
+Writing own modules and extension is fairly easy.
+Ansible AWX is the open source version of Ansible Tower we have been waiting for, which provides an excellent UI.
#### Neutral
Migration Ansible<->Salt is failrly easy - so if you would need an event-driven agent environment - it would be a good choice to start quick with Ansible, and convert to salt when needed.
@@ -657,7 +658,12 @@ Migration Ansible<->Salt is failrly easy - so if you would need an event-driven
#### Some concepts
Ansible uses ssh or paramiko as a transport layer. In a way you can imagine that you are using a ssh with API to perform your action.
-The simplest way is to execute remote command in more controlled way (still using ssh).
+The simplest way is to execute remote command in more controlled way (still using ssh).
On the other hand - in advanced scope - you can wrap Ansible (use python Ansible code as a library) with your own Python scrips! This is awesome! It would act a bit like Fabric then.
+## Additional Resources
+* [Servers For Hackers: An Ansible Tutorial](https://serversforhackers.com/c/an-ansible-tutorial)
+* [A system administrator's guide to getting started with Ansible - FAST!](https://www.redhat.com/en/blog/system-administrators-guide-getting-started-ansible-fast)
+* [Ansible Tower](https://www.ansible.com/products/tower) - Ansible Tower provides a web UI, dashboard and rest interface to ansible.
+* [Ansible AWX](https://github.com/ansible/awx) - The Open Sourc version of Ansible Tower. \ No newline at end of file
diff --git a/clojure-macros.html.markdown b/clojure-macros.html.markdown
index 3864f676..6154d570 100644
--- a/clojure-macros.html.markdown
+++ b/clojure-macros.html.markdown
@@ -142,11 +142,8 @@ You'll want to be familiar with Clojure. Make sure you understand everything in
### Further Reading
-Writing Macros from [Clojure for the Brave and True](http://www.braveclojure.com/)
-[http://www.braveclojure.com/writing-macros/](http://www.braveclojure.com/writing-macros/)
+[Writing Macros](http://www.braveclojure.com/writing-macros/)
-Official docs
-[http://clojure.org/macros](http://clojure.org/macros)
+[Official docs](http://clojure.org/macros)
-When to use macros?
-[http://dunsmor.com/lisp/onlisp/onlisp_12.html](http://dunsmor.com/lisp/onlisp/onlisp_12.html)
+[When to use macros?](https://lispcast.com/when-to-use-a-macro/)
diff --git a/de-de/dynamic-programming-de.html.markdown b/de-de/dynamic-programming-de.html.markdown
index afa9a17c..58568b3b 100644
--- a/de-de/dynamic-programming-de.html.markdown
+++ b/de-de/dynamic-programming-de.html.markdown
@@ -68,9 +68,9 @@ for i=0 to n-1
### Einige bekannte DP Probleme
-- Floyd Warshall Algorithm - Tutorial and C Program source code: [http://www.thelearningpoint.net/computer-science/algorithms-all-to-all-shortest-paths-in-graphs---floyd-warshall-algorithm-with-c-program-source-code]()
-- Integer Knapsack Problem - Tutorial and C Program source code: [http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---the-integer-knapsack-problem]()
-- Longest Common Subsequence - Tutorial and C Program source code : [http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---longest-common-subsequence]()
+- [Floyd Warshall Algorithm - Tutorial and C Program source code](http://www.thelearningpoint.net/computer-science/algorithms-all-to-all-shortest-paths-in-graphs---floyd-warshall-algorithm-with-c-program-source-code)
+- [Integer Knapsack Problem - Tutorial and C Program source code](http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---the-integer-knapsack-problem)
+- [Longest Common Subsequence - Tutorial and C Program source code](http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---longest-common-subsequence)
## Online Ressourcen
diff --git a/dynamic-programming.html.markdown b/dynamic-programming.html.markdown
index aed169fc..f5f1743c 100644
--- a/dynamic-programming.html.markdown
+++ b/dynamic-programming.html.markdown
@@ -42,9 +42,9 @@ for i=0 to n-1
### Some Famous DP Problems
-- Floyd Warshall Algorithm - Tutorial and C Program source code: [http://www.thelearningpoint.net/computer-science/algorithms-all-to-all-shortest-paths-in-graphs---floyd-warshall-algorithm-with-c-program-source-code]()
-- Integer Knapsack Problem - Tutorial and C Program source code: [http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---the-integer-knapsack-problem]()
-- Longest Common Subsequence - Tutorial and C Program source code : [http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---longest-common-subsequence]()
+- [Floyd Warshall Algorithm - Tutorial and C Program source code](http://www.thelearningpoint.net/computer-science/algorithms-all-to-all-shortest-paths-in-graphs---floyd-warshall-algorithm-with-c-program-source-code)
+- [Integer Knapsack Problem - Tutorial and C Program source code](http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---the-integer-knapsack-problem)
+- [Longest Common Subsequence - Tutorial and C Program source code](http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---longest-common-subsequence)
## Online Resources
diff --git a/es-es/pyqt-es.html.markdown b/es-es/pyqt-es.html.markdown
new file mode 100644
index 00000000..6d4fdde7
--- /dev/null
+++ b/es-es/pyqt-es.html.markdown
@@ -0,0 +1,82 @@
+---
+category: tool
+tool: PyQT
+filename: learnpyqt-es.py
+contributors:
+ - ["Nathan Hughes", "https://github.com/sirsharpest"]
+translators:
+ - ["Adrian Rocamora", "https://github.com/adrianrocamora"]
+lang: es-es
+---
+
+**Qt** es un sistema altamente reconocido que permite desarrollar software multiplataforma que puede correr en diferentes entornos de software y hardware con pocos o ningún cambio. Aun así conserva la velocidad y poder de una aplicación nativa. **Qt** fue originalmente escrito en *C++*.
+
+Esta es una adaptación de la introducción a QT con C++ por [Aleksey Kholovchuk](https://github.com/vortexxx192), parte del código ejemplo debería resultar en la misma funcionalidad ¡pero usando python con PyQT!
+
+```python
+import sys
+from PyQt4 import QtGui
+
+def window():
+ # Crear el objeto de la aplicación
+ app = QtGui.QApplication(sys.argv)
+ # Crear un widget en el que colocaremos nuestra etiqueta
+ w = QtGui.QWidget()
+ # Agregamos nuestra etiqueta al widget
+ b = QtGui.QLabel(w)
+ # Agregamos texto a nuestra etiqueta
+ b.setText("Hello World!")
+ # Fijemos información de posición y tamaño del widget
+ w.setGeometry(100, 100, 200, 50)
+ b.move(50, 20)
+ # Proporcionemos un título a nuestra ventana
+ w.setWindowTitle("PyQt")
+ # Mostremos todo
+ w.show()
+ # Ejecutemos lo que hayamos solicitado ya inicializado el resto
+ sys.exit(app.exec_())
+
+if __name__ == '__main__':
+ window()
+
+```
+
+Para poder hacer uso de las funciones más avanzades en **pyqt** necesitamos agregar elementos adicionales.
+Aquí mostramos cómo introducir una caja de diálogo popup, útil para permitir al usuario confirmar su decisión o para brindarnos información.
+
+```Python
+import sys
+from PyQt4.QtGui import *
+from PyQt4.QtCore import *
+
+
+def window():
+ app = QApplication(sys.argv)
+ w = QWidget()
+ # Crear un botón y adjuntarlo al widget w
+ b = QPushButton(w)
+ b.setText("Press me")
+ b.move(50, 50)
+ # Indicar al botón b que llame esta función cuando reciba un click
+ # Nótese la falta de "()" en la llamada de la función
+ b.clicked.connect(showdialog)
+ w.setWindowTitle("PyQt Dialog")
+ w.show()
+ sys.exit(app.exec_())
+
+# Esta función debería crear una ventana de diálogo con un botón
+# que espera a recibir un click y luego sale del programa
+def showdialog():
+ d = QDialog()
+ b1 = QPushButton("ok", d)
+ b1.move(50, 50)
+ d.setWindowTitle("Dialog")
+ # Esta modalidad le indica al popup que bloquee al padre mientras activo
+ d.setWindowModality(Qt.ApplicationModal)
+ # Al recibir un click me gustaría que el proceso termine
+ b1.clicked.connect(sys.exit)
+ d.exec_()
+
+if __name__ == '__main__':
+ window()
+```
diff --git a/fr-fr/dynamic-programming-fr.html.markdown b/fr-fr/dynamic-programming-fr.html.markdown
index 54cca001..ea547dae 100644
--- a/fr-fr/dynamic-programming-fr.html.markdown
+++ b/fr-fr/dynamic-programming-fr.html.markdown
@@ -42,9 +42,9 @@ Le même concept peut être appliqué pour trouver le chemin le plus long dans u
### Problèmes classiques de programmation dynamique
-- L'algorithme de Floyd Warshall(EN) - Tutorial and C Program source code: [http://www.thelearningpoint.net/computer-science/algorithms-all-to-all-shortest-paths-in-graphs---floyd-warshall-algorithm-with-c-program-source-code]()
-- Problème du sac à dos(EN) - Tutorial and C Program source code: [http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---the-integer-knapsack-problem]()
-- Plus longue sous-chaîne commune(EN) - Tutorial and C Program source code : [http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---longest-common-subsequence]()
+- [L'algorithme de Floyd Warshall(EN) - Tutorial and C Program source code](http://www.thelearningpoint.net/computer-science/algorithms-all-to-all-shortest-paths-in-graphs---floyd-warshall-algorithm-with-c-program-source-code)
+- [Problème du sac à dos(EN) - Tutorial and C Program source code](http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---the-integer-knapsack-problem)
+- [Plus longue sous-chaîne commune(EN) - Tutorial and C Program source code](http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---longest-common-subsequence)
## Online Resources
diff --git a/kotlin.html.markdown b/kotlin.html.markdown
index 81242bac..9bc8b420 100644
--- a/kotlin.html.markdown
+++ b/kotlin.html.markdown
@@ -20,7 +20,9 @@ package com.learnxinyminutes.kotlin
/*
The entry point to a Kotlin program is a function named "main".
-The function is passed an array containing any command line arguments.
+The function is passed an array containing any command-line arguments.
+Since Kotlin 1.3 the "main" function can also be defined without
+any parameters.
*/
fun main(args: Array<String>) {
/*
diff --git a/mercurial.html.markdown b/mercurial.html.markdown
index d1cac66c..330beb35 100644
--- a/mercurial.html.markdown
+++ b/mercurial.html.markdown
@@ -1,9 +1,9 @@
---
category: tool
-tool: hg
+tool: Mercurial
contributors:
- ["Will L. Fife", "http://github.com/sarlalian"]
-filename: LearnHG.txt
+filename: LearnMercurial.txt
---
Mercurial is a free, distributed source control management tool. It offers
@@ -18,37 +18,30 @@ anyone working with versioned files.
Version control is a system that keeps track fo changes to a set of file(s)
and/or directorie(s) over time.
-### Why Use Mercurial
+### Why use Mercurial?
* Distributed Architecture - Traditionally version control systems such as CVS
and Subversion are a client server architecture with a central server to
store the revsion history of a project. Mercurial however is a truly
distributed architecture, giving each devloper a full local copy of the
entire development history. It works independently of a central server.
-
* Fast - Traditionally version control systems such as CVS and Subversion are a
client server architecture with a central server to store the revsion history
of a project. Mercurial however is a truly distributed architecture, giving
each devloper a full local copy of the entire development history. It works
independently of a central server.
-
* Platform Independent - Mercurial was written to be highly platform
independent. Much of Mercurial is written in Python, with small performance
critical parts written in portable C. Binary releases are available for all
major platforms.
-
* Extensible - The functionality of Mercurial can be increased with extensions,
either by activating the official ones which are shipped with Mercurial or
-downloading some [from the
-wiki](https://www.mercurial-scm.org/wiki/UsingExtensions) or by [writing your
-own](https://www.mercurial-scm.org/wiki/WritingExtensions). Extensions are
-written in Python and can change the workings of the basic commands, add new
-commands and access all the core functions of Mercurial.
-
+downloading some [from the wiki](https://www.mercurial-scm.org/wiki/UsingExtensions) or by [writing your own](https://www.mercurial-scm.org/wiki/WritingExtensions). Extensions are written in
+Python and can change the workings of the basic commands, add new commands and
+access all the core functions of Mercurial.
* Easy to use - The Mercurial command set is consistent with what subversion
users would expect, so they are likely to feel right at home. Most dangerous
actions are part of extensions that need to be enabled to be used.
-
* Open Source - Mercurial is free software licensed under the terms of the [GNU
General Public License Version 2](http://www.gnu.org/licenses/gpl-2.0.txt) or
any later version.
@@ -76,7 +69,7 @@ any later version.
### init
Create a new repository in the given directory, the settings and stored
-information are in a directory named ".hg"
+information are in a directory named `.hg`.
```bash
$ hg init
@@ -102,7 +95,6 @@ $ hg help init
Show the differences between what is on disk and what is committed to the current
branch or tag.
-
```bash
# Will display the status of files
$ hg status
@@ -113,7 +105,7 @@ $ hg help status
### add
-Will add the specified files to the repository on the next commit
+Will add the specified files to the repository on the next commit.
```bash
# Add a file in the current directory
@@ -128,7 +120,7 @@ $ hg add *.rb
### branch
-Set or show the current branch name
+Set or show the current branch name.
*Branch names are permanent and global. Use 'hg bookmark' to create a
light-weight bookmark instead. See 'hg help glossary' for more information
@@ -146,7 +138,7 @@ marked working directory as branch new_branch
### tag
-Add one or more tags for the current or given revision
+Add one or more tags for the current or given revision.
Tags are used to name particular revisions of the repository and are very
useful to compare different revisions, to go back to significant earlier
@@ -215,7 +207,7 @@ $ hg diff -r 30 -r 20
### grep
-Search revision history for a pattern in specified files
+Search revision history for a pattern in specified files.
```bash
# Search files for a specific phrase
@@ -242,7 +234,7 @@ $ hg log -G
### merge
-Merge another revision into working directory
+Merge another revision into working directory.
```bash
# Merge changesets to local repository
@@ -305,7 +297,7 @@ $ hg push remote2
### rebase
-Move changeset (and descendants) to a different branch
+Move changeset (and descendants) to a different branch.
Rebase uses repeated merging to graft changesets from one part of history
(the source) onto another (the destination). This can be useful for
@@ -356,7 +348,7 @@ $ hg remove go_away.txt
$ hg remove *.txt
```
-## Further Information
+## Further information
* [Learning Mercurial in Workflows](https://www.mercurial-scm.org/guid)
* [Mercurial Quick Start](https://www.mercurial-scm.org/wiki/QuickStart)
diff --git a/ms-my/clojure-macros-my.html.markdown b/ms-my/clojure-macros-my.html.markdown
index 099f376e..325f92e0 100644
--- a/ms-my/clojure-macros-my.html.markdown
+++ b/ms-my/clojure-macros-my.html.markdown
@@ -144,11 +144,8 @@ Biasakan diri dengan Clojure terlebih dahulu. Pastikan anda memahami semuanya di
### Bacaaan Lanjut
-Writing Macros daripada [Clojure for the Brave and True](http://www.braveclojure.com/)
-[http://www.braveclojure.com/writing-macros/](http://www.braveclojure.com/writing-macros/)
+[Writing Macros daripada](http://www.braveclojure.com/writing-macros/)
-Dokumen rasmi
-[http://clojure.org/macros](http://clojure.org/macros)
+[Dokumen rasmi](http://clojure.org/macros)
-Bila perlu guna macro?
-[http://dunsmor.com/lisp/onlisp/onlisp_12.html](http://dunsmor.com/lisp/onlisp/onlisp_12.html)
+[Bila perlu guna macro?](https://lispcast.com/when-to-use-a-macro/)
diff --git a/nl-nl/dynamic-programming-nl.html.markdown b/nl-nl/dynamic-programming-nl.html.markdown
index 5186a3bf..e56a9774 100644
--- a/nl-nl/dynamic-programming-nl.html.markdown
+++ b/nl-nl/dynamic-programming-nl.html.markdown
@@ -46,9 +46,9 @@ for i=0 to n-1
### Enkele beroemde DP problemen
-- Floyd Warshall Algorithm - Tutorial and C Program source code: [http://www.thelearningpoint.net/computer-science/algorithms-all-to-all-shortest-paths-in-graphs---floyd-warshall-algorithm-with-c-program-source-code]()
-- Integer Knapsack Problem - Tutorial and C Program source code: [http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---the-integer-knapsack-problem]()
-- Longest Common Subsequence - Tutorial and C Program source code : [http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---longest-common-subsequence]()
+- [Floyd Warshall Algorithm - Tutorial and C Program source code](http://www.thelearningpoint.net/computer-science/algorithms-all-to-all-shortest-paths-in-graphs---floyd-warshall-algorithm-with-c-program-source-code)
+- [Integer Knapsack Problem - Tutorial and C Program source code](http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---the-integer-knapsack-problem)
+- [Longest Common Subsequence - Tutorial and C Program source code](http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---longest-common-subsequence)
## Online Bronnen
diff --git a/pt-br/csharp-pt.html.markdown b/pt-br/csharp-pt.html.markdown
index be14a1c8..1f4e3bd5 100644
--- a/pt-br/csharp-pt.html.markdown
+++ b/pt-br/csharp-pt.html.markdown
@@ -294,9 +294,9 @@ on a new line! ""Wow!"", the masses cried";
case 3:
monthString = "March";
break;
- // You can assign more than one case to an action
- // But you can't add an action without a break before another case
- // (if you want to do this, you would have to explicitly add a goto case x
+ // Você pode declarar mais de um "case" para uma ação
+ // Mas você não pode adicionar uma ação sem um "break" antes de outro "case"
+ // (se você quiser fazer isso, você tem que explicitamente adicionar um "goto case x")
case 6:
case 7:
case 8:
@@ -336,28 +336,28 @@ on a new line! ""Wow!"", the masses cried";
}
///////////////////////////////////////
- // CLASSES - see definitions at end of file
+ // CLASSES - Veja definições no fim do arquivo
///////////////////////////////////////
public static void Classes()
{
- // See Declaration of objects at end of file
+ // Veja Declaração de objetos no fim do arquivo
- // Use new to instantiate a class
+ // Use new para instanciar uma classe
Bicycle trek = new Bicycle();
- // Call object methods
- trek.SpeedUp(3); // You should always use setter and getter methods
+ // Chame métodos do objeto
+ trek.SpeedUp(3); // Você deve sempre usar métodos setter e getter
trek.Cadence = 100;
- // ToString is a convention to display the value of this Object.
+ // ToString é uma convenção para exibir o valor desse Objeto.
Console.WriteLine("trek info: " + trek.Info());
- // Instantiate a new Penny Farthing
+ // Instancie um novo Penny Farthing
PennyFarthing funbike = new PennyFarthing(1, 10);
Console.WriteLine("funbike info: " + funbike.Info());
Console.Read();
- } // End main method
+ } // Fim do método principal
// CONSOLE ENTRY A console application must have a main method as an entry point
public static void Main(string[] args)
@@ -522,7 +522,7 @@ on a new line! ""Wow!"", the masses cried";
foreach (var key in responses.Keys)
Console.WriteLine("{0}:{1}", key, responses[key]);
- // DYNAMIC OBJECTS (great for working with other languages)
+ // OBJETOS DINÂMICOS (ótimo para trabalhar com outros idiomas)
dynamic student = new ExpandoObject();
student.FirstName = "First Name"; // No need to define class first!
@@ -730,10 +730,10 @@ on a new line! ""Wow!"", the masses cried";
set { _hasTassles = value; }
}
- // You can also define an automatic property in one line
- // this syntax will create a backing field automatically.
- // You can set an access modifier on either the getter or the setter (or both)
- // to restrict its access:
+ // Você também pode definir uma propriedade automática em uma linha
+        // Esta sintaxe criará um campo de apoio automaticamente.
+        // Você pode definir um modificador de acesso no getter ou no setter (ou ambos)
+        // para restringir seu acesso:
public bool IsBroken { get; private set; }
// Properties can be auto-implemented
@@ -854,8 +854,8 @@ on a new line! ""Wow!"", the masses cried";
}
/// <summary>
- /// Used to connect to DB for LinqToSql example.
- /// EntityFramework Code First is awesome (similar to Ruby's ActiveRecord, but bidirectional)
+ /// Exemplo de como conectar-se ao DB via LinqToSql.
+    /// EntityFramework First Code é impressionante (semelhante ao ActiveRecord de Ruby, mas bidirecional)
/// http://msdn.microsoft.com/en-us/data/jj193542.aspx
/// </summary>
public class BikeRepository : DbContext
diff --git a/pt-br/dynamic-programming-pt.html.markdown b/pt-br/dynamic-programming-pt.html.markdown
index 518660a3..93171955 100644
--- a/pt-br/dynamic-programming-pt.html.markdown
+++ b/pt-br/dynamic-programming-pt.html.markdown
@@ -64,9 +64,9 @@ grafo acíclico dirigido.
## Alguns Problemas Famosos de Programação Dinâmica
-- Floyd Warshall Algorithm - Tutorial and C Program source code: [http://www.thelearningpoint.net/computer-science/algorithms-all-to-all-shortest-paths-in-graphs---floyd-warshall-algorithm-with-c-program-source-code]()
-- Integer Knapsack Problem - Tutorial and C Program source code: [http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---the-integer-knapsack-problem]()
-- Longest Common Subsequence - Tutorial and C Program source code : [http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---longest-common-subsequence]()
+- [Floyd Warshall Algorithm - Tutorial and C Program source code](http://www.thelearningpoint.net/computer-science/algorithms-all-to-all-shortest-paths-in-graphs---floyd-warshall-algorithm-with-c-program-source-code)
+- [Integer Knapsack Problem - Tutorial and C Program source code](http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---the-integer-knapsack-problem)
+- [Longest Common Subsequence - Tutorial and C Program source code](http://www.thelearningpoint.net/computer-science/algorithms-dynamic-programming---longest-common-subsequence)
## Recursos Online (EN)
diff --git a/pt-br/paren-pt.html.markdown b/pt-br/paren-pt.html.markdown
index 464a69d2..92414ba3 100644
--- a/pt-br/paren-pt.html.markdown
+++ b/pt-br/paren-pt.html.markdown
@@ -182,8 +182,8 @@ a ; => (3 2)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Macros lhe permitem estender a sintaxe da linguagem.
-;; Os macros no Paren são fáceis.
-;; Na verdade, (defn) é um macro.
+;; As macros no Paren são fáceis.
+;; Na verdade, (defn) é uma macro.
(defmacro setfn (nome ...) (set nome (fn ...)))
(defmacro defn (nome ...) (def nome (fn ...)))
@@ -191,6 +191,6 @@ a ; => (3 2)
(defmacro infix (a op ...) (op a ...))
(infix 1 + 2 (infix 3 * 4)) ; => 15
-;; Macros não são higiênicos, você pode sobrescrever as variáveis já existentes!
-;; Eles são transformações de códigos.
+;; Macros não são higiênicas, você pode sobrescrever as variáveis já existentes!
+;; Elas são transformações de códigos.
```
diff --git a/pt-br/python3-pt.html.markdown b/pt-br/python3-pt.html.markdown
index 9b6bd1b6..ea0617f4 100644
--- a/pt-br/python3-pt.html.markdown
+++ b/pt-br/python3-pt.html.markdown
@@ -105,9 +105,9 @@ False or True # => True
1 < 2 < 3 # => True
2 < 3 < 2 # => False
-# (operador 'is' e operador '==') is verifica se duas referenciam um
-# mesmo objeto, mas == verifica se as variáveis apontam para o
-# mesmo valor.
+# (operador 'is' e operador '==') is verifica se duas variáveis
+# referenciam um mesmo objeto, mas == verifica se as variáveis
+# apontam para o mesmo valor.
a = [1, 2, 3, 4] # Referência a uma nova lista, [1, 2, 3, 4]
b = a # b referencia o que está referenciado por a
b is a # => True, a e b referenciam o mesmo objeto
diff --git a/pt-br/ruby-pt.html.markdown b/pt-br/ruby-pt.html.markdown
index 1078f6c5..7ae28ac2 100644
--- a/pt-br/ruby-pt.html.markdown
+++ b/pt-br/ruby-pt.html.markdown
@@ -71,7 +71,7 @@ false.class #=> FalseClass
2 <= 2 #=> true
2 >= 2 #=> true
-# Strings são objects
+# Strings são objetos
'Eu sou uma string'.class #=> String
"Eu também sou uma string".class #=> String
diff --git a/pt-br/typescript-pt.html.markdown b/pt-br/typescript-pt.html.markdown
index f072b257..077aa2cc 100644
--- a/pt-br/typescript-pt.html.markdown
+++ b/pt-br/typescript-pt.html.markdown
@@ -8,13 +8,6 @@ translators:
lang: pt-br
---
-TypeScript is a language that aims at easing development of large scale applications written in JavaScript.
-TypeScript adds common concepts such as classes, modules, interfaces, generics and (optional) static typing to JavaScript.
-It is a superset of JavaScript: all JavaScript code is valid TypeScript code so it can be added seamlessly to any project. The TypeScript compiler emits JavaScript.
-
-This article will focus only on TypeScript extra syntax, as opposed to [JavaScript] (../javascript/).
-
-
Typescript é uma linguagem que visa facilitar o desenvolvimento de aplicações em grande escala escritos em JavaScript.
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 é o código do texto dactilografado válido para que possa ser adicionados diretamente a qualquer projeto. O compilador emite typescript JavaScript.
diff --git a/pt-br/whip-pt.html.markdown b/pt-br/whip-pt.html.markdown
index 989bae05..7bdeec25 100644
--- a/pt-br/whip-pt.html.markdown
+++ b/pt-br/whip-pt.html.markdown
@@ -15,13 +15,13 @@ Whip é um dialeto de Lisp feito para construir scripts e trabalhar com
conceitos mais simples.
Ele também copia muitas funções e sintaxe de Haskell (uma linguagem não correlata)
-Esse documento foi escrito pelo próprio autor da linguagem. Então é isso.
+Esse documento foi escrito pelo próprio autor da linguagem. Então é isso.
```scheme
; Comentário são como em Lisp. Pontos-e-vírgulas...
; A maioria das declarações de primeiro nível estão dentro de "listas"
-; que nada mais são que coisas entre parêntesis separadas por espaços em branco
+; que nada mais são que coisas entre parênteses separadas por espaços em branco
nao_é_uma_lista
(uma lista)
@@ -64,7 +64,7 @@ false
(not false) ; => true
; Mas a maioria das funções não-haskell tem atalhos
-; o não atalho é um '!'.
+; o atalho para "não" é um '!'.
(! (! true)) ; => true
; Igualdade é `equal` ou `=`.
@@ -114,7 +114,7 @@ undefined ; usada para indicar que um valor não foi informado
(1 2 3) ; => [1, 2, 3] (sintaxe JavaScript)
; Dicionários em Whip são o equivalente a 'object' em JavaScript ou
-; 'dict' em python ou 'hash' em Ruby: eles s]ão uma coleção desordenada
+; 'dict' em python ou 'hash' em Ruby: eles são uma coleção desordenada
de pares chave-valor.
{"key1" "value1" "key2" 2 3 3}
@@ -222,7 +222,7 @@ linguagens imperativas.
(take 1 (1 2 3 4)) ; (1 2)
; Contrário de `take`
(drop 1 (1 2 3 4)) ; (3 4)
-; Menos valor em uma lista
+; Menor valor em uma lista
(min (1 2 3 4)) ; 1
; Maior valor em uma lista
(max (1 2 3 4)) ; 4
diff --git a/pt-br/xml-pt.html.markdown b/pt-br/xml-pt.html.markdown
index f347f8ef..6710b387 100644
--- a/pt-br/xml-pt.html.markdown
+++ b/pt-br/xml-pt.html.markdown
@@ -10,8 +10,7 @@ lang: pt-br
XML é uma linguagem de marcação projetada para armazenar e transportar dados.
-Ao contrário de HTML, XML não especifica como exibir ou formatar os dados,
-basta carregá-lo.
+Ao contrário de HTML, XML não especifica como exibir ou formatar os dados, apenas o transporta.
* Sintaxe XML
diff --git a/pt-br/yaml-pt.html.markdown b/pt-br/yaml-pt.html.markdown
index 341ae675..0b71877e 100644
--- a/pt-br/yaml-pt.html.markdown
+++ b/pt-br/yaml-pt.html.markdown
@@ -11,9 +11,7 @@ lang: pt-br
YAML é uma linguagem de serialização de dados projetado para ser diretamente gravável e
legível por seres humanos.
-É um estrito subconjunto de JSON, com a adição de sintaticamente
-novas linhas e recuo significativos, como Python. Ao contrário de Python, no entanto,
-YAML não permite caracteres de tabulação literais em tudo.
+É um superconjunto de JSON, com a adição de indentação e quebras de linhas sintaticamente significativas, como Python. Ao contrário de Python, entretanto, YAML não permite o caracter literal tab para identação.
```yaml
# Commentários em YAML são como este.
diff --git a/sql.html.markdown b/sql.html.markdown
new file mode 100644
index 00000000..0638a731
--- /dev/null
+++ b/sql.html.markdown
@@ -0,0 +1,105 @@
+---
+language: SQL
+filename: learnsql.sql
+contributors:
+ - ["Bob DuCharme", "http://bobdc.com/"]
+---
+
+Structured Query Language (SQL) is an ISO standard language for creating and working with databases stored in a set of tables. Implementations usually add their own extensions to the language; [Comparison of different SQL implementations](http://troels.arvin.dk/db/rdbms/) is a good reference on product differences.
+
+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.
+
+
+```sql
+# Comments start with a pound sign. 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
+# it easier to distinguish them from database, table, and column names.
+
+# Create and delete a database. Database and table names are case-sensitive.
+CREATE DATABASE someDatabase;
+DROP DATABASE someDatabase;
+
+# List available databases.
+SHOW DATABASES;
+
+# 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.
+SELECT * FROM departments;
+
+# 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.
+SELECT * FROM departments LIMIT 5;
+
+# Retrieve dept_name column values from the departments
+# 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.
+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.
+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.
+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
+# date to what date. Retrieve this information, but instead of the
+# 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.)
+
+SELECT employees.first_name, employees.last_name,
+ titles.title, titles.from_date, titles.to_date
+FROM titles INNER JOIN employees ON
+ employees.emp_no = titles.emp_no LIMIT 10;
+
+# List all the tables in all the databases. Implementations typically provide
+# their own shortcut command to do this with the database currently in use.
+SELECT * FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_TYPE='BASE TABLE';
+
+# Create a table called tablename1, with the two columns shown, for
+# the database currently in use. Lots of other options are available
+# 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 INTO tablename1 VALUES('Richard','Mutt');
+
+# In tablename1, change the fname value to "John"
+# for all rows that have an lname value of "Mutt".
+UPDATE tablename1 SET fname="John" WHERE lname="Mutt";
+
+# Delete rows from the tablename1 table
+# where the lname value begins with "M".
+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.
+DROP TABLE tablename1;
+```
diff --git a/typescript.html.markdown b/typescript.html.markdown
index 9158f123..6feaca45 100644
--- a/typescript.html.markdown
+++ b/typescript.html.markdown
@@ -5,13 +5,19 @@ contributors:
filename: learntypescript.ts
---
-TypeScript is a language that aims at easing development of large scale applications written in JavaScript.
-TypeScript adds common concepts such as classes, modules, interfaces, generics and (optional) static typing to JavaScript.
-It is a superset of JavaScript: all JavaScript code is valid TypeScript code so it can be added seamlessly to any project. The TypeScript compiler emits JavaScript.
+TypeScript is a language that aims at easing development of large scale
+applications written in JavaScript. TypeScript adds common concepts such as
+classes, modules, interfaces, generics and (optional) static typing to
+JavaScript. It is a superset of JavaScript: all JavaScript code is valid
+TypeScript code so it can be added seamlessly to any project. The TypeScript
+compiler emits JavaScript.
-This article will focus only on TypeScript extra syntax, as opposed to [JavaScript](/docs/javascript).
+This article will focus only on TypeScript extra syntax, as opposed to
+[JavaScript](/docs/javascript).
-To test TypeScript's compiler, head to the [Playground] (http://www.typescriptlang.org/Playground) where you will be able to type code, have auto completion and directly see the emitted JavaScript.
+To test TypeScript's compiler, head to the
+[Playground] (http://www.typescriptlang.org/Playground) where you will be able
+to type code, have auto completion and directly see the emitted JavaScript.
```ts
// There are 3 basic types in TypeScript
@@ -19,7 +25,8 @@ let isDone: boolean = false;
let lines: number = 42;
let name: string = "Anders";
-// But you can omit the type annotation if the variables are derived from explicit literals
+// But you can omit the type annotation if the variables are derived
+// from explicit literals
let isDone = false;
let lines = 42;
let name = "Anders";
@@ -114,7 +121,7 @@ class Point {
}
// Classes can be explicitly marked as implementing an interface.
-// Any missing properties will then cause an error at compile-time.
+// Any missing properties will then cause an error at compile-time.
class PointPerson implements Person {
name: string
move() {}
diff --git a/zh-cn/clojure-macro-cn.html.markdown b/zh-cn/clojure-macro-cn.html.markdown
index 9324841e..23b2f203 100644
--- a/zh-cn/clojure-macro-cn.html.markdown
+++ b/zh-cn/clojure-macro-cn.html.markdown
@@ -142,11 +142,9 @@ lang: zh-cn
## 扩展阅读
-[Clojure for the Brave and True](http://www.braveclojure.com/)系列的编写宏
-http://www.braveclojure.com/writing-macros/
+[Clojure for the Brave and True](http://www.braveclojure.com/)
+[系列的编写宏](http://www.braveclojure.com/writing-macros/)
-官方文档
-http://clojure.org/macros
+[官方文档](http://clojure.org/macros)
-何时使用宏?
-http://dunsmor.com/lisp/onlisp/onlisp_12.html
+[何时使用宏?](https://lispcast.com/when-to-use-a-macro/)