wordcountermain.tsx2 matches
112const twitterCount = document.getElementById('twitterCount');
113114function updateCounts() {
115const encoder = new TextEncoder();
116const utf8 = new Uint8Array(inputText.value.length * 3);
150}
151152function adjustTextareaHeight() {
153inputText.style.height = 'auto';
154inputText.style.height = inputText.scrollHeight + 10 + 'px';
4import * as SPLAT from "https://cdn.jsdelivr.net/npm/gsplat@latest";
56function App() {
7const canvasRef = useRef(null);
8const progressDialogRef = useRef(null);
19const controls = new SPLAT.OrbitControls(camera, canvas);
2021async function main() {
22const url = "https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/bonsai/bonsai-7k-mini.splat";
23122}
123124function client() {
125createRoot(document.getElementById("root")).render(<App />);
126}
128if (typeof document !== "undefined") { client(); }
129130export default async function server(request: Request): Promise<Response> {
131return new Response(`
132<!DOCTYPE html>
sunnyAmberCraneREADME.md1 match
1Bot for Cama discord server. To initialize new slash commands, you have to run a separate bit of code. This is for modifying their functionality
58submitBtn.parentNode.insertBefore(errorContainer, submitBtn.nextSibling);
5960function showError(message) {
61errorContainer.textContent = message;
62errorContainer.classList.remove('hidden');
63}
6465function hideError() {
66errorContainer.textContent = '';
67errorContainer.classList.add('hidden');
71let timerInterval;
7273function startTimer() {
74startTime = Date.now();
75timerInterval = setInterval(updateTimer, 10);
76}
7778function stopTimer() {
79clearInterval(timerInterval);
80const elapsedTime = ((Date.now() - startTime) / 1000).toFixed(2);
83}
8485function updateTimer() {
86const elapsedTime = ((Date.now() - startTime) / 1000).toFixed(2);
87timerDisplay.textContent = elapsedTime + 's ${model}';
88}
89
90async function submitForm() {
91hideError();
92const input = inputText.value.trim();
190}
191}
192function updateResultText(data, summary) {
193// Display JSON
194const jsonPre = document.createElement('pre');
getGoogleCalendarEventsmain.tsx2 matches
4// const accountId = "apn_nphbDaP";
56export async function getCalendars(accountId: string) {
7const calendarAPI = await pipeDreamGoogle("calendar", accountId);
8const calendars = await calendarAPI.calendarList.list();
1112// list out the events on a calendar
13export async function getEvents(accountId: string, calendarId: string) {
14const calendar = await pipeDreamGoogle("calendar", accountId);
15
sqliteExplorerAppREADME.md1 match
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable
35- [x] add export to CSV, and JSON (CSV and JSON helper functions written in [this val](https://www.val.town/v/nbbaier/sqliteExportHelpers). Thanks to @pomdtr for merging the initial version!)
36- [x] add listener for cmd+enter to submit query
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
23export default async function server(request: Request): Promise<Response> {
4const SCHEMA_VERSION = 15; // Increment this to create new tables
5const KEY = "scheduler";
304let currentCalendarEndTime = null;
305306function initializeDayDropdowns() {
307const startDaySelect = document.getElementById('startDay');
308const endDaySelect = document.getElementById('endDay');
313}
314315async function loadCalendars() {
316const response = await fetch('/calendars');
317const calendars = await response.json();
333}
334335async function createCalendar() {
336if (!userId) {
337alert('Please enter a name');
355356357async function deleteCalendar(id) {
358await fetch('/calendars', {
359method: 'DELETE',
368}
369
370async function viewCalendar(id) {
371currentCalendarId = id;
372const response = await fetch('/calendars');
387}
388389function createCalendarGrid() {
390const calendar = document.getElementById('calendar');
391calendar.innerHTML = '';
437}
438439async function loadAvailability() {
440userAvailability.clear();
441overallAvailability = {};
460}
461462async function toggleAvailability(day, time) {
463if (!userId || !currentCalendarId) {
464alert('Please enter your name and select a calendar first.');
491}
492493function updateCalendarDisplay() {
494for (let day = 0; day < 7; day++) {
495for (let time = 0; time < 24 * 60; time += 30) {
516}
517518function updateDebugInfo() {
519const debugInfo = document.getElementById('debugInfo');
520debugInfo.innerHTML = '<h3>Debug Info:</h3>';
525}
526527function toggleDebugInfo() {
528const debugInfo = document.getElementById('debugInfo');
529const debugToggle = document.getElementById('debugToggle');
537}
538539function updateDebugInfo() {
540const debugInfo = document.getElementById('debugInfo');
541debugInfo.innerHTML = '<h3>Debug Info:</h3>';
whatsThatAgainInHotDogsmain.tsx3 matches
116</table>
117<script>
118function calculateHotdogs() {
119const playerName = document.getElementById('playerSelect').value;
120fetch('/calculate?player=' + encodeURIComponent(playerName))
136}
137138function highlightRow(row) {
139// Clear previous highlights
140const table = document.getElementById('playerInfo');
174})
175176export default async function handler(request: Request): Promise<Response> {
177return app.fetch(request)
178}
15};
1617function App() {
18const [createdValUrl, setCreatedValUrl] = useState(null);
19const [selectedOptions, setSelectedOptions] = useState([]);
128129const { name } = extractValInfo(import.meta.url);
130export default async function server(request: Request): Promise<Response> {
131const excalidraw = createExcalidraw({
132store: {
232}
233234function client() {
235createRoot(document.getElementById("root")).render(<App />);
236}
240}
241242export default async function server(request: Request): Promise<Response> {
243if (request.method === "POST" && new URL(request.url).pathname === "/create-val") {
244const { code, name } = await request.json();
15};
1617function App() {
18const [createdValUrl, setCreatedValUrl] = useState(null);
19const [selectedOptions, setSelectedOptions] = useState([]);
128129const { name } = extractValInfo(import.meta.url);
130export default async function server(request: Request): Promise<Response> {
131const excalidraw = createExcalidraw({
132store: {
232}
233234function client() {
235createRoot(document.getElementById("root")).render(<App />);
236}
240}
241242export default async function server(request: Request): Promise<Response> {
243if (request.method === "POST" && new URL(request.url).pathname === "/create-val") {
244const { code, name } = await request.json();