sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: gin
Issue: Proposal of a new implementation method of LoadHTMLGlob
Labels: feature

I'm very grateful that I usually use **gin** to create web services.

However, I felt that LoadHTMLGlob is a slightly bad implementation.
When loading a nested HTML file with LoadHTMLGlob, you must define it in the tmpl file.

If you implement the following implementation, how do you think HTML can be called immediately?

*gin*

```go
package gin

import (
	"fmt"
	"html/template"
	"net/http"
	"os"
	"path/filepath"
	"strings"
)

var filepathArray []string

func LoadHTMLGlob(path string) {
	var rootDir string

	if strings.HasSuffix(path, "*") {
		rootDir = strings.Split(path, "/")[0]
	}

	err := filepath.Walk(rootDir, func(p string, info os.FileInfo, err error) error {
		if strings.HasSuffix(p, ".html") {
			filepathArray = append(filepathArray, p)
		}
		return nil
	})
	if err != nil {
		panic(err)
	}

}

func GET(endpoint, file string) {

	var path string

	for _, p := range filepathArray {
		if strings.HasSuffix(p, file) {
			path = p
		}
	}

	fmt.Println(endpoint + "->" + path)

	http.HandleFunc(endpoint, func(w http.ResponseWriter, r *http.Request) {
		tmpl, err := template.ParseFiles(path)
		if err != nil {
			panic(err)
		}
		err = tmpl.Execute(w, nil)
		if err != nil {
			panic(err)
		}
	})
}

func Run(port string) {
	http.ListenAndServe(port, nil)
}
```

User write main.go

```go
package main

import (
	"github.com/konojunya/html-glob-handler/gin"
)

func main() {
	gin.LoadHTMLGlob("views/*")
	gin.GET("/", "home/index.html")
	gin.Run(":8000")
}
```

What I'd like to say is not to make gin.Run possible, but I also want LoadHTMLGlob to be able to read HTML files in deep Directory.

Thanks.
Repository: godot
Issue: C# auto complete for _Input spits out an invalid variable name '@event'
Labels: enhancement,usability,topic:dotnet

**Godot version:**
3.0.2+


**OS/device including version:**
Windows 10


**Issue description:**
When using windows 10 and vs code and you try to autocomplete the `_Input` method it spits out

```csharp
public override void _Input(InputEvent @event)
{
}
```


**Steps to reproduce:**
Just attempt to auto complete the input field

**Suggestion:**
1. Change the variable name to `input` since ~~`@event` is invalid and~~ `event` is a reserved C# keyword.
Repository: scrcpy
Issue: Show touch 
Labels: feature request,showtaps

In developer options, there is an option "show taps", that whenever you touch the screen, a white circle appears.
For some reason, it doesn't appear when using this app. 
Please let us have it.
It can be useful for screenshots and screen-video capture.
Repository: go
Issue: go: add more examples to go/* package documentation
Labels: Documentation,help wanted,NeedsInvestigation

It can be hard to figure out how to use the go/* packages. More examples will help.

Coming up with useful, short examples that demonstrate these packages well will be hard and ongoing and probably require some discussion, hence this meta-issue.

A complimentary wiki page (what would a good name for this page be?), in the vein of https://github.com/golang/go/wiki/cgo , would be helpful for larger or more complicated examples, some notes about when to use which package, links to helpful packages in golang.org/x/tools/go, and for various tips and tricks, but having playable examples of the basics will be very helpful.

Related issue: #23603 so that examples can rely on go/parser and go/build can still be playable even if they hit the fs. I think this should be okay with the following rules:
1. self contained example should be preferred.
2. the example can only parse files in its own package (to avoid unrelated changes breaking them) 
3. the files accessed in the example must be included regardless of build tag (so that they're always easily reachable from the "Package files" section in godoc) 
4. the example should rely only on features under the Go 1 compatibility agreement (to avoid having to be updated when the package itself is changed) 

Here are some potential examples to include:

An example in go/parser that uses go/build and ParseDir to get the *ast.Package given an import path. (This seems to be a common stumbling block, in my experience).

Some examples in go/constant using BinaryOp and Compare and some of the conversions/constructors.

An example in go/token of using the FileSet to turn a Pos into a Position.

Based on s/owners, cc: @griesemer @alandonovan @rsc @robpike
Repository: scrcpy
Issue: Add auto-update to the app
Labels: feature request

As the title says
Repository: three.js
Issue: CameraHelper: .clone() is broken
Labels: Enhancement

##### Description of the problem

`CameraHelper::constructor` expects a `Camera` argument, but since `CameraHelper::clone` is not overwritten it will forward to `LineSegments::constructor` which expects a geometry and a material.

As a result `cameraHelper.camera` won't be set and `cameraHelper.clone()` throws via `.update()` (see https://jsfiddle.net/bbnk59af/).

Overwriting `CameraHelper::clone` to account for its own constructor solves the issue (see https://jsfiddle.net/bbnk59af/1/):

```
THREE.CameraHelper.prototype.clone = function () {
	var clone = new this.constructor(this.camera).copy(this);
	return clone;
}

```

I am not sure what the intended behaviour is in the case that `cameraHelper.clone()` gets called as a child of `scene.clone()`. The cameras and their helpers would be cloned individually, but the cloned helpers would point to the original cameras instead of the cloned ones.

##### Three.js version

- [X] Dev
- [X] r90

##### Browser

- [x] All of them

##### OS

- [x] All of them
Repository: godot
Issue: Next pass in CanvasItemMaterial seems to do nothing?
Labels: enhancement,topic:rendering,confirmed

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
eceba5a


**OS/device including version:**
OS: Ubuntu Linux 17.10 64b. 
OpenGL version string: 4.6.0 NVIDIA 387.34
OpenGL shading language version string: 4.60 NVIDIA
Video device: GeForce GT 630/PCIe/SSE2

**Issue description:**
I am not entirely sure if this is human error, since the documentation is sparse, but setting a ShaderMaterial as next_step of a CanvasItemMaterial seems to have no effect. I included a little test displaying the shader working when set as material directly, and a "_wrong" version where it's set as the next step.

**Steps to reproduce:**
Set a shader material as the next_step of a CanvasItemMaterial.

**Minimal reproduction project:**
[b.zip](https://github.com/godotengine/godot/files/1800991/b.zip)
Repository: rust
Issue: `Span` issues with `FromStr` in unstable `proc_macro`
Labels: E-needs-test,T-compiler,A-macros-2.0,C-bug

While writing improved tests for `proc_macro2`, I noticed some surprising behaviour of the `FromStr` impl for `proc_macro::TokenStream`.

When parsing a string with `FromStr`, a token parsed from the very beginning of the string can have a different `source_file()` than a token parsed elsewhere. For example:

```rust
let tokens = "aaa\nbbb".parse::<proc_macro::TokenStream>().unwrap().into_iter().collect::<Vec<_>>();
println!("span: {:?}", tokens[0].span);
println!("source_file: {:?}", tokens[0].span.source_file());
println!("");
println!("span: {:?}", tokens[1].span);
println!("source_file: {:?}", tokens[1].span.source_file());
```

Will produce the output:
```
span: Span(Span { lo: BytePos(6734829), hi: BytePos(6734832), ctxt: #0 })
source_file: SourceFile { path: ProcMacroSourceCode, is_real: false }

span: Span(Span { lo: BytePos(50), hi: BytePos(58), ctxt: #25 })
source_file: SourceFile { path: Real("pm_test.rs"), is_real: true }
```

I would've expected both tokens to have the same context, and similar BytePos-es. Specifically I would have expected both of these tokens to have a span located in a fake ProcMacroSourceCode file, but set to resolve in the context of the enclosing scope (as if span.resolved_at(Span::call_site()) was called).
Repository: flutter
Issue: Show more granular details during gradle build
Labels: platform-android,tool,t: gradle,P3,team-android,triaged-android

The `Running 'gradlew assembleDebug'...` takes a long time and shows no indication of what it's currently doing. Would be nice to break it up more like #14715 and show more details. Should be easy since flutter.gradle is already neatly broken up.
Repository: go
Issue: cmd/go: build cache does not check #included headers for changes
Labels: help wanted,NeedsInvestigation

go 1.10 linux/amd64 

The `go build` and `go test` commands don't rebuild packages if included cgo files changed. I guess a solution would be to run the preprocessor first or disable caching for packages that use cgo altogether.
Repository: flutter
Issue: Flutter driver test fails when invoked directly via `dart.exe`
Labels: tool,t: flutter driver,P2,team-tool,triaged-tool

**I just started setting up our Flutter App testing added the following dependencies.
 in `pubspec.yaml` 
```yml
flutter_driver: 
  sdk: 
    flutter
```
`test_driver` folder in the project
and add test file with extension `.dart`
and created Flutter-Driver folder for creating scripts.
But unfortunately, I can't run the test. I got the following error**
## while debugging 
```
exception = DriverError: Could not determine URL to connect to application.
Either the VM_SERVICE_URL environment variable should be set, or
```
when you run the script

##  while running the script
```
C:\Users\KRISHNA_CHIMPLE\Documents\GitHub\git\flutter\bin\cache\dart-sdk\bin\dart.exe --checked --enable-vm-service:65143 C:\Users\KRISHNA_CHIMPLE\Downloads\flutter_app-master\flutter_app-master\test_driver\Navigation_test.dart
Observatory listening on http://127.0.0.1:65143/

00:00 +0: flutter app transitions (setUpAll)
00:00 +0 -1: flutter app transitions (setUpAll) [E]
 DriverError: Could not determine URL to connect to application.
 Either the VM_SERVICE_URL environment variable should be set, or an explicit
 URL should be provided to the FlutterDriver.connect() method.
 Original error: null
 Original stack trace:
 null
     
 package:flutter_driver/src/driver/driver.dart 154:7           FlutterDriver.connect
 ===== asynchronous gap ===========================
 dart:async/future_impl.dart 22                                _Completer.completeError
 package:flutter_driver/src/driver/driver.dart                 FlutterDriver.connect
 ===== asynchronous gap ===========================
 dart:async/zone.dart 1047                                     _CustomZone.registerCallback
 dart:async/zone.dart 964                                      _CustomZone.bindCallbackGuarded
 dart:async/schedule_microtask.dart 147                        scheduleMicrotask
 dart:async/future.dart 198                                    new Future.microtask
 package:flutter_driver/src/driver/driver.dart 150:85          FlutterDriver.connect
 test_driver\Navigation_test.dart 12:36                        main.<fn>.<fn>
 ===== asynchronous gap ===========================
 dart:async/zone.dart 1047                                     _CustomZone.registerCallback
 dart:async/zone.dart 964                                      _CustomZone.bindCallbackGuarded
 dart:async/schedule_microtask.dart 147                        scheduleMicrotask
 dart:async/future.dart 198                                    new Future.microtask
 test_driver\Navigation_test.dart 11:23                        main.<fn>.<fn>
#
```
Repository: TypeScript
Issue: In JS, reassignment of a constructor function should work. 
Labels: Bug,checkJs,Domain: JavaScript

graceful-fs allows the user to provide a constructor function for the ReadStream class. It then modifies the function’s prototype (including modifying its base class). If no function is provided, then it provides one. This pattern should be supported as long as the provided function is assignable to the default one. 

```ts
// @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: a.js

var fs = require('fs')
/** @type {{ a: () => void }} */
var legStreams
// from graceful-fs
function patch(process) {
    if (process) {
        ReadStream = legStreams.a
    }
    ReadStream.prototype = Object.create(fs.ReadStream)
    ReadStream.prototype.open = fs$open

    function ReadStream (path, options) {
        if (this instanceof ReadStream) {
            return fs.ReadStream.apply(this, arguments), this
        }
        else {
            return ReadStream.apply(Object.create(ReadStream.prototype), arguments)
        }
    }
    function fs$open() {
    }

    // ReadStream should still be newable too!
    function createReadStream(path, options) {
        return new ReadStream(path, options)
    }
```
Repository: go
Issue: syscall: Syscall6 not implemented on Solaris
Labels: help wanted,OS-Solaris,NeedsFix

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?
go version go1.10 linux/amd64

### Does this issue reproduce with the latest release?
yes

### What operating system and processor architecture are you using (`go env`)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/milann/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/milann/golang"
GORACE=""
GOROOT="/home/milann/go"
GOTMPDIR=""
GOTOOLDIR="/home/milann/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build031994401=/tmp/go-build -gno-record-gcc-switches"

### What did you do?
I am trying to call shmget, shmat etc. via syscall. On OpenSolaris  there is one code for SHM (52) and then shmget etc. functions are sub calls with codes 0,1,2 etc. 

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
```go
package main

import (
	"runtime"
	"syscall"
)

const (
	IPC_PRIVATE = 0
	IPC_CREAT   = 01000
)

func main() {
	if runtime.GOOS == "solaris" {
		id, _, errno := syscall.Syscall6(52, 3, uintptr(int32(IPC_PRIVATE)), uintptr(int32(65536)), uintptr(int32(IPC_CREAT|0777)), 0, 0)
		if int(id) == -1 {
			println(errno)
		}
	} else if runtime.GOOS == "linux" {
                // 29 is syscall.SYS_SHMGET on amd64, missing on solaris
		id, _, errno := syscall.Syscall(29, uintptr(int32(IPC_PRIVATE)), uintptr(int32(65536)), uintptr(int32(IPC_CREAT|0777)))
		if int(id) == -1 {
			println(errno)
		}
	}
}

```

### What did you expect to see?
Program compiles ok with GOOS=solaris.

### What did you see instead?
```
GOOS=solaris go build test.go 
# command-line-arguments
syscall.Syscall6: call to external function
main.main: relocation target syscall.Syscall6 not defined
main.main: undefined: "syscall.Syscall6"
```

Is this something you are aware of and is there a workaround maybe? For now I also implemented cgo version but I hope just temporary. You can also test with library I am working on:
`GOOS=solaris go get -tags syscall github.com/gen2brain/shm`
Repository: flutter
Issue: More strongly caveat usage of debugProfileBuildsEnabled and debugProfilePaintsEnabled
Labels: team,framework,c: performance,d: api docs,a: debugging,P2,team-framework,triaged-framework

Learned the hard way. Seems like Timeline.start/finishSync calls adds performance cost itself on medium complexity layouts in profile mode. 

Without tracing, it costs 578ms to produce 28 frames. 242ms in build and 181ms in paint. 
With tracing, it costs 1087ms to produce the ~same 29 frames. 420ms in build and 489ms in paint. 

Though most tellingly, if only traces were added partially such as paint but not build, it costs 952ms to produce 27 frames but 245ms in build and 543ms in paint. 

We should document these caveats.
Repository: vscode
Issue: Zen Mode Settings
Labels: feature-request,workbench-zen

I request a special property for zen mode

zenMode.fontSize and "zenMode.fontWeight": "bold"

So would be different from

editor property settings
Repository: flutter
Issue: OEM animations
Labels: platform-android,framework,a: animation,f: material design,a: fidelity,P3,team-android,triaged-android

Is it possible to use native animations? Each phone brand has their own animations (I really like my pixel's) and I'd like to use the animations that come with every phone, it breaks the native feel in my opinion when the animations don't match.
Repository: neovim
Issue: avoid hit-enter prompt on SIGSTOP (ctrl-z)
Labels: tui,system

I have a plugin installed that is triggered on save, and I'm not sure via what means, neovim currently triggers a buffwrite on `SIGSTOP` (i.e. ctrl-z in normal mode). I tried to capture any events from the signal handling with the logging, but I didn't come up with anything useful (still attached). That is all, however, incidental to this bug report.

The issue is that this plugin, triggered by the save-on-`SIGSTOP` behavior, used `:echoerr` to display an error message. This blocks neovim from being background'd, and the `SIGSTOP` was effectively ignored until I'd addressed the error messages.

When responding to a signal like `SIGSTOP`, it's important that no prolonged blocking activity be carried out before complying, neovim's current behavior could leave it indefinitely hanged in response to a non-tty-generated `SIGSTOP` event expecting neovim to respond accordingly as neovim waits for user input at the command line.

```
NVIM v0.2.3-788-g1d5eec2c6
Build type: Debug
LuaJIT 2.0.5
Compilation: /usr/local/bin/scc -march=native -msse4a -mavx2 -mfma -msha -Wconversion -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -I/mnt/d/rand/neovim/build/config -I/mnt/d/rand/neovim/src -I/mnt/d/rand/neovim/.deps/usr/include -I/usr/include -I/mnt/d/rand/neovim/build/src/nvim/auto -I/mnt/d/rand/neovim/build/include
Compiled by mqudsi@Blitzkrieg

Features: +acl +iconv +jemalloc +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/share/nvim"

Run :checkhealth for more info
```

[nvim.log](https://github.com/neovim/neovim/files/1804744/nvim.log)
Repository: flutter
Issue: Render as many lines as space allows before ellipsing 
Labels: c: new feature,framework,engine,a: typography,P2,team-engine,triaged-engine

I have a fixed sized container with two Text widgets in a column. The first text should take up as much space as needed to render it fully and the second text should render as many lines as the remaining space allows before getting ellipsed.

```dart
      new Container(
          padding: new EdgeInsets.all(15.0),
          width: 150.0,
          height: 110.0,
          color: Colors.red,
          child: new Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              new Text(
                'I take up as much space as possible.',
                style: const TextStyle(fontWeight: FontWeight.bold),
              ),
              child: new Text(
                'The space I have is very limited. I get ellipsed.',
                overflow: TextOverflow.ellipsis,
              ),
            ],
          ),
        ),

```

The second text always gets ellipsed after one line even when there is space to render more lines. There is no way (short of knowing beforehand how many lines the second text can render) to have the text render as many lines as possible before ellipsing.
Repository: flutter
Issue: Document the performance impact of Material widget
Labels: framework,f: material design,d: api docs,P2,team-design,triaged-design

Point out that likely only one Material instance per elevation is needed to provide the splash for all of its descendent ink wells. Use DecoratedBox if using just for background colors.
Repository: vue
Issue: [SSR] 服务端渲染能否增加自定义 TemplateRenderer 或者 提供部分inject的参数？
Labels: feature request

### What problem does this feature solve?
当我使用 inject: true 的参数渲染 ssr 页面时，我只想对 renderScripts 这部分做自定义修改，其他继续沿用默认templateRenderer的render**。

如果 我设置了 inject: false，那我必须在 html模板中 添加 各种 {{ render** }} 。

请问有没有更方便的方法？

### What does the proposed API look like?
```
createBundleRenderer({
  inject:true,
  renderScripts: function() { ... },
})

```
or 

```
createBundleRenderer({
  inject:true,
  templateRenderer: new otherTemplateRenderer(),
})
```

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: scrcpy
Issue: Weird scaling on macOS in Parallels VM
Labels: bug,hidpi,macos

I'm not sure if it's an issue in scrcpy.

With scaling setting "Best for Retina Display" scrcpy running in VM shows cropped image:
<img width="1920" alt="screen shot 2018-03-13 at 06 06 31" src="https://user-images.githubusercontent.com/11808223/37320496-004ac424-2685-11e8-9d34-0661755f2a8c.png">


However, with both "Scaled" and "More Space" it works fine:

<img width="1920" alt="screen shot 2018-03-13 at 06 06 47" src="https://user-images.githubusercontent.com/11808223/37320518-1a2ef842-2685-11e8-9db6-b11affbbcee9.png">

![screen shot 2018-03-13 at 06 10 46res](https://user-images.githubusercontent.com/11808223/37320606-96f3c06a-2685-11e8-9f9b-4e06a41bd852.jpg)

I don't know how to debug it.
Repository: scrcpy
Issue: Add toggle button on window menu "stay on top"
Labels: feature request,windows

As the title says.