sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Cannot coerce dyn AsRef
Labels: A-diagnostics,T-lang,T-compiler,C-bug,A-coercions

Really weird example:

```rust
use std::path::Path;
fn main() {
    let boxed_path: Box<Path> = Path::new("test").to_path_buf().into_boxed_path();
    let as_ref_works: &Path = boxed_path.as_ref();
    //let lots_of_question_marks: Box<dyn AsRef<Path>> = boxed_path;
}
```

Uncommenting the last line gives:

```
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
 --> src/main.rs:5:56
  |
5 |     let lots_of_question_marks: Box<dyn AsRef<Path>> = boxed_path;
  |                                                        ^^^^^^^^^^ borrow the `Path` instead
  |
  = help: within `std::path::Path`, the trait `std::marker::Sized` is not implemented for `[u8]`
  = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
  = note: required because it appears within the type `std::path::Path`
  = note: required for the cast to the object type `dyn std::convert::AsRef<std::path::Path>`

error: aborting due to previous error
```

I genuinely don't know what's going on here, but this seems to be a bug in both coercion *and* diagnostics.

This is on the latest nightly.
Repository: opencv
Issue: Crash in Faster-RCNN Object Detection
Labels: bug,category: dnn

Hello all,

I've been struggling with this for a while and i decided to share my issue here
I am trying to run custom object detection and i have the following system 

System information (version)
TensorFlow => 1.13
Opencv => 4.1.0
Openvino 2019 R1
OS: Raspbian

##### Detailed description

I have trained a custom inference graph using the  the following Faster R-CNN model: http://download.tensorflow.org/models/object_detection/faster_rcnn_resnet50_coco_2018_01_28.tar.gz

with the dnn module

`
net = cv2.dnn.readNetFromTensorflow('frozen_inference_graph.pb','frozen_inference_graph.pbtxt')
`
i get the error
`
terminate called after throwing an instance of 'InferenceEngine::details::InferenceEngineException'
what():  ConfidenceThreshold parameter is wrong in layer detection_out. It should be > 0.
Aborted
`
I have tried running the intel model optimizer creating an xml and bin using readNet instead
`
net = cv2.dnn.readNet('frozen_inference_graph.xml','frozen_inference_graph.bin')
`
however that way i get a different type of error
`
detections = net.forward()
cv2.error: OpenCV(4.1.0-openvino) /home/jenkins/workspace/OpenCV/OpenVINO/build/opencv/modules/dnn/src/dnn.cpp:2299: error: (-215:Assertion failed) inp.total() in function 'allocateLayers'
`

Before posting i have checked two similar posts about this - 
https://answers.opencv.org/question/212026/netforward-crash-in-faster-rcnn-object-detection-sample/
and
https://github.com/opencv/opencv/issues/13751

from the first posts i can confirm that with 

`
net.setPreferableBackend(DNN_BACKEND_OPENCV);
`

but for some reason it is working very slow, i am using 

`
net.setPreferableTarget(cv2.dnn.DNN_TARGET_MYRIAD)
`
also i don't seem to have the mentioned nodes from the second post.

The source code, .pb, pbtxt, xml and bin file can be obtained from here - 
https://drive.google.com/drive/folders/11HQGpYzHlaMX4kXn6JSymcbFF41zk1vX

Appreciate any help !

Thank you for your time.
Repository: TypeScript
Issue: Conflicting definitions for Set constructor causes unexpected default generic in TS 3.5
Labels: Suggestion,In Discussion

**TypeScript Version:**  3.4.5 vs versions after 3.5

**Search Terms:** set constructor setconstructor unknown

**Code**

```ts
let s = new Set();
```

**Expected behavior:**

In TS 3.4: we expect the default chosen param to give us a `Set<{}>`.
In TS 3.5: we expect a `Set<unknown>`.
That change was an intended change in TS 3.5.

Or, if Set has a default generic arg, I expect the same default chosen in 3.4 and 3.5.

**Actual behavior:**

In TS 3.4, this actually was a `Set<any>`!

It appears there are multiple overloads of the Set constructor.

lib.es2015.collection.d.ts says:

```
    new <T = any>(values?: ReadonlyArray<T> | null): Set<T>;
```

while lib.es2105.iterable.d.ts says:

```
    new <T>(iterable?: Iterable<T> | null): Set<T>;
```

Note that one has `T = any` and the other doesn't.

So somehow TS 3.4 vs TS 3.5 decided to change whether to obey the `any` default, I think?
Repository: vue
Issue: Only last element is accessible using ref in template-based functional components inside v-for loops
Labels: improvement,has workaround

### Version
2.6.10

### Reproduction link
[https://codesandbox.io/s/vue-template-bqe44?fontsize=14](https://codesandbox.io/s/vue-template-bqe44?fontsize=14)







### Steps to reproduce
1. Create a functional component
2. Use that functional component inside a v-for
3. Add a ref binding to the functional component to be able to get the DOM element in parent component

### What is expected?
The ref in parent component is an array of DOM elements, like it is an array of vNodes when applying this steps to a non-functional component

### What is actually happening?
Only the last DOM element of the v-for is bound to the ref. It's also just an element and not an array

---
There's no warning about overriding previously existing ref

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: pytorch
Issue: Mysterious Tensor Indexing Problem
Labels: high priority,module: error checking,triaged,module: numpy,module: advanced indexing,module: ux

## 🐛 Bug

Indexing into a tensor with a 2d list of indices seems to fail sometimes, with a critical point when the number of indices is less than 32.

## To Reproduce

```python
import torch

def index_test(n):
    M = torch.tensor([0.]*n) # Trivial example for illustrative purposes
    idxes = [(a,) for a in range(n)]
    return M[idxes]

index_test(31) # Note that this fails
index_test(32) # But this works
```

`n=31` fails with:
```
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-169-222ec1878948> in <module>
      6     return M[idxes]
      7 
----> 8 index_test(31)

<ipython-input-169-222ec1878948> in index_test(n)
      4     M = torch.tensor([0.]*n) # Trivial example for illustrative purposes
      5     idxes = [(a,) for a in range(n)]
----> 6     return M[idxes]
      7 
      8 index_test(31)

IndexError: too many indices for tensor of dimension 1
```

## Expected behavior

I expected this indexing to work the same for any number of indices.  This is problematic in my actual code as the size of the data varies.

## Environment

PyTorch version: 1.1.0
Is debug build: No
CUDA used to build PyTorch: 10.0.130

OS: Ubuntu 16.04.6 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
CMake version: Could not collect

Python version: 3.6
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip3] numpy==1.16.4
[pip3] pytorch-pretrained-bert==0.6.2
[pip3] torch==1.1.0
[conda] Could not collect

## Additional context

<!-- Add any other context about the problem here. -->


cc @ezyang @gchanan @zou3519 @mruberry @rgommers @heitorschueroff
Repository: create-react-app
Issue: Error: spawn cmd.exe ENOENT using WSL since 9.0.0
Labels: issue: needs investigation

### Is this a bug report?

Yes

### Did you try recovering your dependencies?

Yes

### Which terms did you search for in User Guide?

cmd event.js ENOENT

### Environment

[Windows WSL]:
  System:
    OS: Linux 4.4 Ubuntu 18.04.1 LTS (Bionic Beaver)
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
  Binaries:
    Node: 8.11.4 - ~/.nvm/versions/node/v8.11.4/bin/node
    Yarn: 1.15.2 - ~/.yarn/bin/yarn
    npm: 5.6.0 - ~/.nvm/versions/node/v8.11.4/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: 64.0
  npmPackages:
    react:  16.8.6
    react-dom:  16.8.6
    react-scripts:  3.0.1
  npmGlobalPackages:
    create-react-app: Not Found

### Steps to Reproduce

0. react-dev-utils v 8.0.0
1. Upgrade to v.9.0.0
2. yarn install
3. yarn start
4. events.js:183
      throw er; // Unhandled 'error' event
      ^
  Error: spawn cmd.exe ENOENT

### Expected Behavior

app should start using v 9.0.0

### Actual Behavior

![image](https://user-images.githubusercontent.com/3416239/59826235-921adc00-933e-11e9-9076-4ee3cf66100b.png)

### Reproducible Demo

Simply run Ubuntu or other distro on Windows WSL, upgrade to 9.0.0, same is valid for any project I tried using v9.0.0.
Repository: vscode
Issue: [folding] Fold current level
Labels: feature-request,editor-folding

<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
As I want to view the method summary of class, I expect that I can fold all methods of class. I found these Fold Commands.

![fold commands](https://user-images.githubusercontent.com/5207331/54252925-c9753200-4572-11e9-94fb-1bfa880eaecb.png)

I can use `Fold Level X` command to meet my needs. But some times it's boring to count the level correctly. I found an extension having the feature meet my needs in issue #20217. But I still hope that having a build-in command such as `Fold Current Level`  that can fold the code at current level (according to the cursor)

![screen shot](https://user-images.githubusercontent.com/1400574/59828237-2439d900-936d-11e9-81bf-f0da2a24d9de.PNG)
Repository: flutter
Issue: Webview_flutter issue inside another scroll views
Labels: c: crash,framework,a: platform-views,has reproducible steps,P3,platform-views: vd,workaround available,a: plugins,team-framework,triaged-framework,found in release: 3.19,found in release: 3.21

when using webview_flutter widget inside another scroll view it will throw exception: 

```
══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter ( 4342): The following assertion was thrown during performResize():
I/flutter ( 4342): RenderAndroidView object was given an infinite size during layout.
I/flutter ( 4342): This probably means that it is a render object that tries to be as big as possible, but it was put
I/flutter ( 4342): inside another render object that allows its children to pick their own size.
I/flutter ( 4342): The nearest ancestor providing an unbounded height constraint is:
I/flutter ( 4342):   RenderIndexedSemantics#28d7e relayoutBoundary=up2 NEEDS-LAYOUT NEEDS-PAINT
I/flutter ( 4342):   creator: IndexedSemantics ← NotificationListener<KeepAliveNotification> ← KeepAlive ←
I/flutter ( 4342):   AutomaticKeepAlive ← SliverList ← Viewport ← IgnorePointer-[GlobalKey#583d5] ← Semantics ←
I/flutter ( 4342):   Listener ← _GestureSemantics ←
I/flutter ( 4342):   RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#91bcc] ← Listener ← ⋯
I/flutter ( 4342):   parentData: index=0; layoutOffset=0.0 (can use size)
I/flutter ( 4342):   constraints: BoxConstraints(w=411.4, 0.0<=h<=Infinity)
I/flutter ( 4342):   semantic boundary
I/flutter ( 4342):   size: MISSING
I/flutter ( 4342):   index: 0
I/flutter ( 4342): The constraints that applied to the RenderAndroidView were:
I/flutter ( 4342):   BoxConstraints(w=411.4, 0.0<=h<=Infinity)
I/flutter ( 4342): The exact size it was given was:
I/flutter ( 4342):   Size(411.4, Infinity)
```

i have tried many solutions even customscrollview with slivers but it does not help
Repository: godot
Issue: [GDScript] TextEdit cursor_get_column() and cursor_get_line() misbehaving
Labels: bug,topic:editor,topic:plugin

**Godot version:**
3.1.1 stable official

**OS/device including version:**
Windows 10 x64 version 1709

**Issue description:**
In-editor embedded TextEdit plugin function cursor_get_column() and cursor_get_line() always returns the last possible column and line, respectively. Bug is editor-only, in-game both returns actual cursor position, as expected.

**Steps to reproduce:**
1. Embed TextEdit as editor plugin.
2. Connect signal "cursor_changed" from TextEdit to function and pass cursor_get_column() and cursor_get_line() as arguments.
3. Try to print or anyhow reference the arguments in said function.
4. See the bug yourself.

**Minimal reproduction project:**
http://www.mediafire.com/file/37gc6eqnamk5jn1/TextEdit+bug.zip
Repository: flutter
Issue: Expose a way to detect System UI overlay changes.
Labels: c: new feature,platform-android,platform-ios,framework,would be a good package,c: proposal,a: layout,P3,team-framework,triaged-framework

Currently [`SystemChrome`](https://api.flutter.dev/flutter/services/SystemChrome-class.html) doesn't expose any methods to check whether the status bar and/or system navigation buttons are visible/hidden.
After some digging I found out that both Android and iOS expose similar native functionality (ios only for status bar, for obvious reasons).

I believe those should be exposed to the core flutter framework.

Something along the lines of:

```dart
await SystemChrome.getEnabledSystemUIOverlays(); // returns List<SystemUiOverlay>

SystemChrome.onSystemUiOverlaysChanged = (List<SystemUiOverlay> overlays) {
  if(overlays.contains(whatever)) {
    doWhatever();
  }
}
```
Repository: vscode
Issue: Allow QuickPicks to show right-aligned text like "recently opened" in the command palette
Labels: feature-request,quick-pick

Extensions can't currently render text like "recently opened" here, but it'd be nice if we could.

<img width="659" alt="Screenshot 2019-06-20 at 12 09 46 pm" src="https://user-images.githubusercontent.com/1078012/59845114-77536200-9354-11e9-9d3f-c434b4820465.png">

This was raised in https://github.com/microsoft/vscode/issues/75236 and taken as a feature request, but the OP closed it, so here's a new request (cc @chrmarti) :-)
Repository: flutter
Issue: How to change background color of BottomNavigationBarItem(child) when user pressed? Not change all of navbar color
Labels: c: new feature,framework,f: material design,d: api docs,P3,workaround available,team-design,triaged-design

I want every menu that I click will change color for each menu that is clicked, not for the entire color background of the nav bar. 

Like the example below:
[Here](https://i.stack.imgur.com/dXGaz.png)

When a user clicks on the "Near Me" menu then the box on the menu will change color. But for the background/color box on the other menu, it is still black. Similarly, clicking on the other menus will change color to red and will not change the color of the menu that is not clicked (still black)

This my Code:
```
int _page = 0;
final List<Widget> _children = [
    MainPage(),
    MainPage(),
    MainPage(),
    MainPage(),
    MainPage(),
  ];

... 


bottomNavigationBar: Theme(
            data: Theme.of(context).copyWith(
              canvasColor: Color(0xFF3B3D58),
              primaryColor: Colors.white,
              textTheme: Theme.of(context).textTheme.copyWith(
                caption: TextStyle(color: Colors.grey)
              )
            ),
            child: BottomNavigationBar(
              type: BottomNavigationBarType.fixed,
              currentIndex: _page,
              items: [
                BottomNavigationBarItem(
                  icon: Icon(Icons.home),
                  title: Text('Home'),
                ),
                BottomNavigationBarItem(
                  icon: Icon(Icons.add_circle),
                  title: Text('Add Place'),
                ),
                BottomNavigationBarItem(
                  icon: Icon(Icons.near_me),
                  title: Text('Near Me'),
                ),
                BottomNavigationBarItem(
                  icon: Icon(Icons.favorite),
                  title: Text('Favorite'),
                ),
                BottomNavigationBarItem(
                  icon: Icon(Icons.more_horiz),
                  title: Text('More'),
                ),
              ],
              onTap: onTabTapped,
            ),
          ),
```

And this is my result of my code:
[Here](https://i.stack.imgur.com/SaUz1.png)
Repository: godot
Issue: Strange visibility button highlight when project is start
Labels: bug,topic:editor,confirmed

**Godot version:**
3.2.dev.custom_build. c6507933a


**Issue description:**
When project is running(and probably when errors occurs), when I  try to click at the visibility button, then highlight show in unexpected places
![file](https://user-images.githubusercontent.com/41945903/59849153-30229c80-9367-11e9-888c-9bf4381e7b41.gif)
Repository: rust
Issue: u8::reverse_bits is too slow
Labels: A-LLVM,I-slow,O-x86_64,T-compiler,C-bug,O-x86_32

While upgrading the `bitintr` crate I re-ran its benchmarks and found out that the stable implementation there is much faster than the stabilized `u8::reverse_bits` intrinsic available on nightly. 

I'm comparing this implementation of `u8::reverse_bits`:

```rust
fn rbit_u8(x: u8) -> u8 {
    (((((x as u64) * 0x80200802_u64) & 0x0884422110_u64) * 0x0101010101_u64)
        >> 32) as u8
}
```

vs `u8::reverse_bits`. 

My benchmark there isn't super tight, each iteration calls reverse_bits on all [0, 255] integers :

```rust
fn u8_runner<F: Fn(u8) -> u8>(bench: &mut Bencher, f: F) {
    bench.iter(|| {
        for v in 0..=u8::max_value() {
            bencher::black_box(f(bencher::black_box(v)));
        }
    })
}

#[bench]
fn rbit_u8_std(bench: &mut Bencher) {
    u8_runner(bench, |x| x.reverse_bits()))
}

#[bench]
fn rbit_u8_self(bench: &mut Bencher) {
    u8_runner(bench, |x| rbit_u8(x)))
}
```

On my laptop (x86_64 1.8Ghz i5), I'm getting 343 ns/iter for `rbit_u8`, while for `u8::reverse_bits` I'm getting 619 ns/iter. Dividing by 256 that's 1.34 (mine) vs 2.42 (libstd) ns / bitreverse.

All of this somehow rings a bell; the `bitintr` crate had a benchmark specifically for this operation, and it was previously comparing its own implementations against `core::intrinsic::bitreverse`, and it had a workaround for using its own implementation even when the user was on nightly and explicitly enabled using `core::intrinsics` via an `unstable` cargo feature. I guess I should have written a comment back then.
Repository: rust
Issue: Please support using wait4 for Child and Command
Labels: O-linux,T-libs-api,C-feature-request

On Linux, the `wait4` system call provides all the same information as `waitpid`, but additionally returns a `struct rusage` containing the resource usage of the child process. I'd love to have Child and Command provide a platform-specific extension trait that uses `wait4`, and then returns the `struct rusage` in addition to the exit status.
Repository: rust
Issue: Lint for `&String::into(): String` on final use of input string
Labels: A-lints,T-lang

PR #59825 added a `impl From<&String> for String`.

While perusing the `rustc` source, I am now seeing instances of `String` values being constructed and then passed via-reference into a function that wants a `String`. These would not have compiled without the change added by PR #59825.

It might be worthwhile to try to make a lint that detects the last use of a `String` that is then being used as an argument to `&` which is then itself passed to this conversion method (which effectively hides the clone taking place.

(You can see discussion of the hidden clone on #59827; I'm not seeking debate on the merits of PR #59825. I just am wondering if we could easily highlight the unnecessary clones via a lint.)
Repository: flutter
Issue: Return the current extent to which a drawer is opened
Labels: c: new feature,framework,f: material design,P3,team-design,triaged-design

<!-- 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 our the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case

I have a usecase where I need to know to what extent the drawer is opened, if the user is dragging the drawer open.
Android has:
https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.DrawerListener.html#onDrawerSlide%28android.view.View,%20float%29
I wanted something similar in Flutter

## Proposal

Ive done the research and the mechanism for this seems to nearly exist
In https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/material/drawer.dart
There exists in DrawerControllerState
```
_controller = AnimationController(duration: _kBaseSettleDuration, vsync: this)
      ..addListener(_animationChanged)
      ..addStatusListener(_animationStatusChanged);
```
with
```
void _animationChanged() {
    setState(() {
      // The animation controller's state is our build state, and it changed already.
    });
  }

```
We could just update the drawercallback to send this _controller.value which would be the offset required

The question that arises though is should
`typedef DrawerCallback = void Function(bool isOpened);`
be updated to
`typedef DrawerCallback = void Function(bool isOpened, double offset);`
or
`typedef DrawerCallback = void Function(DrawerUpdate update);`

where DrawerUpdate is a class with boolean and double data members

This would be a breaking change either way.


If someone could let me know which would be preferable by the team, Ill be willing to make the change and raise a PR for the same.
Repository: flutter
Issue: CircleBorder sizing doesn't match the size of the enclosed Text
Labels: framework,f: material design,has reproducible steps,P2,found in release: 3.3,workaround available,found in release: 3.7,team-design,triaged-design

## Steps to Reproduce

Create a `RaisedButton` like this:
```dart
RaisedButton(
  child: Text('Click me'),
  onPressed: () {},
  shape: CircleBorder(),
)
```

The button does become circular, but it's sized after the height of the text, not the width:

![Screenshot 2019-06-20 at 18 16 03](https://user-images.githubusercontent.com/13644170/59866253-74279880-938b-11e9-9331-cbb124f29a2e.png)

The only workaround I have found, it to wrap the whole thing in a SizedBox, and hard-code a specific height that is large enough. This is poor solution, as that hardcoded value depends on the concrete text.

## Version

```
flutter --version
Flutter 1.5.4-hotfix.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 7a4c33425d (7 weeks ago) • 2019-04-29 11:05:24 -0700
Engine • revision 52c7a1e849
Tools • Dart 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)
| ~/dev @ mit-macbookpro3 (mit)
```