(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| /** | |
| * Time complexity O(n) | |
| **/ | |
| // clone the function before reassignin a value to console.log | |
| const log = console.log.bind({}); | |
| console.log = function (...args) { | |
| const argsAndTypes = [] | |
| /** | |
| * By the current state of EcmaScript, | |
| * I would definitely use Array.proptotype.flat / Array.prototype.flatMap | |
| * This is how I did flat arrays in the past without the use of external libraries | |
| * | |
| * The whole point is to make use of recursion to loop deep inside | |
| */ | |
| // extend matchers to simplify test -> see https://github.com/jest-community/jest-extended | |
| import 'jest-extended' |
| How to get a Facebook Page Access Token that doesn't expire Never! | |
| - Go to http://developers.facebook.com/tools/explorer/ | |
| - Get a User Access Token with a permission "manage_pages" | |
| - Convert this short-lived access token into a long-lived one by making this Graph API call: | |
| https://graph.facebook.com/v2.6/oauth/access_token?client_id=<your FB App ID >&client_secret=<your FB App secret>&grant_type=fb_exchange_token&fb_exchange_token=<your short-lived access token> | |
| - Make a call Graph API: | |
| https://graph.facebook.com/v2.6/<your personal account FB user id>/accounts?access_token=<your long-lived access token> | |
| - The returned access_token has no expiration unless you change your password or not more admin of the target page or deauthorize FB page |
| import React, { Component } from ‘React’ | |
| import HighOrderBoundarie from ‘./components/boundarie’ | |
| class App extends Component { | |
| ... | |
| ... | |
| render() { |
| import React, { Component } from ‘React’ | |
| import MyFallbackComponent from ‘./components/fallback’ | |
| const HighOrderBoundarie = (MyComponent) => | |
| class ErrorBoundaries extends Component { | |
| state = { | |
| errorFound: false | |
| } | |
| componentDidCatch(error, info) { |
| class JustOurComponent extends Component { | |
| state = { | |
| errorFound: false | |
| } | |
| componentDidCatch(error, info) { | |
| /* here is where the magic happens. | |
| code inside here is executed if an error | |
| itn thrown from children */ | |
| this.setState({ errorFound: true }) |
| Adyen Test Card Numbers | |
| These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform. | |
| For all cards use the following expiration and CVV2/CVC2/or CID for Amex. | |
| For all cards: | |
| Expiration Dates CVV2 / CVC3 CID (American Express) | |
| 08/2018 OR 10/2020 737 7373 |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.