sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Visual Studio formatting is wrong in some cases
Labels: Bug,Help Wanted,VS Code Tracked

Here is an example

``` typescript
var webApps: ng.ui.IState[] = [{
    name: "home.webapp",
    templateUrl: "templates/empty-shell.html"
}, {
    name: "home.webapp.templates",
    templateUrl: "templates/templates.html"
}, {
    name: "home.webapp.work",
    templateUrl: "templates/work.html"
}];
```

VS formats it to

``` typescript
var webApps: ng.ui.IState[] = [{
    name: "home.webapp",
    templateUrl: "templates/empty-shell.html"
}, {
        name: "home.webapp.templates",
        templateUrl: "templates/templates.html"
    }, {
        name: "home.webapp.work",
        templateUrl: "templates/work.html"
    }];
```

another example is 

``` typescript
function test($http: ng.IHttpService) {
    $http({
        url: "https://github.com",
        method: "GET"
    })
    .success((d) => {
        console.log(d);
    })
    .finally(() => {
        console.log("finally");
    });
}
```

VS formats it to 

``` typescript
function test($http: ng.IHttpService) {
    $http({
        url: "https://github.com",
        method: "GET"
    })
        .success((d) => {
            console.log(d);
        })
        .finally(() => {
            console.log("finally");
        });
}
```
Repository: go
Issue: cmd/link: android c-shared libraries are big
Labels: OS-Android,compiler/runtime

A single-function Go library importing fmt is 2.6mb:

  2627776  00-00-80 00:00   jni/armeabi-v7a/libgojni.so

That's a bit larger than the equivalent binary darwin/amd64.
Repository: youtube-dl
Issue: [filminlatino] Add extractor for filminlatino
Labels: site-support-request

Filminlatino is a streaming service by IMCINE (Mexican Film Institute) with the help of https://www.filmin.es/.

Here is an example link which is free.
https://www.filminlatino.mx/pelicula/llamenme-mike/110
Repository: rust
Issue: Deref coercions do not work with blocks
Labels: A-type-system,P-medium,T-compiler,T-types

It seems that the compiler handles a block differently when coercing a value.

``` rust
fn f(_: &str) {}

fn main() {
    let x = "Akemi Homura".to_owned();

    f(&x); // OK
    f(&(x)); // OK
    f(&{x}); // Error
}
```

[RFC 401](https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md) says that a block with type `U` is also a target for coercion, so I think this behavior is a bug.

> blocks, if a block has type `U`, then the last expression in the block (if it
> is not semicolon-terminated) is a coercion site to `U`. This includes blocks
> which are part of control flow statements, such as `if`/`else`, if the block
> has a known type.

Also, the compiler seems to be able to coerce blocks using some "trivial" rules (e.g. `&mut T` -> `&T`).

``` rust
fn f(_: &i32) {}

fn main() {
    let x = &mut 42;

    f(x); // OK
    f((x)); // OK
    f({x}); // OK
}
```

So I guess this is more likely a problem of auto-deref.
Repository: go
Issue: cmd/pprof: pprof doesn't show useful info for closure
Labels: compiler/runtime

In pprof, a closure is displayed like this: `package.func.017`.
It could be useful to add the file name and line number.

`go tool pprof -lines` is too verbose.
Repository: youtube-dl
Issue: [lynda] Add support for playlists
Labels: site-support-request

hi,

Can I know how do I download the whole course from Lynda. I try to create a playlist and download that playlist but fail......

Note: I can download individual video...But how do I do that with playlist/whole course?

C:\Python34\Scripts>youtube-dl http://www.lynda.com/MyPlaylists?playlistId=5180308 --username xxxx --password xxxxx
[generic] MyPlaylists?playlistId=5180308: Requesting header
[redirect] Following redirect to https://www.lynda.com/login/Login.aspx?redirectTo=MyPlaylists%3fplaylistId%3d5180308
[generic] Login: Requesting header
WARNING: Falling back on generic information extractor.
[generic] Login: Downloading webpage
[generic] Login: Extracting information
ERROR: Unsupported URL: https://www.lynda.com/login/Login.aspx?redirectTo=MyPlaylists%3fplaylistId%3d5180308
Repository: angular
Issue: Forms: add support for parsers and formatters
Labels: feature,state: Needs Design,freq3: high,area: forms,feature: under consideration

Implementing custom formatters and parsers is a common way to extend control types in Angular 1. 

I think there are two ways to do it in Angular 2:
- Implement parsers and formatters similar to Angular 1
- Make defining new value accessors easier, so the use case can be handled by defining a new accessor.
Repository: TypeScript
Issue: T.constructor should be of type T
Labels: Suggestion,In Discussion

Given

``` typescript
class Example {
}
```

The current type of `Example.constructor` is `Function`, but I feel that it should be `typeof Example` instead. The use case for this is as follows:

I'd like to reference the current value of an overridden static property on the current class.

In TypeScript v1.5-beta, doing this requires:

``` typescript
class Example {
    static someProperty = "Hello, world!";

    constructor() {
        // Output overloaded value of someProperty, if it is overloaded.
        console.log(
            (<typeof Example>this.constructor).someProperty
        );
    }
}

class SubExample {
    static someProperty = "Overloaded! Hello world!";

    someMethod() {
        console.log(
            (<typeof SubExample>this.constructor).someProperty
        );
    }
}
```

After this proposal, the above block could be shortened to:

``` typescript
class Example {
    static someProperty = "Hello, world!";

    constructor() {
        // Output overloaded value of someProperty, if it is overloaded.
        console.log(
            this.constructor.someProperty
        );
    }
}

class SubExample {
    static someProperty = "Overloaded! Hello world!";

    someMethod() {
        console.log(
            this.constructor.someProperty
        );
    }
}
```

This removes a cast to the current class.
Repository: TypeScript
Issue: Enum types are not checked in binary operators
Labels: Bug,Breaking Change,Help Wanted

I ran into this for real while trying to fix a bug in the compiler. We disallow assigning one enum to another if you use the `=` operator. But we do not disallow it for any of the compound assignment operators. Nor do we disallow for bitwise operators. I think we should disallow all of them.

``` ts
enum E { }
enum F { }

var e: E;
var f: F;

e = f; // Error
e |= f; // No error
var g = e | f; // No error, g is number
```
Repository: go
Issue: x/sys/unix: Select returns (int, error) on linux, but just error elsewhere
Labels: compiler/runtime

Is this inconsistency intentional?  Select is a POSIX function and has the same 'int' return value on all supported platforms where it's available, so it seems odd to only expose it on Linux.

(Motivation: I was trying to use github.com/jaracil/poll on OpenBSD, but ironically its Select-based fallback for non-Linux OSes is written assuming the Linux Select API.)
Repository: youtube-dl
Issue: Bandcamp and Youtube-dl
Labels: site-support-request

Is there any way to do youtube-dl username.bandcamp.com and it download all of the albums? Is that supported yet?

When I tried it gave me this error.

nicks-mac-mini:~ nick$ youtube-dl http://liluglymane.bandcamp.com --verbose flag
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'http://liluglymane.bandcamp.com', u'--verbose', u'flag']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.07.07
[debug] Python version 2.7.10 - Darwin-13.3.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.7.1, ffprobe 2.7.1
[debug] Proxy map: {}
[Bandcamp:album] liluglymane: Downloading webpage
ERROR: The page doesn't contain any tracks; 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 "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 654, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 273, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/bandcamp.py", line 169, in _real_extract
    raise ExtractorError('The page doesn\'t contain any tracks')
ExtractorError: The page doesn't contain any tracks; 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.
nicks-mac-mini:~ nick$
Repository: go
Issue: cmd/vet: flag/traversal parity with `go tool vet`
Labels: Analysis

There are two ways to invoke `vet`:
- `go vet`, which operates on packages but does not take options:
  `usage: vet [-n] [-x] [packages]`
- `go tool vet`, which takes options but operates on files or directories:

```
  Usage of vet:
    vet [flags] directory...
    vet [flags] files... # Must be a single package
```

It would be good to have parity between `go vet` and `go tool vet` one way or the other: either `go tool vet` should be able to operate on packages, or `go vet` should accept options. Perhaps `go tool vet` should be a superset of `go vet`.
Repository: go
Issue: net: Expose return values of default implementations of net.Addr.Network() as constants rather than hardcoded strings
Labels: NeedsInvestigation

Currently the default implementations of net.Addr.Network() functions in the net package return hard-coded strings representing the network type as below. This means that callers wanting to check the return value of these functions also have to hard-code these in their own code with the possibilities of typos leading to possibility of bugs.
- `IPAddr.Network()  : "ip"`
- `IPNet.Network() : "ip+net"`
- `TCPAddr.Network() : "tcp"`
- `UDPAddr.Network() : "udp"`
- `UnixAddr.Network() : "unix" or "unixgram" or "unixpacket"`

If we expose these default return strings as package constants and have functions use the constants instead of hard-coded strings, callers can compare function return values against constants and be protected against these types of bugs. This would also be fully backwards-compatible. 

A block of constants will also serve as a useful single point of reference in the documentation for these functions as currently we need to jump around the documentation to understand what each implementation returns. 

Happy to work out a CL for this
Repository: go
Issue: encoding/xml: empty namespace conventions are badly documented
Labels: Documentation,NeedsFix

During the discussion in #11724 @rogpeppe wrote:

> The existing Go convention is that if no namespace is specified in the struct tag, it will match any namespace including the empty namespace.

But [the package docs](http://golang.org/pkg/encoding/xml/) don't seem to mention that. This behaviour should be documented better, because a lot of people will assume that `xml:"name,attr"` will match `name="foo"` but not `ns:name="bar"`.
Repository: youtube-dl
Issue: --console-title doesn't work in tmux (or GNU screen)
Labels: request

I do most of my terminal work inside tmux, so I almost never get to take advantage of the delightful `--console-title` option. Would it be possible to detect when youtube-dl is running inside tmux (or GNU screen, I suppose) and add the appropriate DCS to the escape sequences?
- For tmux: `\ePtmux;\e\e]2;${window_title}\a\e\\`
- For screen: `\eP\e]2;${window_title}\a\e\\`
Repository: go
Issue: unicode/utf8: add "Rune"-less aliases
Labels: NeedsInvestigation,FeatureRequest

The names in the utf8 package are clumsy. We could add nicer aliases, such as Decode for DecodeRune.

Decode(p []byte) (r rune, size int) 
DecodeString(s string) (r rune, size int) 
DecodeLast(p []byte) (r rune, size int) 
DecodeLastString(s string) (r rune, size int) 

similarly for Encode.
Repository: neovim
Issue: Terminal UI buffer drops data?
Labels: bug,job-control,terminal,complexity:low

I'm attempting to run a GNU Make instance with termopen, and I'm seeing messages being dropped. I'm hooking into the on_exit() callback to write the terminal buffer to an external log, as well as parse it for errors for the quickfix list.

I deliberately added a compile error so that Make would error-out. When this happens, GCC prints to stderr, make exits, and my messages show up on the terminal. When I look at test.log, however, the last few lines are just _gone._

Rather than sharing the repository, I've managed to find a minimal case that results in lost data, namely by throwing lots of text at the terminal. I don't know if this is the same problem as the make issue, but with this test case, I get about 700 lines of "stdout," when I am expecting 2000.

I poked into it a bit and my guess is that data is being dropped somewhere after SIGCHLD is sent but there is still data either to be read in the TTY fds, or its already been sucked out of the fd but it makes it to the terminal buffer after the process has already exited and the exit callback has been called.

I've attached a minimal test case that fails on my computer as of 
5e9f9a875645af1e3c858daba799fe4a9021a767

Am I doing something stupid?

```
let s:Output = {}

function! s:Output.on_exit(id, code)
    write! test.log
endfunction

function! s:termtest()
    only
    vert botright sp | enew
    let s:Output['bufid'] = bufnr('%')
    call termopen([&sh, &shcf, './test.sh'], s:Output)
endfunction

command! -nargs=0 Termtest call s:termtest()
```

EDIT (@mhinz: shortened 2000 lines of code to two loops, as suggested by @lucc):

``` shell
#!/bin/sh
for i in {0..1000}; do echo "stdout $i"; done
for i in {0..1000}; do echo "stderr $i" 1>&2; done
```
Repository: go
Issue: x/mobile/exp/sprite: pass config.Event to arrangers
Labels: mobile

As shown in https://go-review.googlesource.com/#/c/12339/ arranger functions may need the screen dimension info. The CL work around the problem using a global var, but a better approach is to let the sprite engine provides the info it already has.

@nigeltao @crawshaw
Repository: go
Issue: net: apply ICANN/IANA-managed semantics to IP.IsGlobalUnicast
Labels: NeedsInvestigation

net.IP.IsGlobalUnicast() applies incorrect address semantics.  The current implementation returns True if the address is not Unspecified, Loopback, LinkLocal, or Multicast.  However, a Global Unicast address, by definition, excludes more than just those categories.  Class E space is to be excluded, as is all of RFC1918 & RFC6598.

This manifests in a few significant ways:

net.ParseIP("255.255.255.255").IsGlobalUnicast() currently returns True
net.ParseIP("10.1.2.3").IsGlobalUnicast() currently returns True

I would propose the following changes:
- Rename IsGlobalUnicast() to IsUnicast()
- Add a check to IsUnicast() to exclude Class E and broadcast addresses
- Create a new IsGlobalUnicast() which extends IsUnicast() by also excluding RFC1918 & RFC6598 addresses

Ideally, it would be even better to extend both further using the tables in RFC6890 as a guideline.
Repository: go
Issue: go/printer: AST rewriting and then formatting results in mangled docs
Labels: NeedsInvestigation

In golang.org/cl/12373, I wrote a cmd/fix rule to rewrite "types.Typ[x]" into "x.Basic()".  However, the naive approach causes

```
package foo

func f() {
    _ = types.Typ[types.Int]
}

// dummy godoc
func g() {
}
```

to get formatted as

```
package foo

func f() {
    _ = types.Int.Basic(

    // dummy godoc
    )
}

func g() {
}
```

I.e., the godoc for g is moved up into the arguments section for the .Basic() invocation.  ~~See http://play.golang.org/p/dwq4E8dsMW for a working example.~~  _Edit: See http://play.golang.org/p/CP8ylmNjmQ for an updated working example using ast.CommentMap._

As a workaround, I found setting Rparen seems to prevent the issue.  I wouldn't expect that to be necessary though.
Repository: kubernetes
Issue: Promotable canary deployments (aka auto-pause)
Labels: area/app-lifecycle,area/workload-api/deployment,sig/apps,priority/important-longterm,lifecycle/frozen

Writing the new user guide made me think about this.

It's currently easy to run multiple release tracks (e.g., daily release and weekly release), by just running separate replication controllers indefinitely.

However, if someone wants to run a couple canary instances for a while and then roll out the same image to replace the full replica set once it has been sufficiently validated, we don't have direct support for that.

It is relatively easy to just kill kubectl rolling-update in the middle and resume or rollback later, but only if the rate of the rollout is sufficiently slow and one is watching it closely.

The simplest solution I can think of is to automate killing kubectl rolling-update: a --canaries=N flag, which would cause it to break out of the update loop after ramping up the new replication controller to N. The rolling update should be resumable just as if it were killed manually, to promote the canary to the current version.

cc @kelseyhightower
Repository: rust
Issue: str and [u8] should hash the same
Labels: T-libs-api,C-feature-request

`str` and `[u8]` hash differently and have done since the solution to #5257.

This is inconvenient in that it leads to things like the `StrTendril` type (from the `tendril` crate) hashing like a `[u8]` rather than like a `str`; one is thus unable to happily implement `Borrow<str>` on it in order to make `HashMap<StrTendril, _>` palatable.

`[u8]` gets its length prepended, while `str` gets 0xff appended. Sure, one u8 rather than one usize is theoretically cheaper to hash; but marginally so only, marginally so. I see no good reason why they should use different techniques, and so I suggest that `str` should be changed to use the hashing technique of `[u8]`. This will prevent potential nasty surprises and bring us back closer to the blissful land of “str is just [u8] with a UTF-8 guarantee”.

Hashes being internal matters, I do not believe this should be considered a _breaking_ change, but it would still probably be a release-notes-worthy change as it _could_ conceivably break eldritch codes.
Repository: rust
Issue: Failure to fulfill higher-kinded "outlives" predicate could have better error message
Labels: E-hard,C-enhancement,A-diagnostics,T-compiler

Example:

``` rust
fn foo<T>() where for<'a> T: 'a {}

fn bar<'b>() {
    foo::<&'b i32>();
}

fn main() {}
```

Error:

```
foo.rs:4:5: 4:19 error: the type `&'b i32` does not fulfill the required lifetime
foo.rs:4     foo::<&'b i32>();
             ^~~~~~~~~~~~~~
note: type must outlive the static lifetime
error: aborting due to previous error
```

It's not necessarily obvious why the type has to be `'static` in this case.
Repository: youtube-dl
Issue: site support request - lattelecom.tv
Labels: site-support-request

please add support for:
https://www.lattelecom.tv/tiesraide

in particular I am trying to record this festival livestream:
https://www.lattelecom.tv/tiesraide/360tv_positivus

in order to watch it I had to register for free by email and clicking on an activation link. else the video stream would just play one minute.

I could not spot anything like HDS, HLS streaming but only this url:

http://195.13.206.152/loadbalancer?stream=lattelecom_lv_lq.stream&stream=lattelecom_lv_hq.stream

cheers
Repository: go
Issue: cmd/pprof: make runtime.reflectcall followable by pprof
Labels: NeedsInvestigation

Context: http://stackoverflow.com/q/31419307/532430

Proposal: allow pprof to follow reflective function invocations via `runtime.reflectcall` so that code "after the jump" can be profiled.

I think the idea is simple enough but if anything was unclear just ask and I'll try to clarify.
Repository: youtube-dl
Issue: Add support to RASD TV
Labels: site-support-request

Hello!

Could you please add support to the Saharawi people Television site?[1] An example URL is this one.[2] Any hint is welcome too.

Thanks

[1] http://www.rasd.tv/
[2] http://www.rasd.tv/index.php/video/2958/%D9%86%D8%B4%D8%B1%D8%A9-%D8%A7%D9%84%D8%A7%D8%AE%D8%A8%D8%A7%D8%B1-18-07-2015
Repository: go
Issue: image/color: NRGBA(64).RGBA() optimization
Labels: Performance,NeedsInvestigation

If alpha is equal to 0xffff, return r,b,g,a.
If alpha is equal to 0, return 0,0,0,0.
Else, multiply by alpha, divide by 0xffff, return r,g,b,a.

New code:

``` go
func (c NRGBA) RGBA() (r, g, b, a uint32) {
    a = uint32(c.A)
    a |= a << 8
    if a == 0 {
        return 0, 0, 0, 0
    }
    r = uint32(c.R)
    r |= r << 8
    g = uint32(c.G)
    g |= g << 8
    b = uint32(c.B)
    b |= b << 8
    if a == 0xffff {
        return
    }
    r = r * a / 0xffff
    g = g * a / 0xffff
    b = b * a / 0xffff
    return
}

func (c NRGBA64) RGBA() (r, g, b, a uint32) {
    a = uint32(c.A)
    if a == 0 {
        return 0, 0, 0, 0
    }
    r = uint32(c.R)
    g = uint32(c.G)
    b = uint32(c.B)
    if a == 0xffff {
        return
    }
    r = r * a / 0xffff
    g = g * a / 0xffff
    b = b * a / 0xffff
    return
}
```
Repository: java-design-patterns
Issue: Open Session In View pattern
Labels: info: help wanted,epic: pattern,type: feature

### Description
The Open Session In View (OSIV) design pattern is aimed at solving the problem of lazy loading in web applications. It allows an open persistence context for the duration of a request, enabling lazy-loaded associations to be accessed and resolved within the view layer.

#### Main Elements of Open Session In View Pattern:
1. **Persistence Context**: Maintains the session open throughout the entire request.
2. **Interceptor or Filter**: Manages the lifecycle of the session, ensuring it starts at the beginning of the request and is closed at the end.
3. **Lazy Loading**: Allows associations to be lazily loaded and accessed in the view layer without encountering `LazyInitializationException`.
4. **Transactional Boundaries**: Ensures transactions are committed before the view is rendered but keeps the session open to resolve lazy-loaded associations.

### References
- [Project Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki)
- [The Open Session In View Anti-Pattern](https://vladmihalcea.com/the-open-session-in-view-anti-pattern/)
- [Open Session In View Pattern](https://www.linkedin.com/pulse/open-session-view-pattern-hamed-hatami/)

### Acceptance Criteria
1. Implement an interceptor or filter to manage the session lifecycle, ensuring the session is opened at the start of the request and closed at the end.
2. Ensure that the transactional boundaries are respected, with transactions being committed before rendering the view.
3. Validate that lazy-loaded associations can be accessed in the view layer without triggering `LazyInitializationException`.
Repository: thefuck
Issue: Add ability to edit suggested command
Labels: enhancement

It'll be good to have ability to edit suggested command.
Repository: thefuck
Issue: How to install it on Windows?
Labels: windows

I'm using Windows 7
I installed successfully python 3.4.3 and "the fuck" package by using "pip install thefuck" on command line
However, I don't know how to apply "the fuck" for my Git Bash (located at "C:\Program Files\Git\bin\sh.exe")
Repository: go
Issue: all: user-facing golang.org/x repos need to stay green
Labels: NeedsFix,release-blocker

We need to get the subrepos green consistently for 1.5 and moving forward.

edit 2023-06-23 by @heschi:
Modules that are vendored into the main release, such as `net` and `sys`, as well as user-facing libraries like `tools` and `text`, must be healthy before a release can be issued. Other modules are out of scope.
Repository: youtube-dl
Issue: szpport hclips.com
Labels: site-support-request

could we add  hclips.com ?

Thanks