Library Management REST API Base URL: https://api.example.com/v1 All request and response bodies use application/json. Dates use ISO 8601 in UTC. Resource IDs are UUIDs. Endpoint Table Books Method Path Purpose Status Codes GET /books List and filter books 200, 400 POST /books Create a book record 201, 400, 409, 422 GET /books/{bookId} Retrieve a book 200, 404 PATCH /books/{bookId} Update book metadata or inventory 200, 400, 404, 409, 422 …Lesa allt dæmið →
Gervigreindarverkflæði: Þróun
Tilbúin gervigreindarverkflæði í flokknum Þróun: opnaðu eitt, fylltu út stutta eyðublaðið og keyrðu það. Hvert þeirra sýnir dæmi um það sem það býr til og hvað ein keyrsla kostar.
add(a, b) Adds two values using JavaScript’s + operator. Parameters Name Type Constraints a any None. If either operand is a string, string concatenation may occur. b any None. If either operand is a string, string concatenation may occur. Returns any — The result of evaluating a + b. Errors This function does not explicitly throw errors. JavaScript may throw a TypeError for incompatible operand types, such as mixing a bigint with a number. Example const result = add(2, 3);…Lesa allt dæmið →
The Cost of Doing Nothing Assumptions Replace these inputs with internal figures as needed: 20 engineers run or wait for CI an average of 2 times per day 220 working days per year Fully loaded engineering cost: $150/hour Current suite duration: 45 minutes Estimated productive time lost per run: 15 minutes due to parallel work, context switching, and delayed feedback 5 flaky-test reruns or investigations per day, averaging 20 minutes each 2 production incidents last quarter traced to untested paths Average incident cost:…Lesa allt dæmið →
Viðskiptarök fyrir tækniskuld
Inntak: our test suite takes 45 minutes, flaky tests get skipped, two incidents last quarter traced to untested paths
Nota þettaIdentity + Scope You are the customer support assistant for a SaaS invoicing platform. You help customers understand and use the product, troubleshoot common issues, and navigate account, subscription, invoice, payment, and billing workflows. Your scope includes: Account access and settings Creating, sending, editing, and tracking invoices Payment status and payment-method questions Subscription plans, renewals, cancellations, and billing-cycle explanations Product troubleshooting using approved documentation Collecting information for support escalation…Lesa allt dæmið →
Höfundur kerfiskvaðningar
Inntak: a customer support assistant for a SaaS invoicing tool; must never promise refunds; escalates billing disputes
Nota þettaCaching Strategy 1. Data Classes Data class Cache layer TTL and reasoning Invalidation trigger Staleness tolerance Product content: name, description, images, category, attributes CDN + distributed cache + app-local cache CDN: 15–60 min; distributed: 30 min; app-local: 1–5 min. This data changes infrequently and benefits most from edge caching. Product update event; purge affected product, category, search, and listing keys. 15–60 min for presentation data; near-zero for legal or compliance fields. …Lesa allt dæmið →
Skyndiminnisstrategía
Inntak: product catalog API, 10k rps reads, prices change hourly, stock changes constantly
Nota þettaEstimation scale S: 0.5–1.5 engineering days M: 2–3 engineering days L: 4–5 engineering days Assumes one engineer, code review included, existing CI/CD and authentication, and no major infrastructure procurement. QA/UAT time is included per slice but cross-system rollout support is not. Delivery slices 1. Notification event contract and channel-agnostic model — M Scope Define notification types, recipients, payload schema, priority, channel eligibility, timestamps, and idempotency key. Add producer-facing API or internal library.…Lesa allt dæmið →
Áætlunaraðstoð
Inntak: rebuild the notification system: email, push, in-app, user preferences, digest batching
Nota þettaimport { describe, expect, it } from 'vitest'; const add = (a: number, b: number): number => a + b; describe('add', () => { describe('happy paths', () => { it('adds two positive numbers', () => { // Arrange const a = 2; const b = 3; // Act const result = add(a, b); // Assert expect(result).toBe(5); }); it('adds two negative numbers', () = { // Arrange const a = -2; const b = -3; // Act const result = add(a, b); // Assert expect(result).toBe(-5); });…Lesa allt dæmið →
function addNumbers(firstNumber: number, secondNumber: number): number { return firstNumber + secondNumber; } Added number parameter types to fix the implicit any parameters. Restricted both operands to numbers, removing ambiguity between numeric addition and string concatenation. Added an explicit number return type to document and enforce the function’s contract. Renamed add, a, and b to addNumbers, firstNumber, and secondNumber for clearer intent.Lesa allt dæmið →
Test Plan: Checkout Flow with Promo Codes and Three Payment Methods Assumptions The checkout flow supports: Cart review Shipping and billing information Promo-code application/removal Three payment methods: Credit/debit card Digital wallet Bank transfer Order confirmation and receipt Tax, shipping, and discount calculation Risk Assessment | Risk | Impact | Likelihood | Priority | Primary Mitigation | |---|---:|---:|---:|---|…Lesa allt dæmið →
Höfundur prófunaráætlunar
Inntak: a new checkout flow with promo codes and 3 payment methods
Nota þettaTitle Android app crashes when uploading a large photo Environment Platform: Android App version: Unknown Android version: Unknown Device model: Unknown Network conditions: Unknown Assumption: The crash occurs when selecting or uploading a high-resolution or large-file-size photo. Steps to Reproduce Open the Android app. Navigate to the photo upload feature. Select a large or high-resolution photo. Start the upload. Observe that the app crashes. Expected…Lesa allt dæmið →
[Unreleased] Added Dark mode is now available for a more comfortable viewing experience in low-light environments. Changed ⚠ BREAKING: Node.js 16 is no longer supported. Migrate to Node.js 18 or later before upgrading. Fixed Users are now redirected to the correct destination after logging in. Removed ⚠ BREAKING: Support for Node.js 16 has been removed. Upgrade your environment to Node.js 18 or later.Lesa allt dæmið →
Breytingaskrárhöfundur
Inntak: added dark mode, fixed login redirect bug, dropped node 16 support
Nota þettaContext The API previously supported JWT authentication only. We now need to support API key–based integrations while protecting authentication endpoints and downstream services from excessive traffic and abuse. What changed Authentication middleware Refactored the auth middleware to support: JWT bearer tokens API keys Added credential detection and validation for both authentication methods. Preserved existing JWT behavior and error handling. Standardized the authenticated request context across JWT and API key flows. Rate limiting…Lesa allt dæmið →
PR-lýsing
Inntak: refactored the auth middleware to support API keys alongside JWT, added rate limiting
Nota þettaPayment Webhook Processing Service — On-Call Runbook 0. 3 AM Quick Path The three most likely causes Queue backlog: Queue depth and oldest-message age are rising while worker throughput is below arrival rate. Check worker health, errors, and downstream saturation; scale only if dependencies can absorb it. Provider timeout: Requests to or from one provider are timing out. Check provider status and timeout metrics; keep events durable and reduce retry pressure.…Lesa allt dæmið →
Vaktahandbók
Inntak: payment webhook processing service, common issues: queue backlog, provider timeouts, signature failures
Nota þettaPayment Webhook System 1. Event Types payment.succeeded payment.failed payment.refunded Events are delivered via HTTPS POST to a customer-configured endpoint. 2. Event Envelope { id: evt_01HTY8Z3N7Y6WQ2WQ4T91P7R5A, type: payment.succeeded, timestamp: 2025-03-08T14:52:31.482Z, version: 2025-01-01, data: { payment_id: pay_01HTY8XJ0DQK8TQ3W6A8KJX9P2, amount: 4999, currency: USD, status: succeeded, customer_id: cus_12345, order_id: order_98765 } } Field definitions…Lesa allt dæmið →
Vefkróks-hönnuður
Inntak: payment events: succeeded, failed, refunded — consumers are customer backends
Nota þettaMonorepo Makefile: Go API, React frontend, and Postgres via Docker Compose. SHELL := /bin/bash .DEFAULT_GOAL := help API_DIR := api WEB_DIR := frontend DIST_DIR := dist COMPOSE := docker compose GO := go NPM := npm Use npm ci when a lockfile exists; fall back to npm install for first-time setup. NPM_INSTALL := $(if $(wildcard $(WEB_DIR)/package-lock.json),$(NPM) ci,$(NPM) install) .PHONY: help setup dev test lint build clean db-up db-migrate help: ## Show available targets @awk 'BEGIN {FS = ":.*## "; printf "Usage: make \033[36m<target>\033[0m\n\nTargets:\n"} \…Lesa allt dæmið →
Makefile / verkefnakeyrari
Inntak: a monorepo with a Go API, React frontend, and Postgres via docker compose
Nota þettaBugs Line 1: Parameters a and b have implicit any types when noImplicitAny is enabled. Line 1: The return type is unspecified. Because + behaves differently for numbers and strings, the function’s intended behavior is ambiguous. Security No direct security vulnerabilities are present. Explicit numeric types prevent unintended string concatenation or coercion when this function is used with loosely typed input. Performance The implementation is already optimal for numeric addition. No additional allocations or unnecessary operations are performed.…Lesa allt dæmið →
-- PostgreSQL schema. -- Stores users, venues, reservable time slots, bookings, payments, and cancellations. -- All timestamps are timezone-aware, and monetary values use fixed-precision NUMERIC. CREATE TABLE users ( user_id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, email VARCHAR(320) NOT NULL, full_name VARCHAR(200) NOT NULL, phone VARCHAR(32), status VARCHAR(20) NOT NULL DEFAULT 'active' CHECK (status IN ('active', 'suspended')), created_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP,…Lesa allt dæmið →
Gagnagrunnsskemahönnuður
Inntak: a booking system: users, venues, time slots, payments, cancellations
Nota þettaPerformance review Hot path complexity Time: O(1) per call. Space: O(1). There are no loops, recursive calls, or input-dependent operations. Allocation / GC pressure For numeric inputs, the function typically creates no heap allocations, so GC pressure is negligible. If either operand is a string, + performs concatenation and allocates a new string of size O(len(a) + len(b)). Untyped parameters allow mixed operand types, which may introduce coercion and reduce JIT optimization stability at polymorphic call sites. I/O / N+1 patterns…Lesa allt dæmið →
scalar DateTime scalar URL schema { query: Query mutation: Mutation } interface Node { id: ID! } type Query { node(id: ID!): Node recipe(id: ID!): Recipe author(id: ID!): Author ingredient(id: ID!): Ingredient collection(id: ID!): Collection recipes( first: Int after: String last: Int before: String filter: RecipeFilterInput sort: RecipeSortInput ): RecipeConnection! ingredients( first: Int after: String last: Int before: String search: String ): IngredientConnection! authors( first: Int after: String…Lesa allt dæmið →
GraphQL skemahönnuður
Inntak: a recipe platform: recipes, ingredients, authors, ratings, collections
Nota þetta# syntax=docker/dockerfile:1.7 FROM node:22-bookworm-slim AS base ENV PNPM_HOME=/pnpm ENV PATH=$PNPM_HOME:$PATH RUN corepack enable FROM base AS dependencies WORKDIR /app COPY package.json pnpm-lock.yaml ./ RUN --mount=type=cache,id=pnpm,target=/pnpm/store \ pnpm install --frozen-lockfile FROM dependencies AS build COPY . . RUN pnpm run build \ pnpm prune --prod FROM node:22-bookworm-slim AS production ENV NODE_ENV=production WORKDIR /app RUN apt-get update \ apt-get install -y --no-install-recommends ffmpeg curl \ rm -rf /var/lib/apt/lists/* \…Lesa allt dæmið →
Actual cause Your code calls .map() on a value that is undefined. Since .map() is an array method, the value was likely expected to be an array but was missing, not initialized yet, or accessed through the wrong property. For example: const items = undefined; items.map(item = item.name); // TypeError Most likely fixes Initialize the value as an empty array This is most likely when data is loaded asynchronously or stored in state. const [items, setItems] = useState([]); Or provide a fallback:Lesa allt dæmið →
Kata: Global Meeting Scheduler Problem Statement Your company has teams in New York, London, Tokyo, and several other cities. Meeting requests arrive as local date-and-time strings together with their IANA time zones. Your task is to convert each request into a canonical UTC timestamp. Unfortunately, local times are not always valid or unique: During the spring daylight-saving transition, some local times do not exist. During the autumn transition, some local times occur twice. Time zones may use offsets that are not whole hours.…Lesa allt dæmið →
#!/usr/bin/env bash set -Eeuo pipefail IFS=$'\n\t' usage() { cat <<'EOF' Usage: rename-photos.sh [--dry-run] FOLDER rename-photos.sh --help Rename photos using their EXIF capture date. Options: -n, --dry-run Show planned changes without renaming files -h, --help Show this help message Output format: YYYYMMDD_HHMMSS.ext Duplicates: Files with the same timestamp receive a numeric suffix: YYYYMMDD_HHMMSS_001.ext Supported extensions: jpg, jpeg, heic, heif, tif, tiff, png, webp Requirements: exiftool EOF } die() { printf 'Error: %s\n' "$*" >&2 exit 1 }…Lesa allt dæmið →
Handritahöfundur
Inntak: rename all photos in a folder by their EXIF date, dry-run flag, handle duplicates
Nota þettaPattern ^(?:\d{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$ Piece-by-piece explanation ^ — Start of the string. \d{4} — Exactly four digits for the year. - — Literal hyphen. (?:0[1-9]|1[0-2]) — Month from 01 through 12. 0[1-9] matches 01–09. 1[0-2] matches 10–12. - — Literal hyphen. (?:0[1-9]|[12]\d|3[01]) — Day from 01 through 31. 0[1-9] matches 01–09. [12]\d matches 10–29. 3[01] matches 30–31. $ — End of the string. Matching examples 2026-07-02 1999-12-31 2000-01-01…Lesa allt dæmið →
Sjáðu hvernig það virkar
How AI workflows work: one form in, a finished video out
A workflow is a ready-made recipe of AI steps. You pick a template, fill in a short form, and every step runs on its own until a finished video comes out. Here we follow one bedtime story video from the form to the result.
Þetta myndband er á ensku.
What happens when you press Run? The anatomy of an AI workflow
Let's open one workflow and look inside. A workflow is a graph: each box is a step, the arrows set the order, and steps that don't depend on each other run side by side. Your answers flow into the steps, some steps check their own work and run again, some wait for your approval, and every AI call is recorded with its own cost.
Þetta myndband er á ensku.
Finnurðu það ekki? Smíðaðu þitt eigið.
Opnaðu hvaða sniðmát sem er í smiðnum, breyttu skrefi og vistaðu sem þitt eigið — eða byrjaðu á auðum striga.