diff options
-rw-r--r-- | jquery.html.markdown | 2 | ||||
-rw-r--r-- | json.html.markdown | 5 | ||||
-rw-r--r-- | powershell.html.markdown | 21 | ||||
-rw-r--r-- | yaml.html.markdown | 6 |
4 files changed, 18 insertions, 16 deletions
diff --git a/jquery.html.markdown b/jquery.html.markdown index a1673c10..18077dca 100644 --- a/jquery.html.markdown +++ b/jquery.html.markdown @@ -3,6 +3,7 @@ category: tool tool: jquery contributors: - ["Sawyer Charles", "https://github.com/xssc"] + - ["Devansh Patil", "https://github.com/subtra3t"] filename: jquery.js --- @@ -10,6 +11,7 @@ jQuery is a JavaScript library that helps you "do more, write less". It makes ma Because jQuery is a JavaScript library you should [learn JavaScript first](https://learnxinyminutes.com/docs/javascript/) +**NOTE**: jQuery has fallen out of the limelight in recent years, since you can achieve the same thing with the vanilla DOM (Document Object Model) API. So the only thing it is used for is a couple of handy features, such as the [jQuery date picker](https://api.jqueryui.com/datepicker) (which actually has a standard, unlike the `<input type="date">` HTML element), and the obvious decrease in the code length. ```js diff --git a/json.html.markdown b/json.html.markdown index 3ec7a3af..1ccdb5cf 100644 --- a/json.html.markdown +++ b/json.html.markdown @@ -9,7 +9,7 @@ contributors: - ["Athanasios Emmanouilidis", "https://github.com/athanasiosem"] --- -JSON is an extremely simple data-interchange format. As [json.org](http://json.org) says, it is easy for humans to read and write and for machines to parse and generate. +JSON is an extremely simple data-interchange format. As [json.org](https://json.org) says, it is easy for humans to read and write and for machines to parse and generate. A piece of JSON must represent either: @@ -80,6 +80,5 @@ Supported data types: ## Further Reading -* [JSON.org](http://json.org) All of JSON beautifully explained using flowchart-like graphics. - +* [JSON.org](https://json.org) All of JSON beautifully explained using flowchart-like graphics. * [JSON Tutorial](https://www.youtube.com/watch?v=wI1CWzNtE-M) A concise introduction to JSON. diff --git a/powershell.html.markdown b/powershell.html.markdown index 9087dad8..318bf043 100644 --- a/powershell.html.markdown +++ b/powershell.html.markdown @@ -620,26 +620,27 @@ $area $targetArray = 'a','b','c','d','e','f','g','h','i','j','k','l','m' -function Format-Range ($start, $end) { -[System.Collections.ArrayList]$firstSectionArray = @() -[System.Collections.ArrayList]$secondSectionArray = @() -[System.Collections.Stack]$stack = @() - for ($index = 0; $index -lt $targetArray.Count; $index++) { +function Format-Range ($start, $end, $array) { + [System.Collections.ArrayList]$firstSectionArray = @() + [System.Collections.ArrayList]$secondSectionArray = @() + [System.Collections.Stack]$stack = @() + for ($index = 0; $index -lt $array.Count; $index++) { if ($index -lt $start) { - $firstSectionArray.Add($targetArray[$index]) > $null + $firstSectionArray.Add($array[$index]) > $null } elseif ($index -ge $start -and $index -le $end) { - $stack.Push($targetArray[$index]) + $stack.Push($array[$index]) } else { - $secondSectionArray.Add($targetArray[$index]) > $null + $secondSectionArray.Add($array[$index]) > $null } } $finalArray = $firstSectionArray + $stack.ToArray() + $secondSectionArray - Write-Output $finalArray + return $finalArray } -Format-Range 2 6 # => 'a','b','g','f','e','d','c','h','i','j','k','l','m' +Format-Range 2 6 $targetArray +# => 'a','b','g','f','e','d','c','h','i','j','k','l','m' # The previous method works, but uses extra memory by allocating new arrays. # It's also kind of lengthy. diff --git a/yaml.html.markdown b/yaml.html.markdown index 4f10a128..6dc5905e 100644 --- a/yaml.html.markdown +++ b/yaml.html.markdown @@ -127,11 +127,11 @@ base: &base # indicate that all the keys of one or more specified maps should be inserted # into the current map. -foo: &foo +foo: <<: *base age: 10 -bar: &bar +bar: <<: *base age: 20 @@ -184,5 +184,5 @@ set2: ### More Resources -+ [YAML official website](http://yaml.org/) ++ [YAML official website](https://yaml.org/) + [Online YAML Validator](http://www.yamllint.com/) |