solutions
listlengths
2
791
task_name
stringlengths
2
86
[ { "code": "---\ncategory:\n- Cards\nfrom: http://rosettacode.org/wiki/Playing_cards\nnote: Games\n", "language": "00-META" }, { "code": ";Task:\nCreate a data structure and the associated methods to define and manipulate a deck of   [[wp:Playing-cards#Anglo-American-French|playing cards]]. \n\n...
Playing-cards
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Plot_coordinate_pairs\n", "language": "00-META" }, { "code": ";Task:\nPlot a function represented as &nbsp;&nbsp; <big><big> x,&nbsp; y </big></big> &nbsp;&nbsp; numerical arrays.\n\nPost the resulting image for the following input arrays (taken from...
Plot-coordinate-pairs
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Pointers_and_references\nnote: Basic Data Operations\n", "language": "00-META" }, { "code": "{{basic data operation}}In this task, the goal is to demonstrate common operations on pointers and references. These examples show pointer operations on the ...
Pointers-and-references
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Polymorphic_copy\nnote: Object oriented\n", "language": "00-META" }, { "code": "An object is [[polymorphism|polymorphic]] when its specific type may vary. \nThe types a specific value may take, is called ''class''.\n\nIt is trivial to copy an object ...
Polymorphic-copy
[ { "code": "---\ncategory:\n- Object oriented\nfrom: http://rosettacode.org/wiki/Polymorphism\nnote: Basic language learning\n", "language": "00-META" }, { "code": ";Task:\nCreate two classes &nbsp; Point(x,y) &nbsp; and &nbsp; Circle(x,y,r) &nbsp; with a polymorphic function print, accessors for (x,...
Polymorphism
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Polynomial_long_division\nnote: Classic CS problems and programs\n", "language": "00-META" }, { "code": ":<cite>In algebra, [[wp:Polynomial long division|polynomial long division]] is an algorithm for dividing a polynomial by another polynomial of th...
Polynomial-long-division
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Polyspiral\n", "language": "00-META" }, { "code": "A [http://www.otherwise.com/Jurtle/screenshots_win/assets/DisplayWindow_Full.png Polyspiral] is a spiral made of multiple line segments, whereby each segment is larger (or smaller) than the previous ...
Polyspiral
[ { "code": "---\ncategory:\n- Mathematics\nfrom: http://rosettacode.org/wiki/Population_count\n", "language": "00-META" }, { "code": "The &nbsp; ''[[wp:Hamming weight|population count]]'' &nbsp; is the number of &nbsp; <big>'''1'''</big>s &nbsp; (ones) &nbsp; in the binary representation of a non-neg...
Population-count
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Power_set\nnote: Discrete math\n", "language": "00-META" }, { "code": "A &nbsp; [[set]] &nbsp; is a collection (container) of certain values, \nwithout any particular order, and no repeated values. \n\nIt corresponds with a finite set in mathematics....
Power-set
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Price_fraction\nnote: Financial operations\n", "language": "00-META" }, { "code": "A friend of mine runs a pharmacy. &nbsp; He has a specialized function in his Dispensary application which receives a decimal value of currency and replaces it to a st...
Price-fraction
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Primality_by_trial_division\nnote: Prime Numbers\n", "language": "00-META" }, { "code": ";Task:\nWrite a boolean function that tells whether a given integer is prime. \n\n\nRemember that &nbsp; '''1''' &nbsp; and all non-positive numbers are not prim...
Primality-by-trial-division
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Primality_by_Wilson's_theorem\nnote: Prime Numbers\n", "language": "00-META" }, { "code": ";Task:\nWrite a boolean function that tells whether a given integer is prime using [http://www.cut-the-knot.org/blue/Wilson.shtml Wilson's theorem]. \n\nBy Wil...
Primality-by-Wilsons-theorem
[ { "code": "---\ncategory:\n- Arbitrary precision\nfrom: http://rosettacode.org/wiki/Prime_decomposition\nnote: Prime Numbers\n", "language": "00-META" }, { "code": "The prime decomposition of a number is defined as a list of prime numbers \nwhich when all multiplied together, are equal to that numbe...
Prime-decomposition
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Prime_numbers_whose_neighboring_pairs_are_tetraprimes\n", "language": "00-META" }, { "code": ";Definitions\n\nThe following definitions are needed for this task.\n\nA '''tetraprime''' is a positive integer which is the product of four distinct primes...
Prime-numbers-whose-neighboring-pairs-are-tetraprimes
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Prime_triangle\n", "language": "00-META" }, { "code": "You will require a function f which when given an integer S will return a list of the arrangements of the integers 1 to S such that g<sub>1</sub>=1 g<sub>S</sub>=S and generally for n=1 to n=S-1 ...
Prime-triangle
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Primorial_numbers\nnote: Prime Numbers\n", "language": "00-META" }, { "code": "Primorial numbers are those formed by multiplying successive prime numbers. \n\n\nThe primorial number series is:\n::* &nbsp; primorial(0) = &nbsp; &nbsp; &nbsp; &nbsp; 1 ...
Primorial-numbers
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Priority_queue\n", "language": "00-META" }, { "code": "A [[wp:Priority queue|priority queue]] is somewhat similar to a [[Queue|queue]], with an important distinction: each item is added to a priority queue with a priority level, and will be later rem...
Priority-queue
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Probabilistic_choice\nnote: Probability and statistics\n", "language": "00-META" }, { "code": "Given a mapping between items and their required probability of occurrence, generate a million items ''randomly'' subject to the given probabilities and co...
Probabilistic-choice
[ { "code": "---\ncategory:\n- Initialization\nfrom: http://rosettacode.org/wiki/Program_name\nnote: Basic language learning\n", "language": "00-META" }, { "code": "The task is to programmatically obtain the name used to invoke the program. (For example determine whether the user ran \"python hello.py...
Program-name
[ { "code": "---\ncategory:\n- Simple\nfrom: http://rosettacode.org/wiki/Program_termination\nnote: Basic language learning\n", "language": "00-META" }, { "code": ";Task:\nShow the syntax for a complete stoppage of a program inside a &nbsp; [[Conditional Structures|conditional]]. \n\nThis includes all...
Program-termination
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Proper_divisors\nnote: Prime Numbers\n", "language": "00-META" }, { "code": "The &nbsp; [http://planetmath.org/properdivisor proper divisors] &nbsp; of a positive integer '''N''' are those numbers, other than '''N''' itself, that divide '''N''' witho...
Proper-divisors
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Pseudo-random_numbers/Middle-square_method\n", "language": "00-META" }, { "code": "; The Method:\nTo generate a sequence of n-digit pseudorandom numbers, an n-digit starting value is created and squared, producing a 2n-digit number. If the result has...
Pseudo-random-numbers-Middle-square-method
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Pseudo-random_numbers/PCG32\n", "language": "00-META" }, { "code": ";Some definitions to help in the explanation:\n\n:Floor operation<br>\n::https://en.wikipedia.org/wiki/Floor_and_ceiling_functions<br>\n::Greatest integer less than or equal to a rea...
Pseudo-random-numbers-PCG32
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Pseudo-random_numbers/Splitmix64\nnote: PRNG\n", "language": "00-META" }, { "code": "Splitmix64 is the default pseudo-random number generator algorithm in Java and is included / available in many other languages. It uses a fairly simple algorithm tha...
Pseudo-random-numbers-Splitmix64
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Pythagoras_tree\n", "language": "00-META" }, { "code": "The [[wp:Pythagoras_tree_%28fractal%29|Pythagoras tree]] is a fractal tree constructed from squares. It is named after Pythagoras because each triple of touching squares encloses a right triang...
Pythagoras-tree
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Pythagorean_quadruples\n", "language": "00-META" }, { "code": "One form of &nbsp; '''Pythagorean quadruples''' &nbsp; is &nbsp; (for positive integers &nbsp; '''a''', &nbsp; '''b''', &nbsp; '''c''', &nbsp; and &nbsp; '''d'''): \n\n\n:::::::: &nbsp; <...
Pythagorean-quadruples
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Pythagorean_triples\n", "language": "00-META" }, { "code": "A [[wp:Pythagorean_triple|Pythagorean triple]] is defined as three positive integers <math>(a, b, c)</math> where <math>a < b < c</math>, and <math>a^2+b^2=c^2.</math>\n\nThey are called pri...
Pythagorean-triples
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Quaternion_type\n", "language": "00-META" }, { "code": "[[wp:Quaternion|Quaternions]] &nbsp; are an extension of the idea of &nbsp; [[Arithmetic/Complex|complex numbers]].\n\nA complex number has a real and complex part, &nbsp; sometimes written as &...
Quaternion-type
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Queue/Definition\nnote: Data Structures\n", "language": "00-META" }, { "code": "{{Data structure}}\n[[File:Fifo.gif|frame|right|Illustration of FIFO behavior]]\n\n;Task:\nImplement a FIFO queue. \n\nElements are added at one side and popped from the ...
Queue-Definition
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Queue/Usage\nnote: Data Structures\n", "language": "00-META" }, { "code": "{{Data structure}}\n[[File:Fifo.gif|frame|right|Illustration of FIFO behavior]]\n\n;Task:\nCreate a queue data structure and demonstrate its operations. \n\n(For implementatio...
Queue-Usage
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Quine\n", "language": "00-META" }, { "code": "A [[wp:Quine_%28computing%29|quine]] is a self-referential program that can, \nwithout any external access, output its own source. \n\n\nA &nbsp; '''quine''' &nbsp; (named after Willard Van Orman Quine) &...
Quine
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Quoting_constructs\n", "language": "00-META" }, { "code": "Pretty much every programming language has some form of quoting construct to allow embedding of data in a program, be it literal strings, numeric data or some combination thereof.\n\nShow exa...
Quoting-constructs
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Radical_of_an_integer\n", "language": "00-META" }, { "code": ";Definition\nThe '''radical''' of a positive integer is defined as the product of its distinct prime factors.\n\nAlthough the integer 1 has no prime factors, its radical is regarded as 1 b...
Radical-of-an-integer
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Ramanujan's_constant\n", "language": "00-META" }, { "code": "Calculate Ramanujan's constant (as described on the [http://oeis.org/wiki/Ramanujan%27s_constant OEIS site]) with at least\n32 digits of precision, by the method of your choice. Optionally...
Ramanujans-constant
[ { "code": "---\ncategory:\n- Geometry\n- Recursion\nfrom: http://rosettacode.org/wiki/Ramer-Douglas-Peucker_line_simplification\n", "language": "00-META" }, { "code": "The &nbsp; '''Ramerโ€“Douglasโ€“Peucker''' &nbsp; algorithm is a line simplification algorithm for reducing the number of points used to...
Ramer-Douglas-Peucker-line-simplification
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Random_Latin_squares\n", "language": "00-META" }, { "code": "A Latin square of size <code>n</code> is an arrangement of <code>n</code> symbols in an <code>n-by-n</code> square in such a way that each row and column has each symbol appearing exactly ...
Random-Latin-squares
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Random_number_generator_(included)\n", "language": "00-META" }, { "code": "The task is to:\n: State the type of random number generator algorithm used in a language's built-in random number generator. If the language or its immediate libraries don't ...
Random-number-generator-included-
[ { "code": "---\ncategory:\n- Probability and statistics\n- Randomness\nfrom: http://rosettacode.org/wiki/Random_numbers\nnote: Basic language learning\n", "language": "00-META" }, { "code": ";Task:\nGenerate a collection filled with &nbsp; '''1000''' &nbsp; normally distributed random (or pseudo-ran...
Random-numbers
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Random_sentence_from_book\n", "language": "00-META" }, { "code": "* Read in the book \"[http://www.gutenberg.org/files/36/36-0.txt The War of the Worlds]\", by H. G. Wells.\n* Skip to the start of the book, proper.\n* Remove extraneous punctuation, b...
Random-sentence-from-book
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Range_expansion\n", "language": "00-META" }, { "code": "{{:Range extraction/Format}}\n\n\n;Task:\nExpand the range description: \n <big> -6,-3--1,3-5,7-11,14,15,17-20 </big>\n\n<small>Note that the second element above, \nis the '''range from minus ...
Range-expansion
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Range_extraction\n", "language": "00-META" }, { "code": "{{:Range extraction/Format}}\n\n;Task:\n* Create a function that takes a list of integers in increasing order and returns a correctly formatted string in the range format. \n* Use the function ...
Range-extraction
[ { "code": "---\ncategory:\n- Sorting\nfrom: http://rosettacode.org/wiki/Ranking_methods\nnote: Sorting Algorithms\n", "language": "00-META" }, { "code": "{{Sorting Algorithm}}\n\nThe numerical rank of competitors in a competition shows if one is better than, equal to, or worse than another based on ...
Ranking-methods
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Rate_counter\n", "language": "00-META" }, { "code": "Counting the frequency at which something occurs is a common activity in measuring performance and managing resources. In this task, we assume that there is some job which we want to perform repeat...
Rate-counter
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Ray-casting_algorithm\nnote: Classic CS problems and programs\n", "language": "00-META" }, { "code": "<br>\nGiven a point and a polygon, check if the point is inside or outside the polygon using the [[wp:Point in polygon#Ray casting algorithm|ray-cas...
Ray-casting-algorithm
[ { "code": "---\nfrom: http://rosettacode.org/wiki/RCRPG\nnote: Games\n", "language": "00-META" }, { "code": "Create a simple interactive game which incorporates the following features:\n\n* room-based navigation in three integer dimensions (x,y,z)\n* player inventory\n* three types of item: sledge, ...
RCRPG
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Read_a_file_character_by_character/UTF8\nnote: File handling\n", "language": "00-META" }, { "code": ";Task:\nRead a file one character at a time, as opposed to [[Read entire file|reading the entire file at once]].\n\nThe solution may be implemented a...
Read-a-file-character-by-character-UTF8
[ { "code": "---\ncategory:\n- Simple\nfrom: http://rosettacode.org/wiki/Read_a_file_line_by_line\nnote: File handling\n", "language": "00-META" }, { "code": "Read a file one line at a time, \nas opposed to [[Read entire file|reading the entire file at once]].\n\n\n;Related tasks:\n* [[Read a file cha...
Read-a-file-line-by-line
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Read_a_specific_line_from_a_file\n", "language": "00-META" }, { "code": "Some languages have special semantics for obtaining a known line number from a file.\n\n\n;Task:\nDemonstrate how to obtain the contents of a specific line within a file. \n\nFo...
Read-a-specific-line-from-a-file
[ { "code": "---\ncategory:\n- Arithmetic operations\n- Simple\nfrom: http://rosettacode.org/wiki/Real_constants_and_functions\nnote: Basic language learning\n", "language": "00-META" }, { "code": ";Task:\nShow how to use the following math constants and functions in your language &nbsp; (if not avail...
Real-constants-and-functions
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Recaman's_sequence\n", "language": "00-META" }, { "code": "The '''[[wp:Recamรกn's sequence|Recamรกn's sequence]]''' generates Natural numbers.\n\nStarting from a(0)=0, the n'th term <code>a(n)</code>, where n>0, is the previous term minus <code>n</code...
Recamans-sequence
[ { "code": "---\ncategory:\n- Temporal media\nfrom: http://rosettacode.org/wiki/Record_sound\nnote: Sound\n", "language": "00-META" }, { "code": "Record a monophonic 16-bit PCM sound into either memory space, a file or array.\n\n(This task neglects to specify the sample rate, and whether to use signe...
Record-sound
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Reflection/Get_source\nnote: Reflection\n", "language": "00-META" }, { "code": ";Task:\nThe goal is to get the source code or file path and line number where a programming object (e.g. module, class, function, method) is defined.\n<br><br>\n", "l...
Reflection-Get-source
[ { "code": "---\ncategory:\n- Programming Tasks\n- Object oriented\nfrom: http://rosettacode.org/wiki/Reflection/List_methods\nnote: Reflection\n", "language": "00-META" }, { "code": ";Task:\nThe goal is to get the methods of an object, as names, values or both.\n\nSome languages offer [[Respond to a...
Reflection-List-methods
[ { "code": "---\ncategory:\n- Programming Tasks\n- Object oriented\nfrom: http://rosettacode.org/wiki/Reflection/List_properties\nnote: Reflection\n", "language": "00-META" }, { "code": ";Task:\nThe goal is to get the properties of an object, as names, values or both.\n\nSome languages support dynami...
Reflection-List-properties
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Remove_duplicate_elements\nnote: Sorting Algorithms\n", "language": "00-META" }, { "code": "{{Sorting Algorithm}}\n[[Category:Sorting]]\n\nGiven an Array, derive a sequence of elements in which all duplicates are removed.\n\nThere are basically three...
Remove-duplicate-elements
[ { "code": "---\ncategory:\n- File handling\nfrom: http://rosettacode.org/wiki/Remove_lines_from_a_file\n", "language": "00-META" }, { "code": ";Task:\nRemove a specific line or a number of lines from a file. \n\nThis should be implemented as a routine that takes three parameters (filename, starting ...
Remove-lines-from-a-file
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Rename_a_file\nnote: File System Operations\n", "language": "00-META" }, { "code": ";Task:\nRename:\n:::* &nbsp; a file called &nbsp; &nbsp; '''input.txt''' &nbsp; &nbsp; into &nbsp; &nbsp; '''output.txt''' &nbsp; &nbsp; and \n:::* &nbsp; a directory...
Rename-a-file
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Rep-string\n", "language": "00-META" }, { "code": "Given a series of ones and zeroes in a string, define a repeated string or ''rep-string'' as a string which is created by repeating a substring of the ''first'' N characters of the string ''truncated...
Rep-string
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Repeat\n", "language": "00-META" }, { "code": ";Task:\nWrite a procedure which accepts as arguments another procedure and a positive integer. \n\nThe latter procedure is executed a number of times equal to the accepted integer.\n<br><br>\n\n", "l...
Repeat
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Repeat_a_string\nnote: String manipulation\n", "language": "00-META" }, { "code": "Take a string and repeat it some number of times. \n\nExample: repeat(\"ha\", 5) &nbsp; => &nbsp; \"hahahahaha\"\n\nIf there is a simpler/more efficient way to repeat...
Repeat-a-string
[ { "code": "---\ncategory:\n- Electronics\nfrom: http://rosettacode.org/wiki/Resistor_mesh\n", "language": "00-META" }, { "code": "[[image:resistor-mesh.svg|300px||right]]\n\n;Task:\nGiven &nbsp; <big> 10&times;10 </big> &nbsp; grid nodes &nbsp; (as shown in the image) &nbsp; interconnected by &nbsp;...
Resistor-mesh
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Respond_to_an_unknown_method_call\nnote: Object oriented\n", "language": "00-META" }, { "code": ";Task:\nDemonstrate how to make the object respond (sensibly/usefully) to an invocation of a method on it that it does not support through its class defi...
Respond-to-an-unknown-method-call
[ { "code": "---\ncategory:\n- Date and time\n- Networking and Web Interaction\n- Text processing\nfrom: http://rosettacode.org/wiki/Retrieve_and_search_chat_history\nnote: Programming environment operations\n", "language": "00-META" }, { "code": ";Task:\n\n'''Summary:''' Find and print the mentions o...
Retrieve-and-search-chat-history
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Reverse_a_string\nnote: String manipulation\n", "language": "00-META" }, { "code": ";Task:\nTake a string and reverse it.\n\nFor example, \"asdf\" becomes \"fdsa\".\n\n\n;Extra credit:\nPreserve Unicode combining characters. \n\nFor example, \"asโƒdfฬ…...
Reverse-a-string
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Reverse_words_in_a_string\n", "language": "00-META" }, { "code": ";Task:\nReverse the order of all tokens in each of a number of strings and display the result; &nbsp; the order of characters within a token should not be modified.\n\n\n;Example:\n<bi...
Reverse-words-in-a-string
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Rhonda_numbers\n", "language": "00-META" }, { "code": "A positive integer '''''n''''' is said to be a Rhonda number to base '''''b''''' if the product of the base '''''b''''' digits of '''''n''''' is equal to '''''b''''' times the sum of '''''n''''''...
Rhonda-numbers
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Rock-paper-scissors\nnote: Games\n", "language": "00-META" }, { "code": ";Task:\nImplement the classic children's game [[wp:Rock-paper-scissors|Rock-paper-scissors]], as well as a simple predictive &nbsp; '''AI''' &nbsp; (<u>a</u>rtificial <u>i</u>nt...
Rock-paper-scissors
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Roman_numerals/Decode\n", "language": "00-META" }, { "code": ";Task:\nCreate a function that takes a Roman numeral as its argument and returns its value as a numeric decimal integer. \n\nYou don't need to validate the form of the Roman numeral.\n\nMo...
Roman-numerals-Decode
[ { "code": "---\ncategory:\n- String_manipulation\nfrom: http://rosettacode.org/wiki/Roman_numerals/Encode\n", "language": "00-META" }, { "code": ";Task:\nCreate a function taking a positive integer as its parameter and returning a string containing the Roman numeral representation of that integer. M...
Roman-numerals-Encode
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Roots_of_a_quadratic_function\nnote: Arithmetic operations\n", "language": "00-META" }, { "code": "Write a program to find the roots of a quadratic equation, i.e., solve the equation <math>ax^2 + bx + c = 0</math>. \nYour program must correctly handl...
Roots-of-a-quadratic-function
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Roots_of_unity\nnote: Arithmetic operations\n", "language": "00-META" }, { "code": "The purpose of this task is to explore working with &nbsp; [https://en.wikipedia.org/wiki/Complex_number complex numbers].\n\n\n;Task:\nGiven &nbsp; <big>'''n'''</big...
Roots-of-unity
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Rosetta_Code/Count_examples\nnote: Rosetta Code related\n", "language": "00-META" }, { "code": "Find the total number of programming examples for each [[:Category:Programming Tasks|task]] and the total for all tasks.\n\nEssentially, count the number ...
Rosetta-Code-Count-examples
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Rosetta_Code/Find_unimplemented_tasks\nnote: Rosetta Code related\n", "language": "00-META" }, { "code": ";Task:\nGiven the name of a language on Rosetta Code, find all tasks which are not implemented in that language.\n\n\nNote: Implementations shou...
Rosetta-Code-Find-unimplemented-tasks
[ { "code": "---\ncategory:\n- Rosetta Code related\nfrom: http://rosettacode.org/wiki/Rosetta_Code/Fix_code_tags\nnote: Text processing\n", "language": "00-META" }, { "code": ";; This task has been <em>revised</em> for the hosting change Rosetta Code has had in August 2022. \n;; See the Python exampl...
Rosetta-Code-Fix-code-tags
[ { "code": "---\ncategory:\n- Text processing\n- Networking and Web Interaction\n- Sorting\n- Rosetta Code related\nfrom: http://rosettacode.org/wiki/Rosetta_Code/Rank_languages_by_number_of_users\n", "language": "00-META" }, { "code": ";Task:\nSort most popular programming languages based on the num...
Rosetta-Code-Rank-languages-by-number-of-users
[ { "code": "---\ncategory:\n- String_manipulation\nfrom: http://rosettacode.org/wiki/Rot-13\nnote: Encryption\n", "language": "00-META" }, { "code": ";Task:\nImplement a &nbsp; '''rot-13''' &nbsp; function &nbsp; (or procedure, class, subroutine, or other \"callable\" object as appropriate to your pr...
Rot-13
[ { "code": "---\ncategory:\n- Simple\nfrom: http://rosettacode.org/wiki/RPG_attributes_generator\n", "language": "00-META" }, { "code": "'''RPG''' &nbsp; = &nbsp; <u>R</u>ole <u>P</u>laying <u>G</u>ame.\n\n\n\nYou're running a tabletop RPG, and your players are creating characters.\n\nEach character ...
RPG-attributes-generator
[ { "code": "---\nfrom: http://rosettacode.org/wiki/RSA_code\nnote: Encryption\n", "language": "00-META" }, { "code": "Given an [[wp:RSA|RSA]] key (n,e,d), construct a program to encrypt and decrypt plaintext messages strings. \n\n'''Background'''\n\nRSA code is used to encode secret messages. It is n...
RSA-code
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Runge-Kutta_method\n", "language": "00-META" }, { "code": "Given the example Differential equation:\n:<math>y'(t) = t \\times \\sqrt {y(t)}</math>\nWith initial condition:\n:<math>t_0 = 0</math> and <math>y_0 = y(t_0) = y(0) = 1</math>\nThis equation...
Runge-Kutta-method
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Runtime_evaluation\n", "language": "00-META" }, { "code": ";Task:\nDemonstrate a language's ability for programs to execute code written in the language provided at runtime. \n\nShow what kind of program fragments are permitted (e.g. expressions vs. ...
Runtime-evaluation
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Runtime_evaluation/In_an_environment\n", "language": "00-META" }, { "code": "Given a program in the language (as a string or AST) with a free variable named <var>x</var> (or another name if that is not valid syntax), evaluate it with <var>x</var> bou...
Runtime-evaluation-In-an-environment
[ { "code": "---\nfrom: http://rosettacode.org/wiki/S-expressions\nnote: Data Structures\n", "language": "00-META" }, { "code": "[[wp:S-Expression|S-Expressions]] &nbsp; are one convenient way to parse and store data.\n\n\n;Task:\nWrite a simple reader and writer for S-Expressions that handles quoted ...
S-expressions
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Safe_addition\nnote: Arithmetic operations\n", "language": "00-META" }, { "code": "Implementation of &nbsp; [[wp:Interval_arithmetic|interval arithmetic]] &nbsp; and more generally fuzzy number arithmetic require operations that yield safe upper and ...
Safe-addition
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Safe_primes_and_unsafe_primes\nnote: Prime Numbers\n", "language": "00-META" }, { "code": ";Definitions:\n::* &nbsp; A &nbsp; '''safe prime''' &nbsp; is a prime &nbsp; '''p''' &nbsp; and where &nbsp; '''(p-1)/2''' &nbsp; is also prime.\n::* &nbsp; Th...
Safe-primes-and-unsafe-primes
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Same_fringe\n", "language": "00-META" }, { "code": "Write a routine that will compare the leaves (\"fringe\") of two binary trees to determine whether they are the same list of leaves when visited left-to-right. The structure or balance of the trees...
Same-fringe
[ { "code": "---\ncategory:\n- Scope\nfrom: http://rosettacode.org/wiki/Scope/Function_names_and_labels\nnote: Basic language learning\n", "language": "00-META" }, { "code": ";Task:\n\nExplain or demonstrate the levels of visibility of function names and labels within the language.\n\n\n;See also:\n* ...
Scope-Function-names-and-labels
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Scope_modifiers\nnote: Basic language learning\n", "language": "00-META" }, { "code": "Most programming languages offer support for [[Creating a function|subroutines]]. \nWhen execution changes between subroutines, different sets of variables and fun...
Scope-modifiers
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Search_a_list_of_records\nnote: List processing\n", "language": "00-META" }, { "code": "Many programming languages provide convenient ways to look for a known value in a simple list of strings or numbers.<br>\nBut what if the elements of the list are...
Search-a-list-of-records
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Search_in_paragraph's_text\n", "language": "00-META" }, { "code": "The goal is to verify the presence of a word or regular expression within several paragraphs of text (structured or not) and to format the output of the relevant paragraphs before put...
Search-in-paragraphs-text
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Secure_temporary_file\nnote: Programming environment operations\n", "language": "00-META" }, { "code": ";Task:\nCreate a temporary file, '''securely and exclusively''' (opening it such that there are no possible [[race condition|race conditions]]). \...
Secure-temporary-file
[ { "code": "---\ncategory:\n- String manipulation\n- Simple\n- Strings\nfrom: http://rosettacode.org/wiki/Selectively_replace_multiple_instances_of_a_character_within_a_string\n", "language": "00-META" }, { "code": ";Task\nThis is admittedly a trivial task but I thought it would be interesting to see...
Selectively-replace-multiple-instances-of-a-character-within-a-string
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Self-describing_numbers\n", "language": "00-META" }, { "code": "There are several so-called \"self-describing\" or \"[[wp:Self-descriptive number|self-descriptive]]\" integers.\n\nAn integer is said to be \"self-describing\" if it has the property th...
Self-describing-numbers
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Self_numbers\n", "language": "00-META" }, { "code": "A number n is a self number if there is no number g such that g + the sum of g's digits = n. So 18 is not a self number because 9+9=18, 43 is not a self number because 35+5+3=43.\n<br>\nThe task is...
Self-numbers
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Semordnilap\n", "language": "00-META" }, { "code": "A [https://en.wiktionary.org/wiki/semordnilap#Noun semordnilap] is a word (or phrase) that spells a different word (or phrase) backward. \"Semordnilap\" is a word that itself is a semordnilap.\n\nEx...
Semordnilap
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Send_an_unknown_method_call\nnote: Object oriented\n", "language": "00-META" }, { "code": ";Task:\nInvoke an object method where the name of the method to be invoked can be generated at run time. \n\n\n;Related tasks:\n* [[Respond to an unknown metho...
Send-an-unknown-method-call
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Send_email\nnote: Networking and Web Interaction\n", "language": "00-META" }, { "code": ";Task:\nWrite a function to send an email. \n\nThe function should have parameters for setting From, To and Cc addresses; the Subject, and the message text, and ...
Send-email
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Sequence_of_primes_by_trial_division\nnote: Prime Numbers\n", "language": "00-META" }, { "code": ";Task:\nGenerate a sequence of primes by means of trial division.\n\n\nTrial division is an algorithm where a candidate number is tested for being a pri...
Sequence-of-primes-by-trial-division
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Sequence_of_primorial_primes\nnote: Prime Numbers\n", "language": "00-META" }, { "code": "The sequence of primorial primes is given as the increasing values of n where [[Primorial numbers|primorial]](n) ยฑ 1 is prime.\n\nNoting that the n'th primorial...
Sequence-of-primorial-primes
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Sequence:_nth_number_with_exactly_n_divisors\n", "language": "00-META" }, { "code": "Calculate the sequence where each term <strong>a<sub>n</sub></strong> is the <strong>n<sup>th</sup></strong> that has '''n''' divisors.\n\n;Task\n\nShow here, on thi...
Sequence๏€บ-nth-number-with-exactly-n-divisors
[ { "code": "---\nfrom: http://rosettacode.org/wiki/Sequence:_smallest_number_with_exactly_n_divisors\n", "language": "00-META" }, { "code": "Calculate the sequence where each term &nbsp; <strong>a<sub>n</sub></strong> &nbsp; is the '''smallest natural number''' that has exactly &nbsp; '''n''' &nbsp; ...
Sequence๏€บ-smallest-number-with-exactly-n-divisors