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…Lire l'exemple complet →
Workflows IA : Développement
Des workflows IA prêts à l'emploi de la catégorie Développement : ouvrez-en un, remplissez le court formulaire et lancez-le. Chacun montre un exemple de ce qu'il produit et le coût d'une exécution.
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.…Lire l'exemple complet →
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; ```…Lire l'exemple complet →
Constructeur de requêtes SQL
Entrée: top 10 customers by total order value in the last 90 days, tables: customers(id,name), orders(id,customer_id,total,created_at)
Utilisername: 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…Lire l'exemple complet →
Rédacteur de pipeline CI
Entrée: Node.js monorepo, pnpm, needs lint + test + build, deploy to staging on merge to dev
UtiliserRate 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.…Lire l'exemple complet →
Concepteur de rate limiting
Entrée: public REST API, free and paid tiers, must survive scraping bursts
UtiliserDiagnosis 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…Lire l'exemple complet →
Ingénieur de prompts
Entrée: summarize this article · outputs are too generic and sometimes miss the main point
UtiliserAccessibility 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.…Lire l'exemple complet →
Checklist d'accessibilité
Entrée: a checkout form with a custom dropdown, modal confirmation and toast notifications
UtiliserStory 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.…Lire l'exemple complet →
Rédacteur de user stories
Entrée: users want to export their reports as PDF and schedule weekly email delivery
UtiliserURL 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…Lire l'exemple complet →
Esquisse d'architecture
Entrée: a URL shortener that must handle 10k requests/sec with analytics
UtiliserRECOMMENDED 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.…Lire l'exemple complet →
Rédacteur de messages de commit
Entrée: added retry logic to the payment webhook handler and fixed the timeout bug
UtiliserLikely 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.…Lire l'exemple complet →
Optimiseur SQL
Entrée: 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
Utiliserexport 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.Lire l'exemple complet →
Un JSON Schema de production à partir d'une description : types, contraintes, exemples, notes de validation.
Concepteur de JSON Schema
Entrée: an e-commerce order with items, shipping address, payment status and timestamps
UtiliserWebP 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…Lire l'exemple complet →
Rédacteur de README
Entrée: a CLI tool that batch-converts images to WebP with quality presets
UtiliserWinner: 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.…Lire l'exemple complet →
Consultant en nommage
Entrée: a function that checks if a user can access a document based on role, ownership and sharing settings
UtiliserDécouvrez comment ça marche
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.
Cette vidéo est en anglais.
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.
Cette vidéo est en anglais.
Vous ne le trouvez pas ? Créez le vôtre.
Ouvrez n'importe quel modèle dans l'éditeur, modifiez une étape et enregistrez-le comme le vôtre — ou partez d'un canevas vide.