instruction
stringlengths
2
259
⌀
input
stringlengths
0
442
⌀
output
stringlengths
1
1.9k
⌀
text
stringlengths
273
2.08k
⌀
Stručně shrň článek o tématu „Duplicitní obsah“ a uveď hlavní fakta.
**Duplicitní obsah** Duplicitní obsah je termín používaný v oblasti optimalizace pro vyhledávače (SEO) popisuje obsah, který se objeví na více než jedné webové stránce. Duplicitní obsah může být podstatná část obsahu v rámci jedné stránky nebo mezi více stránkami. Je to úplně stejný obsah nebo velmi podobný obsah. Čas...
null
Kolik je 18 × 11?
18 × 11 = 198
null
Create a JavaScript regex to match an email address.
let regex = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
null
Develop a Python program that creates a random password of length 8 characters.
import string import random length = 8 all_characters = string.ascii_letters + string.digits + string.punctuation password = "".join(random.choice(all_characters) for i in range(length)) print(password)
null
Spočítej: 9 + 3 = ?
9 + 3 = 12
null
Can you code?
Yes — solid basics and practical help in Python, JavaScript, HTML, and PHP. For other languages I'll say so and still try to reason carefully.
null
Stručně shrň článek o tématu „Ivo Lapenna“ a uveď hlavní fakta.
**Ivo Lapenna** Ivo Lapenna (5. listopadu 1909, Split – 15. prosince 1987, Kodaň) byl chorvatský univerzitní profesor mezinárodního práva a dějin diplomacie v Záhřebu, později v Londýně, čestný doktor několika univerzit, bývalý generální tajemník a potom předseda Světového esperantského svazu. Je autorem významných es...
null
Use a while loop to output the numbers from 0 to 10
i = 0 while(i <= 10): print(i) i += 1
null
Stručně shrň článek o tématu „Coriolisova síla“ a uveď hlavní fakta.
**Coriolisova síla** Coriolisova síla je setrvačná síla působící na tělesa, která se pohybují v rotující neinerciální vztažné soustavě tak, že se mění jejich vzdálenost od osy otáčení. Coriolisova síla má směr kolmý ke spojnici těleso – osa otáčení a způsobuje stáčení trajektorie tělesa proti směru otáčení soustavy (v...
null
Write a JavaScript code snippet to find the sum of the even numbers in a given range using the reduce() method.
let arr = [1,2,3,4,5,6,7,8,9,10];
const sumOfEvenNumbers = arr.reduce((acc, curr) => { if (curr % 2 === 0) { return acc + curr; } return acc; }, 0); console.log(sumOfEvenNumbers);
null
You need to program a function to calculate the dot product of two arrays.
array1=[1, 2, 3] array2=[-1, 0, 4]
7
null
Napiš regex pro české PSČ (123 45 nebo 12345).
`^\d{3}\s?\d{2}$`
null
Summarize key facts about „The Big Pitch“ clearly and accurately.
**The Big Pitch** The Big Pitch is a competition run by the north-east UK based studio Moxie Makers. Competitors pitch their feature film ideas, to win with the UK's highest production fund prize - production finance from Moxie Makers for their film (a minimum of £150,000) together with a post-production deal with Mol...
null
Spočítej: 17 + 10 = ?
17 + 10 = 27
null
Stručně shrň článek o tématu „FreeOTFE“ a uveď hlavní fakta.
**FreeOTFE** FreeOTFE je free program s otevřenými zdrojovými kódy pro „on-the-fly“ transparentní šifrování disku pro PC a PDA. S tímto programem můžete vytvořit jeden nebo více virtuálních disků. Tento disk se chová jako normální disk s tím drobným rozdílem, že cokoliv zapsané na takový disk se transparentně a bezpeč...
null
Stručně shrň článek o tématu „Zvěstování (Brandl)“ a uveď hlavní fakta.
**Zvěstování (Brandl)** Zvěstování je rozměrný barokní obraz Petra Brandla z roku 1697 namalovaný pro Svatou Horu v Příbrami. Dne 10. srpna 1696 přijel v komisi na Svatou Horu zástupce Menšího Města, správce hradní obrazárny, učitel Brandlův Kristián Schröder, který Brandla pravděpodobně doporučil. Obraz byl namalovan...
null
Napiš krátký e-mail: omluva za zpoždění dodávky.
Předmět: Omluva za zpoždění Dobrý den, omlouváme se za zpoždění dodávky. Zboží odešleme co nejdříve a dáme vědět tracking. S pozdravem
null
null
null
null
1856 in Denmark Events from the year 1856 in Denmark. Incumbents Monarch – Frederick VII Prime minister – Peter Georg Bang (18 October), Carl Christoffer Georg Andræ Events 16 April Jacob Heinrich Moresco opens a shop with women's clothing and fashion accessories at Amagertorv 13 in Copenhagen. 27 April The Roskuilde–...
Calculate the standard deviation of the given set of numbers.
[9, 2, 5, 4, 12, 7, 8, 11, 9, 3, 7, 4, 12, 5, 4, 10, 9, 6, 9, 4]
Standard deviation of the given set of numbers: 3.26
null
null
null
null
Thurlbear Wood and Quarrylands Thurlbear Wood and Quarrylands () is a 26.7 hectare (65.8 acre) biological Site of Special Scientific Interest south of Stoke St Mary in Somerset, notified in 1963. Thurlbear Wood is a species-rich woodland, formerly managed in a traditional coppice-with-standards system and situated on ...
Summarize key facts about „1987 Rugby World Cup“ clearly and accurately.
**1987 Rugby World Cup** The 1987 Rugby World Cup was the first Rugby World Cup. It was co-hosted by New Zealand and Australia – New Zealand hosted 21 matches (17 pool stage matches, two quarter-finals, the third-place play-off and the final) while Australia hosted 11 matches (seven pool matches, two quarter-finals an...
null
Create a class Person in Java that stores a person's name, email, gender, and age.
public class Person { String name; String email; String gender; int age; public Person(String name, String email, String gender, int age) { this.name = name; this.email = email; this.gender = gender; this.age = age; } public String getName() { return name; } public String getEmail() { return email; } public String getG...
null
How would you use a switch statement to print the corresponding day to a number?
switch (n) { case 1: console.log("Monday"); break; case 2: console.log("Tuesday"); break; case 3: console.log("Wednesday"); break; case 4: console.log("Thursday"); break; case 5: console.log("Friday"); break; case 6: console.log("Saturday"); break; case 7: console.log("Sunday"); break; default: console.log("Invalid inp...
null
null
null
null
Rick Astley Richard Paul Astley, známý pouze jako Rick Astley, (* 6. února 1966 Newton-le-Willows, Lancashire) je britský zpěvák, textař a hudebník. Dohromady prodal celosvětově více než 40 miliónů alb. Je znám díky „kultovnímu“ memu a dance-popovému hitu „Never Gonna Give You Up“, který obsadil většinu příček #1 ve s...
Summarize key facts about „Niederhasli railway station“ clearly and accurately.
**Niederhasli railway station** Niederhasli railway station is a railway station in the Swiss canton of Zurich. It is situated in the municipality of Niederhasli on the Wehntal line. The station is served by Zurich S-Bahn line S15. In the three story building is a home, which is currently occupied as of 2023. Services...
null
Create a function to reverse a list without using the reverse() method.
def reverse_list(lst): reversed_list = [] for i in range(len(lst) - 1, -1, -1): reversed_list.append(lst[i]) return reversed_list
null
Stručně shrň článek o tématu „Tradiční pop“ a uveď hlavní fakta.
**Tradiční pop** Éra tradičního popu (tradiční pop, traditional pop) v první vlně probíhala před nástupem popularity rock and rollu. Začala na konci čtyřicátých let minulého století. Hudba je více "populárně" orientovaná, ale nemusí být. Některé nahrávky spadají více do oblasti big bandu, ale některé jej naopak postrá...
null
Create a Java program to validate a credit card number using Luhn's algorithm.
""" Validate a credit card number using Luhn's algorithm. """ import java.util.Arrays; public class Luhn { public static boolean isValidCard(String cardNumber) { if (cardNumber == null) { return false; } char checkDigit = cardNumber.charAt(cardNumber.length() - 1); String digit = calculateCheckDigit(cardNumber.substrin...
null
What is the data type returned by the following code snippet?
value = 2**8
The data type returned by the following code snippet is an integer.
null
Using the input, write a function that prints out the Nth Fibonacci number.
def Fibonacci(n): if n < 0: print("Incorrect input") # First Fibonacci number is 0 elif n == 0: return 0 # Second Fibonacci number is 1 elif n == 1: return 1 else: return Fibonacci(n-1)+Fibonacci(n-2)
null
Create a computer program that takes a string as an input and builds a dictionary of words and their respective frequencies.
"the quick brown fox jumps over the lazy dog"
def get_frequency(input): # Split the input into words words = input.split() # Create a dictionary to store the words and the frequency frequency = dict() # Iterate over the words and store the frequency for word in words: if word in frequency: frequency[word] += 1 else: frequency[word] = 1 return frequency if __name__...
null
Stručně shrň článek o tématu „Slovanské jazyky“ a uveď hlavní fakta.
**Slovanské jazyky** Slovanské jazyky představují jednu ze skupin indoevropských jazyků. Jedná se o 15–19 jazyků, jimiž hovoří 293 milionů mluvčích (více než polovina, asi 150 milionů, připadá na ruštinu), a to především v zemích střední, východní a jižní Evropy a také v severní Asii. Vyvinuly se z praslovanštiny, při...
null
null
null
null
2,4-Dinitroanisol 2,4-dinitroanisol (1-methoxy-2,4-dinitrobenzen, DNAN, C7H6N2O5) je výbušnina s velmi nízkou citlivostí k nežádoucí náhodné detonaci (IHE) se středně velkou explozivní silou. Má veliký význam pro svoji schopnost být odlévána, což je mezi cenově dostupnými necitlivými výbušninami vzácné až jedinečné. T...
Write HTML code to generate a table of 5 rows and 4 columns.
<table> <tr> <th>Col1</th> <th>Col2</th> <th>Col3</th> <th>Col4</th> </tr> <tr> <td>Row1</td> <td>Row1</td> <td>Row1</td> <td>Row1</td> </tr> <tr> <td>Row2</td> <td>Row2</td> <td>Row2</td> <td>Row2</td> </tr> <tr> <td>Row3</td> <td>Row3</td> <td>Row3</td> <td>Row3</td> </tr> <tr> <td>Row4</td> <td>Row4</td> <td>Row4</t...
null
Suggest a 3D modelling software for creating 3D designs.
Blender is a free and open source 3D modelling software which can be used to create 3D designs.
null
Summarize key facts about „Michael Walsh (Young Irelands hurler)“ clearly and accurately.
**Michael Walsh (Young Irelands hurler)** Michael Walsh (fl. 2015) is an Irish hurler who currently plays at senior level for the Kilkenny county team and for his club Young Irelands. Walsh was part of the Kilkenny panel that won the 2015 All-Ireland Senior Hurling Final on 6 September against Galway. References Livin...
null
Stručně shrň článek o tématu „Otta Mizera“ a uveď hlavní fakta.
**Otta Mizera** Otta Mizera, též Otto (29. května 1919, Praha – 21. října 1952, Paříž) byl český surrealistický a kubistický výtvarník, překladatel a publicista. Život Studium reálného gymnázia v Libni ukončil maturitou v roce 1938. Na gymnáziu se seznámil se Zdeňkem Lorencem (1919–1999), dalším členem budoucí surreal...
null
Write a Python script to determine how many lowercase letters are in a given string.
string = "Hello World!"
""" Python script to determine how many lowercase letters are in a given string """ # Initialize a variable to count the lowercase letters lowercase_letter_count = 0 # Loop through each character in the string for char in string: # Check if the character is a lowercase letter if char.islower(): # If yes, then increment...
null
null
null
null
HD 208487 b HD 208487 b is an extrasolar planet located approximately 144 light-years away in the constellation of Grus, orbiting the star HD 208487. This planet has a minimum mass close to half that of Jupiter and is most probably a gas giant. The planet orbits the star in a close, eccentric orbit. One revolution tak...
Construct a Django view that outputs the following string
Hello World!
from django.http import HttpResponse def hello_world(request): return HttpResponse("Hello World!")
null
Dobrý den
Ahoj! Co potřebuješ vyřešit?
null
Spočítej: 3 + 9 = ?
3 + 9 = 12
null
Using the code below, update the function to find the average of two numbers.
def find_average(num1, num2): total = num1 + num2
def find_average(num1, num2): total = num1 + num2 average = total / 2 return average
null
Create a new list 'squared' that contains the squares of all the elements in the list 'nums'.
nums = [1, 2, 3, 4]
squared = [num**2 for num in nums]
null
Make an HTML webpage with a heading "Welcome to my webpage!" and a paragraph with the text "This is my first webpage!".
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Webpages</title> </head> <body> <h1>Welcome to my webpage!</h1> <p>This is my first webpage!</p> </body> </html>
null
Kolik je 18 × 7?
18 × 7 = 126
null
null
null
null
Bachiru is the Japanese art technique and Japanese craft of engraving dyed ivory. Bachiru originated in Tang dynasty China, and was introduced to Japan in the 8th century C.E. The ivory pieces to be decorated are first stained with pigment (usually red, green or blue). Ivory does not take colour easily and has to be p...
Identify the wrong code in this JavaScript snippet.
let a = "Hello World!"; console 'log(a);
console 'log(a); // lacks () parenthesis for the log method of the console object.
null
Vysvětli bug?
Bug je chyba v programu, kvůli které se chová jinak, než autor chtěl.
null
Visualize the following dataset using a bar chart in matplotlib.
labels = ['A', 'B', 'C', 'D', 'E', 'F'] values = [8, 5, 7, 12, 4, 10]
import matplotlib.pyplot as plt labels = ['A', 'B', 'C', 'D', 'E', 'F'] values = [8, 5, 7, 12, 4, 10] plt.bar(labels, values) plt.title('Dataset') plt.xlabel('Category') plt.ylabel('Value') plt.show()
null
Using React, create a component to display an alert message.
import React from 'react' const AlertMessage = () => { return ( <div className="alert-message"> <p>This is an alert message!</p> </div> ) } export default AlertMessage;
null
Stručně shrň článek o tématu „Jean Forge“ a uveď hlavní fakta.
**Jean Forge** Jean Forge, vlastním jménem Jan Fethke (26. února 1903 – 16. prosince 1980) byl polský (slezský) filmový režisér, scenárista a esperantista. Dílo Literatura Zielona papuga - polský Abismoj - esperanto Saltego trans jarmiloj - esperanto Mr. Tot aĉetas mil okulojn - esperanto La verda raketo - esperanto M...
null
Kolik je 9 - 3?
9 - 3 = 6
null
Stručně shrň článek o tématu „Dříve než usnu“ a uveď hlavní fakta.
**Dříve než usnu** Dříve než usnu (v anglickém originále Before I Sleep), je 15. epizoda první série sci-fi seriálu Hvězdná brána: Atlantida. Obsah Na Atlantidě je objevena laboratoř a v ní starší žena ve stázi. Jedná se pravděpodobně o poslední žijící antičku, proto se ji doktorka Weirová rozhodne probudit. Čeká ji v...
null
Summarize key facts about „Ryton River“ clearly and accurately.
**Ryton River** The Ryton River is a river of the Canterbury region of New Zealand's South Island. It flows southwest down a long valley within the Craigieburn Range to reach the northeastern shore of Lake Coleridge. See also List of rivers of New Zealand References Rivers of Canterbury, New Zealand Rivers of New Zeal...
null
Summarize key facts about „Ivo of Chartres“ clearly and accurately.
**Ivo of Chartres** Ivo of Chartres (also Ives, Yves, or Yvo; ; 1040 – 23 December 1115), also known as Saint Ivo in the Roman Catholic Church, was the Bishop of Chartres, France from 1090 until his death, and an important canonist during the Investiture Crisis. Three extensive canonical works, namely Tripartita, Decr...
null
Spočítej: 6 + 12 = ?
6 + 12 = 18
null
Write Swift code for a hello world.
I don't cover Swift. I can do Python, JavaScript, HTML, or PHP instead.
null
null
null
null
Barry Valentine Barry Valentine (26 September 1927 – 16 October 2009) was bishop of the Diocese of Rupert's Land in the Anglican Church of Canada from 1970 to 1982. Valentine's episcopacy was "transformational and visionary." Birth and education Valentine was born in Essex, England He was educated at Brentwood School ...
Summarize key facts about „The Story Girl“ clearly and accurately.
**The Story Girl** The Story Girl is a 1911 novel by Canadian author L. M. Montgomery. It narrates the adventures of a group of young cousins and their friends who live in a rural community on Prince Edward Island, Canada. In 1917, Montgomery opined that The Story Girl was her favorite of the novels she had written by...
null
Read a list of strings and return a list which contains only the strings with length at least 3.
list = ["Apple", "cat", "dog", "banana", "mouse"]
newList = [i for i in list if len(i) >= 3] print(newList) # Output: ['Apple', 'banana', 'mouse']
null
Kdo byl Karel IV.?
Karel IV. (1316–1378) byl český král a císař Svaté říše římské. Založil Univerzitu Karlovu (1348) a nechal postavit Karlův most; Praha za něj vzkvétala.
null
Compile a function that checks if a number is prime. Output true if prime, false if not.
def is_prime(num): # form 2 to num-1 for i in range(2, num): # percentage to check, output False if divisible by any number if num % i == 0: return False return True
null
Explain how you would use the givew array to create a valid JSON output.
array = [ "firstname" => "Nikola", "lastname" => "Tesla", "birthdate" => "10-07-1856" ]
We can use the given array to create a valid JSON output by first converting it into an object by wrapping it in curly brackets and then assign keys for each value. For example, { "firstname": "Nikola", "lastname": "Tesla", "birthdate": "10-07-1856" } Once the object is created, it need to be converted to a JSON string...
null
Stručně shrň článek o tématu „Římskokatolická farnost Chotoviny“ a uveď hlavní fakta.
**Římskokatolická farnost Chotoviny** Římskokatoická farnost Chotoviny je územní společenství římských katolíků v rámci táborského vikariátu Českobudějovické diecéze. O farnosti Historie Plebánie v Chotovinách je doložena poprvé v roce 1366. Původní gotický kostel svatých Petra a Pavla byl postaven pod patronací rodu ...
null
Construct a for-loop statement to display the numbers counting from 10 to 15
for (let i = 10; i <= 15; i++) { console.log(i); }
null
null
null
null
Shadowgun Shadowgun je česká videohra pro iOS a Android z roku 2011. Vytvořilo ji studio Madfinger Games. Žánrově se jedná o střílečku z pohledu třetí osoby. Hra byla v roce 2011 v anketě Booom nominována na nejlepší českou hru roku 2011. Na Anifilmu byla v témže roce oceněna v kategorii Nejlepší český herní titul pro...
How do you sort a dictionary by values in Python?
sorted_dict = dict(sorted(mydict.items(), key=lambda x: x[1]))
null
Stručně shrň článek o tématu „Confrerie Pictura“ a uveď hlavní fakta.
**Confrerie Pictura** Confrerie Pictura byl více či méně akademickým klubem umělců založeným v roce 1656 v Haagu umělci nespokojenými s uměleckým spolkem Cech svatého Lukáše. Historie Gilda Cech svatého Lukáše v Haagu existovala už v 15. století a stejně jako ve většině velkých nizozemských měst se starala nejen o mal...
null
Edit a JSON object so that it stores information about a person in a defined format.
{ name: John }
{ "name": "John", "age": 0, "address": { "street": "", "city": "", "state": "", "zip": "" }, "phone": "" }
null
Create a new div element and add it to the DOM with id "main-container".
let myDiv = document.createElement('div'); myDiv.id = "main-container"; document.body.appendChild(myDiv);
null
Categorize the following algorithm as either a depth-first search or a breadth-first search.
The algorithm is a breadth-first search (BFS) since it starts at a root node and visits nodes in order of increasing depth.
null
Summarize key facts about „Bonghwasan (Namsan-myeon, Chuncheon)“ clearly and accurately.
**Bonghwasan (Namsan-myeon, Chuncheon)** Bonghwasan is a mountain near the city of Chuncheon, Gangwon-do in South Korea. It has an elevation of . See also List of mountains in Korea Notes References Chuncheon Mountains of Gangwon Province, South Korea Mountains of South Korea
null
Create a new virtual environment for Python.
Convert your current directory to a virtual environment: python3 -m venv <name of virtual environment> Activate the virtual environment: source <name of virtual environment>/bin/activate Deactivate the virtual environment: deactivate
null
Spočítej: 4 + 8 = ?
4 + 8 = 12
null
Write a Bash script to create a directory
mkdir directory_name
null
Stručně shrň článek o tématu „Český kráter“ a uveď hlavní fakta.
**Český kráter** Český kráter nebo též kráter Čechy či Bohemia představuje v současnosti pracovní hypotézu, která považuje Český masiv za přibližně 2 miliardy let starý impaktní kráter. To je v rozporu s představami hlavního geologického proudu, který vyděluje Český masiv do několika nezávislých jednotek, které vzájem...
null
Using Swift, generate a random integer between 0 and 10.
let randomNumber = Int.random(in: 0..<10)
null
Purge all rows from the following dataframe that have a negative value in the Age column.
import pandas as pd data = {'Name': ['Jerry', 'Peter', 'Paul', 'John'], 'Age': [20, 22, -18, 24]} df = pd.DataFrame(data)
import pandas as pd data = {'Name': ['Jerry', 'Peter', 'Paul', 'John'], 'Age': [20, 22, -18, 24]} df = pd.DataFrame(data) df = df[df['Age'] >= 0]
null
Summarize key facts about „Chan Yik Hei“ clearly and accurately.
**Chan Yik Hei** Chan Yik Hei (born 17 October 1989; , Jyutping: can4 yik6 hei1) is a young entrepreneur in Hong Kong. He graduated from CCC Tam Lee Lai Fun Memorial Secondary School and Hong Kong University of Science and Technology. Initial Fame In 2004, he achieved a Second Award in Engineering Category of the Inte...
null
Write a `Python` program to parse an HTML document and store the tags in a list.
from bs4 import BeautifulSoup # data stored in a string html_doc = """ <html><head><title>Parser Demo</title></head> <body> <h1>This is Heading1</h1> <h2>This is Heading2</h2> </body></html> """ # passing the html document to # BeautifulSoup() for parsing soup = BeautifulSoup(html_doc, 'html.parser') # parsing tags fro...
null
Create a list comprehension that takes all the elements of list_one and creates a new list where all the elements are doubled.
list_one = [1, 2, 3, 4, 5]
[x*2 for x in list_one]
null
Ve kterém roce vznikla Česká republika v dnešní podobě?
1. ledna 1993 (rozdělení Československa).
null
null
null
null
Bachelor Mother (1932 film) Bachelor Mother is a 1932 Pre-Code action film directed by Charles Hutchison. Plot A conniving young man is brought up on charges of reckless driving. To "prove" his innocence and good character, he goes to a nursing home and adopts an old woman whom he presents as his loving mother. Unfort...
Stručně shrň článek o tématu „DVTK Jegesmedvék“ a uveď hlavní fakta.
**DVTK Jegesmedvék** DVTK Jegesmedvék (celým názvem: Diósgyőr-Vasgyári Testgyakorlók Köre – Jegesmedvék) je maďarský klub ledního hokeje, který sídlí v Miskolci v župě Borsod-Abaúj-Zemplén. Založen byl v roce 1978 pod názvem Miskolci Kinizsi. Svůj současný název nese od roku 2015. DVTK je celkově trojnásobným mistrem ...
null
null
null
null
Vesmírný závod Vesmírný závod (někdy též vesmírné závody) je pojem, který se používá k označení neoficiálního soupeření mezi Sovětským svazem a Spojenými státy o vědecko-technickou převahu v oblasti dobývání a výzkumu kosmického prostoru během studené války. Toto soupeření probíhalo v zásadě od roku 1957 do poloviny 7...
Summarize key facts about „Optoelectrofluidics“ clearly and accurately.
**Optoelectrofluidics** Optoelectrofluidics, also known as optically induced electrohydrodynamics, refers to the study of the motions of particles or molecules and their interactions with optically-induced electric field and the surrounding fluid. This concept includes electrothermal vortex, electrophoresis, dielectro...
null
Write Lua code for a hello world.
I don't cover Lua. I can do Python, JavaScript, HTML, or PHP instead.
null
Summarize key facts about „Frank Stewart (1930s pitcher)“ clearly and accurately.
**Frank Stewart (1930s pitcher)** Frank Stewart is an American former Negro league pitcher who played in the 1930s. Stewart made his Negro leagues debut in 1934 with the Homestead Grays. He went on to play for the Washington Elite Giants in 1936. References External links and Seamheads Year of birth missing Place of b...
null
Write a JavaScript function to compute the true false ratio of a given array.
[0, 1, 1, 0, 0]
function trueFalseRatio(arr){ let trueCount = 0; let falseCount = 0; arr.forEach(val => { if(val === 0){ falseCount++; } else { trueCount++; } }); return { true: trueCount, false: falseCount }; }
null
Develop a program to determine if a given year is a leap year.
year = 2024
# Determining if a year is a leap year # Assigning the current year year = 2024 # Checking if the year is a leap year if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0): print(year, "is a leap year") else: print(year, "is not a leap year")
null
Summarize key facts about „List of cities and largest towns in Myanmar“ clearly and accurately.
**List of cities and largest towns in Myanmar** The following is a list of cities and largest towns in Myanmar with populations above 5,000, according to UNFPA Myanmar. The capitals of states and regions in Myanmar are bolded. List of cities by urban population List of towns by urban population Gallery See also Refere...
null
Describe how to debug a C++ program using GDB.
Debugging a C++ program using GDB involves running the program with the ‘gdb’ command and then setting breakpoints and examining variables. This can be done by typing in ‘break’ followed by the line number, or ‘b’ followed by the function name, where the program should halt. Once the program is halted, variables and re...
null
Create a HTTP request that returns the HTML source code of a given URL.
URL: "http://example.com"
GET / HTTP/1.1 Host: example.com Connection: close
null
Parse the following JSON object and extract the data stored in the "details" field.
{ "data": [ { "name": "John", "details": { "address": "123 Main St.", "phone": "000-123-4567" } } ] }
const parsedJSON = JSON.parse(jsonObject); const address = parsedJSON.data[0].details.address; const phone = parsedJSON.data[0].details.phone;
null
Kolik je 12 × 13?
12 × 13 = 156
null
Construct a valid SQL statement to calculate the sum of the "price" column in the "Orders" table
SELECT SUM(price) FROM Orders;
null
Print all the numbers in a given string using Java.
String str = "123XYZ456ABC789"
for (int i = 0; i < str.length(); i++) { if (Character.isDigit(str.charAt(i))) { System.out.print(str.charAt(i) + " "); } } // Output -> 1 2 3 4 5 6 7 8 9
null
Write a Python function `group_by` that seskupí list dictů podle klíče.
```python from collections import defaultdict def group_by(rows, key): g = defaultdict(list) for r in rows: g[r[key]].append(r) return dict(g) ```
null
Select the correct method to find the length of a string in JavaScript.
var myString = "Hello World!"; var stringLength = myString.length;
null