Back to Learning

Coding

814 prompts available

Accessories Mod 1.21.11

Create a Minecraft Fabric mod named "Accessories" specifically for version 1.21.11. The mod should add various wearable accessory items (such as hats, rings, necklaces, belts, etc.) that players can equip alongside standard armor and clothing. Ensure full compatibility with Fabric API for version 1.21.11 and implement proper item registration, rendering, and user interface elements to allow players to manage these accessories effectively. Include clear comments in the code to explain implementation details and maintain mod performance and stability. Steps: 1. Set up a Fabric mod development environment targeting Minecraft version 1.21.11. 2. Define new accessory items with appropriate properties and textures. 3. Implement custom slots or extend inventory capabilities to equip multiple accessories. 4. Ensure compatibility with other Fabric mods and avoid conflicts. 5. Provide user interface enhancements for managing accessories. 6. Test the mod thoroughly for bugs and performance issues. Output Format: - Provide complete source code organized as a Fabric mod project. - Include installation instructions and any necessary configuration files. - Supply a README explaining mod features and usage. Notes: - Follow Fabric modding best practices for version 1.21.11. - Use exemplary Java coding standards with clear, maintainable structure. - Assume the recipient has basic knowledge of Minecraft modding with Fabric but provide sufficient comments for clarity.

Account and Meter Number Generator

Generate various formats of account numbers and meter numbers extracted from electricity bill invoice PDFs. You are an AI expert tasked with creating code to generate different types of account number and meter number formats as found in electricity bill invoices. These formats can vary based on region, utility provider, or billing system. Guidelines: - Identify possible patterns and rules used for account numbers (e.g., numeric only, alphanumeric, specific length, inclusion of prefixes or separators). - Identify meter number formats, which may also include numeric or alphanumeric patterns. - Consider common delimiters or structures such as hyphens, spaces, or prefixes. - Generate sample strings matching each identified format programmatically. - Provide clear comments and explanations in the code to describe each format. # Steps 1. Research common account and meter number formats used in electricity bills. 2. Define regular expressions or templates to represent these formats. 3. Write code to generate sample numbers for each format. 4. Organize code for easy extension to add additional formats. 5. Test generated numbers for correctness based on the expected patterns. # Output Format Provide the output as a runnable code snippet (preferably in Python) that includes: - Multiple functions or a unified function with options to generate different account and meter number formats. - Comments explaining what each function or section generates. - Example output when the code is executed. # Notes - Assume input PDFs are not provided; focus on format generation rather than extraction from files. - Patterns should be realistic and representative of actual billing systems.

Action Game C Code

Create comprehensive C code for a complex action game with the following requirements: - The game has 10,000 levels. - Level 1 contains 4 matches; each subsequent level has 2 additional matches than the previous. - Difficulty increases progressively with each level. - On the first game launch, display “Hello” once, then prompt the user to sign up; afterward, the greeting is shown each subsequent time. - Each match has teams of 4 to 12 players; players can customize team size. - The home page includes: - A left-side “Shop” button at the bottom offering purchasable items: characters, weapons, pets, shields, glue-walls, flying-boards, chemoflash-moods, teleportation — requiring 250+ diamonds or 5000+ gold coins. - 500+ characters with high-quality graphics (first two characters free: one male, one female). - Character customization accessible by clicking the character on the home page. - Inventory: - 5000+ guns, machine guns, sniper rifles - 200+ swords and knives - 50+ sticks and spears - 100+ grenades and missile launchers - 300+ animals (crocodiles, tigers, lions, cats, dogs) and birds (phoenix, fire-phoenix, eagle, hawk) as pets (smallest 1.5 feet tall) - 100+ shields and glue-walls - 100+ flying-boards - Settings option at top right of home page. - Player description displayed between settings and Play button at the bottom. - Clicking Play starts the game. - During gameplay: - A plane transports players who then jump with parachutes. - Players collect weapons after landing. - Two teams battle; winning team members earn 500 gold and 5 diamonds, rewards increase with level. - Player profile with diamonds and gold coin counts shown on the left. - Control panel includes: - Flying board option (right side) for flying. - Help option for teammates to heal injured players. - Central fire (one shot) button. - Shield and glue-wall option (left of fire). - Grenade (right of fire) and missile launcher option (right of grenade). - Large round button at bottom for cycling through weapons. - Small teleportation button at bottom left. - Mini-map shows red dots for teammates, blue dots for enemies. - Running, jumping, camouflage modes below the mini-map. - Joystick for movement directions. - Control panel customizable via Settings. - Maps: - Includes maps of all countries and cities worldwide. - Palestine map is free and used in the first matches. - Players can select cities, each city includes 10 matches. - Maps cost between 10,000 to 50,000 diamonds to unlock. - Each city name labeled with its country. - Offline play allows matches against AI. - Diamond purchase options: - 10 diamonds for $1 - 50 diamonds for $5 - 100 diamonds for $9 - 250 diamonds for $15 - Teammates can communicate via voice chat during matches. Deliver well-organized, modular C source code that implements the described game mechanics, user interface, and features. Include comments explaining key components and logic. Assume access to standard C libraries and common game development frameworks if necessary. Prioritize clarity, extensibility, and performance.

Action Game Code

Create a basic action game code using [programming language] that includes the following features: 1. **Game Loop**: Implement a game loop that continuously checks for player input and updates the game state. 2. **Player Character**: Define a player character that can move (up, down, left, right) and perform actions (jump, shoot). 3. **Enemy AI**: Create a simple enemy character that moves towards the player and has basic attack behavior. 4. **Collision Detection**: Implement collision detection between the player, enemies, and any obstacles. 5. **Scoring System**: Add a scoring system that increases the score when the player defeats enemies. 6. **Game Over Condition**: Set a condition for game over, such as losing all lives. Please write the code in a structured format with comments to explain each section. Make sure to address any potential improvements or adjustments that could enhance gameplay.

Account Checker Script

Create a Python script that reads account data from a file named 'accounts.txt' and checks each account against criteria defined in a configurable JSON file. The script should: - Read and parse account details from 'accounts.txt'. - Load configuration from a JSON file specifying: - Skin names to check. - Requirement thresholds (e.g., minimum level, minimum item count). - For each account: - Determine account properties such as level, item count, and special statuses (diamond, emerald, champ, platinum, go4, glacier). - Validate whether the account is banned. - Categorize accounts based on requirements: - valid level 50 accounts - valid accounts with items - valid diamond accounts - valid emerald accounts - valid champ accounts - valid platinum accounts - valid accounts that don't meet any of the above requirements - valid go4 accounts - valid glacier accounts - Create a folder structure under 'results/YYYY-MM-DD_HH-MM-SS/'. - Save separate '.txt' files for each category in the dated subfolder with appropriate account listings. - Compile all banned accounts from any valid category into a file named 'valid_banned.txt' in the same folder. - Ensure the JSON configuration is human-readable and editable with clear structure for skins and requirement thresholds. - The script structure should be modular for easy updates. # Output Format - A 'results' folder containing a timestamped subfolder (e.g., 'results/2024-06-01_14-30-00/') - Multiple '.txt' files inside the dated subfolder, one per account category as listed above - A JSON configuration file for skins and requirements # Notes - Clearly define account property extraction logic based on account data format. - Make proxy format one-line if proxies are involved. - Include comments for major functional parts in the script. # Response Format Provide a complete, well-commented Python script fulfilling these requirements.

Action Memo API Module

Create a Java Spring Boot module for managing action memos with the following components: 1. **Entity Class**: Define an entity `ActionMemo` representing the `PORTAL_ACTION_MEMOS` table with fields: `memoId`, `controlCode`, `claimId`, `healthFacility`, `physician`, `batchNumber`, `patientName`, `accountName`, `approvalNumber`, `availmentDate`, `memoType`, `action`, `dateCreated`, `createdBy`, `serviceType`, `status`, `providerUserId`, `createdTs`, `createdByField`, `updatedTs`, `updatedBy`, `message`, `type`, `providerCode`. Use JPA annotations: `@Entity`, `@Table`, primary key annotations like `@Id`, `@GeneratedValue`, column mappings with `@Column`, relationships with `@ManyToOne`, `@JoinColumn`, and specify `insertable=false, updatable=false` where necessary. Include Lombok annotations `@Data` and `@NoArgsConstructor`. 2. **Request Class**: Create a `PendingMemoRequest` with fields `page`, `size`, `search`, `status`, `memoType`, `fromDate`, and `toDate`. Add validation annotations such as `@NotNull`, `@NotBlank` and use `@Data` to generate boilerplate code. 3. **Response Class**: Define `PendingMemoResponse` containing: - A list of `MemoResponse` objects each having fields: `memoId`, `controlCode`, `healthFacility`, `physician`, `batchNumber`, `patientName`, `accountName`, `approvalNumber`, `availmentDate`, `submissionDate`, `memoType`, `status`, `documentId`. - Pagination info: `currentPage`, `pageSize`, `totalPages`, `totalRecords`. 4. **API Response Wrapper**: Use the provided generic `ApiResponse<T>` class to standardize all API responses with `responseCode`, `message`, `errorDetails`, `data`, and ISO 8601 `timestamp`. 5. **Repository Layer**: Implement `ClaimsRepository` as a Spring Data JPA repository for the `ActionMemo` entity. 6. **Service Layer**: - Define the interface `MemoService` with method `PendingMemoResponse getMemoListByStatus(PendingMemoRequest request);`. - Implement this interface in `MemoServiceImpl`: - Handle pagination, normalize filters (convert date ranges to IST, clean filters). - Query `actionMemosRepository` applying filters; if all filters are empty, fetch all memos. - Map queried data to a list of `MemoResponse`. - Construct and return `PendingMemoResponse` with data and pagination metadata. - Use SLF4J for logging throughout the service. 7. **Controller Layer**: Create `ClaimsServiceController` with a single endpoint: - `@PostMapping("/memoListByStatus")` accepting a `@Valid` `@RequestBody` `PendingMemoRequest`. - Calls `MemoService.getMemoListByStatus()` and returns an `ApiResponse<PendingMemoResponse>`. 8. **Global Exception Handler**: Use the provided class that: - Handles `SQLException`, `DataAccessException`, `RuntimeException`, general `Exception`, and `MethodArgumentNotValidException`. - Logs exceptions appropriately. - Returns standardized `ApiResponse` failures with descriptive messages. **Additional requirements:** - Apply validation annotations properly in request classes. - Use Lombok annotations for cleaner model classes. - Add detailed SLF4J logs in service implementation. - Follow best Spring Boot practices for layered architecture. # Steps 1. Design the `ActionMemo` entity mapping to database structure. 2. Create `PendingMemoRequest` and apply validation constraints. 3. Define `PendingMemoResponse` and `MemoResponse` DTOs. 4. Implement `ClaimsRepository` using Spring Data JPA. 5. Define `MemoService` interface and implement it in `MemoServiceImpl` with filtering, paging, and logging. 6. Create `ClaimsServiceController` with POST endpoint. 7. Integrate and configure the global exception handler. # Output Format Provide full Java class implementation snippets with proper package declarations and import statements for each component: - Entity class - Request and response DTO classes - Repository interface - Service interface and implementation - Controller class - Global exception handler Use annotations and Lombok where specified. Each class should be properly documented and structured for use in a Spring Boot project. # Notes - Dates should be handled and converted correctly to IST time zone where needed. - Ensure validation error messages are meaningful. - Logging statements must include method entry, parameters, and exception details if any. - Pagination defaults can be assumed but expose pagination fields to clients for flexibility. - The controller method should return `ApiResponse.success()` wrapping the `PendingMemoResponse` on success.

Account Control SVB Code

Create an account control code designed as an extension with the file type `.svb` for the website accessible via the URL: https://s.activision.com/activision/login?redirectUrl=https://www.activision.com/. This code should securely manage account login functionalities, ensuring proper authentication flow and redirect handling as indicated in the URL. # Steps - Analyze the URL to understand the login and redirect mechanism. - Develop the account control code to handle user authentication. - Package the code correctly as a `.svb` extension file. - Ensure the code adheres to security best practices and manages session states appropriately. # Output Format Provide the complete `.svb` code content as plain text, ready to be saved as a file with the `.svb` extension. Include comments within the code to explain key functionalities. # Notes - Do not include any executable binaries, only code text. - Ensure compatibility with the target web system implied by the URL. - Maintain confidentiality and security best practices in authentication handling.

Activate Blender Animation with E Key

Create a script for a game engine (such as Unity or Unreal Engine) or a Blender add-on that listens for the 'E' key press on the keyboard and, when detected, triggers or activates a specific Blender animation sequence. The script should handle the following requirements: - Continuously check for keyboard input during gameplay or interaction. - When the 'E' key is pressed, start playing the assigned Blender animation. - Ensure that the animation can play from start to finish once triggered. - Optionally, prevent re-triggering the animation until it finishes or provide a way to restart it. # Steps 1. Set up input detection for the 'E' key. 2. Link the input event to the animation controller or Blender's animation system. 3. Activate or play the desired animation upon key press. 4. Handle animation state to prevent overlapping or unintended behavior. # Output Format Provide the complete script code with comments explaining each part. Specify which game engine or Blender version the script is intended for, and instructions on how to attach or use the script within the project. # Notes - If you generate a script for Blender's scripting API (Python), ensure you explain how to run it inside Blender. - If the animation is named [AnimationName], refer to it appropriately in the code.

Account Existence Checker

Create a script that checks user accounts on the website gamesense.pub to determine if they exist on the platform. The script should accept a list of account identifiers (such as usernames or emails) and verify each one, then produce a report differentiating existing and non-existing accounts. Detailed Requirements: - Utilize the site's official API for account verification if available. - If no API is accessible, implement web scraping methods to obtain account status. - Handle potential errors, including site unavailability and connection failures. - Incorporate delays between requests to comply with site policies and avoid server overload or blocking. - Save the verification results into a text or CSV file, with each line containing the account name and its status as "exists" or "does not exist". Steps to Follow: 1. Prepare the input list of account names or emails. 2. For each account, query the website via API or scrape the site to check its existence. 3. Interpret the responses to determine whether the account exists. 4. Record the results in the specified output format. Output Format: - A CSV or plain text file where each line includes: - Account identifier - Status ("exists" or "does not exist") Example Output Lines: - user123, exists - user456, does not exist Notes: - Confirm website policies to avoid violating terms during account verification. - Implement appropriate error handling and logging. - Ensure the tool is efficient, respectful of server load, and produces clear outputs.

Account ID System

Create a complete account ID system for a player database where each player is assigned a unique identification code in the format #123456. The purpose is to ensure that even if a player changes their name, their data remains linked to their unique ID instead of the name. Use the provided database connection resource `exports.MariaDB.getconn()` to interact with a MariaDB database. Your solution should include: - The code for generating and assigning unique account IDs to new players. - Code for storing and retrieving player data along with their account IDs in the database. - Handling of name changes by associating data through account IDs rather than player names. Ensure the implementation follows best practices for database operations and data integrity. # Steps 1. Establish a connection with the MariaDB database using `exports.MariaDB.getconn()`. 2. Design the database schema for storing player data and account IDs. 3. Implement a function to generate unique account IDs in the format #123456. 4. Write code to add new players with generated unique IDs to the database. 5. Implement functionality to update player names without losing associated data. 6. Add retrieval functions that query player data by account ID. # Output Format Provide the complete source code in a single file or module, clearly commented and formatted for easy understanding. Include any database schema definitions or setup scripts required to run the system.

Activate Nitro Boost

You are a Lua programming assistant specializing in game scripting for vehicles. Your task is to create or correct a function named activateNitroBoost(vehicle) that properly manages the addition of a nitro boost upgrade (ID 1010) to a vehicle in a game environment. The function must: - Verify that the input 'vehicle' is a valid element and that its type is "vehicle". - Check if the vehicle already has a nitro boost installed in upgrade slot 8 by using the function getVehicleUpgradeOnSlot(vehicle, 8). - Only add the nitro boost upgrade (ID 1010) if it is not already installed in slot 8, thus avoiding duplicate upgrades. - If the nitro boost is already in place, the function should leave the vehicle unchanged. Pay special attention to the conditional logic to ensure that the nitro boost is not added multiple times. # Steps 1. Confirm the 'vehicle' parameter is a valid game element and specifically of type "vehicle" using isElement and getElementType. 2. Retrieve the current upgrade in slot 8 using getVehicleUpgradeOnSlot(vehicle, 8). 3. If the current upgrade is not equal to 1010, call addVehicleUpgrade(vehicle, 1010) to add the nitro boost. # Output Format Provide the full corrected Lua function activateNitroBoost(vehicle). Include comments that clarify the purpose of key checks and steps within the code. # Example ```lua function activateNitroBoost(vehicle) -- Check if the vehicle element is valid and is of type 'vehicle' if isElement(vehicle) and getElementType(vehicle) == "vehicle" then -- Get the upgrade currently installed in slot 8 local currentUpgrade = getVehicleUpgradeOnSlot(vehicle, 8) -- If the nitro boost (ID 1010) is not already installed, add it if currentUpgrade ~= 1010 then addVehicleUpgrade(vehicle, 1010) end end end ``` # Notes - Slot 8 is reserved for the nitro boost upgrade. - Use the Lua language conventions and the provided functions to check element validity and manage vehicle upgrades. - Be cautious to prevent applying duplicate nitro boosts on the same vehicle.

Account Management App Code

Create a mobile application code for account management that includes basic features such as user registration, login, profile management, and secure authentication. Ensure the application is user-friendly and adheres to industry best practices for security and data protection. # Steps 1. **Choose a Framework**: Decide on a mobile app development framework (e.g., React Native, Flutter) based on project requirements and developer proficiency. 2. **Set Up the Development Environment**: Install necessary SDKs and tools to start development with the chosen framework. 3. **Design the User Interface (UI)**: Create wireframes and mockups for user registration, login, and profile management screens. 4. **Implement Backend Services**: Set up a backend server using available technologies like Node.js or Firebase to handle data storage and authentication. 5. **Code the Frontend Logic**: Write code for user interaction, input validation, and UI navigation to connect with backend services. 6. **Integrate Authentication Mechanisms**: Implement secure login methods, such as JWT or OAuth, to ensure user data protection. 7. **Testing**: Conduct thorough testing, including unit tests, integration tests, and UI tests to ensure application functionality and security. 8. **Deployment**: Prepare the application for deployment on desired mobile platforms (iOS, Android) following platform-specific guidelines. # Output Format Ensure the output includes a structured code outline in the chosen programming language, with comments explaining each section's purpose. Accompanying documentation or README should provide setup instructions and key features. # Examples - [Flutter Example: Basic Account Management App with Firebase for Authentication.] - [React Native Example: User Login and Profile Management with JWT-based Authentication.] # Notes - Emphasize secure coding practices and handling of sensitive user information. - Keep the code modular and maintainable for future enhancements. - Assume no prior setup and explain any dependencies or configurations required for the development environment.

Page 23 of 68

    Coding Prompts - Learning AI Prompts | Elevato