WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
When a route doesn't match the method part of it an exception will be thrown. And the whole exception handling will be invoked. But if a route path is specified as /path.{_format} and the method is not allowed. The request given to listeners will always have null or html as the format. This makes it nearly impossible to return output based on what was requested.

Issue 2:
Hi all,

It seems like a Symfony limitation or bug (in our case a security case).

We use the _format for some validations and reports even when a Exception is thrown. But apparently it is not trusty all time. In one of the cases of use, we use the _format to generate the Exception redering according with requested format, but the format is ignored when the _method is not accepted.

product_option_create:
pattern: /create.{_format}
defaults:
_format: ~
_controller: controller.option:createAction
requirements:
_method: POST

The Symfony router cache system generates a cached UrlMatcher ( appdevUrlMatcher ) that has a method match($pathinfo) which verifies which cached URL matches with the current URL (including the _method) and returns the preg_match result to be merged with the context parameters. The preg_match result has all variables declared in the routes configurations populated with the URL data. The problem is when the parameter _method of route does not match with the request type, even then nothing is returned because a MethodNotAllowedHttpException is thrown.

#app/cache/dev/appdevUrlMatcher.php
public function match($pathinfo)
{
if (0 === strpos($pathinfo, '/product/option/show') && preg_match('#^/product/option/show(?:\\.(?P<_format>json))?$#s', $pathinfo, $matches)) {
if ($this->context->getMethod() != 'POST') {
// print_r($matches);
// Array ( [0] => /product/option/show.json [_format] => json [1] => json )
$allow[] = 'POST';
goto not_product_option_show;
}

return $this->mergeDefaults(array_replace($matches, array('_route' => 'product_option_show')), array ( '_format' => NULL, '_controller' => 'product.controller.option:showAction',));
}
not_product_option_show:

throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException(); //
}

Thus, the method getRequestFormat returns html once the Request->format property is null.

#Symfony\Component\HttpFoundation\Request
public function getRequestFormat($default = 'html')
{
#echo $this->format; // returns 'html'
if (null === $this->format) {
$this->format = $this->get('_format', $default);
}

return $this->format;
}

As the format is html, the method ExceptionController->showAction understands that is a case of templating format and renders a html page error instead of JSON serialization.

Maybe a possible solution is to pass the $matches embedded in the MethodNotAllowedException, but there is a discussion about it on FriendsOfSymfony/FOSRestBundle#358
Issue 1:
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;

// ...

@UniqueEntity("email")

@UniqueEntity("token")

/

class UserBack implements UserInterface

{

/*

@Orm\Column(type="string", unique = true)

@Assert\NotBlank

@Assert\Email

*/

protected $email;

/**

@Orm\Column(type="string", unique = true)

@Assert\NotBlank

@Assert\MaxLength(50)

*/

private $token;

// ...

}

It does generate just one key for email and returns duplicate entry for token.

doctrine:schema:update --dump-sql

CREATE UNIQUE INDEX UNIQ_92F7742EE7927C74 ON UserBack (email);

CREATE UNIQUE INDEX UNIQ_92F7742E5F37A13B ON UserBack (token)

doctrine:schema:update --force

Updating database schema...

[PDOException]

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'UNIQ_92F

Issue 2:
I downloaded Symfony 2.6.1 and added only a bit of code within one of the default built-in bundles.

I have a very simple entity:

class SomeEntity
{
private $firstName;

public function setFirstName($firstName) {
$this->firstName = $firstName;
}
}

I created a simple validation.yml for the $firstName property:

//src\Acme\DemoBundle\Resources\config\validation.yml
Acme\DemoBundle\Entities\SomeEntity:
properties:
firstName:
- NotBlank: ~

Within the Controller method I simply added:

$validator = $this->get('validator');

$entity = new SomeEntity();
$entity->setFirstName('haha');

$errors = $validator->validate($entity);

if (count($errors) > 0) {
$errorsString = (string) $errors;
return new Response($errorsString, Response::HTTP_BAD_REQUEST);
}

return new Response('everything ok yeey', Response::HTTP_OK);

Now, I run all this on Windows 7 which has a XAMPP installation. Everything works fine.

But, if I turn off MySQL, I get an exception:

An exception occured in driver: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.

The stack trace reveals that Validator\Validator\RecursiveContextualValidator->validateClassNode::489 calls Symfony\Bridge\Doctrine\Validator\DoctrineInitializer->initialize, which is probably why Symfony tries to reach the database.

Since I wrote absolutely no code that deals with databases, should this be allowed or somehow disabled/bypassed ?

I only want to do some extensive tests on the Validator component, I don't get why database access is needed for this.
Issue 1:
[Enter steps to reproduce below:]

Change git branch

Atom Version: 0.166.0

System: Mac OS X 10.10.1

Thrown From: Atom Core

Stack Trace

Uncaught Error: ENOENT, open 'undefined//Users/ash/src/xxx/xxx/project.json'

At fs.js:75

Error: ENOENT, open 'undefined//Users/ash/src/xxx/xxx/project.json'
at Error (native)

Commands

-5:00.1 find-and-replace:focus-next (atom-text-editor.editor.mini.json)
-4:59.7 core:paste (atom-text-editor.editor.mini.json)
-4:58.9 core:move-left (atom-text-editor.editor.mini.json)
2x -4:58.6 core:backspace (atom-text-editor.editor.mini.json)
2x -3:54.1 vim-mode:move-down (atom-text-editor.editor.vim-mode.command-mode)
2x -3:53.7 vim-mode:move-up (atom-text-editor.editor.vim-mode.command-mode)
-3:52.1 settings-view:open (atom-text-editor.editor.vim-mode.command-mode)
-3:23.3 minimap:toggle-git-diff (li.active)
2x -1:26.3 vim-mode:reset-command-mode (atom-text-editor.editor.vim-mode.command-mode)
-1:25.7 command-palette:toggle (atom-text-editor.editor.vim-mode.command-mode)
-1:24.5 core:confirm (atom-text-editor.editor.mini)
-1:24.5 open-in-sourcetree:open (atom-text-editor.editor.vim-mode.command-mode)
-0:27.6 find-and-replace:show (atom-text-editor.editor.mini.json)
-0:27.3 editor:consolidate-selections (atom-text-editor.editor.mini)
-0:27.3 core:cancel (atom-text-editor.editor.mini)
-0:00.0 settings-view:open (atom-text-editor.editor.vim-mode.command-mode)

Config

{
"core": {
"disabledPackages": [
"atom-spark-core"
],
"themes": [
"atom-dark-ui",
"base16-tomorrow-dark-theme"
]
},
"editor": {
"fontFamily": "DejaVu Sans Mono",
"fontSize": 12,
"lineHeight": 1.5,
"invisibles": {}
}
}

Installed Packages

# User
Atom-Syntax-highlighting-for-Sass, v0.5.0
autocomplete-paths, v0.9.1
autocomplete-plus, v1.1.0
color-picker, v1.2.6
file-icons, v1.4.4
git-tab-status, v1.3.0
highlight-line, v0.9.2
highlight-selected, v0.7.0
jsonlint, v0.4.0
language-arduino, v0.2.1
linter, v0.9.1
linter-rubocop, v0.2.1
linter-ruby, v0.1.4
minimap, v3.5.0
minimap-color-highlight, v3.1.0
minimap-find-and-replace, v3.1.0
minimap-git-diff, v3.1.0
minimap-highlight-selected, v3.1.0
minimap-selection, v3.1.0
open-in-sourcetree, v0.1.0
pretty-json, v0.3.1
save-session, v0.11.2
vim-mode, v0.22.0

# Dev
No dev packages

Issue 2:
[Enter steps to reproduce below:]

start an atom editor with save-session plugin on

save action might cause this error

Atom Version: 0.166.0

System: Mac OS X 10.10.1

Thrown From: Atom Core

Stack Trace

Uncaught Error: ENOENT, open 'undefined//Users/alopex/.atom/project.json'

At fs.js:75

Error: ENOENT, open 'undefined//Users/alopex/.atom/project.json'
at Error (native)

Commands

Config

{
"core": {
"disabledPackages": [
"npm-install",
"save-session"
],
"themes": [
"atom-dark-ui",
"base16-tomorrow-dark-theme"
]
},
"editor": {
"fontSize": 14,
"invisibles": {}
}
}

Installed Packages

# User
color-picker, v1.2.6
linter, v0.9.1
minimap, v3.5.0
save-session, v0.11.2
npm-install, v2.0.0

# Dev
No dev packages
Issue 1:
I just gave the latest version a try, but the electron-quick-start app threw error when I try to close the app, or even close the DevTools.

I switched back to 0.36.5 and it works fine. I wonder if electron-quick-start needs some update, or there are breaking changes (or bugs) introduced in 0.36.6. Thanks!

[19508:0129/091353:FATAL:scoped_handle.cc(44)] Check failed: false.
Backtrace:
(No symbol) [0x000000014026E401]
(No symbol) [0x000000014026787C]
(No symbol) [0x00000001402A8569]
(No symbol) [0x000000014029C2AB]
(No symbol) [0x000000014029BA7E]
(No symbol) [0x00000001401F0819]
(No symbol) [0x00000001401F0ABC]
(No symbol) [0x000000014017991B]
(No symbol) [0x0000000140179D3F]
v8::TypeSwitch::match [0x000007FED0A1BA2B+727259]
v8::Locker::IsLocked [0x000007FED08CD7B7+1036007]
v8::Locker::IsLocked [0x000007FED08CCB52+1032834]
(No symbol) [0x0000038634608B1F]

[36412:0129/091418:FATAL:scoped_handle.cc(44)] Check failed: false.
Backtrace:
(No symbol) [0x000000014026E401]
(No symbol) [0x000000014026787C]
(No symbol) [0x00000001402A8569]
(No symbol) [0x000000014029C2AB]
(No symbol) [0x000000014029BA7E]
(No symbol) [0x00000001401F0819]
(No symbol) [0x00000001401F0ABC]
(No symbol) [0x000000014017991B]
(No symbol) [0x0000000140179D3F]
v8::TypeSwitch::match [0x000007FED0A1BA2B+727259]
v8::Locker::IsLocked [0x000007FED08CD7B7+1036007]
v8::Locker::IsLocked [0x000007FED08CCB52+1032834]
(No symbol) [0x000001442AE08B1F]
``

Issue 2:
[7136:0129/081452:FATAL:scoped_handle.cc(44)] Check failed: false.
Backtrace:
(No symbol) [0x00C8D517]
(No symbol) [0x00C87A57]
(No symbol) [0x00CBAEBF]
(No symbol) [0x00CBAF01]
(No symbol) [0x00CB100B]
(No symbol) [0x00CB0A0B]
(No symbol) [0x00C33318]
(No symbol) [0x00C334E7]
(No symbol) [0x00BDEF65]
(No symbol) [0x00BDF273]
v8::TypeSwitch::match [0x5A01A96E+651326]
v8::Locker::IsLocked [0x59F09D1C+804588]
v8::Locker::IsLocked [0x59F0C9CD+816029]

Steps to reproduce

$ npm install -g iron-node;
$ iron-node;
#press Ctrl+w

Just tried to reproduce but this happens only in distributed version.

Windows 10 . Electron 0.36.5.

ref.: s-a/iron-node#86
Issue 1:
How can I empty input stream?

package main

import (

"fmt"

)

func main() {

var a int

var f float32

var str string

fmt.Print("Please input : ")
fmt.Scanf("%d %f %s", &a, &f, &str)
fmt.Println("Output: ", a, f, str)

fmt.Println("----------------------------")

var sIP, sMac string
fmt.Print("Please input: ")
fmt.Scanf("%s %s", &sIP, &sMac)

fmt.Println("Output: ", sIP, sMac)

}

OUTPUT：

Please input : 1 3.24 hello

Output: 1 3.24 hello

Please input: Output:

Issue 2:
How can I empty input stream?

package main

import (

"fmt"

)

func main() {

var a int

var f float32

var str string

fmt.Print("Please input : ")
fmt.Scanf("%d %f %s", &a, &f, &str)
fmt.Println("Output: ", a, f, str)

fmt.Println("----------------------------")

var sIP, sMac string
fmt.Print("Please input: ")
fmt.Scanf("%s %s", &sIP, &sMac)

fmt.Println("Output: ", sIP, sMac)

}
Issue 1:
Problem description

The menu is not located at the anchor when selecting a menu list item near the bottom of the list. (The problem only occurs with large lists)

In the example if you select 'Callisto' it works, but anything below 'Ganymede' shifts the menu location upward. As a side note, if you scroll down to the bottom of the list there is horizontal scroll.

https://www.webpackbin.com/bins/-Kq06NMipiyD2jLPRoew

Versions

Material-UI: 1.0.0-alpha.20

React: 15.4.1

Browser: Google Chrome 58.0.3029.81

Issue 2:
Version: next

<Menu /> with scrolling list of items is not positioned correctly if the active item is deep in the scroll view.

https://gfycat.com/ThinAffectionateAlbertosaurus

Quick fix: getContentAnchorOffset() here https://github.com/callemall/material-ui/blob/next/src/internal/Popover.js#L344 should take scrollTop into account:

function getScrollParent(node, until) { // http://stackoverflow.com/questions/35939886/find-first-scrollable-parent
if (node === null || node === until) {
return null;
}

if (node.scrollHeight > node.clientHeight) {
return node;
} else {
return getScrollParent(node.parentNode);
}
}
// ...
contentAnchorOffset = contentAnchorEl.offsetTop - scrollParent.scrollTop + (contentAnchorEl.clientHeight / 2) || 0;

Edit:

contentAnchorOffset = contentAnchorEl.offsetTop - (scrollParent ? scrollParent.scrollTop : 0) + (contentAnchorEl.clientHeight / 2) || 0;
Issue 1:
Hey, nice tool you've got here!

I am running a simple test with the json-loader, with code like this:

var foo = require('./package.json');
module.exports = foo.version;

My config:

module.exports = {
context: __dirname,
entry: "./index.js",
module: {
loaders: [
{
test: /\.json$/,
loader: "json"
}
]
}
}

Let's say I was to author this package on NPM as foo. Now, I'm writing another module called bar, which depends on foo. The code for that new module:

var test = require('foo');
console.log(test)

Unfortunately, bundling the above gives me Cannot find module "package.json" errors. Presumably because it doesn't know to use the JSON loader when resolving the foo module.

Browserify handles this by putting transforms in the package.json, so that when it reaches that module, it knows to transform it. This seems like a pretty important feature for code re-use and dependency management.

Or am I simply missing some configuration?

Issue 2:
Hello,

Somehow that combination isn't working. It is my impression that it should work thanks to the style-loader.

My config:

var webpack = require('webpack');

var path = '../server/public/';

module.exports = {
entry: {
app: [
'webpack-dev-server/client?http://localhost:8080',
'./app/main.js'
]
},

output: {
filename: 'main.js',
path: path,
publicPath: 'http://localhost:8080/assets/'
},

module: {
loaders: [
{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ },
{ test: /\.styl$/, loader: 'style!css!stylus', exclude: /node_modules/ }
]
},

resolve: {
extensions: ['', '.js', '.json']
},

devServer: {
contentBase: path,
colors: true,
progress: true
},

plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
]
};

And I call the server like this:

webpack-dev-server --hot --inline --config conf/dev.js

I update one .styl file that is required by a javascript one; The patch is downloaded from the server but is then ignored and a full reload ensues.

[HMR] Checking for updates on the server...
main.js:8393 [HMR] Cannot apply update. Need to do a full reload!
main.js:8394 [HMR] Error: Aborted because 235 is not accepted

Strangely enough, the chunk that changed has its parent.hot._acceptedDependencies with an only key of "235235" instead of "235"; Smells like a bug ?
Issue 1:
the example is assetPrefix: isProd ? 'https://cdn.mydomain.com' : '',

but i need set servals cdn name ,for example ,

assetPrefix: _.random(['https://cdn01.mydomain.com', 'https://cdn02.mydomain.com'])

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

Expected Behavior

Current Behavior

Steps to Reproduce (for bugs)

Context

Your Environment

Tech
Version

next

node

OS

browser

etc

Issue 2:
Hello there! Firstly, thank you for a such great product. As I've said in title, there can be made improvement to minimize output from extra divs.

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

Expected Behavior

No extra divs necessary.

Current Behavior

Some part of code is wrapper with div to make it possible to be returned by React (extended old behavior of React, changed since introduction of Fibers).

Context

Since next.js version 4 supports only React 16+, we can use some of it's new possibilities, such as

component that returns only it's children:

const Fragment = ({ children }) => children;

By using the Fragment we can replace all div that act only as wrapper (for instance in <NextScript />).
Issue 1:
http://www.freecodecamp.com/challenges/waypoint-make-object-properties-private

Only the code up to line 10 is shown until I scroll the window, then all of the code appears.

http://i.imgur.com/mZgRdxR.png

http://i.imgur.com/IAilUT0.png

It's a small bug, but it really threw me off at first as I couldn't figure out if I was supposed to be writing the methods myself that the question was referring to.

Issue 2:
The following Waypoint asks you to use a while loop, but references a for loop at the bottom of the instructions.

Also, it would be helpful to add the MDN links for a lot of the Basic JavaScript WayPoints (such as https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/while for this one). I found those extremely helpful previously and it caused me to use the MDN and understand how to read it.

http://www.freecodecamp.com/challenges/waypoint-iterate-with-javascript-while-loops

Waypoint: Iterate with JavaScript While Loops

You can run the same code multiple times by using a loop.

Another type of JavaScript loop is called a "while loop" because it runs "while" something is true, and stops once that something is no longer true.

var ourArray = [];

var i = 0;

while(i < 5) {

ourArray.push(i);

i++;

}

Let's try getting a for loop to work by pushing values to an array.
Issue 1:
🐛 Bug ImportError: cannot import name 'DataCollatorForLanguageModeling' in run_language_modeling.py

Information

Traceback (most recent call last):

File "transformers/examples/run_language_modeling.py", line 29, in

from transformers import (

ImportError: cannot import name 'DataCollatorForLanguageModeling'

Model I am using (Bert, XLNet ...): roberta, Trying to build the model from scratch using the tutorial.

Language I am using the model on (English, Chinese ...): English

The problem arises when using:

the official example scripts: (give details below)

transformers/examples/run_language_modeling.py

my own modified scripts: (give details below)

The tasks I am working on is:

an official GLUE/SQUaD task: (give the name)

my own task or dataset: (give details below)

My own Data set

To reproduce

Steps to reproduce the behavior:

Follow the tutorial here

Expected behavior

Environment info

transformers version: transformers-2.8.0 sacremoses-0.0.41 sentencepiece-0.1.85 tokenizers-0.5.2

Platform:

Python version: 3.x

PyTorch version (GPU?):1.4.0

Using GPU in script?: No

Using distributed or parallel set-up in script?: None

Issue 2:
🐛 Bug

Information

Model I am using (ALBERT):

Language I am using the model on (Sanskrit, Hindi):

The problem arises when using:

the official example scripts: (give details below)

my own modified scripts: (give details below)

The tasks I am working on is:

an official GLUE/SQUaD task: (give the name)

my own task or dataset: (give details below)

To reproduce

Steps to reproduce the behavior:

In Google Colab

!python /content/transformers/examples/run_language_modeling.py \ --train_data_file /content/corpus/train/full.txt \ --eval_data_file /content/corpus/valid/full_val.txt \ --model_type albert-base-v2 \

This worked yesterdy, bbut the latest added DataCollatorForLanguageModeling can't be imported.

The error i am getting

2020-04-22 05:12:25.640328: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1 Traceback (most recent call last): File "/content/transformers/examples/run_language_modeling.py", line 29, in <module> from transformers import ( ImportError: cannot import name 'DataCollatorForLanguageModeling'

So, I checked if it can be imported directly.

from transformers import DataCollatorForLanguageModeling

ERROR

from transformers import DataCollatorForLanguageModeling ImportError: cannot import name 'DataCollatorForLanguageModeling'

Expected behavior

Environment info

transformers version: 2.8.0

Platform: Colab

Python version: 3.6.9

PyTorch version (GPU?): 1.4.0

Tensorflow version (GPU?): 2.2.0-rc3

Using GPU in script?: Yes

Using distributed or parallel set-up in script?: No
Issue 1:
I was thrown off by this behavior, figured it warranted an issue.

function Component() {
return <div/>;
}

var result = ReactDOM.render(<Component/>, el);

result === null;

I was attempting to ReactDOM.findDOMNode the result of ReactDOM.render.

Issue 2:
I realize to some extent this is an intended behavior? Stateless components having no public instance, but I couldn't find much in way of conversation around why this behavior was chosen.

As of right now there is no good way for a parent component to even know if a ref is going to work on a component. What is the rational behind not allowing DOM access to a stateless component? It seems like if there is no instance to expose, the proper behavior would be to return the DOM node (or whatever the underlying thing is) directly like DOM components do now.

The current behavior is surprising and seems inverted. A component is never going to reasonably be able to know if a parent needs access to its DOM node. And a Parent has no way of knowing which components are stateless (and why should it?) to know to wrap it. Right now we need to wait until something silently doesn't work. At the very least a stateless component with a ref should throw, though that would be a last resort concession in my mind.
Issue 1:
I have a newly created daily dag and I have set it up yesterday (Jan. 25th), once it is loaded by airflow I can see it is run once (scheduled_2021-0124T00:00:00+00:00), and then I manually triggered it once just to see if it works and it did (manual_2021-01-25).

Now time is 08:24 UTC Jan 26th. But I did not see any run for 01-25. I have used airflow dags next-execution and found out airflow is planning to execute the dag for 01-26 directly, possibly on 01-27 00:00 UTC. So it will skip 01-25 entirely.

I am wondering why this behaviour? Is there any reason behind this?

Issue 2:
Apache Airflow version: 2.0.0

Kubernetes version (if you are using kubernetes) (use kubectl version): N/A

Environment:

Cloud provider or hardware configuration: local/aws

OS (e.g. from /etc/os-release): Ubuntu 18.04.5 LTS

Kernel (e.g. uname -a): 5.4.0-1032-aws

Install tools: pip

Others:

What happened:

I did a fresh Airflow 2.0.0 install. With this version, when I manually trigger a DAG, Airflow skips the next scheduled run.

What you expected to happen:

Manual runs do not interfere with the scheduled runs prior to Airflow 2.

How to reproduce it:

Create a simple hourly DAG. After enabling it and the initial run, run it manually. It shall skip the next hour. Below is an example, where the manual run with execution time of 08:17 causes the scheduled run with execution time of 08:00 to skip.
Issue 1:
Challenge http://freecodecamp.com/challenges/waypoint-comment-out-html has an issue. Auto complete on commenting is frustratingly inputting closing comment tags at the end of the document, even when I erase them.

This results in wasted time trying to remove the unneeded closing comment and may be confusing to people newer to HTML.

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

Steps to repro:

Start the challenge from scratch;

Try to remove the closing comment element by using Backspace or Delete button

The editor will try to balance the closing comment by adding end of the comment element to the text