Content Security Policy Issue

After removing 'unsafe-eval ' from our CSP directive ,  we are facing the following issue for pages where Brightcove Video player
component is configured --
Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script .
We are using Brightcove 6.1.3-cloud AEM Connector .
Source is shown in below screenshots ->

Could you please look into all possible CSP issues with Brightcove - AEM connector and provide solution ASAP ?

@hngrylobster , could you please take a look on this issue ?

@RKcrbgf I have fixed this and is in the latest release 6.1.4(Cloud) https://github.com/brightcove/Adobe-AEM-Brightcove-Connector/releases/tag/6.1.4

Thank you @dcolvin  for the fix . 👍


Minesweeper - complete features

Hi,
Thanks very much for this project, it is very useful for jump starting PyQt development :)
I found the Minesweeper game particularly interesting and decided to complete it's features. I thought I would share it here as a PR in case you would like these improvements in your repo for others to learn from / make this example game more enjoyable - I will totally understand if it is out of the project scope and you reject it, I wasn't sure if it was intentionally half finished so people could do exactly what I just did as a fun way to experiment or learn or because the example in its current state is perfect for demonstrating how to create Qt apps from Python. Apologies if this project goal is mentioned somewhere but I missed it.
Anyway, the changes I have made are, in no particular order:

allow right clicking on a flagged cell to unflag it
when flagging, reduce the number of remaining mines shown in the counter widget
when unflagging, increase the number of remaining mines shown in the counter widget
when revealing a mine and losing the game, mark the mine that caused game over in a different color
when losing the game, show which flags were incorrect and keep those that were correct visible
when right clicking on a revealed cell, intelligently reveal the cells around if the number of adjacent mines matches the number of adjacent flags (a feature Windows 95's "winmine" has)
evaluate the winning conditions - when all the cells except the mines have been revealed
use a common generator function to deduplicate some code and only evaluate the minimum number of cells necessary for the new logic
set the window title
allow the user to specify the difficulty level (0, 1 or 2) in the command line arguments to expose the otherwise hidden functionality

Hi @keith-hall — just going through this repo again and found this PR! This is awesome, nice work! :)
The target when writing the apps was "completely functional but incomplete" to leave some room for experimentation. I might still merge some of the changes (fixes/etc.) ...but either way it's great to see what it's inspired you to do.
I'm going to link this PR from the article to share it more widely.
Thanks again!


Revamped buttons styling

Let's make the gradient a bit smoother and perhaps include some nice strokes and hard shadows to make it more attractive
To do

[ ] research how problematic could be implementing a gradient stroke in the buttons
[ ] refine final colors
[ ] prepare handoff
[ ] implement in the extension

Hey @xamanyy, this is for now design work that I assigned to myself but feel free to propose your propositions here


update xenserver guest tools for jammy stemcell

This PR implements jammy compatibility for stemcells using xenserver hypervisor.
Since the package xe-guest-utilities is no longer available in apt for jammy steamline, Xenserver guest utilities should now be compiled from source.
The PR also includes a copy the Citrix license as required when redistributing xen-guest-utilities binaries.

as we don't have the option to actually test this as we don't have a cloudstack account for testing.
i trust you that you tested this.
the only thing i don't like is the specific commit for golang.org/x/sys
is it possible to correct this to an actual version? v0.2.0 seems to be the latest now

Thanks.
Indeed, this has been tested on our staging environments and made of bosh, cf, concourse and prometheus deployments with cloudstack 4.16.x TLS.  The updated version of xe-guest-utilities works as intended on Citrix XenServer and its opensource version XCP-ng.
For golang.org/x/sys, I ended up reworking the compilation directory tree. xe-guest-utilities has a very non-standard makefile based compilation process which is kinda hard to understand. In the end, I only need to vendor dependencies, the golang.org/x/sys version specified in go.mod is used.
I'm marking the PR as WIP until I can validate that everything builds fine.

everyting is ok !

Thanks! @psycofdj


[production] In-progress edits in Project Description lost

Steps

Click on a project's description to edit it, and begin typing
Highlight something on the wiki to copy+paste it into the description
The text you typed in the description box is lost, even though you have not clicked the "x"

Expected
The text you typed would remain unless you click "x" to revert to the last saved version
Actual
In-progress text is lost.
Reported by a user on the help desk.

Closed


python3Packages.pyezviz: <IP_ADDRESS> -> <IP_ADDRESS>

Motivation for this change
Update to latest upstream release <IP_ADDRESS>
Change log:

https://github.com/BaQs/pyEzviz/releases/tag/<IP_ADDRESS>
https://github.com/BaQs/pyEzviz/releases/tag/<IP_ADDRESS>

Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 134290 run on x86_64-linux 1

3 packages built:

home-assistant
python38Packages.pyezviz
python39Packages.pyezviz


A heading fails to parse correctly

See the example in the MyST sandmob here: https://mystmd.org/sandbox?tab=demo&myst=YABhAHIAdABpAGMAbABlAC4AKABtAGQALwBxAG0AZAApAGAACgA6ACAAVABoAGkAcwAgAG0AYQByAGsAZABvAHcAbgAgAGYAaQBsAGUAIABhAHQAIAB0AGgAZQAgAHIAbwBvAHQAIABvAGYAIAB0AGgAZQAgAHIAZQBwAG8AcwBpAHQAbwByAHkAIABpAHMAIAB0AGgAZQAgAG0AYQBpAG4AIABtAGEAbgB1AHMAYwByAGkAcAB0ACAAdABoAGEAdAAgAHIAZQBmAGUAcgBlAG4AYwBlAHMAIABhAG4AZAAgAGwAaQBuAGsAcwAgAHQAbwAgAHQAaABlACAAbwB0AGgAZQByACAAbgBvAHQAZQBiAG8AbwBrAHMAIABpAG4AIAB0AGgAZQAgAHIAZQBwAG8AcwBpAHQAbwByAHkALgAgAFQAaABlACAAZgBpAGwAZQBuAGEAbQBlACAAaQBzACAAbgBvAHQAIABmAGkAeABlAGQALAAgAGIAdQB0ACAAaQBmACAAYwBoAGEAbgBnAGUAZAAgAHQAaABlACAAYwBvAG4AZgBpAGcAdQByAGEAdABpAG8AbgAgAGYAaQBsAGUAcwAgAGYAbwByACAAdABoAGUAIABhAHUAdABoAG8AcgBpAG4AZwAgAHQAbwBvAGwAIABzAGgAbwB1AGwAZAAgAGIAZQAgAHUAcABkAGEAdABlAGQAIABhAHAAcAByAG8AcAByAGkAYQB0AGUAbAB5AC4ACgAKACMAIwAjAKAATgBlAHgAdAAgAFMAdABlAHAAcwAKAA%3D%3D

This snippet was written in VS Code and copied into the sandbox, if we delete the whitespace character between the pound sign and the letter N then the heading parses properly.
There is a strange whitespace character not being parsed as expected? this is difficult to reproduce but appears inexplicable and difficult to get out of when it does occur.

ok it appears it's nothing to do with the defintion list https://mystmd.org/sandbox?tab=demo&myst=IwAjACMAoABOAGUAeAB0ACAAUwB0AGUAcABzAA%3D%3D

This looks like a no-break space, which can happen on Alt-Space in a mac. It is annoying that vscode doesn't highlight the space as a different whitespace character. We are using no-break-spaces in latex, which convert to a ~.
The vscode renderer and GFM do not recognize this as a heading either, so I am tempted to close!


Whitelisting is not working

I use this mod with Ice and Fire Fabric.
I added iceandfire to whitelist

but dragons still lagging
Video: https://drive.google.com/file/d/1Ckdit7SSB0BB0h3R8-aCWBkGtSoFNLQW/view?usp=sharing

Btw I added minecraft:lightning_bolt and it worked for lightning

Btw I added minecraft:lightning_bolt and it worked for lightning

Well, it doesn't work for me. Latest 1.20.1 Forge version.

I also experience the whitelist to not work.
Minecraft 1.20.1
Forge 47.3.22
Does It Tick? 1.0.0 (does_it_tick-forge-1.0.0-1.20.1)
with default generated config file, containing EntitiesWhitelist = ["minecraft:ender_dragon", ...
No other mods installed.
How to reproduce erroneous behavior:

/locate structure minecraft:stronghold
Teleport to the suggested location
Go to The End

Ender Dragon is frozen in the air and does only activate when you get very close to it. This is game breaking behavior.


Fresh install fails since chart v0.77.0

What happened?
Description
Initial helm install fails since chart v0.77.0.
Steps to Reproduce
helm install splunk-collector splunk-otel-collector-chart/splunk-otel-collector -f values.yaml --version 0.77.0

Expected Result
helm install should succeed.
Actual Result
Fails secret validation due to missing serviceAccount.
Chart version
0.77.0+
Environment information
Environment
Cloud: EKS + vanilla Kubernetes
k8s version: 1.25
Chart configuration
agent:
  controlPlaneMetrics:
    apiserver:
      enabled: false
    controllerManager:
      enabled: false
    coredns:
      enabled: false
    etcd:
      enabled: false
    proxy:
      enabled: false
    scheduler:
      enabled: false
  enabled: true
  resources:
    limits:
      cpu: 1
      memory: 500Mi
    requests:
      cpu: 250m
      memory: 500Mi
certmanager:
  enabled: false
  installCRDs: false
clusterName: cluster-name
clusterReceiver:
  enabled: false
environment: dev
extraAttributes:
  fromAnnotations:
  - from: namespace
    key_regex: (example.net/.*)
    tag_name: $$1
  - from: pod
    key_regex: (example.net/.*)
    tag_name: $$1
  fromLabels:
  - from: namespace
    key_regex: (example.net/.*)
    tag_name: $$1
  - from: pod
    key_regex: (example.net/.*)
    tag_name: $$1
logsCollection:
  containers:
    enabled: true
    useSplunkIncludeAnnotation: true
logsEngine: otel
secret:
  create: false
  name: splunk-otel-collector
serviceAccount:
  create: true
  name: splunk-collector
splunkPlatform:
  endpoint: https://http-inputs-obfuscated.splunkcloud.com/services/collector
  index: kubernetes_logs
  logsEnabled: true
  metricsEnabled: false
  tracesEnabled: false

Log output
Error: INSTALLATION FAILED: failed pre-install: warning: Hook pre-install splunk-otel-collector/templates/secret-splunk-validation-hook.yaml failed: pods "splunk-collector-splunk-otel-collector-validate-secret" is forbidden: error looking up service account splunk/splunk-collector: serviceaccount "splunk-collector" not found

Additional context
https://github.com/signalfx/splunk-otel-collector-chart/pull/781 is likely the culprit.

The fix for this will be available in the chart release after v0.82.0.

@jvoravong Is there a release date for when the fix will be available?  Thank you.

https://github.com/signalfx/splunk-otel-collector-chart/releases/tag/splunk-otel-collector-0.83.0

Confirmed as functional, thank you for the quick turn around @jvoravong, much appreciated!


Add counter to onError trigger to break possible loops

#minor
Description
This PR adds a counter in the loop that executes the onError trigger to detect and break possible infinite loops when there's an error inside the onError handler.
It also includes a new property to the onError, to make the limit of executions configurable for the users (default value: 10).
Specific Changes

Added ExecutionLimit property to the onError trigger and read it in the override of the ExecuteAsync method.
Updated InternalRunAsync in DialogExtensions to evaluate the execution limit property and break the loop in case of detecting one.
Added ExecutionLimit property to TurnPath to be able to store the value in memory.
Updated Microsoft.OnError.schema and  Microsoft.OnError.uischema to include the new property.
Added 2 unit tests in ConditionalTests to cover the new functionality.

Testing
These images show the scenarios we tested with the new implementation.

Pull Request Test Coverage Report for Build 387980
Details

0 of 0   changed or added relevant lines in 0 files are covered.
6 unchanged lines in 3 files lost coverage.
Overall coverage increased (+0.005%) to 78.177%

Files with Coverage Reduction
New Missed Lines
%

/libraries/Microsoft.Bot.Builder.Dialogs/Memory/TurnPath.cs
1
0.0%

/libraries/Microsoft.Bot.Streaming/Payloads/StreamManager.cs
1
90.0%

/libraries/Microsoft.Bot.Builder.Dialogs/DialogExtensions.cs
4
95.29%

Totals

Change from base Build 387708:
0.005%

Covered Lines:
26198

Relevant Lines:
33511

💛  - Coveralls

:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.Dialogs.dll


Enhancement of the STL10 loader

Closes #167
This PR adds the possibility to use the standard procedure for evaluating a model on STL-10. It simply loads one of the 10 pre-defined folds included in the original tar-file and retains the corresponding data from the training set.
It should be consistent with the previous dataloader, as if no fold is specified, it possibly loads the whole training set (and then leads to an erroneous validation error)

Codecov Report

Merging #914 into master will decrease coverage by 0.06%.
The diff coverage is 21.42%.

@@            Coverage Diff             @@
##           master     #914      +/-   ##
==========================================
- Coverage    57.9%   57.83%   -0.07%
==========================================
  Files          46       46
  Lines        3696     3709      +13
  Branches      561      563       +2
==========================================
+ Hits         2140     2145       +5
- Misses       1429     1439      +10
+ Partials      127      125       -2

Impacted Files
Coverage Δ

torchvision/datasets/stl10.py
27.5% <21.42%> (-2.36%)
:arrow_down:

torchvision/datasets/imagenet.py
21.55% <0%> (ø)
:arrow_up:

torchvision/transforms/transforms.py
82.54% <0%> (+0.64%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b384c4e...8231a9a. Read the comment docs.


Calculate Age Project: Modularize Code and Fix Input Handling

Type of change

[x] Added new project
[x] Bug fix
[x] New features
[x] Enhanced documentation

Changes proposed in this pull request

Project name :

Calculate Age

Short description :

The Calculate Age project takes input from the user including their name and age, and calculates the user's age in years, months, and days, taking leap years into consideration based on the current date.
Checklist

[x] The code is Python 3 compatible
[x] I have added relevant comments in my file to make code understandable
[x] I have added my project in a folder which includes all the necessary files

This PR addresses the following issues:

exception handling problem #731
Code Modularization #733

There is one unwanted file called feature-branch.diff

Hi @Mrinank-Bhowmick I remove that file!!

Awesome work 🚀


Invoker fails to deploy on Mac Catalina

Having trouble deploying the invoker on Mac Catalina using Docker for Mac. During determine docker root dir, I get "stderr": "nc: invalid option -- U\nTry nc --help' for more information.". Seems the -U flag does not exist in the version of netcat that is installed.
$ nc --version
netcat (The GNU Netcat) 0.7.1

$ nc --help
GNU netcat 0.7.1, a rewrite of the famous networking tool.
Basic usages:
connect to somewhere:  nc [options] hostname port [port] ...
listen for inbound:    nc -l -p port [options] [hostname] [port] ...
tunnel to somewhere:   nc -L hostname:port -p port [options]

Mandatory arguments to long options are mandatory for short options too.
Options:
  -c, --close                close connection on EOF from stdin
  -e, --exec=PROGRAM         program to exec after connect
  -g, --gateway=LIST         source-routing hop point[s], up to 8
  -G, --pointer=NUM          source-routing pointer: 4, 8, 12, ...
  -h, --help                 display this help and exit
  -i, --interval=SECS        delay interval for lines sent, ports scanned
  -l, --listen               listen mode, for inbound connects
  -L, --tunnel=ADDRESS:PORT  forward local port to remote address
  -n, --dont-resolve         numeric-only IP addresses, no DNS
  -o, --output=FILE          output hexdump traffic to FILE (implies -x)
  -p, --local-port=NUM       local port number
  -r, --randomize            randomize local and remote ports
  -s, --source=ADDRESS       local source address (ip or hostname)
  -t, --tcp                  TCP mode (default)
  -T, --telnet               answer using TELNET negotiation
  -u, --udp                  UDP mode
  -v, --verbose              verbose (use twice to be more verbose)
  -V, --version              output version information and exit
  -x, --hexdump              hexdump incoming and outgoing traffic
  -w, --wait=SECS            timeout for connects and final net reads
  -z, --zero                 zero-I/O mode (used for scanning)

Remote port number can also be specified as range.  Example: '1-1024'

Figured out a workaround. I had to install the nmap version of ncat via brew install nmap. After that I had to change nc to ncat in the determine docker root dir task.

Thanks @dubee. This is good to know.

can you pr this change?

I deployed with ansible on catalina without this workaround. Perhaps things have improved since this issue was opened.


alpine 3.18 Docker build fail

What happened?
sorry, I had to ask again, I've spent a few hours with no success. Now the error is related to php_variables.h, but i installed php82 php82-dev and verified that php82-dev has the headerfile in question
when i have more time i will install alpine and try to see what exactly is going on.
alpine:php82-dev
caddy community thread
Build Type
Docker (Alpine)
Worker Mode
No
Operating System
GNU/Linux
CPU Architecture
x86_64 alpine guest on
Linux redbloom 5.15.0-100-generic #\110-Ubuntu SMP Wed Feb 7 13:27:48 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Dockerfile
n/a, but here's the docker file.

#syntax=docker/dockerfile:1
FROM caddy:2.7.6-builder-alpine AS builder
RUN apk --no-cache add make git gcc libtool musl-dev ca-certificates dumb-init
RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.19/community" | tee -a /etc/apk/repositories
RUN apk update
RUN apk --no-cache add php82 php82-dev
WORKDIR /src
ENV CGO_ENABLED=1
ENV XCADDY_GO_BUILD_FLAGS="-ldflags '-w -s'"
RUN xcaddy build v2.7.6 --with github.com/abiosoft/caddy-exec \
--with github.com/dunglas/frankenphp/caddy \
--with github.com/baldinof/caddy-supervisor \
--with github.com/caddyserver/cache-handler \
--with<EMAIL_ADDRESS>\
--with github.com/greenpau/caddy-git \
--with github.com/Elegant996/scgi-transport \
--with github.com/mholt/caddy-l4 \
--with github.com/caddy-dns/cloudflare \
--with github.com/greenpau/caddy-security \
--with github.com/greenpau/caddy-trace \
--with github.com/caddyserver/jsonc-adapter \
--with<EMAIL_ADDRESS>\
--with github.com/hslatman/caddy-crowdsec-bouncer \
--with github.com/caddyserver/transform-encoder \
--with github.com/dunglas/mercure/caddy \
--with github.com/dunglas/vulcain/caddy
FROM caddy:2.7.6
COPY --from=builder /src/caddy /usr/bin/caddy
RUN

### Relevant log output

```shell
=> => # 2024/03/10 20:06:17 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /src/caddy -ldflags -w -s
 => => # # github.com/dunglas/frankenphp
 => => # /go/pkg/mod/github.com/dunglas/frankenphp@v1.1.0/frankenphp.go:30:11: fatal error: php_variables.h: No such file or directory
 => => #    30 | // #include <php_variables.h>
 => => #       |           ^~~~~~~~~~~~~~~~~
 => => # compilation terminated.

https://github.com/dunglas/frankenphp/issues/641

I need to redo this with frankenphp dockerfile base.


Encrypt file using sops using a key store in Azure Vault

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az account get-access-token
Errors:
Get Token request returned http error: 400 and server response: {"error":"invalid_resource","error_description":"AADSTS500011: The resource principal named https://vault.azure.net was not found in the tenant named [TENTANT_ID]. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant.
Traceback (most recent call last):
...

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

az cloud set -n AzureChinaCloud - this doesn't seem to make a difference but is suppose to change the CLI to know its using China Cloud
Have a key vault created and a key inside with encrypt and decrypt permission
sops --encrypt --azure-kv https://[VAULT_NAME].vault.azure.cn/keys/[KEY_NAME] secrets.yaml

Expected Behavior
Instead of authorization using https://vault.azure.net it uses *.azure.cn so that it can find the correct tenant
Environment Summary
Linux-3.10.0-1062.4.3.el7.x86_64-x86_64-with-centos-7.9.2009-Core
Python 3.6.8
Installer: RPM

azure-cli 2.18.0

Additional Context

Account

Account

@Shaun-Harrison  The reason why failed to invoke China Azure Key Vault is caused by the limitation of sops tool as when SOPS invokes Azure key vault the internal SOPS will invoke the ip address of Global azure key vault by default and at the meantime the HELP inside sops tool does not have the functions which is similar to switching the environment of Azure Cloud( switch the account between domestic and global)..

Hi @Ethan-LF - so there is nothing you can do at this time for this issue?
I have opened an issue with SOPS about this, but not had a reply yet https://github.com/mozilla/sops/issues/809
Is there another way of being able to encrypt & decrypt secrets in a similar way that you can suggest?

Hi Shaun, I regret to inform you that we will not be able to invoke China azure key vault by using the sops tool , I do not found a better tool that similar to SOPS. Can you try it in the SDK way？Please see the details:
https://stackoverflow.com/questions/61966417/using-key-by-azure-key-vault-to-encrypt-and-decrypt-text

@Ethan-LF,

... when SOPS invokes Azure key vault the internal SOPS will invoke the ip address of Global azure key vault by default ...

This issue actually doesn't have anything to do with IP addresses. Key Vaults in AzureChinaCloud and AzureCloud have different IPs resolved by DNS servers.
Key Vault is not a pre-defined --resource-type
> az account get-access-token --help
...
Arguments
    --resource         : Azure resource endpoints. Default to Azure Resource Manager.
    --resource-type    : Type of well-known resource.  Allowed values: aad-graph, arm, batch, data-
                         lake, media, ms-graph, oss-rdbms.

It should be provided as a URL directly via --resource, like https://vault.azure.net, so it won't change according to the selected cloud (via az cloud set).
As described in Key Vault Authentication,

Key Vault SDK clients for secrets, certificates, and keys in the first call to Key Vault do not provide an access token to retrieve tenant information. It’s expected to receive an HTTP 401 using Key Vault SDK client where the Key Vault shows to the application the WWW-Authenticate header containing the resource and the tenant where it needs to go and ask for the token. If everything is configured correctly, the second call from the application to Key Vault will contain a valid token and will succeed.

the client (SOPS) should get the resource for authentication from WWW-Authenticate header of the 401 response
401 Not Authorized
WWW-Authenticate: Bearer authorization="…", resource="…"
                                            ^^^^^^^^^^^^

instead of calling az account get-access-token directly with --resource https://vault.azure.net, as https://vault.azure.net is the resource for Key Vault in AzureCloud and will certainly fail in AzureChinaCloud.

@yonzhan @houk-ms any news regarding the fix?
I'm trying to find a workaround but couldn't find any.

@romeomorcia-wipro, Thank you for the SOPS solution.

@yonzhan @houk-ms @jiasli any news regarding the fix?

This is never an Azure CLI issue as I explained in https://github.com/Azure/azure-cli/issues/16729#issuecomment-772179264.
You may reach out to SOPS and instruct them to follow the standard Key Vault's WWW-Authenticate challenge protocol instead.


Create 2021 contribution sticker

Let me know when it will be done so I can pay the artist and send them to print :)

Who is in charge of that? Could we ask Lena for help on that?

@bidoubiwa is assigned to this task since the concept is her idea and she already worked with the designer.
We prefer to stick with the designer since we would like to keep the same style from the first contribution sticker: he is also really not expensive.

We need to pay before starting the procedure, I will be doing that we thomas tomorow.

Shall we close this?


Add helpful information to the SETUP.md

The contents of the SETUP.md file gets included in
the README.md that gets delivered when a user runs the exercism fetch
command from their terminal.
At the very minimum, it should contain a link to the relevant
language-specific documentation on
help.exercism.io.
It would also be useful to explain in a generic way how to run the tests.
Remember that this file will be included with all the problems, so it gets
confusing if we refer to specific problems or files.
Some languages have very particular needs in terms of the solution: nested
directories, specific files, etc. If this is the case here, then it would be
useful to explain what is expected.

Thanks, @tejasbubane for suggesting that we add this documentation everywhere.
See exercism.io#2198.

I think @masters3d added the basic information in c9ae5bcf0476e8eab0d3da957ffc6de79c2a18b4
I have a slightly different way of running the test that I find to be easier.  Instead of creating one xCode project for each exercise, I have one generic exercism xCode project.  Then I just need to drag in the newest exercise, create the new file for the solution and add that to the Tests target.
Curious how everyone else does it since it seemed like the original setup was a lot of extra overhead when I got started.  Maybe this should be discussed in a different issue though?

I think using IOS as the test bed is the most straightforward way. (maybe not the fastest)
But if you have suggestions on changes see the docs repo
https://github.com/exercism/docs/blob/master/app/pages/languages/getting-started-with-swift.md
A lot of issues could be introduced when you start to mix multiple projects. For example. You cant have files with the same name in one xcode project.
I personally just use an osx project since those build faster for me but that can get confusing when people see something like this and accidentally click yes.

Yeah, I suppose I can see how having all the tests in one project could get confusing if you wanted to name your solution the same as a file that already exists.
Usually I end up naming it the name of the class that is going to be tested though.   Or if it's an extension I add the in the filename what is getting added to the class.
I will have to give an osx project a try since ios projects always open the simulator.
Eitherway, I think this issue can be closed with your commit earlier?


Verification hung

Hi @d-kfmnn,
I was trying to verify an SP-AR-RC format (optimized using resyn+dc2 in abc ) 128-bit correct multiplier. However, the verification gets stuck while reducing slice 244 for a long time. The amulet1.0 and amulet1.5 versions verify it within seconds.
Attaching the test case.
map-sp-ar-rc-128-opt-dc2.zip
Thanks,
Vikas

Hi Vikas,
sorry for taking so long on this bugfix. Again many thanks for providing the benchmark!
In Amulet2.0 I apply a variable elimination step before sorting the gates, which I did not do in amulet1.x.  However, I did not consider a corner case for XOR-gates, which caused a hickup in the variable ordering.
Best, Daniela


Move demo-ready-event-emitter to .js file

This is needed to ensure that addDemoReadyListener and DemoReadyEventEmitter  are exposed globally, and the script is not converted to the ES module.
Otherwise, we would have to add the explicit  <link rel="import" href="../vaadin-demo-ready-event-emitter.html"> in the beginning of the every single demo page.

This change is

Reviewed 4 of 4 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


How should I handle the situation when Kafka starts re-balancing data on brokers.

If my code start pushing 1 million records to Kafka as a job, and before that job ends if Kafka starts re-balancing data on its brokers (3 of them), then the job stops pushing the rest of the records for some reason.
Question - When Kafka re-balances the data, how should my code handle the situation? Or it's should be transparent that my code doesn't need to do anything?

The driver should handle rebalance internally. There is unit test for rebalancing while consumer is running, but not for producer.
https://github.com/ntent-ad/kafka4net/blob/master/tests/RecoveryTest.cs#L658
First, you need to enable logging https://github.com/ntent-ad/kafka4net/wiki/Troubleshooting#logger and see if driver reports something suspicious when this happen.
If you could reproduce your case in unit test, that would be great help and I'll be able to fix it much quicker.

OK. Let me see if I can collect anything useful from logging and get back to this thread.

I've got the logs following the troubleshooting instructions. It said a number of events are missed due to bandwidth of something which I have no clue how to solve. During the event capturing my code uses almost 100% of CPU. The producer stops pushing any extra records after pushed 1.9mil out of 25mil records to Kafka - Previously it was able to push ~15mil without enabling the logging.
I am not sure how useful is the rest of the logs captured. I have no idea how to map the "Time mSec" column to the real timestamp, so I can't really pinpoint anything at the time when producer stopped pushing to Kafka.
What exactly should I be looking for?

You probably did tracing. It should be enough to do logging at this stage, meaning kafka4net.Logger.SetupLog4Net() or kafka4net.Logger.SetupNLog() and taking a look at log file produced.


The getter is not empty was called on null

Version 0.6.3
I am now getting the above error message over and over on each tab in the UI. The lovelace looks to work but as I only have a single test card here that is of limited use at the moment.

Fixed in #422


[SPARK-17141] [ML] MinMaxScaler should remain NaN value.

What changes were proposed in this pull request?
In the existing code, MinMaxScaler handle NaN value indeterminately.

If a column has identity value, that is max == min, MinMaxScalerModel transformation will output 0.5 for all rows even the original value is NaN.
Otherwise, it will remain NaN after transformation.

I think we should unify the behavior by remaining NaN value at any condition, since we don't know how to transform a NaN value. In Python sklearn, it will throw exception when there is NaN in the dataset.
How was this patch tested?
Unit tests.

Test build #64057 has started for PR 14716 at commit 19cb3ad.

Test build #64057 has finished for PR 14716 at commit 19cb3ad.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64057/
Test PASSed.

Merged build finished. Test PASSed.

LGTM

Merged into master. Thanks for review.


feat: multiple locales on multiple domains

🔗 Linked issue
#1161
❓ Type of change

[ ] 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
[ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality like performance)
[X] ✨ New feature (a non-breaking change that adds functionality)
[ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description
Resolves #1161 by allowing the same locale on multiple domains. Eg:
NL domain:
https://mydomain.nl/ -> https://mydomain.nl/ (nl language)
https://mydomain.nl/en -> https://mydomain.nl/en (en language)
https://mydomain.nl/de -> https://mydomain.nl/de (de language)

https://mydomain.nl/nl -> https://mydomain.nl/nl (404)

DE domain:
https://mydomain.de/ -> https://mydomain.nl/ (nl language)
https://mydomain.de/en -> https://mydomain.nl/en (en language)
https://mydomain.de/nl -> https://mydomain.nl/de (de language)

https://mydomain.de/de -> https://mydomain.de/de (404)

📝 Checklist

[X] I have linked an issue or discussion.
[X] I have added tests (if possible).
[x] I have updated the documentation accordingly.

I think I screwed something up 😬...


Add ColumnSelectionPreprocessor

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (93e255d) 99.90% compared to head (6375815) 99.90%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #118   +/-   ##
=======================================
  Coverage   99.90%   99.90%
=======================================
  Files          49       50    +1
  Lines        1005     1021   +16
  Branches       99      101    +2
=======================================
+ Hits         1004     1020   +16
  Partials        1        1

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Turbo gets stuck on circular dependencies

What version of Turborepo are you using?
1.0.9
Describe the Bug
Our monorepo contains a few circular dependencies. We are actively working to remove them, but have some more work to do there.
When running for example yarn turbo run build with config "dependsOn": ["^build"], turborepo will just get stuck after printing • Running lint in 89 packages. I assume it's going into an endless loop as CPU usage goes up significantly.
Expected Behavior
It would be nice if turbo threw a warning and exited gracefully on this. Preferably including a description of the dependency circle (can sometimes be several packages long).
To Reproduce

Init a new repo with turbo
Point two packages at each other in respective package.json
Make sure "build": { "dependsOn": ["^build"] } is set in the pipeline config
run yarn turbo run build

Probably regression from v0.7. On my phone right now, but yes, we should be checking for task graph validity and cycles prior to run.
We used to do this, but was possibly omitted accidentally during v0.8.5 scheduler refactor.
Will be a one liner.

Just confirmed this in my own repo -- a circular dependency results in a hung task with the turbo process taking up 100% cpu 👍

Having this issue too, although I don't have any direct circular dependencies in my local packages and I'm not sure how to figure out what the culprit is.
Building individual packages is super fast, within seconds. Running all with concurrency 1 or 10 takes more than 30 minutes with super high cpu load.

Any updates on this?

This should be fixed, we now produce an error for circular dependencies that shows the cycle in question.


How to deal with new language constructs?

How do we handle new language constructs?
I mean if a tool wants to support several Delphi version and wants to use the grammaer from here.
Maintain different Delphi versions in branches?
Or is there some notation possible within the grammar?

If a tool is used, it should generate code for the lowest version of delphi we want to support.
Antlr has semantic predicates that can be used in the gramar rules to indicate when paths can be followed based on some context (https://github.com/antlr/antlr4/blob/master/doc/predicates.md). Possibly, this could be a way of controlling features for a given version of delphi. e.g. say the context was set to delphi8, and the predicates for any newer features would evaluate to false and thus not followed. I'll try create a mini example to validate.

Thanks for that idea already, and yes: do testing/exploring it is a good idea.

I made a little test with Antlr. Here is a snippet of a mini grammar I created using a predicate rule that I got working. I added a predicate rule around the inline_var in the stmt rule. Using a static variable, I could toggle the feature being supported or not.
`grammar ProtoPas;
program  : 'program' ID  ';'  vars body '.';
body: 'begin' stmts 'end' ;
stmts : stmt ';' stmts
| stmt
;
stmt : assign
| {Delphi.supportsInlineVar}? inline_var
|
;
inline_var: 'var' ID inline_type  inline_assign ;
inline_type : ':' ID
|
;
inline_assign :  ':=' expr
|
;
vars : ( 'var'  ( var )+ )?
;
var :  ID ':' ID ';'
;
assign : ID ':=' expr;
expr: ID
| NUM
;`
I created a small config class:
`public class Delphi {
public static boolean supportsInlineVar = false;

}`
I could use Delphi.supportsInlineVar as a control variable to configure the behaviour of the parser.
So we just define a procedure setVersion(double version) where it sets Delphi.supportsInlineVar := version >= 10.3;
Hope this makes sense. I'll commit this tomorrow.

I've committed the example project https://github.com/darnocian/ProtoPas which illustrates the predicate rule

inline_assign is optional, and may be present, or not.
Your grammar doesn't allow the possibility of it being absent.

Is this a basic problem with the grammar system used or is this a problem how it has been used and it can be changed to reflect that?

@chuacw you may have missed the point of the 'protopas' example above. It was devised to illustrate the use of antlr predicates, which comes into play with the test rule:
stmt : assign
| {Delphi.supportsInlineVar}? inline_var
|
;
the example is not reflective of a correct delphi grammar.
The point of predicates in a system like antlr, is that you can essentially control the rules that are available at runtime. So the question we had was how to deal with new language constructs, and I was trying to illustrate that 'predicate' type functionality can be a way to say enable features in a grammar based on a particular version.
Of course, this feature is only useful if the wider group likes something like antlr, otherwise, the example above is not relevant.

btw. If you look at the 'stmt' rule:
stmt : assign
| {Delphi.supportsInlineVar}? inline_var
|
;
The above means the following stmt rule can match:

the assign rule
the inline_var rule (provide supportsInlineVar is true)
nothing

if supportsInlineVar is false, the stmt rule only matches:

assign
nothing

So with predicates, to control language features in rules, you could do things 2 ways :

have feature flags as illustrated, and have some sort of SetVersion(version) method that toggles feature flags. e.g. supportsInlineVar := version >10.2 (or whatever)
have predicate that could be something like version102andAbove... but I prefer the first option.

Anyways, that was my 10 cents on the topic.