sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vue
Issue: Components slots are not rendered inside svg foreignObject
Labels: bug,has PR

### Version
2.6.11

### Reproduction link
[https://jsfiddle.net/AleksandrasNovikovas/w042x1c8/](https://jsfiddle.net/AleksandrasNovikovas/w042x1c8/)







### Steps to reproduce
Run provided fiddle. There are three svg boxes with foreignObject:
1. contains simple html tags
2. contains simple vue component
3. contains complex (with slot) vue component


### What is expected?
All three boxes should show link and input elements

### What is actually happening?
Third box does not show link and input elements.

---
While inspecting DOM (in chrome or in firefox) you will find that elements of second box and third box are identical.
Problem is their types: (in chome dev console select element and tab properties)
select input element from second box and you will find following list: Object->EventTarget->Node->Element->HTMLElement->HTMLInputElement->input;
select input element from third box and you will find following list: Object->EventTarget->Node->Element->SVGElement->input;

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: flutter
Issue: flutter run -d web Uncaught Error: Assertion failed: : _debugCurrentBuildTarget == context is not true
Labels: c: crash,tool,platform-web,P2,team-web,triaged-web

Problem:

1. My app runs just fine on Android.
    And it works fine when "flutter run -d chrome" used, but fails in Chrome when "flutter run -d web"

2. If I simplify it as: MaterialApp(home: Scaffold(body: Center(child: Text("Hi")))) then it works with "flutter run -d web".

I'm really puzzled what is the principal difference between "run -d chrome" and "run -d web"? Why first one works without any problem, and second one does not.

Error in browser console:
```
Uncaught Error: Assertion failed: file:///C:/Programs/flutter/packages/flutter/lib/src/widgets/framework.dart:2611:20
_debugCurrentBuildTarget == context
is not true
    at Object.throw_ [as throw] (errors.dart:216)
    at Object.assertFailed (errors.dart:26)
    at framework.dart:2611
    at framework.BuildOwner.new.buildScope (framework.dart:2614)
    at RenderObjectToWidgetAdapter.new.attachToRenderTree (binding.dart:1041)
    at binding$5.WidgetsFlutterBinding.new.attachRootWidget (binding.dart:921)
    at binding.dart:903
    at internalCallback (isolate_helper.dart:50)
```

<details>
  <summary>Logs</summary>

<!-- Finally, paste the output of running `flutter doctor -v` here. -->
[√] Flutter (Channel dev, v1.18.0-dev.5.0, on Microsoft Windows [Version 10.0.16299.1087], locale en-US)
    • Flutter version 1.18.0-dev.5.0 at c:\Programs\flutter
    • Framework revision 7f56b53de4 (3 days ago), 2020-04-12 12:00:01 -0400
    • Engine revision beb8a7ec48
    • Dart version 2.8.0 (build 2.8.0-dev.20.0 89b0f67261)


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\sl\AppData\Local\Android\sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[!] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] VS Code, 64-bit edition (version 1.44.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.9.1

[√] Connected device (3 available)
    • Android SDK built for x86 • emulator-5554 • android-x86    • Android 10 (API 29) (emulator)
    • Chrome                    • chrome        • web-javascript • Google Chrome 80.0.3987.163
    • Web Server                • web-server    • web-javascript • Flutter Tools

! Doctor found issues in 1 category.

</details>
Repository: rust
Issue: Spam in PR checks about skipped builds
Labels: C-enhancement,T-infra,A-github-actions,A-meta

In some PRs, though not all, we see 7 (!) skipped checks. These are annoying to scroll through.

<img width="759" alt="image" src="https://user-images.githubusercontent.com/5047365/79390205-4bd1e180-7f3d-11ea-8aab-2c0e15845fc1.png">

I don't think this is a blocker, but would be nice to see fixed. It's also concerning that there appears to be some non-determinism (the above output is from #71147, but e.g. #71166 does not have it); IMO making sure we know what the cause of that non-determinism is a blocker, as non-determinism of skipped builds in CI is quite concerning :)

cc @pietroalbini
Repository: PowerToys
Issue: [FancyZones] 1-pixel gap between adjacent windows
Labels: FancyZones-Layouts,Product-FancyZones

# Environment

```
Windows build number: Microsoft Windows [Version 10.0.17763.1158]
PowerToys version: v0.16.1
PowerToy module for which you are reporting the bug (if applicable): FancyZones
```

# Steps to reproduce

Just use templates

# Expected behavior

No gaps between programs

# Actual behavior

1-pixel gap between programs

# Screenshots
![image](https://user-images.githubusercontent.com/50497563/79391791-75f1c680-7f72-11ea-8e69-417638c21be1.png)
![image](https://user-images.githubusercontent.com/50497563/79391184-5dcd7780-7f71-11ea-90ae-b7d95f5dc52f.png)
![image](https://user-images.githubusercontent.com/50497563/79391291-8eadac80-7f71-11ea-878a-14c2d94382da.png)
Repository: angular
Issue: Extensible Sanitizer
Labels: feature,area: core,core: sanitization,feature: under consideration

# 🚀 feature request

### Relevant Package
@angular/core

this line and file are of key interest:
https://github.com/angular/angular/blob/486cade596a57b7c146ae3aa269d69d7d828a6ab/packages/core/src/sanitization/html_sanitizer.ts#L95


### Description
The ability to trust a custom whitelist of HTML tags, attributes, and values with a DOM sanitizer, without bypassing the whole sanitizer.

This would allow preservation of `id`, `style`, data attributes, and other common attributes. These attributes are useful in a variety of use cases for many Angular developers. This issue is a common cause of many GitHub issues, StackOverflow questions, and other indicators that there is a real problem with demand for a secure and flexible solution.

[Related SO 1](https://stackoverflow.com/questions/57400432/angular-how-to-retain-html-id-attribute-when-sanitized)
[Related SO 2](https://stackoverflow.com/questions/39628007/angular2-innerhtml-binding-remove-style-attribute)
[Tutorial on a best practice approach to doing what I am requesting](https://www.intricatecloud.io/2019/10/using-angular-innerhtml-to-display-user-generated-content-without-sacrificing-security/)
this would close a bunch of github issues and resolve many SO questions.

### Describe the solution you'd like
I would like to be able to specify three things to allow keys and values to be sanitized in a SecurityContext.HTML.

This could be implemented as an options argument to DomSanitizer.sanitize, or it could be implemented as a custom SecurityContext, but I will use options object in my description below:

```
    trustedFirstParagraph$ = this.translateService
        .translate('some-translation-key')
        .pipe(map(s => this.domSanitizer.sanitize(SecurityContext.HTML, s, options)));
```

Here, options can be an object with any of three keys:
```
const options = {
  trustAttributeKeyExpression: /some-regex-to-trust/,
  trustAttributeValueExpression: /some-value-to-trust/,
  trustAttribute: (el, key, value): boolean | string[] => {
      // arbitrary logic that can return a boolean
      // or [string, string] sanitized/transformed [key, value].
  }
}
```

`trustAttributeKeyExpression` and `trustAttributeValueExpression` must both match if both are specified. To implement an OR operation, and other more complex algorithms, a developer can use `trustAttribute`.

### Describe alternatives you've considered
1. hiding data inside the class attribute and parsing it
2. using a span or div inside my element which is visually hidden but which I can access through my component dom ref and parse out the value
3. de-DRYing my code and having component-specific content across n components instead of being able to leverage a generic service
Repository: go
Issue: cmd/compile: Eliminate bound checks on access to positive modulo
Labels: Performance,NeedsInvestigation,compiler/runtime

Given something in the form
```go
rem := len(foo) % m
_ = foo[:rem]
```
The compiler currently (1.14) inserts a bound check on `foo[:rem]`, but `0 <= rem <= len(foo)`  is guaranteed since `rem` is the modulo of a positive integer.

It would be even nicer if the compiler can figure out the general form `x > 0 ∧ r = x % m  ⇒  0 ≤ r < m`, so that operations like
```go
_ = foo[m]
rem := len(foo) % m
_ = foo[rem]
```
can have the bound check eliminated too.

This sort of expression usually props up when dealing with block-oriented algorithms, such as ciphers:
https://github.com/golang/crypto/blob/0848c9571904fcbcb24543358ca8b5a7dbfde875/chacha20/chacha_generic.go#L213
https://github.com/golang/crypto/blob/0848c9571904fcbcb24543358ca8b5a7dbfde875/poly1305/sum_amd64.go#L42
Repository: TypeScript
Issue: Type guards doesn't work with iterables for arrays
Labels: Needs Investigation

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  3.7.x-dev.20200410

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

**Code**

```ts
declare function f(a: any): a is any[];
declare const a: Iterable<number>;

f(a) && a;
```

**Expected behavior:**
Narrowed a's type is number[].
**Actual behavior:**
Narrowed a's type is any[].

**Playground Link:** https://www.typescriptlang.org/play/?ts=3.9.0-dev.20200410&ssl=1&ssc=1&pln=4&pc=11#code/CYUwxgNghgTiAEAzArgOzAFwJYHtVIAooAueKVATwEpSp4sBnMygbQF0BuAKFElgTB4GGMqQCSGEDCgAjCCAA8qZAFsZUgHzcuiIlXgAyA2Q5A

**Related Issues:** #32497 #17002
Repository: go
Issue: proposal: net/http: add `RoundTripperFunc` and `Middleware` for server & client
Labels: Proposal

Now, in `net/http`, for server side, we have `Handler` & `HandlerFunc`, `HandlerFunc` is the convenient way for user to define new handler, but in client side, we only have `RoundTripper`, so I proposal to add `RoundTripperFunc` to `net/http`.
```go
// RoundTripperFn implement http.RoundTripper for convenient usage.
type RoundTripperFunc func(request *http.Request) (*http.Response, error)
func (fn RoundTripperFunc) RoundTrip(request *http.Request) (*http.Response, error) { return fn(request) }
```
With this new type, we can easily implement `RoundTripper` interface. 

In modern web application, middleware pattern is widely used. With `Middleware` we can add more action before/after handler/request call. 
For the server side, we can define `Middleware` or similar:
```go
type Middleware interface {
	Next(h http.Handler) http.Handler
}

// MiddlewareFn support wrap function with same signature as Middleware.
type MiddlewareFn func(h http.Handler) http.Handler

func (fn MiddlewareFn) Next(h http.Handler) http.Handler { return fn(h) }

// and compose chains of middleware
// ComposeInterceptor compose interceptors to given http.RoundTripper
func ComposeInterceptor(rt http.RoundTripper, interceptors ...Interceptor) http.RoundTripper {
	if len(interceptors) == 0 {
		return rt
	}
	return ComposeInterceptor(interceptors[0].Next(rt), interceptors[1:]...)
}
```

For the client side, we define `Interceptor` or similar:
```go
type Interceptor interface {
	Next(fn http.RoundTripper) http.RoundTripper
}

// InterceptorFn implement Interceptor for convenient usage.
type InterceptorFn func(rt http.RoundTripper) http.RoundTripper

func (fn InterceptorFn) Next(rt http.RoundTripper) http.RoundTripper { return fn(rt) }

// and a function compose chains of interceptor
func ComposeInterceptor(rt http.RoundTripper, interceptors ...Interceptor) http.RoundTripper {
	if len(interceptors) == 0 {
		return rt
	}
	return ComposeInterceptor(interceptors[0].Next(rt), interceptors[1:]...)
}
```

All the above are not necessary, but can reduce and simplify user's boilerplate code.
Please consider this proposal.

The original code is [middleware](https://github.com/go-board/x-go/blob/master/xnet/xhttp/middleware.go#L18), [interceptor & RoundTripperFunc](https://github.com/go-board/x-go/blob/master/xnet/xhttp/xrequest/interceptor.go#L17)
Repository: flutter
Issue: Exhausted heap space, trying to allocate 6442385440 bytes.
Labels: c: crash,platform-android,tool,c: performance,platform-windows,t: gradle,perf: memory,P2,team-android,triaged-android

flutter has exited unexpectedly.
Repository: pytorch
Issue: variable name N_ conflicts with an internationalization macro in glib
Labels: oncall: jit,module: build,triaged

## Issue description

Several libraries (incliding glib and wxWidgets) use `N_` as a macro related to internationalization for gettext.

Libtorch unfortunately uses this as a variable name here:
https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/core/function_schema.h#L34

The macro definition from wxwidgets or glib replaces `N_` causing libtorch to fail to compile.

It would be great if libtorch could use a more descriptive name here, but mostly it should avoid using names that conflict with this set of macros:
https://developer.gnome.org/glib/stable/glib-I18N.html




cc @suo @malfet
Repository: flutter
Issue: Flutter Engine Clang Version
Labels: engine,d: api docs,a: debugging,customer: bytedance,P2,team-engine,triaged-engine

I encounter a problem while debugging the engine：single-step debugging behaves abnormally.
When I take a look at assembly code，it is different between Flutter Clang and Xcode Clang.
For example，the assembly code for [FlutterEngine initWithName: project: allowHeadlessExecution]:
[result.zip](https://github.com/flutter/flutter/files/4485466/result.zip)
It looks like that Flutter Clang has more assembly code，
![image](https://user-images.githubusercontent.com/11627283/79426499-cf4f0980-7ff5-11ea-9665-6dd0b32ffd53.png)
I am confused now：

1. What is the difference between the Flutter Clang and Xcode Clang?

2.What is the role of redundant assembly code? Single-step debugging behaves normally when I 
 use the Xcode Clang.


<!-- Finally, paste the output of running `flutter doctor -v` here. -->

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, v1.12.13+hotfix.7, on Mac OS X 10.14.6 18G4032, locale
    zh-Hans-CN)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.5)
[✓] Connected device (1 available)

</details>

Local Engine:
./flutter/tools/gn --runtime-mode=release --unopt

Xcode Clang Version:
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
Repository: create-react-app
Issue: As the best cli tool for React App, why not add configuration to turn off overlapping iframes?
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?
![image](https://user-images.githubusercontent.com/22249411/79430240-37ecb500-7ffb-11ea-805d-4b5d5a38bf50.png)
This error is what I expected, I do n’t want the iframe to pop up to affect my development, thank you
<!--
  Provide a clear and concise description of what the problem is.
  For example, "I'm always frustrated when..."
-->

(Write your answer here.)

### Describe the solution you'd like

<!--
  Provide a clear and concise description of what you want to happen.
-->

(Describe your proposed solution here.)

### Describe alternatives you've considered

<!--
  Let us know about other solutions you've tried or researched.
-->

(Write your answer here.)

### Additional context

<!--
  Is there anything else you can add about the proposal?
  You might want to link to related issues here, if you haven't already.
-->

(Write your answer here.)
Repository: pytorch
Issue: Support alpha channel in tensorboard.add_figure
Labels: module: tensorboard,oncall: visualization

## 🐛 Bug

When logging images to Tensorboard via `tensorboard.add_figure`, I got really bad text rendering. See below for an example of expected and actual images:

![image](https://user-images.githubusercontent.com/2840901/79429844-60a78700-7fc8-11ea-9efa-f8b2baffdf63.png) ![image](https://user-images.githubusercontent.com/2840901/79429884-69985880-7fc8-11ea-9293-14bfa3a137d1.png)

After some debugging, I found the solution was to specify a background color in the figure via `plt.figure(facecolor='white')`. Looking further into the PyTorch code, I realise that `torch.utils.tensorboard._utils.figure_to_image()` converts the figure into an RGB image, explicitly stripping the alpha channel in this line:

https://github.com/pytorch/pytorch/blob/f89fc204c62b635efe17f3fcb6fd0ec22129f217/torch/utils/tensorboard/_utils.py#L25

Going further through the code, it seems that `add_figure` simply calls `add_image(figure_to_image(fig))`, which also just takes the image tensor from `figure_to_image(...)` and passes that to a call of `torch.utils.tensorboard.summary.image()`. In that function's docstring, it explicitly states RGBA support:

https://github.com/pytorch/pytorch/blob/f89fc204c62b635efe17f3fcb6fd0ec22129f217/torch/utils/tensorboard/summary.py#L285

As a consequence, I wrote my own `figure_to_image` function, which is identical to PyTorch's, except that it doesn't strip the alpha channel (i.e., I just removed the `[:, :, 0:3]` code from the line cited above). Turns out this works perfectly fine in Tensorboard 2.2.0. Left: old; right: new.

![Screenshot 2020-04-16 at 10 06 37](https://user-images.githubusercontent.com/2840901/79430958-04456700-7fca-11ea-9f1c-03ee15e955bd.png)

## Question

Was there a specific reason to explicitly strip the alpha channel from the image? Would there be any negative side effects of allowing the alpha channel in `figure_to_image`? Since this function's only use is in `add_figure`, it seems safe to me to add the alpha channel support. Then again, I'm quite certain that the developer who originally wrote this line knew what he or she was doing, so I want to ask here first before creating a PR.
Repository: vscode
Issue: ${file} - must be the current opened file, but points to the name of output pane
Labels: bug,debug,variable-resolving

Issue Type: <b>Bug</b>

I have a launch configuration that uses predefined variable ${file}. I suppose ${file} must point to the file in the active edit window, but if the cursor is in the output pane, the variable ${file} points to the name of output pane when I press 'F5'.

configuration in launch.json to test:
```
{
            "name": "(Windows) Launch",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "cmd",
            "args": ["/c","echo", "${file}"],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false
}
```
VS Code version: Code 1.44.1 (a9f8623ec050e5f0b44cc8ce8204a1455884749f, 2020-04-11T01:48:12.622Z)
OS version: Windows_NT x64 10.0.18363

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz (4 x 2195)|
|GPU Status|2d_canvas: enabled<br>flash_3d: enabled<br>flash_stage3d: enabled<br>flash_stage3d_baseline: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>oop_rasterization: disabled_off<br>protected_video_decode: unavailable_off<br>rasterization: enabled<br>skia_renderer: disabled_off_ok<br>video_decode: enabled<br>viz_display_compositor: enabled_on<br>viz_hit_test_surface_layer: disabled_off_ok<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|7.88GB (1.66GB free)|
|Process Argv|--folder-uri file:///c%3A/work/vms_ide/vms-ide|
|Screen Reader|no|
|VM|50%|
</details><details><summary>Extensions (10)</summary>

Extension|Author (truncated)|Version
---|---|---
Kotlin|mat|1.7.1
vscode-antlr4|mik|2.2.3
csharp|ms-|1.21.17
python|ms-|2020.3.71659
cpptools|ms-|0.27.0
platformio-ide|pla|1.10.0
scala|sca|0.3.9
rst-vscode|tht|3.0.1
sort-lines|Tyr|1.9.0
hex-ascii-converter|yrp|0.0.1


</details>
<!-- generated by issue reporter -->