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 smallestMult(n) { | |
| let result; | |
| let largest = n; | |
| let unsolved = true; | |
| while(unsolved === true){ | |
| for(let i = 1; i <= largest; i++){ | |
| if (largest % i !== 0){ | |
| break | |
| } else if (i === n){ |
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 largestPalindromeProduct(n) { | |
| let palindromes = []; | |
| let base = Number('9'.repeat(n)); | |
| for(let i = 1; i <= base; i++){ | |
| for(let j = 1; j <= base; j++){ | |
| let product = i * j; | |
| if (product === Number(String(product).split('').reverse().join(''))){ | |
| palindromes.push(n) | |
| } |
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 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 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 fiboEvenSum(n) { | |
| let a = 1; | |
| let b = 2; | |
| let c = 0; | |
| let sum = 0; | |
| if (n >=2){ | |
| sum += 2; | |
| } |
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 largestPrimeFactor(number) { | |
| let divisor, largestDivisor = 2; | |
| while (number % 2 === 0){ | |
| number = number / divisor; | |
| } | |
| divisor = 3; | |
| while (number > 1){ |
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 React from 'react'; | |
| import { FormikConsumer } from 'formik'; | |
| export const FormDebugger = () => ( | |
| <div | |
| style={{ | |
| margin: '3rem 0', | |
| borderRadius: 4, | |
| background: '#f6f8fa', |
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 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 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
| 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 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
| export class SubscribeDirective extends SchemaDirectiveVisitor { | |
| visitFieldDefinition(field) { | |
| field.subscribe = () => pubsub.asyncIterator(field.name); | |
| } | |
| visitObject(object) { | |
| return super.visitObject(object); | |
| } | |
| } |
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 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'; |