implement diff for map

Set::diff is really helpful for calculating set difference, unfortunately, unlike Guava which has Maps.difference, there is nothing in Map.

Hello @carnott-snap , do you know if there is Maps.difference or similar methods in Scala? I did a quick search on https://github.com/scala/scala but I didn't find any. I think the goal of VAVR is not to compare with Guava, but to align with Scala as much as possible.

I do not have experience with the scala stdlib, and was not aware vavr was tracking the scala stdlib. I just the need for this transform, and somebody commented that this exists in guava, so I started there. Do you think the feature has merit on its own, or is sticking to the scala api more important?

I am probably not the right person to make the decision so I will let core maintainers to expression their ideas. In the meanwhile, I hope the following code snippet could unblock you for map usage. (I never used Guava so I hope I didn't make any mistake):
// Guava Maps#difference() in VAVR 1.0.0-alpha-3

Map<String, String> mapA = HashMap.of("a1", "1", "c1", "1", "c2", "2");
Map<String, String> mapB = HashMap.of("b1", "1", "c1", "1", "c2", "3");

// MapDifference#areEqual
boolean areEqual = mapA.equals(mapB);
assertThat(areEqual).isFalse();
assertThat(mapA.equals(HashMap.of("a1", "1", "c1", "1", "c2", "2"))).isTrue();

// MapDifference#entriesOnlyOnLeft
Map<String, String> entriesOnlyOnLeft = mapA.removeAll(mapB.keySet());
assertThat(entriesOnlyOnLeft).isEqualTo(HashMap.of("a1", "1"));

// MapDifference#entriesOnlyOnRight
Map<String, String> entriesOnlyOnRight = mapB.removeAll(mapA.keySet());
assertThat(entriesOnlyOnRight).isEqualTo(HashMap.of("b1", "1"));

// MapDifference#entriesInCommon
Map<String, String> entriesInCommon = mapA.retainAll(mapB);
assertThat(entriesInCommon).isEqualTo(HashMap.of("c1", "1"));

// MapDifference#entriesDiffering
// no, there is not... :/

slick, I was just going to use the guava logic and convert everything, but this is probably better. Plus I can just directly upstream the logic if that is the route you end up taking.
Assuming we do, you think the interface should be like guava, where a complex object that can be interrogated is returned, or more building block methods like left.difference(right), right.difference(left), left.union(right), mapping to your entriesOnlyOnLeft, entriesOnlyOnRight, and entriesInCommon respectively?

did this get implemented, or you are closing because it is stale?

Yes, @mincong-h suggestion is the way to go. Java has mutable collections, so Guava's Maps.difference makes sense. In Vavr, collections are persistent and we have a lot more operations. Removing elements will create a new version, so it is a safe alternative to Guavas utils.


Segmentation fault with 8.2.0

Hi, I'd like to let me share that v8.2.0 failed with "Segmentation fault" on the Stylelint CI. Please see below for details:

https://github.com/stylelint/stylelint/pull/6893
https://github.com/stylelint/stylelint/actions/runs/5172437744/jobs/9316786458?pr=6893#step:7:35

Could you please take a look? Thanks.

See also https://github.com/cosmiconfig/cosmiconfig/pull/304#issuecomment-1575977926

I will look into this as soon as possible after I am off work.

See also #304 (comment)

On first sight, the linked comment does not seem to have anything to do with this.

https://github.com/stylelint/stylelint/issues/6898 has more info on this. It's a bug of a dependency of stylelint, which does not play well with dynamic import() and breaks it globally.
Closing because it's not fixable by cosmiconfig and has to be fixed by either said dependency or by stylelint (by removing said dependency).

@d-fischer Thanks for the help! 👍🏼

For reference, if anyone still stumbles upon this issue, this was fixed in stylelint 15.7.0.


tests/vm_test: code cleanup

Remove unused variables.
Check unchecked errors.
Prevent from failing Eventually incase of possible temp issue with client availability.
-->
NONE

/retest

/sig code-quality

/kind cleanup
@codingben they changed it to kind cleanup :)


Feature suggestion template: update

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same change?
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[ ] Have you written new tests for your changes? Here's an example.
[ ] Have you successfully run brew style with your changes locally?
[ ] Have you successfully run brew tests with your changes locally?

I propose to update "Feature suggestion" template by making it a bit more friendly while keeping the strong messages it is designed to convey.
https://github.com/maxim-belkin/homebrew/blob/update-feature-suggestion-template/.github/ISSUE_TEMPLATE/feature.md

@Homebrew/brew could you guys please weigh in on this PR?

I propose to update "Feature suggestion" template by making it a bit more friendly while keeping the strong messages it is designed to convey.

The majority of feature suggestions are immediately rejected and not useful. I don't think we really want to encourage more "friendliness" here because we don't want more feature suggestions.

ready for another round of reviews.

I'd really like to see this broken up into multiple PRs

This PR can be repurposed for one of the above.

Sounds good to me!

Thank you, @Rylan12, @sjackman, @vitorgalvao, @claui, and @MikeMcQuaid for your comments.
Per request, I'm breaking this PR down into several smaller ones, so please feel free to share your reviews there.


OpenMetrics parser crashes for single-byte # input

The following reproduction:
package main

import (
	"github.com/prometheus/prometheus/pkg/textparse"
)

func main() {
	p := textparse.New([]byte("#"), "application/openmetrics-text")
	var err error
	for {
		_, err = p.Next()
		if err != nil {
			break
		}
	}
}

...leads to:
$ go run main.go
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/prometheus/prometheus/pkg/textparse.(*openMetricsLexer).cur(...)
	/home/julius/gosrc/src/github.com/prometheus/prometheus/pkg/textparse/openmetricsparse.go:47
github.com/prometheus/prometheus/pkg/textparse.(*OpenMetricsParser).Next(0xc0000a2000, 0x1, 0x1, 0x4f819b)
	/home/julius/gosrc/src/github.com/prometheus/prometheus/pkg/textparse/openmetricsparse.go:296 +0x175f
main.main()
	/home/julius/tmp/fuzz/main.go:11 +0x93
exit status 2

@yevgenypats You will be interested to know that this was discovered as the first fuzz-testing result by fuzzit (https://app.fuzzit.dev/orgs/prometheus/targets/promql-parse-open-metric/m6EqtgmNqwfLySMvwJNX) :)

@brian-brazil

(sorry, had pasted the wrong output into the first codebox above, corrected now, but recheck if you got this via email).

@juliusv cool! we are working on Github integration were issues will be filed automatically, do you think this is something useful?

@yevgenypats In principle totally! Just that some issues might actually not just be crash bugs, but exploitable in a worse way, and then you wouldn't want to create public issues for them?

Yes exactly this why I'm having mixed filling about this. maybe we can do some half-manual creation. there will be an option to file automatically or file it from the dashboard once you look that the bug is not a security related one.

@yevgenypats Yes, I was thinking the same. I think that's a good idea!
Let's move this discussion to another place though, if you shoot me an email at<EMAIL_ADDRESS>I have some other feedback tidbits to share :)

The same crash happens for # H.


grains: note regarding using bitwise operations

There are two approaches to this problem, bitwise operations and using math.Pow().
Maybe a note could be added to the test file about taking a bitwise approach, with some links to what bitwise operations are. In a similar way to the way the house exercise suggests the use of recursion but allows a simpler approach.
Then, should the difficulty rating in the config.json file stay with the simpler approach, or the more challenging approach?

It may be good to ask the maintainers of other tracks as well, to see what their experience is with this. My guess is that we should try to guess what a "typical" student would do. I know that being human our guesses are prone to be fallible, but we can always adjust if we find out a guess is wrong.

OK, that sounds good, I think I'll open up an issue in discussions to get some more feedback on this. And I'll have a look into adding something to grains about the potential for bitwise operators. It's a topic I personally don't understand yet, and I feel may provide a good introduction for others in the same boat. I'll submit a PR, let me know what you think?


BUILD error when build apollo 2.0 from source about protobuf

Hi guys,
I get an error when trying to build apollo 2.0 from source. After input "bash apollo build" I get these messages:

ERROR: /home/xiang/.cache/bazel/_bazel_xiang/b12dad91e376cd0947d4dee163139822/external/com_google_protobuf/BUILD:441:1: Traceback (most recent call last):
File "/home/xiang/.cache/bazel/_bazel_xiang/b12dad91e376cd0947d4dee163139822/external/com_google_protobuf/BUILD", line 441
cc_proto_library(name = "cc_test_protos", srcs = (L...), <4 more arguments>)
File "/home/xiang/.cache/bazel/_bazel_xiang/b12dad91e376cd0947d4dee163139822/external/com_google_protobuf/protobuf.bzl", line 247, in cc_proto_library
cc_libs += [default_runtime]
trying to mutate a frozen object
ERROR: /home/xiang/.cache/bazel/_bazel_xiang/b12dad91e376cd0947d4dee163139822/external/com_google_protobuf/BUILD:742:1: Traceback (most recent call last):
File "/home/xiang/.cache/bazel/_bazel_xiang/b12dad91e376cd0947d4dee163139822/external/com_google_protobuf/BUILD", line 742
py_proto_library(name = "python_specific_test_pro...", <6 more arguments>)
File "/home/xiang/.cache/bazel/_bazel_xiang/b12dad91e376cd0947d4dee163139822/external/com_google_protobuf/protobuf.bzl", line 373, in py_proto_library
py_libs += [default_runtime]
trying to mutate a frozen object
^C
Bazel caught interrupt signal; shutting down.

I'm using ubuntu 16.04 with ROS K. Looks like some things goes wrong in bazel query and protobuf. But I'm not familiar with bazel. Any suggestions?

It is recommended to build Apollo in Ubuntu 14.04. Should you want to continue building in Apollo 16.04, please refer to: the following document
Closing this issue as it seems to be resolved.


result message window

Description
Window for the result of the answer
Fixes # (23)
How to test?
run storybook
Checklist

[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] I have merged the latest version of the source branch (typically develop) into this branch before pushing my changes
[x] This PR is ready to be merged and not breaking any other functionality

You will have to revert the package update first. All package updates must be done seperately. Is this update needed?

I'm still waiting approve from you Neils...

Can you revert the package update to the dev server

Neiles.. now I was understanding what you mean with revert json package and it Done now...
could you please check it ?

Yes they are reverted. If you click on the 'Files changed' pane in this pr, you can see that package.json and package-lock.json changes are no longer committed

so everything is ok ?

well... not that we are at it, your css could do with a makeover.
See here :
https://github.com/HackYourFuture-CPH/fp-class12/pull/46

ok

Neils... Could you please check CSS file? if its ok now

it was closed because I made another PR with new path images in the compnents


[BUG] Project monitoring dashboards are not working for users with read only and view monitoring

Rancher Server Setup
Rancher version: 2.7.6
User Information
User-Base global permission
Describe the bug

Install monitoring v2 and prometheus-federator on v2.7.3 on default System Project
Create user with User-Base global permission
Create a project monitor using Monitoring tab >> Monitors > create for a a project(say default)
Assign the above user as "Read only" and "view monitoring" for the project(default)
Login to the rancher as this user and access the Project monitor >> Click on the project >> All dashboard will have the error

To Reproduce

Result
No access to Project Monitoring by Project Owners // cannot create resource "services/proxy"
Expected Result
User to access monitoring.
Additional context
SURE-7160
Similar to https://github.com/rancher/rancher/issues/40253

Closing as duplicate of https://github.com/rancher/rancher/issues/44177


vendor/gopherjs: update to go 1.9 compatible version

after #948  is done.

@myitcv please feel free to take care of that one if you're interested.

Same as #948 ... I can handle it.

Thanks @sterchelen; happy to help with any questions

Done !
https://camlistore-review.googlesource.com/c/camlistore/+/11246


Add 16-bit format support

layout(location = 0) in float16_t a; was showing SPV_REFLECT_FORMAT_UNDEFINED but now shows SPV_REFLECT_FORMAT_R16_SFLOAT as expected

there was a glsl file, not going to lie I lost it, can get it back though quick

Might be useful to have around in case it's needed in the future for som reason.

Awesome, thanks!


Dash 0.14

This is a draft for the updates for Dash Core 0.14

This branch will not be used.  it has been replaced by #40


Using Mapbox's Leaflet.js version instead of Leaflet's

This is not an issue but rather a question or enhancemet request.
How difficult would it be to use Mapbox's Leaflet.js' version instead of Leaflet's?
Is it conceivable to offer a selector switch to select either library?
Many thanks.
P.

@devleaks The only thing I was using from mapbox is their tiles when they were free for developers. Their library has a slight modification of everything as far as I remember. I would have to identify the differences. But MapBox is not free, so... I am not sure is worth the effort.

@devleaks i have used leaflet's library with mapbox for its tiles. You can see the result here: https://codermap.io/discover

Thanks.


[BUG] nvim_win_set_hl_ns is a nil value

When attempting to open the color picking menu with :CccPick it creates an error like below. After hitting enter it opens the menu normally but without color in the selection window.

The problem seems to originate here. The function obviously exist according to this.
I am using branch 0.7.2 of this plugin.
nvim --version
NVIM v0.7.2
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/x86_64-pc-linux-gnu-gcc -march=znver1 -mtune=znver1 -maes -fstack-protector -O2 -pipe -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=malloc -Wsuggest-attribute=cold -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/var/tmp/portage/app-editors/neovim-0.7.2/work/neovim-0.7.2_build/config -I/var/tmp/portage/app-editors/neovim-0.7.2/work/neovim-0.7.2/src -I/usr/include -I/var/tmp/portage/app-editors/neovim-0.7.2/work/neovim-0.7.2_build/src/nvim/auto -I/var/tmp/portage/app-editors/neovim-0.7.2/work/neovim-0.7.2_build/include
Compiled by portage@localhost

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "/etc/vim/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

uname -a
Linux Gentoo 5.18.1-gentoo-r2 #3 SMP PREEMPT_DYNAMIC Sat Jun 18 19:33:04 EDT 2022 x86_64 AMD Ryzen 7 1700 Eight-Core Processor AuthenticAMD GNU/Linux

I did not see any other issues that mentioned this. Thank you!

Same as #10.
As I noted in README, please use branch 0.7.2.

Same as #10. As I noted in README, please use branch 0.7.2.

I am using branch 0.7.2 with Plug.vim
Plug 'uga-rosa/ccc.nvim', {'branch': '0.7.2'}
The issue also states this

I am using branch 0.7.2 of this plugin.

I removed the ccc.nvim folder in nvim/plugged and re-ran :PlugInstall that fixed it, guess it cloned the wrong branch at first and did not overwrite the folder. My apologies.

I'm not using that API on that branch. Sorry for replying without reading much.

No worries, in the end it was my mistake regardless and that is a perfectly valid assumption. Thank you for this plugin it is wonderful!

If you are using Plug or Packer you can specify the commit to use. Testing with older commits may be worthwhile to help fix this issue. Be sure to delete previous plugin code when testing with different versions as that was the reason it wasn't working for me initially.

Yeah, I am using Packer and I pinned a commit. Here is what I was using:
    use({
        "uga-rosa/ccc.nvim",
        commit = "08abe425363279ff8a80cd237ac0ea003bee4863",
    })

I wanted to update today and also tried the new branch, but then it was broken again.
When I tried to reinstall the commit I mentioned above, it seems that the commit is no longer existent.
I now tried a reinstallation with these commits, which are both generally in the time area of my pinned commit, but to no success. I always get nvim_win_set_hl_ns is a nil value.

https://github.com/uga-rosa/ccc.nvim/commit/9856dd631ecb80355dd936f3b9cbd4bea6040014
https://github.com/uga-rosa/ccc.nvim/commit/832229fe18ce2395634a97fb53d9ea1f717e0195

Sorry, it's my bad. It is difficult to use git....
Fixed.


Deleted EndOfBuffer assignment for EoB color cross-terminal emulators

Depending on the terminal emulator, EndOfBuffer could show as the light rather than the (presumably?) expected dark color on non-EndOfBuffer lines.

The link shows six splits, with the problematic one being the one in the top-middle.
xterm w/ EndOfBuffer  | alacritty w/ EndOfBuffer  | source code
xterm w/o EndOfBuffer | alacritty w/o EndOfBuffer | EndOfBuffer help

Other colorschemes (among those I checked) does not seem to assign EndOfBuffer.
checked: corporation, Monokai, solarized-dark
Not sure what was intended with the assignment, so feel free to reject the PR of course.
I'd love to learn when EndOfBuffer should be assigned if so!
Did not confirm with gvim.
Did confirm white bg with minimal-ish vimrc (includes vim-plug) on arch with i3-wm and alacritty
set runtimepath^=~/.vim/
call plug#begin('~/.vim/plugged')
    Plug 'aonemd/kuroi.vim'
call plug#end()
colorscheme kuroi

Hello, thanks a lot for opening this and the investigation you have done.
I just pushed a fix for this and tested it on Alacritty.
The reason I set EndOfBuffer is to hide the so many tildes (~) at the end of the buffer. It's a preference that I have had in my .vimrc for a long time and I thought others might like it as well so I put it here.


clarification with TF datasets: more efficient to vectorize with unbatching (batch -> map -> unbatch) or just map?

Hi,
First time reporting an issue on Github - as far as I can tell this is also the place to report or request anything related to the official documentation and guides as well, which is what this is about. (Apologies if this is not the case!)
I have seen in several (non-official) code examples posted online that people apply vectorized mapping in the following way using the dataset API: batch -> map -> unbatch. The relevant official guides at https://www.tensorflow.org/guide/data and https://www.tensorflow.org/guide/data_performance don't address this (either encourage or discourage). I originally implemented this myself, thinking that there must be a reason so many other people were doing it, but I've since found that in at least some cases this is very inefficient (at least in the cases I tested, it increased the time to apply the overall transformation by 150% over just applying map without adding batch/unbatch).
I posted on stackoverflow asking about this at https://stackoverflow.com/questions/61876941/tensorflow-datasets-more-efficient-to-vectorize-with-unbatching-batch-map but haven't received a response. If there is a good rule of thumb (other than testing every transformation, data type, batch size, hardware, etc. on a case-by-case basis) is it possible to add it to the documentation, or at least warn that it might cause a serious slowdown? I could see there being cases where this method does increase efficiency, but then again, maybe not.
Thanks.

@jshyatt2 Hi, you should report this issue to the main TensorFlow repo instead of TF Hub.

@jshyatt2,
As suggested by @djdongjin, please report this issue in Tensorflow Repo. Thanks!

Sorry, I did report it there, at https://github.com/tensorflow/tensorflow/issues/40386. I closed it after getting a response, but I guess I forgot to close this issue. Thanks for the reminder!


Renamed distance metrics

This change is

Coverage remained the same at 38.673% when pulling 0e2e3b01484b614a92f0dac743599bbb9059548c on feature/statespace_refactor into 1d600b74fd716551727e9d566ad1e3d7ef34d8ae on feature/statespace.

Coverage increased (+6.9%) to 45.623% when pulling 0e2e3b01484b614a92f0dac743599bbb9059548c on feature/statespace_refactor into 1d600b74fd716551727e9d566ad1e3d7ef34d8ae on feature/statespace.


[FIX] Remove redundant categorical imputation

This PR removes categorical imputation from SimpleImputer to resolve #374
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)

Note that a Pull Request should only contain one of refactoring, new features or documentation changes.
Please separate these changes and send us individual PRs for each.
For more information on how to create a good pull request, please refer to The anatomy of a perfect pull request.
Checklist:

[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
[x] I have updated the documentation accordingly.

[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[x] Have you written new tests for your core changes, as applicable?
[x] Have you successfully ran tests with your changes locally?

Description

This PR removes the hyperparameter categorical_strategy from SimpleImputer as we are already imputing categorical columns in the feature validator.
Motivation and Context

Resolves #374
How has this been tested?

I have adjusted the tests for SimpleImputer according to its new behavior.

While in principal, it makes sense and definitely means optimization is easier as there are less parameters, there's two points that cross my mind.
* In theory it would be much nicer to just have it as part of the pipeline but have it as the only default choice, it will always be performed. This would make preprocessing a configurable pipeline step where it would make more sense to me. For example, we have this problem now with Autosklearn where preprocessing done outside the pipeline is much harder to export.

I agree if we can export everything that is done on the dataset (preprocessing, training, etc) that would be great and also useful for people to use our fitted pipelines directly.

* Have you given thought to any users who might want to configure this? Injecting it as a pipeline component is easier than exposing parameters that then get passed through.

Actually no, I have not yet considered this use case.

As mentioned, we have the same problems too but I think rethinking the pipelines will eventually be on the agenda. Anywho, approved except for some minor comments.


Validation is saying a required property (parameter) is missing even though its there

I'm getting an OBJECT_MISSING_REQUIRED_PROPERTY error on a sample for "api-version" despite the fact it's there in the sample and spelled correctly.
Based on https://github.com/Azure/azure-rest-api-specs/pull/21123#issuecomment-1279184922, I tried changing the order (as you can see from the permalink above) but still got the error.
This becomes a blocker with no clear resolution.

@heaths ,  the real issue is in example the scope parameter should not have slash as value because api path in swagger already have the prefix '/'.
I will log a bug to report this 'double slash' issue.

It's a valid parameter, and "//" should be canonicalized as "/" anyway, which it does on the backend as well as most clients I've tested. If you're logging an issue on the validation, great. This is not really a bug in the swagger. "/" is indeed a valid scope, which would result in "//" until canonicalized.

This is planned in sprint of Dec.

This is resolved in PR

This is resolved in PR

Closing

Seems to be happening again in Azure/azure-rest-api-specs#25042

Assigned @scbedd per:

https://github.com/Azure/azure-rest-api-specs/pull/25042#issuecomment-1666358435


Retries for operations in batch mode

 processed_mapped_inputs = {k: ray.get(v) for k, v in mapped_inputs.items()}
ray.exceptions.RaySystemError: System error: Failed to unpickle serialized exception
traceback: Traceback (most recent call last):
 File "/home/ray/anaconda3/lib/python3.10/site-packages/ray/exceptions.py", line 50, in from_ray_exception
 return pickle.loads(ray_exception.serialized_exception)
TypeError: APIStatusError.__init__() missing 2 required keyword-only arguments: 'response' and 'body'

The above exception was the direct cause of the following exception:

https://github.com/openai/openai-python/blob/5e3e4d1b0f16ccc4469a90a5bff09cafe0de7a2e/README.md#retries

Now I'm looking into it more the original Error
TypeError: APIStatusError.__init__() missing 2 required keyword-only arguments: 'response' and 'body

Might not have come from curator at all. I'm increasing the retries to 5 anyways in #194.


Support a11y on mobile devices

This is a more up to date continuation of #41 which has gotten old and a bit stale. See that issue for documentation about our thoughts on the current approach for this and how it is working.

The above commit hides this behind a query parameter. In doing so, I noticed that a lot of this work has been spread around Display, AccessibilityTree, AccessibleInstance, AccessiblePeer...and attributes added to HTMLElements throughout these types are related and dependent. This will make maintenance difficult, it would be great if we could consolidate this better.

I just noticed that the positioning isn't quite correct for some buttons in rutherford-scattering.

But if the window size changes then it corrects itself. So maybe its not getting updated frequently enough.

The above commit fixed https://github.com/phetsims/scenery/issues/852#issuecomment-420374995.

I think the last big question is how to make sure that the PDOM does not interfere with pointer input while it is on top of the simulation, while making sure that it works correctly with a screen reader.
The most elegant way is pointer-events: none and this is generally recommended when doing online searches. This prevents the PDOM from ever receiving pointer events, and they are passed through correctly to the graphical display underneath. The browser sort of treats the elements like they are invisible and the cursor is not impacted either. However this prevents almost all PDOM elements from being touchable when VoiceOver is enabled. Individual elements are still accessible with VoiceOver, but only when discovered with the virtual cursor (using gestures and flicking left and right across the screen).
In summary, we need pointer-events: none so that the PDOM does not interfere with other scenery input. But we don't want to use pointer-events: none because it prevents the user from discovering elements by touching on them with VoiceOver. This feature is most important for visually impaired users that can see while using the screen reader.
I spent some time trying to find an alternative. I started by trying to see if I could make elements with VO touching while still using pointer-events: none. Surprisingly, I noticed that the following HTML works great:

<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>Page title</title>

        <button id='frontButton' class="frontButtons">DOM Button</button>

        <input type="button" id='secondButton' class="frontButtons">
        Second Button

Maybe sim SVG

It is critical that pointer-events: none is not on the PDOM parent container, but on the individual elements. It is also important that the html elements that are touchable be on top of the others.
This is a very simple example, and I haven't been able to get this working in the sim yet. Using Weinre with the sim, I also found that tabIndex="-1" on containers for focusable elements seems to prevent touching behavior. I also found that removing attributes position and transform on elements with pointer-events: none  seems to make things touchable in the sim. This makes me think the behavior could be related to the stacking context, but I haven't been able to reproduce that in the simplified example above.
We are kind of reverse engineering VO here, I can't find any specification about this at all. This is a very atypical usage of HTML. So anything we do feels like a workaround and could be fragile in the long run.
A totally different approach could be to use JavaScript somehow instead of pointer-events: none. But I can't think of a way that would work because when working with VO, PDOM elements are not receiving pointerdown events to capture or delegate. VO is doing something internally, but using pointer-events: none to determine whether something is focusable or not. The visual cursor also breaks this way. I can't imagine proceeding down this path, it would impact all of scenery input.

but I haven't been able to reproduce that in the simplified example above.

That is not correct, I was able to prevent this from working again by adding position: absolute and transform: translate(X, X); to the elements.

Interesting, if I use transform=static and on the elements it works OK in VO and the transformations seem to still look OK. This is even true when pointerEvents='none' is on all elements.

In the simulation this seems to work for everything except the HomeScreenView and navigation bar!

With the above commit it is working much better. I found that transform on non-focusable elements was for some reason preventing the touch to focus feature in mobile safari. So I changed the implementation to only transform focusable elements. This actually simplified the transformation calculations quite a lot. I am now using node.getLocalToGlobalMatrix() instead of calculating the relative transformation matrix between parent and child AccessibleInstances, and that may be less efficient. But we are doing the operations far less than we were.
I also found that for focusable elements with labels, VoiceOver will include the label bounding client rectangle in its black highlight for the focusable node. This was a problem because VoiceOver will send a fake pointer event at the center of this rectangle. So if the label is shifted off screen, the event will be at the wrong location. I tried to overlap labels and focusable elements, but then the "touch-to-focus" feature broke again because touching the element only read the label. I tried many CSS like hidden, visibility, text fonts, opacity, others, but none of them worked.
As a workaround, I am making the label element tiny, and putting it at the very bottom of the focusable element. It looks something like this:

The tiny white dash below the check box is the label. This way, the label doesn't overlap with the input, but it is near enough to the input that VoiceOver will send a fake pointer event to the correct location.

At one point it looked like tabindex played a role in what was and wasn't touchable with VO, so it was removed. Hopefully we can add it back now.

Hmm, yes tabIndex does seem to impact this, but I don't know why. Some buttons behave as though their touch ares are not around the highlight or VoiceOver highlight. This is not the case with  but it is the case with most s.

It was as though the touch area was around the top left corner of the element, so I thought it could be related to these lines of the CSS
        domElement.style.top = '0px';
        domElement.style.left = '0px';
        domElement.style.padding = '0px';
        domElement.style.transformOrigin = 'left top';

According to https://developer.mozilla.org/en-US/docs/Web/CSS/top

When position is set to absolute or fixed, the top property specifies the distance between the element's top edge and the top edge of its containing block. (Containing block needs to have property position: relative)

So I changed AccessibilityUtil.createElement to
        if ( focusable ) {
          domElement.style.position = 'fixed'; // helps move container elements out of the way, doesn't seem to interfere
        }
        else {
          domElement.style.position = 'relative';
        }

and the touch areas are much improved. This is too crude, and won't work for label siblings. We need to update these accordingly when focusable changes, but this is a very helpful find.

https://github.com/phetsims/scenery/issues/852#issuecomment-423368412 is not correct. I had accidentally left pointer-events: none in place, which I sometimes remove to easily inspect a11y items in the dev tools.

The following button has this problem:
<button id="15-25-51-52-53-50" aria-roledescription="Sim Screen" style="transform-origin: left top 0px;  pointer-events: none; transform: matrix(2.12098, 0, 0, 13.4891, 606.111, 367.688);">Plum Pudding Atom</button>

If I remove EITHER transform OR pointer-events from the element the problem goes away. One of the resources I found said they had better luck using a matrix3d, but I have not found that to be the case. For some reason the problem goes away when I add Y scaling.

What if we change to use width, height, and positioning instead of transform? The idea is we would calculate the right transform, then apply to the clientWidth and clientHeight (before any transforms), then use the transformed element to get the width and height from getBoundingClientRect(), then apply with width and height attributes instead of transform. Will this make Safari happy?

Wow, this is actually working really well, this button behaves great in Safari:
 <button id="15-25-51-52-53-50" aria-roledescription="Sim Screen" style="position: fixed; pointer-events: none; width: 361.200; height: 374.535; top: 456.59; left: 259.61">Plum Pudding Atom</button>

Where the width and height were calculated from getBoundingClientRect(). Ill try it in the sim.

Oh my goodness this is working so well!

The above commits this change, using scratch Bounds2 to get dimensions so that we don't create lots of Bounds2 objects.

I was hiding labels with font-size and setting width and height as described in https://github.com/phetsims/scenery/issues/852#issuecomment-423646477, but that prevented some (but not all) buttons from being touchable with VO. Removing font-size attribute fixes the problem, but then some of the text extends beyond the input. So labels will continue to use transform while the focusable elements will use width/height.

Documentation should be udpated, and it looks like there are some things still left in place that are no longer needed after we changed the approach in https://github.com/phetsims/scenery/issues/852#issuecomment-423201668.

In https://github.com/phetsims/QA/issues/197, the QA team did a thorough performance test of the impacts of these features. Most telling parts are https://github.com/phetsims/QA/issues/197#issuecomment-425606598, https://github.com/phetsims/QA/issues/197#issuecomment-425553062, and https://github.com/phetsims/QA/issues/197#issuecomment-425563109.
Surprisingly, iPad2 iOS9 (which I assumed would be one of the slower platforms for this change) is actually one of the least impacted. There is some slowdown, but the worst platforms seem to be iOS10, Windows 7 Chrome, Edge and IE11.

In response to this, I think we should consider

Only updating the positioning every second (or less) so that we don't update every animation frame. I see no need for dimensions to stay up to date every animation frame since at the at the rate of VoiceOver interactions.
Include the ability to enable/disable this feature. For instance, while using TWEEN/twixt like animation,  I don't believe there is a need to update the DOM dimensions of elements, or have them be touchable. Similarly, do we need this functionality for things like the skater in ESP: B and the planets in GAO? Grabbing moving planets is difficult without VO, and even more difficult when the AT is enabled. Maybe we can consider a different way to grab planets for accessibility that doesn't involve touching the actual planets. Same with the balloon in BASE.

If we can accept 2, then 1 becomes a non-issue. Though we can probably add 1 as well for safety.

I made it so that the positioning updates every few seconds and asked QA to see how this impacts behavior on the most problematic platforms in https://github.com/phetsims/QA/issues/197.

@KatieWoe and I met to pair/debug this problem so I could see the issue on the Mac OS with 10.14 on chrome. Indeed, the sim is totally unusable. We removed the MutationObserver that triggered updates to the simulation and the problem persisted, so something else is causing the massive slowdown. I highly doubt that this degradation is cuased by transform calculations, so my next theory is the DOM calls like getBoundingClientRect().

This seems relevant: https://stackoverflow.com/questions/19815810/avoiding-html-document-reflows/

The most important part of that thread:

The clientHeight property doesn't force a reflow, at least not by itself. You need two things to trigger a reflow:dirty the current layout (set a layout property like width or height)
query a layout property (clientHeight for example)
You can easily batch calls to set the width or height and no reflow will happen until the JS context relinquishes control. You can easily batch queries for layout properties and no reflow will happen if the current layout is not dirty.

and

In practice this means that you should group all your query operations at the end of the script after you've done with modifying the DOM. Doing this will only reflow once for the thousands of elements instead of thousands of times for each element.

I also noticed that if I change browser window size, Chrome really struggles. But if I remove these lines of CSS, in AccessibilityUtil the behavior is much improved!
    'font-size: 1px;' +
    'color: transparent;' +
    'background-color: transparent;' +
    'opacity: 0.0001;' +

In we tested on Windows 7 Chrome, iOS10, Chrome OS, Mac OS 10.14 Chrome, platforms which were previously not able to run sims with these changes. After removing the opacity, they are much improved, @KatieWoe said

just did the Mac 10.14 and it still runs a bit slow but it is much, much better.

But the sim is still crashing on iOS10 safari. The sims are NOT crashing on iOS 9.3 Safari, something on this iOS is different.

While testing on iOS12.1 Safari, it was discovered that these lines impact the layout of the sim while the virtual cursor is reading through content. We need a different way to remove non-focusable elements.
      element.style.left = '-9999px';
      element.style.top = '-9999px';

Positioning like https://github.com/phetsims/scenery/issues/852#issuecomment-435494120 is actually not necessary at all because the elements are hidden with opacity, and positioned fixed to the root of the PDOM so they don't extend down or into the sim.

Today I have been doing final local testing of these changes, including performance profiling, unit testing, memory profiling (checking for memory leaks and bloat on sims in accessibility list). All is looking great, and I am getting ready to merge these changes with master.

I would like to add some unit tests for this if possible, can we test that siblings are positioned correctly?

I added unit tests for this in the branch. I am going to run through aqua tests once more then merge with master.

aqua tests are running well so I am going to proceed with merging. Ill continue to watch CT for the next couple of hours though.
@zepumph can we go over this issue at our next a11y dev meeting? I would like to check PDOM changes with you, but am also curious of your thoughts on the changes to AccessiblePeer. Like am I correctly adhering to model-view separation for a11y code in scenery, or should some things be moved out of AccessiblePeer/AccessibleInstance, and so on.

The above review comments came from discussion with @zepumph, @jessegreenberg will address these review comments.

In https://github.com/phetsims/a11y-research/issues/133 it was discovered that NVDA sends fake pointer events (in addition to the change event) upon activation of check boxes. There are probably other cases/devices that do this too.
Previously this wasn't a problem because the pointer events were well outside of the sim div. But now that elements are on top of the  display they are getting caught. The result is that check boxes are activated twice, once on change and once on touch related events.
When this happens, the target of the DOM event is within the PDOM, so I am wondering if we can  refrain prevent touch events if they are sourced from PDOM elements.

https://github.com/phetsims/scenery/issues/852#issuecomment-467994327 was fixed via #949.

@jessegreenberg, what more needs to be done here? Is there anything I can do to help?

This issue can be closed, we have been using this for a long time and it has been working well. This became sort of a mega-thread for issues related to mobile a11y. I reviewed comments in this issue and it looks like everything noted has been resolved. Other issues since then that are related to this have been opened, which is what we should continue to do in the future.


[MA-1515]add monitor priority to tests

Adds new monitor param priority to monitor test
What does this PR do?

Additional Notes

Review checklist
Please check relevant items below:

[ ] This PR includes all newly recorded cassettes for any modified tests.

[ ] This PR does not rely on API client schema changes.

[ ] The CI should be fully passing.

[ ] Or, this PR relies on API schema changes and this is a Draft PR to include tests for that new functionality.

Note: CI shouldn't be run on this Draft PR, as its expected to fail without the corresponding schema changes.

LGTM, can you update the cassettes - https://github.com/DataDog/datadog-api-client-go/blob/master/DEVELOPMENT.md#commands

Did the generation incorrectly and had to recreate.  Closing this and pushing a new branch.


FID Calculation

Greetings!
I wanted to reproduce the results presented in the paper, can you provide more details on how the FID was calculated?
For example, did you use the Clean-FID process, and was the network an InceptionV3 network? How many samples did you generate (10k?) ?
Thanks in advance! :)

Hi @ahmed1996said ,
Thanks for asking!
The FID was computed using the torchmetrics package across 25k samples.
The same goes for KID.
In this case I might also refer to Chambon et al., which experimented with different network backends than InceptionV3, as there are ongoing discussions on the legitimacy of evaluating medical data on a ImageNet pre-trained network.
Cheers,
Tobias

Thanks for the prompt response, @saiboxx!
Understood, thanks for the clarification. I've noticed that Chambon et al. computed the FID on different backends, including a DenseNet pretrained on X-ray images, which may be more fitting.
In your paper, regarding the FID mentioned in section 5, was it computed using the XRV DenseNet or Inception features?

I used the implementation in the torchmetrics package, which afaik only offers the standard InceptionV3 backend :+1:

Got it, totally missed that in your previous response sorry!
Thanks a lot :)


Some categories not imported/shown on vue storefront after importing

Hello, I am importing products from magento, but the problem is some categories don't show up. Previously I am using 1.9.5, and then upgrading to 1.10.0, but the results are the same. Even using a fresh install of vue storefront api, the categories are still missing. Any idea how to debug or fix this? Importing using kubernetes jobs.
Here is the categories in magento:

Here is the vue storefront menu

and on sub category, only the category that doesn't have child categories shows up

Vue Storefront is not displaying disabled categories( grayed out in Magento tree) - it doesn't look like an issue to be perfectly honest :) VSF is displaying enabled, visible categories that contains 1+ products

@pkarw yes, but as you can see on my images categories such as 'Ruang Kerja' and 'Dekorasi Rumah' are enabled, visible, and has more than one product, but don't show up. the enabled children categories don't show up too. After doing importing several times, it was usually those two categories that disappeared, though there are times that it's another category that disappeared.


multi-link UPD tunnel without VPN

@zehome thanks, I understood
That's mean if I want make star topology (server is a center and many spokes) I need to run multiple instance of mlvpn daemon on a server side, one per spoke. Every mlvpn daemon will use one personal UDP port. That is right?
Originally posted by @LovingFox in https://github.com/zehome/MLVPN/issues/122#issuecomment-486175537

If we implement a multi-link UPD tunnel without VPN support, then use this tunnel to connect the OpenVPN server on the same VPS machine, we will get a star topology VPN. OpenVPN has a client to client feature, is is useful for some situations. But OpenVPN has no multi-link support, so we have to combine the two.

A UPD port forwarder with multi-link support and without root privilege, and can run in almost any OS, and make one server config can service multiply clients, it will be easy to use and awesome.
Then let OpenVPN client connect the server through this multi-link UPD port forwarder,  we can build a stable client to client VPN.

without root, you can't have a tun/tap interface. MLVPN uses privilege separation for increased security.
The VPN aspect is not mandatory, you can just have host to host communication, just don't setup any routes.
You can use openvpn inside, but you'll have very poor performance.


Discovery Channel Pacific

Source
https://www.tvpassport.com/tv-listings/stations/discovery-channel-us-pacific-feed/1206
Notes
Great LIVE TV GUIDE. Can you add it ?

Added in https://github.com/iptv-org/epg/commit/ae4890357bb3761a66a481215caf21739de41150

work


Offsets and Sizes in GraphEdit

This PR adds methods to GraphNode to get its size, offsets and ports positions after accounting for its parent GraphEdit's panning and zooming.
Getting the right position can be complicated, so these additions would make getting the desired positions more convenient. Especially so when the users wants to make custom hot zones in the GraphNode.
The best names I could think of for the methods are get_position_offset_in_graphedit(), get_position_offset_in_graphedit(), get_connection_input_position_in_graphedit(int p_idx) and get_connection_output_position_in_graphedit(int p_idx). Might need a shorter name.
WIP: See my project https://github.com/mechPenSketch/godot/projects/1

Nvm after testing, it seems that they already accounted for GraphEdit's panning and zooming.


Support pxx in service relation.

We support p99->p50 in service relation metrics, as following
Client side

service_relation_client_p99
service_relation_client_p95
service_relation_client_p90
service_relation_client_p75
service_relation_client_p50

Server side

service_relation_server_p99
service_relation_server_p95
service_relation_server_p90
service_relation_server_p75
service_relation_server_p50

@TinyAllen Please make UI support this, as avg response time of line in topology. @peng-yongsheng Please don't merge this, I will wait for UI support.

Coverage remained the same at 16.857% when pulling e92b53c534dd07482cc1d2448f1b12aba346f4e2 on line-pxx into 4f89ea2704e560ca93d5fcd5830679c9db82c2cd on master.


Update GC proposal slightly

Add back the 'struct.new' instruction as a temporary compat measure for SM
Update implementation of heaptype syntax to match latest proposal

Looks like the testsuite needs to be updated to include the latest function-references changes.


Make CaseType a richer value object

Add additional properties to the CaseType value object to represent
whether or not:

it is a direct tax
we need to ask what the dispute type is
we need to ask what the penalty amount is
we need to ask about hardship

Refactor the CostDecisionTree to check for these properties instead
of checking for inclusion in a list of hardcoded case type strings
Update the CaseType constants to have these properties set
Ensure that wherever we convert form data or a database value into a
CaseType object, we fetch the relevant constant instead of creating
a new value object

super 👍


remove mapbox hyperlink from bottom-left corner of map

Hyperlink doesn't appear on the bottom-left corner of map anymore.
Solution required me to patch the mapbox-gl module in order to prevent module from being changed when npm updated.
Let me know if this solution is fine or if it violates terms of service with mapbox.

fixes #210

I don't think applying a patch to an external module is the way to fix this, let's first try if there is a cleaner way to hide this hyperlink

I'll look into it, I initially was thinking about putting a transparent box over the hyperlink but the link was still active even with it. I'm also unsure about a cleaner way to accomplish this since covering the hyperlink will lead to a corner having the inability to drag.


Add support for Google Cloud Managed Prometheus

This PR adds support for Google Cloud Managed Prometheus. Functionality is the same as when using prometheus-operator. These two can co-exists at the same time, so migration from GMP <> prometheus-operator should be smooth as possible. I created new CRD; ManagedPrometheusServiceLevel, so no need to do ugly hacking since prometheus-operator and Google Managed are different kind of animals, even the API's are almost the same.

Hey @psikala Thanks for the PR!
However, this is a lot of code and complexity for Sloth, only to support a very adhoc use case. APIs should be simple and small, and adding a new CRD is not what I would like for Sloth users.
Prometheus operator CRDs is a defacto standard for Prometheus and Kubernetes, so, adding this functionality on every project sounds like a patch to me. If I would have this use case, I would try creating a project (Kubernetes operator) that translates Prometheus Operators CRs to Google Prometheus CRs in a generic way, this would be cleaner, more portable, cover any kind of alerts and rules, and have more control over them (specific configurations, garbage collection...).
I'm sad that you did all this work for nothing. Apologies. Next time please create an issue before doing all the code, so you can save all this time, that its precious :)
Best,

Thanks for the feedback!
Well, the effort was not that big(in time wise) and I don't think it's a waste of time. :) It was a good dive to the world of sloth (great tool BTW!).
I agree with you and I don't quite get why Google wants to have own CRD's which are almost the same as Prometheus -ones. Well, anyway, the way what you propose, makes much sense!
Br,


BUILD ERROR: Warning messages when building with --prod related to MdcIconRegistry + MDC_ICON_LOCATION, making build not functional

I am getting the following warning messages when building with --prod. I get these 2 messages for every component using mdc-icon.
WARNING in ./src/app/compare/compare.component.ngfactory.js 99:571-589 "export 'MdcIconRegistry' (imported as 'i7') was not found in '@angular-mdc/web/icon'
WARNING in ./src/app/compare/compare.component.ngfactory.js 99:602-622 "export 'MDC_ICON_LOCATION' (imported as 'i7') was not found in '@angular-mdc/web/icon'
When the build is complete, my app does not show up at all and I get this error message in the console:
ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'ngInjectableDef' of undefined TypeError: Cannot read property 'ngInjectableDef' of undefined
What Angular MDC version are you using?
0.41.1 (Angular 6.0.1)
What is the expected behavior?
No warning/error messages, functional build
What is the actual behavior?
Warning messages when building with --prod, build not functional

I'm experiencing the same behavior, and the build does not work, the only difference are my warnings and version of mdc and angular I get these warnings:
WARNING in<EMAIL_ADDRESS>132:127-146 "export 'coerceCssPixelValue' was not found in '@angular-mdc/web/common'

WARNING in<EMAIL_ADDRESS>132:182-201 "export 'coerceCssPixelValue' was not found in '@angular-mdc/web/common'

WARNING in<EMAIL_ADDRESS>132:240-259 "export 'coerceCssPixelValue' was not found in '@angular-mdc/web/common'

WARNING in<EMAIL_ADDRESS>132:298-317 "export 'coerceCssPixelValue' was not found in '@angular-mdc/web/common'

WARNING in<EMAIL_ADDRESS>132:356-375 "export 'coerceCssPixelValue' was not found in '@angular-mdc/web/common'

WARNING in<EMAIL_ADDRESS>132:75-94 "export 'coerceCssPixelValue' was not found in '@angular-mdc/web/common'

WARNING in<EMAIL_ADDRESS>168:67-78 "export 'coerceArray' was not found in '@angular-mdc/web/common'

WARNING in<EMAIL_ADDRESS>19:0-298 "export 'coerceArray' was not found in '@angular-mdc/web/common'

WARNING in<EMAIL_ADDRESS>19:0-298 "export 'coerceCssPixelValue' was not found in '@angular-mdc/web/common'

WARNING in<EMAIL_ADDRESS>39:0-126 "export 'MdcRippleConfig' was not found in '@angular-mdc/web/ripple'

WARNING in<EMAIL_ADDRESS>48:0-208 "export 'MdcTextFieldIcon' was not found in '@angular-mdc/web/textfield'

What Angular MDC version are you using?
0.40.2 (Angular 6.0.2)
What is the expected behavior?
No warning/error messages, functional build
What is the actual behavior?
Warning messages when building with --prod, build not functional

@zunamo @jorgecuevas92 Very odd. I've not yet duplicated.
Could you try removing the node_modules folder, and reinstall via npm i or yarn? I'm guessing npm left some pointers to removed files on your systems.

This worked for me! Thanks.

This also worked for me!
Thank you @zunamo


Json field display garbled characters when ensure_ascii=True

Initial Checks

[X] I confirm that I'm using Pydantic V2

Description
Json field will display garbled characters while executing model_dump(). unless using json_result=json.dumps(result, ensure_ascii=False)
but this script works well on pydantic==2.6.4
Example Code
from pydantic import BaseModel, Json
import json

class Foo(BaseModel):
    name: str
    result: Json

result = {'name': '中文'}
json_result = json.dumps(result)
print(json_result) # {"name": "\u4e2d\u6587"}

a = Foo(name='test', result=json_result)
print(a.model_dump()) # {'name': 'test', 'result': {'name': 'ä¸\xadæ\x96\x87'}}
print(a.model_dump_json()) # {"name":"test","result":{"name":"中文"}}

Python, Pydantic & OS Version
pydantic version: 2.7.1
        pydantic-core version: 2.18.2
          pydantic-core build: profile=release pgo=true
                 install path: /Users/toddzhang/test/pd-test/venv/lib/python3.12/site-packages/pydantic
               python version: 3.12.2 (main, Feb  6 2024, 20:19:44) [Clang 15.0.0 (clang-15<IP_ADDRESS>.5)]
                     platform: macOS-14.4.1-arm64-arm-64bit
             related packages: typing_extensions-4.12.0
                       commit: unknown

@j-z10,
Thanks for reporting this - could you please describe the result that you're getting in v2.6.4 vs v2.7.1? I'm not seeing a difference with local testing!

@sydney-runkle  Thanks for your reply, and here is my local testing result.
# example.py
from pydantic import BaseModel, Json
import json

class Foo(BaseModel):
    name: str
    result: Json

result = {'name': '中文'}
json_result = json.dumps(result)

# this line should print {'name': 'test', 'result': {'name': '中文'}}
# but it's {'name': 'test', 'result': {'name': 'ä¸\xadæ\x96\x87'}}
print(Foo(name='test', result=json_result).model_dump())

when on pydantic==2.6.4, it works well

when on pydantic==2.7.1, the model_dump not working as expected

@j-z10,
Gotcha, thanks for reporting this! Let's see what either @samuelcolvin or @davidhewitt thinks - I'm guessing this has to do with a new version of jiter or pydantic-core...


Webpack it for easier distribution

The licenses of the libraries I'm using are compatible with the MIT license I'm using. There should be a Webpacked version included so someone can easily spin up a server

For reference regarding fontkit issue in webpack: https://github.com/devongovett/fontkit/issues/67#issuecomment-327763361


Ammo Press animation

Version: [e.g. mw3.0-<IP_ADDRESS>]
Describe the bug
A clear and concise description of what the bug is.
If you make ammo on multipel ammo presses the animation ist only working on one of them
To Reproduce
Steps to reproduce the behavior:

Place multipel ammo presses next to eachother
Start making ammo in all of them
See error

Expected behavior
A clear and concise description of what you expected to happen.
Only one of the ammo presses will play animations

Please use 0.1-Dev-5 and try again.
If the issue persist, please report the issue here


Docker image

Can you prepare and share the Docker image for the bot?

Done, please see https://github.com/3cky/telegram-uploader-bot/tree/main#docker.


Fix #2 Getting Error for "useMediaQuery" being called in loop.

Fixes #2
This PR will include the following changes

Adding types package for react-responsive
Fixing Hook being called in loop issue.

cc: @ashutosh1919

@Sachin-chaurasiya, please follow the comment on the issue. We want to eliminate react-responsive. So, you may want to work in that direction. Also, there are couple of things that should be done before we can merge this PR.

Adding pre-commit to format all JS files for indentation.
Deploying website and creating deploy preview for the website.

Do not include code for these in this PR. If you want to work on this, then please create issue and I will assign it to you. Otherwise I anyway will work on this in early next week.

@Sachin-chaurasiya , I am clear with the first point and I'll create the issue for it.
On the second point can you please elaborate more.

@Sachin-chaurasiya you can carry on with the first one. I have to do second one since I have the write permission. Essentially, whenever a new PR is raised, we don't want to fetch it in local and see how does it look in UI. That is why we setup deploy previews. Whenever PR is raised, it will build UI and deploy it. So, we can directly see the UI changes in browser. You can read more about it here. Don't worry. I will take care of this.

@ashutosh1919 , got it . I used this same approach in my portfolio project.

@Sachin-chaurasiya please consider synching this PR branch with current main to resolve merge conflicts

Closing this PR as lost track of it. Will raise ned PR for the same.


Hyperlink

There is no walkaroud to create and update hyperlink. Rest is all we have
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: fc176ce2-e245-8c2a-62a9-29f0fa3f755a
Version Independent ID: 50df0c72-d567-a572-a4db-80730c5881f7
Content: Guidance - Migrate from classic workflows to Power Automate flows in SharePoint
Content Source: docs/business-apps/power-automate/guidance/migrate-from-classic-workflows-to-power-automate-flows.md
Product: sharepoint
GitHub Login: @spdevdocs
Microsoft Alias: spdevdocs

Sorry, but I'm not clear what you are referring to...

MDBosa is referring to the inability of Power Automate to update any SharePoint Hyperlink column in any list/library - the update actions available simply ignore this column type and they are not available to update.
This type of update is trivially easy in SharePoint Workflow - they are simply treated as a text field that can be updated like any other text field.
Any SharePoint 2010 workflow that needs to update a Hyperlink column cannot be migrated to Power Automate, given that Power automate cannot update Hyperlink columns - a feature gap that is not mentioned in this article, but should be.

@MDBosa please reiterate that my summary of the issue is correct, in order to keep this issue open.  This affects me as well, however due to no action from MS and comment from you this is being marked as stale, even though it isn't.

The summary of Zylantha is correct


No performance boost with extra linear layers

Hi, thanks for releasing this amazing repo!
While I can indeed reproduce the performance boost of the attention function, the performance drops as "slow" as PyTorch when I tried to add projection layers before and after the attention. The full benchmarking code is here: https://github.com/garrett4wade/attn_layer_test/blob/main/main.py.
Environment

PyTorch NGC 23.08 docker image with the latest flash_attn installed via pip3 install flash-attn --no-build-isolation.
The GPU is a PCIe A100 80G.
nvidia-smi gives "Driver Version: 535.54.03 CUDA Version: 12.2".

Reproduce the results
By running python3 main.py, the output is something like
flash-func - Forward + Backward pass
  3.61 ms
  1 measurement, 100 runs , 16 threads
torch-func - Forward + Backward pass
  28.78 ms
  1 measurement, 100 runs , 16 threads
flash-layer - Forward + Backward pass
  33.58 ms
  1 measurement, 100 runs , 16 threads
torch-layer - Forward + Backward pass
  33.62 ms
  1 measurement, 100 runs , 16 threads

The descriptor *-func indicates that given q, k, and v, only the attention function is performed to compute the attention score, while the descriptor *-layer indicates that the code runs a standard attention layer, with two linear and dropout layers added to produce qkv and project to a new hidden state.
The results of attention function is expected and aligns with the benchmark results of benchmarks/benchmark_causal.py. However, the performance boost seems to disappear with additional linear layers. Why is this happening? Is it expected?

That doesn't make sense. You should check that FlashAttention is actually running :D
Attention layer time is: inner attention time + projection time. You're saying inner attention time is much faster, and projection is using the same code, so presumably projection time is the same.

Thank you for your response! I found that it is due to a ridiculous mistake made by me 😅 The actual fwd+bwd time of a flash-attention-layer should be about 8.5ms in my environment.
Closing this issue.

@garrett4wade I encountered the same problem， can you tell me what your problem is? how did you solve it？

@garrett4wade I encountered the same problem， can you tell me what your problem is? how did you solve it？

Hi, as Tri said, you may need a double-check to ensure that your code actually invokes the flash-attn function.

Thank you for your response! I found my mistake！


PDS-OWASP-ZAP: owasp process in separate container

Situation
pds-owasp-zap image:
Currently we have a Kubernetes POD with one container where both, the PDS and the OWASP-ZAP processes run.
Problem
We do not want this. The Kubernetes rule of thumb is: "only one process per container".
In this case, Kubernetes wouldn't notice when the OWASP-ZAP process dies.
Solution
Create a POD with two containers:

container1: PDS server (small with few ressources)
container2: OWASP-ZAP server process (what alive check can we use here for Kubernetes?)

As we discussed, we can start the OWASP-ZAP for each scan and do a shutdown and clean up after every scan. To achieve this we could extend the owasp-zap.sh inside the PDS-Solution. The second step is already done by the owasp-zap.sh script:

[ ] 1. Starting up OWASP-ZAP server and waiting for OWASP-ZAP to start
[ ] 2. Execute DAST scan
[ ] 3. Shutdown OWASP-ZAP after scan and cleanup old session data


Implement and handle errors

What would you like to be added:
Implement and handle errors thrown during a workflow's execution
Why is this needed:
Allows for fine-grained processing - and possibly forking - of faulted activities
Depends on:

Updates to the Serverless Workflow Specification, which does not define well enough errors, thus tightly couply them to runtime implementations

Implemented in 1.0.0-alpha1


Execution failed for task ':app:externalNativeBuildDebug'

Hi, I'm learning to use NDK,

I've created a new project
check the c++ support
use c++ 11 option
The generated project run fine and show the "hello from c++".
Then I tried to change the code at native-lib.cpp from sample code of bitmap plasma:

#include <jni.h>
#include <string>
#include <android/bitmap.h>
#include <android/log.h>
#define  LOG_TAG    "cardscanner"
#define  LOGE(...)  __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)

extern "C"
jstring
Java_com_aprisma_cardscanner_cardscanner_MainActivity_stringFromJNI( JNIEnv *env,  jobject /* this */, jobject bitmap) {
    AndroidBitmapInfo  info;
    void*              pixels;
    int                ret;
    static int         init;
    if ((ret = AndroidBitmap_getInfo(env, bitmap, &info)) < 0) {
        LOGE("AndroidBitmap_getInfo() failed ! error=%d", ret);
        return NULL;
    }
    if (info.format != ANDROID_BITMAP_FORMAT_RGB_565) {
        LOGE("Bitmap format is not RGB_565 !");
        return NULL;
    }
    if ((ret = AndroidBitmap_lockPixels(env, bitmap, &pixels)) < 0) {
        LOGE("AndroidBitmap_lockPixels() failed ! error=%d", ret);
    }
    std::string hello = "Hello sjfosfosjf";
    return env->NewStringUTF(hello.c_str());
}

and change MainActivity.java :
package com.aprisma.cardscanner.cardscanner;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
import android.graphics.Bitmap;

public class MainActivity extends AppCompatActivity {
    static {System.loadLibrary("native-lib");}

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        TextView tv = (TextView) findViewById(R.id.sample_text);
        tv.setText(stringFromJNI(null));
    }
    public native String stringFromJNI(Bitmap  bitmap);
}

Got error:
Error:FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:externalNativeBuildDebug'.
> Build command failed.
Error while executing 'C:\Users\admin\AppData\Local\Android\sdk\cmake\3.6.3155560\bin\cmake.exe' with arguments {--build D:\Frank\workspace\CardScanner\app\.externalNativeBuild\cmake\debug\mips64 --target native-lib}
[1/2] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
[2/2] Linking CXX shared library ..\obj\mips64\libnative-lib.so
FAILED: cmd.exe /C "cd . && C:\Users\admin\AppData\Local\Android\sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe  -target mips64el-none-linux-android -gcc-toolchain C:/Users/admin/AppData/Local/Android/sdk/ndk-bundle/toolchains/mips64el-linux-android-4.9/prebuilt/windows-x86_64 --sysroot=C:/Users/admin/AppData/Local/Android/sdk/ndk-bundle/platforms/android-21/arch-mips64 -fPIC -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -std=c++11 -O0 -fno-limit-debug-info -O0 -fno-limit-debug-info  -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libnative-lib.so -o ..\obj\mips64\libnative-lib.so CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o  -llog -lm "C:/Users/admin/AppData/Local/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/mips64/libgnustl_static.a" && cd ."
CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o: In function `Java_com_aprisma_cardscanner_cardscanner_MainActivity_stringFromJNI':
  D:\Frank\workspace\CardScanner\app\src\main\cpp/native-lib.cpp:19: undefined reference to `AndroidBitmap_getInfo'
  D:\Frank\workspace\CardScanner\app\src\main\cpp/native-lib.cpp:29: undefined reference to `AndroidBitmap_lockPixels'
  clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
  ninja: build stopped: subcommand failed.

please help, thank you

check bitmap-plasma's CMakeLists.txt file,  the lib needed is jniGraphics, add it into your CMakeLists.txt's target_link_libraries()  would be fine.
you might check for null pointer: you did send down a null pointer from Java to native code right now.
Also for the generated prototype, you need add two modifiers to it, otherwise release build would be in trouble ( you native code would optimized away ):
extern "C" JNIEXPORT jstring JNICALL Java_.....()
later when you add more functions into Java side, right click to generate corresponding native prototype, the generated prototype need to add:
extern "C"
to all generated native code prototypes because you are using CPP file, not C file.  Just bring it up ahead of the time, you will see it.  Later android studio versions ( NOT the next release one ) should fix them someday.

@ggfan thank you so much :100: my program now run again.
All your suggestion and solution is very important for me it help me learn several tricks to do NDK correctly, very quick and right to the point. :+1:  :+1:  :+1:
eagerly waiting the generate extern soon :)
Thank you and best regards

I am developing NDK Sample.
I have created fresh Project using android studio with C++ support also check for "-frtti -fexceptions". It is compile properly but while running it gives below error which makes build fail.
Another thing is that if I change file extendsions from .CPP to .C it will works properly. I don't know why it gives error while I change file extension.
native-lib.cpp
`#include <jni.h>
#include
extern "C" JNIEXPORT jstring
JNICALL
Java_com_mastek_ndksample_MainActivity_stringFromJNI(
JNIEnv env,
jobject / this */) {
std::string hello = "Hello from C++";
return env->NewStringUTF(hello.c_str());
}
`
Build.gradle
` apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.sample.ndksample"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags "-frtti -fexceptions"
}
}
}

sourceSets {
    main {
        jniLibs.srcDirs = ['src/main/jniLibs']
    }
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
externalNativeBuild {
    cmake {
        path "CMakeLists.txt"
    }
}

}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
`
Got below error
Build command failed. Error while executing process D:\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {--build D:\Android Studio\Workspace\NDKSample\app\.externalNativeBuild\cmake\debug\arm64-v8a --target native-lib} [1/2] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o FAILED: D:\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe  --target=aarch64-none-linux-android --gcc-toolchain=D:/Sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64 --sysroot=D:/Sdk/ndk-bundle/sysroot  -Dnative_lib_EXPORTS -isystem D:/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem D:/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include -isystem D:/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -isystem D:/Sdk/ndk-bundle/sysroot/usr/include/aarch64-linux-android -D__ANDROID_API__=21 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security  -frtti -fexceptions -O0 -fno-limit-debug-info  -fPIC -MD -MT CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o -MF CMakeFiles\native-lib.dir\src\main\cpp\native-lib.cpp.o.d -o CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o -c "D:\Android Studio\Workspace\NDKSample\app\src\main\cpp\native-lib.cpp" error: error reading 'D:\Android Studio\Workspace\NDKSample\app\src\main\cpp\native-lib.cpp' 1 error generated. ninja: build stopped: subcommand failed.
for more you can check my question on stakoverflow from here
please help, Thanks in advance.

upload your code to somewhere please, including everything?. between c and C++ is the 'extern "C"' there for in your function prototype.  also what version is your android studio ( anyhow use the latest one: even the older one has bug, it is not going to be fixed in those old versions )?

the latest Android Studio version, 3.1.2 seems ok with it.  probably you could try menu:
Build > Refresh Linked C++ project
Build > Clean Project
Run > run app
or remove build and .externalNativeBuild manually and re-try. It is a guess, nothing I could see through

Hi ggfan. Thanks for quick reply. As per your suggestion I have updated studio version to 3.1.3 and also follow steps given by you but still its not able to run it successfully.
Even, I have tried to create .SO file from command Line by given set of commands

D:\TestNDk\native-lib\jni>set PATH=$PATH:D:\android-ndk-r17b
D:\TestNDk\native-lib\jni>set SYSROOT=D:\android-ndk-r17b\platforms\android-15\arch-arm
3 D:\TestNDk\native-lib\jni>D:\android-ndk-r17b\build\ndk-build

I find these from here
Do you think that Any chance of Windows version effect it? why I am asking is because It is works fine on my home laptop windows 7 version using Android Studio and Command Line but It is not working on Windows 10 which I have in my office.
I got same error while create so file from command line. It says CMAKE is not able to generate any obj file native-lib.o as below.

I can see [1/2] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o error in my error msg.
Can you look into these and give me proper solution for these if possible.

I tried on my windows 10, it is ok with it. Got to be with something else: you do not have cmake installed on your own system, do you? Please upload your whole project to somewhere, I will download it to try. something to do with environment setting, could not see it right now
BTW, the CXX_FLAGS is to be set inside CMakeLists.txt, not on command line; standard could be -std=c++11 or c++14.

@ggfan Yes, I have installed cmake its already there within my sdk folder along with lldb. I am just building sample project with C++ support nothing else still for you I have uploaded my code here.
I found something in app/.externalNativeBuild/cmake/debug/arm64-v8a/cmake_build_output.txt Detecting CXX compiler ABI info - failed. Does it mean its not able to find Compiler for C++ file becuase I see in that file it gets compile for C file.
Do I need to have some changes in toolchain file? Is android studio toolchain and cmake chain files are different? Some people say clang is still not proper so I need to compile it with GCC. Is that true?

this problem is more related to the build machine setting, unlikely to be anything related to compiler type ( gcc or clang ). Unfortunately I could not spot it: your program could build on my system of windows 10.
I am not sure how to debug it either: could only guess. If you go to command line ( NOT under your sdk's cmake directory, type cmake.exe, you could not find the program, correct?) If you do find your own cmake.exe ( not sdk's ), remove it from your PATH( you could add it later after you get this simple one working )
Then, go to your project directory, remove your local.properties file;
- find file gradlew.bat; run it just as "gradlew.bat"
- if you are happy there, good -- done and means your system is good.
- otherwise
   --- you would see complaint about ANDROID_HOME env variable
        set it to your SDK's directory in window advanced system properties}
  --- re-open a dos box, see your ANDROID_HOME is really set up with "set"
  --- then re-run "gradlew.bat clean assembleDebug"
  --- it would succeed (great)
  --- if it complaint about ANDROID_NDK_HOME, set to your NDK dir ( your-sdk/ndk-bundle )
  --- make sure both ANDROID_HOME and ANDROID_NDK_HOME are set correctly
  --- re-run gradlew.bat clean assembleDebug

if this could not get you through, just uninstall Android Studio, SDK and do it over from the fresh ( it saves time that way ): the re-install Android Studio, let it manage all SDK and NDK download etc.
if you have lots of env variables set up for android previously, remove them all before you try. do not use external CMake ( your separate installation yet ).  something simple, I just do not know what it is.

okay. Thanks for support. I will check and let you know the result. Hope it works ,if not then I will come back to you..;)

As per your reply I have tried below things but still getting same error.

Clean all the  env varibales related to Android and also others.
Download android studio 3.1.3 from developer site also new SDK & NDK.
created fresh sample project as I have new setup and run but unfortunately its failed again.
Run gradlew.bat under my project directory its successful.
gradlew.bat iD which is fail with same error as studio.

Even I tried to build it manually by sdk's cmake but it gives me same error. I have not installed any external CMKAE.

Now is there anyway I can run it successfully?

the build command is
gradlew.bat

that what android does. gradle will call cmake.   If you have to use cmake directly and not using gradle,  you would need to look at the  command line parameters that gradle uses, it is in file cmake_build_command.txt file in your %project-dir%/app/.externalNativeBuild/cmake/...
hope that helps.

Yeah. I know build command. I don't want to use cmake directly that was just testing whether its working directly or not.I taught if gradle is not able to build it lets try to build using cmake.exe  nothing else.
I have used gradlew.bat to build and get BUILD SUCCESSFUL.
While I Run(app) on my device or on emulator it gets failed with above error and that is build command fail. I don't know what is the problem? I have deleted everything and re-installed but android studio gives same error.
Is there any proper solution to resolve this?

while once gradlew could build, your environment is not of a problem. you could do the full cycle to the end on the command line:

gradlew.bat  assembleDebug
adb install -r  app/build/outputs/.../your-apk.apk
adb shell am -n your-package/your-activity ( or you go to your device and start it there )
( use for \ for windows probably )

that should clear up any doubt of your system. If that works and your Android Studio IDE does not work, I would check for  android studio's SDK settings and make sure it is pointing to the same one you are using for command line.
you experience a unique problem unfortunately I could not see what the problem is.

I think simple gradlew.bat make build successful but gradlew.bat clean assembleDebug gives same error. I am not able to complete commands given by you because only build gradle build is successful after that going to Run(app) it gives me Build command fail above error from android studio as well as command line. Will gradlew.bat generate app.apk? No right? So how can I perfrom adb install -r app/build/outputs/.../your-apk.apk. If apk is generated then my problem get resolve but that is the main thing where I am facing problem.
SDK is same while I am doing gradlew.bat from command line.
Even I am also thinking that this is a unique problem for me after lot of search but I need to have solve these or try any other simple way but that I don't know to generate SO file from c++ file. Do you know any other way guide me so I can try and generate SO file?

Oh, ok. if gradlew.bat assembleDebug, there is no way you have apk.  It would be odd to generate so file and zip it you manually for apk for this thing: gradle is the way to go.  maybe chat is easy to see. my  email is<EMAIL_ADDRESS>

Thanks you so much Gerry for your help. After lot of try and error we are able to solve. To resolve problem I have follow below steps.

go to project directory.
deleted .gradle ,app/.externalNativeBuild and app/build.
changed local.properties ndk path to external ndk-r16b.
Run through Android studio.
Finally apk is generate...:) Happy

@ggfan I appreciate all the effort given buy you. Thanks again.


[Enhancement]: Improving UI of landing page

Do you want to have the enhancement of existing game ? 😀 Describe yourself..
The current UI is not very clean.
Describe the solution you'd like
I'd like to improve the UI by making it less cluttered and easier on the eye.
Select program in which you are contributing
GSSoC24
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey @rahul-p19 !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹

/assign

Hey @rahul-p19 ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇


When deleting a model along with its associations, also delete the associations' associations.

Describe the feature
This feature would be able to delete an object, its related objects, and its related objects' related objects.
For example, say you have a User model, a Profile model, and a Post model. The relations between the tables would be:

User "has one" Profile.
Profile "has many" Post.

As it currently stands, when you delete the User object like so:
...
err := db.Select(clause.Associations).Delete(&models.User{Id: id}).Error
if err != nil {
	return errors.new(err.Error())
}
...

only the User and the Profile would be deleted while the Post objects would remain in the database.
This new feature would make it so that when you were to delete the "top-level" model, in this case User, all the model's related objects and their related objects and their related objects, etc, would be deleted.
Motivation
The motivation behind such a feature is that it makes it much easier to manage the database because as of now, to get such functionality to work, you would need to use hooks and loops and eventually if your models are related to many objects, you could end up with double, triple nested hooks and loops.
Related Issues

https://stackoverflow.com/questions/70833600/golang-gorm-cascade-delete-to-nested-fields
https://stackoverflow.com/questions/73534284/how-to-delete-related-models-of-a-relation-in-gorm

I'd already be happy if nested Select().Delete() would work. Currently I can not get it running.
e.g. db.Select("Profile", "Profile.Posts").Delete....

@CubicrootXYZ Hey so I was actually able to get this to work. I made use of the constraints. I did try using them before when I first created this issue. I was using them wrong. But once I implemented them correctly, they worked just fine.
They also go as deep as they can. For example if model 1 is related to model 2 which is related to model 3, if model 1 is deleted all model 2 objs related to model 1 are deleted and all model 3 objs related to model 2 are deleted.

Hi, I also encountered this issue.
Simply said, I have a ModelA has one ModelB, and ModelB has many ModelC. I added "gorm:constraint:OnDelete:CASCADE" to ModelB field in ModelA and ModelC field in ModelB. When I delete ModelA record using: db.Select(clauses.Associations).Delete(&modelA), only ModelA record and related ModelB was deleted, ModelC records related ModelB still there, not deleted.
Can you post your simply code to reference? I already searched many many github issues and stackoverflows but cannot find the solutions.


incompatibility with "only_full_group_by"

The only_full_group_by mode is a default for recent version of mysql
Reporting alerts fails with ""Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'malspider.alert.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by""
=> temporary solution: edit the my.cnf to force the sql mode
check current mode with select @@sql_mode
(can be edited manually for the session - maybe a fix to implement instead of fixing all sql queries)

Thank you for the suggestion. I'll add this to my list for this week.
On Sat, Feb 25, 2017 at 8:39 AM, vletoux<EMAIL_ADDRESS>wrote:

The only_full_group_by mode is a default for recent version of mysql
Reporting alerts fails with ""Expression #1
https://github.com/ciscocsirt/malspider/pull/1 of SELECT list is not in
GROUP BY clause and contains nonaggregated column 'malspider.alert.id'
which is not functionally dependent on columns in GROUP BY clause; this is
incompatible with sql_mode=only_full_group_by""
=> temporary solution: edit the my.cnf to force the sql mode
check current mode with select @@sql_mode
(can be edited manually for the session - maybe a fix to implement instead
of fixing all sql queries)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ciscocsirt/malspider/issues/23, or mute the thread
https://github.com/notifications/unsubscribe-auth/AR0QEFAeGp2_IX9heCTSYrAcGnlBIZ-cks5rgC8fgaJpZM4MMA66
.


added leetcode solution

i added the link to the file.. check it once

i added the link to the file.. check it once

Why Did You Added the Pandas Practice.!
If You Please Brief It

my last pr got counted... can i get more done over here..?
that'll be kind of you :P

my last pr got counted... can i get more done over here..? that'll be kind of you :P

I think It Will not be counted to the Hacktoberfest Event.
But why did You added the Pandas Practice Here.

i wwanted to add it as another pr .. my bad
should i remove it..?

i wwanted to add it as another pr .. my bad should i remove it..?

Yes please remove it and make commit then I will merge it.

well well i did remove it.. ill open another or for that after wards.. sorry

well i did remove it.. ill open another or for that after wards.. sorry

Have u Opened Another PR?


build scipy  1.13.0

since this works for pyodide we shoukd also add this.
See https://github.com/pyodide/pyodide/pull/4719

SciPy v1.13.0 has been merged today; thanks for providing the cross-link. All in all, we would love to have more recipe maintainers in Pyodide. More input from those involved in the ecosystem can get these updates going faster for both Pyodide and emscripten-forge, especially since SciPy is tricky to build – if you're interested, please reach out!


NimBLECharacteristic::setValue() is calculating the wrong message length.

I am programming and ESP32 with platform.io.
NimBLECharacteristic::setValue(const char *s) is setting the attribute size to the entire size of the buffer, not just the '\0' terminated string.
For example this does the correct thing and sends 22 bytes to the client (string data plus null terminator):

uint16_t cap;
std::string value;
outgoingCharateristic->setValue("12345678901234567890A");
cap = outgoingCharateristic->getValue().capacity();
printf("Capacity: %d\n", cap);
value = outgoingCharateristic->getValue();
printf("%s\n", value.c_str());

The server prints out:

Capacity: 22
12345678901234567890A

That's what the client receives as well.
But if I declare a char buffer and fill it in, what gets sent is the entire buffer, no matter how large it is.

char str[45];
uint16_t cap;
std::string value;

sprintf(str, "12345678901234567890A");
outgoingCharateristic->setValue(str);
cap = outgoingCharateristic->getValue().capacity();
printf("Capacity: %d\n", cap);
value = outgoingCharateristic->getValue();
printf("%s\n", value.c_str());

In this case the server prints:

Capacity: 45
12345678901234567890A

My client receives a 45 byte buffer and thinks there is more data than there really is. It's still the null terminated string but followed with garbage.
Changing the buffer to char str[1500] causes and error.

E NimBLEAttValue: value exceeds max, len=1500, max=512

setValue() uses strlen() to determine the length of the data so it shouldn't give a value that exceeds the null termination. If I strlen() the string before passing it to setValue() it does report the correct value. However once inside setValue(), only the buffer length is returned.

This may be an issue of the template used when compiling. I would suggest casting the char array to a uint8_t pointer and passing the strlen value to setvalue directly.


Invalid Request with "application/json" content-type

When I make a POST request (using POSTMAN), to http://localhost:5000/connect/token,  When I use  application/x-www-form-urlencoded content-type, and pass the client_id/secret/username/password in the body, it works fine. I get a token. But if I use  application/json content-type and pass the credentials as json, in the body, I get   an  "invalid_request" response. What am I doing wrong? Is application/x-www-form-urlencoded  the only supported content-type?

yes

Out of curiosity @leastprivilege , why is that the only supported content-type?

that's what the spec defines

Is that defined for any security reasons or just a base level compatibility? I'd think expanding it to include JSON wouldn't harm anything, especially since .NET handles most of those conversions.

Is that defined for any security reasons or just a base level compatibility? I'd think expanding it to include JSON wouldn't harm anything, especially since .NET handles most of those conversions.

but then you won't be using standard libraries that know the protocol

Oh I see what you're saying, it's to keep the clients from straying to non-standards based.
And if someone really needed it, I haven't checked, but it seems definitely extensible enough to manually implement it yourself.
Thanks for the time and satisfying my curiosity.

Don't the official OpenID Connect Core 1.0 specs also support querystring and json body serialization options?   https://openid.net/specs/openid-connect-core-1_0.html#Serializations

The spec does support JSON.
Please provide a pointer on how to accept JSON for this endpoint?

It's not supported right now.

We have been using Auth0 for our external facing APIs for years now and they support JSON token requests. We want to create an internal token service for use by all our internal REST API microservices and re-use the code and tests we already have. The x-www-form-urlencoded restriction in IdentityServer4 makes no sense. A JSON request is supported by more and more providers. This lack is extremely frustrating and makes IdentityServer4 feel out of date.


Update index.html

Description of the change:
I updated all instances of "delivery metrics" with "statistics" per: https://github.com/sendgrid/docs/issues/2965
Reason for the change:
SendGrid is no longer using the term "Delivery Metrics" and is using "Statistics" instead.
Link to original source:
https://sendgrid.com/docs/User_Guide/SendGrid_for_Mobile/index.html
@ksigler7

Hello @davedom11,Thanks again for the PR! It's HACKTOBERFEST! We want to show our appreciation by sending                                              you some special Hacktoberfest swag. If you have not already, could you please fill out                                              this form so we can send it to you? Thanks!                                             Team SendGrid DX


Fix text option being mandatory in options

Fixes #26

You shouldn't be able to specify text at all in the top-level options, so would be better to use the Omit type. export interface Options extends Omit<BitbarOptions, 'text'>

Updated and rebased from master.
Notes:

It's possible to add text to the options if the user is using JS without TS. Should we add protection against that or maybe it's fine? Why touch it if it has worked for 4 years.
Maybe the package should be rewritten in TypeScript? Probably not worth it before the 2.0 release of bitbar though, if it gets released.

Should we add protection against that

Yeah, that would be great.

Why touch it if it has worked for 4 years.

You could argue that about any kind of change. It's very unlikely anyone depends on this as it wouldn't achieve anything and adding a protection just prevents user from doing a mistake.

Maybe the package should be rewritten in TypeScript? Probably not worth it before the 2.0 release of bitbar though, if it gets released.

Nah. I've stopped converting my project to TypeScript. TypeScript is just way too buggy.

Yeah, that would be great.

Done and pushed. Opted for a TypeError instead of silently deleting options.text.

You could argue that about any kind of change. It's very unlikely anyone depends on this as it wouldn't achieve anything and adding a protection just prevents user from doing a mistake.

True.

Nah. I've stopped converting my project to TypeScript. TypeScript is just way too buggy.

Oh, interested to hear the issues you've been having. A discussion for another time and place though. :)


Unit testing

Added unit testing for both backend and frontend which can be seen for backend
backend->tests->Unit->

ImageTest.php
UserTest.php
for frontend can be checked in the spec.ts files for components especially signup Component

Added unit testing for both backend and frontend which can be seen for backend
backend->tests->Unit->

ImageTest
UserTest
for frontend can be checked in the spec.ts files for components especially signupComponent


state of project

is this still maintained?

It is! There are a lot of improvements we'd like to make and not all of these are reflected within the Issues. I'll share a recent comment I left in #82.

This project could really use some TLC. It's past due to be converted to TypeScript along with generating both ESM and CJS bundles. These things should probably happen as part of a 1.0.0 release.

I'm definitely open to any and all suggestions or PRs to improve things. Theres probably also room for some general housekeeping around Issues and PRs, which I haven't had an opportunity to get around to just yet 😬 but probably should do soon.

Ah I see, I saw quite a few stale PRs and issues so I wasn't sure, that could use some cleaning up.
I was considering making my own fork with quite a few changes and improvements.

Well if you're interested in contributing your improvements back here then I would certainly welcome it, but if you decide you want to take a different direction then you're of course welcome to fork and do whatever you like. The license is very permissive for this reason. 😄

honestly, I just wanted the customization to declare custom functions for things like isTileWalkable, checkAdjacentNode ect.

I like the idea of providing a custom function for something like this. You're jogging my memory of a past PR that started to do something similar, but I don't believe it was ever finished.
https://github.com/prettymuchbryce/easystarjs/pull/40

Would love a custom condition for those functions - would allow for things like elevation, especially useful for isometric games (E.g. can't go from tile -> tile if elevation is too high)

I ended up writing my own implementation.
It's usable something like this.
const WALL_TILE = Object.freeze(new AStaar.TileMeta({walkable: false}));
const SLOW_TILE = Object.freeze(new AStaar.TileMeta({cost: 2}));
const NORMAL_TILE = Object.freeze(new AStaar.TileMeta());

export let astaar = new AStaar({
	getTile: function (x, y) {
		if (!window.app.biomeData[x] || !window.app.biomeData[x][y]) return WALL_TILE;
		let color = window.app.biomeData[x][y];

		switch (color) {
		case "#808080":
			return WALL_TILE;
		case "...":
			return SLOW_TILE;
		default:
			return NORMAL_TILE;
		}
	}
});```

Not sure that'd work for my use-case unfortunately - elevation would depend on knowing both the current and target tile to know if the elevation difference is too high :(


Run Android example in CI

Objective

Run the Android example in an emulator in CI
Capture a screenshot while there

🤞 https://github.com/bevyengine/bevy/actions/runs/4496367298/jobs/7910948139
I've gotten a few successes but it seems very sensitive to timeouts...
If that works fine, I'll do iOS after

Worked like a charm! On the third try...
Here is the screenshot: https://github.com/bevyengine/bevy/suites/11748321832/artifacts/612148516

closing in favour of #8216


WIP - Multi naming

WIP - needs more documentation and another test
resolves #1505

@alexauritt We should support any term instead of specifically atoms or two-item tuples.

@ericmj -- ok thanks, will do. still going on this.


[Feature Request] Automatic stop crafting before switch job

One thing that I found annoying in the base game is that before switching crafting job I need to close the crafting interface and then reopen it. Is it possible to integrate an automatic stop crafting when clicking the Switch Job button ?

@WorkingRobot thanks for the suggestion. I'll install that plugin