sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: [cross_file] Clarify package description
Labels: d: api docs,package,team-ecosystem,P3,p: cross_file,triaged-ecosystem

## Use case

A very common use case of `.takePicture()` is to display the image to the user right after she took it (for editing, for validation before upload, etc. etc.).

What we do in this case is (pseudo code):
```dart
final capturedXFile = await controller.takePicture();

...some widget...
Container(
    child: Image.file(
        File(capturedXFile.path),
    ),
),
```

Any image widget does not accept an XFile, but wants a standard File, so after instantiating a potentially heavy object such as XFile which, according to [documentation](https://pub.dev/documentation/cross_file/latest/cross_file/XFile-class.html) _"wraps the bytes of a selected file"_, we scrap it to only get the path property with `File(capturedXFile.path)`.

## Proposal

This is a waste of resources, is unmotivated, and in low-specs devices can make loose precious milliseconds between the capture process and the display of the image (making the app looks slow) without any reason.
I can see some use cases in which having directly an XFile can be beneficial, I honestly judge them minors, but let's also say that the reasons are not minors, then for sure at least we need another alternative method such as `await controller.takePictureAndReturnPath();` to only get a path without generating an heavy XFile.

Please let me know if my understanding of XFiles is wrong (would have been great, for bringing more data to this discussion, to have a `sizeOf()` operator in Dart, but we don't have it, so we can only discuss of "heavy", "big" and "large" objects, I'm afraid 🙁).
Repository: go
Issue: time: Parse of am/pm should be forgiving of spaces and case
Labels: NeedsInvestigation


### What version of Go are you using (`go version`)? 

<pre>
1.17.5
</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>
Mac OS
</pre></details>

### What did you do?

import (
	"testing"
	"time"
)

func TestParse(t *testing.T) {
	var tm time.Time
	var err error

	tm, err = time.Parse("3:04PM", "5:23 PM")
	if err != nil {
		t.Error(err)
	}
	if tm.Hour() != 17 {
		t.Error("hour does not match")
	}

	tm, err = time.Parse("3:04pm", "5:23PM")
	if err != nil {
		t.Error(err)
	}
	if tm.Hour() != 17 {
		t.Error("hour does not match")
	}
}



### What did you expect to see?

Tests pass


### What did you see instead?

=== RUN   TestParse
    parse_test.go:14: parsing time "5:23 PM" as "3:04PM": cannot parse "M" as "PM"
    parse_test.go:17: hour does not match
    parse_test.go:22: parsing time "5:23PM" as "3:04pm": cannot parse "" as "pm"
    parse_test.go:25: hour does not match
--- FAIL: TestParse (0.00s)
Repository: godot
Issue: Error with missing character when creating a VisualScript Node
Labels: bug,topic:editor,topic:visualscript

### Godot version

v4.0.alpha3.official [256069eaf]

### System information

Arch Linux (IDK how to give a version for this), AMD Ryzen 5 3600 6-Core Processor (x86_64), AMD Radeon RX 580

### Issue description

In certain scripts, when I try to create a new [VisualScript Node](https://docs.godotengine.org/en/latest/tutorials/scripting/visual_script/nodes_purposes.html#nodes-and-terminology), I get the following error:

```
Cannot open file 'res://xample.vs'.
Failed loading resource: res://xample.vs. Make sure resources have been imported by opening the project in the editor at least once.
```

When this happens, the first character after `res://` is always missing. In that example, the script’s real path was <code>res://<b>e</b>xample.vs</code>.

### Steps to reproduce

1. Open the minimum reproduction project.
2. Open `res://example.vs`
3. Right click inside the script canvas.
4. Click “Cancel”.
5. Open “Output” in the bottom panel.

### Minimal reproduction project

[visual_script_node_creation_error.zip](https://github.com/godotengine/godot/files/8118897/visual_script_node_creation_error.zip)
Repository: pytorch
Issue: Having rrelu functional + module take a generator object to match native functions entry
Labels: module: nn,triaged,module: random

### 🚀 The feature, motivation and pitch

In [native_functions.yaml](https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/native_functions.yaml#L3694), rrelu takes in a generator but the [nn.functional](https://pytorch.org/docs/stable/generated/torch.nn.functional.rrelu.html?highlight=rrelu#torch.nn.functional.rrelu) version (and the module version) don't take in a generator. We were discussing exposing the generator option to the nn.functional and module versions of rrelu

### Alternatives

_No response_

### Additional context

_No response_

cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345 @pbelevich
Repository: storybook
Issue: It should be possible to add class and styles to the #root
Labels: feature request,needs triage

**Is your feature request related to a problem? Please describe**
When using layout 'centered' it does not accept width of 100% on child elements because #root does not have width, it is contrained.
meaning that if you have a button that could be a block button ( meaning it should take the full width ) how would you center that when the options is not block in the args?

**Describe the solution you'd like**
centered should also add to the #root a centered flex with a width of 100% for those cases, or at least give the the possibility to add class or styles to it.
```css
.sb-show-main.sb-main-centered #root {
    display: flex;
    width: 100%;
    justify-content: center;
}
```

**Describe alternatives you've considered**
I could add custom css directly to the main.js to overwrite the #root when centered

Right now I'm doing a Story that is not rendered in the docs, with fullscreen layout, with a custom decorator that has 100vh and width of 100% that centers the item.

```jsx
<Story
  name='Playground'
  parameters={{
    layout: 'fullscreen',
    viewMode: 'canvas',
    docs: { disable: true }
  }}
  decorators={[
    () => ({
      template: '<div style="padding: 4rem; width: 100%; height: 100vh; display: flex; align-items: center; justify-content: center;"><story /></div>',
    }),
  ]}
>
  {Template.bind({})}
</Story>
```

**Are you able to assist to bring the feature to reality?**
no, because i'm not sure of the implications on the current implementation of others for this, and if those would cause other problems.

**Additional context**
![image](https://user-images.githubusercontent.com/14954720/155200058-bbc0191e-81d7-41e4-ab67-ad9252c7724a.png)
Repository: storybook
Issue: Mdx Source inside Canvas
Labels: feature request,mdx

**Is your feature request related to a problem? Please describe**
Right now to add to vue 3 source code to the canvas is quite verbose ( as per issue #13917 ) having to add to the:
```jsx
parameters={{
  docs: {
    source: {
      code: 'my custom code'
    }
  },
}}
```

**Describe the solution you'd like**
Instead of having to do that why not add the possibility to use Source inside Canvas to render the code.
```jsx
<Canvas>
  <Story></Story>
  <Source code={'my custom code'} />
</Canvas>
```
Or at least a way of injecting to a canvas using its ID
```jsx
<Canvas>
  <Story></Story>
</Canvas>
<Source injectTo="my-story--component" code={'my custom code'} />
```

**Describe alternatives you've considered**
Right now this is the only solution possible
```jsx
parameters={{
  docs: {
    source: {
      code: 'my custom code'
    }
  },
}}
```

**Are you able to assist to bring the feature to reality?**
no
Repository: react-native
Issue: TextInput closes automatically when opened on android
Labels: Component: TextInput,Platform: Android,Needs: Triage :mag:

### Description

Hi there,

I switched laptops and cloned the repository of my project, did a quick yarn install and looks like it was a big difference from the one on the main branch but I didn't bother since maybe it's just because of different Node versions.

Now every time I click on one TextInput the keyboard opens and closes immediately only on android. I attached a quick recording here. Tried some solutions and it looks like switching android:windowSoftInputMode from adjustResize to adjustPan in AndroidManifest.xml fixes the problem with the closing but I'm not really happy with the behaviour of the keyboard in the app when it's set to adjustPan.

### Version

0.64.0

### Output of `npx react-native info`

```
System:
    OS: macOS 11.4
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 29.16 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 16.5.0 - ~/.nvm/versions/node/v16.5.0/bin/node
    Yarn: 1.22.15 - ~/.yarn/bin/yarn
    npm: 7.19.1 - ~/.nvm/versions/node/v16.5.0/bin/npm
    Watchman: 2021.06.07.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK:
      API Levels: 29, 30, 31
      Build Tools: 29.0.2, 29.0.3, 31.0.0
      System Images: android-29 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.2 AI-202.7660.26.42.7486908
    Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_292 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1 
    react-native: 0.64.0 => 0.64.0 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
```

### Steps to reproduce

Not really sure what could be the steps to reproduce. Maybe this issue starting happening a while ago but I just saw it now.

### Snack, code example, screenshot, or link to a repository



Here is just an input centered inside a simple View.
https://gfycat.com/ordinaryquestionabledinosaur
Repository: TypeScript
Issue: Add definite assignment checks for interacting with `noUncheckedIndexAccess`
Labels: Suggestion,Awaiting More Feedback

# Suggestion

## 🔍 Search Terms

noUncheckedIndexAccess, narrowing, assignment, definite assignment, control flow

## ✅ Viability 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, 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

It'd be great if `noUncheckedIndexAccess` understood when you have just initialized a given index in terms of control flow, the same way that TS can see that a standalone optional binding is definitely initialized.

## 📃 Motivating Example

```ts
const stringNumDict: Record<string, number> = Object.create(null);

function isNonZero(key: string, dict: Record<string, number>): boolean {
  if (!dict[key]) {
    dict[key] = 0;
  }

  return dict[key] > 0;
}
```

Here, `isNonZero` has to insert a non-null assertion operator on the final line of the function to type check. (Mind, this is a bad pattern; it should be initialized elsewhere. I have seen this come up in the real world in things like a `reduce` building a nested map, though.) For a standalone value with the same semantics as `dict[key]`, i.e. `number | undefined`, the assignment informs TS that it is no longer `| undefined`, so the final check works.

## 💻 Use Cases

In the simplest cases (with value types), there is no workaround other than using a non-null assertion operator or an explicit cast. In cases with reference types (e.g. assigning an object if the value isn't set), doing a check like this can suffice as a workaround:

```ts
let nested = dict[key];
if (!nested) {
  nested = dict[key] = {};
}

nested.otherStuff = ...;
```
Repository: godot
Issue: Html5 Webgl context lost in mobile browser Android 6 graphics Mali-T720
Labels: bug,platform:web,platform:android,topic:rendering,topic:porting

### Godot version

v3.4.2.stable.official [45eaa2daf]

### System information

Android 6, (GLES2,GLES3), Mali-T720

### Issue description

In the mobile browser html5 android 6 graphics Mali-T720 in the mode GLES2 or GLES3, after about 5-10 minutes, the Webgl context is lost. Before context is lost, you may notice low fps and browser freezes. After a lot of experimentation, I found that this bug completely disappears if you set the preserveDrawingBuffer=false option in the web context either in the godot.js file or in the canvas element before passing it to the engine class.

### Steps to reproduce

Runs any godot project in Html5 Android 6 mobile browser with graphics Mali-T720.

### Minimal reproduction project

_No response_
Repository: vscode
Issue: Git - `git.openFile` command doesn't work properly with Replace Preview
Labels: bug,git

<!-- ⚠️⚠️ 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. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 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. -->
- VS Code Version: 1.61.2
- OS Version: Windows 10 20H2

Steps to Reproduce:

1. Open global search and start to replace any string
2. Click on found string, Replace Preview window should be opened
3. Call `git.openFile` command. New editor will be opened. This editor opens an actual file, but acts a bit weird, e.g. it cannot be revealed in side bar with `Reveal Active File in Side Bar` command. Also, if file was already opened, a new editor will be opened:
![image](https://user-images.githubusercontent.com/6714840/155211833-124c56ae-a50c-4dd4-81f9-043a59e2a4d4.png)

I often use "Git: Open File" + "Reveal Active File in Side Bar" combo to easily find files in folder tree, but cannot find useful workaround with Replace Preview.
Repository: rust
Issue: process: release procedure only runs crater on nightly->beta cut
Labels: T-compiler,T-release,A-process

In a [recent compiler team meeting](https://zulip-archive.rust-lang.org/stream/238009-t-compiler/meetings/topic/.5Bweekly.5D.202022-02-10.20.2354818.html#271445043), the timing of crater runs came up.

Today, we typically do a crater run at the start of the six week release cycle; we run crater against the beta freshly cut from nightly.

The problem with this model is that we then cherry-pick beta backports of individal commits into the beta channel. *Sometimes* those commits have been run through crater; and sometimes the resulting beta has another crater run done on it. But neither is part of the standard process used by the compiler+release teams (and worse, not everyone on the team knows that there won't be "one last crater run" before release).

Our current model allows us to apply last minute patches that the teams decide are warranted.  Such last minute patches are very conservative in nature, more so than typical beta backports.

We should make sure we all understand how much testing, or lack thereof, a backport to beta is going to get. We probably should also include time in the  project planning to allow for "one last crater run", and then use very strict backport criteria for anything that lands after that point.
Repository: bitcoin
Issue: Add `not_null<T>` from the Guidelines Support Library
Labels: Brainstorming

There are many places in the codebase where we use a pointer type (`*`, `shared_ptr`, `unique_ptr`, etc.) because of historical reasons (`CBlockIndex*`) or for polymorphism. In many such cases, we may want to avoid needing to handle the pointer being null, or make it clear in the function contract that we require a non-null pointer.

`not_null<T>` is the solution proposed by the C++ Core Guidelines ([relevant section](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-nullptr)), and restricts pointers and smart pointers to hold non-null values.

Since I've learned about this, I've repeatedly ran into scenarios where I wish I could use it so as to make call semantics clearer and avoid misuse / unnecessary null handling.

-----

There is a header-only implementation of `not_null<T>` [here](https://github.com/microsoft/GSL/blob/4377f6e603c64a86c934f1546aa9db482f2e1a4e/include/gsl/pointers#L69-L82), however, there are two issues we need to solve:

1. The header-only implementation linked above requires the `Expects` and `Ensures` macros defined [here](https://github.com/microsoft/GSL/blob/4377f6e603c64a86c934f1546aa9db482f2e1a4e/include/gsl/assert#L129-L130), do we also import these or can we tweak our existing assertion macros to work?
2. There is also a [`strict_not_null<T>`](https://github.com/microsoft/GSL/blob/4377f6e603c64a86c934f1546aa9db482f2e1a4e/include/gsl/pointers#L222-L238), which requires explicit construction. Do we need that or just `not_null<T>`?
Repository: electron
Issue: [Feature Request]: Support for high DPI variations in tray & window icons
Labels: enhancement :sparkles:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

Different screen DPIs expect different image resolutions. Although Electron supports multi-DPI `nativeImage`s, there's no way to use these in the system tray, or for the window icons. This affects cases where users have high-DPI screens, like Apple's Retina displays - and also cases where users define a system DPI besides the system default.

### Proposed Solution

Support using multi-DPI `nativeImage` in the `Tray` and in the window icon.

### Alternatives Considered

No possible user-implementable alternatives available.

Providing any size besides 16px for downscaling results in varying bad outcomes. Even 32x32px looked bad in my testing, so simply providing moderately oversized images doesn't seem a viable workaround.

### Additional Information

On Windows 11 the tray icon size is 16x16px. If the system scaling is set to 125% then the tray icon size becomes 20x20px, and the 16x16px icon is upscaled (poorly) by the OS. On the other hand, using an icon that's too large is subject to being downscaled (also poorly, generally) by the OS. These things weren't issues on Windows 7, not that I could see anyway, so I'm guessing the algorithms for image scaling have been changed.

It would be a big step up in terms of polish if DPI variations were used in these cases.

# DPI 125%:
### Images zoomed 1250%

**16x16px icon**
![image](https://user-images.githubusercontent.com/6835891/153320834-54127645-ecb9-4084-8455-6e0fa54ad646.png)

**1024x1024px icon**
![image](https://user-images.githubusercontent.com/6835891/153320876-4342ca67-8978-4c05-a82a-e60fcd800931.png)

# DPI 100%
### Images zoomed 1250%

**16x16px icon**
![image](https://user-images.githubusercontent.com/6835891/153320930-7ae6c38c-3767-4e68-944c-4306c00941b4.png)

**1024x1024px icon**
![image](https://user-images.githubusercontent.com/6835891/153321376-7162ee04-365f-4ba2-9b35-6b05370d75ab.png)

----

According to this code (located courtesy of @nornagon) the `Tray` icons are limited to the default DPI.

https://github.com/electron/electron/blob/83a4ac184117c9b60732ba893be0d1212d9231d0/shell/browser/api/electron_api_tray.cc#L199-L203
Repository: godot
Issue: Rename String.humanize_size to something more descriptive
Labels: enhancement,discussion,topic:core,breaks compat

### Godot version

002ab1060862431731cd528a0887ad8362ab404c

### System information

N/A, not system-dependent

### Issue description

After waffling I narrowly decided this would be better to post as an issue here as I don't really have a specific proposed alternative in mind. I just feel like "humanize_size" is very ambiguous (it took me looking at the source to figure out what it does when writing the description for it)

Alternatives could be "humanize_byte_size" or similar, but as was pointed out when I brought it up in my docs PR, "humanize" is a bit of a weird term and it feels like there could be a better one.

I wanted to see if there could be a little bit of brainstorming for another (or whether it's worth even worrying about now that it has a description)

### Steps to reproduce

N/A

### Minimal reproduction project

_No response_
Repository: next.js
Issue: Next/Image Onload Event reports zero natural height and width when lazy in Firefox
Labels: Image (next/image)

### Verify canary release

- [X] I verified that the issue exists in Next.js canary release

### Provide environment information

next:12.1.1-canary.1
node: v16.13.2

### What browser are you using? (if relevant)

Firefox 97.0.1 

### How are you deploying your application? (if relevant)

npm run dev

### Describe the Bug

Hello and thanks again for merging my 2nd pull request!

Currently I have a strange but annoying issue, not sure if it's only browser related.  When I use onLoadingComplete I get wrong naturalWidth and naturalHeight properties, they are both zero or one. That happens currently ONLY in FIrefox and ONLY when the image loads lazily e.g. when scrolling to its position. Adding "priority" prop or switching browser, the issue dissapears. Any ideas?
I need  those numbers to be correct in order to calibrate the parent container with the correct aspect ratio for resizing purposes.

### Expected Behavior

OnLoading complete should report correct naturalHeight and naturalwIdth in every case.

### To Reproduce

<Image   
        src={imageLocation}        
        onLoadingComplete={(e)=>console.log(e.naturalHeight)}
        layout="fill"             
       
      />