sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: PowerToys
Issue: Bluetooth device button remapping
Labels: Idea-New PowerToy

Add support for remapping Bluetooth headset (or surface pen) button remapping.

_What is the expected behaviour of the proposed feature?  What is the scenario this would be used?_

For example, Surface buds have a swipe gesture that can only be used to change PowerPoint slide, but it would be beyond great if you could change that to mute/unmute the Mic.

Maybe PowerToys could just remap the Bluetooth function to send configurable hotkeys instead which would allow you to use Bluetooth gestures to control anything.

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Repository: godot
Issue: Integer division generates warnings even if you cast
Labels: bug,topic:gdscript,confirmed

**Godot version:**
3.2.2


**OS/device including version:**
linux


**Issue description:**
Godot does not have 'integer' division methods. so whenever you divide with integers you get a warning for every line polluting the debug pane. Even if you cast your division to an int, you still get the warning, i.e. there is simply no way to stop this unless you turn off warnings, which kind of defeats the entire purpose - you should get warnings if they are unintentional, not intentional.

For example:
```
var i=3
var j=45/i
var k=int(45/i)
```

Both j and k generate warnings. The only way is to do something rather silly like this:
```
var k=int(45/float(i))
```

A better solutions would be:
a. for the parser to know you are casting to an int
b. to provide an integer divisor symbol like other languages, e.g. /

W 0:00:00.873   Integer division, decimal part will be discarded.
  <C++ Error>   INTEGER_DIVISION
  <Source>      TileMap.gd:294


Raising as a bug rather than a warning because warnings should only be generated when relevant and do not obscure.
Repository: pytorch
Issue: Excluding image processing operators due to no opencv
Labels: module: build,triaged

I was able to compile pytorch from source. Yes, it runs. However, there was a warning letting me know that Opencv was not found. I am running pytorch in the same virtual environment in which I have opencv running (import cv2 works).

I am running on ubuntu 18.04.

I did look at CMakeLists.txt but found no indication as to where or how pytorch looks to see if opencv is installed.

Thank You
Tom


cc @malfet @seemethere @walterddr
Repository: TypeScript
Issue: Object destructuring with default empty object generates wrong type
Labels: Bug,Help Wanted

**TypeScript Version:**  4.0.3

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

destructuring
object destructuring
object destructuring default

**Code**

```ts
const random = () =>
	new Date().getTime() % 2 === 0 ? { prop1: 1, prop2: 2, prop3: 3 } : undefined;
const obj = random();
// the type of obj is { prop1: number; prop2: number; prop3: number; } | undefined

const test = { testProp: obj };
const { testProp } = test;
// the type of testProp is { prop1: number; prop2: number; prop3: number; } | undefined
const { testProp: testProp2 = {} } = test;
// the type of testProp2 is: {}

const { prop1 } = obj ?? {}; // works
const { prop2 } = testProp ?? {}; // works
const { prop3 } = testProp2; // error
```

**Expected behavior:**

`const { prop3 } = testProp2` should work.

**Actual behavior:**

`const { prop3 } = testProp2` returns the error: `Property 'prop3' does not exist on type '{}'. ts(2339)`.

**Additional information:**

`const { prop3 } = testProp2` should work, just like `const { prop2 } = testProp ?? {}`, because the only difference is that the default `{}` was assigned during the object destructuring to get `testProp2` while, for `testProp`, the default was assigned during the destructuring of the object itself.

If `obj` type is `Type | undefined`, I would expect `testProp2` type to be `Partial<Type>`, as long as `Type` is not a primitive, but an object (which it **is** in the above code, so `testProp2` should be `Partial<{ prop1: number; prop2: number; prop3: number; }>`).

**Related Issues:** 

https://github.com/microsoft/TypeScript/issues/41080 (similar, but not the same, already fixed)
Repository: storybook
Issue: Storybooks styles leak in to the components iframe
Labels: question / support,has workaround,theming

Storybook applies unscoped styles to the iframe which style user components

**Reproduction**

1. Create a new project with `create-react-app`
2. Add storybook with `npx sb init`
3. Create a new story with the content:

```html
<h1>H1 Headline</h1>
<h2>H2 Headline</h2>
<h3>H3 Headline</h3>
```
4. Have a look into the browser

**Expected behavior**
The `h2` only uses the browser default styles

**Screenshots**
![Screenshot 2020-10-21 at 20 05 02](https://user-images.githubusercontent.com/1437379/96765165-4f599000-13da-11eb-88f7-19093c2dc35a.png)

**System**
Environment Info:

  System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
  Binaries:
    Node: 14.13.1 - ~/.volta/tools/image/node/14.13.1/6.14.8/bin/node
    Yarn: 1.22.4 - ~/.volta/tools/image/yarn/1.22.4/bin/yarn
    npm: 6.14.8 - ~/.volta/tools/image/node/14.13.1/6.14.8/bin/npm
  Browsers:
    Chrome: 86.0.4240.80
    Edge: 86.0.622.48
    Firefox: 82.0
    Safari: 14.0
  npmPackages:
    @storybook/addon-actions: ^6.0.26 => 6.0.26
    @storybook/addon-essentials: ^6.0.26 => 6.0.26
    @storybook/addon-links: ^6.0.26 => 6.0.26
    @storybook/node-logger: ^6.0.26 => 6.0.26
    @storybook/preset-create-react-app: ^3.1.4 => 3.1.4
    @storybook/react: ^6.0.26 => 6.0.26
Repository: vscode
Issue: Use safer test for Location in argument processor
Labels: api,under-discussion

In https://github.com/microsoft/vscode/pull/109049, we tried to pass an argument to a command that has properties named `uri` and `range`, and got caught by this line: https://github.com/microsoft/vscode/blob/8c91bd827848f1710d055c39d80d04c59bb55463/src/vs/workbench/api/common/extHostCommands.ts#L69 trying to convert it to a location and deleting all other properties. Is there any way to make this check safer, like can it fail if there are other properties besides the expected ones?
Repository: rust
Issue: Unclear lifetime error instead of "cannot move out of mutable reference"
Labels: C-enhancement,A-diagnostics,A-borrow-checker,T-compiler

This code:

```rust
struct S<'a, T>(&'a mut T);

impl<'a, T> S<'a, T> {
    fn get(&mut self) -> &'a mut T {
        self.0
    }
}
```

Gives this error:

```
error[E0312]: lifetime of reference outlives lifetime of borrowed content...
 --> src/lib.rs:5:9
  |
5 |         self.0
  |         ^^^^^^
  |
note: ...the reference is valid for the lifetime `'a` as defined on the impl at 3:6...
 --> src/lib.rs:3:6
  |
3 | impl<'a, T> S<'a, T> {
  |      ^^
note: ...but the borrowed content is only valid for the anonymous lifetime #1 defined on the method body at 4:5
 --> src/lib.rs:4:5
  |
4 |     fn get(&mut self) -> &'a mut T {
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```

The actual problem is that this code would create aliasing mutable references. It could be rewritten to something like this, which compiles fine, without any lifetimes apparently changing:

```rust
struct S<'a, T>(Option<&'a mut T>);

impl<'a, T> S<'a, T> {
    fn get(&mut self) -> &'a mut T {
        self.0.take().unwrap()
    }
}
```

If the type is anything other than `&mut T`, e.g.:

```rust
struct Wrapper<'a, T>(&'a mut T);

struct S<'a, T>(Wrapper<'a, T>);

impl<'a, T> S<'a, T> {
    fn get(&mut self) -> Wrapper<'a, T> {
        self.0
    }
}
```

The error makes the actual problem apparent:

```
error[E0507]: cannot move out of `self.0` which is behind a mutable reference
 --> src/lib.rs:7:9
  |
7 |         self.0
  |         ^^^^^^ move occurs because `self.0` has type `Wrapper<'_, T>`, which does not implement the `Copy` trait
```

I think the compiler tries to solve the moving problem by implicitly reborrowing `self.0`, creating a new borrow whose lifetime is restricted to that of `self`, causing a lifetime error that isn't clear about why that restriction happened.
Repository: ant-design
Issue: Title Location API property for the Statistic component
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.

### What problem does this feature solve?
There is a use case where the layout of the statistic component requires the title to appear below the value instead of above the value. Having this capability as part of the API will provide more flexibility when defining layouts.

### What does the proposed API look like?

Add a function to handle property value checking:
```
// Check if the titlePosition property is valid or set default
function checkTitlePosition(str: any) {
	if (typeof str !== 'string') {
		return 'above';
	} else if (str === 'above' || str === 'below') {
		return str;
	} else {
		return 'above';
	}
}
```

Adding a new property to the Statistic.tsx file:
```
const {
    prefixCls,
    className,
    style,
    valueStyle,
    value = 0,
    title,
    titlePosition = 'above', // New property to handle title position
    valueRender,
    prefix,
    suffix,
    direction,
    onMouseEnter,
    onMouseLeave,
  } = props;
```
Run titlePosition through check and update the returned value in the Statistics.tsx file to accept the titlePosition property to adjust the position of title:
```
const titlePos = checkTitlePosition(titlePosition);
  
  return (
    <div className={cls} style={style} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}>
      {titlePos === 'above' ? title && <div className={`${prefixCls}-title`}>{title}</div>: ''}
      <div style={valueStyle} className={`${prefixCls}-content`}>
        {prefix && <span className={`${prefixCls}-content-prefix`}>{prefix}</span>}
        {valueRender ? valueRender(valueNode) : valueNode}
        {suffix && <span className={`${prefixCls}-content-suffix`}>{suffix}</span>}
      </div>
      {titlePos === 'below'? title && <div className={`${prefixCls}-title`}>{title}</div>: ''}
    </div>
  );
```

Add the titlePosition to the component where required (accepts: "above" (default) and "below"):
```
<Statistic title="Account Balance"  titlePosition="below" prefix="$" value={112893123} precision={2} />
```

Update documentation for Statistic component:
| Property  | Description | Type | Default|
| ------------- | ------------- | ------------- | ------------- |
| titlePosition  | Change the position of the title | string value accepts `above` or `below` | `above` 

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: flutter
Issue: Update isolate callbacks in settings to accept an additional DartIsolate parameter.
Labels: engine,P2,team-engine,triaged-engine

Now that isolate initialization has been reworked to only return a fully running isolate, running test assertions on the isolate that verify various phases of the isolate prior to launch is harder since the caller doesn't have a handle to the isolate on which to run assertions. Pass a const reference to the isolate as a callback parameter instead.
Repository: tensorflow
Issue: tensor.numpy() from GPU model prediction very slow
Labels: stat:awaiting tensorflower,comp:gpu,type:performance,TF 2.3,TF 2.7

**System information**
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): yes
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux (Colab)
- TensorFlow installed from (source or binary): Binary
- TensorFlow version (use command below): 2.3.0
- Python version: 3.6.9
- CUDA/cuDNN version: Colab
- GPU model and memory: Colab has k80 I think

**Describe the current behavior**
I'm running inference with batch_size=1, calling a `tf.keras.Model` model, and when trying to convert the predictions to numpy array (moving the tensor from GPU to CPU), the inference time drops significantly. In the example given, I am just running a CNN with 10 conv2d layers. When running `.numpy()`, the inference time increases more than 2x. In the case mentioned the prediction has the same shape as the input, a tensor of shape (1,512,512,3).

**Describe the expected behavior**
One would expect that copying just an image from the GPU won't take that much. Running the same network with `pytorch` confirms that moving the tensor to the CPU can be done way faster.

**Standalone code to reproduce the issue**
```python
import tensorflow as tf
import time
def get_model(depth):
  model = tf.keras.Sequential(
      [
       tf.keras.layers.Conv2D(64,3,padding="same",input_shape=(512,512,3), name="input")]+[
       tf.keras.layers.Conv2D(64,3,padding="same") if i < depth -1 else tf.keras.layers.Conv2D(64,3,padding="same", name="output")
       for i in range(depth)
       ],
  )
  return model

model = get_model(10)
model_fn = tf.function(model)
image = tf.random.normal((1, 512,512,3))
# warm up
for i in range(50):
    model_fn(image)
iters = 100
images = [tf.random.normal((1, 512,512,3)) for i in range(iters)]

init = time.time()
for image in images:
    x = model_fn(image)
end = time.time() - init
print(f"FPS {1/(end/iters)}") # FPS 28.559242310262988
print(f"Time {end/iters}") # Time 0.03501493453979492

init = time.time()
for image in images:
    x = model_fn(image).numpy()
end = time.time() - init
print(f"FPS {1/(end/iters)}") # FPS 13.259242909743344
print(f"Time {end/iters}") # Time 0.07541908740997315
```
The colab is also here https://colab.research.google.com/gist/charlielito/c8a301da67b5bf1cf68a4da4afc24d8e/tf-numpy-issue.ipynb
Repository: PowerToys
Issue: [Run] Improve Win32 icon loading
Labels: Issue-Bug,Product-PowerToys Run,Area-Quality

`IShellItem` class is used to get win32 icons and it is slow. Image cache was introduced to fix this issue, which stores icons after the first query of a win32 app. However, this still suffers from lag on the first query of a win32 app.

Issue #7271 could possibly happen because of this lag.   

EDIT: also see #4706 and #10369
Repository: rust
Issue: Add automated tool to ensure new feature gates are documented
Labels: T-compiler,T-bootstrap,A-docs,C-feature-request,A-meta

This would be part of a larger effort to automate documentation updates. The
issue is that updates to the compiler may require updates to documentation, but
it's not as simple as just updating a doc comment; you may need to:

- Update the rustc-dev-guide
- Update the unstable book
- Update the reference
- etc.

The goal for this first issue is to just add a check that would be run in CI to
ensure all feature gates have documentation in the unstable book. Quoting from
@jyn514 on Zulip:

> I think we should nibble at this a little at a time instead of trying to get a fully general solution, because the fully-general solution isn't possible without you specifying the dependencies yourself and I really hate that in build systems

See the relevant discussion [here](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/tool.20to.20keep.20docs.20up.20to.20date) on Zulip.
Repository: youtube-dl
Issue: Option to download audio before video
Labels: request

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2020.09.20. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Search the bugtracker for similar feature requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a feature request
- [x] I've verified that I'm running youtube-dl version **2020.09.20**
- [x] I've searched the bugtracker for similar feature requests including closed ones
  - Relevant issue found #24898 (question, not a request)

## Description

<!--
Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible.
-->

I believe issue #24898 is asking if it is currently possible, not if it is theoretically possible.

When running a download the video part is always downloaded before the audio part and then merged.
```
[youtube] VIDEO_ID: Downloading webpage
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[download] Destination: VIDEO.mp4
[download] 100% of SIZE in TIME
[download] Destination: AUDIO.webm
[download] 100% of SIZE in TIME
[ffmpeg] Merging formats into "FINAL.mkv"
```
I am requesting the option to download the audio before the video.
```
[youtube] VIDEO_ID: Downloading webpage
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[download] Destination: AUDIO.webm
[download] 100% of SIZE in TIME
[download] Destination: VIDEO.mp4
[download] 100% of SIZE in TIME
[ffmpeg] Merging formats into "FINAL.mkv"
```

The use case that I have in mind is downloading livestreams (specifically karaoke) after they have ended but before they are privated (usually for avoiding a copyright strike) where the audio is more important than the video but both are desired. 
There is often only time to run one youtube-dl command in this small time-frame, so this would be very useful.
Repository: ant-design
Issue: Even if I passed a type to useform, form.validateFields Always return Store type
Labels: Inactive

- [ ] 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
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/strange-lalande-vjk9j?file=/src/App.tsx)

### Steps to reproduce
Even if I passed a type to useform, form.validateFields Always return Store type

### What is expected?
const [form] = useForm<IForm>()
form.validateFields.then(res => {
  const values = res; // values is IForm
})

### What is actually happening?
Type is Store

| Environment | Info |
|---|---|
| antd | 4.7.1 |
| React | 16.13.1 |
| System | mac os Catalina 10.15.7 |
| Browser | IE Edge 86.0.622.48 |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: godot
Issue: 2d/use_pixel_snap breaks Sprite position when scaling a 1x1 sprite
Labels: bug,topic:rendering

<!-- 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.3 stable

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->
Windows 10, GLES2, AMD Radeon HD7850

**Issue description:**
Import a white 1x1 sprite
Apply scale (128, 128)
Position it at (200, 200)
Add a RectangularShape2D over the sprite (Extents = (64, 64))
Debug / Visible Collision Shapes = true
2d/use_pixel_snap = false
![capture_001_22102020_125110](https://user-images.githubusercontent.com/3406652/96826131-4f52a200-1465-11eb-93ae-fb94bbaae807.jpg)

2d/use_pixel_snap = true
![capture_001_22102020_125438](https://user-images.githubusercontent.com/3406652/96826349-c38d4580-1465-11eb-97fc-1683e0be5d21.jpg)

There is no issue if I import a white 2x2 sprite and scale it to (64, 64)


**Minimal reproduction project:**
[TestPixelSnap.zip](https://github.com/godotengine/godot/files/5420140/TestPixelSnap.zip)

<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
Repository: youtube-dl
Issue: Request support for site https://tlc.de/sendungen/
Labels: site-support-request


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2020.09.20. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [ x] I'm reporting a new site support request
- [x ] I've verified that I'm running youtube-dl version **2020.09.20**
- [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
- Single video: https://tlc.de/sendungen/der-fall-jeffrey-epstein/
Repository: flutter
Issue: flutter driver add a interface to mock listview fling action
Labels: a: tests,framework,t: flutter driver,c: proposal,P3,team-framework,triaged-framework

I want to mock the listview fling action just like a person quickly scroll the listview. And i want to do it by test_driver to watch the fling effectiveness。
Repository: opencv
Issue: Building x86_64h architecture fails (Mac)
Labels: question (invalid tracker),priority: low,category: build/install,platform: ios/osx

##### System information (version)

- OpenCV => 4.5
- Operating System / Platform => macOS 10.15.7
- Compiler => Xcode 12

##### Detailed description

I can successfully build OpenCV framework for x86_64 using the provided script (platforms/osx dir). When requesting the x86_64h architecture, the CMake tests fail early and the framework is not built.

##### Steps to reproduce

- Install Xcode 12.x & make it the default.
- Invoke the build script with the following command:
```
mkdir opencv_build; cd opencv_build
../opencv-4.5.0/platforms/osx/build_framework.py --opencv ../opencv-4.5.0 --archs x86_64h .
```

This check fails early on:
```
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - broken
```

With the following message:
```
No architectures to compile for (ARCHS=x86_64h, VALID_ARCHS=arm64 arm64e i386 x86_64, EXCLUDED_ARCHS=(
        arm64,
        arm64e
    )).
```

From my investigation, the default value of VALID_ARCHS (Xcode/xcodebuild build setting) does not contain the x86_64h architecture, which in turn prevents the compilation from succeeding. The VALID_ARCHS setting can be provided by user, and must be provided in the case of x86_64h, as xcodebuild will only build the intersection of the ARCHS and VALID_ARCHS architectures.