net: lwm2m: Allow cancel-observe to match path

The specification states that the server can cancel observations "at any
moment, by sendinga GET request with Observe option=1, the LwM2M Server
cancancel an “Observe”operation on a specified Resource, or specified
Object Instance(s)."
It does not mention any token matching requirement. The EMQx LwM2M
implementation uses a new token for instance, which does not
work with Zephyrs token matching cancel-observe.
This commit introduces cancel-observe via path matching. This could
hypothetically introduce problems when we are connected to multiple
peers simultaneously, but since that is not likely to be supported for a
long time (if ever), this change should be fairly uncontroversial since
path matching is only used as a fallback.

It does not mention any token matching requirement. The EMQx LwM2M
implementation uses a new token for instance, which does not
work with Zephyrs token matching cancel-observe.

This is covered by the RFC 7641, which LwM2M is based on:

In some circumstances, it may be desirable to cancel an observation
and release the resources allocated by the server to it more eagerly.
In this case, a client MAY explicitly deregister by issuing a GET
request that has the Token field set to the token of the observation
to be cancelled and includes an Observe Option with the value set to
1 (deregister).

So it's not something Zephyr specific to match the token, but it's required by the standard. I'm not familiar with the EMQx LwM2M implementation, but I guess it should be rather reported on their side that they do not follow the spec.

This commit introduces cancel-observe via path matching. This could
hypothetically introduce problems when we are connected to multiple
peers simultaneously, but since that is not likely to be supported for a
long time (if ever), this change should be fairly uncontroversial since
path matching is only used as a fallback.

I'd rather cautious with assumptions like this and would rather avoid putting potential obstacles for future imporvements of the LwM2M stack. But on the other hand, in the mutli-server scenario the observe node would likely need to store the information about the observation owner so it could be verified in such case to avoid a situation where one server cancels others observation. Still, as a non-standard extension I'd consider making this configurable with Kconfig.

So it's not something Zephyr specific to match the token, but it's required by the standard. I'm not familiar with the EMQx LwM2M implementation, but I guess it should be rather reported on their side that they do not follow the spec.

I definitely agree that the EMQx implementation SHOULD cache the token and cancel using that, but I'm not 100% sure I agree with your interpretation of the specification. LwM2M has a separate mechanism for uniquely identifying an observe (that is, the resource path). Since that is not a part of the original CoAP spec, it is natural that token matching is required, for CoAP. Path-based cancel-observe could be an intentional relaxation on OMA:s part.

I'd rather cautious with assumptions like this and would rather avoid putting potential obstacles for future imporvements of the LwM2M stack. But on the other hand, in the mutli-server scenario the observe node would likely need to store the information about the observation owner so it could be verified in such case to avoid a situation where one server cancels others observation. Still, as a non-standard extension I'd consider making this configurable with Kconfig.

...but in any case, you are right of course - a Kconfig is strictly better.

I'm not 100% sure I agree with your interpretation of the specification. LwM2M has a separate mechanism for uniquely identifying an observe (that is, the resource path). Since that is not a part of the original CoAP spec, it is natural that token matching is required, for CoAP. Path-based cancel-observe could be an intentional relaxation on OMA:s part.

Sorry but I disagree, I think there's no ambiguity here. I haven't found a single reference in the LwM2M spec that suggests that LwM2M implements some non-standard Observe mechanism. Instead, we find in there:

Periodic and event-triggered reporting about Resource values from the LwM2M Client to the LwM2M Server is achieved
through CoAP Observation [OBSERVE].

Where [OBSERVE] is a reference to the RFC 7641. There is nothing unique to LwM2M in specifying the resource path, the aforementioned RFC states (chapter 3.1):

A client registers its interest in a resource by issuing a GET
request with an Observe Option set to 0 (register).

Even if you look at the examples in the RFC, the resource URI is always specified in the Observe request. The only confusion I can see is that from CoAP perspective a resource is any data object that can be identified by an URI, so a LwM2M Object or Object Instance would also be interpreted as CoAP resource. But otherwise, it's pretty clear to me that in LwM2M we deal with the standard Observe mechanism.
Of course, I could have overlooked something in the LwM2M spec or RFCs so fell free to correct me if you disagree.

Even if you look at the examples in the RFC, the resource URI is always specified in the Observe request. The only confusion I can see is that from CoAP perspective a resource is any data object that can be identified by an URI, so a LwM2M Object or Object Instance would also be interpreted as CoAP resource. But otherwise, it's pretty clear to me that in LwM2M we deal with the standard Observe mechanism.

Well it's hard to find good counterarguments here, it's just that the actual language of the LwM2M spec makes it seem as if the intention is to allow path matching as an ALTERNATIVE - I mean why introduce path matching at all if it's not meant as an alternative to token matching, right? It just makes no intuitive sense.
Anyways, I rewrote is as Kconfigurable and added a fancy path macro. I need to test it a bit tho.

Compliance check also spotted a few issues, please have a look.

Hopefully ok now

Even if you look at the examples in the RFC, the resource URI is always specified in the Observe request. The only confusion I can see is that from CoAP perspective a resource is any data object that can be identified by an URI, so a LwM2M Object or Object Instance would also be interpreted as CoAP resource. But otherwise, it's pretty clear to me that in LwM2M we deal with the standard Observe mechanism.

Well it's hard to find good counterarguments here, it's just that the actual language of the LwM2M spec makes it seem as if the intention is to allow path matching as an ALTERNATIVE - I mean why introduce path matching at all if it's not meant as an alternative to token matching, right? It just makes no intuitive sense.
Anyways, I rewrote is as Kconfigurable and added a fancy path macro. I need to test it a bit tho.

A colleague had a good point - apparently

misclick close haha sorry

It is a bit weird why the unit test fails. @endian-benjamin could you rebase against latest upstream and resubmit, perhaps it solves the issue.

ping @endian-benjamin

Thanks for the ping, didn't realize it was broken


dev: add array_slice to the ArrayTrait

The array_slice extern function is not added to the  ArrayTrait, so there's unable to declare a contract-class using it, even having the --allowed-libfuncs-list-name experimental_v0.1.0 added to the starknet-compile parameters.

Thanks :)
But - maybe you know - when it will be available for contract declaring/deployments?


Debug Tooling

View memory, CPU registers, tiles, color palettes, etc.
Can augment the existing debug window or go with the generic emu-debugger approach.

https://github.com/ocornut/imgui_club

I think this will be part of #94

Closing in favor of making specific tickets for specific tools. Will be an on-going process.


Internal links should navigate within the PDF rather thank link to the original site

I'm not sure how feasible this is.
But it would be great if relative links on the site would work as internal links in the PDF.
There is this issue in the upstream fork. I don't really understand the discussion there.

It would be better if "mr-pdf" tool could solve the internal link issue on docusaurus document.


Split up initial and per-message prompts for chat mode

At present, the chat mode will apply the same prompt template for every single user prompt. This makes sense for REPL mode, where you want to reuse the same prompt (e.g. Alpaca instructions), but it doesn't make sense for chat mode, where you want to continue a conversation:
[Initial prompt]

User: [user input]
[Chat response prompt] [bot's response]
User: [user input]
[Chat response prompt] [bot's response]

That is to say, Initial prompt and Chat response prompt should be different.

Just a totally random nitpick, but I think it would be great if the top-level examples folder could be removed (or at least renamed) as a part of this effort.

i agree on both counts.


Added documentation/KO and translated README

I added documentation/KO directory cause there is no directory that translated documentation can placed.
And, I translated README.md to Korean, so that many Korean's can read it!
If you have any comments or questions of this PR, please reply me!
Thanks :)

Thanks :) I just new  PR that modified translated Korean README.md.
Please check it!!
You might close this PR cause, I did new PR !!


Add quotes around path

The quotes around the path variable allows the command to work with paths with whitespace.

Didn't think of this. Thanks!

@smsutherland fixed this a while ago, but forgot to deploy it :facepalm: should be working now

This issue persists.
I've tried to add double quotes to the processing-java path setting, but even then the command runs without quotes.
Looking at https://github.com/Luke-zhang-04/processing-vscode/commit/c240d8b4802f28bc10c89e9abcc35dd42cd8c6f0 , seems you solved this issue only at the sketch path. The spaces on run are still a problem
C:"Program Files"\processing\processing-java works on cmd, but it doesn't in the Processing Path setting variable

That's interesting. I'll get that fixed soon.

BTW temporary fix: escape spaces in your settings.json

should be fixed with latest version


perf: remove unecessary masking in dropout

It doesn't seem to work for now, I need to add some forward bacward tests.


remove reference to yahoo/tensorflow fork

Infiniband support has now been merged to tensorflow main repository.

+1


Possible Bug In VLAN parsing

On line: https://github.com/tinkerbell/hook/blob/1c438a9b6dbd72a5611c54a0b60bd0dfc8a87888/files/dhcp.sh#L14C19-L14C50
The command:
sed -n 's/.*vlan_id=\([0-9]*\).*/\1/p' /proc/cmdline

will also match the string: testvlan_id=2.
I am expecting that it would only match on vlan_id=2
Note: only match on vlan_id= rather than also on testvlan_id=

One possible solution would be to change the sed command to something like:
's/.* vlan_id=\([0-9]*\).*/\1/p'

add a space before the vlan_id=

Hey @dvintel, thanks for finding and reporting this! I've opened #181 to resolve this. Thanks!


Transient CI build errors

This issue tracks transient build errors on CI. Whenever I notice one I'll add a note here.

https://pantheon.corp.google.com/cloud-build/builds/ffad1c6d-3abd-47e7-a41f-4643b8ea4b14?project=oak-ci
Step #0 - "recover_git_folder": Cloning into 'oak-hardware-git'...
Step #0 - "recover_git_folder": POST git-upload-pack (142 bytes)
Step #0 - "recover_git_folder": POST git-upload-pack (445 bytes)
Step #0 - "recover_git_folder": mv: cannot move 'oak-hardware-git/.git' to './.git': Directory not empty
Finished Step #0 - "recover_git_folder"
ERROR
ERROR: build step 0 "nixos/nix:2.3.4" failed: step exited with non-zero status: 1

The cause is actually the start of the build, GCB is starting to more frequently initialize a git repository:
FETCHSOURCE
Initialized empty Git repository in /workspace/.git/
From https://github.com/project-oak/oak-hardware
 * branch            cd8c0b08123b0b318ce6dbeb12622d3971c78ee1 -> FETCH_HEAD
HEAD is now at cd8c0b0 Merge arrow-lib back into Cava

Previously it would not
FETCHSOURCE
Fetching storage object: gs://691249393555.cloudbuild-source.googleusercontent.com/b3eb8b460810e9d7f73c1278623fc1779fc7fabc-e30ff79c-2123-43ee-b469-56dbfd84fd4c.tar.gz#1602639191658367
Copying gs://691249393555.cloudbuild-source.googleusercontent.com/b3eb8b460810e9d7f73c1278623fc1779fc7fabc-e30ff79c-2123-43ee-b469-56dbfd84fd4c.tar.gz#1602639191658367...
/ [0 files][    0.0 B/ 33.2 MiB]
/ [1 files][ 33.2 MiB/ 33.2 MiB]
Operation completed over 1 objects/33.2 MiB.

This behaviour is non-deterministic as far as I can tell. I think for now I'll update the build steps to be resilient to either initialisation routine.

Rebasing on main since #269 (commit 382a11b on main branch) should now work.

Got a build failure for Verilator.
Step #2 - "build_verilator": error: unable to download 'https://www.veripool.org/ftp/verilator-4.028.tgz': Couldn't resolve host name (6)
Step #2 - "build_verilator": (use '--show-trace' to show detailed location information)
Finished Step #2 - "build_verilator"
ERROR
ERROR: build step 2 "nixos/nix:2.3.4" failed: step exited with non-zero status: 1
Finished Step #3 - "build_third_party"

https://pantheon.corp.google.com/cloud-build/builds/29076f6e-27a9-4d6d-8df2-51c0756d25c4?project=oak-ci

Verilator fail seems to have been due to a temporary network failure connecting to veripool.org
I think we are good for now, closing as fixed. Please reopen or create a new issue if you see CI build errors unrelated to your PRs.

I think this is a CI failure I just got: https://pantheon.corp.google.com/cloud-build/builds/c47a3f74-1b71-42ef-a7e1-15e8a1a60e69?project=oak-ci

https://pantheon.corp.google.com/cloud-build/builds/d4096351-926c-4b5e-aab4-d284f6fcf824;step=3?project=oak-ci
Failed to build third_party with the somewhat mystifying error "no targets" on coqutil. Possibly the git submodule update hadn't yet created the coqutil submodule by the time it tried to build it?

Odd, it looks like the submodule checkout should have finished at the line
Submodule path 'bedrock2/deps/coqutil': checked out 'f0eb54037cde200031536a1b49cb528435abe3c9'
I noticed after pushing your PR worked- did the last force push contain any changes to make it work?

I noticed after your latest push your PR worked- did the last force push contain any changes to make it work?

 I also hit "retry" on the failing build and got a successful one.

Huh, same error again. https://pantheon.corp.google.com/cloud-build/builds/bf65af98-a62c-493c-9d9a-70e75f18f9ab;step=5?project=oak-ci
This time in make-all, but still about coqutil, which is even more confusing. The PR only changes the tutorial file and the documentation, so I don't think it's related? But two errors in four runs is suspicious.

Looks like coqutil (and the other subdirectories) are missing from .PHONY. Not sure if that's causing the problem, but I'll fix it and we'll see?
https://github.com/project-oak/silveroak/blob/1e654d404031cc76b392cd4bc74aafa3e2c09a74/third_party/Makefile#L17

I think this is not a problem with the CI system; I just ran into it locally.


Screen-space reflections have a visible line between the reflected object and the reflection, unless Fade In is exactly 0

Godot version
3.3.2.stable (does not apply to 4.0.dev due to different algorithm)
System information
Fedora 34, GeForce GTX 1080 (NVIDIA 465.31)
Issue description
Screen-space reflections have a visible line between the reflected object and the reflection, unless Fade In is exactly 0.
I originally reported this here, and I just found a workaround by setting Fade In to exactly 0.0.
No visible line
Fade In is set to 0.0 by right-clicking the curve and choosing the Zero preset.

Visible line (default behavior, also seen with the default Fade In = 0.15)
Fade In is set to a very low positive value, displayed as 0.0 in the inspector (but not actually 0.0).

Steps to reproduce

Create a scene with a non-rough, metallic plane to reflect other objects that are touching the plane.
Enable screen-space reflections in a WorldEnvironment node's Environment resource.
Look at intersections between objects and the reflective plane.

Minimal reproduction project
test_ssr_resolution_3.x.zip

This is what "fade in" does. It fades the effect in where the collision is very close to the reflecting surface.
IMO this is a documentation issue. To have sharp reflections in corners like this "fade in" should be set to 0

This is what "fade in" does. It fades the effect in where the collision is very close to the reflecting surface.

I still think there might be a rounding error somewhere, as it results in a disgracious-looking curve that may look better if it wasn't there. The subtle fade-in is nice to have, but you can't have it without having that sharp line at the intersection.


v2022 - 07 login menu

The new menu at the login for WebAuthn or TOTP has got a new CSS class and therefore has to be adapted to the darkmode.

fyi: https://twitter.com/mailcow_email/status/1540375061231722498
they confirmed Darkmode support with BS5

Hi, I didn't get that at all. In which update is BootstrapV5 included?

I have installed the fix times, still without switch button

Hi, I didn't get that at all. In which update is BootstrapV5 included?

I is comming soon to the nightly build i guess.
To Test it.


Doesn't work with multi-root workspaces

First of all, thank you for your great work! I'm using this extension to format Python code in accordance with wemake-python-styleguide (which is tricky to get right with existing autoformatting extensions alone) literally every day.
I'm currently wotking on a tightly coupled set of projects, which I manage as a multi-root workspace. For some of them, I want to use this extension to autoformat code. However, when I open .vscode/settings.json, I get the following error for the customLocalFormatters.formatters property:

This setting cannot be applied in this workspace. It will be applied when you open the containing workspace folder directly.

And when I try to run Format Document, I get the following error:

Extension 'Custom Local Formatters' cannot format 'foldername - filename'

I suppose this extension doesn't play well with multi-root workspaces. Is there any way to fix that? :)
UPD: seems like Adopting Multi Root Workspace APIs might be relevant here. I'll try to work out a PR tonight or maybe later this week.

Turns out settings work when applied in the .code-workspace directly:
{
  "folders": [...],
  "settings": {
    "customLocalFormatters.formatters": [
      {
        "command": "poetry run isort - | poetry run autopep8 - | poetry run add-trailing-comma --exit-zero-even-if-changed -",
        "languages": ["python"]
      }
    ]
  }
}

Perhaps worth mentioning in the docs? Apart from that I think this covers most of the use cases, considering that code style is likely to be the same across a given workspace.

Hi @notpushkin! Sorry for only responding nine months later... but would be happy to have a note added in the README about this - feel free to drop a PR and I'd be happy to merge it!


I'm having problem in creating carasouel in (level 3)

As you can see in image i've attached when I try to click/type favourite colors name it raises an error saying " This phone is not responding right now please try again soon! "

Unable to reproduce. Please reopen if you are still running into this issue, and provide more details and error logs.


Review naval base conversion

Make sure it generates appropriate results.

I've doubled the size of naval bases. In the future, it might be worth having level 6 (and maybe 5) Vic2 bases generate extra bases in the HoI4 state.


compile error in Visual Studio

hi,
I got this error when compiling the teapot object:
error C2719: 'lidTransform': formal parameter with __declspec(align('16')) won't be aligned
I'm using Visual Studio 2013.  It can be fixed by changing the type from 'mat4' to 'mat4&', but I'm not sure if it is the best way to do it.

Thanks for the report.  Seems like changing to a const mat4 & should be a fine solution.  I'll look into this a bit more and get back to you.

Hi, I got the same issue compiling the solution. But in the ingredients project.
vboteapot.cpp(14): error C2719: 'lidTransform': formal parameter with __declspec(align('16')) won't be aligned
vboteapot.cpp(89): error C2719: 'lidTransform': formal parameter with __declspec(align('16')) won't be aligned

I'm not seeing this error on VisualStudio 2013.  I'm using GLM <IP_ADDRESS>.  What version of GLM are you using?  If you're using an older version, please try with the latest and let me know.
Thanks.

i'm using glm <IP_ADDRESS> as well. Here's a thread talking about the same issue:
http://stackoverflow.com/questions/28488986/c-opengl-formal-parameter-with-declspecalign16-wont-be-aligned

Looks like the issue only occurs when building for 32-bit (win32/x86).  It doesn't happen when building for x64.  I'll change the parameter to const mat4 &

Similar issue generates a bunch of C4316 compiler warnings (object allocated on the heap may not be aligned 16) when targeting 32-bit.  There's an open issue on the GLM repo for this:  https://github.com/g-truc/glm/issues/235 .

This should be resolved in GLM <IP_ADDRESS>.  Closing this issue.


tensorflow.python.framework.errors_impl.NotFoundError: Key batch_normalization_1/beta not found in checkpoint

When running the testing command for this model after training it from scratch , on the words  : "python main.py --img_file ..test_images/word.png" .
I manually inspected the model's snapshot , i found :
"
"tensor: batch_normalization_1_1/beta (float32) [64]
tensor: batch_normalization_1_1/beta/Adam (float32) [64]
tensor: batch_normalization_1_1/beta/Adam_1 (float32) [64]
tensor: batch_normalization_1_1/gamma (float32) [64]
tensor: batch_normalization_1_1/gamma/Adam (float32) [64]
tensor: batch_normalization_1_1/gamma/Adam_1 (float32) [64]
tensor: batch_normalization_1_1/moving_mean (float32) [64]
tensor: batch_normalization_1_1/moving_variance (float32) [64]
""
P.S : i also did the same with the pretrained model that's provided , but i get the same error

that might be an issue with a wrong TF version. Check if you used the one specified in the requirements.txt file.


How to set complier flags for certain files?

I've searched the docs and examples and issues, but can't find the answer.
I need to set compiler flags -fno-objc-arc to certain files, how can I do that?

@chiahsien right now you can't since nobody has needed it. But I can implement it quickly, would something like this work ?
target.include_files 'folder/file.c', '-fno-objc-arc'

This is pretty old, but this is the way CocoaPods does it:
http://www.fabiancanas.com/blog/per-file-arc-in-cocoapods
The DSL doesn't support per-file exclusion, but supports it on a subspec level.
This works fine for -fno-objc-arc, but maybe per-file compiler flags make sense because they can support any kind of flags (and it is supported in Xcode's interface).
As an alternative to your proposal, maybe it could be something like :flags => '-fno-objc-arc? This is also kind of "Podfile style."

Awesome!
I use Cocoapods too, so target.include_files 'folder/file.c', :flags => '-fno-objc-arc' looks good to me.
One more thing, if I already include files via folder/*.*, would this make duplication?

@chiahsien so my aim would be to avoid duplication, so Xcake tries to reduce your include / exclude statements down to the minimum needed to represent what you define in your Cakefile
So in your case if a file is included twice once with a flag and once with, I aim to make it de-duplicate and include the flag. That way doing this would work:
target.include_files 'folder/*.*'
target.include_files 'folder/file.c`, :flags => '-fno-objc-arc'

Thinking of edge cases, here, what about multiple flags and multiple declarations?
target.include_files 'folder/*.*', :flags => '-flag_a'
target.include_files 'folder/file.c', :flags => '-flag_b'
target.incldue_files 'folder/file.*', :flags => 'flag_c'

Is it "de-duplicate and append flag"?
In which case, file.c gets `:flags => '-flag_a -flag_b -flag_c'?
I think that should work.

Current syntax for include_files is to use = ["..."] and << "...", so are you going to change the syntax?

@chiahsien @divergio Good points.
If I was to change how include_files worked then I think << would no longer work at least if you needed :flags and calling include_files would emulate << since it  would just add it to the internal array of files to add.
I could always have a new add_flag or remove_flag method ?

@jcampbell05
I don't think remove_flag method necessary, because files have no flag by default, right?
Maybe a new method called set_files and looks like this:
target.set_files ['folder1/*.m, folder2/*.c'], :flags => ['-flag_a, -flag_b']
(I don't write ruby, forgive me if the syntax isn't correct)

@jcampbell05 any progress about this feature request?

@chiahsien I've started a spike to look into this :), just figuring out what changes are needed.

So its quite a bit of work due to Xcake's architecture but we are working on adding it to Struct https://github.com/lyptt/struct


Update CONTRIBUTORS.csv

changes
Added myself to the list of contributors.
Checks

[x] All commits in this Pull Request are signed and Verified by Github.
[x] All commits in this Pull Request follow the Ockam commit message convention.
[x] There are no Merge commits in this Pull Request. Ockam repo maintains a linear commit history. We merge Pull Requests by rebasing them onto the develop branch. Rebasing to the latest develop branch and force pushing to your Pull Request branch is okay.
[x] I have read and accept the Ockam Community Code of Conduct.
[x] I have read and accepted the Ockam Contributor License Agreement by adding my Git/Github details in a row at the end of the CONTRIBUTORS.csv file in a separate pull request to the build-trust/ockam repository. The easiest way to do this is to edit the CONTRIBUTORS.csv file in the github web UI and create a separate Pull Request, this will mark the commit as verified.

@adincebic We'll merge this shortly.
Thank you for accepting the CLA and taking time to contribute!!
Welcome to the Ockam Community 🥳
If you have questions, as you explore, join us on the contributors discord channel https://discord.ockam.io


Remove noise and add clarity to the resource update section

What's this PR do?
The Updating Resources section had some slightly confusing wording and extraneous content in it. This PR addresses those issues.
Where should the reviewer start?
The section on updating attributes described how to handle a request that "does not include all of the fields for a resource" (emphasis mine). I changed it to only discuss the handling of missing attributes, and added a similar paragraph to the relationships section that discusses the handling of missing relationships.
Also, the sample relationship-updating PATCH requests included some attribute changes. I removed the attribute changes to isolate the relationship changes.
Any background context you want to provide?
Again, my apologies for submitting small stuff like this in the run-up to 1.0.

:+1:

thanks @nonsensery!


ZIP archive of Dart-SDK API missing details in the right navigation column (v3.1.0 to v.3.2.6)

The ZIP archive download of the Dart-SDK API (downloaded from https://dart.dev/get-dart/archive) no longer shows navigation links for a library or class.
The documentation ZIP for v3.0.7 and earlier has three columns: a left navigation column listing the libraries, the main content, and a right navigation column listing the library's classes, constants, functions, etc.
The details in the third column is now missing from the recent ZIP files. The right column in ZIP for v3.1.0 and newer (v3.2.6 at the time of writing) does not have any links in the right navigation column. It just shows the name of the library.

Dart version and tooling diagnostic info

Dart 3.2.5 (but it is irrelevant to this issue)

Whether you are using Windows, macOS, or Linux (if applicable)

macOS (archive extracted using command line "unzip" program, as well as double clicking on the ZIP file's icon in the Finder)

Whether you are using Chrome, Safari, Firefox, Edge (if applicable)

Problem occurs with Safari, Firefox and Chrome.

Thanks for reporting this @hoylen! These versions switched to a shared sidebar to reduce the size of generated documentation for large packages and SDKs. As a result, to view them with the sidebars, you'd need to serve the contents with an HTTP server.
A quick way to do so would be to use package:dhttpd from the unzipped directory:
dart pub global activate dhttpd
dart pub global run dhttpd

Then open the link it prints out in your browser of choice.
As a note, you can also view the API docs for specific versions on api.dart.dev. For example you can find the API docs for Dart 3.1.1 at https://api.dart.dev/stable/3.1.1/index.html.
If you're able to share, I am curious what you're using the downloaded version of the SDK docs for. Perhaps your workflow can be better supported :)
\cc @srawlins This is due to the sidenav change. Do you think the solution for now is to just document that it's required to serve the docs?

Do you think the solution for now is for us to document on dart.dev that it's required to serve the docs?

Yes! Sorry I probably didn't do a good look-around to see what text should be updated.

So that's why it behaves differently. Thanks for the quick reply.
Definitely documenting the need for a Web server is necessary. But most people won't find the documentation when they come across the problem, or know where to look for it. Two possible solutions to that are:

Have the right navigation column show some static HTML text that says something like, "Please serve this documentation from a Web server to use this navigation column" and have it automatically replaced by the real links if it is served up by a Web server. Could some simple JavaScript do that?
The API documentation ZIP archive contain a README file to explain how to install it.

My use case is pretty simple: to access the documentation without needing network access. Because a local copy is slightly faster and to avoid wasting bandwidth. Running a local Web server is not a huge problem, though it is less convenient than simply opening up files in a Web browser.
It appears part of the problem is the browser's Cross-Origin Resource Sharing (CORS) mechanism blocking the page from loading the index.json and sidebar HTML files. I'm not familiar with how CORS works with "file:" URIs or what has changed from the JavaScript generated for the older documentation. Has anyone looked into that (as an alternative to running a Web server)?

I now see why CORS is causing the problem. The new docs.dart.js file invokes XMLHttpRequest and fetch, both of which involve CORS. Browser implementations differ on how CORS behaves with "file" scheme URIs, but they err on the side of security and usually block the requests (even though you might assume a file loading another file should be ok). There is a workaround flag for running Google Chrome, but it is inconvenient and risky to use.
The older version of docs.dart.js does not use XMLHttpRequest. However, it did use fetch. But I haven't looked into why the old invocation of fetch appears to work and the new one does not.
Sounds like serving up the files with a local Web browser is the best approach... as long as the user downloading the ZIP file somehow knows that is how it must be used.


Question: l = ceiling(lg(n)/hashlen)

your code：
l = (BN_num_bits(n)+255) >> 8;
I can not understand this code complement

Firstly, apologies for the delay, your email ended up in my spam folder for some reason.
Secondly, I confess haven't looked at this code for quite a few years now.
In the code, the comment above this line (taken from Section 5.1 of RFC 6508) this says:
/*! 3) l = ceiling(lg(n)/hashlen)                                         */
The divisor (hashlen) is 256, right shifting 8 effectively performs this function.
The addition of 255, before the shift, ensures we get the right number; consider (n+255)>>8 and n>>8, where n is, say, 12.
It is a bit hacky and there may well be better ways of doing this.
If you are looking at opensource MS stacks you may also want to take a look at securechorus.org and their code at https://bitbucket.org/securechorus/


Remove redundant lines for DDP

Use the native DDP class.

Codecov Report

Merging #316 (7f26697) into master (0baea0b) will increase coverage by 0.10%.
The diff coverage is 40.00%.

@@            Coverage Diff             @@
##           master     #316      +/-   ##
==========================================
+ Coverage   67.82%   67.92%   +0.10%
==========================================
  Files          96       96
  Lines       10865    10845      -20
==========================================
- Hits         7369     7367       -2
+ Misses       3496     3478      -18

Impacted Files
Coverage Δ

neural_sp/models/data_parallel.py
53.84% <0.00%> (+12.86%)
:arrow_up:

neural_sp/bin/asr/train.py
65.40% <50.00%> (+0.09%)
:arrow_up:

neural_sp/bin/lm/train.py
72.64% <50.00%> (+0.11%)
:arrow_up:

Continue to review full report at Codecov.

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


Used toast instead of vue-notification

Removed vue-notification dependency.
Used toast instead of vue-notification.

Nice!!


Files always opens dropdown menu when dragging/dropping files to desktop or default File Explorer

Description
Trying to drag and drop files from Files to the Desktop (or File Explorer) opens up a menu asking whether you want to move, copy, or create shortcuts. Also, the default option when dragging is creating a shortcut... which is ridiculous to me. Holding control or shift while dragging doesn't change the dropdown, just makes one option bold (plus #10208 is still annoying).

AND ANOTHER THING: "Create shortcuts here" doesn't even work.
Dragging and dropping from one Files window or tab to another works fine. If this was fixed, I would absolutely use Files as my everyday file manager.
Edit: Apparently this happens in Windows normally when right-clicking and dragging.
Steps To Reproduce

Open Files.
Drag a file or folder to the Desktop or any File Explorer window.
Annoying menu.
If you want to create shortcuts, it doesn't even work.

Steps to fix
Just make it do what File Explorer does (without the menu):

Drag : Move (if source or destination is a network folder, copy)
Ctrl+drag: Copy
Shift+drag: Move
Ctrl+shift+drag: Create shortcut.

Files Version
Version: <IP_ADDRESS>
Windows Version
OS Version: 10.0.19044.2192
Relevant Assets/Logs
debug_fulltrust.log
debug.log

We don't have control over this but we plan on switching to different drag and drop APIs in the future which may solve this.


NSwag Studio Asp.Net Core 2.0 preview

Hi,
It seems that NswagStudio is not compatible with Asp.Net Core 2.0 preview?
I have this error when I try to load the assemblies:
Could not load file or assembly 'Microsoft.AspNetCore.Mvc.ViewFeatures, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified.
Is there a way to fix this problem?

I haven't tested it with .NET Core 2.0, but there may be problems loading .NET Core assemblies because NSwagStudio runs with full .NET (v4.6) and loads the core dlls in a full .NET AppDomain. I'm currently migrating everything to .NET Standard but I have lots of problems when loading .NET Core dlls (more than with the released version v9.12).
But you can try the CI versions, maybe they work better with .NET Core 2.0?
https://ci.appveyor.com/project/rsuter/nswag-25x6o/build/artifacts

For now, you should use the ASP.NET Core middlewares (NuGet: NSwag.AspNetCore) and generate the swagger spec in the web app process... this way you can avoid all these dll loading problems... (just start the web app [with app.UseSwaggerUi(....)] and import the swagger url in NSwagStudio

I will test that on Monday, but it seems to be a good solution, thanks :)

Yes, with this option you have many more extension points and ways to customize the outcome
see https://github.com/NSwag/NSwag/wiki/Middlewares

Can you try with the latest CI build?
I worked on the assembly loader and maybe it now works also for .NET Core 2.0 projects
https://ci.appveyor.com/project/rsuter/nswag-25x6o/build/artifacts
https://www.myget.org/gallery/nswag-ci

Btw: It seems that not all dlls are available, try publishing first:
dotnet publish

Still the same error

So with swagger-ui, it works well, but the name of the service Change, instead of UserService.GetUsers(), I know have apiUserGetUsersGet() or ShopLocationService.DeleteShopLocation is now apiShopLocationDeleteShopLocationDelete.
Is there a way to configure it as It was?
Moreover, I have an error for all my delete functions:
Error	TS2322	(TS) Type 'Observable<{}>' is not assignable to type 'Observable'.
Type '{}' is not assignable to type 'void'.
On this part:
```
return Observable.fromPromise(this.transformOptions(options_)).flatMap(transformedOptions_ => {
        return this.http.request(url_, transformedOptions_);
    }).flatMap((response_) => {
        return this.transformResult(url_, response_, (r) => this.processApiShopChainDeleteShopChainDelete(r));
    }).catch((response_: any) => {
        if (response_ instanceof Response) {
            try {
                return this.transformResult(url_, response_, (r) => this.processApiShopChainDeleteShopChainDelete(r));
            } catch (e) {
                return <Observable<void>><any>Observable.throw(e);
            }
        } else
            return <Observable<void>><any>Observable.throw(response_);
    });

You need to use MultipleClientsFromOperationId as OperationGenerationMode setting to preserve the names:
https://github.com/NSwag/NSwag/blob/master/src/NSwag.Commands/Commands/OperationGenerationMode.cs
Can you provide the signature of a delete operation method?

The C# code:
```
[HttpDelete]
public async Task DeleteShop([FromQuery]Guid id)
{
var currentUser = await GetCurrentUserAsync();
        var shop = await _shopManager.FindShopByIdAsync(id, currentUser);

        if (shop == null)
        {
            return NotFound();
        }

        await _shopManager.DeleteShopAsync(shop);

        return Ok();
    }

From SwaggerUi
![deleteshop](https://cloud.githubusercontent.com/assets/1764519/26787160/fe26dd30-49d6-11e7-8ad9-78e80b5a1459.PNG)

I already used MultipleClientsFromOperationId , but I probably misconfigured something?

Use the ProducesResponseType attribute with typeof(void) and status code 204 (or 200?) on the operation to specify that it does not have a response...

https://github.com/NSwag/NSwag/wiki/WebApiToSwaggerGenerator

For the delete problem:
Stil the same error:
Type '{}' is not assignable to type 'void'
With error 200 or error 204:
        [HttpDelete]
        [ProducesResponseType(typeof(void), 200)]
        public async Task<IActionResult> DeleteOffer([FromQuery]Guid id)

I will try to follow the configuration from:
https://github.com/NSwag/NSwag/wiki/WebApiToSwaggerGenerator
Thanks for your quick help 👍

So from I read:

The WebApiToSwaggerGenerator class is used to generate a Swagger specification from ASP.NET Web API controllers:
var settings = new WebApiToSwaggerGeneratorSettings
{
DefaultUrlTemplate = "api/{controller}/{action}/{id}"
};
var generator = new WebApiToSwaggerGenerator(settings);
var document = await generator.GenerateForControllerAsync();
var swaggerSpecification = document.ToJson();

Currently my controller is :
[Authorize]
 [Route("api/[controller]/[action]")]
 public class ShopController

So It seems well configured. The only difference I see is the id.
From Swagger.json, I can see that:
"/api/Shop/GetShop": {
   "get": {
     "tags": [
       "Shop"
     ],
     "operationId": "ApiShopGetShopGet",
     "consumes": [],
     "produces": [
       "text/plain",
       "application/json",
       "text/json"
     ],
     "parameters": [
       {
         "name": "id",
         "in": "query",
         "required": false,
         "type": "string",
         "format": "uuid"
       }
     ],
     "responses": {
       "200": {
         "description": "Success",
         "schema": {
           "$ref": "#/definitions/ShopDto"
         }
       }
     }
   }
 },

From what I understand, the generated code use the OperationId, how to configure it to become ShopService.GetShop?

i need to do advance other things currently, i will look at it this week i hope, thank you for your help,  i will let you know

.NET core 2.0 support has been added. Can you test with latest ci builds?


Drupal 8 test should run phpunit

With the adoption of PHPUnit in Drupal 8, hopefully more projects will write unit tests as part of development. Running these with the test task would be great. I would recommend against automatically running simpletests, as these can take hours, but perhaps an option to do so?

Next steps:

Include PHPUnit and dependencies OR use the PHPUnit included with the D8 build
GDT config for identifying tests to run
Add Grunt task for running PHPUnit (use Grunt plugin or direct shell command)

Note: This depends on a operational Drupal docroot.

In addition to PHPUnit, we'll want to run Kernel and Web/Browser tests. Essentially:
core/scripts/run-tests.sh --directory=./modules/custom

This is an example of the run-test command:
php core/scripts/run-tests.sh --verbose --color --concurrency 4 --php which php --url http://msk.devl --directory ./modules/custom/msk_book


Add a sound effects example

Objective
Using sound effects is a common use case, and robust idiomatic patterns are hard to discover.
While we could add this as a feature to bevy_audio, the underlying logic is simple and the exact strategies for how these things should be customized are flexible enough that I think it makes more sense as an example, at least for now.
Fixes #12652.
Solution
This PR adds a fairly basic example, demonstrating how to load and play randomized, non-repeating sound effects.
I've tried my best to balance not overengineering the design (but we could use string parsing and folder loading! add in volume control and spatial audio!) and making sure that users don't design themselves into a corner with a nice AsRef<str> pattern that supports both string sound effect ids and enums.
After feedback from reviewers, I've cut the "don't repeat the sound effects" in favor of adding a bit more complexity in the form of custom commands and optional PlaybackSettings support for the sound effects, which allows callers to customize the speed and volume of the SFX.
Testing
The example runs and behaves as expected without crashing. Just use cargo run --example sound_effects.
Showcase

There's a bit much of explaining general Rust concepts—like default implementations—for my taste, but I'll trust your intuition here. It's very much possible that this is advanced enough to warrant explanation and I'm simply biased because of my familiarity.

Yep, this example is targeted at "beginner to Rust who just wants to make games". This example is relatively basic / focused on showcasing good patterns, so I want to be explicit about the techniques being used. When learning, I found these small tricks really confusing and hard to look-up: there's no obvious term to Google!

Closing per https://github.com/TheBevyFlock/bevy_quickstart/pull/264#issuecomment-2290209089. We don't have the tools in bevy_audio to do a nonhacky solution IMO.


Add support for js 0.7.0

This package currently depends on js ^0.6.3. It should be bumped to support the latest js ^0.7.0 version

@zihejia @jaredmixpanel Do you continue to support this library? We are waiting for a dependency update, and there has been no update for 3 months, not even such a simple thing as bumping up the versions of the internal libraries. This blocks us from updating other libraries in our own project.

hi @Fudal , we apologize for the delay and any inconvenience it may have caused, we will do a release by early next week, which will also include some additional fixes.

@zihejia any updates for the JS version bump please? It's blocking updates to other packages that need to be updated ASAP.

It's included in version 2.3.0! Thanks for your patience!


Update download.dd

Append installation instructions for OpenSUSE Tumbleweed (rolling release distribution of OpenSUSE). I'm not sure if this is applicable for other versions of OpenSUSE. I'm assuming for the stable release (OpenSUSE 42.3) you would need to add a development repository, but I haven't confirmed.
If dmd is not available in the basic repos of stable releases, then users would probably need to add the dlang:devel repo pertaining to their release version:
https://software.opensuse.org/download.html?project=devel%3Alanguages%3AD&package=dlang-tools

Do we know if the zypper DMD version is maintained? We don't want to link to something outdated.

I'm not sure, I'll leave the definition of 'maintained' up to you. This is the version dmd I downloaded using zypper:
$ dmd --version
DMD64 D Compiler v2.076.1
Copyright (c) 1999-2017 by Digital Mars written by Walter Bright

Well, it is a version behind. But someone seems to be maintaining it.


Minimize list of supported OpenShift versions

Describe the solution you'd like
Kanister seems to support OpenShift 3.11, 4.4, 4.5 and 4.10.
Would it make sense to support only the latest of every supported major version? As of this writing this would mean only 3.11 and 4.10.
Care should be taken to consider all consumers of Kanister.
Additional context
As suggested here: https://github.com/kanisterio/kanister/pull/1499#discussion_r906306094

Valid

I'd vote for the last 4 versions rotational support, i.e. currently it is 4.11,4.12,4.13,4.14


WIP: Add curl library to support multiple proxies

Use curl to support proxies, it will also be easier to add cookie support.
Switch FacebookBridge to use the new curl wrapper.
The curl wrapper will search all files in proxylist/ for proxies, and randomly picks one to use. For the proxy URL string syntax, refer to PROXY PROTOCOL PREFIXES section in curl manpage. Example: <IP_ADDRESS>:8080 is a HTTP proxy, curl also supports SOCKS.

This PR contains some commented out code, might be useful for future enhancements, so I lefted it there.
Also, if the maintainers would like to split these features into multiple PRs, I would also be happy to do that.

Great work!
The usage of multiple bridges was also proposed in #460 (also related to Facebook), so I would like to give it some attention. (I think this can be made a bit more generic by abstracting getSimpleHTMLDOM and getSimpleHTMLDOM based on your implementation)
Can you please split all changes done to FacebookBridge into a separate PR?
I see you have already done that with a portion in #468

Hey I opened a new pull request #531 that only contains contents_curl.php, and fixes are applied there.


cloudflare_ruleset rule action_parameters bic invalid JSON: unknown field "bic"

Confirmation

[X] My issue isn't already found on the issue tracker.
[X] I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version
terraform -v
Terraform v1.7.5
on darwin_arm64
Affected resource(s)
cloudflare_ruleset

rules
action_parameters
- bic = false

Terraform configuration files
resource "cloudflare_ruleset" "qa_whitelist_ruleset" {
  zone_id     = cloudflare_zone.api_qa.id
  name        = "QA Whitelist"
  description = "QA whitelist"
  kind        = "zone"
  phase       = "http_request_firewall_custom"

  rules {
    action      = "block"
    expression  = format("%s%s%s", "(not ip.src in $", cloudflare_list.qa_whitelist_list.name, ")")
    description = "Block all traffic not in qa whitelist list"
  }
  rules {
    action = "skip"
    action_parameters {
      bic = false
    }
    expression  = format("%s%s%s", "(ip.src in $", cloudflare_list.qa_whitelist_list.name, ")")
    description = "Skip browser integrity check for whitelisted ips"
  }
}

Link to debug output
cloudflare_ruleset.qa_whitelist_ruleset: Modifying... [id=xxxxx] ╷ │ Error: error updating ruleset with ID "xxxxx" │  │   with cloudflare_ruleset.qa_whitelist_ruleset, │   on cloudflare.tf line 56, in resource "cloudflare_ruleset" "qa_whitelist_ruleset": │   56: resource "cloudflare_ruleset" "qa_whitelist_ruleset" { │  │ invalid JSON: unknown field "bic"
Panic output
No response
Expected output
Creation of new rule with action as skip and bic turned off
Actual output
cloudflare_ruleset.qa_whitelist_ruleset: Modifying... [id=xxxxx] ╷ │ Error: error updating ruleset with ID "xxxxx" │  │   with cloudflare_ruleset.qa_whitelist_ruleset, │   on cloudflare.tf line 56, in resource "cloudflare_ruleset" "qa_whitelist_ruleset": │   56: resource "cloudflare_ruleset" "qa_whitelist_ruleset" { │  │ invalid JSON: unknown field "bic"
Steps to reproduce
Attempt to create new cloudflare_ruleset with action_parameters bic set to false. Plan will run fine and valid when applying will get invalid json unknown feild
Additional factoids
Upon creating the resource via the console and importing into terraform running plan gives this output.
`  ~ resource "cloudflare_ruleset" "qa_whitelist_ruleset" {
id          = "xxxxxxxx"
name        = "QA Whitelist"
# (4 unchanged attributes hidden)
  ~ rules {
      ~ id           = "xxxxxxxx" -> (known after apply)
      ~ last_updated = "2024-04-11 20:48:30.459208 +0000 UTC" -> (known after apply)
      ~ ref          = "xxxxxxx" -> (known after apply)
      ~ version      = "2" -> (known after apply)
        # (4 unchanged attributes hidden)
    }
  ~ rules {
      ~ id           = "xxxxxxx" -> (known after apply)
      ~ last_updated = "2024-04-11 20:48:30.459208 +0000 UTC" -> (known after apply)
      ~ ref          = "xxxxxxxx" -> (known after apply)
      ~ version      = "1" -> (known after apply)
        # (4 unchanged attributes hidden)

      ~ action_parameters {
          + bic      = false
          - products = [
              - "bic",
            ] -> null
          + version  = (known after apply)
        }

      - logging {
          - enabled = true -> null
        }
    }
}`

References
https://developers.cloudflare.com/rules/configuration-rules/terraform-example/.  - Cloudflare example
https://github.com/cloudflare/terraform-provider-cloudflare/issues/3215 - similar issue

this is an unfortunately vague error message that the team are addressing however, it means you've used the wrong action parameter attribute for the action.


Leaky abstraction in OpenPechFS's path arg

How it's leaky abstraction?
output_path is the path to store all the pechas created by the formatters. It defaults to ~/.openpecha/pechas/
But in OCRFormatter's create_opf, the output_path is passed as path of OpenPecha which is opf_path
now, the caller code, eg OCR-pipelines, needs to create opf_path for pecha, which in turn requires to create pecha_id. But the pecha_id generation is handled by Metadata, which is only created in the Formatters.  So, with currently implementation, pecha will be saved at opf_path created by caller code. Since, it's doesn't have access to Metadata creation, metadata will generate new pecha_id. Now, we ended up with different, pecha_id in opf_path and `meta.yml.
Therefore, I think this is a leaky abstraction. The caller code only needs to provide where to store the all the pechas to the Formatters.
Why this problem exists?
I think, there is two scenarios, creating and loading pecha and we don't have clean way to handle these two.
Solution
1. When Creating new pechas
We should initialise the pecha object with the actual data like, base, layers, metadata, etc.
When saving, we should provide output_path which is the parent path of the pecha path like {output_path}/{pecha_id}/{pecha_id}.opf. Now the output_path is configurable, which is desired behaviour.
class OpenPechaFS(OpenPecha):
    ...
    @property
    def opf_path(self):
        return self.base_path / self.pecha_id / f"{self.pecha_id}.opf"

    def save(output_path: Path) -> Path:
        self.base_path = output_path
        ...
        return self.opf_path

2. When Loading existing pechas
I think we should go with classmethods, for eg:
pecha = OpenPechaFS.from_path(<path_to_pecha>)  # loads local pecha

pecha = OpenPechaFS.from_id(<pecha_id>)  # downloads pecha from github

pecha = OpenPechaGitRepo.from_commit_sha(<commit_sha>)  # loads pecha from specific commit sha

I disagree with the first idea. I think you're wanting to make OpenPechaFS a very high level class, but I think it's not a good idea. I think we need a class that interacts with a local .opf folder and that's it, I think the current state of OpenPechaFS is just that so I wouldn't change it.
Now, I also agree we need a high-level class that reserves an ID, create the repo on github, downloads it, etc. and that's OpenPechaGitRepo. So I would do instead:
pecha = OpenPechaFS(<path_to_pecha>) # no change

pecha = OpenPechaGitRepo(base_path, <pecha_id>=None, <rev>="main")  # downloads pecha from github if it exists, otherwise create one with the id. If pecha_id is None, reserves a new id

Note that if we add the rev argument, the path on disk should be changed to self.base_path / self.pecha_id + "_" + self.rev / self.pecha_id + ".opf". Otherwise you're going to get bugs when opening one pecha at two different revisions (since they'll share the same folder). I think it's a good thing overall, good idea!
Also, I think the creation of a new openpecha id should not be hidden deep in the Metadata generation, it should be a static method of OpenPechaGitRepo that anyone can use:
pecha_id =  OpenPechaGitRepo.reserve_new_id() # reserves a new id that is not currently in use on github

Note that in ocr_formatter you can then use OpenPechaGitRepo.reserve_new_id() to pass the pecha_id argument to create_opf, I think that's a small thing you can do that should solve your current issue
I think having output_path in the __init__ of  OCRFormatter is not ideal, it would be better to have opf_path as an argument of create_opf. That way the OCRFormatter doesn't need to deal with creating a new ID, cloning github repos, etc. which I think shouldn't be its job, it's just there to write some files in an opf.
And finally, I think it would be much cleaner if we had a method create_in_op method in OCRFormatter. That way everything is abstracted correctly, we already have our OpenPecha object in the function, it can be of any subclass of OpenPecha, that's the cleanest solution.
What do you think?

in ocr-pipelines you can do something like:

git_pecha = OpenPechaGitRepo(base_path)
opf_path = git_pecha.

it would be better to have opf_path as an argument of create_opf. That way the OCRFormatter doesn't need to deal with creating a new ID.

so, that means, the caller/client code using the Formatter has to make prepare opf_path?


test/e2e: Remove duplicate package imports

Description of the change:
Removes duplicate package imports for some of the test files in the e2e package.
Motivation for the change:
Tech debt, cleanup, etc.
Reviewer Checklist

[ ] Implementation matches the proposed design, or proposal is updated to match implementation
[ ] Sufficient unit test coverage
[ ] Sufficient end-to-end test coverage
[ ] Docs updated or added to /docs
[ ] Commit messages sensible and descriptive

/lgtm

/approve


Hide nbdev import

Hide the imports of nbdev.

Thanks that's a good idea. Please remove the changes not related to hiding nbdev from this PR. We only want one issue handled per PR.

There were cells where the import of nbdev was not alone. In those cases, I just moved the other imports to the precedent cell. These are the only additional changes.

Have a look at the diff - there's quite a few changes to what's being exported.

I understand and I am going to fix them. Nevertheless, there is one case where I think the new export is necessary:

Your previously mentioned second case corresponds to the notebook nbs/00_torch_core.ipynb: https://github.com/fastai/fastai2/pull/530/files#diff-b1e719d4fd7782e7ac23d27b467c08be

The cell containing the nbdev import, also contained from PIL import Image
I have moved this import to the precedent cell
Note that the precedent cell is exported to the library file torch_core.py
Also note that Image is required in the library file torch_core.py, in the definition of the function to_image(x): https://github.com/fastai/fastai2/blob/2a4de50325c94b09561303cf8092bc636ee13c99/fastai2/torch_core.py#L654
Currently this generates an Unresolved reference error
My PR fixes this

I am removing all changes other than hiding nbdev from this PR and I will eventually create another PR to fix the Unresolved reference errors.

Many thanks!


Change domain name

The ItIntrospectVersion and ItConfigDistributionStrategy are using the same persistent volume names which are derived from domainUid + "-pv"
When these tests are running in parallel the pv creatiopn fails in one of the test due to the fact that pv are cluster objects.
This PR changes the domain name used in the test to be different to avoid this conflict.

Have tests been run?

Have tests been run?

Its currently running. Will update the PR with results once done.


Implement history of opened accounts

I am currently using this application for tracking my money, and whenever i open it, i need to open my account from its saved location everytime. It would be great if history would be implemented, so whenever you exit the application, it saves the locations of opened accounts last time app was running, and it reopens the same accounts when you start the app again, and if previously opened account does not exist (incase user deleted that): simply not open that one

That's how my other applications work, for example Tagger remembers the last opened folder and reopens it on startup. However, I feel like this isn't good design for Money as Money is for of a document editor (similar to Writer/Text Editor) it edits multiple documents and starting them up everytime on startup seems like bad UX.

However, I was thinking of creating a recents flyout in the account button of the headerbar:

Recent flyout would also work

https://github.com/nlogozzo/NickvisionMoney/releases/tag/2022.11.0-beta5


Fix product images

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

Please upload report for BASE (develop@ba673fd). Learn more about missing BASE report.

Additional details and impacted files
@@             Coverage Diff             @@
##             develop       #37   +/-   ##
===========================================
  Coverage           ?   100.00%
===========================================
  Files              ?         1
  Lines              ?         4
  Branches           ?         1
===========================================
  Hits               ?         4
  Misses             ?         0
  Partials           ?         0

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


zsh-autosuggestions breaks "zstyle completion menu select" highlighting

What's the expected behavior:
Enabling zsh-autosuggestions should work with the zstyle ':completion:*' menu select. Pressing multiple time tab after a command should highlight the current selection.

What's happening instead:
Pressing multiple time tab after a command, a completion is selected in the command line but it is not highlighted in the completion menu.

I have the same issue. Did you find a solution?

Don't have the issue here using zsh 5.4.2 on Ubuntu 18.04.1. Is it still present in your case?

Just to revive this, I still have the same issue. Did anyone of you find a solution?

@reedts this fixed for me:
https://unix.stackexchange.com/questions/267551/how-can-i-configure-zsh-completion-to-launch-a-menu-for-command-options
Also my .zshrc
CASE_SENSITIVE="false"
setopt MENU_COMPLETE
setopt no_list_ambiguous

autoload -Uz compinit
compinit
zstyle ':completion:*' menu yes select

@joaomantovani Thanks! Got it working now.

@reedts this fixed for me:
https://unix.stackexchange.com/questions/267551/how-can-i-configure-zsh-completion-to-launch-a-menu-for-command-options
Also my .zshrc
CASE_SENSITIVE="false"
setopt MENU_COMPLETE
setopt no_list_ambiguous

autoload -Uz compinit
compinit
zstyle ':completion:*' menu yes select

This didn't fix it for me, anyone else having this issue?


Switch to Base64 encoding for the consignments

Consignments currently use Bech32m encoding for ASCII armoring.
The main features of Bech32 is reduction of probability of typing mistakes. This is achieved by:

use of only non-delimiter characters (helps selecting text with a single click);
avoiding visually-ambiguous characters;
checksums (works up to 512 bytes, otherwise have restricted use)

All these features make sense only for short data, which can be read in voice and typed by hand. Even small RGB contract genesis doesn't fit that limit and they would not be transferred in voice.
However, Bech32 makes sense only for short data, while the cost of Bech32 features is the increase of the textual representation (twice longer than in Base64).
Thus, it is advisable to switch to Base64 as the most short representation, which is already used in similar cases (for instance, PSBTs).
To differentiate from PSBT it is advised to start using ASCII armoring like it is used in PGP/GPG. A 120-bit checksum should also be added to the standard.
Depends on upstream: https://github.com/LNP-BP/rust-lnpbp/issues/224

Completed with addition of Bindles


[Event Request] codeunit 333 "Req. Wksh.-Make Order" - CheckRequisitionLine

Can we please get the following events to Add custom Handlings and being able to disable some checks on special conditions?
procedure CheckRequisitionLine(var ReqLine2: Record "Requisition Line")
var
    SalesLine: Record "Sales Line";
    Purchasing: Record Purchasing;
    TableID: array[10] of Integer;
    No: array[10] of Code[20];
    CheckIsHandled: Boolean; //NEW
    CheckQuantity: Boolean; //NEW
    CheckReplenishmentSystem: Boolean; //NEW
begin
    OnBeforeCheckRequisitionLine(ReqLine2, SuppresCommit, CheckIsHandled);//NEW
    if not CheckIsHandled then begin//NEW
        with ReqLine2 do begin
            if ("No." <> '') or ("Vendor No." <> '') or (Quantity <> 0) then begin
                TestField("No.");
                //+NEW
                //-if "Action Message" <> "Action Message"::Cancel then
                CheckQuantity := "Action Message" <> "Action Message"::Cancel;
                OnCheckRequisitionLineOnBeforeCheckQuantity(ReqLine2, CheckQuantity);
                if CheckQuantity  then
                //-NEW
                    TestField(Quantity);
                //+NEW
                //-if ("Action Message" = "Action Message"::" ") or
                //-   ("Action Message" = "Action Message"::New)
                CheckReplenishmentSystem:= ("Action Message" = "Action Message"::" ") or ("Action Message" = "Action Message"::New);
                OnCheckRequisitionLineOnBeforeCheckReplenishmentSystem(ReqLine2, CheckReplenishmentSystem);
               if CheckReplenishmentSystem
                //-NEW
                then
                    if "Replenishment System" = "Replenishment System"::Purchase then
                        TestFieldsForPurchase(ReqLine2)
                    else
                        if "Replenishment System" = "Replenishment System"::Transfer then begin
                            TestField("Location Code");
                            if "Planning Line Origin" = "Planning Line Origin"::"Order Planning" then
                                TestField("Supply From");
                            TestField("Transfer-from Code");
                        end else
                            OnCheckFurtherReplenishmentSystems(ReqLine2);
            end;

        //...
    end;
    end;//NEW
    OnAfterCheckReqWkshLine(ReqLine2, SuppressCommit);
end;

Event 1: OnBeforeCheckRequisitionLine
[IntegrationEvent(false, false)]
local procedure OnBeforeCheckRequisitionLine(var RequisitionLine: Record "Requisition Line"; CommitIsSuppressed: Boolean; var Handled: Boolean)
begin
end;

Event 2: OnCheckRequisitionLineOnBeforeCheckQuantity
[IntegrationEvent(false, false)]
local procedure OnCheckRequisitionLineOnBeforeCheckQuantity(var RequisitionLine: Record "Requisition Line"; var Handled: Boolean)
begin
end;

Event 3: OnCheckRequisitionLineOnBeforeCheckReplenishmentSystem
[IntegrationEvent(false, false)]
local procedure OnCheckRequisitionLineOnBeforeCheckReplenishmentSystem(var RequisitionLine: Record "Requisition Line"; var Handled: Boolean)
begin
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


Adding email template references into user model

Email template references added to user model and resource model and all references removed.

Looks good, no problems.


fix: updated to latest dataclases-avroschemas

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

Project coverage is 94.92%. Comparing base (8d7f2e9) to head (76577bc).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #215   +/-   ##
=======================================
  Coverage   94.92%   94.92%
=======================================
  Files           5        5
  Lines         138      138
=======================================
  Hits          131      131
  Misses          7        7

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


Reset a devices intencity level

I use Ha-bridge anderen Alexa to control my TV via a selfmade RPi IR remote. With DIM I can say turn up TV and the volume goes up by e.g. three ticks. However, Alexa remembers the intencity level of the device and will not increase the volume if it is at maximum, or decrease at minimum. Is there a way to tell Alexa that the intencity is e.g. at 50% after each command, in order to only use relativ intencity?

This is an extension that was made on the ha bridge to do this: https://github.com/bwssytems/ha-bridge#update-bridge-internal-light-state

Yes, that seems like it should do the trick. Yet, I have difficulties getting it to work...
On DIM I want to run my script and then reset the brightness to 127, but the call
curl -H "Content-Type: application/json" -X PUT -d "{ "on": true , "bri": 127 }" http://<IP_ADDRESS>:8081/api/devices/lights/1/bridgeupdatestate

doesn't change either. In fact, the "bri" does also not work for a simple /lights/1/state PUT, only ON/OFF works here. The log states:
com.bwssystems.HABridge.hue.HueMulator - Update state requested: devices from <IP_ADDRESS> body: { on: true , bri: 127 }
Any idea what's wrong/missing here?

What version are you running? And I'll take a look.

Version 4.0.2, and just updated to 4.0.3, still the same.

Ok, you can do this call to see what the value is after the bridgeupdatestate to verify
GET http://<IP_ADDRESS>:8081/api/dummyuser/lights/1 and look at the bri value

Yes, I did that, it does not change. "Bri" does also not change if I use state instead of bridgeupdatestate. Maybe thats part of the problem. However, On/off works with state.

There are no errors returned on your call? I tested this and it is working fine with your body as the payload.

Could you post the return of the curl call, it will have a messsage

I only get [] for the above PUT call, no success message or something

So that is a problem.

put single quotes around the body, the double quotes end up matching in the command line

Well, that solved something, how foolish.. Now I receive success Messages for both and the values are updated correctly. Nevertheless, the Main Problem remains.
When I use bridgeupdatestate in the DIMurl the new brightness is still taken from the Input  e.g. Test value, and not the one from my put call. Hence, the brightness is not 'reset'.

Change the order, If you want a specific value to start from, set it first then do the next call.

Of course, the thing is, that bridgeupdatesate does not seem to work for the requesting device itself, since my entered default brightness is never set.
If I just add one task to the dim section of device 1:

Type: Http Device
Target item: http://<IP_ADDRESS>:8081/api/devices/lights/1/bridgeupdatestate
Http Verb: PUT
Http Body: {"on": true,"bri": 127}
Content Type: application/json

After calling the DIM, the brightness level is not 127 but the input value. On the other hand, there is no problem in using bridgeupdatestate to change the brightness for a different device (e.g. 4 instead of 1). Seems to me like I cannot call bridgeupdatestate for the requesting device..?

I believe this implementation will let you control what you want #358

So, have you tried v4.1.0 and use the setting to not track state for a device and then use the update state command to set it?

That works perfect! I just tell Ha_bridge to not update the device and preset the brightness to 127. Then, all I have to do is forward the intensity. Accordingly, the relative change is simply (intensity.byte - 127). Thanks for this great solution!


Macroify break_if_debugger ?

This would be a breaking change.  Not that much different from what I'm already doing with #[inline(always)] in terms of trying to force inlining.  Would have the advantage of working on linux, which is failing to inline the function (too big?).
Alternatively, poke at the code until it inlines properly.

See https://github.com/MaulingMonkey/bugsalot/tree/dead-macroify-break-if-attached
This is mostly to fix linux not force-inlining break_if_debugger though, maybe there's a better solution for that...


Move getting commits by tags to separate function

This change is suggested for consistency of "trigger_tests_cli_command_logic" function on cli.py.
Added "get_commits_by_tag" and related unit test by analogue with earlier added "get_commits" (renamed to "get_commits_by_branch").

This PR doesn't have changes fron https://github.com/redis/redis-benchmarks-specification/pull/216 and should be rebased after #216 merge or vise versa.

"Run TOX" is failing due to unused var. "Fixed" in #216


Error when trying to reproduce on Colab Pro Plus with A100 GPU

I am getting the following error when runing the notebook on colab pro plus with one A100 GPU:
  File "main.py", line 812, in <module>
    trainer = Trainer.from_argparse_args(trainer_opt, **trainer_kwargs)
  File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/trainer/properties.py", line 421, in from_argparse_args
    return from_argparse_args(cls, args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/utilities/argparse.py", line 52, in from_argparse_args
    return cls(**trainer_kwargs)
  File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/trainer/connectors/env_vars_connector.py", line 40, in insert_env_defaults
    return fn(self, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/trainer/trainer.py", line 446, in __init__
    terminate_on_nan,
  File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/trainer/connectors/training_trick_connector.py", line 50, in on_trainer_init
    self.configure_accumulated_gradients(accumulate_grad_batches)
  File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/trainer/connectors/training_trick_connector.py", line 66, in configure_accumulated_gradients
    raise TypeError("Gradient accumulation supports only int and dict types")
TypeError: Gradient accumulation supports only int and dict types

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 909, in <module>
    if trainer.global_rank == 0:
NameError: name 'trainer' is not defined

This can happen if the model (sd-v1-4-full-ema.ckpt) is not present where the main.py expects it to be (local directory). Is the model present in your local direcotry?

I face the same issue.
But in the Pokemon example notebook, the ckpt_ path is defined already here:
ckpt_path = hf_hub_download(repo_id="CompVis/stable-diffusion-v-1-4-original", filename="sd-v1-4-full-ema.ckpt", use_auth_token=True)
Am I missing something?

I did that too, but I still receive this error:

Has anyone been able to resolve this?

I don't think it's a path issue b/c ckpt_path = hf_hub_download(repo_id="CompVis/stable-diffusion-v-1-4-original", filename="sd-v1-4-full-ema.ckpt", use_auth_token=True) returns the right path in the /root directory to the .ckpt file.
And I don't think it's the wrong argument to lightning.trainer.accumulate_grad_batches="$ACCUMULATE_BATCHES" because I have ACCUMULATE_BATCHES = 1 set to one.

For reference, I'm trying to train this on a single GPU, and so is the OP from the sounds of it (running "the notebook on colab pro plus with one A100 GPU") , so I don't know if that affects the setup here (in particular does ACCUMULATE_BATCHES need to be a different value?)
For reference, my python main.py call is (had to change --gpus "$gpu_list" \ to --auto_select_gpus \ b/c I was getting a different error (error: argument --gpus: invalid _gpus_allowed_type value: ''):
(python main.py \
    -t \
    --base "$YAML-PATH" \
    --auto_select_gpus \
    --scale_lr False \
    --num_nodes 1 \
    --check_val_every_n_epoch 10 \
    --finetune_from "$ckpt_path" \
    data.params.batch_size="$BATCH_SIZE" \
    lightning.trainer.accumulate_grad_batches="$ACCUMULATE_BATCHES" \
    data.params.validation.params.n_gpus="$NUM_GPUS" \
)

with
BATCH_SIZE = 4
N_GPUS = 1
ACCUMULATE_BATCHES = 1

same issue here with colab a100
main.py: error: argument --gpus: invalid _gpus_allowed_type value: ''

解决了对NUM_GPUS的更改。在带有 A100 的 colab pro+ 上运行
# A100:
BATCH_SIZE = 4
NUM_GPUS = 1
ACCUMULATE_BATCHES = 1

gpu_list = ",".join((str(x) for x in range(NUM_GPUS))) + ","
print(f"Using GPUs: {gpu_list}")

Hello,I encountered this problem on colab. Have you encountered it?How to solve this problem?

It has been a while. I would rather use this colab notebook for training.
https://github.com/Linaqruf/kohya-trainer


Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './cid' is not defined by "exports" in /node_modules/multiformats/package.json

I am using Node.js 16.14.2, npm 8.19.2.
It seems like module 'orbit-db' is a CommonJS module. So I have the following simple Node.js script:
test.js
const OrbitDB = require('orbit-db')
Which is taken from your documentation here:
module-with-ipfs-instance
I am trying to run it like this:
$ node test.js
But I'm getting the following error:
$ node test.js
node:internal/modules/cjs/loader:488
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './cid' is not defined by "exports" in /node_modules/multiformats/package.json
    at new NodeError (node:internal/errors:371:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:453:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:671:7)
    at resolveExports (node:internal/modules/cjs/loader:482:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/node_modules/orbit-db/src/orbit-db-address.js:3:17) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Orbitdb uses the multiformats module which seems to be an ES module. So how can I require/import the Orbitdb module?

I was able to fix by dowgrading multiformats to v9.9.0
rm node_modules/multiformats
yarn add<EMAIL_ADDRESS>

I was able to fix by dowgrading multiformats to v9.9.0
rm node_modules/multiformats
yarn add<EMAIL_ADDRESS>

this worked for me as well

This should be fixed in 1.0.0. Note the new package name.
If the issue persists, feel free to re-open the issue.


changed / import to ( )

Spaces inside () are awful. Please don't ever write ( foo ) in Python (or any other programming language). :)
Regardless of this, we do not accept style-related PRs.

@ThiefMaster, it's a Js recommendation. thnx for info!

This is not JS, and common JS style guides such as prettier's ruleset, eslint defaults or the airbnb style guide do not use any spacing inside (...), only inside { ... }

yes not rel to py. btw the () is John Resig's Jquery standard

...which is awful :)


fix: Replace glob-promise with a later version of glob to avoid problems with glob-promise's incorrect peer dependency

In 9.x, the glob package removed the callback option as it now supports promises instead.
However, glob-promise had a peer dependency of '*', which meant it was possible for it to use 9.x and later - resulting in no output from jsii-docgen, as the callback was never called.
This commit removes glob-promise, and updates the version of glob to one which provides the same functionality of glob-promise.
Fixes #984

I'm not very familiar with projen - I removed the glob-promise line in .projenrc.js, and bumped the glob version in package.json. Please let me know if I missed anything.

If you want to keep glob-promise instead of bumping glob, it looks like more recent versions of glob-promise have appropriate peerDependencies.
I felt removing a package where possible would be better, so that's the option I went with in this PR.

I did, but I don't normally use yarn, so I might have something misconfigured.  I have yarn 1.22.17.
What part is unexpected? I would expect the lock file to change when changing packages, and as I understand it yarnpkg.com is just an alias for npmjs.org (although I don't know why it switched them out - I don't see anything in my environment that might tell yarn to behave differently from default).

I took a look - my best guess is that it changed the resolutions because I accidentally made a package-lock.json (after I installed with npm), and when I realised that I needed to update the yarn lock, I reckon yarn install just copied the resolutions out of my uncommitted package-lock? Maybe.
I'll update the PR with a force-push

Done. Now this PR doesn't have the yarnpkg.com -> npmjs.org change.

@TimothyJones Build on main passes, so this seems to be some genuine failure.

I‘ll take a look. From memory I couldn’t get main to pass locally, so I can’t promise I will get very far

It seems to need node16 to build/test, if that helps.

Thanks, that's helpful. I've also discovered that test fails unless you build first (which also runs the tests, even though there's no post build script?).
I guess that's something to do with projen, which I'm also not familiar with - contributing instructions mentioning yarn, node, and any task dependencies would really help ;)
Anyway, I'll take a look and see if I can reproduce + fix the failure.

Thanks, that's helpful. I've also discovered that test fails unless you build first (which also runs the tests, even though there's no post build script?).

You can probably run compile and then test

I guess that's something to do with projen, which I'm also not familiar with - contributing instructions mentioning yarn, node, and any task dependencies would really help ;)

I'm not very familiar with this package myself. It's not a projen thing as such, but might be due to how the package is setup.
Definitely open to a PR for a basic contributing guide :D

I'd be happy to send you a contributing guide... but I'd feel a bit strange doing so, as I'm not a maintainer this of project (or anything AWS 😂.). I'll raise one anyway, with at least the things I discovered - then you can modify it as you see fit.
This one should now pass 🙌
Thanks for the fast turnaround, and sorry I sent you something that was broken. I wouldn't have, if I could get the tests to run the first time round 😎

Thanks for the fast turnaround, and sorry I sent you something that was broken. I wouldn't have, if I could get the tests to run the first time round 😎

No worries, I'm glad you did. Forced me to look at repo PRs 🙈

Hey there!
We just stumbled on this as our CDK repos which are currently on node 14 all stopped updating due to the node 16 engines requirement of the updated glob-promise package which is a transitive dependency of jsii-docgen. Give that jsii-docgen still officially supports node 14, is there anyway this could be reverted and re-released as a proper major which drops support for node 14?

Hey there!
We just stumbled on this as our CDK repos which are currently on node 14 all stopped updating due to the node 16 engines requirement of the updated glob-promise package which is a transitive dependency of jsii-docgen. Give that jsii-docgen still officially supports node 14, is there anyway this could be reverted and re-released as a proper major which drops support for node 14?

Sorry about this and thanks for letting me know. I'll do as you suggested.

Hey there!
We just stumbled on this as our CDK repos which are currently on node 14 all stopped updating due to the node 16 engines requirement of the updated glob-promise package which is a transitive dependency of jsii-docgen. Give that jsii-docgen still officially supports node 14, is there anyway this could be reverted and re-released as a proper major which drops support for node 14?

Sorry about this and thanks for letting me know. I'll do as you suggested.

Thank you, this will save us a tonne of headaches, much appreciated! 🙌

Yeah sorry about this. The glob-promise release notes are unfortunately incorrect 😬


Trait bounds

I was trying to modify my eventbus crate to be more strict about types. That is, so you could have EventBus<IrcEvent> and not be able to send GameEvents through it, unless the GameEvent is also an IrcEvent. So I tried this:
//#[derive(PartialEq, Eq, Hash)] // doesn't work for this
pub struct EventBus<E: ?Sized + Event> {
  uuid: Uuid,
  _e: PhantomData<E>
}

impl<E: ?Sized + Event> EventBus<E> {
  pub fn new() -> EventBus<E> {
    EventBus { uuid: Uuid::new_v4(), _e: PhantomData }
  }

  pub fn register<T>(&'static self, f: fn(&mut T), priority: i32) -> EventHandlerId<T> where T: E {
    T::mut_metadata(|x| x.put(self, f, priority))
  }

  pub fn unregister<T>(&self, f: EventHandlerId<T>) where T: E {
    T::mut_metadata(|x| x.remove(self, f))
  }

  pub fn post<T>(&self, event: &mut T) -> bool where T: E {
    T::event_metadata(|x| x.post(self, event))
  }
}

And as it turns out I cannot currently use T: E, pass a trait to <E>, or anything like that, as Rust doesn't really like traits and traits are often considered lesser than types.
Note that being able to specify inheritance bounds like that would also benefit the typemap and anymap crates. Both have a shitty workaround for it that doesn't let you control the types you can use with them (and controlling those types would in turn benefit me on the eirc crate).

Technically, you can sort of do this with T: Sized + Unsize<E> + Unsize<Event> but that's a hack. I'd also very much like to have a feature like this.

Traits are not lesser than types, they just aren't types (trait objects create a syntactic confusion here). Does anyone know of any Haskell extensions or anything where types are allowed to be parameterized by type classes? This seems like it would have weird implications.
My impression of your problem is that you have an EventBus which can take events. These events can be of different type, but must all be from the same source. This is how I would model that in Rust:
trait Source {
    ...
}

trait Event {
    type Source: Source;
}

impl EventBus<S: Source> {
    fn register<T>(...) where T: Event<Source=S>;
    ...
}

@withoutboats And how do you handle IrcEvent, IrcClientEvent and IrcServerEvent, and limiting a bus to IrcClientEvent (which's trait IrcClientEvent : IrcEvent) and a different bus to IrcServerEvent (IrcServerEvent : IrcEvent) and yet another bus to all IrcEvent?

@Stebalien That appears to be unstable.

@withoutboats And how do you handle IrcEvent, IrcClientEvent and IrcServerEvent, and limiting a bus to IrcClientEvent (which's trait IrcClientEvent : IrcEvent) and a different bus to IrcServerEvent (IrcServerEvent : IrcEvent) and yet another bus to all IrcEvent?

So you want to be able to create a bus which handles all IrcClient and IrcServer events, and another that handles only the events of one of these two traits?
That sounds to me like an Event can be associated with multiple sources, making that a parameter rather than an associated type on event
trait Event<S: Source> {
   ...
}

impl EventBus<S: Source> {
    fn register<T>(...) where T: Event<S>;
}

Then I would implement Event<Irc> for all IrcEvents and Event<IrcClient> only for the events which are IrcClientEvents.

@withoutboats @Stebalien 's hack is (almost, see below) exactly what I'm looking for, if it were stable... (almost: the hack doesn't let you limit the bus to just a single event type)

That hack also only works as long as the trait is object safe and isn't actually parameterization by traits.

Does anyone know of any Haskell extensions or anything where types are allowed to be parameterized by type classes?

ConstraintKinds

@withoutboats That method would let events have different cancellability based on the source, which would be Very Bad™. I think I could split events into 2 traits: a base trait that sets cancellability and a filter trait which sets source, but that makes implementation a pain...

It seems like this requirement is met entirely by specialisation? Can we focus this issue on anything that is misssing once specialisation stabilises?

Closing in favor of https://github.com/rust-lang/rfcs/issues/2190.


How to speedup LaVague WebAgent Scrapper?

hello community,
I thing there is a question a lot of people using LaVague asks themselves: how can I speed up my webagent scrapping ? It is very very slow.
How can I speed up the webagent scrapper?
Where are the time bottlenecks? What does take time?
Is running the agent on a better machine will increase the speed or is it constrained by inference time on the LLM-provider-side?
Thank you for your reply,
Best,
Paul

We will release an optimized version soon, just need to wait a bit more! We focused on AI capability first but we are now good enough to focus on latency


Name of “Configure and failover a failover group for a single database” link

The link “Configure and failover a failover group for a single database” in https://docs.microsoft.com/en-au/azure/sql-database/sql-database-auto-failover-group#next-steps  refers to  failover group, not geo-replication failover group.
But the actual linked page https://docs.microsoft.com/en-au/azure/sql-database/scripts/sql-database-setup-geodr-failover-database-failover-group-powershell named “Use PowerShell to configure an active geo-replication failover group for a single database in Azure SQL Database”.
Please make names of links consistent

Document details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: e22db66f-542f-bc95-c232-fe775754a015
Version Independent ID: c08d859c-0725-7944-ef32-8ee13ccbf8fa
Content: Failover groups - Azure SQL Database
Content Source: articles/sql-database/sql-database-auto-failover-group.md
Service: sql-database
Sub-service: high-availability
GitHub Login: @anosov1960
Microsoft Alias: sashan

@MNF Thank you for the feedback. We are actively investigating and will get back to you soon.

Thank you for the feedback. This is being assigned to the content author to evaluate and update as appropriate.

@MNF - thanks for raising this issue. The link text has been updated to match the target articles.

#please-close


Misleading error message for have_been_enqueued matcher with other enqueued jobs

What Ruby, Rails and RSpec versions are you using?
Ruby version: 2.7.6
Rails version: <IP_ADDRESS>
RSpec version: 3.12
rspec-rails version: 6.0.1
Observed behaviour
When I run the following expectation, it fails if there are other jobs enqueued:
expect(MyJob).to have_been_enqueued #~>
# expected to enqueue exactly 1 jobs, but enqueued 2
# Queued jobs:
#   AnotherJob job with [...], on queue default

Expected behaviour
I expected the have_been_enqueued matcher to allow other jobs to be enqueued, because the naming suggests that it's only expecting that job to have been enqueued, not that also no other job has been enqueued.
With this behaviour, I don't know how to verify that a specific job was enqueued, while still allowing other enqueued jobs.

Oh, the issue was that MyJob was being enqueued multiple times, but the error message showed another job class enqueued as being the problem. It seems there is room for improvement in the error message, so that it accurately says that MyJob was enqueued multiple times, and doesn't show any other enqueued jobs.

I'll happily review a PR to improve the error message

Thanks, I realized I haven't found this output confusing anymore since I reported it, so I'm closing this 🙂


Simulator upload timeout for https://api.biosimulations.org/images/refresh

What is the bug?
I got the following after passing all the tests for tellurium:
The validation/submission of your simulator failed.

504 Server Error: Gateway Time-out for url: https://api.biosimulations.org/images/refresh

Put this back in Biosimulators.  The issue is that the the connection goes stale almost immediately after being reset, so right now, someone has to reset things manually, then immediately run the PR.
To solve this, I can think of a few options; I don't know how tenable they are:

Just keep resetting things manually every time.
Figure out how to make a reset last longer.
Put in a reset in the workflow.


Editing the name of a specimen pollutes the browser URL history

To reproduce, go to  the Gallery and select (say) the "Thue Trellis" specimen. Then click to the right of the name "Thue Trellis" in the specimen bar at the top. Then backspace seven times to erase "Trellis" and type "Fractal". Indeed, the name of the specimen is now "Thue Fractal". However, if you now right-click on the back button (or whatever you do in the browser of choice) to display the URL history of that browser window, you will see there are 14 URLs, identical except for the names "Thue Trelli", "Thue Trell", ..., "Thue Fracta", "Thue Fractal". This is excessive, and makes navigation to actual previous specimens  cumbersome.
My recommendation is that a new URL should be pushed only when "input is complete" -- perhaps we can detect that by the input bar for the name losing focus? Anyone have suggestions on exactly how to do this?

Another possibility would be to have the URL with the name changed simply replace the current page in the history. In other words, in the above scenario, the history would end up with just one entry, showing the name "Thue Fractal". There would be no record (in the browser history) that the name had previously been "Thue Trellis". So one additional important question is after a "completed" name edit (however we might detect that the edit has completed), do we want the browser history to have two entries, one with the original name and one with the new name (but otherwise not differing), or do we want just one entry, with the new name, and the original name "forgotten" from the perspective of the browser history?
In other words, in the first scenario, if you start at visualization A, load visualization B with name "Cool Viz", edit the name to "Nice Visualization" (and "complete" that edit, however that works), then the "back" button would go to Visualization B but with the name reverted to "Cool Viz" and then the "forward" button would go to B with name "Nice Visualization".
In the second scenario, if you did the exact same actions, the "back" button would go to Visualization A, and then forward would go to B with name "Nice Visualization". There would be no history entry mentioning "Cool Viz".
Which of these behaviors do we prefer (or something else)? Either is vastly better than the current dozens of entries in the visualizer when you do edits. I know exactly how to implement the "second scenario" (no "Cool Viz" ending up in the history); I am much less clear how to accomplish the scenario in which there is a single entry remembering the "Cool Viz" name, but I am sure we can manage it one way or another if we decide that's the behavior we want.

I don't see any particular reason to dislike the second scenario.  If nothing has changed but the name, I think it is reasonable to assume that the new name is preferred.
Is this an issue with edits to the sequence formula type letter-by-letter?

I don't see any particular reason to dislike the second scenario. If nothing has changed but the name, I think it is reasonable to assume that the new name is preferred.

OK, unless we hear counterpoint for @Vectornaut then whoever gets to this should just implement the second scenario by changing router.push() to router.replace() in the code that handles keystrokes in the name field of the specimen bar.

Is this an issue with edits to the sequence formula type letter-by-letter?

Excellent point. The problem is less severe, in that only correctly parsing formulae are saved to the browser history. So en route to n^3 + n^2 - 1, you will get history entries for n, n^3, n^3 + n, and n^3 + n^2. The difficulty is that I don't see how one could possibly distinguish "things you tried" from "things you were just typing through". So I am less inclined to fight that battle.

Oh yeah, the sequence formula thing is really not that bad.


Create italian.json

Notes:
As said in the discord, I'm not sure what Player Entitlements are, I've decided to take a literal translation approach, which means "Player Rights" in Italian

Except for the name everything seems to look good. Please check my comment in the name

I don't seem to see a comment in the name, what's wrong with it?

Passed inspection. Sorry it took this long.


Question about getCameraImage function

Why in the function p.getCameraImage, it sets flags=p.ER_SEGMENTATION_MASK_OBJECT_AND_LINKINDEX,
renderer=p.ER_BULLET_HARDWARE_OPENGL?
_, _, color, depth, segm = p.getCameraImage(
width=image_size[1],
height=image_size[0],
viewMatrix=viewm,
projectionMatrix=projm,
flags=p.ER_SEGMENTATION_MASK_OBJECT_AND_LINKINDEX,
renderer=p.ER_BULLET_HARDWARE_OPENGL,
physicsClientId=self.client_id,
)

Thanks for the question. We set ER_SEGMENTATION_MASK_OBJECT_AND_LINKINDEX because we also want to provide ground-truth object segmentation. For ER_BULLET_HARDWARE_OPENGL because we use headless rendering. We'd recommend PyBullet doc for more details.


RFC to introduce system Cloud Native Buildpacks

Preview
Depends on https://github.com/cloudfoundry/community/pull/796
cc @loewenstein @c0d1ngm0nk3y, @modulo11, @nicolasbender, @beyhan, @stephanme, @stefanlay, @PlamenDoychev

I find the language used here slightly confusing.

In CAPI the new property is called type

Introduce a new type column to the buildpack object with ENUM values cnb or classic, with classic being the default.

In the CLI the new property is called lifecycle

cf push --lifecycle cnb

❓ Can you make the naming more consistent?
Suggestion:

In CAPI the new property is called type
cf push --buildpack-type cnb

We decided to start the FCP for this RFC with the goal to approve it next Tuesday 28 of May.

@ameowlia The naming was decided in the preceding RFC at https://github.com/cloudfoundry/community/blob/main/toc/rfc/rfc-0028-cnb-lifecycle.md#cf-cli

RFC 28 defines a new lifecycle type: cnb (other existing values: buildpack, docker).
This RFC suggests a new "buildpack type" with values classic and cnb. Maybe it is less confusing to drop the "buildpack type" and add instead a "lifecycle" field (or lifecycle_type) to the buildpack object.
Advantages:

no new buildpack type with again confusing values, more consistency
similar concept as for the stack field in the buildpack object - allows CAPI to select eligible buildpacks for the buildpack detection based on the available info for an app (= stack and lifecycle)

Drawbacks:

if the same buildpack supports cnb and (classic) buildpack lifecycle, it needs to be registered twice (as done today for stacks)
slightly confusing values due to history (buildpack.lifecycle: buildpack, cnb - docker not allowed here)

My question/remark: A buildpack should reference its lifecycle type instead of a newly defined buildpack type. I.e. change

Introduce a new type column to the buildpack object with ENUM values cnb or classic, with classic being the default.

into

Introduce a new lifecycle column to the buildpack object with ENUM values cnb or buildpack, with buildpack being the default.

@loewenstein only the questions of @stephanme and @rkoster are open from our point of view.

@beyhan I don't quite get what the question in https://github.com/cloudfoundry/community/pull/830#issuecomment-2134725977 is. The comment isquite literally lacking a question mark.

@beyhan now I see, I didn't see the new comment at first.


simulateBundle helpers + JSON RPC lib from #51

adds encodeSimParams: encodes bundleObj for simulateBundle
adds Bundle.simulateBundle(bundleObj): syntactical sugar to call Suave.simulateBundle(encodeSimParams(bundleObj))

bundleObj = Bundle.BundleObj({
    blockNumber: uint64(bundle.blockNumber + i),
    minTimestamp: 0,
    maxTimestamp: 0,
    txns: bundle.txs,
    revertingHashes: new bytes32[](0),
    refundPercent: 51
});

// simulate bundle and revert if it fails
uint64 simResult = Bundle.simulateBundle(bundleObj);
require(simResult > 0, "sim failed");

// send bundle w/ same bundleObj
bundleRes = Bundle.sendBundle(GOERLI_BUNDLE_RPC, bundleObj);

merged with #51 to use its JSON library

While doing some integration testing, I noticed that the JSON encoder lib is using a LOT of gas. I have to set my gas limit to 30M for one CCR that JSON-encodes 10 (each) simBundle & sendBundle payloads. When the CCR lands, it only ends up using about 36k gas. But if I don't set the limit extremely high, I get an out of gas error.
Is this OK? I wonder if it would be better to do the JSON encoding offchain to avoid this, or maybe there's a way to tweak the gas estimate logic on the backend to avoid this confusion.
cc @jinmel @lthibault @ferranbt