sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: Stitcher.stitch() fails with error 1
Labels: category: stitching

##### System information (version)
- OpenCV => 4.0
- Operating System / Platform => Windows 64 Bit, Linux 64 Bit
- Compiler => Python 3.7

##### Detailed description

Stitcher sometimes fails to stitch images when there is sufficient overlap with enough keypoints.
Even trying the sample [script](https://raw.githubusercontent.com/opencv/opencv/4.x/samples/python/stitching.py) and sample [images](https://github.com/opencv/opencv_extra/tree/master/testdata/stitching) from the official [tutorial](https://docs.opencv.org/4.5.3/d8/d19/tutorial_stitcher.html) does not work.

##### Steps to reproduce

Download the stitching.py sample script from [opencv repo](https://raw.githubusercontent.com/opencv/opencv/4.x/samples/python/stitching.py).
Download the _newspaper*.jpg_ images from [opencv_extra repo](https://github.com/opencv/opencv_extra/tree/master/testdata/stitching).
Run the script: `python stitching.py --mode 1 newspaper1.jpg newspaper2.jpg`

Images _newspaper2.jpg newspaper3.jpg newspaper4.jpg_ are stitched together properly, however _newspaper1.jpg newspaper2.jpg_ cause problems.

##### Issue submission checklist

 - [x] I report the issue, it's not a question
   <!--
   OpenCV team works with forum.opencv.org, Stack Overflow and other communities
   to discuss problems. Tickets with question without real issue statement will be
   closed.
   -->
 - [x] I checked the problem with documentation, FAQ, open issues,
       forum.opencv.org, Stack Overflow, etc and have not found solution
   <!--
   Places to check:
   * OpenCV documentation: https://docs.opencv.org
   * FAQ page: https://github.com/opencv/opencv/wiki/FAQ
   * OpenCV forum: https://forum.opencv.org
   * OpenCV issue tracker: https://github.com/opencv/opencv/issues?q=is%3Aissue
   * Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
   -->
 - [x] I updated to latest OpenCV version and the issue is still there
   <!--
   master branch for OpenCV 4.x and 3.4 branch for OpenCV 3.x releases.
   OpenCV team supports only latest release for each branch.
   The ticket is closed, if the problem is not reproduced with modern version.
   -->
 - [x] There is reproducer code and related data files: videos, images, onnx, etc
   <!--
   The best reproducer -- test case for OpenCV that we can add to the library.
   Recommendations for media files and binary files:
   * Try to reproduce the issue with images and videos in opencv_extra repository
     to reduce attachment size
   * Use PNG for images, if you report some CV related bug, but not image reader
     issue
   * Attach the image as archive to the ticket, if you report some reader issue.
     Image hosting services compress images and it breaks the repro code.
   * Provide ONNX file for some public model or ONNX file with with random weights,
     if you report ONNX parsing or handling issue. Architecture details diagram
     from netron tool can be very useful too. See https://lutzroeder.github.io/netron/
   -->
Repository: rust
Issue: HRTB with GAT behaving differently in associated type bound vs where clause
Labels: T-compiler,A-GATs,A-higher-ranked

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
#![feature(generic_associated_types)]

pub trait Iterable {
    type Iter<'a>: Iterator<Item = Self::Item<'a>>
    where
        Self: 'a;
    type Item<'a>
    where
        Self: 'a;

    fn iter(&self) -> Self::Iter<'_>;
}

trait Bar {
    type BarType;
    type BarItem<'a>;
}

trait Baz: Bar
where
    Self::BarType: for<'a> Iterable<Item<'a> = Self::BarItem<'a>>,
{
}
```

([Playground.](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=3c0d414c4542949975cd74f81f96a039))

I expected to see this happen: I had expected compilation to succeed.

Instead, this happened: Compilation fails with the error message below.

<details>
<summary>Error message</summary>

```
error[E0311]: the associated type `<Self as Bar>::BarType` may not live long enough
  --> src/lib.rs:19:1
   |
19 | / trait Baz: Bar
20 | | where
21 | |     Self::BarType: for<'a> Iterable<Item<'a> = Self::BarItem<'a>>,
22 | | {
23 | | }
   | |_^
   |
   = help: consider adding an explicit lifetime bound `<Self as Bar>::BarType: 'a`...
   = note: ...so that the type `<Self as Bar>::BarType` will meet its required lifetime bounds...
note: ...that is required by this bound
  --> src/lib.rs:21:37
   |
21 |     Self::BarType: for<'a> Iterable<Item<'a> = Self::BarItem<'a>>,
   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
</details>

Everything seems to work fine if instead I provide the HRTB on an associated type instead, like so:

```rust
trait Foo {
    type FooType: for<'a> Iterable<Item<'a> = Self::FooItem<'a>>;
    type FooItem<'a>;
}
```

I was surprised by this difference, so I initially opened a [question about this](https://users.rust-lang.org/t/gats-and-hrtb-confusion/66830) on the rust-lang users forum. There, people more knowledgeable than I suggested that this might be a GAT-related bug, with some uncertainty as to whether this is the same issue as in #89196.

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.58.0-nightly (baba6687d 2021-11-03)
binary: rustc
commit-hash: baba6687df3e83fdb15cc6ec239b4a1c75a30505
commit-date: 2021-11-03
host: x86_64-unknown-linux-gnu
release: 1.58.0-nightly
LLVM version: 13.0.0
```
Repository: PowerToys
Issue: Inconsistent folder structure in AppData and Program Files  
Labels: Area-Setup/Install,Priority-3,Issue-Refactoring

### Microsoft PowerToys version

0.49.1

### Running as admin

- [X] Yes

### Area(s) with issue?

General

### Steps to reproduce

The installation folder structure and the appdata folder structure are inconsistent. 
For installation, the path is `%programfiles%\PowerToys`
For appdata, the path is `%localappdata%\Microsoft\PowerToys`

I think we should add `\Microsoft` to the installation path. (Or remove `\Microsoft` from appdata path)

### ✔️ Expected Behavior

Same folder structure for appdata and program files 

### ❌ Actual Behavior

Inconsistence folder for appdata and program files 

### Other Software

_No response_
Repository: PowerToys
Issue: FancyZones inconsistent behavior with windows+arrow keys
Labels: Issue-Bug,FancyZones-Dragging&UI,FancyZones-Hotkeys,Product-FancyZones,Priority-3

### Microsoft PowerToys version

0.49

### Running as admin

- [X] Yes

### Area(s) with issue?

FancyZones

### Steps to reproduce

Set "Override Windows Snap" and "Zone index", then move windows across zones

### ✔️ Expected Behavior

Right/left arrow keys: cycle through zones 1 > 2 > ... > n
Up key: window in zone / not in zone > maximized window
Down key: maximized window >window in zone >minimized window

### ❌ Actual Behavior

Right/left arrow keys: cycle through zones "not in zone, but with the upper left corner the same as in zone 1" > 1 > 2 > ... > n > "not in zone, but with the upper left corner the same as in zone n"
Up key: window in zone / not in zone > maximized window, but only in some zones
Down key: maximized window >window in zone >minimized window, but only in some zones

### Other Software

_No response_
Repository: TypeScript
Issue: I should be able to turn off suggestions by line or by id
Labels: Suggestion,In Discussion

ts-ignore does this for errors, but does not work on suggestions.
This is extra confusing on things that vary between error and suggestion based on tsconfig settings, like noImplicitAny and noUnusedParameters.

I can imagine some other way to disable suggestions, like reading a file that the editor writes to disk, or having the editor send ignored lines or ignored codefix ids when requesting codefixes. However, `// @ts-ignore` is existing, so it's easy for us to implement and easy for people to discover with search. But it clutters up files with low-importance ts-ignores.

Notably, there is no way to turn off suggestions in JS files either.

# Bug Report

### 🔎 Search Terms

ts-ignore suggestion codefix

### 🕗 Version & Regression Information

- This is the behavior in every version I tried

### 💻 Code

```ts
// @ts-ignore
function f1(x, y) {
}
// @ts-ignore
function f2(x, y) {
    return x + y
}
```

### 🙁 Actual behavior

Codefixes for implicit-any (f1 and f2) and unused parameters (just f1).

### 🙂 Expected behavior

No suggested codefixes
Repository: tensorflow
Issue: tf.print() with XLA compilation
Labels: stat:awaiting tensorflower,type:feature,comp:apis,comp:xla,TF 2.11

<em>Please make sure that this is a feature request. As per our [GitHub Policy](https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md), we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template</em>

Hello,

Does anyone know whether tf.print (or an equivalent workaround) can be made to work with XLA compilation? I get an error saying that XLA does not recognize the "printV2" operation if I have a tf.print statement inside a function decorated with @tf.function(jit_compile=True).

If this functionality does not exist, would like to request that it be added as a new feature!

Thanks!

**System information**
- TensorFlow version (you are using): 2.6.0
- Are you willing to contribute it (Yes/No): No

**Describe the feature and the current behavior/state.**
tf.print() does not seem to work when used within functions that are compiled with XLA ( decorated with @tf.function(jit_compile=True)

**Will this change the current api? How?**
No

**Who will benefit with this feature?**
Users of XLA-compiled tensorflow code. 

**Any Other info.**
Repository: electron
Issue: [Feature Request]: Add `sender: WebContents` to `ProtocolRequest`
Labels: enhancement :sparkles:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

I've recently been [messing around with custom protocols](https://github.com/timfish/electron-protocol-ipc) and have realised that in some cases they allow for great [simplification over IPC](https://github.com/getsentry/sentry-electron/issues/376). 

However, it would be really useful to know exactly which renderer the connection came from.


### Proposed Solution

Add `sender: WebContents` to `ProtocolRequest`

### Alternatives Considered

None

### Additional Information

I don't really know the architecture of Chromium. Maybe this would be complex to add 🤷‍♂️
Repository: react
Issue: Use html native event handler <img> with React SSR.
Labels: Type: Discussion,React 18

  Similar to this
  https://github.com/facebook/react/issues/15446

  I have react APP that will do server render first to create html markup then do client render on browser again.
 my app returns:
`<img classname="classA" src="invalid-src" fallbacksrc="valid-src" style="visibility:hidden"/>
`
I am trying to use onerror event handler to replace src with valid fallback src, and use onload handler to remove style="visibility:hidden". I know React has onError and onLoad, but since i use server side render, the static html will be generated, I would like to use html native onerror and onload event handler because i do not want to wait client side react rendering with javascript, so that the image can be load as fast as possible.

what I did is I manually add event handler in my html template using document.getElements.

`<script>
      var images = document.getElementsByClassName("classA");
for (img of images) {
    img.addEventListener("error", function e() {
        const i = this.getAttribute("fallbacksrc");
        i && (this.src = i), this.removeEventListener("error", e)
    }), img.addEventListener("load", function e() {
        console.log("onloading", this.src), "hidden" === this.style.visibility && (this.style.visibility = null), img.removeEventListener("load", e)
    });
}
</script>
`

This works fine except the load event executed after React render on client side(JS execution). I did the workaround to add a < div > wrapper to my < img >, the problem is solved, load event executed before client side JS execution. However, I would like to see if there is any solution that does not need to add extra wrapper.

PS. wrapped with React.Fragment is not working as well

Would like to know if there is a way to use native dom event handler ? onload, onerror? 

i can not inline add those event because the event handler will be removed by React 
`<img classname="classA" src="invalid-src" fallbacksrc="valid-src" style="visibility:hidden" onerror="..." onload="..."/>`
Repository: flutter
Issue: [tonic] Use precise-width integer types, following style guide.
Labels: engine,P2,c: tech-debt,team-engine,triaged-engine

[Suggested by @dcharkes on [flutter/engine/pull/29405](https://github.com/flutter/engine/pull/29405#discussion_r740968637)]:

> We should consider updating [the DartConverter templates] to int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t to make it conform to the [style guide](https://google.github.io/styleguide/cppguide.html#Integer_Types).

Specifically the Style Guide says:

> **Integer Types**
> Of the built-in C++ integer types, the only one used is int. If a program needs a variable of a different size, use a precise-width integer type [..] such as int16_t.

As such we might replace the templates at:
https://github.com/flutter/engine/blob/91033b9dab6b5819a4b8e9921bf849cfe1a9c5a2/third_party/tonic/converter/dart_converter.h#L92-L108

So that instead of, for instance:
```
template <>
struct DartConverter<unsigned long> : public DartConverterInteger<unsigned long> {};
```
We'd have:
```
template <>
struct DartConverter<uint32_t> : public DartConverterInteger<uint32_t> {};
```
Repository: TypeScript
Issue: Give better error message when trying to import something declared as a global
Labels: Suggestion,Help Wanted,Effort: Moderate,Domain: Error Messages,Experience Enhancement

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms

import global error message 


## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

<!-- A summary of what you'd like to see added or changed -->

If you write `import Foo from "foo"` and `"foo"` resolves to a declaration file that is not a module but declares a global named `Foo`, we should give a better error message suggesting how to resolve the incorrect import. The current one is

`File '{0}' is not a module.`

Globals are weird so we can’t always tell what the user was trying to do, but I think we can get it right a good chunk of the time by checking whether this file was already included in the program by some other inclusion reason besides this erroneous import—if so, suggest simply removing the import declaration and referencing `Foo` as a global. If not, suggest dropping the import clause: `import Foo from "foo"` → `import "foo"`.

Note I think this _only_ applies when every name specified by the import declaration exactly matches a global declared in the resolved file (and the file is not also a module that just happens to declare some globals via global augmentation).

## 📃 Motivating Example

@soffes hit this when trying to import from [shaka-player](https://unpkg.com/browse/shaka-player@3.2.1/dist/shaka-player.compiled.d.ts) and vaguely understood what the error message was saying, but not how to resolve it. It was particularly confusing because the file wasn’t already in his program, so upon writing the bad import, everything seemed to work _except_ TypeScript complained at the import declaration site. This _looks_ like the import is actually working but TypeScript is complaining about it for some inscrutable reason, when in fact, the `shaka` name is resolving only because the bad import successfully gets the global declaration into the program.
Repository: godot
Issue: VisualScript: PropertyEditor large after selecting color
Labels: bug,topic:editor,topic:visualscript

### Godot version

4.0.dev

### System information

Windows 10

### Issue description

The editor is not resizing smaller then the color picker after the first selection of color

https://user-images.githubusercontent.com/20573784/140402490-60adab61-045d-4a44-bfe9-b4383eae117f.mp4





### Steps to reproduce

Open a VisualScript Edit a Vector an albedo and then back a new vector.


### Minimal reproduction project

[Temppppp (2).zip](https://github.com/godotengine/godot/files/7477470/Temppppp.2.zip)
Repository: flutter
Issue: [cross_file] No example
Labels: package,good first issue,team-ecosystem,P2,p: cross_file,triaged-ecosystem

I was looking at Pana scores for our packages, and it's flagging that we don't have an example for `cross_file`. We definitely should have at least an example.md with some useful code samples, if not an example app.

/cc @ditman
Repository: TypeScript
Issue: CSS module support
Labels: Suggestion,Awaiting More Feedback

# Suggestion

Now that TS 4.5 supports import assertions and JSON modules, it'd be great if it similarly supported [CSS modules](https://github.com/WICG/webcomponents/blob/gh-pages/proposals/css-modules-v1-explainer.md) which are now shipping in Chrome and Edge.

There are two aspects of JSON module support that would be important to add for CSS modules:
1. Built-in typing of CSS modules based on their import assertion. This could be done in library code with https://github.com/microsoft/TypeScript/issues/46135 but since there's a specified interface of CSS modules, the type would ideally be included in TS's DOM lib.
2. Copying of CSS files during build. JSON files are copied as part of compilation so that relative paths to JSON modules work in the compiled output. Doing this for CSS modules would ensure that they also work in the output without an extra copy step.

## 🔍 Search Terms

* CSS module

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

<!-- A summary of what you'd like to see added or changed -->

## 📃 Motivating Example

```ts
import styles from './styles.css' assert {type: 'css'};
document.adoptedStyleSheets = [...document.adoptedStyleSheets, styles];
```

## 💻 Use Cases

Importing standard CSS modules...
Repository: terminal
Issue: Analyze PGO profiles during EIM
Labels: Area-Build,Product-Terminal,Issue-Task

@dmachaj noticed that a good chunk of our boot work is in .text$zz... so it's not in the PGO training.

When I put the initial PGO training tests in at https://github.com/microsoft/terminal/blob/main/src/cascadia/WindowsTerminal_UIATests/SmokeTests.cs, it was like the bare minimum to get us going on the PGO stuff.

EIM is probably a good time to revisit that and check how effective they're actually being and whether we need to make adjustments to the training set.
Repository: rust
Issue: Conflicting implementations error despite bound preventing conflict
Labels: C-bug,T-types

The following fails:
```rust
trait A {
    type C;
}

trait B<M>: A {}

impl<T: A, M: Into<T::C>> B<M> for T {}
// equivalent; also errors:
// impl<C, T: A<C=C>, M: Into<C>> B<M> for T {}

struct S {}

impl A for S {
    type C = u32;
}

// error[E0119]: conflicting implementations of trait `B<()>` for type `S`
impl B<()> for S {}
```
Note that due to the bounds such a conflict is impossible unless `(): Into<u32>`, which cannot happen...

... actually, this may simply be the compiler giving a lot of leeway for additional implementations in `std`.

... replacing `u32` and/or `()` with local private types does not change the error:
```rust
struct X;
struct Y;

trait A {
    type C;
}

trait B<M>: A {}

impl<T: A, M: Into<T::C>> B<M> for T {}

struct S {}

impl A for S {
    type C = X;
}
impl B<Y> for S {}
```

Introducing a local `Into` trait *slightly* changes the error:
```rust
trait Into<Y> {}

// ...
```
This version has the same error but now includes an (incorrect) explanation:

> note: downstream crates may implement trait `Into<_>` for type `()`

### Variant

Here's a variant:
```rust
trait A<C> {}

trait B<C, M>: A<C> {}

impl<C, T: A<C>, M: Into<C>> B<C, M> for T {}

struct S {}

impl A<u32> for S {}

impl B<u32, ()> for S {}
```

This results in the same error, *except* that:

- there is a valid explanation:
  
  > note: upstream crates may add a new impl of trait `std::convert::From<()>` for type `u32` in future versions

- introducing a local private `trait Into<Y> {}` fixes it
- introducing a local private type to replace `u32` or `()` fixes it


### Meta

<details>
<summary>rustc versions tested</summary>
```
rustc 1.56.1 (59eed8a2a 2021-11-01)

rustc 1.58.0-nightly (db062de72 2021-11-01)
binary: rustc
commit-hash: db062de72b0a064f45b6f86894cbdc7c0ec68844
commit-date: 2021-11-01
host: x86_64-unknown-linux-gnu
release: 1.58.0-nightly
LLVM version: 13.0.0
```
</details>