sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: Background color of the selected text in the Extensions panel and Settings page is almost indistinguishable
Labels: bug,debt,themes,accessibility

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.65.0
- OS Version: Windows 7

Steps to Reproduce:

1. choose Default High Contrast theme
2. open the Extensions panel
3. type any text in the text box, e.g. "javascript"
4. select a part of that text -> the background color is very dark and hardly indistinguishable from the black background of the text box.

The same problem is with the selected text in the top text box on the Settings page. However, the text boxes in the Search panel and Find widget have different and more prominent background color of the selected text.

This is not problem only with that theme, there are others with the same problem:
Kimbie Dark, Monokai, Monokai Classic, Github Dark Colorblind/Default/Dimmed, One Dark Pro...

I tried to override the background color of the selected text with the Default High Contrast theme that I am using with:
"selection.background": "#ff0000"

but the background color of selected text in Extensions/Settings is still much more darker than that in the Search/Find text boxes.
Repository: TypeScript
Issue: obj[prop] || (obj[prop] = {}): Object is possibly 'undefined' -- Documentation?
Labels: Docs

# Suggestion

It would be great to have TS documentation about "Object is possibly 'undefined'. ts(2532)" common cases that most everyone will run into and be puzzled about. The TS playground below shows such an example when using code like: `obj[prop] || (obj[prop] = {})` and when most everyone would expect `obj[prop]` not to be flagged as 'undefined'.

TS Playground: [link](https://www.typescriptlang.org/play?#code/C4TwDgpgBACgTge0nUAVc0C8UDeBYAKCigG0BrCEALigGdg4BLAOwHMBdG+ptwgX0KFQkKAFVaEOOhHZ8RKIwAmNZgFcAtgCNJUAD50GLVoWJhEyUAH4aOUkpUbtcTrHOS0GKAILehn8ZK00li4JnbKYhJSGCQA5Eqx7C4B0SL8ggQAxgjM9FCqUbQ0KUGesr4EAPSVUAByCFCSiHC0hAWBJACM7FCyChGdXm2FXewAdGZI7iB6+gAU7S2jE24oM+UAlMMd3StTayQATD2684u0y5MWIEc9mxnZucD5UQCSir1QnYSPeVfT70+hwy1SgAHlNAArCCZZ6MWhQMAIWi0RiaAA2M1iqmYiggADMWBBFLEoDkoOiAIZ5Q4UomtAjnEiLd53XD9Ggsj7eJlc8b-NazKALEZ8vbXT44PhbRmit6KfmrUAkAWgVlCkUdMWqm469X3AhAA)

## 🔍 Search Terms

Object is possibly 'undefined'. ts(2532)
TypeScript Object property assignment
TypeScript Object OR assignment undefined

## ✅ 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).

## ⭐ Suggestion

I would like to see common cases documentation about the "Object is possibly 'undefined'. ts(2532)" error. Maybe it exists and I could not find it.

## 📃 Motivating Example

I see many issues filed related to ts(2532) because of the current limitations of TypeScript.

## 💻 Use Cases

See TS Playground [link](https://www.typescriptlang.org/play?#code/C4TwDgpgBACgTge0nUAVc0C8UDeBYAKCigG0BrCEALigGdg4BLAOwHMBdG+ptwgX0KFQkKAFVaEOOhHZ8RKIwAmNZgFcAtgCNJUAD50GLVoWJhEyUAH4aOUkpUbtcTrHOS0GKAILehn8ZK00li4JnbKYhJSGCQA5Eqx7C4B0SL8ggQAxgjM9FCqUbQ0KUGesr4EAPSVUAByCFCSiHC0hAWBJACM7FCyChGdXm2FXewAdGZI7iB6+gAU7S2jE24oM+UAlMMd3StTayQATD2684u0y5MWIEc9mxnZucD5UQCSir1QnYSPeVfT70+hwy1SgAHlNAArCCZZ6MWhQMAIWi0RiaAA2M1iqmYiggADMWBBFLEoDkoOiAIZ5Q4UomtAjnEiLd53XD9Ggsj7eJlc8b-NazKALEZ8vbXT44PhbRmit6KfmrUAkAWgVlCkUdMWqm469X3AhAA).
Repository: flutter
Issue: generated_main.dart should using alias import
Labels: tool,c: proposal,P2,a: plugins,team-tool,triaged-tool

<!-- 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

<!--
     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?
-->

Since flutter generate `generated_main.dart` inside `.dart_tool/flutter_build` for every plugins that implement dartPluginClass, there was possible issue when two or more different plugins has same dartPluginClass.

## Proposal

To avoid conflicts in `_PluginRegistrant.register` method, we can use alias imports e.g
```
import 'package:foo/foo.dart' as p1;
import 'package:bar/bar.dart' as p2;
...
```

then we call registerWith method like this

```
p1.SomePluginClass.registerWith();
p2.SomePluginClass.registerWith();
```
Repository: PowerToys
Issue: [Feature] A tool to activate any of a window controls through hotkeys
Labels: Idea-New PowerToy,Needs-Triage

### Description of the new feature / enhancement

This is an interesting tool:

https://github.com/zsims/hunt-and-peck

It allows to insert a label under each of the controls/fields of a Window. By tipping in sequence the corresponding keys, it is possible to activate the associated control/field, as if clicking on it.

Some examples:

Explorer:

![image](https://user-images.githubusercontent.com/13739892/159133676-2dcb4fc7-d71a-4f5c-b0b8-8e664b3f4923.png)

Excel:

![image](https://user-images.githubusercontent.com/13739892/159133540-8fb70130-6b3f-44b2-8f9f-120de6f25ed0.png)

Calculator:

![image](https://user-images.githubusercontent.com/13739892/159133708-edc7fc61-6d3c-48d8-a27d-2b140a8d72d6.png)

The tool is already working great, but I think it could be better optimized and integrated into Windows.

This is why I'm suggesting integrating something similar in PowerToys.

### Scenario when this would be used?

It would be possible to control almost any application features and fields without actually making use of the mouse.

A VIM-like experience.

It would increase workflow speed and quality a lot in most cases.


### Supporting information

This is another similar tool, but it only allows to activate any of the visible windows by placing some labels in their title bars:

https://github.com/JochenBaier/fastwindowswitcher
Repository: storybook
Issue: Reset controls to default after change story tab
Labels: feature request,needs triage

**Is your feature request related to a problem? Please describe**
I'm always frustrated when I work with controls. Controls are not reset when you change cards. It seems to me that it would be good if the controls reset every time the story changes.

1. Choose the story of button 
2. I change properties in controls 
2. Select another story
3. I still see the changes I made
4. I have to manually reset the controls

**Describe the solution you'd like**
Maybe just reset controls to default after change story tab
Repository: deno
Issue: Shell completions for tasks in `deno task`?
Labels: feat,cli

Would it be possible to do shell completions for tasks in deno task? I'm unfamiliar with how shell completions work.

From #14036
Repository: vscode
Issue: Use source maps if extension ships one for error stack trace formatting
Labels: feature-request,extension-host

In the [Julia extension]() we have crash reporting setup, so that we send a crash report whenever an exception occurs in our extension. We also bundle our extension with webpack. One problem is that the stack traces in the exceptions (if something goes wrong) are essentially useless, as they refer to locations in the bundled version of the extension, i.e. everything on line 1 :) We do actually ship a source map file in the extension, but the information in there doesn't show up in the exception objects.

I think there are broadly speaking two ways to improve the situation: 1) run the extension host with the `--enable-source-maps` flag (but note that any custom `Error.prepareStackTrace` handler is then disabled, or 2) modify the already existing `Error.prepareStackTrace` handler in the extension host https://github.com/microsoft/vscode/blob/32b031eeefc4fd27a21659d35070967bfe965bcc/src/vs/workbench/api/common/extensionHostMain.ts#L92 to apply source map information if it is there.

I am experimenting with that at the moment by using the https://www.npmjs.com/package/source-map-support package in our extension. That actually _does_ lead to error objects that have stack traces that use the source map information, so that is great. The drawback, though, is that by using this package I think we are overriding the default VS Code `Error.prepareStackTrace` handler that gets set [here](https://github.com/microsoft/vscode/blob/32b031eeefc4fd27a21659d35070967bfe965bcc/src/vs/workbench/api/common/extensionHostMain.ts#L92), and potentially even for not just our extension? That seems really bad, but at the moment I don't really have a better idea on how to handle that...

I think the ideal situation is that the default `Error.prepareStackTrace` that the VS Code extension hosts installs essentially provides the same functionality that the `source-map-support` package provides.
Repository: electron
Issue: [Question]: Accessing high-resolution timers on Electron 
Labels: enhancement :sparkles:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

Apparently, many major browsers have disabled accessing high-resolution timers as [privacy mitigations](https://developers.google.com/web/updates/2018/02/meltdown-spectre#high-resolution_timers), including [Firefox](https://developer.mozilla.org/en-US/docs/Web/API/Event/timeStamp#reduced_time_precision) and Google Chrome, which Electron is based off of. I'm trying to run an experiment that requires very accurate keyboard typing data. Root access to the testing computer(s) and full knowledge of the participants can be assumed. I was going to do this in browsers, but I realised the reduced precision would mess up my data so I decided to try doing it in a native app. 

### Proposed Solution

Make it possible to access high resolution typing data with a flag or something similar(to avoid breaking existing projects). Electron is supposed to be like a native app, so applications built using it should have the full privileges of native apps, too.

### Alternatives Considered

* Prompt the user beforehand. I'm not sure why that would be necessary though, since Electron has the full install process of a native app and thus it makes sense for applications built with it to have the full privileges of native apps.
* Write a "true native app"

### Additional Information

If Electron isn't needed and there's a way to achieve this in browsers, please also inform me of that.
Repository: opencv
Issue: Assertion failed (trackbar) in getTrackbarPos
Labels: bug,category: highgui-gui

This issue occurs when using OpenCV for Windows (prebuilt) version 
 - 4.5.3 
 - 4.5.4
 - 4.5.5
 - 4.6.0
 
It works just fine for version 4.5.2. I have not checked for version lower than 4.5.2 yet. 
Also I have not checked for other operating systems yet.

The error messages:

> OpenCV: terminate handler is called! The last OpenCV error is:
> OpenCV(4.5.5) Error: Assertion failed (trackbar) in getTrackbarPos,
> file C:\opencv-4.5.5\sources\modules\highgui\src\window.cpp, line 862


    #include <opencv2/opencv.hpp>
    #include <cstdlib>
    #include <vector>
    
    using namespace cv;
    using namespace std;
    
    template <typename T>
    T PosToActual(T min, T max, int pos, int TICKS)
    {
        return min + (max - min) * pos / TICKS;
    }
    
    void Refresh(int, void *data)
    {
        Mat *original = (Mat *)data;
    
        Mat modified;
        vector<Mat> channels;
        split(*original, channels);
    
        int b = cv::getTrackbarPos("Blue", "Modified");
        int g = cv::getTrackbarPos("Green", "Modified");
        int r = cv::getTrackbarPos("Red", "Modified");
    
        channels[0] *= PosToActual<float>(0, 1, b, 10);
        channels[1] *= PosToActual<float>(0, 1, g, 10);
        channels[2] *= PosToActual<float>(0, 1, r, 10);
    
        merge(channels, modified);
    
        imshow("Modified", modified);
    }
    
    int main()
    {
        const string filename = "family.jpg";
    
        Mat original = imread(filename);
    
        // Mat modified = Mat::zeros(original.size(), original.type());
    
        cv::namedWindow("Modified", WINDOW_NORMAL);
        int bFactor = 5;
        int gFactor = 5;
        int rFactor = 5;
    
        createTrackbar("Blue", "Modified", &bFactor, 10, Refresh, &original);
        createTrackbar("Green", "Modified", &gFactor, 10, Refresh, &original);
        createTrackbar("Red", "Modified", &rFactor, 10, Refresh, &original);
    
        Refresh(0, &original);
    
        waitKey();
    }
Repository: PowerToys
Issue: Named areas in fancy zones
Labels: Idea-Enhancement,FancyZones-Layouts,Product-FancyZones,Needs-Triage

### Description of the new feature / enhancement

I wish to be able to name areas in fancy zone and have the option to have windows remember what named area they are locked to, and preferable to have them remember secondary areas.



### Scenario when this would be used?

Example:
Now my coding setup: 
1. Browser takes up 2/3 of the left side
2. Slack takes up 1/3
3. Visual Studio have the largest part in the center
4,5, 6 on the right is CLI windows, secondary browser and notes.

Switching layout to browsing:
1. Slack on the left
2. browser in the middle
3. Notes

I would love notes to remember to stick to notes and secondary browser to stick to secondary browser and if that is not available to go to browser.
This would make it so much easier to have several setups and move between them during the workday.

### Supporting information

_No response_
Repository: PowerToys
Issue: Different FancyZone setups for different virtual desktops.
Labels: Product-FancyZones,Issue-Docs,FancyZones-VirtualDesktop

### Description of the new feature / enhancement

Title describes it in full. The ability to have different setups on different virtual desktops since they often fill different purpouses.

### Scenario when this would be used?

During a workday I move between virtual desktops all the time and as it is now I 'adapt' them all to the main workspace, but it's not at all optimal since I can't adapt each virtual space for their purpose.

### Supporting information

_No response_
Repository: opencv
Issue:  error: ‘nppSetStream’ was not declared in this scope
Labels: category: build/install,category: gpu/cuda (contrib),incomplete,needs reproducer

Error in opencv compilation.

Environment configuration cuda-11.1, RTX 3080, opencv4 5.5/4.5.3, gcc:v7. 5 cmake:3.10.2
The error is as follows：
` error: ‘Npp8u’ does not name a type  template<> struct NPPTypeTraits<CV_8U>  { typedef Npp8u npp_type; };
error: ‘nppGetStream’ was not declared in this scope   oldStream = nppGetStream();
 error: ‘nppSetStream’ was not declared in this scope
 #define nppSafeSetStream(oldStream, newStream) { if(oldStream != newStream) { cudaStreamSynchronize(oldStream); nppSetStream(newStream); }
`
Repository: yt-dlp
Issue: Add batch download ("--batch-file") progress display.
Labels: enhancement

### Checklist

- [X] I'm reporting a feature request
- [X] I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme)
- [X] I've verified that I'm running yt-dlp version **2022.03.08.1**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

### Description

When you are downloading a playlist or channel videos on YouTube, there is a _"Downloading (video index) of (total count)"_ message.
But that's not the case for batch downloading (`-a` / `--batch-file`).
Repository: PowerToys
Issue: [PowerToys Run] Time Calculator
Labels: Idea-Enhancement,Product-PowerToys Run,External Dependency,Run-Plugin

### Description of the new feature / enhancement

![image](https://user-images.githubusercontent.com/23485114/159162373-c1c6720b-cf69-4afd-9ca7-31941ec9399c.png)
![image](https://user-images.githubusercontent.com/23485114/159163069-a5a98a69-3cda-466b-90e9-7fed101bc6fb.png)


### Scenario when this would be used?

Use this calculator to add or subtract two or more time values in the form of an expression.
https://www.calculator.net/time-calculator.html?tcexpression=1d+2h+3m+4s+%2B+4h+5s+-+2030s+%2B+28h&ctype=3&x=57&y=21#expression

### Supporting information

_No response_
Repository: PowerToys
Issue: System wide column selection
Labels: Idea-New PowerToy,Needs-Triage

### Description of the new feature / enhancement

System wide column selection, the there is in word notepad ++ etc. Hold alt to select text in a column. 

### Scenario when this would be used?

Everywhere in the system where there is text that can be selected. 

### Supporting information

Programs that i know that got this feature is Microsoft word and notepad++.
Repository: vscode
Issue: Feature to disable auto-expanding on sub-folders.
Labels: feature-request,file-explorer

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
Ability to disable the auto-expanding sub-folders, it is pretty annoying when you have a lot of files nested with folders; I have not found a property to disable it so I guess we programmers need to live with it.

https://user-images.githubusercontent.com/97276103/159167456-e240c43c-d777-437a-80b6-a0c1ff12ac5f.mp4
Repository: puppeteer
Issue: [Bug]: Page emulation doesn't work for its iframe
Labels: feature,upstream,confirmed

### Bug description

https://github.com/go-rod/rod/issues/565

Steps to reproduce the problem:

1. Run the code:

```js
const puppeteer = require('puppeteer');
const iPhone = puppeteer.devices['iPhone 6'];

(async () => {
  const browser = await puppeteer.launch({ headless: false });
  const page = await browser.newPage();
  await page.emulate(iPhone);
  await page.goto('https://store.steampowered.com/join');
  await new Promise((r) => {})
})();
```

2. Open devtools and print `navigator.userAgent` in the root js context

3. print `navigator.userAgent` in the iframe js context
4. You will see the output is different like the screenshot

<img width="1183" alt="image" src="https://user-images.githubusercontent.com/1415488/159168112-dcdcdb91-60cf-453d-9835-bf801bcf918a.png">



### Puppeteer version

10.4.0

### Node.js version

v16.0.0

### npm version

8.1.1

### What operating system are you seeing the problem on?

macOS

### Relevant log output

_No response_
Repository: rust
Issue: Unclear doc on iterator.by_ref()
Labels: A-docs

Today, I just got a huge problem internally in one of my crate. The bug is that the call to `iterator.by_ref` mutates/advances the iterator itself internally and that caused one of my software dependent on that carate to fail with an internal weird panic. 

On the following documentation link: https://doc.rust-lang.org/stable/std/iter/trait.Iterator.html#method.by_ref the behavior of the function is not very clear.

The doc currently reads:

```
Borrows an iterator, rather than consuming it.

This is useful to allow applying iterator adapters while still retaining ownership of the original iterator.
```

From this text it's not clear that using this function still mutates/advances the internal iterator, so calling count for example is still gonna put the iterator to the end and will break all subsequent calls, essentially ending in weird cases where somehow the number of items is 1 but the later call to `last().unwrap()` panics!
Repository: pytorch
Issue: kron has unnecessary and undocumented dependence on memory layout
Labels: triaged,module: memory format

### 🐛 Describe the bug

`torch.kron` depends on the memory layout in a totally unnecessary way. 

```
import torch
import numpy as np
if __name__ == "__main__":
    a = torch.rand(8, 4)
    b = torch.rand(12, 8)
    c = torch.kron(b.T, a)
Traceback (most recent call last):
  File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_exec2.py", line 1, in Exec
    def Exec(exp, global_vars, local_vars=None):
  File "<string>", line 2, in <module>
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
```
The error is wholly unhelpful as well. Indeed, I could not figure out how to make this work short of instantiating a whole new tensor:

```
    bt = torch.empty(8, 12)
    for i in range(8):
        for j in range(12):
            bt[i, j] = b[j, i]

    c2 = torch.kron(bt, a)
    c_np = np.kron(b.T.numpy(), a.numpy())
    np.testing.assert_allclose(c2.numpy(), c_np)
```



### Versions

Collecting environment information...
PyTorch version: 1.9.0
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 12.2.1 (x86_64)
GCC version: Could not collect
Clang version: 12.0.5 (clang-1205.0.22.11)
CMake version: Could not collect
Libc version: N/A

Python version: 3.9.2 (v3.9.2:1a79785e3e, Feb 19 2021, 09:06:10)  [Clang 6.0 (clang-600.0.57)] (64-bit runtime)
Python platform: macOS-10.16-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] mypy==0.750
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.21.2
[pip3] torch==1.9.0
[pip3] torchvision==0.10.0
[conda] Could not collect


cc @VitalyFedyunin @jamesr66a