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
function multiplesOf3and5(number) { | |
let sum = 0; | |
for(let i = 0; i < number; i++){ | |
if(i % 3 === 0 || i % 5 === 0){ | |
sum += i; | |
} | |
} | |
return sum; | |
} |
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
function fiboEvenSum(n) { | |
let a = 1; | |
let b = 2; | |
let c = 0; | |
let sum = 0; | |
if (n >=2){ | |
sum += 2; | |
} |
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
function largestPrimeFactor(number) { | |
let divisor, largestDivisor = 2; | |
while (number % 2 === 0){ | |
number = number / divisor; | |
} | |
divisor = 3; | |
while (number > 1){ |
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 from 'react'; | |
import { FormikConsumer } from 'formik'; | |
export const FormDebugger = () => ( | |
<div | |
style={{ | |
margin: '3rem 0', | |
borderRadius: 4, | |
background: '#f6f8fa', |
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 requests | |
import json | |
import geojson | |
from neo4j import GraphDatabase | |
def insert_geo(county_name, geo_data): | |
with driver.session() as session: | |
session.run( | |
''' |
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
directive @subscribe on FIELD_DEFINITION | |
directive @publish(to: String!) on FIELD_DEFINITION | OBJECT | |
type User @isAuthenticated { | |
id: ID! | |
firstName: String! | |
lastName: 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
export class SubscribeDirective extends SchemaDirectiveVisitor { | |
visitFieldDefinition(field) { | |
field.subscribe = () => pubsub.asyncIterator(field.name); | |
} | |
visitObject(object) { | |
return super.visitObject(object); | |
} | |
} |
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 from 'react'; | |
import { AppBar, Tab, Tabs, Typography } from '@material-ui/core'; | |
import { makeStyles } from '@material-ui/styles'; | |
import Auth from '../../util/Auth'; | |
import PERMISSIONS_LIST from '../../util/RolesEnum'; | |
import Box from '@material-ui/core/Box'; | |
import EditUnit from './EditUnit'; | |
import UnitChainOfTitle from './UnitChainOfTitle'; | |
import UnitRetainedAcreage from './UnitRetainedAcreage'; |
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 axios = require('axios'); | |
const base64 = require('base-64'); | |
const utf8 = require('utf8'); | |
require('dotenv').config(); | |
const clientId = process.env.CLIENT_ID; | |
const clientSecret = process.env.CLIENT_SECRET; | |
const apiKey = process.env.API_KEY; | |
const clientCreds = base64.encode(utf8.encode(`${clientId}:${clientSecret}`)); |
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 axios = require('axios'); | |
const base64 = require('base-64'); | |
const utf8 = require('utf8'); | |
require('dotenv').config(); | |
const clientId = process.env.CLIENT_ID; | |
const clientSecret = process.env.CLIENT_SECRET; | |
const apiKey = process.env.API_KEY; | |
const clientCreds = base64.encode(utf8.encode(`${clientId}:${clientSecret}`)); |