From f6fa0a1f6ca920aecf373d70453a48d09fe73cda Mon Sep 17 00:00:00 2001 From: princy <137168107+princyym@users.noreply.github.com> Date: Tue, 2 Apr 2024 14:17:39 +0530 Subject: adding the challenge 263 --- challenge-263/perl/ch-1.pl | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 challenge-263/perl/ch-1.pl diff --git a/challenge-263/perl/ch-1.pl b/challenge-263/perl/ch-1.pl new file mode 100644 index 0000000000..e69de29bb2 -- cgit From 130f38aeb59be75717f439bfbdc665e4287630f7 Mon Sep 17 00:00:00 2001 From: princy <137168107+princyym@users.noreply.github.com> Date: Tue, 2 Apr 2024 14:28:35 +0530 Subject: weekly challenge --- challenge-263/perl/ch-2.pl | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 challenge-263/perl/ch-2.pl diff --git a/challenge-263/perl/ch-2.pl b/challenge-263/perl/ch-2.pl new file mode 100644 index 0000000000..e69de29bb2 -- cgit From 174f15dd260f75e4ad54e7490c6b41bf5e5fca53 Mon Sep 17 00:00:00 2001 From: princy <137168107+princyym@users.noreply.github.com> Date: Tue, 2 Apr 2024 14:41:55 +0530 Subject: #263 challeneg by princy mangla --- challenge-263/perl/ch-1.pl | 0 challenge-263/perl/ch-2.pl | 0 challenge-263/princy-perl/ch-1.pl | 28 ++++++++++++++++++++++++++++ challenge-263/princy-perl/ch-2.pl | 21 +++++++++++++++++++++ 4 files changed, 49 insertions(+) delete mode 100644 challenge-263/perl/ch-1.pl delete mode 100644 challenge-263/perl/ch-2.pl create mode 100644 challenge-263/princy-perl/ch-1.pl create mode 100644 challenge-263/princy-perl/ch-2.pl diff --git a/challenge-263/perl/ch-1.pl b/challenge-263/perl/ch-1.pl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/challenge-263/perl/ch-2.pl b/challenge-263/perl/ch-2.pl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/challenge-263/princy-perl/ch-1.pl b/challenge-263/princy-perl/ch-1.pl new file mode 100644 index 0000000000..55226c5e2f --- /dev/null +++ b/challenge-263/princy-perl/ch-1.pl @@ -0,0 +1,28 @@ + +#!/usr/bin/perl + +use strict; +use warnings; + +# Input array and target +my @ints = (1, 5, 3, 2, 4, 2); +my $k = 2; + +# Sorta the array +my @sorted = sort @ints; + +# Initialize an empty array to store the indices +my @indices; + +# Iterate over the sorted array +for (my $i = 0; $i < @sorted; $i++) { + # If the current element is equal to the target + if ($sorted[$i] == $k) { + # Add the index to the array + push @indices, $i; + } +} + +# Print the indices +print "The indices where the element is $k are: @indices\n"; + diff --git a/challenge-263/princy-perl/ch-2.pl b/challenge-263/princy-perl/ch-2.pl new file mode 100644 index 0000000000..53d6eadcf5 --- /dev/null +++ b/challenge-263/princy-perl/ch-2.pl @@ -0,0 +1,21 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +# Input arrays +my @items1 = ([1,1], [2,1], [3,2] ); +my @items2 = ( + [2,2], [1,3]); + +# Merge the arrays +my %merged_items; +foreach my $item (@items1, @items2) { + my ($id, $quantity) = @$item; + $merged_items{$id} += $quantity; +} + +# Print the merged items +foreach my $id (sort keys %merged_items) { + print "($id,$merged_items{$id})\n"; +} \ No newline at end of file -- cgit From 2c137d165436338b6dbd5cb7c540a091fc3368a9 Mon Sep 17 00:00:00 2001 From: David Ferrone Date: Tue, 23 Apr 2024 13:14:00 -0400 Subject: C update --- challenge-265/zapwai/c/ch-2.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/challenge-265/zapwai/c/ch-2.c b/challenge-265/zapwai/c/ch-2.c index a1e74ec231..d8b4dd7f1f 100644 --- a/challenge-265/zapwai/c/ch-2.c +++ b/challenge-265/zapwai/c/ch-2.c @@ -3,23 +3,25 @@ #include #include #include +#define SETSIZE 100 +#define WORDSIZE 30 typedef struct { - char* key; + char key; int value; } item; -item* val(item* items, size_t size, char* key) { +item* get(item* items, int size, char key) { for (size_t i = 0; i < size; i++) - if (strcmp(items[i].key, key) == 0) + if (items[i].key == key) return &items[i]; return NULL; } -void insert(item* items, size_t size, char* key, int val) { +void insert(item* items, size_t size, char key, int val) { int cnt = 0; - for (size_t i = 0; i < size; i++) { - if (strcmp(items[i].key, key) == 0) { + for (int i = 0; i < size; i++) { + if (items[i].key == key) { items[i].value = val; break; } @@ -32,18 +34,18 @@ void insert(item* items, size_t size, char* key, int val) { } item* freq(char* stringy, int *size) { - item* f = malloc(100 * sizeof(item)); - size_t f_size = 0; + item* f = malloc(SETSIZE * sizeof(item)); + int f_size = 0; for (int i = 0; i < strlen(stringy); i++) { char letter = stringy[i]; if (isalpha(letter)) { char let = tolower(letter); - item* cell = val(f, f_size, &let); + item* cell = get(f, f_size, let); if (!cell) { - insert(f, f_size, &let, 1); + insert(f, f_size, let, 1); f_size++; } else { - insert(f, f_size, &let, cell->value + 1); + insert(f, f_size, let, cell->value + 1); } } } @@ -55,16 +57,20 @@ item* freq(char* stringy, int *size) { bool hash_contains(item* g, item* f, int g_size, int f_size) { int cnt = 0; for (int i = 0; i < f_size; i++) { - char* key = f[i].key; - item* gcell = val(g, g_size, key); + char key = f[i].key; + item* gcell = get(g, g_size, key); if (!gcell) { + free(f); + free(g); return false; } else { - item* fcell = val(f, f_size, key); + item* fcell = get(f, f_size, key); if (fcell->value <= gcell->value) cnt++; } } + free(f); + free(g); return (cnt == f_size); } @@ -77,7 +83,7 @@ void proc(char* stringy, char* strlist[], int slen) { int f_size = 0; int g_size = 0; if (hash_contains(freq(strlist[i], &g_size), freq(stringy, &f_size), g_size, f_size)) { - ans[len] = malloc(30 * sizeof(char)); + ans[len] = malloc(WORDSIZE * sizeof(char)); strcpy(ans[len], strlist[i]); len++; } @@ -85,7 +91,8 @@ void proc(char* stringy, char* strlist[], int slen) { } printf("\n"); int min = strlen(ans[0]); - char* answer = malloc(sizeof(char) * 30); + char* answer = malloc(sizeof(char) * WORDSIZE); + strcpy(answer, ans[0]); for (int i = 0; i < len; i++) { if (strlen(ans[i]) < min) { min = strlen(ans[i]); -- cgit From a0f54a5b04a049864cc402fc2f85ee62ef040fb4 Mon Sep 17 00:00:00 2001 From: Michael Manring Date: Wed, 24 Apr 2024 12:51:28 +1000 Subject: pwc266 solution in python --- challenge-266/pokgopun/python/ch-1.py | 57 +++++++++++++++++++ challenge-266/pokgopun/python/ch-2.py | 103 ++++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 challenge-266/pokgopun/python/ch-1.py create mode 100644 challenge-266/pokgopun/python/ch-2.py diff --git a/challenge-266/pokgopun/python/ch-1.py b/challenge-266/pokgopun/python/ch-1.py new file mode 100644 index 0000000000..96addf3d91 --- /dev/null +++ b/challenge-266/pokgopun/python/ch-1.py @@ -0,0 +1,57 @@ +### https://theweeklychallenge.org/blog/perl-weekly-challenge-266/ +""" + +Task 1: Uncommon Words + +Submitted by: [41]Mohammad Sajid Anwar + __________________________________________________________________ + + You are given two sentences, $line1 and $line2. + + Write a script to find all uncommmon words in any order in the given + two sentences. Return ('') if none found. + + A word is uncommon if it appears exactly once in one of the + sentences and doesn’t appear in other sentence. + +Example 1 + +Input: $line1 = 'Mango is sweet' + $line2 = 'Mango is sour' +Output: ('sweet', 'sour') + +Example 2 + +Input: $line1 = 'Mango Mango' + $line2 = 'Orange' +Output: ('Orange') + +Example 3 + +Input: $line1 = 'Mango is Mango' + $line2 = 'Orange is Orange' +Output: ('') + +Task 2: X Matrix +""" +### solution by pokgopun@gmail.com + +def uncommonWords(line1, line2): + words = f'{line1} {line2}'.split() + return tuple( + w for w in words if words.count(w)==1 + ) or ('',) + + +import unittest + +class TestUncommonWords(unittest.TestCase): + def test(self): + for (line1,line2), ans in { + ('Mango is sweet','Mango is sour'): ('sweet', 'sour'), + ('Mango Mango','Orange'): ('Orange',), + ('Mango is Mango','Orange is Orange'): ('',), + }.items(): + self.assertEqual(uncommonWords(line1,line2),ans) + +unittest.main() diff --git a/challenge-266/pokgopun/python/ch-2.py b/challenge-266/pokgopun/python/ch-2.py new file mode 100644 index 0000000000..f12584ae55 --- /dev/null +++ b/challenge-266/pokgopun/python/ch-2.py @@ -0,0 +1,103 @@ +### https://theweeklychallenge.org/blog/perl-weekly-challenge-266/ +""" + +Task 2: X Matrix + +Submitted by: [42]Mohammad Sajid Anwar + __________________________________________________________________ + + You are given a square matrix, $matrix. + + Write a script to find if the given matrix is X Matrix. + + A square matrix is an X Matrix if all the elements on the main + diagonal and antidiagonal are non-zero and everything else are zero. + +Example 1 + +Input: $matrix = [ [1, 0, 0, 2], + [0, 3, 4, 0], + [0, 5, 6, 0], + [7, 0, 0, 1], + ] +Output: true + +Example 2 + +Input: $matrix = [ [1, 2, 3], + [4, 5, 6], + [7, 8, 9], + ] +Output: false + +Example 3 + +Input: $matrix = [ [1, 0, 2], + [0, 3, 0], + [4, 0, 5], + ] +Output: true + __________________________________________________________________ + + Last date to submit the solution 23:59 (UK Time) Sunday 28th April + 2024. + __________________________________________________________________ + +SO WHAT DO YOU THINK ? +""" +### solution by pokgopun@gmail.com + +def hasAllZero(arr): + return + +def mtxIsValid(mtx: list): + l = len(mtx) + if l < 3: + return None + h = l // 2 + col = 0 + lst = list() + for row in range(h): + for r in (row,-row-1): + lst = [e for e in mtx[r]] + if len(lst) != l: + return None + for c in (col,-col-1): + if lst[c] == 0: + return False + lst[c] = 0 + for e in lst: + if e != 0: + return False + col += 1 + if h % 2: + lst = [e for e in mtx[h]] + if len(lst) != l: + return None + if mtx[h][h] == 0: + return False + lst[h] = 0 + for e in lst: + if e != 0: + return False + return True + +import unittest + +class TestMtxIsValid(unittest.TestCase): + def test(self): + for ans, mtx in { + True: [ [1, 0, 0, 2], + [0, 3, 4, 0], + [0, 5, 6, 0], + [7, 0, 0, 1],], + False: [ [1, 2, 3], + [4, 5, 6], + [7, 8, 9],], + True: [ [1, 0, 2], + [0, 3, 0], + [4, 0, 5],], + }.items(): + self.assertEqual(ans,mtxIsValid(mtx)) + +unittest.main() -- cgit From a91aab38d898f0eb964c8e1c8e1d47ba9ca8b354 Mon Sep 17 00:00:00 2001 From: Michael Manring Date: Wed, 24 Apr 2024 16:35:52 +1000 Subject: pwc266 solution in go --- challenge-266/pokgopun/go/ch-1.go | 88 +++++++++++++++++++++++ challenge-266/pokgopun/go/ch-2.go | 143 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 231 insertions(+) create mode 100644 challenge-266/pokgopun/go/ch-1.go create mode 100644 challenge-266/pokgopun/go/ch-2.go diff --git a/challenge-266/pokgopun/go/ch-1.go b/challenge-266/pokgopun/go/ch-1.go new file mode 100644 index 0000000000..b5d697fe59 --- /dev/null +++ b/challenge-266/pokgopun/go/ch-1.go @@ -0,0 +1,88 @@ +//# https://theweeklychallenge.org/blog/perl-weekly-challenge-266/ +/*# + +Task 1: Uncommon Words + +Submitted by: [41]Mohammad Sajid Anwar + __________________________________________________________________ + + You are given two sentences, $line1 and $line2. + + Write a script to find all uncommmon words in any order in the given + two sentences. Return ('') if none found. + + A word is uncommon if it appears exactly once in one of the + sentences and doesn’t appear in other sentence. + +Example 1 + +Input: $line1 = 'Mango is sweet' + $line2 = 'Mango is sour' +Output: ('sweet', 'sour') + +Example 2 + +Input: $line1 = 'Mango Mango' + $line2 = 'Orange' +Output: ('Orange') + +Example 3 + +Input: $line1 = 'Mango is Mango' + $line2 = 'Orange is Orange' +Output: ('') + +Task 2: X Matrix +#*/ +//# solution by pokgopun@gmail.com + +package main + +import ( + "io" + "os" + "strings" + + "github.com/google/go-cmp/cmp" +) + +func uncommonWords(line1, line2 string) []string { + wc := make(map[string]int) + var words []string + for _, v := range strings.Split(line1+" "+line2, " ") { + wc[v]++ + if wc[v] == 1 { + words = append(words, v) + } + } + //fmt.Println("words =>", words, "wc =>", wc) + l := len(words) + i := l + for i > 0 { + if wc[words[i-1]] > 1 { + copy(words[i-1:], words[i:]) + l-- + } + i-- + } + if l == 0 { + return []string{""} + } + return words[:l] +} + +func main() { + for _, data := range []struct { + line1, line2 string + output []string + }{ + {"Mango is sweet", "Mango is sour", []string{"sweet", "sour"}}, + {"Mango Mango", "Orange", []string{"Orange"}}, + {"Mango is Mango", "Orange is Orange", []string{""}}, + {"Mango", "Mango", []string{""}}, + {"Mango", "Orange Orange", []string{"Mango"}}, + } { + //fmt.Println("=>", data, uncommonWords(data.line1, data.line2)) + io.WriteString(os.Stdout, cmp.Diff(uncommonWords(data.line1, data.line2), data.output)) // blank if ok, otherwise show the difference + } +} diff --git a/challenge-266/pokgopun/go/ch-2.go b/challenge-266/pokgopun/go/ch-2.go new file mode 100644 index 0000000000..cee52da9ef --- /dev/null +++ b/challenge-266/pokgopun/go/ch-2.go @@ -0,0 +1,143 @@ +//# https://theweeklychallenge.org/blog/perl-weekly-challenge-266/ +/*# + +Task 2: X Matrix + +Submitted by: [42]Mohammad Sajid Anwar + __________________________________________________________________ + + You are given a square matrix, $matrix. + + Write a script to find if the given matrix is X Matrix. + + A square matrix is an X Matrix if all the elements on the main + diagonal and antidiagonal are non-zero and everything else are zero. + +Example 1 + +Input: $matrix = [ [1, 0, 0, 2], + [0, 3, 4, 0], + [0, 5, 6, 0], + [7, 0, 0, 1], + ] +Output: true + +Example 2 + +Input: $matrix = [ [1, 2, 3], + [4, 5, 6], + [7, 8, 9], + ] +Output: false + +Example 3 + +Input: $matrix = [ [1, 0, 2], + [0, 3, 0], + [4, 0, 5], + ] +Output: true + __________________________________________________________________ + + Last date to submit the solution 23:59 (UK Time) Sunday 28th April + 2024. + __________________________________________________________________ + +SO WHAT DO YOU THINK ? +#*/ +//# solution by pokgopun@gmail.com + +package main + +import ( + "errors" + "io" + "log" + "os" + + "github.com/google/go-cmp/cmp" +) + +type row []int + +type matrix []row + +func (mtx matrix) isSquare() bool { + l := len(mtx) + i := l + for i > 0 { + i-- + if len(mtx[i]) != l { + return false + } + } + return true +} + +type squareMatrix struct { + l int + m matrix +} + +func newSquareMatrix(mtx matrix) (squareMatrix, error) { + if mtx.isSquare() { + return squareMatrix{len(mtx), mtx}, nil + } + return squareMatrix{}, errors.New("not square") +} + +func (sm squareMatrix) onX(r, c int) bool { + if r == c || r == sm.l-c-1 || c == sm.l-r-1 { + return true + } + return false +} + +func (sm squareMatrix) isX() bool { + var v int + for r := 0; r < sm.l; r++ { + for c := 0; c < sm.l; c++ { + v = sm.m[r][c] + if sm.onX(r, c) { + if v == 0 { + return false + } + } else { + if v != 0 { + return false + } + } + } + } + return true +} + +func main() { + for _, data := range []struct { + input matrix + output bool + }{ + {matrix{ + row{1, 0, 0, 2}, + row{0, 3, 4, 0}, + row{0, 5, 6, 0}, + row{7, 0, 0, 1}, + }, true}, + {matrix{ + row{1, 2, 3}, + row{4, 5, 6}, + row{7, 8, 9}, + }, false}, + {matrix{ + row{1, 0, 2}, + row{0, 3, 0}, + row{4, 0, 5}, + }, true}, + } { + sm, err := newSquareMatrix(data.input) + if err != nil { + log.Fatal(err) + } + io.WriteString(os.Stdout, cmp.Diff(sm.isX(), data.output)) // blank if ok, otherwise show the difference + } +} -- cgit From 4a74e8431d6d1ef9d75dbe2db78434333a29edad Mon Sep 17 00:00:00 2001 From: Matthew Neleigh Date: Wed, 24 Apr 2024 03:12:55 -0400 Subject: new file: challenge-266/mattneleigh/perl/ch-1.pl new file: challenge-266/mattneleigh/perl/ch-2.pl --- challenge-266/mattneleigh/perl/ch-1.pl | 102 ++++++++++++++++++++ challenge-266/mattneleigh/perl/ch-2.pl | 171 +++++++++++++++++++++++++++++++++ 2 files changed, 273 insertions(+) create mode 100755 challenge-266/mattneleigh/perl/ch-1.pl create mode 100755 challenge-266/mattneleigh/perl/ch-2.pl diff --git a/challenge-266/mattneleigh/perl/ch-1.pl b/challenge-266/mattneleigh/perl/ch-1.pl new file mode 100755 index 0000000000..5e47809cf5 --- /dev/null +++ b/challenge-266/mattneleigh/perl/ch-1.pl @@ -0,0 +1,102 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use English; + +################################################################################ +# Begin main execution +################################################################################ + +my @line_pairs = ( + [ + "Mango is sweet", + "Mango is sour" + ], + [ + "Mango Mango", + "Orange" + ], + [ + "Mango is Mango", + "Orange is Orange" + ] +); + +print("\n"); +foreach my $line_pair (@line_pairs){ + printf( + "Input: \$line1 = '%s'\n \$line2 = '%s'\nOutput: (%s)\n\n", + $line_pair->[0], + $line_pair->[1], + join( + ", ", + map( + "'" . $_ . "'", + find_uncommon_words(@{$line_pair}) + ) + ) + ); +} + +exit(0); +################################################################################ +# End main execution; subroutines follow +################################################################################ + + + +################################################################################ +# Determine which Uncommon Words exist between two sentences; a word is +# considered Uncommon if it appears exactly once in one sentence and doesn't +# appear at all in the other sentence +# Takes two arguments: +# * The first sentence to examine (e.g. "Mango is sweet" ) +# * The second sentence to examine (e.g. "Mango is sour" ) +# Returns: +# * A list of lower-cased Uncommon Words found among the two sentences (e.g. +# ("sweet", "sour") ); if no Uncommon Words were found, a single empty string +# will be returned +################################################################################ +sub find_uncommon_words{ + + my $word; + my %frequency1; + my %frequency2; + my @uncommons; + + # Build frequency tables for each sentence, + # counting unique words in each, without regard to + # letter case + foreach $word (split(/ /, $ARG[0])){ + $frequency1{lc($word)}++; + } + foreach $word (split(/ /, $ARG[1])){ + $frequency2{lc($word)}++; + } + + # Determine which words had appeared once in their + # respective sentence but not at all in the other, + # and store them in a list for Uncommons + foreach $word (keys(%frequency1)){ + push(@uncommons, $word) + if(($frequency1{$word} == 1) && !$frequency2{$word}); + } + foreach $word (keys(%frequency2)){ + push(@uncommons, $word) + if(($frequency2{$word} == 1) && !$frequency1{$word}); + } + + # If there were Uncommon Words, return the list + # thereof; if not, return the empty string + return( + @uncommons ? + @uncommons + : + "" + ); + +} + + + diff --git a/challenge-266/mattneleigh/perl/ch-2.pl b/challenge-266/mattneleigh/perl/ch-2.pl new file mode 100755 index 0000000000..c13a95cab4 --- /dev/null +++ b/challenge-266/mattneleigh/perl/ch-2.pl @@ -0,0 +1,171 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use English; + +################################################################################ +# Begin main execution +################################################################################ + +my @matrices = ( + [ + [ 1, 0, 0, 2 ], + [ 0, 3, 4, 0 ], + [ 0, 5, 6, 0 ], + [ 7, 0, 0, 1 ] + ], + [ + [ 1, 2, 3 ], + [ 4, 5, 6 ], + [ 7, 8, 9 ] + ], + [ + [ 1, 0, 2 ], + [ 0, 3, 0 ], + [ 4, 0, 5 ] + ] +); + +print("\n"); +foreach my $matrix (@matrices){ + printf( + "Input: \$matrix = [\n%s\n ]\nOutput: %s\n\n", + join( + ",\n", + map( + " " . $_, + matrix_to_strings($matrix) + ) + ), + is_X_matrix($matrix) ? "true" : "false" + ); +} + +exit(0); +################################################################################ +# End main execution; subroutines follow +################################################################################ + + + +################################################################################ +# Determine whether a matrix of integers is an X matrix- a square matrix in +# which all the values along the major diagonals are non-zero, and all other +# values are zero +# Takes one argument: +# * A ref to a 2D array that acts as a square matrix of integers (e.g. +# [ +# [ 1, 0, 0, 2 ], +# [ 0, 3, 4, 0 ], +# [ 0, 5, 6, 0 ], +# [ 7, 0, 0, 1 ] +# ] +# ) +# Returns: +# * 0 if the supplied matrix is not an X matrix +# * 1 if the supplied matrix is an X matrix +################################################################################ +sub is_X_matrix{ + my $matrix = shift(); + + # Examine every cell in the matrix at + # coordinates i, j ($matrix->[$j][$i] + # because of how arrays work) + foreach my $j (0 .. $#$matrix){ + foreach my $i (0 .. $#$matrix){ + if(($i == $j) || ($i == ($#$matrix - $j))){ + # We're on one of the diagonals- this + # must not be zero + return(0) + unless($matrix->[$j][$i]); + } else{ + # We're not on either diagonal- this + # must be zero + return(0) + if($matrix->[$j][$i]); + } + } + } + + # If we got here, we had an X matrix + return(1); + +} + + + +################################################################################ +# Given a matrix, produce a set of strings of uniform length and formatting +# containing the contents of the matrix +# Takes one argument: +# * A ref to the matrix (e.g. +# [ +# [ 4, 2 ], +# [ 1, 12 ] +# ] +# ) +# Returns: +# * A list of strings describing the contents of the matrix with uniform length +# and formatting (e.g. +# ( +# "[ 4, 2 ]", +# "[ 1, 12 ]" +# ) +# ) +# Note that strings returned by this function will have square brackets at each +# end, but will neither have commas nor carriage returns to separate the +# rows in printed output, nor will they contain spaces for indenting; if the +# calling code requires any of these, it must provide them itself. +################################################################################ +sub matrix_to_strings{ + use List::Util qw(max); + + # Make a printf() format that will accommodate + # the longest value, textually speaking, in + # the matrix + my $value_format = + "%" + . + # 3: Get the longest length amongst all the + # rows + max( + map( + # 2: Get the longest length in each row + max( + # 1: Get the textual length for each value + map(length($_), @{$_}) + ), + @{$ARG[0]} + ) + ) + . + "d"; + + return( + # 4: Make a list of lines of text containing + # the contents of all matrix rows + map( + # 3: Put square brackets around each row + sprintf( + "[ %s ]", + # 2: Make a string of uniform length out of + # each matrix row + join( + ", ", + # 1: Make a formatted string of uniform length + # out of each matrix value in the row + map( + sprintf($value_format, $_), + @{$_} + ) + ) + ), + @{$ARG[0]} + ) + ); + +} + + + -- cgit From 20eda9801d7005334dead24331e1c1ce4bf9e13a Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Wed, 24 Apr 2024 13:19:24 +0100 Subject: - Added solutions by David Ferrone. - Added solutions by PokGoPun. - Added solutions by Laurent Rosenfeld. - Added solutions by Matthew Neleigh. --- challenge-266/laurent-rosenfeld/blog.txt | 1 + challenge-266/laurent-rosenfeld/perl/ch-1.pl | 18 + challenge-266/laurent-rosenfeld/raku/ch-1.raku | 12 + stats/pwc-current.json | 244 +-- stats/pwc-language-breakdown-summary.json | 68 +- stats/pwc-language-breakdown.json | 1848 +++++++++++------------ stats/pwc-leaders.json | 766 +++++----- stats/pwc-summary-1-30.json | 46 +- stats/pwc-summary-121-150.json | 104 +- stats/pwc-summary-151-180.json | 116 +- stats/pwc-summary-181-210.json | 106 +- stats/pwc-summary-211-240.json | 108 +- stats/pwc-summary-241-270.json | 44 +- stats/pwc-summary-271-300.json | 108 +- stats/pwc-summary-301-330.json | 66 +- stats/pwc-summary-31-60.json | 50 +- stats/pwc-summary-61-90.json | 112 +- stats/pwc-summary-91-120.json | 100 +- stats/pwc-summary.json | 1908 ++++++++++++------------ 19 files changed, 2947 insertions(+), 2878 deletions(-) create mode 100644 challenge-266/laurent-rosenfeld/blog.txt create mode 100644 challenge-266/laurent-rosenfeld/perl/ch-1.pl create mode 100644 challenge-266/laurent-rosenfeld/raku/ch-1.raku diff --git a/challenge-266/laurent-rosenfeld/blog.txt b/challenge-266/laurent-rosenfeld/blog.txt new file mode 100644 index 0000000000..9011945259 --- /dev/null +++ b/challenge-266/laurent-rosenfeld/blog.txt @@ -0,0 +1 @@ +https://blogs.perl.org/users/laurent_r/2024/04/perl-weekly-challenge-266-uncommon-words.html diff --git a/challenge-266/laurent-rosenfeld/perl/ch-1.pl b/challenge-266/laurent-rosenfeld/perl/ch-1.pl new file mode 100644 index 0000000000..6e95d80e52 --- /dev/null +++ b/challenge-266/laurent-rosenfeld/perl/ch-1.pl @@ -0,0 +1,18 @@ +use strict; +use warnings; +use feature 'say'; + +sub uncommon { + my %histo; + $histo{$_}++ for map { split /\s+/ } @_; + my @result = grep {$histo{$_} == 1} keys %histo; + return @result ? join " ", @result : "''"; +} + +my @tests = ( ['Mango is sweet', 'Mango is sour'], + ['Mango Mango', 'Orange'], + ['Mango is Mango', 'Orange is Orange'] ); +for my $test (@tests) { + printf "%-18s - %-18s => ", $test->[0], $test->[1]; + say uncommon $test->[0], $test->[1]; +} diff --git a/challenge-266/laurent-rosenfeld/raku/ch-1.raku b/challenge-266/laurent-rosenfeld/raku/ch-1.raku new file mode 100644 index 0000000000..28ac228ecd --- /dev/null +++ b/challenge-266/laurent-rosenfeld/raku/ch-1.raku @@ -0,0 +1,12 @@ +sub uncommon ($in1, $in2) { + my $out = $in1.words ⊎ $in2.words; # Baggy addition + return grep {$out{$_} == 1}, $out.keys; +} + +my @tests = ('Mango is sweet', 'Mango is sour'), + ('Mango Mango', 'Orange'), + ('Mango is Mango', 'Orange is Orange'); +for @tests -> @test { + printf "%-18s - %-18s => ", @test[0], @test[1]; + say uncommon @test[0], @test[1]; +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index a26f71a2b6..4f9da14749 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,132 +1,69 @@ { - "tooltip" : { - "headerFormat" : "{series.name}
", - "pointFormat" : "{point.name}: {point.y:f}
", - "followPointer" : 1 - }, "chart" : { "type" : "column" }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, - "series" : [ - { - "name" : "The Weekly Challenge - 266", - "colorByPoint" : 1, - "data" : [ - { - "name" : "David Ferrone", - "drilldown" : "David Ferrone", - "y" : 2 - }, - { - "name" : "E. Choroba", - "drilldown" : "E. Choroba", - "y" : 2 - }, - { - "y" : 2, - "drilldown" : "Feng Chang", - "name" : "Feng Chang" - }, - { - "drilldown" : "Lubos Kolouch", - "y" : 2, - "name" : "Lubos Kolouch" - }, - { - "name" : "Luca Ferrari", - "drilldown" : "Luca Ferrari", - "y" : 11 - }, - { - "y" : 2, - "drilldown" : "Mark Anderson", - "name" : "Mark Anderson" - }, - { - "y" : 2, - "drilldown" : "Niels van Dijke", - "name" : "Niels van Dijke" - }, - { - "drilldown" : "Peter Campbell Smith", - "y" : 3, - "name" : "Peter Campbell Smith" - }, - { - "y" : 2, - "drilldown" : "Peter Meszaros", - "name" : "Peter Meszaros" - }, - { - "y" : 3, - "drilldown" : "Reinier Maliepaard", - "name" : "Reinier Maliepaard" - }, - { - "name" : "Roger Bell_West", - "y" : 4, - "drilldown" : "Roger Bell_West" - }, - { - "name" : "W. Luis Mochan", - "drilldown" : "W. Luis Mochan", - "y" : 3 - } - ] - } - ], - "subtitle" : { - "text" : "[Champions: 12] Last updated at 2024-04-23 16:16:00 GMT" - }, "title" : { "text" : "The Weekly Challenge - 266" }, "drilldown" : { "series" : [ { + "id" : "David Ferrone", + "name" : "David Ferrone", "data" : [ [ "Perl", 2 ] - ], - "name" : "David Ferrone", - "id" : "David Ferrone" + ] }, { - "name" : "E. Choroba", "data" : [ [ "Perl", 2 ] ], - "id" : "E. Choroba" + "id" : "E. Choroba", + "name" : "E. Choroba" }, { - "name" : "Feng Chang", "data" : [ [ "Raku", 2 ] ], - "id" : "Feng Chang" + "id" : "Feng Chang", + "name" : "Feng Chang" }, { + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", + "data" : [ + [ + "Perl", + 1 + ], + [ + "Raku", + 1 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "name" : "Lubos Kolouch", "id" : "Lubos Kolouch", "data" : [ [ "Perl", 2 ] - ], - "name" : "Lubos Kolouch" + ] }, { "data" : [ @@ -139,31 +76,42 @@ 9 ] ], - "name" : "Luca Ferrari", - "id" : "Luca Ferrari" + "id" : "Luca Ferrari", + "name" : "Luca Ferrari" }, { - "id" : "Mark Anderson", "data" : [ [ "Raku", 2 ] ], + "id" : "Mark Anderson", "name" : "Mark Anderson" }, { - "id" : "Niels van Dijke", + "id" : "Matthew Neleigh", + "name" : "Matthew Neleigh", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { "data" : [ [ "Perl", 2 ] ], - "name" : "Niels van Dijke" + "name" : "Niels van Dijke", + "id" : "Niels van Dijke" }, { "id" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", "data" : [ [ "Perl", @@ -173,21 +121,21 @@ "Blog", 1 ] - ], - "name" : "Peter Campbell Smith" + ] }, { - "name" : "Peter Meszaros", "data" : [ [ "Perl", 2 ] ], + "name" : "Peter Meszaros", "id" : "Peter Meszaros" }, { "name" : "Reinier Maliepaard", + "id" : "Reinier Maliepaard", "data" : [ [ "Perl", @@ -197,11 +145,11 @@ "Blog", 1 ] - ], - "id" : "Reinier Maliepaard" + ] }, { "name" : "Roger Bell_West", + "id" : "Roger Bell_West", "data" : [ [ "Perl", @@ -211,12 +159,11 @@ "Raku", 2 ] - ], - "id" : "Roger Bell_West" + ] }, { - "id" : "W. Luis Mochan", "name" : "W. Luis Mochan", + "id" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -230,12 +177,103 @@ } ] }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, "xAxis" : { "type" : "category" }, + "subtitle" : { + "text" : "[Champions: 14] Last updated at 2024-04-24 12:15:02 GMT" + }, "legend" : { "enabled" : 0 }, + "tooltip" : { + "followPointer" : 1, + "headerFormat" : "{series.name}
", + "pointFormat" : "{point.name}: {point.y:f}
" + }, + "series" : [ + { + "colorByPoint" : 1, + "data" : [ + { + "drilldown" : "David Ferrone", + "name" : "David Ferrone", + "y" : 2 + }, + { + "drilldown" : "E. Choroba", + "y" : 2, + "name" : "E. Choroba" + }, + { + "name" : "Feng Chang", + "y" : 2, + "drilldown" : "Feng Chang" + }, + { + "drilldown" : "Laurent Rosenfeld", + "y" : 3, + "name" : "Laurent Rosenfeld" + }, + { + "drilldown" : "Lubos Kolouch", + "name" : "Lubos Kolouch", + "y" : 2 + }, + { + "drilldown" : "Luca Ferrari", + "name" : "Luca Ferrari", + "y" : 11 + }, + { + "name" : "Mark Anderson", + "y" : 2, + "drilldown" : "Mark Anderson" + }, + { + "drilldown" : "Matthew Neleigh", + "name" : "Matthew Neleigh", + "y" : 2 + }, + { + "drilldown" : "Niels van Dijke", + "name" : "Niels van Dijke", + "y" : 2 + }, + { + "drilldown" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", + "y" : 3 + }, + { + "name" : "Peter Meszaros", + "y" : 2, + "drilldown" : "Peter Meszaros" + }, + { + "drilldown" : "Reinier Maliepaard", + "name" : "Reinier Maliepaard", + "y" : 3 + }, + { + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West", + "y" : 4 + }, + { + "drilldown" : "W. Luis Mochan", + "y" : 3, + "name" : "W. Luis Mochan" + } + ], + "name" : "The Weekly Challenge - 266" + } + ], "plotOptions" : { "series" : { "borderWidth" : 0, diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 506a970af3..cb442cdd40 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,63 +1,63 @@ { - "tooltip" : { - "pointFormat" : "{point.y:.0f}" - }, - "chart" : { - "type" : "column" - }, - "yAxis" : { - "title" : { - "text" : null - }, - "min" : 0 - }, - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2024]" - }, - "subtitle" : { - "text" : "Last updated at 2024-04-23 16:16:00 GMT" - }, "series" : [ { "data" : [ [ "Blog", - 4780 + 4781 ], [ "Perl", - 13766 + 13769 ], [ "Raku", - 7989 + 7990 ] ], + "name" : "Contributions", "dataLabels" : { - "align" : "right", - "color" : "#FFFFFF", - "y" : 10, - "rotation" : -90, "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" + "fontSize" : "13px", + "fontFamily" : "Verdana, sans-serif" }, + "color" : "#FFFFFF", + "rotation" : -90, "format" : "{point.y:.0f}", - "enabled" : "true" - }, - "name" : "Contributions" + "y" : 10, + "enabled" : "true", + "align" : "right" + } } ], + "legend" : { + "enabled" : "false" + }, + "subtitle" : { + "text" : "Last updated at 2024-04-24 12:15:01 GMT" + }, "xAxis" : { "labels" : { "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" } }, "type" : "category" }, - "legend" : { - "enabled" : "false" + "tooltip" : { + "pointFormat" : "{point.y:.0f}" + }, + "yAxis" : { + "min" : 0, + "title" : { + "text" : null + } + }, + "chart" : { + "type" : "column" + }, + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2024]" } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 975bc35953..5746022b6a 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,22 +1,14 @@ { - "xAxis" : { - "type" : "category" - }, - "legend" : { - "enabled" : "false" - }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "format" : "{point.y}", - "enabled" : 1 - } + "yAxis" : { + "title" : { + "text" : "Total Solutions" } }, "drilldown" : { "series" : [ { + "id" : "001", + "name" : "001", "data" : [ [ "Perl", @@ -30,11 +22,10 @@ "Blog", 12 ] - ], - "name" : "001", - "id" : "001" + ] }, { + "name" : "002", "id" : "002", "data" : [ [ @@ -49,10 +40,10 @@ "Blog", 10 ] - ], - "name" : "002" + ] }, { + "id" : "003", "name" : "003", "data" : [ [ @@ -67,11 +58,9 @@ "Blog", 9 ] - ], - "id" : "003" + ] }, { - "name" : "004", "data" : [ [ "Perl", @@ -86,10 +75,10 @@ 10 ] ], - "id" : "004" + "id" : "004", + "name" : "004" }, { - "id" : "005", "data" : [ [ "Perl", @@ -104,9 +93,11 @@ 12 ] ], + "id" : "005", "name" : "005" }, { + "id" : "006", "name" : "006", "data" : [ [ @@ -121,10 +112,11 @@ "Blog", 7 ] - ], - "id" : "006" + ] }, { + "id" : "007", + "name" : "007", "data" : [ [ "Perl", @@ -138,11 +130,10 @@ "Blog", 10 ] - ], - "name" : "007", - "id" : "007" + ] }, { + "name" : "008", "id" : "008", "data" : [ [ @@ -157,11 +148,9 @@ "Blog", 12 ] - ], - "name" : "008" + ] }, { - "name" : "009", "data" : [ [ "Perl", @@ -176,10 +165,10 @@ 13 ] ], + "name" : "009", "id" : "009" }, { - "id" : "010", "data" : [ [ "Perl", @@ -194,10 +183,10 @@ 11 ] ], - "name" : "010" + "name" : "010", + "id" : "010" }, { - "id" : "011", "data" : [ [ "Perl", @@ -212,11 +201,10 @@ 10 ] ], + "id" : "011", "name" : "011" }, { - "id" : "012", - "name" : "012", "data" : [ [ "Perl", @@ -230,9 +218,13 @@ "Blog", 11 ] - ] + ], + "name" : "012", + "id" : "012" }, { + "name" : "013", + "id" : "013", "data" : [ [ "Perl", @@ -246,9 +238,7 @@ "Blog", 13 ] - ], - "name" : "013", - "id" : "013" + ] }, { "data" : [ @@ -265,10 +255,12 @@ 15 ] ], - "name" : "014", - "id" : "014" + "id" : "014", + "name" : "014" }, { + "id" : "015", + "name" : "015", "data" : [ [ "Perl", @@ -282,11 +274,10 @@ "Blog", 15 ] - ], - "name" : "015", - "id" : "015" + ] }, { + "name" : "016", "id" : "016", "data" : [ [ @@ -301,10 +292,11 @@ "Blog", 13 ] - ], - "name" : "016" + ] }, { + "name" : "017", + "id" : "017", "data" : [ [ "Perl", @@ -318,11 +310,11 @@ "Blog", 12 ] - ], - "name" : "017", - "id" : "017" + ] }, { + "name" : "018", + "id" : "018", "data" : [ [ "Perl", @@ -336,13 +328,9 @@ "Blog", 14 ] - ], - "name" : "018", - "id" : "018" + ] }, { - "id" : "019", - "name" : "019", "data" : [ [ "Perl", @@ -356,11 +344,11 @@ "Blog", 13 ] - ] + ], + "id" : "019", + "name" : "019" }, { - "id" : "020", - "name" : "020", "data" : [ [ "Perl", @@ -374,9 +362,12 @@ "Blog", 13 ] - ] + ], + "name" : "020", + "id" : "020" }, { + "id" : "021", "name" : "021", "data" : [ [ @@ -391,11 +382,9 @@ "Blog", 10 ] - ], - "id" : "021" + ] }, { - "name" : "022", "data" : [ [ "Perl", @@ -410,9 +399,11 @@ 10 ] ], - "id" : "022" + "id" : "022", + "name" : "022" }, { + "name" : "023", "id" : "023", "data" : [ [ @@ -427,12 +418,9 @@ "Blog", 12 ] - ], - "name" : "023" + ] }, { - "id" : "024", - "name" : "024", "data" : [ [ "Perl", @@ -446,11 +434,13 @@ "Blog", 11 ] - ] + ], + "name" : "024", + "id" : "024" }, { - "id" : "025", "name" : "025", + "id" : "025", "data" : [ [ "Perl", @@ -467,6 +457,8 @@ ] }, { + "id" : "026", + "name" : "026", "data" : [ [ "Perl", @@ -480,12 +472,9 @@ "Blog", 10 ] - ], - "name" : "026", - "id" : "026" + ] }, { - "name" : "027", "data" : [ [ "Perl", @@ -500,10 +489,10 @@ 9 ] ], + "name" : "027", "id" : "027" }, { - "id" : "028", "data" : [ [ "Perl", @@ -518,11 +507,10 @@ 9 ] ], + "id" : "028", "name" : "028" }, { - "id" : "029", - "name" : "029", "data" : [ [ "Perl", @@ -536,9 +524,13 @@ "Blog", 12 ] - ] + ], + "name" : "029", + "id" : "029" }, { + "id" : "030", + "name" : "030", "data" : [ [ "Perl", @@ -552,12 +544,11 @@ "Blog", 10 ] - ], - "name" : "030", - "id" : "030" + ] }, { "name" : "031", + "id" : "031", "data" : [ [ "Perl", @@ -571,11 +562,9 @@ "Blog", 9 ] - ], - "id" : "031" + ] }, { - "id" : "032", "data" : [ [ "Perl", @@ -590,6 +579,7 @@ 10 ] ], + "id" : "032", "name" : "032" }, { @@ -611,8 +601,6 @@ "id" : "033" }, { - "id" : "034", - "name" : "034", "data" : [ [ "Perl", @@ -626,9 +614,13 @@ "Blog", 11 ] - ] + ], + "id" : "034", + "name" : "034" }, { + "id" : "035", + "name" : "035", "data" : [ [ "Perl", @@ -642,9 +634,7 @@ "Blog", 9 ] - ], - "name" : "035", - "id" : "035" + ] }, { "data" : [ @@ -665,7 +655,6 @@ "id" : "036" }, { - "name" : "037", "data" : [ [ "Perl", @@ -680,6 +669,7 @@ 9 ] ], + "name" : "037", "id" : "037" }, { @@ -701,7 +691,6 @@ "id" : "038" }, { - "name" : "039", "data" : [ [ "Perl", @@ -716,9 +705,12 @@ 12 ] ], - "id" : "039" + "id" : "039", + "name" : "039" }, { + "name" : "040", + "id" : "040", "data" : [ [ "Perl", @@ -732,9 +724,7 @@ "Blog", 10 ] - ], - "name" : "040", - "id" : "040" + ] }, { "data" : [ @@ -755,7 +745,6 @@ "id" : "041" }, { - "id" : "042", "data" : [ [ "Perl", @@ -770,9 +759,12 @@ 11 ] ], + "id" : "042", "name" : "042" }, { + "name" : "043", + "id" : "043", "data" : [ [ "Perl", @@ -786,9 +778,7 @@ "Blog", 11 ] - ], - "name" : "043", - "id" : "043" + ] }, { "id" : "044", @@ -809,7 +799,6 @@ ] }, { - "name" : "045", "data" : [ [ "Perl", @@ -824,10 +813,10 @@ 11 ] ], - "id" : "045" + "id" : "045", + "name" : "045" }, { - "id" : "046", "data" : [ [ "Perl", @@ -842,11 +831,12 @@ 10 ] ], - "name" : "046" + "name" : "046", + "id" : "046" }, { - "id" : "047", "name" : "047", + "id" : "047", "data" : [ [ "Perl", @@ -863,8 +853,8 @@ ] }, { - "id" : "048", "name" : "048", + "id" : "048", "data" : [ [ "Perl", @@ -881,6 +871,8 @@ ] }, { + "name" : "049", + "id" : "049", "data" : [ [ "Perl", @@ -894,12 +886,9 @@ "Blog", 12 ] - ], - "name" : "049", - "id" : "049" + ] }, { - "id" : "050", "data" : [ [ "Perl", @@ -914,10 +903,12 @@ 12 ] ], + "id" : "050", "name" : "050" }, { "name" : "051", + "id" : "051", "data" : [ [ "Perl", @@ -931,10 +922,10 @@ "Blog", 11 ] - ], - "id" : "051" + ] }, { + "id" : "052", "name" : "052", "data" : [ [ @@ -949,12 +940,11 @@ "Blog", 14 ] - ], - "id" : "052" + ] }, { - "id" : "053", "name" : "053", + "id" : "053", "data" : [ [ "Perl", @@ -971,8 +961,8 @@ ] }, { - "id" : "054", "name" : "054", + "id" : "054", "data" : [ [ "Perl", @@ -989,6 +979,8 @@ ] }, { + "id" : "055", + "name" : "055", "data" : [ [ "Perl", @@ -1002,11 +994,11 @@ "Blog", 14 ] - ], - "name" : "055", - "id" : "055" + ] }, { + "id" : "056", + "name" : "056", "data" : [ [ "Perl", @@ -1020,9 +1012,7 @@ "Blog", 17 ] - ], - "name" : "056", - "id" : "056" + ] }, { "id" : "057", @@ -1043,8 +1033,6 @@ ] }, { - "id" : "058", - "name" : "058", "data" : [ [ "Perl", @@ -1058,10 +1046,11 @@ "Blog", 13 ] - ] + ], + "id" : "058", + "name" : "058" }, { - "id" : "059", "data" : [ [ "Perl", @@ -1076,10 +1065,12 @@ 16 ] ], - "name" : "059" + "name" : "059", + "id" : "059" }, { "name" : "060", + "id" : "060", "data" : [ [ "Perl", @@ -1093,11 +1084,11 @@ "Blog", 16 ] - ], - "id" : "060" + ] }, { "id" : "061", + "name" : "061", "data" : [ [ "Perl", @@ -1111,8 +1102,7 @@ "Blog", 14 ] - ], - "name" : "061" + ] }, { "data" : [ @@ -1129,11 +1119,10 @@ 11 ] ], - "name" : "062", - "id" : "062" + "id" : "062", + "name" : "062" }, { - "id" : "063", "data" : [ [ "Perl", @@ -1148,10 +1137,12 @@ 13 ] ], + "id" : "063", "name" : "063" }, { "id" : "064", + "name" : "064", "data" : [ [ "Perl", @@ -1165,10 +1156,10 @@ "Blog", 16 ] - ], - "name" : "064" + ] }, { + "id" : "065", "name" : "065", "data" : [ [ @@ -1183,8 +1174,7 @@ "Blog", 15 ] - ], - "id" : "065" + ] }, { "data" : [ @@ -1205,7 +1195,6 @@ "id" : "066" }, { - "id" : "067", "data" : [ [ "Perl", @@ -1220,9 +1209,12 @@ 18 ] ], + "id" : "067", "name" : "067" }, { + "id" : "068", + "name" : "068", "data" : [ [ "Perl", @@ -1236,12 +1228,9 @@ "Blog", 13 ] - ], - "name" : "068", - "id" : "068" + ] }, { - "id" : "069", "data" : [ [ "Perl", @@ -1256,10 +1245,10 @@ 16 ] ], + "id" : "069", "name" : "069" }, { - "name" : "070", "data" : [ [ "Perl", @@ -1274,11 +1263,10 @@ 17 ] ], - "id" : "070" + "id" : "070", + "name" : "070" }, { - "id" : "071", - "name" : "071", "data" : [ [ "Perl", @@ -1292,10 +1280,11 @@ "Blog", 15 ] - ] + ], + "id" : "071", + "name" : "071" }, { - "id" : "072", "data" : [ [ "Perl", @@ -1310,10 +1299,10 @@ 19 ] ], - "name" : "072" + "name" : "072", + "id" : "072" }, { - "id" : "073", "data" : [ [ "Perl", @@ -1328,7 +1317,8 @@ 17 ] ], - "name" : "073" + "name" : "073", + "id" : "073" }, { "data" : [ @@ -1349,7 +1339,6 @@ "id" : "074" }, { - "id" : "075", "data" : [ [ "Perl", @@ -1364,10 +1353,10 @@ 20 ] ], + "id" : "075", "name" : "075" }, { - "name" : "076", "data" : [ [ "Perl", @@ -1382,10 +1371,10 @@ 16 ] ], + "name" : "076", "id" : "076" }, { - "name" : "077", "data" : [ [ "Perl", @@ -1400,10 +1389,12 @@ 14 ] ], + "name" : "077", "id" : "077" }, { "id" : "078", + "name" : "078", "data" : [ [ "Perl", @@ -1417,10 +1408,10 @@ "Blog", 18 ] - ], - "name" : "078" + ] }, { + "id" : "079", "name" : "079", "data" : [ [ @@ -1435,12 +1426,11 @@ "Blog", 17 ] - ], - "id" : "079" + ] }, { - "id" : "080", "name" : "080", + "id" : "080", "data" : [ [ "Perl", @@ -1458,6 +1448,7 @@ }, { "name" : "081", + "id" : "081", "data" : [ [ "Perl", @@ -1471,12 +1462,11 @@ "Blog", 15 ] - ], - "id" : "081" + ] }, { - "id" : "082", "name" : "082", + "id" : "082", "data" : [ [ "Perl", @@ -1493,6 +1483,7 @@ ] }, { + "id" : "083", "name" : "083", "data" : [ [ @@ -1507,12 +1498,9 @@ "Blog", 16 ] - ], - "id" : "083" + ] }, { - "id" : "084", - "name" : "084", "data" : [ [ "Perl", @@ -1526,10 +1514,11 @@ "Blog", 12 ] - ] + ], + "name" : "084", + "id" : "084" }, { - "id" : "085", "data" : [ [ "Perl", @@ -1544,10 +1533,10 @@ 18 ] ], + "id" : "085", "name" : "085" }, { - "id" : "086", "data" : [ [ "Perl", @@ -1562,9 +1551,12 @@ 15 ] ], + "id" : "086", "name" : "086" }, { + "name" : "087", + "id" : "087", "data" : [ [ "Perl", @@ -1578,13 +1570,11 @@ "Blog", 14 ] - ], - "name" : "087", - "id" : "087" + ] }, { - "id" : "088", "name" : "088", + "id" : "088", "data" : [ [ "Perl", @@ -1601,6 +1591,8 @@ ] }, { + "nam