sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: [Web] TextField displays wrong text when entering Chinese 
Labels: a: text input,framework,a: internationalization,platform-web,has reproducible steps,P2,found in release: 3.7,found in release: 3.11,team-web,triaged-web

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

I have an online web project, html rendering, built about three months ago, and it has been working fine. Recently went online to check the tests and found input bugs.

I have no idea from which version of chrome began to appear the problem, edge also have problems

The problem is that under some conditions, on macos, when using the system's own Chinese input method, the input of Chinese will break after the first letter is entered, resulting in the problem of not being able to continue to enter as Chinese.

The minimal code has been uploaded, here is the screen recording
Test input content nihao (Hello)

build with html
```
flutter build web --web-renderer html
```

### Expected results

typing 你好 

### Actual results

Input is interrupted

### Code sample

Online demo: [Github Page](https://sunjianan9900.github.io/demo/#/)
Github Code: https://github.com/sunjianan9900/demo

### Screenshots or Video

<details>
<summary> Online Demo Test </summary>

 

https://user-images.githubusercontent.com/10936316/236231017-62e45d89-26d7-4e27-972b-ad25fe144701.mov



</details>


### Logs

<details><summary>Logs</summary>

```console
No
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.12, on macOS 13.3.1 22E772610a darwin-arm64 (Rosetta), locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[!] Android Studio
    ✗ Unable to find bundled Java version.
[✓] IntelliJ IDEA Ultimate Edition (version 2021.1.3)
[✓] VS Code (version 1.78.0)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
```

</details>
Repository: pytorch
Issue: Feature request: fast way to approximate the diagonal of the hessian
Labels: module: autograd,triaged,enhancement,needs design,module: functorch

Hi, 
I want to get the second-order gradients for a nn.Module function. I use `make_functional_with_buffers` to wrap it. But I fail to get the second-order gradients with RuntimeError. The code is as follows:
```
import torch
import torch.nn as nn
from functorch import make_functional_with_buffers, grad

x = torch.randn(4, 3)
t = torch.randn(4, 3)
model = nn.Linear(3, 3)
func, params, buffers = make_functional_with_buffers(model)

def compute_loss(params, buffers, x, t):
    y = func(params, buffers, x)
    return nn.functional.mse_loss(y, t)

grad_weights = grad(compute_loss)(params, buffers, x, t)
grad_weights2 = grad(grad(compute_loss))(params, buffers, x, t)
```

I got the following error:
```
---> 17 grad_weights2 = grad(grad(compute_loss))(params, buffers, x, t)

File ~/programs/miniconda3/lib/python3.9/site-packages/functorch/_src/eager_transforms.py:1188, in grad.<locals>.wrapper(*args, **kwargs)
   1186 @wraps(func)
   1187 def wrapper(*args, **kwargs):
-> 1188     results = grad_and_value(func, argnums, has_aux=has_aux)(*args, **kwargs)
   1189     if has_aux:
   1190         grad, (_, aux) = results

File ~/programs/miniconda3/lib/python3.9/site-packages/functorch/_src/eager_transforms.py:1068, in grad_and_value.<locals>.wrapper(*args, **kwargs)
   1065     output, aux = output
   1067 if not isinstance(output, torch.Tensor):
-> 1068     raise RuntimeError('grad_and_value(f)(*args): Expected f(*args) '
   1069                        f'to return a Tensor, got {type(output)}')
   1070 if output.dim() != 0:
   1071     raise RuntimeError('grad_and_value(f)(*args): Expected f(*args) '
   1072                        'to return a scalar Tensor, got tensor with '
   1073                        f'{output.dim()} dims. Maybe you wanted to '
   1074                        'use the vjp or jacrev APIs instead?')

RuntimeError: grad_and_value(f)(*args): Expected f(*args) to return a Tensor, got <class 'tuple'>
```

The functorch is directly installed from source.



cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7 @Chillee @samdow @soumith @kshitij12345 @janeyx99
Repository: TypeScript
Issue: Missing property incompatible error when there is a namespace with a value export
Labels: Bug,Help Wanted

# Bug Report

### 🔎 Search Terms

index signature, namespace

### 🕗 Version & Regression Information

- This is the behavior in every version I tried: v4.9.4, v5.0.4

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?#code/JYOwLgpgTgZghgYwgAgCLAWZBvAsAKGWQG0BrCATwC5kBnMKUAcwF0aBXEUkAewHcQAbgIBfAgVCRYiFABUAFsxxj8k6PCTIFzAOrAw8gHJwAthFoAHGXoMA1OABt2EAKIAPCzyhZsKkKfMrTW0QJhsjAMtrfXl7J1cPLx8CIghE72QEHhB6ZDhaABN8gpp6RlDkAF5kAHIa4XwVNWlgxVDw4zMopHDZCgsEzwzfAn8uoLk2sJjOwOiDPoH3IeTCZDSV5DB+lGLiqroGZgaVCXB1GWQAMR4eHBTkCygeCwB+GnRME7OpDRQAITgUHWbkgIAKtGut3uayeLxoISY31U5xaALgAC8QWCIVC7ng1gB6QnIHTyCjIYCQgxU5C8LBwEDrKDPKCvB5wiwIqYdSITcJxZzLJLI5p-ZAARXY7Dc2Ig4MhN3xHOeXK0PJmfPm8kWgxFogIQA)

### 💻 Code

```ts
interface Dict {
  [key: string]: unknown;
}

interface Thing {}
interface ThingWithNamespaceWithValueExport {}
namespace ThingWithNamespaceWithValueExport {
  export const asdasd: string = '';
}
interface ThingWithNamespaceWithTypeExport {}
namespace ThingWithNamespaceWithTypeExport {
  export type asdasd = string;
}

interface Foo {
  prop?: Dict;
}
interface Bar extends Foo {
  //             ~~~ Interface 'Bar' incorrectly extends interface 'Foo'. Types of property 'prop' are incompatible. Type 'Thing' is not assignable to type 'Dict'. Index signature for type 'string' is missing in type 'Thing'.
  prop: Thing;
}
interface Baz extends Foo {
  // No error here. But I would expect the same error.
  prop: ThingWithNamespaceWithValueExport;
}
interface Quux extends Foo {
  //             ~~~~ Interface 'Quux' incorrectly extends interface 'Foo'. Types of property 'prop' are incompatible. Type 'ThingWithNamespaceWithTypeExport' is not assignable to type 'Dict'. Index signature for type 'string' is missing in type 'ThingWithNamespaceWithTypeExport'.
  prop: ThingWithNamespaceWithTypeExport;
}
```

### 🙁 Actual behavior

No error for interface `Baz`, where `prop` is the type of an interface with a namespace, which exports a value.

### 🙂 Expected behavior

Same error for `Baz` that we get for `Bar` and `Quux`.
Repository: node
Issue: fs: Change the default value of `mode` argument of `fs.copyFile()` to `fs.constants.COPYFILE_FICLONE`
Labels: fs,feature request,never-stale

### What is the problem this feature will solve?

Today's operating systems and some file systems supports [copy-on-write operation](https://en.wikipedia.org/wiki/Copy-on-write#In_computer_storage) for copying a file (e.g. btrfs on Linux, APFS on Apple's Darwins).

`fs.copyFile()` has already supported them as opt-in behavior if the underlying platform support such operations and libuv support them.

- https://nodejs.org/api/fs.html#fspromisescopyfilesrc-dest-mode
- https://github.com/libuv/libuv/blob/3f331e97da5b1cc2e24765dcb6d26c9dd313418f/src/unix/fs.c#L1309-L1490

However, it's still **opt-in** behavior.

The default value of `mode` argument. of `fs.copyFile()` is `0`. This mean that `fs.copyFile()` does not use copy-on-write and use traditional copying mechanism operation even if the underlying platform and libuv supports such operation.

An user can use copy-on-write operation by passing`fs.constants.COPYFILE_FICLONE` to `mode` argument. 

But if we forget to pass it, `fs.copyFile()` does not use an enhancement underlying mechanism. We (all programmers)  tend to forget to supply a such optional flag to API and to lose a chance to improve a performance. I think this is a bug for API egonomics and having a value we should fix.

### What is the feature you are proposing to solve the problem?

My proposal is changing the default value of `mode` argument of `fs.copyFile()` to `fs.constants.COPYFILE_FICLONE` from `0`.

By this change, all exist programs using `fs.copyFile()` in all over the world can get a chance to improve their throughput without any code change.

If the underlying platform does not support copy-on-write behavior, then `fs.constants.COPYFILE_FICLONE` flag fallback into the traditional approach. I think this change is painless approach.

> `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a copy-on-write reflink. If the platform does not support copy-on-write, then a fallback copy mechanism is used.
>
> https://nodejs.org/api/fs.html#fspromisescopyfilesrc-dest-mode

### What alternatives have you considered?

1. This change might be a "breaking change" if we think it strictly. If there is a user program expect `fs.copyFile()` copy a file without copy-on-write, this change would be problematic.
    - I think it's not be a problem to change a file copying mechanism for user program. It's an abstracted problem by a platform (Node.js, operation system, and file system). An user program should be agnostic about it.
    - But I'm not sure about the Node.js' committee's breaking change policy, I note about this point as a consideration.
3. This also affects the behavior of other APIs that uses `fs.copyFile()` internally (e.g. `fs.cp()`).
Repository: flutter
Issue: Introduce `ButtonStyle` equivalent customisation for `Slider` and `RangeSlider`
Labels: framework,f: material design,c: proposal,P3,team-design,triaged-design

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

Customizing `Slider` and `RangeSlider` should be as easy as customizing buttons.  Currently customizing `Slider` and `RangeSlider` is complex and messy.

Right now just to customize the border radius of the slider components such as track or value indicator you need to copy the source code for that component and modify its radius. We don't do this for any other widget.

Some slider components have radius customization but others don't. it'd be better to have consistent customization as we have for different material buttons.

https://github.com/flutter/flutter/blob/ce32282c0c6ecbe163c668a8d6489d2605077bc2/packages/flutter/lib/src/material/slider_theme.dart#L282-L290

There are separate active, inactive, and disabled colors to be provided. These should be using material states.

https://github.com/flutter/flutter/blob/ce32282c0c6ecbe163c668a8d6489d2605077bc2/packages/flutter/lib/src/material/slider_theme.dart#L267-L276

`slider_theme.dart`:

1. A lot of component code is repeated with only slight variation.
2. Default component values are hard coded and not available in a single config class.
3. Many components aren't customizable and require copying the source code for minor and major customizable. 


### Proposal

- Introduce a `ButtonStyle` equivalent customization class for `Slider` and `RangeSlider`
- Add something similar to `ButtonStyle.from` when you want to just customize default components such as radius, size, elevation, etc.
- Regular style class to take entire custom shape components like the current `SliderThemeData`. 
- Add material state support track color, mark color, and value indicator color.
- Make it as simple as possible to customize any default components of `Slider` and `RangeSlider` while keeping the ability to provide your own custom shapes. 

I will implement this as part of https://github.com/flutter/flutter/issues/125329
Repository: next.js
Issue: [NEXT-1149] Route handler streaming response causes 400 bad request with `next/image` on Vercel
Labels: Image (next/image)

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Home
    Binaries:
      Node: 18.12.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 13.3.5-canary.9
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true), Image optimization (next/image, next/legacy/image)

### Link to the code that reproduces this issue

https://github.com/navandstokes/next-image-dynamic-segment

### To Reproduce

1. Implement a route handler that uses a dynamic segment. 
2. Return an image from that route handler. 
3. Use the route as the `src` for `next/image`. 
4. Deploy on Vercel.

### Describe the Bug

Trying to use a route handler that downloads an image, returns it directly as the response, to be used with `next/image`.

For static routes, it is working. For routes with a dynamic route segment (but same code), `next/image` is returning:
```
400: BAD_REQUEST
Code: INVALID_IMAGE_OPTIMIZE_REQUEST
```
Prod: https://next-image-dynamic-segment.vercel.app/

This problem only exists on Vercel production, not in dev and not in `next build & next start`. Also cannot reproduce on CodeSandbox.

The route handler returns the image correctly if accessing via the URL directly in all three environments.

Also tried the following within the route handler:
- using `import { headers } from "next/headers"` and `const headersList = headers()` to enforce dynamic
- using `export const dynamicParams = true`
- using `export const dynamic = "force-dynamic"`
- using `export const revalidate = 0`
- using `export const runtime = "experimental-edge"`

### Expected Behavior

Dynamic route segments working with next/image in the same way static routes work. 

### Which browser are you using? (if relevant)

Chrome 112.0.5615.138

### How are you deploying your application? (if relevant)

Vercel

<sub>[NEXT-1149](https://linear.app/vercel/issue/NEXT-1149/route-handler-with-dynamic-route-segments-not-working-with-nextimage)</sub>
Repository: PowerToys
Issue: Flows
Labels: Idea-Enhancement,Product-FancyZones,Needs-Triage

### Description of the new feature / enhancement

Saving premade fancy layouts with their dedicated apps as triggers (windows shortcuts/taskbar widgets/keyboard shortcuts)

After setting up the tool when activating the trigger
1. new virtual desktop is created
2. All predefined apps open and snap into their predefined section
3. Enjoy! 

Creating Win Shortcuts would be great cause we could just autostart it easily. 

WDYT?

### Scenario when this would be used?

We all do repetitive tasks we hate. Let's not.

This is important cause it optimizes and automates something that everybody does every day. 
Wouldn't it be great if your custom-made workflow dashboard snapped into place before your eyes? 

Your news, calendar, mail, spreadsheet, teams communicator and project manager windows on startup
Saving you 5 minutes of every morning to set up things the way you do every day.

Then one click opens a new predefined dashboard
where your music player, browser, onenote and messenger snap into place for your research to begin

You ended research? Perfect! one click closes the whole workflow + all the apps, they do not snap back to previous desktop. 

And you click again to open the netfilx and whatever else you chill with.



### Supporting information

_No response_
Repository: terminal
Issue: Please add a "remove leading and trailing whitespace setting" when copying a single line of text
Labels: Area-TerminalControl,Area-Settings,Product-Terminal,Issue-Task

promoted from MSFT:43799361

> Frequently I use "git branch" to list out branches, and then triple click on one of them to highlight it, and then right-click to copy it. I then do "git checkout" followed by Ctrl+V to checkout this branch.
> 
> When I do this, there's always whitespace at the front of the branch name that was copied.
> 
> This is just one concrete example, but this happens all the time. When copying a single line of text it is very rare that the user is trying top copy the entire line of output as-is.
> 
> Can you please add a setting that removes leading whitespace when copying. It should apply only to single-line copies.


We could probably add a `"trimWhitespace": "none" | "trailing" | "leading" | "all"` param to `copy`. That seems kinda sensible. The equal of the `paste` property.
Repository: opencv
Issue: findContours returns all 0's in hierarchy when cv2.ocl.setUseOpenCL(True)
Labels: bug,category: ocl,confirmed

### System Information

OpenCV python version 4.7.0-dev
Operating System / Platform: Ubuntu 22.04
Python version: 3.10.6
NVIDIA RTX 3050 
NVIDIA Driver Version: 525.85.12

### Detailed description

When i enable cv2.ocl.setUseOpenCL(True) previous correct hierarchy from findContours now gives the same array but all 0. 
numpy.ndarray.shape gives the same result (array size is the same but all filled with 0's)

It was working ok in opencv 4.6.0 with python 3.7.3 on intel graphics

```
cv2.ocl.setUseOpenCL(False)
... (code)
print(hierarchy.get())
[[[ 2 -1  1 -1]
  [-1 -1 -1  0]
  [ 4  0  3 -1]
  [-1 -1 -1  2]
  [ 6  2  5 -1]
  [-1 -1 -1  4]
  [ 7  4 -1 -1]
  [ 9  6  8 -1]
 ...
```
```
cv2.ocl.setUseOpenCL(True)
... (code)
print(hierarchy.get())
[[[0 0 0 0]
  [0 0 0 0]
  [0 0 0 0]
  [0 0 0 0]
  [0 0 0 0]
  [0 0 0 0]
  [0 0 0 0]
  [0 0 0 0]
...
```

### Steps to reproduce
machine with nvidia graphics 
```
cv2.ocl.setUseOpenCL(True)
...
contours, hierarchy = cv2.findContours(img, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
        hierarchy_array = hierarchy.get()
        print(hierarchy_array)
```

### 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
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: vscode
Issue: Standalone color picker HSL format uses two decimals for the percentages and forces commas
Labels: bug,under-discussion,editor-color-picker

<!-- ⚠️⚠️ 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.78.0
- OS Version: OSX Ventura 13.3.1

It is unexpected and unusual to use percentages to the second decimal place for this function. Also, an increasingly used hsl format (and rgb as well) is comma-less, which I would hope this picker would allow. 

**Steps to Reproduce:**

1. Open the new standalone color picker
2. click the modal title bar to change the format to `hsl`
3. The inserted color is something like `hsl(0, 85.70%, 43.70%)`

**What is expected?** 

I would expect the output format to be the same as when clicking the little color swatch in a css file and using the `hsl` format. In that case, the output is rounded to whole numbers `hsl(0, 86%, 44%)` which is what is expected. 

There also should be the ability to insert the hsl color without commas, which in the example above would be `hsl(0 86% 44%)` (or `hsl(0 86% 44% / 1)` for alpha values).

I guess what I may be asking for here is a custom formatter for the inserted colors. If that's not possible, than how about a config option with many more color formats?
Repository: electron
Issue: [Bug]: Calling webContents.focus() forces the entire window to raise above other windows on Linux/GNOME
Labels: bug :beetle:,has-repro-gist,24-x-y

### 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 bug report that matches the one I want to file, without success.

### Electron Version

24.1.3

### What operating system are you using?

Ubuntu

### Operating System Version

22.04.2 LTS, GNOME 42.5

### What arch are you using?

x64

### Last Known Working Electron version

Not sure, it's been around a while.

### Expected Behavior

1. Using `gnome-tweaks`, turn on "Focus on Hover" under the Windows category
2. Open an Electron app where `webContents.focus()` is called when the window is focused (see gist), and then click on another window that overlaps the application.
3. Move the cursor over the Electron app's window.

The app should take focus, but the window should not raise above the overlapping app.

### Actual Behavior

The app takes focus, and the window raises over top.

### Testcase Gist URL

https://gist.github.com/devinbinnie/c0262f5c890edc033fdfe5b7e4209ded

### Additional Information

This issue particularly impacts applications where the developer might want to focus a `BrowserView` when the application is focused, and the user has "sloppy focus" or focus-on-hover enabled on their system.

eg. This issue: https://github.com/mattermost/desktop/issues/1827
Repository: vscode
Issue: Import Code Profiles with CLI
Labels: feature-request,user-profiles

<!-- ⚠️⚠️ 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. -->
Profiles are great, especially for school labs. However, currently it seems impossible to import `.code-profile` files using CLI. Looks like it can only be done interactively in the GUI.

Something like this would be perfect:
```
code --import-profile "\\myserver\share\code\xyz.code-profile"
```

This would be a lot of help for IT administrators who prepare scripted installation of VS Code on school labs with different classes and different profiles, config, extensions.