diff options
| author | Mohammad Sajid Anwar <mohammad.anwar@yahoo.com> | 2024-08-05 20:01:22 +0100 |
|---|---|---|
| committer | Mohammad Sajid Anwar <mohammad.anwar@yahoo.com> | 2024-08-05 20:01:22 +0100 |
| commit | 524012f041fc882afc4b0aeda4e1bffae33d7ae7 (patch) | |
| tree | c84da7672b0675dbf441185e5adc7ff0f6d01767 | |
| parent | c0a61d89e8d35ef4c35b8eabff80d959925f5761 (diff) | |
| download | perlweeklychallenge-club-524012f041fc882afc4b0aeda4e1bffae33d7ae7.tar.gz perlweeklychallenge-club-524012f041fc882afc4b0aeda4e1bffae33d7ae7.tar.bz2 perlweeklychallenge-club-524012f041fc882afc4b0aeda4e1bffae33d7ae7.zip | |
- Added solutions by Mariano Ortega.
- Added solutions by Laurent Rosenfeld.
- Added solutions by E. Choroba.
- Added solutions by Jan Krnavek.
26 files changed, 2975 insertions, 2759 deletions
diff --git a/challenge-281/laurent-rosenfeld/blog.txt b/challenge-281/laurent-rosenfeld/blog.txt new file mode 100644 index 0000000000..ff1dfbd91a --- /dev/null +++ b/challenge-281/laurent-rosenfeld/blog.txt @@ -0,0 +1 @@ +https://blogs.perl.org/users/laurent_r/2024/08/perl-weekly-challenge-281-check-color.html diff --git a/challenge-281/laurent-rosenfeld/perl/ch-1.pl b/challenge-281/laurent-rosenfeld/perl/ch-1.pl new file mode 100644 index 0000000000..7e82b7fa65 --- /dev/null +++ b/challenge-281/laurent-rosenfeld/perl/ch-1.pl @@ -0,0 +1,16 @@ +use strict; +use warnings; +use feature 'say'; + +sub check_color { + my ($abscissa, $ordinate) = split //, shift; + my $code = 1; + $code = 0 if $abscissa =~ /[aceg]/; + return "True" if ($code + $ordinate) % 2 == 0; + return "False"; +} + +for my $coordinates (qw<a1 d3 g5 e6 h8>) { + printf "%-2s => ", $coordinates; + say check_color $coordinates; +} diff --git a/challenge-281/laurent-rosenfeld/raku/ch-1.raku b/challenge-281/laurent-rosenfeld/raku/ch-1.raku new file mode 100644 index 0000000000..8bb4e7be27 --- /dev/null +++ b/challenge-281/laurent-rosenfeld/raku/ch-1.raku @@ -0,0 +1,15 @@ +sub check-color ($in) { + my ($abscissa, $ordinate) = $in.comb;` + my $code; + given $abscissa { + when /<[aceg]>/ {$code = 0} + when /<[bdfh]>/ {$code = 1} + } + return True if ($code + $ordinate) %% 2; + False; +} + +for <a1 d3 g5 e6 h8> -> $coordinates { + printf "%-2s => ", $coordinates; + say check-color $coordinates; +} diff --git a/stats/pwc-challenge-280.json b/stats/pwc-challenge-280.json new file mode 100644 index 0000000000..a0cb8ae2be --- /dev/null +++ b/stats/pwc-challenge-280.json @@ -0,0 +1,635 @@ +{ + "chart" : { + "type" : "column" + }, + "series" : [ + { + "name" : "The Weekly Challenge - 280", + "colorByPoint" : 1, + "data" : [ + { + "name" : "Adam Russell", + "drilldown" : "Adam Russell", + "y" : 3 + }, + { + "drilldown" : "Alexander Karelas", + "name" : "Alexander Karelas", + "y" : 2 + }, + { + "drilldown" : "Ali Moradi", + "name" : "Ali Moradi", + "y" : 5 + }, + { + "y" : 2, + "name" : "Andrew Schneider", + "drilldown" : "Andrew Schneider" + }, + { + "drilldown" : "Arne Sommer", + "name" : "Arne Sommer", + "y" : 3 + }, + { + "name" : "Athanasius", + "drilldown" : "Athanasius", + "y" : 4 + }, + { + "name" : "BarrOff", + "drilldown" : "BarrOff", + "y" : 2 + }, + { + "drilldown" : "Bob Lied", + "name" : "Bob Lied", + "y" : 2 + }, + { + "y" : 3, + "name" : "Dave Jacoby", + "drilldown" : "Dave Jacoby" + }, + { + "y" : 2, + "name" : "David Ferrone", + "drilldown" : "David Ferrone" + }, + { + "y" : 2, + "drilldown" : "E. Choroba", + "name" : "E. Choroba" + }, + { + "y" : 2, + "drilldown" : "Feng Chang", + "name" : "Feng Chang" + }, + { + "name" : "Jaldhar H. Vyas", + "drilldown" : "Jaldhar H. Vyas", + "y" : 5 + }, + { + "y" : 2, + "name" : "Jan Krnavek", + "drilldown" : "Jan Krnavek" + }, + { + "y" : 3, + "name" : "Jorg Sommrey", + "drilldown" : "Jorg Sommrey" + }, + { + "name" : "Kjetil Skotheim", + "drilldown" : "Kjetil Skotheim", + "y" : 2 + }, + { + "name" : "Laurent Rosenfeld", + "drilldown" : "Laurent Rosenfeld", + "y" : 6 + }, + { + "drilldown" : "Luca Ferrari", + "name" : "Luca Ferrari", + "y" : 12 + }, + { + "y" : 2, + "name" : "Mark Anderson", + "drilldown" : "Mark Anderson" + }, + { + "drilldown" : "Matthew Neleigh", + "name" : "Matthew Neleigh", + "y" : 2 + }, + { + "drilldown" : "Matthias Muth", + "name" : "Matthias Muth", + "y" : 3 + }, + { + "name" : "Nelo Tovar", + "drilldown" : "Nelo Tovar", + "y" : 2 + }, + { + "name" : "Packy Anderson", + "drilldown" : "Packy Anderson", + "y" : 5 + }, + { + "drilldown" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", + "y" : 3 + }, + { + "drilldown" : "Peter Meszaros", + "name" : "Peter Meszaros", + "y" : 2 + }, + { + "y" : 3, + "drilldown" : "Reinier Maliepaard", + "name" : "Reinier Maliepaard" + }, + { + "name" : "Robbie Hatley", + "drilldown" : "Robbie Hatley", + "y" : 3 + }, + { + "drilldown" : "Robert Ransbottom", + "name" : "Robert Ransbottom", + "y" : 2 + }, + { + "y" : 5, + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West" + }, + { + "drilldown" : "Thomas Kohler", + "name" : "Thomas Kohler", + "y" : 4 + }, + { + "y" : 4, + "name" : "Ulrich Rieke", + "drilldown" : "Ulrich Rieke" + }, + { + "y" : 3, + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan" + }, + { + "name" : "Wanderdoc", + "drilldown" : "Wanderdoc", + "y" : 2 + } + ] + } + ], + "drilldown" : { + "series" : [ + { + "name" : "Adam Russell", + "id" : "Adam Russell", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Alexander Karelas", + "name" : "Alexander Karelas" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Ali Moradi", + "name" : "Ali Moradi" + }, + { + "id" : "Andrew Schneider", + "name" : "Andrew Schneider", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Arne Sommer", + "name" : "Arne Sommer" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "name" : "Athanasius", + "id" : "Athanasius" + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "BarrOff", + "name" : "BarrOff" + }, + { + "id" : "Bob Lied", + "name" : "Bob Lied", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Dave Jacoby", + "name" : "Dave Jacoby" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "David Ferrone", + "id" : "David Ferrone" + }, + { + "name" : "E. Choroba", + "id" : "E. Choroba", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "id" : "Feng Chang", + "name" : "Feng Chang" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Jaldhar H. Vyas", + "id" : "Jaldhar H. Vyas" + }, + { + "name" : "Jan Krnavek", + "id" : "Jan Krnavek", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "name" : "Kjetil Skotheim", + "id" : "Kjetil Skotheim" + }, + { + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 2 + ] + ] + }, + { + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 10 + ] + ], + "name" : "Luca Ferrari", + "id" : "Luca Ferrari" + }, + { + "id" : "Mark Anderson", + "name" : "Mark Anderson", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Matthew Neleigh", + "name" : "Matthew Neleigh" + }, + { + "name" : "Matthias Muth", + "id" : "Matthias Muth", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Nelo Tovar", + "name" : "Nelo Tovar", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "id" : "Packy Anderson", + "name" : "Packy Anderson", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith" + }, + { + "id" : "Peter Meszaros", + "name" : "Peter Meszaros", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Reinier Maliepaard", + "name" : "Reinier Maliepaard" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Robbie Hatley", + "id" : "Robbie Hatley" + }, + { + "data" : [ + [ + "Raku", + 2 + ] + ], + "name" : "Robert Ransbottom", + "id" : "Robert Ransbottom" + }, + { + "name" : "Roger Bell_West", + "id" : "Roger Bell_West", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Thomas Kohler", + "name" : "Thomas Kohler", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "id" : "Ulrich Rieke", + "name" : "Ulrich Rieke" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "W. Luis Mochan", + "id" : "W. Luis Mochan" + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Wanderdoc", + "name" : "Wanderdoc" + } + ] + }, + "title" : { + "text" : "The Weekly Challenge - 280" + }, + "subtitle" : { + "text" : "[Champions: 33] Last updated at 2024-08-05 12:10:36 GMT" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "xAxis" : { + "type" : "category" + }, + "plotOptions" : { + "series" : { + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + }, + "borderWidth" : 0 + } + }, + "tooltip" : { + "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>", + "followPointer" : 1, + "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>" + }, + "legend" : { + "enabled" : 0 + } +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 9aa2c38d8e..4e0ea5448a 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,119 +1,89 @@ { + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "xAxis" : { + "type" : "category" + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } + } + }, + "legend" : { + "enabled" : 0 + }, + "series" : [ + { + "data" : [ + { + "y" : 2, + "name" : "Alexander Karelas", + "drilldown" : "Alexander Karelas" + }, + { + "y" : 2, + "name" : "David Ferrone", + "drilldown" : "David Ferrone" + }, + { + "y" : 2, + "name" : "E. Choroba", + "drilldown" : "E. Choroba" + }, + { + "drilldown" : "Jan Krnavek", + "name" : "Jan Krnavek", + "y" : 2 + }, + { + "drilldown" : "Laurent Rosenfeld", + "y" : 3, + "name" : "Laurent Rosenfeld" + }, + { + "drilldown" : "Mariano Ortega", + "y" : 2, + "name" : "Mariano Ortega" + }, + { + "drilldown" : "Mark Anderson", + "y" : 2, + "name" : "Mark Anderson" + } + ], + "colorByPoint" : 1, + "name" : "The Weekly Challenge - 281" + } + ], + "chart" : { + "type" : "column" + }, + "tooltip" : { + "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>", + "followPointer" : 1, + "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>" + }, + "title" : { + "text" : "The Weekly Challenge - 281" + }, "drilldown" : { "series" : [ { - "id" : "Adam Russell", - "name" : "Adam Russell", + "id" : "Alexander Karelas", "data" : [ [ "Perl", 2 - ], - [ - "Blog", - 1 - ] - ] - }, - { - "name" : "Alexander Karelas", - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Alexander Karelas" - }, - { - "id" : "Ali Moradi", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "name" : "Ali Moradi" - }, - { - "id" : "Andrew Schneider", - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Andrew Schneider" - }, - { - "id" : "Arne Sommer", - "data" : [ - [ - "Raku", - 2 - ], - [ - "Blog", - 1 ] ], - "name" : "Arne Sommer" - }, - { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ] - ], - "name" : "Athanasius", - "id" : "Athanasius" - }, - { - "name" : "BarrOff", - "data" : [ - [ - "Raku", - 2 - ] - ], - "id" : "BarrOff" - }, - { - "data" : [ - [ - "Perl", - 2 - ] - ], - "name" : "Bob Lied", - "id" : "Bob Lied" - }, - { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ], - "name" : "Dave Jacoby", - "id" : "Dave Jacoby" + "name" : "Alexander Karelas" }, { "name" : "David Ferrone", @@ -126,42 +96,14 @@ "id" : "David Ferrone" }, { - "data" : [ - [ - "Perl", - 2 - ] - ], "name" : "E. Choroba", - "id" : "E. Choroba" - }, - { - "id" : "Feng Chang", - "name" : "Feng Chang", - "data" : [ - [ - "Raku", - 2 - ] - ] - }, - { + "id" : "E. Choroba", "data" : [ [ "Perl", 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 ] - ], - "name" : "Jaldhar H. Vyas", - "id" : "Jaldhar H. Vyas" + ] }, { "name" : "Jan Krnavek", @@ -174,462 +116,46 @@ "id" : "Jan Krnavek" }, { - "id" : "Jorg Sommrey", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ], - "name" : "Jorg Sommrey" - }, - { - "name" : "Kjetil Skotheim", - "data" : [ - [ - "Perl", - 2 - ] - ], - "id" : "Kjetil Skotheim" - }, - { - "name" : "Laurent Rosenfeld", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 2 - ] - ], - "id" : "Laurent Rosenfeld" - }, - { - "id" : "Luca Ferrari", - "name" : "Luca Ferrari", - "data" : [ - [ - "Raku", - 2 - ], - [ - "Blog", - 10 - ] - ] - }, - { - "name" : "Mark Anderson", - "data" : [ - [ - "Raku", - 2 - ] - ], - "id" : "Mark Anderson" - }, - { - "id" : "Matthew Neleigh", - "name" : "Matthew Neleigh", + "id" : "Laurent Rosenfeld", "data" : [ [ "Perl", - 2 |
