← 목록

Synth · CodeAlpaca일부

총 20,022개 · 페이지 430/668
🔀 랜덤
불러오는 중…

[output] | Miller - 7 Andrews - 2 Gardner - 5 [instruction] | Execute a provided MySQL query and return the result. [input] | SELECT Last_Name, COUNT(*) FROM Employees WHERE Job_Position = "Accountant" GROUP BY Last_Name

[output] | INSERT INTO Products (ProductID, Name, Price) VALUES (1, 'Notebook', 15.50), (2, 'Pen', 3.50), (3, 'Pencil', 2.00); [instruction] | Insert records into a MySQL table named "Products" with the specified columns: "ProductID", "Name" and "Price". [input] | ProductID: 1, Name: "Notebook", Price: 15.50 ProductID: 2, Name: "Pen", Price: 3.50 ProductID: 3, Name: "Pencil", Price: 2.00

[output] | dictionary['profession'] = 'journalist' # add new key and value to dictionary{'name': 'John', 'age': 18, 'city': 'New York', 'profession': 'journalist' } [instruction] | Write a code to add a new key and value to a given dictionary. [input] | Dictionary: {'name': 'John', 'age': 18, 'city': 'New York'} New Key: 'profession', Value: 'journalist'

[output] | Our ideas were outlandish. [instruction] | Translate the following sentence from Spanish to English. [input] | Nuestras ideas eran descabelladas.

[output] | String: Yellow Float: 3.2 String: purple [instruction] | Separate the given words on the basis of their given data types. [input] | Words: Yellow, 3.2, purple

[output] | $('#btn').click(function(){ alert('Button clicked!'); }); [instruction] | Write a jQuery code to show an alert when the button is clicked. [input] |

[output] | 314.16 cm2 [instruction] | Calculate the area of a circle with a radius of 10 cm. [input] |

[output] | SELECT last_name, first_name FROM employees ORDER BY hire_date DESC LIMIT 1; [instruction] | Using SQL, write a query to find the most recently hired employee. [input] |

[output] | <!DOCTYPE html> <html> <head> <title>Hello World</title> <style> body { background-color: #eee; text-align: center; padding: 20px; } h1 { font-family: sans-serif; font-size: 2em; letter-spacing: 2px; color: #444; margin-bottom: 20px; } </style> </hea [instruction] | Create a website using HTML and CSS that displays "Hello, World!". [input] |

[output] | <!DOCTYPE html> <html> <head> <title>HTML/CSS/Javascript Calculator</title> <style> * { box-sizing: border-box; } .calculator { width: 425px; background-color: #fafafa; padding: 20px; border-radius: 8px; } .calculator-di [instruction] | Design a basic calculator using HTML, CSS, and JavaScript. [input] |

[output] | #include <iostream> using namespace std; int main(){ int num1; int num2; int sum; cout<<"Please enter two numbers: "; cin>> num1; cin>> num2; sum = num1 + num2; cout<<"The sum of the two numbers is: " << sum <<endl; return 0; } [instruction] | Create a console application in C++ that computes the sum of two numbers that are user input. [input] |

[output] | const currencyExchange = (baseCurrency, foreignCurrency) => { let response; const endpoint = `https://api.exchangeratesapi.io/latest?base=${baseCurrency}&symbols=${foreignCurrency}`; // Use Fetch API to make a call to endpoint fetch(endpoint) .then(res => { res.json() .then(data [instruction] | Design a currency exchange program using JavaScript that allows the user to instantly receive the exchange rate for a particular currency. [input] |

[output] | <!DOCTYPE html> <html> <head> <title>Hello World in Different Languages</title> <style> body { font-family: sans-serif; background-color: #eee; text-align: center; padding: 20px; } select { background-color: #f0f0f0; font-size: 1rem; padding: [instruction] | Create a web page that displays a message in different languages by using HTML, CSS, and JavaScript. [input] |

[output] | <!DOCTYPE html> <html> <head> <title>Hunted Maze</title> <style> * { box-sizing: border-box; } body{ font-family: sans-serif; background-color: #eee; text-align: center; padding: 20px; } h1 { font-size: 2rem; color: #444; } .m [instruction] | Design an interactive game using HTML, CSS and JavaScript. [input] |

[output] | SELECT last_name, first_name, department FROM employees; [instruction] | Using SQL, write a query to find the employee names and the departments that they work in. [input] |

[output] | SELECT column1, column2 FROM table_name WHERE condition This statement will return the values of column1 and column2 from the table_name table where the condition is fulfilled. [instruction] | Suggest a completion to the following SQL command and explain. [input] | SELECT column1, column2

[output] | for i in $(seq 0 $((${#array[@]} - 1))); do echo "${array[$i]}" done [instruction] | How would you write a for loop to iterate over an array of integers in Bash? [input] |

[output] | function sumTest(){ let expectedResult = 15; let actualResult = sum(5, 10); if(expectedResult === actualResult){ console.log("sum test passed"); } else{ console.log("sum test failed"); } } sumTest(); [instruction] | How can you test a user-defined function with the name "sum" in JavaScript? [input] |

[output] | SELECT name, age FROM students WHERE age >= 18 AND active = 1 ORDER BY age ASC LIMIT 10 [instruction] | Construct an SQL query that significantly improves the performance of a given query. [input] | SELECT * FROM students WHERE age >= 18

[output] | #!/bin/bash echo "Please enter your name:" read name echo "Hello $name!" [instruction] | Create a bash script that asks a user to type in their name and prints out "Hello <name>" [input] |

[output] | int[] arr = {1, 2, 3, 4}; for (int element : arr) { System.out.println(element); } [instruction] | Produce the Java equivalent of the following PHP code block. [input] | $arr = array(1, 2, 3, 4); foreach ($arr as $element) { echo $element; }

[output] | def fibonacci x = 1 y = 1 for i in 1..5 output = x sum = x + y x = y y = sum puts output end end fibonacci() [instruction] | Write a 5-line Ruby program to print the Fibonacci series from 1 to 5. [input] |

[output] | The "break" keyword is used in a switch statement to terminate the switch block. When it is encountered, the code execution jumps to the line immediately after the switch block. It is also used to exit out of a loop if a certain specified condition is met. [instruction] | Explain the role of the "break" keyword in a switch statement in Java. [input] |

[output] | def is_prime?(num) (2..Math.sqrt(num)).each { |n| return false if num % n == 0 } true end [instruction] | Write a Ruby program that takes user input and checks if the input is a prime number. [input] |

[output] | <form action="form.php" method="POST"> <label>Name:<input type="text" name="name"></label> <label>Email:<input type="email" name="email"></label> <input type="submit" value="Submit"> </form> [instruction] | Create a HTML form which collects a user's name and email. [input] |

[output] | class Book { String title; String author; String isbn; public Book(String title, String author, String isbn) { this.title = title; this.author = author; this.isbn = isbn; } } [instruction] | Create a class in Java which stores the details of a book (title, author, ISBN). [input] |

[output] | public static int maxElement(int[] nums) { int max = 0; for (int i = 0; i < nums.length; i++) max = Math.max(nums[i], max); return max; } [instruction] | Write a Java program which prints out the maximum element in an array. [input] | nums = [6, 4, 7, 2, 8]

[output] | <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>User Profile</title> </head> <body> <h1>User Profile</h1> <p>Name: John Doe</p> <p>Age: 24</p> <p>Phone Number: 123-456-789</p> </b [instruction] | Develop an HTML page which displays a user's profile information (name, age, phone number). [input] |

[output] | UPDATE users SET age = age + 1 WHERE id = <specified_id>; [instruction] | Create a SQL query that updates the age of a user with a given ID. [input] |

[output] | #include<iostream> using namespace std; struct Node { int data; Node *next; }; // Function to search a given element x in the list bool search(Node* head, int x) { Node* current = head; while (current != NULL) { if (current->data == x) return true; [instruction] | Write C++ code to search for a particular element in a singly linked list. [input] | Linked list: 1->2->5->7->9 Element to be searched: 5

← → 방향키로 페이지 이동 · 숫자 입력 후 Enter로 점프