sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [Caffe2] resize5d stride/dim issue
Labels: caffe2

## 🐛 Bug

THTensor resize4d and resize5d functions cause a corrupted tensor.
The mentioned function defined here: https://github.com/pytorch/pytorch/blob/ded4ff87af6e4cd0d22ef091f8ba7d49a4a49d1c/aten/src/TH/generic/THTensor.h#L75-L76
The return tensor will cause a crash when I call to nDimension or stride functions.
The dim and stride functions are defined here: https://github.com/pytorch/pytorch/blob/ded4ff87af6e4cd0d22ef091f8ba7d49a4a49d1c/aten/src/TH/generic/THTensor.h#L27
https://github.com/pytorch/pytorch/blob/ded4ff87af6e4cd0d22ef091f8ba7d49a4a49d1c/aten/src/TH/generic/THTensor.h#L31
All other resize work fine.
## To Reproduce

Steps to reproduce the behavior:

1. THFloatStorage_newWithSize(10)
1. THFloatTensor_newWithStorage1d(PREV_STORAGE, 0, 10, 1)
1. THFloatTensor_resize5d(PREV_TENSOR, 1, 2, 1, 2, 1)
1. THFloatTensor_nDimension(PREV_TENSOR)
crash...

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior
Return dimension of tensor.

<!-- A clear and concise description of what you expected to happen. -->

## Environment

Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

 - PyTorch Version (e.g., 1.0): 1.0
 - OS (e.g., Linux): Windows 10.0.17134.523
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Build command you used (if compiling from source):
 - Python version: 3.6.7
 - CUDA/cuDNN version: N/A
 - GPU models and configuration: N/A
 - Any other relevant information:

One observed behavior for resize4d, if source tensor is created as 4d, it crashed. When source tensor has different dimension, e.g. 3d, it fine.
However, resize5d always return corrupted tensor.

## Additional context
I link to caffe2 lib by copy following files into project path:
c10.dll
caffe2.dll
caffe2.lib
libiomp5md.dll

<!-- Add any other context about the problem here. -->
I tried to create Torch Tensor inside Rust by using Rust FFI binding to C language. This is done to reduce cost of constructing tensor object inside Python as my experiment data source, if loaded entirely in Python consume too much memory, i.e. 8 bytes per an element. In C/Rust, I can use single byte per an element. Loading data then GC it make my training time slow down from few hours/epoch to 5 days per epoch.
So far, all other resize* work fine except these two.

Side question: does this resize function copy data ? It seem like all resized tensor always contiguous.
Repository: terminal
Issue: iTerm color schemes once more are failing to parse colors
Labels: Work-Item,Product-Colortool,Help Wanted,Issue-Bug,Area-Settings

Not sure if I am supposed to request to get this re-opened or if I should create another bug. But this is the same as in #2 

* Your Windows build number:  (Type `ver` at a Windows Command Prompt)
Microsoft Windows [Version 10.0.17763.253]

* What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)
Running:
PS C:\Tools\ColorTool> .\ColorTool.exe C:\Tools\ColorTool/schemes/molokai.itermcolors
Error loading ini file "C:\Tools\ColorTool/schemes/molokai.itermcolors"
    for key "DARK_BLACK"
    the value "" is invalid

The actual file contents can be found in this gist:
https://gist.github.com/SneWs/4bbb50dce9a132a4dcbd07e3e2c85c44 

* What's wrong / what should be happening instead:
The colors should be successfully parsed and set without any error messages being rendered.
Repository: pytorch
Issue: CategoricalCrossEntropy Loss runs with wrong tag
Labels: module: nn,module: loss,triaged

## 🐛 Bug

Putting extreme low negative values as the tag does not raise error

## To Reproduce

       output = torch.randn(5, 2, requires_grad=True)
        target = torch.empty(5, dtype=torch.long).random_(2)
       target[0] = -9223372036854775808

       criterion = nn.CrossEntropyLoss()
        loss = criterion(output, target)
         print(loss)

## Expected behavior

raise Error

## Environment

Last stable version

cc @albanD @mruberry @jbschlosser
Repository: flutter
Issue: How to add custom overflow string in `Text` or `TextSpan`?
Labels: c: new feature,framework,P2,team-framework,triaged-framework


![image](https://user-images.githubusercontent.com/15325536/51380355-85eee080-1b4c-11e9-955b-af38f06ef530.png)

I want to replace overflow string '\u2026' to something else, like '...read more'.


<!-- Thank you for using Flutter!

     Please check out our documentation first:
      * https://flutter.io/
      * https://docs.flutter.io/

     If you can't find the answer there, please consider asking a question on
     the Stack Overflow Web site:
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     Please don't file a GitHub issue for support requests. GitHub issues are
     for tracking defects in the product. If you file a bug asking for help, we
     will consider this a request for a documentation update.

-->
Repository: flutter
Issue: Custom Shape on drawer selected item
Labels: c: new feature,framework,f: material design,P2,team-design,triaged-design

![_20181125_173554](https://user-images.githubusercontent.com/30870272/51380386-aa8c8d80-1b37-11e9-8788-d75b162576ac.JPG)

Like this image, there is no option to add custom shape to selected drawer item in Navigation Drawer.
Repository: every-programmer-should-know
Issue: My programming guidelines
Labels: Needs some ❤️

Hi, 

Thank you for your project.

I am doing a similar project since some months. It is not that big like yours, but maybe you want to have a look. I am curious and looking for feedback:

https://github.com/guettli/programming-guidelines/
Repository: go
Issue: net/http: provide better error message when proxy is misconfigured
Labels: help wanted,NeedsFix

### What version of Go are you using (`go version`)?
<pre>
$ go version go1.11 linux/amd64

</pre>

### Does this issue reproduce with the latest release?
Yes

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/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-build200009662=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?
Doing a `go get`  fails behind a corporate proxy if environment variables are set as below; ```HTTP_PROXY=http://proxyIp:proxyPort```
it succeeds if set as
```HTTP_PROXY=proxyIp:proxyPort```
this is true for HTTP or HTTPS variables This is also true for any go project using net/http 
I'm seeing this issue with Docker versions greater than 17.09, Jenkins-x, goBuffalo
Older versions of go (specifically 1.8.3 - the only version I tested) do not behave this way
Docker version 17.09 and lower do not behave this way.  
### What did you expect to see?
I expect it to pull through the proxy server with the below environment variables set;
```HTTP_PROXY=http://proxyIp:proxyPort```
```HTTPS_PROXY=https://proxyIp:proxyPort```
### What did you see instead?
Process fails to get through the proxy.
Repository: TypeScript
Issue: Generic not inferred inside mapped type parameter
Labels: Bug,Domain: Type Inference

<!-- 🚨 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.2

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** generic inference {} createStructuredSelector mapped types

**Code**

```ts
type Selector<S, R> = (state: S) => R;

declare function createStructuredSelector<S, T>(
    selectors: { [K in keyof T]: Selector<S, T[K]> },
): Selector<S, T>;

type State = { foo: number };
declare const mySelector: Selector<State, boolean>;

// Workaround: use explicit generics
// const result = createStructuredSelector<State, { mySelector: boolean }>({

// `State` generic incorrectly inferred as `{}`.
const result = createStructuredSelector({
    // Unexpected type error under `strictFunctionTypes` due to bad inference (above)
    mySelector,
});

result;
```
Repository: flutter
Issue: [Feature request] [google_maps_flutter] : Support for on map click listener
Labels: c: new feature,p: maps,package,c: proposal,team-ecosystem,P2,triaged-ecosystem
Repository: TypeScript
Issue: tsc does not use amd-module name when emitting dynamic imports
Labels: Suggestion,Awaiting More Feedback,Domain: JS 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.3.0-dev.20190118

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** amd-module, optional, dynamic, directive

**Code**

Scripts/foo.ts
```ts
///<amd-module name="customNameFoo" />

export function hello() {
    console.log('hello world');
}
```

Scripts/bar.ts
```ts
///<amd-module name="customNameBar" />

async function myFunction(): Promise<void> {
	//Dynamically import foo
        var fooModule = await import('./foo');

	fooModule.hello();
}
```

tsconfig.json
```json
{
	"compileOnSave": true,
	"compilerOptions": {
		"target": "es5",
		"outDir": "GeneratedScripts",
		"module": "amd",
		"lib": [
			"es2015.promise",
			"dom",
			"es5",
			"scripthost"
		]
	},
	"include": [
		"Scripts/**/*"
	],
	"exclude": [
		"GeneratedScripts"
	]
}
```

would expect that the call to require would use the amd-module name for foo ("customNameFoo") and not "./foo".  (If we non-dynamically imported foo, then the generated 'define' would refer to foo by it's amd-module name)
GeneratedScripts/bar.js
```js
//...

return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, new Promise(function (resolve_1, reject_1) { require(['./foo'], resolve_1, reject_1); })];
                    case 1:
                        fooModule = _a.sent();
                        fooModule.hello();
                        return [2 /*return*/];
                }
            });
```

**Expected behavior:** The generated amd code for a dynamic import should use the name of the module specified in the amd-module directive

**Actual behavior:** The generated code for the dynamic import uses relative path to the module



**Related Issues:** <!-- Did you find other bugs that looked similar? -->
https://github.com/Microsoft/TypeScript/pull/1158
https://github.com/Microsoft/TypeScript/issues/28760
Repository: flutter
Issue: Video playback within a ListView
Labels: c: new feature,d: examples,customer: crowd,p: video_player,package,team-ecosystem,P2,fyi-codelabs,triaged-ecosystem

A common pattern in apps is having video playing within infinite lists, playing/pausing/stopping as the user scrolls specific views on/off screen. Examples would be the muted autoplay videos on Facebook or Instagram's main feeds.

Best case scenario I think a pattern like this would be a good candidate for one the cookbooks on  https://flutter.io/docs/cookbook
Additionally, I would love to get some insight/suggestions from the community about implementing this kind of feature.

Building similar things on native iOS/Android I would just
1) listen for scroll events
2) check which cells are visible
3) do some math to decide which item should play
4) and push a video player onto that item and play it.

As far as I know - Flutter doesn't have anyway of telling me which Widgets in a ListView are the ones currently visible. The only solution I could come up with was
1. putting a key on every item in the List View
2. using the [https://pub.dartlang.org/packages/rect_getter](RectGetter) package and getting the rect of the ListView
3. get the rect of each item and check if it's within the rect of the ListView

If there's a better way to do this, I'd love to know. I know ListView must be keeping track of what it has rendered somewhere, I just don't know how to access it.

Thanks in advance
Repository: go
Issue: proposal: cmd/go: 'go mod tidy' should remove stale 'exclude' directives
Labels: Proposal,NeedsInvestigation,GoCommand,modules

`exclude` directives in the `go.mod` file prevent commands such as `go get -u` from selecting particular versions of modules.

However, if the active version of a dependency is _already_ semantically higher than the excluded version, `go get -u` would never select that version implicitly in the first place (depending on the resolution of #26474). The only time it could be introduced is by an explicit downgrade of some package, and explicit downgrades — though possible — are likely to be rare in practice.

That makes those `exclude` directives noisy and somewhat misleading: they appear to have an effect on version selection, but may actually be very stale and completely irrelevant.

I propose that `go mod tidy` should remove `exclude` directives if the selected version of the module in question is already higher than the excluded version.

(CC @rsc @jayconrod)
Repository: go
Issue: x/tools/go/packages: tests are flaky on Windows
Labels: Testing,NeedsFix,Tools

https://build.golang.org/log/60aa789811bdedb1697255f1dee30adb917d3f0c
https://build.golang.org/log/ede332848726e7af41109fe3ebc7e813e58f7ab8
https://storage.googleapis.com/go-build-log/dc889025/windows-amd64-2016_fed5c8f5.log

example:
```
--- FAIL: TestLoadTypes (0.50s)
    --- FAIL: TestLoadTypes/Modules (0.34s)
        packages_test.go:523: wrong import graph: got <<>>, want <<* golang.org/fake/a
              golang.org/fake/b
              golang.org/fake/c
              golang.org/fake/a -> golang.org/fake/b
              golang.org/fake/a -> golang.org/fake/c
            >>
        packages_test.go:541: missing package: golang.org/fake/a
        packages_test.go:541: missing package: golang.org/fake/b
        packages_test.go:541: missing package: golang.org/fake/c
FAIL
FAIL	golang.org/x/tools/go/packages	34.826s
```
Repository: go
Issue: go/ast: optionally save comments
Labels: NeedsInvestigation,FeatureRequest

go/ast doesn't save comments in the tree when a file is parsed, (they are kept in the field `*ast.File.Comments`). This causes problems for functions like `astutil.PathEnclosingInterval` and forces comments to be special cased in the LSP completions package (context: https://github.com/golang/go/issues/29780).
Repository: godot
Issue: Screen space reflection with roughness does not blur across object edges (fixed in `master`)
Labels: enhancement,topic:rendering,confirmed,topic:3d

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:** 3.1 beta1
<!-- Specify commit hash if non-official. -->


**OS/device including version:** Windows, Linux
<!-- Specify GPU model and drivers if graphics-related. -->


**Issue description:**
<!-- What happened, and what was expected. -->
![image](https://user-images.githubusercontent.com/490327/51411424-b7929680-1ba2-11e9-9d00-6ea5f707f272.png)
As shown in the image, the ground has a roughness of 0 (left) and 0.3 (right) with SSR enabled.
Details *inside* objects get blurred when roughness is large (as shown in green circles) as expected, but object edges does not get blurred (as shown in red circles).

Blurred object edges are expected.

**Steps to reproduce:**
Enable SSR in default_env, add a ground mesh, add a spatial material with metalness set to 1 and roughness set to non-zero. Add any mesh to be reflected.
Repository: vscode
Issue: VS Code holds onto parent console when launched via command line
Labels: bug,upstream,freeze-slow-crash-leak,windows,electron,workbench-cli,upstream-issue-linked

Repro:

1. Open cmd.exe
2. Run `code`
3. Switch back to cmd.exe
4. `exit`

Repro's in stable and insiderrs and does not repro in Atom which is also on Electron 2.

Advice from Windows console team:

> I believe VSCode is reconnecting to its parent hosting console for debugging purposes.

Starting with @joaomoreno who might know who to send this to, not sure who the real owner is though.
Repository: TypeScript
Issue: Cannot import properties from module.exports as types in JSDoc
Labels: Bug,Domain: JavaScript

<!-- 🚨 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.3.0-dev.20190118

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** jsdoc import module.exports has no exported member

**Code**

**a.js**
```js
class A {}

module.exports = {A}
```

**b.js**
```js
// @ts-check
class B {
	// In the JSDoc below, VSCode intellisense does not recognize parameter a as type A.
    // Instead it shows the error:
    //   Namespace '".../a".export=' has no exported member 'A'

	/**
	 * @param {import('./a').A} a
	 */
	constructor (a) {
		this.a = a
	}
}
```

**Expected behavior**
Parameter `a` of the `constructor` should be recognized as type `A`, which is accessible via the `A` property of `module.exports` from `a.js`.

**Actual behavior**
Intellisense reports the error: Namespace '".../a".export=' has no exported member 'A'.

**Notes**
`@param {import('./a')} a` does not give an error, but it resolves to type `{A: typeof A}` instead of `A`.

If `a.js` is modified with `module.exports = A`, then `import('./a')` resolves to `A`, however this restricts `a.js` to only exporting one type.
Repository: go
Issue: x/tools/go/packages: deduplicate identical packages
Labels: NeedsFix,FeatureRequest

go list is returning multiple identical packages in some cases. The go list "driver" in go/packages should deduplicate those packages before returning its results.
Repository: flutter
Issue: Remove path struct members in `blink::Settings` with callbacks that return mappings.
Labels: engine,P2,team-engine,triaged-engine

This will remove any opinions the engine has w.r.t how the various snapshots are packaged within the application.
Repository: rust
Issue: Deref coercions don't work on blocks when the target is sized
Labels: T-lang,C-bug,A-coercions

As seen on [StackOverflow](https://stackoverflow.com/q/53908386/617159).

Consider the following code:

```rust
use std::ops::Deref;

fn main() {
    fn save(who: &str) {
        println!("I'll save you, {}!", who);
    }
    
    struct Madoka;
    
    impl Deref for Madoka {
        type Target = str;
        fn deref(&self) -> &Self::Target {
            "Madoka"
        }
    }
    
    save(&{ Madoka });

    fn reset(how: &u32) {
        println!("Reset {} times", how);
    }

    struct Homura;

    impl Deref for Homura {
        type Target = u32;
        fn deref(&self) -> &Self::Target {
            &42
        }
    }

    // Uncomment this to get a type error
    // reset(&{ Homura });
}
```

The following expressions do compile:

* `reset(&Homura)`
* `reset(&&{ Homura })`
* `reset({ &Homura })`

But this doesn't:

* `reset(&{ Homura })`

```
error[E0308]: mismatched types
  --> src/main.rs:17:14
   |
17 |     reset(&{ Homura });
   |              ^^^^^^ expected u32, found struct `main::Homura`
   |
   = note: expected type `u32`
              found type `main::Homura`
```

Is there are particular reason for this discrepancy?

I found two similar issues #26978 and #32122 but they don't seem to cover this particular case.
Repository: godot
Issue: Vertex color breaks if number of colors mismatches number of polygon vertices
Labels: bug,discussion,topic:editor,confirmed

As of 3.1 beta 2. Likely related to #20601. Having a different number causes the vertex color to not work at all. This can be tested in 2 ways: either changing the vertex colors array size or by adding/deleting vertices (in either case, vertex colors will pop off or on depending on if the number matches).

Behavior in beta 1 and before is that undefined vertex colors were inherited from the color property.

Now it seems this is likely an intentional change, at least because adding internal vertices causes the vertex colors array size to automatically update (the new color defaulting to white rather than the color property)... but aside from breakage, it also makes working with polygons+vertex colors even more clunky (and it's bad enough coloring vertices by number rather than having an editor). 

In many cases, this isn't just a matter of changing the array size to match the number of vertices either, as the inheritance of the color property (as I mentioned before) is now gone. So not only would you need to paste it in for every unspecified vertex, you'd also better hope that you don't plan on changing it (or the number of vertices in the polygon!) for any reason (that would be mitigated if there were some sort of a palette system, particularly if you could specify colors in groups. Like vertices 22-46 are this color and vertices 1, 2, 5, 7 are this color etc.).

That and I think it's fairly obvious the old method was a more helpful/intuitive behavior.