cannot import name 'ChuckNorris'

python3 chuck.py
Traceback (most recent call last):
File "chuck.py", line 3, in
from chuck import ChuckNorris
File "/home/bruce/Documents/python/chuck.py", line 3, in
from chuck import ChuckNorris
ImportError: cannot import name 'ChuckNorris'

Hi, could you inform me what python version do you use?

Hi
python3 -V
Python 3.6.7

@riOwnage works fine in mine. how you install the packge?
are you using pip install chuck-norris-python ?

Hi Keda,
Actually I used pip3 install chuck-norris-python. Just installed it, no virtual env.
I now also installed pip install chuck-norris-python, when I go to my python27 dir it gives the same error..

HI @riOwnage ,
Sorry I have difficulties when debugging your issue.
I'm not sure with this issue because I've tried to test with some python versions and it works fine.
I also add more python version to ensure this package works.
https://travis-ci.org/Keda87/chuck-norris-python
have you tried in a different machine? or using pipenv?

It says the same on different pcs with different OSs. In a virtualenvironment with jupyter notebook it can import "from chuck import ChuckNorris" on a windows machine I saw yesterday night. Did not try it further.
I simply installed python3.6 and 3.7 with pip3 installation.
with python3.7 i get more output:
Traceback (most recent call last):
File "chuck.py", line 1, in
from chuck import ChuckNorris
File "/home/bruce/Documents/python/chuck.py", line 1, in
from chuck import ChuckNorris
ImportError: cannot import name 'ChuckNorris' from 'chuck' (/home/bruce/Documents/python/chuck.py)
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/init.py", line 5, in
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in
import apt
File "/usr/lib/python3/dist-packages/apt/init.py", line 23, in
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "chuck.py", line 1, in
from chuck import ChuckNorris
File "/home/bruce/Documents/python/chuck.py", line 1, in
from chuck import ChuckNorris
ImportError: cannot import name 'ChuckNorris' from 'chuck' (/home/bruce/Documents/python/chuck.py)

It only works in a virtual environment.. tried a lot without venv without success.
I just simply installed with pip "globally"
pip install chuck-norris-python
or
pip3 install chuck-norris-python

@riOwnage Sorry for the late response. I've tried in global environment and works as expected.
I'm worried that you have a problem on your python installation.

python3 chuck.py
Traceback (most recent call last):
File "chuck.py", line 3, in
from chuck import ChuckNorris
File "/home/bruce/Documents/python/chuck.py", line 3, in
from chuck import ChuckNorris
ImportError: cannot import name 'ChuckNorris'

Also as you mentioned here, chuck.py file is located in your home documents dir.
and if you installed using pip, the file should live in your python installation dir.

Hi Keda87,
No problem. I tried you solution still doesn't work..
Every other module just works, I have already tried this on three different OSs. Linux, Windows, Rasp Pi.
I think I leave this for now, thanks for your help so far.

@riOwnage Hi, sorry for your issue still not resolved.
I've tried in my VPS using ubuntu and python 3.6.5 in global environment and the package is successfully installed.
root@adiyatmubarak ~/Projects                                                                                [15:16:02]
> # python --version
Python 3.6.5

root@adiyatmubarak ~/Projects                                                                                [15:16:12]
> # pip install chuck-norris-python
Collecting chuck-norris-python
  Downloading https://files.pythonhosted.org/packages/0b/bb/621045540cc89fbad5915cdc0b4a6d2321b868deea79db3ea852873d9773/chuck-norris-python-1.1.tar.gz
Requirement already satisfied: requests in /root/.pyenv/versions/3.6.5/lib/python3.6/site-packages (from chuck-norris-python) (2.18.4)
Requirement already satisfied: certifi>=2017.4.17 in /root/.pyenv/versions/3.6.5/lib/python3.6/site-packages (from requests->chuck-norris-python) (2018.4.16)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /root/.pyenv/versions/3.6.5/lib/python3.6/site-packages (from requests->chuck-norris-python) (3.0.4)
Requirement already satisfied: idna<2.7,>=2.5 in /root/.pyenv/versions/3.6.5/lib/python3.6/site-packages (from requests->chuck-norris-python) (2.6)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /root/.pyenv/versions/3.6.5/lib/python3.6/site-packages (from requests->chuck-norris-python) (1.22)
Installing collected packages: chuck-norris-python
  Running setup.py install for chuck-norris-python ... done
Successfully installed chuck-norris-python-1.1
You are using pip version 10.0.1, however version 19.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

root@adiyatmubarak ~/Projects                                                                                [15:16:26]
> # python
Python 3.6.5 (default, Apr 30 2018, 13:10:36)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from chuck import ChuckNorris
>>> cn = ChuckNorris()
>>> dir(cn)
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'base_url', 'get_all_jokes', 'get_jokes_by_id', 'get_jokes_categories', 'get_jokes_count', 'random']
>>> cn.random()
<Norris: The Chuck Norris military unit was not used in the game Civilization 4, because a single Chuck Norris could defeat the entire combined nations of the world in one turn.>
>>>

I will close this issue for now. If you have another information how to reproduce it, just leave a comment.


Callback registration for handlers

I want to have option to register handlers with KeyFilter attribute. so I can register it like this:
builder.RegisterMediatR(
            MediatRConfigurationBuilder.Create(assembly)
                .WithAllOpenGenericHandlerTypesRegistered()
                .WithOpenGenericHandlerTypeToRegisterCallback(x => x.WithAttributeFiltering())
                .WithRegistrationScope(RegistrationScope.Scoped)
                .Build());

I know it can be done better 😞

I know it can be done better disappointed

I think it is good, thanks for the addition. A few minor things + tests and we should be good to go :)

Check

Can you please squash your commits and add a nice commit message that describes the change. Thanks

Am I done this correct?

You currently have six commits. You need to squash them into one commit.


Update doc/common/matrix_generator.md: review and rewrite for clarity

In preparation to address:

#4995

I was reading through the job-matrix/README.md and took the liberty to make some improvements.
Changes made

review the entire document and rewrite or add sections for clarity, consistency and completeness;
fix or suppress all markdownlint warnings;
replace all mentions of .NET 5 and Ubuntu 18 to .NET 6 and Ubuntu 22.04
(NOT YET DONE) update the file paths once #5027 is merged

Merging prerequisite
This PR cannot be merged until the following PR is merged:

#5027

Once that PR is merged, this PR will be updated to modify the newly introduced matrix_generator.md instead of README.md.

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow

The following pipelines have been queued for testing:java - templatejava - template - testsjs - templatenet - templatenet - template - testspython - templatepython - template - tests You can sign off on the approval gate to test the release stage of each pipeline. See eng/common workflow

/check-enforcer override


Develop

README updated
Habe den falschen Link entfernt

Hello @emiliadoe,
I found 1 problem while checking your pull request.
Problems:

The title Develop is not the format I expected.

Rules:

There must be a title in this format: Feature|Bugfix|Hotfix|Release: Title
If applicable, add your issue ticket (e.g. A-100) with a slash in the title (Feature/A-100: Title)
Use Feature for enhancements or new functionality
Use Bugfix only if you fixed a known bug
Use Hotfix for problems introduced by previous merges
Use proper capitalization in your title
There must be a description


Image viewer improvements

@LachlanStuart I'd like to submit this one for review and continue with saved states in a new PR. Guess it's better to break it up a bit and get these improvements deployed under flags. Also, I think I broke most of the focus states on the site in the last deployment, would be good to fix that.

The behavior of the ion intensity sliders in this PR is very different to my expectations, based on the workflow and MSiReader UI that Måns demonstrated to us. I'm not sure what is by design and what is a bug, so I'll just explain everything that surprised me:

The numbers at the left/right ends of the scale show the min/max selectable values, not the currently selected values. I would expect these numbers to show the values of the dimmest/brightest represented pixels (i.e. they'd change as you move the sliders), because that would help understand the colors being rendered in the image.
Clicking the padlock locks the min/max selectable values, not the slider position or the selected values used for rendering. E.g. If you select an annotation with a maxIntensity of 1e8, drag the slider down to 1e7, turn on the lock, then click on some other annotation (e.g. one with intensity 1e6), then the slider's maximum selectable value will stay at 1e8, but slider will move all the way back to the default position, changing the actual selected value to 1e8 again. I'd expect that clicking the lock would preserve the selected values, not the range of selectable values.
Clicking the min/max intensity numbers and typing in a new value only changes the range of the sliders, not the actual selected values. This means that if you moved the right slider to the half-way point and entered 4e8, the brightest pixel would be 2e8. I would expect that if I enter a value, that value would become the brightest shown pixel value, resetting the slider position if needed.
Clicking the lock buttons while multiple layers are selected only syncs the min/max selectable values. I'd expect it to sync the actual min/max values used for colorization.

It seems really counter-intuitive to me to have a UX that's centered around changing the minimum/maximum values of sliders, rather than changing the actual values of the sliders.

Thanks for the feedback, Måns agrees with the points and I don't mind implementing it here. Resetting the sliders would be much easier with an event-sourcing API, let's see how it goes otherwise.

Thanks, think I will merge 👍


pip-compile with annotate and generate-hashes looses the annotations

Describe the issue briefly here.
Running pip-compile --annotate requirements.in returns a correctly annotated file, same if you change the --annotate for --generate-hashes.
But if you combine them together only the hashes are shown on the final requirements.txt and no annotation is shown :confused:
Environment Versions

OS Type Fedora Linux 29
Python version: $ python -V 3.7.2
pip version:  $ pip --version 19.0.3
pip-tools version: $ pip-compile --version 3.6.0

Steps to replicate

Create a minimal requirements.in
Install pip-tools
Run pip-compile --annotate --generate-hashes requirements.in
No annotation is shown on the output

Expected result
An output with both annotations as well as generated hashes.
Actual result
An output that is exactly the same as if the --annotate option was not given

:blush: oops, I just noticed that they are indeed shown :sweat_smile: sorry for the noise! :bowing_man:

Hello @gforcada! No worries 😊


Permit merging of paths and images into rasters

I do not permit images and vectors to be merged into a the same raster. This requires some code I haven't yet developed. This also prevents multiple images from getting merged together with whitespace.

This issue was corrected in 0.6.0. Which is now in full release.


Improve types in EventImagesController

starting small and simple, just to see if this is going in the direction you planned :)
gets rid of 22 phpstan errors

LGTM; thanks!


file go.mod

Hi man,
You not insert go.mod file in project.

To solved I did:
`git clone git@github.com:optiv/Mangle.git
cd Mangle
go mod init github.com/optiv/Mangle
go get github.com/Binject/debug/pe
go build Mangle.go`

you shouldn't need a mod file.

Okay! Thks.


note that cancel doesn't trigger catch block

sorry - realised I was targeting v7

6.15.3 is the same...

This just repeats the same text from two paragraphs above.

I guess so - I was just trying emphasise it.

I think emphasizing it is a good idea. So stick the **important** with the other paragraph?


refactor UAA token store: use good time types

I started looking at this class because of a bug we found. I wanted to refactor first, so that I can fix the issue after that.

I believe my latest changes address both issues.


Ordering parts

Hi. Is your maze engineering parts website no longer in operation? I ordered parts but haven't had any messages for about 10 days. There are no contact details on the site.

Contacted you by email


cyber_visualizer can't see point cloud,but the channel has data

System information
-Ubuntu 14.04

binary:
Apollo5.0.0:

I used apollo5.0.0, a single VLP-16 lidar, and there was data in the channel when Connected, but only a white spot could be seen by using Cyber_Visualizer. My OpengL version was 3.0, and the host and Docker had installed NVIDIA driver (No OpengL-files). Some people said that the version of OEPNGL was too low, but when I installed NVIDIA driver, I chose to install OpengL automatically. The opengL file between the host and Docker may be incompletely linked, causing an error on "Cloud not initialize GLX", so how can we fix this problem?

My Version of OPENGL is 3.0

It seems nvdia has own opengl file ,so No OpengL-files optional is ok, according to what you said, I think you should guarantee your opengL version in docker, whether it's compatible with your nvdia driver  ?

It seems nvdia has own opengl file ,so No OpengL-files optional is ok, according to what you said, I think you should guarantee your opengL version in docker, whether it's compatible with your nvdia driver ?

Thank you, I have solved this problem by going straight to version 5.5 and replacing Ubuntu with 18.04


TiKV supports buckets

What is changed and how it works?
Ref #11759
What's Changed:
Related changes

PR to update pingcap/kvproto: https://github.com/pingcap/kvproto/pull/849

Check List
Tests

Unit test

Side effects
Release note
TiKv supports buckets

/merge

/merge

/test


[support] [javers-5.2.4] :: Manually trigger execution of flyway

Hi,
I have plugged in flyway to my spring-boot application and works like a charm
Kudos to the team !!
I am assigned with a requirement for which I am not able to get clear documentation on how to do it
The requirement is as follows:
Currently, the flyway is kicking in automatically without the user having to write any code
But, I want this behaviour to stop, and I want it to be triggered only after I manually invoke
How can I do this?
Please give me the code also, to do it
Thanks

You will need to ask Spring Boot as they maintain the integration with Flyway
However it looks like you may need to use the Maven plugin or use the Java API directly. There is documentation on our website on how to use these here and here


formatting: support formatting characters

this commit adds support for formatting characters
Example:
frg::fmt("character: {}, other character: {}", 'c', 'f');

this might change how existing code that prints uint8_ts behaves, it might be better to make this a format option for numbers like the other conversion operations

well it seems to work fine:
frg::fmt("{} {} {}", 'c', uint8_t('c'), int8_t('c'));

c 99 99

yes, because some platforms use {un,}signed when naming their int8_t types, but this isn't guaranteed (and also in practice not the case, some gcc targets use unqualified char)

I would personally make the char format_object overload check for the format_options::conversion value, and only print a character if it's format_conversion::null, so that {:d} or {:x} print an integer.


Duplicate IDs

Just running the W3C validator on the demo store homepage and it looks like it has a few problems with duplicate IDs.
Line 261, Column 68: Duplicate ID customer_login_link.
Line 202, Column 62: The first occurrence of ID customer_login_link was here.
Line 263, Column 76: Duplicate ID customer_register_link.
Line 206, Column 68: The first occurrence of ID customer_register_link was here.
It looks like it also effects other Timber based themes such as Supply.
re: https://ecommerce.shopify.com/c/ecommerce-design/t/supply-theme-fails-w3-validation-test-269326#comment-269375

This isn't really Timber's fault. Shopify adds an id to the link generated by the customer_login_link filter:
# Input:
{{ 'Log in' | customer_login_link }}

# Output:
Log in

On every page, Timber creates two navigation menus (desktop/mobile), each containing a login link. Deleting one of those menus is the only way to solve the problem you reported.
The real solution would be for Shopify to change that id to a class:
Log in

One option might be to code it without the filter.

That would work – but if Shopify changes their login link URLs, then all Timber-based themes will break.
For some themes, it may be worth hardcoding login links in order to please the validator. That's a tradeoff the theme designer should consider. But Timber should "do the right thing" by default and play by Shopify's rules, even if they're a bit broken.

Yes good point.
Some nav systems use the same unordered list for both desktop and mobile, which might avoid the problem. But it would be major pain to change it now.
I will close on that note.


Bug : An error occurred

Getting this error when I try to download a backup
"value 19 violates contract maybe(obj)(undefined) (argument 0). Expected object with fields undefined, got type number
A report has been logged and a team of bug-squashing squirrels has been dispatched to deal with the situation."
Notice as well some of my views when I try to edit it shows this error
"An error occurred
relation "public._sc_library" does not exist"
Already removed all the tables and pack which had that before
Thanks

hi @nomesaili could you please post:

what version are you using
postgresql or sqlite
see if you can get the full error stack which is in your crash log

Hi glutamate
Saltcorn version | 0.5.6
Node.js version | v14.15.1
Database | PostgreSQL 12.8
I restarted the server and ""An error occurred
relation "public._sc_library" does not exist" is fixed now.
Only the "value 19 violates contract maybe(obj)(undefined) (argument 0). Expected object with fields undefined, got type number
A report has been logged and a team of bug-squashing squirrels has been dispatched to deal with the situation." error still comes up when I click on the Download backup.
Where do I get the crash logs?
Thanks

@nomesaili  Settings menu -> events -> crash log. find the line one that shows something related to the above, click on it to get full error report

Hi Tom,
Attach the 3 logs. Thanks
[
62.txt
65.txt
71.txt
](url)

@nomesaili the third crash had all the details i needed, thanks. Fixed in #927 and 0.6.0-alpha.0 (released to npm and Docker)


FC when opening a cache from link

I opened a cache from link on very low 3G signal. From log it seems that c:geo did not log in successfully but it should not FC.
Current release branch.
FATAL EXCEPTION: Thread-10
cgeo.geocaching.geopoint.GeopointParser$ParseException: Could not parse coordinates as LAT: "N/S ? ??.??? W/E ??? ??.???"
at cgeo.geocaching.geopoint.GeopointParser.parseHelper(GeopointParser.java:128)
at cgeo.geocaching.geopoint.GeopointParser.parseLatitude(GeopointParser.java:143)
at cgeo.geocaching.geopoint.Geopoint.(Geopoint.java:61)
at cgeo.geocaching.cgBase.parseCache(cgBase.java:1214)
at cgeo.geocaching.connector.GCConnector.searchByGeocode$60a7be06(GCConnector.java:102)
at cgeo.geocaching.cgBase.searchByGeocode(cgBase.java:2227)
at cgeo.geocaching.cgeodetail$loadCache.run(cgeodetail.java:1330)

Can we have the Geocode you were trying to get, so that we can put it in
regression tests once this is fixed?

No need for it. That's the result of missing login. Strange that the exception is not caught.

I have a fix for the exception (as well as better documentation) ready to push, but I'm working with @mucek4 on a problem with the release branch right now.


I am having an issue with /dev/urandom function with fopen, fread and fclose

I got an error with the /dev/urandom used with fopen in random.php
I got the error regarding the same and i'm not able to hit the website as the random key generated are of 10 interger numbers hence it throws Cookie Short exception. Can anyone help me with this? I'm using a windows PC bdw.
Thanks in Advance.

Is Linux an option? PHP7.0 has random_bytes, which is a cross platform way to get PRNs but I'd like to maintain PHP5 support.

Yes. @kiwiz random_bytes did work fine. Thanks a ton.


[Bug]: Cannot find module in jest v28

Version
28.0.0-alpha.0
Steps to reproduce
git clone https://github.com/BlackGlory/jest-v28-issue-reproduction.git
cd jest-v28-issue-reproduction
yarn install
yarn jest

Expected behavior
It should import the module like Node.js:
node __tests__/index.js

Actual behavior
 FAIL  __tests__/index.js
  ● Test suite failed to run

    Cannot find module 'extra-request/transformers/index.js' from '__tests__/index.js'

    > 1 | require('extra-request/transformers/index.js')
        | ^
      2 |

      at Resolver.resolveModule (node_modules/jest-resolve/build/resolver.js:317:11)
      at Object.<anonymous> (__tests__/index.js:1:1)

Additional context
The related comment: https://github.com/facebook/jest/issues/9771#issuecomment-1036168851
Environment
Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.1/bin/yarn
npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
npmPackages:
  jest: ^28.0.0-alpha.0 => 28.0.0-alpha.0

https://github.com/facebook/jest/releases/tag/v28.0.0-alpha.3


add configurable block_size for different driver backends

This enables configuring the REALISTIC_BLOCKDEVICE_SIZE that is used in test_blockdevice. Related to FLOC-1874 this allows configuring the block_size that may work with some drivers and not others for implementing IBlockDeviceAPI.
This changes make_iblockdeviceapi_tests() to accept a block_size attribute.
Signed-off-by: Ryan Wallner<EMAIL_ADDRESS>

This came up with a conversation with @itamarst, this may need tests to make sure block_size is none or of a value, let me know if PR makes sense, what needs to be changed etc. thx.

Hi,
Could you merge forward and include the two callers in the patch? Thanks!

which two callers are you referencing?

merged forward, fixed a few more in IBlockDeviceAPITestsMixin to use self.block_size

make_iblockdeviceapi_tests is called in flocker/node/agents/functional/test_cinder.py, flocker/node/agents/functional/test_ebs.py , and flocker/node/agents/test/test_blockdevice.py. The block_size is an optional parameter so these will still work as expected, they will just inherit block_size from REALISTIC_BLOCKDEVICE_SIZE

In master I see REALISTIC_BLOCKDEVICE_SIZE = int(GB(100).to_Byte().value) is changed to
REALISTIC_BLOCKDEVICE_SIZE = int(GiB(100).to_Byte().value)
this should probably solve the problem ...
thanks

Thanks @vaibhavkhanduja , although it still may be nice to have it configurable. For instance, having large 100GiB volumes are small vagrant testbed could cause problems when running tests (configured my env down to 64GiB). Leaving the PR here until CHQ closes or suggests other wise.

I did something similar in https://github.com/ClusterHQ/flocker/pull/1448 for https://clusterhq.atlassian.net/browse/FLOC-1946
Let me know if that works for you and if so we'll close this PR.
Thanks again for the contribution and sorry for not commenting sooner.

Thanks @wallrj this is what was needed, better than it actually checks the device on the host. Merged in and tested https://github.com/ClusterHQ/flocker-emc/commit/7792d4e601a3ab54095fcbb25c49e0daae24fe86


open_mfdataset failed to open tarfile filestream when it locates in the context of dask.distributed Client

Recently, i use open_mfdataset to open a local tar.gz file of multiple netcdf files,
it failed to open it and raise a distributed.scheduler.KilledWorker: Error and
TypeError: cannot serialize 'ExFileObject' object .
My code is like following,
import tarfile
from dask.distributed import Client

client = Client()

tar = tarfile.open(my_multiple_netcdf_tar_gz_file)
flist = [tar.extractfile(member) for member in tar.getmembers()]

ds = xr.open_mfdataset(flist)

# This line will raise Exception
print(ds.MyNcVar.values)

# ....
# blah blah my other client calcualation codes
# ....

client.close()

In above code, the elements of variable flist will be type of ExFileObject,
which can't be serialized to distributed.Client cluster and
therefore will result in the failure of open_mfdataset .
The reason is xr.open_mfdataset auto convert chunks=None  to {} ,
which will force the method  xr.open_dataset  to use dask.
We can see in this line of open_mfdataset ,
https://github.com/pydata/xarray/blob/37fe5441c8a2fb981f2c50b8379d7d4f8492ae19/xarray/backends/api.py#L897
    # Notes this line will force chunks=None into chunks={} and result in the involvement of dask
    open_kwargs = dict(engine=engine, chunks=chunks or {}, **kwargs)

    if parallel:
        import dask

        # wrap the open_dataset, getattr, and preprocess with delayed
        open_ = dask.delayed(open_dataset)
        getattr_ = dask.delayed(getattr)
        if preprocess is not None:
            preprocess = dask.delayed(preprocess)
    else:
        open_ = open_dataset
        getattr_ = getattr

    datasets = [open_(p, **open_kwargs) for p in paths]
    closers = [getattr_(ds, "_close") for ds in datasets]

Even if i set the chunks=None, it will be a error cause the chunks always not be None
when it is passed into open_dataset .
I think maybe we can keep the chunks value and if anyone want change it,
he or she can set it to {} or any other values as they want ?
    open_kwargs = dict(engine=engine, chunks=chunks, **kwargs)

Or may you have a better solution for my problem ?
Also, Thank You for your great jobs on this excellent package.

It seems reasonable to allow open_mfdataset to work without dask — do others who know better agree?
If so, what's the best approach? We could have a default of chunks={}, accepting the python footgun, and then people can pass chunks=None for no dask? Or use a sentinel value.


Can’t click on footer links on kodadot.xyz

What happened?
I know it’s working on beta, however links in  footer on main site kodadot.xyz are not clickable. Let’s fix this please.
Please reproduce in steps
/
Expected Behavior
/
What browsers are you seeing the problem on?
Desktop Chrome
At which address did you encounter bug?
No response
Are you logged in?
None
Which wallet you are using?
No response
At which chain did you encounter bug?
No response
Screenshots

Relevant log output
No response
Payment link for reward
https://kodadot.xyz/transfer/?target=<My_Kusama_Address_check_https://github.com/kodadot/nft-gallery/blob/main/CONTRIBUTING.md#creating-your-ksm-address>
Code of Conduct

[X] I agree to follow this project's Code of Conduct

It will be fixed in next release

It will be fixed in next release

Yes, yet fixes like this are super important for people who want to get new information and it’s been like this for how long, 2, 3 weeks? That’s quite unacceptable. Several ppl messaged me about this

it’s been like this for how long, 2, 3 weeks?

my bet since last release, maybe more

#5233

it’s been like this for how long, 2, 3 weeks?

my bet since last release, maybe more

#5233

Last release was merged 9 days ago 😇


Stylus port

I made a port for stylus.
Maybe for some people it would be useful.

Must be outdated now.. I'll close that issue.. I hope it's OK :) 🍻


Correct type for stream api

Description
Updates the type of pct to string from int
Fixes #1061
Has your change been tested?
Updated unit tests and they pass
Types of changes
What sort of change does your code introduce/modify?

[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[X] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[X] I have added tests to cover my changes.
[X] All new and existing tests passed.
[X] This change is using publicly documented (api.cloudflare.com or developers.cloudflare.com) and stable APIs. (will be)

docs for this will land early next week.


Use black30 for CupertinoTabBar's border

0x4D000000 is known as black30
0x4D000000 is used by CupertinoNavigationBar
0x4C000000 is only used by CupertinoTabBar

Pre-launch Checklist

[x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
[x] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
[x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
[x] I signed the [CLA].
[ ] I listed at least one issue that this PR fixes in the description above.
[ ] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making, or this PR is [test-exempt].
[x] All existing and new tests are passing.

Hi @Sunbreak. I think this PR's test picked up an issue that's been fixed. Can you rebase on master to rerun the tests?

Hi @Sunbreak. I think this PR's test picked up an issue that's been fixed. Can you rebase on master to rerun the tests?

Rebased. BTW how to rerun without rebasing?

@LongCatIsLooong is there a reason why the color was set and left as 0x4C000000 for the tab border?

Looks like this is the commit that first introduced the color constant: 2aaa7f88b3196730295cd0d439f33b1c6d439c00 . I don't think there's a particular reason, the alpha value is probably 0.3, and 0x4C 0x4D are both close to 0.3 (29.8%, 30.196%) and there doesn't seem to be a practical difference between 0x4C and 0x4D?

Got it. Thank you for the link. At the very least, it will be good to have them be the same value, between the navigation bar and the tab bar.


(PUP-8445) mark the man face as deprecated

Marked the 'man' face as deprecated
Updated manpage and refereneces to using man to use help instead

$ bundle exec puppet help | grep  manual
  man               Display Puppet manual pages. (Deprecated)

$ bundle exec puppet man
Warning: 'puppet man' is deprecated and will be removed in a future release
   (location: /Users/eric.delaney/work/my_repos/puppet/lib/puppet/application/face_base.rb:244:in `main')

Warning: 'puppet man' is deprecated and will be removed in a future release.

USAGE: puppet man <action>

Please use the command 'puppet help <subcommand>' or the system manpage system
'man puppet-<subcommand>' to display information about Puppet subcommands. The
deprecated man subcommand displays manual pages for all Puppet subcommands. If
the `ronn` gem (<https://github.com/rtomayko/ronn/>) is installed on your
system, puppet man will display fully-formatted man pages. If `ronn` is not [...]

OPTIONS:
  --render-as FORMAT             - The rendering format to use.
  --verbose                      - Whether to log verbosely.
  --debug                        - Whether to log debug information.

ACTIONS:
  man    Display the manual page for a Puppet subcommand.

See 'puppet help man' or 'man puppet-man' for full help.
$

$  PAGER=cat bundle exec puppet man man man
Warning: 'puppet man' is deprecated and will be removed in a future release
   (location: /Users/eric.delaney/work/my_repos/puppet/lib/puppet/application/face_base.rb:244:in `main')
PUPPET-MAN(8)                    Puppet Manual                   PUPPET-MAN(8)

NAME
       puppet-man - Display Puppet manual pages.

SYNOPSIS
       puppet man action

DESCRIPTION
...
EXAMPLES
       man

       View the installed manual page for the subcommand 'config':

       $ man puppet-config

       (Deprecated) View the manual page for the subcommand 'config':

       $ puppet man config
...

$ bundle exec rake gen_manpages
     roff: ./man/man5/puppetconf.5
warn: unrecognized block tag: "hr"
warn: unexpected text: "Return a YAML hash with up to three keys:"
warn: unrecognized block tag: "hr"
     roff: ./man/man8/puppet.8
     roff: ./man/man8/puppet-agent.8
     roff: ./man/man8/puppet-apply.8
     roff: ./man/man8/puppet-cert.8
     roff: ./man/man8/puppet-describe.8
     roff: ./man/man8/puppet-device.8
     roff: ./man/man8/puppet-doc.8
     roff: ./man/man8/puppet-filebucket.8
     roff: ./man/man8/puppet-lookup.8
     roff: ./man/man8/puppet-master.8
     roff: ./man/man8/puppet-resource.8
     roff: ./man/man8/puppet-script.8
     roff: ./man/man8/puppet-help.8
     roff: ./man/man8/puppet-man.8
     roff: ./man/man8/puppet-report.8
     roff: ./man/man8/puppet-status.8
     roff: ./man/man8/puppet-node.8
     roff: ./man/man8/puppet-module.8
warn: unrecognized block tag: "hr"
     roff: ./man/man8/puppet-ca.8
     roff: ./man/man8/puppet-plugin.8
     roff: ./man/man8/puppet-parser.8
     roff: ./man/man8/puppet-resource.8
warn: unrecognized inline tag: "title"
     roff: ./man/man8/puppet-key.8
     roff: ./man/man8/puppet-certificate_revocation_list.8
     roff: ./man/man8/puppet-epp.8
     roff: ./man/man8/puppet-config.8
     roff: ./man/man8/puppet-generate.8
     roff: ./man/man8/puppet-certificate.8
     roff: ./man/man8/puppet-catalog.8
     roff: ./man/man8/puppet-certificate_request.8
     roff: ./man/man8/puppet-facts.8
     roff: ./man/man8/puppet-resource.8
`

CLA signed by all contributors.


RESOURCE some readers might find useful

I work for a Financial Company and recently we've been migrating to an OAuth architecture and using the OIDC Client library for our SPAs.
We've been very impressed with the library - it does a complex job really well - in particular we like the Silent Token Renewal feature.
I've been writing a detailed blog at http://authguidance.com which some readers new to OIDC Client might find useful:

So far it covers an SPA interacting with an API and the Okta Authorization Server
There are samples that use OIDC Client in ES6 and TypeScript
It aims to cover all essential features for an SPA

The overall blog goals are around Guidance for Companies, since there is a lot to think about when migrating to an OAuth architecture.
I'd love to get some feedback posted on my blog - on where you think it is wrong, could be improved, or particular code samples you'd find useful.
Also, I'll have quite a bit of free time over the next 5 months, so I'd be happy to do things like contribute pages to your Wiki if you can think of anything that would be useful.
Regards,
Gary Archer

Thanks for the kind words. A for help here, any docs, samples, or blog posts would be helpful as I don't have much time myself for those things. That's been the top complaint about this library is the lack of info. Now, I'd argue that the real issue is the complexity of the specs, not the library. So if you can focus on those topics, that'd be great.
Thanks for the post!


[Bug] bracket pair colorization has higher priority than semantic token provider

Reproducible in vscode.dev or in VS Code Desktop?

[X] Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

[ ] Not reproducible in the monaco editor playground

Monaco Editor Playground Code
const regEx = new RegExp(/(\{\{bar\}\})/gu);

monaco.languages.registerDocumentSemanticTokensProvider('html', {
    getLegend: function () {
        return {
            tokenTypes: [
                'customToken'
            ]
        };
    },
    provideDocumentSemanticTokens: function (model, lastResultId, token) {
        const lines = model.getLinesContent();

        const data = [];

        let prevLine = 0;
        let prevChar = 0;

        for (let i = 0; i < lines.length; i++) {
            const line = lines[i];

            for (let match = null; match = regEx.exec(line);) {
                data.push(
                    i - prevLine,
                    prevLine === i ? match.index - prevChar : match.index,
                    match[0].length,
                    0,
                    0
                );

                prevLine = i;
                prevChar = match.index;
            }
        }
        return {
            data: new Uint32Array(data),
            resultId: null
        };
    },
    releaseDocumentSemanticTokens: function (resultId) { }
});

monaco.editor.defineTheme('html', {
    base: 'vs',
    inherit: true,
    colors: {},
    rules: [
        { token: 'customToken', foreground: 'ff0000' }
    ]
});

const editor = monaco.editor.create(document.getElementById('container'), {
    value: [
        'foo {{bar}} foo'
    ].join('\n'),
    language: 'html',
    theme: 'html',
    'bracketPairColorization.enabled': true,
    'semanticHighlighting.enabled': true
});

Actual Behavior
The brackets of {{bar}} get colorized by the internal bracketPairColorization option despite the fact that the semantic token provider says they should be red.
Expected Behavior
The semantic token provider shoud be prioritized higher than bracket pair colorization and therefor {{bar}} should be completely red.
Additional Context
No response

I'm very sure this also reproduces in VS Code, I think there actually is an issue for this already. If not, please create one in the VS Code repository!
Also, there are currently no plans to address this issue as this is caused by (bracket pair) decorations overriding (semantic) tokens.


Latest migration

Factory contract deployed as at this PR:
archway1vktnsnfh2fvrkwrw0m4pz3f22k3yzkyuwxa4h5wrc3haszm7943qvvl8h7
Code IDs:
{ outpost: 735, factory: 736 }


[FN] Handshaking improvement

As far as I can determine, during the normal handshaking process we were never sending a getaddr request. So getaddr is only ever sent as part of the discovery loop executed every 10 seconds. But a peer we have just handshaked & connected with will most likely not accept a second connection from us due to IP range filtering, so we never find out its known peers.
https://github.com/stratisproject/stratisX/blob/master/src/main.cpp#L2947-L2953

I also think this will make the DNS seeds far more efficacious for SBFN nodes.


alpha.cuelang.org: multistep script PATH needs to be set in Dockerfile and generate bash script

What page were you looking at?
https://alpha.cuelang.org/
What version of the site were you looking at?
https://github.com/cue-lang/cuelang.org/commit/15f284192b61eea3f9bcd2ccd25ca39fa4efa99e
What did you do?
Worked on the preprocessor.
What did you expect?
To only have to set PATH in the Dockerfile behind the default image.
What did you see instead?
Had to set PATH in the Dockerfile and the bash script used as part of a multi-step script:

https://github.com/cue-lang/cuelang.org/blob/b891405519c5cd22933618ac7790dc1614214a34/internal/cmd/preprocessor/cmd/_docker/Dockerfile#L26
https://github.com/cue-lang/cuelang.org/blob/b891405519c5cd22933618ac7790dc1614214a34/internal/cmd/preprocessor/cmd/rootfile.go#L363

We solved this rather more elegantly by introducing the concept of named versions the site configuration, such that the Dockerfile and runner now use:
https://github.com/cue-lang/cuelang.org/blob/bcf703c3b2d4cfbbab3d0b5cb779534793d4c223/internal/cmd/preprocessor/cmd/rootfile.go#L389
Quite why the default path in the Dockerfile doesn't work is still not clear, but this is less of an issue now.

Reopening, as this issue has affected the installation of Java and Maven in the runner's container image, requiring code changes to support what should be a simple envvar update: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1198698/7/internal/cmd/preprocessor/cmd/rootfile.go


[Joy] Add Carousel component

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Summary 💡
@siriwatknp @danilo-leal
So standard Material UI doesn't provide any carousel component out of the box, however after playing around with the new Joy UI components I started writing a CSS snap carousel component that could possibly be useful for Joy. The idea partially stems from the Google news feed and a few other apps I commonly use.
I'll provide the src files below as this isn't a ready component in any way, it still doesn't have the forward back scroll functions in place, a lot of the type names need to be fixed, and I'm unsure if the virtual library I use is appropriate for this. It definitely needs a bit of work but I'd be really happy to hear people's thoughts on how a carousel component should be designed.
BUGS
So far the only bug I've run into is when you scroll to the last element, the first element in the list beings to render, then disappear in a loop. I honestly don't know if virtual makes sense for this, however major carousel libraries have this kind of support and there are cases where it could be needed. Perhaps you are rendering a gallery then it could make sense to have, images that wouldn't all be loaded at once, etc.
NOTES
There is also a prop called isSSR to switch between standard rendering and using the virtual hook (@tanstack/react-virtual), I still need to devise a solution to allow users to programmatically scroll regardless of the method used.
(Also the file structure is slightly dif from MUI. Would be fixed later.)
Index

Carousel Root w/ Virtual Hook

import { mergeRefs } from '@fox-dls/utils';
import { unstable_composeClasses as composeClasses } from '@mui/base';
import { Box, Button, useThemeProps } from '@mui/material';
import { OverridableComponent } from '@mui/types';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import * as React from 'react';
import { CarouselContext } from './context';
import { CarouselRoot } from './styles';
import {
  getCarouselUtilityClass,
  CarouselProps,
  CarouselTypeMap
} from './types';
import { useVirtualizer } from '@tanstack/react-virtual';

const useUtilityClasses = (ownerState: CarouselProps) => {
  const slots = {
    root: []
  };

  return composeClasses(slots, getCarouselUtilityClass, {});
};

export const Carousel = React.forwardRef(function Carousel(inProps, ref) {
  const props = useThemeProps({
    props: inProps,
    name: 'MuiCarousel'
  });

  const {
    className,
    //@ts-ignore
    component = 'div',
    children,
    visibleItems,
    gap,
    isControls,
    vertical,
    viewConfig,
    placeholder,
    isSSR,
    ...other
  } = props;

  const ownerState = {
    ...props,
    component
  };

  const classes = useUtilityClasses(ownerState);

  const scrollerRef = React.useRef();

  const scrollerVirtualizer = useVirtualizer({
    horizontal: vertical ? false : true,
    count: React.Children.count(children),
    getScrollElement: () => scrollerRef.current,
    estimateSize: () => 0,
    ...viewConfig
  });

  return (
    <CarouselContext.Provider value={null}>
      <CarouselRoot
        as={component}
        ownerState={ownerState}
        className={clsx(classes.root, className)}
        ref={mergeRefs([ref, scrollerRef])}
        {...other}
      >
        {isSSR
          ? scrollerVirtualizer.getVirtualItems().map(virtual => (
              <Box key={virtual.index} ref={virtual.measureElement}>
                {placeholder
                  ? React.Children.toArray(children)[virtual.index] ??
                    placeholder
                  : React.Children.toArray(children)[virtual.index]}
              </Box>
            ))
          : React.Children.map(children, (child, index) => {
              if (!React.isValidElement(child)) {
                return child;
              }
              if (index === 0) {
                return React.cloneElement(child, {
                  'carousel-first-child': ''
                });
              }
              if (index === React.Children.count(children) - 1) {
                return React.cloneElement(child, { 'carousel-last-child': '' });
              }
              return child;
            })}
      </CarouselRoot>
      <button onClick={() => scrollerVirtualizer.scrollToIndex(4)}>
        Scroll To Index 2
      </button>
    </CarouselContext.Provider>
  );
}) as OverridableComponent<CarouselTypeMap>;

Carousel.propTypes /* remove-proptypes */ = {
  /**
   * Used to render icon or text elements inside the Carousel if `src` is not set.
   * This can be an element, or just a string.
   */
  children: PropTypes.node,
  /**
   * @ignore
   */
  className: PropTypes.string,
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component: PropTypes.elementType,
  /**
   * The number of items visible at a given time. Defaults to 1
   */
  visibleItems: PropTypes.number,
  /**
   * Item peek in px
   */
  peek: PropTypes.string,
  /**
   * The gap between items in px. Defaults to 0
   */
  gap: PropTypes.string,
  /**
   * Is Verical or Horizontal
   */
  vertical: PropTypes.bool,
  /**
   * Config for view observer
   */
  viewConfig: PropTypes.object,
  /**
   * Children props
   */
  itemProps: PropTypes.shape({}),
  /**
   * Placeholder node to load
   */
  placeholder: PropTypes.node,
  /**
   * Is SSR
   */
  isSSR: PropTypes.bool,
  sx: PropTypes.oneOfType([
    PropTypes.arrayOf(
      PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])
    ),
    PropTypes.func,
    PropTypes.object
  ])
} as any;

Types & Classes

Types & Classes

import * as React from 'react';
import { OverridableStringUnion, OverrideProps } from '@mui/types';
import { SxProps } from '@mui/system';
import { generateUtilityClass, generateUtilityClasses } from '@mui/base';

export type CarouselSlot = 'root';

export interface CarouselTypeMap<P = {}, D extends React.ElementType = 'div'> {
  props: P & {
    /**
     * Used to render icon or text elements inside the Carousel if `src` is not set.
     * This can be an element, or just a string.
     */
    children?: React.ReactNode;
    /**
     * The system prop that allows defining system overrides as well as additional CSS styles.
     */
    sx?: SxProps;
    /**
     * The number of items visible at a given time. Defaults to 1
     */
    visibleItems?: number;
    /**
     * Item peek in px
     */
    peek?: string;
    /**
     * The gap between items in px. Defaults to 0
     */
    gap?: string;
    /**
     * Are the overlay controls available
     */
    isControls?: boolean;
    /**
     * Is Horizontal or Vertical
     */
    vertical?: boolean;
    /**
     * Config for view observer
     */
    viewConfig?: object;
    /**
     * Placeholder node to load
     */
    placeholder?: React.ReactNode;
    /**
     * Is SSR
     */
    isSSR?: boolean;
  };
  defaultComponent: D;
}

export type CarouselProps<
  D extends React.ElementType = CarouselTypeMap['defaultComponent'],
  P = { component?: React.ElementType }
> = OverrideProps<CarouselTypeMap<P, D>, D>;

export interface CarouselClasses {
  /** Styles applied to the root element. */
  root: string;
}

export type CarouselClassKey = keyof CarouselClasses;

export function getCarouselUtilityClass(slot: string): string {
  return generateUtilityClass('MuiCarousel', slot);
}

const CarouselClasses: CarouselClasses = generateUtilityClasses('MuiCarousel', [
  'root'
]);

export default CarouselClasses;

Styles

Carousel Style

import { styled } from '@mui/system';
import { CarouselProps } from '../types';
import { resolveSxValue } from '../../theme/mui/utils';

export const CarouselRoot = styled('div', {
  name: 'MuiCarousel',
  slot: 'Root',
  overridesResolver: (props, styles) => styles.root
})<{ theme?: any; ownerState: CarouselProps }>(({ theme, ownerState }) => [
  {
    '--Carousel-contain': 'layout paint size style',
    '--Carousel-overflow': 'visible hidden',
    '--Carousel-content-visibility': 'unset',
    '--Carousel-controls-z-index': 1,
    '--Carousel-gap': ownerState.gap ?? '0px',
    '--Carousel-height': '100%',
    '--Carousel-peek': ownerState.peek ?? '0px',
    '--Carousel-scrollsnapstop': 'always',
    '--Carousel-visible-items': ownerState.visibleItems ?? 1,

    '&::-webkit-scrollbar': {
      display: 'none'
    },

    '& > *': {
      scrollSnapAlign: 'start'
    },

    ['@supports (-webkit-scroll-behavior:smooth) or (-moz-scroll-behavior:smooth) or (-ms-scroll-behavior:smooth) or (scroll-behavior:smooth)']:
      {
        scrollSnapType: 'var(--Carousel-scroll-snap-type,inline mandatory);'
      },
    margin: '0px !important',
    width: '100% !important',
    height: 'var(--Carousel-height)',
    contain: 'var(--Carousel-contain)',
    containIntrinsicSize: 'var(--Carousel-contain-intrinsic)',
    //contentVisibility: 'var(--Carousel-content-visibility)',
    display: 'grid',
    gridAutoFlow: 'column',
    gridAutoColumns:
      'var( --Carousel-auto-columns, calc( ( 100% - var(--Carousel-gap,16px) * (var(--Carousel-visible-items,unset) - 1) ) / var(--Carousel-visible-items,unset) ) )',
    gap: 'var(--Carousel-gap,16px)',
    gridTemplateRows: 'var(--Carousel-rows,none)',
    justifyContent: 'flex-start',
    minHeight: 'var(--Carousel-min-height)',
    overflow: 'var(--Carousel-overflow,auto hidden)',
    overscrollBehaviorInline: 'contain',
    paddingBlockStart: 'var(--Carousel-padding-block-start,unset)',
    paddingBlockEnd: 'var(--Carousel-padding-block-end,unset)',
    paddingInlineStart:
      'var( --Carousel-padding-inline-start, var(--Carousel-peek,32px) )',
    paddingInlineEnd:
      'var( --Carousel-padding-inline-end, var(--Carousel-peek,32px) )',
    scrollPaddingInline: 'var(--Carousel-peek,32px)',
    touchAction: 'var(--Carousel-touch-action,pan-x pan-y pinch-zoom)',
    scrollbarWidth: 'none'
  }
]);

Examples 🌈
I still need to move all this to its own sandbox.
<AspectRatio ratio="20/19" sx={{ width: '100%', height: '100%' }}>
        <CardContainer>
          <CardContent>
            <Carousel
              gap="0px"
              visibleItems={2}
              gap="10px"
              placeholder={<Loading />}
              isSSR={true}
            >
              <CardContainer sx={{ height: '100%', borderRadius: '0px' }}>
                <CardCover>
                  <img
                    src="https://images.unsplash.com/photo-1656536665880-2cb1ab7d54e3?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=774&q=80"
                    alt=""
                  />
                </CardCover>
              </CardContainer>
              <CardContainer sx={{ height: '100%', borderRadius: '0px' }}>
                <CardCover>
                  <img
                    src="https://images.unsplash.com/photo-1656231934649-c476090deb59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1524&q=80"
                    alt=""
                  />
                </CardCover>
              </CardContainer>
              <CardContainer sx={{ height: '100%', borderRadius: '0px' }}>
                <CardCover>
                  <img
                    src="https://images.unsplash.com/photo-1656501854040-2850f4a37562?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=774&q=80"
                    alt=""
                  />
                </CardCover>
              </CardContainer>
              <CardContainer sx={{ height: '100%', borderRadius: '0px' }}>
                <CardCover>
                  <img
                    src="https://images.unsplash.com/photo-1656501854040-2850f4a37562?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=774&q=80"
                    alt=""
                  />
                </CardCover>
              </CardContainer>
            </Carousel>
          </CardContent>
        </CardContainer>
      </AspectRatio>

Motivation 🔦
It looks to me as if Joy might be the next big thing for MUI and I would like to attempt to provide useful components so that other developers will be able to make cool things!

Hey there @Rafcin, thanks for opening up the issue! I labeled it as waiting for 👍  so we track how many other community members resonate with the request. Also thanks for the files! Would you mind sharing a working CodeSandbox with them, though? It would be great to see in action.
Also, any benchmarks you'd recommend to checkout?

@danilo-leal Sure I'll set it all up in a sandbox when I get the chance! At the moment the carousel is really funky, I'm going to spend the next few hours on it, I'll come back with a stable version as soon as I can!

So I smashed my head against my desk for a good day now, and I came up with this.
https://codesandbox.io/s/mui-carousel-proposal-c8m0rs?file=/Carousel/index.tsx
It's a hook called useCarousel that returns dimensions (not needed really can be removed as a dep), Carousel, next, previous, and the refs for the container + the carousel.
There is also an additional component called Slide that uses react-cool-inview and the idea is you can optionally wrap your child components with a slide and using the carousel ref you can determine when to show images or something.
I haven't fully tested this although it's kind of starting to look like what I want it to be!

It should allow for some freedom, with next and previous coming from the hook it's much easier to implement your own carousel buttons as opposed to having them overlayed on the left and right. If anyone has any feedback I would greatly appreciate it, optimizations, best practices, etc, I would really like to try to get a carousel into Mui so other developers have more in their arsenal!

I think this solution is much better, the Carousel object itself is quite simple and honestly lets users decide how they want to handle the navigation aspect. Included is the hook that takes the ref and lets you move forward, back, etc. I'm already making a slightly different hook with better functions but I think the carousel and hook idea might be good. It's no swiper JS but it's simple and I think the CSS snap feature is great for most use cases!

Same as https://github.com/mui/mui-x/issues/3601?

Still does not have a native carousel? Bruh

I could really use a carousel from MUI. Y'all drowning in tech debt or something?


[libpqxx] Fix building libpqxx 7.9.0 with cmake 3.30

Fixes #39694

[x] Changes comply with the maintainer guide.
[x] SHA512s are updated for each updated download.
[x] The "supports" clause reflects platforms that may be fixed by this new version.
[ ] Any fixed CI baseline entries are removed from that file.
[x] Any patches that are no longer applied are deleted from the port's directory.
[x] The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
[x] Only one version is added to each modified port's versions file.

Upstream issue: https://github.com/jtv/libpqxx/issues/851

@microsoft-github-policy-service agree


Parsing Swagger Doc with Path Parameter Not in Path

Given res3 equals the following simple Swagger Doc.
Note that, per this StackOverflow answer on path Swagger Path Params, I did not append the path, /{id}, in the /pets path.
{
  "swagger": "2.0",
  "info": {
    "version": "1.0.0",
    "title": "Swagger Petstore",
    "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
    "termsOfService": "http://swagger.io/terms/",
    "contact": {
      "name": "Swagger API Team"
    },
    "license": {
      "name": "MIT"
    }
  },
  "host": "petstore.swagger.io",
  "basePath": "/api",
  "schemes": [
    "http"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/pets": {
      "get": {
        "description": "Return a specific pet.",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "id of pet",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "a Pet."
          }
        }
      }
    }
  }
}

However, it parses successfully via new Swagger20Parser().read(res3):
scala> import io.swagger.parser.Swagger20Parser
import io.swagger.parser.Swagger20Parser

scala> new Swagger20Parser().parse(res3)
res4: io.swagger.models.Swagger = io.swagger.models.Swagger@b6b5ef07

scala> res4.getPaths
res5: java.util.Map[String,io.swagger.models.Path] = {/pets=io.swagger.models.Path@23c163da}

Should there be a parse error since the /pets path did not equal /pets/{id} per the path parameter?

Yes, right now the parser is focused on structural aspects rather than content validation.  But I agree that it can be improved to handle cases like this.  I'll leave your ticket open for us to get it supported.

Thanks for replying, @fehguy.
Has a discussion already happened on how to fix this?
I'm only asking since I may have time to implement a fix. I'm looking at the code now, but, if you/others already have a fix in mind, that would help me out.

not yet.  There is one class that does the structural validation and adds human-friendly error messages:
https://github.com/swagger-api/swagger-parser/blob/master/modules/swagger-parser/src/main/java/io/swagger/parser/util/SwaggerDeserializer.java#L41
It's slightly tricky because you may have references at this stage that you cannot verify.  For example the {id} parameter may be a JSON pointer with $ref syntax that cannot resolve here.  But for most cases, having a parameter check in this code would be great.

OK - I've almost got a PR ready. I will mention you on the PR to request your review, please.
However, I'd like to make sure that I properly understand path parameters, @fehguy.
Since a path may have multiple operations, as I understand, I believe it's possible that a Swagger doc contain a single path two 2 operations:
Example:

path : /foobar/{id} with both GET and PUT operations.

That means that, per this issue, both GET and PUT operations would need to define a path parameter of value id?
And, more broadly, if a path has a path parameter with 1..n operations, then each operation must define such a path parameter?

And, looking at thing.json, I realize that I don't understand where path parameters must be specified within the Swagger Doc.
Given a /pets/{id} path, where must id appear in the Swagger Doc? It can appear in either the top-level parameters versus a Path Parameter of a Path's Operation?

@kevinmeredith The parameter can appear in two places - either at the operation level https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#operationParameters or at the Path Item level - https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#pathItemParameters.
The top level parameters object is unrelated.

Thanks, @webron, for the input. I'll adjust my PR accordingly.

Not going to enforce this in the parser at this time.


[BUG] The Docker Daemon

To Reproduce
dockerd

Observed Behavior
dockerd needs to be started with root. To see how to run dockerd in rootless mode with unprivileged user, see the documentation

Expected behavior
Is there a possible way for me to run the docker daemon in Cloud Shell? If not, should we remove the moby-engine command?  Should we consider a rootless docker daemon? (https://medium.com/@tonistiigi/experimenting-with-rootless-docker-416c9ad8c0d6)
Is this specific to Cloud Shell?
Yes
Interface information
https://portal.azure.com and through my personal laptop
Operating system: Chrome

Cloud shell runs in a container and the user runs as unprivileged. We don't know of a way to allow users to successfully run docker with these constraints. We may re-evaluate in the future, but for now I will resolve this as out of scope for us. Sorry about that.


Istio proxy build environment always fail.

Describe the feature request
I am customize istio proxy (https://github.com/istio/proxy), from 1.0 to 1.4.
Now, for build 1.4, always fail.
【Note】For each build enviroment set up, from 1.0, 1.1, 1.3, always cost me a lot of time to make it done.
So, could you help me to resolve 1.4 build issue?
And, is there any docs about istio proxy make process / dependency?
I suggest to make istio proxy build process easier, no matter improve document or create specific istio container (process)?
Thanks so much!
Describe alternatives you've considered
[ ] Configuration Infrastructure
[V] Docs
[ ] Installation
Steps
Step 1: Create container for build:
docker pull envoyproxy/envoy-build
docker run --name en -it --cpus="7" envoyproxy/envoy-build bash

Step 2: Build in container:
root@b218e70e632f:~/work/code/proxy# git checkout remotes/origin/release-1.4
Previous HEAD position was aaf4262... Cherry-pick JWT CVE fix into 1.3 (#13)
HEAD is now at 2b8fbca... Update to latest Envoy (#2808)
root@b218e70e632f:~/work/code/proxy# make BAZEL_BUILD_ARGS="-c opt"
Building with your local toolchain.
WARNING: Waiting for server process to terminate (waited 5 seconds, waiting at most 60)
Starting local Bazel server and connecting to it...
export PATH=/usr/lib/llvm-9/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin CC=clang CXX=clang++ && bazel  build -c opt --config=libc++ //...
INFO: Writing tracer profile to '/root/.cache/bazel/_bazel_root/c09471eaa632836df712c85a33e4a5e2/command.profile.gz'
INFO: Call stack for the definition of repository 'local_config_cc' which is a cc_autoconf (rule definition at /root/.cache/bazel/_bazel_root/c09471eaa632836df712c85a33e4a5e2/external/bazel_tools/tools/cpp/cc_configure.bzl:143:15):
 - /root/.cache/bazel/_bazel_root/c09471eaa632836df712c85a33e4a5e2/external/bazel_tools/tools/cpp/cc_configure.bzl:179:5
 - /DEFAULT.WORKSPACE.SUFFIX:385:1
ERROR: An error occurred during the fetch of repository 'local_config_cc':
   Traceback (most recent call last):
	File "/root/.cache/bazel/_bazel_root/c09471eaa632836df712c85a33e4a5e2/external/bazel_tools/tools/cpp/cc_configure.bzl", line 125
		configure_unix_toolchain(<3 more arguments>)
	File "/root/.cache/bazel/_bazel_root/c09471eaa632836df712c85a33e4a5e2/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 329, in configure_unix_toolchain
		_find_generic(repository_ctx, <3 more arguments>)
	File "/root/.cache/bazel/_bazel_root/c09471eaa632836df712c85a33e4a5e2/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 300, in _find_generic

Nobody answer me. I am sad.
However, I fix it out:
Way I: More official
[Steps]
Step 1: Checkout the exact code of Istio-proxy (tag: 1.4.6)
Step 2: Get build image from ..\istioproxy1.4.bazelrc , pull the image
A bit strange: -ubuntu is not showed in code at all. However, we need add it manually.
docker pull envoyproxy/envoy-build-ubuntu@sha256:3ca8acc35fdb57ab26e1bb5f9488f37095f45acd77a12602510410dbefa00b58
Step 3: Run and enter container
docker run -it --name hi envoyproxy/envoy-build-ubuntu@sha256:3ca8acc35fdb57ab26e1bb5f9488f37095f45acd77a12602510410dbefa00b58
Step 4: pull the code and go to 1.4.6 tag
git clone https://github.com/istio/proxy.git
git tag -l
git checkout 1.4.6
Step 5: Run “make lint”  (Why need this? Refer proxy-presubmit.sh)
Step 6: Add “/root/clang/bin” in path  (Why need this? Refer to scripts\check-style.sh )
vi .bashra
#Add  export PATH="$PATH:/root/clang/bin"
source .bashrc
Step 7: Run “make build”
Way II:

Refer https://github.com/johnzheng1975/istio-proxy-build-env


Option to not allow UTF8 addresses

Since the mail gem used by ActionMailer etc doesn't support UTF8 addresses (https://github.com/mikel/mail/issues/1014) could be nice have them invalidated.

Just adding a vote for this as well. I use Amazon SES for all of my emailing and SES (apparently) adheres to RFC 5322 and 5321 which does not allow any alpha characters but [A-Za-z]. I've monkey patched the regex for my local usage but it would be nice to have a setting to make it more broadly available.
My reference for SES: https://forums.aws.amazon.com/thread.jspa?threadID=210804

I'm moving to a looser validation in version 2.0. See #49 and the new README for an explanation. If you need stricter validation then I suggest using a different gem. If there's one you like then open an issue here to let me know and I'll link to it in the README. Thanks!


Bug on laravel 5.4

The package ships with a CausesActivity trait which can be added to any model that you use as a causer. It provides an activity relationship which returns all activities that are caused by the model.
If you include it in the User model you can simply retrieve all the current users activities like this :
\Auth::user()->activity;
on my User model :
`use Spatie\Activitylog\Traits\LogsActivity;
use Spatie\Activitylog\Traits\CausesActivity;
class User extends Authenticatable
{
use Notifiable;
use SoftDeletes;
use LogsActivity;
use CausesActivity;`
when i try to text deleting record on other model i got error :
FatalErrorException in User.php line 11:
Trait method activity has not been applied, because there are collisions with other trait methods on App\User

See #115


refactor: summerize all migration files

Description

Summarized all migrations into the initial sql file
Changelog

Removed all migration files
Added the migrations into initial_schema.up.sql
Updated initial_schema.down.sql

Checklist

[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] The light- and dark-theme are both supported and tested
[ ] The design was implemented and is responsive for all devices and screen sizes
[x] The application was tested in the most commonly used browsers (e.g. Chrome, Firefox, Safari)

(Optional) Visual Changes

is there a particular reason the migration files aren't needed anymore? isn't this nice to have in the case one needs to revert to the previous/different state of the db, e.g. in case of another branch?

Maybe because it were so many that now was a nice point to summarize them before it gets to chaotic. Mayber @brandstetterm can say more about it.

I thought it's quite hard finding out the current blueprint of our database with so many migration script files. But if there's a good reason why you shouldn't combine them into one (maybe because the project is still ongoing?), we can of course keep them.

@brandstetterm @mateo-ivc well personally, I don't mind since I usually flatten the DB anyways before switching to a new feature branch 😂
But concerning maintainability I would like to hear @Lennart01's opinion on this


Update encrypt-disks.md

There is some disconnect about the "az keyvault set-policy" command.
The original articles asks us to use:
--key-permissions all
--secret-permissions all
However, the CLI available on the portal does not have all as a parameter nor does the documentation lists that:
https://docs.microsoft.com/en-us/cli/azure/keyvault#set-policy
Older versions of CLI 2.0 (206+dev) for instance did have an all option, that is not true on CLI 2.0.9.
It might be safer to just add all the options separated by space to avoid confusion.

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@mabicca : Thanks for your contribution to the Azure documentation! The author, @iainfoulds, has been notified to review your proposed change.

Thanks @mabicca . I actually have an update to this I was working on yesterday. all was probably too broad anyway, so it was a good opportunity to scope down the permissions.
The minimum needed permissions that the updated doc reflects are:
az keyvault set-policy --name $keyvault_name --spn $sp_id     --key-permissions wrapKey     --secret-permissions set

These updates merged in the private repo, though may not publish until Monday a.m.
#please-close

Closing request.


Rename to preferred naming convention chartjs-chart-barfunnel

It was suggested to me to that this was the preferred naming convention when I created https://github.com/chartjs/chartjs-chart-financial
We should rename the existing repos to match

Good point! Thanks for filing this @benmccann


How to maintain a "thin" VCS controlled source code for development?

I really love the microservice setup of the whole drupal infrastructure.
I have a problem though:
I always do development by maintaining a "thin" source code. That means that I don't want to put the whole installed drupal directory in git but rather what goes to the sites/all/themes/mytheme and maybe to the sites/all/modules/custom folder (or something similar).
The current setup creates a volume that is accessible via /var/lib/docker/volumes/pagename_codebase/_data but this contains the whole root of the drupal installation.
I planned to do something like this in docker-compose.yml:
php:
    ...
    volumes:
        - ./src/theme:/var/www/html/web/sites/all/themes/mytheme
        - ./src/module:/var/www/html/web/sites/all/modules/custom/mymodule
    ...

When I run docker-compose up it returns this:
php_1     | Drupal not found in /var/www/html - copying now...
php_1     | rsync: failed to set times on "/var/www/html/web": Operation not permitted (1)
...

This happens because the installation of drupal (or rather the copying from /usr/src/drupal) happens when the container is spun up, not at build time. My host:container bind happens before the folder gets copied to /var/www/html. This means that the volume binding creates the complete /var/www/html/web/sites/all/... directory structure with root permissions. When the installer tries to copy stuff, it fails because it operates as www-data
My question is this: What should be the intended development process (with VCS in mind) for this container setup?

There 2 options how to use docker4drupal, you should you the 2nd – Mount my Drupal Codebase. If you don't want Drupal core and contrib modules in your repository just use composer template for your project.

Closing due to no activity from OP


Add missing <cstddef> include

Fixes build failing on 64-bit raspbian with g++ due to offsetof not being defined

@wheremyfoodat thanks! ✌

🥰


AUTH-521: add disabled syncer as reason to CFE for PSA

What

Add a new reason that is being set if a customer disabled the label syncer.
Check only namespaces, where we at least own one label.

Why
We want to:

identify who disabled it and will have a failing workload and
"properly" calculate PSA violations and not "believe" every label we find

/lgtm

/retest-required

/cherry-pick release-4.16


Related tests and modeling on ballistics

Ahoy 780,
Great to see this project! I was trying to learn plunging fire in wows two months ago and found that the model in wows ap calculator ("old model") not accurate on predicting the impact angle. After checking the old model, I made some revision based on fluid mechanics and the principles of vector operations. A large amount of training room tests have been done to calibrate the parameters in the ballistics model as well.
The revisions above and testing results are published on a Chinese forum NGA:
https://bbs.nga.cn/read.php?tid=23971432
Not sure if u can read Chinese or not. I can also prepare some material in English these days if necessary. If you are more comfortable to chat in Chinese (just like I am), I am also glad to hop on QQ or Wechat.
It seems that in ur fitting, the penetration data is from  Armada videos (I'm also using these values for my fitting). I'm now going through fitshell.cpp as well as the revised model from ThiSpawn. Could you let me know how to compile this code? I have also noticed that there is another repository wows_ballistics. What is the difference between these two or how are they related to each other? Looking forward to the reply and future communication (or maybe even collaboration)!
Best,
NTRQZ

@NTRQZ1 Thanks for reaching out,
I am not particularly good at reading Chinese, so I can only answer the questions you asked here.

Could you let me know how to compile this code?

So to answer your question directly, the general library is header only and fitShell is only a 'test' - so something like:
[cxx] fitShell.cpp -o fitShell.exe [Note: turn on optimizations for extra performance]
However, the code used to recalibrate the penetration formula is actually here
To run regression.py you would need to compile the Python extension which can be done by running:
python setup.py in the Python directory - you may need to pip install cppimport if do not already have it installed. After which you can run the python file normally.

What is the difference between these two [this repo and wows_ballistics] or how are they related to each other?

wows_ballistics is a website that produces graphs - and raw data - from shell parameters that uses the Webassembly extension from this repository. As such, any computations that the website does can be entirely replicated using code from this repository.

@NTRQZ1 I got someone to translate what you did.
If I understand what you did, you were trying to investigate how deck penetration works and found that the ballistics model [fnord_disc model] used in wowsft and wows ap calculator overestimated the amount of deck penetrations and hence the impact angles of shells.
I have made similar observations. So, a few months ago, using the reverse engineered code along with help from some other individuals, I implemented the corrected model. This model also happens uses the same air drag formula you used in your post meaning your flight model and the one currently used here are more or less identical. As of right now, both this repo and the website use this corrected model.
(You can read about it here).
Note: I also adjusted the time scaling to 2.75 after the post due to external reverse engineering [yours is 2.775 (5.55 / 2) if I'm not mistaken].
However, the one discrepancy between the current model here and the one you have proposed are your penetration constants. In your penetration fitting, you seem to have arrived at different constants than I did. I suspect this is due to the samples used to regress these values - for instance GC Armada data seems quite suspect. Hopefully, this discrepancy can be rectified shortly.

@jcw780 Thanks for the prompt and detailed reply! Very happy to know you are actively working on the modeling of ballistics, penetration and dispersion!
I have seen the wows_ballistics website earlier this year when I was watching Citizen's twich streaming. It turns out the author is you. Great work! I also followed the link and find the post on wows forum, which explains the old model and the improved model super clear.
Thanks to your friend who did the translation. It is basically what I was (am) doing. Yes, I was studying plunging fire (impact angles and deck penetrations) and find that the predictions from the previous model don't match the training room tests. Then I modified the model and get improved predictions of the shell flight time, impact angles and deck penetrations. The main points are:
ballistics
(1) the drag calculation: only keep the quadratic term and ensure that the drag force is pointing to the other direction of the traveling direction, which is same as the model in this repo. It makes more sense in terms of fluid mechanics as well.
(2) time scaling: we are almost same as you mentioned. I am trying to fine-tune the model and make the factor match the claimed value of 2.61.
(3) vertical scaling: besides the first point, a vertical scaling with a factor of 0.95 (linear) is needed to make the predicted impact angles meet the ricochet criteria. Thanks to your post, I find the reverse engineered code very interesting. The log scaling can explain well why the 'rainbow' from Colbert does not look as high as the improved model predicts. So instead of a linear scaling of 0.95, the log scaling its own may be adequate for the ricochet criteria, since the CV decks are above sea level and the impact angles on the decks are smaller than those at the sea level. I am also interested in testing this effect and see if it works. Let me know if you have insights on this or have a way to measure the ingame flight height of a shell.
penetration
(1) The penetration formula can be fitted, based on the predicted shell velocity from the ballistics model. I agree that the discrepancy is more a data set issue. BTW the Armada penetrations values may have some problem, for example the values for KGV.
(2) As you stated in the post on forum, the deck penetration seems to be calculated without normalization, which is set so in my model and the results can match the training room tests. I feel unsettled using different penetration mechanisms on horizontal and vertical/tilted armors. Including the log scaling in the vertical dimension may not (?) be able to solve this problem, since the scaling should apply to all the shells and is not working differently for different calibers (the shells may start from different height though).
(3) An fun observation is that in the old and our fitted penetration models, Penetration/D is always a function of M/D^3 if we check the exponents. This is also true in many of the historical naval models.
The results of the tests (AP shell/deck armor/distance/ribbon type/ricochet chances) can be checked out here
deck_aromor_tests.xlsx
The tests are using multiple (small to medium caliber: 127, 152, 203mm) types of AP shells, which should be complementary to the NC tests mentioned in the forum.
For the ballistics model, currently I am mainly using HE shell flight time for validation:
shell_flight_time.zip (matlab code, can be opened by notepad as well)
The data is collected in training room when aiming at different distances on multiple ships. In the recent versions, there is a bug: it is always showing HE flight time no matter which type of shells we load when aiming. (mino surely AP; stock NC shows AP flight time though. weird bug) When this bug is fixed by WG, we can have more validation with AP shells.
In addition to the four points you mentioned in the forum post, the improved model can also make better prediction on shall flight time, especially kitakaze, gearing and yamato. The improved max firing range predictions as you mentioned may be equivalent to this one.
Look forward to your insights or comments, I will also keep you posted when I make any improvement to the current model. I like the new website for ballistics and thanks for the contribution to the committee!
Happy holidays!


Sceneform migration?

Are you guys considering moving your code to sceneform at any point ?

Yes - stay tuned.


[Testerina] AssertEquals function fails when checking array equality

Description:
Please refer to the following sample codes. These test cases are failing with the misleading error messages.
@test:Config {}
function test1() {
    string[] keys = ["A"];
    test:assertEquals(keys, ["A"]);
}

@test:Config {}
function test2() {
    int[] arr = foo();
    test:assertEquals(arr, [1]);
}

function foo() returns int[] {
    int[] arr = [1];
    return arr;
}

Output
[fail] test1:
    Assertion Failed!: expected 'A' but found 'A'
        at ballerina.test:createBallerinaError(assert.bal:41)
        ballerina.test:assertEquals(assert.bal:82)

[fail] test2:
    Assertion Failed!: expected '1' but found '1'
        at ballerina.test:createBallerinaError(assert.bal:41)
        ballerina.test:assertEquals(assert.bal:82)

Affected Versions:
Checked with Ballerina 1.2.0

Seems like improving the failure message is being tracked with https://github.com/ballerina-platform/ballerina-lang/issues/12892.
As for the tests themselves though the following would pass.
@test:Config {}
function test1() {
    string[] keys = ["A"];
    var expected =  ["A"]; // no contextually expected type, so the type is set as `[string]`
    test:assertEquals(keys, expected);
}

But IMO getting a comparison with an in-line definition to pass would be useful.
The current logic for test:assertEquals is as follows.
public function assertEquals(any|error actual, any|error expected, public string msg = "Assertion Failed!") {
    boolean isEqual = false;
    if (actual is anydata|error && expected is anydata|error) {
        isEqual = actual == expected;
    } else {
        isEqual = actual === expected;
    }

    if (!isEqual) {
        string expectedStr = io:sprintf("%s", expected);
        string actualStr = io:sprintf("%s", actual);
        string errorMsg = string `${msg}: expected '${expectedStr}' but found '${actualStr}'`;
        panic createBallerinaError(errorMsg, assertFailureErrorCategory);
    }
}

For something like test:assertEquals(keys, ["A"]) the second parameter's type any|error is set as the contextually expected type for ["A"]. Thus ["A"]'s type is set as any[].
This results in expected is anydata|error to evaluate to false which in turn results in a reference equality check === for this test (which then results in false).
IMO, we can improve this a bit by introducing separate test functions to assert based on value equality vs reference equality.
For example,

public function assertValueEquals(anydata|error actual, anydata|error expected, public string msg = "Assertion Failed!") - test:assertValueEquals(keys, ["A"]) will pass.
public function assertReferenceEquals(any|error actual, any|error expected, public string msg = "Assertion Failed!")

Maybe we can have the current assertEquals also as a convenience function for those who want the current behaviour.
@hevayo @azinneera FYA please.

At minimum I'd like to see the value vs. reference equality explained in:

Assertions chapter in https://ballerina.io/v1-2/learn/how-to-test-ballerina-code/
https://ballerina.io/v1-2/learn/by-example/testerina-assertions.html
https://ballerina.io/v1-2/learn/api-docs/ballerina/test/functions.html#assertEquals

When one knows that's the problem then one might be able to find equality comparison explanation in https://ballerina.io/v1-2/learn/by-example/equality.html

Anydata compatible types - pure values(except error)
()
Boolean
Int
Float
Decimal
String
Byte
Straightforward value comparison
Tuple
[string|int, float, boolean] t1 = [1, 1.0, false];
[int, float|string, boolean] t2 = [1, 1.0, false];

assertEquals(t1,t2) → true
Type along with the values are being checked.
[string|int, decimal, boolean] t1 = [1, 1.0, false];
[int, float|string, boolean] t2 = [1, 1.0, false];

assertEquals(t1,t2) → Assertion Failed!
(anydata|error)[]
float a = 1.1;
decimal b = 1.1;
(anydata|error)[] arr1 = ["wwjdsd","dds",a];
(anydata|error)[] arr2 = ["wwjdsd","dds",b];

assertEquals(arr1,arr2) → Assertion Failed!
map<anydata|error>
map<string> testMap1 = {code:"hello", action: "print"};
map<string> testMap2 = {code1:"hello", action: "print"};

assertEquals(testMap1,testMap2) → Assertion Failed!
Key and values both are compared.
Xml

xml x1 = xml `<book>The Lost World</book>`;
xml x2 = xml `Hello, world!`;
xml x3 = xml `<!--I am a comment-->`;
xml x4 = xml `<?target data?>`;
xml x5 = x1 + x2 + x3 + x4;

xml x6= xml `<book>The Lost World</book>` + xml `Hello, world!`+ xml `<!--I am a comment-->`+ xml `<?target data?>`;

assertEquals(x5,x6) → true
xml x5 = x1 + x2 + x3 + x4;
xml x6= xml `<book>The Lost World</book>` + xml `Hello, world!`+xml `<!--I am a comment-->`+ "<?target data?>";

assertEquals(x5,x6) → Assertion Failed!
Table
Assertion checks are failing. (ballerina 1.2.6)
TODO: Need to check in Swanlake with the new readonly option.
table<Employee> tbEmployee = table {
   {key id, name, salary},
   [
       {1, "Mary", 300.5},
       {2, "John", 200.5},
       {3, "Jim", 330.5}
   ]
};
table<Employee> tbEmployeeTest = table {
   {key id, name, salary},
   [
       {1, "Mary", 300.5},
       {2, "John", 200.5},
       {3, "Jim", 330.5}
   ]
};

assertEquals(tbEmployeeTest, tbEmployee);
Tries to do a value comparison but fails.
Json
checked by traversing through the json objects’ fields
    json a = {"name": "Ballerina"};
    json b = {"name": "Ballerina"};

assertEquals(a, b) → true
Record with type of each individual field is a subtype of anydata
Student anne = {
   name: "Anne",
   age: 18,
   grades: {
       maths: 70,
       physics: 80,
       chemistry: 55
   },
   ...address
};

Student anne1 = {
   name: "Anne",
   age: 18,
   grades: {
       maths: 70,
       physics: 80,
       chemistry: 55
   },
   "city": "Colombo",
   "country": "Sri Lanka"
};

test:assertEquals(anne, anne1) → true
Does a value comparison

In other test frameworks such as Junit5, following functionalities are available.

AssertEquals → class loading to support all available data types(deep value checks)
AssertArrayEquals → class loading to support arrays of all available data types
AssertSame → Assert whether it’ s the same object.

Based on these frameworks, the usual expectation from an "AssertEquals" function is to have deep value equality check.
I suggest that we have the following options.
assertEquals - deep value equality for (any|error) i.e. for all available types in Ballerina
Also, as @MaryamZi mentioned we can have the following too.
assertReferenceEquals - check whether expected and actual refer to same object/record/table etc.
@hevayo @azinneera @Ibaqu
Appreciate your thoughts.

Based on the current specification, we are unable to support value equality for behavioral values. So, we are planning to introduce the following functions instead of "assertEquals".

public function assertValueEquals(anydata|error actual, anydata|error expected, public string msg = "Value Assertion Failed!")

public function assertExactEquals(any|error actual, any|error expected, public string msg = "Exact Assertion Failed!")

Until there is a way to support value equality for behavioral values, we plan to remove the "assertEquals" function. See the discussion at [1].
Following is the list of tasks.

[ ] Implement "assertValueEquals", "assertValueNotEquals", "assertExactEquals",  "assertExactNotEquals" and replace "assertEquals", "assertNotEquals" with the relevant function based on expected behavior.
[ ] Write test cases to cover every data type using the new functions
[ ] Update the website test guide [2]
[ ] Update BBE for testing [3]
[ ] Update API docs [4]
[ ] Update the spec [5]

[1] https://groups.google.com/g/ballerina-dev/c/hNlQLAu3b4M/m/wOiRvJhvBAAJ
[2] https://ballerina.io/learn/testing-ballerina-code/
[3] https://ballerina.io/learn/by-example/testerina-assertions.html
[4] https://ballerina.io/learn/api-docs/ballerina/test/index.html
[5] https://github.com/ballerina-platform/ballerina-spec/blob/master/test/test-framework-spec.md

Test specification updated with https://github.com/ballerina-platform/ballerina-spec/pull/587


Add CBOR serialization instances for UTxO, update, and delegation error types

Required as part of https://github.com/input-output-hk/ouroboros-network/issues/592 since the LocalTxSubmission Codec requires the ability to CBOR encode and decode ApplyTxErrs (which can be either transaction, update, or delegation errors).
I'll be adding golden tests in follow-up PRs (I believe there are around 40 golden tests required as a result of this PR). Also, I still need to add generators or round-trip tests for Update-related error types.

@ruhatch:
The modules containing the update-related Error types for which I have to write generators and tests are not exposed as part of cardano-ledger (and therefore cannot be imported in the test-suite). It seems that there is good reason for keeping these modules internal as the update functionality is supposed to be exposed from Cardano.Chain.Update.Validation.Interface.
Would you mind if I re-export the required Error types through the Interface module? Also, I wonder if it'd make sense to rename them since they're all named Error.
Perhaps a rename to: EndorsementError, RegistrationError, and VotingError?

I feel a little bad suggesting this after you did all the work of manually implementing CBOR instances (wish I had asked you about the work earlier when you said you were starting it!), but could we use TH to derive these boilerplate-y instances?
I wrote https://github.com/input-output-hk/cardano-sl/blob/51ad7c0503b1c52a75a6eb36096c407934136468/binary/src/Pos/Binary/Class/TH.hs#L142-L143 in cardano-sl and that could probably be modified relatively easily to work with ToCBOR/FromCBOR. I had to exercise my TH-fu for goblins, so I am relatively fresh on this and could implement it if desired.
We probably want to check with someone with higher context, if there's a reason not to use TH to derive these.

Although, I just read the "Avoid TemplateHaskell" section of http://www.stephendiehl.com/posts/production.html 😆
I still think that in this case we're only deriving instances which look fairly manual to hand-write, so I think it is a legitimate use of TH. Now that the work is done, though, perhaps it's too late to justify implementing a TH derivation funciton.

@intricate I feel a little bad suggesting this after you did all the work of manually implementing CBOR instances (wish I had asked you about the work earlier when you said you were starting it!), but could we use TH to derive these boilerplate-y instances?
I wrote https://github.com/input-output-hk/cardano-sl/blob/51ad7c0503b1c52a75a6eb36096c407934136468/binary/src/Pos/Binary/Class/TH.hs#L142-L143 in cardano-sl and that could probably be modified relatively easily to work with ToCBOR/FromCBOR. I had to exercise my TH-fu for goblins, so I am relatively fresh on this and could implement it if desired.
We probably want to check with someone with higher context, if there's a reason not to use TH to derive these.

@mhuesch: This is a good suggestion but, in the interest of getting this merged so I can utilize it for https://github.com/input-output-hk/ouroboros-network/issues/592, would you mind if I merge this and open an issue about potentially utilizing TH for some of the CBOR instances throughout cardano-ledger?

@intricate of course! I was just thinking aloud. If a derivation function is written that covers these instances, it’s easy to delete them.

bors r+


ravenac95/basic dagster deployment

Run proxy first
Updates for docker builds
Moving files around
move cloudquery images
Create a general container build/publisher
Re-enable main

Related to #1323


Feature Request: iOS 18 vacuum support

Is your feature request related to a problem? Please describe:
Not really, just that it shows up as a fan and can be annoying.
Describe the solution you'd like:
I wish it was using the native Homekit vacuum support and I know I saw this but I'm wondering when this will happen
Describe alternatives you've considered:
No response
Additional context:
No response
Node Version (optional):
No response
NPM Version (optional):
No response
Homebridge Version (optional):
No response
Plugin Version:
3.2.3
Operating System (optional):
Raspberian

Since vacuums are part of the Matter spec, it is still being determined if this will make it to Homebridge.
https://github.com/merdok/homebridge-miot/issues/621


Schema Generator is Generating Invalid Schema

I was looking at the Container example here https://github.com/RicoSuter/NJsonSchema/wiki/Inheritance, and If I put the schema and the container json in an online schema validator it fails.  From the error description it looks like this:
"oneOf": [
        {
          "$ref": "#/definitions/Animal"
        },
        {
          "type": "null"
        }

is not correct, it should be
"oneOf": [
        {
          "$ref": "#/definitions/Animal"
        },
        {
          "type": ["null", "object"]
        }

Actually, upon further investigation, it looks like oneOf doesn't point to the Dog definition and neither does the Animal defintion


How to persist data when navigating from one page to another angular2 nativescript

Hi @sarvagayatri,
Thank you for your interest in NativeScript.
In NativeScript Angular project you could use RouterConfig object which maps paths to components and you could past parameters while navigating as it is described in our documentation.
For further help you could review the Angular2 documentation, where you could find further info about the Angular router and, how you could parse data.
You could review this thread in SO here, where this scenario has been described.
You could also use our StackOverflow  and Slack  canals for your questions.
I hope this helps.
@tsonevn

I want to save few variable values through out the app, so that i can refer them in any page of app. so routing variables does't work for me. i want to persist few application state variables eg. userId, userStatus etc..

Maybe this ?
https://docs.nativescript.org/api-reference/modules/_application_settings_.html

Hi @sarvagayatri,
You could use Application Settings as  @AzSiAz has suggested, you could find an example how to use this module here  in the documentation. You could also review the SO thread here, where has been described how to define global variables in Angular2.

In addition to what people have already brought up, the Angular router allows you to provide parameters for the component you are navigating to:
https://angular.io/docs/ts/latest/guide/router.html#!#route-parameters

What about back navigation params?

you can use service in that case, routing will not fit.
try like this.
PersistDataClass.ts
class PersistDataClass {     userData: Array<object> }
Component where you want to set and later get.
`
import { PersistDataClass } from './PersistDataClass';
import { OnInit } from '@angular/core';
export class UserComponent implements OnInit() {
constructor(private _userservice: PersistDataClass) {
}
ngOnInit() {
    service.getUserList().subscribe( res => {
      _userservice.userData = res;
  })
}

}
`