CGPAcalculatormain.tsx3 matches
18};
1920function GPACalculator() {
21const [courses, setCourses] = useState([
22{ credits: "credits", grade: "O" },
88}
8990function client() {
91createRoot(document.getElementById("root")).render(<GPACalculator />);
92}
94if (typeof document !== "undefined") { client(); }
9596export default async function server(request: Request): Promise<Response> {
97return new Response(
98`
4import { PDFDocument } from "https://esm.sh/pdf-lib";
56function App() {
7const [file, setFile] = useState<File | null>(null);
8const [pdfUrl, setPdfUrl] = useState<string | null>(null);
96}
9798function client() {
99createRoot(document.getElementById("root")).render(<App />);
100}
101if (typeof document !== "undefined") { client(); }
102103export default async function server(request: Request): Promise<Response> {
104if (request.method === 'POST') {
105const formData = await request.formData();
translateTextAPImain.tsx1 match
1export default async function server(request: Request): Promise<Response> {
2// Handle CORS preflight and OPTIONS requests
3if (request.method === "OPTIONS") {
popularAquamarineDormousemain.tsx3 matches
14}
1516// async function overlayTextOnImage(imageDef: Image): Promise<Uint8Array> {
17// console.log(imageDef);
18// const image = await loadImage(imageDef);
56// }
5758async function overlayTextOnImage(imageDef: Image): Promise<Uint8Array> {
59const image = await loadImage(imageDef);
6082}
8384export default async function generateOneMastodonPost(request: Request): Promise<Response> {
85const inputs = await blob.list(BLOB_PREFIX);
86
findPlatesmain.tsx6 matches
15}
1617// Function to format the plate number
18function formatPlateNumber(text: string): string {
19const match = text.match(/([A-Za-z\s]+)plate number for sale: (.+)/);
20if (match) {
26}
2728// Function to extract the price with currency
29function extractPrice(text: string): string | null {
30const match = text.match(/(\d{1,3}(?: \d{3})*)<span> AED<\/span>/);
31if (match) {
35}
3637async function fetchRSSFeed(): Promise<any> {
38try {
39const response = await fetch("http://numbers.ae/plate/rss");
62// const feedData = await fetchRSSFeed();
6364export default async function run() {
65console.log("running");
66let results = await fetchRSSFeed();
freeBlackTernmain.tsx1 match
2import { blob } from "https://esm.town/v/std/blob";
34export default async function run() {
5let posts = (await blob.list()).map(n => n.key);
6console.log(posts.length);
blob_adminmain.tsx8 matches
13}
1415function Tooltip({ children, content }: TooltipProps) {
16const [isVisible, setIsVisible] = useState(false);
17const tooltipRef = useRef<HTMLDivElement>(null);
52}
5354function formatBytes(bytes: number, decimals = 2) {
55if (bytes === 0) return "0 Bytes";
56const k = 1024;
61}
6263function copyToClipboard(text: string) {
64navigator.clipboard.writeText(text).then(() => {
65console.log("Text copied to clipboard");
69}
7071function ActionMenu({ blob, onDownload, onRename, onDelete, onMoveToPublic, onMoveOutOfPublic }) {
72const [isOpen, setIsOpen] = useState(false);
73const menuRef = useRef(null);
7677useEffect(() => {
78function handleClickOutside(event) {
79if (menuRef.current && !menuRef.current.contains(event.target)) {
80event.stopPropagation();
158}
159160function BlobItem({ blob, onSelect, isSelected, onDownload, onRename, onDelete, onMoveToPublic, onMoveOutOfPublic }) {
161const [isLoading, setIsLoading] = useState(false);
162const decodedKey = decodeURIComponent(blob.key);
219}
220221function App({ initialEmail, initialProfile }) {
222const encodeKey = (key: string) => encodeURIComponent(key);
223const decodeKey = (key: string) => decodeURIComponent(key);
645}
646647function client() {
648const initialEmail = document.getElementById("root").getAttribute("data-email");
649const initialProfile = JSON.parse(document.getElementById("root").getAttribute("data-profile"));
cerebras_codermain.tsx9 matches
6import { tomorrow } from "https://esm.sh/react-syntax-highlighter/dist/esm/styles/prism";
78function App() {
9const [prompt, setPrompt] = useState("hello llamapalooza");
10const [code, setCode] = useState("");
31}[]>([]);
3233async function handleSubmit(e: React.FormEvent) {
34e.preventDefault();
35setLoading(true);
64}
6566// Function to download prompt history and HTML versions
67function downloadHistory() {
68const historyBlob = new Blob(
69[JSON.stringify(promptHistory, null, 2)],
80}
8182// Function to download HTML versions
83function downloadHTMLVersions() {
84promptHistory.forEach((entry) => {
85const htmlBlob = new Blob([entry.code], { type: 'text/html' });
164}
165166function client() {
167createRoot(document.getElementById("root")!).render(<App />);
168}
172}
173174function extractCodeFromFence(text: string): string {
175const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
176return htmlMatch ? htmlMatch[1].trim() : text;
177}
178179export default async function server(req: Request): Promise<Response> {
180if (req.method === "POST") {
181const client = new Cerebras();
kickstart_feedbackmain.tsx6 matches
8}
910function statusColor(status: string) {
11switch (status) {
12case "Planned":
23}
2425function DetailsModal({ record, onClose }: { record: AirtableRecord; onClose: () => void }) {
26return (
27<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
40}
4142function SubmitFeedbackModal({ onClose }: { onClose: () => void }) {
43return (
44<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
68}
6970function AirtableList() {
71const [records, setRecords] = useState<AirtableRecord[]>([]);
72const [filteredRecords, setFilteredRecords] = useState<AirtableRecord[]>([]);
349}
350351function client() {
352createRoot(document.getElementById("root")).render(<AirtableList />);
353}
354if (typeof document !== "undefined") { client(); }
355356export default async function server(request: Request): Promise<Response> {
357const BASE_ID = Deno.env.get("airtable_kickstart_feedback_base");
358const TABLE_NAME = "Responses";
map_examplesmain.tsx3 matches
3const FN_MAP = "FnMap";
45async function getInfo() {
6return {
7title: "Map Examples (JavaScript)",
21}
2223function fnMap(_info: any) {
24return {
25info: {
199}
200201async function handleRequest(body: any) {
202const { opName, info } = body;
203switch (opName) {