PromptsVault AI is thinking...
Searching the best prompts from our community
Searching the best prompts from our community
Most saved prompts this week
Generate documentation for the following TypeScript function in JSDoc format. The function accepts a user object and returns a formatted greeting string. Make sure to document the parameters, their types, and the return value.
The interior of a derelict, abandoned space station orbiting a distant planet. Wires hang from the ceiling, and emergency lights flicker. There is zero gravity, so debris and objects float in the air. A view of a beautiful, ringed planet is visible through a large, cracked window. Sci-fi horror, atmospheric, moody, detailed.
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.
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.
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 inspired by Monet and Renoir.
A minimalist Zen garden on a platform floating in the vastness of space. A single, gnarled bonsai tree grows from white sand, which is raked in perfect circles. Nebulae and distant galaxies are visible in the background. The Earth is a small, blue marble in the distance. Serene, tranquil, minimalist, sci-fi, high resolution.
A classic film noir scene. A hardboiled detective in a fedora and trench coat sits in his dark, smoky office late at night. Light from the window blinds casts dramatic shadows across the room. He is looking at a case file on his desk. Black and white, high contrast, moody, atmospheric, 1940s aesthetic.
Debate the pros and cons of using an Object-Relational Mapper (ORM) like SQLAlchemy or TypeORM versus writing raw SQL queries. Discuss aspects like developer productivity, performance, security, and database abstraction. In what scenarios would you strongly prefer one over the other?
The colossal, golden gates of Valhalla in Asgard, shimmering in divine light. The gates are guarded by powerful Valkyries in winged helmets. The Bifrost bridge, a rainbow of light, leads up to the entrance. Epic, mythological, fantasy, Norse mythology.
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, fantasy, epic scale.
I have a computationally expensive task in my web app that is blocking the main UI thread. Show me how to offload this task to a Web Worker. Provide the code for the main script that creates the worker and the code for the worker script itself (`worker.js`) that performs the calculation and sends the result back.
I have a function that accepts a parameter which can be a `string` or a `number`. Write a custom type guard in TypeScript to check if the variable is a `string`. Then, show how to use this type guard within an `if` statement to safely access string-specific properties.
An ancient, magical library hidden deep within an enchanted forest. The library is built into a colossal, moss-covered tree. Sunlight filters through the canopy, creating god rays that illuminate floating, glowing books and swirling dust motes. Bookshelves are carved into the wood, filled with leather-bound tomes. A wise, old elf is reading at a rustic wooden desk. Ethereal, magical, fantasy art, detailed, volumetric lighting.
Explain the difference between `std::unique_ptr`, `std::shared_ptr`, and `std::weak_ptr` in modern C++. When should each one be used? Provide a code example demonstrating a common use case for `std::shared_ptr` to manage a shared resource.
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.
A majestic phoenix rising from a pile of ashes, its wings made of brilliant fire and embers. The bird is mid-cry, spreading its wings for the first time. The background is dark, making the fiery colors of the phoenix pop. Sparks and flames swirl around it. Epic, fantasy, dynamic, glowing.
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 style, Makoto Shinkai inspired.
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.
Explain the "Single Responsibility Principle" (SRP) from the SOLID principles of object-oriented design. Provide a simple "before" code example in C# or Java that violates SRP, and then show an "after" example that refactors the code to adhere to the principle.
Explain the concept of Protocol-Oriented Programming (POP) in Swift. How does it differ from traditional Object-Oriented Programming (OOP)? Provide an example of how you can use protocol extensions to provide default implementations for methods.
Generate a SQL schema for a simple e-commerce website. It should include tables for Products, Customers, Orders, and Order_Items. Define the columns for each table, specify data types, and set up primary and foreign key relationships.
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. Detailed character design, sci-fi, concept art.
A vibrant, bustling market in a fantasy city where the stalls are on boats floating on a network of canals. People from various fantasy races (elves, dwarves, orcs) are bartering and shopping. The architecture is a mix of Venetian and fantastical styles. Colorful banners and lanterns hang everywhere. Lively, detailed, fantasy, world-building.
Generate the YAML for a basic Kubernetes Deployment and Service. The Deployment should run 3 replicas of the `nginx:alpine` image. The Service should expose the Nginx deployment on port 80 using a `ClusterIP`.
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í and Hayao Miyazaki. Whimsical, imaginative, high detail.
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.
Analyze the time complexity (Big O notation) of the following Python function, which checks if an array contains duplicate values. Explain your reasoning step-by-step. `def has_duplicates(arr): for i in range(len(arr)): for j in range(i + 1, len(arr)): if arr[i] == arr[j]: return True; return False`
Design an intricate steampunk mechanical device. Components: 1. Victorian-era brass gears and cogs. 2. Copper pipes with steam vents. 3. Analog gauges and pressure meters. 4. Riveted metal panels. 5. Warm sepia and bronze tones. 6. Technical blueprint annotations. Style: highly detailed, industrial, retro-futuristic. Add weathering and patina for authenticity. Perfect for game assets, concept art, or alternative history illustrations. Render in 3D or detailed 2D illustration.
Rewrite the following imperative JavaScript code, which uses a for-loop to double every number in an array, into a functional style. Use higher-order functions like `map`. Explain the benefits of the functional approach, such as immutability and readability.
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 Kandinsky, high energy.
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`.
A mind-bending, indescribable cosmic horror entity emerging from a tear in reality. It is a being of impossible geometry, tentacles, and countless eyes, floating against a backdrop of dying stars. The image should evoke a sense of dread and insignificance. Lovecraftian horror, dark, surreal, abstract.
Compare and contrast the microservices architecture with the monolithic architecture. Discuss the pros and cons of each in terms of development, deployment, scalability, and complexity. For a new, small-scale e-commerce startup, which architecture would you recommend and why?
Simulate a technical interview for a junior front-end developer position. Ask me questions about HTML, CSS, JavaScript, and a framework like React. Start with a simple coding challenge, like reversing a string.
I need to design a RESTful API for a social media application. The resources are Users, Posts, Comments, and Likes. Design the endpoints, including HTTP methods, URL structure, and request/response payloads. Provide examples for creating a new post and fetching comments for a post.
An elegant illustration of a goddess of nature in the Art Nouveau style. Her long, flowing hair is intertwined with vines, flowers, and leaves. She is surrounded by animals of the forest. The composition features intricate, organic lines and decorative patterns. Art style inspired by Alphonse Mucha. Beautiful, detailed, elegant.
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, high-end, sharp focus.
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.
The interior of the last bookstore on Earth, a cozy, cluttered haven in a post-apocalyptic wasteland. The shelves are overflowing with books, and warm light from lamps creates a welcoming atmosphere. Outside the reinforced window, a desolate, dusty landscape is visible. Hopeful, atmospheric, detailed.
A lone samurai warrior in full armor stands in a dense bamboo forest. He is holding a katana, ready for battle. The light is filtering through the tall bamboo stalks, creating a pattern of light and shadow on the ground. The atmosphere is tense and quiet. Cinematic, detailed, Japanese aesthetic.
A detailed isometric illustration of a magical castle floating in the sky. The castle has many towers, bridges, and gardens. A waterfall flows from the base of the floating island. The style is clean, with a vibrant color palette, suitable for a strategy game. Isometric, low-poly, fantasy, game art.
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 specifications. 8. Assign point of contact for project. Turn inquiry into personalized sale.
A narrow, rain-slicked alleyway in a futuristic cyberpunk city. Towering skyscrapers with holographic advertisements create a vibrant, neon-drenched canopy. Reflections of pink, blue, and purple neon signs shimmer on the wet pavement. A lone figure in a trench coat stands in the shadows, steam rising from a nearby vent. Moody, cinematic, high contrast, Blade Runner aesthetic, photorealistic.
A surreal portrait of a woman whose face and hair are composed entirely of a beautiful arrangement of different types of flowers and leaves. The colors are vibrant and harmonious. The background is a simple, dark color to make the portrait stand out. Creative, beautiful, surreal, detailed.
Act as a Head of Product. I have a list of 20 potential features for our next quarterly roadmap. Our key business goals are to increase user retention and expand into a new market segment. Use a prioritization framework like RICE (Reach, Impact, Confidence, Effort) or MoSCoW (Must-have, Should-have, Could-have, Won't-have) to help me decide which features to focus on. Explain your reasoning.
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.
Apply Challenger methodology for high-value sales. Three principles: Teach, Tailor, Take Control. Teach: provide unique insight prospect doesn't know. 'Industry data shows companies like yours overspend 30% on [area] due to [reason].' Share provocative perspective that reframes their thinking. Tailor: customize message to stakeholder (CFO cares about costs, CTO cares about efficiency). Take Control: confidently push back when needed. 'I'd recommend postponing that feature discussion until we align on strategy.' Structure: 1. Warm up (build credibility). 2. Reframe (teach insight). 3. Rational drowning (overwhelming data). 4. Emotional impact (personalize consequences). 5. New way (your solution). 6. Your solution (specifics). Works best for complex, high-consideration sales.
What is Dependency Injection (DI)? How does it help in creating loosely coupled and more testable code? Provide a simple "before" and "after" code example in Java or C# that demonstrates the concept of constructor injection.
A magnificent dragon whose scales are made of jagged, translucent ice. It is perched on the peak of a frozen mountain, exhaling a cloud of frost. The northern lights (aurora borealis) dance in the sky behind it. The landscape is covered in snow and ice. Epic fantasy, majestic, cold, detailed.