WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Migrated issue, originally created by Thijs Damsma (@tdamsma)

When a distinct query is ordered, the columns on which are sorted are added to the SELECT statement, see example code:

from sqlalchemy.orm.session import sessionmaker
from sqlalchemy.dialects import postgresql
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer

Base = declarative_base()

class User(Base):
__tablename__ = 'user'
id = Column(Integer, primary_key=True)
att1 = Column(Integer)
att2 = Column(Integer)

Session = sessionmaker()
sess = Session()

q = sess.query(User.att2).distinct(User.att1)

print(str(q.statement.compile(dialect=postgresql.dialect())))

as expected, only user.att2 will be returned:

SELECT DISTINCT ON ("user".att1) "user".att2
FROM "user"

Now with an order_by statement:

print(str(q.order_by(User.att1, User.id).statement.compile(
dialect=postgresql.dialect())))

not as expected, both user.att2 and user.id will be returned

SELECT DISTINCT ON ("user".att1) "user".att2, "user".att1, "user".id
FROM "user" ORDER BY "user".att1, "user".id

The intended result is:

SELECT DISTINCT ON ("user".att1) "user".att2
FROM "user" ORDER BY "user".att1, "user".id

Issue 2:
Migrated issue, originally created by Mehdi GMIRA (@mehdigmira)

I encountred a bug with the postgres specific "DISTINCT ON" in SQLAlchemy

The real SA query I'm using is more complicated than this, but it sums up to :

query = db.session.query(c1, c2, c3, c4).distinct(c1, c2).order_by(c1, c2, c3)

when i compile the query by doing:

query.statement.compile(dialect=postgres.dialect())

The actual query is

SELECT DISTINCT ON (c1, c2) c1, c2, c3, c4, c1, c2, c3 FROM .... ORDER BY c1, c2, c3

As you can see, the columns c1, c2, c3 are repeated. After some investigation, it seems like this is caused by the order_by() part of the query (removing order by removes the repeated columns).

The weird thing is that when actually running the query (query.all()), I only get the column that I requested, and not the repeated ones as in the compiled statement.

This would have been fine with me. But the problem is it's preventing me from using a union(), because SA thinks I'm requesting more columns on one side of union().

I think It's a bug, but maybe I'm just doing something wrong.
Issue 1:
Hi,

I´m working in a laravel app and i´m trying to make a post request from a Vue JS component like laravel method, so when i make the post request i would like the app go to the url received from the laravel controller on the http post response. I have the next code in my vue JS component methods:

submit: function() {

const data = {
name: this.name,

};

console.log('submit!')
this.$v.$touch()
if (this.$v.$invalid) {
this.submitStatus = 'ERROR'
} else {

let currentObj = this;
axios.post('/group', data).then(function (response) {
currentObj.output = response.data;
}).catch(function (error) {
currentObj.output = error;
});

}
},

When i execute the code, the post request is done, i have the data sent on my database tables, however, the application is not redirected as i expect.

How the app can be redirected to the URL returned on laravel controller method?

Issue 2:
Summary

We have a single page app based on Vue.js which uses Axios to make API calls. When a user's session expires, API calls start returning a 302 redirect to the login page. Since its a single page app, sometimes users may just browse around directly in the app, therefore only making AJAX calls and not reloading the main index.html file.

When this happens, the 302's are basically swallowed and the user is not redirected and the app breaks.

To complicate matters a bit further, the login page is based on a federated login service in Azure, so it's on a different domain. This causes the browser to throw the following CORS error:

XMLHttpRequest cannot load login.microsoftonline.com.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'null' is therefore not allowed access.

I tried to use an interceptor but the error.response object is undefined, so I cannot even tell what the HTTP status of the response was. So the best I can come up with is that when error.response is undefined to assume it was a 302 and assume I need to forward the user to the login page:

axios.interceptors.response.use((response) => {
return response
}, (error) => {
// we can't seem to catch the 302 status code as an error,
// however, since it redirects to another domain (login.microsoftonline.com) it causes
// a CORS error which makes error.response be undefined here. This assumes that any time
// error.response is undefined that we need to redirect to the login page
if (typeof error.response === 'undefined') {
window.location = 'https://login.microsoftonline.com'
} else {
return Promise.reject(error)
}
})

Is this the best we can do? Any further suggestions?

Context

Vue.js, vue-router single page app

axios version: v0.16.0

Environment: chrome 58, windows 10
Issue 1:
Bug report

What is the current behavior?

When I upgrade Webpack from 4.29.2 to 4.29.3, import() breaks.

If the current behavior is a bug, please provide the steps to reproduce.

Using a relatively straightforward, up-to-date package.json, code that formerly worked using import() stops building after upgrading from 4.29.2 to 4.29.3. The error message is, e.g:

ERROR in ./js/registry.js 22:44
Module parse failed: Unexpected token (22:44)
You may need an appropriate loader to handle this file type.

Downgrading to the previous version eliminates this error.

In other words, the bug has been easy for me to reproduce/ toggle on/off since I isolated the package version bump which introduced it. (I can induce the bug by rm -rf node_modules/*; npm install after upgrading my package.json and just as easily quell it again by the same operation after downgrading the webpack requirement in package.json back down to 4.29.2.)

Apologies, I have not yet had time to come up with a minimal example, but here are my config files.

package.json: https://gist.github.com/1attice/dde6cd694fcb5202ebb78497772417b5

webpack.config.js: https://gist.github.com/1attice/1eef81fbd36ab67b9bd26600bf320e5b

.babelrc: https://gist.github.com/1attice/906515f7386b5c36d03dcb420872cb04

And here is the code that occasions the error:

registry.js: https://gist.github.com/1attice/bb922e8e3d155db53ad1942de7ccd31c

What is the expected behavior?

Compilation should proceed normally, as under 4.29.2.

webpack version: 4.29.3

Node.js version: 10.14.1

Operating System: MacOS 10.14.2

Additional tools: see package.json

Issue 2:
Bug report

Type definition error for OutputFileSystem when assigning to memory volume.

What is the current behavior?

If the current behavior is a bug, please provide the steps to reproduce.

error TS2322: Type 'MemoryFileSystem' is not assignable to type 'OutputFileSystem'.
Types of property 'mkdir' are incompatible.
Type '{ (path: string, callback: (err: Error | null) => void): void; (path: string, optArg: {}, callback: (err: Error | null, result?: any) => void): void; }' is not assignable to type '(arg0: string, arg1: (arg0?: ErrnoException | undefined) => void) => void'.
Types of parameters 'callback' and 'arg1' are incompatible.
Types of parameters 'arg0' and 'err' are incompatible.
Type 'Error | null' is not assignable to type 'ErrnoException | undefined'.
Type 'null' is not assignable to type 'ErrnoException | undefined'.

Reproduce:

import MemoryFs from 'memory-fs';
compiler.outputFileSystem = new MemoryFs();

or

import { Volume } from 'memfs';
compiler.outputFileSystem = createFsFromVolume(new Volume());

What is the expected behavior?

Previously, with webpack v4 it was working when using the DefinitelyTyped webpack definitions.

Other relevant information:

webpack version: 5.11.1

Node.js version: 14.15.4
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: xxx

Operating System version: xxx

Java version: xxx

Steps to reproduce this issue

xxx

xxx

xxx

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

Operating System version: xxx

Java version: 1.8.0_181

Steps to reproduce this issue

将spring boot与dubbo整合的项目打成war包放在tomcat下面运行

出现30-Nov-2018 13:09:22.070 严重 [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file

在本地main方法运行无问题，用的spring boot 2.0.2

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 1:
Whenever you start a new challenge, the first time you click on the CodeMirror-code section the line of code selected is off by one row from the cursor position. Once you start typing it seems to fix itself.

This can be extremely frustrating when you're going through multiple challenges relatively quickly.

Issue 2:
Challenge http://www.freecodecamp.com/challenges/waypoint-target-the-parent-of-an-element-using-jquery has an issue. Please describe how to reproduce it, and include links to screenshots if possible.
Issue 1:
Are there any plans to implement 4D or higher convolutional layers?

Issue 2:
Are there some plans to include a 4D (and possibly higher dimension generalization) convolution op? Would be nice for doing 3D + time processing for example (for the 4D version).

Also, should something be done to offer the user the possibility to choose the shape of the kernel? For example allowing both the natural hyper cube kernel nodes location or a hyper thetrahedron location? Could have consequences on the computing power requested:

http://arxiv.org/pdf/1505.02890v2.pdf
Issue 1:
Description

When using scrapy-redis or self-defined dupefilters, the speed of item pipeline will be extremely slow. It's not Redis's problem because when I move the deduplication to DownloadMiddleware (check url finger in process_request, add url finger in process_response), the speed of item pipeline returns to normal. Here are two links recording detailed information.

rmax/scrapy-redis#174

https://stackoverflow.com/questions/63026873/scarpy-redis-slows-down-item-pipelines

Steps to Reproduce

set DUPEFILTER_CLASS to "project.filename.customize-dupefilter-class"

Expected behavior: Item pipeline's speed should not varies dramartically

Actual behavior: Item pipeline's speed is extremely slow

Reproduces how often: Always

Versions

Scrapy : 2.2.0

lxml : 4.5.2.0

libxml2 : 2.9.10

cssselect : 1.1.0

parsel : 1.6.0

w3lib : 1.22.0

Twisted : 20.3.0

Python : 3.7.7 (default, Mar 10 2020, 15:43:33) - [Clang 11.0.0 (clang-1100.0.33.17)]

pyOpenSSL : 19.1.0 (OpenSSL 1.1.1g 21 Apr 2020)

cryptography : 2.9.2

Platform : Darwin-19.5.0-x86_64-i386-64bit

Issue 2:
headers lowercase

[scrapy can not work when headers are lowercase ]

Steps to Reproduce

i must use lowercase headers key and I use Twisted mapping headers and it doesn't work

Expected behavior: scrapy run with no exception

Actual behavior: scrapy and twisted does nothing for headers

Reproduces how often: [What percentage of the time does it reproduce?]

Versions

Scrapy : 2.0.1

lxml : 4.4.1.0

libxml2 : 2.9.5

cssselect : 1.1.0

parsel : 1.5.2

w3lib : 1.21.0

Twisted : 19.7.0

Python : 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]

pyOpenSSL : 19.0.0 (OpenSSL 1.1.1c 28 May 2019)

cryptography : 2.7

Platform : Windows-10-10.0.18362-SP0

Additional context

I try to rewrite the Request and Headers class but it gives me a line Please use app access!
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior

The regular expressions in docs/src/modules/utils/parseMarkdown use \n for a new line, while it should be \r\n on windows, which results in those regular expressions can't match any string.

Expected Behavior

It should distinguish the current platform and modify the regular expressions.

Context

It affects the website's content. In API papes, the header information filename: /src/AppBar/AppBar.js will display above the title, and the button EDIT THIS PAGE's url will be wrong.

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

Similar to issue #8169, but that doesn't mention keyboard controls. May be fixed by pull request #8227 but worth testing.

Expected Behavior

Select should work exactly the same inside a dialog as on a normal page.

Current Behavior

If you put a Select inside a dialog, the behaviour is very odd. The keyboard control doesn't work very well, tabbing to a select and pressing space opens the menu, but doesn't focus the menu so another tab is required to focus it. Then once closed, focus position is lost and starts at the beginning of the form again

Steps to Reproduce (for bugs)

https://codesandbox.io/s/32v7k6ozo1

Put a select inside a dialog.

Context

Trying to put forms inside of a Dialog control.

Your Environment

Tech
Version

Material-UI
1.0.0-beta.10

React
15.6.1

browser
all
Issue 1:
Examples bug report

Example name

with-ant-design-less

https://github.com/zeit/next.js/tree/canary/examples/with-ant-design-less

Describe the bug

When I click on a Link to a page that uses any antd component, it doesn't work and when I click on a Link to a page that doesn't use any antd component, it works.

To Reproduce

I create a codesandbox to reproduce te bug https://codesandbox.io/s/nextjs-ant-design-8t41c

Click on "Go to page with antd" doesn't work

Click on "Go to page without antd" works

Expected behavior

The Link redirect to page that uses antd

System information

Dependencies:

"@zeit/next-less": "1.0.1",

"antd": "3.25.1",

"babel-plugin-import": "1.12.2",

"less": "3.10.3",

"less-vars-to-js": "1.3.0",

"next": "latest",

"null-loader": "3.0.0",

"react": "^16.7.0",

"react-dom": "^16.7.0"

Issue 2:
This is bug report

Link does not work with css-module imported. That happens when page with Link has no css, and linked page has. No errors in console, so im not sure about reasons, but there is minimal repo to reproduce:

https://github.com/standy/next-css-error

Bug appears in next@7.0.0 + next-css@1.0.1,

Older next@6.1.2 + next-css@0.2.0 works fine
Issue 1:
Description

The current className prop on any JSX element takes only a string, that is supposed to be the class name to add to the corresponding element. This prop expects a string which makes it very easy to attach a single class name to the element.

For example:

<div className="my-css-class-name"></div>

Problem

The limitation I ran into while using className, is when I wanted to attach a couple classes to the same element, I naturally tried to do something like this:

<div className={"my-css-class-name", "my-other-css-class-name"}></div>

But unfortunately it didn't work, I then realized that it's not possible with the current JSX specification.

The proposed solution in the FAQ link I shared above suggests manually attaching the strings and add a space, or use another package called "Classnames".

Feature Proposal

I as a react user, expected naturally that I could provide multiple classes with JSX, so I think it can be useful for other developers, if the prop className can take an array of strings (classes) and does a simple Array.join(" ") in this case. So that developers won't have to join them manually or use the other package "Classnames". I believe this could be beneficial for the simple use case, and also for a more advanced use case like mine (using Material UI's makeStyles).

I would appreciate your thoughts on this suggestion. Furthermore, if discussion concludes that you agree to adopt such change, I would be more than happy to contribute it, as by chance I was looking at the beginner-friendly issues for contributors a couple days ago and couldn't find something (they're all assigned).

Issue 2:
I often use components that both have an internal className as well as an optional className passed in as a prop. The way I've been implementing this is either through (A) a local array that I construct and serialize into the className prop, or (B) through using React.addons.classSet.

A:

var classNames = ['my-component'];
if (this.props.className) {
classNames.push(this.props.className);
}
return <MyComponent className={classNames.join(' ')} />;

B:

var classes = {
'my-component': true
};
if (this.props.className) {
classes[this.props.className] = true;
}
return <MyComponent className={React.addons.classSet(classes)} />;

A is slightly less verbose, but harder to use if you have modifier classes as well (e.g. my-component--is-selected).

I'm suggesting allowing the className to be a string or an array. And if it is an array, React internals would compact and serialize the className array into a className string.

return <MyComponent className={['my-component', this.props.className]} />;

If this is a good idea, I could make an attempt at a PR.
Issue 1:
Prior to the update I had completed all waypoints, bonfires and ziplines up until TicTacToe.

After completing challenges in section 4. "Gear Up For Success" I noticed that a large amount of waypoints and bonfires had become "incomplete"(I've attached a screenshot below to show what I mean. ) and the solutions did not show up on my profile however I still had the points from those challenges (I'm currently at 305 after re-doing a challenge that became incomplete to try and re-create the bug).

I haven't been able to recreate the bug however I believe it's related to the new challenges being completed and overwriting previously completed challenges somehow.

Issue 2:
In html under Change the Color of Text

im change the color of h2 to blue and I did it but it not letting me run test I'm using a Galaxy S4 Mini
Issue 1:
Here is the code I have tested on windows:

package main

import (
"net"
"fmt"
)
func main() {
inets, _ := net.Interfaces()
for _, i := range inets {
if mac := i.HardwareAddr.String(); mac != "" {
fmt.Println("MAC:",mac)
fmt.Println("Name",i.Name)
addrs, _ := i.Addrs()
for _, addr := range addrs {
if addr := addr.String(); addr != "" {
fmt.Println("Addr:",addr)
}
}
}
}
}

Run this code on different version:

On 1.4.3 get the result:

MAC: 08:00:27:0a:af:0c
Name {558CA760-9D61-47CC-AF7D-4E8635DDD283}
Addr: 10.0.2.15

On 1.5.1 get the result:

MAC: 08:00:27:0a:af:0c:00:00
Name Local Area Connection
Addr: 10.0.2.15/16

On 1.5.2 get the result:

MAC: 08:00:27:0a:af:0c:00:00
Name Local Area Connection
Addr: 10.0.2.15/16
MAC: 00:00:00:00:00:00:00:00
Name MS TCP Loopback interface
Addr: 127.0.0.1/1

The old version MAC use the standard IEEE 802 format MAC-48. but the new version use the EUI-64.

If my program is relied on the MAC as the uuid. then upgrade Go will cause big problem. Is there any config to get MAC-48 not EUI-64?

Issue 2:
I'd written a program in go 1.4 to retrieve mac addresses on windows and used to get the correct mac address.

With 1.5.1 however, I'm seeing a :00:00 appended to all the mac addresses on Windows (specifically Windows 7 Professional).

Is there a reason for this (or is it simply an error on my side)?

ifs, _ := net.Interfaces()
for _, v := range ifs {
h := v.HardwareAddr.String()
if len(h) == 0 {
continue
}
si.Macs = append(si.Macs, h)
}

Bjorn Graf in this thread reports: "on my Windows 10 Go 1.5,x (amd64 and 386) seems to find only the loopback pseudo-Interface with an all-00 mac while go1.4.2 lists the real interface."
Issue 1:
When I open any file in my ES6 Javascript project, every single line is underlined in red, with errors like:

In my project's root, I have a jsconfig.json file with the following contents:

{
"compilerOptions": {
"target": "ES6",
"module": "commonjs"
},
"files": [
"app/"
]
}

The file in question lives inside the app folder.

Issue 2:
I am incorrectly getting the following error, "This can only be used with ES6. Make sure to have a jsconfig.json-file which sets the target to ES6".

Furthermore, I think I may have stumbled upon a weird case where if the start of the file name is "temp" as in "temp.js", "temporary.js", or "temp123.js" it will cause this error.

To reproduce:

Create a file called temp.js with some ES6 code, such as:

let x = 10

The above error is now showing. To fix it, create the jsconfig.json file which sets the target to ES6:

{
"compilerOptions": {
"target": "ES6"
}
}

The error is still showing, now incorrectly.

If I rename "temp.js" to "test.js" (or anything that doesn't start with 'temp') the error goes away. Or, if I create a files array in jsconfig.json which lists "temp.js", the error goes away:

{
"compilerOptions": {
"target": "ES6"
},
"files": [
"temp.js"
]
}

I don't want to have to do this for every file in my project.

I'm running on Windows 7, 64-bit.

Thanks
Issue 1:
Hello,

I am using the preferred_choices option for the first time and i am seeing that preferred choices are not duplicated in the main list.

I think it can cause trouble with users witch not pay attention that there are a preferred list or when default value witch is not in the preferred list is already selected (User will search alphabetically and maybe will not look to the top of the list).

Is there a way to repeat preferred values in main list ?

Maybe it should be the default symfony behavior ?

Issue 2:
I've done several Symfony projects beyond version 2.7.* in which I've used the ChoiceType form element by setting the choices option to an array using the convention value => label.

However, I just noticed the convention has changed to label => value, via http://symfony.com/blog/new-in-symfony-2-7-choice-form-type-refactorization and http://symfony.com/doc/current/reference/forms/types/choice.html#choices.

This change doesn't make sense to me. The convention has always been value => label anytime I've worked with a form APIs. This convention is intuitive with the uniqueness of array keys. It also mimics the <select> element.

Flipping the convention, I see at least three issues:

potential to have duplicate values in a form selection (I can't think of a reason this is useful)

potential to lose a selection if two labels are equal (eg. a User selection where their names are labels)

everyone has to change their code and way of thinking to move forward with Symfony

Can someone elaborate as to why this drastic of a change needed to happen? If the choices really needed to be backwards, that could have been done internally without affecting convention.
Issue 1:
Open the example modal by clicking "Launch demo modal". Click "Save changes", then try to close. Fail.

Issue 2:
Hi,

The code used on last Thursday worked fine. But after updated to latest code on Monday (GMT+8), the modal dialog when clicks to dismiss for seconds onward cannot be close.

I am checking on source code line 932, if I commented out this line then it is working again.

this.$element

.removeClass('in')

.attr('aria-hidden', true)

//.off('click.dismiss.modal')

Am I missing anything...?

Sorry for the grammar. Thanks.