WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Version

2.5.16

Reproduction link

https://raw.githubusercontent.com/indus/stuff/master/vue_issue.jpg

(sorry - haven't found an online tool that shows type annotations)

Steps to reproduce

type the following in an TS enabled Editor like VS Code:

new Vue({
el: '#app',
props: {
object: {
type: Array,
required: true,
default: () => []
}
},
data: function () {
return {
message: 'Hello Vue.js!'
}
},
created: function () {
this.message;
}
})

What is expected?

correct type inference (at least) for 'message'

What is actually happening?

getting Error: "Property 'message' doesn't exist"

This doesn't happen when the type of the prop is Object:

new Vue({
el: '#app',
props: {
object: {
type: Object,
required: true,
default: () => {}
}
},
data: function () {
return {
message: 'Hello Vue.js!'
}
},
created: function () {
this.message;
}
})

or 'data' is just a simple object and not a function

new Vue({
el: '#app',
props: {
object: {
type: Array,
required: true,
default: () => []
}
},
data: {
message: 'Hello Vue.js!'
},
created: function () {
this.message;
}
})

Issue 2:
Version

2.5.13

Steps to reproduce

Create a simple component using Typescript:

import Vue from "vue"

Vue.extend({
props: {
myProp: {
type: Array,
},
},
computed: {
myComputed(): string {
return "hello"
},
otherComputed(): string {
return this.myComputed
},
},
})

We have the following error:

TS2322: Type '(() => any) | ComputedOptions<any>' is not assignable to type 'string'.
Type '() => any' is not assignable to type 'string'.

If we change the type of the prop to String, Number or smtg else we don't have this problem anymore

What is expected?

No error

What is actually happening?

Errors

This problem was not happening with the previous Typescript versions (at least 2.5.2)
Issue 1:
System information (version)

OpenCV => 4.1.0

Operating System / Platform => Android API Level 28 (Patch: June 1st, 2019)

Compiler => clang++ 7.0

Detailed description

Using JavaCamera2View will output a faulty camera image as shown below if the aspect ratio of the preview size, calculated by calcPreviewSize, does not match up with the actual screen aspect ratio.

For reference, the device I tested this on is a Xiaomi Mi A1 with the latest patches installed. It has a device screen size of 1920x1080. The calculated preview size, which is also being used in the image above, is 1440x1080. This results in an aspect ratio of 4:3 as opposed to the screen aspect ratio of 16:9. The highest preview size with the same aspect ratio as provided by the device is 1280x720. Here's a small snippet of the device's reported available preview sizes:

1440x1080 (automatically picked as "best")

1280x960

1280x720 (should be picked as "best")

1280x640

864x480

...

This behavior is due to calcPreviewSize assuming that the first output size provided by getOutputSizes can be assumed as the "best" preview size from the start. Deleting the two lines before looping over all available preview sizes fixes this behavior. Just for reference, the image below is the same scene as above but with the two lines deleted.

I'm willing to submit a PR since this fix is just deleting two lines of code. However I'd like to see if someone is able to confirm this behavior.

Steps to reproduce

Haven't found a way to reproduce it yet because it seems to be an issue that heavily depends on the device (and I only have one device to test it on). However overriding the call to calcPreviewSize in connectCamera with dimensions smaller than the device's screen dimensions should evoke this behavior.

Issue 2:
OpenCV version: 2.4

Host OS: Android 6.0

https://support.google.com/faqs/answer/7011127
Issue 1:
Ken Egervari opened SPR-6989 and commented

I have some code that purposefully puts "[" and "]" in the path, which eventually gets rendered to the id and name attributes on the input tag.

Code:

<@springForm.input type=type attributes=attributes path=path htmlEscape="true" /><br/>

At a high level, it gets used like this:

Code:

<@form.text path="studentAnswer.answers[${chunk.text}]" />

Unfortunately, spring's tag library is removing the "[" and "]", so what is left over is a giant string value. I must use this pattern since this page has multiple input fields that are totally random based on the list of text chunks.

Each form value is supposed to map to this:

private Map<String,String> answers = new HashMap<String, String>();

Of course, when the server tries to get the values, there are NPE's everywhere due to Spring's stupidity.

How did this break? I was using plain html before, and I just recently switched over to the tag library because it was the only way to get multipart's working correctly. Otherwise, Spring didn't pass the MultipartFile object to the domain object. I tried everything, and this is what fixed it.

Now that I have converted about 50 forms to use the tag library, I have finally arrived to the 1 outlier form that does not covert over successfully. Sigh.

Please tell me how I can get this to work so I can get this production code launched.

Affects: 3.0.1

Reference URL: http://forum.springsource.org/showthread.php?t=86199

Issue Links:

#11672 AbstractDataBoundFormElementTag generates incorrect input name attribute when using indexed properties ("is duplicated by")

Issue 2:
Nick Williams opened SPR-6363 and commented

Currently, Spring DAO has an org.springframework.dao.DuplicateKeyException that extends org.springframework.dao.DataIntegrityViolationException. This exception indicates that the specific data integrity violation was due to a unique key violation. It is very helpful in determining specific errors that occurred in an application.

However, if I want to determine if a data integrity violation was due to a foreign key violation, I have to test e.getMessage().toLowerCase().contains("foreign key").

I think Spring would be greatly improved if there were a ForeignKeyException that, by whatever way duplicate key violations are detected and thrown as a DuplicateKeyException, would be thrown if foreign key violations are detected.

Let me know if you have any questions.

Affects: 3.0 RC2
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.6.6

Operating System version: *nix

Java version: 1.7

When we use complex arguments, in telnet mode , we need use jsonArray to parse.

But in our code ,someone try to resolve an overwrite problem ,so make an issue #257

then @beiwei30 try to fix this issue use this code below 27917f2

The code will make the default method not take effect.

The code before like this

private static Method findMethod(Exporter<?> exporter, String method, List<Object> args) {
Invoker<?> invoker = exporter.getInvoker();
Method[] methods = invoker.getInterface().getMethods();
Method invokeMethod = null;
for (Method m : methods) {
if (m.getName().equals(method) && m.getParameterTypes().length == args.size()) {
if (invokeMethod != null) { // 重载
if (isMatch(invokeMethod.getParameterTypes(), args)) {
invokeMethod = m;
break;
}
} else {
invokeMethod = m;
}
invoker = exporter.getInvoker();
}
}
return invokeMethod;

We can have a default method with the the methodName and the same length arguments.

But after the code change , it must provides the correct arguments type. We should know

json parse cannot give the corrent type. It maybe JsonObject or even HashMap.

So someone points out this problem #2766.

In my opinion ,we should not define the same name method. Such as retry or timeout , these configs may just take effect in method or service or provider .In these cases ,methodName can stands for method. That is to say ,a lot of configs just consider the method name .

In dubbo 2.7.x, for this issue ,dubbo provides a new telnet command called select.

So ,We should consider which is better.

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

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.3

Operating System version: win7

Java version: jdk8

Steps to reproduce this issue

define a service Interface like this.

public interface HelloBOMService {
PersonResponseType get(PersonRequestType request) throws Exception;
}

getServiceDefinition and print Method Parameter

ServiceDefinition serviceDefinition = ServiceDefinitionBuilder.build(HelloBOMService.class);
System.out.println(serviceDefinition.getMethods().get(0).getParameters());

the methodDefition return an empty list

Extends TypeBuilder to construct Protobuf typeBuilder and add SPI file.

@SPI
public interface TypeBuilder {

Use serviceDefition.getTypes() to obtains all TypeDefinitions. It is nessary to know which TypeDefinitionBuilder build this TypeDefition.When TypeBuilder generate same ServiceDefinition

use different logic.

Expected Result

We could get parameter type list from MethodDefition.

We should know which Builder build this TypeDefition.
Issue 1:
how the heck im able to change the font preference to get my zsh terminal work flawlessly with agnoster theme

Issue 2:
Environment

Windows build number: 10.0.18363.0
Windows Terminal version (if applicable): v0.5.2661.0

Any other software? PowerShell Core 6.2.2 is also installed.

Steps to reproduce

Install windows terminal from either Microsoft Store, or via download from GitHub release.

Try to launch the terminal.

Have tried un-installing/re-installing/rebooting multiple times to no avail.

Expected behavior

Terminal should launch, and at least show an error message.

Actual behavior

Terminal immediately crashes, you can see the ghost of a window frame before it disappears.
Issue 1:
Failed to resolve: glide-parent:library:unspecified

using

compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@jar' and

compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0'

Issue 2:
It seems like something has gone wrong while deploying the OkHttp3 integration to the Maven repos

http://repo1.maven.org/maven2/com/github/bumptech/glide/okhttp3-integration/1.4.0/okhttp3-integration-1.4.0.pom

<dependencies>
<dependency>
<groupId>glide-parent</groupId>
<artifactId>library</artifactId>
<version>unspecified</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.0.1</version>
<scope>compile</scope>
</dependency>
</dependencies>

The dependency to Glide itself is wrong and doesn't work.

Workaround for now:

compile 'com.github.bumptech.glide:glide:3.7.0'
compile ('com.github.bumptech.glide:okhttp3-integration:1.4.0'){
exclude group: 'glide-parent'
}

1.5.0 is released, there should be no workaround needed
Issue 1:
https://www.dropbox.com/s/rgy9iqt9o8pvfdl/wontplot.pandas

In [3]: s = pd.load('wontplot.pandas')

In [5]: s.plot()
Traceback (most recent call last):

File "<ipython-input-5-d3eb09d34df4>", line 1, in <module>
s.plot()

File "C:\dev\bin\Python27\lib\site-packages\pandas\tools\plotting.py", line 1727, in plot_series
plot_obj.generate()

File "C:\dev\bin\Python27\lib\site-packages\pandas\tools\plotting.py", line 853, in generate
self._make_plot()

File "C:\dev\bin\Python27\lib\site-packages\pandas\tools\plotting.py", line 1241, in _make_plot
x = self._get_xticks(convert_period=True)

File "C:\dev\bin\Python27\lib\site-packages\pandas\tools\plotting.py", line 1031, in _get_xticks
self.data = self.data.reindex(index=index.order())

File "C:\dev\bin\Python27\lib\site-packages\pandas\core\series.py", line 2638, in reindex
return Series(new_values, index=new_index, name=self.name)

File "C:\dev\bin\Python27\lib\site-packages\pandas\core\series.py", line 489, in __new__
subarr.index = index

File "properties.pyx", line 74, in pandas.lib.SeriesIndex.__set__ (pandas\lib.c:29092)

AssertionError: Index length did not match values

In [6]: s.index.shape
Out[6]: (480,)

In [7]: s.values.shape
Out[7]: (480,)

Issue 2:
The following code prints False when run with Pandas 0.15.0, but True with 0.15.2; I'm using Python 2.7.6 on Ubuntu 14.04.1 in both cases. Is this change in behavior expected? (I was using has_duplicates to detect duplicate tuples in the index.)

import pandas as pd
t = [(u'x', u'out', u'z', 5, u'y', u'in', u'z', 169),
(u'x', u'out', u'z', 7, u'y', u'in', u'z', 119),
(u'x', u'out', u'z', 9, u'y', u'in', u'z', 135),
(u'x', u'out', u'z', 13, u'y', u'in', u'z', 145),
(u'x', u'out', u'z', 14, u'y', u'in', u'z', 158),
(u'x', u'out', u'z', 16, u'y', u'in', u'z', 122),
(u'x', u'out', u'z', 17, u'y', u'in', u'z', 160),
(u'x', u'out', u'z', 18, u'y', u'in', u'z', 180),
(u'x', u'out', u'z', 20, u'y', u'in', u'z', 143),
(u'x', u'out', u'z', 21, u'y', u'in', u'z', 128),
(u'x', u'out', u'z', 22, u'y', u'in', u'z', 129),
(u'x', u'out', u'z', 25, u'y', u'in', u'z', 111),
(u'x', u'out', u'z', 28, u'y', u'in', u'z', 114),
(u'x', u'out', u'z', 29, u'y', u'in', u'z', 121),
(u'x', u'out', u'z', 31, u'y', u'in', u'z', 126),
(u'x', u'out', u'z', 32, u'y', u'in', u'z', 155),
(u'x', u'out', u'z', 33, u'y', u'in', u'z', 123),
(u'x', u'out', u'z', 12, u'y', u'in', u'z', 144)]
idx = pd.MultiIndex.from_tuples(t)
print idx.has_duplicates

Reference on StackOverflow here.
Issue 1:
Do you want to request a feature or report a bug?

I am not sure,maybe it's just a question.

What is the current behavior?

I fork the lasted master branch of react,and execute npm run build at the root directory.But get some errors below:

D:\WebStorm_workspace\react>npm run build

> react-build@16.0.0-alpha.11 build D:\WebStorm_workspace\react
> npm run version-check && node scripts/rollup/build.js

> react-build@16.0.0-alpha.11 build D:\WebStorm_workspace\react
> npm run version-check && node scripts/rollup/build.js

> react-build@16.0.0-alpha.11 version-check D:\WebStorm_workspace\react
> node ./scripts/tasks/version-check.js

STARTING react.development.js (umd_dev)
-- PARSE_ERROR (undefined) --
Unterminated string constant
{ file: 'D:\\WebStorm_workspace\\react\\src\\isomorphic\\React.js',
line: 9,
column: 7 }
undefined

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "D:\\nodejs\\node.exe" "D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.3.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! react-build@16.0.0-alpha.11 build: `npm run version-check && node scripts/rollup/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-build@16.0.0-alpha.11 build script 'npm run version-check && node scripts/rollup/build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the react-build package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run version-check && node scripts/rollup/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs react-build
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls react-build
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! D:\WebStorm_workspace\react\npm-debug.log

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/84v837e9/).

What is the expected behavior?

Build successfully.

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

16.0.0-alpha.11 .Windows.I am not sure whether it is fine in previous versions of React,this is my first build

Issue 2:
$ npm run build

react-build@16.0.0-alpha.6 build D:\github\react

npm run version-check && node scripts/rollup/build.js

react-build@16.0.0-alpha.6 version-check D:\github\react

node ./scripts/tasks/version-check.js

STARTING react.development.js (umd_dev)

Error: Could not load D:\github\react\node_modules\fbjs\lib\warning (imported by D:\github\react\src\isomorphic\modern\class\ReactNoopUpdateQueue.js): ENOENT: no such file or directory, open 'D:\github\react\node_modules\fbjs\lib\warning'

at D:\github\react\node_modules\rollup\dist\rollup.js:9461:10

But I can found the package in the node_modules.(win10 64)
Issue 1:
It appears there's no way to apply hidden-xs (or other of the hidden classes) to inline elements. In my particular case, I'd like helper text to appear to the right of my horizontal form fields -- but not on smartphones where form fields use 100% width.

I suggest adding a span.hidden-xs style (simlarly to the existing td.hidden-xs style), so using the span tag will allow for inline hidden elements when necessary. This would be an easy fix, adding only a small bit of CSS, and rather intuitive.

Note that the span.hidden-xs style cannot be added outside of the bootstrap CSS file, since it will not apply in the proper order. So my workaround was to create a new hidden-xs-inline class for my use.

Issue 2:
related to issues #8500 , #7808 , #4929 ; using .hidden-sm to hide span within .nav > li > a . Because class is display: block above -sm then text wraps to new line. Would you consider .hidden-* classes to be display: inline-block instead ?

Here's a jsfiddle of the two cases - but the repercussions could be greater outside of this situation so probably needs more consideration... http://jsfiddle.net/jholl/P86yf/
Issue 1:
yes 1234567 | head -1000000 > test.txt
julia -e "versioninfo()"
julia test.jl
juliav7 -e "versioninfo()"
juliav7 test.jl

Gives

julia version 0.6.0

0.823502 seconds (286.43 k allocations: 31.633 MiB)

1.165942 seconds (3.09 M allocations: 104.117 MiB, 48.31% gc time)

julia version 0.7.0

6.022019 seconds (34.26 M allocations: 859.682 MiB, 4.85% gc time)

5.411997 seconds (35.93 M allocations: 875.413 MiB, 4.22% gc time)

where test.jl is

if VERSION >= v"0.7.0"
using DelimitedFiles
end
@time readdlm("test.txt",' ', Int, '\n',dims=(1000000,1))
@time readdlm("test.txt")

Version Information Below:

Julia Version 0.6.0

Commit 9036443 (2017-06-19 13:05 UTC)

Platform Info:

OS: Linux (x86_64-pc-linux-gnu)

CPU: Intel(R) Xeon(R) CPU E7-8860 v4 @ 2.20GHz

WORD_SIZE: 64

BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)

LAPACK: libopenblas64_

LIBM: libopenlibm

LLVM: libLLVM-3.9.1 (ORCJIT, broadwell)

Julia Version 0.7.0

Commit a4cb80f (2018-08-08 06:46 UTC)

Platform Info:

OS: Linux (x86_64-pc-linux-gnu)

CPU: Intel(R) Xeon(R) CPU E7-8860 v4 @ 2.20GHz

WORD_SIZE: 64

LIBM: libopenlibm

LLVM: libLLVM-6.0.0 (ORCJIT, broadwell)

Issue 2:
The deprecation warning for readcsv reads:

julia> @time dat = readcsv("./data/EURUSD-2015-03.csv")
┌ Warning: `readcsv(io; opts...)` is deprecated, use `readdlm(io, ','; opts...)` instead.

with additional info given by

ERROR: WARNING: Base.readdlm is deprecated: it has been moved to the standard library package `DelimitedFiles`.
Add `using DelimitedFiles` to your imports.

Now on 0.6 for a 5177037x4 Matrix{Any}

julia> @time dat = readcsv("./data/EURUSD-2015-03.csv")
25.890791 seconds (83.21 M allocations: 2.709 GiB, 13.91% gc time)
5177037×4 Array{Any,2}
"EUR/USD" "20150302 00:00:00.237" 1.11603 1.11614
...

vs. 1.0

julia> using DelimitedFiles
julia> @time dat = readdlm("./data/EURUSD-2015-03.csv", ',')
318.996088 seconds (1.03 G allocations: 23.877 GiB, 6.93% gc time)
5177037×4 Array{Any,2}:
"EUR/USD" "20150302 00:00:00.237" 1.11603 1.11614
...
Issue 1:
https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/metrics/regression.py#L313

E..g, wrong in case y_true>0 but y_pred<=0. One should have:

if not (y_true >= 0).all() or not (y_pred >= 0).all():

or

if not ((y_true >= 0).all() and (y_pred >= 0).all()):

Issue 2:
Description

I found problem, where mean_squared_log_error() function does not catch error.

Steps/Code to Reproduce

Imagine simple situation, where regression model predicts negative value:

import numpy as np

y_true = np.array([1, 2, 3])
y_pred = np.array([1, -2, 3])
mean_squared_log_error(y_true, y_pred)

This happened, when my regression model predicted 1 negative value (among thousands of positive values).

Expected correct behavior:

Expected behavior is, that exception:

ValueError("Mean Squared Logarithmic Error cannot be used when targets contain negative values.")

should be raised and correctly inform about the underlying problem.

Exact location, where is the bug

Problematic code is exactly in sklearn/metrics/regression.py: (around line 313)

if not (y_true >= 0).all() and not (y_pred >= 0).all():
raise ValueError("Mean Squared Logarithmic Error cannot be used when "
"targets contain negative values.")

The condition is not fully correct and evaluates to False for example above - which is wrong.

It should evaluate to True, and raise the exception.

Suggested solution:

Just change the condition to:

if (y_true < 0).any() or (y_pred < 0).any():
raise ValueError("Mean Squared Logarithmic Error cannot be used when "
"targets contain negative values.")

so it catches the problem in case any of the y_true or y_pred contain negative value.
Issue 1:
Would it be possible to preserve the original window size, for windows that are maximized when dragged into a zone, so that they return to their last state if dragged from the zone? This would be similar to the way Windows 10 handles windows that are dragged after they are snapped to the edge of a screen.

Issue 2:
Summary of the new feature/enhancement:

The ability to show the system tray in multiple taskbars on different monitors, not being limited to the main one. Currently in Windows 10 there is no way to do that, and the taskbar on every monitor except the main one doesnt show any tray icons.
Issue 1:
Challenge http://www.freecodecamp.com/challenges/waypoint-give-your-javascript-slot-machine-some-stylish-images has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

In this challenge, the step one of the solve condition "Use the provided code three times. One for each slot" works on the premise the code $($('.slot')[0]).html('<img src = "' + images[slotOne-1] + '">'); is copied and entered three times. The solution is not solved if the user directly enters in the correct solution without copying and pasting the code.

This seems like an unnecessary step.

Issue 2:
The tests are not covering the task fully. One can pass it by updating only slot 0 three times: