WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Abstract and concrete parametric types can inherit from other parametric types with contradictory type constraints for example:

julia> abstract type A{T<:Int} end

julia> abstract type B{T<:Array} <: A{T} end

julia> struct C{T} <: B{T}
f::T
end

None of these types can ever be used

julia> B{Array}
ERROR: TypeError: in A, in T, expected T<:Int64, got Type{Array}
Stacktrace:
[1] top-level scope at none:0

julia> B{Int}
ERROR: TypeError: in B, in T, expected T<:Array, got Type{Int64}
Stacktrace:
[1] top-level scope at none:0

julia> C(3)
ERROR: TypeError: in B, in T, expected T<:Array, got Type{Int64}
Stacktrace:
[1] C(::Int64) at ./REPL[3]:2
[2] top-level scope at none:0

julia> c([3])
ERROR: UndefVarError: c not defined
Stacktrace:
[1] top-level scope at none:0

julia> versioninfo()
Julia Version 1.0.1
Commit 0d713926f8 (2018-09-29 19:05 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin14.5.0)
CPU: Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, haswell)

Issue 2:
Suppose we have the following definitions

#type this into session 1
abstract Domain{T<:Number}
immutable Interval{T} <: Domain{T}
a::T
b::T
end

For the purposes of this issue I expect the following block of code to work exactly as the above (if you type them each into a different Julia session). Perhaps this is not a justified expectation.

#type this into session 2
immutable Interval{T<:Number}
a::T
b::T
end

In both sessions, this works as expected

julia> Interval{Float64}(3,4)
Interval{Float64}(3.0,4.0)

julia> Interval("he","llo")
ERROR: type: Domain: in T, expected T<:Number, got Type{ASCIIString}

but if you go on to define in each session

Interval(a::Number,b::Number) = Interval(promote(a,b)...)

then session 1 loops on Interval(3,4.) (and any number types) but it works as I expect in session 2.

This is consistent with the following

#session 1
julia> methods(Interval)
#2 methods for generic function "Interval":
Interval(a::Number,b::Number) at none:1
Interval{T}(a::T,b::T)

#session 2
julia> methods(Interval)
#2 methods for generic function "Interval":
Interval{T<:Number}(a::T<:Number,b::T<:Number)
Interval(a::Number,b::Number) at none:1

The solution seems to be to be redundant

#type this into session 1
abstract Domain{T<:Number}
immutable Interval{T<:Number} <: Domain{T}
a::T
b::T
end

Furthermore, I think this should raise some kind of red text

#a new session
abstract Domain{T<:Number}
immutable Interval{T<:String} <: Domain{T}
a::T
b::T
end

because it seems like that type is not able to be constructed

julia> Interval("he","llo")
ERROR: type: Domain: in T, expected T<:Number, got Type{ASCIIString}

julia> Interval(3,4)
ERROR: `Interval{T<:String}` has no method matching Interval{T<:String}(::Int64, ::Int64)
Issue 1:
I've reported this problem before on discourse but apparently I didn't file an issue, and the fix was not included in 0.5.1. There is a performance bug in 0.5.0, and also now in 0.5.1, with arrays that have 6 or more subscripts. The bug is fixed in 0.4.7 and was also fixed in 0.6.0 last time I checked. Here is a sample.

julia> @time test_manyway.test2way(100000)
0.001451 seconds (6 allocations: 288 bytes)
49987.500777183195

julia> @time test_manyway.test4way(100000)
0.005792 seconds (7 allocations: 432 bytes)
50226.90084188317

julia> @time test_manyway.test6way(100000)
10.533045 seconds (64.00 M allocations: 1.526 GB, 1.35% gc time)
49979.21341756834

module test_manyway

function test2way(n)
a2 = zeros(2,2)
x = 0.0
for tr = 1 : n
for j1 = 1 : 2
for j2 = 1 : 2
a2[j1,j2] = rand()
end
end
x += a2[1,1]
end
x
end

function test4way(n)
a4 = zeros(2,2,2,2)
x = 0.0
for tr = 1 : n
for j1 = 1 : 2
for j2 = 1 : 2
for j3 = 1 : 2
for j4 = 1 : 2
a4[j1,j2,j3,j4] = rand()
end
end
end
end
x += a4[1,1,1,1]
end
x
end

function test6way(n)
a6 = zeros(2,2,2,2,2,2)
x = 0.0
for tr = 1 : n
for j1 = 1 : 2
for j2 = 1 : 2
for j3 = 1 : 2
for j4 = 1 : 2
for j5 = 1 : 2
for j6 = 1 : 2
a6[j1,j2,j3,j4,j5,j6] = rand()
end
end
end
end
end
end
x += a6[1,1,1,1,1,1]
end
x
end

function test7way(n)
a7 = zeros(2,2,2,2,2,2,2)
x = 0.0
for tr = 1 : n
for j1 = 1 : 2
for j2 = 1 : 2
for j3 = 1 : 2
for j4 = 1 : 2
for j5 = 1 : 2
for j6 = 1 : 2
for j7 = 1 : 2
a7[j1,j2,j3,j4,j5,j6,j7] = rand()
end
end
end
end
end
end
end
x += a7[1,1,1,1,1,1,1]
end
x
end

function test8way(n)
a8 = zeros(2,2,2,2,2,2,2,2)
x = 0.0
for tr = 1 : n
for j1 = 1 : 2
for j2 = 1 : 2
for j3 = 1 : 2
for j4 = 1 : 2
for j5 = 1 : 2
for j6 = 1 : 2
for j7 = 1 : 2
for j8 = 1 : 2
a8[j1,j2,j3,j4,j5,j6,j7,j8] = rand()
end
end
end
end
end
end
end
end
x += a8[1,1,1,1,1,1,1,1]
end
x
end

function test8wayb(n)
x = 0.0
x2 = 0.0
for tr = 1 : n
for j1 = 1 : 2
for j2 = 1 : 2
for j3 = 1 : 2
for j4 = 1 : 2
for j5 = 1 : 2
for j6 = 1 : 2
for j7 = 1 : 2
for j8 = 1 : 2
x2 = rand()
end
end
end
end
end
end
end
end
x += x2
end
x
end
end

Issue 2:
A few months back, I reported on discourse that arrays with 5 or more subscripts have severe performance problems in 0.5.0. This has apparently still not been fixed in 0.5.0 (although it is fixed in 0.6.0). I've noticed on github that several important packages are preparing to drop 0.4 support. If the consensus of the core Julia developers is to drop 0.4 support before 0.6.0 is released, then please issue a patch for this bug in 0.5.0, because right now 0.5.0 is unusable for me due to my heavy use of 5- and 6-subscript arrays. Apparently the patch for this bug is quite simple, but I am not able to patch my system image in Windows 10. (The instructions in the docs for patching system images did not work for me).

Thanks,

Steve Vavasis
Issue 1:
In button-groups.less we have a style to stick grouped buttons together:

.btn-group > .btn + .btn {
margin-left: -1px;
}

Tooltip javascript inserts div.tooltip between the buttons and the style breaks moving all buttons 1px right on mouse hover.

Issue 2:
http://jsfiddle.net/JEBdk/5/

tooltip or popover on btn-group. the btn-group is not display correctly!

the last btn have not round corners and between the btn's is a space.

my suggestion, by generating the tip or popover on the end of document .
Issue 1:
Challenge Name

All challenges

Issue Description

Cursor appears in the position a user clicks. But when a keyboard button is pressed, the curser jumps one line down. In the linked video I press "enter".

https://dl.dropboxusercontent.com/u/79449416/one%20line%20off%20error.mov

You can also detect this when the line below is shorter than the line you are clicking on, it won't let you place the cursor past the length of the line below.

Browser Information

Chrome, Version 52.0.2743.116 (64-bit)

OSX, El Capitan, Ver: 10.11.4 (15E65)

MacBook Pro (Retina, Mid 2012)

Issue 2:
In all the exercises, we the users are forced to press the enter key before writing any code.

Update:

We have locked the conversation temporarily on this thread to collaborators only, this has been resolved in staging, and will be live soon.

The fix can be confirmed on the beta website.

The workaround currently on production website is:

Press the Enter key on the challenge editor and then proceed with the challenge.

Apologies for the inconvenience meanwhile.

Reach us in the chat room if you need any assistance.
Issue 1:
all.bash runs with test -short. However, sometimes non-short tests break. See e.g. #10455 or #8617. These get found when someone eventually runs the full tests during development.

It'd be useful to have one fast builder run the full set of tests for each commit.

/cc @bradfitz

Issue 2:
The builders run the -short tests. However, we've seen non-short tests fail in the past. It'd be good for at least one builder somewhere on at least one arch/os to run the full suite.

cc @bradfitz
Issue 1:
As #2468 has mentioned, send_file opens a file that mean to be closed by some further processing of the WSGI server. However, test_client does not really run the WSGI server, causing the opened file not closed until all test ends, and thus triggers a ResourceWarning and causes cleaning code after a test request to fail.

Expected Behavior

A file opened by send_file() should be closed after response is sent.

from flask import Flask
from flask import send_file
import unittest
import os

app = Flask(__name__, root_path='.')

@app.route('/<path:filepath>')
def handle_request(filepath):
return send_file(filepath)

class Test(unittest.TestCase):
def test(self):
temp_file = os.path.join(os.path.dirname(__file__), 'test.txt')
for i in ('123abc', '&@!#^*', '你好嗎'):
with self.subTest(i=i):
test_text = 'test' + str(i)
with open(temp_file, 'w', encoding='UTF-8') as f:
f.write(test_text)
try:
with app.test_client() as c:
r = c.get(temp_file)
self.assertEqual(r.data.decode('UTF-8'), test_text)
finally:
os.remove(temp_file)

if __name__ == '__main__':
unittest.main()

Actual Behavior

The opened file is not closed properly after the response is sent, causing following code in the test fail to delete the file (which is temporarily generated for testing purpose).

......\test.py:22: ResourceWarning: unclosed file <_io.BufferedReader name='......\\test.txt'>
r = c.get(temp_file)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
......\case.py:704: ResourceWarning: unclosed file <_io.BufferedReader name='......\\test.txt'>
outcome.errors.clear()
ResourceWarning: Enable tracemalloc to get the object allocation traceback

======================================================================
ERROR: test (__main__.Test) (i=1)
----------------------------------------------------------------------
Traceback (most recent call last):
File "......\test.py", line 25, in test
os.remove(temp_file)
PermissionError: [WinError 32] 程序無法存取檔案，因為檔案正由另一個程序使用。: '......\\test.txt'

======================================================================
ERROR: test (__main__.Test) (i=2)
----------------------------------------------------------------------
Traceback (most recent call last):
File "......\test.py", line 25, in test
os.remove(temp_file)
PermissionError: [WinError 32] 程序無法存取檔案，因為檔案正由另一個程序使用。: '......\\test.txt'

======================================================================
ERROR: test (__main__.Test) (i=3)
----------------------------------------------------------------------
Traceback (most recent call last):
File "......\test.py", line 25, in test
os.remove(temp_file)
PermissionError: [WinError 32] 程序無法存取檔案，因為檔案正由另一個程序使用。: '......\\test.txt'

----------------------------------------------------------------------
Ran 1 test in 0.010s

FAILED (errors=3)

Environment

Python version: 3.8.1

Flask version: 1.1.2

Werkzeug version: 1.0.1

Issue 2:
The link http://flask.pocoo.org/docs/0.12/.latex/Flask.pdf referenced from http://flask.pocoo.org/ is broken.
Issue 1:
Electron version: 0.37.5

Operating system: Linux

We recently switched to Electron 0.37.5 for VS Code and changed our build scripts to replace ffmpeg with the version you guys offer as separate download. Our understanding is that this version is built with the target "chromium" as opposed to "chrome" and thus includes less codecs.

Surprisingly though the ffmpeg.so file for Linux is almost double the size for the separate download compared to what is included in the release.

Maybe the scripts are flipped and the separate download actually is the one built with "chrome" as target?

Issue 2:
Electron version: all

Operating system: Linux

The library in the electron binaries archive is stripped. Download electron-v0.37.2-linux-x64.zip and ffmpeg-v0.37.2-linux-x64.zip. Extract both archive and check the libffmpeg.so. In the electron archive it is stripped, but not in the ffmpeg archive. Shouldn't it be stripped?
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.7.4-SNAPSHOT

Operating System version: MacOS

Java version: java11

Steps to reproduce this issue

Please see

apache/dubbo-spring-boot-project#537

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!

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.0

Operating System version: mac

Java version: 1.8

Steps to reproduce this issue

start the consumer without provider, and it will throw "No Provider" exception. Below is not the full of my code, simplify on the ReferenceConfig.

try{
ReferenceConfigCache cache = ReferenceConfigCache.getCache();
Object proxy = cache.get(new ReferenceConfig());
}catch (Throwable e){
e.printStackTrace();
}

Start the provider

Always get null even the provider started.

Object proxyNew = cache.get(config);

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

We are able to get proxy after start up the provider.

Object proxyNew = cache.get(config);

Actual Result

What actually happens?

cache always return null even provider started.

I think, we have to return null once consumer startup failed.

public <T> T get(ReferenceConfig<T> referenceConfig) {
String key = generator.generateKey(referenceConfig);

ReferenceConfig<?> config = cache.get(key);
if (config != null) {
return (T) config.get();
}

T t = referenceConfig.get();
if (null == t){
return null;
}else{
cache.putIfAbsent(key, referenceConfig);
return t;
}
}

Otherwise, the consumer cannot recover, as it have been initialized. The solution of #2233 is not able to resolve the issue.

private void init() {
if (initialized) {
return;
}
initialized = true;
}
Issue 1:
Current behavior

Within a form which (by error) contains two inputs fields with the same "name" attribute value (firstName is this case) Angular binds all the validations for both fields

Expected behavior

I expected to throw an error or apply the validation only for one field

Minimal reproduction of the problem with instructions

Go to: Plnkr Example Code

The first field has only "required" attribute, so enter only ONE character

See that "valid" property is still false

Enter another two characters

Now "valid" is true because the second fields has also "minlength" validation

What is the motivation / use case for changing the behavior?

I think it's very confusing and there is almost no way to catch the problem in a big form

Please tell us about your environment:

All

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

All

Language: all

Issue 2:
I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

With either line comments or block comments, ngc includes @imports that are commented out in .scss files

Expected behavior

Don't do imports if they are commented out

Minimal reproduction of the problem with instructions

Write a commented-out @import in e.g. an ng-cli-created /src/styles.scss, pointing to something that does not exist.

Run something like ng build --prod && ngc && webpack

ng build --prod and webpack will ignore the commented-out lines, but ngc will follow the imports and err.

What is the motivation / use case for changing the behavior?

Behave like the other sass build tools which ignore commented-out lines.

Please tell us about your environment:

@angular/cli: 1.1.0-beta.0

node: 7.10.0

os: win32 x64

@angular/animations: 4.1.3

@angular/common: 4.1.3

@angular/compiler: 4.1.3

@angular/core: 4.1.3

@angular/forms: 4.1.3

@angular/http: 4.1.3

@angular/platform-browser: 4.1.3

@angular/platform-browser-dynamic: 4.1.3

@angular/platform-server: 4.1.3

@angular/router: 4.1.3

@angular/cli: 1.1.0-beta.0

@angular/compiler-cli: 4.1.3
Issue 1:
Elasticsearch version: 2.3.2

Plugins installed: [mapper-attachments]

JVM version: 1.8

OS version: Windows

Description of the problem including expected versus actual behavior:

Steps to reproduce:

Similar to elastic/elasticsearch-mapper-attachments#216 and #14946

We couldn't find as to in which version this was fixed.

If there is a document or references available, please do help us with the links leading to it

Provide logs (if relevant):

Describe the feature:

Issue 2:
Elasticsearch version:

2.3.2

JVM version:

1.7.0_101 x64

OS version:

Ubuntu 14.04

Description of the problem including expected versus actual behavior:

Hi,

i am using Elasticsearch 2.3.2 with the Mapper Attachments Plugin. I try to copy the extracted content to another field, as described here

This is not working for me, though.

I also found a closed bug here #14946. But the discussion does it not make clear, whether the bug has been resolved or not.

Therefore i would be happy, if you could give me a definitive answer, whether this is possible or not.

Steps to reproduce:

curl -XPOST 'http://localhost:9200/test' -d '{

"entry": {

"properties": {

"file": {

"type": "attachment",

"fields": {

"content": {

"type": "string",

"copy_to": "fulltext_en"

}

}

},

"fulltext_en": {

"type": "string",

"analyzer": "english"

}

}

}

}'

curl -XPOST 'http://localhost:9200/test/entry' -d '{

"file": "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQ="

}'

// the base64 is "Lorem ipsum dolor sit amet"

curl -XPOST 'http://localhost:9200/test/_search' -d '

{

"query": {

"match": {

"fulltext_en": "ipsum"

}

}

}'

the result of the search is then empty, which is wrong, as "ipsum" is contained in the base64.
Issue 1:
I have some properties of a deeply nested entity that need to be decimal. I have them marked up that way via the ORM Doctrine column type. Symfony2 renders an input field with a pattern attribute.

I am validating via AJAX. I post over the data, use the form bindRequest to setup an instance of the entity but then use the validator service.

The thing I am finding is that if my user enters some letters 'abc' into a decimal-mapped column property, the bindRequest is setting the property to 0 (zero) rather than 'abc' so that the Type(float) constraint is always calling is_float(0) unless I specify an actual number in the field.

Because I am using AJAX, the field validates behind the scenes due to this setting of 0 rather than 'abc' but my UI stays the same. as Symfony is not called again to regenerate it like you would have if I were posting the whole page.

2 options really - figure out a way of returning the modified value back to my UI in the AJAX response to reset it, or be able to tell Symfony to validate the value before setting/casting the values on my entity so that it truly validates the input and not the post-casted values.

I think actually the latter is what should truly be happening. I think Symfony should not be helping me out by casting values here.

Issue 2:
If you accidentally use {% if is_granted('ROLE_EMPLOYEE') %} in a view that does not have a Firewall/TokenStorage enabled the AuthorizationChecker throws an exception:

new AuthenticationCredentialsNotFoundException('The token storage contains no authentication token. One possible reason may be that there is no firewall configured for this URL.');

The solution is to use this:

{% if app.security.token is not null and is_granted('ROLE_EMPLOYEE') %}

Wouldn't it be better to just handle this exception inside SecurityExtension::isGranted and simply return false?
Issue 1:
Using the UCI HAR Dataset from this paper:

[1] Davide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra and Jorge L. Reyes-Ortiz. A Public Domain Dataset for Human Activity Recognition Using Smartphones. 21th European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning, ESANN 2013. Bruges, Belgium 24-26 April 2013.

import seaborn as sns
import pandas as pd
train_X = pd.read_csv("./train/X_train.txt", delim_whitespace=True, header=None)
train_y = pd.read_csv("./train/y_train.txt", delim_whitespace=True, header=None)
with open('./features.txt') as file:
header = []
for line in file:
header.append(line.strip().split()[1])
train_X.columns = header
train_X['labels'] = train_y
train_X['labels'] = train_X['labels'].astype('category')
sns.set_style("whitegrid")

then this fails with a cannot label index with a null key message from pandas

ax = sns.boxplot(x="labels", y="tBodyAcc-mean()-X", data=train_X)

while this works

ax = sns.boxplot(x=train_X["labels"], y=train_X["tBodyAcc-mean()-X"])

The failing code is the same as the one written in the documentation and if I load the "tips" dataset everything works exactly the same as in the documentation. But I can not for the life of me see what the difference is between my DataFrame and "tips" loaded from seaborn.

Issue 2:
Similar to https://stackoverflow.com/q/65206970/10447904:

(searched through GH issues with terms "None y axis inverted" as well as throwing in a "None"/"object" term in there, before opening this issue)

The simplest reproducing example I could find was:

df = pd.DataFrame({'x': [0.0, 0.0, 0.3], 'y': [0.0, None, 0.5]}, dtype='object')
sns.scatterplot(x='x', y='y', data=df) # y-axis inverted

^y axis upside down

Comparing with plt.scatter (expected, no inverting of y-axis):

plt.scatter(x=df['x'], y=df['y'])

According to the stackoverflow post, the problem stems from the y-axis containing Nones (and of dtype object).

In my original dataframe, only y is of dtype object (because of the Nones, I should have had it as float64), but for this reproducing example I had to cast both to object (in first line) to get it to work - I am confident I can find a reproducing example where x is float64 and y object though if necessary.

Is this expected behaviour? Given that matplotlib doesn't flip the y axis.

In this case I forgot to cast my column to float64 (or to use np.nans) but I figured Nones would be okay (/more or less equivalent) at the time :)
Issue 1:
It is noticed here: http://bjk5.com/post/44698559168/breaking-down-amazons-mega-dropdown

Issue 2:
Bootstrap's hierarchical menus are a lot like Mac OSX, i.e., broken. I'd like to suggest two changes that would greatly improve usability:

Don't hide the menu when you click on a divider or bottom/top padding.

Implement mouse movement tracked submenu display, like the one invented by Apple in the 80's and currently used prominently in Amazon's homepage. More info here.
Issue 1:
Question

the method InsertValue.getParameters use parametersCount to subList the parameters。but when counting the paramCount just accept ParameterMarkerExpressionSegment. so that when my insert sql has parameters like ifnull(?,1) , the value of paramCount is uncorrected 。finally

throw a java.sql.SqlException： No value specified for parameter 。

Issue 2:
parameter is not correctly resolved when parsing sql like insert ...... on duplicate key set column=?

please checkout InsertDuplicateKeyUpdateClauseParser.java

version: lastest