summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--css.html.markdown14
-rw-r--r--d.html.markdown19
-rw-r--r--fr-fr/haml-fr.html.markdown1
-rw-r--r--git.html.markdown28
-rw-r--r--json.html.markdown2
-rw-r--r--python3.html.markdown3
6 files changed, 59 insertions, 8 deletions
diff --git a/css.html.markdown b/css.html.markdown
index e3ca94d9..d8f30ca3 100644
--- a/css.html.markdown
+++ b/css.html.markdown
@@ -106,6 +106,20 @@ selected:link { }
/* or an element in focus */
selected:focus { }
+/* any element that is the first child of its parent */
+selector:first-child {}
+
+/* any element that is the last child of its parent */
+selector:last-child {}
+
+/* Just like pseudo classes, pseudo elements allow you to style certain parts of a document */
+
+/* matches a virtual first child of the selected element */
+selector::before {}
+
+/* matches a virtual last child of the selected element */
+selector::after {}
+
/* At appropriate places, an asterisk may be used as a wildcard to select every
element */
* { } /* all elements */
diff --git a/d.html.markdown b/d.html.markdown
index ba24b60f..88a83e41 100644
--- a/d.html.markdown
+++ b/d.html.markdown
@@ -23,8 +23,10 @@ about [D](http://dlang.org/). The D programming language is a modern, general-pu
multi-paradigm language with support for everything from low-level features to
expressive high-level abstractions.
-D is actively developed by Walter Bright and Andrei Alexandrescu, two super smart, really cool
-dudes. With all that out of the way, let's look at some examples!
+D is actively developed by a large group of super-smart people and is spearheaded by
+[Walter Bright](https://en.wikipedia.org/wiki/Walter_Bright) and
+[Andrei Alexandrescu](https://en.wikipedia.org/wiki/Andrei_Alexandrescu).
+With all that out of the way, let's look at some examples!
```c
import std.stdio;
@@ -36,9 +38,10 @@ void main() {
writeln(i);
}
- auto n = 1; // use auto for type inferred variables
+ // 'auto' can be used for inferring types.
+ auto n = 1;
- // Numeric literals can use _ as a digit seperator for clarity
+ // Numeric literals can use '_' as a digit separator for clarity.
while(n < 10_000) {
n += n;
}
@@ -47,13 +50,15 @@ void main() {
n -= (n / 2);
} while(n > 0);
- // For and while are nice, but in D-land we prefer foreach
- // The .. creates a continuous range, excluding the end
+ // For and while are nice, but in D-land we prefer 'foreach' loops.
+ // The '..' creates a continuous range, including the first value
+ // but excluding the last.
foreach(i; 1..1_000_000) {
if(n % 2 == 0)
writeln(i);
}
+ // There's also 'foreach_reverse' when you want to loop backwards.
foreach_reverse(i; 1..int.max) {
if(n % 2 == 1) {
writeln(i);
@@ -78,7 +83,7 @@ struct LinkedList(T) {
class BinTree(T) {
T data = null;
- // If there is only one template parameter, we can omit parens
+ // If there is only one template parameter, we can omit the parentheses
BinTree!T left;
BinTree!T right;
}
diff --git a/fr-fr/haml-fr.html.markdown b/fr-fr/haml-fr.html.markdown
index 0267a380..24be8bf9 100644
--- a/fr-fr/haml-fr.html.markdown
+++ b/fr-fr/haml-fr.html.markdown
@@ -4,6 +4,7 @@ filename: learnhaml.haml
contributors:
- ["Simon Neveu", "https://github.com/sneveu"]
- ["Thibault", "https://github.com/iTech-"]
+lang: fr-fr
---
Haml est un langage de balisage utilisé majoritairement avec Ruby, qui décrit de manière simple et propre le HTML de n'importe quelle page web sans l'utilisation des traditionnelles lignes de code. Le langage est une alternative très populaire au langage de templates Rails (.erb) et permet d'intégrer du code en Ruby dans votre balisage.
diff --git a/git.html.markdown b/git.html.markdown
index 72079f6c..971d53e4 100644
--- a/git.html.markdown
+++ b/git.html.markdown
@@ -5,6 +5,7 @@ contributors:
- ["Jake Prather", "http://github.com/JakeHP"]
- ["Leo Rudberg" , "http://github.com/LOZORD"]
- ["Betsy Lorton" , "http://github.com/schbetsy"]
+ - ["Bruno Volcov", "http://github.com/volcov"]
filename: LearnGit.txt
---
@@ -76,6 +77,11 @@ other repositories, or not!
A branch is essentially a pointer to the last commit you made. As you go on
committing, this pointer will automatically update to point the latest commit.
+### Tag
+
+A tag is a mark on specific point in history. Typically people use this
+functionality to mark release points (v1.0, and so on)
+
### HEAD and head (component of .git dir)
HEAD is a pointer that points to the current branch. A repository only has 1 *active* HEAD.
@@ -206,6 +212,28 @@ $ git branch -m myBranchName myNewBranchName
$ git branch myBranchName --edit-description
```
+### tag
+
+Manage your tags
+
+```bash
+# List tags
+$ git tag
+# Create a annotated tag
+# The -m specifies a tagging message,which is stored with the tag.
+# If you don’t specify a message for an annotated tag,
+# Git launches your editor so you can type it in.
+$ git tag -a v2.0 -m 'my version 2.0'
+# Show info about tag
+# That shows the tagger information, the date the commit was tagged,
+# and the annotation message before showing the commit information.
+$ git show v2.0
+# Push a single tag to remote
+$ git push origin v2.0
+# Push a lot of tags to remote
+$ git push origin --tags
+```
+
### checkout
Updates all files in the working tree to match the version in the index, or specified tree.
diff --git a/json.html.markdown b/json.html.markdown
index b5e36090..060e9c3d 100644
--- a/json.html.markdown
+++ b/json.html.markdown
@@ -58,7 +58,7 @@ Drawbacks of JSON include lack of type definition and some sort of DTD.
"alternative style": {
"comment": "check this out!"
- , "comma position": "doesn't matter - as long as it's before the value, then it's valid"
+ , "comma position": "doesn't matter - as long as it's before the next key, then it's valid"
, "another comment": "how nice"
},
diff --git a/python3.html.markdown b/python3.html.markdown
index 87fa0b70..404f08cf 100644
--- a/python3.html.markdown
+++ b/python3.html.markdown
@@ -715,6 +715,9 @@ print(say(say_please=True)) # Can you buy me a beer? Please! I am poor :(
* [A Crash Course in Python for Scientists](http://nbviewer.ipython.org/5920182)
* [Python Course](http://www.python-course.eu/index.php)
* [First Steps With Python](https://realpython.com/learn/python-first-steps/)
+* [A curated list of awesome Python frameworks, libraries and software](https://github.com/vinta/awesome-python)
+* [30 Python Language Features and Tricks You May Not Know About](http://sahandsaba.com/thirty-python-language-features-and-tricks-you-may-not-know.html)
+* [Official Style Guide for Python](https://www.python.org/dev/peps/pep-0008/)
### Dead Tree