Charts are from different sources and thus colors are inconsistent, please carefully read the chart's legends.
Like this? Check React Native vs Flutter: https://gist.github.com/tkrotoff/93f5278a4e8df7e5f6928eff98684979
import { ApplicationRef, ComponentRef, createComponent, Type } from "@angular/core"; | |
import { createApplication } from "@angular/platform-browser"; | |
import React, { useEffect, useRef, useState } from "react"; | |
type AnyComponentRef = ComponentRef<unknown>; | |
export type ReactifyProps = { | |
component: Type<unknown>; | |
inputs?: Record<string, unknown>; | |
}; |
{ | |
"states": [ | |
{ | |
"id": "1", | |
"type": "Union Territory", | |
"capital": "Port Blair", | |
"code": "AN", | |
"name": "Andaman and Nicobar Islands", | |
"districts": [ | |
{ |
import { Platform } from '@angular/cdk/platform'; | |
import { NativeDateAdapter } from '@angular/material'; | |
import * as dayjs from 'dayjs'; | |
import 'dayjs/locale/de'; | |
import * as customParseFormat from 'dayjs/plugin/customParseFormat'; | |
import * as localizedFormat from 'dayjs/plugin/localizedFormat'; | |
/** | |
* Custom Date-Formats and Adapter (using https://github.com/iamkun/dayjs) |
Charts are from different sources and thus colors are inconsistent, please carefully read the chart's legends.
Like this? Check React Native vs Flutter: https://gist.github.com/tkrotoff/93f5278a4e8df7e5f6928eff98684979
// Feedback requested on the useDeepCompareEffect | |
// it just feels like a bit of work... | |
// HERE'S THE REASON I NEED THIS: | |
// when people use the useQuery hook, they'll typically | |
// do so like this: `useQuery(myQuery, {var1: props.value})` | |
// which means that passing `variables` to `useEffect` will | |
// trigger a rerun of the callback even if they didn't | |
// actually change (referrential equality) | |
function useQuery({query, variables}) { |
import axios from 'axios' | |
export default class ApiClient { | |
constructor(baseUrl, tokenStorage) { | |
this.http = axios.create({ | |
baseURL: baseUrl | |
}) | |
this.tokenStorage = tokenStorage | |
this.setupTokenInterceptors() |
@Effect({dispatch: false}) | |
entityCreationSuccess$: Observable<Action> = this.actions$.pipe( | |
ofType(UserActions.CREATE_USER_SUCCESS, PostActions.CREATE_POST_SUCCESS), | |
tap(action => { | |
this.router.navigate(['../'], {relativeTo: this.route}) | |
}) | |
); |
@Effect() | |
search$: Observable<Action> = this.actions$.pipe( | |
ofType(SearchActions.SEARCH), | |
switchMap(action => { | |
const query = action.payload; | |
return [new FetchPanel1Data(query), new FetchPanel2Data(query)]; | |
}) | |
); |
{ | |
"AED": "United Arab Emirates Dirham", | |
"AFN": "Afghan Afghani", | |
"ALL": "Albanian Lek", | |
"AMD": "Armenian Dram", | |
"ANG": "Netherlands Antillean Guilder", | |
"AOA": "Angolan Kwanza", | |
"ARS": "Argentine Peso", | |
"AUD": "Australian Dollar", | |
"AWG": "Aruban Florin", |
const detectFace = () => { | |
if(!window.FaceDetector) return console.log('Unsupported Version or Feature is not enabled') | |
const img = document.querySelector('#targetImg'); | |
const faceDetector = new FaceDetector(); | |
const scale = img.width / img.naturalWidth; | |
faceDetector | |
.detect(img) | |
.then(faces => | |
faces.map(face => face.boundingBox) | |
) |