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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Tennis Stats</title> | |
<style> | |
/* Reset and base styles */ | |
* { | |
margin: 0; |
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 wo(e, r) { | |
for (var n = 0; n < r.length; n++) { | |
const a = r[n]; | |
if (typeof a != "string" && !Array.isArray(a)) { | |
for (const s in a) | |
if (s !== "default" && !(s in e)) { | |
const u = Object.getOwnPropertyDescriptor(a, s); | |
u && Object.defineProperty(e, s, u.get ? u : { | |
enumerable: !0, | |
get: () => a[s] |
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
/* NOTE(teddy): | |
This code is heavily dependent on browser APIs, so must be run in a browser (e.g. as part of a React app) | |
It basically has an input that takes an image, shows a preview, and you can do whatever you want | |
with it once it's in state! | |
*/ | |
// NOTE(teddy): Which file types to accept - not necessary to add this. | |
const VALID_MEDIA_UPLOAD_MIME_TYPES = ['image/jpeg', 'image/png', 'image/heic'] | |
function ImageUploader(){ |
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
/* | |
Simulate a Mouse Event | |
*/ | |
//Target: element this event should be dispatched on | |
//Type: What type of mouse event, e.g. "click" | |
//Button: //0: Left (Default) 1: Middle 2:Right | |
var simulateMouseEvent = function(target,type,button){ | |
button = button || 0; //default is left click | |
var evt = new MouseEvent(type,{ |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Stock Portfolio Manager</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> | |
<link type = "text/css" rel="stylesheet" href = "homeDesign.css"/> | |
<script> | |
$(document).ready(function(){ | |
$('#doneEditButton').hide(); |
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
<?php | |
$portName = $_POST['name']; | |
$file = $portName . ".txt"; | |
unlink($file); | |
$data = file("homeFile.txt", FILE_IGNORE_NEW_LINES); | |
$homeFile = fopen("homeFile.txt",w); | |
unset($data[0]); | |
$data = array_values($data); | |
foreach ($data as $temp){ | |
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
<?php | |
$username = $_POST['Username']; | |
$sql_svs = '127.0.0.1:8889'; | |
$data_nm = 'userinfo'; | |
$data_user = 'user_info_user'; | |
$data_pd = 'userinfo'; | |
$link = mysql_connect('127.0.0.1:8889',$data_user,$data_pd); | |
if(!$link){ | |
die('Could not connect to database'); | |
} |
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
/** | |
* MyAVLMap | |
* Implementation for an AVL Map that extends a BST tree | |
* Supports the functions of insert, find, and size | |
* @author Teddy Ni | |
*/ | |
public class MyAVLMap extends MyBSTMap{ | |
/** |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Event Page</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> | |
<script> | |
$(document).ready(function(){ | |
$('#post').click(function(){ | |
var username = $('#username').val(); |