Overall purpose This function accepts two values, a and b, and returns the result of applying JavaScript’s + operator to them. It can perform numeric addition or string concatenation, depending on the argument types. Section-by-section walkthrough function add(a, b) declares a function named add with two parameters: a and b. { ... } contains the function body. return sends the computed value back to the caller. a + b applies the + operator to the two arguments. The final ; terminates the return statement. For example: add(2, 3); // 5…Celý príklad →
AI pracovné postupy: Vývoj
Hotové AI pracovné postupy v kategórii Vývoj: otvorte jeden, vyplňte krátky formulár a spustite ho. Každý ukazuje ukážku toho, čo vytvára, a koľko stojí jedno spustenie.
Findings Missing input validation / type confusion Severity: Low Line ref: 1 Exploit sketch: Calling add("1", "2") returns "12" because + performs string concatenation when either operand is a string. Fix: Declare numeric parameter and return types, validate values at runtime, and reject non-finite numbers. Injection Severity: None identified Line ref: N/A Exploit sketch: The function does not pass input to an interpreter, database, shell, HTML sink, or other injection-sensitive context.…Celý príklad →
WITH customer_totals AS ( SELECT o.customer_id, SUM(o.total) AS total_order_value FROM orders AS o WHERE o.created_at = CURRENT_TIMESTAMP - INTERVAL '90' DAY GROUP BY o.customer_id ) SELECT c.id, c.name, ct.total_order_value FROM customer_totals AS ct JOIN customers AS c ON c.id = ct.customer_id ORDER BY ct.total_order_value DESC FETCH FIRST 10 ROWS ONLY; ```…Celý príklad →
Zostavovač SQL dotazov
Vstup: top 10 customers by total order value in the last 90 days, tables: customers(id,name), orders(id,customer_id,total,created_at)
Použiťname: CI and Staging Deploy on: pull_request: push: branches: - dev Prevent older runs for the same branch or pull request from wasting resources. concurrency: group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true Use least-privilege defaults; individual jobs can add permissions if needed. permissions: contents: read env: NODE_VERSION: "22" PNPM_VERSION: "10" jobs: install: name: Install dependencies runs-on: ubuntu-latest steps: - name: Check out repository…Celý príklad →
Autor CI pipeline
Vstup: Node.js monorepo, pnpm, needs lint + test + build, deploy to staging on merge to dev
PoužiťRate Limiting Design 1. Algorithm Choice Use a hierarchical token bucket as the primary enforcement algorithm, supplemented by a short sliding-window burst detector. Why Token Bucket Token bucket is the best primary mechanism because it: Allows legitimate short bursts while enforcing a sustainable average rate. Requires constant memory and near-constant processing per bucket. Works efficiently in a distributed data store such as Redis. Supports different refill rates and capacities for each tier.…Celý príklad →
Návrhár obmedzovania rýchlosti
Vstup: public REST API, free and paid tiers, must survive scraping bursts
PoužiťDiagnosis The prompt “summarize this article” underperforms because it: Does not define the audience, purpose, or desired level of detail. Gives no criteria for identifying the article’s main point. Does not require supporting evidence, so summaries may become vague. Omits instructions for handling arguments, data, caveats, and conclusions. Specifies no output structure or length. Does not discourage generic framing, repetition, or unsupported interpretation. Rewritten Prompt — Version A: Thesis-First Summary Role…Celý príklad →
Prompt inžinier
Vstup: summarize this article · outputs are too generic and sometimes miss the main point
PoužiťAccessibility Audit Checklist — Checkout Form, Custom Dropdown, Modal Confirmation, Toast Notifications 1. Checkout Form 1.1 Errors are identified, described, and announced WCAG 2.2 criteria at risk: 3.3.1 Error Identification 3.3.3 Error Suggestion 3.3.7 Redundant Entry 4.1.3 Status Messages Keyboard test: Submit the form with required fields empty or invalid. Confirm focus moves to the first invalid field or to an error summary.…Celý príklad →
Kontrolný zoznam prístupnosti
Vstup: a checkout form with a custom dropdown, modal confirmation and toast notifications
PoužiťStory 1: Export a report as PDF As a report user, I want to export a report as a PDF, so that I can save, print, or share a fixed-format version. Acceptance criteria Given I have permission to view a report, when I select “Export as PDF,” then the system generates a PDF containing the report’s current data and visible configuration. Given the PDF is generated successfully, when generation completes, then the file downloads with a meaningful name that includes the report name and export date.…Celý príklad →
Autor používateľských príbehov
Vstup: users want to export their reports as PDF and schedule weekly email delivery
PoužiťURL Shortener Architecture — Stress-Tested Revision 1. Stress-Test Findings Weak Point Category Failure or Cost Scenario Mitigation Central Snowflake-style ID Generator SPOF A single logical generator can block all automatic URL creation during failure, network partition, clock regression, or capacity exhaustion. Cross-region access also adds latency. Remove the network ID Generator. Generate random 128-bit values in each Management Service instance, encode 48–64 random bits as an eight-character Base62 code, and claim the code through a conditional…Celý príklad →
RECOMMENDED fix(payments): retry webhooks and correct timeout handling Transient failures caused webhook events to be dropped too early. Retries improve delivery reliability, while proper timeouts prevent hangs. fix(webhooks): add retries and resolve payment timeout bug Payment callbacks could fail permanently during temporary outages. Retry logic and corrected timeouts make processing more resilient. fix(payment-webhook): handle retries and timeouts reliably Intermittent network issues could interrupt payment notifications.…Celý príklad →
Autor commit správ
Vstup: added retry logic to the payment webhook handler and fixed the timeout bug
PoužiťLikely planner behavior and bottlenecks Postgres will normally rewrite the IN subquery as a semi-join. A plausible plan is: Scan customers to find rows where country = 'TR'. Build a hash table of matching customer IDs. Scan all 20M rows of orders. Hash-join orders against the matching customers. Sort every matched order by created_at DESC. The planner is not necessarily making a semantic mistake; without suitable indexes, this may be the cheapest available plan. The expensive parts are likely: A sequential scan of orders.…Celý príklad →
Optimalizátor SQL
Vstup: SELECT * FROM orders o WHERE o.customer_id IN (SELECT id FROM customers WHERE country = 'TR') ORDER BY o.created_at DESC · orders has 20M rows, customers 500k, Postgres 16
Použiťexport function add(a: number, b: number): number { return a + b; } Notes: The TypeScript version explicitly accepts and returns number. Unlike the JavaScript original, calls with strings or other non-number values are rejected at compile time. TypeScript types are erased at runtime, so JavaScript callers can still pass incompatible values unless runtime validation is added. number includes floating-point values, NaN, and Infinity. JavaScript’s usual numeric behavior still applies, including floating-point precision issues and coercion at runtime.Celý príklad →
Produkčná JSON Schema z opisu: typy, obmedzenia, príklady, poznámky k validácii.
Návrhár JSON Schema
Vstup: an e-commerce order with items, shipping address, payment status and timestamps
PoužiťWebP Batch Batch-convert images to WebP from the command line with fast, consistent quality presets. <!-- Suggested badges: npm version, build status, test coverage, license, platform support --> Features Convert entire directories in one command Support for PNG, JPEG, TIFF, and other common image formats Built-in low, medium, high, and lossless quality presets Recursive directory processing Preserve source directory structure Skip unchanged or existing files Control output location, dimensions, and metadata Preview operations with dry-run mode…Celý príklad →
Winner: canUserAccessDocument Reading-aloud test: “Can user access document?” Clear and natural. Implies: Returns a boolean after evaluating all relevant authorization factors. Mis-implies: May sound broader than role, ownership, and sharing settings if other access rules exist. hasDocumentAccess Reading-aloud test: “User has document access.” Concise and fluent at call sites. Implies: Checks whether the current or supplied user has access.…Celý príklad →
Poradca pre pomenovanie
Vstup: a function that checks if a user can access a document based on role, ownership and sharing settings
PoužiťPozrite sa, ako to funguje
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.
Toto video je v angličtine.
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.
Toto video je v angličtine.
Nenašli ste? Postavte si vlastný.
Otvorte ľubovoľnú šablónu v editore, zmeňte krok a uložte ju ako vlastnú — alebo začnite s prázdnym plátnom.