trackler 2.0.6.12 → 2.0.6.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/tracks/c/docs/ABOUT.md +5 -0
- data/tracks/c/docs/INSTALLATION.md +5 -6
- data/tracks/c/docs/LEARNING.md +34 -0
- data/tracks/c/docs/RESOURCES.md +3 -0
- data/tracks/csharp/config.json +9 -0
- data/tracks/csharp/exercises/pov/Example.cs +125 -0
- data/tracks/csharp/exercises/pov/PovTest.cs +160 -0
- data/tracks/csharp/exercises/sum-of-multiples/SumOfMultiplesTest.cs +12 -6
- data/tracks/go/exercises/meetup/cases_test.go +0 -0
- data/tracks/go/exercises/raindrops/cases_test.go +0 -0
- data/tracks/go/exercises/rna-transcription/cases_test.go +0 -0
- data/tracks/go/exercises/roman-numerals/cases_test.go +0 -0
- data/tracks/go/exercises/word-count/cases_test.go +0 -0
- data/tracks/go/gen/gen.go +1 -1
- data/tracks/java/docs/MAINTAINING.md +11 -6
- data/tracks/java/exercises/meetup/src/test/java/MeetupTest.java +91 -91
- data/tracks/java/exercises/settings.gradle +1 -0
- data/tracks/kotlin/config.json +2 -1
- data/tracks/kotlin/exercises/_template/build.gradle +1 -1
- data/tracks/kotlin/exercises/accumulate/build.gradle +1 -1
- data/tracks/kotlin/exercises/acronym/build.gradle +1 -1
- data/tracks/kotlin/exercises/allergies/build.gradle +1 -1
- data/tracks/kotlin/exercises/anagram/build.gradle +1 -1
- data/tracks/kotlin/exercises/atbash-cipher/build.gradle +1 -1
- data/tracks/kotlin/exercises/beer-song/build.gradle +1 -1
- data/tracks/kotlin/exercises/binary-search/build.gradle +1 -1
- data/tracks/kotlin/exercises/binary/build.gradle +1 -1
- data/tracks/kotlin/exercises/bob/build.gradle +1 -1
- data/tracks/kotlin/exercises/bracket-push/build.gradle +1 -1
- data/tracks/kotlin/exercises/change/build.gradle +1 -1
- data/tracks/kotlin/exercises/difference-of-squares/build.gradle +1 -1
- data/tracks/kotlin/exercises/etl/build.gradle +1 -1
- data/tracks/kotlin/exercises/flatten-array/build.gradle +1 -1
- data/tracks/kotlin/exercises/gigasecond/build.gradle +1 -1
- data/tracks/kotlin/exercises/grade-school/build.gradle +1 -1
- data/tracks/kotlin/exercises/hamming/build.gradle +1 -1
- data/tracks/kotlin/exercises/hello-world/build.gradle +1 -1
- data/tracks/kotlin/exercises/hexadecimal/build.gradle +1 -1
- data/tracks/kotlin/exercises/isogram/build.gradle +1 -1
- data/tracks/kotlin/exercises/largest-series-product/build.gradle +1 -1
- data/tracks/kotlin/exercises/leap/build.gradle +1 -1
- data/tracks/kotlin/exercises/linked-list/build.gradle +1 -1
- data/tracks/kotlin/exercises/luhn/build.gradle +1 -1
- data/tracks/kotlin/exercises/nth-prime/build.gradle +1 -1
- data/tracks/kotlin/exercises/nucleotide-count/build.gradle +1 -1
- data/tracks/kotlin/exercises/pangram/build.gradle +1 -1
- data/tracks/kotlin/exercises/pascals-triangle/build.gradle +1 -1
- data/tracks/kotlin/exercises/phone-number/build.gradle +1 -1
- data/tracks/kotlin/exercises/pig-latin/build.gradle +1 -1
- data/tracks/kotlin/exercises/raindrops/build.gradle +1 -1
- data/tracks/kotlin/exercises/rna-transcription/build.gradle +1 -1
- data/tracks/kotlin/exercises/rna-transcription/src/example/kotlin/RnaTranscription.kt +9 -12
- data/tracks/kotlin/exercises/rna-transcription/src/main/kotlin/RnaTranscription.kt +9 -0
- data/tracks/kotlin/exercises/rna-transcription/src/test/kotlin/RnaTranscriptionTest.kt +6 -6
- data/tracks/kotlin/exercises/robot-name/build.gradle +1 -1
- data/tracks/kotlin/exercises/roman-numerals/build.gradle +1 -1
- data/tracks/kotlin/exercises/scrabble-score/build.gradle +1 -1
- data/tracks/kotlin/exercises/series/build.gradle +1 -1
- data/tracks/kotlin/exercises/sieve/build.gradle +1 -1
- data/tracks/kotlin/exercises/simple-cipher/build.gradle +1 -1
- data/tracks/kotlin/exercises/space-age/build.gradle +1 -1
- data/tracks/kotlin/exercises/strain/build.gradle +1 -1
- data/tracks/kotlin/exercises/word-count/build.gradle +1 -1
- data/tracks/lua/exercises/circular-buffer/circular-buffer_spec.lua +1 -1
- data/tracks/pascal/docs/INSTALLATION.md +7 -5
- data/tracks/pascal/docs/TESTS.md +4 -0
- data/tracks/php/config.json +9 -0
- data/tracks/php/exercises/ocr-numbers/example.php +113 -0
- data/tracks/php/exercises/ocr-numbers/ocr-numbers_test.php +222 -0
- metadata +10 -3
- data/tracks/kotlin/exercises/rna-transcription/src/main/kotlin/.keep +0 -0
data/tracks/kotlin/config.json
CHANGED
@@ -1,12 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
}
|
11
|
-
}.joinToString("")
|
12
|
-
}
|
1
|
+
fun transcribeToRna(dna: String): String = dna.map { nucleotide ->
|
2
|
+
when (nucleotide) {
|
3
|
+
'A' -> 'U'
|
4
|
+
'G' -> 'C'
|
5
|
+
'C' -> 'G'
|
6
|
+
'T' -> 'A'
|
7
|
+
else -> nucleotide
|
8
|
+
}
|
9
|
+
}.joinToString("")
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/*
|
2
|
+
In Kotlin functions can be declared at top level in a file, meaning
|
3
|
+
you do not need to create a class to hold a function, like languages
|
4
|
+
such as Java, C# or Scala.
|
5
|
+
|
6
|
+
http://kotlinlang.org/docs/reference/functions.html#function-scope
|
7
|
+
*/
|
8
|
+
|
9
|
+
fun transcribeToRna(dna: String): String = ""
|
@@ -5,31 +5,31 @@ class RnaTranscriptionTest {
|
|
5
5
|
|
6
6
|
@Test
|
7
7
|
fun emptyDnaIsEmptyRna() {
|
8
|
-
Assert.assertEquals("",
|
8
|
+
Assert.assertEquals("", transcribeToRna(""));
|
9
9
|
}
|
10
10
|
|
11
11
|
@Test
|
12
12
|
fun cytosineIsGuanine() {
|
13
|
-
Assert.assertEquals("G",
|
13
|
+
Assert.assertEquals("G", transcribeToRna("C"));
|
14
14
|
}
|
15
15
|
|
16
16
|
@Test
|
17
17
|
fun guanineIsCytosine() {
|
18
|
-
Assert.assertEquals("C",
|
18
|
+
Assert.assertEquals("C", transcribeToRna("G"));
|
19
19
|
}
|
20
20
|
|
21
21
|
@Test
|
22
22
|
fun thymineIsAdenine() {
|
23
|
-
Assert.assertEquals("A",
|
23
|
+
Assert.assertEquals("A", transcribeToRna("T"));
|
24
24
|
}
|
25
25
|
|
26
26
|
@Test
|
27
27
|
fun adenineIsUracil() {
|
28
|
-
Assert.assertEquals("U",
|
28
|
+
Assert.assertEquals("U", transcribeToRna("A"));
|
29
29
|
}
|
30
30
|
|
31
31
|
@Test
|
32
32
|
fun rnaTranscription() {
|
33
|
-
Assert.assertEquals("UGCACCAGAAUU",
|
33
|
+
Assert.assertEquals("UGCACCAGAAUU", transcribeToRna("ACGTGGTCTTAA"));
|
34
34
|
}
|
35
35
|
}
|