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
//alert for operator and drone | |
{ | |
alertId: '123', | |
detections: [{ | |
positions: [ {},{} ] | |
detectionType: 'remote' | |
detectionId: 9977 | |
}, { | |
positions: [ {}, {} ] |
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 alwaysRespondWithHelloWorld: RequestHandler = (req: Request, res: Response) => { | |
req.user = { | |
name: 'Andrew', | |
surname: 'Palatnyi', | |
age: 27 | |
}; | |
res.send('hello world'); | |
}; |
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 express, { Application, RequestHandler, Request, Response } from "express"; | |
const app: Application = express(); | |
const alwaysRespondWithHelloWorld: RequestHandler = (req: Request, res: Response) => { | |
res.send('hello world'); | |
}; | |
app.use(alwaysRespondWithHelloWorld) |
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
declare namespace Express { | |
export interface Request { | |
user: { | |
name: string, | |
surname: string, | |
age: 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
import 'dart:async'; | |
import 'dart:io'; | |
import 'dart:isolate'; | |
import 'package:random_string/random_string.dart'; | |
Isolate isolate; | |
main() { | |
print("running dart program"); | |
createNewIsolate(); |
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 Store extends Component { | |
constructor(props) { | |
super(props); | |
this.rootUpdater = (data = {}) => { | |
this.setState({ | |
...this.state, | |
...data | |
}) | |
}; |
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 User { | |
constructor(getState, rootUpdater) { | |
this._getState = getState; | |
this._rootUpdater = rootUpdater; | |
this.name = ''; | |
this.surname = ''; | |
} | |
_setValue = (value = {}) => { |
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 Store extends Component { | |
/* | |
a lot of methods here | |
*/ | |
render() { | |
const updaters = {/*methods what*/}; | |
const data = {/* this.state*/}; | |
const value = { |
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 React, {Component, PureComponent, createContext} from 'react'; | |
const Context = createContext(); | |
class User { | |
constructor(getState, rootUpdater) { | |
this._getState = getState; | |
this._rootUpdater = rootUpdater; | |
this.name = ''; |
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 App extends Component { | |
static childContextTypes = { | |
counter: PropTypes.object | |
} | |
constructor(props) { | |
super(props); | |
this.state = { | |
count: 0, | |
increment: this.increment |
NewerOlder