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 } from 'react'; | |
class componentName extends Component { | |
constructor(props) { | |
super(props); | |
this.handleClicks = []; | |
this.props.friends.forEach(friend => { | |
this.handleClick[fiend.id] = this.handleClick.bind(this, friend.id); | |
}) | |
} |
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 } from 'react'; | |
import { connect } from 'react-redux'; | |
import PropTypes from 'prop-types'; | |
import Ramda from 'ramda'; | |
import FlatButton from 'material-ui/FlatButton'; | |
import Dialog from 'material-ui/Dialog'; | |
import { uploadBatch } from '../../../actions/batch-actions'; |
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 } from 'react'; | |
import DrawingManager from 'react-google-maps/lib/drawing/DrawingManager'; | |
import { connect } from 'react-redux'; | |
import PropTypes from 'prop-types'; | |
import { mapConfig } from '../../../../constants/component-configs'; | |
import { setShapeEventListener, getGeomFilters, getShapeArea } from '../../../../utilities/map-tools-utilities'; | |
const { drawingManager } = mapConfig; | |
import { setMapFilters, setDrawingMode } from '../../../../actions/map-actions'; | |
import debounce from 'lodash.debounce'; | |
import ShapeTool from './shape-tool'; |
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
/* eslint-disable max-nested-callbacks */ | |
import { expect } from 'chai'; | |
import { toggleProjectInfoWindow, setDrawingMode, setMapFilters } from './map-actions'; | |
import { MAP_CLOSE_INFO_WINDOW, MAP_SET_DRAWING_MODE, MAP_FILTERS_CHANGED } from '../constants/action-types'; | |
import thunk from 'redux-thunk'; | |
import configureMockStore from 'redux-mock-store'; | |
describe('Map Actions', () => { | |
const state = { | |
map: { |
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 { expect } from 'chai'; | |
import { | |
MAP_FILTERS_CHANGED, | |
MAP_OPEN_DIALOG, | |
MAP_SET_TYPE_ID, | |
MAP_TOGGLE_TRAFFIC, | |
MAP_OPEN_INFO_WINDOW, | |
MAP_CLOSE_INFO_WINDOW, | |
MAP_VIEWPORT_CHANGE, | |
MAP_SET_DRAWING_MODE, |
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 GoogleAuth from "google-auth-library"; | |
import { googleAuthClientId } from "../../src/constants/config"; | |
import { User } from "../utilities/database"; | |
import { path } from "ramda"; | |
const checkUserToken = token => { | |
return new Promise((resolve, reject) => { | |
const auth = new GoogleAuth(); | |
const client = new auth.OAuth2(googleAuthClientId, "", ""); | |
client.verifyIdToken(token, googleAuthClientId, (error, login) => { |
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 java.util.*; | |
public class MyClass { | |
static String[] firstNames = {"John", "Frank", "Nick", "Amanda", "Brittany", "Amy", "Deborah", "Stirling"}; | |
static String[] lastNames = {"Thompson", "Smith", "Jones", "Keribarian", "Lu", "Banafsheh", "Spielberg", "Jordan", "Castle", "Simpson"}; | |
static Random generator = new Random(); | |
static int outputLength = 50; | |
static Set<String> outputNames = new HashSet<String>(); | |
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
public class MinMethod { | |
static int getMin(int a, int b) { | |
if( a < b ) { | |
return a; | |
} else { | |
return b; | |
} | |
} | |
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 java.lang.*; | |
public class HexagonArea { | |
static double getHexagonArea (double s) { | |
return (6 * s * s) / (4 * Math.tan(Math.PI / 6)); | |
} | |
public static void main(String 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 React, { Component } from 'react'; | |
import { DrawingManager } from 'react-google-maps/lib/components/drawing/DrawingManager'; | |
import { connect } from 'react-redux'; | |
import PropTypes from 'prop-types'; | |
import { mapConfig } from '../../../../constants/component-configs'; | |
import { | |
setShapeEventListener, | |
getShapeArea, | |
getFiltersFromGoogleMapsShape, | |
convertFromGoogleMapsShape |
OlderNewer