sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: angular
Issue: HttpClient.head expects payload by default.  Doesn't follow spec
Labels: breaking changes,freq1: low,area: common/http,type: confusing,P4

## 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
making a HEAD request with `HttpClient.head` with no `options`  (or more specifically, no `options.responseType`) will always result in an exception being thrown.  That is, assuming the API respects the HTTP spec.  "the server MUST NOT return a message-body in the response" https://tools.ietf.org/html/rfc2616#section-9.4
Angular expects there to be a JSON payload instead of a blank "text" payload

## Expected behavior
`options.responseType` should default to `'text'` when making a HEAD request

## 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?
The developer shouldn't have to specify a response type for every single HEAD request if they are following spec.


## Environment

<pre><code>
Angular version: X.Y.Z
<!-- Check whether this is still an issue in the most recent Angular version -->

Browser:
- [ ] 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: flutter
Issue: Code Push / Hot Update / out of band updates
Labels: c: new feature,engine,dependency: dart,customer: crowd,a: production,P3,team-engine,triaged-engine

_This is currently not on Flutter's roadmap, for reasons discussed in these comments: https://github.com/flutter/flutter/issues/14330#issuecomment-1279484739, https://github.com/flutter/flutter/issues/14330#issuecomment-485565194_

_Code push for Flutter is available as a third-party product from shorebird.dev, as discussed in this comment: https://github.com/flutter/flutter/issues/14330#issuecomment-2099442823_

_This comment gives a brief overview of various kinds of "hot update" features, and gives terminology for referring to them, which can help if you wish to communicate unambiguously about this topic: https://github.com/flutter/flutter/issues/14330#issuecomment-442274897_

----

Often people ask if Flutter supports "code push" or "hot update" or other similar names for pushing out-of-store updates to apps.

Currently we do not offer such a solution out of the box, but the primary blockers are not technological.  Flutter supports just in time (JIT) or interpreter based execution on both Android and iOS devices.  Currently we remove these libraries during --release builds, however we could easily include them.

The primary blockers to this feature resolve around current quirks of the iOS ecosystem which may require apps to use JavaScript for this kind of over-the-air-updates functionality.  Thankfully Dart supports compiling to JavaScript and so one could imagine several ways in which one compile parts of ones application to JavaScript instead of Dart and thus allows replacement of or augmentation with those parts in deployed binaries.

This bug tracks adding some supported solution like this.  I'll dupe all the other reports here.
Repository: flutter
Issue: a11y on Android: cut/paste not announced correctly
Labels: a: text input,platform-android,engine,a: accessibility,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-android,triaged-android,fyi-text-input

When text is selected in a text field and "cut" is chosen from the Local Context Menu, an announcement acknowledging the copy is expected (e.g. "cut \<text\>"). In Flutter that announcement is missing.

Similarly, when "paste" is chosen from the Local Context Menu, an announcement acknowledging the paste (e.g. "pasted  \<text\>") is expected. This one is also missing in Flutter.
Repository: neovim
Issue: win: more fnamemodify() behavior
Labels: platform:windows,filesystem

    :echo fnamemodify('/foo/bar/baz', ':p')

returns:

    /foo/bar/baz

but gvim on Windows returns:

    C:\foo\bar\baz

#7842 made progress here, but doesn't seem to cover this case.
Repository: pytorch
Issue: [Feature Request]would PackedSequence support unsorted sequences?
Labels: feature,module: nn,triaged

By default, sequences packed in `PackedSequence` will be sorted by length.
However in some cases where a datum contains two sequences (**A - B**), the descendant order of **A** is not the order of **B**. This will course some mismatches. 
Maybe the correct way is:
`sort A -> feed into RNN -> unsort A -> sort B -> feed into RNN -> unsort B `
I am wondering if `PackedSequence` can support the **sort** and **unsort** operation automatically.

Below is the code I implemented for an RNN:
```python
    def forward(self, input_ids: List, input_lens: List, lens_sorted=True):
        """Sort by input lens"""
        if lens_sorted:
            sorted_word_ids, sorted_lens = torch.autograd.Variable(torch.LongTensor(input_ids)), input_lens
        else:
            sorted_lens, sorted_idx = torch.sort(torch.autograd.Variable(torch.LongTensor(input_lens)), 0, descending=True)
            sorted_lens = sorted_lens.cpu().data.numpy().tolist()
            sorted_word_ids = torch.index_select(torch.autograd.Variable(torch.LongTensor(input_ids)), dim=0, index=sorted_idx)
            unsorted_idx = torch.zeros(sorted_idx.size()).long() \
                .scatter_(0, sorted_idx.cpu().data, torch.LongTensor(list(range(len(input_ids)))))

        """Calculating the hidden and outputs"""
        # ......

        """Unsort by input lens"""
        if lens_sorted:
            unsorted_outputs, unsorted_hidden = outputs, hidden
        else:
            unsorted_outputs = torch.index_select(outputs, dim=0, index=torch.autograd.Variable(unsorted_idx))
            unsorted_hidden = torch.index_select(hidden, dim=1, index=torch.autograd.Variable(unsorted_idx))

        return unsorted_outputs, unsorted_hidden
```

cc @albanD @mruberry
Repository: pytorch
Issue: [feature request] Type-1 Multi-layer bidirectional RNN
Labels: module: cudnn,module: rnn,triaged,function request

Hello 
I request another type of multi-layer bidirectional RNN.
Currently forward output and backward output is concatenated after each layer.
But, for language modeling, we need independent forward rnn and backward rnn util the last layer and output concatenation is only need at the last layer.

thank you.



cc @ezyang @gchanan @zou3519 @csarofeen @ptrblck
Repository: vscode
Issue: Extensions: "group" should provide intellisense to show valid groups to contribute menus to
Labels: help wanted,feature-request,menus

![image](https://user-images.githubusercontent.com/900690/35570021-2f201ad8-05ce-11e8-8cdf-c7903449d14b.png)

/cc @jrieken
Repository: vue-element-admin
Issue: 点击切换路由的时候，有时候会报错，Error: Loading chunk 1 failed.     at HTMLScriptElement.d (bootstrap 7d5ba07478b35f182b62:103)
Labels: help wanted

只有在 打包后的线上环境会出错，用的是addRouter  动态 添加的，万分感谢楼主指导，谢谢
Error: Loading chunk 1 failed.
    at HTMLScriptElement.d (bootstrap 7d5ba07478b35f182b62:103)
Repository: go
Issue: x/build/cmd/coordinator: detect temp dir leaks
Labels: Builders

The build infrastructure could explicitly set $TMPDIR (or %TMP% on Windows) to an empty directory and at the end of a successful build check that the directory is still empty. If not, it could fail.

Or we could do it in cmd/dist test, perhaps optionally.

/cc @ianlancetaylor @alexbrainman
Repository: vscode
Issue: Support suppressing commit character from being inserted during completion
Labels: feature-request,api,suggest,api-proposal

I have a completion provider that inserts parens when completing method calls, eg. `myFunc()`. Today I tried adding `(` as a commit character so that if I've typed `myFun` and press `(` then it'll still complete. However this results in `myFunc()()` because the completion text includes the parens, the commit character then gets added, and then the automatic closing paren.

Although I could remove the parens from the completion, then they wouldn't be inserted if you hit `<enter>` either.

@mjbvz suggested raising this as he may have had a similar issue with snippets in JS/TS.

Is there a good workaround for this, or can the API be extended in some way to handle this?
Repository: pytorch
Issue: [Feature request] Optimize autograd/ATen when a gradient is clearly zero
Labels: feature,module: autograd,triaged

When an input parameter ***clearly*** has zero gradient (not due to numerical coincidence), the current ATen guideline requires the backward function to return a zero tensor. Since there is no special treatment of zero tensors, autograd engine will still trace back the entire graph supporting that variable. This can happen easily when ATen functions have multiple outputs (e.g. many double backward functions). For example, 

```python
i = deep_nn_1(...)
w = deep_nn_2(...)
o = conv(i, w)
loss = autograd.grad(o.sum(), i, create_graph=True).sum()
loss.backward()
```

In conv double backward, `gI` only depends on `gO` and `ggW`, and `gW` only depends on `gO` and `ggI`. In this case, `ggW` is zero when doing the double backward, which means that `gI` should be zero and `deep_nn_2` doesn't need to be traversed at all. However, ATen conv double backward still [would output a zero `gI`](https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/Convolution.cpp#L686-L688) even if it already has the check on `ggW.defined()` to compute `gI`. Then the autograd engine will go through `deep_nn_2` unnecessarily. 


cc @ezyang @SsnL @albanD @zou3519 @gqchen
Repository: pytorch
Issue: [docs] Docs website search finds duplicates and produces bad snippets
Labels: module: docs,triaged,module: doc infra

Searching for `torch.nn.functional.conv2d` returns results with 4 identical links to http://pytorch.org/docs/master/nn.html?highlight=torch%20nn%20functional%20conv2d#torch.nn.functional.conv2d

Link with results is: http://pytorch.org/docs/master/search.html?q=torch.nn.functional.conv2d&check_keywords=yes&area=default

This is true for master and 0.3

cc @ezyang @zou3519 @jlin27 @mruberry
Repository: godot
Issue: [3.x] Script Editor: Completion tooltip can be cut by edges of the editor
Labels: bug,topic:editor,confirmed,usability

**Godot version:**
3.0 Stable

**OS/device including version:**
Windows 10

**Issue description:**
The function tooltip gets cut off at the bottom of the script editor. See the attachment.
![comeon](https://user-images.githubusercontent.com/21234930/35605741-9a13d8b2-05ff-11e8-82de-2c2c1acaed82.png)
Repository: pytorch
Issue: [Feature Request] Extract glimpses from a batch of images (as in tf.image.extract_glimpse)
Labels: triaged,module: vision,function request

I think something similar to Tensorflow's extract_glimpse function would be useful. I'd like to extract a single patch from an image, but I'd like to do it to a batch of images at once with control over where the patch is centered on each image. This is useful in models that select individual patches of images/feature maps to focus on.

https://www.tensorflow.org/api_docs/python/tf/image/extract_glimpse

There doesn't seem to be a way to do this in Pytorch without a loop which is a bit slow. Or is there?

cc @fmassa @vfdev-5
Repository: pytorch
Issue: Speed up data loading for `TensorDataset` if the underlying dataset supports index by a list of indices
Labels: module: performance,module: dataloader,triaged

Looking at https://github.com/pytorch/pytorch/blob/5b43c22f73279c67084a2357a489420c705cb84f/torch/utils/data/dataloader.py#L259

The loader fetches one row at a time of the data set, and then combine them into a minibatch. It is quite inefficient if the underlying data set already supports indexing by a list of indices.

If there are a lot of elements in a row, e.g. image data, it is relatively OK since it takes more time to process (infer + back-propagate in GPU) about the data. However if the feature dimension is small, say < 100, then data loading becomes the bottleneck.

An alternative is to do the following

```python
# batch = self.collate_fn([self.dataset[i] for i in indices])
batch = self.dataset[indices]
```

I applied monkey patch for my specific problem.

```
def data_loader_next(self):
    if self.num_workers == 0:  # same-process loading
        indices = next(self.sample_iter)  # may raise StopIteration
        # I know that my dataset supports index by indices.
        # -- batch = self.collate_fn([self.dataset[i] for i in indices])
        batch = self.dataset[indices]
        if self.pin_memory:
            batch = pin_memory_batch(batch)
        return batch

    # check if the next sample has already been generated
    if self.rcvd_idx in self.reorder_dict:
        batch = self.reorder_dict.pop(self.rcvd_idx)
        return self._process_next_batch(batch)

    if self.batches_outstanding == 0:
        self._shutdown_workers()
        raise StopIteration

    while True:
        assert (not self.shutdown and self.batches_outstanding > 0)
        idx, batch = self.data_queue.get()
        self.batches_outstanding -= 1
        if idx != self.rcvd_idx:
            # store out-of-order samples
            self.reorder_dict[idx] = batch
            continue
        return self._process_next_batch(batch)

DataLoaderIter.next = data_loader_next
DataLoaderIter.__next__ = data_loader_next
```

It speeds up the data loading by 5 times while `using num_workers=0`.



cc @SsnL @VitalyFedyunin @ngimel @mruberry
Repository: flutter
Issue: Background text contrast should be increased in Date and time pickers
Labels: framework,f: material design,a: accessibility,f: date/time picker,c: proposal,P2,team-design,triaged-design

I got that piece of feedback from an a11y review. Are we following material guidelines here?
Repository: vscode
Issue: [json] schema Validation/Intellisense very slow when JSON deep and Schema Complex
Labels: bug,freeze-slow-crash-leak,json

<!-- Do you have a question? Please ask it on https://stackoverflow.com/questions/tagged/vscode. -->

In my project we design an API that allows people to define web pages in json using a bunch of nested components. We have schema files for all components and how to combine them. When merged into 1 schema file it becomes around 7000 lines long.

I am noticing a huge slowdown when a file has JSON that is relatively deep.

Here is what it looks like when the depth is still okay
![fast](https://user-images.githubusercontent.com/1192452/35651240-d51b3006-0693-11e8-91d7-0a8ad9c4b07c.gif)

And here is what it looks like when a deep component is defined in the same file
![slow](https://user-images.githubusercontent.com/1192452/35651340-36c7e646-0694-11e8-94d1-1c9e00ac4011.gif)

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: Version 1.20.0-insider
- OS Version: OSX 10.13.3 

Steps to Reproduce:

1. Set schema for JSON to some large and complex schema
2. Open up a JSON file that uses the schema
3. write enough JSON so that you are nested a bunch 
4. try to use intellisense 
  - whole editor slows down 
  - Intellisense suggestion doesn't pop up until validation is done - even looks like it validates the file a few ways while you sit

Is it possible to just turn off JSON validation and keep the Intellisense? Or just validate on file save? Could we show Intellisense suggestions before validation happens?

Also, when i am editing 2 JSON files the slowness is shared by the two. Even after closing the file that made everything slow, I still have to wait for some validation thing to finish before it realized the file is closed and updates the UI

If needed I can try to reproduce this bug with generic schema files.

What seems to be the issue is when i have a Collection component. This component can hold any other component, including more nested collections. If I nest a bunch of collections the problem presents itself.

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes/No
Yes
Repository: TypeScript
Issue: Incorrect type inference for array rest assignment and inability to add annotation
Labels: Bug

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 -->
<!--
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker.

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the CONTRIBUTING guidelines: https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ
-->

<!-- If you have a QUESTION:
   THIS IS NOT A FORUM FOR QUESTIONS.
   Ask questions at http://stackoverflow.com/questions/tagged/typescript
    or https://gitter.im/Microsoft/TypeScript
-->

<!-- If you have a SUGGESTION:
  Most suggestion reports are duplicates, please search extra hard before logging a new suggestion.
  See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md
-->

<!-- If you have a BUG:
  Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  2.7.1-insiders.20180127

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** array destructuring rest assignment

**Code**

```ts
// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
const [stringA, ...numbers] = ['string', 1, 2];
// const [stringA, ...numbers] = <[string, number, number]>['string', 1, 2];
// const [stringA, ...numbers]: [string, number[]] = ['string', 1, 2];
// const [stringA, ...numbers]: [string, [number, number]] = ['string', 1, 2];
```

**Expected behavior:** Expect `numbers` to be of type `number[]` rather than` (string | number)[]`.
TS also does not allow annotating as a tuple

**Actual behavior:** const numbers: (string | number)[]

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> http://www.typescriptlang.org/play/index.html#src=const%20%5BstringA%2C%20...numbers%5D%20%3D%20%5B'string'%2C%201%2C%202%5D%3B%0A%2F%2F%20const%20%5BstringA%2C%20...numbers%5D%20%3D%20%3C%5Bstring%2C%20number%2C%20number%5D%3E%5B'string'%2C%201%2C%202%5D%3B%0A%2F%2F%20const%20%5BstringA%2C%20...numbers%5D%3A%20%5Bstring%2C%20number%5B%5D%5D%20%3D%20%5B'string'%2C%201%2C%202%5D%3B%0A%2F%2F%20const%20%5BstringA%2C%20...numbers%5D%3A%20%5Bstring%2C%20%5Bnumber%2C%20number%5D%5D%20%3D%20%5B'string'%2C%201%2C%202%5D%3B

**Related Issues:**
Repository: vscode
Issue: searching for "IntelliSense" or "completions" doesn't provide expected result
Labels: bug,settings-editor,confirmed,settings-search

I had someone ask how to turn off completions for Dockerfiles and it turns out the setting `editor.quickSuggestions` controls whether or not the completion list shows up. 

``` json
  // Controls if suggestions should automatically show up while typing
  "editor.quickSuggestions": {
    "other": true,
    "comments": false,
    "strings": false
  },
```

It took me a long time to find this setting because I searched for "completion" "IntelliSense" and probably a bunch of other things to no avail.

With the bing search now in place, I would have expected that this setting would show up for "completion" or "intellisense", but it still doesn't.  I also searched for "other" but it doesn't show up. If I search for "comments" it does (but it looks like a result of bing search).
Repository: rust
Issue: Unergonomic structured suggestions in rustc
Labels: C-cleanup,A-diagnostics,T-compiler

While checking `span_help`s that could be `span_suggestion` I noticed that rustc contains lots of code similar to

```rust
                    match fcx.tcx.sess.codemap().span_to_snippet(self.cast_span) {
                        Ok(s) => {
                            err.span_suggestion(self.cast_span,
                                                "try casting to a reference instead",
                                                format!("&{}{}", mtstr, s));
                        }
                        Err(_) => {
                            span_help!(err, self.cast_span, "did you mean `&{}{}`?", mtstr, tstr)
                        }
                    }
```

where we try to get a snippet and if that fails, since we can't produce a nice suggestion, we produce a `help` message that contains a message.

We should probably provide a helper for that. First I thought that we could add a helper that does essentially the above without all the duplication, but with the new approximate suggestions (#47540) we can always produce the suggestion, but mark it as approximate if we need to use the fallback value.

I'd assume the above example would look something like this:

```rust
err.span_possibly_approximate_suggestion(
    self.cast_span, // span to replace
    "try casting to a reference instead", // message
    fcx.tcx.sess.codemap().span_to_snippet(self.cast_span).ok(), // optional snippet
    tstr, // default if snippet is none
    |snip| format!("&{}{}", mtstr, snip), // closure taking snippet and producing the replacement code
);
```

cc @Manishearth @nrc