sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: iOS libtorch superpoint model bug
Labels: module: macos,oncall: mobile,module: ios,shadow review

c++ mac libtorch SuperPoint model forward is success,  c++ ios libtorch SuperPoint model forward is loss.

forward image size 640x480, ios  print  coordinates.total() is zero, is loss, mac print coordinates.total() not zero, is success.

libtorch info:

cpu mode
version 1.4.0

code:
 
 ```
 auto qengines = at::globalContext().supportedQEngines();
  if (std::find(qengines.begin(), qengines.end(), at::QEngine::QNNPACK) != qengines.end()) {
    at::globalContext().setQEngine(at::QEngine::QNNPACK);
  }
  module = std::make_shared<torch::jit::script::Module>(torch::jit::load(modelPath));
  module->eval();

   cv::cvtColor(img, img, CV_BGR2GRAY);

     std::vector<torch::jit::IValue> input;
     torch::Tensor x = torch::from_blob(img.data, {1, 1, img.rows, img.cols}, at::kByte).toType(at::kFloat) / 255;
     torch::autograd::AutoGradMode guard(false);
     at::AutoNonVariableTypeMode non_var_type_mode(true);

     input.push_back(x);
    
    // inference
      auto outputs = module->forward(input).toTuple();
      torch::Tensor semi = outputs->elements()[0].toTensor();
      torch::Tensor coarse_desc = outputs->elements()[1].toTensor();

      //    std::cout << semi << std::endl;
      const int CELL = 8;
      // Deal with feature points locations
      semi = semi.squeeze();
      torch::Tensor dense = semi.exp();
      dense = dense / (dense.sum(0) + 0.00001);
      torch::Tensor nodust = dense.slice(0, 0, dense.size(0) - 1);
      int Hc = img.rows / CELL;
      int Wc = img.cols / CELL;
      nodust = nodust.transpose(0, 1).transpose(1, 2);
      torch::Tensor heatmap = nodust.reshape({Hc, Wc, CELL, CELL});
      heatmap = heatmap.transpose(1, 2);
      heatmap = heatmap.reshape({Hc * CELL, Wc * CELL});
      torch::Tensor heatmap_cpu = heatmap.to(torch::kCPU, /*non_blocking=*/true);

      // Eigen::Map<Eigen::MatrixXf> eig_heatmap(heatmap_cpu.data<float>(),
      //                                         heatmap.size(0), heatmap.size(1));
      cv::Mat mat_heatmap(heatmap_cpu.size(0), heatmap_cpu.size(1), CV_32F,
                        heatmap_cpu.data<float>());

     /**
     *  Filtered to binary mat first and than get non zero value coordinates
     *  cv::threshold(src, dst, threshold, max_binary_value, threshold_type)
     *  threshold_type: 0, Binary
     *                  1, Binary Inverted
     *                  2, Threshold Truncated
     *                  3, Threshold to Zero
     *                  4, Threshold to Zero Inverted
     */
    cv::Mat bin_mat;
    cv::threshold(mat_heatmap, bin_mat, 0.015, 1, 0);
    bin_mat.convertTo(bin_mat, CV_8UC1);
    cv::Mat coordinates;
    cv::findNonZero(bin_mat, coordinates);

    printf("size: %d\n",coordinates.total());
```

**model download:**
[super_point_scripted_model.pt.zip](https://github.com/pytorch/pytorch/files/4197136/super_point_scripted_model.pt.zip)

about SuperPoint: https://github.com/MagicLeapResearch/SuperPointPretrainedNetwork


cc @ezyang
Repository: PowerToys
Issue: "App Starter" PowerToy (with Virtual Desktop support)
Labels: Idea-New PowerToy,Product-Virtual Desktop

### tl;dr: "App Starter" PowerToy

Please implement a PowerToy which **automatically starts a list of user defined Apps** on "User Click" or "Windows 10 Startup" ( ...with the possibility to move the apps automatically to Virtual Desktops including predefined window positions.) *See the end of this post for main features and optional ones.*

### l;prn: (long; please read nevertheless) ;)

People who work professional with Windows 10 often use and rely on many applications nowadays. (Browser, Mail-Clients, Programming IDEs, GitHub Client, various Messengers, Password-Manager, SFTP-Clients, aso.) 

After a new start of Windows 10, they have to start them one-by-one by hand. At the moment, there is no convenient and simple way to start all needed apps automatically. (Win32/UWP/BAT) That's time consuming. 

Also at the moment, there is no way to move the apps automatically to predefined virtual desktops. Virtual Desktop support is unbelievable handy for people working on Laptops.

**Feature request:** Build a tool to manage the auto start of predefined scripts + virtual desktop support.

![autostart-apps_power-toy](https://user-images.githubusercontent.com/827658/74411046-b92c9d80-4e3a-11ea-9030-3164442704a1.jpg)

### Current workaround (without Virtual Desktop support) - See screenshot.

At the moment you can build a bat-file. (Limitation: No Virtual Desktop support, Hard to get correct ID for UWP apps.)

**For simple Win32 Apps, users can** easily build a small bat script file containing something like the below. This will start all Apps included in the bat file with one click.

```
ECHO - Starting... PHPStorm (PHP IDE)
cd "C:\Program Files\JetBrains\PhpStorm 2019.1\bin\"
explorer.exe phpstorm64.exe
```

**Unfortunately this doesn't work with UWP Apps.** The bat entry should look like below. Simple, but its not so easy to find the correct PackageFamilyName and Executable ID from the AppxManifest. 

```
ECHO - Starting... OneNote (Note taking)
explorer.exe shell:appsFolder\Microsoft.Office.OneNote_8wekyb3d8bbwe!microsoft.onenoteim

```
### Main features of the "App Starter" PowerToy:

- App-selector (Win32/UWP/BAT), which adds an app to the list of apps to start.
- How to execute the "App Starter" PowerToy list? "On click" or on "Windows 10 start".
- Optional "Start selected App on Virtual Desktop X and Position Y". 

### Optional/Additional nice-to-have features for a "App Starter" PowerToy:

- App-Starter profiles (Working / Gaming / ... )
- "Comment field" to add some description for the app / bat / command. (See screenshot)
- Allow to add inline command line commands within the app-selector field (...or extra field, if "command" option is selected)
- Auto-Startup "countdown" popup on Windows 10 startup: `The "App Starter" PowerToy "Working" will be started in 3 seconds. [Start now | Manage | Cancel]`  ("Manage" opens Power Toys GUI)
Repository: rust
Issue: Unhelpful suggestion for "cannot infer type" error
Labels: C-enhancement,A-diagnostics,T-compiler,A-suggestion-diagnostics

<!--
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.
-->

I tried this code:

```rust
fn main() {
    let map: HashMap<i32, i32, _> = HashMap::from_iter(vec![(1, 1), (2, 2)].into_iter());
}
```

I expected to see this happen: 

when run `cargo check`, it should says

```
  --> src/main.rs:30:14
   |
30 |     let map: HashMap<i32, i32, _> = HashMap::from_iter(vec![(1, 1), (2, 2)].into_iter());
   |         ---  ^^^^^^^^^^^^^^^^^^^^ cannot infer type
   |         |
   |         consider change `HashMap<i32, i32, _>` to `HashMap<i32, i32>` because it has a default type, or specify a detail type.
```

Instead, this happened:

```
  --> src/main.rs:30:14
   |
30 |     let map: HashMap<i32, i32, _> = HashMap::from_iter(vec![(1, 1), (2, 2)].into_iter());
   |         ---  ^^^^^^^^^^^^^^^^^^^^ cannot infer type
   |         |
   |         consider giving `map` the explicit type `std::collections::HashMap<i32, i32, _>`, with the type parameters specified
```

### 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`:
```
ustc 1.43.0-nightly (a1912f2e8 2020-02-12)
binary: rustc
commit-hash: a1912f2e89b77cfe2a0e64b96f444848fe4e2d49
commit-date: 2020-02-12
host: x86_64-unknown-linux-gnu
release: 1.43.0-nightly
LLVM version: 9.0
```
Repository: TypeScript
Issue: JSDoc @this/@lends/@namespace tags are ignored inside Object
Labels: Bug,Domain: JSDoc

<b>MyElement.d.ts</b>
```ts
declare class MyElement {
    constructor(target: Element);
    target: Element
}
```

<b>MyElement.js</b>

`@this` on globally defined function works as expected, Ctrl+Space shows the correct type of target - Element!
![image](https://user-images.githubusercontent.com/6419937/74323355-71ecd100-4d96-11ea-93d8-64a79434a1de.png)

`@this` before function in the object doesn't take into account!
![image](https://user-images.githubusercontent.com/6419937/74324433-158ab100-4d98-11ea-94dc-6ab4923ed95d.png)

`@lends` before the object itself is also not taken into account!
![image](https://user-images.githubusercontent.com/6419937/74324780-9ba6f780-4d98-11ea-9eba-5e1f84950fff.png)

the same with `@namespace`
![image](https://user-images.githubusercontent.com/6419937/74324680-70240d00-4d98-11ea-96b3-df002531d414.png)

I couldn't find the way to point the correct "this" type for function in objects.

VS Code version: Code 1.42.0 (ae08d5460b5a45169385ff3fd44208f431992451, 2020-02-06T10:51:33.119Z)
OS version: Darwin x64 19.3.0

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (16 x 3600)|
|GPU Status|2d_canvas: enabled<br>flash_3d: enabled<br>flash_stage3d: enabled<br>flash_stage3d_baseline: enabled<br>gpu_compositing: enabled<br>metal: disabled_off<br>multiple_raster_threads: enabled_on<br>oop_rasterization: disabled_off<br>protected_video_decode: unavailable_off<br>rasterization: enabled<br>skia_renderer: disabled_off<br>surface_control: disabled_off<br>surface_synchronization: enabled_on<br>video_decode: enabled<br>viz_display_compositor: enabled_on<br>viz_hit_test_surface_layer: disabled_off<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|1, 1, 1|
|Memory (System)|32.00GB (7.02GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|
</details>Extensions: none
<!-- generated by issue reporter -->
Repository: go
Issue: x/sys/unix: If mips64le termios Ispeed and Ospeed can work
Labels: NeedsDecision

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->
In mips64le , The Termios struct doesn't has member Ospeed or Ispeed
struct termios
  {
    tcflag_t c_iflag;           /* input mode flags */
    tcflag_t c_oflag;           /* output mode flags */
    tcflag_t c_cflag;           /* control mode flags */
    tcflag_t c_lflag;           /* local mode flags */
    cc_t c_line;                /* line discipline */
    cc_t c_cc[NCCS];            /* control characters */
  };

In golang/sys/unix/ztypes_linux_mips64le.go, I found this define
Termios struct {
	Iflag  uint32
	Oflag  uint32
	Cflag  uint32
	Lflag  uint32
	Line   uint8
	Cc     [23]uint8
	Ispeed uint32
	Ospeed uint32
}
Will the member Ispped and Ospeed  can work ?
### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.13.3 linux/mips64le

</pre>

### Does this issue reproduce with the latest release?
I think so


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="mips64le"
GOBIN=""
GOCACHE="/home/jlzhang/.cache/go-build"
GOENV="/home/jlzhang/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="mips64le"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/jlzhang/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/lib/golang"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_mips64le"
GCCGO="gccgo"
GOMIPS64="hardfloat"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="0"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -mabi=64 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build438676280=/tmp/go-build -gno-record-gcc-switches"

</pre></details>

### What did you do?
I use termios ,but can not work. I found the diffrent between syscall and unix
<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->

no

### What did you expect to see?
no

### What did you see instead?
no
Repository: TypeScript
Issue: Type not narrowed by === when equivalent type guard works
Labels: Bug,Rescheduled

**TypeScript Version:**  3.7.5, also tested on 3.9.0-dev.20200212

**Search Terms:** equals, type guard, type parameter, narrowing

**Code**

```ts
type AorB = 'a' | 'b';

function isA(t: AorB): t is 'a' {
  return t === 'a';
}

function test<T extends AorB>(arg: T) {
  if (isA(arg)) {
    let a1: T & 'a' = arg; // ok
  }
  if (arg === 'a') {
    let a2: T & 'a' = arg; // error
  }
}
```

**Expected behavior:** The condition `arg === 'a'` should narrow the type of `arg` to `T & 'a'` in the second `if` block, in the same way as the equivalent type guard function does.

**Actual behavior:** The type of `arg` is not narrowed in the second `if` block.

**Playground Link:** [Playground Link](http://www.typescriptlang.org/play/?ts=3.9.0-dev.20200212&ssl=15&ssc=1&pln=7&pc=1#code/C4TwDgpgBAgg9gJwEJQLxQOQEMNQD6YBGGA3AFBkBmArgHYDGwAlnLVEwM4wAUwAXLERIAlAODsOmHFADeZKFAQRg1BG3GpNU0mQC+FGg2asowCB2AAeACpQIADzO0AJpPjIAfNywIA5gOthWXl2SihuTh4fX2EguQUFABtlKCwARgCoADJtNFS-EigAeiKoOABrEP0FJjDvPzQtbAw4kKSUrAAmTJzmvOjCkrsEBEQqvTIgA)

**Related Issues:** N/A
Repository: angular
Issue: Hierarchical injectors @Host() decorator explanation incomplete
Labels: help wanted,freq1: low,area: core,core: di,P4,bug,area: docs

# 📚 Docs or angular.io bug report

### Description

The description of the @Host() decorator is the same as the description of the @Self() decorator.

Because the FlowerService is provided in the component itself, the @Host() decorator has no purpose in the example, without @SkipSelf() the FlowerService will always come from the provider declared on the HostComponent.

It also fails to explain the difference between @Self() and @Host() because the example given for @Host() has the component as its own host,

This is expanded upon much further down the page, but is also explained far better in https://angular.io/guide/dependency-injection-in-action#make-a-dependency-optional-and-limit-search-with-host

The description of @Self() also confusingly says "@Self() tells the injector to stop searching in the current host element.".


### What's the affected URL?
https://angular.io/guide/hierarchical-dependency-injection#host
Repository: material-ui
Issue: Accessibility [Menu]: Screen readers initially not announcing first menuItem in a menu 
Labels: accessibility,component: menu

- [ X ] The issue is present in the latest release.
- [ X ] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Current Behavior 😯

When the user opens a menu, the screen reader does not announce the focussed/first item within the menu.

## Expected Behavior 🤔

Once a user opens a menu, the first menuItem that is focussed should be announced by the screen reader.

## Steps to Reproduce 🕹

https://codesandbox.io/s/mui-icon-button-menu-gomtg

Steps:

With the relevant screen readers enabled: 
1. Tab to the Icon Button
2. Press Space or Enter to Open the menu
3. Once opened, notice that the first item in the list does not get announced by the relevant screen readers

## Context 🔦
It would be great if the relevant screen readers could announce the text of the first menu item once the menu is opened.

## Your Environment 🌎

| Tech        | Version |
| ----------- | ------- |
| OS | windows 8, 10  |
| Material-UI | v4.7.0  |
| React       | v16.12.0 |
| Browser     | Chrome         |
| Screenreader  |    Jaws, ChromeVox     |
Repository: material-ui
Issue: [Menu] iOS Voiceover focus trapped after selecting a menuItem
Labels: accessibility,component: menu

- [ X ] The issue is present in the latest release.
- [ X ] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Current Behavior 😯

With voiceover enabled on iOS, when the user opens a menu and selects an option, the menu closes as expected however the focus gets trapped on the selected menu item even though the menu has closed.

## Expected Behavior 🤔

Once a user opens and selects a menuItem, the menu should close and focus should go back to the Menu Button

## Steps to Reproduce 🕹

https://codesandbox.io/s/mui-icon-button-menu-gomtg

Steps:

With voiceover enabled on iOS: 
1. Navigate to Icon Menu Button
2. Double-tap to open the menu
3. Swipe to Select an option from the menu
3. Notice that the menu closes and the focus gets stuck on the selected menu item even though the menu is closed

## Context 🔦
It would be great if the focus would shift back to the Menu button.

## Your Environment 🌎

| Tech        | Version |
| ----------- | ------- |
| OS | iOs 13.1.2 |
| Material-UI | v4.7.0  |
| React       | v16.12.0 |
| Browser     | Safari         |
| Screenreader  |    VoiceOver     |
Repository: rust
Issue: better warning when passing format string and variable in wrong order to format/println
Labels: C-enhancement,A-diagnostics,T-compiler,A-suggestion-diagnostics

I accidentally came up with something like this
````rust
fn main() {
    let greeting = "hello world";

    println!(greeting, "{}");
}
````
rustc suggested
````
error: format argument must be a string literal
 --> src/main.rs:4:14
  |
4 |     println!(greeting, "{}");
  |              ^^^^^^^^
  |
help: you might be missing a string literal to format with
  |
4 |     println!("{} {}", greeting, "{}");
  |              ^^^^^^^^

````

but it would be better to suggested swapping the order of `greeting` and `"{}"` in the case that the format-string is valid.

```
help: did you intend to swap the variable and format-string?
 |
4|   println!("{}", greeting);
 | 
````
Repository: scrcpy
Issue: addressing devices using transport id instead of serial
Labels: feature request

Greetings, is there any existing way implemented to address several devices connected via USB with their transport id instead of serial? 
In my development of a custom AOSP ROM i have an issue with distinct devices having the same serial when adb lists them (but different transport id). 

ADB allows addressing devices with `-t transport_id` and it works fine for most adb commands except scrcpy which always errors with "more than one device" because i cannot specify -t in it's internal adb call. 

Using `scrcpy -s serial` is not an option because it consistently chooses the first of the two (or more) devices because they all have the same serial.

example:
```
adb devices -l
serial1111                      device usb:3-3 product:msm8953_64 model:msm8953_for_arm64 device:msm8953_64 transport_id:1
serial1111                      device usb:3-4 product:msm8953_64 model:msm8953_for_arm64 device:msm8953_64 transport_id:2
```

Right now i can work around around the issue by making a wrapper script that calls the real adb with `adb -t my_transport_id` internally (and by placing it first in PATH scrcpy will use it as if it was the adb binary) but it might be useful if it's not complicated to implement addressing by transport id directly within scrcpy.
Repository: TypeScript
Issue: Package dependencies and The inferred type of ... cannot be named without a reference to ...
Labels: Needs Investigation

Hello, as a POC, I created a repository dedicated to this issue, to show how it is happening!
Repository: https://github.com/nogueira7egend/ts-symlink-error/

Please check it and follow the instructions that are on README!
Best regards

**TypeScript Version:**  3.7.5

**Actual behavior:**
<img width="1639" alt="Captura de ecrã 2020-02-04, às 17 45 45" src="https://user-images.githubusercontent.com/20382354/74453034-c452ee00-4e79-11ea-852d-3fbdf61dae39.png">

**Playground Link:** https://github.com/nogueira7egend/ts-symlink-error/

**Related Issues:** #29808
Repository: create-react-app
Issue: Using url in SCSS mixin in another file doesn't import files correctly
Labels: issue: bug report

Reopened from #7777, which was closed because the fix was supposedly released in 3.3.1, but it is still broken.

### Describe the bug

Using an SCSS mixin (located in another file) that uses the url function makes the file unable to be found. Example:

```scss
// src/scss/mixins.scss

@mixin next-gen-image ($file-name, $fallback-ext) {
  .webp-supported & {
    background-image: url('#{$file-name}.webp');
  }

  .webp-not-supported & {
    background-image: url('#{$file-name}.#{$fallback-ext}');
  }
}
```

```scss
// src/jsx/routes/Home.scss
@import './../../scss/mixins';

.my-class {
  @include next-gen-image('some-image', 'jpg');
}
```

This should try to lookup `src/jsx/routes/some-image.webp` and `src/jsx/routes/some-image.jpg` but it instead tries to look for `src/scss/some-image.webp` and `src/scss/some-image.jpg` respectively.

This was working prior to 3.1.x.

### Did you try recovering your dependencies?
yes

node version: v10.16.3
npm version: 6.13.7

### Which terms did you search for in User Guide?
- scss
- sass

nothing regarding this issue came up

### Environment
```
➜  create-react-app-issue-7598 git:(master) ✗ npx create-react-app --info
npx: installed 99 in 6.073s

Environment Info:

  current version of create-react-app: 3.3.1
  running from /Users/dak/.npm/_npx/67157/lib/node_modules/create-react-app

  System:
    OS: macOS High Sierra 10.13.4
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
  Binaries:
    Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
    Yarn: 1.15.2 - /usr/local/bin/yarn
    npm: 6.13.7 - ~/.nvm/versions/node/v10.16.3/bin/npm
  Browsers:
    Chrome: 80.0.3987.100
    Firefox: 72.0.2
    Safari: 11.1
  npmPackages:
    react: 16.12.0 => 16.12.0
    react-dom: 16.12.0 => 16.12.0
    react-scripts: 3.3.1 => 3.3.1
  npmGlobalPackages:
    create-react-app: Not Found
```

### Steps to reproduce

See: https://github.com/Dakkers/create-react-app-issue-7598

### Expected behavior

See: https://github.com/Dakkers/create-react-app-issue-7598

### Actual behavior

See: https://github.com/Dakkers/create-react-app-issue-7598

### Reproducible demo

https://github.com/Dakkers/create-react-app-issue-7598
Repository: vscode
Issue: Allow ThemeIcon in WebviewPanel.iconPath
Labels: help wanted,feature-request,api,webview,icons-product

Issue Type: <b>Feature Request</b>

You can only pass an Uri or an object containing Uris to WebviewPanel.iconPath, while iconPath on QuickInputButton and TreeItem also supports ThemeIcon. This would increase codicon reusability.

VS Code version: Code 1.42.0 (ae08d5460b5a45169385ff3fd44208f431992451, 2020-02-06T10:51:34.058Z)
OS version: Windows_NT x64 10.0.18362


<!-- generated by issue reporter -->