sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: You-Dont-Know-JS
Issue: "types & grammar": ch4, a few more "crazy" comparisons
Labels: for second edition

It may be worthwhile to point out a few more ["loose equals" (`==`) oddities](https://github.com/getify/You-Dont-Know-JS/blob/master/types%20&%20grammar/ch4.md#the-crazy-ones) resulting from Booleans being coerced to Numbers, and Objects to their primitive values. I'm thinking specifically of Arrays:

``` js
// These are all true:
console.log([] == false);
console.log([0] == false);
console.log(['0'] == false)
console.log([''] == false)
console.log(['  '] == false)
console.log([null] == false);
console.log([undefined] == false);

// Though, these are false:
console.log([false] == false);
console.log([NaN] == false);

// These are both true:
console.log([1] == true);
console.log(['1'] == true)

// While these are false:
console.log([42] == true);
console.log(['42'] == true);
console.log([true] == true);
```

You may not consider that behavior worth noting, and if so I would not argue with you :)
Repository: thefuck
Issue: changing package name when I use "sudo apt-get install"
Labels: help wanted

I know there shouldn't be nothing wrong with the command `sudo apt-get install numix-wallpaper-aurora` itself, but I think thefuck shouldn't be suggesting me to install other package.

![screenshot from 2015-09-09 15 28 12](https://cloud.githubusercontent.com/assets/3688797/9770640/985ff428-5707-11e5-853a-e46d4f2931f4.png)

This is my last commands history:

![screenshot from 2015-09-09 15 32 15](https://cloud.githubusercontent.com/assets/3688797/9770689/fc935692-5707-11e5-9abe-09d3cc6bfff6.png)
Repository: youtube-dl
Issue: feature reuquest to support  http://www.wildsafarilive.com/
Labels: site-support-request

I'm recently getting hooked on watching this website about mostly lions, and one of the rangers records it on screen and uploads it to youtube, however, it takes too long and I'm trying to automate it

you can also watch same live show at http://www.wildearth.tv/cam/wildearth-safaris

so, support for either of http://www.wildearth.tv/cam/wildearth-safaris or  http://www.wildsafarilive.com/ is appreciated
Repository: youtube-dl
Issue: [site-support-request] DeutschlandRadioKultur, Deutschlandradio, DR Wissen
Labels: site-support-request

Pages like http://www.deutschlandradiokultur.de/bestsellerautor-marc-elsberg-wie-realistisch-sind-ihre.970.de.html?dram:article_id=330629 have mp3 "play" urls (in this specific case: http://ondemand-mp3.dradio.de/file/dradio/2015/09/10/drk_20150910_0907_9054fc27.mp3 ), but are currently not detected by youtube-dl.

Would be nice to have these Urls fetchable, too.
Repository: go
Issue: x/mobile/bind: support types from external packages
Labels: mobile

@crawshaw
Repository: go
Issue: x/mobile/cmd/gomobile: gomobile bind returning io.Reader errors
Labels: NeedsInvestigation,mobile

I'm running into an error when running "gomobile bind --target=ios":
gomobile: type io.Reader not defined in package package goax ("github.com/garry415/goax")

unsupported, direct named type github.com/garry415/goax.KeyExchange: struct{IdentityPublic []byte "bencode:\"identity\""; Dh []byte "bencode:\"dh\""; Dh1 []byte "bencode:\"dh1\""}

I'm importing "io" and KeyExchange has only private fields. I don't think it should report this error.

Environment: Go 1.5, OS X Yosemite 10.10.4
Repository: youtube-dl
Issue: cant download from qq
Labels: site-support-request

Hi
I tried:

```
youtube-dl http://v.qq.com/page/y/i/0/y01647bfni0.html
[generic] y01647bfni0: Requesting header
WARNING: Falling back on generic information extractor.
[generic] y01647bfni0: Downloading webpage
[generic] y01647bfni0: Extracting information
ERROR: Unsupported URL: http://v.qq.com/page/y/i/0/y01647bfni0.html
```

[Supported sites](http://rg3.github.io/youtube-dl/supportedsites.html) lists some qq sites as supported though.
Repository: youtube-dl
Issue: Support for video.thethao247.vn
Labels: site-support-request

Dear all,
Can you help for getting direct link from this site: mecloud.vn
For examlple:
embed.mecloud.vn/play/SLJtqLj3IO.

Regards,
SSD
Repository: go
Issue: database/sql: Ability to get drivername from instance
Labels: FeatureRequest

I'd like to be able to get the driver name..

eg

``` go
Db, err = sql.Open("mysql", "root:root@/somestuff")
fmt.Printf("Driver= ",  Db.Driver.Name) << Need...
```

Case Example.. I want to derive an sqlx instance from an existing connection

``` go
// Currently
func SetupDb( driver string, db *sql.DB){
    Dbx = sqlx.NewDb(db, driver)
}
// Wanted
func SetupDb( db *sql.DB){
    Dbx = sqlx.NewDb(db, db.Driver.Name)
}
```

https://github.com/daffodil/go-mailkit/blob/master/postfixadmin/setup.go#L15
Repository: youtube-dl
Issue: can not combine --playlist-reverse and --playlist-start?
Labels: request

Hello everyone

i was playing with the --playlist-reverse and the --playlist start NUMBER options to try to download in chronological order and resume where i stopped (like the next day continue at the 26th video) and found that these two options do not work together. 

im not sure if this is a bug or if they are not supposed to be combined at all (maybe the help should say so then): in this case i would like to make a feature request for it! 

some examples to show what i mean:
1: playlist-start 1 - no reverse
C:\youtubedl>youtube-dl.exe -e --max-downloads 3 --playlist-start 1 https://www.youtube.com/user/youtube
Introducing YouTube Gaming
# ProudToLove -  Celebrating Marriage Equality and LGBT Pride Month

The A-Z of YouTube: Celebrating 10 Years

2: playlist-start 3 - no reverse (works as expected #1 video now = #3 of the previous command)
C:\youtubedl>youtube-dl.exe -e --max-downloads 3 --playlist-start 3 https://www.youtube.com/user/youtube
The A-Z of YouTube: Celebrating 10 Years
# DearMe - What Advice Would You Give Your Younger Self?

Highlights From the YouTube Interview with President Obama

3: playlist-start 1 + reverse
C:\youtubedl>youtube-dl.exe -e --max-downloads 3 --playlist-reverse --playlist-start 1 https://www.youtube.com/user/youtube
YouTube on the tube!
Hammer Time!
A Message From Chad and Steve

and finally 
4: playlist-start 3 + reverse (BUG HERE: this gives the same result as command #3 above)
C:\youtubedl>youtube-dl.exe -e --max-downloads 3 --playlist-reverse --playlist-start 3 https://www.youtube.com/user/youtube
YouTube on the tube!
Hammer Time!
A Message From Chad and Steve

thanks in advance for feedback!
Repository: youtube-dl
Issue: List human-readable video title where possible in format list (-F) display
Labels: request

I often use `-F` to list the possible video encoding formats I can use for videos.

When I do this, I see something like

```
[info] Available formats for dQw4w9WgXcQ:
...
```

which tells me nothing about the video.

I've recently discovered that the formats available for YouTube videos is unpredictable and depends on what batch-transcoding settings were in place when the video was originally uploaded.

If I do an `-F` request for several videos, I'll get a terminal full of "Available formats for ....." and I'll then need to repeatedly crossreference the video IDs manually to work out what to do next - I might want to find a higher quality copy of a given video, or I might only want the audio track of another, etc, but I can only make the appropriate judgement calls if I know the title of the video in question!

I would suggest [re]using the filename output format specifier (minus the file extension, if feasible) to control the presentation.

Thanks for such an awesome program, btw! :D
Repository: go
Issue: encoding/xml: XML CDATA section could be joined together with regular characters
Labels: NeedsInvestigation

go version go1.5 darwin/amd64

One thing I stumbled across yesterday (not a real bug, but a minor nuisance from a user's perspective perhaps): 

```
package main

import (
    "encoding/xml"
    "fmt"
    "strings"
)

func main() {
    src := `<root>a<![CDATA[b]]>c</root>`
    r := strings.NewReader(src)

    dec := xml.NewDecoder(r)
    for {
        tok, err := dec.Token()
        if err != nil {
            fmt.Println(err)
            break
        }
        fmt.Printf("%#v\n", tok)
    }
}
```

gives

```
xml.StartElement{Name:xml.Name{Space:"", Local:"root"}, Attr:[]xml.Attr{}}
xml.CharData{0x61}
xml.CharData{0x62}
xml.CharData{0x63}
xml.EndElement{Name:xml.Name{Space:"", Local:"root"}}
EOF
```

I would expect one `xml.CharData{}` token instead:

```
xml.StartElement{Name:xml.Name{Space:"", Local:"root"}, Attr:[]xml.Attr{}}
xml.CharData{0x61, 0x62, 0x63}
xml.EndElement{Name:xml.Name{Space:"", Local:"root"}}
EOF
```

While I understand the source of the three tokens, I would expect one as the user (= me) is unable to distinguish between a CDATA node and a regular text node.
Repository: opencv
Issue: Optimizing cvReprojectImageTo3D()
Labels: priority: normal,feature,category: calib3d,affected: 3.4

As part of an API release, I have published a method for projecting a disparity map to 3D points, similar to cvReprojectImageTo3D(). Unlike the OpenCV implementation, my approach makes use of SSE2 or AVX2 to gain significant speed-ups. The code has been published under the MIT license, which should allow a re-distribution under the BSD license (and if not, you have my permissions).

Code for the method in question can viewed here:
http://nerian.com/products/sp1-stereo-vision/api-doc/reconstruct3d_8cpp_source.html

The entire API source code can also be downloaded from this location:
http://nerian.com/products/sp1-stereo-vision/downloads/sp1-software-1_0_1-src.tar.xz

I think it would be nice to have these optimizations ported to OpenCV. However, there are some significant differences to the OpenCV method:
- Points in the produced point cloud are aligned to 16-byte boundaries, introducing 4 bytes of padding. But this could be changed using unaligned stores, with some performance penalties
- The method only works for 16-bit unsigned disparity maps. OpenCV only works with 8-bit unsigned, 16-bit signed, 32-bit signed or 32-bit floating.
- Invalid disparities are assumed to have a large value (>=0xFFF). OpenCV expects a small value.
- It is possible to specify a minimum disparity value
- All computations are performed with floats, rather than doubles.

So, I'm not sure if its worth porting that to OpenCV. I guess at at least the 16-bit signed case could be covered, but the handling of invalid disparities is rather different.

Any suggestions?
Konstantin
Repository: youtube-dl
Issue: request: add option for re-download video in better quality
Labels: request

YouTube public video is not in the best quality to make it available as soon as possible (for video encoding in a better quality requires more time). If the video is downloaded in any capacity, the programa miss it. I would like to be able to re-download the video in better quality, instead of the old, if possible. Important! Previous video should not be removed as long as the new will not be fully loaded.
Repository: neovim
Issue: default mapping: <c-r>? to put prettified search text
Labels: enhancement,defaults

Hi,

when paste last search (with `<C-r>/` for insert mode or `"/p` for normal) : always remove `\< \>` has seen in <my_search>

scenario :
given
My current search is : "<foobar>"
when
In normal mode I press : "/p
then
It prints "foobar"

Currently it works with vimscript with that:

``` vimscript
" remove ugly char when pasted searched text
function! Del_word_delims()
  let reg = getreg('/')
  " After *  i^r/ will give me pattern instead of \<pattern\>
  let res = substitute(reg, '^\\<\(.*\)\\>$', '\1', '' )
  if res != reg
    return res
  endif
  " After * on a selection i^r/ will give me pattern instead of \Vpattern
  let res = substitute(reg, '^\\V'          , ''  , '' )
  let res = substitute(res, '\\\\'          , '\\', 'g')
  let res = substitute(res, '\\n'           , '\n', 'g')
  return res
endfunction
inoremap <silent> <C-R>/ <C-R>=Del_word_delims()<CR>
cnoremap          <C-R>/ <C-R>=Del_word_delims()<CR>
nnoremap          "/p "=Del_word_delims()<C-M>p
```
Repository: neovim
Issue: wrapscan could remember from where it started
Labels: enhancement

I work with logs over 1000000 > lines and when doing a search, I sometimes get lost not knowing if I am looking at new results or some I already saw.

It would be useful if wrapscan could somehow warned when the search starts again as discussed in http://vim.1045645.n5.nabble.com/How-to-make-search-with-wrapscan-more-convenient-td5713480.html.
(Also with big files the search takes so long that sometimes you don't know if it failed or if it's still looking, if the statusbar could display a "SEARCHING" token that would be great but I saw that big file handling will be revamped in later versions).
Repository: go
Issue: encoding/xml: brittle support for matching a namespace by identifier or url
Labels: NeedsInvestigation

The issue is that I believe a struct tag's namespace should be matchable by the xmlns identifier or url. 

To shed some light on the issue, consider a RSS feed parser thats deals with namespaces from a variety of definitions. I could expect a few different kinds of xmlns definitions for the same type of structure. ie. consider mRSS feeds in the wild that use the "media" namespace, you will find:
1. Xmlns wasn't defined, but the namespace was used (ie. for mRSS with media namespace)
2. Xmlns was defined as `xmlns:media="http://search.yahoo.com/mrss/"`
3. Xmlns was defined as `xmlns:media="http://search.yahoo.com/mrss"`

I noticed that encoding/xml would track the xmlns' in a map to the url, and would match the struct tags to the url. The issue of course here is with 2 and 3, where the difference between a "/" would throw off the parser. 

I wrote a fix (including tests) using Go 1.5.1's encoding/xml code: https://github.com/pkieltyka/xml/commit/7ad1fab466ec10f0fe7e47a36050b1956ac8bedb 

Consider a partial parser for the media rss module:

``` go
type Media struct {
  Title Title `xml:"media title"`
  Description Description `xml:"media description"`
  Thumbnails []Thumbnail `xml:"media thumbnail"`
  Contents []Content `xml:"media content"`
  MediaGroups []Group `xml:"media group"`
}
```

Notice the using the namespace prefix in the struct tag instead of the ns url. But, if xmlns:media="URL" was defined in the original document, the parser would expect to match it by the URL, but IMO, it should check both the prefix and url of the namespace. I'm reporting this issue and will submit the fix separately, thanks for the consideration.
Repository: go
Issue: cmd/compile: turn nilcheckelim into branchelim
Labels: Performance,NeedsFix,compiler/runtime

nilcheckelim is effective and fast, but only eliminates nil checks. There are other kinds of duplicate branches that it would be nice to also elide.

For example, consider code like:

``` go
func f_ssa(e interface{}) int {
  if e.(int) < 0 {
    return -1
  }
  return e.(int) * 2
}
```

Each of the type assertions will generate a branch to check e's dynamic type, but the subsequent checks are unnecessary, and could be eliminated with very similar logic to nilcheckelim. Code like this, in which an interface is type asserted repeatedly, shows up in the compiler, so it is not theoretical.

I'd expect the souped-up optimization to also handle (silly) code like:

``` go
func f_ssa(i int) int {
  var x int
  if i < 3 {
    x += 1
  }
  if i < 3 {
    x += 2
  }
  return x
}
```

(The compiled code should only have one branch.)

/cc @randall77 @tzneal @dr2chase
Repository: opencv
Issue: cv::CascadeClassifier::detectMultiScale detection differences from OpenCV 2.4.11 => 3.0.0 
Labels: bug,priority: normal,category: objdetect,affected: 3.4

I see a large difference in detection output between OpenCV versions 2.4.11 and 3.0.0 on Android using a custom CascadeClassifier (Haar features) with the same input image and parameters -- I see 29 and 50 detections respectively.  This is using the outputRejectLevel variant of cv::CascadeClassifier::detectMultiScale.  I assume this is a bug and can investigate the cause, but I wanted to check here for known issues before starting my search.

Update: I believe the difference is due to the `if( classifier->data.stages.size() + result == 0 )` vs `if( classifier->data.stages.size() + result < 4 )` change below:

opencv 3.0.0

```
                   int result = classifier->runAt(evaluator, Point(x, y), scaleIdx, gypWeight);
                    if( rejectLevels )
                    {
                        if( result == 1 )
                            result = -(int)classifier->data.stages.size();
                        if( classifier->data.stages.size() + result == 0 ) // <====== HERE
                        {
                            mtx->lock();
                            rectangles->push_back(Rect(cvRound(x*scalingFactor),
                                                       cvRound(y*scalingFactor),
                                                       winSize.width, winSize.height));
                            rejectLevels->push_back(-result);
                            levelWeights->push_back(gypWeight);
                            mtx->unlock();
                        }
                    }
                    else if( result > 0 )
                    {
                        mtx->lock();
                        rectangles->push_back(Rect(cvRound(x*scalingFactor),
                                                   cvRound(y*scalingFactor),
                                                   winSize.width, winSize.height));
                        mtx->unlock();
                    }
                    if( result == 0 )
                        x += yStep;
                }
```

opencv 2.4.X:

```
                    if( classifier->data.stages.size() + result < 4 )  // <====== HERE
                    {
                        mtx->lock();
                        rectangles->push_back(Rect(cvRound(x*scalingFactor), cvRound(y*scalingFactor), winSize.width, winSize.height));
                        rejectLevels->push_back(-result);
                        levelWeights->push_back(gypWeight);
                        mtx->unlock();
                    }
```

@Dikay900 : Any thoughts on this?
Repository: go
Issue: x/tools/cmd/present: browser fullscreen mode wish
Labels: NeedsFix,Tools

On large displays present shows almost [half of the next slide](http://s.natalian.org/2015-09-16/1442368126_1918x1058.png) which can be distracting. Could there be a fullscreen mode please?
Repository: go
Issue: x/tools/cmd/present: html output command
Labels: Tools

I know you can Save as... the presentation from the browser but it would be nice to have a flag to output html to a directory for archival purposes.
Repository: opencv
Issue: `OutputArray` and `Mat` interprets `std::vector` differently
Labels: category: core,RFC,future

The following code

```
std::vector<cv::Point2f> points;
for (int i = 0; i < 10; ++i) points.push_back(cv::Point2f(i, i));
cv::Mat a(points);
cv::OutputArray b(points), c(a);

std::cerr << a.size() << b.size() << c.size() << std::endl;
```

Outputs as `[1 x 10][10 x 1][1 x 10]`, which are inconsistent and caused some potential bugs.
Repository: go
Issue: x/mobile: Cannot use GL calls inside Go library
Labels: mobile

Hi,

I have a  Java Android application that uses a Go library to do some OpenGL rendering. I have configured something similar to the [bind](https://github.com/golang/mobile/tree/master/example/bind/android) example.
I have a Go library that contains functions that execute some GL calls. In the Java app, I have a GLSurfaceView and inside the renderer I call to the Go library, however nothing gets rendered.

Furthermore, my phone would freeze up almost totally at times, at which point I need to power off the screen, turn it on, unlock the app and shut it down through recent apps option.

My Go code looks as follows:

``` go
package lib

import (
    "golang.org/x/mobile/gl"
)

func OnCreate() {
    gl.ClearColor(0.2, 0.2, 0.6, 1.0)
}

func OnChanged(width, height int) {
    gl.Viewport(0, 0, width, height)
}

func OnDraw() {
    gl.Clear(gl.COLOR_BUFFER_BIT)
}

func GetString() string {
    return "Hello World"
}
```

and my Renderer class looks as follows:

``` java
package com.demotexbg.thugpigeon;

import android.opengl.GLES20;
import android.opengl.GLSurfaceView;

import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

import go.lib.Lib;

public class GameActivityRenderer implements GLSurfaceView.Renderer {

    @Override
    public void onSurfaceCreated(GL10 gl, EGLConfig config) {
        Lib.OnCreate();
        System.out.println("Initializing: " + Lib.GetString());
    }

    @Override
    public void onSurfaceChanged(GL10 gl, int width, int height) {
        Lib.OnChanged(width, height);
    }

    @Override
    public void onDrawFrame(GL10 gl) {
        Lib.OnDraw();
    }

}
```

The "Initializing: Hello World" is printed to LogCat but rendering does not occur. If I replace all the `Lib` calls with the code they represent, then I get a proper render to the screen.

I am using the following tools:
- Min / Compile / Target SDK Version: 16
- Java: 1.7
- Android Studio: 1.3.2
- Go: go1.5.1 darwin/amd64
- Mobile Gradle plugin: org.golang.mobile.bind:0.2.3 (I tried 0.2.2 as well)
- Android Build Tools: 23.0.1

Is there something special that I need to do to have all my OpenGL calls be managed by the Go library? I feel that something thread-related has changed since Go 1.5 Dev, where the same scenario would work.

Regards,
Momchil Atanasov
Repository: go
Issue: cmd/asm: unactionable "invalid local variable type 0"
Labels: compiler/runtime

cmd/asm produces the following error message on the program:

```
TEXT T(SB),$0
TYPE
```

```
asm: T: invalid local variable type 0
```

The error message should contain file name and line number, otherwise it is unactionable.

go version devel +5512ac2 Wed Sep 16 17:56:14 2015 +0000 linux/amd64
Repository: youtube-dl
Issue: URL should be normalized before trying to match with regex
Labels: geo-restricted

e.g.
http://tp.srgssr.ch/p/portal?urn=urn%3Asrf%3Aais%3Avideo%3A3fd90c9f-507a-4a79-b6b6-ac55f746b4d4&autoplay=true&legacy=true&width=640&height=360&playerType=

doesn't match, because
urn%3Asrf%3Aais%3Avideo%3A3fd90c9f-507a-4a79-b6b6-ac55f746b4d4
isn't normalized to
urn:srf:ais:video:3fd90c9f-507a-4a79-b6b6-ac55f746b4d4

which would match.
Repository: kubernetes
Issue: Event recorder should enfoce API conventions for Event Reason
Labels: priority/backlog,sig/api-machinery,lifecycle/frozen

As code produces events, we are not always enforcing our own API conventions for EventNames

An example PR where we had to make a change:
https://github.com/kubernetes/kubernetes/pull/14110

We should enforce proper event naming conventions as defined here:
https://github.com/kubernetes/kubernetes/blob/master/docs/devel/api-conventions.md#events

The best way to stop this in the future is for the Event recorder to error/warn when an invalid event name is provided.
Repository: youtube-dl
Issue: running make introduces diff
Labels: bug,documentation

running make introduces a diff in files that are in the repsitory

```
 README.md              | 88 ++++++++++++++++++++++++++----------------------
 docs/supportedsites.md | 17 ++++++----
 2 files changed, 56 insertions(+), 49 deletions(-)
```

I think this should not happen, so ether the diff should be in the repo or the make does something wrong
Repository: go
Issue: x/build: collect stats, logs
Labels: Builders

The coordinator should record per-build logs, and also keep statistics about timing information in BigQuery or something.

Then we can graph build times, test times, individual test times, machine bootup times, etc, all over time.

Related: #12668 (shootout tests talke 30 mins on arm)