sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Better suggestion for closure that needs to capture bindings, but not all 
Labels: A-diagnostics,A-closures,T-compiler,A-suggestion-diagnostics,D-papercut,D-newcomer-roadblock,D-terse

[Given](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=887faf2cf5ecc01cfbc3cbb1b1a8078a)

```rust
    let numbers: Vec<i32> = (1..100).collect();
    let len = numbers.len();

    let _sums_of_pairs: Vec<_> = (0..len)
        .map(|j| ((j + 1)..len).map(|k| numbers[j] + numbers[k]))
        .flatten()
        .collect();
```

we currently emit

```
error[E0373]: closure may outlive the current function, but it borrows `j`, which is owned by the current function
 --> src/main.rs:6:37
  |
6 |         .map(|j| ((j + 1)..len).map(|k| numbers[j] + numbers[k]))
  |                                     ^^^         - `j` is borrowed here
  |                                     |
  |                                     may outlive borrowed value `j`
  |
note: closure is returned here
 --> src/main.rs:6:18
  |
6 |         .map(|j| ((j + 1)..len).map(|k| numbers[j] + numbers[k]))
  |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: to force the closure to take ownership of `j` (and any other referenced variables), use the `move` keyword
  |
6 |         .map(|j| ((j + 1)..len).map(move |k| numbers[j] + numbers[k]))
  |                                     ^^^^^^^^
```

if we [apply the suggestion](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=9308ebec747edfad090b28a5e1aa5b9e) we get the following

```
error[E0507]: cannot move out of `numbers`, a captured variable in an `FnMut` closure
 --> src/main.rs:6:37
  |
2 |     let numbers: Vec<i32> = (1..100).collect();
  |         ------- captured outer variable
...
6 |         .map(|j| ((j + 1)..len).map(move |k| numbers[j] + numbers[k]))
  |                                     ^^^^^^^^ -------
  |                                     |        |
  |                                     |        move occurs because `numbers` has type `Vec<i32>`, which does not implement the `Copy` trait
  |                                     |        move occurs due to use in closure
  |                                     move out of `numbers` occurs here
```

because we're moving `numbers` into the closure and consuming it.

Ideally, we would suggest to [introduce a new binding that borrows `numbers` to avoid moving it](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=fd2e909dfa52c5af9e70e13106108d82).

_Example taken from https://stackoverflow.com/questions/65258521/how-do-i-write-a-lazily-evaluated-double-for-loop-in-a-functional-style_

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"zbyrn"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: youtube-dl
Issue: Re-add Nick.com video support
Labels: site-support-request,geo-restricted

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2020.12.14. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2020.12.14**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

- Single video: https://www.nick.com/episodes/ff16rh/all-that-1116-season-1-ep-16


## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

Now that nick.com relaunched their ability to play episodes on a PC just today, please re-add support for this website. It was working back in 2018 before they got rid of that, and now it's recently been added back to the website. I tried the link above and it doesn't work.
Repository: opencv
Issue:  warning: ‘cudaError_t cudaGLSetGLDevice(int)’ is deprecated [-Wdeprecated-declarations]
Labels: category: build/install,category: gpu/cuda (contrib)



- OpenCV => 4.5.0
- Operating System / Platform =>  Nvidia ubuntu18.04 aarch64
- Compiler => g++


When I compile opencv for opencl, there are some warnings . I want to konw how to fix warnings?




In file included from /home/nvidia/Downloads/opencv-4.5.0/modules/core/include/opencv2/core/private.cuda.hpp:73:0,
                 from /home/nvidia/Downloads/opencv-4.5.0/modules/core/src/precomp.hpp:56,
                 from /home/nvidia/Downloads/opencv-4.5.0/modules/core/src/opengl.cpp:43:
/home/nvidia/Downloads/opencv-4.5.0/modules/core/src/opengl.cpp: In function ‘void cv::cuda::setGlDevice(int)’:
/home/nvidia/Downloads/opencv-4.5.0/modules/core/src/opengl.cpp:125:47: warning: ‘cudaError_t cudaGLSetGLDevice(int)’ is deprecated [-Wdeprecated-declarations]
         cudaSafeCall( cudaGLSetGLDevice(device) );
                                               ^
/home/nvidia/Downloads/opencv-4.5.0/modules/core/include/opencv2/core/cuda/common.hpp:74:58: note: in definition of macro ‘cudaSafeCall’
     #define cudaSafeCall(expr)  cv::cuda::checkCudaError(expr, __FILE__, __LINE__, CV_Func)
                                                          ^~~~
In file included from /home/nvidia/Downloads/opencv-4.5.0/modules/core/src/opengl.cpp:55:0:
/usr/local/cuda/include/cuda_gl_interop.h:305:57: note: declared here
 extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaGLSetGLDevice(int device);
                                                         ^~~~~~~~~~~~~~~~~
Repository: rust
Issue: #[should_panic]'s return-type check ignores procedural-macro transformations
Labels: C-bug,A-proc-macros

When a procedural macro which transforms the return type of a function from `... -> SomeType` to `-> ()` is applied, the resulting function can be used with the attribute `#[test]` as expected. However, adding the attribute `#[should_panic]` to that test results in a compile-time error.

A (slightly simplified) motivating example:

```rust
#[test]
#[should_panic]
#[test_utils::matches_image("tests/data/blue_pixel.png")]
fn fails_on_mismatching_data() -> Box<[u32]> {
    Box::new([0; 1])
}
```

Result:

```text
error: functions using `#[should_panic]` must return `()`
```

As a simple workaround, the transformed function can be wrapped with a separate `#[test] #[should_panic]` function returning `()` and invoked manually within that.

Tested on `rustc 1.48.0 (7eac88abb 2020-11-16)` and `rustc 1.50.0-nightly (eb4fc71dc 2020-12-17)`.
Repository: storybook
Issue: Can storybook show typescript interface props without a component in mdx file?
Labels: question / support,block: argstable

**Is your feature request related to a problem? Please describe**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

When I write typescript interface like this, I have to create a NoticeItem component in order to show NoticeItemProps.
```
export interface NoticeProps extends Props {
  iconScroll?: boolean;
  bgColor?: string;
  textColor?: string;
  noticeList: NoticeItemProps[];
  isTop?: boolean;
}

export interface NoticeItemProps {
  title: string;
  url: string;
  icon: string;
}

export const NoticeItem: FC<NoticeItemProps> = (props: NoticeItemProps) => (<div {...props}/>)
```

```mdx

 Because the <ArgsTable> only accept component for attribute 'of' like this.
## Notice Props

<ArgsTable of={Notice}/>

## NoticeItemProps

<ArgsTable of={NoticeItem} />
```

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

Is there a way to show NoticeItemProps without creating a useless NoticeItemComponent?

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Are you able to assist to bring the feature to reality?**
no | yes, I can...

**Additional context**
Add any other context or screenshots about the feature request here.
Repository: pytorch
Issue: [JIT] Serialization forward compatibility tests
Labels: oncall: jit,weeks

We should look into adding forward compatibility tests that check that old versions of JIT can import modules exported using new versions of PyTorch. If such tests already exist, we should make sure that they check that buffer and parameter metadata is preserved.

cc @gmagogsfm
Repository: ant-design
Issue: <Pagination> support `total` to be `Infinity` or `undefined`
Labels: 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?
When the number of total data is unknown or actually infinity.

最右侧 ... 后面的页码不显示即可。
用Infinity表示数据无限，undefined表示数据数量未知。
可以在显示上有细微差别。参考各个搜索引擎的显示方式。


### What does the proposed API look like?
```tsx
<Pagination total={1/0}/>
<Table pagination={{total:1/0}}/>
```


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: flutter
Issue: Generalise AnimatedList functionality (AnimatedCollection ?)
Labels: framework,a: animation,f: material design,c: proposal,team-design,triaged-design

## Use case

I have a layout with a list of map overlay widgets (pin widgets) -  I want to to animate in/out transitions when items are added/removed from a list. 

## Proposal

The functionality is identical to AnimatedList - but I think this is just a common use case of a more general pattern, for eg. someone could want an AnimatedGrid #45770, AnimatedWrap, etc.

I think AnimatedList API could be extracted out to something like AnimatedCollection that also accepts something like buildContainer(context, children). AnimatedList would then become AnimatedCollection with a ListView buildContainer implementation.
Repository: TypeScript
Issue: Provide a way to type a fix-length tuple-like generator/iterator
Labels: Suggestion,Awaiting More Feedback

<!-- 🚨 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 FAQ, especially the "Common Feature Requests" section: https://github.com/Microsoft/TypeScript/wiki/FAQ

-->

## Search Terms

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->
- generator
- iterator

## Suggestion

<!-- A summary of what you'd like to see added or changed -->
Express a fixed-length generator.

## Use Cases

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->
- Allows the spread syntax on functions to know how many arguments is deconstructed (see examples below)

## Examples

<!-- Show how this would be used and what the behavior would be -->
[stackoverflow question](https://stackoverflow.com/questions/65326786/how-to-type-a-fixed-length-generator-in-typescript)
```typescript
// Vector2.ts
class Vector2 {
  constructor (public x, public y) {
    this.x = x;
    this.y = y;
  }

  //... A bunch of vector methods

  public* [Symbol.iterator]: Generator<number, void, unknown> {
    yield this.x;
    yield this.y;
  }
}

// main.js
const canvas = document.querySelector('#canvas');
const ctx = canvas.getContext('2d');

const a = new Vector2(0, 0);
const b = new Vector2(10, 10);

ctx.beginPath();
ctx.moveTo(...a);
// works correctly, but with this warning: 
// Expected 2 arguments, but got 0 or more.ts(2556)
ctx.lineTo(...b);
ctx.stroke();
ctx.closePath();
```
Right now, the code above produces the correct behavior. However, typescript doesn't not recognize how many arguments is passed to `ctx.moveTo` and `ctx.lineTo` therefore it warns me about it.

## My Implementation
There could be an tuple-like syntax for generators as well, for example:
```typescript
public* [Symbol.iterator]: *[number, number] {
    yield this.x;
    yield this.y;
  }
```
With this syntax, typescript recognizes how many argument is deconstructed by the spread operator, and knows its a generator with the prepending `*`.

## Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: scrcpy
Issue: #low quality display issue in pocox3
Labels: quality

 - [x] I have read the [FAQ](https://github.com/Genymobile/scrcpy/blob/master/FAQ.md).
 - [x] I have searched in existing [issues](https://github.com/Genymobile/scrcpy/issues).

**Environment**
 - OS: [Windows]
 - scrcpy version: [e.g. 1.16.1]
 - installation method: [Windows release...]
 - device model:pocox3
 - Android version: [10]

**Describe the bug**
Iam using pocox3 device which is having resolution of 2400x1080 and when I tried to mirror my phone display through scrcpy iam getting very low quality display in my pc and my specs:
MODEL NAME:HP348G4
GRAPHICS CARD:INTEL 620 GRAPHICS
Repository: flutter
Issue: [google_map_flutter] Markers onTap area is shifted on screen when the app is registered as a game
Labels: p: maps,package,a: production,team-ecosystem,P3,triaged-ecosystem

Hello,

I am having an issue with Google Maps on my app in production. The app uses Google Maps to diplay markers, and users can tap on them to get more info.

The issue is : for some users, the clickable screen area is shifted a few pixels to te top left of the screen, making them miss the click most of the time (see screenshot).

![image](https://user-images.githubusercontent.com/23695028/102596670-c8930c00-4119-11eb-8e31-70a4fb762f73.png)

Conserned users : Samsung A41 (and some other Samsung), Redmi phones, Crosscall phones and some iPhones as well.
The app is registerd on the AppStore & PlayStore as a game. It looks like is issue only occurs in this particular case.
My guess is that the app, being registed as a game, triggers a "Game Mode" on these phones and that the Game Mode changes the screen's resolution, which is not properly handled by Google Maps.
Some Samsung A51 users have managed to solve the issue by changing the Samsung Game Mode resolution in their settings. But this issue remains for most users.

Additional info :
- flutter doctor:
```
[✓] Flutter (Channel stable, 1.22.4, on macOS 11.0.1 20B50 darwin-x64, locale en-GB)
    • Flutter version 1.22.4 at /Users/roland/Sdks/flutter
    • Framework revision 1aafb3a8b9 (5 weeks ago), 2020-11-13 09:59:28 -0800
    • Engine revision 2c956a31c0
    • Dart version 2.10.4
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/roland/Library/Android/sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.2, Build version 12B45b
    • CocoaPods version 1.10.0
[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 49.0.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code (version 1.52.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.17.0
[✓] Connected device (1 available)
• No issues found!
```

Thanks a lot for looking into it !
Repository: flutter
Issue: Paragraph support for Canvas.drawShadow() 
Labels: c: new feature,framework,engine,c: proposal,P3,team-engine,triaged-engine

## Use case

I need to render text with drop shadows to give it 3D look and export the final scene as PNG. While there is shadows support for Text widget (via TextStyle), there is no Canvas counterpart which could be recorded by PictureRecorder() and exported.

[Canvas.drawShadow()](https://api.flutter.dev/flutter/dart-ui/Canvas/drawShadow.html) currently supports only Path object. But obtaining paths from laid out text is unsupported in Flutter core. There is [Text to Path Maker](https://pub.dev/packages/text_to_path_maker) plugin for TTF fonts which can extract path for specific glyph, but for combining them into words it is necessary also kerning info, which is missing here.

If text is static, I can imagine to export glyph shapes into compound paths outside Flutter and then import them as static resources in Flutter. But for dynamic text in Flutter it is AFAIK possible only with low quality (without the kerning) and only for TTF fonts supported by that package. 

## Proposal

Provide [Canvas.drawShadow()](https://api.flutter.dev/flutter/dart-ui/Canvas/drawShadow.html) method accepting both Path and Paragraph objects.
Repository: opencv
Issue: How to load EfficientDet model with OpenCV dnn
Labels: question (invalid tracker)

##### System information (version)
- OpenCV => 4.4
- Operating System / Platform => Windows 64 Bit and Ubuntu 20.04
- Tensorflow 2.3 and 1.15

Hello, i have generated a model by using https://github.com/google/automl/ code. Tensorflow 2.3 .
Optimize[#17384]('https://github.com/opencv/opencv/pull/17384'):
```
import tensorflow as tf
from tensorflow.python.tools import optimize_for_inference_lib
from tensorflow.tools.graph_transforms import TransformGraph

pb_file = 'savedmodeldir/efficientdet-d0_frozen.pb'
graph_def = tf.compat.v1.GraphDef()

try:
    with tf.io.gfile.GFile(pb_file, 'rb') as f:
        graph_def.ParseFromString(f.read())
except:
    with tf.gfile.FastGFile(pb_file, 'rb') as f:
        graph_def.ParseFromString(f.read())

graph_def = optimize_for_inference_lib.optimize_for_inference(graph_def, ['image_arrays'], ['detections'], tf.uint8.as_datatype_enum)
graph_def = TransformGraph(graph_def, ['image_arrays'], ['detections'], ['fold_constants'])

with tf.gfile.FastGFile('efficientdet-d0_opt.pb', 'wb') as f:
   f.write(graph_def.SerializeToString())
```
But faced error:
1、Tensorflow 2.3:
`ModuleNotFoundError: No module named 'tensorflow.tools.graph_transforms'`
2、Tensorflow 1.15:
`tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef mentions attr 'exponential_avg_factor' not in Op<name=FusedBatchNormV3; signature=x:T, scale:U, offset:U, mean:U, variance:U -> y:T, batch_mean:U, batch_variance:U, reserve_space_1:U, reserve_space_2:U, reserve_space_3:U; attr=T:type,allowed=[DT_HALF, DT_BFLOAT16, DT_FLOAT]; attr=U:type,allowed=[DT_FLOAT]; attr=epsilon:float,default=0.0001; attr=data_format:string,default="NHWC",allowed=["NHWC", "NCHW"]; attr=is_training:bool,default=true>; NodeDef: {{node efficientnet-b0/stem/tpu_batch_normalization/FusedBatchNormV3}}. (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).`

 If i create  .pbtxt from efficientdet-d0_frozen.pb by using tf_text_graph_efficientdet.py:
```
assert(graph_def.node[1].name == 'truediv' and graph_def.node[1].op == 'RealDiv')
AssertionError
```
Please help me!Thanks!
Repository: go
Issue: cmd/link: -buildmode=c-shared not supported on linux/mips64le
Labels: help wanted,NeedsFix,arch-mips

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
1.15.6
</pre>

### Does this issue reproduce with the latest release?

yes

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="mips64le"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="mips64le"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_mips64le"
GCCGO="gccgo"
GOMIPS64="hardfloat"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/go/src/github.com/cilium/cilium/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -mabi=64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build215838537=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### 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.
-->

When I tried to migrate Cilium to the mips64le (loongnix) platform, I got an error, among others, when I compiled a class library, Proxylib, and found that Cilium was handling it as a .so file.
Here is the compile command

<pre>
$ CGO_ENABLED=1 go build -mod=vendor -ldflags ' -X "github.com/cilium/cilium/pkg/version.ciliumVersion=1.9.1 6857a8d2a 2020-12-18T01 :24:42+08:00" -s -w -X "github.com/cilium/cilium/pkg/envoy.RequestedEnvoyVersionSHA=1177896bebde79915fe5f9092409bf0254084b4e" -X " github.com/cilium/cilium/pkg/datapath/loader.DatapathSHA=3d9461ac3d8ae0b334f319c93e10ddea336d8617" -extldflags -Wl,-soname, libcilium.so.1' -tags=osusergo -o libcilium.so.1 -buildmode=c-shared
-buildmode=c-shared support on linux/mips64le
</pre>

Since -buildmod=c-shared is used, this buildmod prompt does not support building on linux/mips64le, does anyone have any good solutions?

### What did you expect to see?

-buildmode=c-shared support on linux/mips64le

### What did you see instead?

-buildmode=c-shared not supported on linux/mips64le