aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <mohammad.anwar@yahoo.com>2022-11-07 19:26:33 +0000
committerMohammad S Anwar <mohammad.anwar@yahoo.com>2022-11-07 19:26:33 +0000
commit932f8001da0046a9da141a3ee9b149199e8187e3 (patch)
treefc9ae55cb9e68da6ab53d8c1a75f90afbdb284f3
parentd0c94dedc2635ed4ff7e3fd0ac367ccc9c65d2ae (diff)
downloadperlweeklychallenge-club-932f8001da0046a9da141a3ee9b149199e8187e3.tar.gz
perlweeklychallenge-club-932f8001da0046a9da141a3ee9b149199e8187e3.tar.bz2
perlweeklychallenge-club-932f8001da0046a9da141a3ee9b149199e8187e3.zip
- Added solutions by Robert DiCicco.
-rw-r--r--challenge-190/robert-dicicco/perl/ch-1.pl99
-rw-r--r--challenge-190/robert-dicicco/raku/ch-1.raku95
-rw-r--r--challenge-190/robert-dicicco/ruby/ch-1.rb85
-rw-r--r--stats/pwc-current.json101
-rw-r--r--stats/pwc-language-breakdown-summary.json58
-rw-r--r--stats/pwc-language-breakdown.json1282
-rw-r--r--stats/pwc-leaders.json738
-rw-r--r--stats/pwc-summary-1-30.json106
-rw-r--r--stats/pwc-summary-121-150.json106
-rw-r--r--stats/pwc-summary-151-180.json102
-rw-r--r--stats/pwc-summary-181-210.json36
-rw-r--r--stats/pwc-summary-211-240.json122
-rw-r--r--stats/pwc-summary-241-270.json86
-rw-r--r--stats/pwc-summary-271-300.json72
-rw-r--r--stats/pwc-summary-31-60.json38
-rw-r--r--stats/pwc-summary-61-90.json106
-rw-r--r--stats/pwc-summary-91-120.json34
-rw-r--r--stats/pwc-summary.json36
18 files changed, 1800 insertions, 1502 deletions
diff --git a/challenge-190/robert-dicicco/perl/ch-1.pl b/challenge-190/robert-dicicco/perl/ch-1.pl
new file mode 100644
index 0000000000..0947e18fb7
--- /dev/null
+++ b/challenge-190/robert-dicicco/perl/ch-1.pl
@@ -0,0 +1,99 @@
+#!/usr/bin/env perl
+
+=begin pod
+
+AUTHOR: Robert DiCicco
+
+DATE: 2022-11-07
+
+Challenge 190 Capital Detection ( Perl )
+
+
+
+You are given a string with alphabetic characters only: A..Z and a..z.
+
+Write a script to find out if the usage of Capital is appropriate
+
+if it satisfies at least one of the following rules:
+
+
+
+1) Only first letter is capital and all others are small.
+
+2) Every letter is small.
+
+3) Every letter is capital.
+
+
+
+=cut
+
+
+
+use strict;
+
+use warnings;
+
+
+
+my @words = ("Perl", "TPF", "PyThon", "raku");
+
+
+
+for my $s (@words) {
+
+ print "Input: \$s = \'$s\'\n";
+
+ if ($s =~ /^[A-Z][a-z]*$/) {
+
+ print "Output: 1\n";
+
+ } elsif ( $s =~ /^[a-z]*$/) {
+
+ print "Output: 2\n";
+
+ } elsif ( $s =~ /^[A-Z]*$/) {
+
+ print "Output: 3\n";
+
+ } else {
+
+ print "Output: 0\n";
+
+ }
+
+ print "\n";
+
+}
+
+
+
+=begin pod
+
+PS G:\Projects\Perl\Challenges> perl .\CapitalDetection.pl
+
+Input: $s = 'Perl'
+
+Output: 1
+
+
+
+Input: $s = 'TPF'
+
+Output: 3
+
+
+
+Input: $s = 'PyThon'
+
+Output: 0
+
+
+
+Input: $s = 'raku'
+
+Output: 2
+
+
+
+=cut
diff --git a/challenge-190/robert-dicicco/raku/ch-1.raku b/challenge-190/robert-dicicco/raku/ch-1.raku
new file mode 100644
index 0000000000..3d63098436
--- /dev/null
+++ b/challenge-190/robert-dicicco/raku/ch-1.raku
@@ -0,0 +1,95 @@
+use v6;
+
+=begin comment
+
+AUTHOR: Robert DiCicco
+
+DATE: 2022-11-07
+
+Challenge 190 Capital Detection ( Raku )
+
+
+
+You are given a string with alphabetic characters only: A..Z and a..z.
+
+Write a script to find out if the usage of Capital is appropriate
+
+if it satisfies at least one of the following rules:
+
+
+
+1) Only first letter is capital and all others are small.
+
+2) Every letter is small.
+
+3) Every letter is capital.
+
+
+
+=end comment
+
+
+
+my @words = ("Perl", "TPF", "PyThon", "raku");
+
+
+
+for (@words) -> $s {
+
+ say "Input: \$s = \'$s'";
+
+ if ($s ~~ /^<:Lu><:Ll>*$/) {
+
+ say "Output: 1";
+
+ } elsif ( $s ~~ /^<:Ll>*$/) {
+
+ say "Output: 2";
+
+ } elsif ($s ~~ /^<:Lu>*$/) {
+
+ say "Output: 3";
+
+ } else {
+
+ say "Output: 0";
+
+ }
+
+ say " ";
+
+}
+
+
+
+=begin comment
+
+SAMPLE OUTPUT
+
+PS G:\Projects\Perl\Challenges> raku .\CapitalDetection.rk
+
+Input: $s = 'Perl'
+
+Output: 1
+
+
+
+Input: $s = 'TPF'
+
+Output: 3
+
+
+
+Input: $s = 'PyThon'
+
+Output: 0
+
+
+
+Input: $s = 'raku'
+
+Output: 2
+
+
+
+=end comment
diff --git a/challenge-190/robert-dicicco/ruby/ch-1.rb b/challenge-190/robert-dicicco/ruby/ch-1.rb
new file mode 100644
index 0000000000..aaf02305b6
--- /dev/null
+++ b/challenge-190/robert-dicicco/ruby/ch-1.rb
@@ -0,0 +1,85 @@
+#!/usr/bin/envruby
+
+=begin
+
+AUTHOR: Robert DiCicco
+
+DATE: 2022-11-07
+
+Challenge 190 Capital Detection ( Ruby )
+
+
+
+You are given a string with alphabetic characters only: A..Z and a..z.
+
+Write a script to find out if the usage of Capital is appropriate
+
+if it satisfies at least one of the following rules:
+
+
+
+1) Only first letter is capital and all others are small.
+
+2) Every letter is small.
+
+3) Every letter is capital.
+
+
+
+SAMPLE OUTPUT
+
+Input: $s = "Perl"
+
+Output: 1
+
+
+
+Input: $s = "TPF"
+
+Output: 3
+
+
+
+Input: $s = "PyThon"
+
+Output: 0
+
+
+
+Input: $s = "raku"
+
+Output: 2
+
+=end
+
+
+
+words = ["Perl", "TPF", "PyThon", "raku"]
+
+
+
+words.each do |s|
+
+ puts "Input: $s = \"#{s}\""
+
+ if s.match(/^[A-Z][a-z]*$/)
+
+ puts "Output: 1"
+
+ elsif s.match(/^[a-z]*$/)
+
+ puts "Output: 2"
+
+ elsif s.match(/^[A-Z]*$/)
+
+ puts "Output: 3"
+
+ else
+
+ puts "Output: 0"
+
+ end
+
+ puts " "
+
+end
diff --git a/stats/pwc-current.json b/stats/pwc-current.json
index ceeec97185..47ab332d8d 100644
--- a/stats/pwc-current.json
+++ b/stats/pwc-current.json
@@ -1,32 +1,35 @@
{
- "plotOptions" : {
- "series" : {
- "dataLabels" : {
- "format" : "{point.y}",
- "enabled" : 1
- },
- "borderWidth" : 0
- }
+ "chart" : {
+ "type" : "column"
+ },
+ "subtitle" : {
+ "text" : "[Champions: 6] Last updated at 2022-11-07 19:24:48 GMT"
},
"legend" : {
"enabled" : 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/>"
- },
"xAxis" : {
"type" : "category"
},
- "title" : {
- "text" : "The Weekly Challenge - 190"
+ "plotOptions" : {
+ "series" : {
+ "borderWidth" : 0,
+ "dataLabels" : {
+ "enabled" : 1,
+ "format" : "{point.y}"
+ }
+ }
+ },
+ "tooltip" : {
+ "followPointer" : 1,
+ "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>",
+ "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>"
},
"drilldown" : {
"series" : [
{
- "name" : "Luca Ferrari",
"id" : "Luca Ferrari",
+ "name" : "Luca Ferrari",
"data" : [
[
"Raku",
@@ -39,18 +42,17 @@
]
},
{
- "name" : "Mark Anderson",
"id" : "Mark Anderson",
"data" : [
[
"Raku",
2
]
- ]
+ ],
+ "name" : "Mark Anderson"
},
{
"name" : "Peter Campbell Smith",
- "id" : "Peter Campbell Smith",
"data" : [
[
"Perl",
@@ -60,11 +62,25 @@
"Blog",
1
]
- ]
+ ],
+ "id" : "Peter Campbell Smith"
+ },
+ {
+ "id" : "Robert DiCicco",
+ "data" : [
+ [
+ "Perl",
+ 1
+ ],
+ [
+ "Raku",
+ 1
+ ]
+ ],
+ "name" : "Robert DiCicco"
},
{
"name" : "Roger Bell_West",
- "id" : "Roger Bell_West",
"data" : [
[
"Perl",
@@ -74,62 +90,65 @@
"Raku",
2
]
- ]
+ ],
+ "id" : "Roger Bell_West"
},
{
- "id" : "Tim Potapov",
"data" : [
[
"Perl",
2
]
],
- "name" : "Tim Potapov"
+ "name" : "Tim Potapov",
+ "id" : "Tim Potapov"
}
]
},
- "chart" : {
- "type" : "column"
- },
- "yAxis" : {
- "title" : {
- "text" : "Total Solutions"
- }
+ "title" : {
+ "text" : "The Weekly Challenge - 190"
},
"series" : [
{
"data" : [
{
- "name" : "Luca Ferrari",
"y" : 8,
+ "name" : "Luca Ferrari",
"drilldown" : "Luca Ferrari"
},
{
- "drilldown" : "Mark Anderson",
"y" : 2,
+ "drilldown" : "Mark Anderson",
"name" : "Mark Anderson"
},
{
+ "name" : "Peter Campbell Smith",
"drilldown" : "Peter Campbell Smith",
- "y" : 3,
- "name" : "Peter Campbell Smith"
+ "y" : 3
+ },
+ {
+ "y" : 2,
+ "name" : "Robert DiCicco",
+ "drilldown" : "Robert DiCicco"
},
{
+ "drilldown" : "Roger Bell_West",
"name" : "Roger Bell_West",
- "y" : 4,
- "drilldown" : "Roger Bell_West"
+ "y" : 4
},
{
- "y" : 2,
"drilldown" : "Tim Potapov",
- "name" : "Tim Potapov"
+ "name" : "Tim Potapov",
+ "y" : 2
}
],
"name" : "The Weekly Challenge - 190",
"colorByPoint" : 1
}
],
- "subtitle" : {
- "text" : "[Champions: 5] Last updated at 2022-11-07 19:09:17 GMT"
+ "yAxis" : {
+ "title" : {
+ "text" : "Total Solutions"
+ }
}
}
diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json
index b07aa21cbf..540c64c12c 100644
--- a/stats/pwc-language-breakdown-summary.json
+++ b/stats/pwc-language-breakdown-summary.json
@@ -1,37 +1,42 @@
{
- "legend" : {
- "enabled" : "false"
- },
"xAxis" : {
+ "type" : "category",
"labels" : {
"style" : {
"fontSize" : "13px",
"fontFamily" : "Verdana, sans-serif"
}
- },
- "type" : "category"
+ }
},
- "title" : {
- "text" : "The Weekly Challenge Contributions [2019 - 2022]"
+ "legend" : {
+ "enabled" : "false"
},
- "tooltip" : {
- "pointFormat" : "<b>{point.y:.0f}</b>"
+ "subtitle" : {
+ "text" : "Last updated at 2022-11-07 19:24:48 GMT"
+ },
+ "chart" : {
+ "type" : "column"
+ },
+ "yAxis" : {
+ "min" : 0,
+ "title" : {
+ "text" : null
+ }
},
"series" : [
{
"dataLabels" : {
"color" : "#FFFFFF",
+ "align" : "right",
+ "format" : "{point.y:.0f}",
"enabled" : "true",
"rotation" : -90,
+ "y" : 10,
"style" : {
- "fontSize" : "13px",
- "fontFamily" : "Verdana, sans-serif"
- },
- "format" : "{point.y:.0f}",
- "align" : "right",
- "y" : 10
+ "fontFamily" : "Verdana, sans-serif",
+ "fontSize" : "13px"
+ }
},
- "name" : "Contributions",
"data" : [
[
"Blog",
@@ -39,25 +44,20 @@
],
[
"Perl",
- 9266
+ 9267
],
[
"Raku",
- 5560
+ 5561
]
- ]
+ ],
+ "name" : "Contributions"
}
],
- "chart" : {
- "type" : "column"
- },
- "yAxis" : {
- "min" : 0,
- "title" : {
- "text" : null
- }
+ "title" : {
+ "text" : "The Weekly Challenge Contributions [2019 - 2022]"
},
- "subtitle" : {
- "text" : "Last updated at 2022-11-07 19:09:17 GMT"
+ "tooltip" : {
+ "pointFormat" : "<b>{point.y:.0f}</b>"
}
}
diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json
index b42a3ff4c5..91caaef4a8 100644
--- a/stats/pwc-language-breakdown.json
+++ b/stats/pwc-language-breakdown.json
@@ -2,6 +2,7 @@
"drilldown" : {
"series" : [
{
+ "name" : "001",
"data" : [
[
"Perl",
@@ -16,10 +17,10 @@
11
]
],
- "id" : "001",
- "name" : "001"
+ "id" : "001"
},
{
+ "id" : "002",
"name" : "002",
"data" : [
[
@@ -34,12 +35,9 @@
"Blog",
10
]
- ],
- "id" : "002"
+ ]
},
{
- "name" : "003",
- "id" : "003",
"data" : [
[
"Perl",
@@ -53,11 +51,11 @@
"Blog",
9
]
- ]
+ ],
+ "name" : "003",
+ "id" : "003"
},
{
- "name" : "004",
- "id" : "004",
"data" : [
[
"Perl",
@@ -71,11 +69,12 @@
"Blog",
10
]
- ]
+ ],
+ "name" : "004",
+ "id" : "004"
},
{
"name" : "005",
- "id" : "005",
"data" : [
[
"Perl",
@@ -89,10 +88,10 @@
"Blog",
12
]
- ]
+ ],
+ "id" : "005"
},
{
- "name" : "006",
"id" : "006",
"data" : [
[
@@ -107,11 +106,11 @@
"Blog",
7
]
- ]
+ ],
+ "name" : "006"
},
{
"name" : "007",
- "id" : "007",
"data" : [
[
"Perl",
@@ -125,10 +124,11 @@
"Blog",
10
]
- ]
+ ],
+ "id" : "007"
},
{
- "name" : "008",
+ "id" : "008",
"data" : [
[
"Perl",
@@ -143,10 +143,9 @@
12
]
],
- "id" : "008"
+ "name" : "008"
},
{
- "name" : "009",
"id" : "009",
"data" : [
[
@@ -161,7 +160,8 @@
"Blog",
13
]
- ]
+ ],
+ "name" : "009"
},
{
"data" : [
@@ -178,8 +178,8 @@
11
]
],
- "id" : "010",
- "name" : "010"
+ "name" : "010",
+ "id" : "010"
},
{
"id" : "011",
@@ -200,8 +200,8 @@
"name" : "011"
},
{
- "name" : "012",
"id" : "012",
+ "name" : "012",
"data" : [
[
"Perl",
@@ -218,6 +218,7 @@
]
},
{
+ "id" : "013",
"name" : "013",
"data" : [
[
@@ -232,11 +233,9 @@
"Blog",
13
]
- ],
- "id" : "013"
+ ]
},
{
- "name" : "014",
"id" : "014",
"data" : [
[
@@ -251,9 +250,12 @@
"Blog",
15
]
- ]
+ ],
+ "name" : "014"
},
{
+ "id" : "015",
+ "name" : "015",
"data" : [
[
"Perl",
@@ -267,9 +269,7 @@
"Blog",
15
]
- ],
- "id" : "015",
- "name" : "015"
+ ]
},
{
"id" : "016",
@@ -290,8 +290,8 @@
"name" : "016"
},
{
- "name" : "017",
"id" : "017",
+ "name" : "017",
"data" : [
[
"Perl",
@@ -308,8 +308,6 @@
]
},
{
- "name" : "018",
- "id" : "018",
"data" : [
[
"Perl",
@@ -323,7 +321,9 @@
"Blog",
14
]
- ]
+ ],
+ "name" : "018",
+ "id" : "018"
},
{
"name" : "019",
@@ -344,8 +344,8 @@
"id" : "019"
},
{
- "name" : "020",
"id" : "020",
+ "name" : "020",
"data" : [
[
"Perl",
@@ -380,7 +380,6 @@
"name" : "021"
},
{
- "id" : "022",
"data" : [
[
"Perl",
@@ -395,11 +394,10 @@
10
]
],
- "name" : "022"
+ "name" : "022",
+ "id" : "022"
},
{
- "name" : "023",
- "id" : "023",
"data" : [
[
"Perl",
@@ -413,11 +411,11 @@
"Blog",
12
]
- ]
+ ],
+ "name" : "023",
+ "id" : "023"
},
{
- "name" : "024",
- "id" : "024",
"data" : [
[
"Perl",
@@ -431,9 +429,12 @@
"Blog",
11
]
- ]
+ ],
+ "name" : "024",
+ "id" : "024"
},
{
+ "id" : "025",
"data" : [
[
"Perl",
@@ -448,7 +449,6 @@
12
]
],
- "id" : "025",
"name" : "025"
},
{
@@ -470,7 +470,6 @@
"name" : "026"
},
{
- "name" : "027",
"id" : "027",
"data" : [
[
@@ -485,10 +484,10 @@
"Blog",
9
]
- ]
+ ],
+ "name" : "027"
},
{
- "name" : "028",
"data" : [
[
"Perl",
@@ -503,11 +502,11 @@
9
]
],
+ "name" : "028",
"id" : "028"
},
{
"name" : "029",
- "id" : "029",
"data" : [
[
"Perl",
@@ -521,7 +520,8 @@
"Blog",
12
]
- ]
+ ],
+ "id" : "029"
},
{
"data" : [
@@ -538,8 +538,8 @@
10
]
],
- "id" : "030",
- "name" : "030"
+ "name" : "030",
+ "id" : "030"
},
{
"name" : "031",
@@ -561,7 +561,6 @@
},
{
"name" : "032",
- "id" : "032",
"data" : [
[
"Perl",
@@ -575,7 +574,8 @@
"Blog",
10
]
- ]
+ ],
+ "id" : "032"
},
{
"id" : "033",
@@ -596,7 +596,6 @@
"name" : "033"
},
{
- "name" : "034",
"data" : [
[
"Perl",
@@ -611,10 +610,12 @@
11
]
],
+ "name" : "034",
"id" : "034"
},
{
"id" : "035",
+ "name" : "035",
"data" : [
[
"Perl",
@@ -628,10 +629,10 @@
"Blog",
9
]
- ],
- "name" : "035"
+ ]
},
{
+ "id" : "036",
"name" : "036",
"data" : [
[
@@ -646,8 +647,7 @@
"Blog",
11
]
- ],
- "id" : "036"
+ ]
},
{
"data" : [
@@ -664,12 +664,12 @@
9
]
],
- "id" : "037",
- "name" : "037"
+ "name" : "037",
+ "id" : "037"
},
{
- "name" : "038",
"id" : "038",
+ "name" : "038",
"data" : [
[
"Perl",
@@ -686,6 +686,7 @@
]
},
{
+ "id" : "039",
"name" : "039",
"data" : [
[
@@ -700,8 +701,7 @@
"Blog",
12
]
- ],
- "id" : "039"
+ ]
},
{
"id" : "040",
@@ -758,8 +758,6 @@
"name" : "042"
},
{
- "name" : "043",
- "id" : "043",
"data" : [
[
"Perl",
@@ -773,9 +771,12 @@
"Blog",
11
]
- ]
+ ],
+ "name" : "043",
+ "id" : "043"
},
{
+ "id" : "044",
"name" : "044",
"data" : [
[
@@ -790,10 +791,10 @@
"Blog",
11
]
- ],
- "id" : "044"
+ ]
},
{
+ "name" : "045",
"data" : [
[
"Perl",
@@ -808,10 +809,10 @@
11
]
],
- "id" : "045",
- "name" : "045"
+ "id" : "045"
},
{
+ "id" : "046",
"name" : "046",
"data" : [
[
@@ -826,11 +827,9 @@
"Blog",
10
]
- ],
- "id" : "046"
+ ]
},
{
- "name" : "047",
"id" : "047",
"data" : [
[
@@ -845,10 +844,11 @@
"Blog",
10
]
- ]
+ ],
+ "name" : "047"
},
{
- "id" : "048",
+ "name" : "048",
"data" : [
[
"Perl",
@@ -863,10 +863,9 @@
12
]
],
- "name" : "048"
+ "id" : "048"
},
{
- "name" : "049",
"id" : "049",
"data" : [
[
@@ -881,11 +880,11 @@
"Blog",
12
]
- ]
+ ],
+ "name" : "049"
},
{
"name" : "050",
- "id" : "050",
"data" : [
[
"Perl",
@@ -899,10 +898,11 @@
"Blog",
12
]
- ]
+ ],
+ "id" : "050"
},
{
- "name" : "051",
+ "id" : "051",
"data" : [
[
"Perl",
@@ -917,11 +917,9 @@
11
]
],
- "id" : "051"
+ "name" : "051"
},
{
- "name" : "052",
- "id" : "052",
"data" : [
[
"Perl",
@@ -935,9 +933,12 @@
"Blog",
14
]
- ]
+ ],
+ "name" : "052",
+ "id" : "052"
},
{
+ "id" : "053",
"name" : "053",
"data" : [
[
@@ -952,10 +953,10 @@
"Blog",
15
]
- ],
- "id" : "053"
+ ]
},
{
+ "id" : "054",</