sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: material-ui
Issue: [Autocomplete] `onChange` not fired for same item consecutively
Labels: new feature,waiting for 👍,component: autocomplete

<!-- Provide a general summary of the issue in the Title above -->
`onChange` is not fired when selecting the same item consecutively. A differnt item (or clear) must be selected first.
<!--
  Thank you very much for contributing to MUI by creating an issue! ❤️
  To avoid duplicate issues we ask you to check off the following list.
-->

<!-- Checked checkbox should look like this: [x] -->

- [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 😯

<!-- Describe what happens instead of the expected behavior. -->
Curretnly, when selecting the same element consecutively `onChange` is not fired on the consecutive calls.

## Expected Behavior 🤔
Every time an item is selected, ~~`onChange`~~ _something_ should be called, either `onChange` (perhaps via a prop that says that an item can be slected multiple times) or perhaps via a dedicated `onSelect` handler.
<!-- Describe what should happen. -->

## Steps to Reproduce 🕹

<!--
  Provide a link to a live example (you can use codesandbox.io) and an unambiguous set of steps to reproduce this bug.
  Include code to reproduce, if relevant (which it most likely is).

  You should use the official codesandbox template as a starting point: https://mui.com/r/issue-template-next

  If you have an issue concerning TypeScript please start from this TypeScript playground: https://mui.com/r/ts-issue-template

  Issues without some form of live example have a longer response time.
-->

Steps:

1. Visit the [CodeSandBox](https://codesandbox.io/s/combobox-material-demo-forked-etdod?file=/demo.js)
2. Select an item from the list. Notice how the item is stored in state (via `useState`)
3. Clear the state by clicking the "clear selected" button
4. Select the same item from the autocomplete as selected in step 2

The desired outcome would be for state to be populated again with the item. Instead, `onChange` is never called and hence state is never re-populated.

## Context 🔦

<!--
  What are you trying to accomplish? How has this issue affected you?
  Providing context helps us come up with a solution that is most useful in the real world.
-->

The goal is to allow the same item to be slected multiple times. One use case for this would be when selecting an item from a auto-completed list that can be selected multiple times. Anothe might be re-selecting an item after it was cleared by external state (see link for example).

## Your Environment 🌎
MUI v5
Repository: scrcpy
Issue: Configuration file
Labels: feature request

 - [x] I have checked that a similar [feature request](https://github.com/Genymobile/scrcpy/issues?q=is%3Aopen+is%3Aissue+label%3A%22feature+request%22) does not already exist.

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

As a user, I would like to be able to execute scrcpy without having to specify my configuration flags every time.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

There should be a config file where you can specify options for scrcpy. Ideally a plain text file where the long command line options can be assigned in a UNIX config file format like this:

```
max-fps = 15 # Comment
bit-rate = 2M
```

(Or another standardised format like TOML, JSON, YAML, INI, Dhall etc.)

The config file should live in the OS' default configuration directory. This means `$XDG_CONFIG_HOME` on Freedesktop systems, `$XDG_CONFIG_HOME` or `~/Library/Application Support/` on macOS systems and on Windows... `%AppData%` I guess?

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

The only alternative would be specifying the wanted options in one or multiple environment variables or asking of every user to write their own wrappers.

**Additional context**
Add any other context or screenshots about the feature request here.

This is especially important for running scrcpy as a desktop app where command line flags cannot trivially be modified.

Persistent configuration via GUIs depends on this being implemented.
Repository: rust
Issue: assert_receiver_is_total_eq not implemented for const usage
Labels: A-const-eval

If I try to use == among an user-defined struct in a const function, it seems I have to implement PartialEq::eq and PartialEq::ne, and Eq. But when I try to implement Eq it gives this error:

```rust
error: const trait implementations may not use non-const default functions
...
= note: `assert_receiver_is_total_eq` not implemented
```

That isn't documented. The stdlib comment says "This should never be implemented by hand.". What's the solution for this situation?
Repository: TypeScript
Issue: 'used before being assigned' error inside a type alias
Labels: Bug

# Bug Report

### 🕗 Version & Regression Information

ts stable & nightly

### ⏯ Playground Link

[Playground Link](https://www.typescriptlang.org/play?ts=4.5.0-beta#code/C4TwDgpgBAYg9nKBeKBvKBtARgQwE4C6AXFDgHYhQC+A3AFADGcZAzsFLnkQK5kCWAR27QWIALZY4AG2RQAyuMlSAFAEogA)
    
### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
type Foo = { [bar]: any };
const bar = Symbol();
```

### 🙁 Actual behavior

```ts
Error: Variable 'bar' is used before being assigned. (2454)
```

### 🙂 Expected behavior

No Error
Repository: opencv
Issue: Add Reference/Citation for DpSeamFinder
Labels: category: documentation,category: stitching

While the [Graph Gut Seam Finder](https://docs.opencv.org/4.5.4/db/dda/classcv_1_1detail_1_1GraphCutSeamFinder.html)  has a reference as several other elements of the stitching module, the [DP Seam Finder](https://docs.opencv.org/4.5.4/d0/dd5/classcv_1_1detail_1_1DpSeamFinder.html) lacks a corresponding reference. I suppose DP stands for dynamic programming when comparing with the [Wiki](https://en.wikipedia.org/wiki/Seam_carving). In Wikipedia, [Seam carving for content-aware image resizing](https://dl.acm.org/doi/10.1145/1275808.1276390) is the main reference. I'm wondering if this is the theoretical basis on which the DP Stitcher was created. If yes, it might be documented and added to the reference list.
Repository: electron
Issue: [Feature Request]: Add MacBook notch area detection
Labels: enhancement :sparkles:,platform/macOS

### Preflight Checklist

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

### Problem Description

With the newest generation of MacBook Pro, Apple has introduced the display notch for camera housing. This notch can overflow the content of full screen windows. To provide unobtrusive view of the app we need to detect the position of the notch so we can move any content out of its way.

### Proposed Solution

According to guideline https://developer.apple.com/design/human-interface-guidelines/macos/app-architecture/fullscreen-mode/ there is and API safeAreaInsets , auxiliaryTopLeftArea , auxiliaryTopRightArea to detect the space taken by the notch. It would be helpful to expose the values through standard Electron API. 

### Alternatives Considered

There can be a separate node module, but it is less convenient.

### Additional Information

_No response_
Repository: PowerToys
Issue: Feature Request: PowerToys Run: Convert between HEX, DEC, OCT and BIN etc
Labels: Idea-Enhancement,Product-PowerToys Run,Run-Plugin

Just like when doing other basic calculations using PowerToys Run, it would be nice to be able to convert quickly between (for my uses), HEX and DEC. This functionality is included in the preinstalled calculator. 

![image](https://user-images.githubusercontent.com/15046126/137923388-7f047cd6-2ab2-4585-a745-966d89c11fe9.png)

The way it works in my head is the following:

1. HEX copied
2. alt space to open RUN
3. Paste HEX
4. Type CTD (Convert to DEC)
5. Press enter to save to clipboard


I am not sure as to how many people this would find this useful however as it would be a great boon to my work flow in work I would be happy to take on responsibility for developing and implementing this feature if others think it would be useful.
Repository: flutter
Issue: Proposal to add `onSaved` callback to `Form` widget
Labels: a: text input,c: new feature,framework,f: material design,c: proposal,P2,team-design,triaged-design

What if `Form` widget will have some callback, that will triggered after all form fields of that form done their `onSaved`?

That's sound pretty good for cases, when you rely on `Form` & `FormField` with validate and saving data.
Instead of
```dart
if(_formKey.currentState!.validate()) {
  _formKey.currentState!.save();
  // submit form by any way
  // do it with bloc for example
  context.read<Bloc>().add(const SubmitFormEvent());
}
```
we just stay with
```dart
if(_formKey.currentState!.validate()) {
  _formKey.currentState!.save();
}
```
And all final actions of our form just go to the `Form.onSaved` callback.
```dart
Form(
  onSaved: () {
    // submit form by any way
    // do it with bloc for example
    context.read<Bloc>().add(const SubmitFormEvent());
  }
  child: Column(),
)
```

I see at least one problem here.
As long as we can make `FormField`s `onSaved` method `async` we can't be sure, that our `Form.onSaved` will be called AFTER all `FormField.onSaved`.

But, as long as i see, right now we have same problem.
```dart
if(_formKey.currentState!.validate()) {
  _formKey.currentState!.save();
  // if any of `FormField.onSaved` is async
  // then this part it's not save to be used
  // as submit
}
```
Repository: rust
Issue: No warning on trivially unreachable code
Labels: A-diagnostics,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.

If you cannot produce a minimal reproduction case (something that would work in
isolation), please provide the steps or even link to a repository that causes
the problematic output to occur.
-->

Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=8dcfffd6e4f1ebfc05898c37eaac195f

```rust
pub fn foo(x: u32) -> bool {
    if (x <= 8) && (x > 8) {
        return true;
    }

    false
}
```

The current output is nothing (compiles without warning in stable, nightly, beta).

The compiled code indicates that the compiler has trimmed the conditional:
```x86asm
example::foo:
        xor     eax, eax
        ret
```

<!-- The following is not always necessary. -->
Ideally the output should look like:

```
warning: unreachable expression
 --> src/example.rs:3:8
  |
3 |     return true;
  |     ^^^^^^^^^^^^
  |
  = note: #[warn(unreachable_code)] on by default
```
Repository: opencv
Issue: Input layer not found in function 'cv::dnn::dnn4_v20210608::`anonymous-namespace'::TFImporter::connect'
Labels: incomplete,category: dnn

I'm trying to load my Tensorflow model with opencv DNN as follows:

1:
```pyhton
model.save('mymodel', save_format='tf')
```

2:

```python
import tensorflow as tf
from tensorflow.python.framework.convert_to_constants import convert_variables_to_constants_v2

physical_devices = tf.config.list_physical_devices('GPU')
tf.config.set_visible_devices(physical_devices[0],'GPU')
tf.config.experimental.set_memory_growth(physical_devices[0], True)

loaded = tf.saved_model.load('mymodel')
infer = loaded.signatures['serving_default']

f = tf.function(infer).get_concrete_function(input_1=tf.TensorSpec(shape=[1, 256, 256, 1], 
                                                                        dtype=tf.float32))

f2 = convert_variables_to_constants_v2(f, aggressive_inlining=True)
graph_def = f2.graph.as_graph_def()

# Export frozen graph
with tf.io.gfile.GFile('frozen_graph.pb', 'wb') as f:
    f.write(graph_def.SerializeToString())
```

3:

```python
net = cv2.dnn.readNet('frozen_graph.pb')
img = np.random.standard_normal((1, 256, 256, 1)).astype(np.float32)
print(img.shape)
net.setInput(img)
out = net.forward()
print(out.shape)
```

but I get the following error:

```bash
---------------------------------------------------------------------------
error                                     Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_13288/1971587229.py in <module>
      1 import cv2 as cv2
      2 
----> 3 net = cv2.dnn.readNet('frozen_graph.pb')
      4 img = np.random.standard_normal((1, 256, 256, 1)).astype(np.float32)
      5 print(img.shape)

error: OpenCV(4.5.3) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-c2l3r8zm\opencv\modules\dnn\src\tensorflow\tf_importer.cpp:2445: error: (-2:Unspecified error) Input layer not found: StatefulPartitionedCall/StatefulPartitionedCall/my_net/Decoderblock1/conv2d_transpose/stack/1 in function 'cv::dnn::dnn4_v20210608::`anonymous-namespace'::TFImporter::connect'
```

Tensorflow version: 2.5.0
OpenCV version 4.5.3

This is my frozen graph:
[frozen_graph.zip](https://github.com/opencv/opencv/files/7374254/frozen_graph.zip)
Repository: pytorch
Issue: torch.triu behaves differently when diagonal out of range
Labels: module: error checking,triaged

## 🐛 Bug

`torch.triu` behaves differently when diagonal out of range in the cases of cpu and cuda

## To Reproduce

```python
import torch
def cpu():
  tensor = torch.rand(torch.Size([6]), dtype=torch.float32)
  res = torch.triu(tensor,diagonal=1,)
  
def cuda():
  tensor = torch.rand(torch.Size([6]), dtype=torch.float32).cuda()
  res = torch.triu(tensor,diagonal=1,)


print(cuda())
print("CUDA PASS!")
print(cpu())
```
`cuda()` returns `None` but `cpu()` throws an error.

## Expected behavior

They should have the same behavior.

## Environment

 - PyTorch Version (e.g., 1.0): 1.9.1
 - OS (e.g., Linux): Linux
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Python version: 3.8.10
 - CUDA/cuDNN version: 11.3
 - GPU models and configuration: 3080TI
Repository: pytorch
Issue: Error using _stateless version of Module
Labels: module: nn,triaged,enhancement,actionable

## 🚀 Feature
I'm trying to use [_stateless](https://github.com/pytorch/pytorch/blob/8532061bce8da8b5fe9ecce1067ade16793a7ee3/torch/nn/utils/_stateless.py) version of Module. I'm implementing the usage suggest [here](https://discuss.pytorch.org/t/disable-in-place-updates-in-troch-nn/134504/4?u=blade):

```
params = model.named_parameters()

for i in range(iterations):
    outputs = _stateless.functional_call(model, params, input)
```

I get the error:

>     for name, tensor in parameters_and_buffers.items():
> AttributeError: ‘generator’ object has no attribute ‘items’

Would you please add support for generator object on that API?


cc @albanD @mruberry @jbschlosser @walterddr
Repository: pytorch
Issue: Make the evaluated value of function f(x) accessible from `torch.autograd.functional.jacobian(f,x)`
Labels: module: autograd,triaged

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->
Make the evaluated value of function f(x) accessible from `torch.autograd.functional.jacobian(f,x)`
## Motivation
<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->
Since for both forward mode and reverse mode automatic differentiation, the value of the function will be evaluated during calculating the gradient. It can help to avoid duplicated calculations and save computational time if its value is returned in the output of the function.

## Pitch

<!-- A clear and concise description of what you want to happen. -->
I wish to access the evaluated value of function while obtaining the Jacobian matrix. Maybe it can be accessed in the form like `torch.autograd.functional.jacobian(f,x).evaluated_values` which gives the value of `f(x)`.

## Alternatives

<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->

## Additional context

<!-- Add any other context or screenshots about the feature request here. -->


cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7
Repository: material-ui
Issue: unnecessary to always have tabindex=0 on <button /> in html
Labels: component: button

- [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 😯
Following code 
`<Button variant="contained">Contained</Button>`
renders 
![image](https://user-images.githubusercontent.com/16761205/137954146-48970046-1654-4fc6-bc27-f28779bc8ec2.png)

## Expected Behavior 🤔
If tabIndex is not provided to component Button, it is unnecessary to render tabindex=0 in result html since button is tab-able by default, unless a number is provided to Button as parameter.

## Steps to Reproduce 🕹
Steps:
1. go to https://mui.com/components/buttons/
2. inspect button from one of example

## Context 🔦
Accessibility

## Your Environment 🌎
Chrome browser
Repository: flutter
Issue: Schedule background isolates on Flutter Engine managed threads.
Labels: engine,c: performance,P2,team-engine,triaged-engine

Today, all background isolates (i.e, non-root isolates) are scheduled on an internal Dart VM managed thread pool. These Isolate tasks have no thread affinity. It has been suggested that scheduling workloads for background isolates on engine managed threads would allow the engine to better control thread priorities and manage workloads on these threads around higher priority frame rendering related tasks.

This issue describes a mechanism in which to achieve moving the servicing of these background isolates onto the engine managed thread pool. [This pool is accessed via an FML concurrent task runner](https://github.com/flutter/engine/blob/ed57c8a58c3273bca9f2a1afb5d04a5de2178160/runtime/dart_vm.h#L147). The number of threads in this pool is tied to the logical core count on the device.

The mechanism is similar to the [one used by the root isolate](https://github.com/flutter/engine/blob/ed57c8a58c3273bca9f2a1afb5d04a5de2178160/runtime/dart_isolate.cc#L426) to schedule its tasks on the UI thread. Setting the message handling task runner to the concurrent task runner ought to be sufficient to schedule tasks on the concurrent thread pool.

However, just swapping the serial task runner with a concurrent runner is not sufficient for thread safety. When posting tasks to the thread pool, multiple threads may try to acquire Isolate scope. This is forbidden by the VM. To ensure safe access to the isolate from multiple threads, a per isolate mutex must be acquired by the engine before entering its Isolate scope before its messages have been serviced. This can probably be done [in DartMessageHandler](https://github.com/flutter/engine/blob/ed57c8a58c3273bca9f2a1afb5d04a5de2178160/third_party/tonic/dart_message_handler.h#L16). From my conversations with @rmacnak-google, it was not clear to us whether the current message handler only services a single message or the entire pending message queue. Upon further reflection, it shouldn’t matter because there is no way Isolate tasks in parallel. So, if anything, it is ideal for the entire task queue to be flushed in one shot without hitting the task runners.
Repository: terminal
Issue: Dustin: port DefTerm logging from #11537 into Feedback Hub so we get that info from ~ ~ people ~ ~
Labels: Product-Meta,Issue-Task,Area-DefApp

Feedback Hub can help us capture traces _when the user requests it_ using the "Reproduce my problem" feature. We need to add the providers we're logging default terminal stuff to to the repro mode traces for Windows Terminal!

Gravy: host a meeting where I just go through the process of doing this.
Repository: node
Issue: Openssl 3 with NODE_EXTRA_CA_CERTS slows down node.js v17 startup
Labels: openssl

### Version

v17.0.0

### Platform

Microsoft Windows NT 10.0.19042.0 x64

### Subsystem

openssl 3

### What steps will reproduce the bug?

Create an empty file a.js
Have a certificate.pem file with 1 certificate.

```
>SET NODE_EXTRA_CA_CERTS=

>timethis node a.js

TimeThis :  Command Line :  node a.js
TimeThis :    Start Time :  Tue Oct 19 21:19:06 2021


TimeThis :  Command Line :  node a.js
TimeThis :    Start Time :  Tue Oct 19 21:19:06 2021
TimeThis :      End Time :  Tue Oct 19 21:19:07 2021
TimeThis :  Elapsed Time :  00:00:00.110

>SET NODE_EXTRA_CA_CERTS=certificate.pem

>timethis node a.js

TimeThis :  Command Line :  node a.js
TimeThis :    Start Time :  Tue Oct 19 21:20:51 2021


TimeThis :  Command Line :  node a.js
TimeThis :    Start Time :  Tue Oct 19 21:20:51 2021
TimeThis :      End Time :  Tue Oct 19 21:20:51 2021
TimeThis :  Elapsed Time :  00:00:00.215
```

### How often does it reproduce? Is there a required condition?

You must set a value for NODE_EXTRA_CA_CERTS

### What is the expected behavior?

```
>node -v
v16.11.1

>timethis node a.js

TimeThis :  Command Line :  node a.js
TimeThis :    Start Time :  Tue Oct 19 21:22:16 2021


TimeThis :  Command Line :  node a.js
TimeThis :    Start Time :  Tue Oct 19 21:22:16 2021
TimeThis :      End Time :  Tue Oct 19 21:22:17 2021
TimeThis :  Elapsed Time :  00:00:00.115
```

### What do you see instead?

It seems that openssl 3 slows down node.js startup.
With this empty script is 86% slower than node.js v16. With a big script, it is around 46% slower.
I don't know if this is expected, so this is a normal beaviour of openssl 3... It's strange that it only happens with EXTRA_CA_CERTS.

### Additional information

_No response_
Repository: node
Issue: Negative utilization in eventLoopUtilization for worker_threads
Labels: perf_hooks,worker

### Version

v14.18.1, v15.14.0, v16.11.1, v17.0.0-pre (as of 16 Oct `21)

### Platform

Linux marcus 5.13.19-200.fc34.x86_64 #1 SMP Sat Sep 18 16:32:24 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

### Subsystem

worker_threads

### What steps will reproduce the bug?

Repository with example: https://github.com/tshemsedinov/wtu

### How often does it reproduce? Is there a required condition?

If worker event loop is empty in delta calculation period.

### What is the expected behavior?

Delta fields `active` and `utilization` are expected to be positive, `utilization` expected to be `[0..1]`.

### What do you see instead?

Negative values in ~50% cases. But if you add `setInterval` with empty handler for minimum eventloop load, utilization will be always between 0 and 1.

### Additional information

I know that it is a stable API but it would be better in far future:
- I'd propose to reduce time between `loopIdleTime()` call and `now()` in lower level, but my experiments in this field is not successful, still getting negative utilization.
- To decompose this function to respect separation of concerns into `performance.eventLoopUsage(): EventLoopUsage` and `performance.eventLoopUtilization(usage1, usage2): EventLoopUtilization`.
- Now we have 6 places to calculate proportion (for utilization), 3 in `internal/worker.js` and 3 in `internal/perf/event_loop_utilization.js`.