Software required:
After installation and putting the youtube-dl in PATH
youtube-dl \
| // connect() is a function that injects Redux-related props into your component. | |
| // You can inject data and callbacks that change that data by dispatching actions. | |
| function connect(mapStateToProps, mapDispatchToProps) { | |
| // It lets us inject component as the last step so people can use it as a decorator. | |
| // Generally you don't need to worry about it. | |
| return function (WrappedComponent) { | |
| // It returns a component | |
| return class extends React.Component { | |
| render() { | |
| return ( |
Software required:
After installation and putting the youtube-dl in PATH
youtube-dl \
| //////////////////////////// | |
| // using inline closure | |
| //////////////////////////// | |
| (function() { | |
| arr = [] | |
| for (i = 0; i < 10; i++) | |
| arr[i] = (function(i) { | |
| return function() { console.log("I am #" + i) } | |
| })(i) |
| import React from 'react' | |
| import ReactDOM from 'react-dom' | |
| const Hello = ({name}) => <h1>Hello {name}!</h1> | |
| ReactDOM.render( | |
| <Hello name={"vjeux"}/>, | |
| document.body.appendChild(document.createElement("div")) | |
| ) |
Hello software developers,
Please check your code to ensure you're not making one of the following mistakes related to cryptography.
| API | Status Codes |
|---|---|
| [Twitter][tw] | 200, 304, 400, 401, 403, 404, 406, 410, 420, 422, 429, 500, 502, 503, 504 |
| [Stripe][stripe] | 200, 400, 401, 402, 404, 429, 500, 502, 503, 504 |
| [Github][gh] | 200, 400, 422, 301, 302, 304, 307, 401, 403 |
| [Pagerduty][pd] | 200, 201, 204, 400, 401, 403, 404, 408, 500 |
| [NewRelic Plugins][nr] | 200, 400, 403, 404, 405, 413, 500, 502, 503, 503 |
| [Etsy][etsy] | 200, 201, 400, 403, 404, 500, 503 |
| [Dropbox][db] | 200, 400, 401, 403, 404, 405, 429, 503, 507 |
| /* | |
| * The reason for this is just a thought exercise | |
| * often people(myself super included) are so confused | |
| * when trying something new, but breaking it down | |
| * to it's simplest existence can be the best way to understand | |
| */ | |
| function createStore(reducer, initState) { | |
| let state = initState; | |
| let subscribers = []; |
| function mapValues(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| result[key] = fn(obj[key], key); | |
| return result; | |
| }, {}); | |
| } | |
| function pick(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| if (fn(obj[key])) { |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent