solutions listlengths 2 791 | task_name stringlengths 2 86 |
|---|---|
[
{
"code": "---\ncategory:\n- Functions and subroutines\nfrom: http://rosettacode.org/wiki/Variadic_function\nnote: Basic language learning\n",
"language": "00-META"
},
{
"code": ";Task:\nCreate a function which takes in a variable number of arguments and prints each one on its own line. \n\nAlso sho... | Variadic-function |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Vector\nnote: Physics\n",
"language": "00-META"
},
{
"code": ";Task\nImplement a Vector class (or a set of functions) that models a Physical Vector. The four basic operations and a ''pretty print'' function should be implemented. \n\n\nThe Vector may... | Vector |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Verhoeff_algorithm\n",
"language": "00-META"
},
{
"code": ";Description\nThe [https://en.wikipedia.org/wiki/Verhoeff_algorithm Verhoeff algorithm] is a checksum formula for error detection developed by the Dutch mathematician Jacobus Verhoeff and fir... | Verhoeff-algorithm |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Verify_distribution_uniformity/Chi-squared_test\nnote: Probability and statistics\n",
"language": "00-META"
},
{
"code": ";Task:\nWrite a function to determine whether a given set of frequency counts could plausibly have come from a uniform distribut... | Verify-distribution-uniformity-Chi-squared-test |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Verify_distribution_uniformity/Naive\nnote: Probability and statistics\n",
"language": "00-META"
},
{
"code": "<small>This task is an adjunct to [[Seven-sided dice from five-sided dice]].</small>\n\n\n;Task:\nCreate a function to check that the rando... | Verify-distribution-uniformity-Naive |
[
{
"code": "---\ncategory:\n- String manipulation\nfrom: http://rosettacode.org/wiki/Vigenère_cipher\nnote: Encryption\n",
"language": "00-META"
},
{
"code": ";Task:\nImplement a [[wp:Vigen%C3%A8re_cipher|Vigenère cypher]], both encryption and decryption. \n\nThe program should handle k... | Vigen-re-cipher |
[
{
"code": "---\ncategory:\n- Encryption\nfrom: http://rosettacode.org/wiki/Vigenère_cipher/Cryptanalysis\nnote: Encryption\n",
"language": "00-META"
},
{
"code": "Given some text you suspect has been encrypted with a Vigenère cipher, extract the key and plaintext. There are several methods for doing... | Vigen-re-cipher-Cryptanalysis |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Visualize_a_tree\n",
"language": "00-META"
},
{
"code": "A tree structure (i.e. a rooted, connected acyclic graph) is often used in programming. \n\nIt's often helpful to visually examine such a structure. \n\nThere are many ways to re... | Visualize-a-tree |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Voronoi_diagram\n",
"language": "00-META"
},
{
"code": "A [[wp:Voronoi diagram|Voronoi diagram]] is a diagram consisting of a number of sites. \n\nEach Voronoi site ''s'' also has a Voronoi cell consisting of all points closest to ''s''.\n\n\n;Task:... | Voronoi-diagram |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Wagstaff_primes\n",
"language": "00-META"
},
{
"code": ";Definition\nA ''Wagstaff prime'' is a prime number of the form ''(2^p + 1)/3'' where the exponent ''p'' is an odd prime.\n\n;Example \n(2^5 + 1)/3 = 11 is a Wagstaff prime because both 5 and 11... | Wagstaff-primes |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Walk_a_directory/Non-recursively\nnote: File System Operations\n",
"language": "00-META"
},
{
"code": ";Task:\nWalk a given directory and print the ''names'' of files matching a given pattern. \n\n(How is \"pattern\" defined? substring match? DOS ... | Walk-a-directory-Non-recursively |
[
{
"code": "---\ncategory:\n- Cards\n- Games\nfrom: http://rosettacode.org/wiki/War_card_game\n",
"language": "00-META"
},
{
"code": "War Card Game\n\nSimulate the card game War. Use the Bicycle playing card manufacturer's rules. Show a game as played. User input is optional.\n\nReferences:\n\n:* B... | War-card-game |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Wasteful,_equidigital_and_frugal_numbers\n",
"language": "00-META"
},
{
"code": ";Definitions\nLet '''n''' be a positive integer and '''l(n)''' be the number of its digits in base '''b'''.\n\nExpress '''n''' as the product of its prime factors raised... | Wasteful-equidigital-and-frugal-numbers |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Water_collected_between_towers\n",
"language": "00-META"
},
{
"code": ";Task:\nIn a two-dimensional world, we begin with any bar-chart (or row of close-packed 'towers', each of unit width), and then it rains, \ncompletely filling all convex enclosure... | Water-collected-between-towers |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Weird_numbers\n",
"language": "00-META"
},
{
"code": "In number theory, a [[wp:weird number|weird number]] is a natural number that is [[wp:abundant number|abundant]] but ''not'' [[wp:semiperfect number|semiperfect]] (and therefore not [[wp:perfect n... | Weird-numbers |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Wieferich_primes\nnote: Prime Numbers\n",
"language": "00-META"
},
{
"code": "<br>\nIn number theory, a '''Wieferich prime''' is a prime number ''' ''p'' ''' such that ''' ''p<sup>2</sup>'' ''' evenly divides ''' ''2<sup>(p − 1)</sup> − 1'' '''.\n\n\... | Wieferich-primes |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Wilson_primes_of_order_n\nnote: Prime Numbers\n",
"language": "00-META"
},
{
"code": ";Definition\n\nA [https://en.wikipedia.org/wiki/Wilson_prime Wilson prime of order '''n'''] is a prime number '''p''' such that '''p<sup>2</sup... | Wilson-primes-of-order-n |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Window_creation/X11\nnote: GUI\nrequires:\n- Graphics\n",
"language": "00-META"
},
{
"code": ";Task:\nCreate a simple '''X11''' application, using an '''X11''' protocol library such as Xlib or XCB, that draws a box and \"Hello Wo... | Window-creation-X11 |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Window_management\nnote: GUI\n",
"language": "00-META"
},
{
"code": "Treat windows or at least window identities as [[wp:First-class_object|first class objects]].\n\n* Store window identities in variables, compare them for equality.\n* Provide exampl... | Window-management |
[
{
"code": "---\ncategory:\n- Cellular automata\nfrom: http://rosettacode.org/wiki/Wireworld\nnote: Games\n",
"language": "00-META"
},
{
"code": "[[wp:Wireworld|Wireworld]] is a cellular automaton with some similarities to [[Conway's Game of Life]]. \n\nIt is capable of doing sophisticated computatio... | Wireworld |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Word_ladder\n",
"language": "00-META"
},
{
"code": "Yet another shortest path problem. Given two words of equal length the task is to transpose the first into the second.\n\nOnly one letter may be changed at a time and the change must result in a wor... | Word-ladder |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Word_search\n",
"language": "00-META"
},
{
"code": "A [[wp:Word_search|word search]] puzzle typically consists of a grid of letters in which words are hidden.\n\nThere are many varieties of word search puzzles. For the task at hand we will use a rect... | Word-search |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Word_wheel\nnote: Puzzles\n",
"language": "00-META"
},
{
"code": "A \"word wheel\" is a type of word game commonly found on the \"puzzle\" page of\nnewspapers. You are presented with nine letters arranged in a circle or 3×3\ngrid. The objective... | Word-wheel |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Wordiff\nnote: Games\n",
"language": "00-META"
},
{
"code": "Wordiff is an original game in which contestants take turns spelling new dictionary words of three or more characters that only differ from\nthe last by a change in one letter.\n\n\nThe cha... | Wordiff |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/World_Cup_group_stage\n",
"language": "00-META"
},
{
"code": "It's World Cup season (or at least it was when this page was created)! \n\nThe World Cup is an international football/soccer tournament that happens every 4 years. Countries put the... | World-Cup-group-stage |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Write_entire_file\nnote: File handling\n",
"language": "00-META"
},
{
"code": ";Task:\n(Over)write a file so that it contains a string.\n\n\nThe reverse of [[Read entire file]]—for when you want to update or create a file which you would read in its ... | Write-entire-file |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Write_language_name_in_3D_ASCII\n",
"language": "00-META"
},
{
"code": ";Task:\nWrite/display a language's name in '''3D''' ASCII. \n\n\n(We can leave the definition of \"3D ASCII\" fuzzy, \nso long as the result is interesting or amusing, \nnot a ch... | Write-language-name-in-3D-ASCII |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Write_to_Windows_event_log\n",
"language": "00-META"
},
{
"code": ";Task:\nWrite script status to the Windows Event Log\n<br><br>\n\n",
"language": "00-TASK"
},
{
"code": ":start:\nI :argv.len != 5\n print(‘Usage : #. < Followed by leve... | Write-to-Windows-event-log |
[
{
"code": "---\ncategory:\n- Graphics algorithms\nfrom: http://rosettacode.org/wiki/Xiaolin_Wu's_line_algorithm\nnote: Raster graphics operations\n",
"language": "00-META"
},
{
"code": ";Task:\nImplement the [[wp:Xiaolin Wu's line algorithm|Xiaolin Wu's line algorithm]] described in Wi... | Xiaolin-Wus-line-algorithm |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/XML/Input\nnote: XML\n",
"language": "00-META"
},
{
"code": "Given the following XML fragment, extract the list of ''student names'' using whatever means desired. If the only viable method is to use XPath, refer the reader to the task [[XML and XPath... | XML-Input |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/XML/Output\nnote: XML\n",
"language": "00-META"
},
{
"code": "Create a function that takes a list of character names and a list of corresponding remarks and returns an XML document of <code><Character></code> elements each with a name attributes and ... | XML-Output |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/XML/XPath\nnote: XML\n",
"language": "00-META"
},
{
"code": "Perform the following three XPath queries on the XML Document below:\n* '''//item[1]''': Retrieve the first \"item\" element \n* '''//price/text()''': Perform an action on each \"price\" el... | XML-XPath |
[
{
"code": "---\ncategory:\n- Networking and Web Interaction\nfrom: http://rosettacode.org/wiki/Yahoo!_search_interface\nnote: Programming environment operations\n",
"language": "00-META"
},
{
"code": "Create a class for searching Yahoo! results.\n\nIt must implement a '''Next Page''' method, and rea... | Yahoo-search-interface |
[
{
"code": "---\ncategory:\n- Prime Numbers\nfrom: http://rosettacode.org/wiki/Yellowstone_sequence\n",
"language": "00-META"
},
{
"code": "The '''Yellowstone sequence''', also called the '''Yellowstone permutation''', is defined as:\n\nFor n <= 3,\n\n a(n) = n\n\nFor n >= 4,\n\n a(n) = the sma... | Yellowstone-sequence |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Yin_and_yang\nnote: Graphics\n",
"language": "00-META"
},
{
"code": "One well-known symbol of the philosophy of duality known as [[wp:Yin_and_Yang|yin and yang]] is the [[wp:Taijitu|taijitu]].\n\n\n;Task:\n:* Create a function that, given a pa... | Yin-and-yang |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Zeckendorf_arithmetic\nnote: Arithmetic operations\n",
"language": "00-META"
},
{
"code": "This task is a ''total immersion'' zeckendorf task; using decimal numbers will attract serious disapprobation.\n\nThe task is to implement addition, subtractio... | Zeckendorf-arithmetic |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Zeckendorf_number_representation\n",
"language": "00-META"
},
{
"code": "Just as numbers can be represented in a positional notation as sums of multiples of the powers of ten (decimal) or two (binary); all the positive integers can be represented as ... | Zeckendorf-number-representation |
[
{
"code": "---\ncategory:\n- Simple\nfrom: http://rosettacode.org/wiki/Zero_to_the_zero_power\n",
"language": "00-META"
},
{
"code": "Some computer programming languages are not exactly consistent (with other computer programming languages) \n<br>when ''raising zero to the zerot... | Zero-to-the-zero-power |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Zig-zag_matrix\nnote: Matrices\n",
"language": "00-META"
},
{
"code": ";Task:\nProduce a zig-zag array. \n\n\nA ''zig-zag'' array is a square arrangement of the first <big>N<sup>2</sup></big> natural numbers, where... | Zig-zag-matrix |
[
{
"code": "---\nfrom: http://rosettacode.org/wiki/Zumkeller_numbers\nnote: Prime Numbers\n",
"language": "00-META"
},
{
"code": "Zumkeller numbers are the set of numbers whose divisors can be partitioned into two disjoint sets that sum to the same value. Each sum must contain divisor values that are... | Zumkeller-numbers |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.