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
| <configuration> | |
| <startup> | |
| <supportedRuntime version="v4.0" /> | |
| </startup> | |
| </configuration> |
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
| /** | |
| * @jest-environment jsdom | |
| */ | |
| import { act, render, fireEvent } from "@testing-library/react"; | |
| import PageComponentWeather from "../../../pages/components/weather"; | |
| describe("PageComponentWeather", () => { | |
| test("renders correctly", async () => { | |
| let component: any; |
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
| import type {NextApiRequest, NextApiResponse, NextApiHandler} from "next"; | |
| import {findByZip} from "./../../../../mongoose/weather/services"; | |
| import dbConnect from "./../../../../middleware/db-connect"; | |
| async function handler( | |
| req: NextApiRequest, | |
| res: NextApiResponse | |
| ): Promise<NextApiResponse<WeatherDetailType> | void> { | |
| let data = await findByZip(req.query.zipcode as string); | |
| return res.status(200).json(data); |
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
| const query = ` | |
| query { | |
| artists(where: {name: "Red Hot Chili Peppers"}) { | |
| albums { | |
| title | |
| } | |
| } | |
| } | |
| `; |
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
| import { createStore } from 'redux' | |
| const initialCartState = [] | |
| const CartTypes = { | |
| ADD: 'ADD', | |
| EMPTY: 'EMPTY', | |
| REMOVE: 'REMOVE' | |
| } |
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
| import PocketBase from 'pocketbase'; | |
| const pb = new PocketBase('http://127.0.0.1:8090'); | |
| const data = [ | |
| { | |
| itemId: 'coffee', | |
| imageId: 'coffee', | |
| title: 'Coffee', | |
| price: 0.99, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| #!/usr/bin/env python | |
| def derivative(f, h=1e-5): | |
| def df(x): | |
| return (f(x + h) - f(x)) / h | |
| return df | |
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
| #!/usr/bin/env python | |
| import os | |
| import sys | |
| import json | |
| import datetime | |
| def usage(): | |
| program = os.path.basename(sys.argv[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
| (define PAIR cons) | |
| (define HEAD car) | |
| (define TAIL cdr) | |
| (define ISEMPTY null?) | |
| (define reverse | |
| (lambda (l result) | |
| (if (ISEMPTY l) | |
| result | |
| (reverse (TAIL l) (PAIR (HEAD l) result))))) |