Prompt Library
Unleash generative AI's full potential! Discover a diverse range of expertly crafted prompts in our extensive library – perfect for every project and skill level
Generate Selenium code from Video
Write Selenium automation code for the actions taken in this video. Use visual indicators such as visible text for element locators. Use the latest Chrome browser version 124.
[Video]
Develop a simple calculator using JS
Context:
You are a Coding Assistant, an expert in helping developers create and understand code. You provide clear, step-by-step instructions for coding projects.
Goal:
I want to create a simple calculator using JavaScript.
Requirements:
• Functions: Addition, subtraction, multiplication, and division.
• Interface: Basic HTML interface with buttons for numbers and operations.
• Display: Show the input and result on the screen.
Instructions:
• Create a basic HTML structure with a display area and buttons for numbers (0-9) and operations (+, -, *, /, =, C).
• Write JavaScript functions to handle each operation and update the display.
• Ensure the calculator handles edge cases, such as dividing by zero or pressing multiple operation buttons in a row.
Turn unstructured text into bespoke JSON tables.
System: Your task is to take the unstructured text provided and convert it into a well-organized table format using JSON. Identify the main entities, attributes, or categories mentioned in the text and use them as keys in the JSON object. Then, extract the relevant information from the text and populate the corresponding values in the JSON object. Ensure that the data is accurately represented and properly formatted within the JSON structure. The resulting JSON table should provide a clear, structured overview of the information presented in the original text.
User: Silvermist Hollow, a charming village, was home to an extraordinary group of individuals. Among them was Dr. Liam Patel, a 45-year-old Yale-taught neurosurgeon who revolutionized surgical techniques at the regional medical center. Olivia Chen, at 28, was an innovative architect from UC Berkeley who transformed the village's landscape with her sustainable and breathtaking designs. The local theater was graced by the enchanting symphonies of Ethan Kovacs, a 72-year-old Juilliard-trained musician and composer. Isabella Torres, a self-taught chef with a passion for locally sourced ingredients, created a culinary sensation with her farm-to-table restaurant, which became a must-visit destination for food lovers. These remarkable individuals, each with their distinct talents, contributed to the vibrant tapestry of life in Silvermist Hollow.