Query stringlengths 2 286 | Type stringclasses 19
values |
|---|---|
Give me a Bash snippet that can connect to a PostgreSQL database. | Coding |
Give me a SQL query to find the second highest salary in an employees table. | Coding |
Explain this line of code: const {a, ...rest} = obj; | Coding |
How do I parse command-line arguments in Swift? | Coding |
What's the most efficient way to implement binary search in JavaScript? | Coding |
Refactor-friendly Bash example: find the longest common subsequence of two strings | Coding |
Write a Swift function that fetches JSON with URLSession and decodes it into a struct. | Coding |
write Java to rotate a matrix 90 degrees, with comments | Coding |
Write a Rust CLI tool using clap that greets a user. | Coding |
Could you show a R implementation to check whether a number is a power of two and explain its complexity | Coding |
give me a R snippet that can parse command-line arguments | Coding |
explain how to implement a queue using two stacks in Go, with an example. | Coding |
Could you show a Scala implementation to sort a list of objects by a field and explain its complexity? | Coding |
Explain how to send an HTTP POST request in Perl, with an example. | Coding |
Need Bash code to find all permutations of a string — keep it minimal. | Coding |
Add error handling to this function: def read(path): return open(path).read() | Coding |
I'm building a microservice in Go that needs to talk to Kafka. Can you show the producer and consumer setup, with graceful shutdown and retry logic? | Coding |
Write a Python class for a bank account with deposit and withdraw methods | Coding |
Write a SQL query that returns the top 5 customers by total order value. | Coding |
Need R code to remove duplicates from a list while keeping order — keep it minimal. | Coding |
What's the idiomatic way to count word frequencies in a text file in JavaScript? | Coding |
Can you help me generate a UUID using C? | Coding |
Refactor-friendly Perl example: run a shell command and capture its output | Coding |
What's the most efficient way to handle exceptions when opening a file in Swift? | Coding |
Explain how to find all permutations of a string in C++, with an example. | Coding |
remove duplicates from a list while keeping order in C# | Coding |
I have a Django model for Orders and Customers. How do I write a queryset that returns customers with more than 5 orders? | Coding |
Can you help me create a simple REST endpoint using C#? | Coding |
walk a directory tree recursively in Python | Coding |
Could you show a Scala implementation to implement a stack and explain its complexity? | Coding |
What's the most efficient way to find duplicate elements in an array in C? | Coding |
How do I find and kill a process on port 3000? | Coding |
Show me PHP code to calculate a factorial | Coding |
What's the difference between useMemo and useCallback | Coding |
Give me a JavaScript snippet that can format a date as ISO 8601. | Coding |
Give me a PHP snippet that can strip whitespace from a string. | Coding |
Write a Bash one-liner that prints the 10 largest files in a directory. | Coding |
generate a random password in Lua | Coding |
How do I deploy a Next.js app to Vercel? | Coding |
write Python to convert a string to snake_case, with comments | Coding |
create a snake game in Python using pygame. | Coding |
What's the idiomatic way to measure a function's execution time in Ruby? | Coding |
how do I write an AWS Lambda function in Python that reads from S3? | Coding |
Help me write a Python script that watches a folder and uploads new files to S3. | Coding |
Need C code to count word frequencies in a text file — keep it minimal. | Coding |
write TypeScript to retry a request with exponential backoff, with comments | Coding |
Need Python code to read a file line by line — keep it minimal. | Coding |
how do I base64-encode a string in Bash? | Coding |
Explain how to measure a function's execution time in Kotlin, with an example. | Coding |
Why am I getting 'IndexError: list index out of range' in Python? | Coding |
PHP: read and parse a JSON file | Coding |
what's wrong with this JavaScript? const x = [1,2,3]; x.push(4); x = [5]; | Coding |
Show me PowerShell code to check whether a number is a power of two. | Coding |
compute the median of a list in C# | Coding |
Could you show a Rust implementation to implement an LRU cache and explain its complexity? | Coding |
I'm new to TypeScript. How would I find duplicate elements in an array? | Coding |
Bash: convert a string to snake_case | Coding |
I'm new to C#. How would I implement bubble sort? | Coding |
Can you help me debounce a function call using PowerShell? | Coding |
explain how to walk a directory tree recursively in Rust, with an example. | Coding |
Need Haskell code to merge two sorted arrays — keep it minimal. | Coding |
Need Perl code to serialize a class to JSON — keep it minimal. | Coding |
What's the most efficient way to paginate a list of results in Perl? | Coding |
Write an Ansible playbook to install nginx on Ubuntu. | Coding |
How do I sort a dictionary by value in Python? | Coding |
Explain what this regex does: ^(?=.*[A-Z])(?=.*\d).{8,}$ | Coding |
What is the difference between npm install and npm ci? | Coding |
Write a pytest fixture that creates a temporary database. | Coding |
Explain how to count vowels in a string in TypeScript, with an example | Coding |
Create a login form with validation using React and plain CSS. | Coding |
What's the best way to structure a large Python project? | Coding |
Need Elixir code to compute a SHA-256 hash — keep it minimal. | Coding |
What's the idiomatic way to group items by a key in Ruby? | Coding |
Write a Python function to call an API and cache the response for 10 minutes. | Coding |
Could you show a Go implementation to group items by a key and explain its complexity | Coding |
How do I handle errors with Result in Rust? | Coding |
Build a command-line expense tracker in Python that stores entries in a JSON file and lets me filter by month. | Coding |
Explain how to rotate a matrix 90 degrees in Ruby, with an example. | Coding |
Give me a Ruby snippet that can detect a cycle in a directed graph | Coding |
What is the difference between a shallow copy and a deep copy in Python? | Coding |
Write a Perl function to convert Celsius to Fahrenheit. | Coding |
Could you show a Bash implementation to implement binary search and explain its complexity | Coding |
What's the idiomatic way to retry a request with exponential backoff in JavaScript? | Coding |
Give me the solution for the maximum subarray problem (Kadane's algorithm). | Coding |
can you help me send an HTTP POST request using C? | Coding |
How do I tokenize text with the Hugging Face transformers library? | Coding |
Implement a rate limiter middleware for Express. | Coding |
Show me Haskell code to implement an LRU cache. | Coding |
How do I create an index in PostgreSQL and how do I know it's being used? | Coding |
Write a function in Haskell that computes the nth Fibonacci number with memoization. | Coding |
Could you show a Haskell implementation to generate a UUID and explain its complexity? | Coding |
How do I use async/await in Python? | Coding |
Write a Python generator that yields prime numbers indefinitely. | Coding |
python read csv into dict | Coding |
write a unit test for a function in Swift | Coding |
Refactor-friendly Python example: deep clone an object | Coding |
How would you architect a rate-limited job queue in Python using Redis, with retries and dead-letter handling? | Coding |
Refactor-friendly Java example: check whether a number is a power of two | Coding |
What's the most efficient way to write a unit test for a function in Perl? | Coding |
Write a docker-compose file with a Flask app and a Postgres database. | Coding |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.