WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
At the moment the Routing component only supports absolute and domain-relative URLs, e.g.

http://example.org/user-slug/article-slug/comments and

/user-slug/article-slug/comments.

But I find it very useful to specify path-relative URLs that depend on the current request path. Lets say the client requests http://example.org/user-slug/article-slug/ and I want to generate a link to the comments of the same article.

Currently the resulting link would again duplicate the user-slug and article-slug -> /user-slug/article-slug/comments.

But it could be simplified to comments or ./comments.

One additional feature that could be implemented is a new twig function (besides url and path) lets call it subpath.

It fetches the variables of the current request, e.g. user-slug and article-slug internally and then generates such a relative URL. The advantage is you don't need to specify the variables of the current request again.

So simply {{ subpath('article_comments') }} is enough for the URL ./comments. But you can optionally overwrite some request variables with {{ subpath('article_comments', {'article': 'different-article-slug'} ) }} which would generate ../different-article-slug/comments (i.e. same user, but different article).

Thinking of it, the twig function is also a quite useful without the path-relative URLs. So these are basically two feature requests.

I already got an idea how to implement this but would like to get your feedback whether one of these features is also useful to others.

Issue 2:
Some where between Merge to 2.8 and 3.1, someone made changes to TraceEventDispatcher.php file. The sprintf command was removed and replaced with {event} and {listener} in message. Like they are some how going to magically change.

Previous (3.0.9)

*FILE: ./symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php
267 : $this->logger->debug(sprintf('Notified event "%s" to listener "%s".', $eventName, $info['pretty']));

Current (3.1.5)

FILE: ./symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php
267 : $this->logger->debug('Notified event "{event}" to listener "{listener}".', array('event' => $eventName, 'listener' => $info['pretty']));

OUTPUT 3.0.9:

Notified event "kernel.request" to listener "Dst\AuthBundle\EventListener\RequestListener::onKernelRequest".

OUTPUT 3.1.5:

Notified event "{event}" to listener "{listener}".
Issue 1:
Hello !

I want to make a automatic screenshot program but I have a annoying EU cookie popup on my screenshot. How i can remove these in Playwright ?

I try this solution but it don't work T_T

const browser = await playwright.firefox.launch({
headless: true,
firefoxUserPrefs: {
"network.cookie.cookieBehavior": 2
}
});

Thank !

Issue 2:
0

I am working on project where i am taking the screenshot of various web pages. i have used the playwright nodejs package to take screenshot. when i navigate to the required url. web page loaded along with dialog box of accepting cookies in centre . I want to accept the cookies than takes screenshot.
Issue 1:
Curly brackets (as the first line in return) causes "unexpected token" error

For example:

render () {
return (
{/* Comment for my component - This line causes "unexpected token" error */}
<nav>
</nav>

Issue 2:
Consider the following:

const [mouseDown, setMouseDown] = useState(false);
const onMouseDown = useCallback(() => {
setMouseDown(true);
}, []);
const onMouseMove = useCallback(e => { /* ... */ }, []);
const onMouseUp = useCallback(() => {
setMouseDown(false);
}, []);
useEffect(() => {
if (mouseDown) {
document.addEventListener('mousemove', onMouseMove);
document.addEventListener('mouseup', onMouseUp);
return () => {
document.removeEventListener('mousemove', onMouseMove);
document.removeEventListener('mouseup', onMouseUp);
}
}
}, [mouseDown]);

Above the useEffect() will complain that it didn't receive onMouseMove and onMouseUp in its dependency array and it's correct. But it could be smarter, because they were all defined by useCallback(() => {}, []) meaning they will all remain the same value throughout the lifetime of this component.

Given this information I could write

useEffect(() => {
if (mouseDown) {
document.addEventListener('mousemove', onMouseMove);
document.addEventListener('mouseup', onMouseUp);
return () => {
document.removeEventListener('mousemove', onMouseMove);
document.removeEventListener('mouseup', onMouseUp);
}
}
}, [mouseDown, onMouseMove, onMouseUp]);

To satisfy the linter and that would work but only because I know they were defined by useCallback(() => {}, []). If someone were to change the dependency array for onMouseMove or onMouseUp this would now break (the event listeners won't be removed and readded if onMouseMove changes for instance), but the linter will be happy.

However if I was able to specify it like I did in the first example it is the same as saying, this works as long as these specific variables don't change, if someone unwittingly changes the dependency array of onMouseMove the linter would shout at them again and they would have to rewrite this into something more flexible.

This is similar to the way useCallback doesn't complain about my usage of setMouseDown as it knows it can't change.
Issue 1:
Reproducing code example:

import numpy as np
x, y = np.array([-969100.0]), np.array([-4457000.0])

# This works
"%.4g, %.4g" % (x, y)

# This errors
"{:.4g}, {:.4g}".format(x, y)

Error message:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported format string passed to numpy.ndarray.__format__

NumPy/Python version information:

1.15.4 3.7.1 (default, Nov 6 2018, 18:45:35)
[Clang 10.0.0 (clang-1000.11.45.5)]

OS: macOS High Sierra and Linux (Travis CI)

This happened when upgrading a codebase using the pyupgrade tool. %g and {:g} work the same for builtin types. Is this a NumPy bug?

Issue 2:
In many wonderful cases an ndarray can be used in place of a Python float and Just Work.

But not in one case:

import numpy as np

n = 1.23
print('{0:.6} AU'.format(n))

n = np.array([1.23, 4.56])
print('{0:.6} AU'.format(n))

The output of the above code, at least under Python 3.4, is:

1.23 AU
Traceback (most recent call last):
File "tmp9.py", line 7, in <module>
print('{0:.6} AU'.format(n))
TypeError: non-empty format string passed to object.__format__

It would be a great convenience if the ndarray grew a __format__() method that understood the tiny mini-language of float formatting, and used the number of digits of precision specified there to make its own call to the standard NumPy vector array formatting. Users could control array appearance on the screen using a Python standard that many programmers already understand.
Issue 1:
In jax/interpreters/xla.py,

if FLAGS.jax_debug_nans: check_nans(xla_call_p, out_buf)

gives me

NameError: name 'out_buf' is not defined

when jax_debug_nans is True.

Issue 2:
Versions 0.1.42+, out_buf referrence before assignment in line 371 of xla.py.
Issue 1:
I am working on an implementation of group convolutions in Keras, after Cohen & Welling 2016. For 2D group-convolutions I've subclassed Conv2D as GroupConv2D, now I want to add 3D group-convolutions, and it makes more sense to subclass Conv as GroupConv, and then subclass that as GroupConv2D and GroupConv3D, as is done with regular convolutions in Keras. However Conv itself is not exported so I can't do that.

Is it possible to make Conv public? Or is there perhaps a different way for me to do this without Conv being public? Without using the tensorflow backend I can import it (from keras.layers.convolutional import Conv works but from tensorflow.keras.layers.convolutional import Conv does not), but that seems like a bad idea, or is that fine?

Issue 2:
...
qa_model=Model(input=[question_input, answer_input], output=[similarity_value])
good_output = qa_model([question_input, good_answers])
bad_output = qa_model([question_input, bad_answers])
mergedoutput = merge([good_output, bad_output],mode='concat')
training_model = Model(input=[question_input, good_answer_input, bad_answer_input], output=mergedoutput)
training_model.compile(loss=lambda y_true, y_pred: y_pred, optimizer='adam')
pred=training_model.predict([questions,good_answers,bad_answers])

It is OK, when i test qa_model alone

qa_model.compile(loss=lambda y_true, y_pred: y_pred, optimizer='adam')
pred=qa_model.predict([questions,good_answers])

but something wrong with training_model

File "/Users/Documents/sources/insuranceQA-master/rnn.py", line 186, in build_model
training_model = Model(input=[question_input, good_answer_input, bad_answer_input], output=mergedoutput)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/keras/engine/topology.py", line 1571, in __init__
'Keras tensors. Found: ' + str(x))
Exception: Output tensors to a Model must be Keras tensors. Found: Join.0

the full description can be found in This Page
Issue 1:
VSCode Version: 1.2.0

OS Version: Linux version 3.19.0-32-generic

Steps to Reproduce:

Open a new html file

Write a '< div >' tag

Start writing the closing tag of the div ( '</' )

Right now, VS Code should show 'div' as a possible suggestion

However, once you start typing 'd' ( as in 'div' ), the suggestion disappears

I propose showing the suggestion until the user input stops matching the first part of the suggestion.

I, for one, would find this helpful, because it feels more natural to keep typing instead of moving my fingers towards enter, while still seeing what the closing tag should look like

Issue 2:
VSCode Version: 1.1.0

OS Version: OS X 10.11.4

Steps to Reproduce:

While editing html code

Before updating visual studio code, whenever I start typing closing tag. I used to get suggestions that result into proper indentation as well. But after updating it, I'm not able to do it.

I'm attaching screen shot
Issue 1:
Bonfire task:

Drop the elements of an array (first argument), starting from the front, until the predicate (second argument) returns true.

It's possible to solve this bonfire without completing all of the objectives.

One of the objectives is that you should continue until the second argument is true. But even if you never stop, you can still pass the bonfire. Look at the code example below:

function drop(arr, func) {

return arr.filter(func);
}

drop([1, 2, 3, 1], function (n) {return n < 2; });

This will continue filtering, giving you the wrong answer. But since no test case checks if the code actually continues past the first false value, it will pass.

If I was unclear, then feel free to ask what I meant. :)

Issue 2:
Challenge http://freecodecamp.com/challenges/bonfire-drop-it has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

It describes only eating the head of the array and then stopping, returning the rest of the array. This is not what is tested.

All of the tests can be passed using return arr.filter(func); which will filter ALL items from the array, not just from the head.

There needs to be an additional test case, like expect(drop([1, 2, 3, 7, 4], function(n) {return n > 5; })).to.eqls([7, 4]);
Issue 1:
Challenge adjust-the-width-of-an-element-using-the-width-property has an issue.

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

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

<style>
h4 {
text-align: center;
}
p {
text-align: justify;
}
.links {
margin-right: 20px;
text-align: left;
}
.fullCard {

> width: 245px; <---- This is what was required, and what I did, but it wasn't accepted as correct.

border: 1px solid #ccc;
border-radius: 5px;
margin: 10px 5px;
padding: 4px;
}
.cardContent {
padding: 10px;
}
</style>
<div class="fullCard">
<div class="cardContent">
<div class="cardText">
<h4>Google</h4>
<p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.</p>
</div>
<div class="cardLinks">
<a href="https://en.wikipedia.org/wiki/Larry_Page" class="links">Larry Page</a>
<a href="https://en.wikipedia.org/wiki/Sergey_Brin" class="links">Sergey Brin</a>
</div>
</div>
</div>

Issue 2:
Challenge Name

Applied Visual Design: Adjust the Width of an Element Using the Width Property

Issue Description

When the instructions are done, test doesn't recognise it.

Browser Information

Browser Name: Chrome,

Operating System: Windows 10
Issue 1:
by sven@engelhardt.to:

What steps will reproduce the problem?
0. upgrade your go to weekly.2011-06-02
1. compile and install somebug.go
2. try to use it
3. look puzzled trying to understand what the error message is trying to say

What is the expected output?

the test should compile or somebug.go should not compile and install in the first place

What do you see instead?
$ gotest
rm -f _test/somebug.a
6g -o _gotest_.6 somebug.go somebug_test.go
rm -f _test/somebug.a
gopack grc _test/somebug.a _gotest_.6
_testmain.go:3: syntax error: unexpected ., expecting )
gotest: "/opt/go/bin/6g -I _test _testmain.go" failed: exit status 1

Which compiler are you using (5g, 6g, 8g, gccgo)?
tested with 6g/8g

Which operating system are you using?
Ubuntu Linux

Which revision are you using? (hg identify)
3418f22c39eb weekly/weekly.2011-06-02

Please provide any additional information below.

Redefining the interface in any of these ways makes the problem go away:

weird(in IType) (_ IType)
weird(in IType) (IType, ok bool)
weird(in IType) (unused IType, ok bool)

Attachments:

somebug.go (90 bytes)

somebug_test.go (73 bytes)

Makefile (95 bytes)

Issue 2:
$ cat $GOPATH/src/p/p.go
package p

type S struct{ R int }

type T struct{ *S }

func F(t T) int { return t.R }

$ cat template.go
package p

import "p"

func before(t p.T) int { return t.R }
func after(t p.T) int { return t.S.R }

Run with eg -t template.go junk produces:

package p

type S struct{ R int }

type T struct{ *S }

func F(t T) int { return t.S.S.R }

One too many .S.
Issue 1:
The following message is displayed in the inspector:

However cookies are stored and retrievable via code. I haven't tried using the flag, but it seems that these should be viewable by default in Electron if possible?

Issue 2:
@zcbenz do you know if electron blocks the Set-Cookie header by default? Responses that carry this in the browser don't seem to have it in electron.

I read through the source, couldn't find any code that would point to that, but checking just in case this is true. Possibly related / of use to #1606.
Issue 1:
All custom downloads are showing up with the following error txt file in the css folder:

css/error.txt:

A less error occured trying to build your bundle. You've likely entered an invalid input into the less variable field. Check your syntax and try again!

thanks!

{"type":"Parse","message":"Syntax Error on line 792","index":25106,"filename":"bootstrap.css","line":792,"column":11,"extract":[" *margin: -5px 0 5px;"," ove rflow: hidden;"," background-color: @top;"]}

Issue 2:
When writing a single-page application using Bootstrap's navbar, we quickly found out that we need a way to collapse the menu whenever any of the links are pressed.

The naive solution seemed to be to attach the following to every link:

data-toggle="collapse" data-target=".navbar-responsive-collapse"

However, while this works fine when the screen is narrow and the navbar needs to be collapsed, it causes some very strange side-effects when the screen is "tablet" or "desktop" sized. On some browsers (IE and Firefox), repeated clicks cause the contents of the navbar to disappear completely.

While it should be possible to deal with this issue by writing custom JS in the App, I think it would be much better if the App generally doesn't need to deal with it at all.

I've created a JsFiddle, showing the problem.

As an interim solution, I've added the following to Collapse's Data-Api on my local copy:

$(document).on('click.bs.collapse.data-api', '[data-hide=collapse]', function (e) {
var $this = $(this), href
var target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
var $target = $(target)

if ($target.hasClass('in')) {
$target.collapse('hide');
}
})

It's based on the [data-toggle=collapse] listener, but without support for accordion views. The key element is checking to see whether or not the navbar can be collapsed before collapsing it.

I'm hoping that something like this could be added to the Bootstrap Collapse API, or if we could just get the normal toggle listener to include more checks before toggling.

Thanks.
Issue 1:
steps:

perform a task

click on the button "run tests"

actual result: there are 3 buttons "target5"

Expected Result: there are 2 buttons "target5"

Issue 2:
Challenge Waypoint: Clone an Element Using jQuery has an issue.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36.

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

Issue

I believe I've found bug in the phone simulation in Waypoint: Clone an Element Using jQuery:

I entered the code to clone target5 and append it to left-well, and now I see three target5 buttons in the phone simulator. FCC says my code is correct and advances me to the next challenge. The following challenges also show three target5 buttons:

Waypoint: Target the Parent of an Element Using jQuery

Waypoint: Target the Children of an Element Using jQuery

@qualitymanifest confirms this issue on his Linux box.

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 1:
Do you want to request a feature or report a bug?

Feature

What is the current behavior?

Currently we can only edit the props that were passed to the component:

What is the expected behavior?

But the component has other props (e.g. loading, type, etc) that weren't passed to this specific instance. And we should be able to play with them in the devtools similar to how Chrome allow us to add new css:

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

Latest

@bvaughn

Issue 2:
As proposed in React Future, it would be nice to support a list of style objects in the style property. The objects would be automatically merged (in order, with the last object overriding the previous one).

var boxStyle = {
padding: 10,
background: "hotpink"
};
var bixBoxStyle = {
margin: 10,
width: 300
};

<div style={boxStyle} />
<div style={[boxStyle, bigBoxStyle]} />
<div style={[boxStyle, bigBoxStyle, {background: "navy"}]} />
Issue 1:
When a field is not analyzed on index time, it is not possible to specify a search_analyzer.

I get a "analyzer on field [xxx] must be set when search_analyzer is set" exception.

To me this does not make sense. I can set a keyword analyzer on the field to circumvent this exception, which does exactly the same thing. However, while doing that, I cannot enable doc_values.

I find myself duplicating fields many times because of this limitations.

Those limitations are:

docvalues don't work on analyzed fields

search_analyzer cannot be specified on non-analyzed fields.

I presume ES is trying to protect me, but I know what I'm doing.

Is it possible to make this behavior more lenient?

Issue 2:
When I try to run gradle integration tests to test a plugin by unpacking the zip, the jar hell detection is unable to recognize the same jar on the class path at two (or more) different locations.

I assume this is not intended. It would make gradle classpath setups (maybe other build tools too) to compile and test ES plugins "in-place" very difficult to specify.

My suggestion is to skip jar URLs that point to a jar with a checksum of a jar that has been already checked.

Example:

Caused by: java.lang.IllegalStateException: jar hell!
class: org.xbib.elasticsearch.http.HttpModule$_configure_closure1
jar1: /Users/joerg/.gradle/caches/modules-2/files-2.1/org.xbib.elasticsearch.plugin/elasticsearch-webapp/2.0.0-beta1.0/c735bc9b3e05b37a2d553ddda7d76fefc5e817e5/elasticsearch-webapp-2.0.0-beta1.0.jar
jar2: /Users/joerg/Projects/github/jprante/elasticsearch-webapp-example/plugins/webapp/elasticsearch-webapp-2.0.0-beta1.0.jar
at org.elasticsearch.bootstrap.JarHell.checkClass(JarHell.java:210)
at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:128)
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:346)
... 52 more

shasum /Users/joerg/.gradle/caches/modules-2/files-2.1/org.xbib.elasticsearch.plugin/elasticsearch-webapp/2.0.0-beta1.0/c735bc9b3e05b37a2d553ddda7d76fefc5e817e5/elasticsearch-webapp-2.0.0-beta1.0.jar
c735bc9b3e05b37a2d553ddda7d76fefc5e817e5 /Users/joerg/.gradle/caches/modules-2/files-2.1/org.xbib.elasticsearch.plugin/elasticsearch-webapp/2.0.0-beta1.0/c735bc9b3e05b37a2d553ddda7d76fefc5e817e5/elasticsearch-webapp-2.0.0-beta1.0.jar

shasum /Users/joerg/Projects/github/jprante/elasticsearch-webapp-example/plugins/webapp/elasticsearch-webapp-2.0.0-beta1.0.jar
c735bc9b3e05b37a2d553ddda7d76fefc5e817e5 /Users/joerg/Projects/github/jprante/elasticsearch-webapp-example/plugins/webapp/elasticsearch-webapp-2.0.0-beta1.0.jar