sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: Allow code to open directories in nautilus file manager
Labels: linux,under-discussion,workbench-os-integration

- VSCode Version: 1.7.1
- OS Version: Ubuntu 16.04

The nautilus file manager in Ubuntu and other GNOME-based Linux distros has a right click "Open with" option available for opening files and or directories. Currently, vscode supports open with for text files but not directories. Since I often open code repositories with vscode, it would be nice to be able to right click and select "open with ... " and then chose "code" to open a new instance of vscode using the directory.

Steps to Reproduce:

1. In nautilus, choose a folder. Right click and select "open with" submenu
2. Visual Studio Code is not listed in submenu.

If you repeat above with a plain text file, it works.

Nautilus uses the MimeType defined in the *.desktop file for associating applications with a particular file type. For directories, the desired mime-type is inode/directory. Simply changing the following line in code.desktop from

`MimeType=text/plain;`
to
`MimeType=text/plain;inode/directory;`

should suffice (though it may be necessary to log in/log out to have change take effect ... alternatively running update-desktop-database and restarting nautilus may work.
Repository: rust
Issue: std::process::Command's current_dir behaves differently on Unix and Windows, with respect to relative exe paths
Labels: T-libs-api,C-feature-request,A-process

On Unix, relative paths to the exe are interpreted after cd'ing to the `current_dir`, but on Windows they're interpreted before. Here's an example test (1 test file, and 1 little binary that the test needs to build) that demonstrates this if you run `cargo test` on the two different platforms:

#### src/lib.rs

```rust
#[test]
fn execute_binary_from_another_dir() {
    // Run `cargo build` to make sure the associated `foo` binary gets built.
    std::process::Command::new("cargo").arg("build").status().unwrap();

    // Shell out to `foo`, just to confirm that this works fine.
    std::process::Command::new("target/debug/foo")
        .status()
        .unwrap();

    // Now try to shell out to `foo` again while also setting the current_dir.
    // This fails on Unix, because the path to the binary is resolved *after*
    // changing directories, but it works on Windows.
    std::process::Command::new("target/debug/foo")
        .current_dir("..")
        .status()
        .unwrap();
}
```
#### src/bin/foo.rs

```rust
fn main() {
    println!("foo!");
}
```

I ran into a similar difference when I tried this with Python's `subprocess.run(..., cwd=...)`. It looks like it's an artifact of Windows supporting [an `lpCurrentDirectory` arg](https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx) natively, while Unix has to `fork` and then `chdir` in the child before it calls `exec`. I prefer the semantics that we're getting on Windows right now\*, but this issue is mainly that they're not the same.

\* My main reason for preferring the current-Windows-style "`current_dir` does not affect the exe location" semantics: Emulating the current-Unix-style only requires a `Path::join`, which always works. But going the other way requires a `Path::canonicalize`, which can fail.
Repository: youtube-dl
Issue: SoundCloud Charts
Labels: request

### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2016.11.18*.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2016.11.18**

### 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

---

### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included:
- Playlist: https://soundcloud.com/charts
- Playlist: https://soundcloud.com/charts/top
- Playlist: https://soundcloud.com/charts/new
- Playlist: https://soundcloud.com/charts/top?genre=trap
- Playlist: https://soundcloud.com/charts/new?genre=trap

---

### Description of your *issue*, suggested solution and other information

Can you please add support for downloading [SoundCloud Charts](https://soundcloud.com/charts)?
Repository: youtube-dl
Issue: People.com PEN Site Request
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.11.18*. 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.11.18**

### 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

Would love to be able to download video from http://people.com/pen-shows/

Example: http://people.com/pen/00000156-7b90-d970-ad76-7bd0a6cf0000/
Repository: rust
Issue: Using `type` with local type parameters has confusing error
Labels: C-enhancement,A-diagnostics,A-associated-items,T-compiler,D-papercut

Using `type` with local type parameters or `Self` should have a clearer error.

Reproduce with: [(playpen link)](https://play.rust-lang.org/?gist=a93fa3b44bc0c638b06f3d6975e57c36&version=nightly&backtrace=0)

```rust
struct Foo;

impl Foo {
    fn method<T>(&self) {
        type X = (Self, T);
    }
}
```

Current errors have a suggestion ("try..") that doesn't apply.

```rust
error[E0401]: can't use type parameters from outer function; try using a local type parameter instead
 --> <anon>:6:19
  |
6 |         type X = (Self, T);
  |                   ^^^^ use of type variable from outer function

error[E0401]: can't use type parameters from outer function; try using a local type parameter instead
 --> <anon>:6:25
  |
6 |         type X = (Self, T);
  |                         ^ use of type variable from outer function
```
Repository: youtube-dl
Issue: Fix dts in f4m
Labels: geo-restricted

If I record BBC1 live with
```
youtube-dl 'http://a.files.bbci.co.uk/media/live/manifesto/audio_video/simulcast/hds/uk/pc/llnw/bbc_one_hd.f4m'
```
and play the result with mpv, ~I get quite a few dropped frames (with vaapi playback)~ (it seems the display driver was to blame here). The reason seems to be problems with the dts. I get a lot of those in the log:
```
[ffmpeg/demuxer] mpegts: Invalid timestamps stream=1, pts=325395000, dts=325396800, size=4790
[ffmpeg/demuxer] mpegts: Invalid timestamps stream=1, pts=325398600, dts=325400400, size=5048
```
I understand that fixing those on the fly is not easy, but probably better than to rely on the decoder to cope with "interesting" input (~vaapi decoding is not the only one~, streamcopy to mkv with ffmpeg doesn't work at all).
Repository: rust
Issue: Expand macro parameters in the comments.
Labels: A-macros,C-feature-request

```rust
macro_rules! test {
  (name:ident) => {
    /// A struct named $name.
    struct $name;
  }
}
```
Repository: create-react-app
Issue: Provide a watching build mode that writes to the disk in development
Labels: issue: proposal

See https://github.com/facebookincubator/create-react-app/issues/1018#issuecomment-261792488 for a discussion which leads to the creation of this issue.

I propose adding a new command (working name `build-dev`) which watches for changes and rebuild the bundle (effectively, given the current CRA implementation, it should execute `webpack --watch`), then writes it onto filesystem.

The main motivation is an easier integration path with non-Node.js dev servers: such servers could just serve continuously updating bundle from the filesystem.

The only desired configuration options is an `--output`, which could probably be specified via a command line argument:
```
% npm run build-dev -- --output ../static/www
```

Alternative command name suggestions:
* `watch`
* `build-watch`
Repository: TypeScript
Issue: Treating `undefined` parameters as optional
Labels: Suggestion,Help Wanted,Committed

tsc: 2.2.0-dev.20161116

Discover this behavior from https://github.com/acdlite/flux-standard-action/pull/45/commits/78a9065914b2ca4848dfba8fc0b47c54e2d0e319

This is the original code:
```ts
export interface FSA<Payload, Meta> {
  ...
  payload?: Payload;
  ...
}
```

However, this does not work well with type guard:
```ts
function isSomeAction(action: any): action is FSA<{ message: string }, void> {
  return true;
}

let action = {...};
if (isSomeAction(action)) {
  // `action.payload` may be undefined.
  console.log(action.payload.message);
}
```

Since generic type can be anything, including `undefined`, I'm considering to remove the optional designation:

```ts
export interface FSA<Payload, Meta> {
  ...
  payload: Payload;
  ...
}

// now type guard works
let action = {...};
if (isSomeAction(action)) {
  console.log(action.payload.message);
}
```

However, now the creation code fail:
```ts
function createSomeAction(): FSA<undefined, undefined> {
  // error: `payload` and `meta` are required
  return { type: 'SOME_ACTION' };
}
```

The workaround is to depends on infer type:
```ts
function createSomeAction() {
  return { type: 'SOME_ACTION' };
}
```

or specify it:
```ts
function createSomeAction(): FSA<undefined, undefined> {
  return { 
    type: 'SOME_ACTION',
    payload: undefined,
    meta: undefined
  };
}
```

Is there a better solution? 🌷
Repository: awesome-mac
Issue: 推荐自己开发的几个 macOS 小工具
Labels: vote

以下几个都是自己开发的小工具，对需要的用户来说，还比较受欢迎（Mac App Store 4~5 星），所以有点底气来自荐。

中文描述：

- [iPic](http://toolinbox.net/iPic/) - 图床神器：快速上传图片；支持 Markdown；支持七牛、又拍、阿里云等图床
  - 注：已经被收录， 请帮忙更新下描述
- [iPaste](http://toolinbox.net/iPaste) - 简洁高效的剪切板神器
- [iHosts](http://toolinbox.net/iHosts) - 唯一上架 Mac App Store 的 /etc/hosts 编辑神器
  - 注：曾被 Mac App Store 中国区编辑推荐，最高排名开发者分类第 2 名
- [iTimer](http://toolinbox.net/iTimer) - 简洁的番茄工作法计时器

英文描述：

- [iPic](http://toolinbox.net/en/iPic/) - Easily Upload Images With Markdown Supported
  - 注：目前收录的描述说没有英文介绍，其实是有英文描述的
- [iPaste](http://toolinbox.net/en/iPaste) - Lightweight and Efficient Clipboard Tool
- [iHosts](http://toolinbox.net/en/iHosts) - The only /etc/hosts editor on Mac App Store
- [iTimer](http://toolinbox.net/en/iTimer) - Lightweight Pomodoro Timer
Repository: TypeScript
Issue: error TS5053: Option 'declarationDir' cannot be specified with option 'outFile'.
Labels: Suggestion,Help Wanted

Attempting to change the declaration file output directory, I get the following error:

> error TS5053: Option 'declarationDir' cannot be specified with option 'outFile'.

`tsconfig.json` looks like this:

```
{
    "$schema": "http://json.schemastore.org/tsconfig",
    "compilerOptions": {
        "module": "amd",
        "target": "es6",
        "outFile": "../assets/js/main.js",
        "sourceMap": true,
        "declaration": true,
        "declarationDir": "../"
    }
}
```

I want my `.d.ts` file emitted somewhere else, since that's not a public asset.

Why is this not permitted?

I'm forced to create two (near-identical) `tsconfig` files and run the compiler twice to get the declaration file and output file. What for?
Repository: opencv
Issue: Documentation for fish-eye camera model is inconsistent with the code
Labels: bug,category: documentation,category: calib3d

The documentation for fish-eye camera model gives the following formulas for pixel projections (modules/calib3d/include/opencv2/calib3d.hpp:215):
```
\f[x' = (\theta_d / r) a \\ y' = (\theta_d / r) b \f]
\f[u = f_x (x' + \alpha y') + c_x \\
v = f_y y' + c_y\f]
```

However initUndistortRectifyMap() function (modules/calib3d/src/fisheye.cpp:471) has code which is inconsistent with the documentation (see u-coordinate calculation):
```
double x = _x/_w, y = _y/_w;

double r = sqrt(x*x + y*y);
double theta = atan(r);

double theta2 = theta*theta, theta4 = theta2*theta2, theta6 = theta4*theta2, theta8 = theta4*theta4;
double theta_d = theta * (1 + k[0]*theta2 + k[1]*theta4 + k[2]*theta6 + k[3]*theta8);

double scale = (r == 0) ? 1.0 : theta_d / r;
double u = f[0]*x*scale + c[0];
double v = f[1]*y*scale + c[1];
```
Recently (since 3.1) there already was some mess with this place and v-coordinate formula was corrected. Perhaps u-coordinate also should be corrected (or at least clarified what is "alpha", there is no such symbol defined in the formulas above that place).

3.1 generated docs [here](http://docs.opencv.org/3.1.0/db/d58/group__calib3d__fisheye.html)
Repository: go
Issue: x/tools: tests fail with gccgo
Labels: Testing,NeedsFix,Tools

### What version of Go are you using (`go version`)?
go version go1.6.1 gccgo (Debian 6.2.0-13) 6.2.0 20161109

### What operating system and processor architecture are you using (`go env`)?
Debian, all architectures not directly supported by the official compiler.

Hi, I am one of the people maintaining go libraries in Debian, and I have been trying to get x/tools to work with gccgo with no luck. We aim to provide golang support in all of our architectures, and so we use gccgo in mips*, alpha, powerpc, and now s390x.

We are able to build x/tools, but the tests fail spectacularly. I wonder if we are doing something very wrong, or is it that nobody ever tried to make it work there. Many errors seem to be related to tools expecting source code to be present for the stdlib, for example.

I would really appreciate if somebody could take a look at this, we are getting close to the freeze (before Debian stable is released), and I would like to fix that in time. The log from a sample build in mipsel is attached:

[golang-golang-x-tools_0.0~git20161028.0.b814a3b+ds-3_mipsel.build.txt](https://github.com/golang/go/files/603826/golang-golang-x-tools_0.0.git20161028.0.b814a3b.ds-3_mipsel.build.txt)
Repository: node
Issue: Poll phase documentation
Labels: help wanted,doc

<!--
Thank you for reporting an issue.

This issue tracker is for bugs and issues found within Node.js core.
If you require more general support please file an issue on our help
repo. https://github.com/nodejs/help


Please fill in as much of the template below as you're able.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)
Subsystem: if known, please specify affected core module name

If possible, please provide code that demonstrates the problem, keeping it as
simple and free of external dependencies as you are able.
-->

* **Version**:
* **Platform**:
* **Subsystem**:

<!-- Enter your issue details below this comment. -->
~~[`/doc/topics/event-loop-timers-and-nexttick.md`](https://github.com/nodejs/node/blob/master/doc/topics/event-loop-timers-and-nexttick.md#poll)~~
The documentation has been moved (https://github.com/nodejs/node/issues/10792):
https://github.com/nodejs/nodejs.org/blob/master/locale/en/docs/guides/event-loop-timers-and-nexttick.md

The description of the poll phase is not clear at all to me. Could someone please clarify the (sequence of the) operations in this phase?

Examples:

> When the event loop enters the **poll** phase _and there are no timers scheduled_, one of two things will happen:

Well, what happens if _there are_ timers scheduled?

> If scripts **have not** been scheduled by `setImmediate()`, the event loop will wait for callbacks to be added to the queue, then execute them immediately.

Until... what?

> Once the poll queue is empty [...]

This could not even happen if we reached the system-dependent hard limit, right? Would this step be ignored in such cases?
Repository: opencv
Issue: distanceType parameter for pointPolygonTest 
Labels: feature,category: imgproc

It would be useful if pointPolygonTest had a distanceType parameter like distanceTransform does.
Repository: go
Issue: cmd/compile: improve map iteration
Labels: Performance,compiler/runtime

Currently compiling this code
```
type T struct {
        a, b, c, d, e, f, g, h int
}

func f(m map[int]T) {
        for _, e := range m {
                g(e.f)
        }
}

//go:noinline
func g(int) {}
```
results
```
	0x0051 00081 (/tmp/x.go:8)	LEAQ	type.map[int]"".T(SB), AX
	0x0058 00088 (/tmp/x.go:8)	MOVQ	AX, (SP)
	0x005c 00092 (/tmp/x.go:8)	MOVQ	"".m+264(FP), AX
	0x0064 00100 (/tmp/x.go:8)	MOVQ	AX, 8(SP)
	0x0069 00105 (/tmp/x.go:8)	LEAQ	""..autotmp_1+152(SP), AX
	0x0071 00113 (/tmp/x.go:8)	MOVQ	AX, 16(SP)
	0x0076 00118 (/tmp/x.go:8)	PCDATA	$0, $1
	0x0076 00118 (/tmp/x.go:8)	CALL	runtime.mapiterinit(SB)
	0x007b 00123 (/tmp/x.go:8)	MOVQ	""..autotmp_1+152(SP), AX
	0x0083 00131 (/tmp/x.go:8)	TESTQ	AX, AX
	0x0086 00134 (/tmp/x.go:8)	JEQ	$0, 253
	0x0088 00136 (/tmp/x.go:8)	MOVQ	""..autotmp_1+160(SP), SI
	0x0090 00144 (/tmp/x.go:8)	TESTB	AL, (SI)
	0x0092 00146 (/tmp/x.go:8)	LEAQ	""..autotmp_2+88(SP), DI
	0x0097 00151 (/tmp/x.go:8)	DUFFCOPY	$840
	0x00aa 00170 (/tmp/x.go:8)	MOVQ	""..autotmp_1+152(SP), AX
	0x00b2 00178 (/tmp/x.go:8)	TESTB	AL, (AX)
	0x00b4 00180 (/tmp/x.go:8)	LEAQ	"".e+24(SP), DI
	0x00b9 00185 (/tmp/x.go:8)	LEAQ	""..autotmp_2+88(SP), SI
	0x00be 00190 (/tmp/x.go:8)	DUFFCOPY	$840
	0x00d1 00209 (/tmp/x.go:9)	MOVQ	"".e+64(SP), AX
	0x00d6 00214 (/tmp/x.go:9)	MOVQ	AX, (SP)
	0x00da 00218 (/tmp/x.go:9)	PCDATA	$0, $1
	0x00da 00218 (/tmp/x.go:9)	CALL	"".g(SB)
	0x00df 00223 (/tmp/x.go:8)	LEAQ	""..autotmp_1+152(SP), AX
	0x00e7 00231 (/tmp/x.go:8)	MOVQ	AX, (SP)
	0x00eb 00235 (/tmp/x.go:8)	PCDATA	$0, $1
	0x00eb 00235 (/tmp/x.go:8)	CALL	runtime.mapiternext(SB)
	0x00f0 00240 (/tmp/x.go:8)	MOVQ	""..autotmp_1+152(SP), AX
	0x00f8 00248 (/tmp/x.go:8)	TESTQ	AX, AX
	0x00fb 00251 (/tmp/x.go:8)	JNE	$0, 136
```
Note that there are two `DUFFCOPY`s. It first copies the data pointed by the pointer that `mapiterinit`/`mapiternext` returns to `autotmp_2`, then copies from `autotmp_2` to `e`.

I think one copy should be enough.

It might be able to do zero copy in some circumstances (but sounds a little crazy for now). Maybe no function call before the variable die, no address-taken, read only?
(Currently, if T is SSA-able (i.e. smaller), it generates no copy.)
Repository: TypeScript
Issue: Support evolving the type with assignments for expando object 
Labels: Suggestion,In Discussion,VS Code Tracked

Copied from https://github.com/Microsoft/TypeScript/issues/12278#issuecomment-261000712
OP = @abgivant

I use a similar module pattern in an application I'm working on, and the lack of IntelliSense/definitions for those has been an issue for me as well.

Mine follow this basic pattern:
```javascript
module.exports = function(x, y, z) {
  var exports = {};
  exports.method = function() {
    // Something that might use x, y, or z
  };
  return exports;
}
````

Would it be possible to do something like include an option in the jsconfig.json file to specify a property name or list of names to track when determining module exports?

Maybe something like this?
```javascript
{
  "moduleOptions": {
    "exportProperty": ["exports", "this"]
  }
}
```
Repository: go
Issue: x/website: document release-branch & git branch policy
Labels: Documentation,help wanted,NeedsInvestigation,website

This is a more general release strategy question.

I see that the git tag for 1.7.3 references a release branch 1release-branch.go1.7'. For work in progress (e.g. release candidates), this makes perfect sense, but considering 1.7.3 has been released, and  binaries are advertised on golang.org for this version, I expected that this release branch would be merged with master.

I see https://github.com/golang/go/wiki/Go-Release-Cycle doesn't mention the process of branching for releases or when they're merged with master, and while I wouldn't want to get draconian on this process, I did want to express my surprise that I can no longer build golang stable releases without mirroring all branches from github.

If there's documentation on the release process somewhere else, I'd love to be told to shut up and go read it! If this is simply an oversight, perhaps a little documentation on the process *would* be helpful in keeping master/releases always synced up and tidy.

... somewhat irrelevant bug template questions answered below:
### What version of Go are you using (`go version`)?
Affects 1.7, 1.7.1, 1.7.2, 1.7.3
... and future versions

### What operating system and processor architecture are you using (`go env`)?
Linux 1d9c731ca9f1 3.13.0-96-generic #143-Ubuntu SMP Mon Aug 29 20:15:20 UTC 2016 x86_64 Linux

### What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
$ git clone git@github.com:golang/go.git
$ git tag | grep go1.7 | head -n 4
go1.7
go1.7.1
go1.7.2
go1.7.3
$ git push --mirror git@internal-git-endpoint-redacted/golang/go.git
$ cd ..
$ git tag | grep go1.7 | head -n 4
go1.7beta1
go1.7beta2
go1.7rc1
go1.7rc2


### What did you expect to see?
git tag | grep go1.7 | head -n 4
go1.7
go1.7.1
go1.7.2
go1.7.3


### What did you see instead?
git tag | grep go1.7 | head -n 4
go1.7beta1
go1.7beta2
go1.7rc1
go1.7rc2

...obviously I can push all branches, I just didn't expect I needed to track all upstream branches internally since I was only building stable releases (which I assumed falsely would always be on master).
Repository: flutter
Issue: Request for a way to indicate how a class/concepts fits into "layers" or "areas of interest"
Labels: framework,from: study,d: api docs,c: proposal,P3,team-framework,triaged-framework

As we learn from UX studies, we noticed that we don't currently have an easy way for a developer to understand in which "area" they are looking at a concept. For example, if they are looking at the Padding class in the API docs, "where" are they? What kind of conceptual thing is this?

From a current Flutter developer: "More broadly, a tricky part of onboarding was simply familiarizing with the wide range of specialized widgets. "

(Note: our library organization in the framework is too coarse-grained to convey this grouping. For example, there are a lot of conceptual areas inside the widget library.)

Vision: a user looking at a thing in the API docs should easily understand in which group/AreaOfInterest/Layer it belongs, and then easily see other related things. For example, when looking at Padding, the user can easily see "This is part of the _layout_ area of interest. Oh, these are the other helpful layout ideas."

Strawman: a way to annotate the thing (class/function/etc) to put it in a "doc grouping". Then, the dartdoc tool could be taught how to indicate which group the thing is in.