diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2021-11-03 07:47:40 +0000 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2021-11-03 07:47:40 +0000 |
| commit | 1cd169b85c4bcb26ecf76fb13fe1c356c8841ac6 (patch) | |
| tree | a2f2bc5c3c2f1c715f50769ec51f12c17c7deb35 | |
| parent | 98c4ecee7e067ccce54e89c83ae6502184f44758 (diff) | |
| download | perlweeklychallenge-club-1cd169b85c4bcb26ecf76fb13fe1c356c8841ac6.tar.gz perlweeklychallenge-club-1cd169b85c4bcb26ecf76fb13fe1c356c8841ac6.tar.bz2 perlweeklychallenge-club-1cd169b85c4bcb26ecf76fb13fe1c356c8841ac6.zip | |
- Added solution by Robert DiCicco.
| -rw-r--r-- | challenge-137/robert-dicicco/perl/ch-1.pl | 47 | ||||
| -rw-r--r-- | stats/pwc-current.json | 251 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown-summary.json | 68 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 914 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 398 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 102 | ||||
| -rw-r--r-- | stats/pwc-summary-121-150.json | 110 | ||||
| -rw-r--r-- | stats/pwc-summary-151-180.json | 104 | ||||
| -rw-r--r-- | stats/pwc-summary-181-210.json | 34 | ||||
| -rw-r--r-- | stats/pwc-summary-211-240.json | 36 | ||||
| -rw-r--r-- | stats/pwc-summary-241-270.json | 56 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 40 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 126 | ||||
| -rw-r--r-- | stats/pwc-summary-91-120.json | 112 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 532 |
15 files changed, 1496 insertions, 1434 deletions
diff --git a/challenge-137/robert-dicicco/perl/ch-1.pl b/challenge-137/robert-dicicco/perl/ch-1.pl new file mode 100644 index 0000000000..4c48577315 --- /dev/null +++ b/challenge-137/robert-dicicco/perl/ch-1.pl @@ -0,0 +1,47 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use 5.30.0; + +use Date::Calc qw (leap_year Day_of_Week); + +# Author: Robert DiCicco +# Date: 01-NOV-2021 +# Challenge 137 + +# ISO-8601 +# An ISO calendar year is long if and only if the corresponding Gregorian +# year begins on a Thursday when it is a common year or begins either on a +# Wednesday or a Thursday when it is a leap year. + +# An ISO calendar year is long if and only if the corresponding Gregorian +# year either begins or ends (or both) on a Thursday. + +my @years = (1900..2100); +my @output_arr = (); + +foreach (@years){ + my $leap_flag = 0; + if (leap_year($_)) { + $leap_flag = 1; + } + + my $sdow = Day_of_Week($_, 1, 1); # Jan. 1st dow for selected year + my $ldow = Day_of_Week($_,12,31); # Dec. 31st dow for selected year + + if ($leap_flag){ # if this ia a leap year + if (($sdow == 3) || ($ldow == 5)){ # and the start dow is Wed., or last dow is Fri. + push(@output_arr, $_); # then add to the output array + } + } + else { # not a leap year + if (($sdow == 4) || ($ldow == 4)){ # and the start dow is Thur., or last dow is Thur. + push(@output_arr, $_); # then add to the output array + } + } +} + +print("\n"); +print("Find all the years between 1900 and 2100 which is a Long Year.\n"); +print("Output:\n@output_arr\n"); diff --git a/stats/pwc-current.json b/stats/pwc-current.json index e4b122c712..9445ba9121 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,23 +1,123 @@ { - "legend" : { - "enabled" : 0 + "series" : [ + { + "name" : "The Weekly Challenge - 137", + "colorByPoint" : 1, + "data" : [ + { + "y" : 1, + "name" : "Andrew Shitov", + "drilldown" : "Andrew Shitov" + }, + { + "drilldown" : "Bob Lied", + "name" : "Bob Lied", + "y" : 2 + }, + { + "name" : "Flavio Poletti", + "drilldown" : "Flavio Poletti", + "y" : 6 + }, + { + "drilldown" : "James Smith", + "name" : "James Smith", + "y" : 3 + }, + { + "y" : 6, + "name" : "Luca Ferrari", + "drilldown" : "Luca Ferrari" + }, + { + "y" : 2, + "drilldown" : "Mark Anderson", + "name" : "Mark Anderson" + }, + { + "drilldown" : "Matthew Neleigh", + "name" : "Matthew Neleigh", + "y" : 2 + }, + { + "y" : 2, + "name" : "Niels van Dijke", + "drilldown" : "Niels van Dijke" + }, + { + "y" : 2, + "name" : "Paulo Custodio", + "drilldown" : "Paulo Custodio" + }, + { + "name" : "Robert DiCicco", + "drilldown" : "Robert DiCicco", + "y" : 1 + }, + { + "name" : "Roger Bell_West", + "drilldown" : "Roger Bell_West", + "y" : 4 + }, + { + "y" : 3, + "name" : "Simon Green", + "drilldown" : "Simon Green" + }, + { + "y" : 2, + "drilldown" : "Steven Wilson", + "name" : "Steven Wilson" + }, + { + "name" : "W. Luis Mochan", + "drilldown" : "W. Luis Mochan", + "y" : 3 + } + ] + } + ], + "plotOptions" : { + "series" : { + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + }, + "borderWidth" : 0 + } }, - "chart" : { - "type" : "column" + "tooltip" : { + "followPointer" : 1, + "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>", + "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>" }, "xAxis" : { "type" : "category" }, + "title" : { + "text" : "The Weekly Challenge - 137" + }, + "chart" : { + "type" : "column" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "legend" : { + "enabled" : 0 + }, "drilldown" : { "series" : [ { - "name" : "Andrew Shitov", "data" : [ [ "Raku", 1 ] ], + "name" : "Andrew Shitov", "id" : "Andrew Shitov" }, { @@ -49,7 +149,6 @@ ] }, { - "id" : "James Smith", "data" : [ [ "Perl", @@ -60,9 +159,11 @@ 1 ] ], + "id" : "James Smith", "name" : "James Smith" }, { + "name" : "Luca Ferrari", "id" : "Luca Ferrari", "data" : [ [ @@ -73,47 +174,56 @@ "Blog", 4 ] - ], - "name" : "Luca Ferrari" + ] }, { + "id" : "Mark Anderson", "name" : "Mark Anderson", "data" : [ [ "Raku", 2 ] - ], - "id" : "Mark Anderson" + ] }, { + "name" : "Matthew Neleigh", "id" : "Matthew Neleigh", "data" : [ [ "Perl", 2 ] - ], - "name" : "Matthew Neleigh" + ] }, { - "name" : "Niels van Dijke", - "id" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Niels van Dijke", + "id" : "Niels van Dijke" }, { - "name" : "Paulo Custodio", - "id" : "Paulo Custodio", "data" : [ [ "Perl", 2 ] + ], + "id" : "Paulo Custodio", + "name" : "Paulo Custodio" + }, + { + "id" : "Robert DiCicco", + "name" : "Robert DiCicco", + "data" : [ + [ + "Perl", + 1 + ] ] }, { @@ -131,8 +241,6 @@ "name" : "Roger Bell_West" }, { - "name" : "Simon Green", - "id" : "Simon Green", "data" : [ [ "Perl", @@ -142,17 +250,19 @@ "Blog", 1 ] - ] + ], + "id" : "Simon Green", + "name" : "Simon Green" }, { - "id" : "Steven Wilson", "data" : [ [ "Perl", 2 ] ], - "name" : "Steven Wilson" + "name" : "Steven Wilson", + "id" : "Steven Wilson" }, { "name" : "W. Luis Mochan", @@ -170,102 +280,7 @@ } ] }, - "title" : { - "text" : "The Weekly Challenge - 137" - }, - "series" : [ - { - "data" : [ - { - "name" : "Andrew Shitov", - "drilldown" : "Andrew Shitov", - "y" : 1 - }, - { - "name" : "Bob Lied", - "drilldown" : "Bob Lied", - "y" : 2 - }, - { - "name" : "Flavio Poletti", - "drilldown" : "Flavio Poletti", - "y" : 6 - }, - { - "drilldown" : "James Smith", - "name" : "James Smith", - "y" : 3 - }, - { - "y" : 6, - "name" : "Luca Ferrari", - "drilldown" : "Luca Ferrari" - }, - { - "name" : "Mark Anderson", - "drilldown" : "Mark Anderson", - "y" : 2 - }, - { - "y" : 2, - "drilldown" : "Matthew Neleigh", - "name" : "Matthew Neleigh" - }, - { - "y" : 2, - "name" : "Niels van Dijke", - "drilldown" : "Niels van Dijke" - }, - { - "drilldown" : "Paulo Custodio", - "name" : "Paulo Custodio", - "y" : 2 - }, - { - "y" : 4, - "drilldown" : "Roger Bell_West", - "name" : "Roger Bell_West" - }, - { - "drilldown" : "Simon Green", - "name" : "Simon Green", - "y" : 3 - }, - { - "y" : 2, - "drilldown" : "Steven Wilson", - "name" : "Steven Wilson" - }, - { - "drilldown" : "W. Luis Mochan", - "name" : "W. Luis Mochan", - "y" : 3 - } - ], - "colorByPoint" : 1, - "name" : "The Weekly Challenge - 137" - } - ], "subtitle" : { - "text" : "[Champions: 13] Last updated at 2021-11-03 07:04:36 GMT" - }, - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } - } - }, - "tooltip" : { - "followPointer" : 1, - "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>", - "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } + "text" : "[Champions: 14] Last updated at 2021-11-03 07:44:57 GMT" } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 8c4a7ca868..1c96d83d93 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,49 +1,22 @@ { - "xAxis" : { - "type" : "category", - "labels" : { - "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" - } - } - }, - "chart" : { - "type" : "column" - }, - "legend" : { - "enabled" : "false" - }, - "yAxis" : { - "title" : { - "text" : null - }, - "min" : 0 - }, "tooltip" : { "pointFormat" : "<b>{point.y:.0f}</b>" }, - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2021]" - }, - "subtitle" : { - "text" : "Last updated at 2021-11-03 07:04:36 GMT" - }, "series" : [ { + "name" : "Contributions", "dataLabels" : { + "align" : "right", "format" : "{point.y:.0f}", - "color" : "#FFFFFF", "style" : { "fontFamily" : "Verdana, sans-serif", "fontSize" : "13px" }, - "rotation" : -90, + "y" : 10, + "color" : "#FFFFFF", "enabled" : "true", - "align" : "right", - "y" : 10 + "rotation" : -90 }, - "name" : "Contributions", "data" : [ [ "Blog", @@ -51,7 +24,7 @@ ], [ "Perl", - 6551 + 6552 ], [ "Raku", @@ -59,5 +32,32 @@ ] ] } - ] + ], + "yAxis" : { + "title" : { + "text" : null + }, + "min" : 0 + }, + "chart" : { + "type" : "column" + }, + "xAxis" : { + "labels" : { + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + } + }, + "type" : "category" + }, + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2021]" + }, + "legend" : { + "enabled" : "false" + }, + "subtitle" : { + "text" : "Last updated at 2021-11-03 07:44:57 GMT" + } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index 6e348d1843..4e18ae29db 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -1,18 +1,9 @@ { - "legend" : { - "enabled" : "false" - }, - "chart" : { - "type" : "column" - }, - "xAxis" : { - "type" : "category" - }, "drilldown" : { "series" : [ { - "name" : "001", "id" : "001", + "name" : "001", "data" : [ [ "Perl", @@ -29,6 +20,7 @@ ] }, { + "id" : "002", "name" : "002", "data" : [ [ @@ -43,8 +35,7 @@ "Blog", 10 ] - ], - "id" : "002" + ] }, { "data" : [ @@ -61,10 +52,12 @@ 9 ] ], - "id" : "003", - "name" : "003" + "name" : "003", + "id" : "003" }, { + "name" : "004", + "id" : "004", "data" : [ [ "Perl", @@ -78,12 +71,9 @@ "Blog", 10 ] - ], - "id" : "004", - "name" : "004" + ] }, { - "id" : "005", "data" : [ [ "Perl", @@ -98,10 +88,12 @@ 12 ] ], + "id" : "005", "name" : "005" }, { "id" : "006", + "name" : "006", "data" : [ [ "Perl", @@ -115,11 +107,9 @@ "Blog", 7 ] - ], - "name" : "006" + ] }, { - "id" : "007", "data" : [ [ "Perl", @@ -134,11 +124,12 @@ 10 ] ], + "id" : "007", "name" : "007" }, { - "name" : "008", "id" : "008", + "name" : "008", "data" : [ [ "Perl", @@ -155,7 +146,6 @@ ] }, { - "name" : "009", "data" : [ [ "Perl", @@ -170,11 +160,10 @@ 13 ] ], - "id" : "009" + "id" : "009", + "name" : "009" }, { - "name" : "010", - "id" : "010", "data" : [ [ "Perl", @@ -188,9 +177,13 @@ "Blog", 11 ] - ] + ], + "id" : "010", + "name" : "010" }, { + "id" : "011", + "name" : "011", "data" : [ [ "Perl", @@ -204,13 +197,9 @@ "Blog", 10 ] - ], - "id" : "011", - "name" : "011" + ] }, { - "name" : "012", - "id" : "012", "data" : [ [ "Perl", @@ -224,11 +213,11 @@ "Blog", 11 ] - ] + ], + "name" : "012", + "id" : "012" }, { - "name" : "013", - "id" : "013", "data" : [ [ "Perl", @@ -242,7 +231,9 @@ "Blog", 13 ] - ] + ], + "name" : "013", + "id" : "013" }, { "data" : [ @@ -259,12 +250,10 @@ 15 ] ], - "id" : "014", - "name" : "014" + "name" : "014", + "id" : "014" }, { - "name" : "015", - "id" : "015", "data" : [ [ "Perl", @@ -278,10 +267,13 @@ "Blog", 15 ] - ] + ], + "id" : "015", + "name" : "015" }, { "id" : "016", + "name" : "016", "data" : [ [ "Perl", @@ -295,12 +287,9 @@ "Blog", 12 ] - ], - "name" : "016" + ] }, { - "name" : "017", - "id" : "017", "data" : [ [ "Perl", @@ -314,7 +303,9 @@ "Blog", 12 ] - ] + ], + "id" : "017", + "name" : "017" }, { "name" : "018", @@ -349,11 +340,10 @@ 13 ] ], - "id" : "019", - "name" : "019" + "name" : "019", + "id" : "019" }, { - "id" : "020", "data" : [ [ "Perl", @@ -368,11 +358,12 @@ 13 ] ], - "name" : "020" + "name" : "020", + "id" : "020" }, { - "name" : "021", "id" : "021", + "name" : "021", "data" : [ [ "Perl", @@ -389,6 +380,7 @@ ] }, { + "id" : "022", "name" : "022", "data" : [ [ @@ -403,10 +395,11 @@ "Blog", 10 ] - ], - "id" : "022" + ] }, { + "name" : "023", + "id" : "023", "data" : [ [ "Perl", @@ -420,11 +413,10 @@ "Blog", 12 ] - ], - "id" : "023", - "name" : "023" + ] }, { + "name" : "024", "id" : "024", "data" : [ [ @@ -439,11 +431,9 @@ "Blog", 11 ] - ], - "name" : "024" + ] }, { - "name" : "025", "data" : [ [ "Perl", @@ -458,10 +448,12 @@ 12 ] ], + "name" : "025", "id" : "025" }, { "name" : "026", + "id" : "026", "data" : [ [ "Perl", @@ -475,10 +467,11 @@ "Blog", 10 ] - ], - "id" : "026" + ] }, { + "id" : "027", + "name" : "027", "data" : [ [ "Perl", @@ -492,13 +485,9 @@ "Blog", 9 ] - ], - "id" : "027", - "name" : "027" + ] }, { - "name" : "028", - "id" : "028", "data" : [ [ "Perl", @@ -512,10 +501,13 @@ "Blog", 9 ] - ] + ], + "id" : "028", + "name" : "028" }, { "id" : "029", + "name" : "029", "data" : [ [ "Perl", @@ -529,12 +521,9 @@ "Blog", 12 ] - ], - "name" : "029" + ] }, { - "name" : "030", - "id" : "030", "data" : [ [ "Perl", @@ -548,10 +537,13 @@ "Blog", 10 ] - ] + ], + "name" : "030", + "id" : "030" }, { "id" : "031", + "name" : "031", "data" : [ [ "Perl", @@ -565,10 +557,11 @@ "Blog", 9 ] - ], - "name" : "031" + ] }, { + "name" : "032", + "id" : "032", "data" : [ [ "Perl", @@ -582,13 +575,9 @@ "Blog", 10 ] - ], - "id" : "032", - "name" : "032" + ] }, { - "name" : "033", - "id" : "033", "data" : [ [ "Perl", @@ -602,9 +591,12 @@ "Blog", 10 ] - ] + ], + "name" : "033", + "id" : "033" }, { + "id" : "034", "name" : "034", "data" : [ [ @@ -619,10 +611,11 @@ "Blog", 11 ] - ], - "id" : "034" + ] }, { + "id" : "035", + "name" : "035", "data" : [ [ "Perl", @@ -636,12 +629,9 @@ "Blog", 9 ] - ], - "id" : "035", - "name" : "035" + ] }, { - "name" : "036", "data" : [ [ "Perl", @@ -656,7 +646,8 @@ 11 ] ], - "id" : "036" + "id" : "036", + "name" : "036" }, { "name" : "037", @@ -677,8 +668,6 @@ ] }, { - "name" : "038", - "id" : "038", "data" : [ [ "Perl", @@ -692,10 +681,11 @@ "Blog", 12 ] - ] + ], + "id" : "038", + "name" : "038" }, { - "id" : "039", "data" : [ [ "Perl", @@ -710,9 +700,11 @@ 12 ] ], - "name" : "039" + "name" : "039", + "id" : "039" }, { + "name" : "040", "id" : "040", "data" : [ [ @@ -727,11 +719,9 @@ "Blog", 10 ] - ], - "name" : "040" + ] }, { - "name" : "041", "data" : [ [ "Perl", @@ -746,10 +736,12 @@ 9 ] ], - "id" : "041" + "id" : "041", + "name" : "041" }, { "id" : "042", + "name" : "042", "data" : [ [ "Perl", @@ -763,10 +755,11 @@ "Blog", 11 ] - ], - "name" : "042" + ] }, { + "name" : "043", + "id" : "043", "data" : [ [ "Perl", @@ -780,13 +773,9 @@ "Blog", 11 ] - ], - "id" : "043", - "name" : "043" + ] }, { - "name" : "044", - "id" : "044", "data" : [ [ "Perl", @@ -800,10 +789,11 @@ "Blog", 11 ] - ] + ], + "id" : "044", + "name" : "044" }, { - "id" : "045", "data" : [ [ "Perl", @@ -818,10 +808,12 @@ 11 ] ], + "id" : "045", "name" : "045" }, { "name" : "046", + "id" : "046", "data" : [ [ "Perl", @@ -835,12 +827,9 @@ "Blog", 10 ] - ], - "id" : "046" + ] }, { - "name" : "047", - "id" : "047", "data" : [ [ "Perl", @@ -854,10 +843,13 @@ "Blog", 10 ] - ] + |
