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
const obsone = () => | |
new Observable((obs) => { | |
setTimeout(() => { | |
console.log('one'); | |
obs.next(); | |
}, 1000); | |
}); | |
const obstwo = () => | |
new Observable((obs) => { |
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
- (void) keyboardDisplayDoesNotRequireUserAction { | |
Class class = NSClassFromString(@"WKContentView"); | |
NSOperatingSystemVersion iOS_11_3_0 = (NSOperatingSystemVersion){11, 3, 0}; | |
NSOperatingSystemVersion iOS_12_2_0 = (NSOperatingSystemVersion){12, 2, 0}; | |
char * methodSignature = "_startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:"; | |
if ([[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion: iOS_12_2_0]) { | |
methodSignature = "_elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:"; | |
} | |
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 { Div, css } from 'glamorous' | |
import React from 'react' | |
class Index extends React.Component { | |
constructor(props) { | |
super(props) | |
} | |
componentWillMount() { | |
this.setState({ |
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
const fields = [ | |
{ | |
label: 'First Name', | |
name: 'firstName', | |
required: true, | |
maxLength: 55 | |
}, | |
{ | |
label: 'Last Name', | |
name: 'lastName', |
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 { Component } from '@angular/core'; | |
import { DeviceMotion, AccelerationData } from 'ionic-native'; | |
import { NavController, Platform } from 'ionic-angular'; | |
Array['max'] = (array) => Math.max.apply(Math, array); | |
Array['min'] = (array) => Math.min.apply(Math, array); | |
@Component({ | |
selector: 'page-home', |
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
const gradient = ctx.createRadialGradient(50, 30, 0, 40, 40, 50); | |
gradient.addColorStop(0, 'white'); | |
gradient.addColorStop(1, 'black'); | |
ctx.fillStyle = gradient; | |
ctx.beginPath(); | |
ctx.arc(40, 40, 40, 0, Math.PI * 2); | |
ctx.fill(); |
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
class Particle { | |
x = Math.random() * canvas.width; | |
y = Math.random() * canvas.height; | |
vx = Math.random(); | |
vy = Math.random(); | |
id; | |
life = 0; | |
maxLife = 40; | |
constructor() { |
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
class MatchWhenAuthorized extends Component { | |
constructor(props) { | |
super(); | |
console.log(props); | |
this.props = props; | |
this.state = { | |
isAuthenticated: false, | |
} | |
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
"み".charCodeAt(0).toString(16); |
NewerOlder