sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: tauri
Issue: [bug]  The IconMenuItem icon cannot be used in a webview
Labels: type: bug,status: needs triage

### Describe the bug


```ts
const toImage = async () => {
  return new Promise((resolve) => {
    const img = new Image();
    img.src = logo;
    img.onload = () => {
      requestAnimationFrame(() => {
        // 创建canvas元素
        let canvas = document.createElement("canvas");
        document.body.append(canvas);
        canvas.width = img.width;
        canvas.height = img.height;
        let ctx = canvas.getContext("2d")!;

        const imageData = ctx.createImageData(100, 100);

        // 遍历每个像素点
        for (let i = 0; i < imageData.data.length; i += 4) {
          // 修改像素数据
          imageData.data[i + 0] = 190; // R 值
          imageData.data[i + 1] = 0; // G 值
          imageData.data[i + 2] = 210; // B 值
          imageData.data[i + 3] = 0; // A 值
        }

        //   const imageData = ctx.getImageData(0,0, canvas.width, canvas.height)
        resolve(new Uint8Array(imageData.data.buffer));
      });
    };
  });
};

const submenu = async (menuText: string, text: string) => {
  const icon = await toImage();
  let res = await Submenu.new({
    text: menuText,
    enabled: true,
    items: [
      await IconMenuItem.new({
        icon,
        enabled: true,
        //   icon: new Uint8Array([0, 0, 0, 1]),
        text: "icon menu",
      }),
      await MenuItem.new({
        text,
        enabled: true,
        action() {
          console.log(`点击了${menuText}-${text}`);
        },
      }),
    ],
  });
  return res;
};
```
error:  Unhandled Promise Rejection: invalid args `options` for command `new`: data did not match any variant of untagged enum Icon

### Reproduction

_No response_

### Expected behavior

_No response_

### Full `tauri info` output

```text
[✔] Environment
    - OS: Mac OS 14.1.0 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.75.0 (82e1608df 2023-12-21)
    ✔ cargo: 1.75.0 (1d8b05cdd 2023-11-20)
    ✔ rustup: 1.26.0 (2023-04-05)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 22.2.0
    - pnpm: 8.13.1
    - npm: 10.7.0
    - bun: 1.0.30

[-] Packages
    - tauri [RUST]: 2.0.0-rc.0
    - tauri-build [RUST]: 2.0.0-rc.0
    - wry [RUST]: 0.41.0
    - tao [RUST]: 0.28.1
    - @tauri-apps/api [NPM]: 2.0.0-rc.0
    - @tauri-apps/cli [NPM]: 2.0.0-rc.1

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: SolidJS
    - bundler: Vite
```


### Stack trace

_No response_

### Additional context

_No response_
Repository: tauri
Issue: [feat] [v2] Make `set_ignore_cursor_events` available for `Webview`
Labels: type: feature request

### Describe the problem

I was making two webviews in one window, one is as an transparent overlay over the other. But I noticed that I can't click through the overlay webview to the underlay webview. Although there is a `set_ignore_cursor_events` method for `Window`, wandering if `Webview` can also do this.

### Describe the solution you'd like

Can click through overlay webview into underlay one.

### Alternatives considered

_No response_

### Additional context

_No response_
Repository: langchain
Issue: FAISS - Incorrect warning and relevance score when using `MAX_INNER_PRODUCT` and `normalize_L2`
Labels: Ɑ: vector store,🤖:bug,investigate

### Checked other resources

- [X] I added a very descriptive title to this issue.
- [X] I searched the LangChain documentation with the integrated search.
- [X] I used the GitHub search to find a similar question and didn't find it.
- [X] I am sure that this is a bug in LangChain rather than my code.
- [X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

### Example Code

```python
from langchain_community.vectorstores import FAISS
from langchain_aws import BedrockEmbeddings


texts = ["I like apples", "I like oranges"]
distance_strategy = "MAX_INNER_PRODUCT"

embeddings = BedrockEmbeddings(
    region_name="us-east-1", model_id="amazon.titan-embed-text-v1"
)

normalize_L2 = False
vectorstore = FAISS.from_texts(
    texts,
    embeddings,
    distance_strategy=distance_strategy,
    normalize_L2=normalize_L2
)
results = vectorstore.similarity_search_with_score("I like apples", k=1)
print(results)

normalize_L2 = True
vectorstore = FAISS.from_texts(
    texts,
    embeddings,
    distance_strategy=distance_strategy,
    normalize_L2=normalize_L2
)
results = vectorstore.similarity_search_with_score("I like apples", k=1)
print(results)
results = vectorstore.similarity_search_with_relevance_scores("I like apples", k=1)
print(results)
```

### Error Message and Stack Trace (if applicable)

_No response_

### Description

According to [FAISS](https://github.com/facebookresearch/faiss/wiki/MetricType-and-distances#how-can-i-index-vectors-for-cosine-similarity), the cosine similarity can be obtained by normalizing the vectors first and then using inner product to build the index. However, running the code above, when setting `normalize_L2 = True`, there will be a warning:
```
UserWarning: Normalizing L2 is not applicable for metric type: MAX_INNER_PRODUCT
```
Moreover, the relevance score is counterintuitive. If we are computing cosine similarity, the relevance score from `similarity_search_with_relevance_scores` should be identity to the score from `similarity_search_with_score`. However, the implementation will lead to smaller relevance score when two vectors are closer.
https://github.com/langchain-ai/langchain/blob/fd546196ef0fafa4a4cd7bb7ebb1771ef599f372/libs/core/langchain_core/vectorstores/base.py#L422-L427

### System Info

System Information
------------------
> OS:  Linux
> OS Version:  #1 SMP Tue May 21 16:52:24 UTC 2024
> Python Version:  3.10.13 | packaged by conda-forge | (main, Oct 26 2023, 18:07:37) [GCC 12.3.0]

Package Information
-------------------
> langchain_core: 0.2.10
> langchain: 0.2.6
> langchain_community: 0.2.6
> langsmith: 0.1.82
> langchain_aws: 0.1.8
> langchain_text_splitters: 0.2.2
> langgraph: 0.1.3
Repository: deno
Issue: `npm:cli-table` push() is not a function
Labels: bug,node compat

Repro:

```js
import Table from "npm:cli-table";
const table = new Table();
console.log(table.push(["foo", "bar"]));
```

```
error: Uncaught (in promise) TypeError: table.push is not a function
console.log(table.push(["foo", "bar"]));
                  ^
    at file:///home/divy/gh/deno/repro.mjs:4:19
```

Ref https://github.com/denoland/deno/issues/24408
Repository: ollama
Issue: Getting `Error: unexpected status code 200` when pulling a model from an internal registry v0.3.1 and above
Labels: bug

### What is the issue?

Starting version 0.3.1, when pulling a model from an internal registry (https://distribution.github.io/distribution/), I'm getting the error `unexpected status code 200`.
Version up to 0.3.0 worked properly with this setup.

The line returning the error seems to be https://github.com/ollama/ollama/compare/v0.3.0...v0.3.1#diff-9e32d213fc229fc9c327863932f4fc8a875d854333b5ad2dffa9b43fd0848232R226

# How to reproduce

Via docker-compose, I create a test environment with ollama and registry.

```
version: "3"

services:
  ollama:
    image: ollama/ollama:0.3.0
    ports:
      - "11434"

  registry:
    image: registry:2
    environment:
      REGISTRY_LOG_LEVEL: debug
      REGISTRY_LOG_ACCESSLOG_DISABLED: "false"
    ports:
      - "5000"
```

Start the test stack via `docker compose up -d`.

In the snippet above, I'm using ollama v0.3.0.

The following commands will pull a model (qwen2:0.5b for sake of size), and push it to the local registry.

```
docker compose exec ollama ollama pull qwen2:0.5b
docker compose exec ollama ollama cp qwen2:0.5b registry:5000/library/qwen2:0.5b
docker compose exec ollama ollama push registry:5000/library/qwen2:0.5b --insecure
```

Now the models can be remove from ollama:

```
docker compose exec ollama ollama rm qwen2:0.5b registry:5000/library/qwen2:0.5b
```

And re-downloaded from the local registry:

```
docker compose exec ollama ollama pull registry:5000/library/qwen2:0.5b --insecure
```

With ollama version up to 0.3.0 (included), this works.
With ollama version from 0.3.1 (included), I'm getting the following error:

```
Error: unexpected status code 200
```

### OS

Docker

### GPU

_No response_

### CPU

_No response_

### Ollama version

0.3.1 and above
Repository: puppeteer
Issue: [Bug]: Firefox does not save the preferences if you set the option userDataDir
Labels: bug,upstream,confirmed,P3,firefox

### Minimal, reproducible example

```TypeScript
const { join } = require('node:path');
const { tmpdir } = require('node:os');
const { mkdirSync, existsSync } = require('node:fs');
const puppeteer = require('puppeteer-core'); // version 23.0.2

main();

async function main() {
  const userDataDir = join(tmpdir(), 'firefox_test_udd');

  if (!existsSync(userDataDir)) mkdirSync(userDataDir, { recursive: true });

  const browser = await puppeteer.launch({
    browser: 'firefox',
    protocol: 'webDriverBiDi',
    pipe: true,
    protocolTimeout: 100000 * 1000,
    defaultViewport: null,
    waitForInitialPage: false,
    headless: false,
    executablePath: '/Applications/Firefox.app/Contents/MacOS/firefox',
    userDataDir,
  });
}
```


### Background

I am launching the Firefox (129) browser via the puppeteer-core. In the browser, I go to **about:preferences** and enable **Open previous windows and tabs**. Add few tabs and closing the browser. On next startup this settings is dropped and the tabs are not saved. On my research I found the problem in `userDataDir` option. If omit this option then all works fine.

### Expectation

It is expected that all settings will be saved.

![image](https://github.com/user-attachments/assets/ce6f5258-540d-409c-a692-6f1db3508664)


### Reality

But in reality, the settings are not saved.

![image](https://github.com/user-attachments/assets/bd650e8b-c9dd-4596-8369-f1dd40546589)


### Puppeteer configuration file (if used)

_No response_

### Puppeteer version

23.0.2

### Node version

20.10.0

### Package manager

npm

### Package manager version

10.2.3

### Operating system

macOS
Repository: stable-diffusion-webui
Issue: [Bug]: "fatal: detected dubious ownership in repository" 
Labels: bug-report

### Checklist

- [ ] The issue exists after disabling all extensions
- [X] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [ ] The issue exists in the current version of the webui
- [ ] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

when I ran webui...
```
fatal: detected dubious ownership in repository at 'D:/ProgsOthers/StableDiffusion-WebUI/sd test/stable-diffusion-webui'
'D:/ProgsOthers/StableDiffusion-WebUI/sd test/stable-diffusion-webui' is owned by:
        BUILTIN/Administrators (S-1-5-32-544)
but the current user is:
        ######-#######/##### (S-1-5-21-3082892508-2244180325-9347525-1001)
To add an exception for this directory, call:

        git config --global --add safe.directory 'D:/ProgsOthers/StableDiffusion-WebUI/sd test/stable-diffusion-webui'
fatal: detected dubious ownership in repository at 'D:/ProgsOthers/StableDiffusion-WebUI/sd test/stable-diffusion-webui'
'D:/ProgsOthers/StableDiffusion-WebUI/sd test/stable-diffusion-webui' is owned by:
        BUILTIN/Administrators (S-1-5-32-544)
but the current user is:
        DESKTOP-8UON8OD/Mastar (S-1-5-21-3082892508-2244180325-9347525-1001)
To add an exception for this directory, call:

        git config --global --add safe.directory 'D:/ProgsOthers/StableDiffusion-WebUI/sd test/stable-diffusion-webui'
```
...however...the correct command was...
```
git config --global safe.directory "D:/ProgsOthers/StableDiffusion-WebUI/sd test/stable-diffusion-webui"
```

### Steps to reproduce the problem

Windows 10 non-wsl, python 3.10.6

### What should have happened?

x

### What browsers do you use to access the UI ?

_No response_

### Sysinfo

x

### Console logs

```Shell
x
```


### Additional information

x
Repository: godot
Issue: Wrong Json syntax error
Labels: bug,topic:editor

### Tested versions

- Reproducible in: 4.3.rc3.mono

### System information

Godot v4.3.rc3.mono - Windows 10.0.19045

### Issue description


https://github.com/user-attachments/assets/84096e28-efeb-4051-95cd-b0d5562352ca

When I am writing a json file, a syntax error is highlighted without any indication. When I close the file and open it again, the error highlighting is still there. But after closing the file and saving another file and opening the json file again the error highlighting no longer appears.

### Steps to reproduce

I don't know how the unprompted syntax error is triggered, it just appears by chance during the writing process.
If this error occurs, it can be reproduced using the steps above.

### Minimal reproduction project (MRP)

N/A
Repository: PowerToys
Issue: Fancy Zones Parent/Child Windows
Labels: Needs-Triage

### Description of the new feature / enhancement

The fancy zones "remember last zone" feature can't differentiate between parent and child windows.
I made five zones to surround a center rectangle zone for save/load dialog boxes.  So they are nice and chunky and at the center of my screen.  I just hold shift and drag them to the middle.  Works very good.

But I can't make fancy zones "remember last window position" because it also forces parent windows to that box when loading programs.  So I have to do the same shift + drag over and over again for every child dialog box, instead of them just remembering their fancy zone position, and the parent window being unaffected (usually maximized on boot up).

My picture is an example of my full screened google chrome right now (parent window).  If I go to save a picture I have to Shift + drag the dialog and release and the result is the size and position that you see in the pic.  (I blurred all my info).  So if the dialog windows could just open like that (child windows remember their last state but not parents) that would be excellent.
![Example](https://github.com/user-attachments/assets/10fc5833-f6df-42b5-99df-78535683f56e)
![Last Known Zones](https://github.com/user-attachments/assets/7436871e-8532-4e95-91ff-47ff657190a7)



### Scenario when this would be used?

Every time you use a dialog box in any program that Power Toys can manage the windows.

### Supporting information

Windows 10 22H2 64 bit, Power Toys latest update.
Repository: godot
Issue: Scaling issues on Tooltip with stretch_mode = canvas_items
Labels: bug,topic:gui

### Tested versions

Reproducible: 4.3-rc3, 4.1.2-stable

### System information

Godot v4.3.rc3 - Ubuntu 22.04.4 LTS 22.04 - X11 - Vulkan (Forward+) - integrated Intel(R) UHD Graphics (CML GT2) - Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz (12 Threads)

### Issue description

When using `Project Settings -> Display -> Window -> Strech -> Mode` = `canvas_items`, most UI elements are correctly scaled when the window is resized (they are rendered at the target size, with crisps results on screen).
For Tooltip it's not the case. They seems to be rendered at base size and then scaled to the target size, this leads to blurry & pixelated results on screen. It's mostly visible on the font, but it seems to impact the Tooltip panel too.

![Screenshot from 2024-08-11 14-42-18](https://github.com/user-attachments/assets/950e8bb3-bc1f-4073-b957-6136c82e7598)


### Steps to reproduce

1. `Project Settings -> Display -> Window -> Strech -> Mode` = `canvas_items`
2. Create a label, with text, and tooltip text
3. launch it
4. resize the window
5. put the mouse on the label
6. the label looks good, the tooltip looks blurry and pixelated

### Minimal reproduction project (MRP)

[tooltip_font.zip](https://github.com/user-attachments/files/16573707/tooltip_font.zip)
Repository: ollama
Issue: llama3.1 8b template seems to be different from that in huggingface
Labels: bug

### What is the issue?

Hi thanks for the tool! When reading https://ollama.com/library/llama3.1:8b-instruct-q4_K_M/blobs/11ce4ee3e170, it seems different from https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct/blob/main/tokenizer_config.json#L2053. For example, it does not mention `Cutting Knowledge Date: December 2023`.

Therefore, I wonder whether it is expected or a bug? I have heard some people seems to say small models are sensitive to templates, so making it exactly the same as the official one may be useful. 

### OS

_No response_

### GPU

_No response_

### CPU

_No response_

### Ollama version

_No response_
Repository: rust
Issue: Stepping with "next" in a debugger skips past end-of-scope drops
Labels: A-debuginfo,T-compiler,C-bug,WG-debugging

I am trying to re-enable a lot of disabled debuginfo tests, and in doing that I learned that `tests/debuginfo/drop-locations` https://github.com/rust-lang/rust/blob/c9bd03cb724e13cca96ad320733046cbdb16fbbe/tests/debuginfo/drop-locations.rs was broken at some point in the past 6 years. No idea when, I will not be doing a bisection.

The bug is that in code like this:
```rust
{
    let s = String::from("s");
}
```
stepping through this with the gdb command `next` should step from the `String::from` call to the close brace. But `gdb` never stops on the close brace, even though there is indeed a call to `drop_in_place` for the String, and the debuginfo for the call correctly points at the close brace.
Repository: stable-diffusion-webui
Issue: [Feature Request]: Does img2img api with mask (inpaint) support images and masks in one batch
Labels: enhancement

### 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 ?

I want use img2img api for inpainting,images and masks in one batch

### Proposed workflow

current params:
init_images is list,but mask is a base64 string

### Additional information

_No response_
Repository: rust
Issue: There's no documented way to losslessly print a float (so it will be parsed as the exact same value)
Labels: T-libs-api,A-docs,A-floating-point

I have a use case where I need to output a floating point number (either a f32 or a f64) into a generated Rust source file as text, which needs to be parsed by Rust as the original floating point number exactly. I did some searching and found out about the `{:.}` format to print a floating point number with "all available precision". This seems to work, but according to the documentation for fmt, this isn't a valid formatting specifier. [The documentation](https://doc.rust-lang.org/std/fmt/index.html#precision) states:
> There are three possible ways to specify the desired precision:
>    1. An integer .N: (...)
>    2. An integer or name followed by dollar sign .N$: (...)
>    3. An asterisk .*: (...)

Additionally, printing a float with `{}` seems to print the same thing as with `{:.}`, at least for the floats I've tried, but as far as I can tell the precision of this isn't documented either. [The documentation](https://doc.rust-lang.org/std/primitive.f32.html) says that "printing floats with println and friends will often discard insignificant digits", which kind of suggests that it won't discard *significant* digits, but it doesn't actually say that, so I don't know if I can rely on it for a lossless roundtrip.

Is this a documentation issue, or is there no official way to print a float losslessly? (The floats I generate must be usable in const on stable, so I can't use from_bits, but I suppose transmute would work as an alternative)
Repository: rust
Issue: gdb on aarch64-unknown-linux-gnu/windows-gnu cannot print unused by-value non-immediate arguments
Labels: A-LLVM,A-debuginfo,T-compiler,C-bug,O-AArch64,WG-debugging,E-needs-investigation

This test does not work on aarch64: https://github.com/rust-lang/rust/blob/c9bd03cb724e13cca96ad320733046cbdb16fbbe/tests/debuginfo/by-value-non-immediate-argument.rs

Stripped down (a bit):
```rust
fn by_val_enum(x: (usize, usize, usize)) {
    zzz(); // #break
}

fn main() {
    by_val_enum((usize::MAX, usize::MAX, usize::MAX));
}

fn zzz() { }
```
Set a breakpoint on line 2 and try to print `x`. gdb says it is optimized out. This can be reproduced even with `-Zmir-opt-level=0`, and doesn't reproduce on x86_64. If the argument is `Option<(usize, usize)>`, gdb will try to read from address 0x0.

I'm not sure if this is a rustc bug or a gdb bug because if I add any use of the non-immediate argument inside the function, we gain some instructions that look like a function prelude, and gdb is able to print the argument. https://godbolt.org/z/GeGxE7ExE
Repository: ant-design
Issue: Descriptions labelStyle incorrectly applied on vertical layouts
Labels: 💡 Feature Request,Inactive

### Reproduction link

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/sandbox/descriptionsbug-ql4fj2)

### Steps to reproduce

Set up a Descriptions sample.
Add the labelStyle prop
Change the layout to vertical, and you will see the labelStyle prop does not put the styles on the correct node, it puts the styles on the span instead of the "ant-descriptions-item-label" class div.

### What is expected?

I expect the labelStyle to be applied to the div with the className "ant-descriptions-item-label".

### What is actually happening?

When in horizontal mode, the labelStyle goes to the className "ant-descriptions-item-label", but when in vertical mode, the labelStyle goes to the child span.

| Environment | Info |
| --- | --- |
| antd | 5.20.0 |
| React | 18.0.0 |
| System | Windows |
| Browser | Firefox v129.0 |

---
I believe the codesandbox I provided should give a clear view of the  problem happening.

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->