sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: Invalid YML when storing strings containing control characters
Labels: bug,category: core,RFC

### Please state the information for your system
- OpenCV version: 3.1
### In which part of the OpenCV library you got the issue?
- persistence
### Expected behaviour

Strings containing only FileStorage control characters like `[` or `{` should be correctly (de)serializable, below code should generate:

```
%YAML:1.0
key0: "[]"
key1: "{}"
key2: "some [text]"
key3: "some {text}"
key4: " {}"
```
### Actual behaviour

The control characters are interpreted.

The file generated by the code below looks like this:

```
%YAML:1.0
key0: !!]
   - key1
   - !!}
      key2: "some [text]"
      key3: "some {test}"
      key4: " {}"
```
### Additional description
### Code example to reproduce the issue / Steps to reproduce the issue

Please try to give a full example which will compile as is.

```
#include <opencv2/core.hpp>
#include <iostream>

//Below code will become a TEST later on
#define EXPECT_NO_THROW(x) x
#define ASSERT_STREQ(x,y) if(std::string(x) != std::string(y)) { std::cerr << "ERROR: " << x << "!=" << y << "." << std::endl;}

int main(int argc, char **argv)
{
    cv::FileStorage f("dummy.yml", cv::FileStorage::WRITE | cv::FileStorage::MEMORY);
    const int valueCount = 5;
    std::string values[5] = { "[]", "{}", "some [text]", "some {test}", " {}" };
    for (size_t i = 0; i < valueCount; i++) {
        EXPECT_NO_THROW(f << cv::format("key%d", i) << values[i]);
    }

    cv::String serialized = f.releaseAndGetString();
    std::cout << serialized << std::endl << std::endl;

    cv::FileStorage f2(serialized, cv::FileStorage::READ | cv::FileStorage::MEMORY);
    std::string valuesRead[valueCount];
    for (size_t i = 0; i < valueCount; i++) {
        EXPECT_NO_THROW(f2[cv::format("key%d", i)] >> valuesRead[i]);
        ASSERT_STREQ(values[i].c_str(), valuesRead[i].c_str());        
    }
    return 0;
} //main
```
Repository: java-design-patterns
Issue: Asynchronous Retry pattern
Labels: info: help wanted,epic: pattern,type: feature

**Description:**

The Asynchronous Retry design pattern is aimed at handling transient failures in a reliable and efficient manner. This pattern allows an application to retry an operation asynchronously, ensuring that the application does not block waiting for an operation to complete. This is particularly useful in distributed systems where transient faults are common.

**Main Elements of the Pattern:**
1. **Retry Logic:** Define a retry mechanism that can handle transient failures. This should include a backoff strategy to prevent overwhelming the system.
2. **Asynchronous Execution:** Implement the retry logic in a way that allows the application to continue executing other tasks while waiting for the retries to complete.
3. **Callback Mechanism:** Provide a way to notify the application when the operation either succeeds or exhausts all retry attempts.
4. **Configuration:** Allow configuration of retry parameters such as the number of attempts, delay between retries, and the backoff strategy.
5. **Error Handling:** Implement proper error handling to manage the final outcome if all retry attempts fail.

**References:**
- [Project Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki)
- [Asynchronous Retry Pattern Overview](https://dzone.com/articles/asynchronous-retry-pattern)

**Acceptance Criteria:**
1. Implement a robust and configurable asynchronous retry mechanism with support for various backoff strategies.
2. Ensure that the application can continue executing other tasks while the retry mechanism is in progress.
3. Provide a callback mechanism to handle the success or failure of the retried operation, including proper error handling for failed attempts.
Repository: go
Issue: proposal: Add an x/media package
Labels: Proposal,Proposal-Hold

# The Proposal

Golang has an `x/image` "extension" library. Adding an `x/media` package for parsing video and audio transports (and possibly codecs) seems a logical extension. Interacting with media is an extremely common task today, having this as part of the standard library would probably be beneficial for all.
# Proposed Implementation

We at Comcast have recently open sourced our [aac parser](https://github.com/Comcast/gaad). We also are looking to open source our parsers for h.264, h.265, DD, DD+, and MPEG2-TS. We would like to work with the go community to make them available in a golang extensions package. These parsers are currently only for the framing and transports, not the actual decoding.
## Similar Items

It appears the `x/image` has some ability to deal with the vp8 codec, but doesn't appear to deal with framing of any sort.
Repository: TypeScript
Issue: Typescript type annotations as comments
Labels: Suggestion,Needs Proposal,Domain: JavaScript

Typescript’s goal is simply be Javascript + Types.

There are many use cases where one might want to use the excellent typechecker but not really have any emit stage. 

Projects already written in javascript work with allowJS. Typescript already supports parsing types from jsdoc comments. 

What would be really awesome is just comment annotating your javascript with types and the project gets the benefit of being type checked.  This could be a boon for a lot of existing javascript projects. Getting intellisense, VSCode typechecking on the fly and a lot of language server awesomeness.

e.g. 

```
/// <reference path="..." />

class Hello {
    /*:: private*/ hello(message /*: string*/) /*: Promise<{}>*/{
                const promise /*: Promise<void>*/ = null 
        return /*:: <Promise<{}>>*/ null;
    }
}
```

i.e 

/_: [type] */
/_:: [tscode] */
Repository: rust
Issue: Wrapping<_> implements ShX<usize> but wrapping_shX takes u32
Labels: T-libs-api,C-bug

This is mostly just slightly confusing.

[`impl ShX for Wrapping<_>`](https://github.com/rust-lang/rust/blob/61d3b263a793b390f6231f08d862e8c71d04e3ef/library/core/src/num/wrapping.rs#L188-L205) (the code refers to #23545, I'm not sure how this is related).

[`wrapping_shX`](https://github.com/rust-lang/rust/blob/master/src/libcore/num/mod.rs#L816-864)
Repository: youtube-dl
Issue: Feature request: "-v" reports the actual selected format
Labels: request

## Please follow the guide below
- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly
- Put an `x` into all the boxes [ ] relevant to your _issue_ (like that [x])
- Use _Preview_ tab to see how your issue will actually look like

---
### Make sure you are using the _latest_ version: run `youtube-dl --version` and ensure your version is _2016.07.13_. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [x ] I've **verified** and **I assure** that I'm running youtube-dl **2016.07.13**
### Before submitting an _issue_ make sure you have:
- [ x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [ x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
### What is the purpose of your _issue_?
- [ ] Bug report (encountered problems with youtube-dl)
- [ ] Site support request (request for adding support for a new site)
- [ x] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---

"-v" does not currently report what format was selected.
It would be nice if it did.

All I get right now is

```
[debug] Invoking downloader on u'https://r6---sn-a5meknee.googlevideo.com/videoplayback/id/c7446f8d75c579c9/itag/135/source/yt_otf/requiressl/yes/initcwndbps/430000/pl/21/nh/IgpwcjAxLmxheDE2KgkxMjcuMC4wLjE/mn/sn-a5meknee/mm/31/ms/au/mv/m/ratebypass/yes/mime/video%2Fmp4/otfp/1/otf/1/lmt/1465968767332073/key/dg_yt0/mt/1468462601/signature/576BFF6BA424965A3211CB2BE907DD43D27D5AF8.5CE0AC5B1DF1B9B45CA0ED1CA1DDAA5FF71020D6/upn/ObSsecJ6LH4/sver/3/fexp/9407157,9413138,9416126,9416891,9419451,9422596,9424134,9428398,9429856,9431012,9433096,9433380,9433946,9435526,9435876,9435922,9436635,9437066,9437078,9437552,9437742,9438663,9438731,9439601,9439652,9440364,9440376/ip/108.192.89.65/ipbits/0/expire/1468484485/sparams/ip,ipbits,expire,id,itag,source,requiressl,initcwndbps,pl,nh,mn,mm,ms,mv,ratebypass,mime,otfp,otf,lmt/'
[dashsegments] Total fragments: 1093
```
Repository: TypeScript
Issue: Way of specifying non-enumerable properties
Labels: Suggestion,Awaiting More Feedback

Object assign is defined like below in TS:

``` ts
interface ObjectConstructor {
    /**
      * Copy the values of all of the enumerable own properties from one or more source objects to a
      * target object. Returns the target object.
      * @param target The target object to copy to.
      * @param source The source object from which to copy properties.
      */
    assign<T, U>(target: T, source: U): T & U;
}
```

Though from MDN it is only copying members that are enumerable:

> The Object.assign() method is used to copy the values of all enumerable own properties from one or more source objects to a target object. It will return the target object.

So if `U` above has non-enumerable members, TS will copy them anyway. This is slightly incorrect and unsafe.

One issue I recently ran into was

``` ts
const selection = Object.assign({}, window.getSelection());
```

I was assuming I was copying all members of the `Selection` object to `{}`:

``` ts
interface Selection {
    readonly anchorNode: Node;
    readonly anchorOffset: number;
    // etc ...
}

declare var Selection: {
    prototype: Selection;
    new(): Selection;
}
```

Though it didn't copy any members at all, because the `Selection` object only contains non-enumerable members.
## Proposal

Mark properties as non-enumerable

``` ts
interface Selection {
    readonly nonenum anchorNode: Node;
    readonly nonenum anchorOffset: number;
    // etc ...
}
```

And have an operator to get the only "enum side" of a type:

``` ts
interface ObjectConstructor {
    /**
      * Copy the values of all of the enumerable own properties from one or more source objects to a
      * target object. Returns the target object.
      * @param target The target object to copy to.
      * @param source The source object from which to copy properties.
      */
    assign<T, U>(target: T, source: U): T & enumsof U;
}
```
Repository: go
Issue: go/printer: confusing indentation for nested structs
Labels: NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!
1. What version of Go are you using (`go version`)?
   go version go1.6.1 linux/amd64
2. What operating system and processor architecture are you using (`go env`)?
   GOARCH="amd64"
   GOBIN=""
   GOEXE=""
   GOHOSTARCH="amd64"
   GOHOSTOS="linux"
   GOOS="linux"
   GOPATH=""
   GORACE=""
   GOROOT="/usr/lib/google-golang"
   GOTOOLDIR="/usr/lib/google-golang/pkg/tool/linux_amd64"
   GO15VENDOREXPERIMENT="1"
   CC="gcc"
   GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -gno-record-gcc-switches -fdebug-prefix-map=/tmp/go-build255917305=/tmp/go-build"
   CXX="g++"
   CGO_ENABLED="1"
3. What did you do?
   Run `gofmt` on a file containing this code, that has confusing indention

```
    tests := []struct {
        name  string
        input *StructA
        want  string
    }{
        {"empty", &StructA{
            NestedB: &StructB{},
        },                       //  <- Confusion indention
            "",                  //  <- Confusion indention
        },
    }
```
1. What did you expect to see?
   The indention was changed to something less confusing.
2. What did you see instead?
   The indention is what gofmt intends, even though it is confusion.
Repository: vscode
Issue: User configurable menus
Labels: feature-request,api,menus

We now allows extension writer to contribute menu items. The next logical step is to allow user to configure their menus - this is analog to the keybindings-story. One idea is to have a `menus.json` file which defines your menus:

``` json
{
  "editor/context": [
  {
    "command": "my command",
    "when": "editorHasSelection"
  },
  {
   // more..
  }
  ],
 "explorer/context": [
   // more ...
  ]
}
```
Repository: go
Issue: cmd/trace: the trace command should not contain hardcoded javascript
Labels: NeedsFix,compiler/runtime

Please answer these questions before submitting your issue. Thanks!

1) What version of Go are you using (`go version`)?

Latest master 1.7.

2) What operating system and processor architecture are you using (`go env`)?

n/a, but darwin/linux amd64.

3) What did you do?

I originally tried to use `go tool trace` in 1.6:
- found that the bundled catapult trace viewer was so old as to need [a deprecated experimental browser api](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe)
- followed the thread from [`misc/trace/README.md`](https://github.com/golang/go/blob/release-branch.go1.6/misc/trace/README.md)
- after copying in a newer trace viewer bundle, it turned out that the api had shifted so much that the inline javascript was now broken

From there I started hacking on my copy of the go 1.6 source, eventually I got a hold of the 1.7 source and found that at least all of the assets had already been upgraded (now including a polyfill for the ill-fated Object.observe).

However the future surface area fur such drift had only increased since 1.6; compare:
- before: https://github.com/golang/go/blob/release-branch.go1.6/src/cmd/trace/trace.go#L51
- after: https://github.com/golang/go/blob/master/src/cmd/trace/trace.go#L50

This is truly unfortunate since the only dynamic part of that entire "template" is a URL parameter for the XHR request to load data.

4) What did you expect to see?

Principled separation between frontend code and server-side code.

5) What did you see instead?

A hardcoded html+javascript "template" (not even an [html/template](https://golang.org/pkg/html/template/)

I have a proposed change that I'm working to get into [Gerrit](https://go.googlesource.com) now.
Repository: neovim
Issue: Echo output in a callback handler
Labels: bug,event-loop,display,messages

When doing `:call s:test()` manually, it prints two lines. I'd expect the same to happen when called from a callback handler, but then, only the last line is printed (although both get logged in the message history of course).

The same happens for all `:echo*` commands.

Bug or is there are technical reason? It's as if there's an implicit `:redraw` after each `:echomsg`.

``` vim
function! s:test()
  redraw
  echomsg 'foo'
  echomsg 'bar'
endfunction

" call s:test()
call jobstart('true', {'on_exit': function('s:test')})
```
Repository: youtube-dl
Issue: Site Support Request: CBT Nuggets
Labels: account-needed

## Please follow the guide below
- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly
- Put an `x` into all the boxes [ ] relevant to your _issue_ (like that [x])
- Use _Preview_ tab to see how your issue will actually look like

---
### Make sure you are using the _latest_ version: run `youtube-dl --version` and ensure your version is _2016.07.13_. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2016.07.13**
### Before submitting an _issue_ make sure you have:
- [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
### What is the purpose of your _issue_?
- [ ] Bug report (encountered problems with youtube-dl)
- [x] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---
### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your _issue_

---
### If the purpose of this _issue_ is a _site support request_ please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**):
- Single video: https://www.cbtnuggets.com/it-training/microsoft-windows-server-2012-training-70-410-r2/1?autoplay=1
- Playlist: https://www.cbtnuggets.com/it-training/microsoft-windows-server-2012-training-70-410-r2

Note: An account with a subscription is required. You can get a 1-week trial with a credit card.
Repository: rust
Issue: Spurious (?) "trait bound not satisfied" with associated type constructors
Labels: A-type-system,E-needs-test,T-compiler,C-bug,T-types

I’m using the technique mentioned at https://github.com/rust-lang/rfcs/pull/1598/files/8e922c0cede49b0b07ac6fcf29ea736aab29acb9#r68995241 and used at https://github.com/nikomatsakis/nll/blob/master/graph-algorithms/src/lib.rs to have in a trait an associated type constructor that takes a lifetime parameter.

rustc 1.12.0-nightly (7ad125c4e 2016-07-11)

``` rust
pub trait TypeConstructor<'a> {
    type BorrowedNamespace;
}

pub trait SelectorImpl
where Self: for<'a> TypeConstructor<'a> {
    // These two definitions should be equivalent (for `ExampleImpl`), but only the latter compiles.
    type Namespace: PartialEq + for<'a> PartialEq<<Self as TypeConstructor<'a>>::BorrowedNamespace>;
//  type Namespace: PartialEq + for<'a> PartialEq<&'a str>;

    // For illustration:
    fn get_namespace<'a>(&'a self) -> <Self as TypeConstructor<'a>>::BorrowedNamespace;
}


pub struct ExampleImpl;

impl<'a> TypeConstructor<'a> for ExampleImpl {
    type BorrowedNamespace = &'a str;
}

impl SelectorImpl for ExampleImpl {
    type Namespace = String;

    fn get_namespace<'a>(&'a self) -> &'a str { unimplemented!() }
}
```

``` rust
error: the trait bound `for<'a> std::string::String: std::cmp::PartialEq<<ExampleImpl as TypeConstructor<'a>>::BorrowedNamespace>` is not satisfied [--explain E0277]
  --> a.rs:22:6
   |>
22 |> impl SelectorImpl for ExampleImpl {
   |>      ^^^^^^^^^^^^
help: the following implementations were found:
help:   <std::string::String as std::cmp::PartialEq>
help:   <std::string::String as std::cmp::PartialEq<str>>
help:   <std::string::String as std::cmp::PartialEq<&'a str>>
help:   <std::string::String as std::cmp::PartialEq<std::borrow::Cow<'a, str>>>
note: required by `SelectorImpl`

error: aborting due to previous error
```

Since`<ExampleImpl as TypeConstructor<'a>>::BorrowedNamespace` is `&'a str` for any `'a`, I believe the bound `for<'a> std::string::String: std::cmp::PartialEq<<ExampleImpl as TypeConstructor<'a>>::BorrowedNamespace>` is equivalent to `for<'a> std::string::String: std::cmp::PartialEq<&'a str>`, which is the third bound that was found.
Repository: youtube-dl
Issue: Support for wenoo.net
Labels: site-support-request

## Please follow the guide below
- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly
- Put an `x` into all the boxes [ ] relevant to your _issue_ (like that [x])
- Use _Preview_ tab to see how your issue will actually look like

---
### Make sure you are using the _latest_ version: run `youtube-dl --version` and ensure your version is _2016.07.13_. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2016.07.13**
### Before submitting an _issue_ make sure you have:
- [ ] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [ ] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
### What is the purpose of your _issue_?
- [ ] Bug report (encountered problems with youtube-dl)
- [x] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---
### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your _issue_

---
### If the purpose of this _issue_ is a _bug report_, _site support request_ or you are not completely sure provide the full verbose output as follows:

Add `-v` flag to **your command line** you run youtube-dl with, copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```):

```
$ youtube-dl -v <your command line>
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2016.07.13
[debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
[debug] Proxy map: {}
...
<end of log>
```

---

Video link: http://wenoo.net/video/1f1d1d434f90869367a

---

Hi there, so there's another successor of Zippcast aside from Vidbit that people have been using to upload videos on to. That site is Wenoo (http://wenoo.net). It's listed under "generic" but does not have a unique scraper, like for the description. Try the example video above and you'll see what I mean.
Repository: youtube-dl
Issue: [iqiyi] Support videos unavailable on TV (was: Error code:A00110)
Labels: broken-IE

I was able to watch , but you can not use YouTubeDL.EXE download file

F:\yy\you>youtube-dl.exe http://www.iqiyi.com/v_19rrm8ddgg.html
[iqiyi] temp_id: download video page
[iqiyi] ba3f3aba19610a46d55734663b8cde23: Downloading JSON metadata
ERROR: Unable to load data. Error code: A00110; please report this issue on http
s://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 i
ts complete output.

F:\yy\you>youtube-dl.exe --verbos http://www.iqiyi.com/v_19rrm8ddgg.html
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbos', 'http://www.iqiyi.com/v_19rrm8ddgg.html'
]
[debug] Encodings: locale cp936, fs mbcs, out cp936, pref cp936
[debug] youtube-dl version 2016.07.16
[debug] Python version 3.4.4 - Windows-2008ServerR2-6.1.7601-SP1
[debug] exe versions: none
[debug] Proxy map: {}
[iqiyi] temp_id: download video page
[iqiyi] ba3f3aba19610a46d55734663b8cde23: Downloading JSON metadata
ERROR: Unable to load data. Error code: A00110; please report this issue on http
s://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 i
ts complete output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp46voakwt\bu
ild\youtube_dl\YoutubeDL.py", line 682, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp46voakwt\bu
ild\youtube_dl\extractor\common.py", line 347, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp46voakwt\bu
ild\youtube_dl\extractor\iqiyi.py", line 356, in _real_extract
youtube_dl.utils.ExtractorError: Unable to load data. Error code: A00110; 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.