sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: net: writing to TCP socket returns incorrect number of bytes upon timeout on Windows
Labels: help wanted,OS-Windows,NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!


### What version of Go are you using (`go version`)?
go version go1.10.1 windows/amd64


### Does this issue reproduce with the latest release?
Yes - it seems to have been there for ages.

### What operating system and processor architecture are you using (`go env`)?
I use Windows 10 64 bit.

### What did you do?

The easiest way to see and reproduce the problem is by using the proof-of-concept tools.

First the server part - you can download it from here: https://pastebin.com/NUdxuMDw
Start the server on any PC that has TCP port 11111 open and accessible.
OS of the server machine does not matter.

Now download the actual test client: https://pastebin.com/SFQyyHfb
Run the test client on Windows. 
You just need to specify one parameter on the command line: IP or host name of your running server (the one with open TCP port 11111).

The test is supposed to send 1MB of data to the server.
But you will see that it actually sends more....

The reason for it, is that whenever the Write() function returns a timeout, it always returns n=0.
Which seems to be wrong, as you can sometimes see some data going through.

This problem does not occur when you run the same code on Linux (there you can actually see n>0  being returned).
I have not checked other platforms.

### What did you expect to see?

Always 1MB of data received at the server side.

### What did you see instead?

More than 1MB of data received at the server side.
Repository: youtube-dl
Issue: Support for Asiancammodels, etc. streams
Labels: nsfw

## 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 this: `[x]`)
- Use the *Preview* tab to see what your issue will actually look like

---

### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2018.04.03*. 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 **2018.04.03**

### Before submitting an *issue* make sure you have:
- [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [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
- [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

### 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

---

### Description of your *issue*, suggested solution and other information

I would like it if Youtube-dl could support streams from Asiancammodels.com and its clones. Examples of links to streams are as follows:

https://www.asiancammodels.com/chat/Sexyhornygirl
https://m.asiancammodels.com/Sexyhornygirl?chat
Repository: vscode
Issue: [html][css] Investigate cross css/html, multi file support
Labels: feature-request,css-less-scss,html

Approach:
- merge HTML & CSS servers to avoid cross LSP communication
- in the server build an (in-memory) index of for the contents of css and html files in the current folder  

Benefits:
In HTML
- code completion in 'class' attributes using the collected class names (same for ids)
- goto & peek references on 'class' attributes (same for ids)

In CSS/LESS/SCSS
- code completion for class names based on already used class names in HTML and CSS (same for ids)
- goto & peek references on 'class' attributes (same for ids)
- code completion for variables defined in other css files
Repository: pytorch
Issue: worker assignments in torch.utils.dataloader.py
Labels: module: dataloader,triaged


In https://github.com/pytorch/pytorch/blob/60a16e5663f35f2df17ae1d5b060d0e1accdbefd/torch/utils/data/dataloader.py#L297, all items from the dataset for a given minibatch are assigned to the same worker process. This means that the first minibatch always takes the full sequential processing time, and it can similarly lead to wait times later if the consumer ever races ahead to consume all prefeched minibatches quickly. Wouldn't it be better to distribute individual items (rather than entire minibatches) in a round robin fashion?
Thank you!



cc @SsnL @VitalyFedyunin
Repository: rust
Issue: [parallel-queries] Refactor error message handling to better integrate with parallel queries
Labels: C-enhancement,T-compiler,A-parallel-queries

At the moment error message handling uses a [callback-based setup](https://github.com/rust-lang/rust/blob/2253216ec500601f9c2998196cb1b0a1ed0ae576/src/librustc_errors/lib.rs#L285-L286) in order to handle diagnostics tracking during query evaluation. This could probably be handled in a cleaner way.

Also, the current system has no way of making error message output somewhat deterministic under parallel execution.

Both problems should be solved by re-factoring the system to better fit the changed needs.
Repository: TypeScript
Issue: Goto definition after field exclusion should go to prop signature
Labels: Suggestion,Experience Enhancement,Domain: Symbol Navigation

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 -->
<!--
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker.

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the CONTRIBUTING guidelines: https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ
-->

<!-- If you have a QUESTION:
   THIS IS NOT A FORUM FOR QUESTIONS.
   Ask questions at http://stackoverflow.com/questions/tagged/typescript
    or https://gitter.im/Microsoft/TypeScript
-->

<!-- If you have a SUGGESTION:
  Most suggestion reports are duplicates, please search extra hard before logging a new suggestion.
  See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md
-->

<!-- If you have a BUG:
  Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  master

**Code**

```ts
type OmitKeys<A, B> = {[P in Exclude<keyof A, B>]: A[P]}
interface Foo {
    a: number;
    b: string;
    c: boolean;
}
var c: OmitKeys<Foo, 'c'>;
c.a // goto definition doesn't work
```

**Expected behavior:**
Goto definition on `c.a` takes me to the `Foo.a` property

**Actual behavior:**
Goto definition doesn't work
Repository: TypeScript
Issue: In JS, there's no way to assert that a property is definitely assigned
Labels: Suggestion,Needs Proposal,Domain: JavaScript

Keywords: JSDoc, Salsa, JavaScript, definite, initialization, initialized, assigned, assertion

```js
class ElementWrapper {
  constructor() {
    this.init();
  }

  init() {
    this.element = document.createElement('div');
  }

  getElementStyle() {
    this.element.style // error: element is possibly undefined
  }
}
```

We need a way to convince TypeScript in `strictNullChecks` that `this.element` is initialized in `getElementStyle`. Basically a definite initialization assertion.

Related is #23405 which tracks non-null assertions on the expression level.
Repository: go
Issue: cmd/go: clarify that special directories can still be used for package paths
Labels: Documentation,NeedsInvestigation

Hi,

The current documentation is a bit unfortunate when it comes to the special directories understood by the go tool.

https://golang.org/cmd/go/#hdr-Test_packages

> The go tool will ignore a directory named "testdata", making it available to hold ancillary data needed by the tests.

https://golang.org/cmd/go/#hdr-Package_lists

> Directory and file names that begin with "." or "_" are ignored by the go tool, as are directories named "testdata".

However, those directories can currently be used just as well for compiling. Unfortunately, I don't have a better wording yet that would describe that only certain operations will behave in this special mode for these special rules/directories.

This comes up often enough as tooling can suggest completion symbols from these directories then users can interpret this as a problem with the tooling rather than special cases in certain go tool usages.

Thank you.
Repository: pytorch
Issue: [feature request] Unpooling layer in Caffe2
Labels: caffe2,feature

It would be really useful to have unpooling layers in Caffe2, much like torch.nn.MaxUnpool2d etc in PyTorch.
Repository: TypeScript
Issue: Do not type check .js files in referenced node_modules under `--checkJs` and `--maxNodeModuleJsDepth` > 0
Labels: Bug,checkJs,Domain: JavaScript

- Create a `jsconfig.json`
- Set `checkJs` to `true`
- run `tsc --p ./jsconfig.json`

Expected:
no errors in `node_modules\*\*.js`. 

There is no really good fix for these issues. i would suggest not checking these files
Repository: go
Issue: net/http: consider making Transport clean up after itself
Labels: Thinking

If a Transport falls out of scope with idle connections, it will leak.

This is surprising for users (for example #24719), and obscure/inconsistent. `os.File` closes resources when falling out of scope, and Transport doesn't even have a Close method, only CloseIdleConnections. Idle connections are an implementation detail.

Implementing a finalizer would require making sure that all blocked goroutines don't keep pointers to the Transport itself, which might be hard.

Some previous discussion at #16005.
Repository: flutter
Issue: Make MethodChannel non-final or make it implement an interface to allow Mockito mocking
Labels: a: tests,c: new feature,engine,P2,a: plugins,team-engine,triaged-engine

When writing plugin test code, it's useful to be able to mock out the `MethodChannel` to assert calls. Mockito, the popular mocking library for Java, doesn't allow mocking of final classes. Propositions:

- Make `MethodChannel` non-final so it can be mocked. I understand why you may not want to do this though.
- Make `MethodChannel` implement an interface so that anyone can mock it.
Repository: go
Issue: spec: inconsistency about allowable conversions of numeric constants to strings
Labels: Documentation,NeedsFix

In section "Conversions", the Go spec says:

> A constant value x can be converted to type T if x is representable by a value of T. As a special case, an integer constant x can be converted to a string type using the same rule as for non-constant x.

Note that "integer constants" are distinct from "rune constants", "float constants", etc.

However, the spec also includes two examples of conversions of rune literals to type string: `string('x')` and `string('a')`.

cmd/compile and go/types allow these conversions. I assume gccgo does too, as utf8.RuneError is an untyped rune constant, and `string(utf8.RuneError)` appears a few times in the standard library.

I think the wording should be tweaked to "an integer **or rune** constant x".

Aside: I'd think we should relax it further to allow any integer *value*. We allow `make([]byte, 1.0)`, so it seems inconsistent to not allow `string(1.0)`.

/cc @griesemer
Repository: kubernetes
Issue: Introduce exponential moving average to autoscaling controller
Labels: sig/autoscaling,kind/feature,lifecycle/frozen

<!-- This form is for bug reports and feature requests ONLY! 

If you're looking for help check [Stack Overflow](https://stackoverflow.com/questions/tagged/kubernetes) and the [troubleshooting guide](https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/).
-->

**Is this a BUG REPORT or FEATURE REQUEST?**:

> Uncomment only one, leave it on its own line: 
>
> /kind bug

/kind feature


**What happened**:

Current implementation of the pod autoscaler controller is basically calculating the desired replicas via the instantaneous observed metrics value and comparing it with the current replicas and then do the actual scaling by the difference. This will cause some ramification especially when the metrics value varies frequently over time. This may also potentially influence the ok-rate or performance of some services.

IMHO, introducing `EMA(exponential moving average)` and storing a tiny time-series of metrics in the controller can help fixes this problem. It's also adopted by Jenkins for calculating load statistics:

Some introduction to `Exponential Smoothing`: 
[https://en.wikipedia.org/wiki/Exponential_smoothing](https://en.wikipedia.org/wiki/Exponential_smoothing)

Prior art by Jenkins: [https://github.com/kohsuke/jenkins/blob/55203ebeed1b7e182878d3e3c1184ac042f20473/core/src/main/java/hudson/slaves/NodeProvisioner.java#L727](https://github.com/kohsuke/jenkins/blob/55203ebeed1b7e182878d3e3c1184ac042f20473/core/src/main/java/hudson/slaves/NodeProvisioner.java#L727)

We can add annotations like `autoscaling.kubernetes.io/ema-decay: 0.5` which is decay coefficient of EMA. Each autoscaler may have its own decay, if the annotation is absent then we should default the decay to `0` so that it's compatible with the current logic.

**Anything else we need to know?**:

**Environment**:
- Kubernetes version (use `kubectl version`):
- Cloud provider or hardware configuration:
- OS (e.g. from /etc/os-release):
- Kernel (e.g. `uname -a`):
- Install tools:
- Others:
Repository: opencv
Issue: OpenCv 3.4.1 for Android: Bad JavaCamera2View performance 
Labels: platform: android

#I recently upgraded to 3.4.1 and build it to support new `JavaCamera2View`. 
On my Nexus 7 (2013) I resolved a FPS decrease over time bug with `JavaCameraView`. 
`JavaCamera2View` now gives slow, but stable ~10 FPS . Not acceptable but maybe improvable. 
Performance on my Galaxy S8 differs much. ~30 FPS with `JavaCameraView`, without any processing. 
But only **2** FPS! with `JavaCamera2View`, which is not usable for any needs. 
In both test cases, `JavaCamera2View` has a very improved behaviour in resolution settings, scaling / zooming behaviour and image quality (removed some blurry and bad quality effects) and maybe that is some kind of the problem. 
As far as I can say the resolution, quality and autofocus behaviour is so good, that it drops the FPS to a minimum.  But that is just my "newbie" opinion. 
Buffer managment could also be a problem, but I can't imagine why the performance is better on an older Device than S8 (Nexus 7). 

really need to solve this issue because I'd love to use the new `JavaCamera2View` since the quality of camera is much better

ty in advance


##### System information (version)

- OpenCV => 3.4.1 with contrib
- Operating System / Platform => Ubuntu 16.04
- Compiler Settings => build_sdk.py with ndk-config.16 - downgraded android SDK 

#### Edit

the devices get really really hot after a few minutes of running a simple Java2CameraView
Repository: rust
Issue: strange end span in borrowck error
Labels: C-enhancement,A-diagnostics,T-compiler

This code legitimately errors:

```rust
#![allow(warnings)]
use std::rc::Rc;

struct Data {
    vector: Vec<Datum>
}

struct Datum {
    /* ... */
}

struct Consumer {
    data: Rc<Data>
}

impl Consumer {
  fn process_data(&mut self) {
    for datum in &self.data.vector {
      self.process_datum(datum);
    }
  }

  fn process_datum(&mut self, datum: &Datum) {
    /* ... */
  }
}

fn main() {
    
}
```

but the span looks strange:

```
error[E0502]: cannot borrow `*self` as mutable because `self.data` is also borrowed as immutable
  --> src/main.rs:19:7
   |
18 |     for datum in &self.data.vector {
   |                   ---------      - immutable borrow ends here
   |                   |
   |                   immutable borrow occurs here
19 |       self.process_datum(datum);
   |       ^^^^ mutable borrow occurs here
```

Why is "immutable borrow ends here" highlighting the end of the word `vector`?
Repository: ant-design
Issue: Allow something other than the field "name" property to be the default when showing error messages.
Labels: 💡 Feature Request,Inactive

- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### What problem does this feature solve?
By default, when an error message is displayed is uses `"%s is required"`, where `%s` is the name of the field. The field name isn't necessarily something to present to the user. For example, my field name might be `parentId`, but to the user I want to display `Parent`. In essence, across the entirety of my app I want to use the label as opposed to the name to display errors.

### What does the proposed API look like?
I had a browse around the source, it seems as though `fullField` is an attempt to allow this, however it doesn't appear to work correctly. See: https://codesandbox.io/s/v06vq5zlx0 which attempts to use fullField.

A potential API would be something like:

```
rules: [{
  required: true,
  errorProp: 'Parent'
}]
```


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: neovim
Issue: win: revisit os_setperm() / setfperm
Labels: platform:windows,complexity:low,system

(migrated from https://github.com/neovim/neovim/issues/5229 )

`os_setperm()` needs to be re-thought; it is nonsense on Windows because of uv_fs_chmod:

https://github.com/libuv/libuv/blob/e76b8838e51f6e8f1944b6c6d50c3948ed764a0b/src/win/fs.c#L1072-L1081

ACL support may be needed, e.g.

- https://github.com/neovim/neovim/issues/1200
- https://github.com/neovim/neovim/pull/4060

# Status

- Implemented in #10379 but that PR needs a revival.
Repository: godot
Issue: Crash signal 7 (SIGBUS), code 1 (BUS_ADRALN)  _ZN10StringName5unrefEv
Labels: bug,platform:android,topic:porting

Hi,
I'm getting the following crash on my game (Godot 2.1.4)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> it.megasoft78.fallingword <<<

backtrace:
  #00  pc 00000000008a8de4  /data/app/it.megasoft78.fallingword-2/lib/arm/libgodot_android.so (_ZN10StringName5unrefEv+56)
  #01  pc 00000000008a9b3c  /data/app/it.megasoft78.fallingword-2/lib/arm/libgodot_android.so (_ZN10StringNameD2Ev+8)
  #02  pc 00000000008669f4  /data/app/it.megasoft78.fallingword-2/lib/arm/libgodot_android.so (_ZN12MessageQueue5flushEv+356)
  #03  pc 000000000006b978  /data/app/it.megasoft78.fallingword-2/lib/arm/libgodot_android.so (_ZN4Main9iterationEv+456)
  #04  pc 000000000002f448  /data/app/it.megasoft78.fallingword-2/lib/arm/libgodot_android.so (_ZN10OS_Android17main_loop_iterateEv+20)
  #05  pc 000000000003d448  /data/app/it.megasoft78.fallingword-2/lib/arm/libgodot_android.so (Java_org_godotengine_godot_GodotLib_step+3140)
  #06  pc 00000000005b47bd  /data/app/it.megasoft78.fallingword-2/oat/arm/base.odex

On the following devices:

- Samsung Galaxy J3(2017) (j3y17lte), 2048MB RAM, Android 7.0

- Samsung Galaxy S7 (herolte), 4096MB RAM, Android 7.0

- Samsung Galaxy J5(2016) (j5xnlte), 2048MB RAM, Android 7.1


No idea how to reproduce. :(
Repository: go
Issue: x/build: create VERSION file for cmd/dist to read
Labels: Testing,Builders

https://build.golang.org/log/89d71a5b0369a691899c3435abc7df3d4abd4074

```
##### API check
Error running API checker: exit status 1
Go version is "builder host-linux-armel-cross", ignoring -next /home/builder/stage0scratch/workdir/go/api/next.txt
[ a lot of +pkg ... lines ]
exit status 1
2018/04/07 13:27:59 Failed: exit status 1
2018/04/07 13:28:04 FAILED
```

The fact that the version does not contain `devel` implies that `+pkg` lines, i.e. new APIs, are a test failure:

```
fail = !compareAPI(bw, features, required, optional, exception,
        *allowNew && strings.Contains(runtime.Version(), "devel"))
```

The fact that no other builder hits this tells me that the version in this ARM builder is wrong; it should contain `devel`.
Repository: go
Issue: misc/cgo/testtls: skip test if C toolchain exhibits known TLS bugs
Labels: Testing,help wanted,NeedsFix

```
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1b pc=0xe56e4]

runtime stack:
runtime.throw(0x16739f, 0x2a)
	/workdir/go/src/runtime/panic.go:598 +0x54
runtime.sigpanic()
	/workdir/go/src/runtime/signal_unix.go:372 +0x22c

goroutine 5 [syscall, locked to thread]:
runtime.cgocall(0xe5678, 0x429f78, 0xe5208)
	/workdir/go/src/runtime/cgocall.go:128 +0x64 fp=0x429f60 sp=0x429f48 pc=0x123c0
_/workdir/go/misc/cgo/testtls._Cfunc_getTLS(0x0)
	_cgo_gotypes.go:43 +0x38 fp=0x429f74 sp=0x429f60 pc=0xe5134
_/workdir/go/misc/cgo/testtls.testTLS(0x478120)
	/workdir/go/misc/cgo/testtls/tls.go:21 +0x34 fp=0x429fb0 sp=0x429f74 pc=0xe5214
_/workdir/go/misc/cgo/testtls.TestTLS(0x478120)
	/workdir/go/misc/cgo/testtls/tls_test.go:12 +0x1c fp=0x429fb8 sp=0x429fb0 pc=0xe50ec
testing.tRunner(0x478120, 0x168c34)
	/workdir/go/src/testing/testing.go:791 +0xac fp=0x429fe4 sp=0x429fb8 pc=0xb3074
runtime.goexit()
	/workdir/go/src/runtime/asm_arm.s:840 +0x4 fp=0x429fe4 sp=0x429fe4 pc=0x63184
created by testing.(*T).Run
	/workdir/go/src/testing/testing.go:838 +0x240

goroutine 1 [runnable]:
testing.(*T).Run(0x478120, 0x1604a5, 0x7, 0x168c34, 0x410540)
	/workdir/go/src/testing/testing.go:839 +0x260
testing.runTests.func1(0x478090)
	/workdir/go/src/testing/testing.go:1081 +0x50
testing.tRunner(0x478090, 0x44bef8)
	/workdir/go/src/testing/testing.go:791 +0xac
testing.runTests(0x40c040, 0x206598, 0x1, 0x1, 0x458100)
	/workdir/go/src/testing/testing.go:1079 +0x21c
testing.(*M).Run(0x458100, 0x0)
	/workdir/go/src/testing/testing.go:996 +0x134
main.main()
	_testmain.go:42 +0x12c
exit status 2
FAIL	_/workdir/go/misc/cgo/testtls	0.046s
```

Some recent occurences:

https://build.golang.org/log/b7e1728e48a73089be64d42ea3b7e581eeae029c
https://build.golang.org/log/56a9b6b774c15433baff5b11a2f2eeb8aaa936a1
Repository: godot
Issue: [TRACKER] Clean up and reformat C# source code
Labels: enhancement,tracker,topic:dotnet

**Godot version:**
`master` / 9e7cee2ce

**OS/device including version:**
_Manjaro KDE Linux 17.1_

**Issue description:**
As discussed in godotengine/godot-docs#1296, I'm planning to do a mass clean up of existing C# source files(`/modules/mono/glue/cs_files/*.cs`) by using a code inspection tool.

The purpose is to improve code quality and make it more consistent with the standard code style and naming convention of the language.

The initial result reports 1,604 issues, so it'd be obviously dangerous do an automatic clean up. So, I'm going to list them by categories here, and incrementally fix them in case by case basis:

- [ ] Code Style (530 / 839 remaining).
- [ ] Potential Code Quality Issues (129 / 140 remaining).
- [ ] Common Practices and Code Improvements (97 / 97 remaining).
- [ ] Language Usage Opportunities (69 / 66 remaining, 3 more found).
- [x] Redundancies in Code (0 / 83 remaining).
- [ ] Constraints Violations (71 / 72 remaining).
- [ ] Redundancies in Symbol Declarations (313 / 307 remaining, 6 more found).

Total 1,209 / 1,604 issues found.