Skip to content

Instantly share code, notes, and snippets.

View RuyiLi's full-sized avatar
🐶
if id ex mem wb

Roy Li RuyiLi

🐶
if id ex mem wb
View GitHub Profile
@RuyiLi
RuyiLi / assignments2.md
Created August 6, 2019 02:19
More Assignments

Assignment 1 - Age

Create an input with type="date". When a button is pressed, the program should write "You are $(age) years old" into a paragraph element. Replace $(age) with the number of years since the date entered.

Use the MDN Docs for the Date object to complete this assignment: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date

You can get a date object from the input by doing new Date(input.value).

Assignment 2 - Move a Square

@RuyiLi
RuyiLi / assignments.md
Last active August 5, 2019 13:10
Lesson 6 Assignment

For all assignments, make sure to clearly label your local and global variables. Use functions to make your code more easy-to understand.

Assigment 1 - Shopping Cart

Create an application with an input field and a submit field. When the submit button is pressed, the text in the input should be added to a "shopping cart" (an unordered list). This is similar to your wishlist application. Try not to just copy code from the wishlist project, as there's literally no point in cheating on this.

Assignment 2 - Color a Square

Create 5 buttons labelled "red", "blue", "green", "white", and "black". When pressed, the background of a div element

@RuyiLi
RuyiLi / .eslintrc.json
Last active July 1, 2019 22:32
my eslint and ts config
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"parser": "@typescript-eslint/parser",
"plugins": [
@RuyiLi
RuyiLi / chitest.py
Last active December 31, 2018 18:22
Scripts used in my Math IA
import os
import pandas
from scipy import stats
# 3-digit team code
# This code is the same regardless of sport, just change the teams
teams = ['ari', 'atl', 'bal', 'bos', 'chc', 'chw', 'cin', 'cle', 'col', 'det', 'hou', 'kcr', 'laa', 'lad', 'mia', 'mil', 'min', 'nym', 'nyy', 'oak', 'phi', 'pit', 'sd', 'sea', 'sf', 'stl', 'tb', 'tex', 'tor', 'wsn']
indices = [ 'Win', 'Loss', 'Total' ]