sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: puppeteer
Issue: Error: Protocol error (Network.getResponseBody): Request content was evicted from inspector cache from getting response body from large XML page (around 13mb)
Labels: bug,upstream,confirmed,P3

<!--
STEP 1: Are you in the right place?

- For general technical questions or "how to" guidance, please search StackOverflow for questions tagged "puppeteer" or create a new post.

https://stackoverflow.com/questions/tagged/puppeteer

- For issues or feature requests related to the DevTools Protocol (https://chromedevtools.github.io/devtools-protocol/), file an issue there:

https://github.com/ChromeDevTools/devtools-protocol/issues/new.

- Problem in Headless Chrome? File an issue against Chromium's issue tracker:

https://bugs.chromium.org/p/chromium/issues/entry?components=Internals%3EHeadless&blocking=705916

For issues, feature requests, or setup troubles with Puppeteer, file an issue right here!
-->

I am trying to get XML from a large XML page (around 13 mb) using Puppeteer. When I make the request and try to get the response body it returns the error: `Error: Protocol error (Network.getResponseBody): Request content was evicted from inspector cache`. I also tried the solution from this issue: https://github.com/puppeteer/puppeteer/issues/1599#issuecomment-355473214 but it did not work.

### Steps to reproduce

**Tell us about your environment:**

* Puppeteer version: 5.4.1
* Platform / OS version: Mac OS Big Sur (11.0.1)
* URLs (if applicable): view-source:https://rentals.ca/sitemaps/sitemap-on-toronto.xml
* Node.js version: 15.2.0

**What steps will reproduce the problem?**

```javascript
const browser =  await puppeteer.launch({ args: ["--proxy-server='direct://'", '--proxy-bypass-list=*'], headless: false })
const page = await browser.newPage()
await page.setUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Safari/537.36")
const client = await page.target().createCDPSession()
await client.send('Network.enable', {
            maxResourceBufferSize: 1024 * 1204 * 100,
            maxTotalBufferSize: 1024 * 1204 * 200,
            maxPostDataSize: 1024 * 1204 * 200
})
var response = await page.goto("view-source:https://rentals.ca/sitemaps/sitemap-on-toronto.xml", {waitUntil: 'networkidle2'})
var pageXML = ""
if (response !== null) {
    var pageXML = await response.text()
    await page.close()
    await browser.close()
}
```

**What is the expected result?**

The expected result is the response XML.

**What happens instead?**

It throws the error: `Error: Protocol error (Network.getResponseBody): Request content was evicted from inspector cache`.
Repository: PowerToys
Issue: [FancyZones] Some windows are not acknowledged by Fancy Zones [add an "Included apps" list]
Labels: Idea-Enhancement,Product-FancyZones,Area-App Compat


## ℹ Computer information

- PowerToys version: 0.27
- PowerToy Utility: Fancy Zones
- Running PowerToys as Admin: Yes
- Windows build number: 20H2

I primarily use the Foundry's Nuke Software and tear tabs from the main application and place them around multiple screens.  Fancy Zones doesn't see the newly teared away tabs as windows.

1. Open nuke
2. tear the viewer tab away from the main app
3.  hold shift down so that fancy zones should appear
4. fancy zones do not appear!

### ✔️ Expected result
1. fancy zones appear and the window snaps to it

### ❌ Actual result
2. Nothing happens, fancy zones do not appear like other windows

Thats all. It would be really helpful if it recognized more types of windows. 

thanks!
Repository: material-ui
Issue: [FocusTrap] Trap to only focus on tabbable elements
Labels: accessibility,component: FocusTrap

I reverted https://github.com/mui-org/material-ui/pull/23364 which is harmful and was merged without having a full picture.

Leaving this issue for visibility until the issue is transparently discussed.
Quick summary why https://github.com/mui-org/material-ui/pull/23364 does not work (or any DOM API approach for that matter):
What is click or keyboard focusable is up to the user agent by specification:

>  or the element is determined by the user agent to be focusable;

-- https://html.spec.whatwg.org/multipage/interaction.html#focusable-area

This means that any browser is free to break the behavior https://github.com/mui-org/material-ui/pull/23364 implemented. Specifically, https://github.com/mui-org/material-ui/pull/23364 does not support scrollable containers that are keyboard focusable with Chrome 87 on Ubuntu 20.04

Current implementation: https://d7r30.csb.app/
PR (broken) implementation: https://y8e9h.csb.app/

Forward tabbing loops between the two buttons. With the previous implementation all elements were accessible.

The PR being better than nothing is flawed since it replaces (potential) confusion with not being able to access elements at all. I don't think that a UI with excess elements is less accessible than a UI with completely inaccessible elements.


Further reading:
1. https://blog.whatwg.org/focusing-on-focus
Repository: vscode
Issue: Allow extensions to contribute a default when clause to be used when a user add a key binding for the command
Labels: feature-request,keybindings,keybindings-editor

Related: https://github.com/microsoft/vscode/issues/40389#issuecomment-738419359

Commands today can often have complex `when` clauses for the conditional for when they should apply, but these conditions aren't able to be expressed to the user when they add a key binding. Maybe we could add a `defaultWhen` or `keybindingWhen` (or something like that) property to commands in the `package.json`, so that when a user add a key binding for that command, the `when` clause would be populated with that value.

Alternatively, I was thinking that we could re-use the `when` clause of the command's `commandPalette` contribution to get at a reasonable default, but it might be tricky and we'd need to discount any `false` clauses.

Another option (though larger in scope of what I am proposing/wanting here) would be to allow having an entry in the `keybindings` contribution point without the actual `key`, so that it would be used as the "template" for when a user adds a binding. This could also double as a way for extensions to opt-out commands from key bindings altogether, by setting `"when": false` like the `commandPalette` contribution point. As there are plenty of commands that an extension can have that they can't really support a user adding a keybinding for. But that 2nd point, is I think out of scope of this issue.

/cc @alexdima, @jrieken
Repository: pytorch
Issue: inception_v3 is not symbolically traceable
Labels: triaged,module: fx

```python
from torchvision.models import inception_v3
from torch.fx import symbolic_trace

inception = inception_v3(False)
a = symbolic_trace(inception)
```

Error:
```
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-7-cb11b8d882a9> in <module>
      3 
      4 inception = inception_v3(False)
----> 5 a = symbolic_trace(inception)
      6 
      7 

/mnt/xarfuse/uid-127034/da2be092-seed-nspid4026531836-ns-4026531840/torch/fx/symbolic_trace.py in symbolic_trace(root)
    275      constructed by recording operations seen while tracing through `root`.
    276     """
--> 277     return GraphModule(root if isinstance(root, torch.nn.Module) else torch.nn.Module(), Tracer().trace(root))

/mnt/xarfuse/uid-127034/da2be092-seed-nspid4026531836-ns-4026531840/torch/fx/symbolic_trace.py in trace(self, root)
    260             torch.nn.Module.__getattr__ = module_getattr_wrapper  # type: ignore
    261             torch.nn.Module.__call__ = module_call_wrapper
--> 262             self.create_node('output', 'output', (self.create_arg(fn(*args)),), {},
    263                              type_expr=fn.__annotations__.get('return', None))
    264         finally:

/mnt/xarfuse/uid-127034/da2be092-seed-nspid4026531836-ns-4026531840/torch/fx/symbolic_trace.py in create_arg(self, a)
    102 
    103             return self.create_node('get_attr', qualname, (), {})
--> 104         return super().create_arg(a)
    105 
    106     def is_leaf_module(self, m: torch.nn.Module, module_qualified_name : str) -> bool:

/mnt/xarfuse/uid-127034/da2be092-seed-nspid4026531836-ns-4026531840/torch/fx/proxy.py in create_arg(self, a)
     52         # aggregates
     53         if isinstance(a, (tuple, list)):
---> 54             return type(a)(self.create_arg(elem) for elem in a)
     55         elif isinstance(a, dict):
     56             r = {}

TypeError: __new__() missing 1 required positional argument: 'aux_logits'
```

cc @ezyang
Repository: create-react-app
Issue: Can't override ESLint rule "@typescript-eslint/no-unused-vars"
Labels: needs triage,issue: bug report

I tried different possibilities to override the default warning setting for "**@typescript-eslint/no-unused-vars**".

The config below is what I ended up with. I also added an additional rule "no-empty-function" just to see if the whole section gets interpreted which is the case. My goal was to disable the rule for test files like "**/*.test.ts?(x)" but neither works for me. 


```
"eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ],
    "overrides": [
      {
        "files": [
          "**/*.ts?(x)"
        ],
        "rules": {
          "no-unused-vars": "off",
          "@typescript-eslint/no-unused-vars": [
            "off"
          ],
          "no-empty-function": 2
        }
      }
    ]
  },
```


Indeed, and that is interesting, it does work when I delete the lines from **.\node_modules\eslint-config-react-app\index.js:82-88**:

```
'@typescript-eslint/no-unused-vars': [
          'warn',
          {
            args: 'none',
            ignoreRestSiblings: true,
          },
        ],
```

After this hard patch I'm able to set the values "off", "warn" or "error" in the package.json above as I wish and it works fine.

Having in mind that I upgraded to react-scripts 4.0.1 from an earlier 3x version.
Repository: go
Issue: x/all: READMEs are out of date
Labels: NeedsDecision

The current README of the x-repos dates back to pre-modules and pre-PRs times.

https://github.com/golang/crypto/blob/master/README.md

We should update them to

1. replace the install instructions with just `go get golang.org/x/crypto` with no `-u` (because we don't want people to pull up all transitive deps if they just want `x/crypto`), no `/...` because we don't want to install any commands, and no `$GOPATH` because that's deprecated
2. mention that we accept GitHub PRs as well as Gerrit CLs

/cc @golang/release @julieqiu
Repository: go
Issue: bytes: clarify semantics regarding Buffer.Bytes and Buffer.Write
Labels: Performance,Documentation,NeedsDecision

[`Buffer.Bytes`](https://github.com/golang/go/blob/37a32a1833a6e55baaa8d971406094148e42f7d1/src/bytes/buffer.go#L49-L54) is currently documented as:
> Bytes returns a slice of length b.Len() holding the **unread** portion of the buffer.
> The slice is valid for use only until the next buffer modification (that is,
> only until the next call to a method like Read, Write, Reset, or Truncate).
> The slice aliases the buffer content at least until the next buffer modification,
> so immediate changes to the slice will affect the result of future reads.

The documented use case for `Bytes` is that it's a view of the *unread* portion. If so, then I would expect `len(b) == cap(b)` for the returned buffer, but its not. Instead, the buffered returned is *both* the unread portion in `b[:len(b)]` *and* the unwritten portion in `b[len(b):]`.

Thus, you can do something like:
```go
bb := bytes.NewBuffer(make([]byte, 0, 1024))
b := bb.Bytes()
b = strconv.AppendFloat(b[len(b):], math.Pi, 'e', -1, 64)
bb.Write(b)
```

Is this is an intended use-case for `Bytes`? From the implementation, I see no reason why this is invalid nor any significant hindrances it would impose on the internal implementation of `Buffer`.  This technique allows users of `Buffer` to avoid allocating a temporary local buffer and an unnecessary copy if they already wrote the data directly into the internal buffer.

EDIT: The suggestion below is not necessary as [pointed out by @cherrymui](https://github.com/golang/go/issues/42986#issuecomment-738476835).
~~If this is an appropriate use of the `Bytes` method, then I suggest that `Write` have a special case where it trivially reslices the internal buffer if the input slice aliases the next buffer segment:~~
```go
func (b *Buffer) Write(p []byte) (n int, err error) {
	// If the input is the next segment of the internal buffer (as obtained by Bytes),
	// then trivially reslice the internal buffer to include the next segment.
	if cap(b.buf) > len(b.buf) && len(p) > 0 && &b.buf[:cap(b.buf)][len(b.buf)] == &p[0] {
		b.buf = b.buf[:len(b.buf)+len(p)]
		return len(p), nil
	}
	...
}
```
Repository: go
Issue: cmd/compile/internal/ir: add IdentExpr
Labels: NeedsFix

Currently cmd/compile's AST doesn't distinguish between definition and use of an object. This has been a long standing issue that causes bad positions for error messages.

Now that we have more flexibility in AST nodes, we can fix this. My plan is to introduce a new IdentExpr node to represent *uses* of a named object, while Name will continue represent the declared name itself.
Repository: create-react-app
Issue: When are we expected to release 4.0.2?
Labels: needs triage

When is the next version of react-scripts is planned to release? I am waiting for that for that for nom 7 update.
Repository: PowerToys
Issue: [Color Picker] Add setting to disable automatic copy to clipboard
Labels: Idea-Enhancement,Help Wanted,Cost-Small,Product-Color Picker

## 📝 Provide a description of the new feature

Please add a simple switch to disable automatic copying to clipboard.

I was hoping selecting the opening directly to editor mode would do the trick as it's the only one in the settings that doesn't mention that it copies the value but that doesn't seem to be the case.

## Why is it needed?
I might have something in the clipboard I do not wish to lose while I'm picking for a color, I'd like to have the color just wait there until I'm ready to copy it myself.
I also need different color systems depending on what I do so about half the time the automatically copied value is the wrong one anyway.


---

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Repository: storybook
Issue: addon-toolbars: Changing controls seems to be remounting components each time
Labels: question / support,addon: toolbars

Is this expected behaviour? Im wondering if perhaps this has something to do with my setup - either way it's problematic for testing animations. 👍🏼
Repository: scrcpy
Issue: [scrcpy-server] In server project, how to get screen bitmap in very shot time?
Labels: screenshot

I tried to integrate scrcpy-server into my project because python consumes a lot of CPU in the process of decoding h264 (PyAv does not support FFmpeg hardware acceleration), and I actually only need to get real-time android screenshots infrequently. But for the high latency requirements, I need to get the latest screen image as much as possible, but this is not frequent. It may be requested about 2 times in an intensive period of 1 second, and may only be requested once in 5 seconds at other times. So I tried to modify the code of scrcpy, through another TCP monitoring (the network part has no problem), get the pixel bytes of the image in real-time, but when I get the image, I found the problem:

The first thing I tried was to use reflection: The method in **"android.view.SurfaceControl": "screenshot"**, very good, this function returns Bitmap with very low latency, but I found a problem when I tried to send the Bitmap. I use **Bitmap.compress()**, but I found that no matter how to adjust the encoding (JPG|JPEG|PNG), it will cause a delay of nearly 300-800ms.

Then when I tried to use "Bitmap.copyPixelsToBuffer()", I found that the Bitmap returned by **"android.view.SurfaceControl.screenshot()"** was a Bitmap configured using **"Bitmap.Config.HARDWARE"**, so **copyPixelsToBuffer()** is the disabled method. Then, when I switched to the **Btimap.copy**, it still caused a delay of 100ms+.

Later, when I saw that the scrcpy-server's screen recorder is the way to bind Display to the Surface returned by MediaCodec, I tried to create a SurfaceView using the method: **"SurfaceView.getHolder().getSurface()"** and got and I tried to copy the **Context** from a line of code in the **"com.genymobile.scrcpy.Workarounds.fillAppInfo()"** method, but the result seems to be null.

### So, I was wondering if there is any good advice on how I can get the latest screen pixel bytes in a shorter period of time?
Repository: pytorch
Issue: Please add "dim" feature for function "torch.masked_select"
Labels: triaged,module: numpy,needs design,module: sorting and selection,function request

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->
A `dim` feature can be added for function `torch.masked_select`.

## 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 -->
I think it will be more convenient if we can have a "dim" parameter in `torch.masked_select`.
There is a scenario as we have these three tensors,
labels: [N]
scores: [N]
boxes: [N,4],
and we can get the indexes like, `bool_mask = labels== 2`.
Then we can select `labels` and `scores` as,
```python
labels= labels.masked_select(bool_mask)
scores= scores.masked_select(bool_mask)
```
So, I want to also select the `boxes` as,
```python
boxes= boxes.masked_select(bool_mask)
# boxes: tensor, [M,4]
```

## Pitch

<!-- A clear and concise description of what you want to happen. -->

## 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 @mruberry @rgommers @heitorschueroff
Repository: go
Issue: cmd/compile: inlined err check elimination opportunity
Labels: Performance,NeedsInvestigation,compiler/runtime

I realized that there is a `if err != nil` branch elimination possibility after inlined func.

With go tip 2c2980a, the following code (https://go.godbolt.org/z/sx5Gr9):

```go
package ex

func fuse(v int) (int, error) {
	s, err := sqr(v)
	if err != nil {
		return -1, err
	}
	return s, nil
}

func sqr(v int) (int, error) {
	if v < 0 {
		return 0, errorString("xyz")
	}
	return v * v, nil
}

type errorString string

func (s errorString) Error() string { return string(s) }
```

This is compiled into:

```
        movq    "".v+8(SP), AX
        testq   AX, AX
        jge     fuse_pc65
        leaq    go.itab."".errorString,error(SB), AX
        xorl    CX, CX
        leaq    ""..stmp_0(SB), DX
fuse_pc26:
        testq   AX, AX // <--- here it should be possible to know that `AX` is not-nil
        jeq     fuse_pc51
        movq    $-1, "".~r1+16(SP)
        movq    AX, "".~r2+24(SP)
        movq    DX, "".~r2+32(SP)
        ret
fuse_pc51:
        movq    CX, "".~r1+16(SP)
        xorps   X0, X0
        movups  X0, "".~r2+24(SP)
        ret
fuse_pc65:
        imulq   AX, AX
        movq    AX, CX
        xorl    DX, DX
        xorl    AX, AX
        jmp     fuse_pc26
```

If I manually do the transform, the code ends up looking like:

```
func fuse(v int) (int, error) {
    if v < 0 {
        return -1, errorString("xyz")
    }
	return v*v, nil
}
```

Which, in assembly is:
```
        movq    "".v+8(SP), AX
        testq   AX, AX
        jge     fuse_pc65
        movq    $-1, "".~r1+16(SP)
        leaq    go.itab."".errorString,error(SB), AX
        movq    AX, "".~r2+24(SP)
        leaq    ""..stmp_0(SB), AX
        movq    AX, "".~r2+32(SP)
        ret
fuse_pc65:
        imulq   AX, AX
        movq    AX, "".~r1+16(SP)
        xorps   X0, X0
        movups  X0, "".~r2+24(SP)
        ret
```

I'm not sure for how many `err != nil` it would be possible, however, already for a few, it should improve things.

When creating the err inside the func, it's able to remove the branch:

```
func fuse(v int) (int, error) {
	var err error = errorString("xyz")
	if err != nil {
		return -1, err
	}
	return v * v, nil
}
```

Compiles into:

```
        movq    $-1, "".~r1+16(SP)
        leaq    go.itab."".errorString,error(SB), AX
        movq    AX, "".~r2+24(SP)
        leaq    ""..stmp_0(SB), AX
        movq    AX, "".~r2+32(SP)
        ret
```
Repository: opencv
Issue: Convert raw MIPS intrinsics to universal intrinsics
Labels: optimization,feature,platform: other

There is patch:
https://github.com/opencv/opencv/pull/15599
with the mirror
https://github.com/vpisarev/opencv/tree/3.4-msa-dev
that adds a bunch of optimizations for MIPS to OpenCV using native MSA intrinsics.

It's not quite feasible to test and maintain those optimizations. Long time ago we introduced universal intrinsics in OpenCV:
https://docs.opencv.org/master/df/d91/group__core__hal__intrin.html and we are now moving towards exclusive use of those intrinsics instead of platform-specific intrinsics. It helps us to isolate platform-specific details in a single header file and let us develop and maintain all optimizations for all supported platforms in uniform style.

If you are expert in MIPS programming or just enthusiast willing to support this architecture, please, do this conversion and submit it as a new pull request.

Note that some of the optimizations have been already converted:

* demosaicing — #15764, #15917
* moments — #15828

the remaining parts:
* resize
* Lucas-Kanade optical flow
* motion jpeg encoder core