sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: Unable to compile calib3d with cuda
Labels: bug,priority: normal,category: build/install,affected: 3.4,category: gpu/cuda (contrib)

I get the following compilation error when compiling the latest master WITH_CUDA=True.

```
[ 83%] Building CXX object modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/src/calib3d.cpp.o
/home/sam/src/opencv/modules/cudalegacy/src/calib3d.cpp: In function ‘void cv::cuda::solvePnPRansac(const cv::Mat&, const cv::Mat&, const cv::Mat&, const cv::Mat&, cv::Mat&, cv::Mat&, bool, int, float, int, std::vector<int>*)’:
/home/sam/src/opencv/modules/cudalegacy/src/calib3d.cpp:232:90: error: ‘undistortPoints’ was not declared in this scope
     undistortPoints(image, image_normalized, camera_mat, dist_coef, Mat(), eye_camera_mat);
                                                                                          ^
/home/sam/src/opencv/modules/cudalegacy/src/calib3d.cpp:232:90: note: suggested alternative:
In file included from /home/sam/src/opencv/build/modules/cudalegacy/precomp.hpp:60:0:
/home/sam/src/opencv/modules/calib3d/include/opencv2/calib3d.hpp:1692:23: note:   ‘cv::fisheye::undistortPoints’
     CV_EXPORTS_W void undistortPoints(InputArray distorted, OutputArray undistorted,
                       ^
/home/sam/src/opencv/modules/cudalegacy/src/calib3d.cpp:255:5: error: ‘minMaxLoc’ is not a member of ‘cv::cuda’
     cuda::minMaxLoc(d_hypothesis_scores, NULL, &best_score, NULL, &best_idx);
     ^
/home/sam/src/opencv/modules/cudalegacy/src/calib3d.cpp:255:5: note: suggested alternatives:
In file included from /home/sam/src/opencv/modules/core/include/opencv2/core/cuda.hpp:51:0,
                 from /home/sam/src/opencv/modules/cudalegacy/include/opencv2/cudalegacy.hpp:46,
                 from /home/sam/src/opencv/build/modules/cudalegacy/precomp.hpp:50:
/home/sam/src/opencv/modules/core/include/opencv2/core.hpp:779:17: note:   ‘cv::minMaxLoc’
 CV_EXPORTS void minMaxLoc(const SparseMat& a, double* minVal,
                 ^
/home/sam/src/opencv/modules/core/include/opencv2/core.hpp:779:17: note:   ‘cv::minMaxLoc’
make[2]: *** [modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/src/calib3d.cpp.o] Error 1
make[1]: *** [modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/all] Error 2
make: *** [all] Error 2
```

The system is Ubuntu 14.04 with CUDA 7.0. The output of CMake is bellow
Repository: TypeScript
Issue: Expose `--init` functionality in a tsserver command
Labels: Suggestion,Help Wanted

We now have `--init` support to generating a default tsconfig.json file (see #4037). Editors would need to expose a functionality that uses this, possibly passing a set of additional defaults based on their scenario. we need to expose this as a Language Service API as well as a tsserver command. see @jrieken's comment in https://github.com/Microsoft/TypeScript/pull/4037#issuecomment-135056980
Repository: rust
Issue: [MSVC] `cl.exe` doesn't support static relocations with large address awareness.
Labels: O-windows,C-enhancement,T-compiler,O-windows-msvc

See `relocation-model` from `run-make`.
Repository: java-design-patterns
Issue: Service configurator pattern
Labels: info: help wanted,epic: pattern,type: feature

### Description:
The Service Configurator design pattern allows an application to dynamically configure and manage a set of services without requiring a restart. This pattern is useful for applications that need to handle a variety of services with different configurations and lifecycles. Key elements of the Service Configurator pattern include service registration, dynamic configuration, lifecycle management, and service lookup.

### Main elements of the Service Configurator pattern:
1. **Service Registration:** Services are registered with a central registry or configuration manager.
2. **Dynamic Configuration:** Services can be configured dynamically at runtime, allowing for changes without restarting the application.
3. **Lifecycle Management:** The pattern manages the lifecycle of services, including initialization, configuration, reconfiguration, and shutdown.
4. **Service Lookup:** Services can be located and accessed by clients through a central lookup mechanism.

### References:
- [Pattern-Oriented Software Architecture Volume 4: A Pattern Language for Distributed Computing](https://en.wikipedia.org/wiki/Pattern-Oriented_Software_Architecture)
- [Dynamically Configuring Communication Services with the Service Configurator Pattern](http://www.dre.vanderbilt.edu/~schmidt/PDF/O-Service-Configurator.pdf)

### Acceptance Criteria:
1. Implement a Service Configurator class that handles the registration, configuration, and lifecycle management of services.
2. Provide example services that demonstrate dynamic configuration and lifecycle management.
3. Include unit tests to verify the correct implementation of the Service Configurator pattern and its components.
Repository: java-design-patterns
Issue: Acceptor-Connector pattern
Labels: info: help wanted,epic: pattern,type: feature

**Description:**
The Acceptor-Connector design pattern decouples connection establishment from connection handling in networked systems. The pattern's main components are the Acceptor, Connector, and Handler. The Acceptor is responsible for listening for incoming connection requests and creating a new connection. The Connector actively initiates connections to a remote service. Once a connection is established, the Handler takes over to manage the communication between peers.

Implementing this pattern will improve the system’s scalability and flexibility by separating connection handling from business logic, allowing each component to be managed and extended independently.

**References:**
1. [Extension and Java Implementation of the Reactor−Acceptor−Connector Pattern Combination](https://hillside.net/plop/plop99/proceedings/Fernandez3/RACPattern.PDF)
2. [Sample implementation](https://code.google.com/a/eclipselabs.org/p/comp-4104-carleton/)
3. [Pattern-Oriented Software Architecture Volume 2: Patterns for Concurrent and Networked Objects](https://amzn.to/3V5uoKO)

**Acceptance Criteria:**
1. Implement the Acceptor component to handle incoming connection requests.
2. Implement the Connector component to initiate outgoing connections.
3. Implement the Handler component to manage established connections and business logic.
4. Provide unit tests for each component to ensure proper functionality.
5. Update documentation with usage examples and detailed descriptions of each component.
Repository: rust
Issue: Type inference problem with lifetimes and assoiated types
Labels: A-lifetimes,P-low,A-associated-items,I-needs-decision,T-lang,C-bug

I am trying to get some lifetime polymorphism but I unable to do so because of some bugs (#24424, #23958). This time it seems that the type inference is not working.

``` rust
use std::ops::Range;

pub trait Iter {
    type Type: Iterator;
}

pub trait T {
    fn f<'a>(&'a self) -> <&'a Self as Iter>::Type where &'a Self: Iter;
}

pub struct S;

impl<'a> Iter for &'a S {
    type Type = Range<usize>;
} 

impl T for S {
    fn f<'a>(&'a self) -> <&'a Self as Iter>::Type where &'a Self: Iter {
        0usize..10
    }
}

fn main() {}
```

gives

```
<anon>:19:9: 19:19 error: mismatched types:
 expected `<&'a S as Iter>::Type`,
    found `core::ops::Range<usize>`
(expected associated type,
    found struct `core::ops::Range`) [E0308]
<anon>:19         0usize..10
                  ^~~~~~~~~~
<anon>:19:9: 19:19 help: see the detailed explanation for E0308
error: aborting due to previous error
playpen: application terminated with error code 101
```
Repository: rust
Issue: Add an overview toggle to rustdoc lib output
Labels: T-rustdoc,C-feature-request

Rustdoc libs should have an overview button of some sort.

As discussed [here](https://internals.rust-lang.org/t/rustdoc-mockup-for-including-more-structured-content/2540), one problem with the std docs is that you can't tell which part of an unfamiliar page is actually useful. For example, below is a mockup of what the main [regex page](http://doc.rust-lang.org/regex/regex/index.html) would look like with and without the types which can only be created indirectly. Clearly the top part is much more approachable to someone unfamiliar with this library.

![std_overview_comparison](https://cloud.githubusercontent.com/assets/4156987/9537503/194c88cc-4d07-11e5-8e89-a6ca7652fbf8.png)

This seems a somewhat reasonable thing to do although I'm not certain `expand/overview` are the best words or icons for this but it seems okay I guess. One alternative would be to only show indirectly created types where they're being returned (but that is more drastic and it seems it could be done after this was tried if this was really well liked).

cc @BurntSushi since this interested you
Repository: TypeScript
Issue: Improve error message for decorator type mismatches
Labels: Bug,Help Wanted,Good First Issue,Domain: Error Messages

In TS 1.5 this:

``` ts
//Relation.ts
export function Relation(cls: any) {
    return function () {
        console.log(cls);
    }
}

//Foo.ts
import {Relation} from "./Relation";

export class Foo {
    @Relation(Foo)
    info: string;
}
```

Compiles without error. In TS 1.6, it reports the error:

```
error TS1240: Unable to resolve signature of property decorator when called as an expression.
  Supplied parameters do not match any signature of call target.
```

On the decorator call in `Foo.ts`. This is a very cryptic message. What it wants you to do is change `Relation.ts` to read like this:

``` ts
export function Relation(cls: any): PropertyDecorator {
    return function () {
        console.log(cls);
    }
}
```

or this:

``` ts
export function Relation(cls: any) {
    return function (target: Object, propertyKey: string | symbol) {
        console.log(cls);
    }
}
```

It would be very useful for the error message to indicate what exactly is wrong and how it could be fixed. Something akin to

```
error TS1240: Expression type is not assignable to decorator type [[PropertyDecorator]]. Ensure [[@Relation(Foo)]] has a type assignable to [[PropertyDecorator]].
```

would be more useful in actually understanding what's wrong and why you need to change your code.
Repository: TypeScript
Issue: Improve support for Symbol.toPrimitive
Labels: Suggestion,Needs Proposal

Presently, TS limits index types to 'string', 'number', 'symbol', or 'any'. That's fine, but consider the following:

``` ts
class Foo {
    [Symbol.toPrimitive](): number {
        return 1;
    }
}

var x = ['a','b','c'];
var f = new Foo();
x[f];
```

We give the error `an index expression argument must be of type ...` on the array access.

`Foo` is for all intents and purposes a wrapper around the number `1` (close to `new Number(1)`), yet it cannot be used to index an array, since `Foo` itself is not of type `number`, `string`, `symbol`, or `any`. We could do extra type-checking to see if an object has a user-defined `Symbol.toPrimitive` and consider its return types when checking type-coercing operations (after all, if you've opted in to using `Symbol.toPrimitve` it's probably part of your goal to gain this behavior), such as indexing or mathematics operators.

Building on this, we currently don't support the coercion of `Number` or `String` classes to their respective primitive types (which are a specialization of the above issue but which applies to ES5 and ES3 output). Presently one can't do this:

``` ts
function add(a: string, b: string): number {
  var x = new Number(a);
  var y = new Number(b);
  return x + y;
}
add('10e4', '0x8');
```

Because since neither x nor y is the 'number' (or 'string') primitive type, the addition operation is not allowed. Though it's still valid js (and without the usage of the Number class, the addition would result in '10e40x8'!).
Repository: TypeScript
Issue: Poor error recovery in jsx elements
Labels: Bug,Help Wanted

``` jsx
var x = <div span=3 ></div>;
```

```
Error   TS1005  '{' expected.   TypeScriptHTMLApp6  c:\Users\mhegazy\Documents\Visual Studio 2015\Projects\TypeScriptHTMLApp6\TypeScriptHTMLApp6\file1.tsx  10
Error   TS17002 Expected corresponding JSX closing tag for 'div'.   TypeScriptHTMLApp6  c:\Users\mhegazy\Documents\Visual Studio 2015\Projects\TypeScriptHTMLApp6\TypeScriptHTMLApp6\file1.tsx  10
Error   TS17002 Expected corresponding JSX closing tag for 'div'.   TypeScriptHTMLApp6  c:\Users\mhegazy\Documents\Visual Studio 2015\Projects\TypeScriptHTMLApp6\TypeScriptHTMLApp6\file1.tsx  10
Error   TS1109  Expression expected.    TypeScriptHTMLApp6  c:\Users\mhegazy\Documents\Visual Studio 2015\Projects\TypeScriptHTMLApp6\TypeScriptHTMLApp6\file1.tsx  10
Error   TS2339  Property 'div' does not exist on type 'HTMLAttributes'. TypeScriptHTMLApp6  c:\Users\mhegazy\Documents\Visual Studio 2015\Projects\TypeScriptHTMLApp6\TypeScriptHTMLApp6\file1.tsx  10
Error   TS2322  Type 'boolean' is not assignable to type 'number'.  TypeScriptHTMLApp6  c:\Users\mhegazy\Documents\Visual Studio 2015\Projects\TypeScriptHTMLApp6\TypeScriptHTMLApp6\file1.tsx  10

```
Repository: three.js
Issue: BoundingSphere per BufferGeometry.group
Labels: Enhancement

At the moment `BufferGeometry`'s groups are sorted using the centre of the whole BufferGeometry. In the near future we could consider having a `BoundingSphere` per group so transparent sub parts of a geometry get proper sorted.

Follow up from #7066.
Repository: rust
Issue: Local ambiguity in macro *definition*
Labels: A-diagnostics,P-low,A-macros,T-lang,C-bug

``` rust
macro_rules! m {
    () => ();;
}
```

```
<anon>:2:14: 2:15 error: local ambiguity: multiple parsing options: built-in NTs tt ('lhs') or 1 other options.
<anon>:2     () => ();;
                      ^
```

(the equivalent of `$( $lhs:tt => $rhs:tt );+ $(;)*` is used to parse macros)

This leaks "lhs", which is an implementation detail, and is a bad error message.
Repository: youtube-dl
Issue: Support for Discoverymax
Labels: site-support-request,geo-restricted

Hi, I would like to ask you to add support for: www.discoverymax.marca.com.

The web offers the videos in a Brightcove playlist, and it works like this: There is a [playlist url](http://www.discoverymax.marca.com/series/otros/la-fiebre-del-oro/episodios-completos/#)  and each video has it's _unique id_ ( i.e. #4383897233001).

![captura](https://cloud.githubusercontent.com/assets/8408600/9562521/77e77bb8-4e6e-11e5-8c0f-7500f04fb344.PNG)

If you type the _id_ at the end of the playlist you go to the video itself, but if you try downloading it with _youtube-dl_, you always get the first video of the playlist no matter what video's url you pass.

```
youtube-dl.exe -v http://www.discoverymax.marca.com/series/otros/la-fiebre-del-oro/episodios-completos/#4246353904001

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.discoverymax.marca.com/series/otros/la-fiebre-del-oro/episodios-completos/#4246353904001']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2015.08.28
[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-71816-g02001ad, ffprobe N-71816-g02001ad
[debug] Proxy map: {}
[generic] #4246353904001: Requesting header
WARNING: Falling back on generic information extractor.
[generic] #4246353904001: Downloading webpage
[generic] #4246353904001: Extracting information
[generic] Brightcove video detected.
[download] Downloading playlist: La fiebre del oro | Discovery MAX
[generic] playlist La fiebre del oro | Discovery MAX: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[Brightcove] 4383781458001: Downloading webpage
[Brightcove] 4383781458001: Extracting information
[debug] Invoking downloader on u'http://discoveryint1.edgeboss.net/download/discoveryint1/byocdn/media/1378939881/201507/1387/1378939881_4383964414001_EHD-121135B-DMAX-SPAIN.mp4'
[download] Destination: La fiebre del oro - Cientos de onzas-4383781458001.mp4
[download] 100% of 563.58MiB in 04:42
```

Note that the requested video was 4246353904001 and the downloaded video was 4383781458001 instead.

Thank you.
Repository: go
Issue: gdb: provide a stack unwinder in Python
Labels: NeedsInvestigation

The recently released Gdb 7.10 added support for writing a frame unwinder in Python,
which is ideal for us.
doc: https://sourceware.org/gdb/current/onlinedocs/gdb/Unwinding-Frames-in-Python.html#Unwinding-Frames-in-Python

The issue tracks that.
Repository: go
Issue: cmd/compile: disambiguate package short names in "is not assignable" compile errors
Labels: compiler/runtime

I wrote some code that produced the following error in:

```
call.go:83: wrong type of argument 0 to Return for *mock_codesearch.MockCodesearcher.FindManifestsByNodeName: []codesearch.Result is not assignable to []codesearch.Result
```

I was confused because those two types are the same. Then I realized that on the left, codesearch referred to `google3/releasetools/rpdb/common/codesearch` while on the right it referred to `google3/social/automation/tools/actuators/codesearch`.

When the short package names are the same, the long name should be used in this "is not assignable" error message, as is done in other cases.
Repository: youtube-dl
Issue: [req] e-learning udacity.com
Labels: site-support-request

Course page: https://www.udacity.com/course/viewer#!/c-ud032/l-698949179/m-762588556
Repository: go
Issue: encoding/xml: support QName values / expose namespace bindings
Labels: Thinking,NeedsFix,early-in-cycle

It's not uncommon for XML to contain QNames as element and attribute values, e.g.

```
  <my-document xmlns:foo="http//..." >
    <my-element>foo:bar</my-element>
  </my-document>
```

In order to correctly unmarshal the value, you need to know the namespace bindings in effect for my-element, but Decoder doesn't appear to expose this information.  A simple addition to encoding/xml of:

```
  func (d *Decoder) NamespaceBindings() map[string]string {
    return d.ns
  }
```

allows unmarshallers to access the necessary information, for example, I can now write:

```
  type QName struct {
    Namespace string
    Local     string
  } 

 func (qname *QName) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
    var s string
    d.DecodeElement(&s, &start)
    i := strings.Index(s, ":")
    prefix := ""
    if i >= 0 {
      prefix = s[:i]
      qname.Namespace = s[i+1:]
    } else {
      qname.Namespace = s
    }
    var ok bool
    qname.Namespace, ok = d.NamespaceBindings()[prefix]
    if !ok {
      return errors.New("Unbound namespace prefix: " + prefix)
    }
    return nil
  }
```

Arguably, something like the above, and a corresponding attribute unmarshaller could be provided on the standard xml.Name.

More discussion of this issue here:

https://groups.google.com/forum/#!searchin/golang-nuts/QName/golang-nuts/DexmVLQOJxk/whBaKK9ntHsJ

go version go1.5 darwin/amd64
Repository: neovim
Issue: URI for terminal  (term://...)
Labels: needs:design,terminal

Current proposal:

```
                     hierarchical part
          ┌──────────────────┴──────────────────┐
terminal://username@localhost/usr/local/bin/bash:1234/path/cwd/?ls;echo foo;#optional-name
└───┬───┘ └───┬───┘ └───┬───┘└─────────┬────────┘└─┬─┘└───┬────┘└────┬─────┘└─────┬─────┘
 scheme      user     host        path to shell    pid    cwd       query       fragment
```

@justinmk 

> > If you run term:ls or term:cmd it executes the command then leaves the shell
> > Perhaps that behavior should be changed.

I was thinking about this and I was wondering if there was a little overlap here with the `:term ls` command and the `:!ls` command since both execute the command and then leave the shell.
Repository: rust
Issue: TLS destructors on the main thread are not always run
Labels: A-destructors,E-needs-test,T-libs-api,A-thread-locals,C-bug

There are some platforms where TLS destructors are run when the main thread exits, and there are some platforms where this does not happen,~~ and there are some platforms where things just go crazy ~~. For example, testing this program:

``` rust
struct Foo;

impl Drop for Foo {
    fn drop(&mut self) {
        println!("wut");
    }
}

thread_local!(static FOO: Foo = Foo);

fn main() {
    FOO.with(|_| {});
}
```

This should print `Foo dtor`, but prints nothing on some targets:
- [ ] musl (e.g. i686-unknown-linux-musl, x86_64-unknown-linux-musl)
- [ ] android (e.g. arm-linux-androideabi)
- [ ] Linux with [glibc before 2.18](https://github.com/rust-lang/rust/pull/126829#issuecomment-2187674002)
- [ ] Maybe more?

Here's a more complicated testcase that also involves initializing a destructor while destructors are being run; ideally this will be added to the test suite at some point:
```rust
struct Bar;

impl Drop for Bar {
    fn drop(&mut self) {
        println!("Bar dtor");
    }
}

struct Foo;

impl Drop for Foo {
    fn drop(&mut self) {
        println!("Foo dtor");
        // We initialize another thread-local inside the dtor, which is an interesting corner case.
        thread_local!(static BAR: Bar = Bar);
        BAR.with(|_| {});
    }
}

thread_local!(static FOO: Foo = Foo);

fn main() {
    FOO.with(|_| {});
}
```

### some older notes

- Linux ELF TLS - appears to work
- Linux pthread destructors - appear to not work (#19776)
- OSX - ~~appears to call destructors, but the program above specifically causes some form of memory corrupting, triggering an assert in malloc~~ fixed by https://github.com/rust-lang/rust/pull/57655
- Windows GNU/MSVC - appears to ~~not~~ work. ~~We're [listening for `DLL_PROCESS_DETACH`](https://github.com/rust-lang/rust/blob/6d6bf81b33abf3c8e200532b5f6f9e72ba540e92/src/libstd/sys/windows/thread_local.rs#L246) but for some reason we're not getting that notification.~~
Repository: opencv
Issue: the tutorial of high dynamic range imaging may cause misleading
Labels: bug,priority: low,affected: 3.4,category: photo

http://docs.opencv.org/master/d3/db7/tutorial_hdr_imaging.html#gsc.tab=0

despite I didn't really try that,
the outcome of the tone mapped HDR should not be so poor, compared to the result of original paper

Their may be some bugs occur in the overall procedure

Durand, Frédo, and Julie Dorsey. "Fast bilateral filtering for the display of high-dynamic-range images." ACM transactions on graphics (TOG) 21.3 (2002): 257-266.
Repository: go
Issue: x/tools/cmd/goimports: treat import paths as standard library only if they are in goroot
Labels: Tools

The go tool sets a field to indicate whether a package is part of the standard library:

https://github.com/golang/go/blob/8d478e845c/src/cmd/go/pkg.go#L156

```
p.Standard = p.Goroot && p.ImportPath != "" && !strings.Contains(p.ImportPath, ".")
```

goimports uses a different rule:

https://github.com/golang/tools/blob/e21b7325f7/imports/fix.go#L32

```
if strings.Contains(importPath, ".") {
```

My feature request is to change the code to behave similar to the go tool:

```
if strings.Contains(importPath, ".") || !inGoroot(importPath) {
```

With an additional index of the standard library keyed by import path, I'd expect this to be reasonably fast.

If this is an acceptable idea, I'm happy to write a patch.
Repository: youtube-dl
Issue: [req] e-learning -- sitepoint.com
Labels: site-support-request,account-needed

Sitepoint has lots of video courses.

Course page: https://www.sitepoint.com/premium/courses/introduction-to-git-2902