sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: Mono: Allow the C# solution file to be created when you click "Create & Edit"
Labels: enhancement,topic:editor,usability,topic:dotnet

I'm working on a tutorial and I thought to myself that to a beginner that it isn't really clear to the user that they need to create the solution file or add a script before that solution file is created on new applications.

So I was wondering as a small QoL change on new projects, why not create that solution file when you click "Create & Edit" on a fresh project.
Repository: go
Issue: cmd/compile: recognize rand.Intn() is bounded for BCE
Labels: Performance,compiler/runtime

### What version of Go are you using (`go version`)?
go version go1.11.1 windows/amd64

### What did you do?
I implemented an array-shuffling function, using the math/rand.Intn() function.
https://play.golang.org/p/tlTHcU4StTF (reduced example)

### What did you expect to see?
I expected the compiler to not generate bounds checking code.

### What did you see instead?
Instead, said code was generated.

**_Note:_** Even if I change the code to https://play.golang.org/p/-65t27s9OD-, the bounds checking code is still generated (maybe a different issue?).
Repository: javascript-algorithms
Issue: Luhn algorithm
Labels: enhancement

I would like to add Luhn algorithm(https://en.wikipedia.org/wiki/Luhn_algorithm) to "src/algorithms/uncategorized/" is it ok for you?
Repository: vscode
Issue: VS Code changes indention of current line
Labels: bug,html,editor-autoindent,on-unit-test

I am using VS Code 1.28.2 on Windows 10. I'm editing an HTML file indented with tabs. But I have HTML `<pre>` sections which I want indented with spaces.

Let's say I have the following code:

```html
<pre>
  foo //I press <Enter> at the end of this line
</pre>
```
* When I open the file VS Code detects I use tabs. Fine.
* When I hit `<Enter>` at the end of the line that says "foo", VS Code indents the next line. Fine.
* VS Code isn't smart enough to realize that I want to indent the next line with spaces instead of a tab, because it already got into its head that I want to use tabs everywhere. It's not smart enough to realize that the previous line `  foo` was indented with spaces. It uses a tab for the next line. But OK, I can live with that, too. It's understandable.
* **Bug:** What isn't acceptable is that VS Code _changes the indention of the existing line_ from spaces to tabs!!

Yes, when I hit `<Enter>` after "foo", it not only indents the next line but _changes the indention that comes before `foo`_ from spaces to tabs.

```html
<pre>
  foo //bug: the two spaces have been converted to a tab!
  //this new line also has a tab, which I don't want but can accept for now
</pre>
```

VS Code has no business of changing the existing line. I simply hit `<Enter>` to go to the next time. This is a huge problem, and it has likely corrupted a bunch of lines in this file because I didn't catch on to what it was doing.

Sure, we have auto-indent features to try to automatically insert indent on the _following_ line, but please don't mess with the line I already have.

How can I turn this off?
Repository: rust
Issue: Const closure weirdness
Labels: A-lifetimes,A-closures,A-const-eval

The following compiles just fine:
```Rust
#![feature(impl_trait_in_bindings)]
fn main() {
    let func: impl Fn(&str) -> usize = |s| s.parse().unwrap();

}
```

However this does not:
```Rust
#![feature(impl_trait_in_bindings)]

fn main() {
    const func: impl Fn(&str) -> usize = |s| s.parse().unwrap();
}
```

It gives the following error message:
```
error: non-defining existential type use in defining scope
 --> src/main.rs:4:42
  |
4 |     const func: impl Fn(&str) -> usize = |s| s.parse().unwrap();
  |                                          ^^^^^^^^^^^^^^^^^^^^^^ lifetime `` is part of concrete type but not used in parameter list of existential type

error: aborting due to previous error

error: Could not compile `playground`.
```

Why is this an error? The closure does not capture anything, so it's lifetime is `'static`, and const requires `'static`.
Repository: go
Issue: cmd/cover: branching to a labeled for misses some coverage
Labels: NeedsDecision,compiler/runtime

See below for a simple program that reports statements as uncovered when they are covered.

### What version of Go are you using (`go version`)?
go version go1.11 darwin/amd64

### Does this issue reproduce with the latest release?
Yes

### What operating system and processor architecture are you using (`go env`)?
Mac OS 10.13.6

### What did you do?
Run "go test -cover" on the following code:

demo.go:
```go
package test

func testit(x, y int) int {
	var i int
	if x == 0 {
		goto forloop
	}
	goto returnit

forloop:
	// The problem also appears if for is changed to switch but not to if
	for i < y {
		i += 1
	}
	return x + i

returnit:
	return x * y
}
```
demo_test.go
```go
package test

import (
	"fmt"
	"testing"
)

var testCases = []struct {
	x, y, ret int
}{
	{1, 1, 1},
	{0, -1, 0},
	{0, 3, 3},
}

func TestDemo(t *testing.T) {
	for n, c := range testCases {
		t.Run(fmt.Sprint("Case#", n), func(t *testing.T) {
			if r := testit(c.x, c.y); r != c.ret {
				t.Errorf("testit(%d, %d) returned %d expected %d", c.x, c.y, r, c.ret)
			}
		})
	}
}
```
### What did you expect to see?
100% coverage

### What did you see instead?
```
Chriss-MacBook-Pro:test godev$ go test -cover
PASS
coverage: 88.9% of statements
ok  	test	0.005s
```
Running the html coverage tool shows the code "forloop: for i < y" as not covered. Changing the for to a switch does not change the result. However, changing the for to an if results in 100% coverage. The "goto" jumping over this code appears to be essential to the bug.

This issue may be the same as #27015.
Repository: three.js
Issue: ArrayCamera rotation support (including OrbitControls.js)
Labels: Enhancement

It would be great to be able to rotate an array camera as you would a regular camera, i.e. either accessing it's .rotation property or passing the camera into an orbit controls script. While this isn't particularly valuable for VR applications, any other type of application that leverages the optimization possible through ArrayCamera has to do a lot of workarounds to make rotation function properly.
Repository: TypeScript
Issue: Prototype property assignments don't work for js-native-types
Labels: Bug,Awaiting More Feedback,Domain: JavaScript

_From @Yegorich555 on October 19, 2018 12:40_

- VSCode Version: 1.28.2
- OS Version: Window 10 x64
- All extensions disabled

Steps to Reproduce:
```
 Array.prototype.test = function() {
    return 'ok';
}

var arr = [];
arr.te - I want to see function 'test' in intellisense
```
![image](https://user-images.githubusercontent.com/25006810/47218661-35cd7a00-d3b5-11e8-81cc-97439c61747f.png)



_Copied from original issue: Microsoft/vscode#61315_
Repository: go
Issue: go/parser: accept ...T as type in all parameter lists; leave it to go/types to complain
Labels: NeedsFix

This could simplify the parser and also make it more error-tolerant in the presence of such error. It would also be more consistent with what the compiler does and better match the spec (where the rules about uses of ... are in the prose and not the EBNF).

Clean-up task.
Repository: pytorch
Issue: Come up with a better strategy for noticing BC-breaking attribute additions to serializable classes
Labels: module: bc-breaking,module: molly-guard,triaged

In https://github.com/pytorch/pytorch/pull/8367 @apaszke caught that an added field would break pickles of this class.

This is a much, much too subtle for us to rely solely on code review to catch instances of this. We should add some lint, or automated reminder, to check for this, or maybe another mechanism to "burn in" the minimum set of attributes, so that addition of an attribute causes a test failure.

cc @ezyang @gchanan
Repository: TypeScript
Issue: incorrect leading(?) comment for variable declaration in loop statement
Labels: Bug,Help Wanted,Effort: Moderate,Domain: Comment Emit

<!-- 🚨 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 `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.2.0-dev.201xxxxx

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

**Code**

```ts
for (let i = 0; i <= 10; ++i) {
    let _a, _b; /// 123
}

```

**Expected behavior:**
```ts

for (var i = 0; i <= 10; ++i) {
    var _a = void 0, _b = void 0; /// 123
}

```

**Actual behavior:**

```ts

for (var i = 0; i <= 10; ++i) {
    var _a = void 0, _b = /// 123
     void 0; /// 123
}

```

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
Repository: go
Issue: x/tools/cmd/go-contrib-init: requires scratch repo to be set up as x/scratch
Labels: NeedsDecision,Tools

In previous Go Contributor Workshops, I had attendees run the following:

```
$ cd $(go env GOPATH)/src/golang.org/x
$ git clone https://go.googlesource.com/scratch
$ cd scratch
$ go-contrib-init -repo scratch
All good. Happy hacking!
```

However, that's tedious and not particularly portable. For example, it doesn't work with environments that use a multi-path GOPATH. So, since @kevinburke graciously set up a memorable domain name for it, I've tried to update the instructions to be the following:

```
$ go get -d goscratch.club
$ cd $(go list -f {{.Dir}} goscratch.club)
$ go-contrib-init -repo scratch
All good. Happy hacking!
```

However, that doesn't work, as `go-contrib-init` requires that all repos be checked out under `golang.org/x`:

```
$ pwd
/home/mvdan/go/land/src/goscratch.club
$ go-contrib-init -repo scratch
The repo you want to work on is currently not on your system.
Run "go get -d golang.org/x/scratch" to obtain this repo
then go to the directory "/home/mvdan/go/land/src/golang.org/x/scratch"
```

It's been decided that `golang.org/x/scratch` should not exist (https://github.com/golang/go/issues/25921), so I think `go-contrib-init` should be taught that the `scratch` repo doesn't belong there.

I think it should accept any directory for it under GOPATH. Or, once we convert the subrepos to modules, the GOPATH directory check should be removed entirely.

/cc @dmitshur @bradfitz
Repository: pytorch
Issue: Fail to Run Caffe2 with Successful Build: This caffe2 python run does not have GPU support
Labels: caffe2

## Issue description

With the latest PyTorch code, I successfully built Caffe2. But when I tried the imports, it reported errors and exited. For `from caffe2.python import core`, it directly reported `Segmentation fault (core dumped)`.  For `from caffe2.python import workspace`, it reported the following warnings that I have never encountered before:
```
WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode.
Segmentation fault (core dumped)
```

Note that I have been using an older version (~May, 2018) for a while, and everything worked just fine. I updated the code today (Oct 10, 2018) with `git pull --recurse-submodules` and `git submodule update --init --recursive`, as I need the updated operators. I tried deleting the previous "build" directory and regenerating all files, but the problem still exists.

---
There are similar issues such as:
- https://github.com/pytorch/pytorch/issues/9484
- https://github.com/pytorch/pytorch/issues/9604
- https://github.com/facebookresearch/video-nonlocal-net/issues/6
- https://github.com/facebookresearch/Detectron/issues/370
- https://github.com/caffe2/caffe2/issues/2513

The error messages reported in these issues usually contain extra information, e.g. complaining some *.so is not found. But no such complaining appeared in my case.

## Code example

I built Caffe2 with the following commands:
```
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/home/<user>/lib/pytorch/caffe2 -DCUDNN_INCLUDE_DIR=/home/<user>/lib/cudnn-8.0-linux-x64-v7/include -DCUDNN_LIBRARY=/home/<user>/lib/cudnn-8.0-linux-x64-v7/lib64/libcudnn.so -DUSE_MPI=OFF -DUSE_FFMPEG=ON ..
make -j32
make install -j32
```
During the building process, everything looked just as normal.

I set the environment variables with the following command:
```
export PATH=<caffe2_install_dir>/bin:${PATH}
export LD_LIBRARY_PATH=<caffe2_install_dir>/lib:${LD_LIBRARY_PATH}
export PYTHONPATH=<pytorch_repo_dir>/build:${PYTHONPATH}
```

## System Info

- PyTorch or Caffe2: **Caffe2**
- How you installed PyTorch (conda, pip, source): **source**
- Build command you used (if compiling from source): *See above.*
- OS: **Ubuntu 14.04**
- PyTorch version: **(latest clone)**
- Python version: **Python 2.7.15 :: Anaconda, Inc.**
- CUDA/cuDNN version: **8.0/cudnn-8.0-linux-x64-v7**
- GPU models and configuration: **(Titan Xp)**
- GCC version (if compiling from source): **5.4.0**
- CMake version: **3.11.3**
- Versions of any other relevant libraries:
Repository: TypeScript
Issue: Quick info on JSX element should show inferred type arguments
Labels: Bug,Domain: Quick Info

**TypeScript Version:**  3.2.0-dev.20181023

**Search Terms:**

**Code**

```ts
class C<T> extends React.Component<T> {}
const x = <C x={42} />;
```

**Expected behavior:**

Quick into at the use of `C` should show `C<{ x: number }>`.

**Actual behavior:**

Just shows `class C<T>`.
Repository: flutter
Issue: Flutter Camera video size too big
Labels: c: new feature,p: camera,package,team-ecosystem,P3,triaged-ecosystem

I'm using iPhone. I captured video with camera plugin. The video length is about 15 seconds and size is around 25 MB how many times I did. I tried capture video with normal iPhone camera app and size is around 8 MB at most 10MB. Is this normal behavior?
Repository: TypeScript
Issue: Inconsistency between import fix and moduleNameResolver for baseUrl + paths behavior
Labels: Bug

**TypeScript Version:**  3.2.0-dev.20181023

**Code**

```ts
/// <reference path="fourslash.ts" />

// @Filename: /src/a.ts
////export const a = 0;

// @Filename: /src/dir/b.ts
////[|a|];

// @Filename: /tsconfig.json
////{
////    "compilerOptions": {
////         "baseUrl": ".",
////         "paths": {
////            "*": ["src/types/*"]
////         }
////    }
////}

goTo.file("/src/dir/b.ts");
verify.importFixAtPosition([
`import { a } from "src/a";

a`
]);
```

The import code fix will import from "src/a". But this will be a compile error.
The function `tryLoadModuleUsingPaths` has some behavior that looks like it might be a bug: It returns `SearchResult<Resolved>` instead of just `Resolved`. Then if the `SearchResult` is not undefined (it usually isn't) we return its value (which may be undefined) -- thus we never get around to testing `baseUrl`.
I'm not 100% certain that's a bug though -- it might be the correct behavior to ignore `baseUrl` when `paths` is set, in which case the import fix should be changed to not try importing from `baseUrl` when `paths is set.
CC @DanielRosenwasser @rbuckton for opinions on what the correct behavior is.
Repository: go
Issue: cmd/cgo: mark cgo generated wrappers hidden
Labels: help wanted,NeedsInvestigation,compiler/runtime

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?
go version devel +c2a8d5972f Sat Sep 22 10:58:54 2018 +0200 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/elias/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/elias/dev/go"
GOPROXY=""
GORACE=""
GOROOT="/home/elias/dev/go-release"
GOTMPDIR=""
GOTOOLDIR="/home/elias/dev/go-release/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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-build186016377=/tmp/go-build -gno-record-gcc-switches"


### What did you do?
```
$ cat test.go
package main

/*
__attribute__ ((visibility ("hidden"))) void some_c_func() {
}
*/
import "C"

func main() {
	C.some_c_func()
}
$ go build test.go
$ objdump -t test|grep some_c_func
```

### What did you expect to see?
All cgo wrappers for `some_c_func` marked local.

### What did you see instead?
```
00000000006bd160 l     O .data	0000000000000008              main._cgo_1622f853b35c_Cfunc_some_c_func
000000000044fb20 l     F .text	0000000000000052              main._Cfunc_some_c_func
000000000044fc10 l     F .text	0000000000000001              some_c_func
000000000044fc20 g     F .text	0000000000000001              _cgo_1622f853b35c_Cfunc_some_c_func
```

The `_cgo_1622f853b35c_Cfunc_some_c_func` function is global, not local as I would expect. I would expect it to be local even if `some_c_func` itself is not.
Repository: go
Issue: proposal: context/v2: update context package
Labels: v2,Proposal

This issue is intended to cover ideas about updating the context package for Go 2.

- The current context package leads to stuttering in declarations: `ctx context.Context`.
- The current `Context.WithValue` function accepts values of any types, which is easy to misuse by passing, say, a string rather than a value of some package-local type.
- The name `Context` is confusing to some people, since the main use of contexts is cancelation of goroutines.
- Context values are passed everywhere explicitly, which troubles some people.  Some explicitness is clearly good, but can we make it simpler?

See also #24050 and #20280.
Repository: react-native
Issue: TextInput with SecureEntry sometimes highlights yellow with "Strong Password" text, and becomes unuseable
Labels: Component: TextInput,Bug

<!-- Requirements: please go through this checklist before opening a new issue -->
  - [X] Review the documentation: https://facebook.github.io/react-native
  - [X] Search for existing issues: https://github.com/facebook/react-native/issues
  - [X] Use the latest React Native release: https://github.com/facebook/react-native/releases

## Environment
  React Native Environment Info:
    System:
      OS: macOS 10.14
      CPU: x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
      Memory: 54.86 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
      Yarn: 1.9.4 - ~/.yarn/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v8.12.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
    IDEs:
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.0-alpha.8af6728 => 16.6.0-alpha.8af6728 
      react-native: ^0.57.3 => 0.57.3 
    npmGlobalPackages:
      react-native-cli: 2.0.1

## Description
I haven't been able to identify why this occurs, but sometimes users experience a yellow cover over the textField, with a "Strong Password" text on the right, and something cut off on the left. I can still tap the textInput and "Type" but the value does not change within the textInput.

(The red x, and warning text is my own)

![screen shot 2018-10-23 at 2 17 54 pm](https://user-images.githubusercontent.com/8305711/47391487-c87c5a80-d6ce-11e8-91e7-477808bce562.png)


I've tried adding, and removing `textContentType="password"`, but this issue still persists.
Repository: go
Issue: x/net/html: Tokenizer could have a Position method
Labels: NeedsDecision

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?

go version go1.10.4 linux/amd64
### Does this issue reproduce with the latest release?
Yes
### What operating system and processor architecture are you using (`go env`)?
amd64/linux

### What did you do?

I have a program that reads HTML streams and extracts sections of interest.
These byte slices are currently copied of from tokenizer.Raw().
But I'd rather just store the offsets and lengths into the full stream, given that I still want to hang on to the stream anyway. This would reduce the amount of copying needed and make my application more efficient.

This would be really easy if html.Tokenizer had a method Position() that would return the offset of the start of the current token (or possibly the start and end of the current token) from the start of the stream returned by its reader.

### What did you expect to see?

A method Position() that tells me the offset of the start of the current token. And maybe also the end as the second return value.

### What did you see instead?

There's no such method. And there's no such count either in the struct.
Repository: terminal
Issue: Some installed fonts are not loading
Labels: Issue-Question,Product-Conhost,Area-Rendering

Windows build:
Microsoft Windows [Version 10.0.16299.665] 

What I'm trying to do:
Install a font to windows and load it into the default terminal emulator for WSL ubuntu.  

What's wrong:
Not all installed fonts are available.  As one example, I have installed [GNU unifont](http://unifoundry.com/unifont/index.html) as shown here:
![image](https://user-images.githubusercontent.com/18600213/47393305-b6a5b200-d6e4-11e8-83ec-06ec49e03b7f.png)

But I am unable to locate this font in the settings pane of the default terminal. 
![image](https://user-images.githubusercontent.com/18600213/47393400-ef458b80-d6e4-11e8-8bb0-79af31a0bd8f.png)
![image](https://user-images.githubusercontent.com/18600213/47393423-02f0f200-d6e5-11e8-9633-d2d2a6850ed2.png)

On the other hand, other terminal emulators have no problem locating all of my fonts.  Here's the font selected ConEmu's settings pane:
![image](https://user-images.githubusercontent.com/18600213/47393525-5c592100-d6e5-11e8-804b-f8e466c07eaf.png)

This is not the only font I've had issues with.  For some reason, fonts like [Ubuntu Mono](https://design.ubuntu.com/font/) show up just fine.  But fonts like [GNU Unifont](http://unifoundry.com/unifont/index.html) or [Everson Mono](http://www.evertype.com/emono/) will not show up.  Is there some hidden feature of these fonts which makes them incompatible for WSL ubuntu's default terminal? Or is this perhaps a defect? Any help with getting these fonts added would be greatly appreciated.  Thank you.

As a side note: I'd also appreciate if anyone could educate me on what is the proper name for "WSL ubuntu's default terminal."
Repository: TypeScript
Issue: JSDoc generated by infer-from-usage codefix should be sorted
Labels: Bug,Domain: JavaScript

```js
/** 
 * @param {number} y
 * @return {number}
 * */
function f(x,y,z) {
  return x * y * z
}
```

**Expected behavior:**
Infer from usage sorts JSDoc after adding new inferences:

```js
/**
 * @param {number} x
 * @param {number} y
 * @param {number} z
 * @return {number}
 */
function f(x,y,z) {
  return x * y * z
}
```

**Actual behavior:**

```js
/**
 * @param {number} y
 * @return {number}
 * @param {number} x
 * @param {number} z
 */
function f(x,y,z) {
  return x * y * z
}
```

Note that #27978 doesn't fix this problem.