sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: java-design-patterns
Issue: Service Registry pattern
Labels: info: help wanted,epic: pattern,type: feature

## Description
The Service Registry design pattern is a central service registry that maintains a database of available services. It acts as a lookup mechanism, allowing services to register themselves and clients to discover services. This pattern is crucial for service-oriented architectures (SOA) and microservices, facilitating dynamic discovery and decoupling of service consumers and providers.

### Main Elements of the Pattern
1. **Service Registry**: A central database that holds the details of available services, such as their network locations and interfaces.
2. **Service Provider**: Registers its service with the service registry, providing metadata such as the service name, version, and network address.
3. **Service Consumer**: Queries the service registry to find services and obtain their metadata for consumption.
4. **Heartbeat Mechanism**: Ensures that the service registry has up-to-date information about the service availability through periodic heartbeat messages from the service providers.

### References
- [Service Registry Pattern - Microservices.io](https://microservices.io/patterns/service-registry.html)
- [Project Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki)

## Acceptance Criteria
1. Implement a basic service registry that can register services and allow querying for service details.
2. Include a heartbeat mechanism for service providers to periodically update their status in the registry.
3. Provide example implementations of a service provider registering itself and a service consumer querying the registry.
Repository: youtube-dl
Issue: Convert MP4 files to video with chapters?
Labels: request

What is the easiest way to merge all of the downloaded videos into one single video file with chapters?  Would there be a max size (duration) for the video?  I'm currently pulling down Pluralsight courses and would like to use the name of each file for the chapters.  The goal would be to include the video in iTunes and be able to skip backwards or forwards by chapter.
Repository: TypeScript
Issue: Precedence in parsing types
Labels: Help Wanted,Docs

It looks to me like this should parse, but it doesn't:

```
var x: number | (string)=>void;
```

It works with added parens:

```
var x: number | ((string)=>void);
```

But if the parser is not too hacky, then maybe it's easy to make the first work?

(FWIW, I ran into this in a rest argument, where it would be nice to avoid the extra parens in

```
function foo(...xs: (number | ()=>void)[]): void { }
```

)
Repository: rust
Issue: HashSet operations against another HashSet should allow for differing hash algorithms
Labels: C-enhancement,T-libs-api

Operations such as `intersection` take a second `HashMap`. It's required that the second `HashMap` implement the same hashing algorithm as the first one:

``` rust
impl<T, S> HashSet<T, S>
    where T: Eq + Hash,
          S: HashState
{
    fn intersection<'a>(&'a self, other: &'a HashSet<T, S>) -> Intersection<'a, T, S>;
}
```

This means that you cannot intersect a `HashMap<u8, SipHash>` against a `HashMap<u8, FnvHash>`. This seems overly restrictive.

/cc @bluss
Repository: go
Issue: encoding/xml: support for xml:lang attribute
Labels: NeedsInvestigation

xml:lang is a standard attribute defined by the XML specification.  Using it is complicated by the fact that an element inherits the nearest xml:lang declaration on itself or an ancestor.  For example:

```
  <document>
    <foo xml:lang="en-GB">
      <bar>This is in en-GB</bar>
   </foo>
 </document>
```

The element bar has an effective xml:lang value of "en-GB".

At the moment, an application wanting access to this information would need to consume an XML document token by token, and maintain its own stack of xml:lang attributes (or include an xml:lang attribute on all parent structs being unmarshalled, and process those). It would be nice if Decoder maintained this stack itself, and exposed it to structs being unmarshaled so that you could easily get the current effective xml:lang attribute.

There is code to do the above here:

https://code.blinkace.com/go/xml/commit/6dbed72bf9bec281c053aee80af76ac542a395c9
Repository: go
Issue: x/mobile/exp/f32: LookAt uses column major order, but everything else seems to use row major (e.g. Translate)
Labels: mobile

I think it should be:

``` go
*m = Mat4{
    {s[0], s[1], s[2], -s.Dot(eye)},
    {u[0], u[1], u[2], -u.Dot(eye)},
    {-f[0], -f[1], -f[2], +f.Dot(eye)},
    {0, 0, 0, 1},
}
```

When sending model or projection matrix to shader using UniformMatrix4fv I need to transpose them to column major order. That's not the case for the view matrix created by LookAt.

Also Perspective() and LookAt() multiplication produces incorrect result, because of inconsistent matrix layout.
Repository: youtube-dl
Issue: [letv]ERROR: unable to download video
Labels: bug,geo-restricted

```
[c:\~]$ youtube-dl -v http://www.letv.com/ptv/vplay/2068007.html
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.letv.com/ptv/vplay/2068007.html']
[debug] Encodings: locale cp936, fs mbcs, out None, pref cp936
[debug] youtube-dl version 2016.02.13
[debug] Python version 2.7.11 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-77197-gdf2ce13, ffprobe N-77197-gdf2ce13
[debug] Proxy map: {}
[Letv] 2068007: Downloading webpage
[Letv] 2068007: Downloading playJson data
[Letv] 2068007: Download JSON metadata for format 350
[Letv] 2068007: Downloading m3u8 information for format 350
[Letv] 2068007: Download JSON metadata for format 1000
[Letv] 2068007: Downloading m3u8 information for format 1000
[Letv] 2068007: Download JSON metadata for format 1300
[Letv] 2068007: Downloading m3u8 information for format 1300
[Letv] 2068007: Download JSON metadata for format 720p
[Letv] 2068007: Downloading m3u8 information for format 720p
[Letv] 2068007: Download JSON metadata for format 1080p
[Letv] 2068007: Downloading m3u8 information for format 1080p
[debug] Invoking downloader on u'data:application/vnd.apple.mpegurl;base64,I0VYVE0zVQ0KI0VYVC1YLVZFUlNJT0....(skip)...1FTkRMSVNUDQo='
[download] Destination: 幸福选择题02-2068007.mp4
[debug] ffmpeg command line: ffmpeg -y -i 'data:application/vnd.apple.mpegurl;base64,I0VYVE0zVQ0KI0VYVC1YLVZFU...(skip)...tlbj0NCiNFWFQtWC1FTkRMSVNUDQo=' -c copy -f mp4 -bsf:a aac_adtstoasc 'file:幸福选择题02-2068007.mp4.part'
ERROR: unable to download video
Traceback (most recent call last):
  File "c:\python27\lib\site-packages\youtube_dl\YoutubeDL.py", line 1692, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "c:\python27\lib\site-packages\youtube_dl\YoutubeDL.py", line 677, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "c:\python27\lib\site-packages\youtube_dl\YoutubeDL.py", line 722, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "c:\python27\lib\site-packages\youtube_dl\YoutubeDL.py", line 1362, in process_video_result
    self.process_info(new_info)
  File "c:\python27\lib\site-packages\youtube_dl\YoutubeDL.py", line 1629, in process_info
    raise UnavailableVideoError(err)
UnavailableVideoError: [Error 206] 
```
Repository: rust
Issue: Implementation of traits on functions ignored after function call
Labels: C-enhancement,A-diagnostics,A-trait-system,T-compiler,D-confusing

In this example, I implement a trait on generic functions.  One with mutability and one without.  When invoked manually, the proper trait gets called.  Instead, if I try to peel off the function's unique tag using another function, the traits are no longer visible.

Checked against: rustc 1.8.0-nightly (57c357d89 2016-02-16)

``` Rust
trait FooFn {
    fn foo(&self);
}

impl<T: Sized> FooFn for fn(&mut T)-> T {
    fn foo(&self) {
        println!("Generic (with mutable) match!");
    }
}


impl<T: Sized> FooFn for fn(T)->T {
    fn foo(&self) {
        println!("Generic match!");

    }    
}

fn simple_fn(x: i32) -> i32 { 1 }
fn simple_fn2(x: &mut i32) -> i32 { 2 }

fn strip<T, U>(x: fn(T)->U) -> fn(T)->U { x }

fn main() {
    //Works
    &(simple_fn as fn(i32)->i32).foo(); 
    //Also works
    &(simple_fn2 as fn(&mut i32)->i32).foo();

    //Works
    strip(simple_fn).foo();
    //Error: no method named `foo` found for type `fn(&mut i32) -> i32`
    strip(simple_fn2).foo();
}
```
Repository: rust
Issue: "cannot move out of" error using `==` with `Box<Trait>`, where no move is needed
Labels: A-type-system,A-borrow-checker,T-compiler,A-docs,C-bug,T-types,A-trait-objects

The following code has a compilation error, but it should be a valid program [(playground)](https://play.rust-lang.org/?gist=f39d36c50f0f54b8c3fd&version=nightly)
([Updated code in 2021 edition](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=088ae790d8e2c2ce283918a344c8cf31))

``` rust
trait Trait { }
impl<T> Trait for T { }

impl<'a> PartialEq for Trait + 'a {
    fn eq(&self, other: &Self) -> bool { false }
}

fn main() {
    let x = Box::new(1) as Box<Trait>;
    let equal = x == x;
}
```

```
<anon>:10:22: 10:23 error: cannot move out of `x` because it is borrowed [E0505]
<anon>:10     let equal = x == x;
                               ^
<anon>:10:17: 10:18 note: borrow of `x` occurs here
<anon>:10     let equal = x == x;
                          ^
```
- This only occurs for the reflexive (x == x) case.
- It doesn't actually compile into a move in `x == y`.
- Fat boxes like `Box<[T]>` don't behave like this

The error is the same when using this equality impl instead:

``` rust
impl<'a> PartialEq for Box<Trait + 'a> {
    fn eq(&self, other: &Self) -> bool { false }
}
```
Repository: vscode
Issue: Allow customization of mouse shortcuts
Labels: feature-request,keybindings

Some users would like to be able to customize not just pure keyboard shortcuts but also mouse + modifier ones. These are currently hard coded, for example <kbd>alt</kbd>+click to add a selection.

See https://github.com/Microsoft/vscode/issues/3091 for some more context.
Repository: rust
Issue: Normalization fails with where clauses on methods
Labels: A-trait-system,A-associated-items,T-compiler,C-bug,A-lazy-normalization

[This code](http://is.gd/nSF2lc) from @jroesch fails to compile:

``` rust
pub enum Mut {}
pub enum Imm {}

trait MutType<'v, T> {
    type Output;
}

impl<'v, T: 'v> MutType<'v, T> for Mut {
    type Output = &'v mut T;
}

impl<'v, T: 'v> MutType<'v, T> for Imm {
    type Output = &'v T;
}


enum Lit {
    Int(i32)
}

enum Expr {
    Add(Box<Expr>, Box<Expr>),
    Lit(Lit),
}


pub trait Visitor<'v, M> : Sized {
    fn visit_expr(&mut self, expr: M::Output)
    where M : MutType<'v, Expr>;

    fn visit_lit(&mut self, lit: M::Output)
    where M : MutType<'v, Lit>;
}

struct DummyV;

impl<'v> Visitor<'v, Imm> for DummyV {
    fn visit_expr(&mut self, expr: &'v Expr) {
        panic!()
    }

    fn visit_lit(&mut self, lit: &'v Lit) {
        panic!()
    }
}

fn main() {}
```

with the following error:

```
<anon>:38:5: 40:6 error: method `visit_expr` has an incompatible type for trait:
 expected associated type,
    found &-ptr [E0053]
<anon>:38     fn visit_expr(&mut self, expr: &'v Expr) {
<anon>:39         panic!()
<anon>:40     }
<anon>:38:5: 40:6 help: see the detailed explanation for E0053
<anon>:42:5: 44:6 error: method `visit_lit` has an incompatible type for trait:
 expected associated type,
    found &-ptr [E0053]
<anon>:42     fn visit_lit(&mut self, lit: &'v Lit) {
<anon>:43         panic!()
<anon>:44     }
<anon>:42:5: 44:6 help: see the detailed explanation for E0053
error: aborting due to 2 previous errors
playpen: application terminated with error code 101

Compilation failed.
```

but, I think, _ought_ to work. Looks like a problem where we normalize without having all the where clauses from the method available. Lazy normalization would probably fix it.
Repository: flutter
Issue: Formatter for Flutter (or, tree-aware code)
Labels: c: new feature,tool,P3,team-tool,triaged-tool

dartfmt is a really great utility, but it doesn't know about code that is trying to represent a tree. Which, is what Flutter does a lot of :)

We would like an automatic formatter that knows that Flutter code has a lot of tree-like structures, and retains a formatting style that makes tree-like structures easy to read.

Ideally, we'd then use this formatter in our CLI and Atom tools.
Repository: rust
Issue: Windows paths should not be prefixed with \\?\ when displayed
Labels: O-windows,I-needs-decision,C-bug,A-io

That just turns this already confusing error into an insult:

```
kernel\std\std.rs:17:1: 17:46 error: found possibly newer version of crate `core` which `core_collections` depends on [E0460]
kernel\std\std.rs:17 extern crate collections as core_collections;
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel\std\std.rs:17:1: 17:46 note: perhaps this crate needs to be recompiled?
kernel\std\std.rs:17 extern crate collections as core_collections;
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel\std\std.rs:17:1: 17:46 note: crate `core` path #1: \\?\B:\Programmering\SandboxOS\AveryRust\build\sysroot\lib\rustlib\x86_64-avery-kernel\lib\libcore.rlib
kernel\std\std.rs:17:1: 17:46 note: crate `core_collections` path #1: \\?\B:\Programmering\SandboxOS\AveryRust\build\sysroot\lib\rustlib\x86_64-avery-kernel\lib\libcollections.rlib
```
Repository: flutter
Issue: Support making Android Wear apps
Labels: c: new feature,platform-android,framework,engine,customer: crowd,P3,team-android,triaged-android

- [ ] run on wear emulator
- [ ] determine if a screen is round or square
- [ ] easily set a wake lock (for Wear prototyping since timeout to ambient is aggressive at 6 seconds and we need more time)
Repository: TypeScript
Issue: Decorator Metdata: expose array element type
Labels: Suggestion,Needs Proposal,Domain: Decorators

TSC 175, target ES6, Node 5.6

Sample class with decorated properties:

``` javascript
@sg.DMClass
export class User implements IUser {
    @sg.DMProperty
    firstName: string;
    @sg.DMProperty
    lastName: string;
    @sg.DMProperty
    friends: User[];
}
```

Property decorator:

``` javascript
export function DMProperty(target: any, key: string) {
    var type = Reflect.getMetadata("design:type", target, key);
}
```

**Current behaviour:**
When the decorator gets called for property "friends", "type" is "Array" and the captured type ("User") is lost.

**Expected behaviour**
"type" should contain the captured type ("User"), too

Following very dirty work-around does the job: I modified tsc's method "emitSerializedTypeNode":

``` javascript
function emitSerializedTypeNode(node) {
    if (node) {
        console.log("*** emitSerializedTypeNode: node.kind: ", node.kind);
        switch (node.kind) {
            ...
            case 157:
                // Begin dirty ---------------------------------------------------------------------------
                var _elemType = node.elementType.typeName.text;
                write("{name: 'Array<" + _elemType + ">', type:'Array', elemType:'" + _elemType + "'}");
                console.log("*** emitSerializedTypeNode: Array, type: ", node.elementType.typeName.text);
                // End dirty -----------------------------------------------------------------------------
                return;
            case 150:
            ...
```

Best
Mind
Repository: youtube-dl
Issue: [Site Support Request] huya.com
Labels: site-support-request

It's a chinese gaming stream website similiar to twitch.tv.

Example stream url: http://www.huya.com/499xiaoyu
livestream directory: http://www.huya.com/g/lol
Repository: go
Issue: x/image/font: make it easier to measure a string's bounds and draw it in a bounding box
Labels: NeedsInvestigation

This issue applies to github.com/golang/freetype, if that is still under development.

I want to accomplish the following (superficially) easy tasks:
- Given a string and a fully specified font/context, determine the rendered string's bounds, taking into account ascenders, descenders, etc.; something along the lines of `NSString`'s `-sizeWithAttributes:` method.
- Given an appropriately sized rect, render a string in that rect, compensating for ascenders, descenders, etc; something like `NSString`'s `-drawInRect:withAttributes:` method.

I will use this to render a simple, short string into a texture of just the right size, and then upload that texture onto a window for use as a label at a particular origin.

`MeasureString` looks close, but it only provides the width, not the height. (And I don't see a way to get the line height / leading from a font.) And `DrawString` is close, but the dot's y offset is the baseline of the text, which I don't see a handy way to calculate.

The fact that these are top-level APIs in Cocoa suggests that these are common needs and that they cover a large portion of use cases. Maybe this should be handled with examples, or maybe with new fundamental APIs, or maybe with convenience APIs. I don't know enough to say.

/cc @nigeltao
Repository: go
Issue: x/term: ReadPassword not supported on plan9
Labels: OS-Plan9

x/crypto/ssh/terminal doesn't provide `terminal.ReadPassword` on plan9.

Related #13085
Repository: go
Issue: proposal: runtime/v2: rationalize runtime.Errors
Labels: v2,Proposal

Package runtime defines an Error interface for runtime errors and exactly one exported type that implements it: TypeAssertionError. But there are about a half dozen other panics in the runtime caused by programmer errors that are detected at runtime; things like "index out of range" and "divide by zero". Currently these are just string panics, which means they're inconsistent with TypeAssertionError and contain no detail about, for example, what the index was or what range it was out of. We should make these panics raise types that implement runtime.Error and carry actual details about the error.

This is a potentially breaking change, albeit a weak one, since programs can check the string returned by the Error() method to detect these panics (and since this is the only way to detect them right now, I suspect this happens in practice). We could introduce exported types for these panics without breaking compatibility, but can't add more information to their Error() message.
Repository: opencv
Issue: OpenCV reduction based algorithms
Labels: category: ocl,category: t-api,RFC

Are you aware of any particular algorithms that would benefit from the work-group reduce add/min/max ? - maybe something SIMD oriented that would though require moderate thread communication / map-reduce type operation.

I'm working to improve the work-group reduce functions in a Linux OpenCL stack for GPGPUs. The work-group functions are briefly described here [1] - in short they enable add/min/max collaborative work between threads in the same work-group. 

I'm looking at OpenCV as a source for real world problems that would benefit from the work-group reduce functions. This could also result in improvements to those algorithms.

Thank you

[1] https://software.intel.com/en-us/articles/using-opencl-20-work-group-functions
Repository: nvm
Issue: Shorter URL for install script?
Labels: feature requests,installing nvm

Can you add a gh-pages branch that with the download script? It would be nice to be able to just remember something like `curl -o- http://creationix.githubio/nvm|bash` than having to look up the install command each time. This is similar to [get-pip.py](https://bootstrap.pypa.io/get-pip.py) and other tools.

Since github pages doesn't allow for automatic redirection rules (like grabbing the latestThis script could also probable be made to fetch the [releases list](https://api.github.com/repos/creationix/nvm/releases) and use that to get the latest tag. This way it would never need to be updated. Maybe something like: 

```
curl -o- https://raw.githubusercontent.com/creationix/nvm/`curl -o- https://api.github.com/repos/creationix/nvm/releases -s| grep -m 1 tag_name|grep -oP 'v[\d\.]+'`/install.sh | bash
```
Repository: go
Issue: cmd/link: support cgo internal linking on linux/mipsx, linux/mips64x
Labels: compiler/runtime
Repository: vscode
Issue: Custom peek widgets
Labels: feature-request,api,webview,editor-insets,editor-api

LightTable and Swift allow for inline evaluation which also places the results in line with the particular line of source which was evaluated.

A new widget would be necessary for this. This widget would be able to hold values or arrays or plots with arrays and plots requiring expansion to be shown fully as to not clutter the editor. The widget would not be dismissed upon losing focus and multiple widgets are possible in the editor.

https://github.com/JunoLab/atom-ink and https://github.com/nteract/hydrogen are two examples of this done in atom.

Below are two example images from Juno which is based on LightTable.
![image](https://cloud.githubusercontent.com/assets/3878949/13206676/8e2dcb02-d90b-11e5-829a-bab589bdbb8c.png)
![image](https://cloud.githubusercontent.com/assets/3878949/13206677/948180c0-d90b-11e5-97d0-46cbb3345caa.png)
Repository: go
Issue: x/sys/unix: missing flags support for Setxattr on freebsd.
Labels: help wanted,OS-FreeBSD,NeedsFix,compiler/runtime

Currently, flags parameter is ignored.
We can implement XATTR_CREATE and XATTR_REPLACE for this.
Repository: rust
Issue: Closure return type not deduced from bounds if the type is wrapped.
Labels: A-inference,C-bug

In a tuple, for example:

``` rust
fn call<R, F: FnOnce() -> R>(f: F) -> R {
    f()
}

fn main() {
    let _: (&[i32],) = call(|| (&[],));
}
```

AFAICT, we don't deduce that `call::<$R, _>(|| (&[],)) expects (&[i32],)` implies `&[] expects &[i32]`, only `(&[],) expects $R`.
Repository: kubernetes
Issue: Replication controller to re-schedule Pod in `ContainerCreating` and `ImageNotReady` status for a long time
Labels: kind/bug,priority/important-soon,sig/scheduling,milestone/removed,lifecycle/frozen

I have meet an issue in my cluster described here https://github.com/kubernetes/kubernetes/issues/21656.

My question is, my Pod in a RC was scheduled to a node which docker CIDR already full. So the Pod stay in `ImageNotReady` status. Only after I delete the Pod manually by `kubectl delete pod`, the Pod got rescheduled to another node.

I think from RC perspective, some loop should take the responsibility on Pod status monitoring. If the Pod can not be `Running` for sometime, if the failure reason is not related with Pod itself, the RC should kill the Pod and reschedule to another node.

For example, if the Pod stays in `ContainerCreating` status for a long time which means something wrong with the node's docker, the Pod should be rescheduled.
Repository: rust
Issue: `-msvc` distribution has unused import libraries
Labels: C-enhancement,O-windows-msvc,T-infra

Currently in the binary distributions for the `-msvc` packages, the `bin` folder has import libraries (`.dll.lib`) for all the DLLs there even though they are never linked to and could be removed to save some space.
Repository: go
Issue: encoding/xml: `,innerxml` makes light of namespaces.
Labels: NeedsInvestigation

See [the example](http://play.golang.org/p/KjOhmzacUc). The result is obviously not what we wish. We have no way we can obtain and recover the context, namely the prefix-namespace correspondence, where the fragment is extracted. I found xml.go naively accumulating input stream in `saved` while `,innerxml` is effective. The best solution is like the below:

```
buffer := new(bytes.Buffer)
encoder := xml.NewEncoder(buffer)

// ...

for {
  token, err := Token()
  // ...
  encoder.EncodeToken(token)
}

// ...

encoder.Flush()
saveXMLData = buffer.Bytes()
```

Namespace-aware `,innerxml` is rather expensive, so we may as well have a new flag. Millions of extensible guys are eager for a politic decision.