WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
System info

Playwright Version: [v1.34.3]

Operating System: [All]

Browser: [All]

Other info:

Source code

The POST request here: https://github.com/microsoft/playwright/blob/ec972fb7c140908560347ea215d30016fda2508d/packages/playwright-core/src/server/chromium/chromium.ts#L192C28-L199

is correct, but the method fetchData defined here:

playwright/packages/playwright-core/src/utils/network.ts

Lines 97 to 111
in
ec972fb

export function fetchData(params: HTTPRequestParams, onError?: (params: HTTPRequestParams, response: http.IncomingMessage) => Promise<Error>): Promise<string> {

return new Promise((resolve, reject) => {

httpRequest(params, async response => {

if (response.statusCode !== 200) {

const error = onError ? await onError(params, response) : new Error(`fetch failed: server returned code ${response.statusCode}. URL: ${params.url}`);

reject(error);

return;

}

let body = '';

response.on('data', (chunk: string) => body += chunk);

response.on('error', (error: any) => reject(error));

response.on('end', () => resolve(body));

}, reject);

});

}

is not passing the header "Content-type": "application/json"

so when Selenium Hub receives the request, it drops the body of the request.

It's the only instance where the method is doing a "POST" rather than a "GET", which I guess has resulted in this slipping through.

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

Steps

Setup a Remote Selenium Grid Hub

Follow the docs

Run the tests

Read the Selenium Grid Hub logs

Expected

[Describe expected behavior]

Propagate the Selenium Grid capabilities from the environment variable

[Describe actual behavior]

Does not propagate Selenium Grid capabilities from the environment variable

Issue 2:
As far as I can understand it is possible to take a full page screenshot when calling await page.screenshot({ path: 'screenshot.png', fullPage: true });, but not after a test run / on failure.

The option to take full page screenshots on failure (something like screenshot: { mode: 'only-on-failure', fullPage: true }) would make it easier to analyze failed tests because sometimes the reason for the test to fail might be outside of the current viewport.
Issue 1:
I downloaded the Symfony Standard Edition 2.3.4 and placed the following code in app_dev.php:

echo $request->getUri();

Then I visited the following url: http://localhost/RSA-Programm/web/app_dev.php?module=search&type=user&func=form. The output is http://localhost/RSA-Programm/web/app_dev.php/?func=form&module=search&type=user. Notice the additional slash after app_dev.php.

Refs zikula/core#1094. The same problem occurs in Zikula. Routing is not yet enabled so all urls are like the one above (with index.php). This causes the url in the profiler to be wrong:

Issue 2:
There is a problem with the path info in the Request class.

Given a request to http://localhost/symfony-standard/app_dev.php, the info in the Request are as follows:

Request::getBaseUrl() returns /symfony-standard/app_dev.php (correct)

Request::getPathInfo() returns / which is wrong because it must be empty ``.

The reason is that Request::getBaseUrl() . Request::getPathInfo() must represent the real request path. Since it is lying about the real path, #3958 generates the incorrect relative path based on the wrong info.

So there is a problem when the path info should be empty but never is (it defaults to /).

I think it's this commit that should be reverted: 62d09b8

ping @fabpot
Issue 1:
Image cache is caching error icons for apps with no thumbnail. If an icon is available later, Image cache would need to be deleted manually to invalidate it.

Issue 2:
Summary of the new feature/enhancement

I used i25A Rii mini wireless keyboard (http://www.riitek.com/product/i25a.html). The keyboard itself doesn't have Function keys and Windows Key, so I need a tool to remap shortcuts. Said like remap Ctrl+Alt+1 to F1, Ctrl+Alt+2 to F2, and so on.. also Ctrl+Alt+W to Windows key.

I hope Keyboard Manager can Remap shortcut to key.

I hope Keyboard Manager can be utilized to Remap a shortcut to a key.

Proposed technical implementation details (optional)
Issue 1:
So I'm currently adding in logic to handle the removal of arbitrary nodes that would result in invalid code.

There are currently two ways to tackle this:

Detect it and throw compiler errors

Detect it and fix it up on a case-by-case basis.

For example, when removing the foo callee of a CallExpression the following could be done:

Change the callee to undefined

bar(foo("bar"));

=>

bar(undefined("bar"));

Noop the function

bar(foo("bar"));

=>

bar(undefined);

(Arguments are turned into a SequenceExpression, "pure" values are removed from it, and we ensure it evaluates to undefined by pushing it onto the sequence expression)

Throw an error

bar(foo("bar"));

=>

CompilerError: Invalid removal of `CallExpression` `callee`.

Unsure how to handle these, ideally I'd like idiomatic transforms. Having to worry about the context whenever you want to remove a node is gross, it leads to duplicating every single contextual validation permutation which is pretty nasty. Leaning more towards the noop case since at least that doesn't result in broken code.

Issue 2:
Bug Report

Following code works correctly with Typescript compiler but fails with Babel.

Current behavior

A clear and concise description of the behavior.

Input Code

function undoable(target: any, propertyKey: string) {
Object.defineProperty(target, propertyKey, {
get: function () {
return 'customFoo';
},
});
}

class PropModel {
@undoable foo?: string;
}

const g = new PropModel();
console.log(g.foo); // her is 'undefined' with Babel, but 'customFoo' with Typescript

Expected behavior

A clear and concise description of what you expected to happen (or code).

I am able to override class protptype in the decorator.

Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)

Filename: babel.config.js

{
"presets": ["next/babel"],
"plugins": [
"jsx-control-statements",
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }]
],
"env": {
"test": {
"plugins": ["babel-plugin-istanbul"]
}
}
}

Environment

System:
OS: Windows 10 10.0.18363
Binaries:
Node: 12.16.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD

Monorepo: No

How you are using Babel: Webpack

Possible Solution

Additional context

Add any other context about the problem here. Or a screenshot if applicable
Issue 1:
Glide Version:

Integration libraries:

Device/Android Version:

Issue details / Repro steps / Use case background:

Glide load line / GlideModule (if any) / list Adapter code (if any):

Glide.with...

Layout XML:

<FrameLayout xmlns:android="...

Stack trace / LogCat:

paste stack trace and/or log here

Issue 2:
Idea

Glide.with(this).load(bitmap).into(imageView);
Glide.with(this).load(drawable).into(imageView);

This looks weird compared to ImageView.setImageBitmap(bitmap), but if you need animation and error handling (null bitmap), the above could become an easy to use, fire and forget, go-to line instead of duplicating code.

Note: you've already made a wrapper of ImageView#setImageResource and ImageView#setImageUri.

Currently they throw

Caused by: java.lang.IllegalArgumentException: Unknown type android.graphics.Bitmap@44759ab8. You must provide a Model of a type for which there is a registered ModelLoader, if you are using a custom model, you must first call Glide#register with a ModelLoaderFactory for your custom model class.

at com.bumptech.glide.RequestManager.loadGeneric(RequestManager.java:382)

at com.bumptech.glide.RequestManager.load(RequestManager.java:374)

Context

This came up when I was trying to display a captured image using Glide (oversimplified code):

startActivityForResult(new Intent(MediaStore.ACTION_IMAGE_CAPTURE), Activity.RESULT_FIRST_USER);

public void onActivityResult(int requestCode, int resultCode, Intent data) {
if(requestCode == REQUEST_CODE_GET_PICTURE && resultCode == Activity.RESULT_OK) {
Bitmap bitmap = (Bitmap)data.getExtras().get("data");
Glide.with(this).load(bitmap)/*...*/.into(image);
Issue 1:
http://twitter.github.com/bootstrap/javascript.html#carousel

I was wondering if images in carousel not looping forever is a default condition, or a bug.

If it is a default condition, is there a way for carousel to loop through images forever?

Right now, carousel stops cycling when it reaches the right most side image.

Issue 2:
Validation started for.. _gh_pages/javascript/index.html
1=> "Duplicate ID myModalLabel." Line no: 469
2=> "The first occurrence of ID myModalLabel was here." Line no: 362
3=> "Duplicate ID myModalLabel." Line no: 483
4=> "The first occurrence of ID myModalLabel was here." Line no: 362
No of errors: 4

Was IDs duplicated accidentaly?
Issue 1:
See screenshot: seems like a/b/file5 should appear just below a/file2, not after z/file4.

I'm using OS X 10.9.5, Atom version 0.194.0.

Issue 2:
Hi all,

If I apply the ‘text-rendering: optimizeLegibility’ directive to the stylesheets on .editor or .workspace, any subsequent command palettes, text fields or tabs have a visually broken/erratic caret:

In text fields, such as the command palette or settings view, the caret appears before the first character even though it's actually pointing to the end of the text;

Moving the caret left and right in an editor tab sometimes causes it to jump several places left and right of where it should be, there doesn't seem to be any discernible pattern and reloading the tab causes different breakages to happen.

This issue only affects new tabs/palettes created after the stylesheet change occurs, it seems. Similarly, removing the stylesheet change only takes effect for new tabs/palettes.

I'm running Atom HEAD on Gentoo Linux, 64-bit, not using the react editor.

Not sure which part of Atom this applies to, so I've filed it against atom/atom (sorry!)
Issue 1:
I am trying to calculate silhouette_score or silhouette_samples using a sparse matrix but getting the following error:

ValueError: diag requires an array of at least two dimensions

The sample code is as follows:

edges = [
(1, 2, 0.9),
(1, 3, 0.7),
(1, 4, 0.1),
(1, 5, 0),
(1, 6, 0),
(2, 3, 0.8),
(2, 4, 0.2),
(2, 5, 0),
(2, 6, 0.3),
(3, 4, 0.3),
(3, 5, 0.2),
(3, 6, 0.25),
(4, 5, 0.8),
(4, 6, 0.6),
(5, 6, 0.9),
(7, 8, 1.0)]

gg = nx.Graph()

for u,v, w in edges:
gg.add_edge(u, v, weight=w)

adj = nx.adjacency_matrix(gg)
adj.setdiag(0)

from sklearn.metrics import silhouette_score, silhouette_samples

print(silhouette_score(adj, metric='precomputed', labels=labels))
silhouette_samples(adj, metric='precomputed', labels=labels)

Issue 2:
Describe the bug

silhouette_samples(X, y, metric="precomputed") fails with ValueError: diag requires an array of at least two dimensions if X is sparse.

Steps/Code to Reproduce

from sklearn.metrics import silhouette_samples
from sklearn.neighbors import kneighbors_graph
from sklearn.datasets import make_blobs

X, y = make_blobs(n_samples=1000, centers=5, n_features=10)

pdist = kneighbors_graph(X, 5, mode='distance')

# pdist is scipy.sparse.csr.csr_matrix

silhouette_samples(pdist, y, metric="precomputed")

Expected Results

No error is thrown.

Actual Results

---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-14-140890024e6c> in <module>
----> 1 silhouette_samples(pdist, y, metric="precomputed")

/data1/mschroeder/miniconda3/envs/20-assdc/lib/python3.7/site-packages/sklearn/metrics/cluster/_unsupervised.py in silhouette_samples(X, labels, metric, **kwds)
216 if metric == 'precomputed':
217 atol = np.finfo(X.dtype).eps * 100
--> 218 if np.any(np.abs(np.diagonal(X)) > atol):
219 raise ValueError(
220 'The precomputed distance matrix contains non-zero '

<__array_function__ internals> in diagonal(*args, **kwargs)

/data1/mschroeder/miniconda3/envs/20-assdc/lib/python3.7/site-packages/numpy/core/fromnumeric.py in diagonal(a, offset, axis1, axis2)
1615 return asarray(a).diagonal(offset=offset, axis1=axis1, axis2=axis2)
1616 else:
-> 1617 return asanyarray(a).diagonal(offset=offset, axis1=axis1, axis2=axis2)
1618
1619

ValueError: diag requires an array of at least two dimensions

Possible fix

Change np.diagonal(X) to X.diagonal(), because this is implemented for numpy.ndarray as well as scipy.sparse.csr_matrix.diagonal. Or should this rather be fixed in numpy (so that np.diagonal does the right thing for sparse matrices)?

Versions

System:
python: 3.7.6 | packaged by conda-forge | (default, Jun 1 2020, 18:57:50) [GCC 7.5.0]
executable: /data1/mschroeder/miniconda3/envs/20-assdc/bin/python
machine: Linux-4.4.0-109-generic-x86_64-with-debian-stretch-sid

Python dependencies:
pip: 20.1.1
setuptools: 47.3.1.post20200616
sklearn: 0.22.2.post1
numpy: 1.18.5
scipy: 1.4.1
Cython: None
pandas: 1.0.5
matplotlib: 3.2.1
joblib: 0.15.1

Built with OpenMP: True
Issue 1:
Expected Behavior

I should be able to return a single value from my view(that is, not a tuple) and have my value passed to my custom response class. In this case I have a response class that detects whether JSON or pickle data was requested by the client and dumps the return value appropriately. This allows me to simply return a list or dict from my view without having to detect and dump the appropriate type.

@mod.route('/')
def return_json_or_pickle():
return ['foo', 'bar', 'bat']

As of Flask 0.12.2 this worked - make_response would pass the list to my custom response class and my client would get what it wanted.

Actual Behavior

As of 1.0, commit #2256 was merged which added an explicit check to see if the return value was a list; treating a list as a tuple return in that case. I now get a typeerror:

TypeError: The view function did not return a valid response tuple. The tuple must have the form (body, status, headers), (body, status), or (body, headers).

If I change my view function to return a tuple:

@mod.route('/')
def return_json_or_pickle():
return ['foo', 'bar', 'bat'], 200

the previous functionality is restored! This confirms that tuple handling is of course perfectly fine. I have a pull request prepared which should do a very nice job of resolving the issue - it simply omits list from the type check in make_response. Since a list is not a valid response anyway, there's no reason I can see for it to be there.

Environment

Python version: 3.6

Flask version: 1.0

Werkzeug version: n/a

Issue 2:
I had written a simple wrapper to take all the response primitives, and jsonify them before returning to client like so:

class JSONifyResponseWrapper(Response):
default_mimetype = 'application/json'

@classmethod
def force_type(cls, rv, environ=None):
try:
rv = jsonify(rv)
finally:
return super(JSONifyResponseWrapper, cls).force_type(rv, environ)

Then i set app.response_class to the class above.

However, in flask 1.0 , the routes are required to return a tuple.

This means if I have a route like this:

@base_blueprint.route('', methods=['Post'])
def hello():
a = {"hello":"world"}
return a

The client receives a valid json object.

But if I do this:

@base_blueprint.route('', methods=['Post'])
def hello():
a = [i for i in range(100)]
return a

Flask will throw this error:

TypeError: The view function did not return a valid response tuple. The tuple must have the form (body, status, headers), (body, status), or (body, headers)`
Issue 1:
http://twitter.github.com/bootstrap/javascript.html#tooltips

The Four directions example has all four tooltips appearing on top.

Issue 2:
congrats on releasing 2.3.0!

I was checking out some of the docs and saw that tooltips data-placement is not working correctly. I think its because of the one pull request that makes options set in javascript override the options that were set in the html but I'm not sure..
Issue 1:
Symfony 2.0.4. When specifying "index" as a name for the route - exception "No route found for GET /" raised.

`

/**

@route("/", name="index")

*/

public function indexAction()

{

}

`

But renaming route to anything else solves the issue.

Issue 2:
Symfony version(s) affected: 4.2.*

Description

According to Symfony UniqueEntity documentation if the constraint is violated then I can create a custom message error by implementing the __toString() method on my Entity.

I've attempted to create my custom message via the validation.yaml (which works) and I've implemented the __toString() method (which does not work)

According to the docs:

Messages can include the {{ value }} placeholder to display a string representation of the invalid entity. If the entity doesn't define the __toString() method, the following generic value will be used: "Object of class CLASS identified by "

How to reproduce

To reproduce, clone my project and follow README.md guide:

https://github.com/kemicofa/unique_entity_custom_message_tostring_bug

Once, the project is installed run the WebCaseTest that I've implemented.

Essentially my project will attempt to insert two users with the same email in the database.

The first works as expected and the second fails as expected. However, the second response doesn't have the expected __toString() return message sent, only the default message is sent:

Object(App\Entity\User).email: /** more text here */

Possible Solution

Additional context
Issue 1:
Not sure if this is a bug or there is simply a discrepancy between NumPy and Python. Though this is what I am seeing in some (not all) cases. FYI, similar (but not the exact same) behavior for np.float128.

>>> import numpy as np
>>> a = np.float64(0.47140452079103168)
>>> round(a, 4)
0.47139999999999999
>>> a = np.float64(0.47140452079103168)
>>> round(float(a), 4)
0.4714
>>> a = 0.47140452079103168
>>> round(a, 4)
0.4714

Issue 2:
In [1]: np.array(.1)[()] == np.array(.1).item()
Out[1]: True

In [2]: np.array(.1)[()] # a np.float64
Out[2]: 0.10000000000000001

In [3]: np.array(.1).item() # a python (64-bit) float
Out[3]: 0.1

Python floats use the shortest repr that give the same value when eval'd since https://bugs.python.org/issue1580 was accepted. It would be nice if numpy did the same.

I realize it would require a nontrivial patch :)
Issue 1:
A common pattern with collections is the "groupinds" pattern. The pattern consists of collecting the indices of the entries of the collection into subsets with common value. For example:

v = [(1,2), (1,2), (1,3), (7,3)]

could be grouped into:

[[1,2], [3], [4]]

because the two first indices of v have the same value (1,2).

Could we have this pattern implemented in Base? Below is a draft implementation by @jagot:

function group_by(v; f=identity, by=identity)
isempty(v) && return [[]]
e = first(v)
m = Dict{typeof(by(e)),Vector{typeof(f(1=>e))}}()
for (i,e) in enumerate(v)
push!(get!(m, by(e), []), f(i=>e))
end
values(m)
end

Issue 2:
When applying a restriction to a abstract type parameter a subtype it is possible to define a subtype that is not actually a subtype:

julia> abstract type AbstractFoo{T<:Integer} end

julia> struct Foo1{T} <: AbstractFoo{T} end

julia> struct Foo2{T <: Integer} <: AbstractFoo{T} end

julia> Foo1 <: AbstractFoo
false

julia> Foo2 <: AbstractFoo
true

I believe this to be a bug as by definition Foo1 is a subtype of AbstractFoo. Similarly definitions where the subtype attempts to expand the scope of the parameter should probably be disallowed:

struct Foo3{T <: Real} <: AbstractFoo{T} end
Issue 1:
Issue: 81559c42-419d-739b-a6b7-43927bc5d585
Versions
- 0.10.1-release
- 94cba4e
- a4bfcb8
Stack
[/vs/workbench/parts/debug/node/rawDebugSession.ts#L68:28 (RawDebugSession.send)](https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/src/vs/workbench/parts/debug/node/rawDebugSession.ts#L68:28 %28RawDebugSession.send%29)
[vs/workbench/vs/base/common/winjs.base.raw.js#L1470:0 (onError)](https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/srcvs/workbench/vs/base/common/winjs.base.raw.js#L1470:0 %28onError%29)
[vs/workbench/vs/base/common/winjs.base.raw.js#L1176:0 (_notify)](https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/srcvs/workbench/vs/base/common/winjs.base.raw.js#L1176:0 %28_notify%29)
[vs/workbench/vs/base/common/winjs.base.raw.js#L1343:0 (enter)](https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/srcvs/workbench/vs/base/common/winjs.base.raw.js#L1343:0 %28enter%29)
[vs/workbench/vs/base/common/winjs.base.raw.js#L1316:0 (_run)](https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/srcvs/workbench/vs/base/common/winjs.base.raw.js#L1316:0 %28_run%29)
[/vs/workbench/parts/debug/node/v8Protocol.ts#L61:5 (V8Protocol.send)](https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/src/vs/workbench/parts/debug/node/v8Protocol.ts#L61:5 %28V8Protocol.send%29)
[/vs/workbench/parts/debug/node/v8Protocol.ts#L127:4 (V8Protocol.dispatch)](https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/src/vs/workbench/parts/debug/node/v8Protocol.ts#L127:4 %28V8Protocol.dispatch%29)
[/vs/workbench/parts/debug/node/v8Protocol.ts#L96:11 (V8Protocol.handleData)](https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/src/vs/workbench/parts/debug/node/v8Protocol.ts#L96:11 %28V8Protocol.handleData%29)
[/vs/workbench/parts/debug/node/v8Protocol.ts#L51:8 (V8Protocol.connect)](https://github.com/microsoft/vscode/blob/df352367df2efcfa9d602d471e4e2f42140a0f05/src/vs/workbench/parts/debug/node/v8Protocol.ts#L51:8 %28V8Protocol.connect%29)
at Socket. (out/vs/workbench/workbench.main.js:1593:24200)
at emitOne (events.js:77:13)

Issue 2:
In a node express app I have the following loop:

var msg = 'hello world';

var i = 0;

while (i < 100) {

msg = msg + i.toString();

i++;

}

I set up the local and watch windows in the debugger so that I can see the msg variable in both.

When stepping through the loop, if I press F10 very quickly, eventually the msg variable in the locals window will stop updating. See the screenshot below

When stepping through quickly, I sometimes see a message in the watch window that says 'Exception while processing request'

This is on 0.10.0
Issue 1:
Maximized state of window not correctly maximized. Width and height saved, but window out of workspace. [Win8.1, 0.117]

Issue 2:
When starting Atom, the maximized state of the window should be restored to what it was the last time Atom was closed.

Atom is never maximized on startup although the height and width are restored, causing the window to slightly be overlapped by the Windows Taskbar.

Using Atom 0.114.0 x64 on Windows.
Issue 1:
Hello,

I've just updated from 0.193.0 to 0.200.0 (on Debian Jessie).

When launched from the CLI, atom used to display the tree view of the current (CLI) directory, it is not the case anymore.

On the first start, the tree view is closed. In order to display the tree view of a given directory, you have to manually open a file contained into it. From that moment on, no mater the (CLI) directory atom is launched from, it always opens the tree view for the directory containing the latest opened file.

The only way to open a new directory in the tree view (from the GUI) is to right click the current one, select "remove project folder" than open a file contained into the desired directory.

Is it a bug or a feature? Is there any way to get the previous behavior back?

Issue 2:
Opening Atom without the command line (e.g. using the dock on OSX) now re-opens any previously opened windows

Would it be hard for me to do a PR to add a command-line option to open atom with the previous windows? I know my use-case is rare but I open X11 windows from the command-line and I have no desktop at all.

I know this isn't going to happen but logically using atom would open previous windows and atom . would open the working directory.