sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: electron
Issue: [Bug]: pageSize not work when silent print on windows 10
Labels: platform/windows,component/printing,bug :beetle:,status/confirmed,25-x-y,26-x-y,27-x-y

### 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.

### Electron Version

16.0.0-beta.6

### What operating system are you using?

Windows

### Operating System Version

windows 10

### What arch are you using?

x64

### Last Known Working Electron version

none

### Expected Behavior

pageSize  works when silent print.

### Actual Behavior

`webContents.print({silent:true, pageSize: 'A5'})`
pageSize not works when silent print. it always use printer default pageSize.

#29532
#29334 
#31489 

other print options has been fixed, except pageSize.

### Testcase Gist URL

_No response_

### Additional Information

_No response_
Repository: TypeScript
Issue: Control flow analysis for destructured rest element of discriminated union
Labels: Suggestion,In Discussion

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms

rest spread element destructure destructuring discriminated union narrow refine

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

A natural extension of https://github.com/microsoft/TypeScript/pull/46266 would be to support the following

```ts
type Action =
    | { kind: 'A', payload: number }
    | { kind: 'B', payload: string };

function example({ kind, ...rest }: Action) {
    if (kind === 'A') {
        rest.payload.toFixed();
    }
    if (kind === 'B') {
        rest.payload.toUpperCase();
    }
}
```

## 📃 Motivating Example

<!--
  If you were announcing this feature in a blog post, what's a short explanation that shows
  a developer why this feature improves the language?
-->

## 💻 Use Cases

<!--
  What do you want to use this for?
  What shortcomings exist with current approaches?
  What workarounds are you using in the meantime?
-->
Repository: kubernetes
Issue: kube-apiserver incorrectly parses tokens starting with ' '
Labels: kind/bug,sig/auth,lifecycle/frozen,needs-triage

### What happened?

kube-apiserver authenticated the token " TOKEN" as `system:anonymous` (note the leading space).

### What did you expect to happen?

kube-apiserver should reject the invalid authorization header.

The bearer token [RFC](https://datatracker.ietf.org/doc/html/rfc6750#section-2.1) specifies a single space between "Bearer" and the token value.

### How can we reproduce it (as minimally and precisely as possible)?

```
$ IP=<address of kube-apiserver>
$ curl -k https://IP -H "Authorization: Bearer asdf"
{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {
    
  },
  "status": "Failure",
  "message": "Unauthorized",
  "reason": "Unauthorized",
  "code": 401
}
$ curl -k https://IP -H "Authorization: Bearer  asdf"
{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {
    
  },
  "status": "Failure",
  "message": "forbidden: User \"system:anonymous\" cannot get path \"/\"",
  "reason": "Forbidden",
  "details": {
    
  },
  "code": 403
}
```

### Anything else we need to know?

_No response_

### Kubernetes version

<details>

```console
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"18+", GitVersion:"v1.18.18-dispatcher", GitCommit:"de944d802c49735ad0f4bfe82ddfa19737ebe962", GitTreeState:"clean", BuildDate:"2021-05-13T17:51:55Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18+", GitVersion:"v1.18.20-gke.901", GitCommit:"db8463aecdfe0eb5d9067effa2fd5ab3ff7a988e", GitTreeState:"clean", BuildDate:"2021-08-04T23:27:42Z", GoVersion:"go1.13.15b4", Compiler:"gc", Platform:"linux/amd64"}
```

</details>


### Cloud provider

<details>
GKE
</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>
Repository: flutter
Issue: [web Desktop] Native sliding drawer pushing content
Labels: framework,f: material design,c: proposal,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 out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case

<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

## Proposal

<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching something showing what you are imagining:
      * images
      * videos
      * code samples

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->
https://raw.githubusercontent.com/NikhilVadoliya/Flutter_slider_drawer/master/slide_left.gif
Repository: react
Issue: [React 18] Selective Hydration fails hydration when using context api
Labels: Type: Discussion,React 18

Based on the selective hydration example provided by @gaearon ?? 

https://codesandbox.io/s/mystifying-haibt-39oed

Look out for 👉
![image](https://user-images.githubusercontent.com/599459/140265026-bc9f2b34-1489-4021-a592-89aa282bf561.png)


One can see that hydrating html does in fact fail when using Context API — or perhaps that's a red herring? The trees do in fact line up during render, and hydration, there's just an effect that sets state — but that is post hydration??

Could be them related; in anycase — strictly speaking to that code sandbox, what am i doing wrongly?

---

Initially caught when `ImportedComponent` fails see https://github.com/theKashey/react-imported-component/blob/c290d76623693389a11cc514c92f47efadac47ba/src/ui/ImportedController.tsx#L29
Repository: godot
Issue: Restarting pulse audio results in bad state error spam
Labels: bug,confirmed,topic:audio

### Godot version

3.3.4-stable

### System information

Linux

### Issue description

If you do pulseaudio -k and it restarts (either because it auto restarts or you manually restart it if yours doesn't auto restart) then Godot begins to spam
`ERROR: thread_func: pa_context_get_server_info error: Bad state
   At: drivers/pulseaudio/audio_driver_pulseaudio.cpp:490.
`
Now, killing the audio service very much would cause an issue. I have no idea if reconnecting to an audio service after it is killed is even a feasible thing, admittedly I am not aware of any applications that actually do this. Most just cease audio capabilities. Hence, if this is considered less of a bug and more of a "yeah fixing that by having it reconnect to the audio service isn't possible" then feel free to close this! It's certainly a 'niche' bug in any case.

but it would be kinda cool I guess if it could. 

### Steps to reproduce

Start any Godot thing (editor, a game, whatever)
run `pulseaudio -k`
Godot complains
restart pulseaudio if it hasn't automatically done it for you
Godot contains to complain, meaning you must restart it to fix it and get audio back

### Minimal reproduction project

can be reproduced in the editor
Repository: go
Issue: reflect: add Value.Caller
Labels: Performance,Proposal,Proposal-Accepted

`reflect.Call` allocates a `[]reflect.Value` slice of length `nout` for the number of return arguments from the function. This is fine for a one-off call of a function, but when repeatedly invoking a function, `reflect.Call` allocations can quickly add up.

As an example, I have a helper package that sorts arbitrary types, and if a type has a `func (t T) Less(other T) bool` (i.e., `Name == "Less", NumIn() == 1, NumOut() == 1, In(0) == T, Out(0) == bool`), the package calls that function for sorting. This is done within sort.Slice, meaning `Less` is called as many times as `sort.Slice` needs to compare. For an ordered slice of 1000 elements, each `sort.Slice` allocates 25735 times. 

The only four allocations in this benchmark are (tip @ 2cf85b1fb8)
```
  105.50MB 68.28% 68.28%   105.50MB 68.28%  reflect.Value.call /home/twmb/go/go.tip/src/reflect/value.go:565
      41MB 26.53% 94.81%       41MB 26.53%  reflect.methodReceiver /home/twmb/go/go.tip/src/reflect/value.go:862
    4.50MB  2.91% 97.72%     4.50MB  2.91%  reflect.Value.call /home/twmb/go/go.tip/src/reflect/value.go:609
    1.50MB  0.97% 98.70%     1.50MB  0.97%  runtime.allocm /home/twmb/go/go.tip/src/runtime/proc.go:1866
```

70% of the allocations are from allocating the output argument slice. If possible, I could provide the input slice and reuse it for all `Call`s, which would effectively eliminate this alloc.

I looked into line 862 and into the runtime, I'm not sure how to get rid of that allocation: the code takes the address of an unsafe pointer, and that allocates; if possible it would be quite nice to get rid of this alloc as well but this would likely require deeper wiring into the runtime (the point here is to have a method pointer). Line 609 has a TODO that could eliminate the allocation. runtime/proc.go:1866 looks to be unrelated.

`reflect.Value.call` can be:
```go
func (v Value) call(op string, in, out []Value) []Value {
```

If out is non-nil, then it is used rather than allocating a new slice. If the input `out` is too small, the code will panic. Essentially, line 565 turns into:
```go
ret = out
if ret == nil {
    ret = make([]Value, nout)
}
if len(ret) < nout { // optional check
    panic("short output slice")
}
```
Repository: rust
Issue: Misplaced suggestion for missing generic parameter in macro invocation
Labels: A-diagnostics,T-compiler

Given the following code: 
```rust
struct Example<T, U> {
    foo: T,
    bar: U,
}

macro_rules! impl_example {
    ($($t:ty)+) => {$(
        impl Example<$t> {
            fn baz() {
                println!(":)");
            }
        }
    )}
}

impl_example! { u8 }
```

The current output is:
```
error[E0107]: this struct takes 2 generic arguments but 1 generic argument was supplied
  --> src/lib.rs:8:14
   |
8  |         impl Example<$t> {
   |              ^^^^^^^ expected 2 generic arguments
...
16 | impl_example! { u8 }
   | --------------------
   | |               |
   | |               supplied 1 generic argument
   | in this macro invocation
   |
note: struct defined here, with 2 generic parameters: `T`, `U`
  --> src/lib.rs:1:8
   |
1  | struct Example<T, U> {
   |        ^^^^^^^ -  -
   = note: this error originates in the macro `impl_example` (in Nightly builds, run with -Z macro-backtrace for more info)
help: add missing generic argument
   |
16 | impl_example! { u8, U }
   |                   +++
```

Most of the error message is good up until the help section, whereupon following it (by passing, say, `u8, u8` to the macro call) leads to another error:
```
error: no rules expected the token `,`
  --> src/lib.rs:16:19
   |
6  | macro_rules! impl_example {
   | ------------------------- when calling this macro
...
16 | impl_example! { u8, u8 }
   |                   ^ no rules expected this token in macro call
```

Asking for another generic parameter is good, but it's being asked for in the wrong place.

As for the versions affected, I've tried it on the stable (1.56.1), nightly (`2021-11-02 18bc4bee9710b181b440`), and beta (`2021-11-01 708d57e288d051a6238e`) versions available on the Playground as of the time of writing, and all of them are affected.
Repository: pytorch
Issue: It seems to be a bug！！！
Labels: needs reproduction,triaged

code1:
~~~
 for step, (arg, cxt) in enumerate(tqdm_obj):
                batch = [tuple(t.to(self.device) for t in arg), tuple(t.to(self.device) for t in cxt)]
                output = []
                hidden_list = []
                for i in range(2):
                    if i == 0:
                        logits_0,hidden_0 = self.model[0](*batch[0][:-1])
                        output.append(logits_0)
                        hidden_list.append(hidden_0)
                    else:
                        logits_1, hidden_1 = self.model[1](*batch[1][:-1])
                        output.append(logits_1)
                        hidden_list.append(hidden_1)
                loss = self.criterion(output[0], batch[0][-1])
                ......
~~~
code2:
~~~
            for step, (arg, cxt) in enumerate(tqdm_obj):
                batch = [tuple(t.to(self.device) for t in arg), tuple(t.to(self.device) for t in cxt)]
                output = []
                hidden_list = []
                for i in range(2):
                    if i == 0:
                        logits_0,hidden_0 = self.model[0](*batch[0][:-1])
                        output.append(logits_0)
                        hidden_list.append(hidden_0)
                    # else:
                    #     logits_1, hidden_1 = self.model[1](*batch[1][:-1])
                    #     output.append(logits_1)
                    #     hidden_list.append(hidden_1)
                loss = self.criterion(output[0], batch[0][-1])
~~~
These two codes will get different results only because code1 computes this extra part：
~~~
                        logits_1, hidden_1 = self.model[1](*batch[1][:-1])
                        output.append(logits_1)
                        hidden_list.append(hidden_1)
~~~
 But this part is not used ！！！！
My version of pytorch is 1.7.1 and GPU is TITAN RTX.
Repository: create-react-app
Issue: Linking react-scripts with the projects throws an error.
Labels: stale,needs triage,issue: bug report

### Description
When I try to link the react-scripts package with **npm link ../create-react-app/packages/react-scripts** and then try to build the project an error appears:

<img width="878" alt="Screenshot 2021-11-04 at 14 26 23" src="https://user-images.githubusercontent.com/62876271/140313179-71f37f66-a58b-48e3-9e8f-614a5957fb03.png">

### Additional

I kind of understood where the problem stands. I rebased my forked repository (custom react scripts) with react-scripts "main" branch. It appears that this branch is not working. Currently the "react-scripts" package uploaded in npm with version 4.0.3 is not actually the latest "main".

### Environment
**node** v14.16.1
**npm** 6.14.12


P.S: Keep up the good work guys!!!
Repository: node
Issue: doc: missing Performance API docs
Labels: doc

Many supported functions haven't been listed on docs (?)
https://nodejs.org/docs/latest/api/perf_hooks.html#perf_hooksperformance
https://github.com/nodejs/node/blob/v17.0.1/lib/internal/perf/performance.js
Repository: material-ui
Issue: Focus-visible applying with mouse on Slider
Labels: bug 🐛,component: slider,regression

<!-- Provide a general summary of the issue in the Title above -->
Hello, from what I understand, focus-visible is a class that is added only when the keyboard is used, but that does not seem to be the case for the Slider.
<!--
  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. -->
A box-shadow is being added when mouse/touchpad is used to interact with the slider.

## Expected Behavior 🤔

<!-- Describe what should happen. -->
No box-shadow is added when mouse/touchpad is used.

## Steps to Reproduce 🕹

<!--
  You should use the official codesandbox template as a starting point: https://mui.com/r/issue-template-next

  If that's not sufficient, please create a cloneable repository.

  Pieces of code will result in a slower response time since a maintainer has to do additional work to reproduce the problem.

  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 https://codesandbox.io/s/continuousslider-material-demo-forked-iop49?file=/demo.js
2. Click on the circle
3. See box-shadow that appears on click that should not appear

## 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.
-->

## Your Environment 🌎

<!--
  Run `npx @mui/envinfo` and post the results.
  If you encounter issues with TypeScript please include the used tsconfig.
-->
<details>
  <summary>`npx @mui/envinfo`</summary>
  
```
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
```
</details>
Repository: neovim
Issue: More fine-grained control over autowrite behavior
Labels: enhancement,events

### Feature already in Vim?

_No response_

### Feature description

I recently turned on `autowriteall` and it had much improved my workflow - finally I can switch buffers and edit new files without complaints about unsaved changes. However, sometimes I just want to quit without saving and now need to remember to use `:q!` instead of `:q`

It would be very convenient if you could define the events that trigger an autowrite (switching buffers, editing new files, quitting). Then `autowrite` and `autowriteall` could also be merged into one setting - a list of events.
Repository: rust
Issue: rustdoc: trait implementation is missing
Labels: T-rustdoc,C-bug,A-reachable-priv

`warp::filters::BoxedFilter` implements `warp::filter::FilterBase` (crate-private trait therefore undocumented) and `warp::filter::Filter` through a conditional impl `impl<T: FilterBase> Filter for T {}`. However, rustdoc doesn't document that `BoxedFilter` implements the `warp::Filter` trait.

See here: https://docs.rs/warp/0.3.1/warp/filters/struct.BoxedFilter.html

<details>
<summary>Image</summary>

![image](https://user-images.githubusercontent.com/5961244/140329945-7e209c46-5af9-4293-8194-a211446bbc8c.png)
</details>
Repository: go
Issue: net: TestCloseWrite failures with "i/o timeout" on darwin/arm64
Labels: OS-Darwin,NeedsInvestigation,arch-arm64

```
#!watchflakes
post <- goos ~ `darwin|ios` && goarch == "arm64" && pkg == "net" && test == "TestCloseWrite"
```

`greplogs --dashboard -md -l -e '(?m)FAIL: TestCloseWrite/.*\n(\s+.*\n)*.*i/o timeout'`

[2021-11-03T21:45:33-d3f5dd5/darwin-arm64-11_0-toothrot](https://build.golang.org/log/00f7b47d2d721a632f060d423bb603742dd9900c)
[2020-10-20T17:52:41-90c924f/ios-arm64-corellium](https://build.golang.org/log/a67363d5d0f70a4c8e02d12edde5353c0c67214c)
[2020-09-28T21:30:01-af18bce/linux-mips64le-mengzhuo](https://build.golang.org/log/66a8d8fda8cad4fa4ad496e28384ef0f968c9565)
[2020-09-07T02:46:24-1a119ed/darwin-arm64-corellium](https://build.golang.org/log/3228edfb5a0c4474c78a719eb4b86f0de5c5b1ae)
[2020-08-26T16:15:32-6382809/darwin-arm64-corellium](https://build.golang.org/log/010c97ef4156eb430250fed97b4ed9716e291c59)
[2020-08-18T15:50:52-b58d297/darwin-arm64-corellium](https://build.golang.org/log/cca46942a9a4eba4c50b739bda441ce175b65219)
[2020-05-01T19:55:48-30f8074/darwin-arm64-corellium](https://build.golang.org/log/cb8204d771c298ce9b8bbf73d2efc820cd34cfd6)
[2020-04-13T21:56:15-1b15c7f/darwin-arm64-corellium](https://build.golang.org/log/c64b7fcccd9636bdcf52a5d629f941410a5b97c2)

See previously #34837.