├── learn
└── libs
│ └── reveal.js
│ ├── i18n
│ └── de
│ │ ├── first.md
│ │ ├── second.md
│ │ └── third.html
│ ├── .travis.yml
│ ├── lib
│ ├── font
│ │ ├── league-gothic
│ │ │ ├── LICENSE
│ │ │ ├── league-gothic.eot
│ │ │ ├── league-gothic.ttf
│ │ │ ├── league-gothic.woff
│ │ │ └── league-gothic.css
│ │ └── source-sans-pro
│ │ │ ├── source-sans-pro-italic.eot
│ │ │ ├── source-sans-pro-italic.ttf
│ │ │ ├── source-sans-pro-italic.woff
│ │ │ ├── source-sans-pro-regular.eot
│ │ │ ├── source-sans-pro-regular.ttf
│ │ │ ├── source-sans-pro-regular.woff
│ │ │ ├── source-sans-pro-semibold.eot
│ │ │ ├── source-sans-pro-semibold.ttf
│ │ │ ├── source-sans-pro-semibold.woff
│ │ │ ├── source-sans-pro-semibolditalic.eot
│ │ │ ├── source-sans-pro-semibolditalic.ttf
│ │ │ ├── source-sans-pro-semibolditalic.woff
│ │ │ └── source-sans-pro.css
│ ├── js
│ │ ├── html5shiv.js
│ │ └── classList.js
│ └── css
│ │ ├── zenburn.css
│ │ └── monokai-sublime-sha.css
│ ├── .gitignore
│ ├── plugin
│ ├── multiplex
│ │ ├── client.js
│ │ ├── package.json
│ │ └── master.js
│ └── markdown
│ │ └── example.md
│ ├── js
│ └── i18n.js
│ └── css
│ └── theme
│ ├── source
│ ├── night.scss
│ ├── serif.scss
│ ├── league.scss
│ ├── sky.scss
│ ├── white.scss
│ ├── beige.scss
│ ├── black.scss
│ ├── simple.scss
│ └── moon.scss
│ └── template
│ └── settings.scss
├── resources
└── youtube
│ ├── intro.to.react.custom.hooks
│ └── source
│ │ ├── NOTES.md
│ │ ├── README.md
│ │ ├── src
│ │ ├── styles.css
│ │ ├── index.js
│ │ └── React.Query.jsx
│ │ ├── package.json
│ │ └── public
│ │ └── index.html
│ ├── react-i18next.gr
│ ├── src
│ │ ├── styles.css
│ │ ├── Page.jsx
│ │ └── index.tsx
│ ├── tsconfig.json
│ ├── .codesandbox
│ │ └── workspace.json
│ └── package.json
│ ├── introduction.to.GitHub.Pages
│ ├── GitHub.Pages.Live.Demo.png
│ ├── GitHub.Pages.High.Level.Overview.png
│ └── README.md
│ ├── react.custom.hooks.useClock
│ ├── src
│ │ ├── index.js
│ │ ├── styles.css
│ │ └── App.js
│ ├── .codesandbox
│ │ └── workspace.json
│ ├── package.json
│ └── public
│ │ └── index.html
│ └── intro.to.typescript.greek
│ └── resources.md
├── snippets
├── RegExp-HTML-2-Text.js
├── RegExp-Percentage.js
├── Node-Encode-Base64.js
├── Node-FileName-From-Absolute-Path.js
├── JavaScript-String-Reverse-Method.js
├── jQuery-Events-PubSub.js
├── JavaScript-Pad-Number.js
├── JavaScript-Pad-Milliseconds.coffee
├── JavaScript-Date-Convert-to-UNIX-Timestamp.js
├── Node-Write-File.coffee
├── Node-Get-FileSize.js
├── Node-Write-File.js
├── JavaScript-Pad-Milliseconds.js
├── Node-HTTP-Get-File.js
├── JavaScript-Sleep.js
├── RegExp-Credit-Cards.js
├── JavaScript-CDN-Local-Fallback.html
├── JavaScript-Array-Remove-Falsy-Values.js
├── Node-Parse-URL.js
├── Node-Read-File.js
├── JavaScript-Check-SVG-Support.js
├── JavaScript-HTML-Entities-Encode.js
├── Array.prototype.take.js
├── JavaScript-Multiple-Files-Input.js
├── JavaScript-Run-Once-Function.js
├── Node-Console-Colors.js
├── Node-Stdin.js
├── Node-Cheerio-Simple-Scraping.coffee
├── JavaScript-Get-URL-Hash-Parameters.js
├── Node-Detect-Module-Execution-Context.js
├── JavaScript-Array-Intersect.js
├── Node-Parse-File-By-Line.coffee
├── Node-Create-Folder.js
├── Express-CORS.js
├── Node-Request.coffee
├── Node-Request.js
├── Node-Cheerio-Simple-Scraping.js
├── RegExp-Parse-CSS.js
├── Gulp-Minify-CSS.js
├── Node-HTTPS-Save-File.js
├── NodeWebKit-Execute-Binaries.js
├── Node-Parse-File-By-Line.js
├── Node-cURL.js
├── Node-Download-File.js
├── Node-Download-File.coffee
├── Gulp-Minify-Javascript.js
├── RegExp-Parse-URL.js
├── JavaScript-ConsoleLog-Line.js
├── Node-Download-With-Progress-Bar.js
├── Node-Zip.js
├── JavaScript-CSS-Same-Column-Height.js
├── Node-Zip.coffee
├── JavaScript-Test-CORS-Server.js
├── JavaScript-PubNub-Simple-Chat.html
└── JavaScript-Object-Watch-PolyFill.js
├── img
├── 2017-JS.png
├── BBCoffee.gif
├── ts-check.jpg
├── usestrict.jpg
├── When-in-Rome.jpg
└── javascript-please-work.jpg
├── WebOversimplified
├── img
│ ├── PBX.psd
│ ├── PBX-001.jpg
│ ├── PBX-002.jpg
│ ├── laptop.png
│ ├── operators.jpg
│ ├── smartphone.png
│ ├── laptop-apache.png
│ ├── laptop-browser.png
│ └── background-scarlet.jpg
└── libs
│ └── revealjs
│ ├── lib
│ ├── font
│ │ ├── league-gothic
│ │ │ ├── LICENSE
│ │ │ ├── league-gothic.eot
│ │ │ ├── league-gothic.ttf
│ │ │ ├── league-gothic.woff
│ │ │ └── league-gothic.css
│ │ └── source-sans-pro
│ │ │ ├── source-sans-pro-italic.eot
│ │ │ ├── source-sans-pro-italic.ttf
│ │ │ ├── source-sans-pro-italic.woff
│ │ │ ├── source-sans-pro-regular.eot
│ │ │ ├── source-sans-pro-regular.ttf
│ │ │ ├── source-sans-pro-regular.woff
│ │ │ ├── source-sans-pro-semibold.eot
│ │ │ ├── source-sans-pro-semibold.ttf
│ │ │ ├── source-sans-pro-semibold.woff
│ │ │ ├── source-sans-pro-semibolditalic.eot
│ │ │ ├── source-sans-pro-semibolditalic.ttf
│ │ │ ├── source-sans-pro-semibolditalic.woff
│ │ │ └── source-sans-pro.css
│ ├── js
│ │ ├── html5shiv.js
│ │ └── classList.js
│ └── css
│ │ ├── zenburn.css
│ │ └── monokai-sublime-sha.css
│ ├── plugin
│ ├── multiplex
│ │ ├── client.js
│ │ ├── package.json
│ │ └── master.js
│ └── markdown
│ │ └── example.md
│ └── css
│ └── theme
│ ├── source
│ ├── night.scss
│ ├── serif.scss
│ ├── league.scss
│ ├── sky.scss
│ ├── beige.scss
│ ├── black.scss
│ ├── white.scss
│ ├── simple.scss
│ └── moon.scss
│ └── template
│ └── settings.scss
├── slides
└── images
│ ├── let_var_const_01.jpg
│ ├── let_var_const_02.jpg
│ ├── let_var_const_03.jpg
│ ├── let_var_const_04.jpg
│ ├── let_var_const_05.jpg
│ ├── let_var_const_06.jpg
│ ├── let_var_const_07.jpg
│ ├── let_var_const_08.jpg
│ ├── let_var_const_09.jpg
│ ├── let_var_const_10.jpg
│ ├── let_var_const_11.jpg
│ ├── let_var_const_12.jpg
│ ├── let_var_const_13.jpg
│ ├── understanding_functions_01.jpg
│ ├── understanding_functions_02.jpg
│ ├── understanding_functions_03.jpg
│ ├── understanding_functions_04.jpg
│ ├── understanding_functions_05.jpg
│ └── understanding_functions_06.jpg
├── external
└── JavaScript-Garden
│ ├── favicon.ico
│ ├── doc
│ ├── fi
│ │ ├── intro
│ │ │ ├── translators.md
│ │ │ ├── contributors.md
│ │ │ ├── authors.md
│ │ │ ├── license.md
│ │ │ └── index.md
│ │ ├── array
│ │ │ └── constructor.md
│ │ └── types
│ │ │ └── instanceof.md
│ ├── ru
│ │ ├── intro
│ │ │ ├── contributors.md
│ │ │ ├── translators.md
│ │ │ ├── authors.md
│ │ │ ├── license.md
│ │ │ └── index.md
│ │ ├── types
│ │ │ └── instanceof.md
│ │ └── array
│ │ │ └── constructor.md
│ ├── pl
│ │ ├── intro
│ │ │ ├── contributors.md
│ │ │ ├── translators.md
│ │ │ ├── hosting.md
│ │ │ ├── authors.md
│ │ │ ├── license.md
│ │ │ └── index.md
│ │ ├── array
│ │ │ └── constructor.md
│ │ └── types
│ │ │ └── instanceof.md
│ ├── language.json
│ ├── de
│ │ ├── intro
│ │ │ ├── contributors.md
│ │ │ ├── authors.md
│ │ │ └── license.md
│ │ └── index.json
│ ├── zh
│ │ ├── intro
│ │ │ ├── authors.md
│ │ │ ├── contributors.md
│ │ │ ├── license.md
│ │ │ └── index.md
│ │ ├── types
│ │ │ └── instanceof.md
│ │ ├── function
│ │ │ └── general.md
│ │ ├── array
│ │ │ ├── constructor.md
│ │ │ └── general.md
│ │ ├── object
│ │ │ ├── forinloop.md
│ │ │ └── hasownproperty.md
│ │ └── core
│ │ │ └── eval.md
│ ├── zhtw
│ │ ├── array
│ │ │ ├── constructor.md
│ │ │ └── general.md
│ │ ├── types
│ │ │ └── instanceof.md
│ │ ├── core
│ │ │ ├── eval.md
│ │ │ └── undefined.md
│ │ ├── function
│ │ │ └── general.md
│ │ └── object
│ │ │ ├── forinloop.md
│ │ │ └── hasownproperty.md
│ ├── ko
│ │ ├── array
│ │ │ ├── constructor.md
│ │ │ └── general.md
│ │ ├── types
│ │ │ └── instanceof.md
│ │ ├── core
│ │ │ └── eval.md
│ │ ├── function
│ │ │ └── general.md
│ │ ├── object
│ │ │ └── forinloop.md
│ │ └── intro
│ │ │ └── index.md
│ ├── hu
│ │ ├── types
│ │ │ ├── typeof.md
│ │ │ └── instanceof.md
│ │ └── array
│ │ │ └── constructor.md
│ ├── ja
│ │ ├── array
│ │ │ ├── constructor.md
│ │ │ └── general.md
│ │ ├── types
│ │ │ └── instanceof.md
│ │ ├── core
│ │ │ └── eval.md
│ │ ├── function
│ │ │ └── general.md
│ │ ├── object
│ │ │ ├── forinloop.md
│ │ │ └── hasownproperty.md
│ │ └── intro
│ │ │ └── index.md
│ ├── by
│ │ ├── array
│ │ │ └── constructor.md
│ │ └── types
│ │ │ └── instanceof.md
│ ├── en
│ │ ├── array
│ │ │ └── constructor.md
│ │ ├── types
│ │ │ └── instanceof.md
│ │ └── core
│ │ │ └── eval.md
│ ├── ptbr
│ │ ├── array
│ │ │ └── constructor.md
│ │ ├── types
│ │ │ └── instanceof.md
│ │ └── core
│ │ │ └── eval.md
│ ├── tr
│ │ ├── array
│ │ │ └── constructor.md
│ │ ├── types
│ │ │ └── instanceof.md
│ │ └── core
│ │ │ └── eval.md
│ ├── fr
│ │ ├── array
│ │ │ └── constructor.md
│ │ └── types
│ │ │ └── instanceof.md
│ ├── it
│ │ ├── array
│ │ │ └── constructor.md
│ │ └── types
│ │ │ └── instanceof.md
│ └── es
│ │ ├── types
│ │ └── instanceof.md
│ │ ├── array
│ │ └── constructor.md
│ │ └── core
│ │ └── eval.md
│ ├── image
│ └── sidebar-icon.png
│ ├── BUILD.md
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ └── javascript
│ └── html5.js
├── teach
└── README.md
└── SublimeTextSnippets
└── BackboneCoffee.sublime-snippet
/learn/libs/reveal.js/i18n/de/first.md:
--------------------------------------------------------------------------------
1 | ## Erste Seite
--------------------------------------------------------------------------------
/learn/libs/reveal.js/i18n/de/second.md:
--------------------------------------------------------------------------------
1 | ## Zweite Seite
--------------------------------------------------------------------------------
/learn/libs/reveal.js/i18n/de/third.html:
--------------------------------------------------------------------------------
1 |
Dritte Seite
--------------------------------------------------------------------------------
/resources/youtube/intro.to.react.custom.hooks/source/NOTES.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/snippets/RegExp-HTML-2-Text.js:
--------------------------------------------------------------------------------
1 | element.innerHTML.replace(/<[^>]*>/g, "");
--------------------------------------------------------------------------------
/img/2017-JS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/img/2017-JS.png
--------------------------------------------------------------------------------
/snippets/RegExp-Percentage.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | module.exports = /^(\d+(\.\d+)?|\.\d+) ?%$/;
3 |
--------------------------------------------------------------------------------
/img/BBCoffee.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/img/BBCoffee.gif
--------------------------------------------------------------------------------
/img/ts-check.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/img/ts-check.jpg
--------------------------------------------------------------------------------
/img/usestrict.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/img/usestrict.jpg
--------------------------------------------------------------------------------
/img/When-in-Rome.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/img/When-in-Rome.jpg
--------------------------------------------------------------------------------
/resources/youtube/react-i18next.gr/src/styles.css:
--------------------------------------------------------------------------------
1 | .App {
2 | font-family: sans-serif;
3 | text-align: center;
4 | }
5 |
--------------------------------------------------------------------------------
/WebOversimplified/img/PBX.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/img/PBX.psd
--------------------------------------------------------------------------------
/img/javascript-please-work.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/img/javascript-please-work.jpg
--------------------------------------------------------------------------------
/learn/libs/reveal.js/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 4
4 | after_script:
5 | - npm run build -- retire
6 |
--------------------------------------------------------------------------------
/WebOversimplified/img/PBX-001.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/img/PBX-001.jpg
--------------------------------------------------------------------------------
/WebOversimplified/img/PBX-002.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/img/PBX-002.jpg
--------------------------------------------------------------------------------
/WebOversimplified/img/laptop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/img/laptop.png
--------------------------------------------------------------------------------
/snippets/Node-Encode-Base64.js:
--------------------------------------------------------------------------------
1 | // ENCODE A STRING TO Base64
2 |
3 | var base64encoded = new Buffer("My Text").toString('base64');
--------------------------------------------------------------------------------
/WebOversimplified/img/operators.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/img/operators.jpg
--------------------------------------------------------------------------------
/slides/images/let_var_const_01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/let_var_const_01.jpg
--------------------------------------------------------------------------------
/slides/images/let_var_const_02.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/let_var_const_02.jpg
--------------------------------------------------------------------------------
/slides/images/let_var_const_03.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/let_var_const_03.jpg
--------------------------------------------------------------------------------
/slides/images/let_var_const_04.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/let_var_const_04.jpg
--------------------------------------------------------------------------------
/slides/images/let_var_const_05.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/let_var_const_05.jpg
--------------------------------------------------------------------------------
/slides/images/let_var_const_06.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/let_var_const_06.jpg
--------------------------------------------------------------------------------
/slides/images/let_var_const_07.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/let_var_const_07.jpg
--------------------------------------------------------------------------------
/slides/images/let_var_const_08.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/let_var_const_08.jpg
--------------------------------------------------------------------------------
/slides/images/let_var_const_09.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/let_var_const_09.jpg
--------------------------------------------------------------------------------
/slides/images/let_var_const_10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/let_var_const_10.jpg
--------------------------------------------------------------------------------
/slides/images/let_var_const_11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/let_var_const_11.jpg
--------------------------------------------------------------------------------
/slides/images/let_var_const_12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/let_var_const_12.jpg
--------------------------------------------------------------------------------
/slides/images/let_var_const_13.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/let_var_const_13.jpg
--------------------------------------------------------------------------------
/WebOversimplified/img/smartphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/img/smartphone.png
--------------------------------------------------------------------------------
/external/JavaScript-Garden/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/external/JavaScript-Garden/favicon.ico
--------------------------------------------------------------------------------
/snippets/Node-FileName-From-Absolute-Path.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | path.basename('/foo/bar/index.html')
3 | // returns 'index.html'
--------------------------------------------------------------------------------
/WebOversimplified/img/laptop-apache.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/img/laptop-apache.png
--------------------------------------------------------------------------------
/WebOversimplified/img/laptop-browser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/img/laptop-browser.png
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/fi/intro/translators.md:
--------------------------------------------------------------------------------
1 | ## Kääntäjät
2 |
3 | - [Juho Vepsäläinen][1]
4 |
5 | [1]: https://github.com/bebraw
6 |
--------------------------------------------------------------------------------
/resources/youtube/intro.to.react.custom.hooks/source/README.md:
--------------------------------------------------------------------------------
1 | # Introduction to React Custom Hooks (react-c12-29062022)
2 |
3 | Date: 06.2022
4 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/league-gothic/LICENSE:
--------------------------------------------------------------------------------
1 | SIL Open Font License (OFL)
2 | http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
3 |
--------------------------------------------------------------------------------
/WebOversimplified/img/background-scarlet.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/img/background-scarlet.jpg
--------------------------------------------------------------------------------
/slides/images/understanding_functions_01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/understanding_functions_01.jpg
--------------------------------------------------------------------------------
/slides/images/understanding_functions_02.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/understanding_functions_02.jpg
--------------------------------------------------------------------------------
/slides/images/understanding_functions_03.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/understanding_functions_03.jpg
--------------------------------------------------------------------------------
/slides/images/understanding_functions_04.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/understanding_functions_04.jpg
--------------------------------------------------------------------------------
/slides/images/understanding_functions_05.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/understanding_functions_05.jpg
--------------------------------------------------------------------------------
/slides/images/understanding_functions_06.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/slides/images/understanding_functions_06.jpg
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/league-gothic/LICENSE:
--------------------------------------------------------------------------------
1 | SIL Open Font License (OFL)
2 | http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
3 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ru/intro/contributors.md:
--------------------------------------------------------------------------------
1 | ## Участники
2 |
3 | - [Участники](https://github.com/BonsaiDen/JavaScript-Garden/graphs/contributors)
4 |
5 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/image/sidebar-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/external/JavaScript-Garden/image/sidebar-icon.png
--------------------------------------------------------------------------------
/external/JavaScript-Garden/BUILD.md:
--------------------------------------------------------------------------------
1 | - Go to /GITHUB-FORKS/JavaScript-Garden
2 | - git checkout main
3 | - ./deploy.sh
4 | - Copy all files, apart from: node_modules/, etc.
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/fi/intro/contributors.md:
--------------------------------------------------------------------------------
1 | ## Osallistujat
2 |
3 | - [Osallistujat](https://github.com/BonsaiDen/JavaScript-Garden/graphs/contributors)
4 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/pl/intro/contributors.md:
--------------------------------------------------------------------------------
1 | ## Współtwórcy
2 |
3 | - [Współtwórcy](https://github.com/BonsaiDen/JavaScript-Garden/graphs/contributors)
4 |
5 |
--------------------------------------------------------------------------------
/snippets/JavaScript-String-Reverse-Method.js:
--------------------------------------------------------------------------------
1 | String.prototype.reverse = function() {
2 |
3 | return Array.prototype.reverse.apply(this.split('')).join('');
4 |
5 | };
6 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/language.json:
--------------------------------------------------------------------------------
1 | {
2 | "default": "en",
3 | "listed": ["by","en","es","fi","fr","hu","it","ja","ko","pl","ptbr","ru","tr","zh","zhtw"]
4 | }
5 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/league-gothic/league-gothic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/learn/libs/reveal.js/lib/font/league-gothic/league-gothic.eot
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/league-gothic/league-gothic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/learn/libs/reveal.js/lib/font/league-gothic/league-gothic.ttf
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/league-gothic/league-gothic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/learn/libs/reveal.js/lib/font/league-gothic/league-gothic.woff
--------------------------------------------------------------------------------
/snippets/jQuery-Events-PubSub.js:
--------------------------------------------------------------------------------
1 | $(document).on( 'MyEvent.ready', function( e ) {
2 |
3 | alert("Ready!");
4 |
5 | });
6 |
7 | // $(document).trigger( 'MyEvent.ready' [, callback] );
8 |
9 |
--------------------------------------------------------------------------------
/snippets/JavaScript-Pad-Number.js:
--------------------------------------------------------------------------------
1 | var pad = function( number ) {
2 | var r = String( number );
3 | return ( r.length === 1 ) ? '0' + r : r;
4 | };
5 |
6 | // USAGE: pad(1); --> 01, pad(20) --> 20
7 |
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/league-gothic/league-gothic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/libs/revealjs/lib/font/league-gothic/league-gothic.eot
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/league-gothic/league-gothic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/libs/revealjs/lib/font/league-gothic/league-gothic.ttf
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/league-gothic/league-gothic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/libs/revealjs/lib/font/league-gothic/league-gothic.woff
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/pl/intro/translators.md:
--------------------------------------------------------------------------------
1 | ## Tłumaczenie
2 |
3 | - [Łukasz Kufel][1]
4 | - [Maciej Ciemborowicz][2]
5 |
6 | [1]: http://qfel13.pl
7 | [2]: http://blog.ciemborowicz.pl
8 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.eot
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.ttf
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.woff
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.eot
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.ttf
--------------------------------------------------------------------------------
/resources/youtube/introduction.to.GitHub.Pages/GitHub.Pages.Live.Demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/resources/youtube/introduction.to.GitHub.Pages/GitHub.Pages.Live.Demo.png
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.woff
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.eot
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.ttf
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.woff
--------------------------------------------------------------------------------
/snippets/JavaScript-Pad-Milliseconds.coffee:
--------------------------------------------------------------------------------
1 | # JavaScript-Pad-Milliseconds
2 |
3 | padMs = (num)->
4 |
5 | if num < 10 then '00' + String(num) else if num < 100 then '0' + String(num) else String(num)
6 |
7 |
--------------------------------------------------------------------------------
/snippets/JavaScript-Date-Convert-to-UNIX-Timestamp.js:
--------------------------------------------------------------------------------
1 | var date = new Date( "2012-01-01T06:25:24Z" ).getTime() / 1000;
2 |
3 | // Source: http://stackoverflow.com/questions/11893083/convert-normal-date-to-unix-timestamp
4 |
--------------------------------------------------------------------------------
/snippets/Node-Write-File.coffee:
--------------------------------------------------------------------------------
1 | fs = require 'fs'
2 |
3 | fs.writeFile "/tmp/test", "Hey there!", (err)->
4 |
5 | if (err)
6 | console.log err
7 | else
8 | console.log "The file was saved!"
9 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf
--------------------------------------------------------------------------------
/snippets/Node-Get-FileSize.js:
--------------------------------------------------------------------------------
1 | var fs = require("fs");
2 |
3 | function getFilesizeInBytes(filename) {
4 |
5 | var stats = fs.statSync(filename);
6 | var fileSizeInBytes = stats["size"];
7 | return fileSizeInBytes;
8 |
9 | }
--------------------------------------------------------------------------------
/snippets/Node-Write-File.js:
--------------------------------------------------------------------------------
1 | var fs = require('fs');
2 | fs.writeFile("/tmp/test", "Hey there!", function(err) {
3 | if(err) {
4 | console.log(err);
5 | } else {
6 | console.log("The file was saved!");
7 | }
8 | });
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.eot
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.ttf
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff
--------------------------------------------------------------------------------
/resources/youtube/introduction.to.GitHub.Pages/GitHub.Pages.High.Level.Overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/resources/youtube/introduction.to.GitHub.Pages/GitHub.Pages.High.Level.Overview.png
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.woff
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.eot
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.ttf
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.woff
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.eot
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.ttf
--------------------------------------------------------------------------------
/snippets/JavaScript-Pad-Milliseconds.js:
--------------------------------------------------------------------------------
1 | // JavaScript-Pad-Milliseconds
2 |
3 | function padMs ( num ) {
4 |
5 | return ( num < 10 ) ? '00' + String( num ) : ( num < 100 ) ? '0' + String( num ) : String( num );
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.woff
--------------------------------------------------------------------------------
/resources/youtube/react-i18next.gr/src/Page.jsx:
--------------------------------------------------------------------------------
1 | import { useTranslation } from 'react-i18next';
2 |
3 | export default function Page(){
4 | const { t } = useTranslation();
5 | return (
6 | Page: { t('welcome') }
7 | )
8 | }
--------------------------------------------------------------------------------
/learn/libs/reveal.js/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | *.iml
3 | *.iws
4 | *.eml
5 | out/
6 | .DS_Store
7 | .svn
8 | log/*.log
9 | tmp/**
10 | node_modules/
11 | package-lock.json
12 | .sass-cache
13 | css/reveal.min.css
14 | js/reveal.min.js
15 |
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/in-tech-gration/LearnJavascript/HEAD/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/de/intro/contributors.md:
--------------------------------------------------------------------------------
1 | ## Contributors
2 |
3 | - [Caio Romão][1] (Spelling corrections)
4 | - [Andreas Blixt][2] (Language corrections)
5 |
6 | [1]: https://github.com/caio
7 | [2]: https://github.com/blixt
8 |
9 |
--------------------------------------------------------------------------------
/snippets/Node-HTTP-Get-File.js:
--------------------------------------------------------------------------------
1 | var http = require('http');
2 | var fs = require('fs');
3 | var file = fs.createWriteStream("image.jpg");
4 | var request = http.get("http://domain.com/custom.jpg", function(res) {
5 | res.pipe(file);
6 | });
7 |
--------------------------------------------------------------------------------
/snippets/JavaScript-Sleep.js:
--------------------------------------------------------------------------------
1 | !window.sleep && (window.sleep = function sleep(secs){
2 |
3 | for ( var end = Date.now() + secs * 1000; Date.now() < end; );
4 |
5 | });
6 |
7 | // USAGE: console.log("start..."); sleep(3); console.log("...finish");
8 |
--------------------------------------------------------------------------------
/snippets/RegExp-Credit-Cards.js:
--------------------------------------------------------------------------------
1 | ^(?:4[0-9]{12}(?:[0-9]{3})? # VISA
2 | | 5[1-5][0-9]{14} # MasterCard
3 | | 3[47][0-9]{13} # AMEX
4 | | 3(?:0[0-5]|[68][0-9])[0-9]{11} # Diners
5 | | 6(?:011|5[0-9]{2})[0-9]{12}
6 | | (?:2131|1800|35\d{3})\d{11} # JCB
7 | )$
--------------------------------------------------------------------------------
/snippets/JavaScript-CDN-Local-Fallback.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/snippets/JavaScript-Array-Remove-Falsy-Values.js:
--------------------------------------------------------------------------------
1 | // REMOVE ALL FALSY VALUES FROM AN ARRAY
2 | // Source: http://jsforallof.us/2014/10/03/cool-es5-array-method-uses/
3 |
4 | var arr = ["", 1, "foo", 0, "bar"];
5 | console.log(arr.filter(Boolean)); // [1, "foo", "bar"]
6 |
7 |
--------------------------------------------------------------------------------
/resources/youtube/react.custom.hooks.useClock/src/index.js:
--------------------------------------------------------------------------------
1 | import { createRoot } from "react-dom/client";
2 | import "./styles.css";
3 | import App from "./App";
4 |
5 | const rootElement = createRoot(document.getElementById("root"));
6 | rootElement.render( );
7 |
8 |
--------------------------------------------------------------------------------
/snippets/Node-Parse-URL.js:
--------------------------------------------------------------------------------
1 | var url = require('url');
2 | url.parse('http://domain.com/page/file.html?query=string');
3 |
4 | // PARSE QUERY STRING ALSO
5 |
6 | var link = url.parse( 'http://domain.com/page/file.html?query=string', true );
7 |
8 | console.log( link.query["query"] );
--------------------------------------------------------------------------------
/resources/youtube/introduction.to.GitHub.Pages/README.md:
--------------------------------------------------------------------------------
1 | **High Level Overview:**
2 |
3 | 
4 |
5 | **Live Coding diagram:**
6 |
7 | 
8 |
9 | - [YouTube Video](https://www.youtube.com/watch?v=nERHeT53MIw)
10 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/js/html5shiv.js:
--------------------------------------------------------------------------------
1 | document.createElement('header');
2 | document.createElement('nav');
3 | document.createElement('section');
4 | document.createElement('article');
5 | document.createElement('aside');
6 | document.createElement('footer');
7 | document.createElement('hgroup');
--------------------------------------------------------------------------------
/snippets/Node-Read-File.js:
--------------------------------------------------------------------------------
1 | var fs = require("fs");
2 |
3 | fs.readFile( 'file.txt', function(err, data){
4 | if ( ! err ){
5 | console.log(data);
6 | }
7 | });
8 |
9 | /* READ FILE SYNCHRONOUSLY IN VARIABLE */
10 |
11 | var file = fs.readFileSync( "file.html", "UTF-8");
12 |
13 |
14 |
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/js/html5shiv.js:
--------------------------------------------------------------------------------
1 | document.createElement('header');
2 | document.createElement('nav');
3 | document.createElement('section');
4 | document.createElement('article');
5 | document.createElement('aside');
6 | document.createElement('footer');
7 | document.createElement('hgroup');
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/pl/intro/hosting.md:
--------------------------------------------------------------------------------
1 | ## Hosting
2 | JavaScript Garden znajduje się na serwerach GitHub, ale dzięki wsparciu
3 | [Cramer Development] [1] posiadamy również mirror na serwerze [JavaScriptGarden.info] [2].
4 |
5 | [1]: http://cramerdev.com/
6 | [2]: http://javascriptgarden.info/
7 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zh/intro/authors.md:
--------------------------------------------------------------------------------
1 | ##关于作者
2 |
3 | 这篇文章的作者是两位 [Stack Overflow][1] 用户, [伊沃·韦特泽尔 Ivo Wetzel][2](写作) 和 [张易江 Zhang Yi Jiang][3](设计)。
4 |
5 | [1]: http://stackoverflow.com/
6 | [2]: http://stackoverflow.com/users/170224/ivo-wetzel
7 | [3]: http://stackoverflow.com/users/313758/yi-jiang
8 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/de/intro/authors.md:
--------------------------------------------------------------------------------
1 | ## The Authors
2 |
3 | This guide is the work of two lovely Stack Overflow users, [Ivo Wetzel][1]
4 | (Writing) and [Zhang Yi Jiang][2] (Design).
5 |
6 | [1]: http://stackoverflow.com/users/170224/ivo-wetzel
7 | [2]: http://stackoverflow.com/users/313758/yi-jiang
8 |
9 |
--------------------------------------------------------------------------------
/resources/youtube/intro.to.react.custom.hooks/source/src/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | width: 100vw;
3 | min-height: 100vh;
4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
5 | background: #00d8ff;
6 | color: white;
7 |
8 | }
--------------------------------------------------------------------------------
/snippets/JavaScript-Check-SVG-Support.js:
--------------------------------------------------------------------------------
1 | function supportSVG(){
2 | return ( !! document.createElementNS && !! document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect )
3 | }
4 |
5 | function supportSVGimages(){
6 | return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image", "1.1");
7 | }
8 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ru/intro/translators.md:
--------------------------------------------------------------------------------
1 | ## Переводчики
2 |
3 | - ['shaman.sir'][1]
4 | - [Антон Шевчук][2]
5 | - [Максим Лозовой][3]
6 | - [Елена Пашкова][4]
7 |
8 | [1]: http://shamansir.madfire.net/
9 | [2]: http://anton.shevchuk.name/
10 | [3]: http://nixsolutions.com/
11 | [4]: http://nixsolutions.com/
12 |
13 |
--------------------------------------------------------------------------------
/resources/youtube/react-i18next.gr/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "include": [
3 | "./src/**/*"
4 | ],
5 | "compilerOptions": {
6 | "strict": true,
7 | "esModuleInterop": true,
8 | "lib": [
9 | "dom",
10 | "es2015"
11 | ],
12 | "jsx": "react-jsx"
13 | }
14 | }
--------------------------------------------------------------------------------
/snippets/JavaScript-HTML-Entities-Encode.js:
--------------------------------------------------------------------------------
1 | function htmlEntities(str) {
2 |
3 | return String(str)
4 | .replace(/&/g, '&')
5 | .replace(//g, '>')
7 | .replace(/"/g, '"');
8 |
9 | }
10 |
11 | /*** http://css-tricks.com/snippets/javascript/htmlentities-for-javascript/ ***/
--------------------------------------------------------------------------------
/snippets/Array.prototype.take.js:
--------------------------------------------------------------------------------
1 | // Javascript implementation of Ruby Array::take | http://ruby-doc.org/core-2.2.0/Array.html#method-i-take
2 |
3 | if ( ! Array.prototype.take ){
4 | Array.prototype.take = function( n ){
5 | return this.slice( 0, n );
6 | }
7 | }
8 |
9 | // USAGE:
10 | // [1,2,3,4,5,6,7,8,9,0].take(3);
11 | // #=> [1,2,3]
12 |
13 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/pl/intro/authors.md:
--------------------------------------------------------------------------------
1 | ## Autorzy
2 |
3 | Ten przewodnik jest dziełem dwóch uroczych użytkowników [Stack Overflow][1],
4 | [Ivo Wetzel][2] (Treść) oraz [Zhang Yi Jiang][3] (Projekt).
5 |
6 | [1]: http://stackoverflow.com/
7 | [2]: http://stackoverflow.com/users/170224/ivo-wetzel
8 | [3]: http://stackoverflow.com/users/313758/yi-jiang
--------------------------------------------------------------------------------
/resources/youtube/react-i18next.gr/.codesandbox/workspace.json:
--------------------------------------------------------------------------------
1 | {
2 | "responsive-preview": {
3 | "Mobile": [
4 | 320,
5 | 675
6 | ],
7 | "Tablet": [
8 | 1024,
9 | 765
10 | ],
11 | "Desktop": [
12 | 1400,
13 | 800
14 | ],
15 | "Desktop HD": [
16 | 1920,
17 | 1080
18 | ]
19 | }
20 | }
--------------------------------------------------------------------------------
/snippets/JavaScript-Multiple-Files-Input.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | var fileInput = document.getElementById('fileInput');
4 |
5 | fileInput.addEventListener('change', function(e) {
6 | var files = fileInput.files;
7 |
8 | [].slice.apply(files).forEach(function(file){
9 | console.log(file);
10 | });
11 |
12 | });
13 |
--------------------------------------------------------------------------------
/snippets/JavaScript-Run-Once-Function.js:
--------------------------------------------------------------------------------
1 | function once( fn, context ) {
2 |
3 | var result;
4 | var run;
5 |
6 | return function() {
7 | if ( run ) return result;
8 | result = fn.apply( context || this, arguments );
9 |
10 | // Set to null to allow garbage collection
11 | run = 1;
12 | fn = null;
13 |
14 | return result;
15 | };
16 |
17 | }
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/fi/intro/authors.md:
--------------------------------------------------------------------------------
1 | ## Tekijät
2 |
3 | Tämä opas pohjautuu kahden mukavan [Stack Overflow][3] käyttäjän työhön. He ovat [Ivo Wetzel][1] (kirjoittaminen) sekä [Zhang Yi Jiang][2] (ulkoasu).
4 |
5 | [1]: http://stackoverflow.com/users/170224/ivo-wetzel
6 | [2]: http://stackoverflow.com/users/313758/yi-jiang
7 | [3]: http://stackoverflow.com/
8 |
9 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ru/intro/authors.md:
--------------------------------------------------------------------------------
1 | ## Авторы
2 |
3 | Это руководство является результатом работы двух заядлых пользователей Stack Overflow: [Иво Ветцель /Ivo Wetzel/][1] (автора текста) и [Чжан И Цзян /Zhang Yi Jiang/][2] (дизайнера).
4 |
5 | [1]: http://stackoverflow.com/users/170224/ivo-wetzel
6 | [2]: http://stackoverflow.com/users/313758/yi-jiang
7 |
8 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zh/intro/contributors.md:
--------------------------------------------------------------------------------
1 | ##贡献者
2 |
3 | - [贡献者](https://github.com/BonsaiDen/JavaScript-Garden/graphs/contributors)
4 |
5 | ##中文翻译
6 | - [三生石上][29]
7 |
8 | 此中文翻译由[三生石上][29]独立完成,[博客园][30]首发,转载请注明出处。
9 |
10 | [1]: https://github.com/caio
11 | [2]: https://github.com/blixt
12 | [29]: http://sanshi.me/
13 | [30]: http://cnblogs.com/sanshi/
14 |
--------------------------------------------------------------------------------
/resources/youtube/react.custom.hooks.useClock/.codesandbox/workspace.json:
--------------------------------------------------------------------------------
1 | {
2 | "responsive-preview": {
3 | "Mobile": [
4 | 320,
5 | 675
6 | ],
7 | "Tablet": [
8 | 1024,
9 | 765
10 | ],
11 | "Desktop": [
12 | 1400,
13 | 800
14 | ],
15 | "Desktop HD": [
16 | 1920,
17 | 1080
18 | ]
19 | }
20 | }
--------------------------------------------------------------------------------
/resources/youtube/react-i18next.gr/src/index.tsx:
--------------------------------------------------------------------------------
1 | import { StrictMode } from "react";
2 | import * as ReactDOMClient from "react-dom/client";
3 |
4 | import App from "./App";
5 |
6 | const rootElement = document.getElementById("root");
7 | const root = ReactDOMClient.createRoot(rootElement);
8 |
9 | root.render(
10 |
11 |
12 |
13 | );
14 |
--------------------------------------------------------------------------------
/snippets/Node-Console-Colors.js:
--------------------------------------------------------------------------------
1 | // npm install colors
2 |
3 | var colors = require("colors");
4 |
5 | console.log( "Printed in glorious red!".bold.red );
6 |
7 | // .bold
8 | // .italic
9 | // .underline
10 | // .inverse
11 | // .yellow
12 | // .cyan
13 | // .white
14 | // .magenta
15 | // .green
16 | // .red
17 | // .grey
18 | // .blue
19 | // .rainbow
20 | // .zebra
21 | // .random
--------------------------------------------------------------------------------
/snippets/Node-Stdin.js:
--------------------------------------------------------------------------------
1 | var util = require('util');
2 |
3 | process.stdin.resume();
4 | process.stdin.setEncoding('utf8');
5 | process.stdin.on('data', function (text) {
6 |
7 | console.log('Received data:', util.inspect(text));
8 | if (text === 'exit\n') {
9 | exit();
10 | }
11 |
12 | });
13 |
14 | function exit() {
15 | console.log('Exiting.');
16 | process.exit();
17 | }
18 |
--------------------------------------------------------------------------------
/resources/youtube/intro.to.react.custom.hooks/source/src/index.js:
--------------------------------------------------------------------------------
1 | import { createRoot } from "react-dom/client";
2 | import "./styles.css";
3 |
4 | // Custom Hooks: useFetch()
5 | // import App from "./Custom.Hooks";
6 |
7 | // React Query
8 | import App from "./React.Query";
9 |
10 | const rootElement = createRoot(document.getElementById("root"));
11 | rootElement.render( );
12 |
13 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/league-gothic/league-gothic.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'League Gothic';
3 | src: url('league-gothic.eot');
4 | src: url('league-gothic.eot?#iefix') format('embedded-opentype'),
5 | url('league-gothic.woff') format('woff'),
6 | url('league-gothic.ttf') format('truetype');
7 |
8 | font-weight: normal;
9 | font-style: normal;
10 | }
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/league-gothic/league-gothic.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'League Gothic';
3 | src: url('league-gothic.eot');
4 | src: url('league-gothic.eot?#iefix') format('embedded-opentype'),
5 | url('league-gothic.woff') format('woff'),
6 | url('league-gothic.ttf') format('truetype');
7 |
8 | font-weight: normal;
9 | font-style: normal;
10 | }
--------------------------------------------------------------------------------
/teach/README.md:
--------------------------------------------------------------------------------
1 | # Teaching JavaScript (and Computer Science)
2 |
3 | [Work in progress]
4 |
5 | ## Resources
6 |
7 | - [Teacher Tips (code.org)](https://www.youtube.com/playlist?list=PLzdnOPI1iJNcc7Q-PvUVqV249l2JzhJes)
8 | - [**@teachcode:** Supporting K12 educators teaching computer science](https://twitter.com/teachcode)
9 | - [5 Things Every Presenter Needs To Know About People](https://www.youtube.com/watch?v=WJUblvGfW6w)
10 |
--------------------------------------------------------------------------------
/snippets/Node-Cheerio-Simple-Scraping.coffee:
--------------------------------------------------------------------------------
1 | request = require 'request'
2 | cheerio = require 'cheerio'
3 |
4 | url = 'http://www.company.com/jobs/'
5 |
6 | request url, (err, resp, body) ->
7 |
8 | $ = cheerio.load(body)
9 | companyName = $('.company')
10 | companyNameText = companyName.text()
11 |
12 | $('.company').filter ->
13 | data = $(this)
14 | dataText = data.text()
15 | return
16 |
17 |
--------------------------------------------------------------------------------
/resources/youtube/react.custom.hooks.useClock/src/styles.css:
--------------------------------------------------------------------------------
1 | body {
2 | width: 100vw;
3 | min-height: 100vh;
4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
5 | display: flex;
6 | justify-content: center;
7 | align-items: center;
8 | font-size: 28px;
9 | background: #00d8ff;
10 | color: white;
11 | overflow: hidden;
12 | }
--------------------------------------------------------------------------------
/learn/libs/reveal.js/plugin/multiplex/client.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | var multiplex = Reveal.getConfig().multiplex;
3 | var socketId = multiplex.id;
4 | var socket = io.connect(multiplex.url);
5 |
6 | socket.on(multiplex.id, function(data) {
7 | // ignore data from sockets that aren't ours
8 | if (data.socketId !== socketId) { return; }
9 | if( window.location.host === 'localhost:1947' ) return;
10 |
11 | Reveal.setState(data.state);
12 | });
13 | }());
14 |
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/plugin/multiplex/client.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | var multiplex = Reveal.getConfig().multiplex;
3 | var socketId = multiplex.id;
4 | var socket = io.connect(multiplex.url);
5 |
6 | socket.on(multiplex.id, function(data) {
7 | // ignore data from sockets that aren't ours
8 | if (data.socketId !== socketId) { return; }
9 | if( window.location.host === 'localhost:1947' ) return;
10 |
11 | Reveal.setState(data.state);
12 | });
13 | }());
14 |
--------------------------------------------------------------------------------
/snippets/JavaScript-Get-URL-Hash-Parameters.js:
--------------------------------------------------------------------------------
1 | // -> Object
2 | helpers.getHashParams = function() {
3 | var hashParams = {};
4 | var e,
5 | a = /\+/g, // Regex for replacing addition symbol with a space
6 | r = /([^&;=]+)=?([^&;]*)/g,
7 | d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
8 | q = window.location.hash.substring(1);
9 | while (e = r.exec(q))
10 | hashParams[d(e[1])] = d(e[2]);
11 | return hashParams;
12 | };
--------------------------------------------------------------------------------
/snippets/Node-Detect-Module-Execution-Context.js:
--------------------------------------------------------------------------------
1 | /*
2 | DESCRIPTION: DETECT IF CODE IS RUN DIRECTLY VIA node OR VIA require()
3 | AUTHOR: https://github.com/pbrandt1
4 | */
5 |
6 | if ( ! module.parent ) {
7 |
8 | // ran with `node something.js`
9 | app.listen(8088, function() {
10 | console.log('app listening on port 8088');
11 | })
12 |
13 | } else {
14 |
15 | // used with `require('/.something.js')`
16 | module.exports = app;
17 |
18 | }
--------------------------------------------------------------------------------
/snippets/JavaScript-Array-Intersect.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Array Intersection
3 | * @param {array} array_1
4 | * @param {array} array_2
5 | * @return {array}
6 | */
7 | function intersection( array_1, array_2 ) {
8 |
9 | var _array = [];
10 |
11 | for ( var i in array_1 ) {
12 |
13 | var element = array_1[i];
14 |
15 | if ( array_2.indexOf( element ) > -1 ) {
16 |
17 | _array.push( element );
18 |
19 | }
20 |
21 | }
22 |
23 | return _array;
24 |
25 | }
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/de/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "JavaScript Garden",
3 | "langTitle": "JavaScript Garden in Deutsch",
4 | "description": "Ein Guide über JavaScript's Ecken und Kanten.",
5 | "sections": [
6 | {
7 | "title": "Einführung",
8 | "dir": "intro",
9 | "articles": [
10 | "authors",
11 | "contributors",
12 | "license"
13 | ]
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zh/intro/license.md:
--------------------------------------------------------------------------------
1 | ##许可
2 |
3 | JavaScript 秘密花园在 [MIT license][1] 许可协议下发布,并存放在 [GitHub][2] 开源社区。
4 | 如果你发现错误,请[新建一个任务单][3]或者发一个抓取请求(Pull Request)。
5 | 你也可以在 Stack Overflow 的 [JavaScript 聊天室][4]找到我们。
6 |
7 | [1]: https://github.com/BonsaiDen/JavaScript-Garden/blob/next/LICENSE
8 | [2]: https://github.com/BonsaiDen/JavaScript-Garden
9 | [3]: https://github.com/BonsaiDen/JavaScript-Garden/issues
10 | [4]: http://chat.stackoverflow.com/rooms/17/javascript
11 |
12 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zh/intro/index.md:
--------------------------------------------------------------------------------
1 | ##简介
2 |
3 | **JavaScript 秘密花园**是一个不断更新,主要关心 JavaScript 一些古怪用法的文档。
4 | 对于如何避免常见的错误,难以发现的问题,以及性能问题和不好的实践给出建议,
5 | 初学者可以籍此深入了解 JavaScript 的语言特性。
6 |
7 | JavaScript 秘密花园**不是**用来教你 JavaScript。为了更好的理解这篇文章的内容,
8 | 你需要事先学习 JavaScript 的基础知识。在 Mozilla 开发者网络中有一系列非常棒的 JavaScript 学习[向导][1]。
9 |
10 | > **译者注:** 文中提到的 ES5 是 ECMAScript 5 的简写,是 ECMAScript 标准语言的下一版本,正在开发中。
11 | JavaScript 是此标准语言的一个方言。
12 |
13 | [1]: https://developer.mozilla.org/en/JavaScript/Guide
14 |
15 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/plugin/multiplex/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "reveal-js-multiplex",
3 | "version": "1.0.0",
4 | "description": "reveal.js multiplex server",
5 | "homepage": "http://revealjs.com",
6 | "scripts": {
7 | "start": "node index.js"
8 | },
9 | "engines": {
10 | "node": "~4.1.1"
11 | },
12 | "dependencies": {
13 | "express": "~4.13.3",
14 | "grunt-cli": "~0.1.13",
15 | "mustache": "~2.2.1",
16 | "socket.io": "~1.3.7"
17 | },
18 | "license": "MIT"
19 | }
20 |
--------------------------------------------------------------------------------
/snippets/Node-Parse-File-By-Line.coffee:
--------------------------------------------------------------------------------
1 | fs = require('fs')
2 | readline = require('readline')
3 | filename = '/path/to/file'
4 |
5 | read = readline.createInterface(
6 | input: fs.createReadStream(filename)
7 | output: process.stdout
8 | terminal: false)
9 |
10 | read.on 'line', (line) ->
11 | console.log line
12 |
13 | read.on 'close', ->
14 | console.log 'Finished parsing ' + filename
15 |
16 | ### http://stackoverflow.com/questions/6156501/read-a-file-one-line-at-a-time-in-node-js ###
17 |
18 |
--------------------------------------------------------------------------------
/snippets/Node-Create-Folder.js:
--------------------------------------------------------------------------------
1 | var fs = require('fs');
2 | var dir = './tmp';
3 |
4 | function dirExistsSync(d) {
5 | try {
6 | fs.statSync(d).isDirectory();
7 | return true;
8 | } catch (e) {
9 | return false;
10 | }
11 | }
12 |
13 | if ( ! dirExistsSync(dir) ){
14 | console.log( "Creating directory " + dir );
15 | fs.mkdirSync( dir );
16 | }
17 |
18 | /* Deprecated: fs.exists, fs.existsSync
19 |
20 | if ( ! fs.existsSync( dir ) ){
21 |
22 | fs.mkdirSync( dir );
23 |
24 | }
25 |
26 | */
27 |
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/plugin/multiplex/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "reveal-js-multiplex",
3 | "version": "1.0.0",
4 | "description": "reveal.js multiplex server",
5 | "homepage": "http://revealjs.com",
6 | "scripts": {
7 | "start": "node index.js"
8 | },
9 | "engines": {
10 | "node": "~4.1.1"
11 | },
12 | "dependencies": {
13 | "express": "~4.13.3",
14 | "grunt-cli": "~0.1.13",
15 | "mustache": "~2.2.1",
16 | "socket.io": "~1.3.7"
17 | },
18 | "license": "MIT"
19 | }
20 |
--------------------------------------------------------------------------------
/snippets/Express-CORS.js:
--------------------------------------------------------------------------------
1 | // METHOD #1
2 |
3 | app.all( '*', function(req, res, next) {
4 | res.header("Access-Control-Allow-Origin", "*");
5 | res.header("Access-Control-Allow-Headers", "X-Requested-With");
6 | next();
7 | });
8 |
9 | // METHOD #2: USING A (GENERAL) ROUTER
10 |
11 | var router = express.Router();
12 |
13 | router.use(function(req,res,next){
14 | res.header( "Access-Control-Allow-Origin", "*" );
15 | res.header( "Access-Control-Allow-Headers", "X-Requested-With" );
16 | next();
17 | });
18 |
19 |
--------------------------------------------------------------------------------
/snippets/Node-Request.coffee:
--------------------------------------------------------------------------------
1 | # npm install request
2 |
3 | request = require "request"
4 |
5 | request 'http://www.google.com', (error, response, body)->
6 |
7 | if ( !error and response.statusCode is 200 ) then console.log body
8 |
9 | # REQUEST WITH OPTIONS
10 | options =
11 | url : "http://google.com"
12 | qs : {}
13 |
14 | request options, (error, response, body)->
15 |
16 |
17 | # PIPING TO A FILE
18 | destination = fs.createWriteStream './google.html'
19 | request( "http://google.com" ).pipe(destination)
20 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/plugin/markdown/example.md:
--------------------------------------------------------------------------------
1 | # Markdown Demo
2 |
3 |
4 |
5 | ## External 1.1
6 |
7 | Content 1.1
8 |
9 | Note: This will only appear in the speaker notes window.
10 |
11 |
12 | ## External 1.2
13 |
14 | Content 1.2
15 |
16 |
17 |
18 | ## External 2
19 |
20 | Content 2.1
21 |
22 |
23 |
24 | ## External 3.1
25 |
26 | Content 3.1
27 |
28 |
29 | ## External 3.2
30 |
31 | Content 3.2
32 |
33 |
34 | ## External 3.3
35 |
36 | 
37 |
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/plugin/markdown/example.md:
--------------------------------------------------------------------------------
1 | # Markdown Demo
2 |
3 |
4 |
5 | ## External 1.1
6 |
7 | Content 1.1
8 |
9 | Note: This will only appear in the speaker notes window.
10 |
11 |
12 | ## External 1.2
13 |
14 | Content 1.2
15 |
16 |
17 |
18 | ## External 2
19 |
20 | Content 2.1
21 |
22 |
23 |
24 | ## External 3.1
25 |
26 | Content 3.1
27 |
28 |
29 | ## External 3.2
30 |
31 | Content 3.2
32 |
33 |
34 | ## External 3.3
35 |
36 | 
37 |
--------------------------------------------------------------------------------
/snippets/Node-Request.js:
--------------------------------------------------------------------------------
1 | // Generated by CoffeeScript 1.10.0
2 | var destination, options, request;
3 |
4 | request = require("request");
5 |
6 | request('http://www.google.com', function(error, response, body) {
7 | if (!error && response.statusCode === 200) {
8 | return console.log(body);
9 | }
10 | });
11 |
12 | options = {
13 | url: "http://google.com",
14 | qs: {}
15 | };
16 |
17 | request(options, function(error, response, body) {});
18 |
19 | destination = fs.createWriteStream('./google.html');
20 |
21 | request("http://google.com").pipe(destination);
22 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/fi/intro/license.md:
--------------------------------------------------------------------------------
1 | ## Lisenssi
2 |
3 | JavaScript-puutarha on julkaistu [MIT-lisenssin][1]-alaisena ja se on saatavilla [GitHubissa][2]. Mikäli löydät virheitä, lisää se [seurantajärjestelmään][3] tai tee `pull`-pyyntö. Löydät meidät myös [JavaScript huoneesta][4] Stack Overflown chatista.
4 |
5 | [1]: https://github.com/BonsaiDen/JavaScript-Garden/blob/next/LICENSE
6 | [2]: https://github.com/BonsaiDen/JavaScript-Garden
7 | [3]: https://github.com/BonsaiDen/JavaScript-Garden/issues
8 | [4]: http://chat.stackoverflow.com/rooms/17/javascript
9 |
10 |
--------------------------------------------------------------------------------
/snippets/Node-Cheerio-Simple-Scraping.js:
--------------------------------------------------------------------------------
1 | // Generated by CoffeeScript 1.10.0
2 | var cheerio, request, url;
3 |
4 | request = require('request');
5 |
6 | cheerio = require('cheerio');
7 |
8 | url = 'http://www.company.com/jobs/';
9 |
10 | request(url, function(err, resp, body) {
11 | var $, companyName, companyNameText;
12 | $ = cheerio.load(body);
13 | companyName = $('.company');
14 | companyNameText = companyName.text();
15 | return $('.company').filter(function() {
16 | var data, dataText;
17 | data = $(this);
18 | dataText = data.text();
19 | });
20 | });
21 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/de/intro/license.md:
--------------------------------------------------------------------------------
1 | ## License
2 |
3 | JavaScript Garden is published under the [MIT license][1] and hosted on
4 | [GitHub][2]. If you find errors or typos please [file an issue][3] or a pull
5 | request on the repository. You can also find us in the [JavaScript room][4] on
6 | Stack Overflow chat.
7 |
8 | [1]: https://github.com/BonsaiDen/JavaScript-Garden/blob/next/LICENSE
9 | [2]: https://github.com/BonsaiDen/JavaScript-Garden
10 | [3]: https://github.com/BonsaiDen/JavaScript-Garden/issues
11 | [4]: http://chat.stackoverflow.com/rooms/17/javascript
12 |
13 |
--------------------------------------------------------------------------------
/snippets/RegExp-Parse-CSS.js:
--------------------------------------------------------------------------------
1 | var regexpCSS = /([\s\S]*?){([\s\S]*?)}/;
2 |
3 | var css = " .someclass { margin: 10px; padding: 20px; }";
4 | var match = regexpCSS.exec(css);
5 |
6 | console.log(
7 |
8 | "\n Selector:", match[1],
9 | "\n Declaration Block / Rules:", match[2]
10 |
11 | );
12 |
13 | // See it in action: https://regex101.com/r/sQ2fZ2/1
14 |
15 | // MEDIA QUERIES
16 | // var regexpCSS_Media_Query = /((\s*?@media[\s\S]*?){([\s\S]*?)}\s*?})|(([\s\S]*?){([\s\S]*?)})/;
17 |
18 | /* Reference: http://www.devbattles.com/en/sand/post-1423-Writing+a+CSS+Parser+in+JavaScript */
19 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ru/intro/license.md:
--------------------------------------------------------------------------------
1 | ## Лицензия
2 |
3 | JavaScript Гарден распространяется под [лицензией MIT][1] и располагается на [GitHub][2]. Если вы найдёте ошибку или опечатку, пожалуйста [сообщите нам о ней][3] или запросите права на загрузку в репозиторий. Кроме того, вы можете найти нас в [комнате JavaScript][4] среди чатов Stack Overflow.
4 |
5 | [1]: https://github.com/BonsaiDen/JavaScript-Garden/blob/next/LICENSE
6 | [2]: https://github.com/BonsaiDen/JavaScript-Garden
7 | [3]: https://github.com/BonsaiDen/JavaScript-Garden/issues
8 | [4]: http://chat.stackoverflow.com/rooms/17/javascript
9 |
10 |
--------------------------------------------------------------------------------
/snippets/Gulp-Minify-CSS.js:
--------------------------------------------------------------------------------
1 | /*** CONCATENATE AND MINIFY CSS FILES ***/
2 |
3 | // INSTALL:
4 | // $> npm install gulp gulp-concat gulp-autoprefixer gulp-minify-css
5 |
6 | var gulp = require('gulp');
7 | var concat = require('gulp-concat');
8 | var autoprefix = require('gulp-autoprefixer');
9 | var minifyCSS = require('gulp-minify-css');
10 |
11 | gulp.task('styles',function(){
12 | gulp.src(['./src/styles/*.css'])
13 | .pipe(concat('styles.css'))
14 | .pipe(autoprefix('last 2 versions'))
15 | .pipe(minifyCSS())
16 | .pipe(gulp.dest('./build/styles/'));
17 | });
18 |
19 | // RUN:
20 | // $> gulp styles
21 |
--------------------------------------------------------------------------------
/snippets/Node-HTTPS-Save-File.js:
--------------------------------------------------------------------------------
1 | var https = require('https');
2 | var fs = require('fs');
3 | var options = {
4 | hostname : 'wordpress.org',
5 | port : 443,
6 | path : '/latest.zip',
7 | method : 'GET'
8 | };
9 |
10 | var file = fs.createWriteStream("wp_latest.zip");
11 |
12 | var req = https.request(options, function(res) {
13 | console.log("statusCode: ", res.statusCode);
14 | console.log("headers: ", res.headers);
15 | res.on('data', function(d) {
16 | file.write(d);
17 | });
18 | });
19 | req.end();
20 |
21 | req.on('error', function(e) {
22 | console.error(e);
23 | });
24 |
--------------------------------------------------------------------------------
/snippets/NodeWebKit-Execute-Binaries.js:
--------------------------------------------------------------------------------
1 | // EXECUTE BINARIES
2 |
3 | var execFile = require('child_process').execFile;
4 | var child;
5 |
6 | child = execFile(filePath, function( error, stdout, stderr ) {
7 |
8 | if (error) {
9 | console.log(error.stack);
10 | console.log('Error code: '+ error.code);
11 | console.log('Signal received: ' + error.signal);
12 | }
13 | console.log('Child Process stdout: '+ stdout);
14 | console.log('Child Process stderr: '+ stderr);
15 |
16 | });
17 |
18 | child.on( 'exit', function ( code ) {
19 | console.log( 'Child process exited with exit code ' + code );
20 | });
--------------------------------------------------------------------------------
/snippets/Node-Parse-File-By-Line.js:
--------------------------------------------------------------------------------
1 | var fs = require('fs');
2 | var readline = require('readline');
3 | var filename = '/path/to/file';
4 |
5 | var read = readline.createInterface({
6 |
7 | input : fs.createReadStream( filename ),
8 | output : process.stdout,
9 | terminal : false
10 |
11 | });
12 |
13 | read.on( 'line', function(line) {
14 |
15 | console.log( line );
16 |
17 | });
18 |
19 | read.on( 'close', function() {
20 |
21 | console.log( "Finished parsing " + filename );
22 |
23 | });
24 |
25 | /* http://stackoverflow.com/questions/6156501/read-a-file-one-line-at-a-time-in-node-js */
26 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/pl/intro/license.md:
--------------------------------------------------------------------------------
1 | ## Licencja
2 |
3 | JavaScript Garden jest publikowany w ramach [licencji MIT] [1] i kod źródłowy znajduje
4 | się na serwerze [GitHub] [2]. Jeśli znajdziesz jakieś błędy lub literówki, zgłoś proszę
5 | [problem] [3] lub rozwiąż go i zgloś pull request ze swojego repozytorium.
6 | Możesz nas także znaleźć w pokoju [JavaScript] [4] na chacie Stack Overflow.
7 |
8 | [1]: https://github.com/BonsaiDen/JavaScript-Garden/blob/next/LICENSE
9 | [2]: https://github.com/BonsaiDen/JavaScript-Garden
10 | [3]: https://github.com/BonsaiDen/JavaScript-Garden/issues
11 | [4]: http://chat.stackoverflow.com/rooms/17/javascript
12 |
--------------------------------------------------------------------------------
/SublimeTextSnippets/BackboneCoffee.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
13 | ]]>
14 | bbcoffee
15 |
16 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/fi/intro/index.md:
--------------------------------------------------------------------------------
1 | ## Johdanto
2 |
3 | **JavaScript-puutarha** sisältää kasvavan kokoelman JavaScriptin ongelmallisiin osiin liittyvää dokumentaatiota. Se tarjoaa vinkkejä, joiden avulla välttää yleisiä virheitä, bugeja sekä suorituskykyongelmia ja huonoja tapoja, joita aloittelevat JavaScript-ohjelmoijat saattavat kohdata kieleen tutustuessaan.
4 |
5 | JavaScript-puutarha **ei** tähtää itse kielen opettamiseen. On suositeltavaa, että lukija ymmärtää jo kielen perusteet ennen itse tekstin lukemista. Nämä perusteet voit oppia esimerkiksi perehtymällä Mozilla Developer Networkin erinomaiseen [oppaaseen][1].
6 |
7 | [1]: https://developer.mozilla.org/en/JavaScript/Guide
8 |
9 |
--------------------------------------------------------------------------------
/snippets/Node-cURL.js:
--------------------------------------------------------------------------------
1 | function download_file_curl(file_url) {
2 |
3 | var file_name = url.parse(file_url).pathname.split('/').pop(); // EXTRACT FILENAME
4 | var file = fs.createWriteStream(DOWNLOAD_DIR + file_name);
5 | var curl = spawn('curl', [file_url]);
6 | curl.stdout.on('data', function(data) { file.write(data); }); // Add data event listener for spawned curl instance
7 | curl.stdout.on('end', function(data) { // Close writable stream
8 | file.end();
9 | console.log(file_name + ' downloaded to ' + DOWNLOAD_DIR);
10 | });
11 | curl.on('exit', function(code) {
12 | if (code != 0) {
13 | console.log('Failed: ' + code);
14 | }
15 | });
16 | };
--------------------------------------------------------------------------------
/snippets/Node-Download-File.js:
--------------------------------------------------------------------------------
1 | // Generated by CoffeeScript 1.9.3
2 | var download, fs, http;
3 |
4 | http = require('https');
5 |
6 | fs = require('fs');
7 |
8 | download = function(url, dest, cb) {
9 | var file, request;
10 | file = fs.createWriteStream(dest);
11 | request = http.get(url, function(response) {
12 | console.log("Downloading...");
13 | response.pipe(file);
14 | file.on('finish', function() {
15 | file.close(cb);
16 | console.log("Download finished.");
17 | });
18 | }).on('error', function(err) {
19 | fs.unlink(dest);
20 | if (cb) {
21 | cb(err.message);
22 | }
23 | });
24 | };
25 |
26 | download("https://wordpress.org/latest.zip", "./latest.zip");
27 |
--------------------------------------------------------------------------------
/snippets/Node-Download-File.coffee:
--------------------------------------------------------------------------------
1 | http = require('https')
2 | fs = require('fs')
3 |
4 | download = (url, dest, cb) ->
5 | file = fs.createWriteStream(dest)
6 | request = http.get(url, (response) ->
7 | console.log "Downloading..."
8 | response.pipe file
9 | file.on 'finish', ->
10 | file.close cb
11 | console.log "Download finished."
12 | # close() is async, call cb after close completes.
13 | return
14 | return
15 | ).on('error', (err) ->
16 | # Handle errors
17 | fs.unlink dest
18 | # Delete the file async. (But we don't check the result)
19 | if cb
20 | cb err.message
21 | return
22 | )
23 | return
24 |
25 | download "https://wordpress.org/latest.zip", "./latest.zip"
--------------------------------------------------------------------------------
/resources/youtube/react.custom.hooks.useClock/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-boilerplate-template",
3 | "version": "1.0.0",
4 | "description": "",
5 | "keywords": [],
6 | "main": "src/index.js",
7 | "dependencies": {
8 | "react": "18.1.0",
9 | "react-dom": "18.1.0",
10 | "react-scripts": "4.0.0"
11 | },
12 | "devDependencies": {
13 | "@babel/runtime": "7.13.8",
14 | "typescript": "4.1.3"
15 | },
16 | "scripts": {
17 | "start": "react-scripts start",
18 | "build": "react-scripts build",
19 | "test": "react-scripts test --env=jsdom",
20 | "eject": "react-scripts eject"
21 | },
22 | "browserslist": [
23 | ">0.2%",
24 | "not dead",
25 | "not ie <= 11",
26 | "not op_mini all"
27 | ]
28 | }
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/pl/intro/index.md:
--------------------------------------------------------------------------------
1 | ## Wstęp
2 | **JavaScript Garden** jest rosnącą kolekcją dokumentów o najdziwniejszych
3 | częściach języka JavaScript. Dokumentacja pomaga uniknąć najczęściej popełnianych
4 | błędów, sybtelnych bugów, problemów wydajnościowych oraz złych praktyk, na które
5 | niedoświadczeni programiści JavaScript mogą natrafić próbując poznać tajniki tego
6 | języka.
7 |
8 | JavaScript Garden **nie** ma na celu nauczyć Cię języka JavaScript. Podstawowa
9 | wiedza na temat języka jest wymagana do zrozumienia zagadnień poruszanych w tym
10 | przewodniku. Aby nauczyć się podstaw jezyka JavaScript, odwiedź znakomity
11 | [przewodnik][1] na stronach Mozilla Developer Network.
12 |
13 | [1]: https://developer.mozilla.org/en/JavaScript/Guide
14 |
--------------------------------------------------------------------------------
/resources/youtube/intro.to.react.custom.hooks/source/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-c12-29062022",
3 | "version": "1.0.0",
4 | "description": "",
5 | "keywords": [],
6 | "main": "src/index.js",
7 | "dependencies": {
8 | "react": "18.1.0",
9 | "react-dom": "18.1.0",
10 | "react-query": "3.39.1",
11 | "react-scripts": "4.0.0"
12 | },
13 | "devDependencies": {
14 | "@babel/runtime": "7.13.8",
15 | "typescript": "4.1.3"
16 | },
17 | "scripts": {
18 | "start": "react-scripts start",
19 | "build": "react-scripts build",
20 | "test": "react-scripts test --env=jsdom",
21 | "eject": "react-scripts eject"
22 | },
23 | "browserslist": [
24 | ">0.2%",
25 | "not dead",
26 | "not ie <= 11",
27 | "not op_mini all"
28 | ]
29 | }
--------------------------------------------------------------------------------
/snippets/Gulp-Minify-Javascript.js:
--------------------------------------------------------------------------------
1 | /*** CONCATENATE AND MINIFY JAVASCRIPT FILES ***/
2 |
3 | // INSTALL:
4 | // $> npm install gulp gulp-concat gulp-strip-debug gulp-rename gulp-uglify --save-dev
5 |
6 | var gulp = require('gulp');
7 | var concat = require('gulp-concat');
8 | var stripDebug = require('gulp-strip-debug');
9 | var rename = require('gulp-rename');
10 | var uglify = require('gulp-uglify');
11 |
12 | gulp.task('scripts',function(){
13 | gulp.src(['./src/scripts/lib.js','./src/scripts/*.js'])
14 | .pipe(concat('script.js'))
15 | .pipe(stripDebug())
16 | .pipe(uglify())
17 | .pipe(rename({suffix: '.min'}))
18 | .pipe(gulp.dest('./build/scripts/'));
19 | });
20 |
21 | gulp.task('default', ['scripts'], function(){});
22 |
23 | // RUN:
24 | // $> gulp scripts
--------------------------------------------------------------------------------
/snippets/RegExp-Parse-URL.js:
--------------------------------------------------------------------------------
1 | (
2 | ( // brackets covering match for protocol (optional) and domain
3 | ([A-Za-z]{3,9}:(?:\/\/)?) // match protocol, allow in format http:// or mailto:
4 | (?:[\-;:&=\+\$,\w]+@)? // allow something@ for email addresses
5 | [A-Za-z0-9\.\-]+ // anything looking at all like a domain, non-unicode domains
6 | | // or instead of above
7 | (?:www\.|[\-;:&=\+\$,\w]+@) // starting with something@ or www.
8 | [A-Za-z0-9\.\-]+ // anything looking at all like a domain
9 | )
10 | ( // brackets covering match for path, query string and anchor
11 | (?:\/[\+~%\/\.\w\-]*) // allow optional /path
12 | ?\??(?:[\-\+=&;%@\.\w]*) // allow optional query string starting with ?
13 | #?(?:[\.\!\/\\\w]*) // allow optional anchor #anchor
14 | )? // make URL suffix optional
15 | )
--------------------------------------------------------------------------------
/snippets/JavaScript-ConsoleLog-Line.js:
--------------------------------------------------------------------------------
1 | /*
2 | Did you ever have phantom console.log - or more specifically you've no idea where it was happening?
3 |
4 | This tiny bit of code will help you identify where the logging is being called from.
5 | The nice thing is it works in the browser and in node.
6 |
7 | Source: http://remysharp.com/2014/05/23/where-is-that-console-log
8 | */
9 |
10 |
11 | ['log', 'warn'].forEach(function(method) {
12 | var old = console[method];
13 | console[method] = function() {
14 | var stack = (new Error()).stack.split(/\n/);
15 | // Chrome includes a single "Error" line, FF doesn't.
16 | if (stack[0].indexOf('Error') === 0) {
17 | stack = stack.slice(1);
18 | }
19 | var args = [].slice.apply(arguments).concat([stack[1].trim()]);
20 | return old.apply(console, args);
21 | };
22 | });
--------------------------------------------------------------------------------
/snippets/Node-Download-With-Progress-Bar.js:
--------------------------------------------------------------------------------
1 | // npm install progress [https://github.com/tj/node-progress]
2 |
3 | var ProgressBar = require('progress');
4 | var https = require('https');
5 |
6 | var req = https.request({
7 | host: 'download.github.com',
8 | port: 443,
9 | path: '/visionmedia-node-jscoverage-0d4608a.zip'
10 | });
11 |
12 | req.on('response', function(res){
13 | var len = parseInt(res.headers['content-length'], 10);
14 |
15 | console.log();
16 | var bar = new ProgressBar(' downloading [:bar] :percent :etas', {
17 | complete: '=',
18 | incomplete: ' ',
19 | width: 20,
20 | total: len
21 | });
22 |
23 | res.on('data', function (chunk) {
24 | bar.tick(chunk.length);
25 | });
26 |
27 | res.on('end', function () {
28 | console.log('\n');
29 | });
30 | });
31 |
32 | req.end();
--------------------------------------------------------------------------------
/resources/youtube/react-i18next.gr/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-d20-08072022",
3 | "version": "1.0.0",
4 | "description": "",
5 | "keywords": [],
6 | "main": "src/index.tsx",
7 | "dependencies": {
8 | "i18next": "21.8.13",
9 | "react": "18.0.0",
10 | "react-dom": "18.0.0",
11 | "react-i18next": "11.18.0",
12 | "react-scripts": "4.0.3"
13 | },
14 | "devDependencies": {
15 | "@types/react": "17.0.20",
16 | "@types/react-dom": "17.0.9",
17 | "typescript": "4.4.2"
18 | },
19 | "scripts": {
20 | "start": "react-scripts start",
21 | "build": "react-scripts build",
22 | "test": "react-scripts test --env=jsdom",
23 | "eject": "react-scripts eject"
24 | },
25 | "browserslist": [
26 | ">0.2%",
27 | "not dead",
28 | "not ie <= 11",
29 | "not op_mini all"
30 | ]
31 | }
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ru/intro/index.md:
--------------------------------------------------------------------------------
1 | ## Вступление
2 |
3 | **JavaScript Гарден** — это постоянно обновляющаяся и растущая документация по самым заковыристым темам языка JavaScript. В ней вы найдёте советы о том, как избежать распространённых ошибок и предсказать появление тех или иных багов. В документации подробно освещены проблемы оптимизации и нерекомендуемые практики с которыми, продираясь к глубинам языка, могут столкнуться даже просвещённые JavaScript-программисты.
4 |
5 | JavaScript Гарден **не** имеет цели научить вас языку JavaScript. Вам понадобится реальный опыт работы с языком чтобы понимать темы, рассматриваемые в этом руководстве. Если вам требуется изучить основы языка, пожалуйста внимательно ознакомьтесь с замечательным [руководством][1] на сайте Mozilla Developer Network.
6 |
7 | [1]: https://developer.mozilla.org/en/JavaScript/Guide
8 |
9 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zhtw/array/constructor.md:
--------------------------------------------------------------------------------
1 | ## `Array` 的建構函式
2 |
3 | `Array` 的建構函式在處理參數上一直有模糊的地帶,所以建議使用 `array`的字面語法來使用 - `[]` - 來新增一個的Array
4 |
5 | [1, 2, 3]; // 結果: [1, 2, 3]
6 | new Array(1, 2, 3); // 結果: [1, 2, 3]
7 |
8 | [3]; // 結果: [3]
9 | new Array(3); // 結果: []
10 | new Array('3') // 結果: ['3']
11 |
12 | 在上面的範例 `new Array(3)` 當只有一個參數傳入到 `Array` 的建構函數
13 | 且那個參數是一個數字,建構函數會回傳空值
14 | 但是 `Array` 長度的屬性會變成跟那個參數一樣(以此範例來看他回傳的長度為 3)
15 | **注意** 只有他長度的屬性會被設定,整個 Array裡面的數值都不會初始化
16 |
17 | var arr = new Array(3);
18 | arr[1]; // undefined
19 | 1 in arr; // false, 數值沒有被設定進去
20 |
21 | 被設定用來當做 `Array` 的長度只有少數情況使用
22 | 先設定 `Array` 的長度可以用一下的範例來避免使用 `for loop` 的麻煩
23 |
24 | new Array(count + 1).join(stringToRepeat);
25 |
26 | ### 結語
27 |
28 | `Array` 的建構函式需要避免,建議使用字面語法。因為他們比較簡短、也更增加閱讀性
29 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ko/array/constructor.md:
--------------------------------------------------------------------------------
1 | ## `배열` 생성자
2 |
3 | 배열을 만들때 `배열` 생성자에 파라미터를 넣어 만드는 방법은 헷갈릴수있다. 그래서 항상 각 괄호(`[]`) 노테이션을 이용해 배열을 만들 것을 권한다
4 |
5 | [1, 2, 3]; // Result: [1, 2, 3]
6 | new Array(1, 2, 3); // Result: [1, 2, 3]
7 |
8 | [3]; // Result: [3]
9 | new Array(3); // Result: []
10 | new Array('3') // Result: ['3']
11 |
12 | `배열` 생성자에 숫자를 인자로 넣으면 그 숫자 크기 만큼의 빈 `배열`을 반환한다. 즉 배열의 `length`는 그 숫자가 된다. 이때 생성자는 **단지** `length` 프로퍼티에 그 숫자를 할당하기만 하고 `배열`은 실제로 초기화 하지도 않는다.
13 |
14 | var arr = new Array(3);
15 | arr[1]; // undefined
16 | 1 in arr; // false, 이 인덱스는 초기화되지 않음.
17 |
18 | `for`문을 사용하지 않고 문자열을 더하는 경우에는 length 프로퍼티에 숫자를 할당해주는 기능이 유용할 때도 있다.
19 |
20 | new Array(count + 1).join(stringToRepeat);
21 |
22 | ### 결론
23 |
24 | `배열` 생성자는 가능하면 사용하지 말고, 각 괄호 (`[]`) 노테이션이을 사용하자. 후자가 더 간략하고 명확할 뿐만 아니라 보기도 좋다.
25 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/hu/types/typeof.md:
--------------------------------------------------------------------------------
1 | ## A `typeof` vizsgálat
2 |
3 | A `typeof` operátor (az [`instanceof`](#types.instanceof)-al karöltve)
4 | lehetőség szerint a JavaScript nyelv egyik legnagyobb buktatója, mivel majdnem
5 | teljesen **rosszul működik**.
6 |
7 | Habár az `instanceof`-nak korlátozottan még lehet értelme, a `typeof` operátor
8 | tényleg csak egyetlen praktikus use case-el rendelkezik és ez **nem** az, hogy egy
9 | objektum típusvizsgálatát elvégezzük.
10 |
11 | > **Megjegyzés:** Mivel a `typeof` vizsgálatot ravaszul úgy is le lehet írni,
12 | > mintha egy függvény lenne; `typeof(obj)`, itt jegyezzük meg hogy ez nem
13 | > egy függvényhívás. A zárójelek ebben a kifejezésben úgy működnek mint általában,
14 | > kiértékelik az obj változót és visszaadják az értékét. Ez pedig bekerül a
15 | > `typeof` operandusaként. **Nincsen** `typeof` függvény.
--------------------------------------------------------------------------------
/snippets/Node-Zip.js:
--------------------------------------------------------------------------------
1 | // Generated by CoffeeScript 1.9.3
2 | var AdmZip, willSendthis, zip, zipEntries;
3 |
4 | AdmZip = require('adm-zip');
5 |
6 | zip = new AdmZip('./my_file.zip');
7 |
8 | zipEntries = zip.getEntries();
9 |
10 | zipEntries.forEach(function(zipEntry) {
11 | console.log(zipEntry.toString());
12 | if (zipEntry.entryName === 'my_file.txt') {
13 | console.log(zipEntry.data.toString('utf8'));
14 | }
15 | });
16 |
17 | console.log(zip.readAsText('some_folder/my_file.txt'));
18 |
19 | zip.extractEntryTo('some_folder/my_file.txt', '/home/me/tempfolder', false, true);
20 |
21 | zip.extractAllTo('/home/me/zipcontent/', true);
22 |
23 | zip = new AdmZip;
24 |
25 | zip.addFile('test.txt', new Buffer('inner content of the file'), 'entry comment goes here');
26 |
27 | zip.addLocalFile('/home/me/some_picture.png');
28 |
29 | willSendthis = zip.toBuffer();
30 |
31 | zip.writeZip('/home/me/files.zip');
32 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ja/array/constructor.md:
--------------------------------------------------------------------------------
1 | ## `Array`コンストラクター
2 |
3 | `Array`コンストラクターはそのパラメーターの扱い方が曖昧なので、新しい配列を作る時には、常に配列リテラル - `[]`記法 - を使用する事を強くお勧めします。
4 |
5 | [1, 2, 3]; // 結果: [1, 2, 3]
6 | new Array(1, 2, 3); // 結果: [1, 2, 3]
7 |
8 | [3]; // Result: [3]
9 | new Array(3); // 結果: []
10 | new Array('3') // 結果: ['3']
11 |
12 | このケースの場合、`Array`コンストラクターに渡される引数は一つだけですが、その引数は`Number`になります。コンストラクターは、引数に値がセットされた`length`プロパティを伴った新しい*疎*配列を返します。特筆すべきなのは、新しい配列の`length`プロパティ**のみ**が、このようにセットされるという事です。実際の配列のインデックスは初期化されません。
13 |
14 | var arr = new Array(3);
15 | arr[1]; // undefined
16 | 1 in arr; // false, インデックスがセットされていない
17 |
18 | 配列の長さが先行してセットされるという振舞いは、いくつかの場合に便利です。例えば、文字の繰り返しや、`for loop`を使用したコードの回避などの場合です。
19 |
20 | new Array(count + 1).join(stringToRepeat);
21 |
22 | ### 終わりに
23 |
24 | `Array`コンストラクターの使用は出来る限り避けてください。リテラルが当然望ましい形です。それらは、短かく明快な文法をもっている為に、コードの可読性を高めてくれます。
25 |
26 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/js/i18n.js:
--------------------------------------------------------------------------------
1 | function getParameterByName(name) {
2 |
3 | name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
4 | var regex = new RegExp("[\\?&]" + name + "=([^]*)");
5 | var results = regex.exec(location.search);
6 | return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
7 |
8 | }
9 |
10 | function replaceLangContent(langDir) {
11 |
12 | var elems = document.getElementsByClassName("content");
13 | for ( var i = 0; i < elems.length; ++i ) {
14 | var item = elems[i];
15 | var langFile = item.getAttribute("id")
16 | var fileFormat = item.hasAttribute("data-markdown") ? ".md" : ".html"
17 | item.setAttribute("data-markdown", langDir + "/" + langFile + fileFormat)
18 | }
19 |
20 | }
21 |
22 | if ( window.location.search.match(/lang/gi) ) {
23 |
24 | var langCode = getParameterByName("lang");
25 | var langDir = "../libs/reveal.js/i18n/" + langCode;
26 | replaceLangContent(langDir);
27 |
28 | }
--------------------------------------------------------------------------------
/resources/youtube/react.custom.hooks.useClock/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
12 |
20 | React App
21 |
22 |
23 |
24 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/resources/youtube/intro.to.react.custom.hooks/source/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
12 |
20 | React App
21 |
22 |
23 |
24 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Javascript Garden
2 |
3 | 1. We're about Javascript AKA [ECMA script](http://www.ecma-international.org/ecma-262/5.1/) not a specific implementation. So we don't cover issues specific to one environment or interpreter, like browsers or V8 for node.
4 | 1. Micro-performance is out of scope: anything that's not a result of essential algorithmic complexity (e.g O(log n) vs O(n^2)) is down to a specific version of a specific interpreter (see 1).
5 | 1. Please test code examples to ensure they work, there's nothing more confusing than incorrect examples!
6 | 1. Contributing to JS Garden makes you a fantastic person, and Brendan Eich will find you immensely attractive.
7 |
8 | Thank you for being kind enough to help out!
9 |
10 | ## Testing locally
11 |
12 | 1. Run `npm run build` to build
13 | 1. Run a webserver from the root of the repo to view
14 |
15 | ## Getting changes merged
16 |
17 | 1. Squash your changes into one commit
18 | 1. Make sure the site still works :)
19 | 1. Make a PR
20 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zh/types/instanceof.md:
--------------------------------------------------------------------------------
1 | ##`instanceof` 操作符
2 |
3 | `instanceof` 操作符用来比较两个操作数的构造函数。只有在比较自定义的对象时才有意义。
4 | 如果用来比较内置类型,将会和 [`typeof` 操作符](#types.typeof) 一样用处不大。
5 |
6 | ###比较自定义对象
7 |
8 | function Foo() {}
9 | function Bar() {}
10 | Bar.prototype = new Foo();
11 |
12 | new Bar() instanceof Bar; // true
13 | new Bar() instanceof Foo; // true
14 |
15 | // 如果仅仅设置 Bar.prototype 为函数 Foo 本身,而不是 Foo 构造函数的一个实例
16 | Bar.prototype = Foo;
17 | new Bar() instanceof Foo; // false
18 |
19 | ###`instanceof` 比较内置类型
20 |
21 | new String('foo') instanceof String; // true
22 | new String('foo') instanceof Object; // true
23 |
24 | 'foo' instanceof String; // false
25 | 'foo' instanceof Object; // false
26 |
27 | 有一点需要注意,`instanceof` 用来比较属于不同 JavaScript 上下文的对象(比如,浏览器中不同的文档结构)时将会出错,
28 | 因为它们的构造函数不会是同一个对象。
29 |
30 | ### 结论
31 |
32 | `instanceof` 操作符应该**仅仅**用来比较来自同一个 JavaScript 上下文的自定义对象。
33 | 正如 [`typeof`](#types.typeof) 操作符一样,任何其它的用法都应该是避免的。
34 |
35 | [30]: http://cnblogs.com/sanshi/
36 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zhtw/types/instanceof.md:
--------------------------------------------------------------------------------
1 | ## `instanceof` 操作符
2 |
3 | `instanceof` 操作符用來比較兩個建構函數的操作數。只有在比較自定義的物件時才有意義。這和 [typeof operator](#types.typeof)一樣用處不大。
4 |
5 | ### 比較定意義物件
6 |
7 | function Foo() {}
8 | function Bar() {}
9 | Bar.prototype = new Foo();
10 |
11 | new Bar() instanceof Bar; // true
12 | new Bar() instanceof Foo; // true
13 |
14 | // This just sets Bar.prototype to the function object Foo,
15 | // but not to an actual instance of Foo
16 | Bar.prototype = Foo;
17 | new Bar() instanceof Foo; // false
18 |
19 | ### `instanceof` 比較內置類型
20 |
21 | new String('foo') instanceof String; // true
22 | new String('foo') instanceof Object; // true
23 |
24 | 'foo' instanceof String; // false
25 | 'foo' instanceof Object; // false
26 |
27 | 有一點需要注意的, `instanceof` 不會在來自不同的上下文的物件運作(例如:瀏覽器中不同的文檔結構),因為它的建構函數不一樣。
28 |
29 | ### In Conclusion
30 |
31 | `instanceof` 操作符應該 **只** 用來比較同一個 JavaScript 上下文定意義的物件。
32 | 正如 [`typeof`](#types.typeof)操作符一樣,任何其他用法都要避免。
33 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zhtw/core/eval.md:
--------------------------------------------------------------------------------
1 | ## 為什麼不要使用 `eval`
2 |
3 | 因為 `eval` 函數會在 Javascript 的區域性的區間執行那段程式碼。
4 |
5 | var foo = 1;
6 | function test() {
7 | var foo = 2;
8 | eval('foo = 3');
9 | return foo;
10 | }
11 | test(); // 3
12 | foo; // 1
13 |
14 | 但是, `eval` 只接受直接的呼叫而且那個函數只能叫做 `eval`,才能在一個區段中執行。
15 |
16 | var foo = 1;
17 | function test() {
18 | var foo = 2;
19 | var bar = eval;
20 | bar('foo = 3');
21 | return foo;
22 | }
23 | test(); // 2
24 | foo; // 3
25 |
26 | 所有的 `eval` 都應該去比免試用。有 99.9% 的使用情況都可以 **不必** 使用到而達到同等效果。
27 |
28 | ### 偽裝的 `eval`
29 |
30 | [定時函數](#other.timeouts) `setTimeout` 和 `setInterval` 都可以接受一個字串當做他們第一個參數。這些字串 **永遠** 都會在全域範圍內執行,因此在這種情況下 `eval` 沒有被直接的使用。
31 |
32 | ### 安全上的顧慮
33 |
34 | `eval` 同樣有安全上的問題,因為所有的程式碼都可以被直接執行。
35 | 而他不應去執行一串未知的字串或是來自不信任的來源。
36 |
37 | ### 結語
38 |
39 | `eval` 應該永遠不要去只用它,任何的程式在被他執行後都有性能和安全上的考慮。如果有情況需要去使用他,他都不應該列為第一順位的解決方法。
40 |
41 | 應該有更好的方法能夠去使用,但是最好都不要去使用 `eval`。
42 |
43 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ko/types/instanceof.md:
--------------------------------------------------------------------------------
1 | ## `instanceof` 연산자
2 |
3 | `instanceof`연산자는 두 피연산자의 생성자를 비교할때 사용하고 직접 만든 객체를 비교할 때 매우 유용하다. 내장 타입에 쓰는 경우에는 [typeof](#types.typeof)처럼 거의 쓸모가 없다.
4 |
5 | ### 커스텀 객체를 `intanceof`로 비교하기
6 |
7 | function Foo() {}
8 | function Bar() {}
9 | Bar.prototype = new Foo();
10 |
11 | new Bar() instanceof Bar; // true
12 | new Bar() instanceof Foo; // true
13 |
14 | // Bar.prototype에 함수 객체인 Foo를 할당하면
15 | // Bar의 인스턴스는 Foo의 인스턴스가 아니다.
16 | Bar.prototype = Foo;
17 | new Bar() instanceof Foo; // false
18 |
19 | ### 기본 내장 객체 타입을 `intanceof`로 비교하기
20 |
21 | new String('foo') instanceof String; // true
22 | new String('foo') instanceof Object; // true
23 |
24 | 'foo' instanceof String; // false
25 | 'foo' instanceof Object; // false
26 |
27 | JavaScript 컨텍스트마다(웹 브라우저의 도큐먼트 같은) 객체의 생성자는 다를 수밖에 없어서 `instanceof`는 다른 JavaScript 컨텍스트에 있는(웹 브라우저의 다른 도큐먼트에 있는) 객체와는 비교할 수 없다.
28 |
29 | ### 결론
30 |
31 | `instanceof`는 한 JavaScript 컨텍스트 내에서 사용자가 만든 타입의 객체를 비교할 때에만 유용하다. [`typeof`](#types.typeof)처럼 다른 목적으로는 사용하지 않는 것이 좋다.
32 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ja/types/instanceof.md:
--------------------------------------------------------------------------------
1 | ## `instanceof`オペレーター
2 |
3 | `instanceof`オペレーターは2つのオペランドのコンストラクタを比較します。これはカスタムで作ったオブジェクトを比較する時にのみ有用です。組み込みの型に使用するのは[typeof operator](#types.typeof)を使用するのと同じくらい意味がありません。
4 |
5 | ### カスタムオブジェクトの比較
6 |
7 | function Foo() {}
8 | function Bar() {}
9 | Bar.prototype = new Foo();
10 |
11 | new Bar() instanceof Bar; // true
12 | new Bar() instanceof Foo; // true
13 |
14 | // これは単に関数オブジェクトFooにBar.prototypeをセットしただけです。
15 | // しかし、実際のFooのインスタンスではありません。
16 | Bar.prototype = Foo;
17 | new Bar() instanceof Foo; // false
18 |
19 | ### ネイティブ型で`instanceof`を使用する
20 |
21 | new String('foo') instanceof String; // true
22 | new String('foo') instanceof Object; // true
23 |
24 | 'foo' instanceof String; // false
25 | 'foo' instanceof Object; // false
26 |
27 | ここで1つ重要な事は、異なるJavaScriptのコンテキスト(例えば、ブラウザの異なるウィンドウ)を元としたオブジェクトでは、コンストラクタが厳密に同じものでは無い為に`instanceof`は上手く動作しません。
28 |
29 | ### 終わりに
30 |
31 | `instanceof`オペレーターは同じJavaScriptのコンテキストが起源になっているカスタムメイドのオブジェクトを扱う場合**のみ**使うべきです。ちょうど[`typeof`](#types.typeof)オペレーターのように、その他での使用は**避けるべき**です。
32 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zhtw/function/general.md:
--------------------------------------------------------------------------------
1 | ## 函式的宣告和表達方式
2 |
3 | 函式在 JavaScript 是第一等物件。這表示他們可以把函式當做值一樣傳遞。
4 | 一個常見的用法是用 *匿名函式* 當做一個回傳去呼叫另一個函式,這是一種非同步函式
5 |
6 | ### 函式的宣告
7 |
8 | function foo() {}
9 |
10 | 上面的函式在被執行之前會被 [解析(hoisted)](#function.scopes),因此它可以在 **任意** 的地方都是 *有宣告的* ,就算是在比這個函式還早呼叫。
11 |
12 |
13 | foo(); // 可以執行,因為 foo 已經在運行前就被建立
14 | function foo() {}
15 |
16 | ### `function` 的表達式
17 |
18 | var foo = function() {};
19 |
20 | 這個例子把一個 *匿名* 函式賦值給變數 `foo`。
21 |
22 | foo; // 'undefined'
23 | foo(); // 錯誤: TypeError
24 | var foo = function() {};
25 |
26 | 由於 `var` 已經宣告變數 `foo` 在所有的程式碼執行之前。
27 | 所以 `foo`已經在程式運行前就已經被定義過了。
28 | 但是因為賦值只會在運行時去執行,所以在程式碼執行前,`foo` 的值還沒被宣告所以為 [undefined](#core.undefined)。
29 |
30 |
31 | ### 命名函式的賦值表達式
32 |
33 | 另一個特殊狀況是將一個命名函式賦值給一個變數。
34 |
35 | var foo = function bar() {
36 | bar(); // 可以運行
37 | }
38 | bar(); // 錯誤:ReferenceError
39 |
40 | `bar` 不可以在外部的區域被執行,因為它只有在 `foo` 的函式內才可以執行。
41 | 然而在 `bar` 內部還是可以看見。這是由於 JavaScript的 [命名處理](#function.scopes)所致。
42 | 函式名在函式內 *都* 可以使用。
43 |
44 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/plugin/multiplex/master.js:
--------------------------------------------------------------------------------
1 | (function() {
2 |
3 | // Don't emit events from inside of notes windows
4 | if ( window.location.search.match( /receiver/gi ) ) { return; }
5 |
6 | var multiplex = Reveal.getConfig().multiplex;
7 |
8 | var socket = io.connect( multiplex.url );
9 |
10 | function post() {
11 |
12 | var messageData = {
13 | state: Reveal.getState(),
14 | secret: multiplex.secret,
15 | socketId: multiplex.id
16 | };
17 |
18 | socket.emit( 'multiplex-statechanged', messageData );
19 |
20 | };
21 |
22 | // post once the page is loaded, so the client follows also on "open URL".
23 | window.addEventListener( 'load', post );
24 |
25 | // Monitor events that trigger a change in state
26 | Reveal.addEventListener( 'slidechanged', post );
27 | Reveal.addEventListener( 'fragmentshown', post );
28 | Reveal.addEventListener( 'fragmenthidden', post );
29 | Reveal.addEventListener( 'overviewhidden', post );
30 | Reveal.addEventListener( 'overviewshown', post );
31 | Reveal.addEventListener( 'paused', post );
32 | Reveal.addEventListener( 'resumed', post );
33 |
34 | }());
35 |
--------------------------------------------------------------------------------
/snippets/JavaScript-CSS-Same-Column-Height.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | var equalheight = function(container){
4 |
5 | var currentTallest = 0,
6 | currentRowStart = 0,
7 | rowDivs = new Array(),
8 | $el,
9 | topPosition = 0;
10 | $(container).each(function() {
11 |
12 | $el = $(this);
13 | $el.height('auto')
14 | topPosition = $el.position().top;
15 |
16 | if (currentRowStart != topPosition) {
17 | for ( var currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
18 | rowDivs[currentDiv].height(currentTallest);
19 | }
20 | rowDivs.length = 0; // empty the array
21 | currentRowStart = topPosition;
22 | currentTallest = $el.height();
23 | rowDivs.push($el);
24 | } else {
25 | rowDivs.push($el);
26 | currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest);
27 | }
28 | for ( var currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
29 | rowDivs[currentDiv].height(currentTallest);
30 | }
31 | });
32 | }
33 |
34 | $(window).on("load resize", function(){
35 | equalheight('.main article');
36 | });
--------------------------------------------------------------------------------
/learn/libs/reveal.js/css/theme/source/night.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Black theme for reveal.js.
3 | *
4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
5 | */
6 |
7 |
8 | // Default mixins and settings -----------------
9 | @import "../template/mixins";
10 | @import "../template/settings";
11 | // ---------------------------------------------
12 |
13 |
14 | // Include theme-specific fonts
15 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700);
16 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic);
17 |
18 |
19 | // Override theme settings (see ../template/settings.scss)
20 | $backgroundColor: #111;
21 |
22 | $mainFont: 'Open Sans', sans-serif;
23 | $linkColor: #e7ad52;
24 | $linkColorHover: lighten( $linkColor, 20% );
25 | $headingFont: 'Montserrat', Impact, sans-serif;
26 | $headingTextShadow: none;
27 | $headingLetterSpacing: -0.03em;
28 | $headingTextTransform: none;
29 | $selectionBackgroundColor: #e7ad52;
30 |
31 |
32 | // Theme template ------------------------------
33 | @import "../template/theme";
34 | // ---------------------------------------------
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/plugin/multiplex/master.js:
--------------------------------------------------------------------------------
1 | (function() {
2 |
3 | // Don't emit events from inside of notes windows
4 | if ( window.location.search.match( /receiver/gi ) ) { return; }
5 |
6 | var multiplex = Reveal.getConfig().multiplex;
7 |
8 | var socket = io.connect( multiplex.url );
9 |
10 | function post() {
11 |
12 | var messageData = {
13 | state: Reveal.getState(),
14 | secret: multiplex.secret,
15 | socketId: multiplex.id
16 | };
17 |
18 | socket.emit( 'multiplex-statechanged', messageData );
19 |
20 | };
21 |
22 | // post once the page is loaded, so the client follows also on "open URL".
23 | window.addEventListener( 'load', post );
24 |
25 | // Monitor events that trigger a change in state
26 | Reveal.addEventListener( 'slidechanged', post );
27 | Reveal.addEventListener( 'fragmentshown', post );
28 | Reveal.addEventListener( 'fragmenthidden', post );
29 | Reveal.addEventListener( 'overviewhidden', post );
30 | Reveal.addEventListener( 'overviewshown', post );
31 | Reveal.addEventListener( 'paused', post );
32 | Reveal.addEventListener( 'resumed', post );
33 |
34 | }());
35 |
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/css/theme/source/night.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Black theme for reveal.js.
3 | *
4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
5 | */
6 |
7 |
8 | // Default mixins and settings -----------------
9 | @import "../template/mixins";
10 | @import "../template/settings";
11 | // ---------------------------------------------
12 |
13 |
14 | // Include theme-specific fonts
15 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700);
16 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic);
17 |
18 |
19 | // Override theme settings (see ../template/settings.scss)
20 | $backgroundColor: #111;
21 |
22 | $mainFont: 'Open Sans', sans-serif;
23 | $linkColor: #e7ad52;
24 | $linkColorHover: lighten( $linkColor, 20% );
25 | $headingFont: 'Montserrat', Impact, sans-serif;
26 | $headingTextShadow: none;
27 | $headingLetterSpacing: -0.03em;
28 | $headingTextTransform: none;
29 | $selectionBackgroundColor: #e7ad52;
30 |
31 |
32 | // Theme template ------------------------------
33 | @import "../template/theme";
34 | // ---------------------------------------------
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zh/function/general.md:
--------------------------------------------------------------------------------
1 | ##函数声明与表达式
2 |
3 | 函数是 JavaScript 中的一等对象,这意味着可以把函数像其它值一样传递。
4 | 一个常见的用法是把*匿名函数*作为回调函数传递到异步函数中。
5 |
6 | ###函数声明
7 |
8 | function foo() {}
9 |
10 | 上面的方法会在执行前被 [解析(hoisted)](#function.scopes),因此它存在于当前上下文的*任意*一个地方,
11 | 即使在函数定义体的上面被调用也是对的。
12 |
13 | foo(); // 正常运行,因为 foo 在代码运行前已经被创建
14 | function foo() {}
15 |
16 | ### 函数赋值表达式
17 |
18 | var foo = function() {};
19 |
20 | 这个例子把一个*匿名*的函数赋值给变量 `foo`。
21 |
22 | foo; // 'undefined'
23 | foo(); // 出错:TypeError
24 | var foo = function() {};
25 |
26 | 由于 `var` 定义了一个声明语句,对变量 `foo` 的解析是在代码运行之前,因此 `foo` 变量在代码运行时已经被定义过了。
27 |
28 | 但是由于赋值语句只在运行时执行,因此在相应代码执行之前, `foo` 的值缺省为 [undefined](#core.undefined)。
29 |
30 | ###命名函数的赋值表达式
31 |
32 | 另外一个特殊的情况是将命名函数赋值给一个变量。
33 |
34 | var foo = function bar() {
35 | bar(); // 正常运行
36 | }
37 | bar(); // 出错:ReferenceError
38 |
39 | `bar` 函数声明外是不可见的,这是因为我们已经把函数赋值给了 `foo`;
40 | 然而在 `bar` 内部依然可见。这是由于 JavaScript 的 [命名处理](#function.scopes) 所致,
41 | 函数名在函数内*总是*可见的。
42 | > **注意: **在 IE8 及 IE8 以下版本浏览器 bar 在外部也是可见的,是因为浏览器对命名函数赋值表达式进行了错误的解析,
43 | > 解析成两个函数 `foo` 和 `bar`
44 |
45 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ko/core/eval.md:
--------------------------------------------------------------------------------
1 | ## 왜 `eval`을 사용하면 안 될까?
2 |
3 | `eval` 함수는 JavaScript 문자열을 지역 스코프에서 실행한다.
4 |
5 | var number = 1;
6 | function test() {
7 | var number = 2;
8 | eval('number = 3');
9 | return number;
10 | }
11 | test(); // 3
12 | number; // 1
13 |
14 | `eval`함수는 `eval`이라는 이름으로 **직접** 실행할 때에만 지역 스코프에서 실행된다. 그리고 `eval`이라는 이름에 걸맞게 악명또한 높다.
15 |
16 | var number = 1;
17 | function test() {
18 | var number = 2;
19 | var copyOfEval = eval;
20 | copyOfEval('number = 3');
21 | return number;
22 | }
23 | test(); // 2
24 | number; // 3
25 |
26 | 어쨌든 `eval`은 사용하지 말아야 한다. eval을 사용하는 99.9%는 사실 eval 없이도 만들수있다.
27 |
28 | ### 가짜 `eval`
29 |
30 | [`setTimeout`과 `setInterval`](#other.timeouts)은 첫 번째 인자로 스트링을 입력받을 수 있다. 이 경우에는 `eval`을 직접 호출하는 것이 아니라서 항상 Global Scope에서 실행된다.
31 |
32 | ### 보안 이슈
33 |
34 | `eval`은 어떤 코드라도 **무조건** 실행하기 때문에 보안 문제도 있다. 따라서 신뢰하지 못하거나 모르는 코드가 포함되어 있을 경우 **절대로** 사용해서는 안된다.
35 |
36 | ### 결론
37 |
38 | `eval`은 사용하지 않는 게 좋다. `eval`을 사용하는 모든 코드는 성능, 보안, 버그 문제를 일으킬 수 있다. 만약 `eval`이 필요해지면 *설계를 변경*하여 `eval`이 필요 없게 만들어야 한다.
39 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2010 Ivo Wetzel.
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
21 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ja/core/eval.md:
--------------------------------------------------------------------------------
1 | ## なぜ、`eval`を使ってはいけないのか
2 |
3 | `eval`関数はローカルスコープ中のJavaScriptコードの文字列を実行します。
4 |
5 | var foo = 1;
6 | function test() {
7 | var foo = 2;
8 | eval('foo = 3');
9 | return foo;
10 | }
11 | test(); // 3
12 | foo; // 1
13 |
14 | しかし、`eval`は**直接**ローカルスコープから呼ばれて、*かつ*呼んだ関数の名前が実際の`eval`でないと実行しません。
15 |
16 | var foo = 1;
17 | function test() {
18 | var foo = 2;
19 | var bar = eval;
20 | bar('foo = 3');
21 | return foo;
22 | }
23 | test(); // 2
24 | foo; // 3
25 |
26 | `eval`の使用は**全てのコスト**を払ってでも回避するべきです。その「使用法」の99.9%で、これ**無し**でも実装できます。
27 |
28 | ### 偽装された`eval`
29 |
30 | [timeout functions](#other.timeouts)である`setTimeout`と`setInterval`はどちらも最初の引数として文字列を取る事ができます。この文字列は`eval`がこの場合直接呼ばれていないので、**常に**グローバルスコープで実行されてしまいます。
31 |
32 | ### セキュリティの問題
33 |
34 | `eval`はまたセキュリティの問題もあります。なぜなら、**どんな**コードを与えられても実行してしまうからで、**絶対**に不明または信頼できない発行元の文字列は使ってはいけません。
35 |
36 | ### 終わりに
37 |
38 | `eval`は絶対に使用しないでください。これを使用しているどんなコードも、その働き、パフォーマンスやセキュリティについて問われてしまいます。`eval`が必要な場合でも、最初の段階で使用**しない**でください。*より良いデザイン*を使用するべきで、それには`eval`を使う必要性はありません。
39 |
40 |
--------------------------------------------------------------------------------
/resources/youtube/intro.to.react.custom.hooks/source/src/React.Query.jsx:
--------------------------------------------------------------------------------
1 | import { QueryClientProvider, QueryClient, useQuery, useMutation } from 'react-query'
2 | // npm install react-query
3 | console.clear();
4 | const queryClient = new QueryClient();
5 |
6 | const fetchJoke = async ()=>{
7 | const res = await fetch("https://api.chucknorris.io/jokes/random");
8 | const json = await res.json();
9 | return json;
10 | }
11 |
12 | function Dashboard(){
13 | // useQuery( queryKey, queryFn );
14 | const { data, isLoading, error } = useQuery(
15 | "joke",
16 | fetchJoke, {
17 | retry: 3,
18 | refetchOnWindowFocus: true
19 | });
20 |
21 | if ( isLoading ){
22 | return Loading...
23 | }
24 |
25 | if ( error ){
26 | return Error: { error.message }
27 | }
28 |
29 | return (
30 |
31 |
Dashboard
32 | { data.value }
33 |
34 | )
35 | }
36 |
37 | export default function ReactQuery(){
38 | return (
39 |
40 | React Query
41 |
42 | {/* */}
43 |
44 | )
45 | }
--------------------------------------------------------------------------------
/learn/libs/reveal.js/css/theme/source/serif.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * A simple theme for reveal.js presentations, similar
3 | * to the default theme. The accent color is brown.
4 | *
5 | * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed.
6 | */
7 |
8 |
9 | // Default mixins and settings -----------------
10 | @import "../template/mixins";
11 | @import "../template/settings";
12 | // ---------------------------------------------
13 |
14 |
15 |
16 | // Override theme settings (see ../template/settings.scss)
17 | $mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
18 | $mainColor: #000;
19 | $headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
20 | $headingColor: #383D3D;
21 | $headingTextShadow: none;
22 | $headingTextTransform: none;
23 | $backgroundColor: #F0F1EB;
24 | $linkColor: #51483D;
25 | $linkColorHover: lighten( $linkColor, 20% );
26 | $selectionBackgroundColor: #26351C;
27 |
28 | .reveal a {
29 | line-height: 1.3em;
30 | }
31 |
32 |
33 | // Theme template ------------------------------
34 | @import "../template/theme";
35 | // ---------------------------------------------
36 |
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/css/theme/source/serif.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * A simple theme for reveal.js presentations, similar
3 | * to the default theme. The accent color is brown.
4 | *
5 | * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed.
6 | */
7 |
8 |
9 | // Default mixins and settings -----------------
10 | @import "../template/mixins";
11 | @import "../template/settings";
12 | // ---------------------------------------------
13 |
14 |
15 |
16 | // Override theme settings (see ../template/settings.scss)
17 | $mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
18 | $mainColor: #000;
19 | $headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
20 | $headingColor: #383D3D;
21 | $headingTextShadow: none;
22 | $headingTextTransform: none;
23 | $backgroundColor: #F0F1EB;
24 | $linkColor: #51483D;
25 | $linkColorHover: lighten( $linkColor, 20% );
26 | $selectionBackgroundColor: #26351C;
27 |
28 | .reveal a {
29 | line-height: 1.3em;
30 | }
31 |
32 |
33 | // Theme template ------------------------------
34 | @import "../template/theme";
35 | // ---------------------------------------------
36 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zh/array/constructor.md:
--------------------------------------------------------------------------------
1 | ##`Array` 构造函数
2 |
3 | 由于 `Array` 的构造函数在如何处理参数时有点模棱两可,因此总是推荐使用数组的字面语法 - `[]` - 来创建数组。
4 |
5 | [1, 2, 3]; // 结果: [1, 2, 3]
6 | new Array(1, 2, 3); // 结果: [1, 2, 3]
7 |
8 | [3]; // 结果: [3]
9 | new Array(3); // 结果: []
10 | new Array('3') // 结果: ['3']
11 |
12 | // 译者注:因此下面的代码将会使人很迷惑
13 | new Array(3, 4, 5); // 结果: [3, 4, 5]
14 | new Array(3) // 结果: [],此数组长度为 3
15 |
16 | > **译者注:**这里的模棱两可指的是数组的[两种构造函数语法][1]
17 |
18 | 由于只有一个参数传递到构造函数中(译者注:指的是 `new Array(3);` 这种调用方式),并且这个参数是数字,构造函数会返回一个 `length` 属性被设置为此参数的空数组。
19 | 需要特别注意的是,此时只有 `length` 属性被设置,真正的数组并没有生成。
20 |
21 | > **译者注:**在 Firebug 中,你会看到 `[undefined, undefined, undefined]`,这其实是不对的。在上一节有详细的分析。
22 |
23 | var arr = new Array(3);
24 | arr[1]; // undefined
25 | 1 in arr; // false, 数组还没有生成
26 |
27 | 这种优先于设置数组长度属性的做法只在少数几种情况下有用,比如需要循环字符串,可以避免 `for` 循环的麻烦。
28 |
29 | new Array(count + 1).join(stringToRepeat);
30 |
31 | > **译者注:** `new Array(3).join('#')` 将会返回 `##`
32 |
33 | ###结论
34 |
35 | 应该尽量避免使用数组构造函数创建新数组。推荐使用数组的字面语法。它们更加短小和简洁,因此增加了代码的可读性。
36 |
37 | [1]: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array
38 |
39 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zh/object/forinloop.md:
--------------------------------------------------------------------------------
1 | ##`for in` 循环
2 |
3 | 和 `in` 操作符一样,`for in` 循环同样在查找对象属性时遍历原型链上的所有属性。
4 |
5 | > **注意:** `for in` 循环**不会**遍历那些 `enumerable` 设置为 `false` 的属性;比如数组的 `length` 属性。
6 |
7 | // 修改 Object.prototype
8 | Object.prototype.bar = 1;
9 |
10 | var foo = {moo: 2};
11 | for(var i in foo) {
12 | console.log(i); // 输出两个属性:bar 和 moo
13 | }
14 |
15 | 由于不可能改变 `for in` 自身的行为,因此有必要过滤出那些不希望出现在循环体中的属性,
16 | 这可以通过 `Object.prototype` 原型上的 [`hasOwnProperty`](#object.hasownproperty) 函数来完成。
17 |
18 | > **注意:** 由于 `for in` 总是要遍历整个原型链,因此如果一个对象的继承层次太深的话会影响性能。
19 |
20 | ###使用 `hasOwnProperty` 过滤
21 |
22 | // foo 变量是上例中的
23 | for(var i in foo) {
24 | if (foo.hasOwnProperty(i)) {
25 | console.log(i);
26 | }
27 | }
28 |
29 | 这个版本的代码是唯一正确的写法。由于我们使用了 `hasOwnProperty`,所以这次**只**输出 `moo`。
30 | 如果不使用 `hasOwnProperty`,则这段代码在原生对象原型(比如 `Object.prototype`)被扩展时可能会出错。
31 |
32 | 一个广泛使用的类库 [Prototype][1] 就扩展了原生的 JavaScript 对象。
33 | 因此,当这个类库被包含在页面中时,不使用 `hasOwnProperty` 过滤的 `for in` 循环难免会出问题。
34 |
35 | ###总结
36 |
37 | 推荐**总是**使用 `hasOwnProperty`。不要对代码运行的环境做任何假设,不要假设原生对象是否已经被扩展了。
38 |
39 | [1]: http://www.prototypejs.org/
40 |
41 |
--------------------------------------------------------------------------------
/resources/youtube/react.custom.hooks.useClock/src/App.js:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from 'react';
2 | console.clear();
3 |
4 | // useClock();
5 | function getTime(){
6 | const time = new Date();
7 | return time.toLocaleString('en-US', {
8 | hour: '2-digit',
9 | minute: '2-digit',
10 | second: '2-digit',
11 | hour12: true
12 | });
13 | }
14 | // console.log( getTime() );
15 |
16 | function useClock(){
17 | const [ clock, setClock ] = useState(getTime());
18 | useEffect(()=>{
19 | const id = setInterval(()=>{
20 | console.log("tick");
21 | setClock(getTime());
22 | }, 1000 );
23 | return ()=>{
24 | clearInterval(id);
25 | }
26 | },[]);
27 | return clock;
28 | }
29 |
30 | function Panel(){
31 | const clock = useClock();
32 | return (
33 | Panel { clock }
34 | )
35 | }
36 |
37 | export default function App() {
38 | const [ display, setDisplay ] = useState(true);
39 | return (
40 | <>
41 | React
42 |
45 | { display && }
46 |
47 | >
48 | );
49 | }
50 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ja/function/general.md:
--------------------------------------------------------------------------------
1 | ## 関数の宣言と式
2 |
3 | 関数はJavaScriptの第一級オブジェクトです。この事は、その他の値と同じように渡す事が出来るという事です。この機能で良く使われる一つとして**匿名関数**を他のオブジェクトにコールバックとして渡すというものがあり、これで非同期での実装が可能になります。
4 |
5 | ### `関数`宣言
6 |
7 | function foo() {}
8 |
9 | 上記の関数はプログラムの開始時の前に評価されるように[巻き上げ](#function.scopes)られます。従って*定義*されたスコープ内の*どこでも*使用する事が可能になります。ソース内での実際の定義が呼ばれる前でもです。
10 |
11 | foo(); // このコードが動作する前にfooが作られているので、ちゃんと動作する
12 | function foo() {}
13 |
14 | ### `関数`式
15 |
16 | var foo = function() {};
17 |
18 | この例では、`foo`という変数に無名で*匿名*の関数が割り当てられています。
19 |
20 | foo; // 'undefined'
21 | foo(); // これはTypeErrorが起こる
22 | var foo = function() {};
23 |
24 | `var`は宣言である為に、変数名`foo`がコードが開始される実際の評価時より前のタイミングにまで巻き上げられています。`foo`は既にスクリプトが評価される時には定義されているのです。
25 |
26 | しかし、コードの実行時にのみこの割り当てがされるため、`foo`という変数は対応するコードが実行される前にデフォルト値である[undefined](#core.undefined)が代入されるのです。
27 |
28 | ### 名前付き関数式
29 |
30 | 他に特殊なケースとして、名前付き関数があります。
31 |
32 | var foo = function bar() {
33 | bar(); // 動作する
34 | }
35 | bar(); // ReferenceError
36 |
37 | この場合の`bar`は`foo`に対して関数を割り当てるだけなので、外部スコープでは使用できません。しかし、`bar`は内部では使用できます。これはJavaScriptの[名前解決](#function.scopes)の方法によるもので、関数名は*いつも*関数自身のローカルスコープ内で有効になっています。
38 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zhtw/object/forinloop.md:
--------------------------------------------------------------------------------
1 | ## `for in` 迴圈
2 |
3 | 就像其他的 `in` 操作符一樣, `for in` 循環也進入所有在物件中的屬性
4 |
5 | > **注意: ** `for in` 迴圈 **不會** 進入那些 `enumerable` 屬性是 `false`,舉例來說,陣列中 `length` 的屬性
6 |
7 | // 修改 Object.prototype
8 | Object.prototype.bar = 1;
9 |
10 | var foo = {moo: 2};
11 | for(var i in foo) {
12 | console.log(i); // 輸出兩個屬性:bar 和 moo
13 | }
14 |
15 | 由於不可能改變 `for in` 本身的行為,因為有必要過濾出那些不希望在迴圈出現的屬性,這可以用 `Object.prototype` 原型上的 [`hasOwnProperty`](#object.hasownproperty) 的函數來完成。
16 |
17 | > **注意: ** 由於 `for in` 總是要到所有原型鏈裡,因此如果物件的繼承層次太深的話會影響性能。
18 |
19 |
20 | ### 用 `hasOwnProperty` 來過濾
21 |
22 | // foo 變數是上面範例中的
23 | for(var i in foo) {
24 | if (foo.hasOwnProperty(i)) {
25 | console.log(i);
26 | }
27 | }
28 |
29 | 這個版本的程式碼是唯一正確的寫法。由於我們使用了 `hasOwnProperty`,這次 **只** 輸出 `moo`。
30 | 如果不使用這個程式碼在原型物件中(比如 `Object.prototype`)被擴展可能會出錯。
31 |
32 | 一個廣泛使用的舊函式庫 [Prototype][1]就擴展了原型的 JavaScript 物件。
33 | 因此,當這個函式庫包含在頁面中時,不使用 `hasOwnProperty` 過濾的 `for in` 迴圈難免會出問題。
34 |
35 | ### 總結
36 |
37 | 推薦 **總是** 使用 `hasOwnProperty`。不要對程式碼的環境做任何假設,不要假設原生的對象是否被擴張。
38 |
39 | [1]: http://www.prototypejs.org/
40 |
41 |
--------------------------------------------------------------------------------
/snippets/Node-Zip.coffee:
--------------------------------------------------------------------------------
1 | # npm install adm-zip
2 |
3 | AdmZip = require('adm-zip')
4 |
5 | #=== READING ARCHIVES
6 |
7 | zip = new AdmZip('./my_file.zip')
8 | zipEntries = zip.getEntries()
9 |
10 | # AN ARRAY OF ZIPENTRY RECORDS
11 |
12 | zipEntries.forEach (zipEntry) ->
13 |
14 | console.log zipEntry.toString()
15 | if zipEntry.entryName == 'my_file.txt'
16 | console.log zipEntry.data.toString('utf8') # outputs zip entries information
17 | return
18 |
19 | # OUTPUTS THE CONTENT OF SOME_FOLDER/MY_FILE.TXT
20 | console.log zip.readAsText('some_folder/my_file.txt')
21 |
22 | # EXTRACTS THE SPECIFIED FILE TO THE SPECIFIED LOCATION
23 | zip.extractEntryTo 'some_folder/my_file.txt', '/home/me/tempfolder', false, true
24 |
25 | # EXTRACTS EVERYTHING
26 | zip.extractAllTo '/home/me/zipcontent/', true
27 |
28 |
29 | #=== CREATING ARCHIVES
30 |
31 | zip = new AdmZip
32 |
33 | # ADD FILE DIRECTLY
34 | zip.addFile 'test.txt', new Buffer('inner content of the file'), 'entry comment goes here'
35 |
36 | # ADD LOCAL FILE
37 | zip.addLocalFile '/home/me/some_picture.png'
38 |
39 | # GET EVERYTHING AS A BUFFER
40 | willSendthis = zip.toBuffer()
41 | # OR WRITE EVERYTHING TO DISK
42 | zip.writeZip '/home/me/files.zip'
43 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/css/theme/template/settings.scss:
--------------------------------------------------------------------------------
1 | // Base settings for all themes that can optionally be
2 | // overridden by the super-theme
3 |
4 | // Background of the presentation
5 | $backgroundColor: #2b2b2b;
6 |
7 | // Primary/body text
8 | $mainFont: 'Lato', sans-serif;
9 | $mainFontSize: 40px;
10 | $mainColor: #eee;
11 |
12 | // Vertical spacing between blocks of text
13 | $blockMargin: 20px;
14 |
15 | // Headings
16 | $headingMargin: 0 0 $blockMargin 0;
17 | $headingFont: 'League Gothic', Impact, sans-serif;
18 | $headingColor: #eee;
19 | $headingLineHeight: 1.2;
20 | $headingLetterSpacing: normal;
21 | $headingTextTransform: uppercase;
22 | $headingTextShadow: none;
23 | $headingFontWeight: normal;
24 | $heading1TextShadow: $headingTextShadow;
25 |
26 | $heading1Size: 3.77em;
27 | $heading2Size: 2.11em;
28 | $heading3Size: 1.55em;
29 | $heading4Size: 1.00em;
30 |
31 | // Links and actions
32 | $linkColor: #13DAEC;
33 | $linkColorHover: lighten( $linkColor, 20% );
34 |
35 | // Text selection
36 | $selectionBackgroundColor: #FF5E99;
37 | $selectionColor: #fff;
38 |
39 | // Generates the presentation background, can be overridden
40 | // to return a background image or gradient
41 | @mixin bodyBackground() {
42 | background: $backgroundColor;
43 | }
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/css/theme/template/settings.scss:
--------------------------------------------------------------------------------
1 | // Base settings for all themes that can optionally be
2 | // overridden by the super-theme
3 |
4 | // Background of the presentation
5 | $backgroundColor: #2b2b2b;
6 |
7 | // Primary/body text
8 | $mainFont: 'Lato', sans-serif;
9 | $mainFontSize: 40px;
10 | $mainColor: #eee;
11 |
12 | // Vertical spacing between blocks of text
13 | $blockMargin: 20px;
14 |
15 | // Headings
16 | $headingMargin: 0 0 $blockMargin 0;
17 | $headingFont: 'League Gothic', Impact, sans-serif;
18 | $headingColor: #eee;
19 | $headingLineHeight: 1.2;
20 | $headingLetterSpacing: normal;
21 | $headingTextTransform: uppercase;
22 | $headingTextShadow: none;
23 | $headingFontWeight: normal;
24 | $heading1TextShadow: $headingTextShadow;
25 |
26 | $heading1Size: 3.77em;
27 | $heading2Size: 2.11em;
28 | $heading3Size: 1.55em;
29 | $heading4Size: 1.00em;
30 |
31 | // Links and actions
32 | $linkColor: #13DAEC;
33 | $linkColorHover: lighten( $linkColor, 20% );
34 |
35 | // Text selection
36 | $selectionBackgroundColor: #FF5E99;
37 | $selectionColor: #fff;
38 |
39 | // Generates the presentation background, can be overridden
40 | // to return a background image or gradient
41 | @mixin bodyBackground() {
42 | background: $backgroundColor;
43 | }
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ko/function/general.md:
--------------------------------------------------------------------------------
1 | ## 함수 선언과 함수 표현식
2 |
3 | JavaScript에서 함수는 First Class Object다. 즉, 함수 자체가 또 다른 함수의 인자될 수 있다는 말이다. 그래서 익명 함수를 비동기 함수의 콜백으로 넘기는 것도 이런 특징을 이용한 일반적인 사용법이다.
4 |
5 | ### `함수` 선언
6 |
7 | function foo() {}
8 |
9 | 위와 같이 선언한 함수는 프로그램이 실행하기 전에 먼저 [호이스트(Hoist)](#function.scopes) (스코프가 생성)되기 때문에 정의된 스코프(Scope) 안에서는 어디서든 이 함수를 사용할 수 있다. 심지어 함수를 정의하기 전에 호출해도 된다.
10 |
11 | foo(); // 이 코드가 실행되기 전에 foo가 만들어지므로 잘 동작한다.
12 | function foo() {}
13 |
14 | ### `함수` 표현식
15 |
16 | var foo = function() {};
17 |
18 | 위 예제는 `foo` 변수에 *익명* 함수를 할당한다.
19 |
20 | foo; // 'undefined'
21 | foo(); // TypeError가 난다.
22 | var foo = function() {};
23 |
24 | 'var'문을 이용해 선언하는 경우, 코드가 실행되기 전에 'foo' 라는 이름의 변수를 스코프의 맨 위로 올리게 된다.(호이스트 된다) 이때 foo 값은 undefiend로 정의된다.
25 |
26 | 하지만 변수에 값을 할당하는 일은 런타임 상황에서 이루어지게 되므로 실제 코드가 실행되는 순간의 `foo`변수는 기본 값인 [undefined](#core.undefined)이 된다.
27 |
28 | ### 이름있는 함수 표현식
29 |
30 | 이름있는 함수를 할당할때도 특이한 경우가 있다.
31 |
32 | var foo = function bar() {
33 | bar(); // 이 경우는 동작 하지만,
34 | }
35 | bar(); // 이 경우는 참조에러를 발생시킨다.
36 |
37 | foo 함수 스코프 밖에서는 foo 변수 외에는 다른 값이 없기 때문에 `bar`는 함수 밖에서 사용할 수 없지만 함수 안에서는 사용할 수 있다. [이와 같은 방법](#function.scopes)으로 자바스크립트에서 어떤 함수의 이름은 항상 그 함수의 지역 스코프 안에서 사용할수있다.
--------------------------------------------------------------------------------
/snippets/JavaScript-Test-CORS-Server.js:
--------------------------------------------------------------------------------
1 | function testCORS(url){
2 |
3 | url = url || "https://some.url";
4 |
5 | var createCORSRequest = function(method, url) {
6 | var xhr = new XMLHttpRequest();
7 | if ("withCredentials" in xhr) {
8 | // Most browsers.
9 | xhr.open(method, url, true);
10 | } else if (typeof XDomainRequest != "undefined") {
11 | // IE8 & IE9
12 | xhr = new XDomainRequest();
13 | xhr.open(method, url);
14 | } else {
15 | // CORS not supported.
16 | xhr = null;
17 | }
18 | return xhr;
19 | };
20 |
21 | var method = 'GET';
22 | var xhr = createCORSRequest( method, url );
23 | xhr.onload = function() { console.log( true, "yes" ); };
24 | xhr.onerror = function() { console.log( false, "no" ); };
25 | xhr.send();
26 | }
27 |
28 | testCORS();
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/by/array/constructor.md:
--------------------------------------------------------------------------------
1 | ## Канструктар `Array`
2 |
3 | Праз тое, што канструктар `Array` неадназначна апрацоўвае свае параметры,
4 | крайне рэкамендуецца выкарыстоўваць літэрал - `[]` - для стварэння масіваў.
5 |
6 | [1, 2, 3]; // Вынік: [1, 2, 3]
7 | new Array(1, 2, 3); // Вынік: [1, 2, 3]
8 |
9 | [3]; // Вынік: [3]
10 | new Array(3); // Вынік: []
11 | new Array('3') // Вынік: ['3']
12 |
13 | У выпадку, калі канструктару `Array` перадаецца толькі адзін параметр, і калі гэты
14 | аргумент тыпу `Number`, канструктар верне *разрэджаны* масіў, які мае уласціваць
15 | `length` са значэннем аргумента. Варта адзначыць, што такім чынам будзе зменена
16 | **толькі** значэнне ўласцівасці `length` масіва; індэксы масіва не будуць
17 | праініцыялізаваныя.
18 |
19 | var arr = new Array(3);
20 | arr[1]; // undefined
21 | 1 in arr; // false, індэкс не праініцыялізаваны
22 |
23 | Магчымасць загадзя вызначыць даўжыню масіва карысна толькі ў рэдкіх выпадках,
24 | напрыклад, паўтор радка без выкарыстання цыкла.
25 |
26 | new Array(count + 1).join(stringToRepeat);
27 |
28 | ### У заключэнне
29 |
30 | Літэралы маюць перавагі над канструктарам Array. Яны карацейшыя, маюць больш чысты
31 | сінтаксіс і робяць код больш чытэльным.
32 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/css/theme/source/league.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * League theme for reveal.js.
3 | *
4 | * This was the default theme pre-3.0.0.
5 | *
6 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
7 | */
8 |
9 |
10 | // Default mixins and settings -----------------
11 | @import "../template/mixins";
12 | @import "../template/settings";
13 | // ---------------------------------------------
14 |
15 |
16 |
17 | // Include theme-specific fonts
18 | @import url(../../lib/font/league-gothic/league-gothic.css);
19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
20 |
21 | // Override theme settings (see ../template/settings.scss)
22 | $headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2);
23 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15);
24 |
25 | // Background generator
26 | @mixin bodyBackground() {
27 | @include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) );
28 | }
29 |
30 |
31 |
32 | // Theme template ------------------------------
33 | @import "../template/theme";
34 | // ---------------------------------------------
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/css/theme/source/league.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * League theme for reveal.js.
3 | *
4 | * This was the default theme pre-3.0.0.
5 | *
6 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
7 | */
8 |
9 |
10 | // Default mixins and settings -----------------
11 | @import "../template/mixins";
12 | @import "../template/settings";
13 | // ---------------------------------------------
14 |
15 |
16 |
17 | // Include theme-specific fonts
18 | @import url(../../lib/font/league-gothic/league-gothic.css);
19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
20 |
21 | // Override theme settings (see ../template/settings.scss)
22 | $headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2);
23 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15);
24 |
25 | // Background generator
26 | @mixin bodyBackground() {
27 | @include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) );
28 | }
29 |
30 |
31 |
32 | // Theme template ------------------------------
33 | @import "../template/theme";
34 | // ---------------------------------------------
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ko/object/forinloop.md:
--------------------------------------------------------------------------------
1 | ## `for in` Loop
2 |
3 | 객체의 프로퍼티를 탐색할때 `in` 연산자와 마찬가지로 `for in` 문도 프로토타입 체인까지 탐색한다.
4 |
5 | > **Note:** `for in`문은 배열의 `length`프로퍼티처럼 `enumerable` 속성이 `false`인 프로퍼티는 탐색하지 않는다.
6 |
7 | // Object.prototype을 오염시킨다.
8 | Object.prototype.bar = 1;
9 |
10 | var foo = {moo: 2};
11 | for(var i in foo) {
12 | console.log(i); // bar와 moo 둘 다 출력한다.
13 | }
14 |
15 | `for in`문에 정의된 기본 동작을 바꿀순 없기 때문에 루프 안에서 불필요한 프로퍼티를 필터링 해야한다. 그래서 `Object.prototype`의 [`hasOwnProperty`](#object.hasownproperty)메소드를 이용해 본래 객체의 프로퍼티만 골라낸다.
16 |
17 | > **Note:** `for in`은 프로토타입 체인을 모두 탐색하기 때문에 상속할 때마다 더 느려진다.
18 |
19 | ### `hasOwnProperty`로 필터링 하기
20 |
21 | // 위의 예제에 이어서
22 | for(var i in foo) {
23 | if (foo.hasOwnProperty(i)) {
24 | console.log(i);
25 | }
26 | }
27 |
28 | 위와 같이 사용해야 올바른 사용법이다. `hasOwnProperty` 때문에 **오직** `moo`만 출력된다. `hasOwnProperty`가 없으면 이 코드는 `Object.prototype`으로 네이티브 객체가 확장될 때 에러가 발생할 수 있다.
29 |
30 | 따라서 [Proptotype 라이브러리][1]처럼 네이티브 객체를 프로토타입으로 확장한 프레임워크를 사용할 경우 `for in` 문에 `hasOwnProperty`를 사용하지 않을 경우 문제가 발생할 수 있다.
31 |
32 | ### 결론
33 |
34 | `hasOwnProperty`를 항상 사용하길 권한다. 실제 코드가 동작하는 환경에서는 절대로 네이티브 객체가 프로토타입으로 확장됐다 혹은 확장되지 않았다를 가정하면 안된다.
35 |
36 | [1]: http://www.prototypejs.org/
37 |
--------------------------------------------------------------------------------
/snippets/JavaScript-PubNub-Simple-Chat.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PubNub
6 |
7 |
8 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
45 |
46 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/css/zenburn.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov
4 | based on dark.css by Ivan Sagalaev
5 |
6 | */
7 |
8 | .hljs {
9 | display: block;
10 | overflow-x: auto;
11 | padding: 0.5em;
12 | background: #3f3f3f;
13 | color: #dcdcdc;
14 | }
15 |
16 | .hljs-keyword,
17 | .hljs-selector-tag,
18 | .hljs-tag {
19 | color: #e3ceab;
20 | }
21 |
22 | .hljs-template-tag {
23 | color: #dcdcdc;
24 | }
25 |
26 | .hljs-number {
27 | color: #8cd0d3;
28 | }
29 |
30 | .hljs-variable,
31 | .hljs-template-variable,
32 | .hljs-attribute {
33 | color: #efdcbc;
34 | }
35 |
36 | .hljs-literal {
37 | color: #efefaf;
38 | }
39 |
40 | .hljs-subst {
41 | color: #8f8f8f;
42 | }
43 |
44 | .hljs-title,
45 | .hljs-name,
46 | .hljs-selector-id,
47 | .hljs-selector-class,
48 | .hljs-section,
49 | .hljs-type {
50 | color: #efef8f;
51 | }
52 |
53 | .hljs-symbol,
54 | .hljs-bullet,
55 | .hljs-link {
56 | color: #dca3a3;
57 | }
58 |
59 | .hljs-deletion,
60 | .hljs-string,
61 | .hljs-built_in,
62 | .hljs-builtin-name {
63 | color: #cc9393;
64 | }
65 |
66 | .hljs-addition,
67 | .hljs-comment,
68 | .hljs-quote,
69 | .hljs-meta {
70 | color: #7f9f7f;
71 | }
72 |
73 |
74 | .hljs-emphasis {
75 | font-style: italic;
76 | }
77 |
78 | .hljs-strong {
79 | font-weight: bold;
80 | }
81 |
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/css/zenburn.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov
4 | based on dark.css by Ivan Sagalaev
5 |
6 | */
7 |
8 | .hljs {
9 | display: block;
10 | overflow-x: auto;
11 | padding: 0.5em;
12 | background: #3f3f3f;
13 | color: #dcdcdc;
14 | }
15 |
16 | .hljs-keyword,
17 | .hljs-selector-tag,
18 | .hljs-tag {
19 | color: #e3ceab;
20 | }
21 |
22 | .hljs-template-tag {
23 | color: #dcdcdc;
24 | }
25 |
26 | .hljs-number {
27 | color: #8cd0d3;
28 | }
29 |
30 | .hljs-variable,
31 | .hljs-template-variable,
32 | .hljs-attribute {
33 | color: #efdcbc;
34 | }
35 |
36 | .hljs-literal {
37 | color: #efefaf;
38 | }
39 |
40 | .hljs-subst {
41 | color: #8f8f8f;
42 | }
43 |
44 | .hljs-title,
45 | .hljs-name,
46 | .hljs-selector-id,
47 | .hljs-selector-class,
48 | .hljs-section,
49 | .hljs-type {
50 | color: #efef8f;
51 | }
52 |
53 | .hljs-symbol,
54 | .hljs-bullet,
55 | .hljs-link {
56 | color: #dca3a3;
57 | }
58 |
59 | .hljs-deletion,
60 | .hljs-string,
61 | .hljs-built_in,
62 | .hljs-builtin-name {
63 | color: #cc9393;
64 | }
65 |
66 | .hljs-addition,
67 | .hljs-comment,
68 | .hljs-quote,
69 | .hljs-meta {
70 | color: #7f9f7f;
71 | }
72 |
73 |
74 | .hljs-emphasis {
75 | font-style: italic;
76 | }
77 |
78 | .hljs-strong {
79 | font-weight: bold;
80 | }
81 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/fi/array/constructor.md:
--------------------------------------------------------------------------------
1 | ## `Array`-konstruktori
2 |
3 | `Array`-oletuskonstruktorin käytös ei ole lainkaan yksiselitteistä. Tämän vuoksi suositellaankin, että konstruktorin sijasta käytetään literaalinotaatiota `[]`.
4 |
5 | [1, 2, 3]; // Tulos: [1, 2, 3]
6 | new Array(1, 2, 3); // Tulos: [1, 2, 3]
7 |
8 | [3]; // Tulos: [3]
9 | new Array(3); // Tulos: []
10 | new Array('3') // Tulos: ['3']
11 |
12 | Mikäli `Array`-konstruktorille annetaan vain yksi argumentti ja se on tyypiltään `Number`, konstruktori palauttaa uuden *harvan* taulukon, jonka `length`-attribuutti on asetettu annetun numeron mukaisesti. On tärkeää huomata, että **ainoastaan** `length` asetetaan tällä tavoin, todellisia taulukon indeksejä ei alusteta.
13 |
14 | var arr = new Array(3);
15 | arr[1]; // undefined
16 | 1 in arr; // false, indeksiä ei ole alustettu
17 |
18 | Tämä on käytännöllistä vain harvoin, kuten merkkijonon toiston tapauksessa. Tällöin voidaan välttää `for-luupin` käyttämistä.
19 |
20 | new Array(count + 1).join(stringToRepeat);
21 |
22 | ### Yhteenveto
23 |
24 | `Array`-konstruktorin käyttöä tulee käyttää niin paljon kuin suinkin mahdollista. Sen sijaan on suositeltavaa käyttää literaalinotaatiota. Literaalit ovat lyhyempiä ja niiden syntaksi on selkeämpi. Tämän lisäksi ne tekevät koodista luettavampaa.
25 |
26 |
--------------------------------------------------------------------------------
/snippets/JavaScript-Object-Watch-PolyFill.js:
--------------------------------------------------------------------------------
1 | /*
2 | * object.watch polyfill
3 | *
4 | * 2012-04-03
5 | *
6 | * By Eli Grey, http://eligrey.com
7 | * Public Domain.
8 | * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
9 | */
10 |
11 | // object.watch
12 | if (!Object.prototype.watch) {
13 | Object.defineProperty(Object.prototype, "watch", {
14 | enumerable: false
15 | , configurable: true
16 | , writable: false
17 | , value: function (prop, handler) {
18 | var
19 | oldval = this[prop]
20 | , newval = oldval
21 | , getter = function () {
22 | return newval;
23 | }
24 | , setter = function (val) {
25 | oldval = newval;
26 | return newval = handler.call(this, prop, oldval, val);
27 | }
28 | ;
29 |
30 | if (delete this[prop]) { // can't watch constants
31 | Object.defineProperty(this, prop, {
32 | get: getter
33 | , set: setter
34 | , enumerable: true
35 | , configurable: true
36 | });
37 | }
38 | }
39 | });
40 | }
41 |
42 | // object.unwatch
43 | if (!Object.prototype.unwatch) {
44 | Object.defineProperty(Object.prototype, "unwatch", {
45 | enumerable: false
46 | , configurable: true
47 | , writable: false
48 | , value: function (prop) {
49 | var val = this[prop];
50 | delete this[prop]; // remove accessors
51 | this[prop] = val;
52 | }
53 | });
54 | }
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/en/array/constructor.md:
--------------------------------------------------------------------------------
1 | ## The `Array` Constructor
2 |
3 | Since the `Array` constructor is ambiguous in how it deals with its parameters,
4 | it is highly recommended to use the array literal - `[]` notation -
5 | when creating new arrays.
6 |
7 | [1, 2, 3]; // Result: [1, 2, 3]
8 | new Array(1, 2, 3); // Result: [1, 2, 3]
9 |
10 | [3]; // Result: [3]
11 | new Array(3); // Result: []
12 | new Array('3') // Result: ['3']
13 |
14 | In cases when there is only one argument passed to the `Array` constructor
15 | and when that argument is a `Number`, the constructor will return a new *sparse*
16 | array with the `length` property set to the value of the argument. It should be
17 | noted that **only** the `length` property of the new array will be set this way;
18 | the actual indexes of the array will not be initialized.
19 |
20 | var arr = new Array(3);
21 | arr[1]; // undefined
22 | 1 in arr; // false, the index was not set
23 |
24 | Being able to set the length of the array in advance is only useful in a few
25 | cases, like repeating a string, in which it avoids the use of a loop.
26 |
27 | new Array(count + 1).join(stringToRepeat);
28 |
29 | ### In Conclusion
30 |
31 | Literals are preferred to the Array constructor. They are shorter, have a clearer syntax, and increase code
32 | readability.
33 |
34 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/css/theme/source/sky.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Sky theme for reveal.js.
3 | *
4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
5 | */
6 |
7 |
8 | // Default mixins and settings -----------------
9 | @import "../template/mixins";
10 | @import "../template/settings";
11 | // ---------------------------------------------
12 |
13 |
14 |
15 | // Include theme-specific fonts
16 | @import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic);
17 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700);
18 |
19 |
20 | // Override theme settings (see ../template/settings.scss)
21 | $mainFont: 'Open Sans', sans-serif;
22 | $mainColor: #333;
23 | $headingFont: 'Quicksand', sans-serif;
24 | $headingColor: #333;
25 | $headingLetterSpacing: -0.08em;
26 | $headingTextShadow: none;
27 | $backgroundColor: #f7fbfc;
28 | $linkColor: #3b759e;
29 | $linkColorHover: lighten( $linkColor, 20% );
30 | $selectionBackgroundColor: #134674;
31 |
32 | // Fix links so they are not cut off
33 | .reveal a {
34 | line-height: 1.3em;
35 | }
36 |
37 | // Background generator
38 | @mixin bodyBackground() {
39 | @include radial-gradient( #add9e4, #f7fbfc );
40 | }
41 |
42 |
43 |
44 | // Theme template ------------------------------
45 | @import "../template/theme";
46 | // ---------------------------------------------
47 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ptbr/array/constructor.md:
--------------------------------------------------------------------------------
1 | ## O construtor `Array`
2 |
3 | Uma vez que o construtor `Array` é ambíguo na forma como ele lida com seus parâmetros,
4 | o uso da notação `[]` é fortemente recomendado ao criar novo arrays.
5 |
6 | [1, 2, 3]; // Resultado: [1, 2, 3]
7 | new Array(1, 2, 3); // Resultado: [1, 2, 3]
8 |
9 | [3]; // Resultado: [3]
10 | new Array(3); // Resultado: []
11 | new Array('3') // Resultado: ['3']
12 |
13 | Nos casos onde somente um argumento é passado para o construtor `Array` e quando o argumento é
14 | um `Number`, o construtor retornará um novo array *sem elementos* com a propriedade `length` configurada de acordo com o valor do argumento.
15 | É importante perceber que **somente** a propriedade `length` do novo array será configurada desta maneira; os índices do array não serão inicializados.
16 |
17 | var arr = new Array(3);
18 | arr[1]; // undefined
19 | 1 in arr; // false, o índice não foi definida
20 |
21 | Ser capaz de definir o comprimento de um array antecipadamente é útil em poucos casos,
22 | como ao replicar uma string, em que se evita o uso de um loop.
23 |
24 | new Array(count + 1).join(stringToRepeat);
25 |
26 | ### Conclusão
27 |
28 | O uso de literais é preferencial na inicialição de Arrays. São curtos, possuem uma sintaxe limpa, e contribuem para a legibilidade do código.
29 |
30 |
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/css/theme/source/sky.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Sky theme for reveal.js.
3 | *
4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
5 | */
6 |
7 |
8 | // Default mixins and settings -----------------
9 | @import "../template/mixins";
10 | @import "../template/settings";
11 | // ---------------------------------------------
12 |
13 |
14 |
15 | // Include theme-specific fonts
16 | @import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic);
17 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700);
18 |
19 |
20 | // Override theme settings (see ../template/settings.scss)
21 | $mainFont: 'Open Sans', sans-serif;
22 | $mainColor: #333;
23 | $headingFont: 'Quicksand', sans-serif;
24 | $headingColor: #333;
25 | $headingLetterSpacing: -0.08em;
26 | $headingTextShadow: none;
27 | $backgroundColor: #f7fbfc;
28 | $linkColor: #3b759e;
29 | $linkColorHover: lighten( $linkColor, 20% );
30 | $selectionBackgroundColor: #134674;
31 |
32 | // Fix links so they are not cut off
33 | .reveal a {
34 | line-height: 1.3em;
35 | }
36 |
37 | // Background generator
38 | @mixin bodyBackground() {
39 | @include radial-gradient( #add9e4, #f7fbfc );
40 | }
41 |
42 |
43 |
44 | // Theme template ------------------------------
45 | @import "../template/theme";
46 | // ---------------------------------------------
47 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ja/object/forinloop.md:
--------------------------------------------------------------------------------
1 | ## `for in`ループ
2 |
3 | `in`オペレーターは単に、`for in`ループの中でオブジェクトのプロパティをプロトタイプチェーンの中で繰り返し遡る為にあるものです。
4 |
5 | > **注意:** `for in`ループは`enumerable`属性が`false`にセットされているプロパティを反復処理**しません**。;
6 | > 例えば、配列の`length`プロパティなどがそれに当たります。
7 |
8 | // Object.prototype汚染
9 | Object.prototype.bar = 1;
10 |
11 | var foo = {moo: 2};
12 | for(var i in foo) {
13 | console.log(i); // barとmooが両方とも表示される
14 | }
15 |
16 | `for in`ループそれ自体の動作を変更する事は不可能ですが、ループ内にある要らないプロパティをフィルタリングする必要があります。そんな時は`Object.prototype`の[`hasOwnProperty`](#object.hasownproperty)メソッドを使うと解決します。
17 |
18 | > **注意:** `for in`は常にプロトタイプチェーンを完全に遡ります。これにより
19 | > オブジェクトに追加されている継承が多ければ多い程、速度は遅くなります。
20 |
21 | ### `hasOwnProperty`をフィルタリングに使用する
22 |
23 | // 継承されているfoo
24 | for(var i in foo) {
25 | if (foo.hasOwnProperty(i)) {
26 | console.log(i);
27 | }
28 | }
29 |
30 | このループの唯一正しい使い方がこの方法です。`hasOwnProperty`を使用しているので、
31 | `moo`**のみ**が表示されるようになります。`hasOwnProperty`が省略されている場合は、このコードは
32 | 組み込みのプロトタイプが存在する場合に(特に`Object.prototype`が拡張されている場合)エラーを発生しやすくなります。
33 |
34 | 一般に広く使用されているJavaScriptフレームワークとして[Prototype][1]が挙げられます。このフレームワークには、
35 | `for in` 内で`hasOwnProperty`が使用されプロトタプチェーン内を頭まで遡るのを中断する事が保証されています。
36 |
37 | ### 終わりに
38 |
39 | **常に**`hasOwnProperty`を使用する事を推奨します。コードの実行環境や、組み込みのプロトタイプが拡張されているかどうかを仮定して書くようなコードを絶対書いてはいけません。
40 |
41 | [1]: http://www.prototypejs.org/
42 |
43 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/css/theme/source/white.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * White theme for reveal.js. This is the opposite of the 'black' theme.
3 | *
4 | * By Hakim El Hattab, http://hakim.se
5 | */
6 |
7 |
8 | // Default mixins and settings -----------------
9 | @import "../template/mixins";
10 | @import "../template/settings";
11 | // ---------------------------------------------
12 |
13 |
14 | // Include theme-specific fonts
15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css);
16 |
17 |
18 | // Override theme settings (see ../template/settings.scss)
19 | $backgroundColor: #fff;
20 |
21 | $mainColor: #222;
22 | $headingColor: #222;
23 |
24 | $mainFontSize: 42px;
25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif;
26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif;
27 | $headingTextShadow: none;
28 | $headingLetterSpacing: normal;
29 | $headingTextTransform: uppercase;
30 | $headingFontWeight: 600;
31 | $linkColor: #2a76dd;
32 | $linkColorHover: lighten( $linkColor, 15% );
33 | $selectionBackgroundColor: lighten( $linkColor, 25% );
34 |
35 | $heading1Size: 2.5em;
36 | $heading2Size: 1.6em;
37 | $heading3Size: 1.3em;
38 | $heading4Size: 1.0em;
39 |
40 | section.has-dark-background {
41 | &, h1, h2, h3, h4, h5, h6 {
42 | color: #fff;
43 | }
44 | }
45 |
46 |
47 | // Theme template ------------------------------
48 | @import "../template/theme";
49 | // ---------------------------------------------
--------------------------------------------------------------------------------
/learn/libs/reveal.js/css/theme/source/beige.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Beige theme for reveal.js.
3 | *
4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
5 | */
6 |
7 |
8 | // Default mixins and settings -----------------
9 | @import "../template/mixins";
10 | @import "../template/settings";
11 | // ---------------------------------------------
12 |
13 |
14 |
15 | // Include theme-specific fonts
16 | @import url(../../lib/font/league-gothic/league-gothic.css);
17 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
18 |
19 |
20 | // Override theme settings (see ../template/settings.scss)
21 | $mainColor: #333;
22 | $headingColor: #333;
23 | $headingTextShadow: none;
24 | $backgroundColor: #f7f3de;
25 | $linkColor: #8b743d;
26 | $linkColorHover: lighten( $linkColor, 20% );
27 | $selectionBackgroundColor: rgba(79, 64, 28, 0.99);
28 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15);
29 |
30 | // Background generator
31 | @mixin bodyBackground() {
32 | @include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) );
33 | }
34 |
35 |
36 |
37 | // Theme template ------------------------------
38 | @import "../template/theme";
39 | // ---------------------------------------------
--------------------------------------------------------------------------------
/learn/libs/reveal.js/css/theme/source/black.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Black theme for reveal.js. This is the opposite of the 'white' theme.
3 | *
4 | * By Hakim El Hattab, http://hakim.se
5 | */
6 |
7 |
8 | // Default mixins and settings -----------------
9 | @import "../template/mixins";
10 | @import "../template/settings";
11 | // ---------------------------------------------
12 |
13 |
14 | // Include theme-specific fonts
15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css);
16 |
17 |
18 | // Override theme settings (see ../template/settings.scss)
19 | $backgroundColor: #222;
20 |
21 | $mainColor: #fff;
22 | $headingColor: #fff;
23 |
24 | $mainFontSize: 42px;
25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif;
26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif;
27 | $headingTextShadow: none;
28 | $headingLetterSpacing: normal;
29 | $headingTextTransform: uppercase;
30 | $headingFontWeight: 600;
31 | $linkColor: #42affa;
32 | $linkColorHover: lighten( $linkColor, 15% );
33 | $selectionBackgroundColor: lighten( $linkColor, 25% );
34 |
35 | $heading1Size: 2.5em;
36 | $heading2Size: 1.6em;
37 | $heading3Size: 1.3em;
38 | $heading4Size: 1.0em;
39 |
40 | section.has-light-background {
41 | &, h1, h2, h3, h4, h5, h6 {
42 | color: #222;
43 | }
44 | }
45 |
46 |
47 | // Theme template ------------------------------
48 | @import "../template/theme";
49 | // ---------------------------------------------
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zh/object/hasownproperty.md:
--------------------------------------------------------------------------------
1 | ##`hasOwnProperty` 函数
2 |
3 | 为了判断一个对象是否包含*自定义*属性而*不是*[原型链](#object.prototype)上的属性,
4 | 我们需要使用继承自 `Object.prototype` 的 `hasOwnProperty` 方法。
5 |
6 | > **注意:** 通过判断一个属性是否 `undefined` 是**不够**的。
7 | > 因为一个属性可能确实存在,只不过它的值被设置为 `undefined`。
8 |
9 | `hasOwnProperty` 是 JavaScript 中唯一一个处理属性但是**不**查找原型链的函数。
10 |
11 | // 修改 Object.prototype
12 | Object.prototype.bar = 1;
13 | var foo = {goo: undefined};
14 |
15 | foo.bar; // 1
16 | 'bar' in foo; // true
17 |
18 | foo.hasOwnProperty('bar'); // false
19 | foo.hasOwnProperty('goo'); // true
20 |
21 | 只有 `hasOwnProperty` 可以给出正确和期望的结果。可以查看 [`for in` 循环](#object.forinloop)
22 | 章节来获取关于在迭代遍历对象属性的时候,何时使用 `hasOwnProperty` 的更多信息。
23 |
24 | ###`hasOwnProperty` 作为属性
25 |
26 | JavaScript **不会**保护 `hasOwnProperty` 被非法占用,因此如果一个对象碰巧存在这个属性,
27 | 就需要使用*外部*的 `hasOwnProperty` 函数来获取正确的结果。
28 |
29 | var foo = {
30 | hasOwnProperty: function() {
31 | return false;
32 | },
33 | bar: 'Here be dragons'
34 | };
35 |
36 | foo.hasOwnProperty('bar'); // 总是返回 false
37 |
38 | // 使用其它对象的 hasOwnProperty,并将其上下文设置为 foo
39 | ({}).hasOwnProperty.call(foo, 'bar'); // true
40 |
41 | ###结论
42 |
43 | 当检查对象上某个属性是否存在时,`hasOwnProperty` 是**唯一**可用的方法。
44 | 同时在使用 [`for in` loop](#object.forinloop) 遍历对象时,推荐**总是**使用 `hasOwnProperty` 方法,
45 | 这将会避免[原型](#object.prototype)对象扩展带来的干扰。
46 |
47 |
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/css/theme/source/beige.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Beige theme for reveal.js.
3 | *
4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
5 | */
6 |
7 |
8 | // Default mixins and settings -----------------
9 | @import "../template/mixins";
10 | @import "../template/settings";
11 | // ---------------------------------------------
12 |
13 |
14 |
15 | // Include theme-specific fonts
16 | @import url(../../lib/font/league-gothic/league-gothic.css);
17 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
18 |
19 |
20 | // Override theme settings (see ../template/settings.scss)
21 | $mainColor: #333;
22 | $headingColor: #333;
23 | $headingTextShadow: none;
24 | $backgroundColor: #f7f3de;
25 | $linkColor: #8b743d;
26 | $linkColorHover: lighten( $linkColor, 20% );
27 | $selectionBackgroundColor: rgba(79, 64, 28, 0.99);
28 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15);
29 |
30 | // Background generator
31 | @mixin bodyBackground() {
32 | @include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) );
33 | }
34 |
35 |
36 |
37 | // Theme template ------------------------------
38 | @import "../template/theme";
39 | // ---------------------------------------------
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/css/theme/source/black.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Black theme for reveal.js. This is the opposite of the 'white' theme.
3 | *
4 | * By Hakim El Hattab, http://hakim.se
5 | */
6 |
7 |
8 | // Default mixins and settings -----------------
9 | @import "../template/mixins";
10 | @import "../template/settings";
11 | // ---------------------------------------------
12 |
13 |
14 | // Include theme-specific fonts
15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css);
16 |
17 |
18 | // Override theme settings (see ../template/settings.scss)
19 | $backgroundColor: #222;
20 |
21 | $mainColor: #fff;
22 | $headingColor: #fff;
23 |
24 | $mainFontSize: 42px;
25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif;
26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif;
27 | $headingTextShadow: none;
28 | $headingLetterSpacing: normal;
29 | $headingTextTransform: uppercase;
30 | $headingFontWeight: 600;
31 | $linkColor: #42affa;
32 | $linkColorHover: lighten( $linkColor, 15% );
33 | $selectionBackgroundColor: lighten( $linkColor, 25% );
34 |
35 | $heading1Size: 2.5em;
36 | $heading2Size: 1.6em;
37 | $heading3Size: 1.3em;
38 | $heading4Size: 1.0em;
39 |
40 | section.has-light-background {
41 | &, h1, h2, h3, h4, h5, h6 {
42 | color: #222;
43 | }
44 | }
45 |
46 |
47 | // Theme template ------------------------------
48 | @import "../template/theme";
49 | // ---------------------------------------------
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/css/theme/source/white.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * White theme for reveal.js. This is the opposite of the 'black' theme.
3 | *
4 | * By Hakim El Hattab, http://hakim.se
5 | */
6 |
7 |
8 | // Default mixins and settings -----------------
9 | @import "../template/mixins";
10 | @import "../template/settings";
11 | // ---------------------------------------------
12 |
13 |
14 | // Include theme-specific fonts
15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css);
16 |
17 |
18 | // Override theme settings (see ../template/settings.scss)
19 | $backgroundColor: #fff;
20 |
21 | $mainColor: #222;
22 | $headingColor: #222;
23 |
24 | $mainFontSize: 42px;
25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif;
26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif;
27 | $headingTextShadow: none;
28 | $headingLetterSpacing: normal;
29 | $headingTextTransform: uppercase;
30 | $headingFontWeight: 600;
31 | $linkColor: #2a76dd;
32 | $linkColorHover: lighten( $linkColor, 15% );
33 | $selectionBackgroundColor: lighten( $linkColor, 25% );
34 |
35 | $heading1Size: 2.5em;
36 | $heading2Size: 1.6em;
37 | $heading3Size: 1.3em;
38 | $heading4Size: 1.0em;
39 |
40 | section.has-dark-background {
41 | &, h1, h2, h3, h4, h5, h6 {
42 | color: #fff;
43 | }
44 | }
45 |
46 |
47 | // Theme template ------------------------------
48 | @import "../template/theme";
49 | // ---------------------------------------------
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/tr/array/constructor.md:
--------------------------------------------------------------------------------
1 | ## `Array` Oluşturucusu
2 |
3 | `Array` oluşturucusunun parametrelerini nasıl değerlendirdiği belirsiz olduğu
4 | için, yeni diziler oluşturulurken her zaman dizi sabitlerinin (`[]`
5 | notasyonu) kullanılması tavsiye olunur.
6 |
7 | [1, 2, 3]; // Sonuç: [1, 2, 3]
8 | new Array(1, 2, 3); // Sonuç: [1, 2, 3]
9 |
10 | [3]; // Sonuç: [3]
11 | new Array(3); // Sonuç: []
12 | new Array('3') // Sonuç: ['3']
13 |
14 | `Array` oluşturucusuna tek bir argüman verildiğinde, ve bu argümanın türü
15 | `Number` ise, oluşacak *boş* dizinin `length` özelliği argümanın
16 | değerine eşit olacaktır. Bu şekilde oluşturulan bir dizinin **sadece**
17 | `length` özelliği belirlenmiş olup dizi indisleri tanımsız olacaktır.
18 |
19 | var arr = new Array(3);
20 | arr[1]; // undefined
21 | 1 in arr; // false, indisler atanmadı
22 |
23 | Dizinin uzunluğunu bu şekilde önceden belirlemek sadece bir iki durumda
24 | kullanışlıdır. Bunlardan birisi bir döngüye gerek olmadan bir karakter
25 | katarını tekrarlamaktır.
26 |
27 | new Array(count + 1).join(stringToRepeat);
28 |
29 | ### Sonuç
30 |
31 | `Array` oluşturucusunun kullanılmasından mümkün olduğu kadar kaçınılmalıdır.
32 | Bunun yerine her zaman dizi sabitleri tercih edilmelidir. Hem daha kısadırlar
33 | hem de daha anlaşılır bir sentaksa sahiptirler; bu nedenle programın
34 | okunabilirliğini de artırırlar.
35 |
36 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/hu/array/constructor.md:
--------------------------------------------------------------------------------
1 | ## Az `Array` konstruktor
2 |
3 | Mivel az `Array` konstruktora kétértelműen bánik a paraméterekkel, melegen
4 | ajánlott mindig a tömb literált - `[]` jelölés - használni új tömbök létrehozásakor.
5 |
6 | [1, 2, 3]; // Eredmény: [1, 2, 3]
7 | new Array(1, 2, 3); // Eredmény: [1, 2, 3]
8 |
9 | [3]; // Eredmény: [3]
10 | new Array(3); // Eredmény: []
11 | new Array('3') // Eredmény: ['3']
12 |
13 | Abban az esetben, ha ez a konstruktor csak egy `szám` paramétert kap, akkor
14 | visszatérési értékül egy olyan tömböt fog létrehozni amelynek a `length` mezője
15 | akkorára van beállítva, ahogy azt megadtuk az argumentumban. Megjegyzendő hogy
16 | **csak** a `length` tulajdonság lesz ekkor beállítva; az egyes indexek külön-külön
17 | nem lesznek inicializálva.
18 |
19 | var arr = new Array(3);
20 | arr[1]; // undefined
21 | 1 in arr; // hamis, nincs ilyen index
22 |
23 | A tömb hosszának közvetlen állítása amúgy is csak elég kevés esetben
24 | használható értelmesen, mint például alább, hogyha el akarjuk kerülni a
25 | `for ciklus` használatát egy string ismétlésekor.
26 |
27 | new Array(count + 1).join(ismetlendoString);
28 |
29 | ### Összegzésül
30 |
31 | Az `Array` konstruktor közvetlen használata erősen kerülendő. A literálok használata
32 | elfogadott inkább, mivel rövidebbek, tisztább a szintaxisuk és olvashatóbb kódot
33 | eredményeznek.
34 |
35 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/fr/array/constructor.md:
--------------------------------------------------------------------------------
1 | ## Le constructeur `Array`
2 |
3 | Le constructeur `Array` traite ses paramètres de façon ambigu.
4 | Il est fortement recommandé d'utiliser le littéral de tableau - notation `[]` - pour créer de nouveaux tableaux.
5 |
6 | [1, 2, 3]; // Résultat: [1, 2, 3]
7 | new Array(1, 2, 3); // Résultat: [1, 2, 3]
8 |
9 | [3]; // Résultat: [3]
10 | new Array(3); // Résultat: []
11 | new Array('3') // Résultat: ['3']
12 |
13 | Dans les cas où il n'y a qu'un seul argument passé au constructeur `Array`, et quand cet argument est un nombre `Number`, le constructeur va retourner un nouveau tableau *clairsemé* avec la propriété `length` (longueur) fixée à la valeur de l'argument.
14 | Il faut noter que de cette façon, **seulement** la propriété `length` du nouveau tableau sera mise en place, les indices réels du tableau ne seront pas initialisés.
15 |
16 | var arr = new Array(3);
17 | arr[1]; // undefined
18 | 1 in arr; // faux, l'indice n'existe pas
19 |
20 | Être en mesure de régler la longueur du tableau à l'avance n'est utile que dans quelques cas, comme la répétition d'une chaîne de caractères, dans lequel on évite l'utilisation d'une boucle.
21 |
22 | new Array(count + 1).join(chaineARepeter);
23 |
24 | ### En conclusion
25 |
26 | Les littéraux sont préférés au constructeur `Array`. Ils sont plus courts, ont une syntaxe plus claire, et augmente la lisibilité du code.
27 |
28 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/css/theme/source/simple.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * A simple theme for reveal.js presentations, similar
3 | * to the default theme. The accent color is darkblue.
4 | *
5 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed.
6 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
7 | */
8 |
9 |
10 | // Default mixins and settings -----------------
11 | @import "../template/mixins";
12 | @import "../template/settings";
13 | // ---------------------------------------------
14 |
15 |
16 |
17 | // Include theme-specific fonts
18 | @import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700);
19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
20 |
21 |
22 | // Override theme settings (see ../template/settings.scss)
23 | $mainFont: 'Lato', sans-serif;
24 | $mainColor: #000;
25 | $headingFont: 'News Cycle', Impact, sans-serif;
26 | $headingColor: #000;
27 | $headingTextShadow: none;
28 | $headingTextTransform: none;
29 | $backgroundColor: #fff;
30 | $linkColor: #00008B;
31 | $linkColorHover: lighten( $linkColor, 20% );
32 | $selectionBackgroundColor: rgba(0, 0, 0, 0.99);
33 |
34 | section.has-dark-background {
35 | &, h1, h2, h3, h4, h5, h6 {
36 | color: #fff;
37 | }
38 | }
39 |
40 |
41 | // Theme template ------------------------------
42 | @import "../template/theme";
43 | // ---------------------------------------------
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/css/theme/source/simple.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * A simple theme for reveal.js presentations, similar
3 | * to the default theme. The accent color is darkblue.
4 | *
5 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed.
6 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
7 | */
8 |
9 |
10 | // Default mixins and settings -----------------
11 | @import "../template/mixins";
12 | @import "../template/settings";
13 | // ---------------------------------------------
14 |
15 |
16 |
17 | // Include theme-specific fonts
18 | @import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700);
19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
20 |
21 |
22 | // Override theme settings (see ../template/settings.scss)
23 | $mainFont: 'Lato', sans-serif;
24 | $mainColor: #000;
25 | $headingFont: 'News Cycle', Impact, sans-serif;
26 | $headingColor: #000;
27 | $headingTextShadow: none;
28 | $headingTextTransform: none;
29 | $backgroundColor: #fff;
30 | $linkColor: #00008B;
31 | $linkColorHover: lighten( $linkColor, 20% );
32 | $selectionBackgroundColor: rgba(0, 0, 0, 0.99);
33 |
34 | section.has-dark-background {
35 | &, h1, h2, h3, h4, h5, h6 {
36 | color: #fff;
37 | }
38 | }
39 |
40 |
41 | // Theme template ------------------------------
42 | @import "../template/theme";
43 | // ---------------------------------------------
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zhtw/array/general.md:
--------------------------------------------------------------------------------
1 | ## Array 迴圈和屬性
2 |
3 | 雖然在 Javascript 中 Array 都是 Objects,但是沒有好的理由要使用他
4 | 在 [`for in`](#object.forinloop) 的迴圈中。事實上有很多原因要避免使用 `for in` 在 Array 之中
5 |
6 | > **注意:** Javascript Arrays **不是** *關連性 Arrays*
7 | > 只有 [objects](#object.general) 來管理建值的相對應關係
8 | > Arrays 是**保持** 順序的,Objects **則沒有**
9 |
10 | 因為 `for in` 迴圈會使用[`hasOwnProperty`](#object.hasownproperty),所以它會列舉所有在原型 Array 上的屬性,這會使得 Array 比原本的 `for` 迴圈慢上二十幾倍
11 |
12 | ### 迴圈
13 |
14 | 為了要達到最好的性能所以最好使用 `for` 迴圈來讀取一個 Array 裡面的數值。
15 |
16 | var list = [1, 2, 3, 4, 5, ...... 100000000];
17 | for(var i = 0, l = list.length; i < l; i++) {
18 | console.log(list[i]);
19 | }
20 |
21 | 在上面的例子中利用 `l = list.length` 來處理 Array 的長度問題。
22 |
23 | 雖然 `length` 屬性是屬於 Array 中其中一個屬性,但是他在每次循環還是有一定的性能消耗。
24 | 近期 Javascript **可能**使用來解決在這上面的效率問題,但是在現在的引擎上還不一定有支援。
25 |
26 | 實際上,不使用暫存 Array 長度的方式比使用暫存的版本還要慢很多。
27 |
28 | ### `length` 的屬性
29 |
30 | `length` 屬性中的 *getter* 直接回傳在 Array 之中的程度,而 *setter* 可以用來 **刪除** Array。
31 |
32 | var foo = [1, 2, 3, 4, 5, 6];
33 | foo.length = 3;
34 | foo; // [1, 2, 3]
35 |
36 | foo.length = 6;
37 | foo.push(4);
38 | foo; // [1, 2, 3, undefined, undefined, undefined, 4]
39 |
40 | 在上面的例子可以看到,如果給的長度比較小他就會去刪除 Array 中的數值。如果比較大的話,他就會自己增加一些 `undefined` 的數值進去
41 |
42 | ### 結語
43 |
44 | 為了達到更好的效率,建議使用 `for` 迴圈還有暫存 `length` 的屬性。
45 | 而 `for in` 迴圈則是會讓程式中有更多的錯誤和性能問題。
46 |
47 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/it/array/constructor.md:
--------------------------------------------------------------------------------
1 | ## Il costruttore `Array`
2 |
3 | Dato che il costruttore `Array` è ambiguo riguardo a come esso gestisca i suoi
4 | parametri, si consiglia calorosamente di usare l'array letterale (notazione `[]`)
5 | quando si creano array.
6 |
7 | [1, 2, 3]; // Risultato: [1, 2, 3]
8 | new Array(1, 2, 3); // Risultato: [1, 2, 3]
9 |
10 | [3]; // Risultato: [3]
11 | new Array(3); // Risultato: []
12 | new Array('3') // Risultato: ['3']
13 |
14 | Nei casi in cui c'è solo un argomento passato al costruttore `Array` e quando
15 | l'argomento è un `Number`, il costruttore ritornerà un nuovo array *frammentato*
16 | con la proprietà `length` impostata al valore dell'argomento. Si noti
17 | che in questo modo **solo** la proprietà `length` del nuovo array verrà impostata,
18 | mentre gli indici dell'array non verranno inizializzati.
19 |
20 | var arr = new Array(3);
21 | arr[1]; // undefined
22 | 1 in arr; // false, l'indice non è stato impostato
23 |
24 | Essere in grado di impostare la lunghezza dell'array in anticipo è utile soltanto
25 | in poche situazioni, come ad esempio la ripetizione di una stringa, nel cui caso
26 | si eviterebbe l'uso di un ciclo.
27 |
28 | new Array(count + 1).join(stringToRepeat);
29 |
30 | ### In conclusione
31 |
32 | I letterali sono da preferirsi al costruttore Array. Sono più concisi, hanno una
33 | sintassi più chiara ed incrementano la leggibilità del codice.
34 |
35 |
--------------------------------------------------------------------------------
/resources/youtube/intro.to.typescript.greek/resources.md:
--------------------------------------------------------------------------------
1 | # Σημειώσεις & διορθώσεις για το video "Εισαγωγή στην TypeScript"
2 |
3 | URL: [https://www.youtube.com/watch?v=Er_a-NwKMws](https://www.youtube.com/watch?v=Er_a-NwKMws)
4 |
5 | ## Fixing the `premium` type issue ("golden" | "bronze") (Timestamp: 01:10:15)
6 |
7 | ```ts
8 | type premiumTag = "golden" | "bronze"
9 |
10 | interface IPAccount {
11 | premium: premiumTag
12 | }
13 |
14 | class Premium implements IPAccount {
15 | // Way 1)
16 | premium = "golden" as premiumTag;
17 |
18 | // Way 2)
19 | premium:premiumTag = "golden";
20 | }
21 | ```
22 |
23 | ## Fixing the Premium Class type (Timestamp: 01:13:00)
24 |
25 | The correct code is the following:
26 |
27 | ```ts
28 | interface Account {
29 | balance:number
30 | }
31 |
32 | type premiumTag = "golden" | "bronze"
33 |
34 | interface IPAccount {
35 | premium: premiumTag;
36 | }
37 | type ISpecial = Account & IPAccount;
38 |
39 | class Premium implements ISpecial /* NOT: implements IPAccount*/ {
40 | balance:number;
41 | premium:premiumTag;
42 | constructor(balance:number, premium:premiumTag){
43 | this.balance = balance;
44 | this.premium = premium;
45 | }
46 | }
47 |
48 | const premium = new Premium(100, "golden");
49 | // premium has an inferred type `Premium` which in turn implements `ISpecial`
50 | ```
51 |
52 | ## Timestamp: 01:18:55
53 |
54 | The correct syntax for the type on the 3rd example should be `object[]` and not `{}[]`
55 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/fi/types/instanceof.md:
--------------------------------------------------------------------------------
1 | ## `instanceof`-operaattori
2 |
3 | `instanceof`-operaattori vertaa kahden operandinsa konstruktoreita keskenään. Se on hyödyllinen ainoastaan, kun vertaillaan itsetehtyjä olioita. Natiivien tyyppien tapauksessa se on lähes yhtä hyödytön kuin [typeof-operaattori](#types.typeof).
4 |
5 | ### Itsetehtyjen olioiden vertailu
6 |
7 | function Foo() {}
8 | function Bar() {}
9 | Bar.prototype = new Foo();
10 |
11 | new Bar() instanceof Bar; // tosi
12 | new Bar() instanceof Foo; // tosi
13 |
14 | // Tämä asettaa vain Bar.prototype-ominaisuudeksi
15 | // funktio-olion Foo
16 | // Se ei kuitenkaan ole Foon todellinen instanssi
17 | Bar.prototype = Foo;
18 | new Bar() instanceof Foo; // epätosi
19 |
20 | ### `instanceof` ja natiivit tyypit
21 |
22 | new String('foo') instanceof String; // tosi
23 | new String('foo') instanceof Object; // tosi
24 |
25 | 'foo' instanceof String; // epätosi
26 | 'foo' instanceof Object; // epätosi
27 |
28 | On tärkeää huomata, että `instanceof` ei toimi olioilla, jotka tulevat muista JavaScript-konteksteista (esim. selaimen eri dokumenteista). Tässä tapauksessa niiden konstruktorit viittaavat eri olioon.
29 |
30 | ### Yhteenveto
31 |
32 | `instanceof`-operaattoria tulee käyttää **ainoastaan**, mikäli käsitellään itsetehtyjä olioita saman JavaScript-kontekstin sisällä. Kuten [`typeof`](#types.typeof)-operaattorikin, myös muita sen käyttöjä tulee **välttää**.
33 |
34 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/javascript/html5.js:
--------------------------------------------------------------------------------
1 | // html5shiv MIT @rem remysharp.com/html5-enabling-script
2 | // iepp v1.6.2 MIT @jon_neal iecss.com/print-protector
3 | /*@cc_on(function(m,c){var z="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video";function n(d){for(var a=-1;++ai";if(g.childNodes.length!==1){var i=z.split("|"),o=i.length,s=RegExp("(^|\\s)("+z+")",
4 | "gi"),t=RegExp("<(/*)("+z+")","gi"),u=RegExp("(^|[^\\n]*?\\s)("+z+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),r=c.createDocumentFragment(),k=c.documentElement;g=k.firstChild;var h=c.createElement("body"),l=c.createElement("style"),f;n(c);n(r);g.insertBefore(l,
5 | g.firstChild);l.media="print";m.attachEvent("onbeforeprint",function(){var d=-1,a=p(c.styleSheets,"all"),e=[],b;for(f=f||c.body;(b=u.exec(a))!=null;)e.push((b[1]+b[2]+b[3]).replace(s,"$1.iepp_$2")+b[4]);for(l.styleSheet.cssText=e.join("\n");++d **注意:** 判斷一個屬性是否 `undefined` 是 **不夠的**。
6 | > 因為一個屬性可能存在,但是它的值被設成 `undefined`。
7 |
8 | `hasOwnProperty` 是 JavaScript 中唯一一個處理屬性但是 **不** 找原型鏈的函式。
9 |
10 | // 修改 Object.prototype
11 | Object.prototype.bar = 1;
12 | var foo = {goo: undefined};
13 |
14 | foo.bar; // 1
15 | 'bar' in foo; // true
16 |
17 | foo.hasOwnProperty('bar'); // false
18 | foo.hasOwnProperty('goo'); // true
19 |
20 | 只有 `hasOwnProperty` 給予正確的結果,這對進入物件的屬性很有效果,**沒有** 其他方法可以用來排除原型上的屬性,而不是定義在物件 *自己* 上的屬性。
21 |
22 | ### `hasOwnProperty` 作為屬性
23 |
24 | JavaScript **不會** 保護 `hasOwnProperty`被占用,因此如果碰到存在這個屬性,就需要使用 *外部* 的 `hasOwnProperty` 來獲取正確的結果。
25 |
26 | var foo = {
27 | hasOwnProperty: function() {
28 | return false;
29 | },
30 | bar: 'Here be dragons'
31 | };
32 |
33 | foo.hasOwnProperty('bar'); // 永遠返回 false
34 |
35 | // 使用其他對象的 hasOwnProperty,並將其上下設置為 foo
36 | ({}).hasOwnProperty.call(foo, 'bar'); // true
37 |
38 | // 也可以透過原生 Object prototype 的 hasOwnProperty 函數來達成目的
39 | Object.prototype.hasOwnProperty.call(foo, 'bar'); // true
40 |
41 | ### 結論
42 |
43 | 當檢查一個物件是否存在的時候, `hasOwnProperty` 是 **唯一** 可用的方法。
44 | 同時在使用 [`for in loop`](#object.forinloop)
45 | 建議使用 `hasOwnProperty` 避免 [原型](#object.prototype)所帶來的干擾。
46 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ko/array/general.md:
--------------------------------------------------------------------------------
1 | ## 배열 순회와 프로퍼티
2 |
3 | JavaScript에서는 배열(Array)도 객체(Object)지만 객체 순회(Iterate)를 할 때 [`for in`](#object.forinloop)을 사용해서 좋을 게 없다. 실제로 배열을 탐색할때 `for in`문 사용하지 말아야 할 이유가 매우 많다.
4 |
5 | > **Note:** JavaScript의 배열은 *연관 배열(Associative Array)*이 **아니다**. JavaScript는 오직 key/value를 맵핑한 [객체](#object.general)만 있을 뿐이다. 연관 배열은 순서를 보장해주지만 객체는 순서를 보장하지 않는다.
6 |
7 | `for in`은 프로토타입 체인에 있는 프로퍼티를 모두 훑는(enumerate) 데다가 객체 자신의 프로퍼티만 훑으려면 [`hasOwnProperty`](#object.hasownproperty)를 사용해야 하기 때문에 `for`보다 20배 느리다.
8 |
9 | ### 배열 순회
10 |
11 | 배열을 순회 할때는 일반적인 `for`문을 사용하는 것이 가장 빠르다.
12 |
13 | var list = [1, 2, 3, 4, 5, ...... 100000000];
14 | for(var i = 0, l = list.length; i < l; i++) {
15 | console.log(list[i]);
16 | }
17 |
18 | 이 예제에서 `l = list.length`로 배열의 length 값을 캐시해야 한다는 것을 꼭 기억해야 한다.
19 |
20 | 매번 반복할때마다 배열에 있는 `length` 프로퍼티에 접근하는 것은 좀 부담스럽다. 최신 JavaScript 엔진은 이 일을 알아서 처리해주기도 하지만 코드가 늘 새 엔진에서 실행되도록 보장할 방법이 없다.
21 |
22 | 실제로 캐시 하지 않으면 성능이 반으로 줄어든다.
23 |
24 | ### `length` 프로퍼티
25 |
26 | `length` 프로퍼티의 *getter*는 단순히 Array 안에 있는 엘리먼트의 개수를 반환하고 *setter*는 배열을 할당한 수만큼 잘라 버린다.
27 |
28 | var arr = [1, 2, 3, 4, 5, 6];
29 | arr.length = 3;
30 | arr; // [1, 2, 3]
31 |
32 | arr.length = 6;
33 | arr.push(4);
34 | arr; // [1, 2, 3, undefined, undefined, undefined, 4]
35 |
36 | 현재 크기보다 더 작은 값을 할당하면 배열을 자른다. 배열의 크기를 증가시키면 드문드문(sparse)한 배열을 생성한다.
37 |
38 | ### 결론
39 |
40 | 최적의 성능을 위해서는 `for`문을 사용하고 `length` 프로퍼티 값을 캐시해야 한다. 배열에 `for in`을 사용하면 성능도 떨어지고 버그 나기도 쉽다.
41 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/css/monokai-sublime-sha.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/
4 |
5 | */
6 |
7 | .hljs {
8 | display: block;
9 | overflow-x: auto;
10 | padding: 0.5em;
11 | background: #23241f;
12 | background: #000;
13 | white-space: pre-wrap !important; /* SHA */
14 | }
15 |
16 | .hljs,
17 | .hljs-tag,
18 | .hljs-subst {
19 | color: #f8f8f2;
20 | }
21 |
22 | .hljs-strong,
23 | .hljs-emphasis {
24 | color: #a8a8a2;
25 | }
26 |
27 | .hljs-bullet,
28 | .hljs-quote,
29 | .hljs-number,
30 | .hljs-regexp,
31 | .hljs-literal,
32 | .hljs-link {
33 | color: #ae81ff;
34 | }
35 |
36 | .hljs-code,
37 | .hljs-title,
38 | .hljs-section,
39 | .hljs-selector-class {
40 | color: #a6e22e;
41 | }
42 |
43 | .hljs-strong {
44 | font-weight: bold;
45 | }
46 |
47 | .hljs-emphasis {
48 | font-style: italic;
49 | }
50 |
51 | .hljs-keyword,
52 | .hljs-selector-tag,
53 | .hljs-name,
54 | .hljs-attr {
55 | color: #f92672;
56 | }
57 |
58 | .hljs-symbol,
59 | .hljs-attribute {
60 | color: #66d9ef;
61 | }
62 |
63 | .hljs-params,
64 | .hljs-class .hljs-title {
65 | color: #f8f8f2;
66 | }
67 |
68 | .hljs-string,
69 | .hljs-type,
70 | .hljs-built_in,
71 | .hljs-builtin-name,
72 | .hljs-selector-id,
73 | .hljs-selector-attr,
74 | .hljs-selector-pseudo,
75 | .hljs-addition,
76 | .hljs-variable,
77 | .hljs-template-variable {
78 | color: #e6db74;
79 | }
80 |
81 | .hljs-comment,
82 | .hljs-deletion,
83 | .hljs-meta {
84 | color: #75715e;
85 | }
86 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ja/array/general.md:
--------------------------------------------------------------------------------
1 | ## 配列の繰り返しとプロパティ
2 |
3 | JavaScriptの配列もまたオブジェクトですが、[`for in ループ`](#object.forinloop)を配列の繰り返し処理で使用することの良い理由は1つもありません。実際、配列に`for in`を使用**しない**為の正当な理由はたくさんあります。
4 |
5 | > **注意:** JavaScriptの配列は*連想配列*では**ありません**。JavaScriptは[objects](#object.general)だけがキーバリューをマッピングするものです。
6 | > また、連想配列は順序を**保持**しますが、オブジェクトは**保持しません**。
7 |
8 | `for in`ループはプロトタイプチェーン上の全てのプロパティを列挙するため、[`hasOwnProperty`](#object.hasownproperty)をそれらのプロパティの存在判定に使います。この為、通常の`for`ループよりも**20倍**遅くなります。
9 |
10 | ### 繰り返し
11 |
12 | 配列の要素を繰り返すとのに、最高のパフォーマンスを出したければ昔ながらの`for`ループを使うのが一番です。
13 |
14 | var list = [1, 2, 3, 4, 5, ...... 100000000];
15 | for(var i = 0, l = list.length; i < l; i++) {
16 | console.log(list[i]);
17 | }
18 |
19 | 上記の例では1つ追加の仕掛けがありますが、それは`l = list.length`によって配列の長さをキャッシュする部分です。
20 |
21 | `length`プロパティは配列自身に定義されてはいますが、ループ中の繰り返しで毎回これを参照してしまうと、やはりオーバーヘッドが存在してしまいます。最近のJavaScriptエンジンはこのような場合に最適化する**はず**ですが、コードが新しいエンジンで実行されるかどうか、知る方法はありません。
22 |
23 | 実際には、キャッシュを抜きにするとループの結果はキャッシュされたものに比べてたった**半分の速度**にしかなりません。
24 |
25 | ### `length`プロパティ
26 |
27 | `length`プロパティの*ゲッター*は単に配列に含まれる要素の数を返すだけにも関わらず、*セッター*は配列を**トランケート**する為にも使用できます。
28 |
29 | var foo = [1, 2, 3, 4, 5, 6];
30 | foo.length = 3;
31 | foo; // [1, 2, 3]
32 |
33 | foo.length = 6;
34 | foo; // [1, 2, 3]
35 |
36 | より小さいlengthを割り当てると配列をトランケートしますが、lengthが大きくなっても配列には何も影響しません。
37 |
38 | ### 終わりに
39 |
40 | 最高のパフォーマンスの為には、常に`for`ループを使用し、`length`プロパティをキャッシュする事をお勧めします。`for in`ループを配列で使用するのは、バグや最低のパフォーマンスの傾向があるコードを書く前兆になります。
41 |
42 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ru/array/constructor.md:
--------------------------------------------------------------------------------
1 | ## Конструктор `Array`
2 |
3 | Так как в конструкторе `Array` есть некоторая двусмысленность, касающаяся его параметров, настоятельно рекомендуется при создании массивов всегда использовать синтаксис литеральной нотации — `[]`.
4 |
5 | [1, 2, 3]; // Результат: [1, 2, 3]
6 | new Array(1, 2, 3); // Результат: [1, 2, 3]
7 |
8 | [3]; // Результат: [3]
9 | new Array(3); // Результат: []
10 | new Array('3') // Результат: ['3']
11 |
12 | В случае, когда в конструктор `Array` передаётся один аргумент и этот аргумент имеет тип `Number`, конструктор возвращает новый, *заполненный случайными значениями*, массив, имеющий длину равную значению переданного аргумента. Стоит заметить, что в этом случае будет установлено только свойство `length` нового массива, индексы массива фактически не будут проинициализированы.
13 |
14 | var arr = new Array(3);
15 | arr[1]; // не определён, undefined
16 | 1 in arr; // false, индекс не был установлен
17 |
18 | Поведение, которое позволяет изначально установить только размер массива, может пригодиться лишь в нескольких случаях, таких как повторение строк, за счёт чего избегается использование цикла `for`.
19 |
20 | new Array(count + 1).join(stringToRepeat);
21 |
22 | ### Заключение
23 |
24 | Использование конструктора `Array` нужно избегать, насколько это возможно. Литералы определённо предпочтительнее — это краткая запись и она имеет более понятный синтаксис, так что при этом даже улучшается читабельность кода.
25 |
26 |
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/css/monokai-sublime-sha.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/
4 |
5 | */
6 |
7 | .hljs {
8 | display: block;
9 | overflow-x: auto;
10 | padding: 0.5em;
11 | background: #23241f;
12 | background: #000;
13 | white-space: pre-wrap !important; /* SHA */
14 | }
15 |
16 | .hljs,
17 | .hljs-tag,
18 | .hljs-subst {
19 | color: #f8f8f2;
20 | }
21 |
22 | .hljs-strong,
23 | .hljs-emphasis {
24 | color: #a8a8a2;
25 | }
26 |
27 | .hljs-bullet,
28 | .hljs-quote,
29 | .hljs-number,
30 | .hljs-regexp,
31 | .hljs-literal,
32 | .hljs-link {
33 | color: #ae81ff;
34 | }
35 |
36 | .hljs-code,
37 | .hljs-title,
38 | .hljs-section,
39 | .hljs-selector-class {
40 | color: #a6e22e;
41 | }
42 |
43 | .hljs-strong {
44 | font-weight: bold;
45 | }
46 |
47 | .hljs-emphasis {
48 | font-style: italic;
49 | }
50 |
51 | .hljs-keyword,
52 | .hljs-selector-tag,
53 | .hljs-name,
54 | .hljs-attr {
55 | color: #f92672;
56 | }
57 |
58 | .hljs-symbol,
59 | .hljs-attribute {
60 | color: #66d9ef;
61 | }
62 |
63 | .hljs-params,
64 | .hljs-class .hljs-title {
65 | color: #f8f8f2;
66 | }
67 |
68 | .hljs-string,
69 | .hljs-type,
70 | .hljs-built_in,
71 | .hljs-builtin-name,
72 | .hljs-selector-id,
73 | .hljs-selector-attr,
74 | .hljs-selector-pseudo,
75 | .hljs-addition,
76 | .hljs-variable,
77 | .hljs-template-variable {
78 | color: #e6db74;
79 | }
80 |
81 | .hljs-comment,
82 | .hljs-deletion,
83 | .hljs-meta {
84 | color: #75715e;
85 | }
86 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/tr/types/instanceof.md:
--------------------------------------------------------------------------------
1 | ## `instanceof` Operatörü
2 |
3 | `instanceof` operatörü verilen iki terimin nesne oluşturucularını karşılaştırır.
4 | Kullanışlı olduğu tek durum özel nesnelerin karşılaştırılmasıdır. Temel nesneler
5 | üzerinde kullanıldığında neredeyse [typeof operatörü](#types.typeof) kadar
6 | yararsızdır.
7 |
8 | ### Özel nesneleri karşılaştırmak
9 |
10 | function Foo() {}
11 | function Bar() {}
12 | Bar.prototype = new Foo();
13 |
14 | new Bar() instanceof Bar; // true
15 | new Bar() instanceof Foo; // true
16 |
17 | // Bu satır sadece Bar.prototype'a Foo fonksiyon nesnesinin atar
18 | // Bir Foo sınıfı nesnesine değil
19 | Bar.prototype = Foo;
20 | new Bar() instanceof Foo; // false
21 |
22 | ### Temel nesnelerle `instanceof` kullanımı
23 |
24 | new String('foo') instanceof String; // true
25 | new String('foo') instanceof Object; // true
26 |
27 | 'foo' instanceof String; // false
28 | 'foo' instanceof Object; // false
29 |
30 | Dikkat edilmesi gereken ilginç bir nokta, `instanceof` operatörünün farklı
31 | JavaScript kaynaklarından gelen nesneler üzerinde çalışmamasıdır (mesela bir
32 | internet tarayıcısının farklı dökümanları), çünkü bu durumda nesne
33 | oluşturucuları aynı olmayacaktır.
34 |
35 | ### Sonuç
36 |
37 | `instanceof` operatörü **sadece** aynı JavaScript kaynağından gelen özel
38 | nesneler ile kullanılmalıdır. Tıpkı [`typeof`](#types.typeof) operatöründe
39 | olduğu gibi, bunun dışındaki tüm kullanımlarından **kaçınılmalıdır**.
40 |
41 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/css/theme/source/moon.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Solarized Dark theme for reveal.js.
3 | * Author: Achim Staebler
4 | */
5 |
6 |
7 | // Default mixins and settings -----------------
8 | @import "../template/mixins";
9 | @import "../template/settings";
10 | // ---------------------------------------------
11 |
12 |
13 |
14 | // Include theme-specific fonts
15 | @import url(../../lib/font/league-gothic/league-gothic.css);
16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
17 |
18 | /**
19 | * Solarized colors by Ethan Schoonover
20 | */
21 | html * {
22 | color-profile: sRGB;
23 | rendering-intent: auto;
24 | }
25 |
26 | // Solarized colors
27 | $base03: #002b36;
28 | $base02: #073642;
29 | $base01: #586e75;
30 | $base00: #657b83;
31 | $base0: #839496;
32 | $base1: #93a1a1;
33 | $base2: #eee8d5;
34 | $base3: #fdf6e3;
35 | $yellow: #b58900;
36 | $orange: #cb4b16;
37 | $red: #dc322f;
38 | $magenta: #d33682;
39 | $violet: #6c71c4;
40 | $blue: #268bd2;
41 | $cyan: #2aa198;
42 | $green: #859900;
43 |
44 | // Override theme settings (see ../template/settings.scss)
45 | $mainColor: $base1;
46 | $headingColor: $base2;
47 | $headingTextShadow: none;
48 | $backgroundColor: $base03;
49 | $linkColor: $blue;
50 | $linkColorHover: lighten( $linkColor, 20% );
51 | $selectionBackgroundColor: $magenta;
52 |
53 |
54 |
55 | // Theme template ------------------------------
56 | @import "../template/theme";
57 | // ---------------------------------------------
58 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/es/array/constructor.md:
--------------------------------------------------------------------------------
1 | ## El constructor `Array`
2 |
3 | Desde el constructor `Array` es ambiguo en la forma en que ocupa sus párametros,
4 | es recomendable siempre el uso de arrays literales - la notación `[]` -
5 | cuando se crean nuevos arrays.
6 |
7 | [1, 2, 3]; // Resultado: [1, 2, 3]
8 | new Array(1, 2, 3); // Resultado: [1, 2, 3]
9 |
10 | [3]; // Resultado: [3]
11 | new Array(3); // Resultado: []
12 | new Array('3') // Resultado: ['3']
13 |
14 | En casos cuando sólo hay un argumento pasado al constructor del `Array`,
15 | y que el argumento es un `Número`, el contructor devolverá un array *disperso*
16 | con la propiedad `length` establecida al valor del argumento. Esto debe señalarse
17 | que la propiedad `length` **sólo** del nuevo array se establecerá de esa manera,
18 | los índices reales de la matriz no se iniciará.
19 |
20 | var arr = new Array(3);
21 | arr[1]; // undefined
22 | 1 in arr; // falso, el índice no se ha establecido
23 |
24 | El comportamiento de poder establecer la longitud de un array inicial sólo es útil
25 | en algunos casos array, como la repetición de una cadena, en la que se evita el uso
26 | del código de `bucle for`.
27 |
28 | new Array(count + 1).join(stringToRepeat);
29 |
30 | ### En conclusión
31 |
32 | El uso de un constructor `Array` debe ser devuelto como sea posible.
33 | Los literales son definitivamente preferidos. Estos son más cortos y tienen una
34 | sintaxis más limpia; por lo tanto, también se incrementa la legibilidad del código.
35 |
36 |
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/css/theme/source/moon.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Solarized Dark theme for reveal.js.
3 | * Author: Achim Staebler
4 | */
5 |
6 |
7 | // Default mixins and settings -----------------
8 | @import "../template/mixins";
9 | @import "../template/settings";
10 | // ---------------------------------------------
11 |
12 |
13 |
14 | // Include theme-specific fonts
15 | @import url(../../lib/font/league-gothic/league-gothic.css);
16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
17 |
18 | /**
19 | * Solarized colors by Ethan Schoonover
20 | */
21 | html * {
22 | color-profile: sRGB;
23 | rendering-intent: auto;
24 | }
25 |
26 | // Solarized colors
27 | $base03: #002b36;
28 | $base02: #073642;
29 | $base01: #586e75;
30 | $base00: #657b83;
31 | $base0: #839496;
32 | $base1: #93a1a1;
33 | $base2: #eee8d5;
34 | $base3: #fdf6e3;
35 | $yellow: #b58900;
36 | $orange: #cb4b16;
37 | $red: #dc322f;
38 | $magenta: #d33682;
39 | $violet: #6c71c4;
40 | $blue: #268bd2;
41 | $cyan: #2aa198;
42 | $green: #859900;
43 |
44 | // Override theme settings (see ../template/settings.scss)
45 | $mainColor: $base1;
46 | $headingColor: $base2;
47 | $headingTextShadow: none;
48 | $backgroundColor: $base03;
49 | $linkColor: $blue;
50 | $linkColorHover: lighten( $linkColor, 20% );
51 | $selectionBackgroundColor: $magenta;
52 |
53 |
54 |
55 | // Theme template ------------------------------
56 | @import "../template/theme";
57 | // ---------------------------------------------
58 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/js/classList.js:
--------------------------------------------------------------------------------
1 | /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/
2 | if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p **ES5 提示: ** `undefined` 在 ECMAScript 5 裡 **不再是** *可寫* 的
13 | > 但是它的名稱還是可以被隱藏,比如說定義一個函數為 `undefined`。
14 |
15 | 這裡有一些例子會回傳 `undefined` 的值:
16 |
17 | - 進入尚未修改的全域變數 `undefined`。
18 | - 進入一個宣告但 **尚未** 初始化的變數。
19 | - `return` 表示式中沒有返回任何內容。
20 | - 呼叫不存在的屬性。
21 | - 函式參數沒有被傳遞數值。
22 | - 任何被被設定為 `undefined` 的變數。
23 | - 任何表達式中形式為 `void(expression)`
24 |
25 | ### 處理 `undefined` 值的改變
26 |
27 | 由於全域變數 `undefined` 只有保存 `undefined` 類型實際值的一個副本,指定了一個新的值並 **不會** 改變 `undefined`類型裡面的值。
28 |
29 | 為了避免去改變 `undefined` 的值,常用的技巧就是加上一個新的變數到 [匿名包裝器](#function.scopes)。在使用的時候,這個參數不會接受任何的值。
30 |
31 | var undefined = 123;
32 | (function(something, foo, undefined) {
33 | // undefined 在區域區間內得到了 `undefined` 的值
34 |
35 | })('Hello World', 42);
36 |
37 | 另外一個可以得到同樣的效果就是在內部宣告一個變數
38 |
39 | var undefined = 123;
40 | (function(something, foo) {
41 | var undefined;
42 | ...
43 |
44 | })('Hello World', 42);
45 |
46 | 唯一的不同就是在下者會多 4 個多 bytes 用來壓縮檔案,而且函數內也沒有其他需要使用 `var`
47 |
48 | ### 使用 `null`
49 |
50 | JavaScript 中所使用的 `undefined` 類似別的語言中的 *null* , 但實際上在 JavaScript 中的 `null` 算是另外一個類型。
51 |
52 | 它在 JavaScript 有些可以使用的地方 (例如說宣告一個原型的終結,例如 `Foo.prototype = null` )。
53 | 但是在大部分的時候可以用 `undefined`,來取代。
54 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ja/object/hasownproperty.md:
--------------------------------------------------------------------------------
1 | ## `hasOwnProperty`
2 |
3 | オブジェクトは*自分自身*と**自分以外**のどちらで定義されたプロパティかを[prototype chain](#object.prototype)のどこかでチェックしなくてはなりません。これは`Object.prototype`から継承される全てのオブジェクトの`hasOwnProperty`メソッドを使う必要があります。
4 |
5 | > **注意:** この方法はプロパティが`undefined`かどうかを調べるには十分では**無い**方法です。
6 | > プロパティは、ほとんどのオブジェクトで存在しているはずの物ではありますが、`undefined`が
7 | > 値に設定される事態は起こり得ます。
8 |
9 | `hasOwnProperty`はJavaScriptで唯一プロトタイプチェーン内を**遡らず**にプロパティを扱う事が出来ます。
10 |
11 | // Object.prototype汚染
12 | Object.prototype.bar = 1;
13 | var foo = {goo: undefined};
14 |
15 | foo.bar; // 1
16 | 'bar' in foo; // true
17 |
18 | foo.hasOwnProperty('bar'); // false
19 | foo.hasOwnProperty('goo'); // true
20 |
21 | `hasOwnProperty`だけが、正しく期待した結果を出すでしょう。これはあらゆるオブジェクトのプロパティの繰り返し処理をする時必須の事です。オブジェクト*自身*に定義されておらず、プロトタイプチェーンのどこかには定義されているというプロパティを除外する手段が他に**ありません**。
22 |
23 | ### プロパティとしての`hasOwnProperty`
24 |
25 | JavaScriptはプロパティ名として`hasOwnProperty`を保護して**いません**。;従って、この名前のプロパティを持ったオブジェクトが存在する事がありえます。正しい結果を得る為には*外部*の`hasOwnProperty`を使う必要があります。
26 |
27 | var foo = {
28 | hasOwnProperty: function() {
29 | return false;
30 | },
31 | bar: 'Here be dragons'
32 | };
33 |
34 | foo.hasOwnProperty('bar'); // 常にfalseを返す
35 |
36 | // 他のオブジェクトのhasOwnPropertyを使い、fooの'this'にセットして呼び出す
37 | ({}).hasOwnProperty.call(foo, 'bar'); // true
38 |
39 | ### 終わりに
40 |
41 | オブジェクトのプロパティの存在判定をする時は、`hasOwnProperty`が**唯一**のメソッドになります。
42 | また、**全て**の[`for in` ループ](#object.forinloop)内で`hasOwnProperty`を使う事を推奨します。
43 | そうする事により組み込みの[prototypes](#object.prototype)の拡張が原因のエラーを避ける事が出来ます。
44 |
45 |
--------------------------------------------------------------------------------
/learn/libs/reveal.js/lib/font/source-sans-pro/source-sans-pro.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'Source Sans Pro';
3 | src: url('source-sans-pro-regular.eot');
4 | src: url('source-sans-pro-regular.eot?#iefix') format('embedded-opentype'),
5 | url('source-sans-pro-regular.woff') format('woff'),
6 | url('source-sans-pro-regular.ttf') format('truetype');
7 | font-weight: normal;
8 | font-style: normal;
9 | }
10 |
11 | @font-face {
12 | font-family: 'Source Sans Pro';
13 | src: url('source-sans-pro-italic.eot');
14 | src: url('source-sans-pro-italic.eot?#iefix') format('embedded-opentype'),
15 | url('source-sans-pro-italic.woff') format('woff'),
16 | url('source-sans-pro-italic.ttf') format('truetype');
17 | font-weight: normal;
18 | font-style: italic;
19 | }
20 |
21 | @font-face {
22 | font-family: 'Source Sans Pro';
23 | src: url('source-sans-pro-semibold.eot');
24 | src: url('source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'),
25 | url('source-sans-pro-semibold.woff') format('woff'),
26 | url('source-sans-pro-semibold.ttf') format('truetype');
27 | font-weight: 600;
28 | font-style: normal;
29 | }
30 |
31 | @font-face {
32 | font-family: 'Source Sans Pro';
33 | src: url('source-sans-pro-semibolditalic.eot');
34 | src: url('source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'),
35 | url('source-sans-pro-semibolditalic.woff') format('woff'),
36 | url('source-sans-pro-semibolditalic.ttf') format('truetype');
37 | font-weight: 600;
38 | font-style: italic;
39 | }
--------------------------------------------------------------------------------
/WebOversimplified/libs/revealjs/lib/font/source-sans-pro/source-sans-pro.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'Source Sans Pro';
3 | src: url('source-sans-pro-regular.eot');
4 | src: url('source-sans-pro-regular.eot?#iefix') format('embedded-opentype'),
5 | url('source-sans-pro-regular.woff') format('woff'),
6 | url('source-sans-pro-regular.ttf') format('truetype');
7 | font-weight: normal;
8 | font-style: normal;
9 | }
10 |
11 | @font-face {
12 | font-family: 'Source Sans Pro';
13 | src: url('source-sans-pro-italic.eot');
14 | src: url('source-sans-pro-italic.eot?#iefix') format('embedded-opentype'),
15 | url('source-sans-pro-italic.woff') format('woff'),
16 | url('source-sans-pro-italic.ttf') format('truetype');
17 | font-weight: normal;
18 | font-style: italic;
19 | }
20 |
21 | @font-face {
22 | font-family: 'Source Sans Pro';
23 | src: url('source-sans-pro-semibold.eot');
24 | src: url('source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'),
25 | url('source-sans-pro-semibold.woff') format('woff'),
26 | url('source-sans-pro-semibold.ttf') format('truetype');
27 | font-weight: 600;
28 | font-style: normal;
29 | }
30 |
31 | @font-face {
32 | font-family: 'Source Sans Pro';
33 | src: url('source-sans-pro-semibolditalic.eot');
34 | src: url('source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'),
35 | url('source-sans-pro-semibolditalic.woff') format('woff'),
36 | url('source-sans-pro-semibolditalic.ttf') format('truetype');
37 | font-weight: 600;
38 | font-style: italic;
39 | }
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ptbr/core/eval.md:
--------------------------------------------------------------------------------
1 | ## Por que não utilizar `eval`
2 |
3 | A função `eval` executará uma string de código JavaScript no escopo local.
4 |
5 | var foo = 1;
6 | function test() {
7 | var foo = 2;
8 | eval('foo = 3');
9 | return foo;
10 | }
11 | test(); // 3
12 | foo; // 1
13 |
14 | Entretanto, `eval` somente é executado no escopo local quando é chamado diretamente
15 | *e* quando o nome da função chamada é `eval`.
16 |
17 | var foo = 1;
18 | function test() {
19 | var foo = 2;
20 | var bar = eval;
21 | bar('foo = 3');
22 | return foo;
23 | }
24 | test(); // 2
25 | foo; // 3
26 |
27 | O uso de `eval` deve ser evitado. 99.9% de seu "uso" pode ser alcançado **sem** ele.
28 |
29 | ### `eval` dissimulado
30 |
31 | As [funções timeout](#other.timeouts) `setTimeout` e `setInterval` podem ambas receberem uma string
32 | como primeiro argumento. Tais strings **sempre** serão executadas no escopo global uma vez que
33 | `eval` não é chamado diretamente, naquele caso.
34 |
35 | ### Problemas de segurança
36 |
37 | `eval` também é considerado um problema de segurança, por que executa **qualquer** código dado.
38 | Ele **nunca** deve ser utilizado com strings de origens duvidosas ou desconhecidas.
39 |
40 | ### Conclusão
41 |
42 | `eval` nunca deve ser utilizado. Qualquer código que faça uso de `eval` seve ser questionado
43 | em sua utilidade, performance e segurança. Se algo necessita de `eval` para funcionar, então **não** deve ser utilizado.
44 | Um *design melhor* deve ser utilizado, um que não faça uso de `eval`.
45 |
46 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zh/core/eval.md:
--------------------------------------------------------------------------------
1 | ##为什么不要使用 `eval`
2 |
3 | `eval` 函数会在当前作用域中执行一段 JavaScript 代码字符串。
4 |
5 | var foo = 1;
6 | function test() {
7 | var foo = 2;
8 | eval('foo = 3');
9 | return foo;
10 | }
11 | test(); // 3
12 | foo; // 1
13 |
14 | 但是 `eval` 只在被**直接**调用并且调用函数就是 `eval` 本身时,才在当前作用域中执行。
15 |
16 | var foo = 1;
17 | function test() {
18 | var foo = 2;
19 | var bar = eval;
20 | bar('foo = 3');
21 | return foo;
22 | }
23 | test(); // 2
24 | foo; // 3
25 |
26 | **[译者注][30]:**上面的代码等价于在全局作用域中调用 `eval`,和下面两种写法效果一样:
27 |
28 | // 写法一:直接调用全局作用域下的 foo 变量
29 | var foo = 1;
30 | function test() {
31 | var foo = 2;
32 | window.foo = 3;
33 | return foo;
34 | }
35 | test(); // 2
36 | foo; // 3
37 |
38 | // 写法二:使用 call 函数修改 eval 执行的上下文为全局作用域
39 | var foo = 1;
40 | function test() {
41 | var foo = 2;
42 | eval.call(window, 'foo = 3');
43 | return foo;
44 | }
45 | test(); // 2
46 | foo; // 3
47 |
48 | 在**任何情况下**我们都应该避免使用 `eval` 函数。99.9% 使用 `eval` 的场景都有**不使用** `eval` 的解决方案。
49 |
50 | ###伪装的 `eval`
51 |
52 | [定时函数](#other.timeouts) `setTimeout` 和 `setInterval` 都可以接受字符串作为它们的第一个参数。
53 | 这个字符串**总是**在全局作用域中执行,因此 `eval` 在这种情况下没有被直接调用。
54 |
55 |
56 | ###安全问题
57 |
58 | `eval` 也存在安全问题,因为它会执行**任意**传给它的代码,
59 | 在代码字符串未知或者是来自一个不信任的源时,绝对不要使用 `eval` 函数。
60 |
61 | ###结论
62 |
63 | 绝对不要使用 `eval`,任何使用它的代码都会在它的工作方式,性能和安全性方面受到质疑。
64 | 如果一些情况必须使用到 `eval` 才能正常工作,首先它的设计会受到质疑,这**不应该**是首选的解决方案,
65 | 一个更好的不使用 `eval` 的解决方案应该得到充分考虑并优先采用。
66 |
67 | [30]: http://cnblogs.com/sanshi/
68 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/it/types/instanceof.md:
--------------------------------------------------------------------------------
1 | ## L'operatore `instanceof`
2 |
3 | L'operatore `instanceof` confronta i costruttori dei suoi due operandi.
4 | È utile soltanto per la comparazione di oggetti realizzati dal
5 | programmatore. Se usato sui tipi interni del linguaggio, esso è
6 | praticamente inutile alla stregua dell'[operatore typeof](#types.typeof).
7 |
8 | ### Confronto di oggetti personalizzati
9 |
10 | function Foo() {}
11 | function Bar() {}
12 | Bar.prototype = new Foo();
13 |
14 | new Bar() instanceof Bar; // true
15 | new Bar() instanceof Foo; // true
16 |
17 | // Questo imposta Bar.prototype all'oggetto funzione Foo,
18 | // ma non ad un'istanza di Foo
19 | Bar.prototype = Foo;
20 | new Bar() instanceof Foo; // false
21 |
22 | ### Uso di `instanceof` con i tipi nativi
23 |
24 | new String('foo') instanceof String; // true
25 | new String('foo') instanceof Object; // true
26 |
27 | 'foo' instanceof String; // false
28 | 'foo' instanceof Object; // false
29 |
30 | Un'importante cosa da notare qui è che `instanceof` non funziona con oggetti
31 | originati da differenti contesti JavaScript (ad esempio, differenti
32 | documenti in un browser web), dato che i loro costruttori non saranno
33 | esattamente lo stesso oggetto.
34 |
35 | ### In conclusione
36 |
37 | L'operatore `instanceof` dovrebbe essere usato **solo** quando si ha a che fare
38 | con oggetti personalizzati creati dal programmatore, che provengono dallo
39 | stesso contesto JavaScript. Proprio come per l'operatore [`typeof`](#types.typeof),
40 | ogni altro tipo di utilizzo dovrebbe essere **evitato**.
41 |
42 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/pl/types/instanceof.md:
--------------------------------------------------------------------------------
1 | ## Operator `instanceof`
2 |
3 | Operator `instanceof` porównuje konstruktory obiektów przekazanych jako operendy.
4 | Jest on użyteczny jedynie do porównywania obiektów utworzonych klas. Stosowanie
5 | go na wbudowanych typach jest praktycznie tak samo bezużyteczne, jak operatora
6 | [typeof](#types.typeof).
7 |
8 | ### Porównywanie obiektów utworzonych klas
9 |
10 | function Foo() {}
11 | function Bar() {}
12 | Bar.prototype = new Foo();
13 |
14 | new Bar() instanceof Bar; // true
15 | new Bar() instanceof Foo; // true
16 |
17 | // poniżej kod który przypisuje do Bar.prototype obiekt funkcji Foo
18 | // a nie faktyczną instancję Foo
19 | Bar.prototype = Foo;
20 | new Bar() instanceof Foo; // false
21 |
22 | ### Stosowanie `instanceof` na natywnych typach
23 |
24 | new String('foo') instanceof String; // true
25 | new String('foo') instanceof Object; // true
26 |
27 | 'foo' instanceof String; // false
28 | 'foo' instanceof Object; // false
29 |
30 | Jedną ważną rzeczą, którą należy zauważyć jest to, że `instanceof` nie zadziała
31 | na obiektach, które pochodzą z różnych kontekstów JavaScript (np. z różnych
32 | dokumentów wewnątrz przeglądarki), ponieważ ich konstruktory nie będą tymi
33 | samymi obiektami.
34 |
35 | ### Wnioski
36 |
37 | Operator `instanceof` powinien być używany **wyłącznie** podczas korzystania z obiektów
38 | klas utworzonych, które były zdefiniowane w tym samym kontekscie JavaScriptowym.
39 | Podobnie jak operator [`typeof`](#types.typeof), należy **unikać** korzystania
40 | z tego operatora w innych sytuacjach.
41 |
42 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/tr/core/eval.md:
--------------------------------------------------------------------------------
1 | ## Neden `eval` Kullanılmamalı
2 |
3 | `eval` fonksiyonu bir JavaScript kodunu lokal kapsamda yürütür.
4 |
5 | var foo = 1;
6 | function test() {
7 | var foo = 2;
8 | eval('foo = 3');
9 | return foo;
10 | }
11 | test(); // 3
12 | foo; // 1
13 |
14 | Fakat `eval` sadece **direkt olarak** çağrıldığında *ve* çağrılan fonksiyonun
15 | adı `eval` ise lokal kapsamda çalışır.
16 |
17 | var foo = 1;
18 | function test() {
19 | var foo = 2;
20 | var bar = eval;
21 | bar('foo = 3');
22 | return foo;
23 | }
24 | test(); // 2
25 | foo; // 3
26 |
27 | `eval` fonksiyonu **asla** kullanılmamalıdır. Kullanıldığı durumların %99.9'unda
28 | `eval` **kullanılmadan** da istenen sonuç elde edilebilir.
29 |
30 | ### Gizli `eval`
31 |
32 | [Zamanlama fonksiyonları](#other.timeouts) `setTimeout` ve `setInterval`'ın her
33 | ikisinin de ilk argümanları bir karakter katarıdır. Bu durumda `eval` dolaylı
34 | olarak çağrıldığı için bu argüman **her zaman** genel kapsamda yürütülecektir.
35 |
36 | ### Güvenlik sorunları
37 |
38 | `eval` kendisine verilen **her** kodu işlettiği için aynı zamanda bir güvenlik
39 | sorunudur ve **asla** kaynağı bilinmeyen yada güvenilir olmayan karakter
40 | katarları ile kullanılmamalıdır.
41 |
42 | ### Sonuç
43 |
44 | `eval` asla kullanılmamalıdır, kullanan programlar ise doğruluk, performans ve
45 | güvenlik açılarından sorgulanmalıdır. `eval` kullanımı gerekli görülmüşse,
46 | programın tasarımı sorgulanmalı ve **kullanılmamalı**, bunun yerine `eval`
47 | gerektirmeyen *daha iyi bir tasarım* kullanılmalıdır.
48 |
49 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/en/core/eval.md:
--------------------------------------------------------------------------------
1 | ## Why Not to Use `eval`
2 |
3 | The `eval` function will execute a string of JavaScript code in the local scope.
4 |
5 | var number = 1;
6 | function test() {
7 | var number = 2;
8 | eval('number = 3');
9 | return number;
10 | }
11 | test(); // 3
12 | number; // 1
13 |
14 | However, `eval` only executes in the local scope when it is being called
15 | directly *and* when the name of the called function is actually `eval`.
16 |
17 | var number = 1;
18 | function test() {
19 | var number = 2;
20 | var copyOfEval = eval;
21 | copyOfEval('number = 3');
22 | return number;
23 | }
24 | test(); // 2
25 | number; // 3
26 |
27 | The use of `eval` should be avoided. 99.9% of its "uses" can be achieved
28 | **without** it.
29 |
30 | ### `eval` in Disguise
31 |
32 | The [timeout functions](#other.timeouts) `setTimeout` and `setInterval` can both
33 | take a string as their first argument. This string will **always** get executed
34 | in the global scope since `eval` is not being called directly in that case.
35 |
36 | ### Security Issues
37 |
38 | `eval` also is a security problem, because it executes **any** code given to it.
39 | It should **never** be used with strings of unknown or untrusted origins.
40 |
41 | ### In Conclusion
42 |
43 | `eval` should never be used. Any code that makes use of it should be questioned
44 | in its workings, performance and security. If something requires `eval` in
45 | order to work, it should **not** be used in the first place. A *better design*
46 | should be used, that does not require the use of `eval`.
47 |
48 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/ko/intro/index.md:
--------------------------------------------------------------------------------
1 | ## Intro
2 |
3 | JavaScript 언어의 핵심에 대한 내용을 모아 **JavaScript Garden**을 만들어 었다. 이 글이 초보자가 JavaScript 익히면서 자주 겪는 실수, 미묘한 버그, 성능 이슈, 나쁜 습관들 줄일 수 있도록 도와줄 것이다.
4 |
5 | JavaScript Garden은 단순히 JavaScript 언어 자체를 설명하려 만들지 않았다. 그래서 이 글에서 설명하는 주제들을 이해하려면 반드시 언어에 대한 기본 지식이 필요하다. 먼저 Mozilla Developer Network에 있는 [문서][1]로 JavaScript 언어를 공부하기 바란다.
6 |
7 | ## 저자들
8 |
9 | 이 글은 [Stack Overflow][2]에서 사랑받는 두 사람 [Ivo Wetzel][3]과 [Zhang Yi Jiang][4]의 작품이다. Ivo Wetzel이 글을 썼고 Zhang Yi jiang이 디자인을 맡았다.
10 |
11 | ## 기여자들
12 |
13 | - [기여자들](https://github.com/BonsaiDen/JavaScript-Garden/graphs/contributors)
14 |
15 | ## 번역
16 | - [박창우][]
17 | - [손병대][]
18 |
19 | [박창우]: https://github.com/pismute
20 | [손병대]: https://github.com/miconblog
21 |
22 | ## 호스팅
23 |
24 | JavaScript Garden은 Github에서 호스팅하고 있고 [Cramer Development][7]가 [JavaScriptGarden.info][8]에서 미러링해주고 있다.
25 |
26 | ## 저작권
27 |
28 | JavaScript Garden은 [MIT license][9]를 따르고 [GitHub][10]에서 호스팅하고 있다. 문제를 발견하면 [이슈를 보고][11]하거나 수정해서 Pull Request를 하라. 아니면 Stack Overflow 채팅 사이트의 [Javascript room][12]에서 우리를 찾으라.
29 |
30 | [1]: https://developer.mozilla.org/en/JavaScript/Guide
31 | [2]: http://stackoverflow.com/
32 | [3]: http://stackoverflow.com/users/170224/ivo-wetzel
33 | [4]: http://stackoverflow.com/users/313758/yi-jiang
34 | [5]: https://github.com/caio
35 | [6]: https://github.com/blixt
36 | [7]: http://cramerdev.com/
37 | [8]: http://javascriptgarden.info/
38 | [9]: https://github.com/BonsaiDen/JavaScript-Garden/blob/next/LICENSE
39 | [10]: https://github.com/BonsaiDen/JavaScript-Garden
40 | [11]: https://github.com/BonsaiDen/JavaScript-Garden/issues
41 | [12]: http://chat.stackoverflow.com/rooms/17/javascript
42 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/zh/array/general.md:
--------------------------------------------------------------------------------
1 | ##数组遍历与属性
2 |
3 | 虽然在 JavaScript 中数组是对象,但是没有好的理由去使用 [`for in` 循环](#object.forinloop) 遍历数组。
4 | 相反,有一些好的理由**不去**使用 `for in` 遍历数组。
5 |
6 | > **注意:** JavaScript 中数组**不是** *关联数组*。
7 | > JavaScript 中只有[对象](#object.general) 来管理键值的对应关系。但是关联数组是**保持**顺序的,而对象**不是**。
8 |
9 | 由于 `for in` 循环会枚举原型链上的所有属性,唯一过滤这些属性的方式是使用 [`hasOwnProperty`](#object.hasownproperty) 函数,
10 | 因此会比普通的 `for` 循环慢上好多倍。
11 |
12 | ###遍历
13 |
14 | 为了达到遍历数组的最佳性能,推荐使用经典的 `for` 循环。
15 |
16 | var list = [1, 2, 3, 4, 5, ...... 100000000];
17 | for(var i = 0, l = list.length; i < l; i++) {
18 | console.log(list[i]);
19 | }
20 |
21 | 上面代码有一个处理,就是通过 `l = list.length` 来缓存数组的长度。
22 |
23 | 虽然 `length` 是数组的一个属性,但是在每次循环中访问它还是有性能开销。
24 | **可能**最新的 JavaScript 引擎在这点上做了优化,但是我们没法保证自己的代码是否运行在这些最近的引擎之上。
25 |
26 | 实际上,不使用缓存数组长度的方式比缓存版本要慢很多。
27 |
28 | ###`length` 属性
29 |
30 | `length` 属性的 *getter* 方式会简单的返回数组的长度,而 *setter* 方式会**截断**数组。
31 |
32 | var foo = [1, 2, 3, 4, 5, 6];
33 | foo.length = 3;
34 | foo; // [1, 2, 3]
35 |
36 | foo.length = 6;
37 | foo; // [1, 2, 3]
38 |
39 | **译者注:**
40 | 在 Firebug 中查看此时 `foo` 的值是: `[1, 2, 3, undefined, undefined, undefined]`
41 | 但是这个结果并不准确,如果你在 Chrome 的控制台查看 `foo` 的结果,你会发现是这样的: `[1, 2, 3]`
42 | 因为在 JavaScript 中 `undefined` 是一个变量,注意是变量不是关键字,因此上面两个结果的意义是完全不相同的。
43 |
44 | // 译者注:为了验证,我们来执行下面代码,看序号 5 是否存在于 foo 中。
45 | 5 in foo; // 不管在 Firebug 或者 Chrome 都返回 false
46 | foo[5] = undefined;
47 | 5 in foo; // 不管在 Firebug 或者 Chrome 都返回 true
48 |
49 | 为 `length` 设置一个更小的值会截断数组,但是增大 `length` 属性值不会对数组产生影响。
50 |
51 | ###结论
52 |
53 | 为了更好的性能,推荐使用普通的 `for` 循环并缓存数组的 `length` 属性。
54 | 使用 `for in` 遍历数组被认为是不好的代码习惯并倾向于产生错误和导致性能问题。
55 |
56 |
--------------------------------------------------------------------------------
/external/JavaScript-Garden/doc/es/core/eval.md:
--------------------------------------------------------------------------------
1 | ## ¿Por qué no usar `eval`?
2 |
3 | La función `eval` ejecuta un string como código JavaScript en el ámbito local.
4 |
5 | var foo = 1;
6 | function test() {
7 | var foo = 2;
8 | eval('foo = 3');
9 | return foo;
10 | }
11 | test(); // 3
12 | foo; // 1
13 |
14 | Pero `eval` sólo ejecutará en ámbito local cuando es llamado **directamente** *y*
15 | el nombre de la función llamada es `eval`.
16 |
17 | var foo = 1;
18 | function test() {
19 | var foo = 2;
20 | var bar = eval;
21 | bar('foo = 3');
22 | return foo;
23 | }
24 | test(); // 2
25 | foo; // 3
26 |
27 | El uso de `eval` debe evitarse **a toda costa**. El 99.9% de su "uso" puede
28 | lograrse **sin** su uso..
29 |
30 | ### `eval` disfrazado
31 |
32 | Las funciones de [tiempo de espera](#other.timeouts) `setTimeout` y `setInterval` pueden
33 | tomar un string como primer argumento. En este caso, el string **siempre** se ejecutará en
34 | el ámbito global ya que `eval` no ha sido llamado directamente.
35 |
36 | ### Problemas de seguridad
37 |
38 | `eval` es también un problema de seguridad ya que ejecuta **cualquier** código enviado,
39 | y **nunca** debe usarse con strings que no se conozcan o tengan un origen no confiable.
40 |
41 | ### En conclusión
42 |
43 | `eval` nunca debe ser usado, cualquier código que haga uso del mismo debe ser cuestionado
44 | en su funcionamiento, rendimiento y seguridad. En caso de que se necesite trabajar con
45 | `eval`, el diseño ha de ser cuestionado y **no** debe utilizarse en primer lugar, se
46 | debe usar un *mejor diseño*, que no requiera el uso de `eval`.
47 |
48 |
--------------------------------------------------------------------------------