sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Incorrect text caret position on fourslash tester
Labels: Bug

**TypeScript Version:**  master branch

**Code**

Modifying `tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration04.ts`:

```ts
/// <reference path='fourslash.ts' />

////function f<A,B,C>/*1*/(/*2*/a: A, /*3*/b:/*4*/B, c/*5*/, d: C/*6*/


function verifyIndentationAfterNewLine(marker: string, indentation: number, expectedText: string): void {
    goTo.marker(marker);
    edit.insert("\r\n");
    if (expectedText) {
        verify.textAtCaretIs(expectedText);
    }
    verify.indentationIs(indentation);
}

verifyIndentationAfterNewLine("1", 4, '(');
verifyIndentationAfterNewLine("2", 4, 'a');
verifyIndentationAfterNewLine("3", 4, 'b');
verifyIndentationAfterNewLine("4", 8, 'B');
verifyIndentationAfterNewLine("5", 4, ',');
verifyIndentationAfterNewLine("6", 4, undefined);
```

**Expected behavior:** The test must pass

**Actual behavior:**

```
1) fourslash tests tests/cases/fourslash/smartIndentOnUnclosedFunctionDeclaration04.ts fourslash test smartIndentOnUnclosedFunctionDeclaration04.ts runs correctly:
     Error: verifyTextAtCaretIs
        Expected: "("
          Actual: "a"
      at TestState.verifyTextAtCaretIs (src\harness\fourslash.ts:1854:23)
```
Repository: angular
Issue: Issue with queries and the TemplateRef predicate
Labels: freq2: medium,area: core,core: queries,type: confusing,P3

<!--
IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING
-->

**I'm submitting a ...**  (check one with "x")
```
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
```

**Current behavior**
There is a problem introduced after Angular 2.1.1 and that is visible in the current (2.4.3) release:
Say I have one component, C1, that takes all the templates and adds them to the DOM using ngTemplateOutlet. My top component, AppComponent, uses C1 and provides a template to it that does a *ngFor loop over an array of 2 items, and just displays the item value.
The number of items displayed is 3, the last one being undefined.

**Expected behavior**
Expected 2 items being displayed (this was the case in Angular 2.1.1).

**Minimal reproduction of the problem with instructions**
Please see https://plnkr.co/edit/NeTytaYG2bhjJNniED9M?p=preview.

**Please tell us about your environment:**
Windows 10

* **Angular version:** 2.4.3


* **Browser:** All
 
* **Language:** Typescript
Repository: rust
Issue: rustc always links against non-debug Windows runtime
Labels: O-windows-msvc,C-feature-request,T-libs

When building [rust-mozjs](https://github.com/servo/rust-mozjs) with debug symbols enabled, the underlying C++ library links against the debug Windows runtime (`msvcrtd.lib`) rather than the regular one (`msvcrt.lib`). Unfortunately, rustc always links against `msvcrt.lib` unconditionally: https://github.com/rust-lang/rust/blob/da2ce2276873242a101f205537e7ce297d68f8dd/src/vendor/libc/src/windows.rs#L150 . This makes it [impossible](https://github.com/servo/servo/pull/14766#issuecomment-270734225) to build a debug-enabled version of rust-mozjs on Windows.
Repository: go
Issue: x/net/http2: make Transport return nicer error when Amazon ALB hangs up mid-response?
Labels: Unfortunate

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?

$ go version
go version go1.8rc1 darwin/amd64

### What operating system and processor architecture are you using (`go env`)?

Linux AMD64

### 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.

We have http client code that has started to return errors when the corresponding server uses HTTP2 instead of HTTP.

### What did you expect to see?

Identical behavior.

### What did you see instead?

`http2: server sent GOAWAY and closed the connection; LastStreamID=1, ErrCode=NO_ERROR, debug=""`
Repository: opencv
Issue: VideoCapture(String) constructor fails to open gstreamer pipeline on Tegra / CUDA 8.0
Labels: bug,priority: low,category: videoio,incomplete

<!--
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.0
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->

- OpenCV => 3.1
- Operating System / Platform => Ubuntu 16.04 Linux 4 Tegra 24.2.1 aarch64 / Jetson TX1
- Compiler => g++ 5.4.0

##### Detailed description

<!-- your description -->
VideoCapture(string) constructor using a gstreamer pipeline string fails to open a stream, even though the stream can be launched with the same pipeline using gst-launch-1.0. Note that the VideoCapture(int) constructor succeeds at opening a stream with VideoCapture(0) -- although for me, the feed is blank because i currently have no usb camera connected to the tx1.

##### Steps to reproduce

Flash TX1 with Jetpack 2.3.1.
Build opencv 3.1.0 from source using the instructions found [here](http://docs.opencv.org/master/d6/d15/tutorial_building_tegra_cuda.html).

Add the following code to a cpp file named test.cpp

```.cpp
#include "highgui.hpp"
#include "videoio.hpp"
#include "imgproc.hpp"
#include <iostream>
#include <string.h>

using namespace cv;
using namespace std;

int main(int argc, char** argv)
{
  string gst_pipe = "videotestsrc ! videoconvert ! appsink";
  VideoCapture cap(gst_pipe);

  if (!cap.isOpened())
    {
      std::cout << "Failed to open camera." << endl;
      return -1;
    }

  for(;;)
    {
      Mat frame;
      cap >> frame;
      imshow("original", frame);
      waitKey(1);
    }

  cap.release();
}
```

Build it with

```g++ -o test -I /usr/include/opencv2 -Wall test.cpp -L/usr/lib -l:libopencv_core.so.3.1.0 -l:libopencv_videoio.so.3.1.0 -l:libopencv_imgproc.so.3.1.0 -l:libopencv_highgui.so.3.1.0```

Run the resulting executable with ```./test```. Note that no stream is opened, and "Failed to open camera." is printed to the console.
<!-- 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: rust
Issue: Impossible to pass diverging closures as an argument
Labels: A-closures,C-bug

```rust
fn banana<F: FnOnce()>(f: F) -> ! { f(); loop {} }

fn main() {
    banana(move || -> ! { loop {} })
}
```

result

```
error[E0271]: type mismatch resolving `<[closure@<anon>:6:12: 6:36] as std::ops::FnOnce<()>>::Output == ()`
 --> <anon>:6:5
  |
6 |     banana(move || -> ! { loop {} })
  |     ^^^^^^ expected !, found ()
  |
  = note: expected type `!`
  = note:    found type `()`
  = note: required by `banana`
```

Used to work in 1.8.0, so is a regression from stable to stable.
Repository: rust
Issue: Dead code lint emits unused code warning for code that is clearly used.
Labels: A-diagnostics,T-compiler,C-bug

It looks like the dead code lint is too eager, and doesn't consider two signs that the variants are used:
- The enum is passed to an extern function, which could do just about anything to the data.
- The variants *are* used, in the match statement!

[Playground](https://is.gd/BDy0bB)

```rust
use helpers::Animal;

#[forbid(dead_code)]
mod helpers {
    #[repr(u32)]
    pub enum Animal {
        Cat = 0,
        Dog = 1,
        Frog = 2
    }

    extern "C" {
        pub fn transmute_the_animal(animal: &mut Animal);
    }
}

fn main() {
    let mut animal = Animal::Cat;

    unsafe {
        helpers::transmute_the_animal(&mut animal);
    }

    match animal {
        Animal::Cat => println!("My cat didn't change! :("),
        Animal::Dog => println!("Yay. my cat became a dog!"),
        Animal::Frog => println!("Eww, my cat turned into a frog!")
    }
}
```
Expected: A clean build (I think.)

What I got:

```sh
rustc 1.16.0-nightly (2782e8f8f 2017-01-12)
error: variant is never used: `Dog`
  --> <anon>:13:9
   |
13 |         Dog = 1,
   |         ^^^^^^^
   |
note: lint level defined here
  --> <anon>:3:10
   |
3  | #[forbid(dead_code)]
   |          ^^^^^^^^^

error: variant is never used: `Frog`
  --> <anon>:14:9
   |
14 |         Frog = 2
   |         ^^^^^^^^

error: aborting due to 2 previous errors
```
Repository: flutter
Issue: Flutter should get AutoTransition (aka layout transition), where two Widgets can transition between each other
Labels: c: new feature,framework,a: animation,P3,team-framework,triaged-framework

Lets say I have Widget A, which contains some widgets, and then I have Widget B, which contains some more widgets. Each side will have keys that match a source widget to a target widget. AutoTransition will match these up and animate them from their positions in Widget A to their positions in Widget B.

Android implements a feature similar to this with the Transition framework. I actually use this feature in an Android app of mine to expand and contract a music control overlay... Doing this manually in Flutter would not be fun.

I'm guessing (since I haven't touched Flutter internals much) that something like this would animate on the RenderObject layer.
Repository: youtube-dl
Issue: socks.py raised EOFError with Shadowsocks
Labels: cant-reproduce,external-bugs

**Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.01.10. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.**
 I've verified and I assure that I'm running youtube-dl 2017.01.10
**Before submitting an issue make sure you have:**
 At least skimmed through README and most notably FAQ and BUGS sections
 Searched the bugtracker for similar issues including closed ones
**What is the purpose of your issue?**
Bug report (encountered problems with youtube-dl)


i dont  konw  what is wrong, how  can l dowload  this  vido?
**The log output:**
![image](https://cloud.githubusercontent.com/assets/25115961/21954877/0cd7b12c-da99-11e6-946c-7221ab2cc169.png)
![image](https://cloud.githubusercontent.com/assets/25115961/21954883/27466a3a-da99-11e6-8152-8a26cdcd0632.png)
![image](https://cloud.githubusercontent.com/assets/25115961/21954889/4c05b204-da99-11e6-95bf-da63af5c6fa7.png)
Repository: go
Issue: net/http: TestServerHijackGetsBackgroundByte failing on Plan 9
Labels: OS-Plan9,NeedsInvestigation

CL [5232](https://golang.org/cl/35232) added TestServerHijackGetsBackgroundByte, which is failing on Plan 9; because CloseWrite is not implemented on Plan 9.

```
--- FAIL: TestServerHijackGetsBackgroundByte (0.08s)
	serve_test.go:5235: close tcp 127.0.0.1:43532->127.0.0.1:34277: not supported by plan 9
FAIL
```

See https://build.golang.org/log/2024e8d36966ea930ef6b6acd2c744e24734c2aa

This related to issue #17906.
Repository: go
Issue: net/http: TestServerHijackGetsBackgroundByte_big failing on Plan 9
Labels: OS-Plan9,NeedsInvestigation

CL [35234](https://golang.org/cl/35234) added TestServerHijackGetsBackgroundByte_big, which is failing on Plan 9, because CloseWrite is not implemented on Plan 9.

```
--- FAIL: TestServerHijackGetsBackgroundByte_big (0.05s)
	serve_test.go:5300: close tcp 127.0.0.1:63062->127.0.0.1:36638: not supported by plan 9
FAIL
```

See https://build.golang.org/log/8e4622c7d73d3c7c243bcd84d2e366616fc8ce36

This related to issue #17906.
Repository: rust
Issue: [config.toml] should allow specifying arbitrary flags to the `cc` command for a target
Labels: T-bootstrap,C-feature-request,E-needs-design

Currently you can specify

```
[target.somethingweord]
cc = "somethingelse"
```

but cannot make `somethingelse` to also receive flags for the target.
Repository: create-react-app
Issue: Adding a --no-bin-links option
Labels: difficulty: starter,contributions: claimed

Hi !

Is there a way to add a NPM-like --no-bin-links option.
It is used by VM users who share folders between a host and a VM.

Example:
[Vagrant](https://www.vagrantup.com/)
Repository: clean-code-javascript
Issue: Want to translate to Arabic, Japanese, French, etc.?
Labels: help wanted

Starting to translate to Korean.
Feel free to collaborate.

Check it out [here](https://github.com/Hanney-Ryu/clean-code-javascript/blob/master/README-ko.md).
Repository: go
Issue: cmd/gofmt: gofmt -r should preserve multiline formatting
Labels: NeedsInvestigation

go version devel +ac05542 Wed Jan 11 01:39:54 2017 +0000 linux/amd64

gofmt -r does not work well when rewriting multi-line expressions.

Given this code:

	package x
	
	func f() {
		Foo{
			X: 99,
			Y: "hello",
		}
	}

running:

    gofmt -r 'Foo{X: a, Y: b} -> Foo{
        X: a,
        Y: []byte(b),
    }'

results in:

	package x
	
	func f() {
		Foo{X: 99, Y: []byte(
	
			"hello")}
	
	}

In general, if the replacement expression contains multiple lines, their
placement is ignored.
Repository: node
Issue: What will Domain be replaced with?
Labels: question,domain

I'm adding support for parallel tests to node-tap.  https://github.com/tapjs/node-tap/issues/306

One sticky point is that, like most test frameworks, node-tap needs to be able to cleverly handle thrown errors and tie them to the test environment where the error was thrown from (especially since many existing assertion libs turn things like `expect(foo).to.match(/regexp/)` into a thrown error).

When tests were _not_ run in parallel, there was no problem.  Just walk down the tree of `test.currentChild` or whatever, and a single `process.on('uncaughtException')` is sufficient.

I'm using Domains to manage thrown errors in child tests, and it works great, but the bright red deprecation notice in [the docs](https://nodejs.org/api/domain.html#domain_domain) is scary.

What will it be replaced with?  Will it be feature-equivalent?  If so, is there any reason why the existing API has to be broken, and not re-implemented in terms of the new thing?  Is there an expected time frame for the Domain api to be broken?

Thanks.
Repository: nvm
Issue: Adding descriptions about symlinks in the 'nvm is not compatible with the npm config "prefix" option' error
Labels: informational,pull request wanted

I have ran into two machines that shows `nvm is not compatible with the npm config "prefix" option` error everytime `~/.nvm/nvm.sh` is invoked, and which is also mentioned by [existing issues](https://github.com/creationix/nvm/issues/1087).

In the end, I found that in both my machines, the home directories is symlinked to another location. By modifying the nvm load script `.bashrc` to set `NVM_DIR`to the path after symlink resolution, the error goes away for good. It works in new bash sessions as well.

That is, if in your machine it says something like
```
$ ls -l /home
lrwxrwxrwx 1 root root 9 May  7  2014 /home -> /srv/home
$ echo $HOME
/home/username
```

then your nvm will blow up with `nvm is not compatible with the npm config "prefix" option`. To correctly solve the issue, we should change `NVM_DIR` from `$HOME/.nvm` to something like `/srv/home/username/.nvm`.

I think the error message was useless in helping me figure this out. I spent some time tracing `nvm.sh`, inserting `echo` and disabling `--silence` to see my echo, to found that the system admin has setup those symlinks, and it *is* those symlinks that broke nvm.

Specifically, when the condition of [this `if`statement](https://github.com/creationix/nvm/blob/40e40975ebd3593d08c3f83de2546258f7ddf11d/nvm.sh#L2002) turns true, it does not necessarily means that `npm config get prefix` is set by another `npm` instance. It just means that `nvm` is not sure if the prefix is set by nvm itself. I think extending [the error message here](https://github.com/creationix/nvm/blob/40e40975ebd3593d08c3f83de2546258f7ddf11d/nvm.sh#L2007) to include the symlink issue can help others encountering this issue, since it is not uncommon to have home directories symlinked to somewhere else.
Repository: go
Issue: debug/elf: add File.DynValue method to look up DynTag values
Labels: help wanted,Proposal-Accepted,FeatureRequest

Currently there is no method/function to convert elf.Symbol.Info to SymBind and SymType, even thought there is a function ST_INFO to convert SymBind and SymType into uint8.

We probably should have created a new type for Symbol.Info, but we can't do that before Go 2.

Therefore I propose the addition of the following two methods to elf.Symbol:

```
func (s Symbol) Bind() SymBind {
     return SymBind(s.Info >> 4)
}
func (s Symbol) Type() SymType {
    return SymType(s.Info & 0xf)
}
```

Perhaps we could also make elf.Symbol implement Stringer, but I'm not sure about the format yet. Any suggestions?

Additionally, the elf package looks like automated conversion from elf.h as it contains a lot of top-level functions will non-idiolmatic names (R_INFO, R_SYM32, etc.) without any docs. For Go 2, we should get rid of them, and turn them into proper methods with idiomatic names.

/cc @ianlancetaylor
Repository: You-Dont-Know-JS
Issue: You Don't Know JS: Types & Grammar - "What about &&" Code example not clear enough
Labels: for second edition

In **What about &&?** section we have the following code.

```
function foo() {
    console.log( a );
}

var a = 42;

a && foo(); // 42
```

result in comment should indicate that foo was called. but in fact we would get same result of "42" if first operand had been called (like in `||` operator). i think results of `a` and `foo()` should be different to make the example be clearer.

for example:

```
function foo() {
    console.log("foo");
}

var a = 42;

a && foo(); // "foo"
```
Repository: opencv
Issue: Enhancement Objective C: Conversion using static category methods
Labels: feature,platform: ios/osx

In [OpenCV iOS - Video Processing](http://docs.opencv.org/2.4/doc/tutorials/ios/video_processing/video_processing.html#opencviosvideoprocessing) tutorial page there is a guide how to convert `cv::Mat` to `UIImage` and backwards. I have found much easier to use static methods inside category extending `UIImage` itself. I have created a [sample GIST](https://gist.github.com/tomas789/f54080e88e8cfa187228322823328c01). Please consider changing a tutorial using this approach so everybody can use it. Of course, anybody can implement it on his own but it is not that obvious to do it this way.

**Main advantages:**
- Very simple to use
- It can be used everywhere. Not only inside one class where it was implemented
- Copy paste only approach
- There might be folks that are not that familiar with Objective-C++ so them might not come up with this simpler approach instead of using the one proposed in current tutorial page.

**Disadvantages:**
- OpenCV is then included in every Objective-C++ class
Repository: vscode
Issue: Multiple decorations on end of line
Labels: feature-request,editor-core

I would like to be able to add multiple editor decorations on the end of line. 

My use case is nicely decorating inline values to make a difference between a name and a value. A nice example on how chrome does this:

An alternative would be a mechanism that I could somehow specially annotate parts of the contentText, however since we use css::after this might be impossible.

![screen shot 2017-01-17 at 16 00 22](https://cloud.githubusercontent.com/assets/1926584/22026473/2a859722-dcd1-11e6-98ee-a27cf40a4308.png)
Repository: three.js
Issue: The shadow of a partially transparent object
Labels: Enhancement

##### Description of the problem 
The shadow of a partially transparent object should be brighter than that of a completely opaque object, but they're same dark in threejs.
![tmp](https://cloud.githubusercontent.com/assets/18611035/22057097/2a296cc2-dd9e-11e6-907c-62ecd6fc47b5.png)

##### Three.js version

- [x] Dev
- [X] r83
- [ ] ...

##### Browser

- [x] All of them
- [ ] Chrome
- [X] Firefox
- [ ] Internet Explorer

##### OS

- [x] All of them
- [ ] Windows
- [X] Linux
- [ ] Android
- [ ] IOS

##### Hardware Requirements (graphics card, VR Device, ...)
graphics card is GTX 1080.
Repository: node
Issue: 'end' event not called on connected socket wrapped with tls
Labels: tls,stream

* **Version**: v6.9.4, v7.4.0
* **Platform**: Linux pc 4.2.0-30-generic #36-Ubuntu SMP Fri Feb 26 00:58:07 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
* **Subsystem**: net, tls

When wrapping an existing socket with tls, the socket's 'end' event is not called if the socket was already connected.

Example:

In this case 'end' will be called:
```js
var Socket = require('net').Socket;
var tls = require('tls');

var HOST = 'www.google.com';

var socket = new Socket();
var tlsOptions = {
  host: HOST,
  socket: socket
};

socket.on('close', function() { console.log('close'); });
socket.on('end', function() { console.log('end'); });

var tlsSocket = tls.connect(tlsOptions, function() {
  console.log('connected');
  tlsSocket.end();
});

socket.connect({
  port: 443,
  host: HOST
});
```

In this case 'end' will not be called:
```js
var Socket = require('net').Socket;
var tls = require('tls');

var HOST = 'www.google.com';

var socket = new Socket();
var tlsOptions = {
  host: HOST,
  socket: socket
};

socket.on('close', function() { console.log('close'); });
socket.on('end', function() { console.log('end'); });

socket.connect({
  port: 443,
  host: HOST
});

var tlsSocket = tls.connect(tlsOptions, function() {
  console.log('connected');
  tlsSocket.end();
});
```
Repository: rust
Issue: Guarantee that values in hash map are disjoint from each other and the HashMap struct.
Labels: C-enhancement,T-libs-api

There was some discussion about the unsafe guarantees of `HashMap` on Reddit[1] which inspired me to write this issue.

The current HashMap implementation has its entries at memory locations that are disjoint from each other and from the `HashMap` struct. That means that in principle, there could simultaneously exist multiple mutable references to different, disjoint values contained in hash map without aliasing happening. This idea is similar in principle to the reason why `split_at_mut` API on mutable slices can exist.

However, as the `HashMap` currently provides no guarantees for supporting the disjointness of its entries, no unsafe code is allowed to trust it – especially because `HashMap` is a part of the `std`, and we can't currently pin version dependencies to `std`; the implementation of `HashMap` is allowed to "silently" change and break unsafe code.

I think it would make sense to document what the current implementation does in practice as a guarantee: the values stored in hash map are disjoint from each other and from the `HashMap` struct. In practice, this disallows the following situations:

* The `HashMap` struct containing some of its values "inline", inside the struct.
* Some value `v1` containing an instance of another value `v2` (for example, a boxed struct that contains more boxed structs of the same type), and `HashMap` returning a reference to `v2` as a reference to "separate" value from `v1`.

To be sure, I don't mean that `HashMap` should necessarily guarantee that each key maps to a separate value – just that separate values don't alias. Also I don't propose an API that allows multiple unaliased mutable references to the values in hash map; but this guarantee can be seen as a preliminary requirement for such an API to exist in future.

[1] https://www.reddit.com/r/rust/comments/5ofuun/multi_mut_multiple_mutable_references_to_hashmap/