sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: This narrowing typeguard effect bleeds into subsequent statments on a type with bivariant  type-parameter 
Labels: Suggestion,Needs Proposal

**TypeScript Version:**  3.4.0-dev.201xxxxx (although 3.3 is also impacted)
**Search Terms:** this type guards 

If we create a type-guard that narrows `this` on a type that has a type-parameter that is present only in a bivariant position, the effect of the type guard persists outside of the guarded block. 

**Code**
```ts
type GetKnownKeys<G> = G extends GuardedMap<infer KnownKeys>  ? KnownKeys: never;
interface GuardedMap<KnownKeys extends string> {
    get(k: KnownKeys): number;
    has<S extends string>(k: S): this is GuardedMap<S | GetKnownKeys<this>>;
}

declare let map: GuardedMap<never>;

map.get('bar') // err, as expected
if (map.has('foo')) {
    map.get('foo').toExponential(); // ok as expected
    if(map.has('bar')) 
    {
        map.get('foo').toExponential(); // ok as expected
        map.get('bar').toExponential(); // ok as expected
    }
        
    map.get('bar').toExponential(); /// OK!?!?! WHY ?!
    
}
map.get('bar') // OK ?!
```

**Expected behavior:**
Type guard only impacts the guarded block.
**Actual behavior:**
The effect of the type guard bleads into all subsequent statements. (marked with `OK!?!?!` and `OK?!`)

**Note:** With `strictFunctionTypes` on, declaring `get` as `get: (k: KnownKeys) => number;` makes the code work as expected. 

**Playground Link:** [link](https://www.typescriptlang.org/play/#src=type%20GetKnownKeys%3CG%3E%20%3D%20G%20extends%20GuardedMap%3Cinfer%20KnownKeys%3E%20%20%3F%20KnownKeys%3A%20never%3B%0D%0Ainterface%20GuardedMap%3CKnownKeys%20extends%20string%3E%20%7B%0D%0A%20%20%20%20get(k%3A%20KnownKeys)%3A%20number%3B%0D%0A%20%20%20%20has%3CS%20extends%20string%3E(k%3A%20S)%3A%20this%20is%20GuardedMap%3CS%20%7C%20GetKnownKeys%3Cthis%3E%3E%3B%0D%0A%7D%0D%0A%0D%0Adeclare%20let%20map%3A%20GuardedMap%3Cnever%3E%3B%0D%0A%0D%0Amap.get('bar')%20%2F%2F%20err%0D%0A%2F%2F%20Works%20for%20string%20literals!%0D%0Aif%20(map.has('foo'))%20%7B%0D%0A%20%20%20%20map.get('foo').toExponential()%3B%0D%0A%20%20%20%20if(map.has('bar'))%20%0D%0A%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20map.get('foo').toExponential()%3B%0D%0A%20%20%20%20%20%20%20%20map.get('bar').toExponential()%3B%0D%0A%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20map.get('bar').toExponential()%3B%20%2F%2F%2F%20OK!%3F!%3F!%20WHY%20%3F!%0D%0A%20%20%20%20%0D%0A%7D%0D%0Amap.get('bar')%20%2F%2F%20OK%20%3F)

**Related Issues:** Similar to #14817

Found this while playing with a solution for #9619
Repository: go
Issue: x/image/riff: Implement write functionality
Labels: NeedsDecision,FeatureRequest

Presently, `x/image/riff` has no functionality for writing in the RIFF format; it only has read functionality.
Repository: TypeScript
Issue: Proposal: Follow program flow in constructor when strictPropertyInitialization = true
Labels: Suggestion,In Discussion

## Search Terms

constructor strictPropertyInitialization flow

## Suggestion

TypeScript should follow unconditional function calls in constructor when checking for strict property initialization.

## Use Cases

It is a common pattern to be able to reset objects after construction and, thus, to transfer object initialization to a separate routine:

```ts
class C
{
  private p: number;

  public constructor() { Initialize() }

  public Initialize() { p = 0; }
}
```

Currently, TypeScript doesn't consider functions being unconditionally called from within a constructor function when checking for strict property initialization. The above code yields a compiler error.

I propose TypeScript to be able to analyse code flow and recognize property initialization that's performed in functions unconditionally called by the constructor function.

## Checklist

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, etc.)
* [X] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: flutter
Issue: Drag&Drop reorder between two lists
Labels: c: new feature,framework,f: material design,d: examples,P3,team-design,triaged-design

Hello!

I am trying to create some sort of task manager exactly like in trello and your library solving my problem of drag&droping perfectly, but now fully. Can you please make possivle to drag&drop item of list between two and more lists.

![trello](https://user-images.githubusercontent.com/48680083/54532217-0d1fcf80-49a9-11e9-9c5e-413d50bc7b70.gif)
Repository: flutter
Issue: [Material] Tooltip on FAB interrupts Ink response.
Labels: framework,a: animation,f: material design,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-design,triaged-design

In the starter app created by `flutter create`, the FAB has a Tooltip that appears on a long press. 

When the tooltip appears, it cancels out the Ink response on the FAB, even though the user is continuing the press.

![tooltip](https://user-images.githubusercontent.com/4229329/54545707-8eab3980-4978-11e9-83b8-9ad8db0b3be9.gif)
Repository: rust
Issue: Tracking issue for `BinaryHeap` sorted iterator methods
Labels: A-collections,T-libs-api,B-unstable,C-tracking-issue,A-iterators,Libs-Tracked

This tracks the stabilization of `BinaryHeap::into_iter_sorted` (`binary_heap_into_iter_sorted`) and `BinaryHeap::drain_sorted` (`binary_heap_drain_sorted`) implemented in https://github.com/rust-lang/rust/pull/65091.

EDIT much later:
- [ ] https://github.com/rust-lang/rust/pull/76234 looked at stabilizing part of this, but didn't come to a conclusion that it was ready-to-go as-is.  The questions from there (such as consistency in order with `into_sorted_vec`) need to be addressed before a future attempt to stabilize.

Original feature request:

-----
Currently, both `BinaryHeap::into_iter` and `BinaryHeap::drain` yield the heap elements in an arbitrary order. This seems counter-intuitive given the nature of a heap. Sadly, we can't simply change their behavior behind the scenes, as we would have to remove the implementation of `DoubleEndedIterator`. Should we perhaps add `into_ordered_iter` and `drain_ordered`? The implementation is pretty straightforward so I'd be happy to submit a PR.
Repository: material-ui
Issue: [Select] Remove the React.cloneElement usage
Labels: new feature,component: select

<!--- Provide a general summary of the issue in the Title above -->

I have a form with two text fields. The first text field works as expected in selecting and closing on click, but the second does and not have have gone in to very hacky territory in order to try to get it to work but it does not.

<!--
    Thank you very much for contributing to Material-UI by creating an issue! ❤️
    To avoid duplicate issues we ask you to check off the following list.
-->

<!-- Checked checkbox should look like this: [x] -->
- [X ] This is not a v0.x issue. <!-- (v0.x is no longer maintained) -->
- [X ] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Expected Behavior 🤔

The menu option should blur on click

## Current Behavior 😯

It stays open and does not trigger a handleChange or handleBlur event in the parent. In the code sandbox it doesn't even open.


## Steps to Reproduce 🕹
<!---
    Provide a link to a live example (you can use codesandbox.io) and an unambiguous set of steps to reproduce this bug.
    Include code to reproduce, if relevant (which it most likely is).

    This codesandbox.io template _may_ be a good starting point:
    https://codesandbox.io/s/github/mui-org/material-ui/tree/next/examples/create-react-app

    If you're using typescript a better starting point would be
    https://codesandbox.io/s/github/mui-org/material-ui/tree/next/examples/create-react-app-with-typescript

    If YOU DO NOT take time to provide a codesandbox.io reproduction, should the COMMUNITY take time to help you?

-->
Link: https://codesandbox.io/s/create-react-app-forked-s5ouz?file=/src/pages/index.js


## Context 🔦

I need wrap the menu in an EnhancedComponent in order to Observe certain fields on the model (async)


## Your Environment 🌎
<!---
    Include as many relevant details about the environment with which you experienced the bug.
    If you encounter issues with typescript please include version and tsconfig.
-->

| Tech         | Version |
|--------------|---------|
| Material-UI  | v3.6.0  |
| React        |  v16.8.0       |
| Browser      |    chrome 72.0.3626.121     |
| TypeScript   |   no      |
| etc.         |         |
Repository: TypeScript
Issue: Convert to async/await doesn't support .finally() method
Labels: Suggestion,Experience Enhancement

```ts
declare function delay(n: number): Promise<void>;

async function foo() {
    delay().then(x => delay(400)).then(x => delay(400)).finally(x => console.log(x));
}
```
Repository: opencv
Issue: imread Should Raise If Path Doesn't Exist
Labels: category: imgcodecs,RFC

##### System information (version)
- OpenCV => 4.0.1
- Operating System / Platform => MacOS 10.14 Mojave
- Compiler => Xcode 10.1

##### Detailed description

`cv2.imread` doesn't check file existence and reads nonexistent files into a NoneType object. In comparison, `matplotlib.pyplot.imread` and `PIL` both throw.

##### Steps to reproduce

```python
import cv2

nonetype_thingy = cv2.imread('nonexistent_path.jpg') # this is somehow legal
cv2.imshow('lel', nonetype_thingy) # this will throw a "cv2.error: OpenCV(4.0.1) /Users/username/opencv/modules/highgui/src/window.cpp:352: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'imshow'"

```
Repository: bitcoin
Issue: Optimize CheckMultiSig by using public key recovery.
Labels: Brainstorming,Up for grabs

I had a recent chat with @sipa about an idea I had to reimplement the CheckMultiSig operations to use public key recovery without altering their semantics.

New new proposed implementation would proceed as follows.

   1. For each signature in a `k`-of-`n` CheckMultiSig operation, the message hash is computed (calling find-and-delete if required).
   1. For each of `k` signature and message hash pairs, public key recovery is run to produce a list of sets of points in Jacobin coordinates.  This requires at least one modular square root operation (and very rarely two), similar in cost to a pubkey decompression, per signature.  The resulting list has `k` sets and each set has 2 points (or very rarely 4 points).
  1. All of the recovered points are batch converted from Jacobian coordinates to affine coordinates at the cost of one modular inverse operation for the entire batch.
  1. The list of sets of recovered points are compared, in order, to the list of serialized pubkeys passed to CheckMultiSig, using a new "compare affine point to serialized pubkey" function.   No pubkey decompression need be done.

The advantage of this proposed method over the current "try-and-fail" method is that the number of elliptic curve operations is now roughly proportional to `k`, the number of signatures, rather than `n` the number of pubkeys.

For non-`n`-of-`n` CheckMultiSig operations, I expect this method should be faster than the current implementation.  For `n`-of-`n` CheckMultiSig operations, the proposed method is not likely to be faster than local (`n` signature) batch verification and certainly not faster than global batch verification (for `OP_CHECKMULTISIGVERIFY`).

Unfortunately, I don't have time to pursue a PR to implement this proposal at the moment, and maybe someone else would like to pick up this issue.
Repository: vscode
Issue: Custom Variables Support In Workspace Settings
Labels: feature-request,config

### Feature Request
Custom variables support in workspace settings.

### Example


```
{
    "workbench.customVariables": {
        "themeColors": {
            "darkColor":  "#121212"
        }
    }

    "workbench.colorCustomizations": {
        "[Monokai Light Theme]": {
            "tab.activeBackground": "${themeColors.darkColor}"
        }
    }
}

```
Repository: TypeScript
Issue: Move to new file doesn't maintain prologues directives, ts-check
Labels: Bug,Help Wanted,Effort: Moderate,Domain: Refactorings

```js
// @ts-check
"use strict";

export function foo() {
    return bar();
}

function bar() {
    return 100;
}
```

Use a refactoring to move `bar` to a new file.

**Expected**

```js
// @ts-check
"use strict";

export function bar() {
    return 100;
}
```

**Actual**

```js
export function bar() {
    return 100;
}
```
Repository: pytorch
Issue: JIT does not batch linear layers in an ensemble
Labels: oncall: jit,triaged

I am trying to speed up a case where I have an ensemble identically structured models. 
Tracing my model and running a jitted version results in some speed up, but since the layers are small it still does not achieve good utilization of the GPU.

if torch.bmm were used to batch compute the mm for layer[0] across the K models, then layer[1] across the K models etc it would help a lot.

See code sample.

Code sample:
http://paste.ubuntu.com/p/kSdJwDsQqB/

bmm is mentioned as a future optimization [here](https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/passes/batch_mm.cpp).
If torch.bmm was used, I would expect to get a significant speedup.

## Environment
PyTorch version: 1.0.0.dev20190318
Is debug build: No
CUDA used to build PyTorch: 10.0.130

OS: Ubuntu 16.04.6 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
CMake version: version 3.5.1

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration: 
GPU 0: Quadro P5000
GPU 1: Quadro P5000

Nvidia driver version: 418.39
cuDNN version: Could not collect

Versions of relevant libraries:
[pip] numpy==1.15.4
[pip] torch==1.0.0.dev20190318
[pip] torchfile==0.1.0
[conda] blas                      1.0                         mkl  
[conda] mkl                       2019.1                      144  
[conda] mkl_fft                   1.0.6            py36hd81dba3_0  
[conda] mkl_random                1.0.2            py36hd81dba3_0  
[conda] pytorch-nightly           1.0.0.dev20190318 py3.6_cuda10.0.130_cudnn7.4.2_0    pytorch
[conda] torchfile                 0.1.0                     <pip>


cc @suo
Repository: pytorch
Issue: [docs] How to achieve high-order derivation in my .cpp?
Labels: module: docs,module: cpp,module: autograd,triaged,actionable

## ❓ Questions and Help

### Please note that this issue tracker is not a help form and this issue will be closed.

We have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:

- [Discussion Forum](https://discuss.pytorch.org/)


cc @ezyang @SsnL @albanD @zou3519 @gqchen @yf225
Repository: go
Issue: net/url: URL.String() does not escape Query
Labels: help wanted,NeedsInvestigation

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.12.1 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
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/kiril/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/kiril/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build120012875=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

```go
url.Parse("https://тест.бг/път?ключ=стойност#фрагмент")
```

https://play.golang.org/p/xe9E6LAZhLs


### What did you expect to see?

```
https://%D1%82%D0%B5%D1%81%D1%82.%D0%B1%D0%B3/%D0%BF%D1%8A%D1%82?%D0%BA%D0%BB%D1%8E%D1%87=%D1%81%D1%82%D0%BE%D0%B9%D0%BD%D0%BE%D1%81%D1%82#%D1%84%D1%80%D0%B0%D0%B3%D0%BC%D0%B5%D0%BD%D1%82
```

### What did you see instead?

```
https://%D1%82%D0%B5%D1%81%D1%82.%D0%B1%D0%B3/%D0%BF%D1%8A%D1%82?ключ=стойност#%D1%84%D1%80%D0%B0%D0%B3%D0%BC%D0%B5%D0%BD%D1%82
```

Notice how that `ключ=стойност` is left unescaped.
Repository: node
Issue: Track Environment fields in heap snapshot?
Labels: lib / src

At the moment, the Environment fields are not tracked by the heap snapshot (unless they are referenced by some other objects that implements the `MemoryRetainer` interface) - for example, you can't see any of the `AliasedBuffer` in the Environment when looking at a heap snapshot taken after bootstrap. Considering the amount of things we attach to the Environment, it should be pretty useful to track those fields in the heap snapshot instead of keeping them invisible for no particular reason.

I am thinking about having Environment implmement `MemoryRetainer`, are there any concerns around having it inherit from an abstract class? (considering this is semi-exposed to embedders).
Repository: go
Issue: x/text: first string in catalog returned when the given string is not in the catalog
Labels: 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.11.5 darwin/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
GOARCH="amd64"
GOBIN=""
GOCACHE="~/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="~/Code/kace/agent"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
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 -fmessage-length=0 -fdebug-prefix-map=/var/folders/8w/05w3j5xj4q34m1z6w9ynmcf80000gp/T/go-build628007696=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>

### What did you do?
Generate a catalog.go file with the following strings (for example):
1. "This is the first string in the catalog"
2. "This is the second string in the catalog"

Now, translate a string that's not in the catalog.
```
p := message.NewPrinter(message.MatchLanguage("en"))
p.Println("This string is not in the catalog")
```
### What did you expect to see?
I would expect to get back the original string I passed to the p.Println() function if it does not match any string in the catalog.
In this case, I expect to get back: `This string is not in the catalog`.

### What did you see instead?
p.Println() returns the first string in the catalog. In this case, I get back: `This is the first string in the catalog`.
Repository: opencv
Issue: munmap_chunk() invalid pointer problem, in cvStartFindContours_Impl() 
Labels: bug,category: imgproc,needs reproducer

- OpenCV => 4.0.1
- Operating System / Platform => ARM64
- Compiler => GCC 7.3
--> 

at line 307, modules/imgproc/src/contours.cpp, in cvStartFindContours_Impl(), the src and dst ptr is the same one for cvThreshold, but cvThreshold requires a const src pointer, that will cause memory crash for some cases.
Repository: angular
Issue: Detect ng-content changes
Labels: feature,area: core,core: content projection,feature: under consideration

# 🚀 feature request

### Relevant Package
This feature request is for @angular/core


### Description
Add the ability to detect "ng-content" changes into [OnChanges](https://angular.io/api/core/OnChanges) method like @Input.


### Describe the solution you'd like
SimpleChanges can be expose a special prop. ngContent  that contains the old and the new value of ng-content, eg.:
```ts
@Component({selector: 'my-cmp', template: `<ng-content></ng-content>`})
class MyComponent implements OnChanges {
  ngOnChanges(changes: SimpleChanges) {
    console.log(changes.ngContent);
  }
}
```


### Describe alternatives you've considered
Add a new lifecycle hook that is called when ng-content change, eg.:
```ts
@Component({selector: 'my-cmp', template: `<ng-content></ng-content>`})
class MyComponent implements OnNgContentChanges {
  ngOnNgContentChanges() {
    console.log('ng-content change!');
  }
}
```
Repository: vscode
Issue: Visual Studio Code for ipad
Labels: feature-request,ios-ipados

can use the Visual Studio Code on a ipad
Repository: vue-element-admin
Issue: Change tab url with router
Labels: need repro :mag_right:

Hi, I have a question about when I have a tab window when I change the tab, I do not change the url
![Screenshot_20190319_114941](https://user-images.githubusercontent.com/45974454/54620883-38ec9500-4a3d-11e9-9b01-c92045cd5e26.png)
![Screenshot_20190319_114915](https://user-images.githubusercontent.com/45974454/54620989-689b9d00-4a3d-11e9-808e-14d832233a73.png)
Repository: kubernetes
Issue: drain daemonsets
Labels: priority/backlog,sig/node,kind/feature,sig/apps,lifecycle/stale,needs-triage

**What would you like to be added**:
a flag to drain to support draining daemonset managed pods too.

**Why is this needed**:
I needed to blow out container runtime images completely to fix an issue. daemonsets tried to keep pods running.