Coding
814 prompts available
Add Teacher Button
You need to add a button named "Teacher" on a dashboard interface that, when clicked, navigates the user to a different specified page. Please provide detailed instructions or code snippets to implement this feature while ensuring clarity and usability. # Steps 1. Identify the dashboard file or component where buttons are defined. 2. Add a new button labeled "Teacher" in the appropriate location on the dashboard. 3. Implement a function or a navigation link for the button that routes the user to the target page. 4. Ensure the button is styled consistently with existing dashboard buttons. 5. Test to confirm that clicking the "Teacher" button correctly redirects to the new page. # Output Format Provide the relevant code snippets (e.g., HTML, JSX, or other pertinent code) or detailed implementation instructions clearly explaining where and how to add the button and set up navigation. # Notes - Specify the framework or language being used if relevant (e.g., React, Angular, plain HTML). - If additional routing or page setup is necessary, include that in the instructions. - Keep accessibility considerations in mind, such as button labels and focus states.
Advanced Admin Menu Script
Create a comprehensive ESX/QBCore script for a FiveM server that implements an advanced admin menu with the most effective and versatile features. This admin menu should include functionalities for banning players, managing roles and permissions, handling player management tasks, enabling trolling or playful control features, and other advanced controls relevant to server administration. Focus on the following aspects: - Compatibility with both ESX and QBCore frameworks. - User-friendly interface for easy navigation of admin tasks. - Secure and effective ban system allowing temporary and permanent bans. - Role management to assign, revoke, and customize admin and moderator privileges. - Player management features such as teleportation, kicking, and viewing player stats. - Fun or trolling controls that allow playful interactions with players without disrupting server stability. - Control features for server settings and player behavior monitoring. # Steps 1. Outline the core features and modules required for the advanced admin menu. 2. Design the interface and control flow ensuring ease of use for admins. 3. Implement backend logic for bans, role management, and player control. 4. Integrate trolling options ensuring they are safe and reversible. 5. Test the script thoroughly on both ESX and QBCore frameworks. # Output Format Provide the full script code in a format ready to be used in a FiveM server with clear comments and instructions for installation and configuration. Include any required dependencies or setup steps in a separate README section within the script file or as an accompanying document. # Notes Ensure adherence to best coding practices for FiveM scripting, security considerations, and scalability for future feature additions. Avoid intrusive or unfair trolling features that can degrade server experience.
Advanced Advent Calendar Script
Create an advanced Advent Calendar script for December 2025 themed around "Venture". The calendar should provide a unique daily experience or reveal for each day from December 1st to December 24th, 2025. Details: - Include a brief, engaging daily message, activity, or challenge related to the "Venture" theme. - The script should support dynamic unlocking: each day becomes available only on or after its calendar date. - Ensure usability for end-users with a clear and intuitive interface or navigation. - Use a format compatible with web or app integration (e.g., JavaScript or Python script) that can reveal daily content appropriately. - Include comments in the code explaining key parts and how to customize the content for each day. Steps: 1. Define the date range and ensure the calendar runs December 1-24, 2025. 2. For each date, create a themed message or activity related to "Venture". 3. Implement date checking to disable future days and enable current/past days. 4. Provide a user interface simulation or code that displays the calendar and daily content. Output Format: - Provide the full script code with comments. - Include sample content for each day demonstrating the "Venture" theme. Example: // December 1, 2025 - "Start your venture by setting a bold goal!" // December 2, 2025 - "Research a potential market opportunity today." Notes: - Focus on creating an engaging experience centered on entrepreneurship, exploration, or adventure fitting the "Venture" theme. - The solution should be easily adaptable for future years or different themes.
Add Test Cases Under ngOnIt
You are tasked with creating additional test cases for a software module. The specific requirement is to add test cases within the test specification (spec) file under the describe block named 'ngOnIt' to cover code that is currently untested. Please follow these instructions: 1. Review the existing spec file to understand the current test coverage and identify the untested code inside the 'ngOnIt' describe block. 2. Create clear, concise, and relevant test cases designed to cover the uncovered code paths. 3. Ensure that the new tests follow the existing style and structure of the spec file. 4. Include any necessary setup, mocks, or data fixtures to exercise the uncovered code effectively. 5. Provide comments or explanations where appropriate to clarify the purpose of each new test. # Output Format Provide only the additional test cases as code snippets suitable to be inserted under the describe('ngOnIt', () => { ... }) block in the spec file. Ensure the code is syntactically correct and consistent with the existing testing framework and style. # Notes - Do not modify any existing test cases. - Do not include the entire spec file, only the new test case code. - If needed, assume typical Angular testing setup conventions. # Examples // Example of a test case to add under the 'ngOnIt' describe block: it('should initialize the user data correctly', () => { // Arrange // ...setup code... // Act component.ngOnInit(); // Assert expect(component.userData).toEqual(expectedUserData); });
Advanced AI Chatbot
Create an advanced AI chatbot in Python that operates without using any API keys or external libraries. The chatbot must feature a user interface (UI) and provide actual chat functionality, enabling dynamic, context-driven conversations without relying on predefined responses. The system should be designed thoughtfully to ensure high-quality interaction and responsiveness as the user engages. # Requirements - Build the chatbot without using any external libraries or API keys. - Implement a graphical user interface (GUI) for user interaction. - Ensure the chatbot can handle dynamic responses based on user input, rather than resorting to predefined answers. - Design the chatbot logic to allow for learning behavior or context awareness if possible. # Steps 1. **Set Up Environment**: Ensure a Python environment is ready for development. Install any necessary tools for GUI development. 2. **Develop GUI**: Design the graphical user interface using built-in libraries like `tkinter`. 3. **Implement Chat Logic**: - Create a method for handling user input and generating responses. - Use techniques such as pattern matching or simple machine learning models to generate dynamic responses. 4. **Testing**: Conduct extensive testing to ensure the chatbot works smoothly and responds appropriately across various scenarios. # Output Format The end product should be a Python script that creates a standalone chatbot application, complete with necessary comments to explain the code structure. The GUI should be intuitive and accessible. # Examples - For user input "What is the capital of France?", the bot should analyze the question and respond with "The capital of France is Paris." - If the user inputs "Tell me a joke", the bot should provide a randomly generated joke, if possible, rather than a predefined one. # Notes - Consider how the bot might learn from interactions to improve future conversations. Depending on the extent of the logic implemented, ensure the performance is optimized without external help or libraries.
Add Text Formatting
Add a text formatting function to the provided content input. The function should enable applying common text styles such as bold, italic, underline, and strikethrough to selected portions of the text. Consider how the formatting can be represented: for example, using markup tags, markdown syntax, or HTML tags. When designing the function, ensure that it: - Accepts raw text input. - Allows specification of which portions of the text to format and how. - Outputs the text with the appropriate formatting applied, maintaining the original text structure. - Handles overlapping formatting correctly and avoids malformed syntax. # Steps 1. Identify the format input method (e.g., by character indices or by selection). 2. Define the formatting markers or tags to be applied. 3. Implement the logic to insert formatting markers at the correct positions. 4. Ensure nested or overlapping formats are properly handled. 5. Return the fully formatted text output. # Output Format Return the text with formatting applied using the chosen markup (e.g., markdown, HTML). # Notes - The implementation should be language-agnostic and focus on the formatting logic. - If multiple formatting types are applied simultaneously, ensure readability and validity of the output. # Examples Input Text: "Hello world" Format: Bold on characters 0-4 Output: "**Hello** world" Input Text: "This is a test" Format: Italic on characters 5-6, Underline on characters 8-9 Output (Markdown does not support underline natively, so HTML can be used): "This *is* a <u>te</u>st"
Add Third MA Trailing SL
Assist in modifying an existing Expert Advisor (EA) for MetaTrader to add a third Moving Average (MA) specifically for trailing stop loss (SL). Details: - Understand the current EA structure and how it uses Moving Averages. - Implement an additional (third) Moving Average that will be used solely to manage the trailing stop loss mechanism. - Ensure the trailing stop loss adjusts dynamically based on the third MA. - Maintain code clarity and comment the new additions appropriately. - Confirm that the modified EA compiles and runs without errors. Steps: 1. Analyze the existing EA code to identify current Moving Averages and trailing stop loss logic. 2. Introduce a third Moving Average with appropriate parameters. 3. Integrate the third MA into the trailing stop loss calculation and adjustment. 4. Test the EA to verify that trailing stop loss behaves as intended with the new MA. 5. Provide commented code snippets illustrating the changes. Output Format: - Provide clear code examples showing the new third MA implementation. - Include comments explaining how the third MA is used for the trailing stop loss. - If applicable, provide explanations or instructions for configuring the new MA settings. Examples: // Example snippet adding a third MA // double ma3 = iMA(NULL, 0, ma3_period, 0, MODE_SMA, PRICE_CLOSE, 0); // Use ma3 to set trailing stop loss Notes: - Ensure compatibility with the existing EA logic. - The third MA should be independent and not affect existing MAs used for entry or exit signals. - The EA is assumed to be written in MQL4/MQL5; specify if needed. Output Format: Provide code snippets with comments and explanations in plain text.
Advanced AI Logic Implementation
Implement a comprehensive AI logic system with state machines, tactical planners, and motion planners for both ground and aerial movements, including kickoff playbooks and rotations. Develop mechanics modules such as aerial maneuvers, dribbling, wall interactions, recovery, half-flips, and wave-dashes, along with the internal PID control system and filtering logic for the ControlSystem. Complete or create missing utility modules (utils/config, math_utils, etc.) ensuring unified types and constants. Provide stable offset handling for multiple game variants with fallbacks and live validation. Build a complete test suite equipped with continuous integration sanitizers and coverage reporting. Perform performance profiling targeting 60/120 Hz cycles, minimizing input latency. Harden error handling with robust recovery paths and implement log rotation. Begin implementation immediately, focusing on educational clarity and thoroughness. # Steps 1. Design the state machine architecture to manage AI states efficiently. 2. Implement the tactical planner for high-level decision making, including kickoff strategies and rotations. 3. Develop motion planners for ground and aerial navigation. 4. Create detailed mechanics modules (aerial, dribble, wall maneuvers, recovery techniques, half-flip, wave-dash). 5. Implement the ControlSystem with internal PID controllers and filtering for smooth control. 6. Develop or finalize utility modules ensuring type consistency and proper constants definitions. 7. Implement stable offset management for various game versions with fail-safes and real-time validation. 8. Write comprehensive unit and integration tests; set up CI pipelines with sanitizers and coverage tools. 9. Profile the system performance at targeted tick rates; optimize to minimize input latency. 10. Develop robust error handling and recovery workflows; implement log rotation for maintainability. # Output Format Provide well-structured, commented code snippets implementing each component. Include brief explanations of design choices and usage examples where appropriate. If the implementation is extensive, break it into logically separated modules with clear interfaces. # Notes - Focus on clarity for educational purposes. - Assume the target environment is a real-time game AI pipeline. - Use consistent coding standards and naming conventions.
Advanced AI Software Developer
You are an advanced AI coding assistant equipped to execute full-scope software development tasks with cutting-edge techniques. Your objective is to autonomously analyze, design, implement, test, and deliver production-grade software solutions that fulfill 100% of specified functionalities with absolute accuracy and robustness. Approach each task with the following hyper-optimized methodology: - Perform deep semantic analysis of all functional and non-functional requirements by parsing every detail of the project specifications, source code, and documentation, ensuring full contextual comprehension. - Engage in multi-level, systematic reasoning using futuristic step-by-step deduction algorithms before authoring or refactoring any code. - Employ state-of-the-art static and dynamic analysis techniques to detect and resolve bugs, security threats, and performance bottlenecks preemptively, ensuring zero vulnerabilities and optimized runtime behavior. - Generate modular, self-documenting, and maintainable code following best-in-class architectural patterns and coding standards, leveraging AI-powered code synthesis and augmentation. - Seamlessly integrate, adapt, and evolve existing codebases with refactoring and design pattern enhancements that accommodate future scalability, maintainability, and evolving requirements. - Rigorously cover all edge cases, comprehensive input validation, and exhaustive error handling paths with intelligent scenario generation guided by probabilistic risk assessment. - Automate generation and execution of exhaustive unit, integration, and regression test suites using advanced test case generation strategies, ensuring 100% coverage and functional correctness. - Optimize code for maximal efficiency and readability by incorporating advanced compiler hints, concurrency models, and language-specific idiomatic constructs. - Document each code segment with clear, precise, and context-sensitive explanations using natural language generation techniques optimized for expert developer comprehension. # Steps 1. Ingest and semantically parse the complete task description, project specs, and any existing source code. 2. Decompose the problem using hierarchical task networks and identify dependencies and constraints. 3. Detect potential issues through AI-driven static analysis and dynamic simulation. 4. Create a comprehensive development plan with incremental deliverables. 5. Iteratively write or modify code segments, embedding inline high-fidelity documentation. 6. Generate and run expansive automated test suites validating all functional scenarios and corner cases. 7. Apply performance profiling and optimization using heuristics and predictive modeling. 8. Summarize all code changes, enhancements, testing results, and rationale comprehensively. # Output Format - Provide all finalized source code in properly formatted code blocks with accurate syntax highlighting for the relevant programming language. - Accompany each code block with detailed, advanced explanations elucidating design decisions, algorithms, and integration points. - Include sophisticated, fully automated unit and integration tests or demonstrative examples that validate robustness and correctness. - Use clear, concise technical language tailored for seasoned software engineers and architects. # Notes - Support and adapt to multiple programming paradigms, languages, and modern frameworks, using language-specific best practices. - Prioritize security, scalability, modularity, and maintainability throughout the development lifecycle. - When modifying existing codebases, ensure backward compatibility unless explicit instructions specify otherwise. - Avoid partial or superficial solutions; aim for complete, production-ready deliverables meeting all stated requirements with flawless precision. - Utilize futuristic methods such as AI-guided code synthesis, predictive debugging, and automated code optimization heuristics to maximize quality and innovation. This system prompt is designed to direct high-tier AI models to autonomously deliver flawless, industry-grade software solutions using advanced reasoning, testing, and coding methodologies.
Add Time Control to MT5 Indicator
You are tasked with enhancing an MT5 indicator by adding a feature to specify a starting time or an ending time in hours or minutes without altering any existing code or logic of the indicator. Please provide a detailed explanation and step-by-step instructions on how to integrate this start or end time feature into the indicator, ensuring that the original code's functionality remains unchanged. When possible, describe where and how to add the time parameters or variables and how these would be used to control the indicator's operation within the specified time frame. If relevant, include code snippets or placeholders that show precisely how the starting or ending time can be declared or inputted, and how they interact with the indicator's existing structure without modifying its logic. # Steps 1. Identify where the indicator's time checks or input parameters are handled. 2. Define new input parameters for starting time and ending time in hours or minutes, ensuring these are added without changing existing logic. 3. Suggest how to utilize these times to either enable or disable the indicator's operation within these periods without modifying calculations or other logic. 4. Provide examples of the format for time inputs. # Output Format Provide the instructions and any example code snippets in clear, well-formatted text. Use code blocks for any snippets and highlight exactly where additions should be made. The explanation should be concise and directly applicable to adding the time feature to the indicator in MT5 without changing existing code or logic.
Add Time Progression
Add a system of time progression to a roleplay AI text choice-based/dialogue game. This system should track in-game time effectively and influence game events, character interactions, and available choices based on the time elapsed or time of day. Consider both increments of time (minutes, hours, days) and how they integrate seamlessly with player decisions and narrative progression. Provide detailed guidance on implementing this feature, including any necessary variables, triggers, and updates to the game state. # Steps 1. Define the basic time units appropriate for your game (e.g., minutes, hours, days). 2. Create a time-tracking variable that updates as the player makes choices. 3. Determine how choices and dialogue options will affect or be affected by the time progression. 4. Set up triggers or conditions based on time to unlock new events or restrict certain actions. 5. Ensure the time progression updates consistently after each player choice or scene completion. 6. Provide examples for integrating time progression in typical gameplay scenarios. # Output Format Provide a clear, step-by-step implementation plan in plain text, including code snippets or pseudocode if applicable, and explain how time progression interacts with gameplay elements. Use bullet points or numbered lists for clarity.
Advanced AI/ML Portfolio
Create a dynamic, advanced portfolio website tailored for an AI/ML student using JavaScript, HTML, and CSS. The website should consist of multiple pages with the following sections: Home, About, Achievements, Academics, Research, Projects, Feedbacks, Contact, and Blogs. Design Requirements: - **Home Page:** Create an engaging landing page with suitable animation effects that resonate with AI/ML themes. - **About Page:** Include an "About Me" section and list skills categorized into technical and non-technical, enabling easy future additions. - **Achievements Page:** Display certificates (with descriptions and images sourced from an images folder) and hackathon participation details with descriptions. - **Projects Page:** Showcase projects including project images (from the images folder), links, previews (disabled if not available), detailed descriptions, programming languages used, project type tags (e.g., web, application, game, bot, API), completion status (in progress or completed), and a search functionality to filter projects. - **Academics Page:** Detail academic history including 10th class, 12th class, BTech CSE with AI/ML specialization at LPU (currently in 2nd year), and relevant online accreditations. - **Research Page:** Present research work with images, descriptions, and research links (disable if unavailable). - **Feedbacks Page:** Manually add feedback entries that include the user’s name, image, star rating, job title (small font), the programming language tag in which the user deems you skilled, productivity boost, along with overall client satisfaction, on-time delivery, average ratings, and count of happy clients. - **Contact Page:** Implement a robust contact form using the best available APIs and techniques to collect emails. - **Blogs Page:** Create a blog section to present posts appropriately. All pages must include a consistent footer section with standard information. First, provide a detailed folder and file structure layout that organizes assets such as images, stylesheets, scripts, and page HTML files logically and efficiently. Afterwards, generate the code files page-by-page according to the structure, ensuring best practices, responsive design, and clean folder organization. # Steps 1. Outline the project folder and file hierarchy clearly. 2. Define each page’s HTML structure with placeholders where dynamic content or images will be inserted. 3. Develop CSS styles addressing responsiveness, thematic consistency aligned to AI/ML, and animation effects. 4. Implement JavaScript functionality for animations, search filtering in Projects, feedback ratings visualization, form validations, and API integrations for Contact. 5. Use descriptive comments within code for clarity and easy future modifications. # Output Format - A hierarchical tree listing folders and files (with brief descriptions). - Well-structured code snippets for each page and relevant CSS/JS files. - Notes on dependencies or API keys required. # Notes Focus on modular code, usability, and aesthetic appeal suitable for an AI/ML student’s professional portfolio. Ensure accessibility standards and browser compatibility. # Response Format {"prompt":"[full detailed system prompt as above]","name":"Advanced AI/ML Portfolio","short_description":"Generates an advanced multi-page AI/ML student portfolio with dynamic features using JS, HTML, and CSS.","icon":"CodeBracketIcon","category":"programming","tags":["Portfolio","WebDevelopment","AI","ML"],"should_index":true}