From 32301ff3daedd3f65e36b675dc812acc226af9c4 Mon Sep 17 00:00:00 2001 From: Hannes Leutloff Date: Mon, 30 Jul 2018 09:01:18 +0200 Subject: [PATCH 01/72] Update composer.md `update --lock` is useful e.g. after resolving merge conflicts when the packages should stay at their current versions but the lock file hash is invalid and must be updated. --- composer.md | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.md b/composer.md index d07c1d5c6..a0f9c2e4d 100644 --- a/composer.md +++ b/composer.md @@ -30,6 +30,7 @@ All composer commands, depending on your install, may need to use `php composer. | --- | --- | | `composer update laravel` | Update a certain package | | `composer update vendor/*`| Update all packages in a folder | +| `composer update --lock` | Update lock file hash without updating any packages | From 8e092aaaee61f23bca5e92ba18ba2b6ee61f7b47 Mon Sep 17 00:00:00 2001 From: Paul Rosset Date: Tue, 7 Aug 2018 17:47:31 +0100 Subject: [PATCH 02/72] gh-pages-flowControl-forLoops Add the description for the For Loops and For-Range loops. --- go.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/go.md b/go.md index 54eb42b5c..89010fc3d 100644 --- a/go.md +++ b/go.md @@ -198,6 +198,27 @@ switch day { See: [Switch](https://github.com/golang/go/wiki/Switch) +### For loop + +```go + for count := 0; count <= 10; count++ { + fmt.Println("My counter is at", count) + } +``` + +See: [For loops](https://tour.golang.org/flowcontrol/1) + +### For-Range loop + +```go + entry := []string{"Jack","John","Jones"} + for i, val := range entry { + fmt.Printf("At position %d, the character %s is present\n", i, val) + } +``` + +See: [For-Range loops](https://gobyexample.com/range) + ## Functions {: .-three-column} From d5a6d6fb04dcb56621b288fc9ed38c99c9de8f23 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Mon, 20 Aug 2018 09:03:18 +0800 Subject: [PATCH 03/72] polyfill.io: Fix conditional loading snippet --- polyfill.io.md | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/polyfill.io.md b/polyfill.io.md index 41081ee6e..685bc3e47 100644 --- a/polyfill.io.md +++ b/polyfill.io.md @@ -14,26 +14,22 @@ intro: | ```html ``` + {: .-wrap} This is the default script for Polyfill.io. ### References -- [API example](https://polyfill.io/v2/docs/api) _(polyfill.io)_ -- [List of features](https://polyfill.io/v2/docs/features) _(polyfill.io)_ +* [API example](https://polyfill.io/v2/docs/api) _(polyfill.io)_ +* [List of features](https://polyfill.io/v2/docs/features) _(polyfill.io)_ ## Optimized ### For modern browsers ```html - + ``` This only includes polyfill.io when necessary, skipping it for modern browsers for faster load times. @@ -41,13 +37,7 @@ This only includes polyfill.io when necessary, skipping it for modern browsers f ### Extra features ```html - + ``` -{: data-line="2,4"} This is the same as the previous, but also adds a polyfill for `window.fetch()`. We add a `window.fetch` check and loads the additional `fetch` feature. From d6ae9a96371ef34065b559963aaa98636d5b6604 Mon Sep 17 00:00:00 2001 From: Anny Date: Sat, 25 Aug 2018 11:21:25 -0700 Subject: [PATCH 04/72] Update mismatched end tag for code example in section 'Loops' --- jekyll.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jekyll.md b/jekyll.md index e400bafc3..55355e5ab 100644 --- a/jekyll.md +++ b/jekyll.md @@ -139,7 +139,7 @@ Markup {% for post in site.posts %}

{{ post.title }}

-

{{ post.date | date_to_string }} +

{{ post.date | date_to_string }}

{% endfor %} ``` From b24a1c3be301d7b42fadcafc4a904c1caa36ccbb Mon Sep 17 00:00:00 2001 From: Andreas Mallek Date: Mon, 27 Aug 2018 23:32:46 +0200 Subject: [PATCH 05/72] Typo fixed --- go.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.md b/go.md index 89010fc3d..6739d3435 100644 --- a/go.md +++ b/go.md @@ -506,7 +506,7 @@ See: [Methods](https://tour.golang.org/methods/1) ```go func (v *Vertex) Scale(f float64) { v.X = v.X * f - v.y = v.Y * f + v.Y = v.Y * f } ``` {: data-line="1"} From da30696346c9f83433bd11a698b26cdda1904294 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Sat, 15 Sep 2018 15:06:15 +0800 Subject: [PATCH 06/72] moment: link to You Don't Need Moment --- moment.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/moment.md b/moment.md index c9893c257..7a11412b5 100644 --- a/moment.md +++ b/moment.md @@ -9,19 +9,20 @@ tags: [Featurable] ### Parsing ```js -m = moment("2013-03-01", "YYYY-MM-DD") +m = moment('2013-03-01', 'YYYY-MM-DD') ``` This parses the given date using the given format. Returns a moment object. + ### Formatting ```js m .format() .format('dddd') - .format("MMM Do YY") // → "Sep 2nd 07" - .fromNow() // → "31 minutes ago" - .calendar() // → "Last Friday at 9:32PM" + .format('MMM Do YY') // → "Sep 2nd 07" + .fromNow() // → "31 minutes ago" + .calendar() // → "Last Friday at 9:32PM" ``` ### Add @@ -56,6 +57,12 @@ See [datetime](./datetime) for more. ## References - * [Datetime cheatsheet](./datetime) _(devhints.io)_ - * [Moment website](http://momentjs.com/) _(momentjs.com)_ - * [Moment docs](http://momentjs.com/docs/) _(momentjs.com)_ +### Alternatives + +* [You don't need Moment.js](https://github.com/you-dont-need/You-Dont-Need-Momentjs) _(github.com)_ + +### Also see + +* [Datetime cheatsheet](./datetime) _(devhints.io)_ +* [Moment website](http://momentjs.com/) _(momentjs.com)_ +* [Moment docs](http://momentjs.com/docs/) _(momentjs.com)_ From 12feb8202a6482acea3787f8db435750d43c0035 Mon Sep 17 00:00:00 2001 From: Sherly Chan Date: Thu, 8 Nov 2018 09:11:37 +1300 Subject: [PATCH 07/72] correcting enzyme props to prop (#513) --- enzyme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/enzyme.md b/enzyme.md index 2263572ec..b0cf7d207 100644 --- a/enzyme.md +++ b/enzyme.md @@ -2,7 +2,7 @@ title: Enzyme category: React layout: 2017/sheet -updated: 2017-10-12 +updated: 2018-04-27 tags: [Featured] weight: -1 keywords: @@ -248,7 +248,7 @@ wrap.context() // get full context ```js wrap.state('key') // → any -wrap.props('key') // → any +wrap.prop('key') // → any wrap.context('key') // → any ``` From 77d78b29f6c0965fcc5c6ad376fc7c5510e27792 Mon Sep 17 00:00:00 2001 From: Audrey Chavarria Date: Wed, 7 Nov 2018 12:26:57 -0800 Subject: [PATCH 08/72] Update CSS.md Animation section (#625) Updated the order in which properties appear in the Properties table to match the order in which they should be listed in the Shorthand form. Also added 2 missing properties ( animation-fill-mode & animation-play-state ) and an example for them. See link for more info: https://www.w3schools.com/cssref/css3_pr_animation.asp. --- css.md | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/css.md b/css.md index ed3c19880..dfb7ef468 100644 --- a/css.md +++ b/css.md @@ -170,23 +170,25 @@ background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), ### Properties -| Property | Value | -| ---------------------------- | -------------------------------------------------- | -| `animation:` | _(shorthand)_ | -| `animation-name:` | `` | -| `animation-delay:` | `