sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: puppeteer
Issue: Request event doesn't include websocket requests
Labels: feature,chromium,confirmed

<!--
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!
-->

### Steps to reproduce

**Tell us about your environment:**

Puppeteer version: 1.6.1
Platform / OS version: Mac OS 10.11.6
URLs (if applicable): about:blank
Node.js version: 10.7.0

**What steps will reproduce the problem?**

```js
var puppeteer = require('puppeteer');

(async () => {
    var browser = await puppeteer.launch(
        {headless:false}
    );
    var page = await browser.newPage();
    await page.setRequestInterception(true);
    page.on('request', req => {
        console.log(req);
        let headers = req.headers;
        headers['origin'] = 'http://www.multiplayerpiano.com';
        req.continue({
            headers: headers
        });
    });
    page.on('console', console.log);
    page.goto(`file://${__dirname}/ppage.html`)

})();
```

**What is the expected result?**

Websocket requests should be logged to console and the origin header changed by the interception

**What happens instead?**
I don't get WebSocket requests logged to console and its origin header is not changed. The "request" event doesn't emit for WebSocket requests.
Repository: pytorch
Issue: [feature request] Add matrix functions
Labels: triaged,module: numpy,module: linear algebra,function request

Add matrix power as implemented by [numpy.linalg.matrix_power](https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.matrix_power.html), matrix exponential as implemented by [scipy.linalg.expm](https://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.linalg.expm.html), and matrix logarithm as implemented by [scipy.linalg.logm](https://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.linalg.logm.html).


- [x] matrix_power
- [x] matrix_exp
- [ ] matrix_log (For an implementation see https://github.com/pytorch/pytorch/issues/9983#issuecomment-891777620)
- [ ] matrix_sqrt (For an implementation see https://github.com/pytorch/pytorch/issues/9983#issuecomment-907530049)

cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @anjali411 @jianyuh @nikitaved @pearu @mruberry @heitorschueroff @walterddr @IvanYashchuk @xwang233 @Lezcano @rgommers
Repository: godot
Issue: Godot slow to open, slow to edit, slow to launch simple game [Windows, caused by specific USB peripherals]
Labels: bug,platform:windows,topic:porting,confirmed,topic:thirdparty,high priority,performance

*Bugsquad edit:*

This bug has been well confirmed as something that's caused by specific USB peripherals and their drivers, apparently triggering an elusive DirectInput bug on Windows which is only reproducible in specific combinations of hardware (both host and peripheral) and drivers. This seems to trigger particularly some brands of USD keyboards, mice or audio devices (especially Digital Audio Converters).

See https://stackoverflow.com/questions/10967795/directinput8-enumdevices-sometimes-painfully-slow which seems to be the reference StackOverflow issue for this problem. We still don't know how to work this around in a way that wouldn't require users to manually upgrade or disable bogus Windows drivers.

----

**Godot version:**
<!-- Specify commit hash if non-official. -->
3.0.6 from Steam.
Also same issue on fresh download from https://godotengine.org/
This happened on previous versions too. It's been happening for about 3 months or so.


**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
Windows 10 PRO x86_64
Version 1803
OS build 17134.167

GPU Nvidia GTX980ti
GPU driver 398.36

**Issue description:**
<!-- What happened, and what was expected. -->
Opening Godot from with steam or from native download takes over 40 seconds.
Opening a very simple project in edit mode takes 35 seconds.
Pressing the play icon on this project from within Godot takes 46 seconds before the game window opens.

**Steps to reproduce:**
I can reproduce this every time just by opening or creating a basic project.
I get the same issues when I launch one of the demo projects, such as multiplayer pong.

**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
Here is the minimal project that takes the time mentioned, but I get this issue on all projects.
[Hello Godot.zip](https://github.com/godotengine/godot/files/2238695/Hello.Godot.zip)

I have also attached the output from the cmd windows that opens when Godot is launched.
![cmd_output](https://user-images.githubusercontent.com/23613684/43365910-1b5f8f1a-932c-11e8-9253-e2bbfc89e5e8.png)
Repository: electron
Issue: Add app event: `before-browser-window-created`
Labels: enhancement :sparkles:

It would be great to have a `before-browser-window-created` event that developers can use to create reusable modules that can globally intercept and modify `BrowserWindow` options before window creation.

It is already possible to do this for `BrowserWindow`s passed through the [`webContents 'new-window'`](https://electronjs.org/docs/api/web-contents#event-new-window) event but not for windows created from the `BrowserWindow` constructor. 

This would be useful for reusable:
- Window managers
- Window state/position persisting
- Other things?

```
app.on(`before-browser-window-created`, (options: BrowserWindowConstructorOptions) => {
  // do something fancy with options?
});
```
Repository: go
Issue: crypto/cipher: It should support another interface for CTR mode
Labels: NeedsInvestigation

### What did you do?

I want to write code that can efficiently encrypt or decrypt a portion of large files using random access I/O.
**Theoretically in CTR mode it is possible to encrypt/decrypt arbitrary block independently.**
But with the lack of alternative interface to Stream interface, there is no way to take advantage of CTR mode.

### What did you expect to see?
Another interface for CTR mode, or maybe custom counter support would be good too.

### What did you see instead?

Only Stream interface exists.
Repository: godot
Issue: RigidBody2D won't detect collision sometimes when colliding with 2 StaticBody2D
Labels: bug,confirmed,topic:physics

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
master @ cfcb6e11f25adb13177ba08777263288a5ec6f61
(just before typed gdscript merge)

**OS/device including version:**
Windows 10 Home Version 1803 Build 17134.147
Processor i9-8950HK
Nvidia GTX 1050 Ti

**Issue description:**
When a RigidBody2D is falling and collides with 2 StaticBody2D, sometimes it does not detect the collision and just passes through. It may have to do with the collision points not pointing upward.

![](https://im5.ezgif.com/tmp/ezgif-5-faf6e58617.gif)

In this test, I try different CCD settings, and nothing seems to fix the issue.

**Steps to reproduce:**
1. Let a RigidBody2D fall and collide with 2 StaticBody2D one next to each other
2. The body will pass through sometimes (it should not)


**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
[2D-Platformer-Demo.zip](https://github.com/godotengine/godot/files/2238933/2D-Platformer-Demo.zip)
Repository: three.js
Issue: Scene: Respect original material settings in .overrideMaterial
Labels: Enhancement

When setting the override material for a scene the maps and other settings on the original material are not used -- this applies to animations, mesh instances, and other uniforms and defines, as well. This jsfiddle shows that the normal map is not applied when rendering the scene with a `MeshNormalMaterial` applied:

http://jsfiddle.net/wbhrd58c/

![image](https://user-images.githubusercontent.com/734200/43370791-4d63d1de-933a-11e8-80d2-7d1073bc2715.png)

This makes it a difficult to render things like normal and depth buffers for screen effects. So when an overrideMaterial is used the defines and uniforms of the original should be used (if they exist on the override material). This would let an override material us the color, displacementMap, normalMap, textures, skinning settings, etc available.

This mechanic could be used make post processing passes more robust and correct, afford a depth prepass with correct vertex transformations, a deferred renderer that uses the original material properties without having to manually copy everything, and shadows that support displacement maps out of the box.

This is closer to how Unity's [Shader Replacement](https://docs.unity3d.com/Manual/SL-ShaderReplacement.html) works to afford this functionality:

> the camera renders the scene as it normally would. the objects still use their materials, but the actual shader that ends up being used is changed

In Unity if the objects material doesn't define a specific uniform then the default shader uniform value is used. To allow for backwards compatibility this could be included as an opt-in feature:

```js
Scene.setOverrideMaterial( material : Material, overrideUniforms : Boolean );
```
Repository: javascript-algorithms
Issue: My concern about no classification by Procedural/Imperative and Functional programming Paradigm
Labels: enhancement

Hi, this is a great project. Thanks.
I have a concern that I would like to share.

For instance, looking at  `/algorithms/math/factorial` which is one of the most basic math topic:
https://github.com/trekhleb/javascript-algorithms/tree/master/src/algorithms/math/factorial

I found 2 implementations:

### factorial.js

```js
export default function factorial(number) {
  let result = 1;

  for (let i = 2; i <= number; i += 1) {
    result *= i;
  }

  return result;
}
```

### factorialRecursive.js

```js
export default function factorialRecursive(number) {
  return number > 1 ? number * factorialRecursive(number - 1) : 1;
}
```

`factorial.js` is a code of Procedural/Imperative programming style, and uses mutable variables.

`factorialRecursive.js` is recursive, and can be said functional programming style, immutable. Alghouth this is a typical implementation which I can see everywhere, in terms of "Big O notations". this is rather anti-pattern.

A better or I would say, a proper way is, 

### factorialFunctional.js

```js
//[...Array(5).keys()]
//-> [ 0, 1, 2, 3 ,4 ]

const natural = n => {
    const arr0 = [...Array(n + 1).keys()];
    const [first, ...arr] = arr0;
    return arr;
};

console.log(
    natural(5) //[ 1, 2, 3, 4, 5 ]
);

function factorialFunctional(number) {
    const list = number < 1
        ? [1]
        : natural(number)
    const multiply = (a, b) => a * b;
    return list.reduce(multiply);
}

console.log(
    factorialFunctional(5)//120
);
```

This is as efficient as the `factorial.js` in terms of "Big O notations", and immutable.

I think when algorithms are presented, it's significantly important to clarify what kind of programming paradigm the algorithms are based on.

Currently, it seems the contributions are updated randomly without formal classification for them, and I think it's a good idea to show a guideline in the README that to clarify which paradigm every algorithm belongs to. In this manner, a contributors notice "oh, here, there is no Functional or Imperative pattern yet, so I will add.."

Thanks.
Repository: flutter
Issue: DataTable only communicates selection/deselection visually
Labels: framework,f: material design,a: accessibility,P2,team-design,triaged-design

Ideally checkbox state would be communicated.  We could also use a live region on the header to update the selected count without being too chatty.
Repository: go
Issue: cmd/compile, runtime: pack info into low bits of interface type pointers
Labels: Performance,NeedsDecision,compiler/runtime

We've generally avoided doing any bit packing, so I don't anticipate this happening, but wanted to record the idea for reference and in case it generates interesting discussion.

We could pack some information into the bottom bits of interface type pointers. As long as `sizeof(reflect.type) % 16 == 0`, it'll point within the same object, so there should be no GC impact.

For example, for strings with 0 < len <= 15, instead of `(*typ, *str)` we could have `(*typ + len(s), str.ptr)`.

Then `i.(string)` ends generating code like:

```go
if i.typ&15 == 0 {
  str = *i.data
} else {
  str = (i.typ&15, i.data)
}
```

(Note that strings of length 0 are already allocation-free by pointing into runtime.zero.)

You could do something similar for small ints and tiny slices (2 bits each for len, cap-len).

The impact of this would be fairly localized, I think--just type switches, interface assertions, interface equality checks, and some choice bits of the runtime.

For reference, over make.bash, here are percents, counts, types, and length (and caps for slices) of calls to `convT2(E|I)(string|slice)`:

```
  7.52% 117662 convT2Estring string 5
  7.09% 110979 convT2Estring string 6
  6.93% 108445 convT2Estring string 1
  5.85% 91610 convT2Estring string 3
  5.45% 85249 convT2Eslice []uint8 1 1
  4.97% 77838 convT2Estring string 4
  4.91% 76785 convT2Estring string 7
  3.78% 59191 convT2Estring string 8
  3.08% 48164 convT2Estring string 9
  3.07% 48104 convT2Eslice []uint8 0 20
  2.59% 40474 convT2Estring string 2
  2.35% 36777 convT2Islice dwarf.byChildIndex 1 1
  2.11% 33001 convT2Islice gc.methcmp 0 0
  2.08% 32491 convT2Estring string 10
  1.79% 28062 convT2Islice dwarf.byChildIndex 0 0
  1.64% 25712 convT2Estring string 11
  1.43% 22429 convT2Estring string 12
  1.43% 22339 convT2Estring string 20
  1.25% 19502 convT2Islice gc.byClassThenName 1 1
  1.20% 18828 convT2Estring string 21
  1.16% 18145 convT2Islice dwarf.byChildIndex 2 2
  1.14% 17778 convT2Estring string 13
  1.07% 16706 convT2Estring string 14
  1.06% 16523 convT2Estring string 16
```

This scheme would cover a lot of these.
Repository: node
Issue: doc: explanation about flagged feature etiquette needed
Labels: help wanted,doc

There is a lot of misunderstanding in the ecosystem about how harmony* and experimental flags should be used, most alarmingly in the case of libraries that ship support for features that are flagged.

We need to document:
- Why flags are how we (and V8*) ship experimental features
- Why you should only use flagged features at an application level
- Why you shouldn't use flagged features in production environments
- Why you shouldn't publish versions of your libraries with support for flagged features
- Given the restrictions above, ways that you *can* help us test flagged features

This seems like a lot for one person so I thought I would open an issue about it and get some collaboration going.

\*We probably shouldn't document V8's flagging, but it might be necessary to at least mention harmony flags.
Repository: rust
Issue: #[repr(align(…))] should allow arbitrary constant expressions, not just integer literals
Labels: T-compiler,C-feature-request,A-repr

For example:

```rust
const ALIGN_OF_FOO: usize = 32;
#[repr(align(ALIGN_OF_FOO))]
struct Foo;
```

Currently this produces an error:
```
error[E0552]: unrecognized representation hint
 --> src/main.rs:2:8
  |
2 | #[repr(align(ALIGN_OF_FOO))]
  |        ^^^^^^^^^^^^^^^^^^^
```

A potential use case is for [opaque struct definitions](https://www.reddit.com/r/rust/comments/92m2rj/reusing_a_byte_array_as_an_object/).

I could submit this as a new RFC, but I can't think of any reason not to allow it or any ambiguity as to how it should work, so I'm hoping an issue report may be sufficient.
Repository: go
Issue: x/net/http2/h2c: support closure of all connections and graceful shutdown
Labels: NeedsInvestigation,FeatureRequest

Very happy to see h2c supported: https://github.com/golang/net/commit/c4299a1a0d8524c11563db160fbf9bddbceadb21

However, there is no way to enable graceful shutdown, or even close all h2c connections. We should support this.

You could use `http2.ConfigureServer` to configure a http2 server's graceful shutdown to be called when the http server is shutdown but the http server's shutdown method will not wait for the http2 connections to close because they have been hijacked.

I think it'd be simplest if we added a `Shutdown` and `Close` method to `*http2.Server` analogous to `*http.Server`'s methods.
Repository: flutter
Issue: Flutter sending message from native to the dart side : Dart side listen to native events
Labels: engine,d: api docs,P2,a: plugins,team-engine,triaged-engine

I am building an audio app in Flutter, I am already able to show remote player controls on iOS lock screen and the events are being received already.

The only problem is those events are being received only in the native side : 

How can the native side pass a message to the Dart side **without the Dart code calling.**

Most of the examples are showing a communication starting with the Dart code calling the native, and then the native responds, _is the inverse possible ?_, _how can the inverse be achieved_ ?
Repository: rust
Issue: Rust fails to infer types for this function
Labels: T-compiler,A-inference,C-bug

[Playground](http://play.rust-lang.org/?gist=00c5e5c8d5c34d22b34ba0d9442053f4&version=stable&mode=debug&edition=2015)

[Playground that works](http://play.rust-lang.org/?gist=c73ea26df08348ed121281339f57c25b&version=stable&mode=debug&edition=2015)

As far I know, this should be a bug. There is only one impl of `From<A>` that satisfies the type constraints defined in the function, which is `impl From<A> for AMain`. Same thing with `From<B>` and `impl From<B> for BMain`.

edit: GitHub automatially opens the url with an extra slash, please remove it for the playground to load properly
Repository: TypeScript
Issue: Tuple iteration and merging
Labels: Suggestion,In Discussion

**Edit:** Remove indexing part
**Edit 2:** Replace tuple mapping syntax with [normal mapped types](https://github.com/Microsoft/TypeScript/pull/26063)

## Search Terms

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

Concatentate and merge tuples' entries.

## Suggestion

<!-- A summary of what you'd like to see added or changed -->

1. I would like to be able to extract and spread in positions other than the last part of a tuple.
1. I would like to merge a tuple into an intersection or concatenation of its members.

## Use Cases

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->

- Converting a tuple to its intersection, such as with `Object.assign`'s assignee.
- Typing `Array.prototype.concat` correctly for tuples.

## Syntax

The syntax comes in a few new forms:

- `[...A, B]` appends `B` to the tuple `A`. Similarly, `[...infer A, any] extends B ? A : []` drops the last item of the tuple and `[...any[], infer A] extends B ? A : never` extracts the first.
- `{... ...T}` for an n-ary merge and `[... ...T]` an n-ary concatenation.

## Examples

Here's the types for each method I mentioned above.

```ts
interface Array<T> {
    concat<U extends any[]>(...others: U): [...this, ... ...{[I in keyof U]: (
        U[I] extends any[] ? N : U[I] extends ArrayLike<infer R> ? R[] : [U[I]]
    )}];
}

interface ObjectConstructor {
    assign(target: {... ...typeof sources}, ...sources: object[]): typeof target;
}
```

<!-- Show how this would be used and what the behavior would be -->

## Checklist

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. new expression-level syntax)
Repository: flutter
Issue: Dynamic Forms
Labels: a: text input,c: new feature,framework,P3,team-framework,triaged-framework

How does flutter implement dynamic form ？？？
Repository: TypeScript
Issue: Preserve executable file permission when generating from executable .ts file
Labels: Suggestion,Help Wanted

As many libraries ship executable files to help with testing or administration it is convenient to be able to keep the executable permission on UNIX like  systems while generating .js files from .ts files. The creator of the library can provide a  build script or manually keep the proper permissions in distributed generated library but this is sub-optimal  

**TypeScript Version:**  2.9.2
**Search Terms:** file permissions executable

**Expected behavior:**
```bash
$ ll lib/jem_cli.ts 
-rwxr-xr-x 1 omg omg 5.9K 30 Jul 12,58 lib/jem_cli.ts
$ tsc 
TSFILE: ..../jem_cli.js
$ ll jem_cli.js 
-rwxr-xr-x 1 omg omg 8.2K 30 Jul 13,23 jem_cli.js
```
**Actual behavior:**
```bash
$ ll lib/jem_cli.ts 
-rwxr-xr-x 1 omg omg 5.9K 30 Jul 12,58 lib/jem_cli.ts
$ tsc 
TSFILE: ..../jem_cli.js
$ ll jem_cli.js 
-rw-r--r-- 1 omg omg 8.2K 30 Jul 13,23 jem_cli.js
```
Repository: rust
Issue: rustc infinite loop on recursive type (FingerTree, indirectly polymorphic/nonregular) 
Labels: P-medium,T-compiler,I-hang

Spawned off of #4363, specifically the [example provided by @goffrie](https://github.com/rust-lang/rust/issues/4363#issuecomment-73419917)

This example code causes rustc to infinite loop ([playground](https://play.rust-lang.org/?gist=1addfdb2297fd4c93804a07eada62865&version=nightly&mode=release&edition=2015)):

```rust
enum FingerTree<A> {
    Empty,
    Single(A),
    Deep(Node<A>)
}

struct Node<A> {
    count: i32,
    front: Digit<A>,
    inner: Box<FingerTree<(A,A)>>,
    back: Digit<A>
}

struct Digit<A> {
    count: i32,
    content: [Option<A>; 4]
}

fn FingerTree<A>() -> FingerTree<A> { FingerTree::Empty }

fn main() {
    let _ = FingerTree::Deep(Node { count: 0,
        front: Digit { count: 0, content: [None, None, None, None] },
        inner: Box::new(FingerTree::Single((1, 2))),
        back: Digit { count: 0, content: [None, None, None, None] }}
    );
}
```