WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
by krolaw:

I think it may have been removed due to issue #2771. But it really needs to be added
back for formatting of custom types, for consistency with MarshalJSON and MarshalJSON.

For example: http://play.golang.org/p/HUeL1bUnMz

Getting the xml to work correctly, requires a convoluted inelegant solution, which
doesn't feel like Go at all. While, the JSON part just works beautifully.

Issue 2:
by TheBrokenToaster:

One of the changes from Go 1.0 to Go 1.1 was that the size of an "int" was now
dependent on the native architecture of the CPU. In Go 1.0, the size of the
"len" and "cap" fields in a GoSlice was always 32-bits. However, in
Go 1.1, those fields could be 32-bits or 64-bits depending on architecture.

Similarly, when using the GoSlice struct with CGo, the size of "len" and
"cap" fields should be architecture dependent. Currently, it uses the
"int" type, in which C language gives no guarantee that it is architecture
dependent.

The _cgo_export.h header is currently (INCORRECT):
typedef struct { char *p; int n; } GoString;
typedef struct { void *data; int len; int cap; } GoSlice;

Instead it should be (CORRECT):
typedef struct { char *p; GoInt n; } GoString;
typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;

Note: The GoString struct happens to work due to data structure alignment, but will
still suffer from a integer overflow if the string length was greater than 2^32.

----

What steps will reproduce the problem?
1.) Download the attachment.
2.) Compile and run demo.go on a 64-bit machine

What is the expected output?
sizeof(GoSlice): 16
sizeof(GoSlice.data): 8
sizeof(GoSlice.len): 4
sizeof(GoSlice.cap): 4
sizeof(GoString): 16
sizeof(GoString.p): 8
sizeof(GoString.n): 4

Print length of each GoSlice element
Index 0: len=0, cap=0
Index 1: len=417792, cap=194
Hexdump: 00400500c2000000 0000000000000000 2823000000000000 00600600c2000000

Print length of each GoString element
Index 0: len=10
Index 1: len=16
Index 2: len=18
Hexdump: 9050430000000000 0a00000000000000 105a430000000000 1000000000000000 d052430000000000 1200000000000000

What do you see instead?
sizeof(GoSlice): 24
sizeof(GoSlice.data): 8
sizeof(GoSlice.len): 8
sizeof(GoSlice.cap): 8
sizeof(GoString): 16
sizeof(GoString.p): 8
sizeof(GoString.n): 8

Print length of each GoSlice element
Index 0: len=0, cap=9000
Index 1: len=123, cap=456
Hexdump: 00400500c2000000 0000000000000000 2823000000000000 00600600c2000000 7b00000000000000 c801000000000000

Print length of each GoString element
Index 0: len=10
Index 1: len=16
Index 2: len=18
Hexdump: 9050430000000000 0a00000000000000 105a430000000000 1000000000000000 d052430000000000 1200000000000000

Which compiler are you using?
6g

Which operating system are you using?
Linux Mint 14 Nadia

Which version are you using?
go version go1.1 linux/amd64

Attachments:

cgo_bug.tar.gz (1253 bytes)
Issue 1:
Hello,

Major Minor Build Revision

10 0 18362 752

PowerToys version: 0.18.2

Fancyzones

Did the download/install.

I click on fancyzones

Select a layout and I can see the ghosting of the areas on the screen

save it and exit powertoys

Fancyzones does not work I cannot locate any of the zones. There is nothing highlighting on the screen or indicating they are there.

I uninstalled several times and went back to version 0.16.x but still does not work.

checked that .NET was installed properly.

Uninstalled and quit any application that I thought would interfere. As an example I removed displaylink.

In the Event Log I constantly see " APPCRASH Not Available 0 FancyZonesEditor.exe 0.18.2.0..."

Have an AOC CU34G2X monitor.

Dan.

Issue 2:
ℹ Computer information

PowerToys version: 0.23

PowerToy Utility: Fancy Zones

Running PowerToys as Admin =: no

Windows build number: 2004 (19628.1)

📝 Provide detailed reproduction steps (if any)

Create at least two virtuals desktops.

Assign different layouts, built-in and custom, to the different virtual desktops.

Work, connect as another user, lock the screen or maybe reboot, I am not sure what causes this to happen.

✔️ Expected result

Each virtual desktop keeps and applies the layout that was assigned to it.

❌ Actual result

Every virtual desktops use the same layout, which is the last one you selected.

📷 Screenshots

Nothing really relevant.
Issue 1:
on iphone6, left nav is always opened, I can not toggle it open/close. But this issue does not happen on every iphone6.

<LeftNav
ref="leftNav"
open={this.state.leftNavOpen}
onRequestChange={this._onRequestChange}
docked={false}
disableSwipeToOpen={true}>

Issue 2:
For some reason when on iPad, leftNav is always opened, even when setting docked={false}. This only happens on iPad. I can't even toggle it open/closed -- it's just always open.

<LeftNav
ref="leftNav"
className="left-nav"
docked={false}
selectedIndex={this.getSelectedIndex()}
onChange={this.handleLeftMenuChange}
header={
<div className="logo-container">
<LogoTm />
<LogoText />
</div>
}
menuItems={menuItems} />
Issue 1:
Similar to #30765.

An eazy example:

julia> a = collect(1.0:5.0)
5-element Vector{Float64}:
1.0
2.0
3.0
4.0
5.0

julia> v = view(a, 3:-1:1)
3-element view(::Vector{Float64}, 3:-1:1) with eltype Float64:
3.0
2.0
1.0

julia> BLAS.nrm2(v)
7.0710678118654755

julia> BLAS.nrm2(collect(v))
3.7416573867739413

Issue 2:
M = [2. 3.; 0. 0.]
a = [1.,2.,3.]

v = view(a,3:-1:2)
@test M * v ≈ M * Vector(v)

should pass but fails

Evaluated: [9.0, 0.0] ≈ [12.0, 0.0]

Found while looking at #37767, present on a recent 1.7.0-DEV, and 1.4.1.

Looking at LinearAlgebra/blas.jl, it seems there might be more functions which do not correctly handle negative stride yet, that is, the case of a StridedVector being a SubArray.

For the above example, there should be a fix similar to PR #39751. If so, one should probably add an inline function computing the pointer to the first element (in the sense of having the lowest address in memory) of a StridedVector, and use this function when BLAS.dgemv is called for StridedVectors (and make the change from #39751 use this function, too/take the code from there).

Warning: This is based on the assumption that the step size can be negative in the BLAS function.

Reading dgemv.f, I got the impression that negative strides are supported for dgemv in OpenBLAS StridedVector's.

Also page 40 of blas-report.pdf sounds like other BLAS functions should support negative stride for vectors.
Issue 1:
Bug report

Bug summary

When calling plt.hist(a), with a containing a np.nan value, the error raised is:

"max must be larger than min in range parameter."

This is confusing especially for novice users unfamiliar with the fact that np.nan>x is True for any number x.

Code for reproduction

import matplotlib.pyplot as plt
import numpy as np
plt.hist([1,2,3,np.nan])

Actual outcome

C:\Continuum\Anaconda2\lib\site-packages\numpy\lib\function_base.pyc in histogram(a, bins, range, normed, weights, density)

664 if mn > mx:

665 raise ValueError(

--> 666 'max must be larger than min in range parameter.')

667 if not np.all(np.isfinite([mn, mx])):

668 raise ValueError(

ValueError: max must be larger than min in range parameter.```

Expected outcome

ValueError: values in histogram contains nan```

Matplotlib version

matplotlib version 1.5.3

python version python 2.7 - 1.12.0 for windows 64 bit

How did you install Matplotlib and Python (pip, anaconda, from source ...)

Anaconda installation

Issue 2:
I notice that this code will plot with warnings:

from matplotlib import pyplot as plt
from numpy import NaN
plt.hist([1, NaN, 4], range=[0,5])

/Users/trish/anaconda/lib/python2.7/site-packages/numpy/lib/function_base.py:229: RuntimeWarning: invalid value encountered in greater_equal
keep = (tmp_a >= mn)
/Users/trish/anaconda/lib/python2.7/site-packages/numpy/lib/function_base.py:230: RuntimeWarning: invalid value encountered in less_equal
keep &= (tmp_a <= mx)

Whereas this code ends up with an error because of how the range is determined:

from matplotlib import pyplot as plt
from numpy import NaN
plt.hist([1, NaN, 4])

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/trish/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py", line 2958, in hist
stacked=stacked, data=data, **kwargs)
File "/Users/trish/anaconda/lib/python2.7/site-packages/matplotlib/__init__.py", line 1812, in inner
return func(ax, *args, **kwargs)
File "/Users/trish/anaconda/lib/python2.7/site-packages/matplotlib/axes/_axes.py", line 6010, in hist
m, bins = np.histogram(x[i], bins, weights=w[i], **hist_kwargs)
File "/Users/trish/anaconda/lib/python2.7/site-packages/numpy/lib/function_base.py", line 176, in histogram
'max must be larger than min in range parameter.')
AttributeError: max must be larger than min in range parameter.

If we're willing to forgive NaNs in the first case and just plot while ignoring them, wouldn't it also make sense to ignore them in the range computation? Or if that's a bad idea, maybe we could return an error that makes it clear to the user that the problem was NaNs in the data?

The friend who showed this to me was stumped by the error message because his data was huge and he had no idea it contained NaNs. When he saw that AttributeError he just thought "But I'm letting matplotlib decide the range, how can it be wrong?"
Issue 1:
Description of the new feature/enhancement

On WSL, Typing clear or pressing CTRL+L clears the scroll buffer history while most Linux terminals(both real ones like gnome-terminal, and virtual ones like tmux) move the scroll history instead of clearing it. Can we use same semantics for Windows Terminal?

Issue 2:
Summary of the new feature/enhancement

I would love to be able to overwrite per profile settings with a global one, let's say I want to use the same color scheme everywhere, setting it in the global section should do that.

Proposed technical implementation details (optional)
Issue 1:
current send_file implement a traditional method to assign download filename,

according to RFC 5987 there is a method to have utf-8 encoding in it which is support by all modern browser nowadays,

I use this line to make it

rv.headers['Content-Disposition'] = "attachment; filename*=UTF-8''%s"%(urllib.quote_plus(filename.encode('utf-8')))

I am not using headers.add,

because you can see there have to use asterisk character which is nasty

ref:

http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http

http://tools.ietf.org/html/rfc5987

Issue 2:
Hi.

I've detected an issue with supporting unicode filenames in send_file.

If send_file attempts to respond with utf-8 in http headers, the answer is empty, the log contains something like "http-headers should containbe latin-1".

I know that browser support IS A MESS, but it seems, that sending two filenames (filename= and filename*=) separated by semicolon should work.

I'd like this to be handled by flask or werkzeug. Will you accept such pull request?
Issue 1:
Environment

Microsoft Windows [Version 10.0.18362.207]
Windows Terminal version (if applicable): 0.2.1831.0

Steps to reproduce

Use MesloLGL Nerd Font ForPowerline font.

Type fi

Expected behavior

Terminal displays fi

Actual behavior

Terminal rewrites fi to a phone icon.

Video example: https://i.imgur.com/fUwPUvN.gif

Issue 2:
Description of the new feature/enhancement

Currently "defaults" (including profiles and keybindings) are always applied and merged with "profiles.json". I have zero overlap between default and custom keybindings because I use default prefix (ctrl+shift) inside different application. In new version of Terminal, if I don't override all those to null I have unwanted side effects (specially if that app passes keybindings through and Terminal gets them).

Also I don't want to have certain profiles visible but GUIDs are different across machines so on each machine where I use Terminal I have to checkout my dotfiles (including Terminal config), inspect defaults file and then override (hide) those GUIDs.

Proposed technical implementation details (optional)

Merge (cascading) should be optional. If disabled defaults should be used one-time to create profiles.json.
Issue 1:
one of my folder contains multiple h5 files, and I tried to load them into dataframes and then concat these df into one.

the python process crashes when the num_tasks>1, if I debug thread by thread, it works, in another, it crashes simply when two threads run at the same time, even though they read different files.

from multiprocessing.pool import ThreadPool
import pandas as pd

num_tasks=2
def readjob(x):
path = x
return pd.read_hdf(path,"df",mode='r')

pool = ThreadPool(num_tasks)
results = pool.map(readjob,files)

Issue 2:
xref: #2397

xref #14263 (example)

I think that we should protect the file open/closes with a lock to avoid this problem.
Issue 1:
I have one form type (extending AbstractType) which has an option to switch between adding children either as regular fields or as hidden ones. Two instances of that type are created in the controller, one with regular fields, one with hidden ones. Both instances are passed to the template. The form with hidden fields is rendered first, then the other one.

That used to work well. But with #4918, the 2nd form isn't rendered at all. I couldn't find out why, as isRendered() still returns false prior to being rendered and it also has() all expected fields. Both forms would also be rendered correctly when changing their order.

@bschussek: Do you have a clue what could cause this? Or shall I provide some of the code mentioned?

Issue 2:
http://symfony.com/schema/dic/services/services-1.0.xsd fails validation in both PhpStorm and OxygenXml

error is (output from OxygenXml when validating the XSD file)

System ID: http://symfony.com/schema/dic/services/services-1.0.xsd

Main validation file: http://symfony.com/schema/dic/services/services-1.0.xsd

Engine name: Saxon-EE 9.5.1.7

Severity: fatal

Description: Error in complex type container: Ambiguous content model, there are two xs:any wildcards that match overlapping sets of namespaces

Start location: 20:0

and appears to be caused by a duplicate definition of

<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />

at L 27 & 31

net result is that DI container utilising an XML definition won't compile.

[edit]

Container definition will compile under most circumstances but if there is a slight error in the xml that is not caught by the XSD, (XSD is not a perfect tool in and of itself,) then it appears that most of these parsers lose their way. However, the invalid syntax of the XSD itself is a problem.
Issue 1:
It would be useful to have a definitive example of cleaning up objects/scenes/mesh/geometry and any etc's. This would be useful for those that want to carry out changes dynamically by recreating a mesh.

Please also show when and how any reuse of a structure might be more appropiate. As newbie I'm not sure what is meant by phrases like "reusing" a geometry.

Issue 2:
I think ThreeJS is missing a Plane class. Right now we are using a Vector4 as the plane class, but generally it is considered to be a separate class as the operations on a Vector4 are generally quite different than the operations on a Plane.

For example, there is a lot of special case code in Frustum.js where it needs to calculate distance to a point from a plane, but it doesn't use a member method but rather it includes the whole plane/point distance equation.

Having a Plane class will simplify the code for Frustum.js and make it more reusable. The methods I propose having on the Plane class are as follows:

Scalar distanceToPoint( point as Vector3 )

Scalar distanceToSphere( sphere as Sphere ) // see proposal for sphere class in issue #2708

Vector3 intersectLine( start as Vector3, end as Vector3 ) // return intersection point, returns null if no intersection

void transform( transform as Matrix4 ) // transform in place

Vector3 reflectPoint( point as Vector3 )

Vector3 reflectVector( vector as Vector3 )

void flip() // flip in place

It will also have constructors that take either:

normal, distance

point, normal

point1, point2, point3 // coplanar points. Degenerate coincident or colinear points would throw error.

Members properties would be:

normal (Vector3)

distance (Scalar), which could also be called constant

Let me know if I can contribute this.

I can also modify the Frustum class to use this instead of its Vector4-based representation.
Issue 1:
I'm attempting to re-open #1059, as seaborn should definitely be able to plot distributions over date ranges, and telling us to just use plt.hist is a work-around, not a solution. It sounds like a few changes in the calculations of the means and for colors and bin sizes should get it working (#1059 (comment)).

sb.distplot(np.arange('2016-01', '2016-05', dtype='datetime64[D]'))

---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-174-b58909c41bc2> in <module>
----> 1 sb.distplot(np.arange('2016-01', '2016-05', dtype='datetime64[D]'))

/opt/conda/lib/python3.6/site-packages/seaborn/distributions.py in distplot(a, bins, hist, kde, rug, fit, hist_kws, kde_kws, rug_kws, fit_kws, color, vertical, norm_hist, axlabel, label, ax)
196 line, = ax.plot(0, a.mean())
197 else:
--> 198 line, = ax.plot(a.mean(), 0)
199 color = line.get_color()
200 line.remove()

/opt/conda/lib/python3.6/site-packages/numpy/core/_methods.py in _mean(a, axis, dtype, out, keepdims)
73 is_float16_result = True
74
---> 75 ret = umr_sum(arr, axis, dtype, out, keepdims)
76 if isinstance(ret, mu.ndarray):
77 ret = um.true_divide(

TypeError: ufunc add cannot use operands with types dtype('<M8[D]') and dtype('<M8[D]')

I'm using seaborn 0.9.0 with numpy 1.15.2

Issue 2:
%matplotlib inline
import numpy as np
import pandas as pd
import seaborn as sns

mean, cov = [0, 1], [(1, .5), (.5, 1)]
data = np.random.multivariate_normal(mean, cov, 200)
df = pd.DataFrame(data, columns=["x", "y"])

sns.jointplot(x="Not_X_Name", y="Not_a_valid_name", data=df)
sns.jointplot(x="Not_X_Name", y="y", data=df)
sns.jointplot(x="", y="", data=df)

All of those calls return different error message, none of which are clear / help find the actual issue column names not found in the dataframe.

@chrish42
Issue 1:
Version

2.6.11

Reproduction link

https://vuejs.org/v2/guide/forms.html

Steps to reproduce

fill textbox, checkbox, select etc.

What is expected?

field reset on page refresh in IE/Edge

What is actually happening?

html components are retaining the previous selection where data is refreshed on page refresh in IE /Edge.

Issue 2:
Version

2.6.11

Reproduction link

https://codepen.io/affeman/pen/LYVzzYw

Steps to reproduce

Not reproducible in CodePen but the code is the same used in the Vue official documentation (See below)

Go to https://vuejs.org/v2/guide/forms.html#Checkbox in Internet Explorer 11

Click the checkbox

Reload the page

What is expected?

The checkbox is unchecked and the label is false

What is actually happening?

The checkbox is checked and the label is false

The same issue applies to the other components on the page as well.

The issue is not applicable after a hard refresh.
Issue 1:
Context:

Playwright Version: [1.10.0]

Operating System: [Windows]

Node.js version: [v15.14.0]

Browser: [Chromium]

Extra: [issue is not reproducible for firefox, webkit and headless chromium]

When I am just doing this

import playwright from 'playwright';

(async () => {
const browser = await playwright.chromium.launch({
headless: false,
timeout: 120000,
logger: {
isEnabled: (name, severity) => name === 'browser',
log: (name, severity, message, args) => console.log(`${name} ${severity} ${message}`)
}
});
const context = await browser.newContext();
const page = await context.newPage();

await page.goto('some url');

await page.fill("//input[@name='email']", "my username");
await page.fill("//input[@name='password']", "my password");
await page.click("//button[@class='primary']");

await page.waitForSelector("table.generic-table.findings-list-table")

await page.screenshot({
path: "./screenshots/1.png",
fullPage: true
})

console.log("here")
await browser.close();
console.log("after close")
})();

I am running into this error that appears after a minute playwright tries to close the browser. It happens every time when browser command close starts and is not reproducible for firefox and webkit or headless chromium. GUI is closed but the node process is still running. Task manager shows chromium running and consuming 20-30 percent of cpu.

[Error: EPERM: operation not permitted, unlink 'C:\Users\AKREML~1\AppData\Local\Temp\playwright_chromiumdev_profile-dhO1Xy\CrashpadMetrics-active.pma'] {
errno: -4048,
code: 'EPERM',
syscall: 'unlink',
path: 'C:\\Users\\AKREML~1\\AppData\\Local\\Temp\\playwright_chromiumdev_profile-dhO1Xy\\CrashpadMetrics-active.pma'
}

I can not share the url. Is there anything else I can share with you ?

Issue 2:
Context:

Playwright Version: 1.8.0

Operating System: macOS 11.2

Node.js version: 12.18.4

Browser: Chrome (version 88.0.4324.146)

Extra: None

Code Snippet

const playwright = require('playwright')

(async () => {
const browser = await playwright['chromium'].launch({
executablePath:
'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
headless: false,
})
const context = await browser.newContext()
const page = await context.newPage()
await page.goto('https://google.com', { waitUntil: 'load' })
const cookies = await page.context().cookies()
await browser.close()
})()

Describe the bug

When running the test with no-headless Chrome (also happens with Chrome Dev, and Chrome Canary), the test is hung at await browser.close() and can not close the browser.
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Can override MuiTouchRipple in the ThemeOptions overrides section.

Current Behavior

Get a typescript error that MuiTouchRipple is not defined in Overrides

Steps to Reproduce (for bugs)

const customMuiTheme = createMuiTheme({
overrides: {
MuiTouchRipple: {
root: {
display: 'none'
}
}
}
});

Context

Unable to override the mui touch ripple. Is there a different way to override this setting that makes Typescript happy?

Your Environment

Tech
Version

Material-UI
1.0.0-beta.24

React
16.2.0

Issue 2:
I'm working on a tool that allows certain states to be toggled from a toolbar (think bold/italic/etc). I'd like to show that certain states are enabled. I know the switch component makes this every easy but I'd like to mimic existing toolbar like functionality found in most WYSIWYGs.

What is the recommend approach for showing toggle state with an IconButton?

This may be outside the material spec but I would suspect something others would like do in their apps as they become more rich and rely more heavily on material-ui for all of the UX.

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

Expected Behavior

I'd like some sort of 'on' or 'pressed' prop that results in corresponding visual representation on the IconButton.

Current Behavior

No props available. Which I think is by design but hopefully the use case is persuasive to reconsider.

Context

I hope to use this metaphor in a WYSIWYG editor as well as a few other toolbars within the app. I think a toggle state on a button more closely aligns to user's expectation of how a format toolbar should work than some sort of switch control.

Your Environment

Tech
Version

Material-UI
1.0.0-beta.29

React
16

browser
chrome
Issue 1:
Created a test.js and wrote very simple React code. This is what I got:

To be honest, currently VS Code has very bad support of React syntax and it's basically useless. This issue has been there for quite some time... just wondering: is it going to be fixed?

Issue 2:
I know VSCode has not support JSX yet but it didn't appear so much error highlights in the last version, even I had already changed my language mode into Plain Text.