RobotBackupCallGraphmain.tsx15 matches
2import { thisWebURL } from "https://esm.town/v/stevekrouse/thisWebURL?v=2";
34export default async function server(req: Request): Promise<Response> {
5// Handle GET requests
6if (req.method === "GET") {
288layout: {
289name: 'preset',
290positions: function(node) {
291return { x: 0, y: 0 }; // Initial positions, will be overwritten
292}
297});
298299// Custom layout function
300function customLayout() {
301const mainGraph = cy.elements().not('#isolated, #isolated > node');
302const isolatedGraph = cy.getElementById('isolated');
349350// Add event listeners for highlighting
351cy.on('mouseover', 'node', function(e) {
352const node = e.target;
353highlightNodeChildrenAndParents(node);
354});
355356cy.on('mouseout', 'node', function(e) {
357unhighlightAll();
358});
359360cy.on('click', 'node', function(e) {
361const node = e.target;
362if (node.hasClass('highlighted') || node.hasClass('parent-highlighted')) {
368});
369370function highlightNodeChildrenAndParents(node) {
371const children = node.outgoers();
372const parents = node.incomers();
376}
377378function unhighlightAll() {
379cy.elements().removeClass('highlighted');
380cy.elements().removeClass('parent-highlighted');
529let match;
530while ((match = callRegex.exec(line)) !== null) {
531const calledFunction = match[1].toLowerCase();
532relationships.get(caller).add(calledFunction);
533allNodes.add(calledFunction);
534}
535});
545546const edges = [];
547relationships.forEach((calledFunctions, file) => {
548calledFunctions.forEach(calledFunction => {
549edges.push({
550data: {
551source: file,
552target: calledFunction,
553},
554});
createFileInputAppmain.tsx1 match
1export default function server(req: Request): Response {
2return new Response(`
3<!DOCTYPE html>
3import { createRoot } from "https://esm.sh/react-dom/client";
45function App() {
6const [isDragging, setIsDragging] = useState(false);
7const [jsonResult, setJsonResult] = useState(null);
124}
125126function client() {
127createRoot(document.getElementById("root")).render(<App />);
128}
130if (typeof document !== "undefined") { client(); }
131132export default async function server(req: Request): Promise<Response> {
133// Handle image processing
134if (req.method === 'POST' && new URL(req.url).searchParams.get('process')) {
btcPriceAlertmain.tsx1 match
4import { currency } from "https://esm.town/v/stevekrouse/currency";
56export async function btcPriceAlert() {
7const lastBtcPrice: number = await blob.getJSON("lastBtcPrice");
8let btcPrice = await currency("usd", "btc");
btcPriceAlertmain.tsx1 match
4import { currency } from "https://esm.town/v/stevekrouse/currency";
56export async function btcPriceAlert() {
7const lastBtcPrice: number = await blob.getJSON("lastBtcPrice");
8let btcPrice = await currency("usd", "btc");
squishyformmain.tsx14 matches
39let currentHistoryIndex = -1;
4041function updateStore(newData, source) {
42const currentData = $parsedResult.get();
43if (JSON.stringify(newData) !== JSON.stringify(currentData)) {
757677function undo() {
78if (currentHistoryIndex > 0) {
79currentHistoryIndex--;
83}
8485function redo() {
86if (currentHistoryIndex < history.length - 1) {
87currentHistoryIndex++;
105});
106107function debounce(func, delay) {
108return function() {
109const context = this;
110const args = arguments;
118inputText.addEventListener('input', debouncedSubmit);
119120function startTimer() {
121startTime = Date.now();
122stopTimer(); // Ensure any existing timer is stopped
124}
125126function stopTimer() {
127clearInterval(timerInterval);
128timerInterval = null; // Clear the interval reference
132}
133134function updateTimer() {
135const elapsedTime = ((Date.now() - startTime) / 1000).toFixed(2);
136timerDisplay.textContent = elapsedTime + 's llama3-groq-8b-8192';
137}
138
139async function submitForm() {
140const input = inputText.value.trim();
141const system = systemText.value.trim();
209let isEditorFocused = false;
210211function updateResultText(data) {
212const existingMonacoEditor = result.querySelector('#monaco-editor');
213
220221require.config({ paths: { 'vs': 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.30.1/min/vs' }});
222require(['vs/editor/editor.main'], function() {
223editor = monaco.editor.create(editorContainer, {
224value: JSON.stringify(data, null, 2),
289}
290291function updateTable(data) {
292if (!result.querySelector('#resultTable')) {
293const table = document.createElement('table');
359}
360361function createEmptyRow() {
362const row = document.createElement('tr');
363const keyCell = document.createElement('td');
379}
380381function createEditableInput(value, key, type) {
382const input = document.createElement('input');
383input.type = 'text';
qrCodeWebhookmain.tsx5 matches
7}
89function generateQrSVGPaths(
10qrData: boolean[][],
11penWidth: number,
20const overlap = true;
2122function createPath(
23startX: number,
24startY: number,
30}
3132function visitRow(visited: boolean[][], y: number, startX: number, endX: number) {
33for (let x = startX; x <= endX; x++) {
34visited[y][x] = true;
36}
3738function visitColumn(visited: boolean[][], x: number, startY: number, endY: number) {
39for (let y = startY; y <= endY; y++) {
40visited[y][x] = true;
113}
114115export default async function(request: Request): Promise<Response> {
116if (request.method !== "POST" && request.method !== "GET") {
117return new Response("Method Not Allowed", { status: 405 });
webdavServermain.tsx1 match
7};
89export function serveVals(
10req: Request,
11options?: WebdavOptions,
publicKeyPem_examplemain.tsx2 matches
50console.log(rsaPublicKeyPem);
5152function parsePem(pem: string) {
53pem = pem.replace(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "");
54return base64pad.baseDecode(pem);
55}
5657function wrap(input: string, columns = 64) {
58const reLines = new RegExp(`.{${columns}}`, "g");
59return input.replace(reLines, (line) => line + "\n");
avidPeachBoamain.tsx3 matches
49console.log(publicKeyPem);
5051function pkiFromPkcs1(pkcs1: ArrayBuffer) {
52return new pki.PublicKeyInfo({
53// algorithm: publicKeyInfo.algorithm,
60}
6162function parsePem(pem: string) {
63pem = pem.replace(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "");
64return base64pad.baseDecode(pem);
65}
6667function wrap(input: string, columns = 64) {
68const reLines = new RegExp(`.{${columns}}`, "g");
69return input.replace(reLines, (line) => line + "\r\n");