sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: scatter/gather calls to work with masks
Labels: feature,category: core

### Describe the feature and motivation

I'd like to propose `cv::gather(img, mask)` and `cv::scatter(img, mask, values)`.

For a mask with `k` true elements, `gather()` would return a k-by-1 `Mat` containing all elements from `img` at true positions of the mask, in the usual order (row major).

`scatter()` would take such a k-length vector (or compatible shape) and assign those values into the `img` argument, according to `mask`.

### Additional context

People come from Python/numpy and are used to an operation like `values = image[mask]` that collects the elements, only where `mask` is true, into a "flat" list/vector. The same can be done in reverse: `image[mask] = values`.

Currently there appears to be no simple way to do this. Example solution: https://stackoverflow.com/questions/74527114/how-to-get-all-pixels-in-mask-in-c


One common idiom in Python/numpy is `img[mask] = processed[mask]`, which is equivalent to C++ `processed.copyTo(img, mask)`. That is *not* why I'm suggesting these APIs. That's already solved. I'm suggesting to provide the two halves of the concept which can be combined, or used alone, in other ways.
Repository: storybook
Issue: [Bug]:Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function
Labels: bug,needs triage

### Describe the bug

Getting below error for one of the custom element in angular:

Uncaught TypeError: Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
    at TabsComponent.LifecycleElement [as constructor] (lifecycleElement.js:9:28)
    at TabsComponent.CustomElement [as constructor] (customElement.js:22:47)
    at new TabsComponent (tabs.js:32:47)
    at DefaultDomRenderer2.createElement (platform-browser.mjs:549:25)
    at BaseAnimationRenderer.createElement (animations.mjs:240:30)
    at createElementNode (core.mjs:7023:25)
    at ɵɵelementStart (core.mjs:14562:43)
    at _Template (template.html:4:9)
    at executeTemplate (core.mjs:9647:9)
    at renderView (core.mjs:9447:13)

### To Reproduce

_No response_

### System

_No response_

### Additional context

_No response_
Repository: godot
Issue: In XR auto exposure works only for a left eye
Labels: bug,topic:rendering,topic:xr

### Godot version

3.5.1 stable

### System information

Windows 10, GLES3, OpenXR, SteamVR, RX580

### Issue description

If i set auto exposure and place a bright light source - it makes image darker. If i cover that object with a non bright mesh - image gets brighter. If i do the same in VR - auto exposure works for both eyes, but it calculates an exposure only for a left eye's image. 

I assume it's happening because an auto exposure based on an image in a Godot window, which is also a left eye

This leads to the immersion breaking experience when what you're seeing with your right eye, would be affected by a left eye's image. My proposal is to do an exposure check based on a both eye's image.

(Screenshots made with a left eye camera)
![left_eye_covered](https://user-images.githubusercontent.com/96468948/203315592-c39d7f3c-8f66-420a-a96d-d154a1b20194.jpg)
![right_eye_covered](https://user-images.githubusercontent.com/96468948/203315595-ad69deb2-7cc0-465c-aa56-2852029a7f89.jpg)

### Steps to reproduce

1. Create a project, set up simple ARVR scene
2. Set environtment with an auto exposure enapled
3. Attach simple mesh to a controller
4. Create a bright mesh
5. Look at the bright mesh with your left eye covered
6. Look at the bright mesh with your right eye covered


Expected behaviour: similar result for each eye

Actual behaviour: when you cover right eye - nothing happens. When you cover left eye - autoexposure is working

### Minimal reproduction project

N/A
Repository: material-ui
Issue: Providing tooltip to `slotProps` for SpeedDialAction results in `[object object]` in html
Labels: component: speed dial,enhancement

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Steps to reproduce 🕹

Link to live example: https://codesandbox.io/s/hardcore-sound-31v0eu

Steps:

1. Create a `SpeedDial` with one or more `SpeedDialAction`s
2. Add a `slotProps` prop to the `SpeedDialAction` with a typescript-valid object


### Current behavior 😯

Inspecting the `#SpeedDialtooltipexample-action-0` and such, you can see that it gets a literal `slotprops` attribute in the html with `[object object]`

![afbeelding](https://user-images.githubusercontent.com/4040870/203326721-0aa79072-3ef3-41c1-b444-e185e73d0cef.png)


### Expected behavior 🤔

Slotprops get applied to the tooltip as they should be.

### Context 🔦

I'm trying to customize to customize the color and other styles of sub-components belonging to `SpeedDialAction`.

### Your environment 🌎

I attached a codesandbox.
Repository: stable-diffusion-webui
Issue: [Feature Request]: Enable the name of the embedding used to be included with the prompt and model  info in the text file
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

Include the embedding that was used in the text file for every prompt.
Would also be good to be able to swap them out in prompt s/r 

### Proposed workflow

1. save image
2. go to associated text file
3. discover what embedding was used


### Additional information

_No response_
Repository: rust
Issue: Confusing error for missing From impls (and other traits with blanket impls)
Labels: A-diagnostics,T-compiler

Given the [following](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=416278a7c79cd113fbb91d89f820cbee) code: 

```rust
struct A;
struct B;

fn foo() {
    let a = A;
    let b = B::from(a);
}
```

The current output is:

```
error[[E0308]](https://doc.rust-lang.org/stable/error-index.html#E0308): mismatched types
 --> src/lib.rs:6:21
  |
6 |     let b = B::from(a);
  |             ------- ^ expected struct `B`, found struct `A`
  |             |
  |             arguments to this function are incorrect
  |
note: associated function defined here
```

Ideally the output should look like:

```
error: type `B` doesn't implement `From<A>` 
 --> src/lib.rs:6:21
  |
6 |     let b = B::from(a);
  |             ------- ^ expected struct `B`, found struct `A`
  |
note: type `B` has a blanket implementation
    impl<T> From<T> for T
```
Repository: rust
Issue: Missing diagnostic for attempting to call Deref method shadowed by trait impl
Labels: A-diagnostics,T-compiler

Given the following code: [playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=16cdc52cb81bbc4c2ed4fbbd19a5289d)

```rust
trait Trait {
  fn get(&self, index: usize);
}

impl<T> Trait for Vec<T> {
  fn get(&self, _index: usize) {
    let _ = self.get(0);
  }
}
```

The current output is:

```
warning: function cannot return without recursing
 --> src/lib.rs:6:3
  |
6 |   fn get(&self, index: usize) {
  |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
7 |     let _ = self.get(0);
  |             ----------- recursive call site
  |
  = note: `#[warn(unconditional_recursion)]` on by default
  = help: a `loop` may express intention better if this is on purpose
```

Ideally the output should look like:

```
warning: function cannot return without recursing
 --> src/lib.rs:6:3
  |
6 |   fn get(&self, index: usize) {
  |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
7 |     let _ = self.get(0);
  |             ----------- recursive call site
  |
  = note: `#[warn(unconditional_recursion)]` on by default
  = help: a `loop` may express intention better if this is on purpose
  = help: there exists another method `get` on `[T]` which `Vec<T>` implements `Deref` for. Did you mean to call that?
     `(&**self).get(0)`
```

It would be better if it also figured out that the clearer way to do this for `Vec` is `self[..].get()`, but just the deref tip would be a big improvement. 


<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"compiler-errors"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: godot
Issue: An empty `Color` (all components set to 0.0) returns `true` in boolean context
Labels: discussion,topic:core

### Godot version

v4.0.beta.custom_build [1ce2bd63f]

### System information

Windows 10

### Issue description

In GDScript, a Color with all of its components set to 0.0 still returns **`true`** when forced in a boolean context. 

This has been documented to an extent in the class reference. Every Color, except specifically opaque black, evaluate to **`true`**. Do also note that the empty initialization of a Color (`Color()`) is the same as opaque black.
> Note: In a boolean context, **_a Color will evaluate to false if it's equal to Color(0, 0, 0, 1) (opaque black)_**. Otherwise, a Color will always evaluate to true.



The inconsistency lies in the way some other Variant types are handled:
- All Vectors (including **Vector4**) evaluate to **`false`** if all of their components are set to 0. 
- **String**s (and **StringName**s), **Dictionaries** and **Array**s evaluate to **`false`** if they are empty.

So, overall, I do still find this behavior to be a minor oddity worth pointing out. It makes a bit of sense if intentional, but when all components are 0.0 the colour is essentially empty. It is nothing.

### Steps to reproduce

Copy this snippet of GDScript code in your favourite method of choice.
```GDScript
	if (Color()):
		print("Opaque Black Color")

	if (Color.BLACK):
		print("Opaque Black Color")

	if (Color(0, 0, 0, 0)):
		print("All 0 Color printed")
```
Prints:
```
All 0 Color printed
```

### Minimal reproduction project

There's no need, it is very easy to reproduce.
Repository: PowerToys
Issue: Advanced file search tool
Labels: Idea-New PowerToy

### Description of the new feature / enhancement

a tool that have gui for advanced search functions like wildcards AND NOT etc..

### Scenario when this would be used?

when i need to find files located at many folders but have some similarity.
thanks! you are doing good work!

### Supporting information

_No response_
Repository: flutter
Issue: [video_player]Is it possible to add a stop() method?
Labels: c: new feature,p: video_player,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

Request new feature for [video_player package](https://pub.dev/packages/video_player)

## Use case
The app I am working on has a screen that will play a local video in a loop. And when user taps anywhere on this video/screen, the app will navigate to another screen.

To make sure the app will not occupy too many resources, I would like to stop the video when navigates away from this video screen and play from start when navigates back.

Because I would like to use `Navigator.push()`/`pushNamed()` to make sure the back button will work (navigate the user back). In this case, the `dispose()` lifecycle on the video screen will not be triggered and if I manually dispose the video then I need to make sure I re-initialize it when user comes back because the `initState()` lifecycle will not be called as well. 

As a result, it's easier for me to call `videoController.stop()` when navigates away and then call `videoController.play()` when comes back.

## Proposal
Add a stop method so that we can use `videoController.stop()`. We now only have play and pause. 

Thanks!
Repository: go
Issue: x/crypto/blowfish: panic: runtime error: index out of range [0] with length 0
Labels: NeedsFix

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.19 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/root/.go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/root/.go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/src/ngolo-fuzzing/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2481516251=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

Run https://go.dev/play/p/QMNkWgpIag1

### What did you expect to see?

The program finishing and printing Hello

### What did you see instead?

```
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
golang.org/x/crypto/blowfish.ExpandKey({0xc0000a4f58?, 0xc0000a4f70?, 0x405359?}, 0x0?)
	/tmp/gopath936803848/pkg/mod/golang.org/x/crypto@v0.3.0/blowfish/block.go:34 +0x285
main.main()
	/tmp/sandbox3374802724/prog.go:13 +0x5b

Program exited.
```

Found by https://github.com/catenacyber/ngolo-fuzzing

Is this relevant ?
(Should not panic and do nothing if the slice is empty)
Repository: deno
Issue: Add more special permission cli variables
Labels: permissions,suggestion

The goal is to make specifying permission (in the readme for example) more accessible

Say I have an app that requires `--allow-read=~/.cache`, this is a pain to give instructions for, as I have to say 
```
Unix: --allow-read=~/.cache
Windows: --allow-read=/APPDATA/
macos: --allow-read=macostuff
```

One way to improve this is to add another cli variable for example `<cache_dir>`, so I can just say only `--allow-read=<cache_dir>/restofthepath`

Deno already have these kind of variables `<module> <CWD> <exec_path> ..` so I'm just suggesting on expanding on those, and `<cache_dir>` is an example
Repository: storybook
Issue: [Bug]: Constraint validation does not work on play function input
Labels: bug,needs triage

### Describe the bug

Standard HTML [Constraint validation](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Constraint_validation) does not work properly when typing text into an input using a Storybook play function.

### To Reproduce

```shell
export const ConstraintValidation = () => (
  <input data-testid="input" required minLength={8} />
);
ConstraintValidation.play = async ({ canvasElement }) => {
  const canvas = within(canvasElement);
  const input = await canvas.getByTestId<HTMLInputElement>('input');
  await userEvent.click(input);
  await userEvent.type(input, 'foo', { delay: 100 });
  console.log(input.validity);
}


The above story logs following object to the console:

```js
{
  badInput: false
  customError: false
  patternMismatch: false
  rangeOverflow: false
  rangeUnderflow: false
  stepMismatch: false
  tooLong: false
  tooShort: false
  typeMismatch: false
  valid: true
  valueMissing: false
}
```

The input is required and has a min length. It should not be `valid: true`.

Now select the input element in the Chrome developer tools elements pane. Then execute `$0.validity.valid` in the console. It will return `true`.

Enter one character manually and delete it.

Execute `$0.validity.valid` in the console again. It will now return `false` which is finally the expected behavior.
```


### System

```shell
Environment Info:

  System:
    OS: macOS 13.0
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
  Browsers:
    Chrome: 107.0.5304.110
    Firefox: 106.0.5
    Safari: 16.1
  npmPackages:
    @storybook/addon-actions: ^6.5.12 => 6.5.12
    @storybook/addon-essentials: ^6.5.12 => 6.5.12
    @storybook/addon-interactions: ^6.5.12 => 6.5.12
    @storybook/addon-links: ^6.5.12 => 6.5.12
    @storybook/builder-webpack5: ^6.5.12 => 6.5.12
    @storybook/jest: ^0.0.10 => 0.0.10
    @storybook/manager-webpack5: ^6.5.12 => 6.5.12
    @storybook/react: ^6.5.12 => 6.5.12
    @storybook/testing-library: ^0.0.13 => 0.0.13
```


### Additional context

It seems like the way these `userEvent`'s work is bypassing the [Constraint validation](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Constraint_validation) entirely. E.g. I've tried waiting 10 seconds before calling `userEvent.type()`. It does not seem to be a timing problem.
Repository: go
Issue: time: Integer overflow in Date
Labels: Unfortunate,help wanted,NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.19.3 linux/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/sylvain/.cache/go-build"
GOENV="/home/sylvain/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/sylvain/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/sylvain/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19.3"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3696417096=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on go.dev/play is best.
-->

The function `Date` of package `time` has an integer overflow. The year number is used to compute the number of days since epoch and then multiply be the number of second in a day: https://cs.opensource.google/go/go/+/refs/tags/go1.19.3:src/time/time.go;l=1496;drc=4b43b741710eb87cbae25f19cbde7eb733b08df1 without check. If the year number is above 549755813887 it overflows the number of second and the year number is negative.

Proof of concept: https://go.dev/play/p/9dteWLSkjdn

It seems to be related to the issue #20678 but the integer overflow is reached with values on 39 bits only. It allows to have date far in the future seeing in the past.

### What did you expect to see?
A positive date and `true` as output or an error.

### What did you see instead?

```bash
-34798235367-01-21 16:59:44 +0000 UTC
false
```
Repository: stable-diffusion-webui
Issue: [Feature Request]: API Docs view only
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

By adding some flag as the starting argument, the webui will launch in api docs view mode only, which will allow to only view API docs.

### Proposed workflow

1. Go to `webui-user.bat` or `webui-user.sh`
2. Add flag `--api-docs-only` to the starting argument
3. Launch it


### Additional information

This will be useful, as sometimes I need only to view API docs and not to interact with AI models itself and loading times are quite long.
As an implementation, it can just redirect from `http://127.0.0.1:7860/` to `http://127.0.0.1:7860/docs`
Repository: transformers
Issue: Add BART-LS
Labels: New model

### Model description

BART-LS (Long Bart), presented in this [paper](https://arxiv.org/pdf/2209.10052.pdf), establishes a new SOTA on a number of  NLP tasks and long form datasets. It uses pooling-augmented block-wise attention and a novel pre-training strategy to achieve this.

Given my interest in long text summarisation I'm very keen to get this into the wonderful transformers library and to start benchmarking it against other models. Therefore, happy to take this on and ping any members of the team if I face any blockers. If this fits with the library's plans let me know and I'll start working on a PR for this.

### Open source status

- [X] The model implementation is available
- [x] The model weights are available

### Provide useful links for the implementation

Original Model Repo (which includes the model weights): https://github.com/facebookresearch/bart_ls
Repository: godot
Issue: Autoloaded names are not available during registration of ResourceFormatSavers and ResourceFormatLoaders
Labels: bug,topic:core

### Godot version

v3.5.1.stable.official [6fed1ffa3]

### System information

Linux 6.0.9-arch1-1

### Issue description

When using autoloaded classes inside `ResourceFormatSaver` or `ResourceFormatLoader` definitions (or in any other class used inside), the following error occurs when launching project:
```
Parser Error: The identifier "Log" isn't declared in the current scope.
```
In this instance, `Log` is an autoloaded singleton defined in project configuration.

### Steps to reproduce

1. Create a script that will be autoloaded.
```GDscript
# autoloaded.gd
extends Object

func test():
	pass
```
2. Add that script to the list of autoloads.
3. Create a `ResourceFormatLoader` or `ResourceFormatSaver` that uses the name of atoloaded singleton.
```GDscript
#loader.gd
class_name TestResourceFormatLoader
extends ResourceFormatLoader

func get_recognized_extensions():
	Autoloaded.test()
```
4. Launch project.

### Minimal reproduction project

[rfsl_test.zip](https://github.com/godotengine/godot/files/10069864/rfsl_test.zip)