instruction
stringlengths
2
259
⌀
input
stringlengths
0
442
⌀
output
stringlengths
1
1.9k
⌀
text
stringlengths
273
2.08k
⌀
Write a function in R that takes a vector as an argument and returns a new vector in which each element is the average of that element with its two neighbors from the original vector.
c(1, 4, 2, 8, 6)
average_three <- function(x) { c(mean(c(x[2], x[1])), mean(x), mean(c(x[2], x[3]))) }
null
Kolik je 4 - 2?
4 - 2 = 2
null
Summarize key facts about „Eddie Biedenbach“ clearly and accurately.
**Eddie Biedenbach** Edward Joseph Biedenbach (born August 12, 1945) is an American former basketball player and college basketball coach. Playing career Born in Pittsburgh, Biedenbach attended Edgewood High School in nearby Edgewood. He played collegiately for the North Carolina State University and was selected firs...
null
Write a class and its constructor in Python for a vehicle object that has the fields 'type', 'make', 'model' and 'color'.
Car, Toyota, Camry, Red
class Vehicle: def __init__(self, vehicle_type, make, model, color): self.type = vehicle_type self.make = make self.model = model self.color = color car = Vehicle("Car", "Toyota", "Camry", "Red")
null
Kolik je 16 - 10?
16 - 10 = 6
null
Stručně shrň článek o tématu „Oblastní hokejové soutěže 1959/1960“ a uveď hlavní fakta.
**Oblastní hokejové soutěže 1959/1960** Československé oblastní soutěže ledního hokeje 1959/1960 byla třetí nejvyšší hokejovou soutěží na území Československa. Systém soutěže Soutěž se byla rozdělena do 8 skupin po 6 účastnících. Ve skupinách se všechny kluby utkaly každý s každým (celkem 10 kol). Vítězové jednotlivýc...
null
Summarize key facts about „Strauchon River“ clearly and accurately.
**Strauchon River** The Strauchon River is a short river of the West Coast Region of New Zealand's South Island. It flows southwest from the face of the Strauchon Glacier to reach the Copland River five kilometres northwest of Mount Sefton. The river's entire length is within Westland Tai Poutini National Park. See al...
null
Given a string, write a function to remove all the duplicate characters.
string = "apple"
def remove_duplicates(string): new_string = "" for char in string: if char not in new_string: new_string += char return new_string
null
Summarize key facts about „Nagendra Babu“ clearly and accurately.
**Nagendra Babu** Konidela Nagendra "Naga" Babu (born 29 October 1961) is an Indian actor and producer who works in Telugu cinema. As a producer, he won one National Film Award and two Nandi Awards. Acting career Nagendra Babu acts mainly in supporting roles and villain roles, though he has also played the lead role i...
null
Write a SQL query to find the maximum and minimum salaries of employees in a given company.
SELECT MAX(salary), MIN(salary) FROM Employee
null
Stručně shrň článek o tématu „Musée Galliera“ a uveď hlavní fakta.
**Musée Galliera** Musée Galliera (též Musée Brignole-Galliera nebo Musée de la Mode) je městské muzeum v Paříži. Nachází se v 16. obvodu v ulici Avenue Pierre-Ier-de-Serbie v budově, kterou nechala postavit vévodkyně de Galliera. Muzeum se zaměřuje na oblečení a módu. Vzhledem k křehkosti exponátů nemá muzeum stálou ...
null
Summarize key facts about „Diamond Valley Railway“ clearly and accurately.
**Diamond Valley Railway** The Diamond Valley Railway is a ridable miniature railway located at Eltham Lower Park, Eltham, Victoria (a suburb of Melbourne, Australia). The railway operates a variety of live steam, battery electric and petrol/diesel powered locomotives. It is run by volunteers and operates on every Sun...
null
Write a TensorFlow program for a linear regression model.
import tensorflow as tf # Create variables a = tf.Variable(0.5) b = tf.Variable(0.5) # > Create the input data, y and x x = tf.placeholder(tf.float32) y = tf.placeholder(tf.float32) # > Model: y = ax + b y_pred = a * x + b # > Loss: Mean Squared Error (MSE) loss = tf.reduce_mean(tf.square(y_pred - y)) # > Optimizer: Gr...
null
Identify which elements in an array are even numbers.
nums = [1, 2, 3, 4, 5]
def is_even_num(nums): result = [] for num in nums: if num % 2 == 0: result.append(num) return result
null
Design a JavaScript function for calculating the hypotenuse of a right triangle.
a = 6; b = 8;
function getHypotenuse(a,b){ return Math.sqrt(a*a + b*b); }
null
Create a function in Java that takes a string and prints the reversed version.
public static void reverseString(String str) { StringBuilder sb = new StringBuilder(); for (int i = str.length() - 1; i >= 0; i--) { sb.append(str.charAt(i)); } System.out.print(sb.toString()); }
null
null
null
null
Moment of Truth (ELO Part II album) Moment of Truth is the second and final album by ELO Part II, released in October 1994. The cover illustration by Graham Reynolds depicts an incandescent light bulb shattering. The light bulb image continues a visual theme that began with the light bulb depicted on the cover of Elec...
Create a Ruby function to generate a number between 0 and 1.
def random_number rand end puts random_number
null
Summarize key facts about „The C Programming Language“ clearly and accurately.
**The C Programming Language** The C Programming Language (sometimes termed K&R, after its authors' initials) is a computer programming book written by Brian Kernighan and Dennis Ritchie, the latter of whom originally designed and implemented the C programming language, as well as co-designed the Unix operating system...
null
Stručně shrň článek o tématu „Vítr v kapse“ a uveď hlavní fakta.
**Vítr v kapse** Vítr v kapse je český film režiséra Jaroslava Soukupa natočený v roce 1982. Mladí muži (Lukáš Vaculík a Sagvan Tofi) nastoupí po vyučení do svého prvního zaměstnání jako pomocní dělníci a jejich mladické plány se střetávají s životní realitou. Obsazení Externí odkazy České dramatické filmy Filmy z rok...
null
Write a SQL query to display all the columns of the 'Employees' table.
SELECT * FROM Employees;
null
Summarize key facts about „Jon Lundberg“ clearly and accurately.
**Jon Lundberg** Jon Lundberg (born June 26, 1961 in Royal Oak, Michigan) is an American politician and a Republican member of the Tennessee State Senate for the 4th district. He was first elected to the 105th Tennessee General Assembly (2007–2008). He serves as deputy speaker of the Senate and first vice chairman of ...
null
Kolik je 28 × 4?
28 × 4 = 112
null
Summarize key facts about „List of Guyana women's international footballers“ clearly and accurately.
**List of Guyana women's international footballers** This is a non-exhaustive list of Guyana women's international footballers – association football players who have appeared at least once for the senior Guyana women's national football team. Players See also Guyana women's national football team References Associati...
null
Summarize key facts about „Naevo“ clearly and accurately.
**Naevo** Naevo is a Fijian surname. Notable people with the surname include: Apisai Naevo (died 2008), Fijian politician and father of the following: Apenisa Naevo (born 1973), Fijian rugby union player Semisi Naevo (born 1976), Fijian rugby union player Fijian-language surnames
null
Write a Python algorithm to find the most common value in an array.
arr = [1, 2, 3, 3, 3, 3, 4, 4, 5]
def most_common(arr): freq = {} # Count the frequency of each element for el in arr: if el not in freq: freq[el] = 1 else: freq[el] += 1 # Find the maximum frequency max_freq = -1 for el, freq in freq.items(): max_freq = max(max_freq, freq) # Find the element with maximum frequency most_common_el = None for el, freq in...
null
Summarize key facts about „Victoria County History“ clearly and accurately.
**Victoria County History** The Victoria History of the Counties of England, commonly known as the Victoria County History or the VCH, is an English history project which began in 1899 with the aim of creating an encyclopaedic history of each of the historic counties of England, and was dedicated to Queen Victoria. In...
null
null
null
null
Když přišli nacisté Když přišli nacisté… Pod tímto českým názvem je obvykle skryt známý úryvek textu připisovaného německému protestantskému teologovi Martinovi Niemöllerovi (1892–1984). Skýtá morální apel na většinovou společnost, jež přehlíží útlak menšin či mu dokonce sama napomáhá. Původ tohoto textu není s určito...
null
null
null
Štěpán Pácl Štěpán Pácl (* 22. srpna 1982 Praha) je český divadelní režisér. Vzdělání a umělecká dráha Vystudoval obor činoherní režie na pražské DAMU (2002–2007). Absolvoval inscenací hry Lenky Lagronové Království (získal titul MgA.). Na pražské DAMU pokračoval doktorským studiem v Ústavu scénické tvorby a teorie sc...
null
null
null
Bezdězská vrchovina Bezdězská vrchovina je geomorfologický okrsek v severovýchodní části Dokeské pahorkatiny, ležící v okrese Česká Lípa Libereckého kraje a částečně v okrese Mladá Boleslav Středočeského kraje. Rozkládá se mezi sídly Kuřívody, Hradčany, Doksy a Bezdědice. Charakter území Území okrsku zahrnuje chráněné...
Create a function in Scala that takes a parameter x and returns the square of x.
def square (x: Int) : Int = x * x
null
Stručně shrň článek o tématu „Hardcore techno“ a uveď hlavní fakta.
**Hardcore techno** Hardcore je druh elektronické hudby, který začal vznikat v 90. letech v Nizozemsku; pod tento termín spadá několik specifických stylů. Je popisován jako nejrychlejší, nejtvrdší a nejagresivnější elektronická hudba. Historie Abychom pochopili vznik hardcoru, je potřeba se vrátit do doby kolem 1970 a...
null
null
null
null
Tourism region A tourism region is a geographical region that has been designated by a governmental organization or tourism bureau as having common cultural or environmental characteristics. These regions are often named after historical or current administrative and geographical regions. Others have names created spe...
Stručně shrň článek o tématu „Saxton Payson“ a uveď hlavní fakta.
**Saxton Payson** Edward Saxton Payson (26. září 1842 – 22. září 1932) byl americký esperantský spisovatel. Narodil se ve městě Groton, ve státě Massachusetts. V mládí zpíval v opeře, od roku 1882 vyráběl piana a v roce 1906 se stal předsedou společnosti vyrábějící piana. Esperanto se naučil v roce 1910. V letech 1918...
null
Write a JavaScript function to find the longest common subsequence between two given sequences.
sequence1 = [1, 5, 9, 3, 2] sequence2 = [8, 2, 5, 7]
function longestCommonSubsequence(sequence1, sequence2) { let dp = []; for(let i=0; i<=sequence1.length; i++) { dp.push([]); for(let j=0; j<=sequence2.length; j++) { dp[i][j] = 0; } } for(let i=1; i<=sequence1.length; i++) { for(let j=1; j<=sequence2.length; j++) { if(sequence1[i-1] == sequence2[j-1]) { dp[i][j] =1+ dp...
null
Spočítej 5×4
5 × 4 = 20
null
null
null
null
Delfín drsnozubý Delfín drsnozubý (Steno bredanensis) je poměrně málo známý, jediný druh monotypického rodu Steno. Svými ze stran mírně zploštělými čelistmi i dalšími znaky ve stavbě kostry připomíná své vzdálené příbuzné suchozemské savce a je proto považován za evolučně nejstaršího příslušníka čeledi delfínovitých. ...
Stručně shrň článek o tématu „Římskokatolická farnost Boršov nad Vltavou“ a uveď hlavní fakta.
**Římskokatolická farnost Boršov nad Vltavou** Římskokatolická farnost Boršov nad Vltavou je územním společenstvím římských katolíků v rámci vikariátu České Budějovice - venkov českobudějovické diecéze. O farnosti Historie Boršov patřil od roku 1290 do majetku vyšebrodských cisterciáků, kteří zde také založili plebáni...
null
Write a Python class for a Person with attributes name, age, and address.
class Person: def __init__(self, name, age, address): self.name = name self.age = age self.address = address def setName(self, name): self.name = name def getName(self): return self.name def setAge(self, age): self.age = age def getAge(self): return self.age def setAddress(self, address): self.address = address def get...
null
null
null
null
Vavrišovo Vavrišovo je obec na Slovensku v okrese Liptovský Mikuláš. První písemná zmínka pochází z roku 1286. V obci se nachází evangelický kostel z 19. století. V katastru obce se v roce 1709 odehrála bitva mezi labanci a kuruci. Odkazy Reference Externí odkazy Obce v okrese Liptovský Mikuláš Obce v regionu Liptov
Create an algorithm for sorting a list of numbers using bubble sort.
[3,1,5,4,2]
def bubble_sort(arr): n = len(arr) for i in range(n): for j in range(0, n-i-1): if arr[j] > arr[j+1] : arr[j], arr[j+1] = arr[j+1], arr[j] return arr bubble_sort([3,1,5,4,2])
null
Napiš Python funkci, která spočítá faktoriál.
```python def factorial(n: int) -> int: if n < 0: raise ValueError("n musí být >= 0") result = 1 for i in range(2, n + 1): result *= i return result ```
null
Summarize key facts about „Live in Seoul“ clearly and accurately.
**Live in Seoul** Live in Seoul may refer to: Albums Live in Seoul, by Metallica 2006 DVD Live in Seoul, by Placido Domingo 1997 Live in Seoul, by Isao Sasaki 2014 Live in Seoul, by Dream Theater 2000 Live in Seoul, by Avril Lavigne 2004 DVD Live in Seoul, by Journey (band), 2005 DVD
null
Stručně shrň článek o tématu „Látka“ a uveď hlavní fakta.
**Látka** Látka je jednou ze dvou základních forem hmoty (vedle pole). Z hlediska složení lze látky nahlížet několika způsoby. Fyzikální makroskopický přístup popisuje látky jako soubor jednotlivých fází, které mohou být různého skupenství a jejichž látkové vlastnosti charakterizují fyzikální veličiny jako hustota, mo...
null
How can you use object serialization in programming?
Object serialization is a process in programming to convert an object into a format that can be easily stored and accessed. It's commonly used to transfer objects between programs, preserve data across time, or save objects to a database. Object serialization can be useful when you need to store information, pass the o...
null
Describe the effects when sorting a list using bubble sort
Bubble sort works by comparing adjacent elements of the list and swapping them if they are out of order. It passes through the list multiple times, with each pass through the list moving the highest value elements to their correct position. This process continues until the list is fully sorted.
null
Edit a given HTML code to make the font size of 1st paragraph 12px.
<body> <p>This is the first paragraph.</p> <p>This is the second paragraph.</p> </body>
<body> <p style="font-size: 12px;">This is the first paragraph.</p> <p>This is the second paragraph.</p> </body>
null
Summarize key facts about „Listriolobus“ clearly and accurately.
**Listriolobus** Listriolobus is a genus of echiurans belonging to the family Echiuridae. The genus has almost cosmopolitan distribution. Species: Listriolobus bahamensis Listriolobus brevirostris Listriolobus capensis Listriolobus hexamyotus Listriolobus pelodes Listriolobus sorbillans References Echiurans Annelid ge...
null
Stručně shrň článek o tématu „SC Herisau“ a uveď hlavní fakta.
**SC Herisau** SC Herisau (celým názvem: Schlittschuhclub Herisau) je švýcarský klub ledního hokeje, který sídlí v obci Herisau v kantonu Appenzell Ausserrhoden. Založen byl v roce 1942. Poslední účast v nejvyšší soutěži je datováno k sezóně 1997/98. Od sezóny 2017/18 působí v 1. lize, čtvrté švýcarské nejvyšší soutěž...
null
Stručně shrň článek o tématu „Arnold Bentley“ a uveď hlavní fakta.
**Arnold Bentley** Arnold Bentley (11. ledna 1913 v Padihamu, Anglie – 18. září 2001) byl významný anglický hudební pedagog a psycholog. Život Arnold Bentley byl jedním z průkopníků výzkumu hudební výchovy. Pohyboval se na Universitě v Readingu po většinu svého pracovního života a byl pozván, aby zde vytvořil první po...
null
Rewrite the following function to optimize its performance.
def indexString(listStr, s): output = [] for i in listStr: if s in i: output.append(i) return output
def indexString(listStr, s): output = [] for i in listStr: if i.find(s) != -1 : output.append(i) return output
null
Spočítej: 25 + 5 = ?
25 + 5 = 30
null
Generate an array of length n that contains the square of the numbers from 1 to n.
n = 10
def generate_square_numbers(n): arr = [] for i in range(1, n+1): arr.append(i*i) return arr
null
Generate a SQL query to retrieve a list of all the movies released in 2019.
SELECT * FROM movies WHERE year = 2019;
null
Summarize key facts about „Patrick Sinclair“ clearly and accurately.
**Patrick Sinclair** Lieutenant-General Patrick Sinclair (1736 – 31 January 1820) was a British Army officer and governor in North America. He is best remembered for overseeing the construction of Fort Mackinac on Mackinac Island in what was to become the U.S. state of Michigan. Biography Sinclair was born in Lybster,...
null
Stručně shrň článek o tématu „Malý Sheldon“ a uveď hlavní fakta.
**Malý Sheldon** Malý Sheldon (v anglickém originále Young Sheldon; stylizované jako young Sheldon) je americký komediální seriál stanice CBS, vytvořený Chuckem Lorrem a Stevenem Molarem. Seriál je spin-offem a zároveň prequelem sitcomu Teorie velkého třesku a sleduje postavu Sheldona Coopera od věku devíti let, který...
null
Stručně shrň článek o tématu „Coulomb“ a uveď hlavní fakta.
**Coulomb** Coulomb je odvozená jednotka SI veličiny elektrický náboj. Pojmenována byla na počest francouzského fyzika Charlese-Augustina de Coulomba. Značkou coulombu je C. Definice Je definován jako elektrický náboj přenesený proudem 1 ampéru během 1 sekundy (tzn. 1 coulomb = 1 ampérsekunda). C = A ⋅ s Vlastnosti Ve...
null
Summarize key facts about „Te Wharau River“ clearly and accurately.
**Te Wharau River** The Te Wharau or Stony River is a river of the West Coast Region of New Zealand's South Island. It flows generally east from its sources in the Paparoa Range to reach the Inangahua River 15 kilometres north of Reefton. See also List of rivers of New Zealand Hangatahua River References Rivers of the...
null
Summarize key facts about „Rick Bailey“ clearly and accurately.
**Rick Bailey** Rick Bailey (born June 25, 1954) is a former American rugby union player who represented the United States national team eleven times between 1979 and 1987. Playing at prop, he made three appearances at the inaugural Rugby World Cup in 1987. He did not score an international try during his career. In S...
null
Write an R script to find the correlation between two variables.
# read the data dat <- read.csv("data.csv") # calculate the correlation cor(dat$var1, dat$var2)
null
Summarize key facts about „PSWA“ clearly and accurately.
**PSWA** PSWA may refer to: Philadelphia Sports Writers Association (USA), founded in 1904, in Philadelphia, Pennsylvania Professional Social Workers' Association (India), an association of Indian / Tamil Nadu social work professionals
null
Create a code to create a userid from the given firstname and lastname.
Firstname: John Lastname: Smith
def create_userid(firstname, lastname): userid = firstname[0] + lastname[:5] return userid userid = create_userid("John", "Smith") print(userid) # Output: JSmith
null
Potřebuju Python helper `dict_keys`: seřadí klíče slovníku.
```python def sorted_keys(d: dict) -> list: return sorted(d.keys()) ```
null
Stručně shrň článek o tématu „Nürnberger Versicherungscup 2013 – ženská čtyřhra“ a uveď hlavní fakta.
**Nürnberger Versicherungscup 2013 – ženská čtyřhra** Do soutěže ženské čtyřhry na tenisovém turnaji Nürnberger Versicherungscup 2013 nastoupilo šestnáct dvojic. Jednalo se o premiérový ročník ženské profesionální události hraný na antukových dvorcích v německém Norimberku. Deblový titul si připsala nenasazená rumunsk...
null
Summarize key facts about „East of England Regional Select Committee“ clearly and accurately.
**East of England Regional Select Committee** The East of England Regional Select Committee was one of nine regional select committees of the House of Commons in the Parliament of the United Kingdom. The establishment of the committee was agreed by the House of Commons on 12 November 2008, following the appointment of...
null
Convert the following Python statement into C code.
x = x + 1
x++;
null
null
null
null
Jednoduchý stroj Jednoduchý stroj je jeden z druhů mechanických strojů, patřící do této skupiny: Nakloněná rovina - a na stejném principu: Klín Páka - a na stejném principu: Kladka (Pevná kladka - Volná kladka - Kladkostroj) Kolo na hřídeli na obou předchozích principech: Šroub Společným rysem těchto strojů je jednodu...
Summarize key facts about „Isaac of Stella“ clearly and accurately.
**Isaac of Stella** Isaac of Stella, also referred to as Isaac de l'Étoile, (c. 1100, in England – c. 1170s, Étoile, Archigny, France) was a Cistercian and later a Carthusian monk, theologian and philosopher. Life Born in England, after studies in Paris, he entered the Order of Cistercians, probably at Pontigny, durin...
null
Create an HTML page with a form that validates a user's email address.
<html> <head> <title>Email Validation Form</title> </head> <body> <h1>Email Validation Form</h1> <form action="/" method="POST"> <input type="text" name="email" placeholder="Enter your email address"> <button type="submit">Submit</button> </form> <script> let inputField = document.querySelector('input'); inputField.add...
null
Summarize key facts about „Spermosin“ clearly and accurately.
**Spermosin** Spermosin () is an enzyme. This enzyme catalyses the following chemical reaction Hydrolyses arginyl bonds, preferably with Pro in the P2 position This enzyme is isolated from the ascidian (Prochordate) Halocynthia roretzi. References External links EC 3.4.21
null
Using the given code, add the missing terminating condition for the loop.
values = [3, 5, 7] i = 0 while (): # Add the condition print(values[i]) i += 1
values = [3, 5, 7] i = 0 while (i < len(values)): # Add the condition print(values[i]) i += 1
null
Přepiš spisovně: napsal jsem kod
Napsal jsem kód.
null
Summarize key facts about „Orobazus“ clearly and accurately.
**Orobazus** Orobazus was the ambassador of the Parthian king Mithridates II who contacted the Roman magistrate Lucius Cornelius Sulla. This was the first meeting between a Parthian and a Roman official. The results of this meeting are not clear, but it is generally known that during the meeting Sulla was sitting betw...
null
Summarize key facts about „Harappan language“ clearly and accurately.
**Harappan language** The Harappan language is the unknown language or languages of the Bronze Age () Harappan civilization (Indus Valley civilization, or IVC). The Harappan script has long defied attempts to read it, and therefore the language remains unknown. The language being unattested in any readable contemporar...
null
null
null
null
Průplav Seina – severní Evropa Průplav Seina – severní Evropa, Průplav Seina–Sever nebo také Seina–Šelda je velkokapacitní vodocestný transportní systém, který se nyní realizuje, hlavní práce na stavbě průplavu mají začít v roce 2020. Průplav je projektován z řeky Oise v Janville, severně od Compiègne, k vodní cestě D...
Sort a given array using quicksort algorithm.
arr = [3, 2, 9, 10, 1]
def quicksort(arr): if len(arr) <= 1: return arr pivot = arr[len(arr) // 2] left = [x for x in arr if x < pivot] middle = [x for x in arr if x == pivot] right = [x for x in arr if x > pivot] return quicksort(left) + middle + quicksort(right) print(quicksort(arr))
null
Stručně shrň článek o tématu „Kostel svatého Michaela archanděla (Vísky)“ a uveď hlavní fakta.
**Kostel svatého Michaela archanděla (Vísky)** Kostel svatého Michala ve Vískách pochází z přelomu 12. a 13. století. Jde o farní kostel farnosti Vísky u Letovic. Popis Jedná se o jednolodní, orientovanou, podélnou stavbu, která vznikla – jak již bylo uvedeno výše – ve 13. století a je tudíž románského původu. Dnes vš...
null
Stručně shrň článek o tématu „Esperantská literatura“ a uveď hlavní fakta.
**Esperantská literatura** Esperantská literatura patří mezi nejmladší světové literatury, protože začala vznikat teprve po zveřejnění esperanta v roce 1887. Nejdříve vznikala literatura překladová, podobně jako u národních literatur, ale brzy se začala objevovat i původní díla. Charakteristickým znakem je různá národ...
null
Summarize key facts about „Andrew Barsalona“ clearly and accurately.
**Andrew Barsalona** Andrew Victor Barsalona (born 3 August 1990) is a Canadian soccer player who plays as a midfielder for German club 1860 Rosenheim. Career Before the second half of 2011-12, Barsalona signed for German fifth division side Eintracht Braunschweig II. After that, he signed for Germania Halberstadt II ...
null
Write a Java program that creates two arrays and prints out the difference in number of elements between them.
int[] arr1 = {1, 2, 3, 4, 5}; int[] arr2 = {1, 2, 3};
public class ArraySizeDiff { public static void main(String[] args) { int[] arr1 = {1, 2, 3, 4, 5}; int[] arr2 = {1, 2, 3}; int diff = arr1.length - arr2.length; System.out.println("Difference in number of elements between the two arrays is: " + diff); } }
null
Stručně shrň článek o tématu „Eugen Jegorov“ a uveď hlavní fakta.
**Eugen Jegorov** Eugen Jegorov, někdy též Evžen Jegorov (9. října 1937 Praha – 28. prosince 1992 Praha), byl český jazzový hudebník (saxofonista a klarinetista) a herec. Role Zločin v šantánu (1968) Skřivánci na niti (1969) Šest černých dívek aneb Proč zmizel Zajíc? (1969) Nevěsta (1970) Homolka a tobolka (1972) (Bur...
null
Implement a stack to store and retrieve items in last-in first-out order.
class Stack: def __init__(self): self.items = [] def push(self, item): self.items.append(item) def pop(self): return self.items.pop() def peek(self): return self.items[len(self.items)-1] def size(self): return len(self.items)
null
Stručně shrň článek o tématu „Představitelé Junáka – českého skauta“ a uveď hlavní fakta.
**Představitelé Junáka – českého skauta** Vrcholnými představiteli Junáka – českého skauta jsou náčelní a náčelník, společně předsedající jeho vrcholnému strategickému a koncepčnímu orgánu, Náčelnictvu, a starosta, stojící v čele Výkonné rady, řídící organizaci po operativní stránce. Náčelní a náčelník Náčelní a náčel...
null
Kolik je 10 × 11?
10 × 11 = 110
null
Write a SQL query to sort a table based on the values in two columns, 'gender' and 'age'.
SELECT * FROM table_name ORDER BY gender ASC, age ASC;
null
Stručně shrň článek o tématu „Centrum of Excellence for Good Governance“ a uveď hlavní fakta.
**Centrum of Excellence for Good Governance** Centrum of Excellence for Good Governance, z. s., je nevládní nezisková expertní organizace (think tank) usilující o prosazování konceptu a principů good governance v ČR. Zaměřuje se na výzkum, vzdělávání a „policy advocacy“ v oblasti dobré praxe při utváření a správě věcí...
null
Stručně shrň článek o tématu „Obléhání Tiberiady“ a uveď hlavní fakta.
**Obléhání Tiberiady** K obléhání Tiberiady ajjúbovským sultánam Saladinem došlo 2. července roku 1187, jen dva dny před pro křižáky osudnou bitvou u Hattínu. Saladin tímto krokem hodlal vylákat k boji na bitevní pole jeruzalémského krále Guye de Lusignan a jeho armádu, která se tou dobou zdržovala na výhodné obranné ...
null
null
null
null
Římskokatolická farnost Hluboká nad Vltavou Římskokatolická farnost Hluboká nad Vltavou je územním společenstvím římských katolíků v rámci vikariátu České Budějovice - venkov českobudějovické diecéze. O farnosti Historie Farnost byla v Hluboké nad Vltavou zřízena až poměrně pozdě. Až v roce 1786. Farním kostelem byla ...
Spočítej: 23 + 13 = ?
23 + 13 = 36
null
Given a JSON object, write a JavaScript function to flatten the object keys.
{ "name": { "first": "John", "last": "Smith" }, "age": 25 }
// JavaScript Code function flattenKeys(obj) { let flattened = {}; for (let key in obj) { if (typeof obj[key] === 'object') { for (let subkey in obj[key]) { flattened[`${key}_${subkey}`] = obj[key][subkey]; } } else { flattened[key] = obj[key]; } } return flattened; }
null
Summarize key facts about „Evgeny Kissin“ clearly and accurately.
**Evgeny Kissin** Evgeny Igorevich Kissin (, ; born 10 October 1971) is a Russian-born concert pianist and composer. He became a British citizen in 2002 and an Israeli citizen in 2013. He first came to international fame as a child prodigy. He has a wide repertoire and is especially known for his interpretations of th...
null
Create a web page with a form for user input of a modified text.
<html> <body> <form action = "processText.php" method = "post"> <textarea rows = "10" cols = "30" name = "modifiedText"></textarea><br> <input type = "submit" value = "Submit" /> </form> </body> </html>
null
Suggest an API call in Java to generate a random number
int randomNum = ThreadLocalRandom.current().nextInt(0, MAX_VALUE);
null
Stručně shrň článek o tématu „8 (linka metra v Paříži)“ a uveď hlavní fakta.
**8 (linka metra v Paříži)** Linka 8 je nejdelší linka pařížského metra (delší už jsou jen linky RER), která je v systému MHD značena světle fialovou barvou. Vede od stanice Balard na jihozápadním okraji Paříže přes centrum a po obloukové dráze končí ve stanici Pointe du Lac jihovýchodně od Paříže na území města Créte...
null
Write a function in Java to sort a given array of numbers into ascending order.
int[] array = {11, 7, 18, 2, 5, 8};
public static void sortAscending(int[] array) { // Sort the array in ascending order Arrays.sort(array); System.out.println("Array in Ascending Order: "); for (int i = 0; i < array.length; i++) { System.out.print(array[i] + " "); } }
null
Edit the following HTML document and change the font color of the level 2 heading tag to red
<html><head><title>My Title</title></head><body><h1>Heading 1</h1><h2>Heading 2</h2></body></html>
<html><head><title>My Title</title></head><body><h1>Heading 1</h1><h2 style="color:red;">Heading 2</h2></body></html>
null
Edit the following HTML page to add a new heading and a link.
<html> <head> <title>Example Site</title> </head> <body> <h1>Hello World!</h1> <p>This is a Sample Page.</p> </body> </html> Link: http://example.com Heading: Sample Page
<html> <head> <title>Example Site</title> </head> <body> <h1>Hello World!</h1> <h2>Sample Page</h2> <p>This is a Sample Page</p> <a href="http://example.com">Link</a> </body> </html>
null
Suggest a code in Python that will calculate the area of any given shape.
def area(shape): if shape == "rectangle": length = float(input("Please enter the length: ")) width = float(input("Please enter the width: ")) return length * width elif shape == "triangle": base = float(input("Please enter the base: ")) height = float(input("Please enter the height: ")) return 0.5 * base * height elif ...
null
Write a Python program that adds two numbers and multiplies them.
4, 6
num1 = 4 num2 = 6 result = (num1 + num2) * num2 print(result)
null
Kolik je 6 × 4?
6 × 4 = 24
null