sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: x/tools/go/packages: NeedSyntax without NeedFiles/NeedCompiledGoFiles produces empty slice
Labels: NeedsFix,Tools

The program below prints:

```
runtime (LoadMode(NeedName|NeedSyntax)):
	len(Syntax) = 0
	Errors: []

runtime (LoadMode(NeedName|NeedFiles|NeedSyntax)):
	len(Syntax) = 136
	Errors: []

runtime (LoadMode(NeedName|NeedCompiledGoFiles|NeedSyntax)):
	len(Syntax) = 145
	Errors: [/home/mdempsky/wd/go/src/runtime/asm.s:5:1: illegal character U+0023 '#' /home/mdempsky/wd/go/src/runtime/asm_amd64.s:5:1: illegal character U+0023 '#' /home/mdempsky/wd/go/src/runtime/duff_amd64.s:5:1: illegal character U+0023 '#' /home/mdempsky/wd/go/src/runtime/memclr_amd64.s:7:1: illegal character U+0023 '#' /home/mdempsky/wd/go/src/runtime/memmove_amd64.s:28:1: illegal character U+0023 '#' /home/mdempsky/wd/go/src/runtime/preempt_amd64.s:3:1: illegal character U+0023 '#' /home/mdempsky/wd/go/src/runtime/rt0_linux_amd64.s:5:1: illegal character U+0023 '#' /home/mdempsky/wd/go/src/runtime/sys_linux_amd64.s:9:1: illegal character U+0023 '#' /home/mdempsky/wd/go/src/runtime/time_linux_amd64.s:7:1: illegal character U+0023 '#']
```

I think only the middle case is working as documented.

The last case appears to be due to #56632.

```
package main

import (
	"fmt"
	"log"

	"golang.org/x/tools/go/packages"
)

func main() {
	var modes = []packages.LoadMode{
		packages.NeedName | packages.NeedSyntax,
		packages.NeedName | packages.NeedFiles | packages.NeedSyntax,
		packages.NeedName | packages.NeedCompiledGoFiles | packages.NeedSyntax,
	}

	for _, mode := range modes {
		cfg := packages.Config{Mode: mode}
		pkgs, err := packages.Load(&cfg, "runtime")
		if err != nil {
			log.Fatal(err)
		}
		pkg := pkgs[0]
		fmt.Printf("%v (%v):\n\tlen(Syntax) = %v\n\tErrors: %v\n\n", pkg.PkgPath, mode, len(pkg.Syntax), pkg.Errors)
	}
}
```
Repository: PowerToys
Issue: Please let me configure my own editor other than notepad for the Hosts File Editor
Labels: Idea-Enhancement,Needs-Triage,Product-Hosts File Editor

### Description of the new feature / enhancement

I would very much like to use an editor other than `Notepad.exe` when I select `Open hosts file` button.

### Scenario when this would be used?

This is a power user feature so should it not allow one the ability to use an arbitrary editor other than Notepad? #NeovimRulz 😉 

### Supporting information

_No response_
Repository: pytorch
Issue: torch.jit.trace() - AttributeError: 'NoneType' object has no attribute '__module__
Labels: oncall: jit

### 🐛 Describe the bug

The examples in the following tutorials:
https://pytorch.org/docs/stable/generated/torch.jit.trace.html (the second example)
https://pytorch.org/tutorials/beginner/Intro_to_TorchScript_tutorial.html (examples starting from Tracing Modules)

raise the error ``` AttributeError: 'NoneType' object has no attribute '__module__'``` in the code line ``` torch.jit.trace() ```

### Versions

```
PyTorch version: 1.13.0+cu117
Is debug build: False
CUDA used to build PyTorch: 11.7
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 10 Enterprise
GCC version: Could not collect
Clang version: Could not collect
CMake version: Could not collect
Libc version: N/A

Python version: 3.8.10 (tags/v3.8.10:3d8993a, May  3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.19044-SP0
Is CUDA available: True
CUDA runtime version: 11.7.99
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3060
Nvidia driver version: 517.40
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.22.4
[pip3] pytorch-lightning==1.7.7
[pip3] torch==1.13.0+cu117
[pip3] torch-model-archiver==0.6.0
[pip3] torch-workflow-archiver==0.2.4
[pip3] torchaudio==0.13.0+cu117
[pip3] torchmetrics==0.10.0
[pip3] torchserve==0.6.0
[pip3] torchvision==0.14.0+cu117
[conda] Could not collect
```

cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel
Repository: tauri
Issue: [bug] Incorrect DPI scaling on Wayland/Linux
Labels: type: bug,platform: Linux,status: needs triage

### Describe the bug

Running a freshly initialized tauri project on a 2256x1504 Laptop produces the following window when running `yarn tauri dev`:

![2022-11-09_21-34_1](https://user-images.githubusercontent.com/753308/200936571-b6e47216-937f-484d-84f2-96447a8834fc.png)

Opening the URL of the local dev server in chrome with the ozone platform enabled shows the following:

![2022-11-09_21-34](https://user-images.githubusercontent.com/753308/200936706-8458e1fb-861c-4dcf-9409-ceaab8b2ff87.png)

It seems like the webview is not doing any scaling at all. Setting `GDK_SCALE` or `GDK_DPI_SCALE` does not have any effect either.

### Reproduction

1. Run `cargo-create-tauri-app`
2. Run `yarn tauri dev` on a HiDPI-screen

### Expected behavior

The scaling should be the same in the GTK WebView as in a correctly scaled Chromium or Firefox window.

### Platform and versions

Running on NixOS with Sway/Wayland and scaling set to 1.5, using the recommended `flake.nix`.

```
$ tauri info

Environment
  › OS: NixOS 22.11.0 X64
  › Node.js: 18.9.1
  › npm: 8.19.1
  › pnpm: Not installed!
  › yarn: 1.22.19
  › rustup: 1.25.1
  › rustc: 1.64.0
  › cargo: 1.64.0
  › Rust toolchain: stable-x86_64-unknown-linux-gnu

Packages
  › @tauri-apps/cli [NPM]: 1.2.0
  › @tauri-apps/api [NPM]: 1.2.0
  › tauri [RUST]: 1.2.0,
  › tauri-build [RUST]: 1.2.0,
  › tao [RUST]: 0.15.3,
  › wry [RUST]: 0.22.0,

App
  › build-type: bundle
  › CSP: unset
  › distDir: ../dist
  › devPath: http://localhost:1420/
  › framework: React

App directory structure
  ├─ public
  ├─ node_modules
  ├─ src-tauri
  ├─ .vscode
  ├─ .direnv
  └─ src
```

### Stack trace

_No response_

### Additional context

_No response_
Repository: godot
Issue: HFlowContainer not decreasing height if this decreased during NOTIFICATION_SORT_CHILDREN 
Labels: bug,enhancement,topic:gui

### Godot version

v4.0-beta4

### System information

Windows 11 home, nvidia 3060, vulkan

### Issue description

When during a _notification / NOTIFICATION_SORT_CHILDREN of flowcontainer it's height is decreased, the flowcontainer does not update to reflect this. 


### Steps to reproduce

Create a hflowlayout and override it's _notification and relayout the children on a NOTIFICATION_SORT_CHILDREN. Then make it so the last element should normally flow over to the next line. Write a layout function that decides not to flow the last element to the next line.

Normal layout:
<img width="942" alt="image" src="https://user-images.githubusercontent.com/388221/200933037-89000281-1ecd-4263-a543-34108a310c90.png">
Layout where the height is decreased:
![image](https://user-images.githubusercontent.com/388221/200933326-1a36f6ea-ac21-4460-a90d-17e9752880df.png)

### Minimal reproduction project

[TestFlow.zip](https://github.com/godotengine/godot/files/9974840/TestFlow.zip)
Repository: opencv
Issue: cv::cuda::transpose() limitation
Labels: bug,category: gpu/cuda (contrib)

### System Information

OpenCV 4.6.0
Windows 7 64 bits
Visual Studio 2019 (latest)
NVidia CUDA SDK (10.2)

### Detailed description

As claimed by the doc, CV_16UC1 is currently not supported by cv::cuda::transpose()
Internally, it is limited by `CV_Assert( elemSize == 1 || elemSize == 4 || elemSize == 8 );`

However, the limitation is hard to understand.

Currently, for `(elemSize == 1)`, `nppiTranspose_8u_C1R()` is called

However, `nppiTranspose_16u_C1R()` does exist (among others). I looked at NPPI old release notes, it was already present in the CUDA SDK 8.0 [(https://docs.nvidia.com/cuda/archive/8.0/pdf/NPP_Library_Image_Support_And_Data_Exchange.pdf)](https://docs.nvidia.com/cuda/archive/8.0/pdf/NPP_Library_Image_Support_And_Data_Exchange.pdf)

Thus, I don't understand why only `nppiTranspose_8u_C1R()` is to be used.




### Steps to reproduce

```
cv::cuda::GpuMat src(1, 2, CV_16UC1);
cv::cuda::GpuMat dst;
cv::cuda::transpose(src, dst);//unfortunately not supported
```

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [ ] I updated to the latest OpenCV version and the issue is still there
- [ ] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: flutter
Issue: Remove internal usage of FlutterDesktopMessengerRef
Labels: engine,platform-windows,P2,c: tech-debt,team-engine,triaged-engine

`FlutterDesktopMessengerRef` should only exist in `flutter_windows.h` and `flutter_windows.cc`.  Right now it is used in `BinaryMessengerImpl` and `IncomingMessageDispatcher`.
Repository: vscode
Issue: About the filter behavior when entering Japanese into showQuickPick extension api.
Labels: bug,quick-pick

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->


<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. --> 
version: 1.73.1 (user setup)
commit: 6261075646f055b99068d3688932416f2346dd3b
date: 2022-11-09T04:27:29.066Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.22000
Sandboxed: No

There seems to be a problem with the behavior of vscode.window.showQuickPick in the extension api.
Execute the following code in the extension
vscode.window.showQuickPick(['abc/def.txt', 'abc/あ.txt']);
As shown in the following figure, the effect on the two options seems to be different.
![Animation](https://user-images.githubusercontent.com/4711523/200953314-1d20aea8-7c8e-4040-9013-ec4515485575.gif)
One disappears and one remains. I think the correct behavior is that both disappear or both remain.
Repository: godot
Issue: NaN diffuse lighting artifacts on lights with very high Attenuation values
Labels: bug,topic:rendering,topic:3d

*Related to https://github.com/godotengine/godot/issues/65497.*

### Godot version

4.0.beta (282e50ac8)

### System information

Fedora 36, AMD Radeon RX 6900 XT, KDE + KWin

### Issue description

Lights with high Attenuation values result in black light appearing. This is most likely due to a NaN computation result. The black part is visible even if the light is located *inside* the solid surface. Here, one of the OmniLight3Ds is inside the cube, and the other one is outside on the left:

![2022-11-09_23 30 16](https://user-images.githubusercontent.com/180032/200956523-5bb8794a-d553-4d65-9abc-36a86cfe0c83.png)

If using the Lambert Wrap diffuse mode, the light becomes visible while the light is located inside the solid surface (this is expected):

![2022-11-09_23 31 02](https://user-images.githubusercontent.com/180032/200956534-3ef067ac-6731-4e4f-9b62-de31e0d01183.png)

Changing the specular mode to Disabled does **not** hide this NaN issue, so the issue is in the diffuse light computation.

The issue occurs with both Vulkan Clustered and Mobile backends. However, with the Mobile backend, the issue appears differently:

![image](https://user-images.githubusercontent.com/180032/200956838-cb254dc8-ed20-4500-be20-09bbd6e33782.png)

With the OpenGL backend, a similar issue occurs, but the Attenuation value on the lights must be toned down from 70 back to 40 in the MRP for it to be visible:

![image](https://user-images.githubusercontent.com/180032/200957324-d85fb8ec-4717-4b0f-bbee-67ab3edd9af6.png)


### Steps to reproduce

- Add a OmniLight3D node with a low range and position it near a solid surface.
- Increase the OmniLight's attenuation to a value of 40 or more.

### Minimal reproduction project

[test_light_attenuation.zip](https://github.com/godotengine/godot/files/9975637/test_light_attenuation.zip)
Repository: pytorch
Issue: Batched Random Number Generators
Labels: triaged,module: random

### 🚀 The feature, motivation and pitch

Hello there,

The vast majority of PyTorch methods support batched inputs and outputs. However, the random generators are left behind in this regard! This is particularly important for applications were most of the heavy-lifting comes from training many identically-shaped models independently and simultaneously in a batched manner.

I understand that one can sample batched random tensors from a single generator. That being said, you cannot reproduce each slice without reproducing the entire tensor.  

There are many applications which could benefit from training many reproducible configurations in a batch-wise manner. For example, take few-shot learning evaluations where most settings deal with 1-layer classifiers but tens of thousands of independent episodes and classifiers. You can create your own batched layers and modules from scratch using batched matrix multiplications and so on, but a truly batched RNG is still unavailable.

### Alternatives

For now, I've written my own "fake" batch RNG shell, where I create many generators in a list and seed them manually. Upon random generation requests, the shell has to call each generator, and stack the resulting random samples. This is of course very inefficient. To improve the time efficiency of this approach, I defined random number caches, in order to reduce the number of calls to the generators. This induces an almost unnecessary memory-computation trade-off, and still loses to a truly efficient batched RNG. The GPU memory also limits the caching benefits.

### Additional context

_No response_

cc @pbelevich
Repository: go
Issue: proposal: syscall: Support linux namespace fd's in SysProcAttr
Labels: Proposal

<!--
Our proposal process is documented here:
https://go.dev/s/proposal-process
-->

I've been working on a package to help work on Linux namespaces (https://github.com/cpuguy83/gonso).
One of the things I'd like to be able to do is, as a library author, enable users of the library to run an executable in a given set of namespaces.
Today this would require the user of the library to have a helper process join those namespaces before executing the command.
In the library I could setup a thread with the namespaces and run the command but this doesn't really work with `exec.Cmd` since that can spin up its own goroutines not locked to the current thread.

I've also looked at creating essentially my own bad copy of `exec.Cmd` that would allow me to do this but ideally this would just work with the real `exec.Cmd`

What I propose is to add something like:

```diff
diff --git a/src/syscall/exec_linux.go b/src/syscall/exec_linux.go
index b61b51dff1..fd27257461 100644
--- a/src/syscall/exec_linux.go
+++ b/src/syscall/exec_linux.go
@@ -59,6 +59,11 @@ type SysProcIDMap struct {
 	Size        int // Size.
 }

+type LinuxNamespace struct {
+	Fd   int // Namespace file descriptor
+	Kind int // e.g. CLONE_NEWNS
+}
+
 type SysProcAttr struct {
 	Chroot     string      // Chroot.
 	Credential *Credential // Credential.
@@ -98,9 +103,10 @@ type SysProcAttr struct {
 	// This parameter is no-op if GidMappings == nil. Otherwise for unprivileged
 	// users this should be set to false for mappings work.
 	GidMappingsEnableSetgroups bool
-	AmbientCaps                []uintptr // Ambient capabilities (Linux only)
-	UseCgroupFD                bool      // Whether to make use of the CgroupFD field.
-	CgroupFD                   int       // File descriptor of a cgroup to put the new process into.
+	AmbientCaps                []uintptr        // Ambient capabilities (Linux only)
+	UseCgroupFD                bool             // Whether to make use of the CgroupFD field.
+	CgroupFD                   int              // File descriptor of a cgroup to put the new process into.
+	Namespaces                 []LinuxNamespace // Namespaces to join before exec
 }

 var (
```

I think this is a more generally useful addition since it allows anyone to set which namepsaces they want the command to run in without having to resort to using external tooling (such as nsenter) or re-exec/cgo init hacks.
Repository: flutter
Issue: Attempting to resize a macOS window hangs if the target is a flutter_test
Labels: a: tests,engine,platform-mac,a: desktop,P2,team-macos,triaged-macos

in the flutter/flutter repo:

`cd examples/hello_world`
`flutter run -t test/hello_test.dart -d macos`

Then attempt to resize the window
Repository: go
Issue: x/mobile: cannot use (*proxymobile_AuthStateHandler)(_param_stateHandler_ref) (value of type *proxymobile_AuthStateHandler) as type mobile.AuthStateHandler in assignment
Labels: NeedsInvestigation,mobile

I am trying to use go to make a client library that should be able to used by all the things (mobiles, wasm ...) 

Each thing handles state different. So I am trying to inject "state handlers" into the application.
I tried with a client version - and it works fine. But when I try with gomobile I get some errors that I don't understand.

I have got similar errors before when injection interfaces in gomobile applications - and I managed to resolve it by moving the interface definition into the same package as where it was called from. That didn't work with the new interfaces.

```golang
package mobile

import "chatclient/internal/entity"

type AuthStateHandler interface {
        SetToken(*entity.Token)
        GetToken() *entity.Token
}

type ChatStateHandler interface {
	AddMessage(*entity.Message)
	DeleteMessage(id uint)
	GetMessages() []*entity.Message

	AddUser(*entity.User)
	DeleteUser(id uint)
	GetUsers() []*entity.User

	AddChannel(*entity.Channel)
	DeleteChannel(id uint)
	GetChannels() []*entity.Channel
}

```

```golang
func NewAuthService(stateHandler AuthStateHandler) (*AuthService, error) {
        repo, err := authrepo.NewAuthRepository()
        if err != nil {
                panic(err)
        }
        return &AuthService{
                repo:         repo,
                stateHandler: stateHandler,
        }, nil
}

func NewChat(auth *AuthService, stateHandler ChatStateHandler) *Chat {
        repo, err := chatrepo.NewChatRepository()
        if err != nil {
                panic(err)
        }
        return &Chat{repo, auth, stateHandler}
}
```

```bash
>---->>> gomobile bind -androidapi 21 -target android ./mobile && mv mobile.aar ../mychat/app/libs                                                                              ~/Documents/Personal/userchatclient
gomobile: go build -buildmode=c-shared -o=/tmp/gomobile-work-1643309219/android/src/main/jniLibs/x86/libgojni.so ./gobind failed: exit status 2
# gobind/gobind
gobind/go_mobilemain.go:251:26: cannot use (*proxymobile_AuthStateHandler)(_param_stateHandler_ref) (value of type *proxymobile_AuthStateHandler) as type mobile.AuthStateHandler in assignment:
        *proxymobile_AuthStateHandler does not implement mobile.AuthStateHandler (missing GetToken method)
gobind/go_mobilemain.go:279:26: cannot use (*proxymobile_ChatStateHandler)(_param_stateHandler_ref) (value of type *proxymobile_ChatStateHandler) as type mobile.ChatStateHandler in assignment:
        *proxymobile_ChatStateHandler does not implement mobile.ChatStateHandler (missing AddChannel method)

```
Repository: ant-design
Issue: Form.List 删除一项后form的内容得不到更新
Labels: Inactive

### Reproduction link

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/antd-reproduction-template-forked-1gd8ec?file=/index.js)

### Steps to reproduce

点击加 keys 为 长度为1的数组；
点击加 keys 为长度为2的数组；
点击减 keys 还是长度为2的数组；
再点击减 keys 变为长度为1；

### What is expected?

期望增加删除能获取到最新的值

### What is actually happening?

点击加 keys 为 长度为1的数组；
点击加 keys 为长度为2的数组；
点击减 keys 还是长度为2的数组；
再点击减 keys 变为长度为1；

| Environment | Info |
| --- | --- |
| antd | 4.24.1 |
| React | ^18.0.0 |
| System | mac |
| Browser | 106.0.5249.119（正式版本） (arm64) |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: go
Issue: go/doc: cross-package doc links don't work
Labels: NeedsInvestigation,Tools

If I change the doc string of `(*bytes.Buffer).ReadFrom` from containing `io.EOF` to containing `[io.EOF]`, I expect godoc to render that with an appropriate clickable link to the documentation for `io.EOF`.

It renders a link but the link doesn't work. When running godoc locally on :6060, the link is `http://localhost:6060/io#EOF` when it should be `http://localhost:6060/pkg/io#EOF`.

[This page](https://go.dev/doc/comment) (the Doc links section) says it should work. In fact, this is the exact example shown for this feature.

Intra-package doc links seem to work.

@rsc
Repository: stable-diffusion-webui
Issue: [Feature Request]: Magicmix support
Labels: enhancement,extension-request

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

Provide style transfer based on a prompt. Based on this paper: https://magicmix.github.io/

Example code implementation here: https://github.com/mpaepper/stablediffusion_magicmix

### Proposed workflow

1. Go to img2img
2. Select an image like normal
3. Select a script called "MagicMix" or "StyleTransfer" or similar
4. Input a prompt that you want the image to be like
5. Select from the following inputs (taken from the ipnb above):

   - `nu` (`v` in the paper): controls how much the prompt should overwrite the original image in the initial layout phase. If your result is too close to the original image, try increasing this parameter.
   - `total_steps` (can use `Sampling Steps` already in img2img tab): number of inference steps for stable diffusion
        - can be broken into `min_steps` to `max_steps` for more control. Or a ratio. Paper recommends  `min_steps=0.3*total_steps` and `max_steps=0.6*total_steps` so those can be the defaults
   - `guidance_scale` (can use `CFG` already in img2img tab): this is the classifier free guidance. The higher this is set, the more it will drive your result towards your prompt.
   - There was one more input in the paper that is not in the above. The `s` (attention map scale) parameter (value between -2 and 2). It looks like it adds (when positive) or removes (when negative) the prompt to/from the image. Not sure how to use this because I don't understand how the paper defines what an attention map is and how to apply the `s` parameter to it. Any tips?

6. Hit generate and wait

Edit: you don't input an image for style transfer, but a prompt. Reworded and added extra information.


### Additional information

_No response_
Repository: pytorch
Issue: Potential bug in torch.optim.lr_scheduler.CosineAnnealingWarmRestarts
Labels: triaged,actionable,module: LrScheduler

https://github.com/pytorch/pytorch/blob/fb5c6ae61f1f622ec388ae9fa00e7683ce1729ce/torch/optim/lr_scheduler.py#L1407

Should be self.T_cur = self.T_cur % self.T_i, not self.T_cur = self.T_cur - self.T_i.