sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Inference worse in method signature using associated type than with new generic type parameter eq-constrained to the associated type
Labels: C-enhancement,A-associated-items,A-inference,T-types

With this signature
```rust
    fn try_fold<F, T: Try>(self, init: T::Ok, mut f: F) -> T where
        Self: Sized, F: FnMut(T::Ok, Self::Item) -> T
```
This code
```rust
    let a = [1, 2, 3];
    let sum = a.iter().try_fold(0i8, |acc, &x| acc.checked_add(x));
```
Gets `error[E0619]: the type of this value must be known in this context`.

But it works fine with the seemingly-equivalent signature
```rust
    fn try_fold<F, U, T: Try<Ok=U>>(self, init: U, mut f: F) -> T where
        Self: Sized, F: FnMut(U, Self::Item) -> T
```
Since `acc` and `init` must have the same type in both cases, shouldn't both signatures work?

Full repro: https://play.rust-lang.org/?gist=f8d2baeae64b17344e1cf27673a2e905&version=nightly
Repository: opencv
Issue: Using WINDOW_OPENGL on QT window (MacOS) causes WINDOW_KEEPRATIO to not work
Labels: feature,category: highgui-gui

##### System information (version)
- OpenCV => 3.3.0
- Operating System / Platform => MacOS 10.12.6
- Compiler => XCode 9.0.0.9000038

[Complete build information](https://drive.google.com/open?id=0B7qnSeyFcPCPbXBicERtQ242RVk)

##### Detailed description

When using `cv2.namedWindow` `WINDOW_KEEPRATIO` was working for me fine. As I resize the window borders are added to keep the image aspect ratio. I then compiled `WITH_QT=ON` and again it still keep the image aspect ratio using the new QT window. However, if I also flag `WINDOW_OPENGL` to `cv2.namedWindow` then the window no longer keeps its aspect ratio.

Here are two images ([1](https://drive.google.com/open?id=0B7qnSeyFcPCPaTJVM21rRUVKbEk), [2](https://drive.google.com/open?id=0B7qnSeyFcPCPN2dYdk0tcXJIRDQ)) showing the same window resized to two very different sizes and the image being squished. 

##### Steps to reproduce

```python
cv2.namedWindow(WINDOW_NAME, cv2.WINDOW_NORMAL | cv2.WINDOW_KEEPRATIO | cv2.WINDOW_GUI_EXPANDED | cv2.WINDOW_OPENGL)
```
Repository: kubernetes
Issue: [Feature Request] Support disk quota for docker runtime
Labels: area/reliability,sig/storage,sig/node,kind/feature,lifecycle/frozen,needs-triage

As docker already support `docker run --storage-opt size=1G xxx` such way to limit container disk usage, it would be better if k8s introduced this feature.

On the other hand, it also would be OK if k8s support pass `--storage-opt` in `containers` spec.
Thanks.
Repository: angular
Issue: Can't pass parameters in template to animation
Labels: type: bug/fix,area: animations,freq1: low,P4

I have written a small animation which doesn't do much

my-animations.ts 
```
export const leavingTowardsTop =
    trigger('leavingTowardsTop', [
        transition(':leave', [
            style({position: 'relative'}),
            animate("250ms ease-in", keyframes([
                style({top: 0}),
                style({top: "{{topPixels}}"})
            ]))
        ], {params : { topPixels: "-3000px" }})
    ])
```
I have registered the animation in a component and in its template I am trying to do :

`    <div [@leavingTowardsTop]="{params : { topPixels: '-30px' }}">
`
which works but ignore the specified value for topPixels (so it still takes -3000)
I also tried : 

`[@leavingTowardsTop]="{ pixels: '-30px' }"`

but the -30 is still ignored

Am I missing something here ? 

I am on Angular 4.4.6 for all modules.
Repository: opencv
Issue: calibrateCamera fails for random-pattern input and fix focal length aspect ratio
Labels: category: calib3d

OpenCV 3.3dev, Windows 10 x64, Visual Studio 2017

Problem:
`calibrateCamera` computes bad instrinsics and extrinsics when used with object and image point generated from random-pattern input, and fix focal length aspect ratio (CALIB_FIX_ASPECT_RATIO) flag.

Details:
`random_pattern_calibration.cpp` sample code is used here; command line `random_pattern_calibration.exe -pw 800 -ph 600 -mm 25 images.xml`; when running the original code (flags = 0) the estimated intrinsics are close to real values (though still not perfect: small fx/fy ratio and big p1,p2):
```
<flags>0</flags>
<camera_matrix type_id="opencv-matrix">
  <rows>3</rows>
  <cols>3</cols>
  <dt>d</dt>
  <data>
    1.2810242855539684e+03 0. 9.4337871627044819e+02 0.
    1.7160871348449657e+03 8.2035160399464769e+02 0. 0. 1.</data></camera_matrix>
<distortion_coefficients type_id="opencv-matrix">
  <rows>1</rows>
  <cols>5</cols>
  <dt>d</dt>
  <data>
    9.0157476710754948e-03 -3.0376368347694447e-02
    6.9050641321461419e-03 1.1583844483554158e-02 1.3193574069120802e-02</data></distortion_coefficients>
<rms>3.0258671922648297e+00</rms>
```
but when the flag is set to CALIB_FIX_ASPECT_RATIO and activated for `calibrateCamera` the estimated instrinsics are very far from the real values:
```
<flags>2</flags>
<camera_matrix type_id="opencv-matrix">
  <rows>3</rows>
  <cols>3</cols>
  <dt>d</dt>
  <data>
    3.8147470141808649e+03 0. -4.7988364085335263e+02 0.
    3.8147470141808649e+03 8.7325109000495343e+02 0. 0. 1.</data></camera_matrix>
<camera_distortion type_id="opencv-matrix">
  <rows>5</rows>
  <cols>1</cols>
  <dt>d</dt>
  <data>
    -2.0394850680235380e-01 7.6372079248181979e-01
    -5.4861356671901031e-03 -1.7419167799241686e-01
    -4.8816620467613397e-01</data></camera_distortion>
<rms>1.3788212655961322e+01</rms>
```
The real values are:
```
  <f>1539.41527989211615</f>
  <cx>0.8411201250105462</cx>
  <cy>-1.5852183416687927</cy>
  <k1>0.0058501330927213891</k1>
  <k2>-0.08160902608395923</k2>
  <k3>0.12641783193454889</k3>
  <p1>-0.00063976203947559184</p1>
  <p2>-0.00025905208594043203</p2>
```
Here is the test data used: 
[CalibNexus5X.zip](https://github.com/opencv/opencv/files/1406767/CalibNexus5X.zip)
Repository: go
Issue: proposal: os: add a package to atomically create or replace a file
Labels: Proposal

I propose adding a package to atomically create or replace a file to the golang.org/x/ namespace.

Moving the required logic into a Go package slightly reduces code length and duplication across programs, but more importantly documents the intricacies of this pattern in a central place.

An implementation of such a package can be found at https://go-review.googlesource.com/c/exp/+/72379
Repository: go
Issue: cmd/compile: generate correct DW_AT_external flag
Labels: NeedsFix,Debugging,compiler/runtime


The current (1.9) Go compiler emits DWARF records for subprograms and variables that contain the "DW_AT_external" attribute, a flag which DWARF defines as:

  _If the name of the subroutine described by an entry with the tag ...  is visible
  outside of its containing compilation unit, that entry has a DW_AT_external attribute, 
  which is a flag._ 

The compiler is assigning  a value to DW_AT_external based on whether the LSym in question is marked as static (AttrStatic), which I don't think is the same as the definition above. When I look at the generated DWARF for things like the Go compiler, the only things being marked as non-external are a small number of vars and functions from assembly files.

Not sure this makes a huge amount of difference (as far as I can tell there is no degradation to the debugging experience as a result of package-local functions being marked as external), but it might be worth fixing this up just for consistency / POLA.
Repository: angular
Issue: Support lazy-loaded event plugins
Labels: feature,area: core

Currently all event plugins must be loaded at bootstrap. This can be an issue with lazy-loading, when only some subset of the application would need a certain plugin to be loaded.
Repository: vscode
Issue: Support envfile for tasks.json
Labels: feature-request,tasks

The node and Go debuggers both support specifying an env file for environment variables instead of the `env` hash. It would be great if we could use the same file in tasks.json to have a single source of truth that can also be used by non-vscode scripts
Repository: rust
Issue: Rustdoc doesn't show re-exports randomly
Labels: T-rustdoc,C-bug

Some re-exports seem to not be shown in the rustc output. This is especially evident in the [amethyst](https://www.amethyst.rs/) crate. 

Examples:

`amethyst_core::transform::bundle::TransformBundle` is re-exported as:

 - `amethyst_core::transform::TransformBundle`
 - `amethyst_core::TransformBundle`
 - `amethyst::core::TransformBundle`
 - `amethsyt::core::transform::TransformBundle`
 - `amethsyt::core::transform::bundle::TransformBundle`

Yet none of these show up in the [generated documentation](https://www.amethyst.rs/doc/develop/doc/amethyst/index.html).

`amethyst::State` is re-exported as `ametyst::prelude::State`, and this _does_ show in the generated documentation.

This might also be the cause of https://github.com/rust-lang-nursery/rls/issues/505.
Repository: flutter
Issue: Merge custom TextStyle with Theme.of by default across all material widgets
Labels: framework,f: material design,c: API break,c: proposal,P2,team-design,triaged-design

A number of our widgets take `TextStyle` to allow developers customize the look of text. For example, `InputDecoration` takes `labelStyle`, `helperStyle`, `hintStyle`, etc. It is desirable that the least path of resistance for developers using these options lead to reasonable results.

Currently we expect that the developer supplies a `TextStyle` that has _all_ the required style properties. That requires that either they call the default `TextStyle` constructor passing all the properties, ensure that the text they are styling appears under a `DefaultTextStyle` that supplies the missing properties, or they create a copy of another style (e.g. from `Theme.of`) replacing a subset of properties. Neither of the options are along the path of least resistance. Developers want to use the default constructor and pass a subset of properties, like so:

```dart
new InputDecoration(
  labelText: new TextStyle(fontSize: 5.0),
)
```

This leads to broken behavior. The text style is incomplete (e.g. its missing `fontFamily`). Lerping this style with a style that comes from `Theme.of` results in an error, because this style's `inherit: true` while `Theme.of` has its set to `false`. There are probably other bugs that we haven't observed yet.

## Proposal

Classes that take `TextStyle` as arguments should `TextStyle.merge` it with `Theme.of`. This would fill in the gaps in the passed style, but also retains the option of allowing the developer to do the merging manually or supply their own complete text style. All they need to do is pass a `TextStyle` with `inherit: false`, which will just use the style the developer set. Of course, in that case it is up to the developer to make sure their style is complete.

### Widgets to revise

Material: many of the material widgets already use `DefaultTextStyle` populated from `Theme.of` and should behave correctly, but it's worth reviewing them and adding missing tests.

- `InputDecoration`
- `InputDecorator`
- `Material`
- `Chip`
- `DropdownButton`
- `TabBar`
- `TextField`

Widgets: these are tricky because `Theme` is part of the material library, not widgets. So perhaps widgets should either assume they are under a `DefaultTextStyle` or the received `TextStyle` is self-sufficient.

- `WidgetsApp`
- `BannerPainter`
- `EditableText`
- `AnimatedDefaultTextStyle`

/cc @mehmetf @Hixie
Repository: vue
Issue: Functional components data merging util
Labels: feature request

### What problem does this feature solve?
Hi! Components have the extend feature, but there is nothing similar for functional components. The problem and the solution is well explained at https://github.com/alexsasharegan/vue-functional-data-merge and while that works fine and I am very grateful to the author, I would like to request an official in core solution.

Why? Because there are edge situations or new features that 3rd party solutions will have a difficult time to be on top.

### What does the proposed API look like?
Similar as done by @alexsasharegan

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: go
Issue: x/mobile: exp/sprite lacks point -> sprite mapping function?
Labels: mobile

### What version of Go are you using (`go version`)?
1.9

### What did you do?

Played with the exp/sprite package

### What did you expect to see?

A mechanism for taking a point (e.g., from touch.Event) and identifying a sprite or list of sprites which contain that point.

### What did you see instead?

No mention of such a thing in the documentation or code. Seems like 50% of the functionality of a sprite engine?
Repository: TypeScript
Issue: HTMLCollection should be string indexable
Labels: Suggestion,Domain: lib.d.ts,Awaiting More Feedback

<!-- BUGS: Please use this template. -->
According to [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCollection), HTMLCollection should be string indexable:
> HTMLCollection also exposes its members directly as properties by both name and index. HTML IDs may contain : and . as valid characters, which would necessitate using bracket notation for property access. Currently HTMLCollections does not recognize purely numeric IDs, which would cause conflict with the array-style access, though HTML5 does permit these.

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  master

**Code**

```ts
declare const elements: HTMLCollection;
elements['myId'] // implicit any error, where it should be the same type as elements[0].
```
Repository: opencv
Issue: cv::cuda::stream Lag
Labels: priority: low,category: gpu/cuda (contrib),RFC

<!--
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.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015

##### Detailed description
I meet a  case it's hard to understand,As needed, I need to be able to transplant all of the image enhancement operations to GPU.I want to use cuda::stream to accelerate,but I found that  takes a lot of time to initialize a stream array, which implements many times stream in the later code(about 100s) while without  implementing it takes 1s.I'm not sure if it's a bug of opencv.

	clock_t t1 = clock();
	cv::cuda::Stream st_i[10];
 	clock_t t2 = clock();
	cout << 2 << " " << t2 << " " << t2 - t1 << endl;//it takes 100s
	fun(st_i);


	clock_t t1 = clock();
	cv::cuda::Stream st_i[10];
 	clock_t t2 = clock();
	cout << 2 << " " << t2 << " " << t2 - t1 << endl;//it takes 1s
	//fun(st_i);
Repository: neovim
Issue: dynamic --headless, nvim_ui_builtin()
Labels: enhancement,ui,tui,ui-extensibility,remote

I would like to request a vimscript function or api function that should negate the effect of the `--headless` command line switch. Lets call it `nvim_launch_builtin_tui()` for now. I imagine something like this:
```vim
if My_condition()
  call nvim_launch_builtin_tui()
  " now it looks as if we did start nvim without --headless
else
  " this text will go directly to stdout
  echo "running headless"
endif'
```
and then one would do `nvim --headless -S above-file.vim`. Depending on the user function `My_condition` one would effectively end up in a "normal" TUI nvim instance or in a headless nvim.

If I can express the logic of the `My_condition()` vimscript function in the `my_condition` shell command/function I can currently do something similar with this shell script:
```sh
if my_condition; then
  # this now *is* a nvim without --headless
  nvim
else
  # this text will go directly to stdout
  nvim --headless --cmd 'echo "running headless"'
fi
```
Repository: create-react-app
Issue: Add preload to script and link tags in production builds
Labels: contributions: up for grabs!,tag: enhancement,difficulty: medium

I want to preload styles and main script. But the current config generates the .html without preload support. So is there any way to make that happens?
Repository: angular
Issue: NoopAnimationsModule animation callbacks NOT in right order
Labels: type: bug/fix,area: animations,freq2: medium,P4

<!--
PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.

ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.
-->

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre>

## Current behavior
<!-- Describe how the issue manifests. -->
In BrowserAnimationsModule mode, animation callbacks order is correct. `(@flyInOut.start)` would be fired before `(@flyInOut.done)`.
But in NoopAnimationsModule mode, animation callbacks order is NOT correct. `(@flyInOut.done)` would be fired before `(@flyInOut.start)`. 
You could see it in the demo's console message.

Demo is [here](https://plnkr.co/edit/vADlYPwJYHbQzGdwgegn?p=preview)

## Expected behavior
<!-- Describe what the desired behavior would be. -->
`(@flyInOut.start)` should be fired before  `(@flyInOut.done)`.

## Minimal reproduction of the problem with instructions
<!--
For bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
-->

## What is the motivation / use case for changing the behavior?
<!-- Describe the motivation or the concrete use case. -->


## Environment

<pre><code>
Angular version: 4.4.6
<!-- Check whether this is still an issue in the most recent Angular version -->

Browser:
- [ X] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  <!-- run `node --version` -->
- Platform:  <!-- Mac, Linux, Windows -->

Others:
<!-- Anything else relevant?  Operating system version, IDE, package manager, HTTP server, ... -->
</code></pre>
Repository: kubernetes
Issue: 100th percentile of e2e latency metrics are always zero
Labels: kind/bug,sig/scalability,lifecycle/frozen

/kind bug

**What happened**:

```
Oct 24 10:01:56.171: INFO: Top latency metric: {Resource:pods Subresource: Verb:LIST Scope:namespace Latency:{Perc50:8.089ms Perc90:16.1ms Perc99:65.268ms Perc100:0s} Count:225}
Oct 24 10:01:56.171: INFO: Top latency metric: {Resource:pods Subresource: Verb:DELETE Scope:namespace Latency:{Perc50:5.031ms Perc90:9.949ms Perc99:49.37ms Perc100:0s} Count:6200}
Oct 24 10:01:56.171: INFO: Top latency metric: {Resource:nodes Subresource:status Verb:PATCH Scope:cluster Latency:{Perc50:2.977ms Perc90:6.228ms Perc99:30.601ms Perc100:0s} Count:6583}
Oct 24 10:01:56.171: INFO: Top latency metric: {Resource:endpoints Subresource: Verb:PUT Scope:namespace Latency:{Perc50:1.605ms Perc90:4.363ms Perc99:21.734ms Perc100:0s} Count:570}
Oct 24 10:01:56.171: INFO: Top latency metric: {Resource:nodes Subresource: Verb:LIST Scope:cluster Latency:{Perc50:11.345ms Perc90:17.721ms Perc99:21.563ms Perc100:0s} Count:86}
```

Note the **Perc100:0s** in each of the above.


**What you expected to happen**:

Either a useful number to shown (e.g. the max value across all the samples, or 99.9th percentile, in case 100th percentile's definition such that it's guaranteed to be zero).
Or the 100th percentile skipped altogether from the summary, since it's just noise.

**How to reproduce it (as minimally and precisely as possible)**:

`kubetest -v --up && kubetest -v --test '--test_args=--ginkgo.focus=\[Feature:Performance\]'`

**Anything else we need to know?**:

**Environment**:
- Kubernetes version (use `kubectl version`): master
- Cloud provider or hardware configuration: gce

@kubernetes/sig-scalability-bugs
Repository: vscode
Issue: Have Shift+Tab remove whitespace within a line
Labels: feature-request,editor-core

Extracted from https://github.com/Microsoft/vscode/issues/32280#issuecomment-333843440

From @martinsuchan

---

Shift+Tab does not outdent. Tested in *.ps1 files. No idea if this has worked in previous versions, just noticed it now.

Edit it works when I'm on the  start of the line, but not in between strings. In VS2017 it works even between strings. Not sure it this is native VS behavior or ReSharper, but I use it a lot.
![tab gif](https://user-images.githubusercontent.com/3041397/31128017-c61d4572-a850-11e7-9764-94ba5aa75685.gif)


- VSCode Version: Code 1.16.1 (27492b6bf3acb0775d82d2f87b25a93490673c6d, 2017-09-14T16:38:23.027Z)
- OS Version: Windows_NT x64 10.0.15063
- Extensions: 
Kotlin|mat|1.3.0
csharp|ms-|1.12.1
PowerShell|ms-|1.4.3
java|red|0.11.0
Repository: opencv
Issue: imwrite/imencode fails with image higher than 8192 pixels width JP2 (JPEG 2000)
Labels: bug,priority: low,category: imgcodecs

When compressing an image higher than 8192 pixels (by any width) the function imwrite generates an access violation (while using JP2 (JPEG 2000) encoding).

First-chance exception at 0x000007FED04A97A8 (opencv_imgcodecs300.dll) in FTIImagesHelpers_TestUnit-x64.exe: 0xC0000005: Access violation writing location 0x0000000002218000.

I have looked at Jasper encoder and found the following definition in [opencv/jas_stream.h](https://github.com/opencv/opencv/blob/master/3rdparty/libjasper/jasper/jas_stream.h)

128: /* The default buffer size (for fully-buffered operation). */
129: #define JAS_STREAM_BUFSIZE	8192

Link : (https://github.com/opencv/opencv/blob/master/3rdparty/libjasper/jasper/jas_stream.h#L159)

I don't much time to investigate more, but this is probably linked to this exception.

Thanks for the fix,
Patrick
Repository: vue
Issue: TypeScript: add Props type to component constructor
Labels: improvement,typescript

### What problem does this feature solve?
It would be useful if we can infer Props type from component (`ExtendedVue`).

For example, we can write type safe wrapper of `CreateElement` with it (or improve interface of `CreateElement` directly).

```typescript
function renderComponent<Props>(
        h: CreateElement,
        component: ExtendedVue<Vue, {}, {}, {}, Props>,
        data: VNodeData & { props: Partial<Props> },
        children?: VNodeChildren): VNode {
  return h(component, data, children);
}

const MyComponent = Vue.extend({
  props: { foo: String },
  render(h) { return h("div", this.foo) };
});

const Parent = Vue.extend({
  render(h) {
    return renderComponent(h, MyComponent, { props: { foo: 0 } }); // error: type of property 'foo' are imcompatible
  }
});

``` 


### What does the proposed API look like?
Now, `ExtendedVue<Vue, {}, {}, {}, { foo: string }>` and `ExtendedVue<Vue, {}, {}, { foo: string }, {}>` generate same type.

This means we can't determine `Props` type from `ExtendedVue` object.

I think, easiest (and most reasonable) way to achieve this is adding types to `$props` and `$data`

```diff
- export type CombinedVueInstance<Instance extends Vue, Data, Methods, Computed, Props> = Instance & Data & Methods & Computed & Props;
+ export type CombinedVueInstance<Instance extends Vue, Data, Methods, Computed, Props> = Instance & Data & Methods & Computed & Props & { $data: Data, $props: Props };
```

<!-- generated by vue-issues. DO NOT REMOVE -->