WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Bug report

This is my code. It's a hello world app with Next 9.0.1

Does not work in docker.

docker build -t cgcweb .

Describe the bug

Next 9 does not work in Docker.

To Reproduce

Here is my repo: https://github.com/WillowHQ/dockerIssue

yarn

yarn run build

yarn run start

Works as expected.

docker build -t cgcweb .

Sending build context to Docker daemon 1.076MB

Step 1/9 : FROM node:8.9.4

---> 672002a50a0b

Step 2/9 : COPY . .

---> 930ba71436a7

Step 3/9 : RUN rm -rf node_modules

---> Running in 6a02f97d7e04

Removing intermediate container 6a02f97d7e04

---> 417bb64d94c6

Step 4/9 : RUN rm -rf .next

---> Running in fb08b231ad4c

Removing intermediate container fb08b231ad4c

---> 21565ed63d03

Step 5/9 : RUN rm yarn.lock

---> Running in 262dd1b4f4a6

Removing intermediate container 262dd1b4f4a6

---> d4397a346e97

Step 6/9 : RUN yarn install

---> Running in b7432590fedd

yarn install v1.3.2

warning package.json: No license field

info No lockfile found.

warning No license field

[1/4] Resolving packages...

[2/4] Fetching packages...

info fsevents@1.2.9: The platform "linux" is incompatible with this module.

info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.

[3/4] Linking dependencies...

[4/4] Building fresh packages...

success Saved lockfile.

Done in 14.75s.

Removing intermediate container b7432590fedd

---> 1f5bc4dd889f

Step 7/9 : RUN yarn run build

---> Running in 4df33457b0f6

yarn run v1.3.2

warning package.json: No license field

$ next build

Build error occurred

{ Error: ENOENT: no such file or directory, stat '/dev/fd/10' errno: -2, code: 'ENOENT', syscall: 'stat', path: '/dev/fd/10' }

error Command failed with exit code 1.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

The command '/bin/sh -c yarn run build' returned a non-zero code: 1

Click on '....'

Scroll down to '....'

See error

docker run -p 3000:3000 -it cgcweb

Expected behavior

A clear and concise description of what you expected to happen.

I'd expect Next to work in Docker.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

OS: MacOS

Node 8.9.4 and 10.13

Version of Next.js: [9.0.1]

Additional context

Add any other context about the problem here.

Issue 2:
Bug report

Describe the bug

I have following code inside server.js

server.get('/ar/:id', (req, res) => {
const queryParams = {id: req.params.id};
const pagePath = '/artist';
return ssrCache({req, res, pagePath, queryParams})
});

And

<Link as={`/ar/${o.id}`} href={`/artist?id=${o.id}`}>

in the ./page/artist.js file. It works properly when build and run locally, but will return

'404 This page could not be found.' when it is deployed with docker container when trying to refresh the pages.

To Reproduce

The server.js code is copy paste from ssr-caching example.

Expected behavior

Screenshots

If applicable, add screenshots to help explain your problem.

System information

OS: macOS, Ubuntu 18.04

Browser Chrome

Version of Next.js: [9.0.1]

Additional context

Add any other context about the problem here.
Issue 1:
In the Find widget, the "Previous match" and "Next match" buttons have labels which include their associated keybindings in parentheses. The "Replace" and "Replace All" buttons in the Replace Input box don't display keyboard shortcuts.

I looked into this a bit before creating an issue, and the solution isn't the simple "look up keybinding --> add to label" approach that I hoped for. It looks like Replace and Replace All don't actually have keybindings defined. Instead, the keys are hardcoded into the _onReplaceInputKeyDown() method of findWidget.ts.

I would like to see Replace and Replace All get configurable keyboard shortcuts. The defaults would come from the existing hardcoded values, so the core functionality would be unchanged. With configurable keyboard shortcuts it would be easier to display them cleanly on the Replace and Replace All buttons, and we get some flexibility as a free bonus.

I would like to implement this and submit a PR, but wanted to document and perhaps discuss the issue first to make sure that sort of contribution would be OK. Some comments in #406 brushed up against what I'm suggesting here, but I didn't find any other potential duplicate issues.

Issue 2:
Hi there,

This happens in 10.8, and it also happened in the last one before that.

How to reproduce;

Create a new extension via "yo code". I went with a TypeScript extension.

Replace the command implementation with something like this:

let disposable = vscode.commands.registerCommand('extension.sayHello', () => {

var editor = vscode.window.activeTextEditor;
if(!editor) {
return;
}

var output = vscode.window.createOutputChannel("regex test");

var count = 0;
for(var i=0; i < editor.document.lineCount; i++)
{
var line = editor.document.lineAt(i).text;

if(line.match('vscode')) {
console.log('Line matches: ' + line);
output.appendLine(line);
count++;
}

}

output.show();

vscode.window.showInformationMessage('Found ' + count + ' matches');
});

Press F5 to open a new Code window with the extension running as part of it.

Paste some text into the window, where some lines will match. I just pasted the source code from the first window into the new one.

Run the extension - F1 then hello, and press enter.

At least on my machine, this correctly finds the expected lines. The console log output is called only once per line.

However, in the OutputChannel, I see something strange. Let us for clarity say that this was the expected output:

1
2
3
4
5
6
7
8
9

Then this would be the actual output:

1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9

In other words, it duplicates all the output lines except for the first one.

I created a new test project to reproduce this and it behaved the same way.
Issue 1:
Description

Code to reproduce the issue:

import jax
import jax.random
import jax.numpy as jnp

def myfun(x, key):
n = 20
zeros = jnp.full((n,), 0)
ones = jnp.full((n,), 1)
maxval = x[ones] - 1
return jax.random.randint(key, (n,), zeros, maxval)

key = jax.random.PRNGKey(1)
x = jnp.array([0, 2])
y1 = myfun(x, key)
y2 = jax.jit(myfun)(x, key)
print(y1)
print(y2)

Output:

[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 1 1 0 1 1 0 1 1 1 0 0 1 1 0 1 0 1 1 1]

Here maxval is an array full of ones, hence randint should produce zeros only. This is the case with non-jitted version of myfun, while jitted myfun incorrectly produces a mixture of ones and zeros.

What jax/jaxlib version are you using?

jax 0.3.16, jaxlib 0.3.15

Which accelerator(s) are you using?

CPU

Additional System Info

No response

Issue 2:
I've come across some confusing randint behavior where it seems like maxval is being treated as inclusive rather than exclusive. I've narrowed it down this snippet of code that repros the issue on CPU and GPU:

@jax.jit
def test():
batch = jnp.ones([8, 32])

maxval = batch.shape[1] - jnp.argmax(batch == 1, axis=-1) - 1

seq_crop_first_idx = jax.random.randint(
jax.random.PRNGKey(0),
[batch.shape[0]],
0,
maxval)

return maxval, seq_crop_first_idx
test()

Results in:

(DeviceArray([31, 31, 31, 31, 31, 31, 31, 31], dtype=int32),
DeviceArray([28, 6, 18, 0, 10, 8, 31, 6], dtype=int32))

maxval is clearly all 31, but the second to last output is also 31.

Here's a colab version: https://colab.research.google.com/drive/1RJ90xhN-VU7PMwecKhPCCVX1XYhH45FQ?usp=sharing
Issue 1:
When using iter_lines with chunk_size other than None, it can generate an extra blank line if the end of a chunk lands on a delimiter.

Reproduction Steps

import StringIO
import requests

def getTestFile():
f = StringIO.StringIO()
f.write('a-b')
f.seek(0)
return f

r = requests.Response()
r.raw = getTestFile()
print [l for l in r.iter_lines(delimiter='-')]

r = requests.Response()
r.raw = getTestFile()
print [l for l in r.iter_lines(delimiter='-', chunk_size=2)]

Expected Result

['a', 'b']

['a', 'b']

Actual Result

['a', 'b']

['a', '', 'b']

Proposed Fix

I modified iter_lines as follows, and the above test passes:

def iter_lines(self, chunk_size=ITER_CHUNK_SIZE, decode_unicode=None, delimiter=None):
"""Iterates over the response data, one line at a time. When
stream=True is set on the request, this avoids reading the
content at once into memory for large responses.

.. note:: This method is not reentrant safe.
"""

pending = None

for chunk in self.iter_content(chunk_size=chunk_size, decode_unicode=decode_unicode):

if pending is not None:
chunk = pending + chunk

if delimiter:
lines = chunk.split(delimiter)
else:
lines = chunk.splitlines()

if lines and lines[-1] and chunk and lines[-1][-1] == chunk[-1]:
pending = lines.pop()
elif lines and lines[-1] == '':
pending = lines.pop()
else:
pending = None

for line in lines:
yield line

if pending is not None:
yield pending

System Information

$ python -m requests.help

{
"chardet": {
"version": "3.0.3"
},
"cryptography": {
"version": ""
},
"implementation": {
"name": "CPython",
"version": "2.7.13"
},
"platform": {
"release": "16.6.0",
"system": "Darwin"
},
"pyOpenSSL": {
"openssl_version": "",
"version": null
},
"requests": {
"version": "2.17.3"
},
"system_ssl": {
"version": "100020bf"
},
"urllib3": {
"version": "1.21.1"
},
"using_pyopenssl": false
}

This command is only available on Requests v2.16.4 and greater. Otherwise,

please provide some basic information about your system (Python version,

operating system, &c).

Issue 2:
Here is a small test program to demonstrate the bug:

import requests

url = "http://lohas.pixnet.net/blog"
r = requests.get(url)
iter_lines = [line for line in r.iter_lines(chunk_size=7, decode_unicode=False)]
split_lines = r.content.splitlines()
for index, (iline, sline) in enumerate(zip(iter_lines, split_lines)):
if iline != sline:
print("line {} is broken".format(index))
print(iline, len(iline))
print(sline, len(sline))
break

Expected behavior:

r.iter_lines() should give the same result as r.content.splitlines()

Actual behavior:

The test program generates the following output:

line 275 is broken
b'' 0
b'\t\t\t<tbody>' 10

Changing chunk_size can break different lines.
Issue 1:
Julia v1.3.0 on OSX v10.15.4

a = Array[]

append!(a, "foo")
> ERROR: MethodError: Cannot `convert` an object of type Char to an object of type String

push!(a, "bar")
> 4-element Array{String,1}:
#undef
#undef
#undef
"bar"

Issue 2:
Consider the following code demonstrating the bug in append!

julia> a = Int64[]
0-element Array{Int64,1}

julia> append!(a, [1.1, 2.2])
ERROR: InexactError()
in copy! at abstractarray.jl:344
in append! at array.jl:447

julia> a
2-element Array{Int64,1}:
13128344792
4521590816

Now, in this case the program terminates with an error, but if the append statement is within a try/catch block the growth of the array can go unnoticed.

I actually discovered this bug in testing code, where I was testing that some code involving an append! raised an appropriate error. As soon as I added this test, all other tests in my code started to fail miserably.
Issue 1:
const cannot be applied to instance variables, but it would be nice if we can declare immutable instance variables (with final keyword, for example).

Will there be support for this functionality?

class Foo {
private final str = 'str';
private final num: number;
constructor(private final bool: boolean) {
this.num = 0;
}

doSomething() {
// The below codes raise compilation errors
this.str = '';
this.num = 0;
this.bool = false;
}
}

Issue 2:
Some properties in JavaScript are actually read-only, i.e. writes to them either fail silently or cause an exception. These should be modelable in TypeScript.

Previous attempts to design this have run into problems. A brief exploration:

interface Point {
x: number;
y: number;
}
interface ImmutablePoint {
readonly x: number;
readonly y: number;
}
var pt: ImmutablePoint = { x: 4, y: 5 }; // OK, can convert mutable to non-mutable
pt.x = 5; // Error, 'pt.x' is not a valid target of assignment

var pt2: Point = pt; // Error, cannot convert readonly 'x' to mutable 'x'

// Possibly bad behavior
var pt3: Point = { x: 1, y: 1 };
var pt4: ImmutablePoint = pt3; // OK
pt3.x = 5; // pt4.x is also changed?

// Really bad behavior
/** This function was written in TypeScript 1.0 **/
function magnitudeSquared(v: { x: number; y: number }) {
return v.x * v.x + v.y * v.y;
}
// Now try to use it with ImmutablePoint
console.log(magnitudeSquared(pt)); // Error, cannot use readonly object in non-readonly call

Possible solutions?

Allow bivariance of mutability: this is very unsound

Something else clever? C++ did not do well with const contamination
Issue 1:
It would be nice to have a feature for page.selectOption that is similar to what was done in #4342. It would allow us to target a <select> based on the accompanying label.

<label for="my-select">Choose a color</label>
<select id="my-select">
<option value="red">Red</option>
<option value="blue">Blue</option>
</select>

await page.selectOption('text="Choose a color"', 'blue');

Issue 2:
It would be amazing to have something similar to #3466 but for <select> elements.

<label for="pet-select">Choose a pet</label>
<select id="pet-select">
<option value="dog">Dog</option>
<option value="cat">Cat</option>
</select>

Then allow using await page.selectOption('text=Choose a pet', 'dog')
Issue 1:
System information (version)

OpenCV => 4.1.0

Operating System / Platform => Windows 64 Bit

Compiler => Visual Studio 2017

Gpu Model-> RTX 2080 - 2 and 3 Devices tested

Detailed description

Running minmax on multiple gpus will cause GPU shared memory allocation to increase until out of memory error occurs.

The problem occurs on driver version 441.22, but not on driver version 431.60.

A number of other methods were tested and only minmax produces a shared memory leak.

Steps to reproduce

```.cpp

#include

#include "opencv2/imgproc.hpp"

#include "opencv2/cudafilters.hpp"

#include "opencv2/cudaimgproc.hpp"

#include "opencv2/cudaarithm.hpp"

using namespace std;

using namespace cv;

int main()

{

double min = 0;

double max = 0;

int numDevices = cuda::getCudaEnabledDeviceCount();

cuda::GpuMat * img = new cuda::GpuMat[numDevices];

for (int i = 0; i < numDevices; i++)

{

cuda::setDevice(i);

img[i] = cuda::GpuMat(500, 500, CV_32F);

cuda::printShortCudaDeviceInfo(i);

}

for (int i = 0; ; i++)

{

cuda::setDevice(i % numDevices);

cuda::minMax(img[i%numDevices], &min, &max);

}

}

```

Issue 2:
System information (version)

OpenCV =>3.2

Operating System / Platform => Windows 64 Bit

Compiler => Visual Studio 2017

Detailed description

the shape of outputs of RegionLayer is computed as following:

opencv/modules/dnn/src/layers/region_layer.cpp

Line 94
in
76eb389

outputs = std::vector<MatShape>(1, shape(inputs[0][1] * inputs[0][2] * anchors, inputs[0][3] / anchors));

that's does not matter if we input only one image using blobFromImage, but if we input multiple images using blobFromImages then the shape of outputs is not right, and it should changed to

outputs = std::vector<MatShape>(1, shape(inputs[0][0], inputs[0][1] * inputs[0][2] * anchors, inputs[0][3] / anchors));

when forward this layer, we should also forward all inputs:

opencv/modules/dnn/src/layers/region_layer.cpp

Lines 218 to 222
in
76eb389

const float *srcData = inpBlob.ptr<float>();

float *dstData = outBlob.ptr<float>();

// logistic activation for t0, for each grid cell (X x Y x Anchor-index)

for (int i = 0; i < rows*cols*anchors; ++i) {

should change to

const float *srcData = inpBlob.ptr<float>();
float *dstData = outBlob.ptr<float>();
CV_Assert(inpBlob.size[0] == outBlob.size[0]);

for (int n = 0; n < inpBlob.size[0]; n++)
{
// logistic activation for t0, for each grid cell (X x Y x Anchor-index)
for (int i = 0; i < rows * cols * anchors; ++i) {
......
srcData += inpBlob.step1(0);
dstData += outBlob.step1(0);
}
Issue 1:
ℹ Computer information

PowerToys version: 0.20.1

PowerToy Utility: Keyboard Manager

Running PowerToys as Admin: yes

Windows build number: 19.041.423

📝 Provide detailed reproduction steps (if any)

Assign any key in Keyboard Manager to behave as 'Sleep'

Press that key

✔️ Expected result

Computer goes in the sleep mode.

❌ Actual result

Literally nothing happens. Other commands work fine.

📷 Screenshots

Issue 2:
Summary of the new feature/enhancement

So currently the search function as we open it and search for files everything seems to be doing right but the issue I have is this and I'm not sure if it's a bug or something that can be improved on. So what exactly is this issue is that every time I open the search and search a file/program let say and then till this point is good but then when I open up the search again whatever that I type previously is still around which makes me have to delete them and retype in what is the new file/program that I'm looking for and aside from that the text cursor is not active which makes me have to go an extra step to get my mouse to click on the search to have the cursor active and then delete the text previously keyed and then type in the new text to look for the file/program and I feel like this is something small that can be improved and help in the long run in things.

Proposed technical implementation details (optional)

What I proposed is this.

when we open up the search again after the initial what can be done is whatever that was previously keyed can stay put but make it highlighted and have the text cursor active so that with a click of delete we can straight away type in something new to move on to the next thing.

or

simply make the text cursor active instead of what is currently available which the text cursor is not active and many steps have to be taken to just retype something in the search to look for something new.
Issue 1:
I can import numpy in the Python console, but cannot import it in an embedded python C++ application that used the same Python version with the same folders. I have only this Python version on my PC. Importing other packages from the application works.

The application sets Py_SetPythonHome() to my Python folder:

C:\Users\MyName\AppData\Local\Programs\Python\Python37-32

print(os.file) prints the correct file.

Reproducing code example:

Py_SetProgramName(Py_DecodeLocale(ProgramName,0));
Py_SetPythonHome(Py_DecodeLocale("C:\\Users\\Richard\\AppData\\Local\\Programs\\Python\\Python37-32",0));
Py_Initialize();
PyModuleMain = PyImport_AddModule("__main__");
PyGlobalDict = PyModule_GetDict(PyModuleMain);
const char *Content = "import os; print(os.__file__)\nimport numpy";
PyRun_SimpleString(Content);

import os; print(os.__file__)
import numpy

Error message:

Traceback (most recent call last):

File "C:\Users\Richard\AppData\Local\Programs\Python\Python37-32\lib\site-packages\numpy\core_init_.py", line 40, in

from . import multiarray

File "C:\Users\Richard\AppData\Local\Programs\Python\Python37-32\lib\site-packages\numpy\core\multiarray.py", line 12, in

from . import overrides

File "C:\Users\Richard\AppData\Local\Programs\Python\Python37-32\lib\site-packages\numpy\core\overrides.py", line 6, in

from numpy.core._multiarray_umath import (

ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 2, in

File "C:\Users\Richard\AppData\Local\Programs\Python\Python37-32\lib\site-packages\numpy_init_.py", line 142, in

from . import core

File "C:\Users\Richard\AppData\Local\Programs\Python\Python37-32\lib\site-packages\numpy\core_init_.py", line 71, in

raise ImportError(msg)

ImportError:

...

Numpy/Python version information:

1.16.2, 3.7 32 bit Windows

Issue 2:
I recently wanted to use the same way to construct a linspace as I did with an mgrid, i.e

T_size = slice(2, 30, 1)
P_size = slice(0, 80, 2)
grid = np.mgrid[T_size, P_size]

....

linspace = np.linspace(T_size)
# BOOM... exception

TypeError: _linspace_dispatcher() missing 1 required positional argument: 'stop'

I think that interoperability here would be great.
Issue 1:
I referred create-react-app sample and added more pages, but everytime I click on router link, I throws below error

Warning: Material-UI: You can only instantiate one class name generator on the client side.

If you do otherwise, you take the risk to have conflicting class names in production.

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

Expected Behavior

I should not be getting the above warning

Current Behavior

Everytime you click on route link it throws warning

Steps to Reproduce (for bugs)

https://codesandbox.io/s/6z2jn1xyrw

Your Environment

See codesandbox.io link for more details

Tech
Version

Material-UI
v1.0.0-beta.12

React
16

Issue 2:
Fresh problem with last beta 26 in Select component. See steps for reproduce.

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

Expected Behavior

On blur event the label MUST be moved above the field.

Current Behavior

On blur event the label return back to select field and mixed w/ selected items context

onFocus

onBlur

Absolutely the same problem on your demo site https://material-ui.com/demos/selects/#multiple-select

Steps to Reproduce (for bugs)

Going to https://material-ui.com/demos/selects/#multiple-select

Select some items in multiple select example

Click on any space on page

See how label mixed with selected variants on field

Context

Your Environment

Tech
Version

Material-UI
1.0.0-beta.26

React
15.6.2

browser
Chrome 63.0.3239.84 for Mac
Issue 1:
When the "Auto Hide Menu Bar" is enabled in the settings, some of the keyboard combinations to bring it up do not work, because they seem to conflict with other assignments eg Alt + f and Alt + h

To reproduce:

Check "Auto Hide Menu Bar" in settings

Have a file opened

Clicking Alt + f will behave like Ctrl + Right arrow, instead of opening the "File" popup from the menu bar

Issue 2:
The normal Windows Alt+{letter} menu shortcuts don't work in Atom. Holding Alt highlights the relevant letter in each menu name, but then pressing the letter doesn't open the menu. For example, Alt+F should open the File menu, but instead the Key Binding Resolver shows it invoking the following:

editor:move-to-end-of-word atom-text-editor resources\app\keymaps\emacs.json

This is a vanilla install of Atom 0.141.0 in Windows 7 Home Premium x64. I haven't opted in to enabling anything Emacs related.

Pressing Alt also doesn't focus the menu bar and allow it to be navigated by arrow keys like it normally does in Windows.

I'm reporting this per this suggestion