WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
that was the pervious question:

I used the XML of mybatis-plus to write simple query statements, but there was no shard rule, so the database table could not be found

here's my code:

spring.shardingsphere.datasource.names=ds0
spring.shardingsphere.datasource.ds0.type=com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.ds0.driver-class-name=com.mysql.jdbc.Driver
spring.shardingsphere.datasource.ds0.jdbc-url=jdbc:mysql://xxx:3306/xxx_user_profile?useUnicode=true&characterEncoding=UTF-8&useSSL=false
spring.shardingsphere.datasource.ds0.username=xxx
spring.shardingsphere.datasource.ds0.password=xxxxxxx

spring.shardingsphere.props.sql.show= true

spring.shardingsphere.sharding.tables.user_tag_.actual-data-nodes = ds0.user_tag_$->{0..31}
spring.shardingsphere.sharding.tables.user_tag_.table-strategy.inline.sharding-column = ax_uid
spring.shardingsphere.sharding.tables.user_tag_.table-strategy.inline.algorithm-expression = user_tag_$->{ax_uid % 32}

<select id="listByAxUidFromXml" resultMap="BaseResultMap">
select <include refid="Base_Column_List"/>
from user_tag
where ax_uid = #{axUid}
</select>

Because I need to use the XML of mybatis plus to write complex SQL, please tell me whether it is supported or there is a problem with it,Thank you.

Issue 2:
Question

when I use join query with two databases, it will throw this error

String sql = "select * from t_user t join p_order p on t.id = p.user_id "; while (rs.next()) { for (int i = 1; i <= count; i++) { System.out.print(rs.getObject(i)); if (i != count) { System.out.print("|"); } } System.out.println(); }

`java.lang.ClassCastException: java.sql.Timestamp cannot be cast to java.lang.Number

at org.apache.calcite.avatica.util.AbstractCursor$NumberAccessor.getNumber(AbstractCursor.java:722)
at org.apache.calcite.avatica.util.AbstractCursor$TimestampFromNumberAccessor.getTimestamp(AbstractCursor.java:996)
at org.apache.calcite.avatica.AvaticaSite.get(AvaticaSite.java:372)
at org.apache.calcite.avatica.AvaticaResultSet.getObject(AvaticaResultSet.java:393)
at org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.driver.jdbc.type.stream.JDBCStreamQueryResult.getValue(JDBCStreamQueryResult.java:87)
at org.apache.shardingsphere.infra.merge.result.impl.stream.StreamMergedResult.getValue(StreamMergedResult.java:47)
at org.apache.shardingsphere.driver.jdbc.core.resultset.ShardingSphereResultSet.getObject(ShardingSphereResultSet.java:359)`

it will cast timestamp to Number and error, if I just use single table query ,it's ok like this

'String sql = "select * from t_user t ";'
Issue 1:
I'm submitting a bug report

Current behavior

In the example provided below, there's an ngFor iterating over an array of Observables. Within the ngFor, each of the Observables is subscribed and its value output using the async pipe. By hitting a "Hide things" button, the ngFor template is destroyed (using ngIf). When the ngFor is destroyed , only half the subscriptions made by the async pipe are unsubscribed.

Expected/desired behavior

After the ngFor template is destroyed, all the subscriptions made by the async pipe are unsubscribed.

Steps to reproduce and if possible a minimal demo of the problem

http://plnkr.co/edit/C0hPY9HgfZ1QytdDK4hv

This should show "Thing X", with X being between 1 and 10 (inclusive). The numbers are output by the async pipe within an ngFor template. The Observables simply emit their number once to subscribers, and nothing further (no completion). They log subscriptions and unsubscriptions to the console.

Click on "Hide things" to destroy that ngFor template. The first time you do so, you will see that the subscription count changes from 10 to 5. The expected behaviour is that it changes from 10 to 0. In the console, you can see (by omission) that every second subscription made by async is not unsubscribed:

Unsubscribed from thing 1

Unsubscribed from thing 3

Unsubscribed from thing 5

Unsubscribed from thing 7

Unsubscribed from thing 9

Angular version: 2.0.0-rc.1

Browser: Chrome 51.0.2704.79

Language: TypeScript 1.8.10

Issue 2:
Steps to reproduce and a minimal demo of the problem

demo http://plnkr.co/edit/7uoVecfa62i8No8GtQHI?p=preview

Angular2 beta 16 or higher - When I hide first section with nested components using *ngIf, ngOnDestroy of every nested component is triggered - this is OK.

<div *ngIf="!ff2">
<my-component
></my-component>
<my-component
></my-component>
<my-component
></my-component>
<my-component
></my-component>
<my-component
></my-component>
</div>

Outpu in console is

init
init
init
init
init
destroy
destroy
destroy
destroy
destroy

But when I hide second section where subcomponents are duplicated by *ngFor, not every ngOnDestroy is triggered.

<div *ngIf="!ff">
<my-component
*ngFor="#i of [1,2,3,4,5,6]"
></my-component>
</div>

output in console is

(6) init
(3) destroy

Current behavior

not every ngOnDestroy is triggered

Expected/desired behavior

every ngOnDestroy should be triggered

Other information

in angular2 beta 9 it was working correctly

http://plnkr.co/edit/Q8tLJKlpF6wEVcMWfxH1?p=preview
Issue 1:
This is created as opposite to #6959.

There is a bug in React and it should be fixed to match DOM behaviour instead of solution proposed in #6959.

See #6959 (comment)

Issue 2:
I'm using React to build an application for viewing multiple webcasts at one time. I have a VideoGrid component that has an arbitrary number of VideoCell components as children. Each VideoCell has a unique key as described here.

I'm trying to implement the ability to swap the positions of webcasts on the screen. It's important that the DOM nodes are reordered and not recreated, in order to prevent the webcast embeds from reloading. Based on the documentation, the components should be reordered, not destroyed and recreated, because they have unique keys:

When React reconciles the keyed children, it will ensure that any child with key will be reordered (instead of clobbered) or destroyed (instead of reused).

The problem there is the "...or destroyed". It's vital that my components be reordered and not destroyed. I don't know how the diffing algorithm decides which components to reorder and which to destroy and recreate, but I'm seeing a mix of the two behaviors that doesn't do what I want.

I created a simple test case on JSFiddle to demonstrate the problem I'm having: https://jsfiddle.net/nwalters512/cja067cn/3/. Click the button to swap the keys assigned to the first and last components. Note how the last component is correctly moved to the first position, but the remainder of the components (including the ones at indices 1 and 2, who don't change at all!) are destroyed and recreated. You can see that by how the embedded video reloads.

Is there a way to force React to reorder children instead of destroying and recreating them?
Issue 1:
There are certain cases that argrelmin/max will fail due to the comparator being used. For instance:

from scipy.signal import argrelmin, argrelmax
import numpy as np
x = np.array([1,2,3,3,2,1])
print(argrelmax(x))

returns (array([], dtype=int64),)

This happens because the comparator is np.greater. Should this be fixed to provide some resolution or is this the desired behavior?

Issue 2:
Since our Appveyor runs are rather slow I've been working on getting Azure CI working for SciPy Windows testing.

To reduce noise / CI burden I've been doing this in a PR in my fork, where you can see the current diff & Azure CI results.

I've struggled for several hours trying to get openblas to work properly--I note that our instructions for installing openblas point to a FOUND output with language = c, while language = f77 in current appveyor builds, but I see c in my current build attempts on Azure (and the library name gets duplicated in the list on Azure too).

There are also apparent differences in the files / static libraries used for our master branch appveyor runs vs. macpython wheel building on appveyor & I've tried copying the static libraries from both URLs without full success yet.

The other question is whether the pre-installed mingw / gfortran on the Azure images is compatible with this "just copy the static library(ies)" from openblas workflow.

The Appveyor file suggests that we should install OpenBLAS.dll to MINGW\bin, but actually doesn't appear to do this in our master branch CI.

I'm also not entirely clear on why we need to replace NumPy distutils in our builds using the master branch--is this still true / helpful? Presumably the changes to distutils will eventually show up in a release and we can remove that stuff?
Issue 1:
The suggestion - when entering any web link in the PowerToys Run line - by pressing Enter, open it in the browser that is installed on the system by default.

The feature is not very important, but it will add usability to the PowerToys Run tool.

Issue 2:
Summary of the new feature/enhancement

I want to be able to start a web search from the launcher.

Ideally, I'd type bing power toys and it would navigate to https://www.bing.com/search?q=power+toys in my default browser.

google power toys would go to the equivalent.

The ability to specify the keyword/search engine to use and the domain it goes to would also be necessary. Not only would this enable supporting other search engines, but it would also allow for people to adjust for different TLD versions of search engines.

This would be similar to functionality that used to be available in Enso launcher.

Proposed technical implementation details (optional)

This would presumably require some settings for determining which words are identified as initiating the search and the URL to submit the query to.

This could also be the base for similar functionality where a keyword could launch an app and pass other values as command-line arguments. Without additional arguments, this could also serve as a way to create aliases for apps so they could be launched with a small number of keystrokes.

crutkas: possible solution to this issue in #10619. It defers to default browser + user's search engine. Lets PT Run be generic
Issue 1:
This is possibly a method dispatch error, where it computes that TypeVar(:N,Any) === 1

julia> begin
f{t,n}(::Type{Array{t}}, ::Array{t,n}) = (t,n,1)
f{t,n}(::Type{Array{t,n}}, ::Array{t,n}) = (t,n,2)
end
julia> methods(f)
#2 methods for generic function "f":
f{t,n}(::Type{Array{t,n}},::Array{t,n}) at none:3
f{t,n}(::Type{Array{t,N}},::Array{t,n}) at none:2

julia> f(Array{Int,1}, [1,2,3])
(Int32,1,2)

julia> f(Array{Int}, [1,2,3])
(Int32,1,2) # I was expecting (Int32,1,1) !

https://groups.google.com/d/msg/julia-users/FkwQ7Uo8lmg/oV6EXSCgV1AJ

Issue 2:
unlike DataTypes, the Array type template is incomplete, which leads to unexpected dispatch:

julia> z{T<:Base.BLAS.BlasFloat}(A::StridedMatrix{T}) = T

julia> let
dim=2
S=zeros(Complex,dim,dim)
@show typeof(S)
z(S)
end
typeof(S) => Array{Complex{T<:Real},2}
Union(Complex{Float64},Complex{Float32})

(code from #4796)

note that we can obtain a similar failure from BitsTypes:

julia> bitstype 64 A{T} <: Real

julia> reinterpret(A{Int}, 1)
A{Int64}(0x0000000000000001)

julia> reinterpret(A{Real}, 1)
A{Real}(0x0000000000000001)

julia> reinterpret(A, 1)
Segmentation fault (core dumped)
Issue 1:
The new heaviside ufunc has the following auto-generated signature both online and via numpy.info(numpy.heaviside):

heaviside(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])

The documentation then goes on discussing the signature in terms of

heaviside(x, h0, /, **kwargs)

so at first glance the mismatch between the variable names x1,x2 vs x,h0 can be confusing, especially since the former would suggest that the two inputs have similar roles, such as in the case of the inputs of logical_and.

After a bit of digging in the source I realized that the auto-generated signature seems to have the same format as e.g. logical_and, and it's likely that the format of the signature can't be further customized, assuming the existing machinery for generating ufuncs. Note that e.g. logical_and which formally shares a signature with heaviside refers to its inputs as x1,x2 in the docstring. The same goes for right_shift which again has the same signature, but where the two inputs have similarly asymmetric roles. So perhaps the solution is to keep the auto-generated signature, and adjust the docstring.

There's also the minor but independent issue that the documentation contains the out-where-kwargs lines of the docstring twice (once listed after x, once after h0).

Issue 2:
Recently updated from numpy 1.11.0 to 1.14.0 and some of my code was immediately broken.

You can simulate the broken bits through the following

my_metadata_dtype = np.dtype({'names':['Thing1','Thing2'],
'offsets':[22, 40],
'formats':['>u2','>i4'],
'itemsize'=256})
list_of_arrays = [np.arange(i, i+128, dtype='>i2') for i in range(5)]
array_of_metadata = np.array(list_of_arrays, dtype=my_metadata_dtype)
other_array_of_metadata = np.array(list_of_arrays)
other_array_of_metadata.dtype = my_metadata_dtype

One would expect that array_of_metadata and other_array_of_metadata should be the same thing.

They are not. I submit that the line creating array_of_metadata is buggy. I believe this produced the same as the lines that produce other_array_of_metadata in previous versions.

But that wasn't even the primary bug I was going to talk about. I discovered that one while hunting down this one.

Take our other_array_of_metadata:

Let's make a new array from a subset of this array (not just a view)

sub_array = np.array(other_array_of_metadata[2:4])
sub_array.dtype = '>i2'

You will see that our sub_array now has strange things in the spaces that were not exposed by our dtype. Not the nice aranges we had constructed before. In 1.11, this code would have preserved the data that was not exposed. Now it appears that the unexposed portions of sub-array are never initialized to anything. This matters because sometimes we want to only expose a part of our metadata to our code, but when we write the metadata back out to disk, want all of it preserved.

I can understand making a design choice to not initialize the unexposed portions of a dtype when constructing new elements from literals or from scratch. But when you already have an element of this dtype, ignoring the empty space seems like an inferior choice.
Issue 1:
Problem description

When Adding a Grid component at the root of a component I notice that class MuiGrid-spacing-xs-16-470 is appended to the root element.

it's width is set to calc(100% + 16px); witch is obviously 16px more than page width.

Is this a bug or I'm missing sth?

import React, { Component } from 'react';
import { Route } from 'react-router-dom';
import PropTypes from 'prop-types';
import Header from '../common/Header/Header';
import Sidebar from '../common/Sidebar/Sidebar';
import Grid from 'material-ui/Grid';

class Template extends Component {
constructor() {
super();
this.state = { isDrawerOpen: false };
this.toggleDrawer = this.toggleDrawer.bind(this);
this.closeDrawer = this.closeDrawer.bind(this);
this.setDrawerState = this.setDrawerState.bind(this);
}

setDrawerState(state) {
this.setState({ isDrawerOpen: state });
}

toggleDrawer() {
this.setDrawerState(!this.state.isDrawerOpen);
}

closeDrawer() {
this.setDrawerState(false);
}

render() {
const { component, ...rest } = this.props;
return (
<Route
{...rest}
render={() => (
<div>
<Header
onDrawerButtonClicked={this.toggleDrawer}
/>
<Sidebar
open={this.state.isDrawerOpen}
onRequestClose={this.closeDrawer}
/>
<Grid container>
{component}
</Grid>
</div>
)}
/>
);
}
}
Template.propTypes = {
component: PropTypes.element.isRequired,
};

export default Template;

Versions

Material-UI: 1.0.0-beta7

React: ^15.6.1

Browser: Chrome 60

Issue 2:
The <Grid container> extends beyond its parent, with half of spacing size.

I have marked the extra width in red, also setting spacing to zero fixes the problem.

Here is a working example: https://codesandbox.io/s/Y8nzGm5W.

Similar code with a zero spacing works as expected: https://codesandbox.io/s/NxvYxvQpL.
Issue 1:
See http://jsfiddle.net/v52uW/

tooltip element should be placed as the last element of the body.

OR

.btn-group > .btn:last-child => .btn-group > .btn:last-of-type ref

.btn-group > .btn + .btn => .btn-group > .btn + .tooltip + .btn ref

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

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

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

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

wrong output.

Reproduce the code example:

import numpy as np

mat = np.array([[7,5,1,6],[1,9,8,2],[2,7,3,8]])

mat
>>array([[7, 5, 1, 6],
[1, 9, 8, 2],
[2, 7, 3, 8]])

np.argsort(mat, axis=1)
>>array([[2, 1, 3, 0],
[0, 3, 2, 1],
[0, 2, 1, 3]])

# expected:
array([[3, 1, 0, 2],
[0, 3, 2, 1],
[0, 2, 1, 3]])

Error message:

No response

NumPy/Python version information:

Name: numpy

Version: 1.22.3

Summary: NumPy is the fundamental package for array computing with Python.

Home-page: https://www.numpy.org

Author: Travis E. Oliphant et al.

Author-email:

License: BSD

Issue 2:
The argsort function seems to be broken. Looking at the code provided, the argsort for rows [0, 1] is correct but it's messed up for rows [2, 3].

I tested this on different NumPy installations and versions 1.11.0 and 1.12.0

import numpy as np

vec = np.array([
[-1.4, -1.2, 1.3],
[-3.6, 3.9, -3.7],
[-2.3, 1.5, -2. ],
[-2.6, 2.4, -1.6]
])

In [1]: np.argsort(-vec, axis=1)
Out[1]:
array([[2, 1, 0],
[1, 0, 2],
[1, 2, 0],
[1, 2, 0]])
Issue 1:
Apache Airflow version

2.3.2 (latest released)

What happened

Grid view for a Task Group (renders incorrectly)

Graph View for same Task Group (renders correctly)

All historic DAG Runs for the task group are marked as "up_for_reschedule" because the current DAG Run task group has a "up_for_reschedule" task in it. It is observable in this screenshot that this is incorrect for all except the current DAG Run. The same was happening for "failed" statuses or "up_for_retry"

Also there is a visual issue in rendering the bottom two task names of the task group - their names are cut off - process_XXX_files_and_upload turned into s_XXX_files_and_upload.

What you think should happen instead

Task group should report status based on it's DAG Run

Task names should render correctly

How to reproduce

(assumption) Have a DAG with a Task Group and historical task runs in 2.3.2

Operating System

Debian/Docker

Versions of Apache Airflow Providers

No response

Deployment

Astronomer

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct

Issue 2:
Apache Airflow version

2.3.2 (latest released)

What happened

I updated to 2.3.2 today and while i love the new additions to the task groups ui i am getting weird behavior with their statuses. The previous run task groups status is changing to whatever the current run status is:

As you can see the top task group finished completely in the previous run but is now showing deferred because the most recent has that status. Same with the one below, it is showing running even though it is actually complete. I can post a video of all this happening real time if needed.

What you think should happen instead

They should show their own status, not the most recent one.

How to reproduce

All of my DAGs are doing it, so seems like you just need to have multiple runs on a DAG with task groups to reproduce.

Operating System

Windows 10

Versions of Apache Airflow Providers

No response

Deployment

Astronomer

Deployment details

Currently developing locally, will not be pushing this version to deployment until this is resolved.

Anything else

No response

Are you willing to submit PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct
Issue 1:
I'm submitting a ... (check one with "x")

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

Current behavior

When :host-context() has a tag selector the style is not applied when selector matches. Class selector works fine.

Example of working style: :host-context(.test)

Example of not working style: :host-context(div)

Expected behavior

Both styles should work

Reproduction of the problem

Plunk

What happens

In the plunk above Angular generates the following CSS:

[_nghost-dbj-2]div div[_ngcontent-dbj-2], div [_nghost-dbj-2] div[_ngcontent-dbj-2] {
background-color: green;
}
[_nghost-dbj-2].test div[_ngcontent-dbj-2], .test [_nghost-dbj-2] div[_ngcontent-dbj-2] {
background-color: red;
}

I assume that [_nghost-dbj-2]div is an invalid selector and browser discards the whole line so the style is never applied.

Please tell us about your environment:

Angular version: 2.0.1

Browser: Chrome, Firefox

Language: all

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

[X] bug report
[ ] feature request
[ ] support request

Current behavior

When using this.ChangeDetectorRef.detach() ...

... changes doesn't update DOM

... changes trigger change detection for this ComponentRef

... changes trigger change detection for full application

At least this is reproducable for setTimeout, setInterval and Template-Events(like (click))

Expected behavior

detach() should not trigger change detection at all

From the documentation: Detaches the change detector from the change detector tree. This can also be used in combination with ChangeDetectorRef to implement local change detection checks.

Minimal reproduction of the problem with instructions

I rebuild the 2.0.0-alpha.37 Plunker from the documentation with latest Angular 2.4.x: https://plnkr.co/edit/UUaVgGESOo5wnJ2jQ1oJ?p=preview

(Please see console)

Angular version:

2.4.X
Issue 1:
Unless I'm mistaken there's no official way of directly getting a string representation of a DataFrame. I was using cPickle's dumps and loads functions for this, but upgrading from 0.19 to 0.20 broke things. Yes, I could use Pandas' read_pickle and to_pickle functions as they are now and use the hard disk as an intermediate step, but this would hurt performance and seems unnecessarily roundabout. Having read_pickle and to_pickle optionally work with a string similar to cPickle's dumps and loads functions would be quite straightforward, no?

Issue 2:
brought up in #5661 , #5894
Issue 1:
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gce-serial/1926/

Failed: [k8s.io] [HPA] Horizontal pod autoscaling (scale resource: CPU) [k8s.io] [Serial] [Slow] ReplicationController Should scale from 1 pod to 3 pods and from 3 to 5 and verify decision stability {Kubernetes e2e suite}

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/horizontal_pod_autoscaling.go:70
Aug 13 07:01:09.867: Number of replicas has changed: expected 3, got 1
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/autoscaling_utils.go:291

Previous issues for this test: #27479 #27675 #28097

Issue 2:
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gce-serial/2033/

Failed: [k8s.io] [HPA] Horizontal pod autoscaling (scale resource: CPU) [k8s.io] [Serial] [Slow] Deployment Should scale from 1 pod to 3 pods and from 3 to 5 {Kubernetes e2e suite}

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/horizontal_pod_autoscaling.go:49
Aug 28 09:38:39.413: timeout waiting 15m0s for pods size to be 5
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/autoscaling_utils.go:284

Previous issues for this test: #30317