Searching the best prompts from our community
Most saved prompts this week
Act as a senior software engineer. Take the following code snippet and refactor it for better readability, performance, and maintainability. Explain the changes you made and why.
Take the following poorly formatted C# code and format it according to standard C# coding conventions. Ensure consistent indentation, spacing, and brace style. Point out the specific changes you made.
Access multiple LLMs via OpenRouter. Benefits: 1. Single API for 50+ models. 2. Cost comparison across models. 3. Fallback to alternative models. 4. Real-time model availability. 5. Usage analytics dashboard. 6. OpenAI-compatible API. 7. Free models available. 8. Model routing based on performance. ...
Explain how `async` and `await` work in JavaScript for handling asynchronous operations. How do they differ from using `.then()` with Promises? Provide a code example that fetches data from an API, first using Promises with `.then()` and then refactored to use `async/await`.
Master Facebook Ads targeting. Tactics: 1. Core audiences (demographics, interests, behaviors). 2. Custom audiences (website visitors, customer list). 3. Lookalike audiences from best customers. 4. Interest layering for precision. 5. Exclude converters to avoid waste. 6. Campaign Budget Optimization...
A giant, stylized ocean wave in the Japanese Ukiyo-e woodblock print style. The wave is about to crash down on a small fishing boat. Mount Fuji is visible in the background under a dramatic sky. Art style inspired by Hokusai's "The Great Wave off Kanagawa". Stylized, Japanese art, iconic.
A colossal, ancient tree of life, its branches reaching up to touch the cosmos and its roots digging deep into the earth. The leaves are made of glowing, ethereal light, and the bark has intricate, glowing patterns. The stars and a nebula are visible through its branches. Mystical, spiritual, fantas...
Analyze the following PHP code snippet for common security vulnerabilities like SQL Injection, Cross-Site Scripting (XSS), or Insecure Direct Object References. Explain where the vulnerabilities are and how to fix them.
I have a slow-running SQL query. Here is the query: [paste query here]. And here is the table schema: [paste schema here]. Analyze the query and suggest ways to optimize it. Consider adding indexes, rewriting the query, or denormalizing the data.
A digital painting of a bustling Parisian street cafe in the style of Impressionism. Loose, visible brushstrokes capture the fleeting moment. People are sitting at outdoor tables, and a waiter is rushing by. The light is soft and dappled, reflecting off the wet street after a brief shower. Art style...
Explain the "Singleton" design pattern. What problem does it solve? Provide a code example of how to implement it in Java or Python. Discuss its pros and cons, and when it is appropriate to use.
Let's code together. I want to build a simple command-line to-do list application in Node.js. Let's start by outlining the features. Then, you can help me write the code for adding a new task. I will ask questions as we go.
Analyze the following HTML snippet for web accessibility (a11y) issues. Identify problems related to semantic HTML, ARIA attributes, color contrast, and keyboard navigation. Suggest fixes to make the component more accessible to users with disabilities.
A magical forest at night where everything is bioluminescent. Giant, glowing mushrooms of various shapes and colors illuminate the scene. The ground is covered in glowing moss, and the air is filled with sparkling spores. Strange, gentle creatures wander through the woods. Ethereal, fantasy, vibrant...
A serene Japanese garden at night, illuminated by paper lanterns. A gentle breeze causes cherry blossom (sakura) petals to fall like snow. A stone path leads to a traditional wooden pagoda in the background. The full moon is reflected in a still koi pond. Magical, tranquil, beautiful, anime art styl...
Build security into product development lifecycle (secure SDLC). Security requirements: 1. Authentication: multi-factor authentication, password policies. 2. Authorization: role-based access control, principle of least privilege. 3. Data protection: encryption at rest/transit, tokenization of sensit...
A dilapidated, haunted Victorian mansion on a hill under a full moon. The windows are dark and broken, and twisted, leafless trees surround the property. A thick fog creeps across the ground. A faint, ghostly light flickers in one of the top windows. Spooky, atmospheric, gothic horror, detailed.
Master async programming. Patterns: 1. async/await for readability. 2. Promise.all for parallel execution. 3. Promise.allSettled for all results. 4. Promise.race for timeout handling. 5. Try/catch for error handling. 6. Avoid callback hell. 7. Handle unhandled rejections. 8. Sequential vs parallel t...
An abstract explosion of color and form representing the sound of a symphony orchestra. Swirling lines, geometric shapes, and vibrant splashes of paint visualize the harmony, rhythm, and emotion of music. A dynamic composition with a sense of movement and energy. Abstract expressionism, inspired by ...
Full-body character concept art of a charismatic female space pirate captain. She has a cybernetic arm, a long leather coat over high-tech armor, and an exotic alien pet parrot on her shoulder. She stands confidently on the bridge of her spaceship, with a nebula visible through the viewport. Detaile...
I need to store a collection of items where I will frequently be adding new items and searching for existing items. The order of items does not matter. What is the most appropriate data structure to use (e.g., Array, Linked List, Hash Table, Tree)? Explain the trade-offs and why your choice is the b...
A colossal, ancient alien monolith covered in glowing, intricate glyphs, standing in the middle of a desolate desert on a foreign planet. Two suns set on the horizon, casting long, dramatic shadows. The monolith seems to hum with power. A tiny, lone astronaut stands at its base, looking up in awe. S...
Design a GraphQL schema for a blog application. The schema should define types for Author, Post, and Comment. Include queries to fetch all posts, a single post by ID, and all posts by a specific author. Also, include mutations for creating a new comment.
Deliver a compelling product demo that sells. Structure: 1. Set context (recap their pain points). 2. Show the 'aha moment' first (most valuable feature). 3. Walk through their specific use case. 4. Highlight differentiators vs competitors. 5. Address concerns proactively. 6. End with clear next ste...
Handle customization requests. Response: 1. Confirm customization options available. 2. Explain customization process. 3. Provide pricing for custom work. 4. Show examples of previous customizations. 5. Outline additional lead time. 6. Clarify return policy for custom items. 7. Request detailed spec...
Write a simple Bash script that iterates through all the `.txt` files in the current directory and prints the first line of each file. The script should handle cases where no `.txt` files are found.
I'm getting the following error message in my browser console: "Uncaught TypeError: Cannot read properties of undefined (reading 'map')". Explain what this error means in simple terms, what are the common causes for it, and how I can go about debugging it in my JavaScript code.
Act as a peer reviewer for my code. I will provide a pull request link or a code snippet. Please review it for potential bugs, style inconsistencies, performance issues, and security vulnerabilities. Provide constructive feedback and suggest specific improvements.
Design a basic CI/CD pipeline using GitHub Actions for a Python web application. The pipeline should be triggered on a push to the main branch. It should include steps for installing dependencies, running linters, executing unit tests, and deploying the application to a staging environment.
A beautiful, swirling nebula and galaxy with stars and planets contained inside a small, antique glass jar. The jar is sitting on a wooden table. The galaxy inside is glowing brightly, casting a magical light into the room. Conceptual, magical, detailed, fantasy.
A miniature, detailed diorama of a lush forest ecosystem inside a clear glass lightbulb. There are tiny trees, a small river, and miniature animals. The filament of the lightbulb is glowing like a sun over the tiny world. Macro photography, creative, conceptual, detailed.
Implement Scrum framework. Elements: 1. Product backlog (prioritized list). 2. Sprint planning (2-4 week sprints). 3. Daily standups (15 min sync). 4. Sprint review (demo to stakeholders). 5. Sprint retrospective (team improvement). 6. Roles (Product Owner, Scrum Master, Team). 7. Burndown charts. 8...
A modern remix of 'The Starry Night'. The prompt applies Van Gogh's iconic thick impasto swirls to a futuristic space station orbiting Saturn. Details: 1. Vibrant yellow and blue color palette. 2. Swirling gas clouds and neon rings. 3. Hand-painted brushstroke texture. 4. Dynamic, energetic composit...
A cozy, inviting reading nook by a large window. Rain streaks down the glass, and the view outside is a blurry, wet cityscape. A comfortable armchair is piled with soft blankets and pillows. A steaming mug of tea and an open book rest on a small wooden table. A cat is sleeping on the rug. Warm, soft...
I have an old JavaScript codebase that uses ES5 syntax (var, function declarations). Help me modernize it to ES6+ syntax (let/const, arrow functions, classes). Take the following ES5 code and rewrite it using modern JavaScript features.
Build customer feedback system. Loop: 1. Collect feedback (surveys, interviews, support tickets, usage data). 2. Analyze and categorize. 3. Prioritize based on impact and frequency. 4. Act on insights (product changes, process improvements). 5. Close the loop (tell customers what changed). 6. Measur...
A lone survivor in ragged clothes stands on the edge of a ruined skyscraper, looking out over a desolate, overgrown city. The sky is a hazy orange from dust and pollution. Vines and nature have reclaimed the crumbling buildings. The survivor has a backpack and is holding a staff. Cinematic, moody, a...
I am starting a new web project. It will be a highly interactive single-page application (SPA) with real-time data updates. Compare and contrast React, Vue, and Angular for this project. Recommend one and justify your choice based on performance, learning curve, ecosystem, and scalability.
Create a regular expression to validate a strong password. The password must be at least 8 characters long, contain at least one uppercase letter, one lowercase letter, one number, and one special character (e.g., !, @, #, $). Explain the different parts of the regex.
I have a bug in my Python code. The function is supposed to calculate the factorial of a number, but it's returning an incorrect result for inputs greater than 5. Here is the code: [paste code here]. Help me find and fix the bug.
Develop culturally sensitive creative campaigns for global markets while maintaining brand consistency. Cultural research framework: 1. Color significance: red = luck (China) vs. danger (West), white = purity vs. mourning. 2. Symbolism awareness: hand gestures, religious imagery, cultural icons with...
An incredibly delicious-looking gourmet cheeseburger, professional food photography style. A juicy, thick patty with melted cheddar cheese, fresh lettuce, ripe tomatoes, and crispy bacon, all in a toasted brioche bun. The burger is on a rustic wooden board next to a pile of golden french fries. Soft...
I accidentally committed sensitive data to my last commit and pushed it to the remote repository. What are the Git commands I need to use to completely remove the sensitive file from the repository's history? Explain each step of the process.
Complete guide to smoking a 14lb whole packer brisket. Process: 1. Trim to 1/4 inch fat cap. 2. Season with coarse salt and 16-mesh black pepper (50/50 ratio). 3. Smoke at 250°F with post oak wood. 4. Monitor internal temp until 165°F (4-6 hours). 5. Wrap in butcher paper at stall. 6. Cook to 203°F ...
A sleek, humanoid robot butler designed in the Art Deco style. The robot is made of polished chrome and gold, with geometric patterns and elegant curves. It is holding a silver tray with a cocktail on it, standing in a luxurious 1920s penthouse apartment with a city view. Elegant, retro-futuristic, ...
A vibrant, bustling underwater kingdom built from living coral. Bioluminescent structures in shades of pink, purple, and blue illuminate the city. Merfolk with iridescent tails swim through the coral archways. Schools of exotic, glowing fish dart through the scene. Sunken ruins are visible in the ba...
Traditional napa cabbage kimchi fermentation. Phase 1: Brine cabbage in 10% salt solution for 6-12 hours. Phase 2: Make paste with gochugaru, fish sauce, garlic, ginger, glutinous rice porridge. Phase 3: Coat cabbage leaves thoroughly. Phase 4: Pack in clean jar, leave 1-inch headspace. Phase 5: Fer...
Write a set of unit tests for the following JavaScript function, which takes an array of numbers and returns the sum. Use a testing framework like Jest. Cover edge cases like an empty array, an array with non-numeric values, and a very large array.
A surreal, dreamlike landscape with colossal islands floating in a pastel-colored sky. Waterfalls cascade from the edges of the islands into the clouds below. Bizarre, bioluminescent flora and fauna inhabit the islands. A giant, translucent moon hangs in the sky. Art style inspired by Salvador Dalí ...
Provide installation assistance. Guide: 1. Assess customer's technical skill level. 2. Provide step-by-step instructions. 3. Include visual aids (photos, videos, diagrams). 4. List required tools and materials. 5. Highlight safety precautions. 6. Troubleshoot common installation issues. 7. Offer pro...