summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--javascript.html.markdown2
-rw-r--r--json.html.markdown2
-rw-r--r--markdown.html.markdown2
-rw-r--r--perl.html.markdown18
-rw-r--r--python3.html.markdown5
-rw-r--r--zh-cn/json-cn.html.markdown2
-rw-r--r--zh-cn/scala-cn.html.markdown2
7 files changed, 21 insertions, 12 deletions
diff --git a/javascript.html.markdown b/javascript.html.markdown
index 76017c17..c59a90c3 100644
--- a/javascript.html.markdown
+++ b/javascript.html.markdown
@@ -7,7 +7,7 @@ filename: javascript.js
---
JavaScript was created by Netscape's Brendan Eich in 1995. It was originally
-intended as a simpler scripting language for websites, complimenting the use of
+intended as a simpler scripting language for websites, complementing the use of
Java for more complex web applications, but its tight integration with Web pages
and built-in support in browsers has caused it to become far more common than
Java in web frontends.
diff --git a/json.html.markdown b/json.html.markdown
index 6d06ffe4..9041eaa2 100644
--- a/json.html.markdown
+++ b/json.html.markdown
@@ -53,6 +53,6 @@ going to be 100% valid JSON. Luckily, it kind of speaks for itself.
, "another comment": "how nice"
},
- "that was short": "And, you're done. You know know everything JSON has to offer."
+ "that was short": "And, you're done. You now know everything JSON has to offer."
}
```
diff --git a/markdown.html.markdown b/markdown.html.markdown
index 606840d3..9a863bac 100644
--- a/markdown.html.markdown
+++ b/markdown.html.markdown
@@ -59,7 +59,7 @@ Github, we also have: -->
<!-- Paragraphs are a one or multiple adjacent lines of text separated by one or
multiple blank lines. -->
-This is a paragraph. I'm tryping in a paragraph isn't this fun?
+This is a paragraph. I'm typing in a paragraph isn't this fun?
Now I'm in paragraph 2.
I'm still in paragraph 2 too!
diff --git a/perl.html.markdown b/perl.html.markdown
index da2e0cdf..aac95939 100644
--- a/perl.html.markdown
+++ b/perl.html.markdown
@@ -28,7 +28,8 @@ Perl 5 runs on over 100 platforms from portables to mainframes and is suitable f
my $animal = "camel";
my $answer = 42;
-# Scalar values can be strings, integers or floating point numbers, and Perl will automatically convert between them as required.
+# Scalar values can be strings, integers or floating point numbers, and
+# Perl will automatically convert between them as required.
## Arrays
# An array represents a list of values:
@@ -49,9 +50,11 @@ my %fruit_color = (
apple => "red",
banana => "yellow",
);
-# Scalars, arrays and hashes are documented more fully in perldata. (perldoc perldata).
+# Scalars, arrays and hashes are documented more fully in perldata.
+# (perldoc perldata).
-# More complex data types can be constructed using references, which allow you to build lists and hashes within lists and hashes.
+# More complex data types can be constructed using references, which allow you
+# to build lists and hashes within lists and hashes.
#### Conditional and looping constructs
@@ -92,7 +95,9 @@ foreach (@array) {
#### Regular expressions
-# Perl's regular expression support is both broad and deep, and is the subject of lengthy documentation in perlrequick, perlretut, and elsewhere. However, in short:
+# Perl's regular expression support is both broad and deep, and is the subject
+# of lengthy documentation in perlrequick, perlretut, and elsewhere.
+# However, in short:
# Simple matching
if (/foo/) { ... } # true if $_ contains "foo"
@@ -112,8 +117,9 @@ open(my $in, "<", "input.txt") or die "Can't open input.txt: $!";
open(my $out, ">", "output.txt") or die "Can't open output.txt: $!";
open(my $log, ">>", "my.log") or die "Can't open my.log: $!";
-# You can read from an open filehandle using the "<>" operator. In scalar context it reads a single line from
-# the filehandle, and in list context it reads the whole file in, assigning each line to an element of the list:
+# You can read from an open filehandle using the "<>" operator. In scalar
+# context it reads a single line from the filehandle, and in list context it
+# reads the whole file in, assigning each line to an element of the list:
my $line = <$in>;
my @lines = <$in>;
diff --git a/python3.html.markdown b/python3.html.markdown
index 77811535..778076f8 100644
--- a/python3.html.markdown
+++ b/python3.html.markdown
@@ -238,7 +238,10 @@ empty_set = set()
# Initialize a set with a bunch of values. Yeah, it looks a bit like a dict. Sorry.
some_set = {1, 1, 2, 2, 3, 4} # some_set is now {1, 2, 3, 4}
-# Add more items to a set
+#Can set new variables to a set
+filled_set = some_set
+
+# Add one more item to the set
filled_set.add(5) # filled_set is now {1, 2, 3, 4, 5}
# Do set intersection with &
diff --git a/zh-cn/json-cn.html.markdown b/zh-cn/json-cn.html.markdown
index 75966595..3a8db2cf 100644
--- a/zh-cn/json-cn.html.markdown
+++ b/zh-cn/json-cn.html.markdown
@@ -46,6 +46,6 @@ lang: zh-cn
]
],
- "that was short": "And, you're done. You know know everything JSON has to offer."
+ "that was short": "And, you're done. You now know everything JSON has to offer."
}
```
diff --git a/zh-cn/scala-cn.html.markdown b/zh-cn/scala-cn.html.markdown
index 24f73bb5..28af8ddc 100644
--- a/zh-cn/scala-cn.html.markdown
+++ b/zh-cn/scala-cn.html.markdown
@@ -369,7 +369,7 @@ import scala.collection.immutable._
import scala.collection.immutable.{List, Map}
// 使用 '=>' 来重命名一个 import
-import scala.collection.immutable{ List => ImmutableList }
+import scala.collection.immutable.{ List => ImmutableList }
// import 除了一些类的其它所有的类。下面的例子除去了 Map 类和 Set 类:
import scala.collection.immutable.{Map => _, Set => _, _}