This file contains hidden or 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
console.log('start'); | |
setTimeout(() => { | |
console.log('setTimeout'); | |
}, 0); | |
Promise.resolve().then(() => { | |
console.log('promise.then'); | |
}); |
This file contains hidden or 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
window.state = {}; | |
setFoo() { | |
window.state.foo = 'bar'; | |
} | |
getFoo() { | |
return window.state.foo; | |
} |
This file contains hidden or 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
class Logger { | |
private user = 'toor'; | |
private pass = 'root'; | |
private db = new DBConnection(this.user, this.pass); | |
private msg; | |
public log() { | |
if (this.msg instanceof Cart) { | |
this._log(this.msg.user.email + ' ' + this.msg.order); | |
} else if (this.msg instanceof User) { |
This file contains hidden or 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
{"openapi":"3.0.2","info":{"title":"Swagger Petstore - OpenAPI 3.0","description":"This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about\nSwagger at [http://swagger.io](http://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!\nYou can now help us improve the API whether it's by making changes to the definition itself or to the code.\nThat way, with time, we can improve the API in general, and expose some of the new features in OAS3.\n\nSome useful links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)","termsOfService":"http://swagger.io/terms/","contact":{"email":"apiteam@swagger.io"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"version":"1.0.17"},"externalDocs":{"description":"Find out more about S |
This file contains hidden or 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
<script src="https://unpkg.com/react@17/umd/react.production.min.js" crossorigin></script> | |
<script src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js" crossorigin></script> | |
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script> | |
<script src="https://unpkg.com/dayjs@1/dayjs.min.js"></script> | |
<script src="https://unpkg.com/antd@5.2.2/dist/antd-with-locales.js"></script> | |
<div id="container" style="padding: 24px" /> | |
<script type="text/babel"> | |
const mountNode = document.getElementById('container'); |
This file contains hidden or 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
<!-- React --> | |
<script src="https://unpkg.com/react@latest/umd/react.development.js" crossorigin="anonymous"></script> | |
<script src="https://unpkg.com/react-dom@latest/umd/react-dom.development.js"></script> | |
<script src="https://unpkg.com/babel-standalone@latest/babel.min.js" crossorigin="anonymous"></script> | |
<!-- MUI --> | |
<script src="https://unpkg.com/@mui/material@latest/umd/material-ui.development.js" crossorigin="anonymous"></script> | |
<!-- Fonts to support Material Design --> | |
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"/> | |
<!-- Icons to support Material Design --> |
This file contains hidden or 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 { ChangeDetectionStrategy, Component } from '@angular/core'; | |
import { TransactionsService } from '../transactions.service'; | |
import { SparklineService } from '../sparkline.service'; | |
import { ServerUtilizationService } from '../server-utilization.service'; | |
import { ProcessManagerService } from '../process-manager.service'; | |
@Component({ | |
selector: 'app-component', | |
template: ` |
This file contains hidden or 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 { platformTerminalDynamic } from 'platform-terminal'; | |
import { enableProdMode } from '@angular/core'; | |
import { AppModule } from './app/app.module'; | |
import { environment } from './environments/environment'; | |
if (environment.production) { | |
enableProdMode(); | |
} |
This file contains hidden or 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 { NgModule } from '@angular/core'; | |
import { TerminalModule } from 'platform-terminal'; | |
import { AppComponent } from './app.component'; | |
@NgModule({ | |
declarations: [ | |
AppComponent, | |
], |
This file contains hidden or 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 { COMPILER_OPTIONS, createPlatformFactory, Sanitizer } from '@angular/core'; | |
import { ɵplatformCoreDynamic as platformCoreDynamic } from '@angular/platform-browser-dynamic'; | |
import { DOCUMENT } from '@angular/common'; | |
import { ElementSchemaRegistry } from '@angular/compiler'; | |
import { TerminalSanitizer } from './sanitizer'; | |
const COMMON_PROVIDERS = [ | |
{ provide: DOCUMENT, useValue: {} }, |
NewerOlder