Coding
814 prompts available
Advanced Dog Breeding Script
Create a fully immersive, advanced dog breeding script for a GTA-based game environment that includes the following features: - **Life-like Simulation:** Dogs should exhibit realistic behaviors, aging, breeding cycles, and health. - **Player-Owned Job Function:** Allow players to own and manage the dog breeding job, including breeding, raising, and selling dogs. - **Decorated Shop Menu:** Design a visually appealing and user-friendly shop menu where players can list and sell dogs to other players. - **Dog Peds Integration:** Utilize dog pedestrian models familiar to GTA and provide configurable options to add new dog pet models easily. - **Companion System:** Implement a life and companion system enabling pets to follow player commands such as stay, follow, fetch, and perform tricks. The script should be highly configurable, allowing adjustments of breeding parameters, pet behaviors, shop settings, and commands. Ensure modular code to enable future expansions. # Steps 1. Define dog entities with attributes like breed, age, health, temperament, and genetics. 2. Implement breeding logic including mate selection, gestation period, and puppy characteristics. 3. Create player job system managing tasks: breeding, care, training, and sales. 4. Design and integrate an interactive shop menu with options to browse, price, and sell dogs. 5. Incorporate dog peds from GTA assets and allow adding new models via configuration files. 6. Build companion AI to follow player commands with responsive animations and behaviors. 7. Add configuration files for all adjustable parameters. 8. Test for realism, performance, and player engagement. # Output Format Provide the complete well-documented source code for the script, configuration files, and shop menu assets. Include instructions on installation, customization, and usage. Use modular, clean coding practices with comments explaining key functions.
Add Trailing Semicolons
Add a trailing semicolon (;) to the provided EA code without altering its existing logic. Ensure that the only modification you make is appending semicolons where they are missing at the end of statements. Do not change any variable names, logic flows, or code functionality. # Steps - Carefully review each line of the EA code. - Identify any statements or expressions missing a trailing semicolon. - Append a semicolon to those statements, ensuring the rest of the code remains unchanged. # Output Format Provide the entire EA code with the trailing semicolons added as needed, preserving the original formatting and indentation. # Notes - Only add semicolons to the ends of statements if they are missing. - Do not modify comments, whitespace, or any other code elements. - Confirm that the logic and functionality of the EA remain exactly as in the original.
Advanced Dynamic Webscraping
You are a senior Python developer and expert in web scraping tasked with creating a professional, production-ready Python script to extract all relevant, structured data from the dynamic website https://agents.sabrina.dev/ and export it into a well-organized CSV file. Your solution must: 1. **Data Extraction Requirements:** - Identify and extract all structured data elements visible on the site, including agent names, IDs, performance metrics, and any associated metadata. - Because the site dynamically loads data (as indicated by dynamic content analysis), use Selenium or other browser automation to render JavaScript content fully. - Handle any pagination, infinite scroll, or dynamic loading mechanisms to ensure complete data coverage. - Respect the robots.txt and website’s terms of service; the robots.txt currently allows scraping. - Implement robust error handling covering network issues, element detection failures, and potential rate limiting. 2. **Data Structuring:** - Clean, normalize, and standardize the data, handling missing or null values appropriately. - Organize extracted data into clear, logical columns with descriptive headers. - Preserve any hierarchical or relational aspects of the data present on the website. 3. **Technical Implementation:** - Use Python with libraries such as Selenium for scraping dynamic content, BeautifulSoup for HTML parsing, requests (if needed), and pandas for data organization. - Implement session management if login/authentication is required (currently not indicated). - Mimic human browsing with randomized delays and appropriate HTTP headers. - Write clear, modular, and well-commented code maintaining professional coding standards. 4. **Output Requirements:** - Export the data as a UTF-8 encoded CSV file suitable for analysis. - Include a timestamp or version tag in the output filename to track scrape versions. 5. **Documentation & Maintainability:** - Provide concise inline comments explaining key code sections. - Include instructions or notes on configuring or customizing the script for future modifications. # Steps - Inspect the target website’s DOM structure after full page load using Selenium. - Identify containers or cards representing each agent’s data. - Loop through all dynamically loaded content/pages to extract data. - Normalize and validate extracted fields. - Store results in a pandas DataFrame. - Export DataFrame to CSV with timestamp. - Add logging and try-except blocks to handle exceptions and retries. # Output Format - A fully functional Python script file (.py) implementing the above requirements. - The script outputs a UTF-8 encoded CSV file with timestamped filename. - The script includes clear comments and instructions. # Notes - No login/authentication appears required but prepare code structure for easy extension. - Because static content analysis shows no direct tables or JSON-LD, rely on Selenium to capture dynamic content. - Respect robots.txt which permits scraping. - Use human-like browsing patterns to avoid rate-limiting or blocking. Your final response should be the complete, best-practice Python script and associated documentation to enable robust, maintainable, and comprehensive scraping of https://agents.sabrina.dev/.
Advanced BLIP Manager
Create an advanced BLIP marker manager script specifically for an ESX Legacy FiveM server environment. The script should efficiently handle multiple types of BLIP markers on the game map and allow dynamic creation, updating, and removal of markers based on game events and player interactions. Requirements: - Compatibility with ESX Legacy framework. - Support for different BLIP types (e.g., mission objectives, points of interest, player locations). - Ability to customize BLIP icons, colors, sizes, and visibility conditions. - Dynamic updating of BLIP markers in response to server events, player actions, or coordinates changes. - Efficient management to avoid performance issues when handling a large number of BLIPs. - Proper synchronization between server and clients to reflect real-time changes. - Well-structured, clean, and commented code. Steps: 1. Set up a Lua script compatible with FiveM and ESX Legacy. 2. Define a data structure to manage all BLIP markers with their properties. 3. Implement functions to add, update, and remove BLIPs dynamically. 4. Create event handlers for server-side and client-side triggers to manage BLIP lifecycle. 5. Optimize performance for large numbers of BLIPs. 6. Test the script with multiple players to ensure synchronization works correctly. Output Format: Provide the complete Lua script file content with relevant comments explaining the purpose of each function and code block. Icons: CodeBracketIcon Category: programming Tags: [FiveM, ESX, Lua, Blip Management] Name: Advanced BLIP Manager Short Description: A comprehensive BLIP marker manager script for ESX Legacy FiveM servers. Should Index: true
Add Trailing SL Inputs
You are tasked with modifying an existing Expert Advisor (EA) for MetaTrader 5 (MT5) by adding specific input parameters related to trailing stop loss (trailing SL) functionality, without changing any existing code or logic. Specifically, you need to add inputs that allow the user to: - Set a trailing stop loss only after the entry point with a specified number of pips. - Enable the option to have no trailing stop loss after the entry point if the user selects zero or disables it. Important: - Do not alter any existing code or logic in the EA. - Only add the necessary input parameters and implement the trailing stop loss feature according to the user's selection. - Maintain the original behavior and structure of the EA. # Steps 1. Analyze the EA code to identify where input parameters are declared. 2. Add input parameters for trailing stop loss pips and enable/disable option. 3. Implement the trailing stop loss functionality triggered only after the entry point, based on the inputs. 4. Ensure no impact on existing trading logic or other functionalities. 5. Validate that if the trailing stop loss input is set to zero or disabled, the EA does not apply any trailing stop. # Output Format Provide the modified section of the EA code with the new input parameters and the minimal code additions or modifications needed to incorporate the trailing stop loss as described. Clearly comment the added code for clarity. Preserve original code formatting and structure, focusing strictly on additions relevant to the trailing stop loss inputs.
Add Trailing Stop Loss
Add trailing stop loss (SL) in this Expert Advisor (EA) to avoid slippage. Please help implement a trailing stop loss mechanism in an existing Expert Advisor trading script to minimize or avoid slippage during trades. Provide a detailed explanation of how the trailing stop loss works and ensure the code is clear, efficient, and follows best practices for trading automation. # Steps 1. Understand the existing EA code that currently lacks trailing stop loss. 2. Implement the trailing stop loss feature with adjustable parameters. 3. Explain how trailing stop loss helps in reducing slippage. 4. Provide example code snippets or functions that can be integrated into the EA. # Output Format Provide the enhanced code snippet or functions in the appropriate EA scripting language (such as MQL4 or MQL5), along with clear comments explaining the logic. Also include a brief explanation of how the trailing stop loss works to avoid slippage.
Advanced Bubble Shooter
Create an advanced Bubble Shooter game with enhanced features and gameplay mechanics. The game should include the following elements: - Classic bubble shooting mechanic with aiming and shooting bubbles upward to match and pop groups of three or more bubbles of the same color. - Multiple bubble colors with increasing complexity. - Advanced aiming system that shows a trajectory preview of the bubble's path before shooting. - Power-ups and special bubbles with unique effects (e.g., bombs, color changers, lightning bubbles). - Levels with increasing difficulty, including different bubble layouts and challenges. - Scoring system tracking points for popped bubbles and combos. - Animations and smooth graphics for bubble movements and popping effects. - User interface elements such as score display, level indicator, and remaining bubbles count. - Sound effects and background music for an engaging experience. Provide a clear, well-structured code or detailed pseudocode implementing these features, ensuring readability and extensibility. # Steps 1. Set up the game board with a grid or layout of bubbles. 2. Implement the bubble shooting mechanics with mouse or touch controls. 3. Add trajectory preview feature for aiming assistance. 4. Create bubble matching logic to detect and pop groups. 5. Introduce special bubbles and power-ups with their effects. 6. Develop level progression with increasing difficulty. 7. Implement scoring and combo tracking. 8. Add animations and visual effects. 9. Include sound effects and music. 10. Build a user interface displaying score, level, and controls. # Output Format Provide the complete source code or detailed pseudocode for the advanced Bubble Shooter game, accompanied by brief explanations of key components and features.
Advanced E-commerce Site
Create an advanced e-commerce website using HTML5, the latest versions of CSS, JavaScript, and React. The entire codebase must be open-sourced to enable community development and collaboration. Animate all interactive buttons to improve user experience. The website must include these key features: Frontend (User Interface): - Homepage: - Section highlighting popular products and special offers. - Banner with high-quality images representing the brand. - Product Catalog: - Product categories such as suits, dresses, shirts, pants, and accessories. - Filtering and sorting capabilities by price, size, color, and material. - Product Detail Pages: - Detailed product images. - Descriptions covering material, cut, and style. - Options for selecting sizes and colors. - Shopping Cart: - Quick add and remove product functionality. - Automatic updates to total amounts. - Checkout: - One-page simplified payment process. - Support payment methods: credit card, PayPal, and cash on delivery. - Authentication and User Accounts: - User order history management. - Save delivery addresses. - Wishlist feature for user-selected products. - Integrated Blog: - Articles on classic fashion, trends, and style guidance. # Steps 1. Set up a React project environment with modern tools and dependencies. 2. Structure the project folders and files logically, focusing on scalability and maintainability. 3. Implement the homepage layout, integrating featured popular products and special offers. 4. Build the product catalog incorporating categories along with filtering and sorting mechanisms. 5. Develop comprehensive product detail pages showcasing images, detailed info, and selection options. 6. Create a dynamic shopping cart with user-friendly add/remove controls and real-time amount updates. 7. Implement a streamlined checkout page supporting specified payment options. 8. Develop user authentication and account features including order history, address book, and wishlist. 9. Add a blog section capable of displaying and managing fashion-related articles. 10. Animate all buttons uniformly with smooth and performant hover effects. 11. Ensure the entire project is published openly with a permissive open-source license. # Output Format Provide the entire codebase with clear, detailed documentation explaining how each feature is implemented. Include instructions for setup, running, and deployment of the application. List all dependencies and libraries used with versions. Specify the open-source license (e.g., MIT, Apache 2.0) chosen for the project. If available, include a demo URL showcasing the live website's functionality. # Examples - Homepage banner snippet: ```html <div class="homepage-banner"> <img src="banner-image.jpg" alt="Brand Banner"> <h1>Welcome to Our Store</h1> </div> <button class="animated-button">Shop Now</button> ``` - Product catalog filter function: ```javascript function filterProducts(criteria) { return products.filter(product => { return criteria.every(criterion => product[criterion.type] === criterion.value); }); } ``` - Animated button CSS: ```css .animated-button { transition: transform 0.3s ease, background-color 0.3s ease; } .animated-button:hover { transform: scale(1.05); background-color: #ffd700; } ``` # Notes - Prioritize user interface design to maximize engagement. - Ensure animations are smooth and do not degrade performance. - Guarantee cross-browser compatibility and responsive design for mobile devices. - Incorporate SEO best practices for improved search engine visibility.
Add Transaction Route in Nav
Implement a new feature in the Navigation bar that allows users to open a route formatted as `/transaction/:typeId/add`, where `typeId` is a dynamic variable representing the transaction type. This route should utilize the `typeId` to prefill or display relevant information about the transaction type when adding a new transaction. # Requirements - The Navigation bar should contain an interactive element (e.g., a button or dropdown) enabling users to select or trigger the `/transaction/:typeId/add` route. - The `typeId` must be passed dynamically based on user selection or predefined options. - When navigating to `/transaction/:typeId/add`, the page should fetch and display information corresponding to the given `typeId` so that the transaction form is contextually aware of the transaction type. - Ensure proper routing and state management to handle the dynamic `typeId` parameter. # Steps 1. Add a new navigational item or menu in the Navigation bar dedicated to adding transactions. 2. Allow the user to select or specify a `typeId` (could be from a list of transaction types). 3. Programmatically navigate to `/transaction/:typeId/add` route with the selected `typeId`. 4. On the `/transaction/:typeId/add` page, load and display transaction type details corresponding to `typeId`. # Output Format Provide the code implementation snippets or detailed instructions needed to modify the Navigation bar and the routing configuration to support this feature, including any necessary component updates or hooks related to dynamic routing and transaction type data retrieval.
Advanced C# ASP.NET Core MVC Project Outline
Develop a comprehensive project outline for an ASP.NET Core MVC application that uniquely integrates advanced C# features and all key Object-Oriented Programming (OOP) concepts. The project must go beyond common examples and depict a sophisticated, real-world industrial or public utility use case such as e-commerce, healthcare management, or social networking. Your outline should include the following detailed elements: 1. **Use Case Description:** - Define a unique application scenario suitable for industrial or public utility use. - Specify the primary users and the overarching goals of the project. - Explain why it is a compelling choice for demonstrating advanced C# and OOP concepts. 2. **Incorporation of OOP Concepts:** - Clearly show how encapsulation, inheritance, polymorphism, and abstraction are applied across the project. - Discuss their role in improving code organization, extensibility, and maintainability. 3. **Implementation of Advanced C# Features:** - Demonstrate the purposeful use of access modifiers (public, private, protected, internal) to control visibility. - Employ partial classes to organize complex classes logically. - Use static classes and methods where appropriate, justifying their role. - Include sealed classes to prevent inheritance in suitable scenarios. - Integrate generics to create type-safe, reusable components. - Discuss garbage collection considerations within the project’s lifecycle. - Show how loose coupling is achieved to enhance flexibility and ease testing. 4. **Project Structure and Component Relationships:** - Outline the major components (Models, Views, Controllers) with descriptions. - Explain how OOP principles govern their design and interactions. - Illustrate relationships, such as inheritance hierarchies or interface implementations among models or controllers. 5. **Best Practices and Coding Standards:** - Provide recommendations for naming conventions, code organization, documentation, and adherence to SOLID principles. - Suggest structuring of folders and files for clarity and maintainability. - Include guidelines on testing and version control. 6. **Summary of Outcomes:** - Summarize how the project addresses real-world problems effectively. - Emphasize how it showcases the power of C# and ASP.NET Core MVC through advanced features and OOP techniques. Be thorough and analytical, justify every design decision with respect to how it benefits functionality, maintainability, performance, or scalability within the application context. # Output Format Provide the response in a structured, well-organized markdown format with clear headings and bullet points as appropriate. Use concise, precise language suitable for a technical audience aiming to build or learn from this project outline. # Examples Example Use Case: "An Industrial Health Monitoring System for Manufacturing Plants" - Users: Plant engineers, maintenance teams, safety officers. - Features illustrating OOP and C# advanced features: Encapsulated sensor data classes, inheritance for different sensor types, generic repositories for database handling, static utility classes for calculations, sealed classes to lock configurations, partial class extensions. Example Project Structure: - Models: SensorData (base class), TemperatureSensor (inherits SensorData), PressureSensor (inherits SensorData) - Controllers: SensorController (polymorphic handling of sensors) - Views: Real-time monitoring dashboards, alert configuration panels Include such depth and clarity for your unique project.
Advanced E-Commerce Website
Create an advanced e-commerce website using HTML5, the latest versions of CSS, JavaScript, and React. Ensure all code is open-sourced and animate all buttons. The website should include the following key features: **Frontend (User Interface):** - **Homepage:** - Include a section for popular products and special offers. - Feature a banner with high-quality images that reflect the brand. - **Product Catalog:** - Create categories such as suits, dresses, shirts, pants, accessories. - Implement filters and sorting options, including price, size, color, and material. - **Product Detail Pages:** - Display high-quality images. - Provide detailed descriptions covering material, cut, and style. - Offer options for selecting sizes and colors. - **Shopping Cart:** - Enable quick add and remove functionalities. - Ensure automatic updates to total amounts. - **Checkout:** - Simplify the payment process with a one-page checkout. - Offer multiple payment options: credit card, PayPal, cash on delivery. - **Authentication and User Accounts:** - Maintain user order history. - Allow users to save addresses for delivery. - Create a wishlist feature for desired products. - **Integrated Blog:** - Write articles about classic fashion, trends, and style recommendations. **Steps:** 1. Begin by setting up the project environment using React. 2. Organize the project structure for scalability and efficiency. 3. Code the homepage layout implementing features for showcasing popular products and special offers. 4. Develop the product catalog with necessary categorization, filtering, and sorting functionalities. 5. Create detailed product pages inclusive of all necessary product information and options. 6. Build a dynamic shopping cart system with real-time updates and user-friendly add/remove options. 7. Implement a seamless checkout process supporting various payment methods. 8. Set up user account systems for handling order history, address management, and wishlists. 9. Incorporate a blog section supporting informative articles on relevant topics. 10. Animate all interactive elements such as buttons to enhance user experience. 11. Ensure the site is fully open-sourced, available for community development and collaboration. # Output Format Present the completed codebase with documentation on how each feature was implemented and instructions on deploying the application. Include any necessary dependencies or libraries used, and highlight the open-source licensing details. Provide a demo link if possible for demonstrating the website's functionality. # Examples - Homepage snippet: ```html <div class="homepage-banner"> <img src="banner-image.jpg" alt="Brand Banner"> <h1>Welcome to Our Store</h1> </div> <button class="animated-button">Shop Now</button> ``` - Product Catalog function: ```javascript function filterProducts(criteria) { return products.filter(product => { return criteria.every(criterion => product[criterion.type] === criterion.value); }); } ``` - Animated button CSS: ```css .animated-button { transition: transform 0.3s ease, background-color 0.3s ease; } .animated-button:hover { transform: scale(1.05); background-color: #ffd700; } ``` # Notes - Pay special attention to user interface design for enhancing user engagement. - Make sure all animations are smooth and do not interfere with the website’s performance. - Ensure cross-browser compatibility and mobile responsiveness. - Consider SEO best practices for better visibility.
Advanced FiveM ESX Job Creator
Create an advanced FiveM ESX job creator system with the following features: - A sleek, user-friendly UI including prop placement capabilities with gizmo functionality for precise positioning. - An admin-accessible system allowing the creation and management of storage for job crafting stations. - Integration with a sleek menu system that can be incorporated into the default UI menu. - A boss menu specifically designed for managing jobs, ranks, pay, and depositing money, accessible only by users with specific job ranks. - Editable animations associated with crafting items within the job creator framework. Please outline the design architecture, key components, and how these features interact. Provide detailed explanations for implementing the UI elements, gizmo-based prop placement, job and rank management, payment handling, and animation editing. Include best practices to ensure security and smooth user experience for both admins and regular users.