Let's break down the thing we're trying to do...
We want to display text to the user. HTML lets us do this using p tags (short for paragraph). What if we need some text with a link inside it like
Hello, how are doing?
| // Eldon Williams | |
| // Lab 6 | |
| // Imports | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| // Constants as compiler macros |
| #include <LiquidCrystal_I2C.h> | |
| LiquidCrystal_I2C lcd(0x27, 16, 2); | |
| void setup() { | |
| lcd.init(); | |
| lcd.backlight(); | |
| pinMode(A0, INPUT); | |
| pinMode(2, OUTPUT); | |
| pinMode(3, OUTPUT); |
| #include <LiquidCrystal_I2C.h> | |
| #include <math.h> | |
| LiquidCrystal_I2C lcd(0x27, 16, 2); | |
| const float warningTime = 1000; | |
| const float crossingTime = 5000; | |
| float requestedCrossingTime = 0; |
Let's break down the thing we're trying to do...
We want to display text to the user. HTML lets us do this using p tags (short for paragraph). What if we need some text with a link inside it like
Hello, how are doing?
| import { DependencyList, useEffect, useState } from "react"; | |
| /** | |
| * Takes in the handler function, subscribes it to any functions you need, and then returns a cleanup function. | |
| */ | |
| export type eventSetup_fn = (handler: ()=>void) => (()=>void); // looks nasty cause react doesn't export Destructor type | |
| /** | |
| * Performs a media query and returns the result. | |
| * Event setup allows you to subscribe to any events that the media query may depend on, |
| using UnityEngine; | |
| using UnityEngine.UI; | |
| using System.Collections.Generic; | |
| /// <summary> | |
| /// Renders a line using the UI canvas system. | |
| /// </summary> | |
| /// Thank you CGPala for the original UILineRender | |
| /// https://gist.github.com/CGPala/d1ace7dddbfbe78cd2de2bb9e40f6393 | |
| [RequireComponent(typeof(CanvasRenderer))] |
| local Spr = require(game:GetService("ReplicatedStorage"):WaitForChild("Packages"):WaitForChild("Spr")) | |
| export type TargetInstance = Frame | |
| export type InitialPositionFunction = (target: TargetInstance) -> Vector2 | |
| export type NewSpringListElementParams = { | |
| RenderInstance: GuiObject, | |
| SpringDamping: number, | |
| SpringFrequency: number, | |
| CalculateInitalPosition: InitialPositionFunction, | |
| TargetParent: Instance, |
| import { Divider, Paper, Stack, Typography } from "@mui/material"; | |
| import { motion } from "framer-motion"; | |
| import { useState } from "react"; | |
| import StyledTextField from "./StyledTextField"; | |
| const STFWrap = (props: Parameters<typeof StyledTextField>[0]) => { | |
| const [focused, setFocused] = useState<boolean>(false); | |
| const [inputValue, setInputValue] = useState<string>(""); | |
| return ( |
| # GIST NOTE | |
| """ | |
| TimeProvider is a basic utility which will give a *reliable* signal X times a second. | |
| It isn't considered to be 100% reliable and the signal connections are provided the deltatime as well as the tick number. | |
| The timer also takes account of the time it takes to execute any connections | |
| Possible efficency increases: | |
| - Wrap each signal connection in a thread and wait for them all to resolve allowing multiple to run at once and keeping one for yielding (timeouts could be imposed) | |
| - Fix the deltatime for the first two frames, currently it initalizes to 0 (which is normal I think) and the second frame is wonky, afterward I get expected behaviour | |
| - Is it compatiable with different OS's? |
| local Players = game:GetService("Players") | |
| local R15Blank = game:GetService("ReplicatedStorage"):WaitForChild("Assets"):WaitForChild("R15Blank") | |
| local LoadCharacter = {} | |
| -- Generally useful types | |
| export type BrickColorID = number | |
| export type AssetType = string | |
| export type CharacterAsset = { |