sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: electron
Issue: A similar of BrowserWindow.setBackgroundColor to tray
Labels: enhancement :sparkles:

### Preflight Checklist

* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

### Problem Description

I'm creating a code tray in electron for open favorites projects in vscode but 
I've come across a problem: the Tray object don't have a prop or method to change easily your background color like in BroswerWindow object.

Chaging this:

![image](https://user-images.githubusercontent.com/59037640/85954305-df1b9000-b94c-11ea-9252-151c4bdca82e.png)
to this:

![image](https://user-images.githubusercontent.com/59037640/85954312-f2c6f680-b94c-11ea-94f1-2a69d2aee065.png)


### Proposed Solution

Create a method that work like BrowserWindow.setBackgroundColor()
like this:

```js
  const {  Tray } = require('electron')
  const { resolve } = require('path')
  const mainTray = new Tray(resolve(__dirname, 'assets', 'myIcon.png'))
  mainTray.setBackgroundColor('#383838')
```

### Alternatives Considered

Create a prop that when set to true change tray background color to #383838 when system theme is set to dark
Like this:
```js
  const {  Tray } = require('electron')
  const { resolve } = require('path')
  const mainTray = new Tray(resolve(__dirname, 'assets', 'myIcon.png'),
    {
      updateBackgroundColorWhenSystemThemeIsDark: true
    }
  )
```

### Additional Information
Repository: TypeScript
Issue: "Extract to function" refactor is not suggested if selection contains `if` statement (conditional return)
Labels: Suggestion,Experience Enhancement

<!-- 🚨 STOP 🚨 STOP 🚨 STOP 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  3.9.2

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

**Code**

```ts
const fn = ({ condition }: { condition: boolean }) => {
    if (condition) {
        return 1;
    } else {
        return 2;
    }
};
```

Select the whole `if` statement, including the `else`, like this:

![image](https://user-images.githubusercontent.com/921609/87811758-0fbd5e00-c857-11ea-97a1-c33a5da10b4e.png)

**Expected behavior:**

The "extract to function" refactor should be suggested. When the refactor is used, it should produce code that looks like this:

```ts
const fn = ({ condition }: { condition: boolean }) => {
    return newFunction(condition);
};
function newFunction(condition: boolean) {
    if (condition) {
        return 1;
    } else {
        return 2;
    }
}
```

**Actual behavior:**

The "extract to function" refactor is not suggested (testing in VS Code).

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
Repository: flutter
Issue: Offline integration test for zip artifacts
Labels: tool,customer: product,team-infra,P3,triaged-infra,fyi-release

We need to validate that downloading the zip and running precache is sufficient to build without network connectivity. Some possible solutions involve: 1) running in a container with limited network access 2) overriding pub/maven artifact URL to something bogus.

This test will guide future updates to the zip artifacts
Repository: flutter
Issue: Update prepare-packages script to remove dev dependencies, binary artifacts
Labels: c: new feature,tool,customer: product,P3,team-tool,triaged-tool

We should only include the minimum set of packages needed for flutter run on the template. We should be able to exclude tool deps by uploading the snapshot, as well as the non-univeral binaries.



Blocked by https://github.com/flutter/flutter/issues/61751
Repository: godot
Issue: Erasing tiles with SHIFT + RIGHT CLICK is very buggy with tile atlases
Labels: bug,topic:editor

<!-- Please search existing issues for potential duplicates before filing yours:	
https://github.com/godotengine/godot/issues?q=is%3Aissue	
-->

**Godot version:**
<!-- Specify commit hash if using non-official build. -->
3.2.2

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->
Windows 10

**Issue description:**
<!-- What happened, and what was expected. -->
Hold Shift + Right Click, it should let you erase a straight line of tiles. It works normally when erasing a single tile, but breaks when erasing an atlas tile. 
While hovering the erase line around, it replaces the hovered tile with the first tile in the atlas.
If another atlas tile is selected, it will replace tiles with that tile while hovering.

**Steps to reproduce:**

- I will be erasing a straight line from corner to corner on these two shapes of tiles. The one on the left (yellow) is from an atlas while the one on the right (X) is a single tile.
![SharedScreenshot](https://user-images.githubusercontent.com/54819319/87818733-13da8300-c839-11ea-8afb-5e955110bdcb.jpg)

- While the single tile (X tile) is selected, hold SHIFT + RIGHT CLICK, and try to erase a straight line from one corner to the opposite corner. The one on the right erases normally, but the left one is replaced by yellow tiles wherever it was hovered over. (Yellow is the first tile in that atlas)
![SharedScreenshot1](https://user-images.githubusercontent.com/54819319/87818930-6e73df00-c839-11ea-9dd3-5379ce374540.jpg)

- Undo the changes. Now do the same thing, but this time hold Shift + Right Click while another atlas tile is selected. It will now replace the tiles on the left case with the tile that is selected.
![SharedScreenshot2](https://user-images.githubusercontent.com/54819319/87819326-0376d800-c83a-11ea-89e6-4bbd65bd0ed8.jpg)

- Undo the changes. If the red tile is selected, however, while trying to erase a straight line, then it works normally.
![SharedScreenshot3](https://user-images.githubusercontent.com/54819319/87819466-489b0a00-c83a-11ea-967d-8ed1fee6686c.jpg)



**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
[TileEraseBug.zip](https://github.com/godotengine/godot/files/4939513/TileEraseBug.zip)
Repository: terminal
Issue: wpf: cursor is same color as last rendered foreground (?)
Labels: Issue-Bug,Product-Terminal,Priority-3,Area-WPFControl

![image](https://user-images.githubusercontent.com/189190/87823783-e8e83300-c828-11ea-84b6-79feeec58fee.png)

![image](https://user-images.githubusercontent.com/189190/87823800-ed145080-c828-11ea-923b-e8424c20127b.png)
Repository: terminal
Issue: Let terminal consumers provide click handlers and pattern recognizers for buffer text
Labels: Issue-Feature,Area-Output,Product-Terminal,Area-WPFControl

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

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!
-->

# Description of the new feature/enhancement

Terminal consumers have a need to provide their own handlers for clickable regions of text in the terminal. For example: In VS this could enable clicking on build errors and opening up a document to the line and column called out in the error.
<!-- 
A clear and concise description of what the problem is that the new feature would solve.
Describe why and how a user would use this new functionality (if applicable).
-->

# Proposed technical implementation details (optional)

There needs to be two additions to the terminal in order to enable this:

- Consumers of the terminal must be able to provide a pattern that will identify regions of clickable text
- Consumers will provide a callback that is called with the clicked text as a parameter

<!-- 
A clear and concise description of what you want to happen.
-->
Repository: rust
Issue: rustdoc: Intra doc links from Deref/etc do not link to the same page
Labels: T-rustdoc,C-enhancement,A-intra-doc-links

A slight degradation in quality [from manual links] is that the `#method.foo` links would previously link to the same page on `String`'s documentation, and now they will navigate to `str`.

Originally posted by @manishearth in https://github.com/rust-lang/rust/pull/74453.
Repository: vscode
Issue: Allow extensions to contribute to peek widget title navigation action item
Labels: feature-request,references-viewlet

<!-- ⚠️⚠️ 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. -->

In my extension, I'm creating peek view widgets through `editor.action.peekLocations` and `editor.action.showReferences` commands. But I would like to give the user ways to interact with the content shown. 

It would be great if extensions can contribute add commands to the peek widgets, like the ones in `Peek Call Hierarchy` or `Peek Diff`.
![image](https://user-images.githubusercontent.com/3770270/87836809-2effbf80-c846-11ea-8b11-58cd01a17df5.png)

I see in the documentation that it is possible to contribute to the editor title navigation, but it doesn't seem to be possible to contribute to the peek widget title navigation yet.
```
"menus": {
      "editor/title": [
        {
          "when": "resourceLangId == markdown",
          "command": "markdown.showPreview",
          "alt": "markdown.showPreviewToSide",
          "group": "navigation"
        }
      ]
    }
```
Repository: TypeScript
Issue: Spreading tuple into generic/type arguments
Labels: Suggestion,In Discussion

## Search Terms

- spreading generic parameters
- generic parameter spread
- tuple generic spread
- spreading generic argument
- spreading typeArgument
- spreading type argument

## Suggestion

Allow spreading of a tuple type into type arguments. 

The idea is that a tuple of _n_ elements gets spread into generic arguments with _r_ arguments. If _n_ is larger than _r_, only the first _r_ items are used. If _n_ is smaller than _r_ it is possible to add elements after the spread argument. E.g.

```ts
function foo<A, B, C, D>() {
}

type ThreeType = [Foo, Bar, Baz];

foo<...ThreeType, Delta>();
```

## Use Cases
I find myself repeating complex generic types. Ideally I could shorten lengthy repetition into a single type.

## Examples

`dialog.open` takes three generic arguments, these have to be repeated each call. This makes the call less legible and reduces DRYness.

```ts
const dialogRef = this.dialog.open<
    PrinterSelectDialogComponent,
    PrinterSelectDialogData,
    OfferProductPrinter>(
        PrinterSelectDialogComponent,
        {
            data: {
                printer,
            },
        },
    );
```

**After this proposal**
```ts
export type PrinterSelectDialog = [
    PrinterSelectDialogComponent,
    PrinterSelectDialogData,
    OfferProductPrinter,
];


const dialogRef = this.dialog.open<...PrinterSelectDialog>(PrinterSelectDialogComponent, {
    data: {
        service,
    },
});
```
## 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: PowerToys
Issue: Text Replacement / expander
Labels: Idea-New PowerToy

A simple text replacement tool, my examples are from macOS and iOS, it is also a feature in Android. 

Basically this feature: [Text Replacements](https://support.apple.com/guide/mac-help/replace-text-punctuation-documents-mac-mh35735/mac)

On your Mac, choose Apple menu > System Preferences, click Keyboard, then click Text.

Another example: [Third one down](https://support.apple.com/en-us/HT207525) "Set up text replacement"

It's very handy if you have things you need to type regularly, and just typing one word and having my system fill in a whole sentence saves a lot of time and effort at work instead of keeping a copy past text file. I have many web addresses I send to customers and many full sentences for my notes at work that used repeatedly and this kind of feature is surprisingly missing from Windows.

Sorry to open a new issue for this, but my last one was closed already.

![mac-autoreplace-fun](https://user-images.githubusercontent.com/67873106/87842334-d3e7c000-c879-11ea-9433-75b8ccd83778.png)
![ios12-iphone-x-settings-keyboards-text-replacement-social-card](https://user-images.githubusercontent.com/67873106/87842335-d4805680-c879-11ea-97ea-1c32f278863a.jpg)
Repository: go
Issue: database/sql: improve documentation for closing prepared statement on Tx
Labels: Documentation,NeedsInvestigation

The [https://golang.org/pkg/database/sql/#Tx](https://golang.org/pkg/database/sql/#Tx) documentation says:

> The statements prepared for a transaction by calling the transaction's Prepare or Stmt methods **are closed by the call to Commit or Rollback**.

But in the example of [https://golang.org/pkg/database/sql/#Tx.Prepare](https://golang.org/pkg/database/sql/#Tx.Prepare) there's a comment ("Prepared statements take up server resources **and should be closed after use**.") that can cause some doubts about how to handle it

```golang
package main

import (
	"context"
	"database/sql"
	"log"
)

var (
	ctx context.Context
	db  *sql.DB
)

func main() {
	projects := []struct {
		mascot  string
		release int
	}{
		{"tux", 1991},
		{"duke", 1996},
		{"gopher", 2009},
		{"moby dock", 2013},
	}

	tx, err := db.Begin()
	if err != nil {
		log.Fatal(err)
	}
	defer tx.Rollback() // The rollback will be ignored if the tx has been committed later in the function.

	stmt, err := tx.Prepare("INSERT INTO projects(id, mascot, release, category) VALUES( ?, ?, ?, ? )")
	if err != nil {
		log.Fatal(err)
	}
	defer stmt.Close() // Prepared statements take up server resources and should be closed after use.

	for id, project := range projects {
		if _, err := stmt.Exec(id+1, project.mascot, project.release, "open source"); err != nil {
			log.Fatal(err)
		}
	}
	if err := tx.Commit(); err != nil {
		log.Fatal(err)
	}
}
```
Repository: godot
Issue: weird output when printing empty Array
Labels: bug,topic:core,confirmed

<!-- Please search existing issues for potential duplicates before filing yours:	
https://github.com/godotengine/godot/issues?q=is%3Aissue	
-->

**Godot version:**
3.2.1


**OS/device including version:**
Windows 7 64 bits


**Issue description:**
Code:
 >    var test = []
>     for i in range(2) : test.append([])
>     print(test)

Expected:
> [[], []]

Output:
> [[], [...]]

**Steps to reproduce:**
Just copy the code in any node.
Repository: youtube-dl
Issue: How to build from source?
Labels: question

I have read through your readme file, you only say
````
If you want to create a build of youtube-dl yourself, you'll need

python
make (only GNU make is supported)
pandoc
zip
nosetests
````
I still don't know how to build.
If I want to add feature, or some small customized, I need to build, right?
Repository: TypeScript
Issue: In JSDoc @type is not a type declaration, which it is much more like type conversion.
Labels: Bug,Has Repro

I don't kown whether its a bug or feature.

In Javascript, actually i need an error emit which ```other_props``` is not in ```Entity```
![image](https://user-images.githubusercontent.com/5752183/87844822-db4baf80-c8f3-11ea-8ca1-9227aa73db93.png)


In Typescript, ```entityB``` act just same as the Javascript codes above
![image](https://user-images.githubusercontent.com/5752183/87844886-4e552600-c8f4-11ea-978c-e10ac028d5a6.png)
Repository: pytorch
Issue: New Feature : A very fast algorithm for computing matrix rank
Labels: triaged,enhancement,module: numpy,module: linear algebra

## 🚀 Feature
I have devised an LUP based [matrix rank computing algorithm](https://github.com/touqir14/LUP-rank-computer) that outperforms significantly the standard Numpy's [matrix_rank](https://numpy.org/doc/stable/reference/generated/numpy.linalg.matrix_rank.html) function and PyTorch's GPU accelerated [matrix_rank](https://pytorch.org/docs/master/generated/torch.matrix_rank.html) algorithm for most cases. For instance, for large matrices it offers a speedup of at least 200 times over Numpy's matrix_rank and 10 times over PyTorch's matrix_rank function as tested on Google Colab running on Tesla K80. See the [benchmarks](https://github.com/touqir14/LUP-rank-computer/blob/master/README.md). Unlike the LU factorization, LUP is stable in practice and I have thoroughly tested the correctness of my implementation.
## Motivation

Computing the matrix rank can be rather slow, particularly if one deals with large matrices and needs to run multiple times for at least tens of times. This motivated me to come up with a much faster approach than the standard rank computing methods.
## Pitch

I would like to consider the prospect of implementing this as a PyTorch function. My implementation uses scipy's [LUP](https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.lu.html) function and a couple of Cython optimized functions along with the standard Numpy matrix operations. When GPU acceleration is enabled, it additionally uses PyTorch's [LUP](https://pytorch.org/docs/master/generated/torch.lu.html) function.

Let me know if you need to know more about the algorithm's specifics and testing/benchmarks.


cc @mruberry @rgommers @vincentqb @vishwakftw @SsnL @jianyuh
Repository: godot
Issue: Setting RigidBody global_transform into the `_input` function fails.
Labels: bug,topic:physics

**Godot version:**
3.2 custom build, issue bisected to commit e7d8464f


**OS/device including version:**
Linux Mint 20


**Issue description:**
When setting the `global_transform` property of a RigidBody, the expected result sometimes happens, sometimes does not, seemingly at random.


**Steps to reproduce:**
Add a RigidBody to a scene, add a script that sets its `global_transform` property following an input event, run the game and press the key to confirm whether the transform actually changes.


**Minimal reproduction project:**
[BulletGlobalTransform.zip](https://github.com/godotengine/godot/files/4941240/BulletGlobalTransform.zip)
This project contains a workaround for the issue. First run the project and press space to reset the falling cube's position. Doing so should fail most of the time.
Open the RigidBody script and uncomment the yield line: now the transform should only be set during a physics update, and pressing space will always work.

Is this issue a regression or expected behavior following PR #40185?

This PR has also completely changed the behavior of my physics-based game (a drone simulator), with the drone getting its thrust more or less halved, even though thrust is calculated during physics frames only.
Repository: pytorch
Issue: Can we have a way to reset a scheduler back to epoch -1
Labels: module: optimizer,triaged,enhancement

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->

## Motivation
I'm tring to calculate the minimun loss of a NN.

## Pitch
something like .step(-1) but that's going away as deprecated.

## Alternatives

<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->
Make a new scheduler.


cc @vincentqb
Repository: pytorch
Issue: [feature request] New function `torch.slice(...)` mirroring TorchScript op signature or add step argument to `torch.narrow`
Labels: triaged,enhancement,needs research,function request

Maybe a separate issue is a better place for discussion: https://github.com/pytorch/pytorch/pull/7924#issuecomment-660249077 (@albanD, @t-vi )

Original discussion: https://discuss.pytorch.org/t/use-python-like-slice-indexing-across-a-given-dimension/89606/8

The usecase: packbits https://github.com/pytorch/ao/issues/292

https://gist.github.com/vadimkantorov/30ea6d278bc492abf6ad328c6965613a#file-packbits-py-L6
Repository: PowerToys
Issue: [Run] Open app in a wanted size window
Labels: Idea-Enhancement,Product-PowerToys Run

For example, now if I open word with Run, the word window will be a full-screen one by default.

Can we add some feature to set the window we open by Run to the size we want?

For instance, open word in a default half-screen window, instead of a full-screen one.
Repository: rust
Issue: compilation time (of volatile array read?) is super-quadratic in array size
Labels: A-LLVM,C-enhancement,I-compiletime,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.
-->

### Hi.  I tried this code: ###

```rust
const COUNT : usize = 40000;

fn main () {
  let mut vol_buffer = [ 0u64; COUNT ];

  let mut input = unsafe { std::ptr::read_volatile(&mut vol_buffer) };

  input[0] = 42;
  eprintln!("{:?}", input[0]);
}
```

### Expected results: ###

Relatively quick compilation of a program that prints 42.

### Actual results: ###

rustc took 45 seconds on my really rather fast laptop (and also uses a great deal of memory).  The compiled binary works as epected.

Changing the value of COUNT shows the following (with an earlier rustc, but the newly-updated one is about as slow):

 10000   1.74s
 20000   5.9s
 30000   20s
 40000   46s

I haven't waited for completion of any larger values.  In my original version I had COUNT = a million; I killed rustc after some minutes and about 2G of RAM use.

### Meta
<!--
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.
-->

`rustc --version --verbose`:
```rustc 1.46.0-nightly (346aec9b0 2020-07-11)
binary: rustc
commit-hash: 346aec9b02f3c74f3fce97fd6bda24709d220e49
commit-date: 2020-07-11
host: x86_64-unknown-linux-gnu
release: 1.46.0-nightly
LLVM version: 10.0
```