instruction
stringlengths
2
259
⌀
input
stringlengths
0
442
⌀
output
stringlengths
1
1.9k
⌀
text
stringlengths
273
2.08k
⌀
Summarize key facts about „Wood thrush“ clearly and accurately.
**Wood thrush** The wood thrush (Hylocichla mustelina) is a North American passerine bird in the family Turdidae and is the only species placed in the genus Hylocichla. It is closely related to other thrushes such as the American robin and is widely distributed across North America, wintering in Central America and so...
null
Summarize key facts about „Rashposhteh“ clearly and accurately.
**Rashposhteh** Rashposhteh (, also Romanized as Rāshposhteh) is a village in Chehel Shahid Rural District, in the Central District of Ramsar County, Mazandaran Province, Iran. At the 2006 census, its population was 22, in 7 families. References Populated places in Ramsar County
null
How would you convert a given number in hexadecimal format to binary?
number = 3E
hex_to_binary = bin(int(number, 16)).replace("0b", "") print(hex_to_binary)
null
Design an algorithm to find the shortest path in a maze using JavaScript.
function findShortestPath(maze) { let visited = new Set(); let queue = []; queue.push({ row: 0, col: 0 }); let minLength = Number.POSITIVE_INFINITY; while (queue.length > 0) { let node = queue.shift(); let row = node.row; let col = node.col; let length = node.length; // Reached the end if (row === maze.length - 1 && co...
null
Design a method in Ruby that can be used to determine if a given number is a prime number or not.
number = 7
def prime?(number) (2..number/2).each do |i| if number % i == 0 return false end end return true end
null
Write an R function that computes the mean of two numbers.
compute_mean <- function(x, y) { mean = (x + y) / 2 return(mean) }
null
Name the class for this object-oriented design.
[Image]
The class name for this object-oriented design should be Foo.
null
Stručně shrň článek o tématu „FK Senica 2013/2014“ a uveď hlavní fakta.
**FK Senica 2013/2014** Tento článek se podrobně zabývá sestavou a zápasy týmu FK Senica v sezoně 2013 – 2014. V této sezoně FK Senica neobhajuje žádnou trofej z předchozí sezony, ve které skončila v Corgoň lize na 2. místě. Mužstvo nastoupilo v Evropské lize, kde ve druhém předkole podlehlo srbskému týmu FK Mladost P...
null
Summarize key facts about „Drawida“ clearly and accurately.
**Drawida** Drawida is a genus of annelids belonging to the family Moniligastridae. The species of this genus are found in Southern Asia and Malesia. Species: Drawida abscisa Drawida aculeata Drawida affinis Drawida agricola Drawida alishanensis Drawida ampullacea Drawida ancisa Drawida annamensis Drawida annandalei D...
null
Train a machine learning algorithm from a given dataset.
Dataset: The data contains information about students' results in an exam.
import pandas as pd from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression # Read the dataset data = pd.read_csv("data.csv") # Split the data into features and labels X = data.drop(['result'], axis=1) y = data['result'] # Split the data into train and test sets X_train, X...
null
Summarize key facts about „Temuka River“ clearly and accurately.
**Temuka River** The Temuka River, originally Te Umu Kaha River, is a river of the Canterbury region of New Zealand's South Island. It is one of numerous rivers which meet close to the south Canterbury town of Temuka, all of which are part of the Opihi River's system. See also List of rivers of New Zealand References ...
null
Stručně shrň článek o tématu „Květen 2013“ a uveď hlavní fakta.
**Květen 2013** 2. května – čtvrtek Vesmírná loď SpaceShipTwo (SS2), s níž chce soukromá společnost Virgin Galactic pořádat komerční výlety mimo zemskou atmosféru, poprvé a úspěšně vyzkoušela za letu raketový motor. Stroj při dlouho odkládaném testu nakrátko překonal rychlost zvuku, kterou bude potřebovat k vystoupání...
null
Ukaž JavaScript — query sel.
```javascript const $ = sel => document.querySelector(sel); ```
null
null
null
null
Derval O'Rourkeová Derval O'Rourkeová (* 28. května 1981, Cork) je irská atletka, překážkářka, jejíž specializací je běh na 60 a 100 metrů překážek. V roce 2006 se stala v Moskvě halovou mistryní světa. Kariéra V roce 2005 získala na světové letní univerziádě v tureckém İzmiru dvě bronzové medaile (100 m přek., štafet...
Summarize key facts about „Burton RFC“ clearly and accurately.
**Burton RFC** Burton Rugby Club is an English rugby union team based in Burton upon Trent in Staffordshire. The club operates six senior teams, including an under-22s team, academy sides and a full range of junior teams. The first XV currently plays in the Regional 1 Midlands following their promotion as champions of...
null
Write some Java code to fill in an array of size n with all consecutive numbers from 1 to n.
public void fill(int[] array, int n) { for (int i = 0; i < n; i++) { array[i] = i + 1; } }
null
Napiš v JavaScriptu: unique.
```javascript const unique = arr => [...new Set(arr)]; ```
null
Stručně shrň článek o tématu „Kool & the Gang“ a uveď hlavní fakta.
**Kool & the Gang** Kool & the Gang je americká crossover skupina, která míchala R&B s disco, jazzem, funkem i soulem. Skupina byla založena v roce 1964 ve státě New Jersey, městě Jersey City. Do skupiny patří James „J.T.“ Taylor (vokalista), Robert „Kool“ Bell (basista), Ronald Bell (tenor saxofonista), George „Funky...
null
Implementuj `to_upper` v Pythonu — převod na velká písmena.
```python def to_upper(s: str) -> str: return s.upper() ```
null
How do I center a div in CSS?
Modern way: ```css .container { display: flex; justify-content: center; align-items: center; min-height: 100vh; } ```
null
Create a program that reads a list of integers and returns the highest prime number in the list.
def get_highest_prime(numbers): highest_prime = 0 for num in numbers: for i in range(2, num): if (num % i == 0): break else: highest_prime = max(highest_prime, num) return highest_prime
null
Stručně shrň článek o tématu „Vrh svislý“ a uveď hlavní fakta.
**Vrh svislý** Vrh svislý je pohyb tělesa v homogenním gravitačním poli, při kterém počáteční rychlost tělesa má směr svisle vzhůru – proti směru gravitační síly. Kromě gravitační síly nepůsobí na těleso žádná další síla (příp. jsou další síly zanedbatelné). Vrh svislý je v první fázi (pohyb nahoru) rovnoměrně zrychle...
null
Summarize key facts about „Jan Sladký Kozina“ clearly and accurately.
**Jan Sladký Kozina** Jan Sladký Kozina (10 September 1652 in Újezd – 26 November 1695 in Plzeň) was the Czech revolutionary leader of the Chodové peasant rebellion at the end of the 17th century. Biography Jan Sladký Kozina was first named Rosocha, after Rosoch Farm (U Rosochů), which from 1632 had belonged to his gr...
null
Explain the use of webhooks in server-side applications
Webhooks are useful for server-side applications as they allow programs to receive real-time updates from external services. Instead of the application periodically polling for changes, webhooks allow for the external service to make an HTTP POST request to the application each time an event occurs. This provides a mor...
null
Summarize key facts about „Gherasim Luca“ clearly and accurately.
**Gherasim Luca** Gherasim Luca (; 23 July 1913 – 9 February 1994) was a Romanian surrealist theorist and poet. Born Salman Locker in Romania and also known as Costea Sar, and Petre Malcoci, he became an apatrid after leaving Romania in 1952. Biography Born in Bucharest the son of Jewish tailor Berl Locker (died 1914)...
null
Create a for loop in Java to print out the integers from 10 to 1 in decreasing order.
for(int i=10; i>=1; i--) { System.out.println(i); }
null
Stručně shrň článek o tématu „Muzikál“ a uveď hlavní fakta.
**Muzikál** Muzikál je syntetický dramatický žánr, jenž spojuje literaturu a hudbu. Slovo muzikál má vícero významů a může označovat též muzikálový film (tj. filmovou adaptaci muzikálu coby dramatického díla) anebo divadelní inscenaci muzikálu, případně též muzikálové divadlo jako druh divadla (vedle činohry, opery a ...
null
Write a python program to extract the substring from a string after a specific character
string = "Hello,World!" character = ","
string = "Hello,World!" character = "," result = string[string.find(character)+1:] print(result) # World!
null
Explain how Python List Comprehensions work?
Python List Comprehensions allow users to quickly build a list from another list or an iterable. List Comprehensions use a syntax that consists of an expression followed by a ‘for’ statement and then zero or more ‘for’ or ‘if’ clauses. The expression is evaluated once for each item in the list. List Comprehensions can ...
null
Summarize key facts about „Robert I. Toll“ clearly and accurately.
**Robert I. Toll** Robert Irwin Toll (December 30, 1940 – October 7, 2022) was an American businessman who co-founded the luxury homebuilder company Toll Brothers. Biography Robert Irwin Toll was born to a Jewish family, the son of Sylvia (née Steinberg) and Albert Toll, he grew up in Elkins Park, Pennsylvania. His fa...
null
Ukaž Python kód — merge dicts.
```python def merge(a, b): return {**a, **b} ```
null
Create a function for splitting a string into an array of characters.
def split_string_to_chars(string): '''This function takes a string and splits it into an array of characters.''' return list(string)
null
Write a regular expression to extract all email addresses from a string.
string = "My email address is john@doe.com and your email address is jane@doe.com"
import re emails = re.findall(r"[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+", string) print(emails)
null
Kolik je 11 - 7?
11 - 7 = 4
null
Stručně shrň článek o tématu „Jiří Zmidloch“ a uveď hlavní fakta.
**Jiří Zmidloch** Jiří Zmidloch (* 1978) je český herec a podnikatel. Absolvoval magisterské studium biochemie na Přírodovědecké fakultě Masarykovy univerzity v Brně, poté Janáčkovu akademii múzických umění v Brně. V letech 2007–2009 byl v angažmá v Městském divadle Brno. Během tříletého angažmá se objevil v mnoha muz...
null
Stručně shrň článek o tématu „Josef Hádek“ a uveď hlavní fakta.
**Josef Hádek** Josef Hádek (26. května 1922, Bozkov u Semil – 13. července 2009, Město Albrechtice) byl kněz v litoměřické diecézi. Život Na kněze byl vysvěcen 8. dubna 1950 předčasně a tajně biskupem Trochtou v soukromé kapli biskupské rezidence. Spolupracoval s Františkem Rabasem, tajným generálním vikářem a když F...
null
Stručně shrň článek o tématu „Vůz WRmee814 ČD“ a uveď hlavní fakta.
**Vůz WRmee814 ČD** {{DISPLAYTITLE:Vůz WRmee814 ČD}} Vozy WRmee814, číslované v intervalu 61 54 88-81, v 90. letech označené WRRm, jsou jídelní vozy z vozového parku Českých drah. Všechny tři vozy (016–018) vznikly v roce 1994 modernizací původních vozů WRRm v ŽOS České Velenice. Další modernizace vozů proběhla v lete...
null
null
null
null
Churchman baronets There have been two baronetcies created for members of the Churchman family, both in the Baronetage of the United Kingdom. Both creations are extinct. The Churchman Baronetcy, of Abbey Oaks in the parish of Sproughton in the County of Suffolk, was created in the Baronetage of the United Kingdom on 3...
Design a JSON structure including a "name" field and a "date" field.
{"name": "", "date": ""}
null
Stručně shrň článek o tématu „Friville-Escarbotin“ a uveď hlavní fakta.
**Friville-Escarbotin** Friville-Escarbotin je francouzská obec v departementu Somme v regionu Hauts-de-France. V roce 2010 zde žilo 4 541 obyvatel. Je centrem kantonu Friville-Escarbotin. Vývoj počtu obyvatel Související články Seznam obcí v departementu Somme Externí odkazy Reference Obce v departementu Somme
null
Prompt the user to enter a year and output whether it is a leap year or not.
year = int(input("Please enter a year: ")) if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0: print("It is a leap year.") else: print("It is not a leap year.")
null
Rewrite the following JavaScript code as an arrow function.
function sum(a, b) { return a + b; }
const sum = (a, b) => a + b;
null
Generate a complete HTML document using the given parameters.
title: GPT Demo heading: Welcome to the GPT Demo body: This is a demo of GPT on coding tasks.
<!DOCTYPE html> <html> <head> <title>GPT Demo</title> </head> <body> <h1>Welcome to the GPT Demo</h1> <p>This is a demo of GPT on coding tasks.</p> </body> </html>
null
Summarize key facts about „Anstey College of Physical Education“ clearly and accurately.
**Anstey College of Physical Education** Anstey College of Physical Education, founded in 1897 as the Anstey Physical Training College, was a pioneer training college for teachers of girls' physical education, only the second such institution for women in the United Kingdom. Located for most of its history in the Erdi...
null
Create an SQL query to get the average of all the prices in the products table.
SELECT AVG(price) FROM products;
null
Co je knihovna?
Knihovna je sada funkcí/modulů, které použiješ ve svém kódu (requests, numpy).
null
Find the highest common factor of two numbers 8 and 12.
The highest common factor of 8 and 12 is 4.
null
Generate a PHP program to accept a string as an input and convert it to uppercase.
<?php $str = 'Hello World!'; echo strtoupper($str); // Output: HELLO WORLD! ?>
null
null
null
null
Hurricane Smith (1952 film) Hurricane Smith is a 1952 American adventure film directed by Jerry Hopper and starring Yvonne de Carlo, John Ireland, James Craig, Forrest Tucker, Lyle Bettger and Richard Arlen. Plot The film is set at an undetermined date but presumably is intended to be in the later 19th century. Costum...
Create an HTML page displaying a table of 3 rows and 3 columns.
<table> <tr> <td>Column 1</td> <td>Column 2</td> <td>Column 3</td> </tr> <tr> <td>Row 1</td> <td>Row 1</td> <td>Row 1</td> </tr> <tr> <td>Row 2</td> <td>Row 2</td> <td>Row 2</td> </tr> <tr> <td>Row 3</td> <td>Row 3</td> <td>Row 3</td> </tr> </table>
null
Stručně shrň článek o tématu „CBU-87 CEM“ a uveď hlavní fakta.
**CBU-87 CEM** CBU-87 CEM (Combined Effects Munition) je kazetová puma používaná letectvem Spojených států amerických (USAF), vyvinutá společnostmi Aerojet a Honeywell. Zbraň byla zavedena v roce 1986 jako náhrada za dřívější kazetové pumy, které byly požívány během války ve Vietnamu. CBU znamená „Cluster Bomb Unit“. ...
null
Answer the following question: What is an example of a while loop in JavaScript?
A while loop in JavaScript repeats a set of instructions while a given condition is true. For example: let i = 0; while (i < 10) { console.log(i); i++; }
null
What will be the ouptut of below operation?
print(4 >> 2)
1
null
Stručně shrň článek o tématu „Bílý Potok (Vrbno pod Pradědem)“ a uveď hlavní fakta.
**Bílý Potok (Vrbno pod Pradědem)** Bílý Potok (něm. Weisseseife, polsky Biały Potok) je osada, část města Vrbno pod Pradědem v okrese Bruntál. Historie Osada vznikla pod jménem Zainhütte v roce 1828 při stejnojmenné huti a hamru postavené vratislavským biskupem. Vratislavské biskupství zde zpracovávalo vlastní železn...
null
Create a JavaScript function to extract the text from a given HTML element.
function extractText(element) { return element.textContent || element.innerText; }
null
Develop an algorithm that checks for balanced parentheses in a given string.
def is_balanced(input_string): stack = [] for char in input_string: if char == '(': stack.append(char) elif char == ')': if len(stack) == 0: return False else: stack.pop() return len(stack) == 0
null
Stručně shrň článek o tématu „Dějiny Evropy“ a uveď hlavní fakta.
**Dějiny Evropy** Dějiny Evropy se zabývají objevováním a shromažďováním, studiem, organizováním a prezentací a výkladem minulých událostí a lidských poměrů v Evropě od počátku písemných záznamů. Během neolitu a v době migrací Indo-Evropanů Evropa zažila příliv lidí z východu a jihovýchodu a následnou důležitou kultur...
null
Complete the following code so it swaps two given elements in the list.
list = [1, 3, 7, 4, 2] def swap(list, i, j): # Your code here
list = [1, 3, 7, 4, 2] def swap(list, i, j): # Swap the elements list[i], list[j] = list[j], list[i]
null
Stručně shrň článek o tématu „Droga wojewódzka 216“ a uveď hlavní fakta.
**Droga wojewódzka 216** Droga wojewódzka 216 (DW 216) je silnice v severním Polsku spojující města Reda a Hel. Její délka je 56 km. Poté, co opustí Puck, vede téměř souběžně s pobřežím Puckého zálivu. Vzhledem k tomu, že je to jediná silnice vedoucí na Helskou kosu, je využívána nejen místními řidiči, ale během léta ...
null
null
null
null
Vůz Bpee247, 242, 239, 237 ČD {{DISPLAYTITLE:Vůz Bpee247, 242, 239, 237 ČD}} Vozy řady Bpee247, číslované v intervalu 51 54 20-70, v 90. letech označené Bhee, a Bpee242, Bpee239 a Bpee237, shodně číslované v intervalu 61 54 20-70), jsou řady příbuzných osobních vozů z vozového parku Českých drah. Všechny vozy Bpee247 ...
Create a conditional statement using the given variables.
x = 5 y = 10
if x < y: print("x is less than y")
null
Summarize key facts about „Sociology Lens“ clearly and accurately.
**Sociology Lens** Sociology Lens is a peer-reviewed journal is edited by an international panel of historians, anthropologists, geographers and sociologists. Previously named the Journal of Historical Sociology, the journal is both interdisciplinary in approach and innovative in content. Sociology Lens was founded in...
null
Potřebuju Python helper `last_n`: vrátí posledních n prvků.
```python def last_n(xs: list, n: int) -> list: return xs[-n:] if n else [] ```
null
null
null
null
Slutdrop Slutdrop is a dance move. The move involves squatting as quickly and as low as possible and immediately popping back up. A hand is often put straight up to steady oneself, and the move is often performed whilst grinding a dance partner that the dropper is trying to impress. The term is a compound word combini...
Create a HTML link with the following description
Go to HackerRank
<a href="https://www.hackerrank.com" target="_blank">Go to HackerRank</a>
null
Parse the following XML code and print all the "name" fields.
<employees> <employee> <name>John</name> <age>35</age> </employee> <employee> <name>Alex</name> <age>42</age> </employee> </employees>
import xml.etree.ElementTree as ET # parse the xml file root = ET.parse('employees.xml').getroot() for employee in root.findall('employee'): name = employee.find('name').text print(name)
null
Write a SQL query to select all companies where the number of employees is greater than 50.
Table name: companies Employee column: employees
SELECT * FROM companies WHERE employees > 50;
null
Edit the following program to improve its execution speed
#include <iostream> int n = 100; void foo(int n) { for (int i = 0; i < n; i++) std::cout << i << "\n"; } int main() { foo(n); return 0; }
#include <iostream> int n = 100; void foo(int n) { int chunk_size = 5; for (int i = 0; i < n; i+=chunk_size) { for (int j = i; j < i + chunk_size; j++) std::cout << j << "\n"; } } int main() { foo(n); return 0; }
null
Summarize key facts about „Al-Jihad (Baghdad)“ clearly and accurately.
**Al-Jihad (Baghdad)** Jihad (Al-Jihad or Hayy Al-Jihad) is a neighborhood (hayy) in the Al Rashid district in western Baghdad, Iraq. To the north is Al-A'amiriya (Amiriya) on the other side of Baghdad Airport Road, and to the east is Al-A'amel. The New York Times has said, "a former slice of mixed middle-class calm i...
null
Potřebuju Python helper `avg_list`: spočítej průměr.
```python def avg_list(xs: list[float]) -> float: return sum(xs) / len(xs) if xs else 0.0 ```
null
Update the given code to generate the correct output
def func(x, n): s = 0 for i in range (n): s += (x**i) return s Output: The sum of series x^1 + x^2 + x^3 + ... + x^n is
def func(x, n): s = 0 for i in range (n): s += (x**i) return s def generateSumString(x, n): result = "The sum of series " for i in range(1, n+1): result += x + "^" + str(i) if(i != n): result += " + " else: result += " is" return result def main(): x = 4 n = 5 print(generateSumString(x, n), func(x,n)) main()
null
Write an HTML page which displays the current time and date.
<html> <body> <p>Today is <span id="date"> </span> and the time is <span id="time"> </span>.</p> <script> let d = new Date(); let date = d.toDateString(); document.getElementById("date").innerHTML = date; let time = d.toLocaleTimeString(); document.getElementById("time").innerHTML = time; </script> </body> </html>
null
Create a while loop in JavaScript to print out all the numbers between 20 and 30.
let i = 20; while (i <= 30) { console.log(i); i++; }
null
Create an array of elements that are the squares of the integers between 1 and 10
squares = [x**2 for x in range(1, 11)]
null
Generate a correct C++ class definition to fulfill the following tasks.
Create a class that has four member variables: a, b, c and d.
class MyClass { public: int a; int b; int c; int d; };
null
Summarize key facts about „Herink“ clearly and accurately.
**Herink** Herink is a municipality and village in Prague-East District in the Central Bohemian Region of the Czech Republic. It has about 1,000 inhabitants. As of census 2001, Herink had 72 inhabitants and therefore it is one of the fastest-growing municipalities in the country. Gallery References Villages in Prague-...
null
Write a CSS selector to select all the links in a web page.
a { color: blue; }
null
null
null
null
Manisha Malhotra Manisha Malhotra ( Manīṣā Maľhōtrā; born 19 September 1976) is a retired tennis player from India. Her career high in singles is 314, achieved on 21 April 2003. In doubles, she peaked at No. 149 in the WTA rankings on 8 April 2002. In her career, Malhotra won five singles and seven doubles titles on t...
Create a query in SQL to find the product IDs of all items having a given color.
color = "red"
SELECT product_id FROM products WHERE color = 'red';
null
Explain what is the value of the variable x after this following code is executed:
x = 5 y = x + 9
The value of x after the code is executed is 5. After y is assigned the value of x + 9, the value of x is unchanged.
null
null
null
null
Ronnie Cruz Ronnie Valentin Cruz (born June 11, 1981) is a former American football fullback. He was signed by the Kansas City Chiefs as an undrafted free agent in 2004. He played college football at Northern State University. Cruz has also been a member of the Dallas Cowboys. Early years Ronnie Cruz was named footbal...
Stručně shrň článek o tématu „Rudolf Gergel“ a uveď hlavní fakta.
**Rudolf Gergel** Rudolf Gergel (* 9. srpna 1952) je bývalý československý fotbalista, útočník. Fotbalová kariéra V československé lize hrál za Duklu Praha. Nastoupil v 53 ligových utkáních a dal 4 góly. V Poháru UEFA nastoupil ve 4 utkáních proti Djurgårdens IF Fotboll a FC Twente Enschede. Do Dukly přišel na vojnu z...
null
Stručně shrň článek o tématu „Tiffany & Co.“ a uveď hlavní fakta.
**Tiffany & Co.** Tiffany & Co. (zkráceně Tiffany) je americká společnost prodávající luxusní šperky, hodinky, drahokamy, módní doplňky a parfémy, s hlavním sídlem v New Yorku. Sortiment Firma Tiffany v současnosti prodává šperky, stříbrné mince, porcelán, křišťál, lahvičky a flakóny, náramkové a závěsné hodinky, kaze...
null
You need to develop a Java function to get the count of a given character in a given string.
string = "Hello World" character = 'l'
public static int CountChar(String string, char character) { int count = 0; for (int i=0; i<string.length(); i++) { if (string.charAt(i) == character) count++; } return count; }
null
Identify the longest consecutive sequence of zeros in a binary string.
110010001
public static int longestSequenceOfZeros(String s) { int max_len = 0; int count = 0; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) == '0') { count++; max_len = Math.max(max_len, count); } else { count = 0; } } return max_len; }
null
Napiš SQL: vyber 14 nejnovějších objednávek z tabulky orders.
```sql SELECT * FROM orders ORDER BY created_at DESC LIMIT 14; ```
null
Stručně shrň článek o tématu „Serhij Pivněnko“ a uveď hlavní fakta.
**Serhij Pivněnko** Serhij Serhijovyč Pivněnko (ukrajinsky Сергій Сергійович Півненко, * 19. října 1984, Luhansk, Ukrajinská SSR, Sovětský svaz) je ukrajinský fotbalista a bývalý mládežnický reprezentant. Externí odkazy Profil hráče na webu Ukrajinské fotbalové asociace Profil hráče na arsenal-kiev.com.ua Ukrajinští f...
null
Implement a code that checks if a given word is palindrome.
Word: malayalam
def is_palindrome(word): reversed_word = word[::-1] if reversed_word == word: return True else: return False print(is_palindrome("malayalam")) Output: True
null
Summarize key facts about „Silvio Schaufelberger“ clearly and accurately.
**Silvio Schaufelberger** Silvio Schaufelberger (born 21 March 1977) is a Swiss bobsledder who has competed from the late 1990s to the early 2000s. He won a silver medal in the four-man event at the 1999 FIBT World Championships. Schaufelberger also finished fourth in the four-man event at the 2002 Winter Olympics in ...
null
Summarize key facts about „La Vie Magnifique De Charlie“ clearly and accurately.
**La Vie Magnifique De Charlie** La Vie Magnifique De Charlie is a 2017 American comedy-drama film directed by Bobby Huntley and co-produced by director himself with Nikki Wade. The film stars Kortnee Price, Lailaa Brookings, and Nikki Lashae with Ashley S. Evans, Kai N. Ture, Priah Ferguson, Nicole Douglas, and Mary ...
null
Write a Java program to find the second most frequent character in a string.
String: "Hello World!"
public class SecondMostFrequent { public static char findSecondMostFrequent(String str) { int[] counts = new int[26]; for(int i = 0; i < str.length(); i++) counts[str.charAt(i)- 'a']++; int index = 0; int max_count = 0; for(int i = 0; i < str.length(); i++) { if(counts[str.charAt(i) - 'a'] > max_count) { max_count = co...
null
Edit the given Python code to make the algorithm run faster.
def slow_algo(n): result = 0 for i in range(n): result += i return result
def fast_algo(n): result = (n * (n + 1))// 2 return result
null
null
null
null
Mechanický stroj Mechanický stroj je zařízení, které přenáší pohyby a síly, mění jejich rychlost, velikost, směr nebo smysl otáčení. Při těchto změnách ovšem množství přenášené mechanické práce neroste, nýbrž naopak ubývá o ztráty, způsobené třením a podobně. Mezi mechanické stroje se řadí především jednoduché stroje,...
null
null
null
Bitva u Rocroi Bitva u Rocroi byla jednou z bitev třicetileté války a války mezi Španělskem a Francií, která se odehrála 19. května 1643 u severofrancouzského Rocroi. Významnou se stala, protože slabší francouzská armáda přesvědčivě vyhrála nad silnější armádou založené na do té doby neporažených španělských terciích....
Kolik je 7 - 5?
7 - 5 = 2
null
Kolik je 6 × 3?
6 × 3 = 18
null
null
null
null
Manius (praenomen) Manius ( , ; feminine form: Mania) is a Latin , or personal name, which was used throughout the period of the Roman Republic, and well into imperial times. The name was used by both patrician and plebeian families, and gave rise to the patronymic and . Manius was originally abbreviated with an archa...
Kolik je 18 × 2?
18 × 2 = 36
null
Build a state machine in Python to process incoming keyboard events
# Define a StateMachine class class StateMachine: def __init__(self): self.handlers = {} self.startState = None self.endStates = [] def add_state(self, state): self.handlers[state.name] = state def set_start(self, name): self.startState = name def set_end(self, name): self.endStates.append(name) def run(self): try: han...
null
Summarize key facts about „Lorglumide“ clearly and accurately.
**Lorglumide** Lorglumide (CR-1409) is a drug which inhibits gastrointestinal motility and reduces gastric secretions, acting as a cholecystokinin antagonist, with fairly high selectivity for the CCKA subtype. It has been suggested as a potential treatment for a variety of gastrointestinal problems including stomach u...
null