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?

In a component tree where legacy context and new context are co-exisiting, when components are placed on tree nodes under the legacy context provider and between new context provider and consumer, components are always rendered even if shouldComponentUpdate() returns false in a parent component.

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

https://jsfiddle.net/fdrgz9c4/15/

The above is the minimal case I've created without other dependencies, but first I found this behaviour in my Redux application, which uses legacy style context to map the state in store.

What is the expected behavior?

Should not call render() when shouldComponentUpdate() returns false in parent components, as same as the other cases (it prevents rendering when it is located without legacy context or not between new context provider / consumer tree. See the above fiddle)

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

React 16.5.2, maybe in older versions.

No OS/browser dependencies I believe.

Issue 2:
This issue is going to start off mostly theoretical as I’m still working to make a minimal repro case.

We have a scenario where one component is having shouldComponentUpdate() return false to bail out, but a child component is still having its render method called.

Avoiding many details this is roughly what we have:

import React, { Component } from 'react';

class A extends Component {
shouldComponentUpdate(nextProps) {
const result = Boolean(nextProps.item);
console.log('A#shouldComponentUpdate?', result);
return result;
}

render() {
console.log('A#render', this.props.item);
return <B item={this.props.item} />;
}
}

class B extends Component {
state = { seconds: 0 };
componentDidMount() {
this._interval = setInterval(
() => this.setState({ seconds: this.state.seconds + 1 }),
1000
);
}

componentWillUnMount() {
clearInterval(this._interval);
}

render() {
console.log('B#render', this.props.item);
return (
<div>
<strong>{this.props.item.name}</strong>
<span>{this.state.seconds} seconds</span>
</div>
);
}
}

export default A;

While this case does work as expected it seems to be in the direction of the

errors we’re seeing.

There is something taking place in our render cycle where B is being rendered

without reusing the item prop from the previous reconcile.

My first question is are there any theories on why this may be happening that I

can explore? We are using context as the parent of A and asB and these

are reading from a flux-thing (I think a fork of the original OSS Flux), they

they these are both passing all props through and not having any naming

collisions. I’m fairly certain we are not performing any mutations on our end.

(If I do manage to pull off a repro case I will immediately post it here with

utter joy in my heart)

cc @acdlite @gaearon (this is the issue I was asking about in Messenger recently)
Issue 1:
when i write two profiles which are having same commandLine pwsh.exe and different scheme each other. terminal shows two profile on its dropdown menu, but both shows only the first scheme.

"profiles" :
[
{
"acrylicOpacity" : 0.5,
"closeOnExit" : true,
"colorScheme" : "Night Owl",
"commandline" : "C:\\Program Files\\PowerShell\\6\\pwsh.exe",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "D2Coding",
"fontSize" : 10,
"guid" : "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"historySize" : 9001,
"icon" : "ms-appx:///ProfileIcons/{574e775e-4f2a-5b96-ac1e-a2962a402336}.png",
"name" : "PS Core",
"padding" : "5, 5, 5, 5",
"snapOnInput" : true,
"startingDirectory" : "%USERPROFILE%",
"useAcrylic" : false,
"tabTitle": "PS Core"
},
{
"acrylicOpacity" : 0.5,
"closeOnExit" : true,
"colorScheme" : "Fairy Floss",
"commandline" : "C:\\Program Files\\PowerShell\\6\\pwsh.exe",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "D2Coding",
"fontSize" : 10,
"guid" : "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"historySize" : 9001,
"icon" : "ms-appx:///ProfileIcons/{574e775e-4f2a-5b96-ac1e-a2962a402336}.png",
"name" : "PS Core",
"padding" : "5, 5, 5, 5",
"snapOnInput" : true,
"startingDirectory" : "%USERPROFILE%",
"useAcrylic" : false,
"tabTitle": "PS Core"
},

Proposed technical implementation details (optional)

profile should be distinguished considering with scheme not only commandLine

Issue 2:
Environment

Platform ServicePack Version VersionString
-------- ----------- ------- -------------
Win32NT 10.0.18362.0 Microsoft Windows NT 10.0.18362.0

Steps to reproduce

Open Windows Terminal

Double click on the title bar of main window.

Expected behavior

By the convention, the window should be maximized.

Actual behavior

But nothing happened.
Issue 1:
Playwright version

1.12.3

Operating system

MacOS

What browsers are you seeing the problem on?

WebKit

Other information

macOS 10.15.7

node v12.20.0

What happened? / Describe the bug

On webkit browser, when grabbing innerText additional line feed is added at the end. This happens on parent elements, not on children holding the text directly.

<button class="MuiButton-containedPrimary">
<span class="MuiButton-label">Primary</span>
</button>

In this example, innerText on span return the text properly, while grabbing innerText from the parent button adds an extra line feed at the end.

Code snippet to reproduce your bug

const playwright = require('playwright');
(async () => {
const browser = await playwright['webkit'].launch();
const context = await browser.newContext();
const page = await context.newPage();
await page.goto('https://material-ui.com/components/buttons/');
await page.waitForSelector('text=Buttons allow users to take actions, and make choices, with a single tap');
const buttonLabel = await page.$(`.MuiButton-containedPrimary .MuiButton-label`);
console.log(await buttonLabel.innerText()); // <-- Prints "PRIMARY"
const button = await page.$(`.MuiButton-containedPrimary`);
console.log(await button.innerText()); // <-- Prints "PRIMARY \n" additional line feed at the end
await browser.close();
})();

Relevant log output

No response

Issue 2:
Context:

Playwright Version: 1.8.1

Operating System: Mac

Node.js version: 14.15.4

Browser: webkit

test(
"Log in with mail and password",
async () => {
await loginPage.login(TestManager.USER_EMAIL, TestManager.USER_PASSWORD);
expect(await loginPage.getUserName()).toBe(TestManager.USER_NAME);
},
TestManager.TIMEOUT
);

//in LoginPage
async getUserName() {
return this.page.innerText("data-test-id=user-menu-button");
}

Hi!

the test above is supposed to get username written on the user menu button via innerText.

when running this test on chromium, it passes. when running it on webkit, it fails, since the innerText received is with two new lines appended to it. meaning: I expect "username" but get "username\n\n". and as I said, on chromium I get "username" as expected.

Thanks in advance!

attached is the failure log, where you can see the 2 extra new lines.
Issue 1:
Feature request

Is your feature request related to a problem? Please describe.

NextJs does not recognise files like pages/index.mjs.

Describe the solution you'd like

I'd like to be able to use .mjs files in place of .js files across my entire project.

Describe alternatives you've considered

N/A.

Additional context

It'd be great to see this land sometime soon. As Node 11 moves forward, I'd like to see a future where we don't need to use Babel for module support, and can rely directly on Node.

I am more than happy to work on a PR for this, if someone can point me in the right direction. I'm not 100% sure of the implications here, but hopefully it's rather simple. We'll likely need to do detection of Node versioning.

Issue 2:
I currently have my project setup with Emotion but have tried Sass modules as well. It compiles styles in the pages dir, but not elsewhere. Is this a Next.js issue, or is there something wrong with the way I set it up? When I tried with Sass modules I encountered the same problem, where the styles would exist if the component was in pages but not in another root dir.

Styles exist in pages

Styles do not exist in components

The weird thing is, the className is there but just not the styles for it.

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

Expected Behavior

Has styles in the Header className

Current Behavior

Header className is being referenced but contains no styles. However, the styles in pages does.
Issue 1:
I read about Group Sequence Providers, which is pretty cool feature. I am wondering if it is possible to create group provider (instead doing this logic into forms)

Issue 2:
When I first had the need to use validation groups I accidentally stumbled across the GroupSequenceProvider until I found what I actually wanted to do.

What I like about the GroupSequenceProvider is that you actually bind the validation logic to the entity configuration.

http://symfony.com/doc/current/book/validation.html#group-sequence

However with the validation groups it is not tied to the entity. I think a common use case is to validate based on the state of an entity. If you only validate your entities based on Forms you are unlikely to have any issues. However the entity validation logic is tied to the form configuration.

I would suggest an Approach with an Interface lets call it ValidationGroupsProdviderInterface with a method ValidationGroupsProdviderInterface::getValidationGroups(). The Form component could rely on this as well, the logic of the groups is tied to the entity and the risk of missing proper validation is reduced.

One concern which comes to my mind is the fact that the Validate method of the Validator accepts groups as parameters. And we also might travers through relations with the Valid() constraint. So the question would be when to use which groups.

What do you think about this?
Issue 1:
Stevo Slavić opened SPR-8439 and commented

FileNotFoundException gets thrown in XmlBeanFactoryTests.testFileSystemResourceWithImport on Windows if path contains spaces. URL.getFile() will return "%20" for spaces in path making returned path string not usable for constructing File. URL.toURI().getPath() should be used instead.

See this java bug for more details.

Attaching a patch [^XmlBeanFactoryTests.java.patch] which fixes the issue.

Affects: 3.1 M2

Attachments:

XmlBeanFactoryTests.java.patch (1.31 kB)

Issue Links:

#11330 XmlBeanFactoryTests testFileSystemResourceWithImport fails if build path contains spaces ("is duplicated by")

Issue 2:
Youen Chéné opened SPR-6532 and commented

Hi i've got the this spring mvc code which works fines with RC2.

@RequestMapping(value={"/product-{id}.html","/product-{id}-{name}.html"})

public String showProduct(@PathVariable String id,@RequestParam(value="loc",required=false) String location,Model model)

When I am switching with RC3, it is only handle the /product-{id}.html url pattern and not the /product-{id}-{name}.html pattern. In fact with this last pattern it try to put {id}-{name} in the id path variable instead of just put {id}.

Sorry, if it is a duplicate, after a quick looking it dot not seems to be one.

Affects: 3.0 RC3
Issue 1:
Hello;

I think the addition of text-justify style would be a good thing. Justified text provides a better esthetical and lacks Bootstrap according to me.

Issue 2:
I was looking for ajax addition to Typeahead and found nothing that suited me so I conjured my own patch. The main object was to allow AJAX functionality but you can do a few additional things with it:

Pass a function to the "source" option, that does something asynchronously and when ready calls typeahead.process() with a list of strings or objects. This is ideal for AJAX.

Pass a function to the "source" option, returning a list of strings/objects

Pass a list of objects to the "source" option and use a new "property" option to define which property on the objects defines the value on which is looked up and appears in the input box.

Pass a function to a new "onselect" option, which calls the function with object/string when selected.

You can get it here with a few examples and a diff between official Typeahead and mine: https://gist.github.com/1866577

I didn't know where else to post this but these additions have helped me a lot in two projects and I wanted to share it and get some feedback.
Issue 1:
Steps to Reproduce

issue1

when background is an opacity color，a line will show at top.

var color = Color(0xfffe7801);
var colorb = color.withOpacity(0.1);

Paint paint=new Paint();
paint.color = colorb;
var ts = Text(
" 悬赏 ￥ " +"ddddddddddddd" + " ",
style: TextStyle(color: color, background: paint, fontSize: 13.0,));

issue2

when background is an opacity 1.0 color, the Chinese words is missing.

var color=Colors.black;
var colorb=Colors.green;
Paint paint=new Paint();
paint.color = colorb;
var ts = Text(
" 悬赏 ￥ " +"ddddddddddddd" + " ",
style: TextStyle(color: color, background: paint, fontSize: 13.0,));

Issue 2:
I want to add a background to text, here is my code:

RichText(
text: TextSpan(
text: "不科学1111",
style: TextStyle(
color: Colors.black,
background: new Paint()..color = Colors.pinkAccent,
),
children: [
TextSpan(
text: "不科学sdfsdfkd",
style: TextStyle(
color: Colors.lightGreenAccent,
background: new Paint()
..color = Colors.pinkAccent,
),
),
]),
),

But the Simplified Chinese words do not display:

If I set the background color with opacity, it seems well:

RichText(
text: TextSpan(
text: "不科学1111",
style: TextStyle(
color: Colors.black,
background: new Paint()..color = Colors.pinkAccent.withOpacity(0.5),
),
children: [
TextSpan(
text: "不科学sdfsdfkd",
style: TextStyle(
color: Colors.lightGreenAccent,
background: new Paint()
..color = Colors.pinkAccent,
),
),
]),
)

But it still doesn't meet my expectation:

I have added app locales supports like this:

supportedLocales: [
const Locale('zh', 'CH'),
const Locale('en', 'US'),
],

Still doesn't work.
Issue 1:
Original ticket http://projects.scipy.org/numpy/ticket/2151 on 2012-06-06 by trac user tux, assigned to unknown.

I found out that numpy.flatiter objects do not retain the base object's writeable flag. While this only leads to unexpected behavior for normal non-writeable arrays, this causes a segfault if the array's buffer is a read-only memory area (e.g. mmap).

crashme1.py shows one part of the problem. The array b is created with the mmaped array a as its base. The current code creates a copy and sets the UPDATEIFCOPY flag if a is not C_CONTIGUOUS (I used Fortran order here). Now when b is destroyed it tries to write to its base (UPDATEIFCOPY) which causes a segfault because the buffer is a read-only mmap.

I tried to fix this problem by only setting updateifcopy only if the original array is writeable. If not, the flatiter should be non-writeable as well in my opinion to prevent people from trying to change the original array with it which would not work. I'm not perfectly sure that I got the semantics of iter_array(iterators.c) right. Somebody with more insight into numpy should judge. At least the comment of iter_array should also be updated to reflect the new situation.

After I implemented this, stumbled on another bug. Even if the flatiter is non-writeable, the function array_flat_set(getset.c) does not actually check the flag before writing to the array. This is demonstrated in the example write_the_unwriteable.py. If the non-writeable array is a read-only memory area, we get a segfault again (see crashme2.py).

To fix this I added a check for the writeable flag at the beginning of array_flat_set which throws an appropriate exception (the same that direct assignment would cause).

I tested all of the above on Debian Sid (Python 2.7.3 and numpy 1.6.2), Ubuntu Precise (Python 2.7.3 and numpy 1.6.1) and a self-compiled version of Python 2.7.1 and numpy 1.6.1. I could also reproduce it with python 3.2.

I attached my patches against the current git HEAD to this report.

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/2148 on 2012-05-31 by trac user farrowch, assigned to unknown.

The following code crashes on numpy 1.6.1, on OSX 10.6.

import numpy as np
shape = (8, 8)
dtype = np.dtype(np.uint8)
image = np.random.randint(0, 256, shape).astype(dtype)
image.tofile("test_image.bin")
image = np.memmap("test_image.bin", dtype=dtype, shape=shape, mode='r')
arr = image[::2,::2]
np.sum(arr.flat)

Here's what I've discovered so far about this:

the bus error only occurs with mode 'r'

the dimensionality of the array appears to be irrelevant

if the array slice does not change the strides, the bus error does not occur

no 'arr.flat', no bus error

Other aggregating functions (e.g. fmin.reduce) will induce the error

Iterating over arr.flat will not cause a bus error

Based on this, I suspect the issue is with the C-facing side of the flat iterator.
Issue 1:
From @akram on 2015-01-20T11:07:08Z

ISSUE TYPE

Feature Idea

COMPONENT NAME

firewalld module

ANSIBLE VERSION

N/A

SUMMARY

hi guys,

that would be nice if the firewalld module could support the "interface direct" configuration, allowing us to run this kind of rules:

firewall-cmd --permanent --direct --add-chain ipv4 filter FORWARD -i krb0 -o krb0 -j ACCEPT

Copied from original issue: ansible/ansible-modules-extras#209

Issue 2:
ISSUE TYPE

Feature Idea

COMPONENT NAME

firewalld module

ANSIBLE VERSION

ansible 2.3.0 (devel 9f2d8c2409) last updated 2017/01/01 20:16:08 (GMT -600)
config file = /home/lf/.ansible.cfg
configured module search path = Default w/o overrides

CONFIGURATION

OS / ENVIRONMENT

Fedora 25 Server

SUMMARY

It is not currently possible to reproduce configurations such as that created by running firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 0 -m owner --uid-owner $UID -j ACCEPT because the firewalld module doesn't support direct rules.

See previous issue at ansible/ansible-modules-extras#209.
Issue 1:
Description of the problem

Three supports es6 modules, including a rollup, three.module.js. It does not provide a minified version, however.

This is a feature request to include three.module.min.js in the distribution.

The lack of three.module.min.js may be a result of the popular minifiers initially not being able to minify es6. This is no longer the case, see: butternut/squash https://github.com/Rich-Harris/butternut. Also uglify-es is a version of uglify-js that can minify es6+.

Three.js version

Dev

r97

all versions

See the unpkg dashboard: https://unpkg.com/three@0.97.0/build/

Browser

All of them

Chrome

Firefox

Internet Explorer

OS

All of them

Windows

macOS

Linux

Android

iOS

Hardware Requirements (graphics card, VR Device, ...)

Issue 2:
Description of the problem

Hey, this is definitely non-blocking, but, would be helpful to check if the position array is a 3-component based buffer before computing the boundings ( sphere / box ) of a geometry

Three.js version

Dev

r97

...

Browser

All of them

Chrome

Firefox

Internet Explorer

OS

All of them

Windows

macOS

Linux

Android

iOS

Hardware Requirements (graphics card, VR Device, ...)
Issue 1:
There is an asymmetry in Pandas wrt. indexes vs. columns that is not present in the relational model. For example, for the purposes of merging one has to decide whether the column on which to merge is an index or not, despite the fact that indexing is incidental complexity for optimization. This leads to many of us having duplicate indexes and columns with the same name, which can cause errors and wastes memory for large data frames.

A possible fix would be to address the column lookup in all the current operations that require columns or indexes so that on NameError for columns the named indexes would be fetched instead. Or one may as well go all the way relational and make any df[my_col_or_named_index] lookup fetch a named index if the column name is not found.

The latter behaviour is being implemented in the eval/query functionality by @jreback and @cpcloud in #4164, so it would also be 'least surprise' to use this policy across the board.

Issue 2:
Code Sample, a copy-pastable example if possible

import pandas
df = pandas.DataFrame(columns=['A', 'B'])
print(df.columns)
df = df.filter(items=['A', 'A', 'A'])
print(df.columns)

Problem description

Filtering a dataframe with a list which contains multiple times a column that is already inside the original dataframe results in a new dataframe, where the mentioned column is present multiple times. This problem might be fixed easily by converting the input list into a set.

Expected Output

A filtered dataframe which have only one column: 'A'.

Output of pd.show_versions()

[paste the output of pd.show_versions() here below this line]

INSTALLED VERSIONS

commit: None

python: 3.6.3.final.0

python-bits: 64

OS: Windows

OS-release: 10

machine: AMD64

processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel

byteorder: little

LC_ALL: None

LANG: None

LOCALE: None.None

pandas: 0.22.0

pytest: None

pip: 9.0.1

setuptools: 28.8.0

Cython: None

numpy: 1.14.3

scipy: None

pyarrow: None

xarray: None

IPython: 6.2.1

sphinx: None

patsy: None

dateutil: 2.7.3

pytz: 2018.4

blosc: None

bottleneck: None

tables: None

numexpr: None

feather: None

matplotlib: None

openpyxl: None

xlrd: None

xlwt: None

xlsxwriter: None

lxml: None

bs4: None

html5lib: 1.0b10

sqlalchemy: 1.2.3

pymysql: None

psycopg2: None

jinja2: 2.9.6

s3fs: None

fastparquet: None

pandas_gbq: None

pandas_datareader: None