sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: strictNullCheck should detect unreachable default values and code after nullish operator
Labels: Suggestion,Awaiting More Feedback

# Suggestion

Using `strictNullCheck` should allow detection of code that isn't supposed to be reached according to type analysis

## 🔍 Search Terms

strictNullCheck unreachble nullish default value

## ✅ Viability 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, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).

Yes, especially "Statically identify constructs that are likely to be errors."

## ⭐ Suggestion

This assumes that it is desired to detect errors with unreachable code due to type analysis (see microsoft/TypeScript-Website#1604 ).

With `strictNullCheck` turned on, some code that is meant to be unreachable and thus an error is not flagged.

## 📃 Motivating Example

The `= 42` below is unreachable ([playground](https://www.typescriptlang.org/play?ssl=1&ssc=1&pln=10&pc=1#code/MYGwhgzhAECiAeYC2AHEBTaBvAUNaAZgPZEAUu++80AvNACwBMe0AvgFzYtWcB2ArkgBG6AE4tWASi6Voo9ABd+o3tHgScrHEA)) and is the sign that some code is likely to be an error, but nothing is flagged

```typescript
class Example {
  foo({
    x = 42
  }: {
    x: number
  }) {
    return x
  }
}
```

Either the declaration should be changed to `x?: number`, or the default should be removed.

Another example ([thanks to @jcalz](https://stackoverflow.com/questions/66432817/why-isnt-it-an-error-to-provide-a-default-value-that-cant-be-used)) using the nullish operator.

```typescript
function foo(x: number) { x ??= 42 }
```

Again, it would be helpful if an error or a warning would be raised as that code seems clearly to be a mistake.
Repository: pytorch
Issue: group conv in amp too slower
Labels: module: performance,module: cuda,triaged,module: amp (automated mixed precision)

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

## To Reproduce
```python
import time
import torch
import torch.nn as nn


class TestModel(nn.Module):
    def __init__(self, g=8):
        super(TestModel, self).__init__()
        self.conv1 = nn.Conv2d(128, 128, kernel_size=3, stride=1, padding=1, groups=g)
        self.conv2 = nn.Conv2d(128, 128, kernel_size=3, stride=1, padding=1, groups=g)
        self.conv3 = nn.Conv2d(128, 128, kernel_size=3, stride=1, padding=1, groups=g)

    def forward(self, x):
        x = self.conv1(x)
        x = self.conv2(x)
        x = self.conv3(x)
        return x


def main():
    enable_amp = False
    model = TestModel().cuda()
    x = torch.rand((128, 128, 64, 64)).cuda()
    model(x)

    t1 = time.time()
    for _ in range(100):
        with torch.cuda.amp.autocast(enabled=enable_amp):
            model(x)
    t2 = time.time()
    print(t2 - t1)


if __name__ == '__main__':
    main()

```

if ```enable_amp``` settings to ```False```,  running time is 0.05s denoted t1.
if ```enable_amp``` settings to ```True```,  running time is 0.32s denoted t2.

if ```groups``` settings to ```1```,  t2 < t1.
why group convolution is too slower, when amp enabled?

## Expected behavior
if I enable amp, execution should be faster.

## Environment

 - PyTorch Version (e.g., 1.0): 1.7.1
 - OS (e.g., Linux): centos7
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Build command you used (if compiling from source): No
 - Python version: 3.8
 - CUDA/cuDNN version: 10.1/7.6
 - GPU models and configuration:  TeslaV100(32G)
 - Any other relevant information:


cc @mcarilli @ptrblck @ngimel @VitalyFedyunin
Repository: pytorch
Issue: Reset mask for torch.cumsum?
Labels: triaged,enhancement,module: numpy,module: reductions

## 🚀 Feature
`torch.cumsum` current performs a cumulative sum over a given axis without resetting the cumulative sum (i.e. the final term is the sum of all terms in the initial vector). Proposing adding an argument `mask` which is a vectors of 0 or 1s, where 1 indicates to reset the cumulative sum at that vector, allowing computation of multiple cumulative sums in one vector.

## Motivation

I'm currently looking to compute a cumulative sum of log probabilities for a reinforcement learning task per trajectory, and find it generally easier to track all trajectories in a single vector (for ease of transportation between CPU and GPU) and also track a vector that differentiates between trajectories. 

## Pitch

I'd like something like an argument to `torch.cumsum` called `mask` which has the same length as the axis to cumulative sum over, and indicates when to reset the cumulative sum. For example, if my vector was `x =[a, b, c, d, e]` and my mask was `m = [1, 0, 0, 1, 0]`, then `torch.cumsum(x, mask=m)` should return something like `[a, a+b, a+b+c, d, d+e]`.

## Alternatives

My current implementation is here (which manually iterates through a vector of log probabilities and uses a inverted mask to reset the cumulative sum).

https://github.com/18jeffreyma/multi_cmd/blob/3106417eb4acb9230576e78e7267a24b2efa6b3d/multi_cmd/rl_utils/multi_copg.py#L179

However, this implementation seems to not play very well with CUDA acceleration on autograd, as I yield zero performance benefit on a Nvidia DGX versus using CPU, which is the primary reason I bring up this feature request. Alternatively, is there some autograd issue with implementing this masked-reset cumulative sum using a for-loop?



cc @mruberry @rgommers @heitorschueroff
Repository: terminal
Issue: Add timestamp view
Labels: Issue-Feature,Area-TerminalControl,Product-Terminal

# Description of the new feature/enhancement

iTerm2 has a very nifty functionality where you press a keyboard shortcut and it creates a sort of side-column (think of the line number column or the debugging column in an IDE) where it shows timestamps for all executed commands in its scroll back buffer, plus for all "significant events".

I think, but don't quote me on that, that it also shows timestamps for important events, for example if there's a time interval longer than X and suddenly there's a message, it shows the timestamp for that, too.

It's great for retroactively investigating something, especially if you have to use a shell which doesn't implement more advanced prompt features. Or for long running operations with sudden bursts of activity.

https://iterm2.com/documentation-one-page.html

> Toggle View > Show Timestamps to indicate the time each line was last modified. This is useful for telling how long operations took or when a message was printed.

# Proposed technical implementation details (optional)

You press a certain keyboard shortcut/select a menu entry.

An additional column is added to the left of the terminal, containing nicely formatted timestamps, down to the second (maybe millisecond, even?) that shows timestamps for all command executions plus significant events in the entire scrollback buffer, as marked by timing of printing to the screen (pause for longer than Y seconds - maybe make this configurable? - then the next message printed is significant and its timestamp is recorded and shown).
Repository: flutter
Issue: [Feature Request]DecorationImage add gaplessPlayback
Labels: c: new feature,framework,a: images,c: proposal,P3,team-framework,triaged-framework

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case

when there is a LONG list of item with `DecorationImage` as background, the list will flash like crazy when user scroll up and down really fast or just normal speed....

In `Image` there's a `gaplessPlayback` to stop this flashing as mentioned in this issue: #33641

But it's missing in `DecorationImage`... not sure if this is intended (which will be... well, why?) or something I missed...

Please consider adding this.

Right now all I can do is to refactor a simple box(`Container`) with background image to a `Stack` structure, which is really not ideal. 

It should work, but so not elegant, given the fact that there IS a simpler way to implement background image box in Flutter...

<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

## Proposal

add this `gaplessPlayback` like what `Image` did:

![image](https://user-images.githubusercontent.com/13610283/109622816-7d649300-7b77-11eb-8c67-58ccc740efd6.png)

`DecorationImage`:

![image](https://user-images.githubusercontent.com/13610283/109622889-910ff980-7b77-11eb-9e21-54ced4092d67.png)


<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching images showing what you are imagining.

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->
Repository: pytorch
Issue: ModuleList not recognised as reversible by mypy
Labels: module: nn,module: typing,triaged

To reproduce, run mypy in the following example
```python
import torch.nn as nn

a = nn.ModuleList([nn.Linear(4, 5)])
for m in reversed(a):
    print(m)
```

According to this [stackoverflow](https://stackoverflow.com/questions/46690012/subclassing-sequence-with-proper-type-hints-in-python) answer, the `__getitem__` function in `ModuleList` should be split into two overloads and make the container inherit from `Sequence[Module]`: 

```python
class ModuleList(Module, Sequence[Module]):
    ...

    @_copy_to_script_wrapper
    @overload
    def __getitem__(self, idx: int) -> Module:
        return self._modules[self._get_abs_string_index(idx)]

    @_copy_to_script_wrapper
    @overload
    def __getitem__(self, idx: slice) -> Sequence[Module]:
        return self.__class__(list(self._modules.values())[idx])
```

Doing this indeed solves the issue. I would be happy to write the PR.

The only thing that I am not sure about is the order of the decorators in the functions. Should it be this one or the opposite?
**Edit.** By looking at the implementation of `_copy_to_script_wrapper`, it seems like this order is correct, but I would like to have confirmation on this.

**Edit.** I found this issue when implementing https://github.com/pytorch/pytorch/pull/33344
When this is fixed, the `# type: ignore` of that PR should be removed.

cc @albanD @mruberry @jbschlosser @ezyang @malfet @rgommers @xuzhao9 @gramster
Repository: rust
Issue: Better error messages for sending `format!` uses across thread boundaries.
Labels: A-diagnostics,T-compiler

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur. 
-->

Given the following code: <!-- Please provide a link to play.rust-lang.org -->

```rust
fn main() {
    let format = format_args!("{}", 1);
    std::thread::spawn(move || {
        format;
    })
    .join()
    .unwrap();
}
```

The current output is:

```
   Compiling playground v0.0.1 (/playground)
error[E0277]: `core::fmt::Opaque` cannot be shared between threads safely
   --> src/main.rs:3:5
    |
3   |     std::thread::spawn(move || {
    |     ^^^^^^^^^^^^^^^^^^ `core::fmt::Opaque` cannot be shared between threads safely
    |
    = help: within `[ArgumentV1<'_>]`, the trait `Sync` is not implemented for `core::fmt::Opaque`
    = note: required because it appears within the type `&core::fmt::Opaque`
    = note: required because it appears within the type `ArgumentV1<'_>`
    = note: required because it appears within the type `[ArgumentV1<'_>]`
    = note: required because of the requirements on the impl of `Send` for `&[ArgumentV1<'_>]`
    = note: required because it appears within the type `Arguments<'_>`
    = note: required because it appears within the type `[closure@src/main.rs:3:24: 5:6]`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: could not compile `playground`

To learn more, run the command again with --verbose.
```

<!-- The following is not always necessary. -->
Ideally the output should look like: I think it would be more helpful to point out which variable is being across a thread boundary. So something like,

```
fn main() {
    let format = format_args!("{}", 1);
         ^^^ format is of type `core::fmt::Opaque` which is not `Sync`
    std::thread::spawn(move || {
                                   ^^^ `format` is moved into this closure here, but in order to do so it must be `Sync` because it is being sent accross a thread boundary
        format;
    })
    .join()
    .unwrap();
}
```

I think it would also be helpful to point out that `ArgumentV1<'_>` comes from a `format!` invocation because it is not immediately obvious. I did run into this bug a few weeks ago, and I was only able to work this out after an internet search result returned some of `rustc`'s tests.

<!--
If the problem is not self-explanatory, please provide a rationale for the
change.
-->

<!--
If dramatically different output is caused by small changes, consider also
adding them here.

If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions. The output might also be
different depending on the Edition.
-->
Repository: three.js
Issue: Rework updateWorldMatrix / scene.autoUpdate
Labels: Suggestion

I think I would perhaps be able to implement a smarter system of handling `matrixWorldNeedsUpdate` based on a tri-state value ("no update needed", "I need update", "some children need update"). With such  implementation it would not be necessary to always traverse all objects in `scene.updateMatrixWorld`, which I think is the main performance reason why people are disabling `scene.autoUpdate` and resort to calling `updateMatrixWorld` manually.

I think the implementation would be mostly backwards compatible (i.e. handling `updateMatrixWorld` manually would still be possible, and the interface would not change when relying on automatic updates).

@WestLangley @mrdoob @Mugen87 Before I start experimenting with this, I would like to know what is the general sentiment here regarding such change. Would it be welcome, or do you prefer the things to stay as they are? If you feel this is a step in right direction, are there any special requirements / restrictions you would require from such change?
Repository: ant-design
Issue: Nested tables don't work with fixed columns
Labels: Inactive

- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[https://codepen.io/menosprezzi/pen/GRNybBX](https://codepen.io/menosprezzi/pen/GRNybBX)

### Steps to reproduce
1. Open a new codepen of https://ant.design/components/table/#components-table-demo-nested-table
2. Set Date column as fixed in the NestedTable component
3. Resize the space available in the screen

### What is expected?
Render fixed columns in the nested table.

### What is actually happening?
It renders the nested table without the fixed effect applied to the desired column which breaks the responsivity

| Environment | Info |
|---|---|
| antd | 4.12.3 |
| React | 16.14.0 |
| System | MacOS Big Sur; Windows 10 |
| Browser | Chrome 88; New Edge |

---
Check the CSS code to preview the hack that I made to accomplish the correct experience.


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: youtube-dl
Issue: 101Soundboards
Labels: site-support-request

## Checklist
- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2021.02.10**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs
- By the pack https://www.101soundboards.com/boards/21617-ultimate-fart-soundboard
- Individually https://www.101soundboards.com/sounds/154594-air-biscuit

## Description

These are websites that contain short audio clips for sound effect purposes

Usable applications include
- https://github.com/gamebooster/soundboard
- https://github.com/Soundux/Soundux/issues/47
- https://github.com/ruohki/lunchpad
Repository: youtube-dl
Issue: Soundboard.com
Labels: site-support-request

## Checklist
- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2021.02.10**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs
- Soundboard https://www.soundboard.com/sb/Deer_Sounds_audio

## Description

These are websites that contain short audio clips for sound effect purposes

Usable applications include
- https://github.com/gamebooster/soundboard
- https://github.com/Soundux/Soundux/issues/47
- https://github.com/ruohki/lunchpad
Repository: flutter
Issue: SelectableText not single-lined when inside of IntrinsicWidth
Labels: framework,f: material design,a: typography,has reproducible steps,P2,found in release: 2.1,team-design,triaged-design

Hi. I have a problem with `SelectableText`. For some reason it always uses two lines when inside of `IntrinsicWidth`.

## Steps to Reproduce

1. Go to https://dartpad.dev/23f655118555eba3d66ad487fe9b013f

**Expected results:**
`hello world`
`12
`
**Actual results:**
```
hello 
world
```
```
1 
2
```
## Demo code
```
import 'package:flutter/material.dart';

void main() {
  runApp(App());
}

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'SelectableTextProblem',
      home: Scaffold(
        body: SafeArea(
          child: IntrinsicWidth(
            child: SelectableText(
              "hello world",
            ),
          ),
        ),
      ),
    );
  }
}
```
Repository: terminal
Issue: findMatch keybindings are ignored if focus is still in the search box
Labels: Issue-Bug,Area-TerminalControl,Product-Terminal,Priority-3

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.

All good? Then proceed!
-->

<!--
This bug tracker is monitored by Windows Terminal development team and other technical folks.

**Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**.
Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue.

If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link.

Please use this form and describe your issue, concisely but precisely, with as much detail as possible.

-->

# Environment

```none
Windows build number: Microsoft Windows [Version 10.0.18362.1256]
Windows Terminal version (if applicable): Windows Terminal Preview Version: 1.7.572.0

Any other software?
No
```

# Steps to reproduce

Bind find, findNext and findPrev as such:
```JSON
{
    "command": "find",
    "keys": "ctrl+f"
},
{
    "command": {
        "action": "findMatch",
        "direction": "next"
    },
    "keys": "f3"
},
{
    "command": {
        "action": "findMatch",
        "direction": "prev"
    },
    "keys": "shift+f3"
}
```
In the terminal, hit ctrl+f to start a search, enter a search term and press enter. Then press F3 and shift+F3 to go back and forth through the search results.

# Expected behavior

F3 should highlight the next search result, shift+F3 should highlight the previous result.

# Actual behavior

F3 and shift+F3 are ignored as long as focus remains in the search box. Instead enter and shift+enter hightlight the previous, respectively the next result.

If the focus is moved from the search box to the terminal pane, F3 and shift+F3 work as expected.


PS: Your release notes said I could bind the `findNext` and `findPrev` actions, when I actually had to bind the `findMatch` action with a `direction` parameter ;)