Skip to content

Instantly share code, notes, and snippets.

View BrianARuff's full-sized avatar
:copilot:
Making the world a better place 🤪

Brian Ruff BrianARuff

:copilot:
Making the world a better place 🤪
View GitHub Profile
@Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
final ArrayList<MyPoint> points = Data.getPoints();
LatLngBounds.Builder builder = new LatLngBounds.Builder();
PolylineOptions polylineOptions = new PolylineOptions();
for (int i = 0; i < points.size(); i++) {
MyPoint point = points.get(i);
polylineOptions.add(new LatLng(point.getLat(), point.getLng()));
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Document</title>
</head>
<body>
<nav>
<a href="#"><img src="logo.png"></a>
nav {
background: black;
height: 5rem;
display: flex;
align-items: center;
min-height: 3rem;
padding: 0 1rem;
}
a {
var weaponArray = ['rock', 'paper', 'scissors'];
var playerOne;
var playerTwo;
var playerOneScore = 0;
var playerTwoScore = 0;
while (playerOneScore < 3 && playerTwoScore < 3) {
# initialize stock_prices_yesterday array
stock_prices_yesterday = [];
# fill it with random values just for theory sake
stock_prices_yesterday << 10.times.map { rand(1000)}
# flatten array so that it is only 1 array and not a multidimensional array
stock_prices_yesterday.flatten!
def get_max_profit(stock_prices_yesterday)
string = "I like parentheticals (a lot). Sometimes(when I nest them(my parentheticals) too much (like
this(and this))), it get confusing."
def parentheticals_open_close_position(str)
starting_parentheticals = []
ending_parenthetical = []
str.each_char.with_index do |char, index|
if char == '('
starting_parentheticals << index
end
# frozen_string_literal: true
scope_array = 100.times.map{Random.rand(0...100)}
def binary_search_tree(target, scope, carry_over = 0)
p scope.sort
if scope.length <= 1
target == scope.first ? carry_over : -1
else
half = scope.length / 2
if scope[half] == target
import React from 'react';
import FacebookAuth from 'react-facebook-auth';
const authenticate = response => {
const headers = new Headers();
headers.append('Content-Type', 'application/json');
fetch('http://localhost:3000/api/v1/auth/oauth_login', {
method: 'POST',
headers,
body: JSON.stringify({
import React from 'react';
import PropTypes from 'prop-types';
class navHeader extends React.Component {
constructor(props) {
super(props);
this.state = {
isOpen: false,
};
import React from 'react';
import PropTypes from 'prop-types';
class navHeader extends React.Component {
constructor(props) {
super(props);
this.state = {
isOpen: false,
};