sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: VideoCapture frame always returns True, when using an external trigger.
Labels: bug,category: videoio(camera),platform: arm

### System Information

OpenCV version: 4.9.0 (Compiled from source)
Python version: 3.8.10
Ubuntu version: 20.04
NVIDIA Jetson Xavier NX Developer Kit - Based System (Jetpack: 5.1, L4T: 35.2.1)

### Detailed description

I am capturing images on a Jetson based device using an external trigger, but whenever i use cv2.read() or cv2.grab() it always returns True, at most after 2 seconds, even if it didn't capture any frame. I undestrand that there is a timeout in the capture function, but the problem here is that it always returns True and returns a frame, even if it didn't capture any new frame (that is, there was no trigger).

### Steps to reproduce

```
import cv2
from v4l2py.device import Device

WIDTH = 1920 # 1920 (max) / 1920 / 1280 / 640 /320
HEIGHT = 1200 # 1200 (max) / 1080 / 720 / 480 / 240
FPS = 60
CAM = 0

fourcc = cv2.VideoWriter_fourcc('M','J','P','G')
cap = cv2.VideoCapture(CAM, cv2.CAP_V4L2)
cap.set(cv2.CAP_PROP_FOURCC, fourcc)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, WIDTH) 
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, HEIGHT) 

cam = Device.from_id(CAM)
cam.open()
cam.controls.external_trigger.value = True

if not cap.isOpened():
    print("Cannot open camera")
    exit()

cv2.namedWindow(f"frame{CAM}", cv2.WINDOW_NORMAL)
while True:
    ret = cap.grab()
    if not ret:
        print("Can't receive frame (stream end?). Exiting ...")
        continue

    ret, frame = cap.retrieve()
    if not ret:
        print("Can't retrieve frame (stream end?). Exiting ...")
        continue

    cv2.imshow(f"frame{CAM}", frame)
        
    if cv2.waitKey(1) == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()
```

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [ ] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: stable-diffusion-webui
Issue: [Feature Request]: Manually load/unload checkpoints into GPU
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 to achieve the following either programmatically or via API:
- List of all checkpoints and their status (loaded or unloaded)
- Load a checkpoint
- Unload a checkpoint

### Proposed workflow

1. Retrieve the available checkpoints and their status via HTTP request e.g. http://0.0.0.0:7860/sdapi/v1/checkpoint-status
2. Load a specified checkpoint via HTTP request e.g http://0.0.0.0:7860/sdapi/v1/load-checkpoint?checkpointid=abc123
3. Unload a specified checkpoint via HTTP request e.g http://0.0.0.0:7860/sdapi/v1/unload-checkpoint?checkpointid=abc123
The checkpoint parameter passed in 2 and 3 should be obtained from 1. For example, the object returned in 1 could contain a "uniqueid" key.

### Additional information

I've made a fork but it only loads and unloads the currently selected checkpoint. The relevant endpoints are unloadmodel, loadmodel and get_model_status in api.py. 
https://github.com/AnthoneoJ/stable-diffusion-webui
Repository: TypeScript
Issue: Nested Promise not automatically unwrapped
Labels: Needs Investigation

### 🔎 Search Terms

return type promise union 

### 🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about Promise


### ⏯ Playground Link

https://www.typescriptlang.org/play/?#code/C4TwDgpgBAyg9gWwgOTgE2gXigZ2AJwEsA7AcygB8oAFfRQnCAHjyLID4BYAKB4EMcIYgGMoAMwCuI4ITjEo+CMQz4AwgAtCAGzQAKAJQAuGnQQNm8JKgzsoAbx5QnCiMAn55teowB0inHBaAG4QugBEwBB4Yfo8AL48PJLSsvKKyhD4AIJgYLrCmjrpxpYo6BD69oncCbzcAPT1sOpwEjpQoJAFEMIA1lAARhLAUJl0+DiGPI1OACrg0ADkXmaMLAQkpOyLUAxQxHAjAjiEpMR8A1rQwHAdC1CLrJuLProATADMACwArLHc6RUOTygMyGm0en0-xmzlhAD0APw8IA

### 💻 Code

```ts
type SomeNode = string | Promise<string>

async function renderChild(): Promise<SomeNode> {
    return Promise.resolve("test")
}

function renderApp(children: SomeNode) {

}

// Should typecheck but errors:
//  Type 'Promise<string>' is not assignable to type 'string'.(2345)
renderApp(renderChild())
//        ^?
```


### 🙁 Actual behavior

```bash
Argument of type 'Promise<SomeNode>' is not assignable to parameter of type 'SomeNode'.
  Type 'Promise<SomeNode>' is not assignable to type 'Promise<string>'.
    Type 'SomeNode' is not assignable to type 'string'.
      Type 'Promise<string>' is not assignable to type 'string'.(2345)
input.tsx(13, 11): Did you forget to use 'await'?
```

### 🙂 Expected behavior

No typechecking error

### Additional information about the issue

Nodes in React are typed as `type Node = AwaitedNodes | Promise<AwaitedNodes>`. However, the return type of async Components is `Promise<Node>`. But TypeScript will not consider this a Component because `Promise<Node>` is not assignable to `Node` even though it should be since at runtime `Promise<Promise<T>>` will never be observable and always collapse to `Promise<T>`. 

Users can either fix this by using an unwieldy `Promise<Awaited<ReactNode>>`.

We can also fix this at the type level by allowing `Node | Promise<Node>` as the return type. Though I suspect this just pushes the issue one Promise-wrapping level away when TypeScript could collapse wrapped Promises automatically.

Original issue: https://github.com/vercel/next.js/discussions/67365
Repository: node
Issue: Documentation (Diagram) for C++ internals
Labels: c++,doc

I am trying to contribute with C++ internals. 
I am reading  C++ internals documentation, it is great but I would like to know if there is a diagram for it?
I think that will be good to have one graphic doc. In case that match with me. What is required to create it?
Repository: vscode
Issue: Editor: Wrapping Indent config support `only first line` indent
Labels: feature-request,editor-wrapping

<!-- ⚠️⚠️ 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. -->
When I use `Editor: Word Wrap` set on,and add `space` on first line,not only the first line will be indented, but other folding lines will also be indented. This is good for code display, but sometimes when writing documents, you only want spaces to take effect on the first line, and other lines will still start from scratch. However, this option is not available in the configuration, so we hope to add an implementation 

![image](https://github.com/microsoft/vscode/assets/9607121/43be9149-2784-472c-8623-0cdd3e4b3e86)
![image](https://github.com/microsoft/vscode/assets/9607121/dbe7438f-f540-46d1-88e7-a5f408be2aee)
Repository: go
Issue: proposal: math: fixed decimal types
Labels: Proposal

### Proposal Details

I propose reconsidering the inclusion of fixed decimal types as a standard language feature.

This has been extensively discussed in these two issues:

- [Issue #12127](https://github.com/golang/go/issues/12127)
- [Issue #26699](https://github.com/golang/go/issues/26699)

### Motivation
Currently, fixed decimal types are supported by several third-party packages, including the popular shopspring/decimal. However, a recent [PR](https://github.com/shopspring/decimal/issues/324) suggests that the long-term maintenance of this library is uncertain. This situation forces the community to constantly adapt to the latest maintained fork, which is a long-term burden on the ecosystem.

Decimal libraries are also crucial in various core areas, such as database drivers, validation, and testing libraries. Standardization of a fixed decimal type would ensure that:

- Database drivers can reliably unmarshal to a standardized type.
- go-playground/validator can natively validate decimal types.
- stretchr/testify can natively support decimal types.
- Passing data between libraries using different decimal implementations would no longer require conversion.

For these reasons I think it is a worth another look at one of the above proposals or a suitable alternative that supports standards and furthers interoperability.
Repository: pytorch
Issue: Support wrapper tensor subclasses with inner pytrees of tensors
Labels: triaged,tensor subclass,oncall: pt2,module: pt2-dispatcher

Today, if you author a torch_dispatch wrapper tensor subclass that you want to work with compile, we require every inner tensor on the wrapper to have a unique attribute name, so we can guard on each attribute individually.

This isn't a fundamental requirement, and one thing we could do is lift the restriction a bit so every attribute name returned by `__tensor_flatten__` (and then passed into `__tensor_unflatten__`) can potentially be a pytree of tensors.

Leaving this issue as a placeholder in case somebody asks for it.

The main think we're going to have to do is:
* update all of our usages of __tensor_flatten__ in the compile stack to handle pytrees of tensors
* update dynamo's guard logic to do the same

cc @ezyang @albanD @anijain2305 @chauhang @penguinwu @zou3519
Repository: ant-design
Issue: Table 组件开启虚拟列表后，如果cell的渲染有long task或页面卡顿的情况下拖拽滚动条，chrome会把元素渲染为空白内容
Labels: 🐛 Bug,Inactive

### Reproduction link

[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/edit/react-jwpsd1?file=demo.tsx)

### Steps to reproduce
1. 来回拖拽滚动条（容易触发），看到有白色后就停止拖拽。有时慢慢滚动也会触发
2. 此时dom和css都正常，但是Chrome没渲染出来，或者渲染残缺（丢了内部文子、丢了背景色、丢了边框等等）
![m5sjZVBUw4](https://github.com/ant-design/ant-design/assets/24486385/4395a073-7a21-41fb-ac9f-a2fc91329960)
![20240702215100_rec_](https://github.com/ant-design/ant-design/assets/24486385/1c67faee-544d-49b1-a1a7-57d83c437584)
![20240702215349_rec_](https://github.com/ant-design/ant-design/assets/24486385/45ef57f3-8cb8-48d0-bf6d-9f296a390960)


### What is expected?

渲染正常

### What is actually happening?

cell单元格空白，渲染残缺

| Environment | Info |
| --- | --- |
| antd | 5.19.0 |
| React | 18.3 |
| System | mac |
| Browser | chrome |

---
感觉是卡顿，加上虚拟列表对dom的修改频率太快，Chrome的渲染没反应过来，认为渲染完成了但实际上没有。Safari下不会有这个问题

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: TypeScript
Issue: Fix "isolatedDeclarations" QuickFix
Labels: Bug

### 🔎 Search Terms

isolatedDeclarations quickfix TS9023

### 🕗 Version & Regression Information

This is an error in the new QuickFix in TS 5.5 to enable isolatedDeclarations.

### ⏯ Playground Link

_No response_

### 💻 Code

When activating isolatedDeclarations this code does not compile. 

```TS
export function ImportExcelProgressModal(): React.JSX.Element {
  return <div></div>;
}

 //Error (active)	TS9023	Build:Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function.
ImportExcelProgressModal.show = (): Promise<boolean> => { 	
  return openModal(<ImportExcelProgressModal/>);
};

```


### 🙁 Actual behavior

After executing the quick fix it produces code with two errors: 

```TS
export function ImportExcelProgressModal(): React.JSX.Element {
  return <div></div>;
}

export declare namespace ImportExcelProgressModal {
    //Error (active)	TS2300	(TS) Duplicate identifier 'show'.	
    export var show: () => Promise<bool>;
}


//Error (active)	TS2300	(TS) Duplicate identifier 'show'.	
ImportExcelProgressModal.show = (): Promise<boolean> => { 	
  return openModal(<ImportExcelProgressModal/>);
};
```

### 🙂 Expected behavior

but this (sorter) code would work: 

```TS
export function ImportExcelProgressModal(): React.JSX.Element {
 return <div></div>;
}

export namespace ImportExcelProgressModal {
  export let show  = (): Promise<boolean> => {
      return openModal(<ImportExcelProgressModal/>);
  };
}
```

If `ImportExcelProgressModal` would have been exported as `default` then this would be the solution: 

```TS
function ImportExcelProgressModal(): React.JSX.Element {
  return <div></div>;
}

namespace ImportExcelProgressModal {
  export let show  = (): Promise<boolean> => {
       return openModal(<ImportExcelProgressModal/>);
  };
}

export default ImportExcelProgressModal;
```


### Additional information about the issue

_No response_
Repository: opencv
Issue: ChAruco regression on tough perspective
Labels: bug,category: calib3d,category: objdetect

### System Information

openCV python version: 4.8.0.74 - 4.10.0.84
Operating System: Windows 10 (also on Linux Manjaro)
Python version: 3.12.4



### Detailed description

A test code which had worked so far (up to OpenCV 4.7.0.72) fails on OpenCV 4.8 and up (up to and including 4.10).

detector = CharucoDetector(board, params)
corners, ids, _, _ = detector.detectBoard(img)

Fails for sufficiently extreme perspective warp and returns None for both corners and ids instead of lists containing them even though it returns those corners and ids with OpenCV 4.7 (correctly).

### Steps to reproduce

```python
def test_not_working():
    img_size = (6560, 4160)
    cam_mtx = np.array([
        [300, 0, img_size[0] / 2],
        [0, 300, img_size[1] / 2],
        [0, 0, 1]], dtype=float)
    dist_coeffs = np.array([[-5.7e-7, 1.7e-8, -2e-7, -3.8e-7, -1.4e-10]])
    board_shape = (17, 11)
    board = cv2.aruco.CharucoBoard(
        board_shape, 8, 4,
        cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_5X5_100)
    )
    b_old = board.generateImage(img_size)
    b_old = np.dstack([b_old]*3)  # make and R,G,B image.
    board_w, board_h = 136, 88
    old_pts = np.array([
        [-board_w, -board_h],
        [board_w, -board_h],
        [-board_w, board_h],
        [board_w, board_h]
    ])
    new_pts = np.array([
        old_pts[0] - np.array([2, 2]),
        old_pts[1] - np.array([0, 1]),
        old_pts[2] + np.array([3, -0.4]),
        old_pts[3]
    ])
    h, _ = cv2.findHomography(new_pts, old_pts)
    b_new = cv2.warpPerspective(b_old, h, b_old.shape[::-1][1:])
    params = cv2.aruco.CharucoParameters()
    params.cameraMatrix = cam_mtx
    params.distCoeffs = dist_coeffs
    params.tryRefineMarkers = True
    d = cv2.aruco.CharucoDetector(board, params)
    corners, ids, _, _ = d.detectBoard(b_new)
    assert corners is not None
    assert ids is not None
    assert len(corners) > 4
    assert len(corners) == len(ids)
```

### 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: transformers
Issue: Suport sdpa for RoBERTa and XLM-RoBERTa models
Labels: Feature request

### Feature request

Enable sdpa for RoBERTa and XLM-RoBERTa models

### Motivation

While BERT, which is similar to RoBERTa and XLM-RoBERTa, support sdpa, RoBERTa and XLM-RoBERTa do not support sdpa yet. This enablement is straight-forward.

Our applications need latency reduction by sdpa. The performance advantage in BERT is already shown at #28802.

### Your contribution

I will submit a PR.
Repository: ui
Issue: [bug]: Why does my project report dependency errors when it comes to manual or scaffold installation
Labels: bug

### Describe the bug

I used cli format or manually installed dependencies in the old project of next12, and the project always reported errors. \ nodeModules \ @ radio ui \ react batch \ dist \ index.mjs
Did you mean to import "react/jsx-runtime.js"?

### Affected component/components

I used cli format or manually installed dependencies in the old project of next12, and the project always reported errors. \ nodeModules \ @ radio ui \ react batch \ dist \ index.mjs Did you mean to import "react/jsx-runtime.js"?

### How to reproduce

1、This is an old project from next12, with a directory format of pages under src
2、Whether installed through CLI or manually, errors will be reported

### Codesandbox/StackBlitz link

_No response_

### Logs

```bash
node_modules\@radix-ui\react-slot\dist\index.mjs
Did you mean to import "react/jsx-runtime.js"?
    at finalizeResolution (node:internal/modules/esm/resolve:265:11)
    at moduleResolve (node:internal/modules/esm/resolve:933:10)
    at defaultResolve (node:internal/modules/esm/resolve:1157:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:390:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:359:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
    at link (node:internal/modules/esm/module_job:86:36)
```


### System Info

```bash
谷歌浏览器
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: pytorch
Issue: run dynamo CI shard with aot_eager_decomp_partition backend to see fallout
Labels: triaged,oncall: pt2,module: aotdispatch,module: pt2-dispatcher

We currently have a dedicated CI shard that runs all eager tests under dynamo, which has been an excellent way to understand our dynamo success rate across all of the eager tests we have.

We should do the same for the aot_eager_decomp_partition backend, to get similar numbers for AOTAutograd that will help surface bugs that we can prioritize. I started trying to do this here but haven't had time to pull numbers from CI, so filing this issue for tracking (for me or someone else from pt2-dispatcher) to take on: https://github.com/pytorch/pytorch/pull/119032

cc @ezyang @anijain2305 @chauhang @penguinwu @zou3519
Repository: react-native
Issue: Touchable focus events not triggering with keyboard (needed for accessibility)
Labels: Issue: Author Provided Repro,API: Keyboard

### Description

I am trying to add custom focus styles if a pressable is focused to make the keyboard focus visible  in any case (dark/light mode, different background colors etc).

It seems like `TouchableOpacity` and `TouchableHightlight` both get forwarded from `TouchableWithoutFeedback`, which has the `onFocus` and `onBlur` events. I was trying to hold a focus state with these events to render styles dynamically. However, they do not get triggered at all, even if I use `TouchableWithoutFeedback`, which leads me to think that's the culprit.

Accessibility requires visibility of focus states. Is there another way to retrieve focus states?



### Steps to reproduce

Here's a little example:

```tsx
const [isFocused, setIsFocused] = useState(false);

return (
  // same with `TouchableWithoutFeedback` and `TouchableOpacity`
  <TouchableHighlight
    onFocus={() => setIsFocused(true)}
    onBlur={() => setIsFocused(false)}
    style={{
      backgroundColor: isFocused?"gray":"transparent",
    }}
  >
    ...
  </TouchableHighlight>
);
```

### React Native Version

0.74.3

### Affected Platforms

Runtime - Android

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

```text
System:
  OS: macOS 14.5
  CPU: (12) arm64 Apple M2 Pro
  Memory: 109.05 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.13.1
    path: ~/Library/Caches/fnm_multishells/94190_1719818822541/bin/node
  Yarn: Not Found
  npm:
    version: 10.5.2
    path: ~/Library/Caches/fnm_multishells/94190_1719818822541/bin/npm
  Watchman:
    version: 2024.06.10.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/d.timur/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.5
      - iOS 17.5
      - macOS 14.5
      - tvOS 17.5
      - visionOS 1.2
      - watchOS 10.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10300.40.2321.11668458
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.11
    path: /opt/homebrew/opt/openjdk@17/bin/javac
  Ruby:
    version: 2.7.6
    path: /Users/d.timur/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.2
    wanted: 0.74.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false
```


### Stacktrace or Logs

```text
-
```


### Reproducer

https://github.com/proohit/focus-example

### Screenshots and Videos

_No response_
Repository: deno
Issue: Deno loading .node files with incorrect architecture when using NPM oracledb package
Labels: bug,node native extension

Version: Deno 1.44.4

Copied from https://discord.com/channels/684898665143206084/1257181475418144899

M1 Mac, arm64 processor, terminal set to i386 mode with "env /usr/bin/arch -x86_64 /bin/zsh --login"

When using the NPM oracledb package v6.5.1, when initializing the Oracle "Thick Client" mode with a call to `oracledb.initOracleClient({libDir: '/path/to/instantclient' });`, deno is trying load the oracledb ".node" files with a different architecture than my terminal. My terminal is set to i386 mode but deno appears to be trying to load the arm64 node files.

Expected behavior: Deno should respect the architecture of the terminal when loading .node files from oracledb NPM package.

I have not tried reinstalling deno since I switched terminal architecture, so perhaps this could be resolved by reinstalling deno? Will try that next.

![Screenshot 2024-06-30 at 11 49 14 PM](https://github.com/denoland/deno/assets/2126464/12fa3aa8-9ba7-4d64-abcf-018ac0398c44)
![Screenshot 2024-06-30 at 11 50 49 PM](https://github.com/denoland/deno/assets/2126464/5115a25c-5c63-45d9-85a2-14c69b429d88)