sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: cv::viz::vtkCloudMatSink::WriteData handles colors with 4 channels incorrectly.
Labels: bug,category: viz

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example
- OpenCV => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->

- OpenCV => master


##### Detailed description
Refer to the [code][1]
```.cpp
Mat buffer(cloud.size(), CV_64FC(channels));
Vec3d *cptr = buffer.ptr<Vec3d>();
for(size_t i = 0; i < buffer.total(); ++i)
     *cptr++ = Vec3d(normals_data->GetTuple((vtkIdType)i));
```
`channels` can be either 3 or 4, but the line
```.cpp
Vec3d *cptr = buffer.ptr<Vec3d>();
```
assumes it is 3.

The same applies to normals, see the [code][2]

[2]: https://github.com/opencv/opencv/blob/master/modules/viz/src/vtk/vtkCloudMatSink.cpp#L121

[1]: https://github.com/opencv/opencv/blob/master/modules/viz/src/vtk/vtkCloudMatSink.cpp#L101

<!-- your description -->



<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
    // C++ code example
    ```
 or attach as .txt or .zip file
-->
Repository: opencv
Issue: Inconsistent color ordering in cv::viz::Mesh and cv::viz::WCloud
Labels: bug,category: viz

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example
- OpenCV => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->

- OpenCV => master

When it loads the color of a mesh from a PLY file, it stores
color in RGB order, see the [code][1] here
```.cpp
        for(size_t i = 0; i < buffer.total(); ++i)
            *cptr++ = Vec3d(scalars_data->GetTuple((vtkIdType)i));
```

`cv::viz::WMesh::WMesh` can be [initialized][2] from a `Mesh`, which
calls [cv::viz::vtkCloudMatSource::filterNanColorsCopy][3] and switches
the red and the blue channel
```.cpp
                if (!isNan(mrow))
                    *pos++ = Vec3b(srow[2], srow[1], srow[0]);
```

The problem is that `cv::viz::vtkCloudMatSource::filterNanColorsCopy` is also
invoked inside [cv::viz::WCloud::WCloud][4]
```.cpp
cv::viz::WCloud::WCloud(InputArray cloud, const Color &color)
{
    WCloud cloud_widget(cloud, Mat(cloud.size(), CV_8UC3, color));
    *this = cloud_widget;
}
```
where `Color` is in BGR order.

[4]: https://github.com/opencv/opencv/blob/master/modules/viz/src/clouds.cpp#L57
[3]: https://github.com/opencv/opencv/blob/master/modules/viz/src/vtk/vtkCloudMatSource.cpp#L230
[2]: https://github.com/opencv/opencv/blob/master/modules/viz/src/clouds.cpp#L371
[1]: https://github.com/opencv/opencv/blob/master/modules/viz/src/vtk/vtkCloudMatSink.cpp#L103



<!-- your description -->



<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
    // C++ code example
    ```
 or attach as .txt or .zip file
-->
Repository: go
Issue: x/mobile: gomobile Apps crash on Android 8 at "runtime/internal/atomic.Cas"
Labels: mobile

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?
go1.9.3

### Does this issue reproduce with the latest release?
I just tested version 1.9.2 and 1.9.3, both of them have this issue.

### What operating system and processor architecture are you using (`go env`)?
The gomobile App crash on Android 8.0.0~8.1.0 . The processor architecture is armeabi-v7a on real devices. Actually I got the issue from crash report of my Android App.

### What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

Maybe this issue is similar to #20409 . I just got some limited information from the Android crash report.


### What did you expect to see?
What caused the crash and how to fix this?

### What did you see instead?

From crash report:
```
signal 31 (SIGSYS), code 1 (SYS_SECCOMP)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.github.dawndiy.bifrostv <<<

backtrace:
 
  #00  pc 00000000003a4090  /data/app/com.github.dawndiy.bifrostv-cgCD2dB5iSPpbiG9ujWdPA==/lib/arm/libgojni.so (syscall.Syscall+40)
  #01  pc 000000000033b000  /data/app/com.github.dawndiy.bifrostv-cgCD2dB5iSPpbiG9ujWdPA==/lib/arm/libgojni.so (runtime/internal/atomic.Cas+16)
```

The crash happened on Android 8 device only, include Google Pixel, Pixel 2 and other Android 8 devices.
Repository: rust
Issue: -Z time-llvm-passes prints info on incremental builds while doing non incremental builds
Labels: T-compiler,A-incr-comp,C-bug

This is kind of weird, when building with ````CARGO_INCREMENTAL=0 RUSTFLAGS="-Z time-passes -Z time-llvm-passes"```` in release mode, rustc will still print
````
warning: The output of `-Z time-llvm-passes` will only reflect timings of re-translated modules when used with incremental compilation
````
while building a crate, although incremental build is explicitly disabled.
Why is it doing that?


````
rustc 1.25.0-nightly (3d292b793 2018-02-03)
cargo 0.26.0-nightly (1d6dfea44 2018-01-26)
````
Repository: flutter
Issue: How to make the screen moving with the Drawer?
Labels: c: new feature,framework,a: animation,f: material design,a: tablet,P3,team-design,triaged-design

Default : 
![2018-02-05 11 55 05](https://user-images.githubusercontent.com/13853/35787754-7e8e83ce-0a6b-11e8-8a42-da838dc3e4f1.png)
`

This is what I want :

![2018-02-05 11 48 56](https://user-images.githubusercontent.com/13853/35787810-e22e7308-0a6b-11e8-9311-4f768825afc6.png)
Repository: rust
Issue: Make the way to get intel-formatted assembly from rustc more discoverable
Labels: A-frontend,C-enhancement,T-compiler

As far as I can tell, nowhere in `rustc --help` does it say how to control the ASM syntax.  I only found it by finding this random gist: https://gist.github.com/bluss/5a088d3f420d12406689439e2940d731

Brainstorming ways to make it more discoverable:
- add an `--emit=asm-intel` option
- document `-C "llvm-args=-x86-asm-syntax=intel"` in the help somewhere
- ???
Repository: opencv
Issue: cv::viz::readMesh should support OBJ format as well
Labels: feature,category: viz

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example
- OpenCV => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->

- OpenCV => master


##### Detailed description
See the [code][1]
```.cpp
cv::viz::Mesh cv::viz::readMesh(const String& file) { return Mesh::load(file); }
```
Since `Mesh::load()` support both PLY and OBJ formats, see [here][2]
```.cpp
           /**
            **File type** can be one of the following:
            -   **LOAD_PLY**
            -   **LOAD_OBJ**
             */
            static Mesh load(const String& file, int type = LOAD_PLY);
```
Therefore, `cv::viz::readMesh` should support OBJ format as well.


[2]: https://github.com/opencv/opencv/blob/master/modules/viz/include/opencv2/viz/types.hpp#L145
[1]: https://github.com/opencv/opencv/blob/master/modules/viz/src/vizcore.cpp#L243
<!-- your description -->


<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
    // C++ code example
    ```
 or attach as .txt or .zip file
-->
Repository: kubernetes
Issue: StatefulSet support for clean decommission on scale down
Labels: kind/feature,sig/apps,lifecycle/frozen

/kind feature

StatefulSets are nice resources. But most stateful applications need to execute a custom "decommission" procedure that must be executed (**correctly**) when a instance is removed permanently from the cluster.

**Examples:**
- When scaling down from say 5 pods to 4 pods, many datastores require that data contained in the 5th pod is rebalanced across the cluster
- Applications forming distributed clusters distinguish the case where a instance is temporary unreachable from the case where the instance is administratively removed with a "scale down": in the second case a special "decommission" procedure has to take place
- In other cases (e.g. transactions), data stored in the stateful set is "temporary" (although it needs to be persisted across restarts), so the application developer wants to put the application into a "terminating" state and wait for all data to be flushed to external resources before allowing "decommission" of the instance

The **problem** in Kubernetes is twofold:

**1) Pods that are requested to terminate (SIGTERM) are not informed by Kubernetes if it's a permanent termination or a temporary** one (i.e. if the stateful pod will be removed from the set or it will be recreated on another node)

**2) Kubernetes does not require the decommissioned pod to terminate gracefully for the scale down operation to succeed:** if the **termination grace period** is not enough for the cleanup operation to complete, or also if the docker container is killed during the termination phase, the pod is considered terminated and the set is scaled down, but the "decommission" operation may be incomplete

Currently applications need mechanisms for auto-detection of such scenarios (when a pod is not reachable for some time, it is considered gone). I've seen also people creating custom "controller" pods, that monitor such events in the cluster and start a custom "recovery" pod to cleanup data left behind.

It would be nice if StatefulSets could have hook to detect *decommission* vs. *termination* and allow to plug a different behavior on graceful termination in case of decommission.
Repository: go
Issue: x/text: ISO8859_1 charmap does not map invalid bytes to replacement character
Labels: NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?
1.9.1 linux/amd64

### Does this issue reproduce with the latest release?
Yes

### What operating system and processor architecture are you using (`go env`)?
linux, amd64

### What did you do?
https://play.golang.org/p/Z5uLLszLkXm

### What did you expect to see?
Byte values which are not valid ISO-8859-1 characters should map to the Unicode replacement character (0xfffd) when decoding.

### What did you see instead?
Byte values which are not valid characters map to the Unicode code point with the same value as the original byte.
Repository: go
Issue: net/http: new HTTP client package
Labels: Thinking,NeedsInvestigation

Tracking bug for higher-level more usable HTTP client functionality.

* take contexts
* more timeout control per-request, rather than per-transport/client
* ...Options pattern?
* decode into JSON/etc easily?
* treat non-2xx as error (by default?).
* slurp entire response from server (by default?)
* control over max response size (some sane default limit when slurping is enabled)

I thought we had a bug for this, but maybe not.
Repository: pytorch
Issue: Delete obsolete `THCDeviceTensor::downcastOuter` / `THCDeviceTensor::downcastInner` functions
Labels: module: bootcamp,module: cuda,triaged,small,better-engineering

This is a reminder to self to do this.

Also check to make sure nothing calls them anymore. I believe there are a lot of helper functions that call them but all those helper functions are unused.

cc @ngimel
Repository: TypeScript
Issue: --esModuleInterop: Strange incompatibility between correct and incorrect import of same type
Labels: Suggestion,In Discussion,Domain: Error Messages,Experience Enhancement

**TypeScript Version:**  master

**Code**

**b.d.ts**
```ts
declare class C {
    f: this;
}
declare namespace C {}
export = C;
```

**a.ts**
```ts
import * as C1 from "./b";
import C2 = require("./b");

function f(t: (c: C1) => void): void {
    t(new C2());
}
```

**Expected behavior:**

Error at `import * as C1`.

**Actual behavior:**

No error at the import declaration. Error at `new C2()`:
```ts
src/a.ts(5,7): error TS2345: Argument of type 'C' is not assignable to parameter of type 'C'.
  Types of property 'f' are incompatible.
    Type 'C' is not assignable to type 'this'.
```

(possibly related: #20704)
Repository: TypeScript
Issue: esmoduleinterop: Improve error message when calling static method on class
Labels: Suggestion,Help Wanted,Domain: Error Messages

**TypeScript Version:** master

**Code**

**b.d.ts**:
```ts
declare class C { static m(): void }
declare namespace C {}
export = C;
```

```ts
import * as C from "./b";
C.m();
```

**Expected behavior:**

```
src/a.ts(1,1): error TS7038: A namespace-style import will import a module namespace object, not a class.
src/a.ts(2,3): error TS2339: Property 'm' does not exist on type 'typeof C'.
```

**Actual behavior:**

`src/a.ts(2,3): error TS2339: Property 'm' does not exist on type 'typeof C'.`
Repository: create-react-app
Issue: different default HOST in development mode from webpack-dev-server (0.0.0.0 vs localhost)
Labels: issue: proposal

The [default host](https://github.com/facebook/create-react-app/blob/next/packages/react-scripts/scripts/start.js#L59) in the start script is `0.0.0.0`. This differs from the default of webpack-dev-server which is to bind to localhost.

I found this out by reading the output of `npm run dev`:

```
You can now view app in the browser.

  Local:            http://localhost:3001/
  On Your Network:  http://192.168.43.210:3001/

Note that the development build is not optimized.
To create a production build, use yarn build.
```

I hadn't noticed it much before, but I happened to be in a coffee shop working on an API client, so I found it a bit concerning that it was being exposed to the outside. The use case given is for Tools like cloud9. I suggest having them alter their `package.json` to `"start": "HOST=0.0.0.0 react-scripts start"` or something instead of having the unusual use case made the default.

If nothing else, if the default can be changed, the message shown when running `npm run dev` can be simplified. If you have the typical use case of using it for dev only on your machine it's unnecessary, and if you're using ngrok it's a bit redundant.
Repository: rust
Issue: -Z time-llvm-passes prints no info for llvm passes during LTO
Labels: A-LLVM,C-enhancement,T-compiler

There is information printed when building the individual crates, but when linking everything together and applying llvm passes to the entire program, no information is given:

````
   time: 0.210; rss: 607MB	ll link "allocator"
    time: 52.029; rss: 693MB	LTO passes
    time: 87.689; rss: 693MB	codegen passes [alacritty3]
  time: 193.546; rss: 262MB	LLVM passes
  time: 0.000; rss: 254MB	serialize work products
    time: 0.000; rss: 253MB	altering alacritty-664aed616dcaaec4.rlib
````
It might be neat to have that.
Repository: pytorch
Issue: NVIDIA_DRIVER_CAPABILITIES env variable is missing in pytorch docker images
Labels: triaged,module: docker

I use the pytorch:v0.2 from dockerhub, I found the NVIDIA_DRIVER_CAPABILITIES env variable is missing

```
root@pytorch:/workspace# echo $NVIDIA_DRIVER_CAPABILITIES

```
but when I use the base image of pytorch `nvidia/cuda:8.0-cudnn6-devel-ubuntu16.04` according to the Dockerfile https://github.com/pytorch/pytorch/blob/master/Dockerfile, the result is correct.

```
root@cuda8:/# echo $NVIDIA_DRIVER_CAPABILITIES
compute,utility
```

could anyone help to check this?

some information:
```
$ docker images pytorch/pytorch:v0.2
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
pytorch/pytorch     v0.2                4f6a5501c844        5 months ago        3.24GB

$ docker images nvidia/cuda:8.0-cudnn6-devel-ubuntu16.04
REPOSITORY          TAG                            IMAGE ID            CREATED             SIZE
nvidia/cuda         8.0-cudnn6-devel-ubuntu16.04   ad0e48bad1f2        7 days ago          1.97GB
```
Repository: flutter
Issue: Get dimensions of widget after layout without render 
Labels: c: new feature,framework,c: proposal,P3,team-framework,triaged-framework

## Steps to Reproduce

In the moment we read out the size of the widget in the build method with a delay in order to get the correct size when the build update is done. That looks rather like a hack and has to be called 
twice in order to work (see code). I would like to see an save callback (overwrite) in the derived state class where I can safely read the new size after build update. Maybe I just did not find it. The use case here is that two widget in a stack are depended on there position (height) but they are not lay-outed together.

```dart

 @override
  Widget build(BuildContext context) {
   ...
   new Future.delayed(
        const Duration(milliseconds: 60),
        () => setState(() {
              textComposerWidgetHeight = context.size.height + 70;
            })).then(
      (_) => new Future.delayed(
            const Duration(milliseconds: 60),
            () => setState(() {
                  textComposerWidgetHeight = context.size.height + 70;
                }),
          ),
    );

## Flutter Doctor

[√] Flutter (on Microsoft Windows [Version 10.0.16299.214], locale en-US, channel dev)
    • Flutter version 0.0.21 at c:\sdks\flutter
    • Framework revision 2e449f06f0 (7 days ago), 2018-01-29 14:26:51 -0800
    • Engine revision 6921873c71
    • Tools Dart version 2.0.0-dev.16.0
    • Engine Dart version 2.0.0-edge.da1f52592ef73fe3afa485385cb995b9aec0181a

[√] Android toolchain - develop for Android devices (Android SDK 27.0.2)
    • Android SDK at C:\Users\ride4\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[√] Android Studio (version 3.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[√] IntelliJ IDEA Community Edition (version 2017.2)
    • Flutter plugin version 19.1
    • Dart plugin version 172.4343.25

[√] Connected devices
    • Android SDK built for x86 • emulator-5556 • android-x86 • Android 7.1.1 (API 25) (emulator)
Repository: vscode
Issue: Provide ability to ignore all whitespace in diff editor (feature request)
Labels: feature-request,diff-editor

Steps to Reproduce:

1. In settings it's possible to set `"diffEditor.ignoreTrimWhitespace": true`
2. There's no option to ignore all whitespace, 

Would it be possible to add `"diffEditor.ignoreAllSpaces": true`? I believe the command-line to achieve this would be something like `git diff --ignore-space-at-eol -b -w [commit]...`

h/t [Daniel Gomez @ coderwall](https://coderwall.com/p/crj69a/from-a-useless-git-diff-to-a-useful-one)

[edit]
Might only need `-w` ?
[/edit]
Repository: electron
Issue: Clipboard: allow to write to buffer from clipboard.write() method
Labels: enhancement :sparkles:

* Electron version: 1.7.x
* Operating system: macOS

### Expected behavior

The method [`clipboard.write()`](https://github.com/electron/electron/blob/master/docs/api/clipboard.md#clipboardwritedata-type) accepts a data object but does not allow to write to a custom format with a `Buffer` (like `clipboard.writeBuffer()` does). 

It would be great if this method could be changed to something like: 

```javascript
clipboard.write({
  text: "some text",
  myFormat: new Buffer("some format")
});
```

My understanding is that the advantage of `clipboard.write()` is that I can set multiple clipboard contents at once so that the one format does not overwrite any other. Today, when I want to use `clipboard.writeBuffer()`, I cannot use it together with the other formats.
Repository: node
Issue: listening to sigint don't exit nicely
Labels: child_process

* **Version**: master (83c93158fb0e979dbffb4a776d237da0db8f7b08)
* **Platform**: MacOS
* **Subsystem**: `process`, `trace_events`

Run the following program, hit Ctrl+C. I would then expect `got SIGINT` and `exit` to be printed. It prints neither.

The problem that I'm really having, is that if I add `--trace-events-enabled --trace-event-categories node.async_hooks` to `spawn` then it doesn't flush the `trace_events`. I don't think this is a duplicate of https://github.com/nodejs/node/issues/14802, as the `SIGINT` handler is supposed to shut down the process nicely. But the signal handler simply doesn't execute.

```js
const fs = require('fs');
const { spawn } = require('child_process');

const CODE = `
const http = require('http');

// Keep the process alive
const server = http.createServer();
server.listen();

process.once('SIGINT', function () {
  console.log('got SIGINT');
  server.close();
});

process.once('exit', function () {
  console.log('exit');
});
`;

const proc = spawn(process.execPath, ['-e', CODE], {
  stdio: 'inherit'
});

// relay SIGINT to process
process.once('SIGINT', function () {
  proc.kill('SIGINT');
});
```
Repository: vscode
Issue: Add command to select all next occurrences for all cursors
Labels: feature-request,editor-multicursor

Consider the following:

<img width="160" alt="screen shot 2018-02-06 at 8 23 26 am" src="https://user-images.githubusercontent.com/2193314/35870688-207a2aa2-0b17-11e8-92f7-1cde31a3eeef.png">

Pressing cmd+d adds the quote to the right of `"Meta`:

<img width="181" alt="screen shot 2018-02-06 at 8 24 49 am" src="https://user-images.githubusercontent.com/2193314/35870729-3af10752-0b17-11e8-81c0-2ff658d3e3d9.png">

Pressing it again does nothing, presumably because it saw that the next quote was already selected.

This was the first time I did this, but I expected cmd+d to select the next item of each of the selections.
Repository: rust
Issue: Non-items dropped in custom derive
Labels: C-enhancement,A-diagnostics,T-compiler,A-macros-2.0

Hi.
It looks like when you generate non-items in a custom derive, they are silently dropped.
For instance, with the following custom derive:
```rust
#[proc_macro_derive(HelloWorld)]
pub fn hello_world(input: TokenStream) -> TokenStream {
    let ast = syn::parse(input).unwrap();
    let gen = impl_hello_world(&ast);
    gen.into()
}

fn impl_hello_world(ast: &syn::DeriveInput) -> quote::Tokens {
    let name = &ast.ident;
    quote! {{
        fn hello_world() {
            println!("Hello, World! My name is {}", stringify!(#name));
        }
        hello_world();
    }}
}
```
and the following code:
```rust
fn main() {
    #[derive(HelloWorld)]
    struct _Toto {
    }
}
```
nothing is printed on the screen.
So, is it normal that non-items are dropped?
Could they be generated as well if it makes sense (like in a struct that is defined within a function)?
If not, if would be nice to have a least a warning when this happen.
Thanks.

cc @jseyfried @alexcrichton @nikomatsakis