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 A extends React.Component { | |
| constructor(props, context) { | |
| super(props, context); | |
| this.globalCallbackName = 'kdjlwkqe'; | |
| this.ref = React.createRef(); | |
| } | |
| componentDidMount() { | |
| global[this.globalCallbackName] = () => new google.maps.Map(this.ref.current, { |
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 'dart:async'; | |
| import 'package:firebase_messaging/firebase_messaging.dart'; | |
| import 'package:meta/meta.dart'; | |
| class MessageTray { | |
| MessageTray({@required FirebaseMessaging messaging}) | |
| : assert(messaging != null), | |
| _onMessage = StreamController(), | |
| _onResume = StreamController(), | |
| _onLaunch = StreamController() { |
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
| function javaenv | |
| if test (count $argv) -eq 0 | |
| /usr/libexec/java_home -V | |
| else | |
| switch $argv[1] | |
| case 'ls' | |
| /usr/libexec/java_home -V | |
| case 'set' | |
| set -xU JAVA_HOME (/usr/libexec/java_home -v $argv[2]) | |
| end |
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 'package:barcode_scan/barcode_scan.dart'; | |
| import '../entity/friend_code.dart'; | |
| import '../entity/scaned_friend_code.dart'; | |
| class FriendCodeScanService { | |
| Future<FriendCode> scan() async { | |
| String data; | |
| try { | |
| data = await BarcodeScanner.scan(); |
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
| typedef bool Predicate(T); | |
| List<T> filter<T>(List<T> list, Predicate predicate) { | |
| final newList = []; | |
| for (final item in list) { | |
| if (predicate(item)) { | |
| newList.add(item); | |
| } | |
| } |
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.$ = (arg) => | |
| typeof arg === 'function' | |
| ? window.document.addEventListener('DOMContentLoaded', arg) | |
| : window.document.querySelector(arg); | |
| window.$.ajax = window.fetch; |
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
| type Params = {}; | |
| type ContextBase<R, C> = { | |
| router: Router<R, C>; | |
| route: Route<R, C>; | |
| next: () => Promise<R>; | |
| url: string; | |
| baseUrl: string; | |
| path: string; | |
| params: Params; |
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 { css } from 'glamor'; | |
| import * as React from 'react'; | |
| type Direction = 'row' | 'row-reverse' | 'column' | 'column-reverse'; | |
| type Wrap = 'nowrap' | 'wrap' | 'wrap-reverse'; | |
| type JustifyContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around'; | |
| type AlignItems = 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch'; | |
| type AlignContent = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'space-between' | 'space-around'; | |
| type Length = number | string; |
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
| const Counter = ({ count, onIncrementClick, onDecrementClick, onIncrementAsyncClick }) => ( | |
| <div> | |
| {count} | |
| : | |
| <button onClick={onIncrementClick}>+</button> | |
| / | |
| <button onClick={onDecrementClick}>-</button> | |
| / | |
| <br/> | |
| <button onClick={onIncrementAsyncClick}>+ Async</button> |
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
| Compiling study_lang v0.1.0 (file:///Users/axross/Dropbox/Workspace/study-rust/study_lang) | |
| error[E0277]: the trait bound `Humanoid: Walkable` is not satisfied | |
| --> src/main.rs:68:3 | |
| | | |
| 68 | shift(humanoid); | |
| | ^^^^^ the trait `Walkable` is not implemented for `Humanoid` | |
| | | |
| = note: required by `shift` | |
| error: aborting due to previous error |