Coding
814 prompts available
Advanced Swift Coding Guide
Create a comprehensive Swift coding guide that encompasses professional coding standards, best practices, and advanced principles used by experienced software engineers. The guide should include clear explanations and demonstrate with high-quality examples. ## Steps 1. **Introduction to Swift Programming**: Briefly introduce Swift, its applications, and why it's preferred in professional environments. 2. **Coding Standards and Conventions**: - Naming conventions, including classes, functions, variables, and constants. - File organization and structure. - Commenting and documentation standards. 3. **Advanced Swift Principles**: - Protocol-oriented programming. - Memory management and ARC concepts. - Advanced error handling techniques. - Concurrency and asynchronous programming. 4. **Best Practices in Swift**: - Using Swift’s powerful features like Optionals safely. - Integrating functional programming concepts. - Unit testing and test-driven development. 5. **Common Pitfalls and Optimization Techniques**: - Identifying and avoiding common errors and inefficiencies. - Tips for optimizing performance and app responsiveness. 6. **Examples and Applications**: Provide comprehensive examples illustrating the above principles and practices, such as: - A sample project illustrating best practices and conventions. - Code snippets for specific advanced techniques. ## Output Format - **Structure**: Present the guide in a sequential and well-organized format with sections and subsections. - **Language**: Use professional and clear technical language suitable for experienced engineers. - **Examples**: Provide code snippets and sample projects where appropriate, ensuring they are well-commented. ## Notes - Assume familiarity with basic Swift but emphasize advanced topics. - Highlight differences in Swift compared to other languages, when relevant. ## Examples - **Naming Conventions**: Demonstrate clear naming standards using code examples. - **Protocol-oriented Programming**: Provide a detailed example of using protocols effectively to structure Swift code. These instructions are designed to guide you in creating a Swift coding guide that would be valuable to professional software developers seeking to deepen their understanding and improve their coding practices.
Advanced PDF Signing App
Create a Python application for an advanced PDF signing app. The application should allow users to digitally sign PDF documents with advanced features such as: - Adding multiple signatures with different signers - Support for visible and invisible signatures - Integration with cryptographic certificates (e.g., PKCS#12) - Timestamping signatures - Validation of existing signatures in a PDF # Steps 1. Design a graphical user interface (GUI) or command-line interface (CLI) for selecting PDF files and managing signatures. 2. Implement functionality to load and display PDFs. 3. Integrate digital signing capabilities leveraging libraries such as PyPDF2, pypdf, or external tools like PyHanko. 4. Support uploading and managing certificates for signing. 5. Implement signature appearance customization (signature image, location, size). 6. Add ability to verify and validate existing signatures. 7. Allow users to save the signed PDF securely. # Output Format - Provide well-commented, runnable Python code. - Include instructions for dependencies and usage. - If applicable, provide a sample PDF and certificate handling example. # Notes - Consider cross-platform compatibility. - Ensure the solution adheres to PDF digital signature standards. - Emphasize security and integrity verification throughout the app.
Advanced PHP CMS Modular
Create a comprehensive PHP CMS script utilizing MySQLi for database interactions, JavaScript, and Bootstrap for the front-end design. The goal is to build an advanced, modular CMS with reusable code structure by splitting the code (fatiar código) into separate files for better maintainability. Specifically, CSS and JavaScript should be separated into external files. Include a fully functional admin panel where users can: - Dynamically change the site's color scheme (color themes) that applies throughout the entire website. - Manage content effectively, including adding, editing, and deleting content. - Add new pages and sections flexibly with ease. # Steps 1. Structure the PHP codebase into modules/components for reusability. 2. Use MySQLi to handle database operations securely. 3. Separate all CSS and JS into external files rather than inline. 4. Create a Bootstrap-based responsive layout for both frontend and admin panel. 5. Implement the admin panel with features to: - Change site-wide color scheme dynamically. - Add/edit/delete site content. - Create new pages and sections dynamically. 6. Ensure the code is clean, commented, and follows best practices. # Output Format Deliver the full PHP CMS source code, including all separate CSS and JS files, and SQL scripts to create necessary database tables. Include detailed comments explaining modular structure and instructions on how to deploy and use the CMS, with a focus on how to access and operate the admin panel features. # Notes - Emphasize separation of concerns: PHP logic, HTML markup, CSS styles, and JS code must be distinctly separated. - Use Bootstrap components to maintain consistent styling and responsiveness. - Ensure the color change applies across all pages dynamically without manual CSS rewriting. - The admin panel should be secure and user-friendly. - Provide examples or templates for adding new pages or sections.
Advanced React Guidance
You are an expert frontend developer and educator specializing in advanced React concepts. The user is at an intermediate level and wants to elevate their skills to advanced proficiency. Provide detailed explanations of advanced React techniques focusing on performance optimization and lesser-known state management patterns. Include deep insights, practical best practices, and specific, non-trivial examples demonstrating these concepts in code. Additionally, recommend advanced learning resources—such as articles, books, talks, or libraries—that are relatively obscure or known to only a small percentage of frontend engineers, helping the user gain a significant edge. Encourage reasoning and clear step-by-step explanations before presenting any conclusions or code examples. # Steps - Briefly acknowledge the user's current level. - Explain advanced performance optimization strategies in React such as memoization techniques beyond useMemo/useCallback, Suspense optimizations, React.lazy intricacies, and virtualization strategies. - Dive into lesser-known state management patterns, like using reducers with context in novel ways, leveraging observable patterns, or advanced usage of libraries like Recoil or Zustand with examples. - Provide specific code snippets illustrating each concept. - List carefully curated advanced and less-known resources with short descriptions. # Output Format Deliver the response as a structured, well-organized technical explanation using markdown. Use code blocks for examples and bullet lists for resource recommendations. Maintain a professional and helpful tone. # Notes Focus on actionable insights that can directly improve the user's skillset. Avoid generic or well-known advice. Ensure that explanations are clear but technical enough for an intermediate frontend engineer aiming to become advanced.
Advanced Swift Interview Questions
Generate a list of 25 challenging and highly technical Swift programming questions designed by a team of top iOS Swift researchers and engineers. These questions should thoroughly assess advanced knowledge of Swift and iOS development concepts to ensure that new hires meet the same high standards as the original elite 25-person team. Each question should focus on complex aspects such as Swift language features, performance optimization, concurrency, memory management, advanced SwiftUI or UIKit usage, protocol-oriented programming, generics, error handling, and interoperability. Be sure to cover a broad spectrum of cutting-edge topics relevant to expert-level Swift developers, requiring deep understanding and problem-solving skills. # Steps 1. Identify key advanced Swift programming topics relevant to elite-level iOS developers. 2. Frame 25 technical questions that probe mastery in these areas. 3. Ensure the questions require more than surface-level knowledge—promote critical thinking and applied expertise. # Output Format - A numbered list from 1 to 25. - Each item is a single question written clearly and precisely. # Example 1. Explain the differences between "class" and "actor" in Swift concurrency and give an example use case for each. 2. How does Swift's copy-on-write mechanism work for value types, and how can it affect performance? 3. Describe how protocol-associated types can be used and the implications for type erasure. # Notes - Avoid simple syntax or trivia questions; focus on complex, real-world applicable knowledge. - Questions should also reveal candidate’s experience with Swift's newest features and best practices.
Advanced Telegram Bot for News Summarization
Create an advanced Telegram bot designed for cryptocurrency and technology news aggregation and summarization. This bot will leverage web scraping tools to gather information from multiple sources, including cryptocurrency websites, crypto chart platforms, STEM news, stock market updates, AI advancements, and broader technology news outlets. The bot must have the following features: - **User Configuration:** Users should be able to customize the frequency of summaries, choosing daily or more/less frequent updates based on their preferences. - **Categorization of News:** Implement functions allowing users to receive summaries by specific categories like cryptocurrencies, AI news, stock market updates, etc. - **Detailed Summarization:** Ensure the bot captures essential information and creates summaries that highlight the most important factors, insights, and trends from the collected data. - **Telegram Integration:** Ensure that the summaries are delivered in a user-friendly format via Telegram chat, with appealing formatting and clarity. - **User Interaction:** Create a seamless button interface for users to interact with, allowing them to easily customize settings, request summaries, and navigate through categories. - **URL Scraping:** Allow users to submit URLs from their preferred news sites (like Medium) so that the bot can scrape and generate concise article summaries from those links. - **Error Handling:** Implement robust error handling to manage cases where pages may fail to scrape data or if user inputs are invalid. - **Data Management:** Store relevant data efficiently, potentially utilizing a database to track user preferences and scraped content for continuous improvement. Build the bot in a modular way so that additional features can be easily integrated later, such as integration with AI models for more advanced summarization techniques.
Advanced Repo Upgrade
You are tasked with performing a comprehensive and advanced improvement and upgrade of a code repository. Your goal is to thoroughly analyze the repository's structure, code quality, dependencies, documentation, testing, performance, and security aspects to ensure it is fully optimized and functional. Conduct a detailed check to confirm that all components are working correctly and that no further improvements or fixes are needed. # Steps 1. Review the repository structure and organize files for clarity and maintainability. 2. Analyze and refactor the code for readability, efficiency, and adherence to best practices. 3. Audit dependencies for updates, deprecations, and security vulnerabilities. 4. Examine and enhance the documentation for completeness and accuracy. 5. Evaluate and improve test coverage and testing frameworks. 6. Assess performance bottlenecks and optimize where possible. 7. Check security practices and mitigate any identified risks. 8. Confirm that the repository builds and runs without errors across intended environments. 9. Validate that all features work as expected and no functionality is broken. 10. Provide a detailed report summarizing improvements made and verification steps conducted. # Output Format Provide a detailed report in markdown format including: - Summary of improvements and upgrades performed. - Any issues identified and how they were resolved. - Verification steps taken to confirm full functionality. - Recommendations for any future considerations if applicable. Ensure clarity, precision, and thoroughness in your report to demonstrate the repository is fully optimized and requires no additional changes.
Advanced PHP Video Chat
Develop a fully integrated, responsive web application based on the given index.php and style.css files, enhancing the original concept and design. The application must be completed using PHP, JavaScript, CSS, and any additional necessary technologies, including a properly configured database and a config file. Ensure the admin area displays the admin name in red text next to it instead of a logo. Implement a secure login system exclusively supporting Discord and email authentication. Include a fully functional WebRTC-based video communication feature with screen-sharing capabilities, ensuring it works flawlessly and bidirectionally for both users. Design requirements: - Place the camera video feeds vertically centered, stacked atop one another in the middle of the screen. - On the right side of the cameras, display real-time statistics and a chat interface between the user and a random partner. - On the left side of the cameras, provide control buttons such as screen sharing toggle, camera and microphone mute/unmute, and below those, dedicated buttons for "Skip" and "Close" session. - The design must be clean, intuitive, and fully responsive, providing a smooth user experience on both desktop and mobile devices. Steps to follow: 1. Analyze the provided index.php and style.css to understand the current functionality and design. 2. Build a robust backend with PHP, including a config file for database connection and necessary settings. 3. Set up a database schema supporting user authentication, sessions, and chat logs. 4. Implement login mechanisms using Discord OAuth and standard email authentication only. 5. Architect the frontend layout according to the specified UI design using modern CSS techniques to ensure responsiveness. 6. Integrate WebRTC technology to enable bidirectional video calls and screen sharing. 7. Implement real-time chat and statistics updates via WebSocket or appropriate methods. 8. Ensure all features—video, chat, controls, authentication—are tightly integrated and tested on multiple devices and browsers. Output a complete, production-ready project code base, including all necessary PHP, JavaScript, CSS, and configuration files, along with SQL scripts to create and initialize the database. # Output Format Provide all source code files structured in proper directories, with comments for clarity. Include a README with setup instructions, dependencies, and usage notes. Embed relevant code snippets within the response where necessary, or summarize large sections with links or attachments as appropriate.
Advanced Tool Development
You are tasked with assisting in the creation of a powerful and fully functional tool from scratch, designed to give complete control to the user. Your responses should focus strictly on providing practical, real, and actionable code and technical guidance—no basic or educational examples, and no theoretical explanations unless directly applicable to tool development. Ensure that all suggestions adhere to responsible and ethical programming practices, maintaining safety and legality throughout the development process. When guiding the development: - Focus on advanced, real-world coding techniques to implement the core functionalities of the tool. - Provide code relevant to production-level applications, emphasizing efficiency, scalability, and robustness. - Avoid generic examples or educational snippets unless specifically requested. - Reason through each step thoroughly before providing solutions. - Accept and incorporate specific user requirements and constraints as they are communicated. # Output Format Deliver responses containing concrete code snippets, configuration details, and architectural advice necessary to build the specified tool. Include explanations only insofar as they clarify the implementation or usage of the provided code, avoiding unnecessary elaboration.
Advanced Pine Script Entry
Create a professional, advanced Pine Script for TradingView designed to identify the perfect entry points for trades. The script should utilize sophisticated technical indicators and conditions, aiming for high accuracy in signaling optimal trade entries. Include clear comments explaining the logic behind key calculations and decision thresholds. # Steps 1. Define the scope: focus on advanced entry signals rather than basic indicators. 2. Integrate multiple technical analysis tools (e.g., moving averages, RSI, MACD, volume analysis, candlestick patterns) to enhance signal reliability. 3. Implement filters to avoid false signals, such as trend confirmation and volatility checks. 4. Include alert conditions to notify users when entry signals occur. 5. Provide well-documented code with comments describing each step and indicator rationale. # Output Format - Provide the complete Pine Script code ready for use in TradingView. - Include inline comments explaining script functionality, indicator choice, and entry criteria. # Notes - Prioritize accuracy and clarity in entry signal conditions. - The script should be compatible with the latest version of Pine Script. - Avoid overly complex or unmaintainable code structures.
Advanced Restaurant QR System
Create a fully functional, dynamic, and visually appealing restaurant QR code menu system incorporating the provided HTML design as the foundational style across all project pages. Enhance this design by adding new interactive components and fields as needed to make the interface fully dynamic, responsive, and functional. Structure the project into two distinct main modules: 1. **Restaurant Landing Page and User-Facing Menu:** - Use the provided design consistently here, enriched with animations and mobile-optimized views. - Implement comprehensive QR code scanning functionality that opens a detailed menu page linked uniquely to each QR code and table number. - Expand the user menu page to showcase not only menu items and categories but also customer feedback submission forms to be used post-order completion. - Integrate visually attractive sections such as GIF images, stories/testimonials, and detailed item ratings to enhance engagement. - Incorporate smooth animations and transitions, ensuring a modern, app-like user experience on mobile devices. 2. **Admin Panel for Restaurant Management:** - Separate the admin panel from the landing/user pages with a distinct, professional, and visually coherent theme developed from the base design—make it attractive and fully functional. - Implement all missing functionalities identified, including comprehensive restaurant management features. - Add new menu management sections, such as categories, offers (with fields like image, discount type like percentage off, buy one get one free, etc.), and dashboard elements displaying graphical analytics, counts, and other relevant metrics. - Include user authentication and profile management with validated, secure flows. - Enforce strong validation and notification mechanisms throughout. **Technical Implementation Guidelines:** - Use Laravel 11 with MVC architecture for backend development. - Utilize Blade templating for views, jQuery for DOM manipulations, AJAX for asynchronous operations, and third-party JS and CSS libraries for animations and styling. - Do NOT use npm or npx package installations; rely exclusively on direct linking or CDN sources for third-party JS and CSS. - Employ Tailwind CSS or a similar utility-first CSS framework aligned with the provided design. - Implement AJAX-based form submissions and real-time updates with toast notifications for success or error feedback. - Build new database tables, models, controllers, and migrations using Laravel Artisan commands where required. - Ensure proper validation on both client and server sides with user-friendly error or success notifications. - Store user’s menu selections locally with an expiration logic of 5 hours; clear local storage accordingly. **Functional Highlights to Include:** - Dynamic and multiple QR code generation associated uniquely with tables and restaurants. - Post-order user feedback system embedded in the menu page. - Offer display logic on user view pages when offers are present. - Menu item popups with swipeable image galleries; if no images are uploaded, dynamically fetch relevant images from permitted third-party sources. - Animated UI elements including welcome messages, scrolling effects, popups, and menu-to-cart interactions. - Fully responsive design prioritizing mobile app-like usability. # Steps 1. Integrate the supplied HTML design consistently into all pages. 2. Separate landing/user menu pages from the admin management interface. 3. Develop QR code generation, linking each code to a unique restaurant-table pairing. 4. Extend user menu pages with feedback forms, ratings, stories, GIF sections, and animation. 5. Build out the admin panel with missing functions, new menu categories, offer management, and dashboards. 6. Use Laravel Artisan commands to create necessary models, migrations, and controllers. 7. Implement AJAX calls with jQuery and provide toast notifications for CRUD operations. 8. Ensure validation and notification are consistent and robust. 9. Implement local storage logic with timed expiration for order cart data. 10. Use CDN links or local copies for all third-party JS/CSS libraries, avoiding npm installs. # Output Format Provide: - Full Laravel 11 backend code including routes, controllers, models, migrations, and validation rules with comments. - Blade templates utilizing provided design and additional UI components, fully responsive. - JavaScript and CSS files or CDN references for frontend behavior, animations, AJAX, toast notifications. - Scripts and instructions for database setup, migrations, and seeding. - Example files demonstrating menu image and PDF upload and parsing used in admin panel. - Documentation covering setup, deployment instructions, and detailed descriptions of new features. # Notes - Maintain clear separation of landing/user and admin functionalities. - Ensure the design is modern, consistent, and fully animated, with smooth mobile usability. - Prioritize usability by incorporating relevant feedback and rating systems. - Adhere strictly to using AJAX and Blade views without SPA frameworks or npm-based setups. - Validate all user input rigorously with helpful notifications. - Include suggestions for AI-driven enhancements or missing functionalities in admin panel based on logical needs. Generate a sophisticated, scalable, fully equipped restaurant QR code menu system that fulfills these comprehensive instructions and leverages the provided HTML design as the aesthetic core, prepared for immediate deployment.
Advanced Rocket League AI Bot
Develop an advanced Rocket League AI bot capable of playing sophisticated, high-level gameplay in online matches without any need for initial configuration. The bot should autonomously handle complex strategies, including precise aerial maneuvers (ariels) and adaptive gameplay tactics. Utilize the 'rlbot.py' file for necessary offsets or integrations. If any errors or bugs arise during development, identify and fix them promptly. Strive to maximize the bot's performance by implementing advanced strategies, situational awareness, and decision-making processes to emulate expert human play at a high skill level. # Steps 1. Analyze the rlbot.py file thoroughly to understand existing functionalities and offsets required for game integration. 2. Implement core gameplay mechanics, including ball control, positioning, shooting, defending, and boosting. 3. Develop advanced strategies such as perfect aerial plays, dribbling, passing, and adaptive decision-making depending on game states. 4. Ensure the bot plays autonomously without manual configuration, automatically initializing all necessary parameters. 5. Test the bot rigorously in online match scenarios to validate performance and make bug fixes as needed. 6. Optimize the bot's capabilities to perform at expert or higher competitive levels. # Output Format Provide the complete, well-commented source code for the Rocket League AI bot in a single or multiple files with clear instructions on how to deploy and run the bot for online matches. Include explanations of implemented strategies and any dependencies or requirements. Report all error fixes made during development.