From d1cdd6bd2914289bf868f4cdd4c99979d5464a13 Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Mon, 13 Feb 2023 06:51:38 +0000 Subject: - Added solutions by Mark Anderson. - Added solutions by W. Luis Mochan. - Added solutions by Peter Campbell Smith. - Added solutions by Duncan C. White. - Added solutions by Luca Ferrari. - Added solutions by Dave Jacoby. - Added solutions by David Ferrone. - Added solutions by Thomas Kohler. - Added solutions by Mariano Spadaccini. - Added solutions by Carlos Oliveira. - Added solutions by Roger Bell_West. - Added solutions by Chicagoist. - Added solutions by Robbie Hatley. - Added solutions by Jorg Sommrey. - Added solutions by E. Choroba. - Added solutions by Kjetil Skotheim. - Added solutions by Arne Sommer. - Added solutions by Pip Stuart. - Added solutions by Robert Ransbottom. - Added solutions by Athanasius. - Added solutions by James Smith. - Added solutions by Flavio Poletti. - Added solutions by Cheok-Yin Fung. - Added solutions by Solathian. - Added solutions by Jan Krnavek. - Added solutions by Eric Cheung. - Added solutions by Ulrich Reike. - Added solutions by Robert DiCicco. --- challenge-203/colin-crain/perl/ch-1.pl | 141 + challenge-203/colin-crain/perl/ch-2.pl | 114 + challenge-203/eric-cheung/python/ch-1.py | 27 + challenge-203/eric-cheung/python/ch-2.py | 19 + challenge-203/laurent-rosenfeld/blog.txt | 1 + challenge-203/laurent-rosenfeld/perl/ch-1.pl | 24 + challenge-203/laurent-rosenfeld/perl/ch-2.pl | 28 + challenge-203/laurent-rosenfeld/raku/ch-1.raku | 19 + challenge-203/laurent-rosenfeld/raku/ch-2.raku | 28 + challenge-203/robert-dicicco/julia/ch-2.jl | 141 + challenge-203/robert-dicicco/perl/ch-2.pl | 137 + challenge-203/robert-dicicco/raku/ch-2.raku | 131 + challenge-203/robert-dicicco/ruby/ch-2.rb | 129 + challenge-203/ulrich-rieke/haskell/ch-1.hs | 29 + challenge-203/ulrich-rieke/perl/ch-1.pl | 23 + challenge-203/ulrich-rieke/raku/ch-1.raku | 18 + challenge-203/ulrich-rieke/rust/ch-1.rs | 23 + members.json | 2 + stats/pwc-challenge-202.json | 643 ++ stats/pwc-current.json | 337 +- stats/pwc-language-breakdown-summary.json | 76 +- stats/pwc-language-breakdown.json | 7883 ++++++++++++------------ stats/pwc-leaders.json | 484 +- stats/pwc-summary-1-30.json | 120 +- stats/pwc-summary-121-150.json | 148 +- stats/pwc-summary-151-180.json | 76 +- stats/pwc-summary-181-210.json | 130 +- stats/pwc-summary-211-240.json | 144 +- stats/pwc-summary-241-270.json | 134 +- stats/pwc-summary-271-300.json | 46 +- stats/pwc-summary-31-60.json | 86 +- stats/pwc-summary-61-90.json | 66 +- stats/pwc-summary-91-120.json | 68 +- stats/pwc-summary.json | 146 +- 34 files changed, 6647 insertions(+), 4974 deletions(-) create mode 100755 challenge-203/colin-crain/perl/ch-1.pl create mode 100755 challenge-203/colin-crain/perl/ch-2.pl create mode 100755 challenge-203/eric-cheung/python/ch-1.py create mode 100755 challenge-203/eric-cheung/python/ch-2.py create mode 100644 challenge-203/laurent-rosenfeld/blog.txt create mode 100644 challenge-203/laurent-rosenfeld/perl/ch-1.pl create mode 100644 challenge-203/laurent-rosenfeld/perl/ch-2.pl create mode 100644 challenge-203/laurent-rosenfeld/raku/ch-1.raku create mode 100644 challenge-203/laurent-rosenfeld/raku/ch-2.raku create mode 100644 challenge-203/robert-dicicco/julia/ch-2.jl create mode 100644 challenge-203/robert-dicicco/perl/ch-2.pl create mode 100644 challenge-203/robert-dicicco/raku/ch-2.raku create mode 100644 challenge-203/robert-dicicco/ruby/ch-2.rb create mode 100644 challenge-203/ulrich-rieke/haskell/ch-1.hs create mode 100644 challenge-203/ulrich-rieke/perl/ch-1.pl create mode 100644 challenge-203/ulrich-rieke/raku/ch-1.raku create mode 100644 challenge-203/ulrich-rieke/rust/ch-1.rs create mode 100644 stats/pwc-challenge-202.json diff --git a/challenge-203/colin-crain/perl/ch-1.pl b/challenge-203/colin-crain/perl/ch-1.pl new file mode 100755 index 0000000000..f0591e2e34 --- /dev/null +++ b/challenge-203/colin-crain/perl/ch-1.pl @@ -0,0 +1,141 @@ +#!/Users/colincrain/perl5/perlbrew/perls/perl-5.32.0/bin/perl +# +# quads.pl +# +# Special Quadruplets +# Submitted by: Mohammad S Anwar +# You are given an array of integers. +# +# Write a script to find out the total special quadruplets for the +# given array. +# +# Special Quadruplets are such that satisfies the following 2 +# rules. +# 1) nums[a] + nums[b] + nums[c] == nums[d] +# 2) a < b < c < d +# +# Example 1 +# Input: @nums = (1,2,3,6) +# Output: 1 +# +# Since the only special quadruplets found is +# $nums[0] + $nums[1] + $nums[2] == $nums[3]. +# +# Example 2 +# Input: @nums = (1,1,1,3,5) +# Output: 4 +# +# $nums[0] + $nums[1] + $nums[2] == $nums[3] +# $nums[0] + $nums[1] + $nums[3] == $nums[4] +# $nums[0] + $nums[2] + $nums[3] == $nums[4] +# $nums[1] + $nums[2] + $nums[3] == $nums[4] +# +# Example 3 +# Input: @nums = (3,3,6,4,5) +# Output: 0 +# +# analysis +# +# Because the arrays are defined only to be integers, and not +# ordered, a combination of index values that satisfy the +# conditions may be present at any position. The only restriction +# is applies is that the selected indexes must be ascending, so +# that the first position cannot be greater than the index for the +# end of the array minus 3: there must be space to complete the +# selection. + +# Futhermore as we are beholden to chosing indexes in an ascending +# sequence we are constrained from sdorting — mostly. Actually as +# long as the three summands preced the final sum we can reassrange +# them in any required order. So we could perhaps make a list of +# sorted arrays, starting with the leftmost three items sorted, ten +# four items, then five. As long as a single possible sum remains +# it theory we could find a sucessful solution. Although any value +# in the unsorted portion of a list could match the sum for a given +# subsequence pattern we have an inverse tradeoff at work: fewer +# sorted items yield fewer This is curious design pattern that +# reminds me of dynamic programming. Not sure if it could be useful +# in this case but it's really intereting. +# +# A series of nested loops would do the job, checking all +# combinations. Algorithmically this is effective yet problematic, +# but there is little to be done. +# +# The actual number of combinations is tricky to compute but +# ultimately rises factorially. Even though our permissible +# starting positions are reduced by 3 from the length of the array, +# we still get 1 less possibility for the next position and one +# more less for the next, and one more less for the sum to follow. +# Given a long enough array we will still see factorial growth. the +# actual rate is supressed at the start but this initial adjustment +# will become less influential as the size increases. +# +# However some strategies can be employed to try and short-circuit +# out of the search if possible and maybe we should try some to +# make this more interesting. +# +# We could, for instance, scan the array once and get the maximum +# value. Then, when summing a combination if two positiona already +# sum to greater than the maximum we can stop that selection and +# move on immediately. But wait. Neagative numbers are allowed. +# Looks like were just stuck in the grind. +# +# Let's just implement a naive solution and see if anything comes +# to mind later. +# + +# +# © 2022 colin crain +## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + + +use warnings; +use strict; +use utf8; +use feature ":5.26"; +use feature qw(signatures); +no warnings 'experimental::signatures'; + + + + +my @arr = (1,1,1,3,5); + +say count_quads( @arr ); + + + +sub count_quads( @arr ) { + my ($i, $j, $k, $l); + my $count = 0; + + for $i (0..$#arr-3) { + for $j ($i+1..$#arr-2) { + for $k ($j+1..$#arr-1) { + for $l ($k+1..$#arr) { + $count++ if $arr[$i] + $arr[$j] + $arr[$k] == $arr[$l]; + } + } + } + } + + return $count; + +} + + + + + + + + + +use Test::More; + +is count_quads(1,2,3,6), 1, 'ex-1'; +is count_quads(1,1,1,3,5), 4, 'ex-2'; +is count_quads(3,3,6,4,5), 0, 'ex-3'; + +done_testing(); diff --git a/challenge-203/colin-crain/perl/ch-2.pl b/challenge-203/colin-crain/perl/ch-2.pl new file mode 100755 index 0000000000..6d023bc460 --- /dev/null +++ b/challenge-203/colin-crain/perl/ch-2.pl @@ -0,0 +1,114 @@ +#!/Users/colincrain/perl5/perlbrew/perls/perl-5.32.0/bin/perl +# +# copy.pl +# +# Copy Directory +# Submitted by: Julien Fiegehenn +# You are given path to two folders, $source and $target. +# +# Write a script that recursively copy the directory from $source +# to $target except any files. +# +# +# Example +# Input: $source = '/a/b/c' and $target = '/x/y' +# +# Source directory structure: +# +# ├── a +# │ └── b +# │ └── c +# │ ├── 1 +# │ │ └── 1.txt +# │ ├── 2 +# │ │ └── 2.txt +# │ ├── 3 +# │ │ └── 3.txt +# │ ├── 4 +# │ └── 5 +# │ └── 5.txt +# +# Target directory structure: +# +# ├── x +# │ └── y +# +# Expected Result: +# +# ├── x +# │ └── y +# | ├── 1 +# │ ├── 2 +# │ ├── 3 +# │ ├── 4 +# │ └── 5 +# +# method +# +# Any complexities in either the source or target directory +# trees is inconsequntial and misdirectiion. The real trick +# here is the recursion, which is not demonstrated in the +# example. +# +# As understand, if we were given the source '/a/b', then we +# would start copying into 'x/y' from there, but entering any +# directories found and creating whatever directories required, +# and following those too, until the tree branch is exhausted. +# The result, using the same notation, would be: +# +# ├── x +# │ └── y +# │ └── c +# │ ├── 1 +# │ ├── 2 +# │ ├── 3 +# │ ├── 4 +# │ └── 5 +# +# As you can see we have entered /c/ and found the five further directories +# named with the numbers: /c/1/, /c/2/, /c/3/, etc. +# +# Because we have no idea how far we need to go, a recursive +# routine is a natural fit. Because we will be altering the existing filesystem +# environment, there is no need to return anything, only to +# keep track of our two entry points: that of the structure we are +# duplicating, and the place we are affixing the structure we +# find. +# + +# © 2022 colin crain +## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## + + + +use warnings; +use strict; +use utf8; +use feature ":5.26"; +use feature qw(signatures); +no warnings 'experimental::signatures'; + +my $source = q(/a/b/c); +my $target = q(/x/y); + +duplicate_dirs ( $source, $target ) ; + + +sub duplicate_dirs ( $source, $target ) { +## scan the $source directory and make and directories found there in the $target +## directory + return if not -d $source; + + opendir(my $dh, $source) || die "Cannot opendir $source: $!"; + my @dirs = grep { -d "$source/$_" && ! /^\.$|^..$/ } readdir($dh); + closedir $dh; + + for my $dir ( @dirs ) { + mkdir "$target/$dir"; + duplicate_dirs( "$source/$dir", "$target/$dir" ); + } +} + + + + diff --git a/challenge-203/eric-cheung/python/ch-1.py b/challenge-203/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..87d2020cff --- /dev/null +++ b/challenge-203/eric-cheung/python/ch-1.py @@ -0,0 +1,27 @@ + +from itertools import combinations + +## arrInputList = [1, 2, 3, 6] ## Example 1 +## arrInputList = [1, 1, 1, 3, 5] ## Example 2 +arrInputList = [3, 3, 6, 4, 5] ## Example 2 + + +def IsSpecialQuadruplets(arrInput): + + n_a = arrInput[0] + n_b = arrInput[1] + n_c = arrInput[2] + n_d = arrInput[3] + + return (arrInputList[n_a] + arrInputList[n_b] + arrInputList[n_c] == arrInputList[n_d]) + + +arrIndxList = list(range(0, len(arrInputList))) +arrCombList = combinations(arrIndxList, 4) +arrOutputList = [] + +for loopComb in list(arrCombList): + if IsSpecialQuadruplets(loopComb): + arrOutputList.append(loopComb) + +print (len(arrOutputList)) diff --git a/challenge-203/eric-cheung/python/ch-2.py b/challenge-203/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..fedcb744a3 --- /dev/null +++ b/challenge-203/eric-cheung/python/ch-2.py @@ -0,0 +1,19 @@ + +## Remarks +## https://www.geeksforgeeks.org/python-copy-directory-structure-without-files/ + +import shutil +import os + + +## Define the Function to Ignore the Files If Present in Any Folder +def GetIgnoreFiles(strDir, strFiles): + return [strFileLoop for strFileLoop in strFiles if os.path.isfile(os.path.join(strDir, strFileLoop))] + + +strSourceFolderPath = "/a/b/c" +strTargetFolderPath = "/x/y" + + +## Calli the shutil.copytree() method and Pass the strSourceFolderPath, strTargetFolderPath and Ignore Parameter +shutil.copytree(strSourceFolderPath, strTargetFolderPath, ignore = GetIgnoreFiles) diff --git a/challenge-203/laurent-rosenfeld/blog.txt b/challenge-203/laurent-rosenfeld/blog.txt new file mode 100644 index 0000000000..677e275bd4 --- /dev/null +++ b/challenge-203/laurent-rosenfeld/blog.txt @@ -0,0 +1 @@ +https://blogs.perl.org/users/laurent_r/2023/02/perl-weekly-challenge-203-special-quadruplets-and-copy-directory.html diff --git a/challenge-203/laurent-rosenfeld/perl/ch-1.pl b/challenge-203/laurent-rosenfeld/perl/ch-1.pl new file mode 100644 index 0000000000..9770d58fd8 --- /dev/null +++ b/challenge-203/laurent-rosenfeld/perl/ch-1.pl @@ -0,0 +1,24 @@ +use strict; +use warnings; +use feature "say"; + +sub find_quadruplets { + my $count = 0; + my $last = $#_; + for my $i (0..$last-3) { + for my $j ($i+1..$last-2) { + for my $k ($j+1..$last-1) { + my $target = $_[$i] + $_[$j] + $_[$k]; + $count += grep { $_ == $target } + @_[$k+1..$last]; + + } + } + } + return $count; +} + +for my $test ([<1 2 3 6>], [<1 1 1 3 5>], [<1 1 1 3 5 5>], + [<3 3 6 4 5>], [<3 3 6 12 21>], [<1 1 1 3 5 9>]) { + printf "%-15s -> %d\n", "@$test", find_quadruplets @$test; +} diff --git a/challenge-203/laurent-rosenfeld/perl/ch-2.pl b/challenge-203/laurent-rosenfeld/perl/ch-2.pl new file mode 100644 index 0000000000..62cc023a63 --- /dev/null +++ b/challenge-203/laurent-rosenfeld/perl/ch-2.pl @@ -0,0 +1,28 @@ +use strict; +use warnings; +use feature "say"; + +sub traverse_dir { + my ($code_f, $code_d, $path) = @_; + my @dir_entries = glob("$path/*"); + for my $entry (@dir_entries) { + $code_f->($entry) if -f $entry; + $code_d->($entry) and + traverse_dir($code_f, $code_d, $entry) + if -d $entry; + } +} + +sub create_size_code_ref { + my $total_size = 0; + return (sub { + my $file = shift; + my $size = -s $file; + $total_size += $size; + printf "%-15s -> %d\n", $file, $size,; + }, sub {return $total_size;}); +} +my $dir = shift; +my ($code_ref, $glob_size) = create_size_code_ref(); +traverse_dir ($code_ref, sub {1}, $dir); +say "Total size = ", $glob_size->(); diff --git a/challenge-203/laurent-rosenfeld/raku/ch-1.raku b/challenge-203/laurent-rosenfeld/raku/ch-1.raku new file mode 100644 index 0000000000..52df7b4dd5 --- /dev/null +++ b/challenge-203/laurent-rosenfeld/raku/ch-1.raku @@ -0,0 +1,19 @@ +sub find-quadruplets (@in) { + my $count = 0; + my $last = @in.end; + for 0..$last-3 -> $i { + for $i^..$last-2 -> $j { + for $j^..$last-1 -> $k { + my $target = [+] @in[$i, $j, $k]; + for $k^..$last -> $m { + $count++ if @in[$m] == $target; + } + } + } + } + return $count; +} +for <1 2 3 6>, <1 1 1 3 5>, <1 1 1 3 5 5>, <3 3 6 4 5>, + <3 3 6 12 21> -> @test { + say "@test[]".fmt("%-15s -> "), find-quadruplets @test; +} diff --git a/challenge-203/laurent-rosenfeld/raku/ch-2.raku b/challenge-203/laurent-rosenfeld/raku/ch-2.raku new file mode 100644 index 0000000000..d0be0b64df --- /dev/null +++ b/challenge-203/laurent-rosenfeld/raku/ch-2.raku @@ -0,0 +1,28 @@ +sub traverse_dir (&code_f, &code_d, $path) { + # my @dir_entries = dir("$path"); + for dir "$path" -> $entry { + next if $entry.l; # exclude symlinks + &code_f($entry) and next if $entry.f; + &code_d($entry) and + traverse_dir(&code_f, &code_d, $entry) + if $entry.d; + } +} +sub create_dir_code_ref ($target_path) { + return sub ($dir) { + my $dir_name = $dir.IO.basename; + my $new_dir = "$target_path/$dir_name"; + if $new_dir.IO.e { + note "Path $new_dir already exists. Omitted"; + return True; + } + mkdir $new_dir or die "Unable to create $new_dir $!"; + say "Created $new_dir from $dir."; + } +} +my ($source, $target) = './a/b/c', './x/y'; +die "No such directory." unless $source.IO.d; +mkdir ($target, 0o777) unless $target.IO.d; +my &code_ref_d = create_dir_code_ref $target; +my &code_ref_f = {True}; +traverse_dir &code_ref_f, &code_ref_d, $source; diff --git a/challenge-203/robert-dicicco/julia/ch-2.jl b/challenge-203/robert-dicicco/julia/ch-2.jl new file mode 100644 index 0000000000..db34323c1e --- /dev/null +++ b/challenge-203/robert-dicicco/julia/ch-2.jl @@ -0,0 +1,141 @@ +#!/usr/bin/env julia + +#= + +_________________________________________ + +AUTHOR: Robert DiCicco + +DATE : 2023-02-09 + +Challenge 203 Copy Directory ( Julia ) + +_________________________________________ + +=# + +using Printf + + + +startdir = pwd() + + + +@printf("startdir = %s\n",startdir) + +dirs = "a/b/c" + +target = "x/y" + +println("Creating source directory structure") + + + +for numdir in 1:5 + + dpath = dirs * "/" * ('0' + numdir) + + mkpath(dpath) + + println("\tcreated a/b/c") + +end + + + +cd(dirs) + + + +println("Creating source files") + +files = ["1/1.txt","2/2.txt","3/3.txt","5/5.txt"] + + + +for f in files + + @printf("\t%s/%s\n",dirs,f) + + outfile = open(f,"w") + + close(outfile) + +end + + + +println("Creating target directory structure") + + + +cd(startdir) + + + +fulldirpaths=filter(isdir,readdir(startdir * '/' * dirs,join=true)) + +dirnames=basename.(fulldirpaths) + + + +for outdir in dirnames + + dpath = target * '/' * outdir + + mkpath(dpath) + + @printf("\tcreating %s/%s\n",target,outdir) + +end + + + +#= + +_________________________________________ + +SAMPLE OUTPUT + +julia .\CopyDirectory.jl + +startdir = G:\Projects\Perl\Challenges + +Creating source directory structure + + created a/b/c + + created a/b/c + + created a/b/c + + created a/b/c + + created a/b/c + +Creating source files + + a/b/c/1/1.txt + + a/b/c/2/2.txt + + a/b/c/3/3.txt + + a/b/c/5/5.txt + +Creating target directory structure + + creating x/y/1 + + creating x/y/2 + + creating x/y/3 + + creating x/y/4 + + creating x/y/5 + +_________________________________________ + +=# diff --git a/challenge-203/robert-dicicco/perl/ch-2.pl b/challenge-203/robert-dicicco/perl/ch-2.pl new file mode 100644 index 0000000000..6863811b09 --- /dev/null +++ b/challenge-203/robert-dicicco/perl/ch-2.pl @@ -0,0 +1,137 @@ +# /usr/bin/env perl + +# AUTHOR: Robert DiCicco + +# DATE: 2023-02-08 + +# Challenge 203 Copy Directory ( Perl ) + +use strict; + +use warnings; + +use Path::Class; + +use File::Basename; + +use Cwd qw(cwd); + +use File::Path qw(make_path); + + + +my $startdir = cwd; # record our start point + +print "startdir = $startdir\n"; + + + +my $dirs = "a/b/c"; # source directory structure + +my $target = "x/y"; # target directory structure + + + +print "Creating source directory structure\n"; + + + +# creating directories 1..5 undex a/b/c/ + +make_path("$dirs/1","$dirs/2", "$dirs/3", "$dirs/4", "$dirs/5"); + +print "\tcreated a/b/c\n"; + + + +chdir $dirs; #"a/b/c/"; + + + +# creating source files + +print "Creating source files\n"; + +my @files = ("1/1.txt","2/2.txt","3/3.txt","5/5.txt"); + + + +for (@files) { + + open(F, ">>$_")||die("Cannot create file:".$!); + + print "\tcreated $_\n"; + + close(F); + +} + + + +chdir $startdir; + + + +my $dd = dir("a","b","c"); + +my @list = $dd->children; # get a list of all child dirs of a/b/c/ + + + + # and copy them to x/y/ + +print "Creating target directory structure\n"; + +for my $d (@list) { + + my $bn = basename($d); + + print "\tcreating $target/$bn\n"; + + mkdir("$target/$bn"); + +} + +print "complete"; + + + + + +=begin pod + +SAMPLE OUTPUT + +perl .\CopyDirectory.pl + +startdir = G:/Projects/Perl/Challenges + +Creating source directory structure + + created a/b/c + +Creating source files + + created 1/1.txt + + created 2/2.txt + + created 3/3.txt + + created 5/5.txt + +Creating target directory structure + + creating x/y/1 + + creating x/y/2 + + creating x/y/3 + + creating x/y/4 + + creating x/y/5 + +complete + +=cut diff --git a/challenge-203/robert-dicicco/raku/ch-2.raku b/challenge-203/robert-dicicco/raku/ch-2.raku new file mode 100644 index 0000000000..1cab731f07 --- /dev/null +++ b/challenge-203/robert-dicicco/raku/ch-2.raku @@ -0,0 +1,131 @@ +#/usr/bin/env perl + +#`{ + +AUTHOR: Robert DiCicco + +DATE : 2023-02-08 + +Challenge 203 Copy Directory ( Raku ) + +} + + + +use File::Find; + +#use IO::Spec::Unix; + + + +my $startdir = $*CWD; + +"startdir = $startdir".say; + +my $dirs = "a/b/c"; # source directory structure + +my $target = "x/y"; # target directory structure + + + +"Creating source directory structure".say; + + + +for (1..5) -> $numdir { + + mkdir ("$dirs/$numdir"); + +} + + + +"\tcreated a/b/c".say; + + + +chdir $dirs; + + + +"Creating source files".say; + +my @files = ("1/1.txt","2/2.txt","3/3.txt","5/5.txt"); + + + +for (@files) { + + my $fh = open "$_", :w; + + "\tcreated $_".say; + + close $fh; + +} + + + +chdir $startdir; + + + +"Creating target directory structure".say; + + + +my @list = find(dir => $dirs, type => 'dir'); + +for (@list) -> $dl { + + #my $test= $dl.basename; + + #mkdir "$target/$test"; + + mkdir "$target/" ~ $dl.basename; + + print "\tcreating $target/" ~ $dl.basename ~ "\n"; + +} + +"complete".say; + + + +#`{ + +SAMPLE OUTPUT + +raku .\CopyDirectory.rk + +startdir = G:\Projects\Perl\Challenges + +Creating source directory structure + + created a/b/c + +Creating source files + + created 1/1.txt + + created 2/2.txt + + created 3/3.txt + + created 5/5.txt + +Creating target directory structure + + creating x/y/1 + + creating x/y/2 + + creating x/y/3 + + creating x/y/4 + + creating x/y/5 + +complete + +} diff --git a/challenge-203/robert-dicicco/ruby/ch-2.rb b/challenge-203/robert-dicicco/ruby/ch-2.rb new file mode 100644 index 0000000000..c67c83391a --- /dev/null +++ b/challenge-203/robert-dicicco/ruby/ch-2.rb @@ -0,0 +1,129 @@ +#!/usr/bin/env ruby + +=begin + +_________________________________________ + +AUTHOR: Robert DiCicco + +DATE : 2023-02-09 + +Challenge 203 Copy Directory ( Ruby ) + +_________________________________________ + +=end + + + +require 'fileutils' + +require 'find' + + + +startdir = Dir.pwd + +puts("startdir = #{startdir}") + +dirs = "a/b/c" + +target = "x/y" + +puts("Creating source directory structure") + + + +for numdir in 1..5 do + + FileUtils.mkdir_p "#{dirs}/#{numdir}" + +end + + + +puts("\tcreated a/b/c") + +Dir.chdir(dirs) + + + +puts("Creating source files") + +files = ["1/1.txt","2/2.txt","3/3.txt","5/5.txt"] + + + +files.each do |f| + + puts("\t#{dirs}/#{f}") + + out_file = File.new("#{f}", "w") + + out_file.close + +end + + + +puts("Creating target directory structure") + +Dir.chdir("#{startdir}/#{dirs}") + +Find.find(".") do |path| + + next unless File.directory?(path) + + reg_x = /1|2|3|4|5|6|7|8|9/ + + outdir = "#{reg_x.match(File.basename(path))}" + + FileUtils.mkdir_p "#{startdir}/#{target}/#{outdir}" + + puts("\tcreating #{target}/#{outdir}") + +end + + + +=begin + +_________________________________________ + +SAMPLE OUTPUT + +ruby .\CopyDirectory.rb + +startdir = G:/Projects/Perl/Challenges + +Creating source directory structure + + created a/b/c + +Creating source files + + a/b/c/1/1.txt + + a/b/c/2/2.txt + + a/b/c/3/3.txt + + a/b/c/5/5.txt + +Creating target directory structure + + creating x/y/ + + creating x/y/1 + + creating x/y/2 + + creating x/y/3 + + creating x/y/4 + + creating x/y/5 + +_________________________________________ + +=end diff --git a/challenge-203/ulrich-rieke/haskell/ch-1.hs b/challenge-203/ulrich-rieke/haskell/ch-1.hs new file mode 100644 index 0000000000..ffa413f9d1 --- /dev/null +++ b/challenge-203/ulrich-rieke/haskell/ch-1.hs @@ -0,0 +1,29 @@ +module Challenge203 + where + +combinations :: Int -> [a] -> [[a]] +combinations 0 _ = [[]] +combinations n xs = [ xs !! i : x | i <- [0..(length xs ) - 1 ] , +x <- combinations (n - 1 ) ( drop ( i + 1 ) xs ) ] + +myCondition :: [Int] -> Bool +myCondition list = (sum $ init list ) == last list + +solution :: [Int] -> Int +solution = length . filter myCondition . combinations 4 + +keepAskingForInput :: IO [Int] +keepAskingForInput = do + putStrLn "Enter at least 4 integers, separated by blanks!" + numberstrings <- getLine + let strings = words numberstrings + if length strings >= 4 + then do + return $ map read strings + else do + keepAskingForInput + +main :: IO ( ) +main = do + numbers <- keepAskingForInput + print $ solution numbers diff --git a/challenge-203/ulrich-rieke/perl/ch-1.pl b/challenge-203/ulrich-rieke/perl/ch-1.pl new file mode 100644 index 0000000000..527a4d9caf --- /dev/null +++ b/challenge-203/ulrich-rieke/perl/ch-1.pl @@ -0,0 +1,23 @@ +#!/usr/bin/perl ; +use strict ; +use warnings ; +use feature 'say' ; +use Algorithm::Combinatorics qw ( combinations ) ; + +say "Please enter at least 4 integers , separated by blanks!" ; +my $line = ; +chomp $line ; +my @numbers = split( /\s/ , $line ) ; +my $specials = 0 ; +if ( scalar ( @numbers ) >= 4 ) { + my $iter = combinations( \@numbers , 4 ) ; + while ( my $p = $iter->next ) { + if ( $p->[0] + $p->[1] + $p->[2] == $p->[3] ) { + $specials++ ; + } + } + say $specials ; +} +else { + say "Enter at least 4 integers!" ; +} diff --git a/challenge-203/ulrich-rieke/raku/ch-1.raku b/challenge-203/ulrich-rieke/raku/ch-1.raku new file mode 100644 index 0000000000..90ca3de4e5 --- /dev/null +++ b/challenge-203/ulrich-rieke/raku/ch-1.raku @@ -0,0 +1,18 @@ +use v6 ; + +say "Enter at least 4 integers, separated by blanks!" ; +my $line = $*IN.get ; +my @numbers = $line.words.map( {.Int} ) ; +my $specials = 0 ; +if ( @numbers.elems >= 4 ) { + my @combis = @numbers.combinations( 4 ) ; + for @combis -> $combi { + if ( $combi[0] + $combi[1] + $combi[2] == $combi[3] ) { + $specials++ ; + } + } + say $specials ; +} +else { + say "Enter at least 4 integers!" ; +} diff --git a/challenge-203/ulrich-rieke/rust/ch-1.rs b/challenge-203/ulrich-rieke/rust/ch-1.rs new file mode 100644 index 0000000000..a3a2c17819 --- /dev/null +++ b/challenge-203/ulrich-rieke/rust/ch-1.rs @@ -0,0 +1,23 @@ +use std::io ; +use itertools::Itertools ; + +fn is_special( nums : &Vec ) -> bool { + nums[0] + nums[1] + nums[2] == nums[3] +} + +fn main() { + println!("Please enter at least 4 integers, separated by blanks!") ; + let mut inline : String = String::new( ) ; + io::stdin( ).read_line( &mut inline ).unwrap( ) ; + let entered_line : &str = &*inline ; + let numbers : Vec = entered_line.split_whitespace( ).map( + | s | s.trim( ).parse::( ).expect( "Could not parse!" )) + .collect( ) ; + let mut how_many : i32 = 0 ; + for v in numbers.into_iter( ).combinations( 4 ) { + if is_special( &v ) { + how_many += 1 ; + } + } + println!("{}" , how_many ) ; +}e diff --git a/members.json b/members.json index 37a9349f33..3b6a4f777f 100644 --- a/members.json +++ b/members.json @@ -25,6 +25,7 @@ "ash" : "Andrew Shitov", "athanasius" : "Athanasius", "aubrey-quarcoo" : "Aubrey Quarcoo", + "barroff" : "BarrOff", "baryshevs" : "Baryshev Sergey", "bejoy-mathews" : "Bejoy Mathews", "belmark-caday" : "Belmark Caday", @@ -41,6 +42,7 @@ "burkhard-nickels" : "Burkhard Nickels", "carlos-oliveira" : "Carlos Oliveira", "cheok-yin-fung" : "Cheok-Yin Fung", + "chicagoist" : "Chicagoist", "christian-jaeger" : "Christian Jaeger", "cliveholloway" : "Clive Holloway", "colin-crain" : "Colin Crain", diff --git a/stats/pwc-challenge-202.json b/stats/pwc-challenge-202.json new file mode 100644 index 0000000000..417bed8b69 --- /dev/null +++ b/stats/pwc-challenge-202.json @@ -0,0 +1,643 @@ +{ + "title" : { + "text" : "The Weekly Challenge - 202" + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + } + } + }, + "legend" : { + "enabled" : 0 + }, + "series" : [ + { + "data" : [ + { + "y" : 3, + "name" : "Adam Russell", + "drilldown" : "Adam Russell" + }, + { + "drilldown" : "Arne Sommer", + "y" : 3, + "name" : "Arne Sommer" + }, + { + "drilldown" : "Athanasius", + "name" : "Athanasius", + "y" : 4 + }, + { + "drilldown" : "Bob Lied", + "y" : 2, + "name" : "Bob Lied" + }, + { + "drilldown" : "Carlos Oliveira", + "y" : 2, + "name" : "Carlos Oliveira" + }, + { + "drilldown" : "Cheok-Yin Fung", + "y" : 1, + "name" : "Cheok-Yin Fung" + }, + { + "name" : "Colin Crain", + "y" : 3, + "drilldown" : "Colin Crain" + }, + { + "drilldown" : "Dave Jacoby", + "y" : 3, + "name" : "Dave Jacoby" + }, + { + "y" : 3, + "name" : "David Ferrone", + "drilldown" : "David Ferrone" + }, + { + "y" : 2, + "name" : "Duncan C. White", + "drilldown" : "Duncan C. White" + }, + { + "name" : "E. Choroba", + "y" : 2, + "drilldown" : "E. Choroba" + }, + { + "drilldown" : "Flavio Poletti", + "y" : 6, + "name" : "Flavio Poletti" + }, + { + "drilldown" : "Jaldhar H. Vyas", + "y" : 5, + "name" : "Jaldhar H. Vyas" + }, + { + "drilldown" : "James Smith", + "name" : "James Smith", + "y" : 3 + }, + { + "y" : 2, + "name" : "Jan Krnavek", + "drilldown" : "Jan Krnavek" + }, + { + "name" : "Jorg Sommrey", + "y" : 3, + "drilldown" : "Jorg Sommrey" + }, + { + "drilldown" : "Kjetil Skotheim", + "name" : "Kjetil Skotheim", + "y" : 1 + }, + { + "y" : 5, + "name" : "Laurent Rosenfeld", + "drilldown" : "Laurent Rosenfeld" + }, + { + "drilldown" : "Luca Ferrari", + "name" : "Luca Ferrari", + "y" : 8 + }, + { + "name" : "Mariano Spadaccini", + "y" : 2, + "drilldown" : "Mariano Spadaccini" + }, + { + "name" : "Mark Anderson", + "y" : 2, + "drilldown" : "Mark Anderson" + }, + { + "name" : "Marton Polgar", + "y" : 2, + "drilldown" : "Marton Polgar" + }, + { + "drilldown" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith", + "y" : 3 + }, + { + "drilldown" : "Pip Stuart", + "name" : "Pip Stuart", + "y" : 4 + }, + { + "drilldown" : "Robbie Hatley", + "y" : 3, + "name" : "Robbie Hatley" + }, + { + "drilldown" : "Robert DiCicco", + "y" : 2, + "name" : "Robert DiCicco" + }, + { + "drilldown" : "Robert Ransbottom", + "name" : "Robert Ransbottom", + "y" : 1 + }, + { + "drilldown" : "Roger Bell_West", + "name" : "Roger Bell_West", + "y" : 5 + }, + { + "name" : "Simon Green", + "y" : 3, + "drilldown" : "Simon Green" + }, + { + "drilldown" : "Solathian", + "y" : 1, + "name" : "Solathian" + }, + { + "drilldown" : "Thomas Kohler", + "name" : "Thomas Kohler", + "y" : 4 + }, + { + "y" : 4, + "name" : "Ulrich Rieke", + "drilldown" : "Ulrich Rieke" + }, + { + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan", + "y" : 3 + } + ], + "name" : "The Weekly Challenge - 202", + "colorByPoint" : 1 + } + ], + "tooltip" : { + "headerFormat" : "{series.name}
", + "pointFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1 + }, + "drilldown" : { + "series" : [ + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Adam Russell", + "id" : "Adam Russell" + }, + { + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Arne Sommer", + "name" : "Arne Sommer" + }, + { + "id" : "Athanasius", + "name" : "Athanasius", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ] + ], + "id" : "Bob Lied", + "name" : "Bob Lied" + }, + { + "id" : "Carlos Oliveira", + "name" : "Carlos Oliveira", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "name" : "Cheok-Yin Fung", + "id" : "Cheok-Yin Fung", + "data" : [ + [ + "Perl", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Colin Crain", + "name" : "Colin Crain" + }, + { + "name" : "Dave Jacoby", + "id" : "Dave Jacoby", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "David Ferrone", + "id" : "David Ferrone" + }, + { + "name" : "Duncan C. White", + "id" : "Duncan C. White", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "id" : "E. Choroba", + "name" : "E. Choroba", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "name" : "Flavio Poletti", + "id" : "Flavio Poletti", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 2 + ] + ] + }, + { + "id" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "James Smith", + "id" : "James Smith" + }, + { + "name" : "Jan Krnavek", + "id" : "Jan Krnavek", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey" + }, + { + "id" : "Kjetil Skotheim", + "name" : "Kjetil Skotheim", + "data" : [ + [ + "Perl", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld" + }, + { + "data" : [ + [ + "Raku", + 2 + ], + [ + "Blog", + 6 + ] + ], + "id" : "Luca Ferrari", + "name" : "Luca Ferrari" + }, + { + "id" : "Mariano Spadaccini", + "name" : "Mariano Spadaccini", + "data" : [ + [ + "Perl", + 2 + ] + ] + }, + { + "name" : "Mark Anderson", + "id" : "Mark Anderson", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "id" : "Marton Polgar", + "name" : "Marton Polgar", + "data" : [ + [ + "Raku", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "name" : "Peter Campbell Smith", + "id" : "Peter Campbell Smith" + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "name" : "Pip Stuart", + "id" : "Pip Stuart" + }, + { + "id" : "Robbie Hatley", + "name" : "Robbie Hatley", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "id" : "Robert DiCicco", + "name" : "Robert DiCicco", + "data" : [ + [ + "Perl", + 1 + ], + [ + "Raku", + 1 + ] + ] + }, + { + "data" : [ + [ + "Raku", + 1 + ] + ], + "name" : "Robert Ransbottom", + "id" : "Robert Ransbottom" + }, + { + "id" : "Roger Bell_West", + "name" : "Roger Bell_West", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ], + [ + "Blog", + 1 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ], + "id" : "Simon Green", + "name" : "Simon Green" + }, + { + "id" : "Solathian", + "name" : "Solathian", + "data" : [ + [ + "Perl", + 1 + ] + ] + }, + { + "name" : "Thomas Kohler", + "id" : "Thomas Kohler", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 2 + ] + ] + }, + { + "data" : [ + [ + "Perl", + 2 + ], + [ + "Raku", + 2 + ] + ], + "name" : "Ulrich Rieke", + "id" : "Ulrich Rieke" + }, + { + "id" : "W. Luis Mochan", + "name" : "W. Luis Mochan", + "data" : [ + [ + "Perl", + 2 + ], + [ + "Blog", + 1 + ] + ] + } + ] + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "subtitle" : { + "text" : "[Champions: 33] Last updated at 2023-02-13 06:01:42 GMT" + }, + "xAxis" : { + "type" : "category" + }, + "chart" : { + "type" : "column" + } +} diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 80e003de50..4f4472743c 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,47 +1,17 @@ { - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } - } - }, - "xAxis" : { - "type" : "category" - }, - "tooltip" : { - "followPointer" : 1, - "pointFormat" : "{point.name}: {point.y:f}
", - "headerFormat" : "{series.name}
" + "subtitle" : { + "text" : "[Champions: 30] Last updated at 2023-02-13 06:32:48 GMT" }, "title" : { - "text" : "The Weekly Challenge - 202" + "text" : "The Weekly Challenge - 203" }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } + "legend" : { + "enabled" : 0 }, "drilldown" : { "series" : [ { - "id" : "Adam Russell", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ], - "name" : "Adam Russell" - }, - { - "id" : "Arne Sommer", + "name" : "Arne Sommer", "data" : [ [ "Raku", @@ -52,10 +22,9 @@ 1 ] ], - "name" : "Arne Sommer" + "id" : "Arne Sommer" }, { - "name" : "Athanasius", "data" : [ [ "Perl", @@ -66,53 +35,61 @@ 2 ] ], + "name" : "Athanasius", "id" : "Athanasius" }, { - "id" : "Bob Lied", "data" : [ [ - "Perl", + "Raku", 2 ] ], - "name" : "Bob Lied" + "name" : "BarrOff", + "id" : "BarrOff" }, { + "id" : "Carlos Oliveira", + "name" : "Carlos Oliveira", "data" : [ [ "Perl", 2 ] - ], - "name" : "Carlos Oliveira", - "id" : "Carlos Oliveira" + ] }, { + "id" : "Cheok-Yin Fung", "name" : "Cheok-Yin Fung", "data" : [ [ "Perl", 1 ] - ], - "id" : "Cheok-Yin Fung" + ] }, { - "id" : "Colin Crain", + "id" : "Chicagoist", + "name" : "Chicagoist", "data" : [ [ "Perl", 2 - ], + ] + ] + }, + { + "data" : [ [ - "Blog", - 1 + "Perl", + 2 ] ], - "name" : "Colin Crain" + "name" : "Colin Crain", + "id" : "Colin Crain" }, { + "id" : "Dave Jacoby", "name" : "Dave Jacoby", "data" : [ [ @@ -123,53 +100,40 @@ "Blog", 1 ] - ], - "id" : "Dave Jacoby" + ] }, { "id" : "David Ferrone", + "name" : "David Ferrone", "data" : [ [ "Perl", 2 - ], - [ - "Blog", - 1 ] - ], - "name" : "David Ferrone" + ] }, { - "id" : "E. Choroba", + "name" : "Duncan C. White", "data" : [ [ "Perl", 2 ] ], - "name" : "E. Choroba" + "id" : "Duncan C. White" }, { + "name" : "E. Choroba", "data" : [ [ "Perl", 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 2 ] ], - "id" : "Flavio Poletti", - "name" : "Flavio Poletti" + "id" : "E. Choroba" }, { - "id" : "Jaldhar H. Vyas", + "name" : "Flavio Poletti", "data" : [ [ "Perl", @@ -181,13 +145,12 @@ ], [ "Blog", - 1 + 2 ] ], - "name" : "Jaldhar H. Vyas" + "id" : "Flavio Poletti" }, { - "id" : "James Smith", "data" : [ [ "Perl", @@ -198,33 +161,42 @@ 1 ] ], - "name" : "James Smith" + "name" : "James Smith", + "id" : "James Smith" }, { + "name" : "Jan Krnavek", "data" : [ [ "Raku", 2 ] ], - "name" : "Jan Krnavek", "id" : "Jan Krnavek" }, { - "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey", "data" : [ [ "Perl", 2 - ], + ] + ], + "id" : "Jorg Sommrey" + }, + { + "id" : "Kjetil Skotheim", + "data" : [ [ - "Blog", - 1 + "Perl", + 2 ] ], - "name" : "Jorg Sommrey" + "name" : "Kjetil Skotheim" }, { + "id" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", "data" : [ [ "Perl", @@ -238,12 +210,9 @@ "Blog", 1 ] - ], - "id" : "Laurent Rosenfeld", - "name" : "Laurent Rosenfeld" + ] }, { - "name" : "Luca Ferrari", "data" : [ [ "Raku", @@ -254,6 +223,7 @@ 6 ] ], + "name" : "Luca Ferrari", "id" : "Luca Ferrari" }, { @@ -267,25 +237,15 @@ "id" : "Mariano Spadaccini" }, { - "name" : "Mark Anderson", "data" : [ [ "Raku", 2 ] ], + "name" : "Mark Anderson", "id" : "Mark Anderson" }, - { - "data" : [ - [ - "Raku", - 2 - ] - ], - "name" : "Marton Polgar", - "id" : "Marton Polgar" - }, { "name" : "Peter Campbell Smith", "data" : [ @@ -329,6 +289,7 @@ "name" : "Robbie Hatley" }, { + "name" : "Robert DiCicco", "data" : [ [ "Perl", @@ -339,20 +300,21 @@ 1 ] ], - "name" : "Robert DiCicco", "id" : "Robert DiCicco" }, { "data" : [ [ "Raku", - 1 + 2 ] ], "name" : "Robert Ransbottom", "id" : "Robert Ransbottom" }, { + "id" : "Roger Bell_West", + "name" : "Roger Bell_West", "data" : [ [ "Perl", @@ -366,32 +328,16 @@ "Blog", 1 ] - ], - "id" : "Roger Bell_West", - "name" : "Roger Bell_West" + ] }, { "data" : [ [ "Perl", 2 - ], - [ - "Blog", - 1 ] ], - "id" : "Simon Green", - "name" : "Simon Green" - }, - { "name" : "Solathian", - "data" : [ - [ - "Perl", - 1 - ] - ], "id" : "Solathian" }, { @@ -412,17 +358,18 @@ "data" : [ [ "Perl", - 2 + 1 ], [ "Raku", - 2 + 1 ] ], "name" : "Ulrich Rieke", "id" : "Ulrich Rieke" }, { + "name" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -433,7 +380,6 @@ 1 ] ], - "name" : "W. Luis Mochan", "id" : "W. Luis Mochan" } ] @@ -441,30 +387,46 @@ "chart" : { "type" : "column" }, + "xAxis" : { + "type" : "category" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "tooltip" : { + "headerFormat" : "{series.name}
", + "pointFormat" : "{point.name}: {point.y:f}
", + "followPointer" : 1 + }, + "plotOptions" : { + "series" : { + "borderWidth" : 0, + "dataLabels" : { + "format" : "{point.y}", + "enabled" : 1 + } + } + }, "series" : [ { - "colorByPoint" : 1, - "name" : "The Weekly Challenge - 202", + "name" : "The Weekly Challenge - 203", "data" : [ { - "drilldown" : "Adam Russell", + "name" : "Arne Sommer", "y" : 3, - "name" : "Adam Russell" - }, - { - "y" : 3, - "drilldown" : "Arne Sommer", - "name" : "Arne Sommer" + "drilldown" : "Arne Sommer" }, { "name" : "Athanasius", - "drilldown" : "Athanasius", - "y" : 4 + "y" : 4, + "drilldown" : "Athanasius" }, { - "drilldown" : "Bob Lied", + "drilldown" : "BarrOff", "y" : 2, - "name" : "Bob Lied" + "name" : "BarrOff" }, { "y" : 2, @@ -472,13 +434,18 @@ "name" : "Carlos Oliveira" }, { + "name" : "Cheok-Yin Fung", "y" : 1, - "drilldown" : "Cheok-Yin Fung", - "name" : "Cheok-Yin Fung" + "drilldown" : "Cheok-Yin Fung" + }, + { + "name" : "Chicagoist", + "drilldown" : "Chicagoist", + "y" : 2 }, { "drilldown" : "Colin Crain", - "y" : 3, + "y" : 2, "name" : "Colin Crain" }, { @@ -487,14 +454,19 @@ "y" : 3 }, { - "y" : 3, + "name" : "David Ferrone", "drilldown" : "David Ferrone", - "name" : "David Ferrone" + "y" : 2 + }, + { + "name" : "Duncan C. White", + "y" : 2, + "drilldown" : "Duncan C. White" }, { - "drilldown" : "E. Choroba", + "name" : "E. Choroba", "y" : 2, - "name" : "E. Choroba" + "drilldown" : "E. Choroba" }, { "name" : "Flavio Poletti", @@ -502,54 +474,49 @@ "y" : 6 }, { - "y" : 5, - "drilldown" : "Jaldhar H. Vyas", - "name" : "Jaldhar H. Vyas" + "name" : "James Smith", + "drilldown" : "James Smith", + "y" : 3 }, { - "drilldown" : "James Smith", - "y" : 3, - "name" : "James Smith" + "y" : 2, + "drilldown" : "Jan Krnavek", + "name" : "Jan Krnavek" }, { - "name" : "Jan Krnavek", + "name" : "Jorg Sommrey", "y" : 2, - "drilldown" : "Jan Krnavek" + "drilldown" : "Jorg Sommrey" }, { - "y" : 3, - "drilldown" : "Jorg Sommrey", - "name" : "Jorg Sommrey" + "drilldown" : "Kjetil Skotheim", + "y" : 2, + "name" : "Kjetil Skotheim" }, { - "name" : "Laurent Rosenfeld", + "drilldown" : "Laurent Rosenfeld", "y" : 5, - "drilldown" : "Laurent Rosenfeld" + "name" : "Laurent Rosenfeld" }, { "name" : "Luca Ferrari", - "drilldown" : "Luca Ferrari", - "y" : 8 + "y" : 8, + "drilldown" : "Luca Ferrari" }, { - "drilldown" : "Mariano Spadaccini", "y" : 2, + "drilldown" : "Mariano Spadaccini", "name" : "Mariano Spadaccini" }, { "name" : "Mark Anderson", - "drilldown" : "Mark Anderson", - "y" : 2 - }, - { - "name" : "Marton Polgar", "y" : 2, - "drilldown" : "Marton Polgar" + "drilldown" : "Mark Anderson" }, { - "name" : "Peter Campbell Smith", "y" : 3, - "drilldown" : "Peter Campbell Smith" + "drilldown" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith" }, { "name" : "Pip Stuart", @@ -562,52 +529,42 @@ "y" : 3 }, { - "y" : 2, "drilldown" : "Robert DiCicco", + "y" : 2, "name" : "Robert DiCicco" }, { - "name" : "Robert Ransbottom", - "y" : 1, - "drilldown" : "Robert Ransbottom" + "y" : 2, + "drilldown" : "Robert Ransbottom", + "name" : "Robert Ransbottom" }, { - "name" : "Roger Bell_West", "drilldown" : "Roger Bell_West", - "y" : 5 - }, - { - "y" : 3, - "drilldown" : "Simon Green", - "name" : "Simon Green" + "y" : 5, + "name" : "Roger Bell_West" }, { + "name" : "Solathian", "drilldown" : "Solathian", - "y" : 1, - "name" : "Solathian" + "y" : 2 }, { - "name" : "Thomas Kohler", "drilldown" : "Thomas Kohler", - "y" : 4 + "y" : 4, + "name" : "Thomas Kohler" }, { "name" : "Ulrich Rieke", - "drilldown" : "Ulrich Rieke", - "y" : 4 + "y" : 2, + "drilldown" : "Ulrich Rieke" }, { "name" : "W. Luis Mochan", - "drilldown" : "W. Luis Mochan", - "y" : 3 + "y" : 3, + "drilldown" : "W. Luis Mochan" } - ] + ], + "colorByPoint" : 1 } - ], - "subtitle" : { - "text" : "[Champions: 31] Last updated at 2023-02-06 01:48:48 GMT" - }, - "legend" : { - "enabled" : 0 - } + ] } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index 33bf31d3b4..13c02f6d78 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,61 +1,61 @@ { - "title" : { - "text" : "The Weekly Challenge Contributions [2019 - 2023]" - }, - "yAxis" : { - "min" : 0, - "title" : { - "text" : null - } + "legend" : { + "enabled" : "false" }, - "xAxis" : { - "labels" : { - "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" - } - }, - "type" : "category" + "subtitle" : { + "text" : "Last updated at 2023-02-13 06:32:48 GMT" }, - "tooltip" : { - "pointFormat" : "{point.y:.0f}" + "title" : { + "text" : "The Weekly Challenge Contributions [2019 - 2023]" }, "series" : [ { - "dataLabels" : { - "style" : { - "fontSize" : "13px", - "fontFamily" : "Verdana, sans-serif" - }, - "y"