This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"args":{"name":"swapper"},"cat":"__metadata","name":"thread_name","ph":"M","pid":0,"tid":0,"ts":0}, | |
{"args":{"name":"Compositor"},"cat":"__metadata","name":"thread_name","ph":"M","pid":22096,"tid":22068,"ts":0}, | |
{"args":{"name":"ThreadPoolServiceThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":33572,"tid":6276,"ts":0}, | |
{"args":{"name":"CrRendererMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":22096,"tid":10276,"ts":0}, | |
{"args":{"name":"CrBrowserMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":22488,"tid":15936,"ts":0}, | |
{"args":{"name":"Chrome_IOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":22488,"tid":10384,"ts":0}, | |
{"args":{"name":"VizCompositorThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":33572,"tid":5576,"ts":0}, | |
{"args":{"name":"GpuVSyncThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":33572,"tid":12292,"ts":0}, |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"args":{"name":"swapper"},"cat":"__metadata","name":"thread_name","ph":"M","pid":0,"tid":0,"ts":0}, | |
{"args":{"name":"Compositor"},"cat":"__metadata","name":"thread_name","ph":"M","pid":15676,"tid":13992,"ts":0}, | |
{"args":{"name":"CrRendererMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":15676,"tid":364,"ts":0}, | |
{"args":{"name":"CrBrowserMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":22488,"tid":15936,"ts":0}, | |
{"args":{"name":"Chrome_IOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":22488,"tid":10384,"ts":0}, | |
{"args":{"name":"VizCompositorThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":33572,"tid":5576,"ts":0}, | |
{"args":{"name":"GpuVSyncThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":33572,"tid":12292,"ts":0}, | |
{"args":{"name":"CrGpuMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":33572,"tid":14628,"ts":0}, |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"args":{"name":"swapper"},"cat":"__metadata","name":"thread_name","ph":"M","pid":0,"tid":0,"ts":0}, | |
{"args":{"name":"Compositor"},"cat":"__metadata","name":"thread_name","ph":"M","pid":22096,"tid":22068,"ts":0}, | |
{"args":{"name":"ThreadPoolServiceThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":33572,"tid":6276,"ts":0}, | |
{"args":{"name":"CrRendererMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":22096,"tid":10276,"ts":0}, | |
{"args":{"name":"CrBrowserMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":22488,"tid":15936,"ts":0}, | |
{"args":{"name":"Chrome_IOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":22488,"tid":10384,"ts":0}, | |
{"args":{"name":"VizCompositorThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":33572,"tid":5576,"ts":0}, | |
{"args":{"name":"GpuVSyncThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":33572,"tid":12292,"ts":0}, |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"args":{"name":"swapper"},"cat":"__metadata","name":"thread_name","ph":"M","pid":0,"tid":0,"ts":0}, | |
{"args":{"name":"Compositor"},"cat":"__metadata","name":"thread_name","ph":"M","pid":15676,"tid":13992,"ts":0}, | |
{"args":{"name":"CrRendererMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":15676,"tid":364,"ts":0}, | |
{"args":{"name":"CrBrowserMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":22488,"tid":15936,"ts":0}, | |
{"args":{"name":"Chrome_IOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":22488,"tid":10384,"ts":0}, | |
{"args":{"name":"VizCompositorThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":33572,"tid":5576,"ts":0}, | |
{"args":{"name":"GpuVSyncThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":33572,"tid":12292,"ts":0}, | |
{"args":{"name":"CrGpuMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":33572,"tid":14628,"ts":0}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const memorizeFn = <T extends () => void>(fn: T, size = 5, duration = 0): any => { | |
const cache: Map<string, any> = new Map<string, any>(); | |
if (duration) { | |
setInterval(() => cache.clear(), duration); | |
} | |
return (...args: any[]): any => { | |
const key: string = JSON.stringify(args); | |
if (!cache.has(key)) { | |
cache.set(key, (fn as any)(...args)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Inject, Injectable, NgZone } from '@angular/core'; | |
import { EVENT_MANAGER_PLUGINS, EventManager } from '@angular/platform-browser'; | |
export const RUN_OUTSIDE: string = '.run-outside'; | |
/** | |
* @example | |
* | |
* @NgModule({ | |
* // ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A point representing a location in (x,y) coordinate space, specified in integer precision. | |
*/ | |
export class Point { | |
/** | |
* The X coordinate of this Point. | |
* @default 0 | |
*/ | |
protected x: number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The Dimension class encapsulates the width and height | |
* of a component (in integer precision) in a single object. | |
*/ | |
export class Dimension { | |
/** | |
* The width dimension; negative values can be used. | |
* @default 0 | |
*/ | |
protected width: number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* https://en.wikipedia.org/wiki/Centroid#Of_a_polygon | |
*/ | |
public getPolygonCentroid(vertices: number[][]): { lat: number, lon: number } { | |
const centroid: { lat: number, lon: number } = { lat: 0, lon: 0 }; | |
const vertexCount: number = vertices.length; | |
let area: number = 0; | |
let x0: number = 0; // Current vertex X | |
let y0: number = 0; // Current vertex Y |