sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: TS2333: 'this' cannot be referenced in constructor arguments
Labels: Suggestion,Awaiting More Feedback

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->


## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
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, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

TypeScript disallows this:

```ts
class A {
    constructor(readonly b: B = new B(this)) {}
}
class B {
    constructor(a: A) {}
}
```

>TS2333: 'this' cannot be referenced in constructor arguments

Instead, we can rewrite it as follows.


```ts
class A {
    readonly b: B;
    constructor(b?: B) {
        this.b = b ?? new B(this);
    }
}
class B {
    constructor(a: A) {}
}
```

However, this is clearly more verbose. Since this transformation is always possible, it seems TypeScript should allow `this` in the constructor and be doing the job of rewriting it for us, so we can maintain simpler code using the former constructor argument approach.

## 📃 Motivating Example

Permitting `this` references in constructor arguments simplifies object initialization.

## 💻 Use Cases

Creating classes at construction time that reference the creating class.
Repository: pytorch
Issue: Add support for conan package manager
Labels: triaged,enhancement

## 🚀 Feature
Please add an official support for conan package manager.

## Motivation
Just as pytorch is distributed with conda and pip for Python,
It will make our work much easier if libtorch would be distributed with conan for C++. 

## Pitch
Please add an official conanfile recipe to the repo.
Repository: pytorch
Issue: [docs] Improve documentation for LayerNorm, GroupNorm, etc (+ add python reference impl)
Labels: module: docs,module: nn,triaged,module: norms and normalization

UPD:
The standing items:

- add pseudocode. I think pseudocode / compact python implementations would be very useful for understanding what is normalized over and what learned affine weights correspond to
- add a realistic vision example (motivated by use in a popular paper) or remove the BCHW example (with fixed image size)

<hr>
https://pytorch.org/docs/stable/generated/torch.nn.LayerNorm.html: `The mean and standard-deviation are calculated separately over the last certain number dimensions which have to be of the shape specified by normalized_shape`

What's not clear from this excerpt (and the rest of the text):

1. What dimensions is the mean computed over? What is the shape of the computed mean/std? If it's the last few dimensions as suggested by this text, then does it mean that for BCHW layout, height and width must be fixed and passed at LayerNorm construction time? This seems wrong. Also expression "calculated separately over the last certain number of dims" may imply exactly the reverse: that the first dims are aggregated over. What seems to be happening is that "mean and standard-deviation are calculated over all except the first dimension (assumed batch dimension) and the specified last dimension (assumed channels dimensions)".
2. If the last few dimensions (including spatial/temporal) are aggregated over, why does LayerNorm need their (potentially dynamic) shape at construction time?

2. Is there any layout are assumed for a typical usecase (with fixed number of channels and various time/spatial dimension)? BTC? BCT? This is important, because PyTorch usually uses BC... logical layouts in other contexts

3. Could it include a visual explanation of what dimensions are aggregated over?

The examples given in the docs don't include dimension semantics (such as Channels, Time, Height, Width), so I couldn't extract any information from them.

E.g. an example of type:
```python
import torch

ln = torch.nn.LayerNorm(256, elementwise_affine = False)

# BTC
a = torch.randn(8, 1000, 256) * 100 + 200
print(a[0, ...].mean(), a[0, ...].std())
#tensor(199.9173) tensor(99.8517)

print(a[0, 0].mean(), a[0, 0].std())
#tensor(206.8604) tensor(104.7011)

b = ln(a)
print(b[0, ...].mean(), b[0, ...].std())
# tensor(2.2389e-09) tensor(1.0000)
print(a[0, 0].mean(), a[0, 0].std())
#tensor(-2.6077e-08) tensor(1.0020)

# what's going on?
# Does LayerNorm standardize every (b, ...) slice as illustrated in GroupNorm paper's figure?
# Does LayerNorm standardizes every (b, t, :) slice (i.e. standardizes embedding vectos themselves - does it even make sense)?
```
is much clearer.

Phrasing "over the last certain number dimensions" seems very ambiguous, as the aggregation seems to happen actually over not specified dimensions.

cc @jlin27 @mruberry @albanD @jbschlosser
Repository: three.js
Issue: DecalGeometry: Decal projections without distortions.
Labels: Enhancement,Addons

**Describe the bug**

The decal gets replicated when splatted. This happens when you try to splat just around the corners; you can then clearly see the partial/full  replication (just once) of that decal on the adjacent side to the face you have splatted on.

**To Reproduce**

Steps to reproduce the behavior:
1. Go to https://threejs.org/examples/?q=decal#webgl_decals
2. Click on bottom part of the model's shoulder
3. You can see the decal being replicated partially on the adjacent side



**Expected behavior**

The decal should only be present on the side splatted on

**Screenshots**

![Splat_bug](https://user-images.githubusercontent.com/24234466/106471544-a66f0680-6499-11eb-90ee-293c724c0091.PNG)



**Platform tested on:**

 - Device: [Desktop]
 - OS: [Windows, MacOS, Linux]
 - Browser: [Chrome, Firefox]
 - Three.js version: [r125]
Repository: terminal
Issue: Settings UI reformats settings.json in an hard to read way
Labels: Area-Settings,Product-Terminal,Issue-Task,Area-SettingsUI

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.

All good? Then proceed!
-->

<!--
This bug tracker is monitored by Windows Terminal development team and other technical folks.

**Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**.
Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue.

If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link.

Please use this form and describe your issue, concisely but precisely, with as much detail as possible.

-->

# Environment

```none
Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd] 19041
Windows Terminal version (if applicable): 1.6

Any other software?
```

# Steps to reproduce

<!-- A description of how to trigger this bug. -->
Before ever opening the Settings UI, open the settings.json. Make a copy of it for comparison and keep it open in an editor such as VS Code. Close the active settings.json. Now open the Settings UI. Then open json from either the Settings dropdown or from the Settings UI. Notice how the file is completely reformatted in a user unfriendly way. 
# Expected behavior

<!-- A description of what you're expecting, possibly containing screenshots or reference material. -->
I expect the settings.json to remain in the same readable format it's always been.
# Actual behavior

<!-- What's actually happening? -->
The settings.json is now harder to read and unorganized compared to the normal format.

If the Settings UI is never opened, the original format remains.
Repository: rust
Issue: LLVM ERROR: SHT_NOBITS section '.bss' cannot have non-zero initializers
Labels: A-linkage,A-LLVM,T-compiler,C-bug

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
#[link_section = ".bss"]
pub static __: u8 = 1;

fn main() {
}
```

I expected to see this happen: This program should either compile, or only rustc should emit an error

Instead, this happened: On top of a rustc error, I also got an `LLVM ERROR`

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->


```
1.49
1.50.0-beta.8
1.51.0-nightly
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary>Backtrace</summary>
<p>

```
 Compiling playground v0.0.1 (/playground)
LLVM ERROR: SHT_NOBITS section '.bss' cannot have non-zero initializers
error: could not compile `playground`

To learn more, run the command again with --verbose.
```

</p>
</details>
Repository: godot
Issue: Changing a TileSet while project is running breaks Area2D collision
Labels: discussion,topic:core,topic:physics

**Godot version:**
3.2.3

**OS/device including version:**
Windows 7

**Issue description:**
Rapidly calling TileSet.tile_set_region seems like a convenient way to handle animated tiles, but doing so causes Area2D collisions with TileMaps using that TileSet to become strange and inconsistent. This isn't an issue specific to setting the tile's region or collision: even more innocuous changes such as cycling the color with tile_set_modulate will cause it. After stopping the repeated calls, the problem immediately goes away.

Are TileSets not intended to be changed so quickly? I couldn't find any mention of this. I hope not, because it's a simple and convenient way to implement a bunch of different tile effects. AnimatedTextures are very rigid in contrast (and caused irreproducible bugs for someone I'm working with).

**Steps to reproduce:**
Repeatedly change a TileMap's TileSet while an Area2D is colliding with it.

**Minimal reproduction project:**
[ExitedEntered.zip](https://github.com/godotengine/godot/files/5904666/ExitedEntered.zip)
Repository: godot
Issue: Viewports does not update when Window behind of other fullscreen window
Labels: discussion,topic:rendering

**Godot version:**
tested on 
Godot_v3.1.2-stable_x11.64
Godot_v3.2.4-rc1_x11.64


**OS/device including version:**
tested only on **Linux**
works same when launched from Godot editor or as an exported application (using export templates)

**Issue description:**
When Godot Window with Viewports behind of other fullscreen Window then Viewrpots stop update when process function still called. But when this Godot Window is hidden to tray (by button on window header) it process rendering of Viewports.

**Maybe this is not a bug** and I missing something, I know Godot Editor stops rendering when it not active... but I have two Viewports with `UPDATE_ALWAYS` mode, *I think it should not stop rendering* when active Visible Viewport not active...


**Steps to reproduce:**
download my example project and launch, wait 10-15 sec to see that window **updated as expected**
then put any other fullscreen window on top of this Godot-render window, and wait few sec and back to Godot window - **bug result**

expected result:
![1](https://danilw.github.io/godot-utils-and-other/BUG_viewport_onbackground/1.png)

bug result: (line 1 not finished and line 2, this is skip while window was behind other fullcreen window)
![1](https://danilw.github.io/godot-utils-and-other/BUG_viewport_onbackground/2.png)

**Minimal reproduction project:**
[BUG_viewepor_onbackgrund.zip](https://danilw.github.io/godot-utils-and-other/BUG_viewport_onbackground/BUG_viewepor_onbackgrund.zip)
Repository: ant-design
Issue: Menu 组件中 SubMenu 可以单独显示 Selected 状态
Labels: Inactive,improvement

- [ ] 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?
当使用 Menu 组件来作为多级导航时，SubMenu 本身也应该可以作为一个链接显示。

### What does the proposed API look like?
```jsx
<Menu selectedKeys=['submenu-1']>
    <Menu.SubMenu key="submenu-1" title="submenu-1">
        <Menu.Item key="item-1">Item 1</Menu.Item>
    </<Menu.SubMenu>
</Menu>
```
当 Menu 中的 selectedKeys 仅有 SubMenu 的 key 时，也应该给其加上 selected 样式。


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: torch::jit::Module cannot be forward declared and used into a `unique_ptr` 
Labels: oncall: jit

## 🐛 Bug

https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/api/module.h
defines `Module() = default` and `~Module() = default`

To allow usage with a `unique_ptr` in a context where `torch::jit::Module` is forward declared, their definition should be moved to the cpp file. 
See this popular thread on stack overflow: https://stackoverflow.com/questions/9954518/stdunique-ptr-with-an-incomplete-type-wont-compile

This would be a little change, keeping in the header:

```
Module();
~Module();
```
and placing in the cpp file
```
Module::Module() = default;
Module::~Module() = default;
```



cc @gmagogsfm
Repository: pytorch
Issue: Make TorchBind object appear in state_dict
Labels: feature,module: nn,module: serialization,triaged

## 🐛 Bug

We have packed params that are TorchBind objects: https://github.com/pytorch/pytorch/blob/master/torch/nn/quantized/modules/conv.py#L262 and we would like to see it in state_dict, currently we are manually overwriting the save_to_state_dict to do that: https://github.com/pytorch/pytorch/blob/master/torch/nn/quantized/modules/conv.py#L99, I'm wondering if we have easier alternatives to do this. For example: allow register_buffer to support TorchBind object. (since attributes registered with register_buffer would appear in state_dict)



cc @albanD @mruberry @jbschlosser
Repository: PowerToys
Issue: Include Pre-configured list of known app-compat apps
Labels: Idea-Enhancement,Area-App Compat,Planning-Consideration

## 📝 Provide a description of the new feature
Allow applications to register themselves to be excluded, or included, in certain features.
Or alternatively allow a pre-configured list, managed by PRs, to be installed with PowerToys.

_What is the expected behavior of the proposed feature?  What is the scenario this would be used?_
Currently some features target all application, e.g. the fancy zones.
Some applications are not compatible to such features, for Greenshot (of which I'm a developer) this is the case, see #4373.

You already have added a way for users to exclude applications, this might "solve" it from your side, but as this is not by default I am faced with more and more users who open issues with us.

As there are more applications which are confronted with this, it might help if you provide a way for applications to register themselves to be excluded or included in certain functionality. This should preferable be a well defined and stable way.

---

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Repository: opencv
Issue: cv::drawMatches matchesMask type change
Labels: feature,RFC

##### System information (version)
- OpenCV => 4.5.1
- Operating System / Platform => Ubuntu 20.04
- Compiler => gcc 9.3.0

##### Detailed description
The function `cv::drawMatches()` takes an optional argument `matchesMask` of type `std::vector<char>`. This is a poor choice in conflict with the inlier masks amenable to functions such as `cv::findHomography()`. A better choice is `cv::OutputArray matchesMask = cv::noArray()` with the underlying type expected to be `std::vector<uint8_t>`.

To summarize:

One cannot use `std::vector<char>` as an inlier mask with `cv::findHomography()` and one cannot use `std::vector<uint8_t>` with `cv::drawMatches()`. This leads to unnecessary inlier mask conversion code.

##### Steps to reproduce
N/A

##### 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 solution
 - [x] I updated to latest OpenCV version and the issue is still there
 - [ ] There is reproducer code and related data files: videos, images, onnx, etc
Repository: PowerToys
Issue: [FancyZones] Choose a zone at the same time as opening a file/program
Labels: Idea-Enhancement,Product-FancyZones,Needs-Team-Response

## Provide a way to choose a zone on opening a file/program

There are many times that I'm opening a file or program and know that the last time I opened it wasn't where I want it now. It would be nice if I could in one "command" tell it which zone to open in. I recommend the following:
* The "easiest" way to implement this is with the right-click menu on a file/program having an "Open in Zone >" submenu where you can choose zones (I don't like this option much, but it's a good backup)
* The same way that a secondary button can activate/deactivate FancyZones on window drag, it would be nice if this worked on files in Explorer as well (i.e., click and drag, then right/middle click to choose a zone to "drop" it on to open)
* Both of these could work at the same time

I have no idea how feasible this is, so I understand if it's beyond the scope of FancyZones.

---

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Repository: godot
Issue: GDNative: Issue with custom class types for a property.
Labels: bug,topic:gdextension

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
Godot 3.2.3-stable (`godot.windows.opt.tools.64.exe`)


**OS/device including version:**
Microsoft Windows 10 Home (64-bit)
10.0.19041 Build 19041


**Issue description:**
If a custom GDNative class has an attribute with the property hint `GODOT_PROPERTY_HINT_RESOURCE_TYPE`, and hint string of another GDNative class inheriting Resource ("First", in the case of the example project I have linked), we get an error:
![image](https://user-images.githubusercontent.com/57148878/106510579-092ac700-64c7-11eb-9a80-3e32742ecbae.png)
(`The assigned value's type (CUSTOM_GDNATIVE_CLASS) doesn't match the variable's type (CUSTOM_GDNATIVE_CLASS).`)

**Steps to reproduce:**
- Create two GDNative classes (using the C API directly in this case).
- Add a property to the second of the two classes.
  - Set the property hint to `GODOT_PROPERTY_HINT_RESOURCE_TYPE`.
  - Set the hint string to the name of your first class.
- Attempt to assign a instance of the first class to the property.

Attempting to create a saved resource of the parent class will yield an error similar to this in console, despite the class still being detected properly:
![image](https://user-images.githubusercontent.com/57148878/106511535-4774b600-64c8-11eb-90a9-1c3fbc8f887d.png)

![image](https://user-images.githubusercontent.com/57148878/106511589-56f3ff00-64c8-11eb-953f-d6ca97298a7a.png)


**Minimal reproduction project:**
[Bug Repro Project.zip](https://github.com/godotengine/godot/files/5906469/Bug.Repro.Project.zip)
(You'll want to compile this yourself, it comes with a `SConsfile` although it is a little jank)
Repository: excalidraw
Issue: feature request: link to PNG
Labels: enhancement,discussion

I'd be great if we were able to link to an image. I find myself wanting to do this all the time.
Repository: pytorch
Issue: Add branch predictor hints to prefer `Context::deterministicAlgorithms() == false`
Labels: module: performance,triaged,module: determinism

## 🚀 Feature

Add branch prediction hints to all internal checks of the deterministic flag. Prediction should always prefer branches that can only be reached if the deterministic flag is disabled.

## Motivation

When the deterministic flag is checked within PyTorch operations, it is always used to determine the path of a conditional branch (if False, run the default implementation; if True, throw an error or execute an alternate implementation). This check is likely to decrease performance by some amount. Ideally, if the deterministic flag is not enabled, the check should impact performance as little as possible. For one, nondeterministic algorithms are generally expected to be faster than deterministic algorithms. Secondly, performance does not matter if a nondeterministic error is thrown, so it's better to prefer the branch that does not throw the error.

This idea was suggested by @mruberry: https://github.com/pytorch/pytorch/pull/51388#issuecomment-770522123

## Pitch

To facilitate this, we could use a branch prediction hint like [`__builtin_expect`](https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html) or [`likely` and `unlikely`](https://en.cppreference.com/w/cpp/language/attributes/likely)

Further implementation details need to be investigated.

cc @mruberry @kurtamohler @VitalyFedyunin @ngimel
Repository: go
Issue: all: create a special annotation to indicate that a function panics
Labels: Documentation,NeedsInvestigation,FeatureRequest

It would be good for a special comment tag or something to document that a function potentially panics. 

Godoc would detect the tag and display a special label or ⚠️ symbol .

or 
<pre>
<h1>🅿 🅟</h1>

</pre>
Repository: vscode
Issue: Mark same keybindings - Badge with the number of same keybinding
Labels: feature-request,keybindings-editor

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

There is a "Show Same Keybindings" menu but this could be improved.

I suggest that each of the same keybinding have the badge you see earlier - without clicking "Show Same Keybindings".

An example of a mockup with a green badge:
![mark-same-keybindings-mockup](https://user-images.githubusercontent.com/16800535/106522281-c6c1b400-64df-11eb-81bf-27f86436b6ec.png)

The green badge says there are two Command that use the same keyboard shortcut - `selectPartOfWord.moveLeft` and `workbench.action.moveEditorToPreviousGroup`.

The advantage is that you can see the same keybindings right away, you don't need to click "Show Same Keybindings" for each Command.

**Additional idea**: Filter "Show only Commands with Same Keybindings".