WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Challenge Waypoint: Clone an Element Using jQuery has an issue.

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<script>
$(document).ready(function() {
$("#target1").css("color", "red");
$("#target1").prop("disabled", true);
$("#target4").remove();
$("#target2").appendTo("#right-well");
$("#target5").clone().appendTo("#left-well")
});
</script>

<!-- Only change code above this line. -->

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

Issue 2:
Challenge Waypoint: Use jQuery to Modify the Entire Page has an issue.

Please I want to know why double quotes don't work in the line while they work on the previous lines. Just curious really.

My code:

<script>
$(document).ready(function() {
$("#target1").css("color", "red");
$("#target1").prop("disabled", true);
$("#target4").remove();
$("#target2").appendTo("#right-well");
$("#target5").clone().appendTo("#left-well");
$("#target1").parent().css("background-color", "red");
$("#right-well").children().css("color", "green");
$("#left-well").children().css("color", "green");
$(".target:nth-child(2)").addClass("animated bounce");
$(".target:even").addClass("animated shake");
$("body").addClass("animated hinge"); //This line seems to have issues
});
</script>

jQuery Playground

#left-well

#target1
#target2
#target3

#right-well

#target4
#target5
#target6
Issue 1:
Versions:

react: 16.8.0-alpha-0

react-dom: 16.8.0-alpha-0

react-form-uncontrolled: 0.3.1

Problem

I wrote a simple Form library with just one hook (react-form-uncontrolled). However, using this library is displaying this error:

Invariant Violation: Hooks can only be called inside the body of a function component

Codesandbox: https://codesandbox.io/s/znx2r55lkp

Although the error says that it can only be called inside the body of a function component, is already on the body...

Original library code:

import React, { useCallback } from 'react'

function Form(props) {
const onSubmitForm = useCallback(event => {
event.preventDefault()
event.stopPropagation()

const { onSubmit = () => {} } = props
const fields = Array.prototype.slice.call(event.target)
.filter(field => field.name)
.reduce((form, { name, value }) => ({
...form,
[name]: typeof value === 'string'
? value.trim()
: value,
}), {})

onSubmit(fields)
}, [])
const { children } = props

return (
<form {...props} onSubmit={onSubmitForm}>
{children}
</form>
)
}

function Input(props) {
const { label, name } = props

return (
<label htmlFor={name}>
<div>{label}</div>
<input
{...props}
id={name}
name={name}
/>
</label>
)
}

module.exports = {
Form, Input,
}

At the beginning I thought that was for the Babel transpilation. Nevertheless, running a codesandbox using the transpiled code instead of the library, is working well:

https://codesandbox.io/s/k0j6zn2xzo

Downgrading these versions in the project that use the library, it works:

react -> from 16.8.0-alpha.0 -> to 16.7.0-alpha.2

react-dom: from 16.8.0-alpha.0 -> to 16.7.0-alpha.2

So looks that for some reason with 16.8.0-alpha.0 is not compatible.

Note: Perhaps is not an issue and is something that I'm doing wrong... Any sugestion?

Issue 2:
@gaearon I normally bundle React and all its add-ons in a different file from my application, but when using ReactPerf I forgot of including it in the same bundle of React and ReactDOM, so I noticed I was receiving an empty array from ReactPerf functions every time I was using them, and that is because ReactDebugTool is different for the application and for React which means flushHistory is also different.

What do you think about warning the user if there are more than one instance of ReactPerf/ReactDebugTool in the page?
Issue 1:
Pickling imshow objects (I'm using them used for heatmaps) fails with the following error in IPython after %matplotlib inline magic has been used. If inline figures are not set they work as expected.

UnpickleableError: Cannot pickle <type 'Image'> objects

Using matplotlib.tests.test_pickle.recursive_pickle fails reporting the following (similar to #1719):

Failed to pickle attribute "gridline" in (list/tuple item #0 in (attribute "majorTicks" in (attribute "xaxis" in (list/tuple item #1 in (list/tuple item #1 in (list/tuple item #0 in (attribute "_elements" in (attribute "_axstack" in (top level object))))))))). Type: <class 'matplotlib.lines.Line2D'>

However, using matplotlib.tests.test_pickle.depth_getter its possible to identify the object that is the cause of the initial error. It's at:

140628613187224 (8, <Image object at 0x7fe6a688c698>, u'attribute "_imcache" in (list/tuple item #0 in (attribute "images" in (list/tuple item #1 in (list/tuple item #1 in (list/tuple item #0 in (attribute "_elements" in (attribute "_axstack" in (top level object))))))))')

It looks as though this is a cache of the rendered image. Can these be ignored when pickling?

Issue 2:
Couple of issues I've found.

def latex_float(f, pos=0):
float_str = "{0:.2g}".format(f)
if "e" in float_str:
base, exponent = float_str.split("e")
return r"${0} \times 10^{{{1}}}$".format(base, int(exponent))
else:
return r"${}$".format(float_str)

formatter = FuncFormatter(latex_float)

corr = np.corrcoef(data['x'], data['y'])[0,1]
fig, ax = pl.subplots(figsize=figsize)
hist, _, _, im = ax.hist2d(data['x'], data['y'], norm=LogNorm(), bins=(bins_x, bins_y) , alpha=0.75, cmap = cmap)

cbar = fig.colorbar(im, ticks=[0., 1., 2., 5., 10., 20., 50., 100., 200., 500., 1000., 2000., 5000.], format=formatter)
cbar.set_label('number density', fontsize=labelsize, labelpad=79)
cbar.ax.tick_params(labelsize=labelsize-6, width=3, length=15)
cbar.ax.minorticks_on()

ax.set_xlabel(label_x, fontsize=labelsize)
ax.set_ylabel(label_y, fontsize=labelsize)
ax.grid(True, which='both', linewidth=3, linestyle='--', alpha=0.5)
ax.text(0.95, 0.05, '$\mathrm{{Corr}} = {:0.4f}$'.format(corr), transform=ax.transAxes, fontsize=labelsize, verticalalignment='bottom', horizontalalignment='right', bbox=textprops)

ax.tick_params(axis='both', which='major', labelsize=labelsize-6)

pickle.dump(ax, file('ZH_ax.pkl', 'w+'))

fig.close()

As it is, the code gives the following error:

Traceback (most recent call last):
File "make_plots_new.py", line 124, in <module>
pickle.dump(fig, file('ZH_ax.pkl', 'w+'))
File "/lib/python2.7/copy_reg.py", line 70, in _reduce_ex
raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle instancemethod objects

If I exclude the label formatter function in the colorbar, I get an error of

Traceback (most recent call last):
File "make_plots_new.py", line 124, in <module>
pickle.dump(fig, file('ZH_ax.pkl', 'w+'))
cPickle.UnpickleableError: Cannot pickle <type 'Image'> objects

How can one pickle?
Issue 1:
Bug Report

Current Behavior

After upgrading Babel to 7.7.x, the code constructors marked as "public" does not transpile. to. If I remove the "public" keyword it works. This only occurs with constructors, public methods still transpile properly.

Error:

public constructor() {
^^^^^^^^^^^

SyntaxError: Unexpected identifier

Input Code

REPL or Repo link if applicable:

class SomeClass {
public constructor() {
// Stuff
}
}

Expected behavior/code

Using "public constructor" worked before so this seems to be a regression.

Babel Configuration (.babelrc, package.json, cli command)

{
"presets": [
"@babel/typescript",
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
],
"plugins": ["@babel/proposal-class-properties"]
}

Environment

- "@babel/core": "7.6.4",
- "@babel/node": "7.6.3",
- "@babel/preset-env": "7.6.3",
- "@babel/preset-typescript": "7.6.0",
+ "@babel/core": "7.7.0",
+ "@babel/node": "7.7.0",
+ "@babel/plugin-proposal-class-properties": "7.7.0",
+ "@babel/preset-env": "7.7.1",
+ "@babel/preset-typescript": "7.7.0",

Additional context/Screenshots

https://www.typescriptlang.org/docs/handbook/classes.html#public-private-and-protected-modifiers

Issue 2:
"@babel/core": "^7.7.0",
"@babel/preset-env": "^7.7.0",
"@babel/preset-typescript": "^7.7.0",
"babel-loader": "^8.0.6",
"typescript": "^3.6.4",
"webpack": "^4.40.2",
"webpack-cli": "^3.3.9",
"webpack-dev-middleware": "^3.7.0",
"webpack-hot-middleware": "^2.25.0"

class Foo {
private constructor() {}
}

in resulting js file I see

class Foo {
private constructor() {}
}
Issue 1:
VSCode Version:1.2.0

OS Version:Windows 7 SP1, Windows 10 th2

Steps to Reproduce:

Set up japanese locale.

Launch Visual Studio Code

Run integration terminal.

Run "DIR" command at a integration terminal.

Indication of a japanese characters are piled at a integration terminal.

Issue 2:
VSCode Version: 1.1.1

OS Version: OSX 10.11.5

When debugging a unity project, debug popovers do not seem to be working for a class' fields/properties, but do work for local variables:

Hovering over the local variable schedule correctly shows its value:

Hovering over the private field data does nothing, but it's values do appear on the left panel:

Sorry if duplicate!
Issue 1:
>>> import scipy.special
>>> scipy.special.hankel1(0, 10**8)
(3.2060295340412074e-05+7.3063911655217044e-05j)
>>> scipy.special.hankel1(0, 10**9)
(2.4687471886269185e-05-5.2104226538976152e-06j)
>>> scipy.special.hankel1(0, 10**10)
(nan+nan*j)

I'm not sure but i think this should be done by either Mathematica or MATLAB but i got nan when use scipy.

Issue 2:
>>> import scipy.special
>>> scipy.special.hankel1(0, 10**8)
(3.2060295340412074e-05+7.3063911655217044e-05j)
>>> scipy.special.hankel1(0, 10**9)
(2.4687471886269185e-05-5.2104226538976152e-06j)
>>> scipy.special.hankel1(0, 10**10)
(nan+nan*j)

I'm not sure but i think this should be done by either Mathematica or MATLAB but i got nan when use scipy.
Issue 1:
Currently several dont_... flags don't work as one could expect if their value is False: dont_merge_cookies=False is the same as dont_merge_cookies=True - only the presence of a flag is checked. What about checking actual values?

Affected options:

dont_merge_cookies #846

dont_redirect

dont_retry

dont_cache from #821

There is also 'dont_filter' argument for Request; it handles False values.

Issue 2:
Case:

unexpected behavior identified for LinkExctractor with Unique = False if the page contains fully identical links (the same URL and text).

The current result returns one unique link instead of two or more identical ones.

For example:

Local http file

<html>
<body>
<a href='sample3.html'>sample 3 repetition</a>
<a href='sample3.html'>sample 3 repetition</a>
</body>
</html>```

2) Scrapy test code:
ignore the error about <GET file:///robots.txt> as we use local file

`import scrapy
from scrapy.linkextractors import LinkExtractor

class QuotesSpider(scrapy.Spider):
name = “test”
start_urls = [
'file:///<insert_your_local_path>/Test_file.html',
]

def __init__(self, *args, **kwargs):
super(QuotesSpider, self).__init__(*args, **kwargs)
self.le = LinkExtractor(unique=False)

def parse(self, response):
links = self.le.extract_links(response)
yield {'extract_link': links}`

3) run the code: scrapy crawl test, and get the result with one link:

{'extract_link': [Link(url='file:///<your_local_path>/sample3.html', text='sample 3 repetition', fragment='', nofollow=False)]}

Instead of the result with two links from HTML:

{'extract_link': [Link(url='file:///<your_local_path>/sample3.html', text='sample 3 repetition', fragment='', nofollow=False),
Link(url='<your_local_path>/sample3.html', text='sample 3 repetition', fragment='', nofollow=False)]}
Issue 1:
Currently there are duplicated checks (e.g. java location and version) in lib/src/android/android_workflow.dart and lib/src/android/android_studio.dart.

There should be one canonical Java locator / version checker that is shared between all components that need it (Android build steps, Flutter doctor checks, etc).

Issue 2:
I thought we had written this down somewhere but I don't see it. This came out of a discussion with @Hixie and is a nice-to-have feature, but not anywhere on our near-term roadmap. Filing as this came up in discussion with a customer the other day. The goal is to answer the question of "what devices/screensizes does my app look bad on".

Should be straightforward with flutter to attempt laying out an app/route/widget at lots of different sizes and validate that no layout exceptions (red areas) are thrown. In the headless desktop sky_shell this would be very quick. Presumably there exists a list of known Android device screen sizes/densities somewhere on the web which should be straightforward to compile.
Issue 1:
Challenge http://freecodecamp.com/challenges/bonfire-return-largest-numbers-in-arrays has an issue. Please describe how to reproduce it, and include links to screenshots if possible. My code is below and runs fine in Firebug console:

function largestOfFour(arr) {

var matrix = arr;

var longestNum = 0;

var longestArray = [];

for (var i = 0; i < matrix.length; i++) {

longestNum = 0;

for (var j = 0; j < matrix[i].length; j++){

if (longestNum < matrix[i][j]) {

longestNum = matrix[i][j];

}

}

longestArray.push(longestNum); // push highest value in first sub array

}

return longestArray;

}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);

In Firefox, it gives the error largestOfFour(...). should is undefined.

In Chrome, it gives the error cannot read propery 'eql' of undefined.

Issue 2:
Challenge http://www.freecodecamp.com/challenges/waypoint-comment-your-javascript-code has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

Hi there,

I came across this naturally from going through the jQuery exercises, I refreshed the page thinking what I imagine is test code to disappear, but alas, it's still there. This is what I'm seeing.

Hope this helps!

Thanks,

Bri
Issue 1:
I am trying the 'hero' example on angular.io and using JSPM to load my scripts (non-bundled).

To get relative urls for my templates, i tried the method in #2383 and added moduleId: module.id to my component.

import {Component} from 'angular2/core';
import {Hero} from "./hero";

@Component({
selector: 'my-hero-detail',
inputs: ['hero'],
moduleId: module.id,
templateUrl:'heroes.html'
})

However, doing so and then running the app, makes the html stuck at 'Loading...' with no errors in the console.

Screenshot:

Issue 2:
As mention on #2383 we could use Relative TemplateUrl just setting the property "module" inside component decoration.

Actually we are unable to use this feature because we use systemjs as described in "5 Min Quickstart - ts" sample....so we don't have any "module.id" set by the loader.

The question is just simple...how to use Relative TemplateUrl with SystemJS?
Issue 1:
I'm moving this issue here from codeplex:

https://typescript.codeplex.com/workitem/1414

This feature would help to use "library projects" in a way that you only have to specify the actual path once (eg. with a compiler flag).

I'd love to see this implemented in the official compiler. I think it's small work and adds huge value.

I can have a try at adding this but I'd value some guidelines on how to edit the compiler and how it would make it's way to be part of the official compiler.

Issue 2:
I'm using core-js with its correspond d.ts from DefinitelyTyped, but fails when I want compile my project. This only happen with typescript@next, with the last stable version compiles fine.

/usr/local/lib/node_modules/typescript/lib/lib.d.ts(1202,5): error TS2300: Duplicate identifier 'length'.
ts/lib/core-js.d.ts(73,5): error TS2300: Duplicate identifier 'length'.
ts/lib/core-js.d.ts(74,5): error TS2375: Duplicate number index signature.
Issue 1:
For completeness, we should add a polyfill for Node's vm module.

Issue 2:
"moduleResolution" is listed as an ignored compiler option, but why is this necessary? Ie. why does it fall under...

there are lots of parts of a TypeScript configuration file that are meaningless in a Deno context or would cause Deno to not function properly if they were applied.

... from https://deno.land/manual/typescript/configuration#how-deno-uses-a-configuration-file

compilerOptions.moduleResolution is meaningful (as it relates to loading third-party code) but I fail to see how it causes Deno to function improperly.

Typescript itself says that the "classic" strategy (which is what Deno uses) should only exist for backwards-compatability which means that a lot of projects written in Typescript are bound to use Node's strategy where importing a directory will look (by default) for an index.ts file.
Issue 1:
It should be possible to assign a module to a domain. Currently you can only set subdomain.

Issue 2:
File structure:

project -
- templates \
- a \
search.html
- b \
search.html
- start.py
- myapplication \
- test.py

Start file:

# start.py
from flask import Flask
from myapplication.test import test_blueprint

app = Flask(__name__)
app.register_blueprint(test_blueprint)

my application

# test.py
from flask import Blueprint, render_template, abort
from jinja2 import TemplateNotFound

test_blueprint = Blueprint('test_blueprint', __name__,
template_folder='absolute_path_to_project/templates/a')
# YES, I specified the absolute path to the template a

@test_blueprint.route('/test')
def show():
try:
return render_template(''search.html") # HERE is the problem
except TemplateNotFound:
abort(404)

Is this a problem?

# Actually, I want to render a/search.html

# But, render_template() does not use test_blueprint's template_folder

# render_template() search the template list, find the first search.html, then render

# So, maybe render a/search.html or b/search.html

# This depend on the sequence of the template list
Issue 1:
Please try compiling this file:

https://github.com/tomchentw/react-google-maps/blob/master/src/Polygon.js

I think the problematic part is this:

export default class Polygon extends Component {
static propTypes = {
// Uncontrolled default[props] - used only in componentDidMount
...polygonDefaultPropTypes,
// Controlled [props] - used in componentDidMount/componentDidUpdate
...polygonControlledPropTypes,
// Event [onEventName]
...polygonEventPropTypes,
}
// .......
}

I use --presets es2015,react,stage-2 --plugins transform-class-properties to compile and get this error:

SyntaxError: react-google-maps/Polygon.js: 'super.*' is not allowed before super() (This is an error on an internal node. Probably an internal error)
undefined

Issue 2:
Input:

class MyClass extends ParentClass {
property = foo;
}

Error:

SyntaxError: index.js: 'super.*' is not allowed before super() (This is an error on an internal node. Probably an internal error)
undefined

Notes:

Doesn't happen with constructor() { super() }

Needs ParentClass to occur

Doesn't matter what the value of the class property is.

Example repo: https://github.com/thejameskyle/__babel-bug-2942
Issue 1:
Hi,

I observed a strange effect comparing Timings for an Asian Pricer implementation in Julia 1.4.2 and 1.5 Beta 1.

For the vectorized implementation, Julia 1.5 is significantly faster than Julia 1.4.2 (which is great!).

However, for the loop implementation, it is the other way around - Julia 1.5 took nearly twice as long.

Could you please check? Or am I missing something obvious?

Thanks and Best Regards

Benjamin

using BenchmarkTools
using Random
using Statistics

T, r, K, s, Xo = promote(1.0, 0.05, 55.0, 0.3, 50) # align types for performance
m, mc = 1000, 10_000

# Source: https://gist.github.com/bkamins/7ecb8bf493cac8d6f6f3c141eedbaf4b

function asian_sample_julia(T, r, K, σ, X₀, m::Integer)
X = X₀
x̂ = zero(X)
Δ = T/m
for i in 1:m
X *= exp((r-σ^2/2)*Δ + σ*√Δ*randn())
x̂ += X
end
exp(-r*T)*max(x̂/m - K, 0)
end

function asian_sample_vec_julia(T, r, K, σ, X₀, m::Integer; rng=randn)
Δ = T/m
X = rng(typeof(X₀), m)
X .*= σ*√Δ
X .+= (r-σ^2/2)*Δ
X .= exp.(cumsum!(X, X))
exp(-r*T)*max(mean(X)*X₀ - K, 0)
end

asian_loop_julia(T, r, K, σ, X₀, m::Integer, mc:: Integer, f; kwargs...) = mean(f(T, r, K, σ, X₀, m; kwargs...) for _ in 1:mc)

versioninfo()

println("Loop implementation:")
@btime asian_loop_julia($T, $r, $K, $s, $Xo, $m, $mc, $asian_sample_julia)

println("Vectorized implementation:")
@btime asian_loop_julia($T, $r, $K, $s, $Xo, $m, $mc, $asian_sample_vec_julia)

Output:

Julia Version 1.4.2
Commit 44fa15b150* (2020-05-23 18:35 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
Environment:
JULIA_NUM_THREADS = 8
Loop implementation:
103.978 ms (0 allocations: 0 bytes)
Vectorized implementation:
165.363 ms (10000 allocations: 77.51 MiB)
2.0182973558431843

Julia Version 1.5.0-beta1.0
Commit 6443f6c95a (2020-05-28 17:42 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
Environment:
JULIA_NUM_THREADS = 8
Loop implementation:
191.175 ms (0 allocations: 0 bytes)
Vectorized implementation:
115.469 ms (10000 allocations: 77.51 MiB)
2.0806637302421787

Issue 2:
This may be a duplicate of #3988, but this will never be something that users will be able to extend.

I'd like to be able to do:

help?> while
The while loop evaluates the condition expression, and as long it remains true, keeps also evaluating the body of the while loop. If the condition expression is false when the while loop is first reached, the body is never evaluated.