sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Object.constructor isn't implemented specifically enough
Labels: Bug,Help Wanted

Consider:

``` ts
class Foo extends ([].constructor) {
}
```

`[].constructor` should be `Array`, which we aught to be able to extend. However, the checker complains on `[].constructor` that "Type 'Function' is not a constructor function type". Considering `.constructor` is _quite explicitly_ the constructor function for the object, I believe this is a lie perpetuated by our `lib.d.ts` files. I think we need to go add appropriate self-constructor-referencing `.constructor` fields to each builtin.

_Additionally_ consider the following:

``` ts
class Bar {
}

class Foo extends ((new Bar()).constructor) {
}
```

The same thing but with a custom class rather than a builtin. We should know the correct type of `.constructor` here (the `Bar` class), but we don't - we just look at the members on `Object`.

In the first example, I believe it could be fixed with more precise lib files, but in the second case, I believe this is an instance of a field whose type should be known by the compiler, much like `.prototype` on the class itself is known.
Repository: react
Issue: Play Nicely with The DOM Event System (because it's legacy anyway)
Labels: Type: Big Picture,React Core Team

Currently React implements its own plugin system and event bubbling rules. This is important for systems like the responder system since the DOM event system is incapable of implementing proper event negotiation support.

However, on desktop, we don't really take full advantage of our custom event system other than to polyfill mouseenter/leave and implement more bubbling.

There are plenty of other things that are wrong with the DOM but instead of patching it, maybe it would be better to build a new view system on top of the DOM that integrates with the custom event system. Similarly to how React Native handles things.

That way, the lowest level could just do what the DOM would do, however broken it may be.

Question though: How do we handle things like onChange?

cc @spicyj and @syranide since I know you always wanted this.
Repository: go
Issue: x/net/websocket: Asymmetric treatment of Origin
Labels: NeedsInvestigation

In the docs for websocket.Handler it says you can ignore Origin, for non-browser requests as an example. However the Dial\* functions all throw errors if an empty origin is provided.
Repository: opencv
Issue: BFMatcher doesn't work with MatVector
Labels: bug,priority: normal,category: features2d

```
    fastDetector->detect(l, imgL_keypoints);
    descriptor->compute(l, imgL_keypoints, imgL_descriptors);

    vector<Mat> descriptorsL;
    for (int i = 0; i < imgL_descriptors.rows; i++)
    {
        descriptorsL.push_back(imgL_descriptors.row(i));
    }

    fastDetector->detect(r, imgR_keypoints);
    descriptor->compute(r, imgR_keypoints, imgR_descriptors);
    vector<Mat> descriptorsR;

    for (int i = 0; i < imgR_descriptors.rows; i++)
    {
        descriptorsR.push_back(imgR_descriptors.row(i));
    }
    vector<DMatch> matches;
    BFMatcher matcher;

    matcher.match(descriptorsL, descriptorsR, matches);
```

This code breaks on the last line.
Console writes out:

```
OpenCV Error: Assertion failed (masks.size() == imageCount) in 
cv::DescriptorMatcher::checkMasks, file ..\..\..\modules\features2d\src\matchers.cpp, line 605
```

I read [here](http://docs.opencv.org/master/d4/d32/classcv_1_1__InputArray.html#gsc.tab=0) that OpenCV's `InputArray` can take `vector<Map>` so I assume this is a bug?
Repository: youtube-dl
Issue: Unable to download this ESPN's film vidoe.
Labels: bug

Hi!

$ youtube-dl -v http://espn.go.com/30for30/film?page=the-schedule-makers
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://espn.go.com/30for30/film?page=the-schedule-makers']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.08.28
[debug] Python version 2.7.3 - Linux-3.2.0-4-amd64-x86_64-with-debian-7.9
[debug] exe versions: avconv 1.2.12, avprobe 1.2.12, ffmpeg 1.2.12, ffprobe 1.2.12, rtmpdump 2.4
[debug] Proxy map: {}
WARNING: The program functionality for this site has been marked as broken, and will probably not work.
[ESPN] film?page=the-schedule-makers: Downloading webpage
ERROR: Unable to extract video id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/home/ant/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 655, in extract_info
    ie_result = ie.extract(url)
  File "/home/ant/bin/youtube-dl/youtube_dl/extractor/common.py", line 287, in extract
    return self._real_extract(url)
  File "/home/ant/bin/youtube-dl/youtube_dl/extractor/espn.py", line 45, in _real_extract
    webpage, 'video id')
  File "/home/ant/bin/youtube-dl/youtube_dl/extractor/common.py", line 575, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract video id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Thank you in advance. :)
Repository: go
Issue: spec: clarify how unsafe.Pointers may be used to determine offsets between addresses
Labels: NeedsInvestigation

For background see discussion at https://groups.google.com/d/topic/golang-nuts/Uet5p_3JhZs/discussion

Currently it is possible to determine the offset between two values' addresses by finding the difference between uintptrs converted from unsafe.Pointer values. This is the only way to be able to determine whether two slices overlap in memory since the advent of three index slicing and the only way to determine in less than linear time whether blocked sparse slices overlap (relevant for views in constructed 2D slices for e.g. BLAS operations). In the event that a moving GC is implemented this may no longer be safe; if a GC move occurs between taking the conversion to uintptr of address of the first and second values, the offset may be incorrect. Note that the GC move does not otherwise invalidate the offset between overlapping slices or falsely result in non-overlapping being construed as overlapping.
Repository: electron
Issue: Support two-finger swipe navigation
Labels: enhancement :sparkles:,pr welcome

OSX supports various gestures with the trackpad. One of the most useful of these is the two-finger swipe which allows you to navigate forward and backward in web apps. This could be very useful for electron apps.
Repository: go
Issue: cmd/go: 'go test' should dynamically compute best timeout
Labels: NeedsDecision

Using `go1.5`

I discovered that "go test" crashes after the timeout of 600s has passed. I was running all the benchmarks in `compress/flate` and I set `-benchtime 10s`. Since each benchmark will run for about 10s or more, and there are 36 benchmarks in that package, this occupies at least 360s, which is running close to the default of 600s.

In situations like these, the `go test` tool should be able to figure out that a timeout of 600s is cutting things close when running 36 benchmarks each for 10s and choose a timeout that is more appropriate.
Repository: youtube-dl
Issue: specify config file
Labels: request

there's an option to --ignore-config  is there any plans to allow specify a specific config file, that is multiple config files.?

Examples, downloading certain file types from specific sites.  Downloading with username and password and parameters depending which sites you're downloading from.

Ultimately, I guess it's no more cumbersome than having a shell script, with command line options for specific downloads and/or using --ignore-config as needed.

DJ
Repository: go
Issue: x/mobile/exp/sensor: simplify os thread proxifying mechanism on Android
Labels: mobile

The Android implementation of the sensor package need to initialize a ALooper. ALoopers must be accessed from the same OS thread, therefore each operation on the package must be done on a goroutine that is locked to an OS thread.

The current mechanism accepts new messages through a signal channel depending on the signals type, invokes the required functions and sets the return values. It requires each function call to be represented with a different input signal.

This mechanism could be simplified by making the locked goroutine consuming a chan of functions.

``` go
type inOut func(done chan struct{})

m.inOut <- func(done chan struct{}) {
    // do something on the locked goroutine
    // when done, close done.
    close(done) 
}
```
Repository: go
Issue: runtime: c-shared with LD_PRELOAD does not work for some programs
Labels: compiler/runtime

I'm trying to make my own LD_PRELOAD-able library like this:

``` go
// compile: go build -buildmode=c-shared -o example.so example.go
// tested with Go 1.5 on Ubuntu 15.04 amd64
package main
import "C"
func main() {}
//export dummy
func dummy() C.int { return 42 }
```

This `example.so` works well with several simple programs such as `ls`, `cat`, `cp` and so on.

```
$ LD_PRELOAD=./example.so ls
```

However, some programs such as `firefox`, `google-chrome`, `gdb` get segfault immediately (or sometimes just get hung up).

I suspect this is a bug of the Go runtime.

Anyone can please look on this?

Note that C-implementation seems working well with any program:

``` c
// compile: gcc -Wall -fPIC -shared -o example-c.so example.c
int dummy() { return 42; }
```
Repository: TypeScript
Issue: Un used variable is emmitted while transpiling enums.
Labels: Suggestion,Help Wanted

# TypeScript code

<pre>
<code>
module Workspace {
  export enum State {
    IN_PROGRESS,
    BUFFER_RENDERED,
    SKIPPED,
    TIME_OUT
  }
}
</code>
</pre>

# Compled JavaScript Code.

<pre>
 <code>
var Workspace;
(function (Workspace) {
    (function (State) {
        State[State["IN_PROGRESS"] = 0] = "IN_PROGRESS";
        State[State["BUFFER_RENDERED"] = 1] = "BUFFER_RENDERED";
        State[State["SKIPPED"] = 2] = "SKIPPED";
        State[State["TIME_OUT"] = 3] = "TIME_OUT";
    })(Workspace.State || (Workspace.State = {}));
    var State = Workspace.State; // this code is use no where.
})(Workspace || (Workspace = {}));
</code>
</pre>


I am using TypeScript version 1.5.3
Repository: go
Issue: cmd/internal/obj: lacks tests
Labels: compiler/runtime

There are no tests that check the validity of the generated bytestream against some known golden sample.
Repository: gin
Issue: Pass var to route handler
Labels: question

Hi,

how can I pass a var (db connection pointer) to a route handler like this:

apiV1.GET("/users/:userid", userHandler)

so that I can use in userHandler ?

Now I use a global var but I want to move the handler functions to another package
Repository: TypeScript
Issue: static property inheritance complaining when it shouldn't
Labels: Suggestion,Committed

I've seen that you've already closed many issues on this. But I'm reporting another one in hopes to wear you down ;)

It seems I can't change the signature of a static function in a derived class. The fact that the subclass is at all aware of the static functions on the super class is really strange.

I developed in C# for years, so I know what you were _trying_ to do... but given that you don't support a `new` keyword like C# does, I think this behavior is really wrong. If you're looking to target being a superset of ES6/ES7, you need to correct this behavior ASAP. Generally in JavaScript, static properties are not copied to subclasses unless the copy is explicit.

I ran into this issue with [RxJS Next](https://github.com/ReactiveX/RxJS), where I Subject must inherit from Observable, but they both need _different_ static `create()` signatures. So I end up hacking around and fighting TypeScript.
Repository: go
Issue: x/build: submit queue, possibly implemented as optional auto-submit on +2 when trybots/slowbots with rebase pass
Labels: Builders,FeatureRequest

I see a trend of giving +2 together with trybot recently.
because we've defined that +2 means it's ok to submit,
I wonder if trybot could just submit the change (on behave
of the user who gives +2 and also invokes the trybot) if
the trybot runs are successful.

what do you think?
Repository: go
Issue: x/mobile/event/mouse: include button state in event
Labels: mobile

The Button field records which button is transitioning, but for some applications (like chording) it would be nice if there was also a bitmask that said which buttons are up and down. This value can be integrated by following the transitions, but it's arguably something that could be done once by the mouse event driver.
Repository: go
Issue: x/mobile/event/mouse: implement helper method for modifier keys
Labels: mobile

It is conventional that on a laptop with only a trackpad button, option and command (on Macs) turn a click into a middle or right click. It would be nice to have this functionality provided once, in the mouse package.
Repository: youtube-dl
Issue: Site Support Request: Popular Science / Portico Player
Labels: site-support-request

```
$ youtube-dl --version
2015.09.03
```

```
$ youtube-dl -g http://www.popsci.com/thorium-dream
WARNING: Falling back on generic information extractor.
http://www.popsci.com/\/\/www.popsci.com\/sites\/all\/modules\/bonnier\/bonnier_analytics\/providers\/omniture\/js\/s_code.js
```

The video is ultimately a straight-up MP4 inside a `video` tag, but it's injected via Javascript. Would love it if there were a way to support this kind of presentation.
Repository: opencv
Issue: about pyopencv_to in cv2.cpp
Labels: bug,category: python bindings,priority: low,affected: 3.4

Hey guys,
I am trying to compile OpenCV with ICC compiler. The code is from github , the latest version. When python component was compiled, it showed me this error message :

```
[ 64%] Building CXX object modules/python2/CMakeFiles/opencv_python2.dir/__/src2/cv2.cpp.obj
cv2.cpp
.\pyopencv_generated_types.h(1838): error: function "pyopencv_to(PyObject *, T &, const char *) [with T=cv::Moments]" was referenced but not defined
  template<> bool pyopencv_to(PyObject* src, cv::Moments& dst, const char* name);
                  ^
```

And then, I located the file `pyopencv_generated_types.h` and found out it was just a declaration 

``` CPP
template<> bool pyopencv_to(PyObject* src, cv::Moments& dst, const char* name);
```

And I also found it in cv2.cpp:

``` CPP
template<typename T> static
bool pyopencv_to(PyObject* obj, T& p, const char* name = "<unknown>");
```

It that normal, or the issue of code generation ?

Gerron Jo
Repository: go
Issue: net: allow custom Resolver method implementation(s)
Labels: help wanted,Proposal,Proposal-Accepted

I mentioned in #12476 that I would like to detect the time it took for DNS resolution phase of the Dial process in `Dialer.Dial` . The solution posted there was very hacky and adds unnecessarily to the API.

@bradfitz suggested

> Perhaps `net.Dialer` could have an optional `Resolver`, akin to how `http.Client` has an optional `Transport`, or `http.Server` has an optional `ErrorLog`, etc.

This seems like an excellent idea. Here is how I propose we go about it by adding minimal complexity and preserving code compatibility.

I propose net package adds a new `Resolver` interface.

```
type Resolver interface {
    Resolve(host string, deadline time.Time) (addrs []IPAddr, err error)
}
```

The signature of `Resolver.Resolve` is same as `lookupIPDeadline` which `Dial` eventually uses. `Dialer` gets an optional field `CustomResolver` of type `Resolver`.

The `Resolver` object (or `nil`) gets passed around thru the resolution process.

`Dialer.Dial` -> `resolveAddrList` -> `internetAddrList` .

`internetAddrList` currently always uses `lookupIPDeadline`, it would need to be changed such that if the passed custom resolver is not nil then use it, otherwise use `lookupIPDeadline`.

Other functions calling `resolveAddrList` or `internetAddrList`  would need to be modified to add an extra `nil` argument . This does not break code compatibility because they are unexported functions.

Benefits of allowing a custom `Resolver`
- Allowing me to collect timing information as mentioned in #12476
- Allowing users to implement their own DNS logic. Failovers, etc.
- Mocking for tests.
- Client side caching, pre-fetching, etc.
- In time, other packages ( like the superb github.com/miekg/dns ) could provide their own `Resolver` implementations.
- Great for people like me who rely on Go to write network debugging tools.
Repository: go
Issue: x/build: bring back "broke the build" notifications
Labels: help wanted,Builders,NeedsInvestigation,FeatureRequest

I monitor the dev.ssa dashboard for build failures, with decreasing frequency these days. It'd be nice to bring back the automatic notification.

cc @bradfitz
Repository: go
Issue: x/mobile/example/audio: build on windows system,run CRASH
Labels: OS-Windows,mobile

Hello.
I am using gomobile in Windows System.
When build the example named "Audio",it is successful.Howevery,when run it on the Genymotion virtual device and a true Android device, the application is crashed the same.
After the debug, something I found:
- I can find the error message from logcat, it show this: 

```
I/GoLog   ( 9589): al: cannot load libopenal.so 
```
- Additionally, I try to delete code line, then I am sure this code (in onStart function) throw this error:

```
rc, err := asset.Open("boing.wav") 
```

Is someone get the same error when running the example of "Audio" ?

---

I am not sure is this the issues from gomobile,or other reason? 
However, as a new developer who use gomobile to build android apps,I read the document from:
https://godoc.org/golang.org/x/mobile/example/audio
It tell me just  to use "gomobile build".
Additionally, I notice the message about:

```
On Linux, you need to install OpenAL developer library by running the command below. 
$ apt-get install libopenal-dev
```

However, on Windows, do I need to do something  similarly?
If the GoDoc could write down it  more clearly, we walked some detours can be avoided. :)

---

I am using the newest gomobile package and keep to update everyday.
So everything is newest when this problem was happended.
Thank you sincerely.
Repository: go
Issue: runtime: throw in linked c++ library causes app crash even if caught, on windows platform
Labels: help wanted,OS-Windows,NeedsInvestigation

when compiling go code using cgo to link a c++ application that uses try/catch/throw logic, the golang app crashes immediately when an exception is thrown.  on linux, it performs as expected.  

code versions:
    go version go1.5 windows/amd64
    tdm64-gcc-5.1.0-2

the code that demonstrates issue can be found in https://gist.github.com/superbaddude/b52e60f2e8dee0868af2

the output from command on windows:

```
go test
```

```
=== RUN   Test_Callthrow_and_catch_exception
Exception 0x20474343 0x1045e80 0x6161616161616161 0x7fff56cda1c8
PC=0x7fff56cda1c8
signal arrived during external code execution

github.com/superbaddude/testcgo._Cfunc_throw_and_catch_exception()
    github.com/superbaddude/testcgo/_test/_obj_test/_cgo_gotypes.go:37 +0x38
github.com/superbaddude/testcgo.Callthrow_and_catch_exception()
    c:/Code/go/src/github.com/superbaddude/testcgo/throwe.go:9 +0x1b
github.com/superbaddude/testcgo.Test_Callthrow_and_catch_exception(0xc08208e000)
    c:/Code/go/src/github.com/superbaddude/testcgo/throwe_test.go:6 +0x1b
testing.tRunner(0xc08208e000, 0x702d00)
    c:/go/src/testing/testing.go:456 +0x9f
created by testing.RunTests
    c:/go/src/testing/testing.go:561 +0x874

goroutine 1 [chan receive]:
testing.RunTests(0x5e4f28, 0x702d00, 0x1, 0x1, 0x1)
    c:/go/src/testing/testing.go:562 +0x8b4
testing.(*M).Run(0xc082033ee8, 0xc0820583d0)
    c:/go/src/testing/testing.go:494 +0x77
main.main()
    github.com/superbaddude/testcgo/_test/_testmain.go:54 +0x11d

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    c:/go/src/runtime/asm_amd64.s:1696 +0x1
rax     0x0
rbx     0x1045e80
rcx     0x0
rdi     0x1045ec0
rsi     0x6d6850
rbp     0x0
rsp     0x24fc00
r8      0x10
r9      0x8735d0
r10     0x1
r11     0x3
r12     0x8
r13     0x5e2c36
r14     0x9
r15     0x8
rip     0x7fff56cda1c8
rflags  0x206
cs      0x33
fs      0x53
gs      0x2b
exit status 2
FAIL    github.com/superbaddude/testcgo 0.914s
```
Repository: angular
Issue: component events should mask event propagation.
Labels: type: bug/fix,area: core,state: confirmed,core: event listeners,core: inputs / outputs,P3

```
@Component({
  selector: 'my-component'
  events: ['change']
})
@View({
  template: '<input (change)="...">'
})
class MyComponent {
} 
```

The above code creates an issue. It conflates the `change` event from the `MyComponent` with the bubbling `change` event from the `<input>`.

The correct behavior is that the `change` event which is part of the components should filter out the DOM `change` events. Otherwise 

```
<my-component (change)="doSomething($event)">
```

will sometimes get the `$event` from the `MyComponent` and sometimes from the `input` event.
Repository: TypeScript
Issue: NavigateTo inappropriately writes "module" instead of "namespace" in display
Labels: Bug,Help Wanted

![image](https://cloud.githubusercontent.com/assets/972891/9750176/5391d38e-5649-11e5-942a-9024b809bece.png)
Repository: opencv
Issue: cv::BFMatcher::match crashes graphics driver
Labels: bug,priority: normal,affected: 3.4,category: ocl

I found a problem in the GPU brute force matcher. When a certain amount of points/data is used, the program crashes the graphics driver with the following exception:

OpenCV Error: Assertion failed (clEnqueueReadBuffer(q, (cl_mem)u->handle, CL_TRU
E, 0, u->size, alignedPtr.getAlignedPtr(), 0, 0, 0) == CL_SUCCESS) in cv::ocl::O
penCLAllocator::map, file ......\opencv\sources\modules\core\src\ocl.cpp, line
 4612
......\opencv\sources\modules\core\src\ocl.cpp:4612: error: (-215) clEnqueueRe
adBuffer(q, (cl_mem)u->handle, CL_TRUE, 0, u->size, alignedPtr.getAlignedPtr(),
0, 0, 0) == CL_SUCCESS in function cv::ocl::OpenCLAllocator::map

This is caused by cv::BFMatcher::match and occurs with both 3D points and descriptors of higher dimensions and might be related to issue #4876. I tested this on 4 different machines and 5 different graphics adapters (Geforce 260, 280, 480, 660 and 970, all with newest drivers). The only machine where this did not happen, was the one with the GeForce 480. The crash always occurs, if a certain amount of points is used. However, all cards have enough memory. The following code reproduces the problem with 3D points (adjust the number of points accordingly):

```
unsigned int numPointsA = 100000;
unsigned int numPointsB = numPointsA;

cv::Mat pointsA((int) numPointsA, 3, CV_32FC1);
cv::Mat pointsB((int) numPointsB, 3, CV_32FC1);

for(unsigned int i = 0; i < numPointsA; i++)
{
    pointsA.ptr<float>(i)[0] = (float) (rand()%100);
    pointsA.ptr<float>(i)[1] = (float) (rand()%100);
    pointsA.ptr<float>(i)[2] = (float) (rand()%100);
}

for(unsigned int i = 0; i < numPointsB; i++)
{
    pointsB.ptr<float>(i)[0] = (float) (rand()%100);
    pointsB.ptr<float>(i)[1] = (float) (rand()%100);
    pointsB.ptr<float>(i)[2] = (float) (rand()%100);
}

cv::BFMatcher bfMatcher(cv::NORM_L2, false);
vector<cv::DMatch> matches12;

cv::UMat samplesFixed1U = pointsB.getUMat(cv::ACCESS_READ);
cv::UMat pointsMoved1U = pointsA.getUMat(cv::ACCESS_READ);
bfMatcher.match(samplesFixed1U, pointsMoved1U, matches12);
```
Repository: You-Dont-Know-JS
Issue: "types & grammar": ch4, JSON Stringification is not always a string
Labels: for second edition

Big fan, read all the books, have some remarks on "Behavior Delegation" but really, Great sequel!

In ch4, "JSON Stringification", you wrote:

> ... the serialization result is always a string

but that's not true

``` javascript
typeof JSON.stringify() === "undefined"
```