sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Possibly spurious overlapping impl (even with specialization)
Labels: A-specialization,C-bug,F-specialization

The following code leads to an "overlapping impl" error despite the fact that the `bool` impl is clearly more specific (totally concrete). 

```rust
#![feature(specialization)]

trait Encodable {
    fn encode() {}
}
trait Decodable {
    fn decode() {}
}

impl Encodable for bool {
    fn encode() {}
}

impl Decodable for bool {
    fn decode() {}
}

impl<D> Encodable for D where for<'a> &'a D: AsRef<[u8]> {
    default fn encode() {}
}

impl<T: for<'a> From<&'a [u8]>> Decodable for T {
    default fn decode() {}
}
```
Repository: rust
Issue: Weird interaction with projections in trait bounds
Labels: A-type-system,T-compiler,C-bug,T-types

Reproduction case here: https://is.gd/KJTI1j.

This code should compile fine, as it's simply stating a constraint and then something attempting to use it. Regardless of whether the projection is unified with the real type or not, this code should be able to compile. Replacing the projection on line 22 with a concrete type will cause the issue to go away.
Repository: go
Issue: image/png: Decode failing on bitmap
Labels: NeedsDecision

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?
go version go1.8.3 windows/amd64

### What operating system and processor architecture are you using (`go env`)?
set GOARCH=amd64
set GOOS=windows

### What did you do?
See https://play.golang.org/p/-1XYQAzugF

Trying to decode a bitmap png file which both chrome and photoshop can open without errors.

### What did you expect to see?
A decoded png image, since no bitmap format is defined mapped to a 8-bit file?

### What did you see instead?
png: invalid format: too much pixel data

To my understanding this is a valid png file and according to the spec a decoder should be able to read all valid png files though it may not be able to encode them.
Repository: neovim
Issue: API/UI: externalize 'relativenumber'
Labels: performance,api,ui,ui-extensibility,column

- `nvim --version`: VIM v0.2.1-272-gfe476ed (on https://github.com/neovim/neovim/pull/6816 to fix scrolling problems on master), but I do not remember not having this problem
- Vim (version: ) behaves differently? could not check, no vim available
- Operating system/version: Kubuntu 16.10
- Terminal name/version: Alacritty / rxvt-unicode / konsole
- `$TERM`: xterm-256color

### Actual behaviour

When a big file is opened and modified for a long time, the scrolling gets laggier and laggier. I tried to narrow it down to a plugin / action (over the course of a few months), but in the end what "solves" it is switching to `norelativenumber`.

I tried to profile the script times (with `profile func / file *`) but nothing seems out of place. Syntax parsing is not especially slow. There aren't any autocommands on `CursorMoved` but for [neomake](https://github.com/neomake/neomake), [airline](https://github.com/vim-airline/vim-airline) and [syntastic](https://github.com/vim-syntastic/syntastic), but disabling those plugins did not help.

To sum it up, I open some big file and work on it for a long time, and scrolling is getting laggier and laggier over time. I noticed that the more folds are opened, the laggier it gets. Also, it is "per buffer" (a newly opened buffer will not have the problem unless I spend a long time on it). Finally, `set norelativenumber` instantly solves the problem. Setting `relativenumber` back will make it as laggy as before I disabled it.

Once the lagging is noticeable, I tried switching the filetype to no avail (to remove the possibility of bad syntax file), disabling all plugins that can be dynamically disabled, but in the end `set norelativedelta` is the trigger.

Also (to be clear), the "lag" is actually my CPU running 100%, and it also happens in insert mode, though the easiest and most annoying proof is scrolling.

### Expected behaviour

Not such a huge performance difference between `relativenumber` and `norelativenumber`

### Steps to reproduce using `nvim -u NORC`

**Edit :** I understand there may not be enough information to solve this, and I can live without `relativenumber`. I will try to narrow it down by trimming my init.vim but this may take some days / weeks

**Edit 2 :** Finally narrowed down the cause of the problem, it was the [indentLine](https://github.com/Yggdroot/indentLine) (detailed report [here](https://github.com/Yggdroot/indentLine/issues/58#issuecomment-314718710)). I do not really understand how I missed it since it never appeared in any report (syntime / profile), but removing it totally solved it (though there still is a difference between using `set relativenumber` and `set norelativenumber`)
Repository: go
Issue: x/mobile: build error when compiling with openal 
Labels: mobile

### What version of Go are you using (`go version`)?
go version go1.8.1 darwin/amd64
gomobile version +44a54e9 Wed May 24 10:27:38 2017 +0000 (android,ios); androidSDK=

### What operating system and processor architecture are you using (`go env`)?
MacOS10.12.1 
### What did you do?
gomobile init -ndk /Users/bluepants/Documents/adt-bundle-mac-x86_64-20131030/sdk/ndk-bundle -openal "/Users/bluepants/Downloads/openal-soft-1.18.0"

gomobile build

### What did you expect to see?
SUCCESS

### What did you see instead?
gomobile: the Android requires the golang.org/x/mobile/exp/audio/al, but the OpenAL libraries was not found. Please run gomobile init with the -openal flag pointing to an OpenAL source directory.

Is somewhere I did wrong?Why did I can't do it right?Please help me.
Repository: godot
Issue: get_tree().quit() not working when running in Remote File System mode
Labels: bug,platform:ios,topic:core,topic:porting

**Operating system or device - Godot version:**
macOS, Windows, iOS - Godot 2.1.3

**Issue description:**
Running the game in Windows and iOS with the argument "-rfs IP" and calling get_tree().quit() causes the executable to become unresponsive. 
Running the game from the editor works as expected
Repository: TypeScript
Issue: Allow extending multiple interfaces with different, but compatible types
Labels: Suggestion,Needs Proposal

```ts
interface Change {
  uid: string;
  type: string;
}

interface SomeChangeExtension {
  type: 'some';
  foo: number;
}

interface SomeChange extends Change, SomeChangeExtension { }
```

In this example, I was expecting `SomeChange` to have a type equivalent to:

```ts
interface SomeChange {
  uid: string;
  type: 'some';
  foo: number;
}
```

But it would result in error:

```
Interface 'SomeChange' cannot simultaneously extend types 'Change' and 'SomeChangeExtension'.
  Named property 'type' of types 'Change' and 'SomeChangeExtension' are not identical.
```

In this case, `'some'` is compatible with `string` if the order of interfaces being extended is respected.

The reason why I want this to be allowed is that, I need to maintain multiple interfaces of the same kind of change during different stages: **raw change**, **change**, **broadcast change**. And having to duplicate part of the "extension" on every of them doesn't look good.
Repository: go
Issue: math/big: big.Int String conversion is slow
Labels: Performance

(Forked out from #11068 which is about slow `big.Float` printing but will likely be fixed by not converting in full precision before printing).

The following program:

```
package main

import (
	"fmt"
	"math/big"
)

func main() {
	n := new(big.Int)
	n.Exp(big.NewInt(2), big.NewInt(5000000), nil)
	fmt.Println(n)
}
```

which computes `2**5000000` and prints it, takes about 7 seconds on my machine to print the 1505151 characters-long answer.

```
 $ time ./test > /dev/null 

real	0m6.847s
user	0m6.848s
sys	0m0.004s
```

Almost all the time is spent generating the `String` representation of `n`. For comparison, the following equivalent `gmp` program:

```
#include <gmp.h>

int main(void)
{
	mpz_t n, b;
	mpz_inits(n, b);
	mpz_set_ui(b, 2);
	mpz_pow_ui(n, b, 5000000);
	gmp_printf("%Zd\n", n);
}
```

which prints the same string, is ~20x faster.

```
$ time ./a.out > /dev/null 

real	0m0.332s
user	0m0.328s
sys	0m0.000s
```
Repository: react
Issue: Mouseenter event not triggered when cursor moves from disabled button
Labels: Type: Bug,Component: DOM

BUG.

Mouseenter event not triggered when cursor moves from disabled button
see [example](https://alfa-laboratory.github.io/arui-feather/styleguide/#playground/code=%3Cdiv%3E%0A%20%0A%20%20%20%20%3Cdiv%20className='row'%3E%0A%20%20%20%20%20%20%20%20Hover%20on%20%20right%20button%20and%20then%20move%20cursor%20to%20left%20button%0A%20%20%20%20%20%20%20%20%3Cdiv%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cbutton%20onMouseEnter=%7B()=%3E%7Balert('Hey!');%7D%7D%20%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Not%20Disabled%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C/button%3E%0A%20%20%20%20%20%20%20%20%3C/div%3E%0A%20%20%20%20%20%20%20%20%3Cdiv%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cbutton%20disabled=%7B%20true%20%7D%3EDisabled%3C/button%3E%0A%20%20%20%20%20%20%20%20%3C/div%3E%0A%20%20%20%20%3C/div%3E%0A%0A%20%20%20%20%3Cdiv%20className='row'%3E%0A%20%20%20%20%20%20%20%20Hover%20on%20%20right%20button%20and%20then%20move%20cursor%20to%20left%20button%0A%20%20%20%20%20%20%20%20%3Cdiv%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cbutton%20onMouseEnter=%7B()=%3E%7Balert('Hey!');%7D%7D%20%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Not%20Disabled%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C/button%3E%0A%20%20%20%20%20%20%20%20%3C/div%3E%0A%20%20%20%20%20%20%20%20%3Cdiv%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cbutton%3ENot%20Disabled%3C/button%3E%0A%20%20%20%20%20%20%20%20%3C/div%3E%0A%20%20%20%20%3C/div%3E%0A%20%0A%3C/div%3E)


**What is the expected behavior?**
Should trigger Mouseenter event

React 15.5.3
Latest Chrome
MacOs 10.12.5
Repository: TypeScript
Issue: bang operator resets type inference
Labels: Bug

**TypeScript Version:**  2.3.4

**Code**
```ts
type Foo = {
  foo:string;
};
function isFoo(arg?:any):arg is Foo|undefined{
    return true;
}
function logic(arg?:object){
    if (isFoo(arg)){
        arg.foo;  //Error:(..., 13) TS2532:Object is possibly 'undefined'. 
        arg!.foo; //Error:(..., 18) TS2339:Property 'foo' does not exist on type 'object'.
    }
}
```
**Expected behavior:**
`arg!` should resolve to foo if it's already inferred that `arg is Foo|undefined`
**Actual behavior:**
`arg!` is resolved to `object`
Repository: You-Dont-Know-JS
Issue: Rewording might be needed - Async & Perf Book
Labels: for second edition

Async & Perf book has:

    This function is passed two function callbacks that act as...

I believe this needs rewording.
Repository: vscode
Issue: Show suggestion details always at the bottom
Labels: feature-request,suggest

<!-- Do you have a question? Please ask it on http://stackoverflow.com/questions/tagged/vscode. -->

<!-- Use Help > Report Issues to prefill these. -->
- VSCode Version: 1.14.0 - Insiders (6afdf30 - Date 2017-07-05T08:33:33.146Z )
- OS Version: Windows 10

-- Sorry for the English, I used Google Translator --

As suggested by @ramya-rao-a  after questioning this [comment](https://github.com/Microsoft/vscode/issues/18582#issuecomment-304643762)

Currently the same appears side, but I wish there was an option to put on the bottom.

![2e9e53f4-27ad-11e7-8e73-079325f9d56f](https://user-images.githubusercontent.com/19866231/27873887-fb192a84-6183-11e7-9cfe-7abdf3439e94.gif)

![8f33c262-28e3-11e7-86ea-4ff5fde304d5](https://user-images.githubusercontent.com/19866231/27873894-0066afc0-6184-11e7-9a03-7c3f71fce96f.gif)


<!-- Launch with `code --disable-extensions` to check. -->
Reproduces without extensions: Yes
Repository: opencv
Issue: Bizzarre Bug in matchTemplate CV_TM_SQDIFF
Labels: bug,category: imgproc

#### System information (version)
- OpenCV => 3.2.0
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2013

#### Detailed description
Looking for multiple exact template match I'm trying CV_TM_SQDIFF. In case of exact match, score `0` is expected but result is not always the same between consecutive calls or matching position in the image.
#### Steps to reproduce
A bit hard to explain but following code can reproduce the error.

1. Use opencv-logo-small.png as template
1. Create a flat image BGR 640x480
1. Copy the template multiple times in the image at points Pi(x,y)
1. Perform CV_TM_SQDIFF
1. Repeat N times with different points set

The result in P(x,y) should be always 0 but not always it is.

```.cpp
    int matchTemplateBug()
    {
        Mat T = imread("OpenCV/3.2.0/sources/opencv/doc/opencv-logo-small.png");
        Rect R(Point(0, 0), T.size()); //a rect roi over the image
        Mat I(480, 640, T.type());
        // vector of exact match point
        vector<vector < Point >> locationSets = {
            { Point(0, 0), Point(100, 30) },
            { Point(0, 0), Point(100, 30) },
            { Point(1, 1), Point(100, 30), Point(150, 200) },
            { Point(0, 0), Point(100, 30), Point(150, 200) },
            { Point(0, 0), Point(101, 31), Point(150, 200) },
        };
         //duplicate 1st set ->but get different result
        locationSets.push_back(locationSets[0]);

        //loop for all locations set
        for (size_t n = 0; n < locationSets.size(); n++)
        {
            cout << endl << "Locations: ";
            for (size_t i = 0; i < locationSets[n].size(); i++)
            {
                R = Rect(locationSets[n][i], T.size());
                T.copyTo(I(R));
                cout << locationSets[n][i] << "\t";
            }
            Mat result;
            int match_method = CV_TM_SQDIFF;
            matchTemplate(I, T, result, match_method);
            cout << endl << "   Scores: ";
            for (size_t i = 0; i < locationSets[n].size(); i++)
            {
                cout << result(Rect(locationSets[n][i], Size(1, 1))) << "\t\t";
            }
            cout << endl;
        }
        return 0;
    }
```
Below is the output (scores should be all 0)

	Locations: [0, 0]	[100, 30]	
	   Scores: [0]		[0]		

	Locations: [0, 0]	[100, 30]	
	   Scores: [0]		[0]		

	Locations: [1, 1]	[100, 30]	[150, 200]	
	   Scores: [12]		[0]		[0]		

	Locations: [0, 0]	[100, 30]	[150, 200]	
	   Scores: [12]		[0]		[0]		

	Locations: [0, 0]	[101, 31]	[150, 200]	
	   Scores: [0]		[0]		[0]		

	Locations: [0, 0]	[100, 30]	
	   Scores: [12]		[0]		

cc @snosov1 might this be related to #6919 (sorry @sovrasov  for mistake cc)
Repository: kubernetes
Issue: service resource support set-based selector
Labels: sig/network,area/api,kind/feature,priority/important-longterm,triage/accepted

<!-- This form is for bug reports and feature requests ONLY! 

If you're looking for help check [Stack Overflow](https://stackoverflow.com/questions/tagged/kubernetes) and the [troubleshooting guide](https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/).
-->

**Is this a BUG REPORT or FEATURE REQUEST?**:

> /kind feature

**What you expected to happen**:
As the [doc][1] says:

> Newer resources, such as Job, Deployment, Replica Set, and Daemon Set, support set-based requirements as well.

  [1]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

I want to get _endpoints_ by _service_ that select _pods_ with **key** = **v1** or **v2**. Is there any way to do so?

/sig api-machinery
Repository: opencv
Issue: GeneralHoughTransform does not work for trivial/Helloworld examples under samples/gpu/generalized_hough.cpp
Labels: bug,category: imgproc

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)


- OpenCV => :3.2:
- Operating System / Platform => :Ubuntu 14.04:
- Compiler => :GNU 4.9.2:

##### Detailed description

Running the sample samples/gpu/generalized_hough.cpp for sample data under  does not work. As you can see in attached images(out.png), its doing too many false detection.

##### Steps to reproduce

1.  The sample is provided under samples/gpu/generalized_hough.cpp. The image and template are used as default if one does not provide them. I have tried with both --full option and without it.


The command is run as ./opencv_example --full  --image=../data/pic1.png --template=../data/templ.png

2) The sample run finds the four matches, three of which are spurious.


![pic1](https://user-images.githubusercontent.com/8890269/27894998-54d568ea-61c4-11e7-912b-5938abeecd6e.png)
![templ](https://user-images.githubusercontent.com/8890269/27894999-54d75eb6-61c4-11e7-94ef-ec2db2ec2cbd.png)

![out](https://user-images.githubusercontent.com/8890269/27895027-88c4c4fc-61c4-11e7-84a0-dcbbaa306875.png)
Repository: vscode
Issue: Change Vertical Scrollbar Width
Labels: feature-request,trackpad/scroll,unreleased

Is there any way to change the width of the vertical scrollbars in Visual Studio Code, especially the one for the left panel?

I find it so thin that it's a bit fiddly to use.
Repository: rust
Issue: Not all doc-comments on re-exports are displayed
Labels: T-rustdoc,C-feature-request

In `nix` we're aliasing the `libc::termios` type using `pub use libc::termios as Termios`. That type has no documentation in `libc`, but we'd like to offer documentation for the type in our own crate. Specifying a doc comment above it doesn't support anything in the output. It'd be very useful if you could override documentation when aliasing types.

Originally posted at rust-lang/cargo#4250.
Repository: rust
Issue: incr. comp.: Access span information more carefully throughout the compiler.
Labels: C-cleanup,I-compiletime,T-compiler,A-incr-comp

Currently span information is accessed and copied rather haphazardly throughout the compiler which introduces lots of "false" dependency edges, because the span information is then never used or just used for error reporting. A few examples are:
- The code generating debuginfo for structs, enums, and unions fetches the `def_span` of the type in questions, just to throw it away again immediately.
- Queries collect spans from all over for possible cycle error reporting. In many cases these would not have to be access otherwise.
- MIR contains span information which is later threaded through to debuginfo, which forces us to have manual special casing for ICH computation depending on debuginfo being enabled or not.
- Type inference seems to pre-collect span information for error reporting. This information will not be used unless an actual error occurs.

I'm sure there are many other examples. Since spans are inherently unstable (adding a new-line somewhere will change all subsequent spans within the same file) this is a problem.

One possible solution would be to not store spans directly in the HIR and MIR (and other places) anymore but in a side-table that is part of the HIR map. Instead of a `Span` one would use and pass around a `SpanId` (which can just be a newtyped `HirId` or `NodeId`). Only when the `SpanId` is resolved to an actual `Span`, would we register a dependency on the thing the span originated from.

cc @nikomatsakis
Repository: TypeScript
Issue: narrowing in switch doesn't work with non-union types
Labels: Suggestion,In Discussion

```typescript
class A {
    readonly kind = 'a';
}
type U = A; // <-- supposed to be a single case union
declare var u: U;
declare function never(never: never): never;
function fn() {
    switch (u.kind) {
        case 'a': return 1;
        default: return never(u); // <-- u expected to be never, actually is A
    }
}
```
Repository: TypeScript
Issue: narrowing in switch doesn't work with ambient enums
Labels: Bug

```typescript
declare global {
    module g.m {
        enum E { A, B }
    }
}
declare var x: g.m.E;
declare function never(never: never): never;
function fn() {
    switch (x) {
        case g.m.E.A: return 1;
        case g.m.E.B: return 2;
        default: return never(x); // <-- x expected to be never, actual g.m.E
    }
}
```
Repository: bitcoin
Issue: Think about tuning the script cache/sigcache ratios
Labels: Brainstorming,Resource usage

After #10192, we have two separate caches, which are in memory blocks of equal size. This is likely not the best possible tuning, but sadly its tricky to get right because the sigcache is now used more as a DoS protection/reorg speedup and less as a cache used in normal operation. See-also, @JeremyRubin's suggestion of using the same table and further discussion at, eg, https://github.com/bitcoin/bitcoin/pull/10192#issuecomment-313334895.
Repository: rust
Issue: Add `as_str` method for `str::Split(Whitespace)`
Labels: T-libs-api,C-feature-accepted

Consider the following use case:

```rust
// A command interpreter with a "print" command, which prints what comes after it
let mut words = line.split_whitespace();

match words.next() {
    "print" => {
        // How could we get the rest that comes after the command word?
        // We could perhaps collect the words, and join them with a space, but that's lossy,
        // and doesn't sound very efficient.
        let rest;
        println!("{}", rest),
    }
    unk => println!("Unknown command: {}", unk),
}
```

Some iterators, like `str::Chars` already have an `as_str` method. The only question is whether it is possible to implement `as_str` for the Split API, without making any breaking changes.
Repository: pytorch
Issue: Implement similar PyTorch function as model.summary() in keras?
Labels: feature,module: nn,triaged,function request

`model.summary` in keras gives a very fine visualization of your model and it's very convenient when it comes to debugging the network. Can we try to implement something like it in PyTorch?

cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @albanD @mruberry