WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Bug report

Bug summary

The new Cairo backend flips the imshow image compared to the Agg.

Code

import matplotlib
matplotlib.use("TkCairo") # or matplotlib.use("TkAgg")
import matplotlib.pyplot as plt

fig, ax = plt.subplots(figsize=(4,2.5))

im = plt.imread("house.png")
ax.imshow(im, origin="upper")

fig.suptitle(matplotlib.get_backend())
fig.savefig(matplotlib.get_backend()+".png")
plt.show()

Actual outcome: TkAgg (similar with Qt4Agg)

Actual outcome: TkCairo (similar with Qt4Cairo)

Expected outcome

I would guess the Agg behaviour is the intended one.

Matplotlib version

Operating system: Windows 8.1

Matplotlib version: 2.2

Matplotlib backend: TkCairo, Qt4Cairo (flipped image); TkAgg, Qt4Agg (upright image)

Python version: 2.7.10

Issue 2:
As of master (and probably since a long time)

from pylab import *
rcdefaults()
fig, axs = plt.subplots(1, 2)
axs[0].imshow(np.arange(4).reshape((2, 2)))
axs[1].imshow(np.arange(4).reshape((2, 2)), alpha=.5)
show()

produces, on gtk3agg

and on gtk3cairo

Looks like image.origin is not respected, and alpha is not applied correctly (this is not surprising, as cairo uses premultiplied ARGB (https://www.cairographics.org/manual/cairo-Image-Surfaces.html#cairo-format-t CAIRO_FORMAT_ARGB32).
Issue 1:
https://github.com/golang/go/wiki/CodeReviewComments#imports says that "Imports are organized in groups, with blank lines between them. The standard library packages are in the first group.".

However godoc simply sorts imports in lexicographical order.

This makes it very hard to find the documentation of a standard package.

The order should be:

standard library packages

golang.org/x/ packages

other packages

Issue 2:
Brad: "I'd really like to see the standard library by itself, or at least broken up
by itself at the top of the page, with third-party GOPATH stuff at the bottom."

Russ: "If you really wanted to, you could do something like
http://golang.org/cl/5797067 But I am not sure it's such a good idea"

Brad: "Sounds like a great idea. Much prettier. What's the downside?"

Russ: "I have used systems with 'mostly sorted' lists before, and the convenience
always seems to give way to confusion, because people think they _are_ sorted and then
can't find things."

Robert: "Can we have different modes for looking at it?"

Brad: "The default is all that matters. There's already a flat mode (which I
prefer), but I can never remember how to get to it without looking up the source, which
I'm always too lazy to do. You could argue for mode-switching links, but therein lies
craziness."
Issue 1:
Currently there is no resize event for BrowserWindows, therefore it's impossible to know when it's resized.

A possible workaround would be to listen to the DOM resize event and send it over the IPC.

Issue 2:
It would be great if electron supported 2 more BrowserWindow events:

resize

move

They could work similar to events in nw.js Window. Both of them would be emitted after window is moved or resized. Callback could be called with 2 arguments:

x and y for move

width and height for resize
Issue 1:
The multitude of shortcuts for "Editor : Select To End Of Line" break the layout of the command panel.

User: @jbarnette

Atom Version: 0.43.0

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Atom/0.43.0 Safari/537.36

Issue 2:
in the command panel the word wrapping is a little off

User: @jonrohan

Atom Version: 0.41.0

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Atom/0.41.0 Safari/537.36

Screenshot: screenshot
Issue 1:
Chris Beams opened SPR-8275 and commented

Issue Links:

#13081 java.lang.IncompatibleClassChangeError --> with new Version Of Quartz (2.0.0) !!! ("is duplicated by")

#14030 Documentation concerning Quartz support is out of date

#12642 Support Quartz 1.8.x or better

#13369 Implement new method from ClassLoadHelper to make Spring work with Quartz 2.1

#13200 setCronExpression method not exposed in CronTriggerBean

#13383 Make MethodInvokingJobDetailFactoryBean compatible with Quartz 2.x

#13006 Need support for Quartz 2.0

Referenced from: commits f265347, 16933a5, 69c9abf

4 votes, 7 watchers

Issue 2:
harish opened SPR-9406 and commented

RestTemplates HTTP status codes to only the ones that have associated messages. All 1xx,2xx,3xx,4xx,5xx are legal and valid response codes. RestTempllate should treat them as legal and not throw IllegalArgumentException or ignore message body when any of them are passed. Both code and body should be preserved and passed to caller as such. That would help services and clients make use of flexibility provided by HTTP specifications in using existing status codes and adding their own if no suitable status exists for their needs. This is preventing us from using RestTemplate.

Affects: 3.1.1

Sub-tasks:

#14136 Backport "Unknown status codes (i.e. not in HttpStatus enum) prevent HttpClientErrorException and HttpServerErrorExceptions from being raised"

Issue Links:

#11418 RestTemplate throws IllegalArgumentException when HTTP status is not in the HttpStatus enum

#20529 RestTemplate doesn't consistently tolerate unknown HTTP status codes
Issue 1:
Input Code

const { x, ...y } = foo();

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

{
"dependencies": {
"babel-plugin-transform-object-rest-spread": "^6.19.0",
"babel-cli": "^6.18.0"
},
"scripts": {
"build": "babel --plugins transform-object-rest-spread src.js > out.js"
}
}

Expected Behavior

const _ref = foo();
const { x } = _ref;
const y = _objectWithoutProperties(_ref, ["x"]);

Current Behavior

const { x } = foo();
const y = _objectWithoutProperties(foo(), ["x"]);

Context

Your Environment

software
version

Babel
babel-core@6.18.2, babel-cli@6.18.0, babel-plugin-transform-object-rest-spread@6.19.0

node
4.1.2, 6.5.0, 7.1.0

npm
2.14.4, 3.10.3, 3.10.9

Operating System
Windows, Linux

It also does something crazy for this code 😜 ... c gets hoisted out of the arrow function and then the above bug duplicates the entire thing:

in:

const { a } = foo(({ b, ...c }) => {
console.log(b, c);
});

out:

const { a } = foo(({ b }) => {
console.log(b, c);
});
const c = _objectWithoutProperties(foo(({ b }) => {
console.log(b, c);
}), ["b"]);

Issue 2:
Currently:

[1, 2].push(...arguments);

Outputs:

[1, 2].push.apply([1, 2], _slice.call(arguments));

But it should be (something like):

var _ref;
(_ref = [1, 2]).push.apply(_ref, _slice.call(arguments));
Issue 1:
Summary of the new feature/enhancement

Often times, I just want to quickly view images in a full size (or zoom in) in my currently opened folder in the file explorer. To do that, you have to open it in Photos or any other external app which takes some time to start up and you will only see one image at a time.

Having a simple gallery "integrated" into file explorer - activated by a shortcut or some button in a ribbon would make browsing through images smoother and faster.

I have implemented such a functionality in my project. More details and demos here - https://github.com/martinchrzan/FileExplorerGallery

Proposed technical implementation details (optional)

I am happy to integrate my project into PowerToys - https://github.com/martinchrzan/FileExplorerGallery

Issue 2:
Is it possible to specify the keyboard where the key remapping will happen?

This is quite useful for notebook users who also have a full keyboard in office, the keyboard mapping is only needed for the build-in keyboard of his/her notebook computer, not the normal full keyboard.

Thank you!
Issue 1:
babel-node repl works differently from compiled code + node regarding

import. The ES6-way of importing works fine when I compile code with

babel and run it with with the node binary. In babel-node I can't

seem to import a node-module. The import doesn't throw any error, but

when I try to use the module, I get ReferenceError. Details below.

First, run npm install. Then start the repl:

node_modules/.bin/babel-node

Now, try to make an ES6-import of our example lib (ramda):

import R from 'ramda'
R.identity(1)

This error occurs:

R.identity(1);
^
ReferenceError: R is not defined

However, direct call to CommonJS/Node require works:

const R = require('ramda')
R.identity(1)
-> 1

But when I do the same thing import by compiling my ES6 code first,

and then run it with node, everything works fine. The test code (test-module.js):

import R from 'ramda'

const retval = R.identity(1)
console.log(retval)

Compile and run:

node_modules/.bin/babel test-module.js --out-file test-module-compiled.js
node test-module-compiled.js
-> 1

I used node version v0.12.7 and babel 5.8.23 (the newest which I was able to npm install). Example code/project is here: https://github.com/auramo/babel-node-repl-issue

Issue 2:
Issue originally made by @tony-kerz

Bug information

Babel version: 6.10.1

Node version: 6.2.2

npm version: 3.9.5

Options

babel-node ./src/leak-test-async-simple.js

Input code

import debug from 'debug'
import assert from 'assert'

const dbg = debug('app:leak-test-async')

async function run() {
try {
let idx = 0
const thresh = 1e5
const limit = 1e6
while (idx < limit) {
idx++
const record = await get()
assert(record)
if (idx % thresh == 0) {
dbg('records-read=%o, heap-used=%o mb', idx, process.memoryUsage().heapUsed/1e6)
}
}
dbg('successfully processed [%o] records', idx)
}
catch (caught) {
dbg('connect: caught=%o', caught)
}
}

async function get() {
return {
foo: 'foo',
bar: 'bar'
}
}

run()

Description

memory leak (possibly duplicate of: https://phabricator.babeljs.io/T7240)

app:leak-test-async records-read=100000, heap-used=146.651808 mb +0ms
app:leak-test-async records-read=200000, heap-used=278.423792 mb +942ms
app:leak-test-async records-read=300000, heap-used=383.71728 mb +1s
app:leak-test-async records-read=400000, heap-used=506.817272 mb +945ms
app:leak-test-async records-read=500000, heap-used=634.425064 mb +935ms
app:leak-test-async records-read=600000, heap-used=759.827616 mb +959ms
app:leak-test-async records-read=700000, heap-used=902.615704 mb +973ms
app:leak-test-async records-read=800000, heap-used=942.299272 mb +1s
app:leak-test-async records-read=900000, heap-used=1071.199184 mb +1s
app:leak-test-async records-read=1000000, heap-used=1121.771856 mb +2s
app:leak-test-async successfully processed [1000000] records +1ms
Issue 1:
Environment

Windows build number: 10.0.18363.0
Windows Terminal version (if applicable): 0.6.2911.0

Any other software?
I use PowerToys FancyZones to size my window.

Steps to reproduce

Launch Windows Terminal with PowerShell Core as the current tab's shell

Resize the window to slightly small width to trigger line wraps

Run something that prints long lines of output. In my case, I was running scoop update.

Expected behavior

Lines are wrapped correctly.

Actual behavior

Lines are not wrapping but rather writing over themselves.

Issue 2:
Description of the new feature/enhancement

Currently when I pin the windows terminal to my taskbar and open it, it will open in windowed mode. I would like to have a setting, where the windows terminal opens in fullscreen mode per default.

Proposed technical implementation details (optional)

Add setting openFullscreen
Issue 1:
We agreed today that the metadata we produce for a single project should contain only relative paths, because we do not need to reference symbols that originated in a different node package.

This is a smell because we are about to change our package names, and the string 'angular2' does not appear anymore, however the metadata ought to remain unchanged (because the .d.ts files will not be affected)

https://raw.githubusercontent.com/angular/angular/builds-js/src/common/forms/directives/ng_control_name.metadata.json

Is an example of two problems:

there is a module in the top-level __symbolic definition, this duplicates information available in the file's path, and differs from .d.ts files, which do not declare their own module name. PROPOSAL: remove module from the schema (https://github.com/angular/angular/blob/master/tools/metadata/src/schema.ts#L5 )

references to other angular code should be relative, not absolute names starting with 'angular2'. PROPOSAL: simply use the path.relative function in nodejs to relativize the path of a module from the containing file, whole metadata we are gathering.

cc @tbosch @chuckjaz

Issue 2:
Hello,

I'm submitting a FEATURE REQUEST / QUESTION.

I am aware that Angular2 default DI Context strategy is to enrich an application-wide Dependency Injection Context. But I would like some Injectables to not be globally available.

Here is a concrete example of what I am trying to achieve.

There is probably a doc explaining how to do so but I have not been able to find it.

I would like to create a ServiceModule that would differentiate Public/Exported services from Private services.

@Injectable() export class PrivateService{} // Not available in AppModule
@Injectable() export class PubliclyExportedService{ // Available in AppModule
constructor(private privateService: PrivateService) { }
}

// The imported module
@NgModule({
exports: [PubliclyExportedService],
declarations: [PubliclyExportedService],
providers: [
PubliclyExportedService,
PrivateService
]
})
export class ServiceModule {}

// The main module
@NgModule({
imports: [ServiceModule]
})
export class AppModule { }

The goal is to use the dependency injection so that PubliclyExportedService can use PrivateService but any class outside of the ServiceModule would not be capable of injecting the PrivateService.

Any help is greatly appreciated

PS: This is a duplicate of a stackoverflow question where nobody seemed to have an answer to this problem.
Issue 1:
broadcast_arrays does not indicate the unbroadcastable shapes on failure, unlike implicit broadcasting and broadcast_to. It would be nice if it did.

In [1]: np.arange(2) + np.arange(3)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-1-6b2dd1b1eacd> in <module>()
----> 1 np.arange(2) + np.arange(3)

ValueError: operands could not be broadcast together with shapes (2,) (3,)

In [3]: np.broadcast_to(range(2), 3)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-3-6521087bac95> in <module>()
----> 1 np.broadcast_to(range(2), 3)

/usr/lib/python3.6/site-packages/numpy/lib/stride_tricks.py in broadcast_to(array, shape, subok)
113 [1, 2, 3]])
114 """
--> 115 return _broadcast_to(array, shape, subok=subok, readonly=True)
116
117

/usr/lib/python3.6/site-packages/numpy/lib/stride_tricks.py in _broadcast_to(array, shape, subok, readonly)
68 broadcast = np.nditer(
69 (array,), flags=['multi_index', 'refs_ok', 'zerosize_ok'] + extras,
---> 70 op_flags=[op_flag], itershape=shape, order='C').itviews[0]
71 result = _maybe_view_as_subclass(array, broadcast)
72 if needs_writeable and not result.flags.writeable:

ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (2,) and requested shape (3,)

In [4]: np.broadcast_arrays(range(2), range(3))
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-4-267514b78435> in <module>()
----> 1 np.broadcast_arrays(range(2), range(3))

/usr/lib/python3.6/site-packages/numpy/lib/stride_tricks.py in broadcast_arrays(*args, **kwargs)
189 args = [np.array(_m, copy=False, subok=subok) for _m in args]
190
--> 191 shape = _broadcast_shape(*args)
192
193 if all(array.shape == shape for array in args):

/usr/lib/python3.6/site-packages/numpy/lib/stride_tricks.py in _broadcast_shape(*args)
124 # use the old-iterator because np.nditer does not handle size 0 arrays
125 # consistently
--> 126 b = np.broadcast(*args[:32])
127 # unfortunately, it cannot handle 32 or more arguments directly
128 for pos in range(32, len(args), 31):

ValueError: shape mismatch: objects cannot be broadcast to a single shape

Issue 2:
Currently, np.broadcast_to prints the nonbroadcastable shapes in its error message, but not np.broadcast_arrays:

In [1]: np.broadcast_to([1, 2], 3)
<elided>
ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (2,) and requested shape (3,)

In [2]: np.broadcast_arrays([1, 2], [3, 4, 5])
<elided>
ValueError: shape mismatch: objects cannot be broadcast to a single shape

It would be mildly helpful if the second error message also reported the incorrect shapes.
Issue 1:
This may be a duplicate, but I haven't seen this resolved anywhere in the similar-looking issues. With the current nightly, the following borrow is not allowed:

let mut a = 2u;
let mut p = &mut a;
p = &mut a; // Error here: "a already borrowed"

In terms of lifetimes, the first borrow should end by the time p is being reassigned to. However, in the current version of Rust, the borrow is considered to be taken out as long as p is alive.

What is the current state of this, and are there plans to change the semantics of assignment to be able to end borrows?

Issue 2:
If you borrow immutably in an if test, the borrow lasts for the whole if expression. This means that mutable borrows in the clauses will cause the borrow checker to fail.

This can also happen when borrowing in the match expression, and needing a mutable borrow in one of the arms.

See here for an example where the if borrows boxes, which causes the nearest upwards @mut to freeze. Then remove_child() which needs to borrow mutably conflicts.

https://github.com/mozilla/servo/blob/master/src/servo/layout/box_builder.rs#L387-L411

Updated example from @Wyverald

fn main() {
let mut vec = vec!();

match vec.first() {
None => vec.push(5),
Some(v) => unreachable!(),
}
}
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: 2.7.2

Operating System version: windows10(18362.175)

Java version: jdk12.0.1

Steps to reproduce this issue

create interface

@SPI
public interface Robot {
void sayHello();
}

implements Roobot

public class Bumblebee implements Robot {

@Override
public void sayHello() {
System.out.println("Hello, I am Bumblebee.");
}
}

public class OptimusPrime implements Robot {

@Override
public void sayHello() {
System.out.println("Hello, I am Optimus Prime.");
}
}

create a folder

/MEAT-INF/dubbo/

optimusPrime=com.huifer.dubbo.client.spi.OptimusPrime
bumblebee=com.huifer.dubbo.client.spi.Bumblebee

run demo

public class SpiDemo {

public static void main(String[] args) {

ExtensionLoader<Robot> extensionLoader =
ExtensionLoader.getExtensionLoader(Robot.class);
Robot optimusPrime = extensionLoader.getExtension("optimusPrime");
optimusPrime.sayHello();
Robot bumblebee = extensionLoader.getExtension("bumblebee");
bumblebee.sayHello();

}

}

Pls. provide GitHub address to reproduce this issue.

Expected Result

Console output

Hello, I am Optimus Prime.
Hello, I am Bumblebee.

Actual Result

It has an exception and does not find optimusPrime

Exception in thread "main" java.lang.IllegalStateException: No such extension com.huifer.dubbo.client.spi.Robot by name optimusPrime
at org.apache.dubbo.common.extension.ExtensionLoader.findException(ExtensionLoader.java:520)
at org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:527)
at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:351)
at com.huifer.dubbo.client.spi.SpiDemo.main(SpiDemo.java:18)

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

Operating System version: Windows

Java version: 1.8

Steps to reproduce this issue

When I config TagRouter like this (in Dubbo admin):

enabled: true
force: false
runtime: false
tags:
- name: tag1
addresses: null
- name: tag2
addresses: null

Actual Result

Then the java.lang.NullPointerException was caused

java.lang.NullPointerException
at org.apache.dubbo.rpc.cluster.router.tag.model.TagRouterRule.lambda$init$2(TagRouterRule.java:55)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at org.apache.dubbo.rpc.cluster.router.tag.model.TagRouterRule.init(TagRouterRule.java:53)
at org.apache.dubbo.rpc.cluster.router.tag.model.TagRuleParser.parse(TagRuleParser.java:42)

I think we should add NPE check in TagRouterRule or check addresses in Dubbo admin

tags.forEach(tag -> {
tagnameToAddresses.put(tag.getName(), tag.getAddresses());
// check tag.getAddresses() not null
tag.getAddresses().forEach(addr -> {
List<String> tagNames = addressToTagnames.computeIfAbsent(addr, k -> new ArrayList<>());
tagNames.add(tag.getName());
});
});
Issue 1:
The code:

graph_def = tf.GraphDef()
graph_def.ParseFromString(open(PB_PATH).read())

The error:

google.protobuf.message.DecodeError: Error parsing message

The SHA: f2a42d48a885ce8956c3ea69ef900cf484a6e873

Thanks.

Issue 2:
I just upgraded TF to 469b3dd and I'm now getting an error importing the inception v3 model provided at https://storage.googleapis.com/download.tensorflow.org/models/inception_dec_2015.zip

I didn't have this problem before the upgrade. Here is the error

Traceback (most recent call last):
File "test.py", line 7, in <module>
graph_def.ParseFromString(fileContent)
google.protobuf.message.DecodeError: Error parsing message

And this is the code I'm using

import tensorflow as tf

with open("tensorflow_inception_graph.pb", mode='rb') as f:
fileContent = f.read()
graph_def = tf.GraphDef()
graph_def.ParseFromString(fileContent)

input_layer = tf.placeholder("float", [1, 299, 299, 3])
tf.import_graph_def(graph_def, input_map={ "Mul": input_layer })
Issue 1:
Version

2.5.13

Reproduction link

https://codepen.io/chenfeng163/pen/VyMrQy

Steps to reproduce

父组件中部分组件发生状态改变，会引发子slot组件render两次

What is expected?

父组件其他组件状态更新的时候不要影响slot组件的render

What is actually happening?

子组件渲染两次

Issue 2:
Version

2.3.3

Reproduction link

https://jsfiddle.net/06q3ctsp/

Steps to reproduce

Child component's updated event is unexpected triggered when it has content, not when it's content is changed.

What is expected?

Child component's updated event is triggered only when it's content is changed.

What is actually happening?

When parent component is changed, the child component with content will always be updated whether it's content is changed.
Issue 1:
Taking the absolute value of the smallest negative machine size integer returns a negative value.

On ARM (Raspian OS) machines (e.g. Raspberry Pi 3). If you run

numpy.absolute(np.array([-2**31]))

you get

array([-2147483648])

On Intel (Apple OS X), on the other hand,

numpy.absolute(np.array([-2**63]))

you get

array([-9223372036854775808])

The dtype for the array is int32 on ARM and int64 on Intel.

Issue 2:
Python:

In [117]: abs(-2147483646)
Out[117]: 2147483646

In [118]: abs(-2147483647)
Out[118]: 2147483647

In [119]: abs(-2147483648)
Out[119]: 2147483648L

In [120]: abs(-2147483649)
Out[120]: 2147483649L

In [121]: abs(-2147483650)
Out[121]: 2147483650L

NumPy:

In [93]: absolute(array([-2147483646]))
Out[93]: array([2147483646])

In [94]: absolute(array([-2147483647]))
Out[94]: array([2147483647])

In [95]: absolute(array([-2147483648]))
Out[95]: array([-2147483648])

In [96]: absolute(array([-2147483649]))
Out[96]: array([2147483649], dtype=int64)

In [97]: absolute(array([-2147483650]))
Out[97]: array([2147483650], dtype=int64)

In C this is undefined because abs() returns an int and there's no +2147483648, but NumPy should convert to int64? and then absolute(array(-2**63)) should convert to object array with longs instead of returning -9223372036854775808?

Related to #593?