trackler 2.2.1.94 → 2.2.1.95
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/problem-specifications/exercises/anagram/canonical-data.json +1 -37
- data/tracks/crystal/exercises/hello-world/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/java/exercises/prime-factors/.meta/hints.md +58 -0
- data/tracks/java/exercises/prime-factors/README.md +62 -0
- data/tracks/java/exercises/robot-name/.meta/hints.md +58 -0
- data/tracks/java/exercises/robot-name/README.md +62 -0
- data/tracks/java/exercises/robot-simulator/src/test/java/RobotTest.java +9 -5
- data/tracks/java/exercises/run-length-encoding/.meta/hints.md +58 -0
- data/tracks/java/exercises/run-length-encoding/README.md +62 -0
- data/tracks/javascript/config/exercise_readme.go.tmpl +26 -4
- data/tracks/javascript/exercises/accumulate/README.md +16 -16
- data/tracks/javascript/exercises/acronym/README.md +15 -13
- data/tracks/javascript/exercises/all-your-base/README.md +16 -14
- data/tracks/javascript/exercises/allergies/README.md +15 -13
- data/tracks/javascript/exercises/alphametics/README.md +17 -15
- data/tracks/javascript/exercises/anagram/README.md +15 -12
- data/tracks/javascript/exercises/atbash-cipher/README.md +17 -13
- data/tracks/javascript/exercises/beer-song/README.md +17 -14
- data/tracks/javascript/exercises/binary/README.md +17 -12
- data/tracks/javascript/exercises/binary-search/README.md +15 -12
- data/tracks/javascript/exercises/binary-search-tree/README.md +15 -12
- data/tracks/javascript/exercises/bob/README.md +17 -12
- data/tracks/javascript/exercises/bowling/README.md +38 -21
- data/tracks/javascript/exercises/bracket-push/README.md +15 -12
- data/tracks/javascript/exercises/change/README.md +31 -17
- data/tracks/javascript/exercises/circular-buffer/README.md +28 -18
- data/tracks/javascript/exercises/clock/README.md +15 -12
- data/tracks/javascript/exercises/collatz-conjecture/README.md +15 -12
- data/tracks/javascript/exercises/connect/README.md +17 -16
- data/tracks/javascript/exercises/crypto-square/README.md +25 -20
- data/tracks/javascript/exercises/custom-set/README.md +15 -13
- data/tracks/javascript/exercises/diamond/README.md +21 -18
- data/tracks/javascript/exercises/difference-of-squares/README.md +16 -13
- data/tracks/javascript/exercises/diffie-hellman/README.md +15 -17
- data/tracks/javascript/exercises/etl/README.md +18 -13
- data/tracks/javascript/exercises/flatten-array/README.md +16 -14
- data/tracks/javascript/exercises/food-chain/README.md +16 -13
- data/tracks/javascript/exercises/forth/README.md +17 -18
- data/tracks/javascript/exercises/gigasecond/README.md +15 -12
- data/tracks/javascript/exercises/grade-school/README.md +15 -13
- data/tracks/javascript/exercises/grains/README.md +15 -13
- data/tracks/javascript/exercises/hamming/README.md +15 -12
- data/tracks/javascript/exercises/hello-world/README.md +15 -12
- data/tracks/javascript/exercises/hexadecimal/README.md +15 -12
- data/tracks/javascript/exercises/isbn-verifier/README.md +44 -36
- data/tracks/javascript/exercises/isogram/README.md +17 -13
- data/tracks/javascript/exercises/kindergarten-garden/README.md +28 -25
- data/tracks/javascript/exercises/largest-series-product/README.md +15 -12
- data/tracks/javascript/exercises/leap/README.md +16 -13
- data/tracks/javascript/exercises/linked-list/README.md +25 -22
- data/tracks/javascript/exercises/list-ops/README.md +15 -13
- data/tracks/javascript/exercises/luhn/README.md +22 -19
- data/tracks/javascript/exercises/matrix/README.md +21 -16
- data/tracks/javascript/exercises/meetup/README.md +31 -25
- data/tracks/javascript/exercises/minesweeper/README.md +15 -13
- data/tracks/javascript/exercises/nth-prime/README.md +15 -12
- data/tracks/javascript/exercises/nucleotide-count/README.md +23 -34
- data/tracks/javascript/exercises/ocr-numbers/README.md +21 -18
- data/tracks/javascript/exercises/octal/README.md +21 -14
- data/tracks/javascript/exercises/palindrome-products/README.md +29 -27
- data/tracks/javascript/exercises/pangram/README.md +16 -13
- data/tracks/javascript/exercises/pascals-triangle/README.md +17 -14
- data/tracks/javascript/exercises/perfect-numbers/README.md +17 -14
- data/tracks/javascript/exercises/phone-number/README.md +19 -15
- data/tracks/javascript/exercises/pig-latin/README.md +15 -12
- data/tracks/javascript/exercises/point-mutations/README.md +15 -12
- data/tracks/javascript/exercises/prime-factors/README.md +15 -12
- data/tracks/javascript/exercises/protein-translation/README.md +19 -17
- data/tracks/javascript/exercises/proverb/README.md +29 -21
- data/tracks/javascript/exercises/pythagorean-triplet/README.md +18 -15
- data/tracks/javascript/exercises/queen-attack/README.md +16 -13
- data/tracks/javascript/exercises/raindrops/README.md +15 -12
- data/tracks/javascript/exercises/reverse-string/README.md +19 -15
- data/tracks/javascript/exercises/rna-transcription/README.md +16 -13
- data/tracks/javascript/exercises/robot-name/README.md +15 -12
- data/tracks/javascript/exercises/robot-simulator/README.md +15 -12
- data/tracks/javascript/exercises/roman-numerals/README.md +16 -13
- data/tracks/javascript/exercises/run-length-encoding/README.md +19 -16
- data/tracks/javascript/exercises/saddle-points/README.md +16 -13
- data/tracks/javascript/exercises/say/README.md +15 -12
- data/tracks/javascript/exercises/scrabble-score/README.md +18 -13
- data/tracks/javascript/exercises/secret-handshake/README.md +16 -13
- data/tracks/javascript/exercises/series/README.md +15 -12
- data/tracks/javascript/exercises/sieve/README.md +15 -12
- data/tracks/javascript/exercises/simple-cipher/README.md +19 -18
- data/tracks/javascript/exercises/simple-linked-list/README.md +15 -12
- data/tracks/javascript/exercises/space-age/README.md +16 -13
- data/tracks/javascript/exercises/strain/README.md +15 -12
- data/tracks/javascript/exercises/sublist/README.md +14 -17
- data/tracks/javascript/exercises/sum-of-multiples/README.md +19 -19
- data/tracks/javascript/exercises/transpose/README.md +15 -12
- data/tracks/javascript/exercises/triangle/README.md +24 -18
- data/tracks/javascript/exercises/trinary/README.md +16 -13
- data/tracks/javascript/exercises/twelve-days/README.md +17 -16
- data/tracks/javascript/exercises/two-bucket/README.md +25 -22
- data/tracks/javascript/exercises/two-fer/README.md +19 -14
- data/tracks/javascript/exercises/word-count/README.md +16 -14
- data/tracks/javascript/exercises/wordy/README.md +15 -17
- data/tracks/javascript/exercises/zipper/README.md +20 -18
- data/tracks/perl6/docs/ABOUT.md +12 -21
- metadata +6 -4
- data/tracks/javascript/docs/EXERCISE_README_INSERT.md +0 -22
@@ -1,36 +1,50 @@
|
|
1
1
|
# Change
|
2
2
|
|
3
|
-
Correctly determine the
|
3
|
+
Correctly determine the fewest number of coins to be given to a customer such
|
4
|
+
that the sum of the coins' value would equal the correct amount of change.
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
## For example
|
7
|
+
|
8
|
+
- An input of 15 with [1, 5, 10, 25, 100] should return one nickel (5)
|
9
|
+
and one dime (10) or [0, 1, 1, 0, 0]
|
10
|
+
- An input of 40 with [1, 5, 10, 25, 100] should return one nickel (5)
|
11
|
+
and one dime (10) and one quarter (25) or [0, 1, 1, 1, 0]
|
12
|
+
|
13
|
+
## Edge cases
|
14
|
+
|
15
|
+
- Does your algorithm work for any given set of coins?
|
16
|
+
- Can you ask for negative change?
|
17
|
+
- Can you ask for a change value smaller than the smallest coin value?
|
10
18
|
|
11
19
|
## Setup
|
12
20
|
|
13
|
-
Go through the setup instructions for JavaScript to
|
14
|
-
|
21
|
+
Go through the setup instructions for JavaScript to install the
|
22
|
+
necessary dependencies:
|
15
23
|
|
16
24
|
http://exercism.io/languages/javascript/installation
|
17
25
|
|
18
|
-
##
|
26
|
+
## Running the test suite
|
19
27
|
|
20
|
-
|
28
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
29
|
+
You can install it by opening a terminal window and running the
|
30
|
+
following command:
|
21
31
|
|
22
|
-
|
32
|
+
```sh
|
33
|
+
npm install -g jasmine
|
34
|
+
```
|
23
35
|
|
24
|
-
|
25
|
-
test the Hello World exercise:
|
36
|
+
Run the test suite from the exercise directory with:
|
26
37
|
|
27
|
-
|
38
|
+
```sh
|
39
|
+
jasmine change.spec.js
|
40
|
+
```
|
28
41
|
|
29
|
-
In many test suites all but the first test have been
|
42
|
+
In many test suites all but the first test have been marked "pending".
|
43
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
30
44
|
|
31
|
-
|
32
|
-
changing `xit` to `it`.
|
45
|
+
## Source
|
33
46
|
|
47
|
+
Software Craftsmanship - Coin Change Kata [https://web.archive.org/web/20130115115225/http://craftsmanship.sv.cmu.edu:80/exercises/coin-change-kata](https://web.archive.org/web/20130115115225/http://craftsmanship.sv.cmu.edu:80/exercises/coin-change-kata)
|
34
48
|
|
35
49
|
## Submitting Incomplete Solutions
|
36
50
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -31,40 +31,50 @@ If the buffer has 7 elements then it is completely full:
|
|
31
31
|
When the buffer is full an error will be raised, alerting the client
|
32
32
|
that further writes are blocked until a slot becomes free.
|
33
33
|
|
34
|
-
|
35
|
-
this case, two more elements — A & B —
|
36
|
-
3 & 4:
|
34
|
+
When the buffer is full, the client can opt to overwrite the oldest
|
35
|
+
data with a forced write. In this case, two more elements — A & B —
|
36
|
+
are added and they overwrite the 3 & 4:
|
37
37
|
|
38
38
|
[6][7][8][9][A][B][5]
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
buffer
|
40
|
+
3 & 4 have been replaced by A & B making 5 now the oldest data in the
|
41
|
+
buffer. Finally, if two elements are removed then what would be
|
42
|
+
returned is 5 & 6 yielding the buffer:
|
43
43
|
|
44
44
|
[ ][7][8][9][A][B][ ]
|
45
45
|
|
46
|
+
Because there is space available, if the client again uses overwrite
|
47
|
+
to store C & D then the space where 5 & 6 were stored previously will
|
48
|
+
be used not the location of 7 & 8. 7 is still the oldest element and
|
49
|
+
the buffer is once again full.
|
50
|
+
|
51
|
+
[D][7][8][9][A][B][C]
|
52
|
+
|
46
53
|
## Setup
|
47
54
|
|
48
|
-
Go through the setup instructions for JavaScript to
|
49
|
-
|
55
|
+
Go through the setup instructions for JavaScript to install the
|
56
|
+
necessary dependencies:
|
50
57
|
|
51
58
|
http://exercism.io/languages/javascript/installation
|
52
59
|
|
53
|
-
##
|
54
|
-
|
55
|
-
Execute the tests with:
|
60
|
+
## Running the test suite
|
56
61
|
|
57
|
-
|
62
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
63
|
+
You can install it by opening a terminal window and running the
|
64
|
+
following command:
|
58
65
|
|
59
|
-
|
60
|
-
|
66
|
+
```sh
|
67
|
+
npm install -g jasmine
|
68
|
+
```
|
61
69
|
|
62
|
-
|
70
|
+
Run the test suite from the exercise directory with:
|
63
71
|
|
64
|
-
|
72
|
+
```sh
|
73
|
+
jasmine circular-buffer.spec.js
|
74
|
+
```
|
65
75
|
|
66
|
-
|
67
|
-
changing `xit` to `it`.
|
76
|
+
In many test suites all but the first test have been marked "pending".
|
77
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
68
78
|
|
69
79
|
## Source
|
70
80
|
|
@@ -8,26 +8,29 @@ Two clocks that represent the same time should be equal to each other.
|
|
8
8
|
|
9
9
|
## Setup
|
10
10
|
|
11
|
-
Go through the setup instructions for JavaScript to
|
12
|
-
|
11
|
+
Go through the setup instructions for JavaScript to install the
|
12
|
+
necessary dependencies:
|
13
13
|
|
14
14
|
http://exercism.io/languages/javascript/installation
|
15
15
|
|
16
|
-
##
|
16
|
+
## Running the test suite
|
17
17
|
|
18
|
-
|
18
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
19
|
+
You can install it by opening a terminal window and running the
|
20
|
+
following command:
|
19
21
|
|
20
|
-
|
22
|
+
```sh
|
23
|
+
npm install -g jasmine
|
24
|
+
```
|
21
25
|
|
22
|
-
|
23
|
-
test the Hello World exercise:
|
26
|
+
Run the test suite from the exercise directory with:
|
24
27
|
|
25
|
-
|
28
|
+
```sh
|
29
|
+
jasmine clock.spec.js
|
30
|
+
```
|
26
31
|
|
27
|
-
In many test suites all but the first test have been
|
28
|
-
|
29
|
-
Once you get a test passing, you can unskip the next one by
|
30
|
-
changing `xit` to `it`.
|
32
|
+
In many test suites all but the first test have been marked "pending".
|
33
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
31
34
|
|
32
35
|
## Source
|
33
36
|
|
@@ -28,26 +28,29 @@ Resulting in 9 steps. So for input n = 12, the return value would be 9.
|
|
28
28
|
|
29
29
|
## Setup
|
30
30
|
|
31
|
-
Go through the setup instructions for JavaScript to
|
32
|
-
|
31
|
+
Go through the setup instructions for JavaScript to install the
|
32
|
+
necessary dependencies:
|
33
33
|
|
34
34
|
http://exercism.io/languages/javascript/installation
|
35
35
|
|
36
|
-
##
|
36
|
+
## Running the test suite
|
37
37
|
|
38
|
-
|
38
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
39
|
+
You can install it by opening a terminal window and running the
|
40
|
+
following command:
|
39
41
|
|
40
|
-
|
42
|
+
```sh
|
43
|
+
npm install -g jasmine
|
44
|
+
```
|
41
45
|
|
42
|
-
|
43
|
-
test the Hello World exercise:
|
46
|
+
Run the test suite from the exercise directory with:
|
44
47
|
|
45
|
-
|
48
|
+
```sh
|
49
|
+
jasmine collatz-conjecture.spec.js
|
50
|
+
```
|
46
51
|
|
47
|
-
In many test suites all but the first test have been
|
48
|
-
|
49
|
-
Once you get a test passing, you can unskip the next one by
|
50
|
-
changing `xit` to `it`.
|
52
|
+
In many test suites all but the first test have been marked "pending".
|
53
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
51
54
|
|
52
55
|
## Source
|
53
56
|
|
@@ -18,7 +18,7 @@ computes the winner (or lack thereof). Note that all games need not be "fair".
|
|
18
18
|
The boards look like this (with spaces added for readability, which won't be in
|
19
19
|
the representation passed to your code):
|
20
20
|
|
21
|
-
```
|
21
|
+
```text
|
22
22
|
. O . X .
|
23
23
|
. X X O .
|
24
24
|
O O O X .
|
@@ -32,28 +32,29 @@ won since `O` didn't connect top and bottom.
|
|
32
32
|
|
33
33
|
## Setup
|
34
34
|
|
35
|
-
Go through the setup instructions for JavaScript to
|
36
|
-
|
35
|
+
Go through the setup instructions for JavaScript to install the
|
36
|
+
necessary dependencies:
|
37
37
|
|
38
|
-
http://exercism.io/languages/javascript
|
38
|
+
http://exercism.io/languages/javascript/installation
|
39
39
|
|
40
|
-
##
|
40
|
+
## Running the test suite
|
41
41
|
|
42
|
-
|
42
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
43
|
+
You can install it by opening a terminal window and running the
|
44
|
+
following command:
|
43
45
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
test the Hello World exercise:
|
48
|
-
|
49
|
-
jasmine hello-world.spec.js
|
50
|
-
|
51
|
-
In many test suites all but the first test have been skipped.
|
46
|
+
```sh
|
47
|
+
npm install -g jasmine
|
48
|
+
```
|
52
49
|
|
53
|
-
|
54
|
-
changing `xit` to `it`.
|
50
|
+
Run the test suite from the exercise directory with:
|
55
51
|
|
52
|
+
```sh
|
53
|
+
jasmine connect.spec.js
|
54
|
+
```
|
56
55
|
|
56
|
+
In many test suites all but the first test have been marked "pending".
|
57
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
57
58
|
|
58
59
|
## Submitting Incomplete Solutions
|
59
60
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -26,7 +26,7 @@ and `r` is the number of rows.
|
|
26
26
|
Our normalized text is 54 characters long, dictating a rectangle with
|
27
27
|
`c = 8` and `r = 7`:
|
28
28
|
|
29
|
-
```
|
29
|
+
```text
|
30
30
|
ifmanwas
|
31
31
|
meanttos
|
32
32
|
tayonthe
|
@@ -41,22 +41,24 @@ right.
|
|
41
41
|
|
42
42
|
The message above is coded as:
|
43
43
|
|
44
|
-
```
|
44
|
+
```text
|
45
45
|
imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau
|
46
46
|
```
|
47
47
|
|
48
|
-
Output the encoded text in chunks. Phrases that fill perfect
|
49
|
-
`(r X
|
50
|
-
|
48
|
+
Output the encoded text in chunks. Phrases that fill perfect rectangles
|
49
|
+
`(r X c)` should be output `c` chunks of `r` length, separated by spaces.
|
50
|
+
Phrases that do not fill perfect rectangles will have `n` empty spaces.
|
51
|
+
Those spaces should be distributed evenly, added to the end of the last
|
52
|
+
`n` chunks.
|
51
53
|
|
52
|
-
```
|
53
|
-
imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn
|
54
|
+
```text
|
55
|
+
imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau
|
54
56
|
```
|
55
57
|
|
56
58
|
Notice that were we to stack these, we could visually decode the
|
57
59
|
cyphertext back in to the original message:
|
58
60
|
|
59
|
-
```
|
61
|
+
```text
|
60
62
|
imtgdvs
|
61
63
|
fearwer
|
62
64
|
mayoogo
|
@@ -69,26 +71,29 @@ sseoau
|
|
69
71
|
|
70
72
|
## Setup
|
71
73
|
|
72
|
-
Go through the setup instructions for JavaScript to
|
73
|
-
|
74
|
+
Go through the setup instructions for JavaScript to install the
|
75
|
+
necessary dependencies:
|
74
76
|
|
75
77
|
http://exercism.io/languages/javascript/installation
|
76
78
|
|
77
|
-
##
|
79
|
+
## Running the test suite
|
78
80
|
|
79
|
-
|
81
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
82
|
+
You can install it by opening a terminal window and running the
|
83
|
+
following command:
|
80
84
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
test the Hello World exercise:
|
85
|
+
```sh
|
86
|
+
npm install -g jasmine
|
87
|
+
```
|
85
88
|
|
86
|
-
|
89
|
+
Run the test suite from the exercise directory with:
|
87
90
|
|
88
|
-
|
91
|
+
```sh
|
92
|
+
jasmine crypto-square.spec.js
|
93
|
+
```
|
89
94
|
|
90
|
-
|
91
|
-
changing `xit` to `it`.
|
95
|
+
In many test suites all but the first test have been marked "pending".
|
96
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
92
97
|
|
93
98
|
## Source
|
94
99
|
|
@@ -9,27 +9,29 @@ unique elements.
|
|
9
9
|
|
10
10
|
## Setup
|
11
11
|
|
12
|
-
Go through the setup instructions for JavaScript to
|
13
|
-
|
12
|
+
Go through the setup instructions for JavaScript to install the
|
13
|
+
necessary dependencies:
|
14
14
|
|
15
15
|
http://exercism.io/languages/javascript/installation
|
16
16
|
|
17
|
-
##
|
17
|
+
## Running the test suite
|
18
18
|
|
19
|
-
|
19
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
20
|
+
You can install it by opening a terminal window and running the
|
21
|
+
following command:
|
20
22
|
|
21
|
-
|
23
|
+
```sh
|
24
|
+
npm install -g jasmine
|
25
|
+
```
|
22
26
|
|
23
|
-
|
24
|
-
test the Hello World exercise:
|
27
|
+
Run the test suite from the exercise directory with:
|
25
28
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
Once you get a test passing, you can unskip the next one by
|
31
|
-
changing `xit` to `it`.
|
29
|
+
```sh
|
30
|
+
jasmine custom-set.spec.js
|
31
|
+
```
|
32
32
|
|
33
|
+
In many test suites all but the first test have been marked "pending".
|
34
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
33
35
|
|
34
36
|
## Submitting Incomplete Solutions
|
35
37
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Diamond
|
2
2
|
|
3
|
-
The diamond kata takes as its input a letter, and outputs it in a diamond
|
4
|
-
shape. Given a letter, it prints a diamond starting with 'A', with the
|
3
|
+
The diamond kata takes as its input a letter, and outputs it in a diamond
|
4
|
+
shape. Given a letter, it prints a diamond starting with 'A', with the
|
5
5
|
supplied letter at the widest point.
|
6
6
|
|
7
7
|
## Requirements
|
@@ -15,7 +15,7 @@ supplied letter at the widest point.
|
|
15
15
|
* The diamond has a square shape (width equals height).
|
16
16
|
* The letters form a diamond shape.
|
17
17
|
* The top half has the letters in ascending order.
|
18
|
-
* The bottom half has the letters in descending order.
|
18
|
+
* The bottom half has the letters in descending order.
|
19
19
|
* The four corners (containing the spaces) are triangles.
|
20
20
|
|
21
21
|
## Examples
|
@@ -24,13 +24,13 @@ In the following examples, spaces are indicated by `·` characters.
|
|
24
24
|
|
25
25
|
Diamond for letter 'A':
|
26
26
|
|
27
|
-
```
|
27
|
+
```text
|
28
28
|
A
|
29
29
|
```
|
30
30
|
|
31
31
|
Diamond for letter 'C':
|
32
32
|
|
33
|
-
```
|
33
|
+
```text
|
34
34
|
··A··
|
35
35
|
·B·B·
|
36
36
|
C···C
|
@@ -40,7 +40,7 @@ C···C
|
|
40
40
|
|
41
41
|
Diamond for letter 'E':
|
42
42
|
|
43
|
-
```
|
43
|
+
```text
|
44
44
|
····A····
|
45
45
|
···B·B···
|
46
46
|
··C···C··
|
@@ -54,26 +54,29 @@ E·······E
|
|
54
54
|
|
55
55
|
## Setup
|
56
56
|
|
57
|
-
Go through the setup instructions for JavaScript to
|
58
|
-
|
57
|
+
Go through the setup instructions for JavaScript to install the
|
58
|
+
necessary dependencies:
|
59
59
|
|
60
60
|
http://exercism.io/languages/javascript/installation
|
61
61
|
|
62
|
-
##
|
62
|
+
## Running the test suite
|
63
63
|
|
64
|
-
|
64
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
65
|
+
You can install it by opening a terminal window and running the
|
66
|
+
following command:
|
65
67
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
test the Hello World exercise:
|
68
|
+
```sh
|
69
|
+
npm install -g jasmine
|
70
|
+
```
|
70
71
|
|
71
|
-
|
72
|
+
Run the test suite from the exercise directory with:
|
72
73
|
|
73
|
-
|
74
|
+
```sh
|
75
|
+
jasmine diamond.spec.js
|
76
|
+
```
|
74
77
|
|
75
|
-
|
76
|
-
changing `xit` to `it`.
|
78
|
+
In many test suites all but the first test have been marked "pending".
|
79
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
77
80
|
|
78
81
|
## Source
|
79
82
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Difference
|
1
|
+
# Difference Of Squares
|
2
2
|
|
3
3
|
Find the difference between the square of the sum and the sum of the squares of the first N natural numbers.
|
4
4
|
|
@@ -14,26 +14,29 @@ natural numbers is 3025 - 385 = 2640.
|
|
14
14
|
|
15
15
|
## Setup
|
16
16
|
|
17
|
-
Go through the setup instructions for JavaScript to
|
18
|
-
|
17
|
+
Go through the setup instructions for JavaScript to install the
|
18
|
+
necessary dependencies:
|
19
19
|
|
20
20
|
http://exercism.io/languages/javascript/installation
|
21
21
|
|
22
|
-
##
|
22
|
+
## Running the test suite
|
23
23
|
|
24
|
-
|
24
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
25
|
+
You can install it by opening a terminal window and running the
|
26
|
+
following command:
|
25
27
|
|
26
|
-
|
28
|
+
```sh
|
29
|
+
npm install -g jasmine
|
30
|
+
```
|
27
31
|
|
28
|
-
|
29
|
-
test the Hello World exercise:
|
32
|
+
Run the test suite from the exercise directory with:
|
30
33
|
|
31
|
-
|
34
|
+
```sh
|
35
|
+
jasmine difference-of-squares.spec.js
|
36
|
+
```
|
32
37
|
|
33
|
-
In many test suites all but the first test have been
|
34
|
-
|
35
|
-
Once you get a test passing, you can unskip the next one by
|
36
|
-
changing `xit` to `it`.
|
38
|
+
In many test suites all but the first test have been marked "pending".
|
39
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
37
40
|
|
38
41
|
## Source
|
39
42
|
|
@@ -39,31 +39,29 @@ secret s.
|
|
39
39
|
|
40
40
|
## Setup
|
41
41
|
|
42
|
-
Go through the setup instructions for JavaScript to
|
43
|
-
|
42
|
+
Go through the setup instructions for JavaScript to install the
|
43
|
+
necessary dependencies:
|
44
44
|
|
45
45
|
http://exercism.io/languages/javascript/installation
|
46
46
|
|
47
|
-
##
|
47
|
+
## Running the test suite
|
48
48
|
|
49
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
50
|
+
You can install it by opening a terminal window and running the
|
51
|
+
following command:
|
49
52
|
|
53
|
+
```sh
|
54
|
+
npm install -g jasmine
|
55
|
+
```
|
50
56
|
|
51
|
-
|
57
|
+
Run the test suite from the exercise directory with:
|
52
58
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
Replace `<exercise-name>` with the name of the current exercise. E.g., to
|
58
|
-
test the Hello World exercise:
|
59
|
-
|
60
|
-
jasmine hello-world.spec.js
|
61
|
-
|
62
|
-
In many test suites all but the first test have been skipped.
|
63
|
-
|
64
|
-
Once you get a test passing, you can unskip the next one by
|
65
|
-
changing `xit` to `it`.
|
59
|
+
```sh
|
60
|
+
jasmine diffie-hellman.spec.js
|
61
|
+
```
|
66
62
|
|
63
|
+
In many test suites all but the first test have been marked "pending".
|
64
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
67
65
|
|
68
66
|
## Source
|
69
67
|
|
@@ -1,8 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# ETL
|
2
2
|
|
3
3
|
We are going to do the `Transform` step of an Extract-Transform-Load.
|
4
4
|
|
5
5
|
### ETL
|
6
|
+
|
6
7
|
Extract-Transform-Load (ETL) is a fancy way of saying, "We have some crufty, legacy data over in this system, and now we need it in this shiny new system over here, so
|
7
8
|
we're going to migrate this."
|
8
9
|
|
@@ -11,6 +12,7 @@ once." That's then typically followed by much forehead slapping and
|
|
11
12
|
moaning about how stupid we could possibly be.)
|
12
13
|
|
13
14
|
### The goal
|
15
|
+
|
14
16
|
We're going to extract some scrabble scores from a legacy system.
|
15
17
|
|
16
18
|
The old system stored a list of letters per score:
|
@@ -46,26 +48,29 @@ game while being scored at 4 in the Hawaiian-language version.
|
|
46
48
|
|
47
49
|
## Setup
|
48
50
|
|
49
|
-
Go through the setup instructions for JavaScript to
|
50
|
-
|
51
|
+
Go through the setup instructions for JavaScript to install the
|
52
|
+
necessary dependencies:
|
51
53
|
|
52
54
|
http://exercism.io/languages/javascript/installation
|
53
55
|
|
54
|
-
##
|
55
|
-
|
56
|
-
Execute the tests with:
|
56
|
+
## Running the test suite
|
57
57
|
|
58
|
-
|
58
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
59
|
+
You can install it by opening a terminal window and running the
|
60
|
+
following command:
|
59
61
|
|
60
|
-
|
61
|
-
|
62
|
+
```sh
|
63
|
+
npm install -g jasmine
|
64
|
+
```
|
62
65
|
|
63
|
-
|
66
|
+
Run the test suite from the exercise directory with:
|
64
67
|
|
65
|
-
|
68
|
+
```sh
|
69
|
+
jasmine etl.spec.js
|
70
|
+
```
|
66
71
|
|
67
|
-
|
68
|
-
changing `xit` to `it`.
|
72
|
+
In many test suites all but the first test have been marked "pending".
|
73
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
69
74
|
|
70
75
|
## Source
|
71
76
|
|