Skip to content

Instantly share code, notes, and snippets.

View harrisonmalone's full-sized avatar

Harrison Malone harrisonmalone

View GitHub Profile
@harrisonmalone
harrisonmalone / App.js
Last active December 16, 2018 01:59
example of life cycle methods in react, when we mount the component for the first time we do a fetch to get the random user, this is the exact behaviour that we need
import React, { Component } from 'react';
import './App.css';
import Profile from './Profile'
class App extends Component {
state = {
users: null
}
componentDidMount() {
@harrisonmalone
harrisonmalone / css-grid-example.html
Last active December 19, 2018 04:21
worked through this with java class, just the basic le wagon grid challenge
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
* {
margin: 0px;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
* {
margin: 0px;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.wrapper {
display: flex;
@harrisonmalone
harrisonmalone / App.js
Last active December 19, 2018 22:11
this challenge was a way in which we can handle basic forms in react and express, it was a good example of passing down functions to child components to have access to that child components state which is passed as a parameter
import React, { Component } from 'react';
import Form from './Form';
import axios from 'axios';
class App extends Component {
handleRegistration = (user) => {
axios.post('http://localhost:5000/auth/register', user)
.then(resp => console.log(resp.data))
}
@harrisonmalone
harrisonmalone / App.js
Last active December 19, 2018 22:27
this was an example of sending up an axios post from react which we could then use on the express side to send back some kind of authenticated response
import React, { Component } from 'react';
import axios from 'axios';
import './App.css';
const authRequest = axios.create({
baseURL: 'http://localhost:5000/api',
headers: {
username: 'harrisonmalone',
password: '123456'
}
@harrisonmalone
harrisonmalone / find_elements_using_selenium.txt
Last active December 23, 2018 04:01
meeting i had with hugo in like may of 2018 (just after bootcamp) to discuss some ideas i had for a few different apps
to get all artists => https://pitchfork.com/artists/by/alpha/(a..z)/
to get specific elements on each page =>
[1] pry(main)> driver.find_element(:class, "score")
=> #<Selenium::WebDriver::Element:0x77d43895b7210db2 id="0.5838103215094534-1">
[2] pry(main)> driver.find_element(:class, "score").text
=> "6.8"
[3] pry(main)> driver.find_element(:class, "artist-links artist-list single-album-tombstone__artist-links").text
\
Selenium::WebDriver::Error::InvalidSelectorError: invalid selector: Compound class names not permitted

Notes for rubric mern

CMP1043-1 Design and develop complex software

What is complex software?

Does this mean something unique; something that would be difficult to achieve without software? Does it mean solving a particular problem?

Is complex software referring to the actual quality of the code itself. I feel as if this is better served in the next bit of criteria.

https://api.iextrading.com/1.0/ref-data/symbols
https://api.iextrading.com/1.0/stock/aapl/batch?types=quote,news,chart&range=1m&last=10
https://api.iextrading.com/1.0/stock/market/batch?symbols=aapl,fb&types=quote,news,chart&range=1m&last=5
https://api.iextrading.com/1.0/stock/aapl/book
https://api.iextrading.com/1.0/stock/market/list/mostactive

Prototype question

Oh no, there were some problems with your computer and now you cannot convert any data type to strings!

The toString() method has been disabled for booleans, numbers, arrays and objects. Your goal is to retrieve toString() for the following data types.

I. Booleans

For booleans: