WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Let's say we have a component that recieve an array and renders them in a list

var List = React.createClass({
render: function() {
return (
<div>
{
this.props.items.map(function(item){
return <div className="item" key={item.id}>{item.name}</div>;
})
}
</div>
)
}
});

and let's say we passed the following array:

var items = [{id:'1', name: 'one'},{id:'1', name: 'two'}];

since the id is a duplicate, React will render only one item and throws the following warning

Encountered two children with the same key, `1`. Child keys must be unique; when two children share a key, only the first child will be used.
in div (created by List)
in List

Here is a demo for the above https://jsfiddle.net/69z2wepo/55187/

However, when using ReactTestUtils to shallow render the list, it returns 2 items instead of 1.

Below a testcase for demonstration purpose:

describe('<List>', () =>

it('should render the correct number of items', () => {

let items = [{id:'1', name: 'one'},{id:'1', name: 'two'}];
let renderer = ReactTestUtils.createRenderer();
let result= renderer.render(<List items={items} />);

// the following testcase should fail
expect(result.props.children.length).toBe(2)

}))

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

See above

What is the expected behavior?

Shallow Renderer should behave like in the browser, in this case it should return 1 children instead of 2.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

15.0.0

Issue 2:
Do you want to request a feature or report a bug?

Bug - regression

What is the current behavior?

In react 16 when creating a <select size="3"> (size > 1) the first child is automatically getting marked as selected. In React 16 there does not seem to be a way to specify no gets selected by default

https://codesandbox.io/s/m76ozkwm89

What is the expected behavior?

In React 15 unless you marked an option to be selected no options were selected by default.

https://codesandbox.io/s/6894m3k9w

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

Reproducible in Chrome 72 and Firefox 59.

Note: this is almost a duplicate of #12200. In fact, I copied issue text and codesandbox examples, just changing multiple to size="3".
Issue 1:
Summary of the new feature/enhancement

Reduce UI clutter by removing systray icon

Proposed technical implementation details (optional)

Add an option to hide the tray icon.

Settings could be accessed by running the app from the Start menu, in place of right-clicking the tray icon.

Why? For me, the usage of this app is a passive enhancement to Windows' default behaviour. I set up the FancyZones one time, and that's it, I never need to interact with the app settings again, it starts automatically, and I need not exit it.... And yet, I now need to have an icon permanently residing in my systray, providing two functions I would never need.

Issue 2:
I would love to see an option to hide the tray icon.
Issue 1:
System info

Playwright Version: [v1.32.2] (also observed on 1.31)

Operating System: [Official Playwright Docker container] (also on my dev machine running Linux EndeavourOS)

Browser: [All]

Source code

I provided exact source code that allows reproducing the issue locally.

Config file

// playwright.config.ts
import { defineConfig, devices } from "@playwright/test";

export default defineConfig({
testDir: "./tests",
fullyParallel: true,
retries: 1,
workers: undefined,
reporter: "html",
use: {
trace: "retain-on-failure",
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
{
name: "firefox",
use: {
...devices["Desktop Firefox"],
},
},
],
});

Test file (self-contained)

import { test, expect } from "@playwright/test";

test("do not pass", async ({ page }) => {
await expect(async () => {
await page.waitForTimeout(100);
expect(1).toBeGreaterThan(2);
}).toPass({ timeout: 0 });
});

Steps

Run the test

See the test pass or be flaky. (If it happens to actually fail rerun it once or twice.)

Expected

The test always fails with a test timeout.

Actual

The test passes about 50% of the times, most often on the retry. The report then looks like this

Issue 2:
System info

Playwright Version: 1.34.3

Operating System: MacOS

Browser: Firefox

Other info:

Source code

N/A

Steps

Install Playwright/test

Look for downloaded FF version in ~/Library/Caches/ms-playwright/

Expected

Stable version of Firefox downloaded.

Actual

Nightly version of Firefox downloaded. This is at odds w/ the official docs:

Playwright's Firefox version matches the recent Firefox Stable build.
Issue 1:
Zero Install is a robust cross-platform package manager. It will be able to handle external dependencies on native libraries well and there are already many packages available.

It has support for dependency handling, package signing, tooling for maintaining repositories, coexisting package versions, and even graphical tools. It also has optional integration with the system package manager via PackageKit to avoid duplication where possible. I don't think we should try to rebuild this ourselves.

Issue 2:
In Nightly c894171 2015-01-02, it is apparently not possible to use methods from collections::slice::SliceExt such as to_vec in a scope where use core::prelude::*; (very useful in #![no_std] crates) is also used.

Imports can not shadow each other, a name conflict is fatal:

#![no_std]
#![feature(globs)]

extern crate core;
extern crate collections;

use core::prelude::*;
use collections::slice::SliceExt;

fn foo() {
['a', 'b'].slice_to(1).to_vec()
}

a.rs:8:5: 8:33 error: a type named `SliceExt` has already been imported in this module
a.rs:8 use collections::slice::SliceExt;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error

Renaming the trait at import doesn’t help, core methods are now duplicated in the scope:

#![no_std]
#![feature(globs)]

extern crate core;
extern crate collections;

use core::prelude::*;
use collections::slice::SliceExt as CollectionsSliceExt;

fn foo() {
['a', 'b'].slice_to(1).to_vec()
}

a.rs:11:16: 11:27 error: multiple applicable methods in scope [E0034]
a.rs:11 ['a', 'b'].slice_to(1).to_vec()
^~~~~~~~~~~
a.rs:11:16: 11:27 note: candidate #1 is defined in an impl of the trait `core::slice::SliceExt` for the type `[_]`
a.rs:11 ['a', 'b'].slice_to(1).to_vec()
^~~~~~~~~~~
a.rs:11:16: 11:27 note: candidate #2 is defined in an impl of the trait `collections::slice::SliceExt` for the type `[_]`
a.rs:11 ['a', 'b'].slice_to(1).to_vec()
^~~~~~~~~~~
error: aborting due to previous error

As a work around when upgrading rust-wtf8, I moved use collections::slice::SliceExt; into the block that uses to_vec but does not use other slice methods.
Issue 1:
Migrated issue, originally created by Anonymous

I couldn't figure which version of SQLAlchemy was installed on a machine. It would be really useful if you could do this:

import sqlalchemy
print sqlalchemy.VERSION

Issue 2:
Migrated issue, originally created by Anonymous

it is useful to have some way to distinguish between diff. versions/builds/revisions - e.g. the svn's Rev, and maybe some version=...

e.g. sqlalichemy/init.py:

revision = "$Rev$"

version = '0.3.3'
Issue 1:
Description of the feature

Object space is the local 3D space of the object. Up is always up and left is always left. It is a uniform space that you understand really well because that is what the world is really like. Tangent space, on the other hand, is best thought of as surface space. In tangent space, up is always away from the surface (in other words, along the normal).

Apparently, Three.js only supports tangent space for normal space textures, so it will be very fun to supports object space too.

Issue 2:
I have been working with the draggable cubes example, and while it works well as a starting point, I need a couple of additional feature that I am planning to implement, but I wanted to make sure I wasn't duplicating effort first.

Basically, I want to break out an ObjectDragControl (or whatever title makes sense) that allows one to pass in a set of objects that can be dragged, and a 3D plane upon which their relative movement will be locked. This control could be attached easily to any container and it would take care of setting up the mouse events, handle the raycasting, etc.

The draggable cubes example has some oddities, such as the fact that the reference plane is always "jumping up" to the height of the object, for reasons that are still not exactly clear to me, but if you turn that off, it stops working. I think there is an issue in that it is using Plane geometry as the plane to test, rather than doing it purely mathematically with a Plane defined by an equation, checking for the point of intersection for the ray drawn from the mouse position, and then updating the object position to move to that intersection point. So in essence, I would be adding the following:

ObjectDragControl - allows dragging capabilities to be added to any container.

Plane3D - A purely geometric plane, which can be defined with non-collinear points, or a point and a normal. It would have methods to determine where a Ray intersects it, and possibly some other utility functions.

Does that overlap with anything that currently exists? I saw the work on DragPanControls, but I think that is more to manipulate a single object rather than move an object within a scene, so I think this is fundamentally different. Questions about dragging objects seem to come up a lot in the Issue queue, so I figure this is something that would be valuable to the project as a whole.
Issue 1:
adding the col-lg-offset-2 or any other number doesn't work. upon searching i can't find any such class in the bootstrap.css file.

Issue 2:
To increase/decrease the size of form controls, you can add the classes input-lg or input-sm (at least according to the website [http://getbootstrap.com/css/#forms] - which is the most consistent solution). In the css code, however, the classes are called input-large and input-small.
Issue 1:
The following code fails to parse:

import {a} from 'B';

export let OBJ = {
*[Symbol.iterator]() {},
};

export class CLASS {
*[Symbol.iterator]() {}
}

The error is: "repl: undefined does not match type Pattern".

Removing the import fixes it. Removing any of the two Symbol.iterator mentions fixes it. Replacing ONE of the two Symbol.iterator by a get [Symbol.iterator]() { return function* () { ... }; } fixes it. Removing the export on OBJ fixes it. Replacing OBJ by its own class fixes it.

This is the smallest example that I could reduce our code to.

Issue 2:
import foo from 'bar';
(function* () {});

Compiling this raises AssertionError: test.js: undefined does not match type Pattern
Issue 1:
In the net/mail package, Address is used to generate a valid RFC 5322 address. ParseAddress is used to parse a single RFC 5322 address.

There is currently a bug if the address name contains parentheses.

The following code fails to run:

package main

import "fmt"
import "net/mail"

func main() {

tests := []*mail.Address{
{Name: "Robert Müller", Address: "bob@example.com"},
{Name: "Robert (Bob) Müller", Address: "bob@example.com"},
}

for i, in := range tests {
fmt.Printf("\nTest %d\n", i)

// straight encoding, will use q-encoding if needed
fmt.Printf("In: %s\n", in)

// decode the q-encoding
out, err := mail.ParseAddress(in.String())
if err != nil {
// oops! cannot parse our own address?
panic(err)
}

// should match our earlier q-encoding
fmt.Printf("Out: %s\n", out)
}
}

Expected output:

Test 0
In: =?utf-8?q?Robert_M=C3=BCller?= <bob@example.com>
Out: =?utf-8?q?Robert_M=C3=BCller?= <bob@example.com>

Test 1
In: =?utf-8?q?Robert_(Bob)_M=C3=BCller?= <bob@example.com>
Out: =?utf-8?q?Robert_(Bob)_M=C3=BCller?= <bob@example.com>

Actual output:

Test 0
In: =?utf-8?q?Robert_M=C3=BCller?= <bob@example.com>
Out: =?utf-8?q?Robert_M=C3=BCller?= <bob@example.com>

Test 1
In: =?utf-8?q?Robert_(Bob)_M=C3=BCller?= <bob@example.com>
panic: mail: no angle-addr

goroutine 1 [running]:
main.main()

See it in action here.

These functions should be symmetric if I correctly understand the documentation.

Issue 2:
The following program fails the panic:

package main

import (
"fmt"
"net/mail"
)

func main() {
data := "\"\\\x1f,\"<0@0>"
addr, err := mail.ParseAddress(data)
if err != nil {
return
}
_, err = mail.ParseAddress(addr.String())
if err != nil {
fmt.Printf("failed to parse addr: %q -> %q\n", data, addr)
panic(err)
}
}

failed to parse addr: "\"\\\x1f,\"<0@0>" -> "=?utf-8?q?=1F,?= <0@0>"
panic: mail: no angle-addr

ParseAddress must handle result of Address.String, or else first ParseAddress must fail.

go version devel +514014c Thu Jun 18 15:54:35 2015 +0200 linux/amd64
Issue 1:
In Sagemath we encounter in our ticket #22799

RuntimeWarning: invalid value encountered in multiply

while multiplying a numpy.float32 number with a non-numpy data; i.e. numpy ought to fail to do this multiplication silently, and indeed it does if one builds with gcc, or if instead of np.float32 it is np.float or np.float128.

More precisely, one gets the warning from the Python call

type(numpy.float32('1.5')).__mul__(numpy.float32('1.5'), x)

where x is a Sagemath univariate polynomial with coefficients in Sagemath's RealField type. (and only this particular type of data triggers this).

That is, potentially, such meaningless warnings can be emitted outside of Sagemath; we can reproduce it on OSX 11.12 with its stock cc (some derivative of clang 3.8), as well as on Linux with clang 4.0 and on FreeBSD 11.0 with clang 4.0 or clang 3.7.

Potentially we should be able to produce a way to reproduce this outside of Sagemath, although we'd need some tips where in numpy code this __mul__ is actually implemented, to see what functions are applied to x...

We see this on numpy 1.11 and on 1.12, too.

Issue 2:
numpy 1.13.1 dump fails to close the file that it opens (as a unit test in our code reported). The code appears to be as follows, which is clearly not closing the file it might open:

def dump(a, F):
if not hasattr(F, 'readline'):
F = open(F, 'w')
return pickle.dump(a, F)
Issue 1:
ℹ Windows 10, version 2004, build 19041.450

PowerToys version: 0.21.1

PowerToy Utility: PowerToys Run

Running PowerToys as Admin: YES

📝 Provide detailed reproduction steps (if any)

Load VMware Workstation, version 15.5.6

Make sure VMware Workstation has focus, but overall focus is still in the host OS, so Alt-Tab moves you into and out of VMware Workstation

Press Alt-Space, top right hand corner menu opens instead of PT Run window.

This is the same "problem" I used to have with regedit.exe, but it is supposed to be fixed for regedit.exe by running PowerToys as Admin. Running as Admin makes no difference to VMware Workstation behaviour.

I am still seeing this problem with regedit.exe. PowerToys settings page says that PT IS running as administrator, and "always run as administrator" is turned On, but PT Run still doesn't appear when regedit.exe has focus.

For VMware Workstation there is a general problem with programs that set global shortcuts, some programs shortcuts simply don't work when VMware Workstation is the active window, while other programs shortcuts do work. No obvious pattern at work. May well explain other general bug reports about VMware Workstation and PowerToys as well.

Issue 2:
PowerToys version: v0.21.1

PowerToy Utility: PT Run

Running PowerToys as Admin: Yes, always

Windows build number: 19042.487

PT Run, when invoked with keyboard shortcut, sometimes is not in focus, even when using only arrow keys and enter key to navigate and launch results. This sometimes is a bit irritating.
Issue 1:
Description of the new feature/enhancement

It would be great if you could implement the "Open PowerShell window here" ability and have it open a new tab in the Windows Terminal CD'd into the specified directory. Would save a bunch of time.

Issue 2:
Add "open Windows terminal here" to right-click context menu?

We know that, for windows 7, by default when we click "shift + right click with mouse" when we enter into a folder without selecting anything, we can see the option "open command window here".

While for windows 10, by default when we click "shift + right click with mouse", we can see the option "open powershell window here".

So for Windows 10 (version later than 1903), how can we make the following three options available in right-click context menu?

open command window here

open powershell window here

open Windows terminal here

Looking forward to your reply, thanks a lot~
Issue 1:
Is there an existing issue for this?

I have searched the existing issues

This is a CLI Docs Problem, not another kind of Docs Problem.

This is a CLI Docs Problem.

Description of Problem

There are duplicate #description. As the result, the ToC to description field does not work.

Table of contents

Description

name

version

description // Does not work

Potential Solution

No response

Affected URL

https://docs.npmjs.com/cli/v9/configuring-npm/package-json

Issue 2:
Is there an existing issue for this?

I have searched the existing issues

Current Behavior

When installing a scoped modules using a private registry that returns resolved URLs that point at the public registry, npm 7 rewrites the resolved url to point at the private registry.

For example:

npm i --registry=http://localhost:8080 --cache=empty @babel/helper-validator-identifier

results in

npm ERR! code E404
npm ERR! 404 Not Found - GET http://localhost:8080/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz

Despite the fact that:

npm v --registry=http://localhost:8080 --cache=empty @babel/helper-validator-identifier dist.tarball

shows

https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz

This happens with and without lockfiles but only happens with scoped modules and an empty cache (as having the content hash in the cache means that network requests are skipped).

Expected Behavior

I would expect npm to not rewrite resolved urls.

If it were to rewrite resolved urls is intended, I would expect it the same for scoped and unscoped packages. (But I would much prefer that it didn't.)

Steps To Reproduce

git clone https://github.com/iarna/repro-resolved-rewrite

cd repro-resolved-rewrite

npm it

Environment

Tested on:

OS: Debian

node: 16.4.2

npm: 7.18.1, 7.19.1
Issue 1:
I believe we need better standards for documenting optional arguments. In the manual I sometimes see it as

foo(arg [,optional_arg])

So maybe we need to have that for all optional arguments in the help docs, instead of the often ambiguous

foo(arg, [optional_arg])

That latter maybe confused for an array.

Issue 2:
The Julia manual often uses the syntax foo(a [, b]) to denote optional arguments. Now that Julia has its own optional-argument syntax, wouldn't it be better to use this in the documentation, i.e. write foo(a, b=c; kw=foo)?
Issue 1:
Noncontinuous cv::Mat is created when the matrix needed memory is bigger than 3 GB (while create or clone the mat), although in the create() function doc, its says 'Matrices created with Mat::create() are always continuous'.

opencv/modules/core/src/matrix.cpp

Line 318
in
e959f44

void Mat::create(int d, const int* _sizes, int _type)

Issue 2:
System information (version)

OpenCV => 3.4.2

Operating System / Platform => Ubuntu 18.04

Compiler => gcc 8

Detailed description

Hi, I have the following in OpenCV 3.4.2

cv::Mat3b a(cv::Size(30511, 26060));
cout << a.isContinuous() << endl;
cv::Mat3b b = a.clone();
cout << b.isContinuous() << endl;

and the result is 0 (false) in both cases, which I think is not correct. At least for cv::Mat3b b the docs say "The original step[] is not taken into account. So, the array copy is a continuous array occupying total()*elemSize() bytes.".
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

when provide a prop with onClick in MenuItem like:

this.handleDialogControl('open', 'dialogPartManage')

a exec funtion, should throw Error

Current Behavior

when I use this to open dialog, and forget to set it as a arrow-function, like

() => this.handleDialogControl('open', 'dialogPartManage')

It will cause a crash that this page will keep loading.

Steps to Reproduce (for bugs)

create a dialog

open it with a MenuItem's onClick prop, with some

code like:

// handle method
handleDialogControl = (method, boxName) => {
const list = [...this.state.openList];

if (method === 'close') {
const openList = removeFromOpenList(list, boxName, this.enum);
return this.setState({ openList });
}

if (method === 'open') {
list.push(boxName);
return this.setState({ openList: list });
}

return new Error('UserError: params invalid');
}
// use with onClick
<MenuItem onClick={this.handleDialogControl('open', 'dialogAddLink')}>

then open it in your browser

unexpected keep loading.

Context

the Error is difficult to find,(also meet) I should provide some suggest, for this case.

Your Environment

Tech
Version

Material-UI
^1.0.0-beta.16

React
^16.0.0

browser
chrome at 61.0.3163.100

etc

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I am trying to use the third AppBar demo on the material-ui-next component demos. Upon insert into my site, it should not error out, as this is a component demo

Current Behavior

Errors occur in multiple locations - mainly lacking a default for import React from 'react'; on the first line, which needs to be changed to import * as React from 'react';. Additionally, on line 33 among others, the following error occurs: (33,21): Parameter 'event' implicitly has an 'any' type.

Steps to Reproduce

Download create-react-apps-with-typescript demo from the repo

npm install

Copy the code from the third AppBar demo into components/appbar.tsx

Add <AppBar> component to pages/index.tsx

yarn start

Context

This issue is entirely blocking, as I am unable to begin development on my own sites if the components I should learn from do not work themselves.

Your Environment

Tech
Version

Material-UI
beta 33

React
latest

browser
Chrome

OS
MacOS High Sierra