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

Bug summary

Code for reproduction

import matplotlib.pyplot as plt
a = [[1,2],[3,4]]
plt.imshow(a)
plt.show()

Try to click on the 'edit axis, curve, and image parameters' button (the one with the wavy line with an arrow at the end) in the plot window.

Actual outcome

When I click the 'edit axis, curve, and image parameters' button in the plot window, the window crashes with the following output:

Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 681, in edit_parameters
figureoptions.figure_edit(axes, self)
File "/usr/lib/python3.6/site-packages/matplotlib/backends/qt_editor/figureoptions.py", line 168, in figure_edit
+ [(name, name) for name in sorted(image.iterpnames)])]
TypeError: 'method' object is not iterable
fish: “python matplotlibbug.py” terminated by signal SIGABRT (Abort)

Expected outcome

Expected outcome is to open the window which allows to edit the axis and curve parameters. This works on matplotlib version 2.0.2

Matplotlib version

Operating system: Arch Linux

Matplotlib version: 2.1.0

Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg

Python version: 3.6.2

Jupyter version (if applicable):

Other libraries:

I installed matplotlib from the packages in the Arch repos https://www.archlinux.org/packages/community/x86_64/python-matplotlib/

Issue 2:
Bug report

Bug summary

Clicking on the figure options button (only available in the Qt backend) when showing an image does not work anymore. The dialog does not open and the script throws a TypeError.

Code for reproduction

from matplotlib import use
use('Qt5Agg')

import numpy as np
import matplotlib.pyplot as plt

data = np.ones((10,10))

plt.figure()
plt.imshow(data)
plt.show()

Click on figure options button (the second one from the right).

Actual outcome

Figure options dialog is not shown, instead a TypeError is thrown:

Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 681, in edit_parameters
figureoptions.figure_edit(axes, self)
File "/usr/lib/python2.7/site-packages/matplotlib/backends/qt_editor/figureoptions.py", line 168, in figure_edit
+ [(name, name) for name in sorted(image.iterpnames)])]
TypeError: 'instancemethod' object is not iterable

Expected outcome

Figure options dialog is opened and the script does not throw the TypeError. Used to work in matplot 2.0.2.

Matplotlib version

Bug introduced in matplotlib 2.1.0, specifcally this commit:

6ee70cb

changes 'iterpnames' from a variable (which is iterable) into a function (which must be called). The callside (figureoptions.py) was not modified accordingly. I guess adding '()' after iterpnames in figureoptions.py line 168 fixes the problem (untested).
Issue 1:
nebhale opened SPR-1555 and commented

I'd like to see support for the TestNG framework in the Spring Mocks area. To that end, I've gone ahead and done an initial conversion using the existing AbstractSpringContextTest and it's subclasses. As I worked on it, I felt that there was a ton of logic that would have to be duplicated in both trees and can probably be abstracted in some way. In addition there's backwards compatibility using XBean for TestNG if you want to support pre 1.5 (non-annotation) use of TestNG.

As far as the changes go, I simply removed the TestCase extension point and used annotations to get the setUp() method to run at the beginning of each test class. In addition, I removed the tearDown() and the onSetUp() and onTearDown() methods. TestNG guarentees that multiple 'beforeTestClass' and 'beforeTestMethod' are executed descending through the inheritence tree. In addition, this should give users more power as they can now set dependencies of methods to guarentee order. In addition in the Transaction classes, the creation and rollback of the transactions area listed as 'before/afterTestMethod'.

I realize that this is simply a first cut and there will still need to be work done. I'd like to see this as part of 2.0 final, but understand if it can't make it. If you want me to redo the work with design input from you all, that'd be OK as well.

Affects: 2.0 M1

Attachments:

AbstractDependencyInjectionSpringContextTests.java (9.88 kB)

AbstractSpringContextTests.java (4.26 kB)

AbstractTransactionalDataSourceSpringContextTests.java (2.69 kB)

AbstractTransactionalSpringContextTests.java (8.14 kB)

9 votes, 7 watchers

Issue 2:
Greg Matthews opened SPR-1423 and commented

When building a web application, you typically need to present messages to the user that can be an error, information, or warning.

There is no built in support for this in Spring, other than the Errors interface.

It would be good if there was built in support for:

A parameterized message level. e.g. Error, Info, Warning.

The ability for messages to survive a redirect (likely by storing them in session, and having the JSP page clear session state when messages are displayed). This point probably relates more the SpringWEB rather than SpringCORE because it needs to know about sessions.

Affects: 1.2.5

Issue Links:

#4895 Create a notion of "Warnings" ("duplicates")
Issue 1:
This program:

fn main() {
let a: &str = "one";
let b: String = "two".into_string();
let c = a + b;
println!("{}", c);
}

outputs twoone instead of onetwo. The issue is in impl<'a> Add<String, String> for &'a str: it adds the slice (which is on the left-hand side of +) to the end of the string (which is on the right-hand side of +).

Issue 2:
Probably because of the changes in dbc7e17 / 076e932 the following code now prints "Text: suffixprefix" (playpen link: http://is.gd/5f44Bo):

fn main() {
let prefix = "prefix";
let suffix = "suffix".to_string();
println!("Text: {}" , prefix + suffix);
}

I think compiler should display a error or warning in this case.
Issue 1:
Nikita Tovstoles opened SPR-9298 and commented

On each web request, RequestMappingHandlerAdapter.invokeHandlerMethod() indirectly calls MethodParameter.getParameterAnnotations(), which calls into JRE lib method causing monitor contention. See screen shots & YourKit snapshot. Most likely will need to patch spring (caching results of calls to java.lang.reflect.Method.getParameterAnnotations())

Looking at Spring's MethodParameter:

public Annotation[] getParameterAnnotations() {
if (this.parameterAnnotations == null) {
Annotation[][] annotationArray = (this.method != null ?
this.method.getParameterAnnotations() : this.constructor.getParameterAnnotations());
if (this.parameterIndex >= 0 && this.parameterIndex < annotationArray.length) {
this.parameterAnnotations = annotationArray[this.parameterIndex];
}
else {
this.parameterAnnotations = new Annotation[0];
}
}
return this.parameterAnnotations;
}

results of calls on Method & Constructor:

Annotation[][] annotationArray = (this.method != null ?
this.method.getParameterAnnotations() : this.constructor.getParameterAnnotations());

should be cached in two static Maps (since MethodParameter object is recreated per request)

Affects: 3.1 GA

Attachments:

screenshot-1.jpg (224.28 kB)

screenshot-2.jpg (291.28 kB)

Issue Links:

#14382 Share MethodParameter cache between HandlerMethods ("duplicates")

#12967 Look up of parameter annotations causes deadlock ("is duplicated by")

#13379 annotations need to be cached (jvm concurrency issue) ("is duplicated by")

0 votes, 7 watchers

Issue 2:
Patrick Linskey opened SPR-9748 and commented

RequestMappingHandlerAdapter creates a new HandlerMethod for each request. HandlerMethods cache their MethodParameters to avoid costly reflection calls each time annotation stats are needed, but the per-request copy circumvents this cache. This patch explicitly copies the MethodParameter cache from a HandlerMethod and its request-scoped dependents.

Affects: 3.1.1, 3.1.2, 3.2 M2

Issue Links:

#13936 monitor contention at org.springframework.core.MethodParameter.getParameterAnnotations() ("is duplicated by")

#17058 NPE in org.springframework.core.MethodParameter.getParameterName (possible race condition)

#17429 Thread contention in HandlerMethod due to unnecessary BeanFactory.getType call

Referenced from: commits 2295372, 0a877af

1 votes, 3 watchers
Issue 1:
[X] bug report
[ ] feature request
[ ] support request

Current behavior

Let's suppose we have to following modules:

AppModule
-> imports FeatureModule
-> import SubFeatureModule

FeatureModule has routes definitions

SubFeatureModule has component and router guard (resolve). Component declares its resolves via static field (to keep it in one place)

So FeatureModule declares a route, that lands to the component from SubFeatureModule and resolves given guard.

In runtime (browser-dynamic) everything works as expected. But when we compile with angular-compiler, among imports a duplicate entry appears for resolver, and it has wrong path.

Although, resolution via static fields in AoT in other cases works fine, I could not figure out why it fails in this case.

Minimal reproduction of the problem with instructions

I've created a repository with minimal code to reproduce:

Source code to reproduce

Please tell us about your environment:

Angular version:

2.0.1

Language:

typescript@2.0.3

Node (for AoT issues):

node version 6.5.0

Issue 2:
Typescript emits an __extends helper to, well, help with extending classes.

It currently shows up a few dozen times in our codebase, turning it off in the broccoli tree saves ~70KB unminified / 44KB minified in the existing System bundles.

option is noEmitHelpers: true

Same optimization in Rx saves ~20KB or so, will submit a PR over there as well.

We'll need to include it at least once, of course, so this might be best added into our proposed "ngPolyfill" along with Reflect?

cc @IgorMinar
Issue 1:
I cannot understand why the result of take can be visited by a for loop while throwing an error when put in a list comprehension, such as the code

for x in take(repeated(2), 10)
println(x)
end

works well but the following code

[x for x in take(repeated(2), 10)]

throws an error,

LoadError: MethodError: length has no method matching length(::Base.Take{Base.Repeated{Int64}})

while loading In[153], in expression starting on line 1

in anonymous at no file

Issue 2:
AIUI, the Julia package manager currently allows only per-user installation of packages.

From a packager perspective (I am a Debian developer), the possibility of having both system-wide and per user packages is very important.

In Debian, we already distribute large parts of Python's PIP, Perl's CPAN, R's CPAN, Octave Forge,… through the package manager.

I can give the following reasons for doing the same for Julia packages (the description below mentions Debian at several places, but you can replace it by virtually any GNU/Linux distributor):

uniformity of experience: a Debian user expects to get all its software through the Debian package manager (APT). Having to learn various package managers (Python's, Ruby's, Perl's, Octave's, R's,

Emacs', Julia's…) seems redundant and a waste of time

getting dependencies easily: if a Julia package relies on some shared library, then installing it through APT would automatically pull the library; Julia's package manager obviously cannot do that

quality assurance and security: a Debian user typically trusts Debian Developpers to make various checks on the quality and security of a package before putting it in the Debian archive, so he will be more confident on the quality of a package that he gets through APT than through another mean; also, downloads from the Debian archive are GPG-signed, which gives the user more confidence into the fact the he downloaded an untampered piece of code

scalability: the Debian package manager makes it much easier to deploy large installations with either many users on a single machine or many similar machines (like in large educational centers or scientific organizations). The sysadmin will clearly prefer to install an extra Debian package (since this already fits into its workflow) than to install Julia packages in the home of every user. Duplicating installations of Julia packages is also a waste of storage space, and creates a greater potential for heterogeneous installs

Obviously the goal is not to package all Julia packages into Debian. Several criteria such as popularity, usefulness, maturity and stability will matter when making the decision to create a Debian package.

Of course, the system needs to be designed in such a way that the per-user and system-wide repositories co-exist nicely. For example, if a package is installed in both locations, the per-user should probably take precedence (when executing a "Using" or when resolving dependencies).

In designing the system, it is important to recall that from user perspective, the system-wide location is read-only.
Issue 1:
At the moment there's no way that I can see to pass attr attributes through to the separate date and time child widgets of a datetime instance. This is easy to fix and I'm happy to put together a PR if people think it's a good idea.

The proposed solution is:

add date_widget_attr and time_widget_attr options to DateTimeType, which default to array()

in DateTimeType::buildForm(), pass these values through to the child widgets, using calls like $dateOptions['attr'] = $options['date_widget_attr'];

add related tests and documentation

As far as I can see, that's all that's needed (and is working in my local code).

Let me know if this is considered useful and I'll put together a PR.

Issue 2:
We currently use various different ways for influencing the options of the children of an added type:

a) By letting one option accept multiple values for the children (e.g. the "empty_value" option in DateType)

$form->add('updatedAt', 'date', array(
'empty_value' => array(
'day' => 'The day...',
),
));

b) By having dedicated "options" options (e.g. "options" in CollectionType, "first_options"/"second_options" in RepeatedType)

$form->add('password', 'repeated', array(
'type' => 'password',
'first_options' => array(
'required' => true,
),
));

And in #3825, a third possibility was suggested:

c) By having one dedicated option per child and option (e.g. "day_widget", "month_widget" etc.)

$form->add('updatedAt', 'date', array(
'day_widget' => 'text',
'month_widget' => 'choice',
));

These different alternatives

are inconsistent

need to be implemented manually

need to be changed whenever a new child option should be supported

Therefore I propose adding a generic way for overriding nested options by supporting a special syntax in the options array:

@child(/nestedChild)*[#option]

Examples:

$builder->add('updatedAt', 'datetime', array(
'@date' => array(
'required' => true,
'@day' => array(
'empty_value' => 'The day...',
),
),
));

// equivalent to

$builder->add('updatedAt', 'datetime', array(
'@date' => array(
'required' => true,
),
'@date/day' => array(
'empty_value' => 'The day...',
),
));

// equivalent to

$builder->add('updatedAt', 'datetime', array(
'@date#required' => true,
'@date/day#empty_value' => 'The day...',
));

Additionally, setting an option for all children at once should be supported:

$builder->add('updatedAt', 'datetime', array(
'@date/*#empty_value' => '...',
));

References:

#3825

#6350

#6910

#8396

#8443

#10012
Issue 1:
VS code on my Mac cannot save modified files suddenly. I tried restarting VS Code and MAC itself, but none brought saving back. It keeps popping this dialog when I cmd + S to save a file.

More information:

VS version: 0.10.6

Issue 2:
I often need to edit config files (MySQL, PHP, Apache, ...) in directories like C:\Program Files that require administrative rights. When you open them with code and save the file it says "Permission denied". So I have to run Code with right click as administrator and then choose "open file" to open the file. Once, it is not possible to simply drag&drop the file into the elevated Code. The other problem is, once I already have code instance running without elevated rights (say I have my project open and now I need to edit a config) I cannot get another instance with elevated permissions. UAC asks for permissions and a new Code window opens, but it is not elevated, when I save it says permission denied. I have to close my project before I can get an elevated Code instance.

I don't know if that is a restriction of Windows but seeing that you can, for example, run a normal Powershell and an elevated Powershell side-by-side I think this should be possible. The optimal case of course would be if Code could elevate itself if it can't save a file because of insufficient permissions. But being able to run elevated and non-elevated side-by-side would already help a lot.
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

If we use providers on the module, service become application level. So, it is way to provide application-level services (as it made in example).

But, if we create lazy-loaded module it can import another modules, and import its providers as well. Due to lazy loaded modules get their own root scope, imported providers will override application root providers, and dublicate instances of the services will be created.

So, if we using lazy-loaded modules, we should not use feature module providers at all - these services will be dublicated. We only can use providers of the AppModule. There is no use case, where feature module providers can be safely used.

Additional info and documentation refs there.

Expected behavior

Something should be fixed in the architecture, to create use case for feature module providers, or this feature should be deprecated. Documentation should describe, how to define application-level providers (in AppModule, and not in feature modules).

Angular version: 2.0.X

Issue 2:
in creating a options list that allows the user to change different settings i found a problem with the type checkbox . take this component

(function(app){
app.testing=ng.core.Component({
selector:"testing",
template:"<input type='checkbox' [(ngModel)]='testing'/>"+
"<template ngFor #item [ngForOf]='list'>"+
"<input [type]='item.type' [(ngModel)]='item.value'/>"+
"</template>"
}).Class({
constructor:[function(){
this.testing=true;
this.list=[
{type:"checkbox",value:true},
{type:"text",value:"hello world"}
];
}],
});
})(window.app||(window.app={}));

because of the ngFor loop combining with the dynamic setting of inputs and their types ngModel does not work on the second checkbox although it does on the first which is not dynamically set. im guessing this is a problem with how ngModel determines that the input is type checkbox. a example of this can be found here

sorry to those of you who work in typescript i was not able to use typescript so it is in plain es5. i hope you can still interpret what its meaning and maybe someone can translate it to typescript.
Issue 1:
Bootstrap: affix.js v3.1.1

When you scroll to the bottom, the "position" system is set. But it is not "unset" when you scroll back up (unpin).

I fixed the problem by changing:

. if (this.unpin) this.$element.css('top', '')

...to...

if (this.unpin) this.$element.css('top', '').css('position', '')

Dunno if this is a good "fix" or a bit of a hack.

Issue 2:
When scrolling to the bottom of the page, affix-Plugin sets the class "affix-bottom" and sets inline styles like "position: relative; top: XYZpx;". The Problem is, that the inline "position: relative" aren't removed after scrolling up again. It would be better, to set "position: relative" via the class "affix-bottom" (which works correct) and not via javascript. That would solve the problem.

BTW: I use Mac OS 10.9.3, Chrome 35.0.1916.114
Issue 1:
In this small example below, both snippets used to compile. Recently,
however, only the 2nd snippet compiles:

http://pastie.org/743667

What is the expected output? What do you see instead?
I expect both to compile.

What is your $GOOS? $GOARCH?
linux/386

Which revision are you using? (hg identify)
a33ae1785d42+ (+=�=<) tip

Please provide any additional information below.
Something must have changed recently

Issue 2:
by kballard:

Building launchpad.net/goyaml produces a series of warnings:

decode.go: In function ‘_cgo_27a928056cbd_Cfunc_event_alias’:
decode.go:34:7: warning: assignment from incompatible pointer type [enabled by default]
decode.go: In function ‘_cgo_27a928056cbd_Cfunc_event_mapping_start’:
decode.go:44:7: warning: assignment from incompatible pointer type [enabled by default]
decode.go: In function ‘_cgo_27a928056cbd_Cfunc_event_scalar’:
decode.go:54:7: warning: assignment from incompatible pointer type [enabled by default]
decode.go: In function ‘_cgo_27a928056cbd_Cfunc_event_sequence_start’:
decode.go:64:7: warning: assignment from incompatible pointer type [enabled by default]

The Cgo-generated function for the first warning looks like

void
_cgo_27a928056cbd_Cfunc_event_mapping_start(void *v)
{
struct {
yaml_event_t* p0;
const struct {yaml_char_t* anchor; yaml_char_t* tag; int implicit; yaml_mapping_style_t style; }* r;
} __attribute__((__packed__)) *a = v;
a->r = (const struct {yaml_char_t* anchor; yaml_char_t* tag; int implicit; yaml_mapping_style_t style; }*) event_mapping_start((void*)a->p0);
}

The warning is on the `a->r = ...` line.

If I ask Clang to build this file, the warning is a bit more verbose:

decode.go:34:7: warning: incompatible pointer types assigning to 'const struct
<anonymous struct at decode.go:32:9> *' from 'const struct <anonymous struct at
decode.go:34:16> *' [-Wincompatible-pointer-types]
a->r = (const struct {yaml_char_t* anchor; }*) event_alias((void*)a->p0);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

What steps will reproduce the problem?
1. Build launchpad.net/goyaml

What is the expected output?
No warnings

What do you see instead?
The warnings listed above

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

Which operating system are you using?
Ubuntu 12.04

Which version are you using? (run 'go version')
go version go1.1 linux/386
Issue 1:
What I want to do is retrieving(or slicing 1-element) from tensor with tensor indices.

for example,

data = tf.constant( [ [1,2,3], [4,5,6] ] )
i = tf.constant(2)
j = tf.constant(1)

k = data[i,j] # error
l = tf.gather( tf.gather(data, i) , j) # ok. but generate errors when gradient optimization process..

sess.run(k, ...) generates bad slice errors.

data[i,j]
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 129, in _SliceHelper
raise TypeError("Bad slice index %s of type %s" % (s, type(s)))

tf.gather is ok to slice element, but it yields errors when training time (tf.train.GradientDescentOptimizer.minimize)

Any tips to work-around this problem?

Issue 2:
Issue:

TFLearn estimator summary writer fails because _write_dict_to_summary() in /tensorflow/contrib/learn/python/learn/estimators/estimator.py dose not allow int values, which naturally stops the np.int64 valued 'global_step' parameter from being written, thus causing the summary writer to fail.

How to reproduce:

Try and run wide_n_deep_tutorial.py, and you will get:

INFO:tensorflow:Saving dict for global step 202: accuracy = 0.818254, accuracy/baseline_label_mean = 0.236226, accuracy/threshold_0.500000_mean = 0.818254, auc = 0.742517, global_step = 202, labels/actual_label_mean = 0.236226, labels/prediction_mean = 0.182356, loss = 0.680463, precision/positive_threshold_0.500000_mean = 0.764145, recall/positive_threshold_0.500000_mean = 0.333593 WARNING:tensorflow:Skipping summary for global_step, must be a float or np.float32.

Pull Request:

#7555