Skip to content

Instantly share code, notes, and snippets.

View harrisonmalone's full-sized avatar

Harrison Malone harrisonmalone

View GitHub Profile
const axios = require('axios');
// make the array that we'll push our responses into
let arr = []
// hitting the api function
const getData = async (nextEndpoint) => {
// sometimes we don't get the next endpoint
let endpoint;
if (nextEndpoint === undefined) {
import React from 'react';
import './App.css';
import * as historyData from './history.json';
// import Event from './Event'
class App extends React.Component {
state = {
events: historyData.result.events
}
button {
width: 300px;
height: 50px;
}
.btn-container {
display: flex;
justify-content: center;
}
import React from 'react';
import './App.css';
import * as historyData from './history.json';
// import Event from './Event'
class App extends React.Component {
state = {
events: historyData.result.events
}

Math topic master list

Bases

Counting in different bases

  1. If you were to count in base 8, what would the next three numbers be?
1, 2, 3, 4, 5, 6, _, _, _
const mongoose = require('mongoose')
const User = require('../models/User')
const Program = require('../models/Program')
const Client = require('../models/Client')
const Project = require('../models/Project')
const Resource = require('../models/Resource')
const { userData, programData, clientData, projectData, resourceData } = require('./seedData')
const addEmployee = async (user, client) => {
import java.util.*;
public class CreateEmployee {
public static void main(String[] args) {
System.out.println("Enter a number:");
Scanner scanner = new Scanner(System.in);
String userInput = scanner.nextLine();
System.out.println(userInput);
// ArrayList<String> list = new ArrayList<String>();
// list.add("A");

challenges this week

Artists, albums, tracks

  • CRUD operations for artists, albums, and tracks, with the following stipulations:
  • The root route will be the same as the artists index page.
  • Artists must have at least name, year of birth, and whether they are currently active (and as many others as you would like - this applies to all resources).
  • Albums must have attributes of (at least) title, year, and length.
  • Tracks must have title and length.
  • Artists will have many albums, but albums have one and only one artist.
  • Albums can have many tracks (or none), and tracks can have many albums (but at least one)
<div>
<% if !current_user %>
<%= link_to "Sign in", new_user_session_path %>
<%= link_to "Sign up", new_user_registration_path %>
<% else %>
<p>Hello <%= current_user.email %>. Your role is <%= current_user.role.priviledge %></p>
<%= link_to "Sign out", destroy_user_session_path, {method: :delete} %>
<% end %>
</div>
import React from 'react';
import './App.css';
import Routes from './Routes'
class App extends React.Component {
render() {
return (
<Routes />
)
}