WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Bug report (or feature request)

Summary

In matplotlib, when manually restricting xlim, ylim does not change accordingly.

Code for reproduction

import numpy as np
import matplotlib.pyplot as plt

x = np.array([1,2,3,4,5,6,7])
y = x

fig = plt.figure()
ax = plt.axes()
ax.plot(x, y)
print('xlim: %s, ylim: %s' % (ax.get_xlim(), ax.get_ylim()))

fig = plt.figure()
ax = plt.axes()
ax.plot(x, y)
ax.set_xlim(1, 2)
print('xlim: %s, ylim: %s' % (ax.get_xlim(), ax.get_ylim()))

Actual outcome

xlim: (0.7, 7.3), ylim: (0.7, 7.3)
xlim: (1.0, 2.0), ylim: (0.7, 7.3)

Expected outcome

When I change xlim to (1, 2), I expect ylim to change accordingly (because y's value range becomes [1, 2], now that x's range shrinks), but ylim still remains (0.7, 7.3). In fact, in MATLAB xlim and ylim can coordinate with each other.

MATLAB codes to reproduce this behavior:

x = [1,2,3,4,5,6,7];
y = x;
figure; plot(x, y); disp(ylim);
figure; plot(x, y); xlim([1, 2]); disp(ylim);

Matplotlib version

Operating system: Windows 10

Matplotlib version: 2.2.2

Matplotlib backend (print(matplotlib.get_backend())): module://ipykernel.pylab.backend_inline

Python version: 3.6.6

Jupyter version (if applicable): N/A

Other libraries: N/A

Issue 2:
I filed a matplotlib bug report via GitHub: When x-axis limits are overridden via pyplot.xlim, the default y-axis limits may no longer be sensible. If limits are overridden for one axis, new limits should be calculated for the remaining axes. The image at the following URL demonstrates the problem:

http://phillipmfeldman.org/Python/axis_scaling_bug.png

Phillip
Issue 1:
by xuxinhua1984:

When I read pkg, I want to know the method exists since which golang version?

Like Java: Since: 1.2 Or PHP (PHP 5 >= 5.3.3)

Issue 2:
by mimenarrator:

The Go sort library implements quicksort, which has a worst-case runtime of
O(n^2), and not introsort, with a worst case runtime of O(n*log(n)), as,
for example, GNU's libstdc++ does. Introsort almost always uses the same
algorithm as quicksort, but when pathological cases are detected that lead
to O(n^2) runtime of quicksort (by keeping track of the recursion depth),
heapsort is used instead, since it is guaranteed O(n*log(n)), though on
average slower than quicksort. This is obviously not of the highest
priority, especially given the rarity of pathological cases for the
quicksort implementation used in Go, but they do exist, and can, for
example, but exploited in denial of service attacks.
Issue 1:
Defining flask.test_client() instances using with clause causes them to share context/content of flask.g variable.

This wasn't the case in previous versions of flask.

How to replicate the bug

import flask

app = flask.Flask("app")

@app.route("/index")
def index():

if "my_special_data" in flask.g:
print("special data found")
else:
print("no special data")

flask.g.my_special_data = True

return "OK", 200

with app.test_client() as first_client, app.test_client() as second_client:

first_client.get("/index")
second_client.get("/index")

In flask==2.2.x running this script prints

no special data
special data found

showing that second_client shares flask.g with first client.

Expected behaviour

In flask==2.1.3 this code prints

no special data
no special data

Additionally in both previous and current (2.2.x) versions of flask, running test clients defined outside of with clause, that is writing

first_client = app.test_client()
second_client = app.test_client()

first_client.get("/index")
second_client.get("/index")

produces

no special data
no special data

Environment:

Python version: 3.8.13

Flask version: 2.2.2

I believe this behavior should be considered a bug, and I noticed this behavior breaking some libraries based on flask.

Issue 2:
When loading my flask module python -m project.modules.flaskhandler.py everything works nicely. Unfortunately, if I enable debug mode and use_reloader, the module is loaded, but when reloader restarts the application, it changes my sys.path.

sys.path's first value changes from '' to 'project/modules/' which prevents absolute imports from other modules in my project.

I was able to work around this problem with the following code at the top of my flaskhandler.py file:

import sys
import os

# Flask reloader hack
sys.path.append(os.getcwd())
Issue 1:
The link from this page:

https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.histogram.html

"Source code" leads to this page:

https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy-histogram-1.py

that is 404

Issue 2:
The (Source code, png, pdf) links on the bottom of https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.normal.html are pointing to missing files.

I hope this is the right place to report this, if not, sorry but I looked around. :)
Issue 1:
This prevents direct user of the generated script to re-create the graph as the newlines are incorrectly interpreted during import.

Issue 2:
This issue ties together all bugs related to the shell's dump command.

Schema support

Constraints using indexes during import: there needs a way to wait for indexes to become available after creating them, otherwise the import takes forever.

The shell could be extended with a command to achieve the above, but this functionality might be better introduced in Cypher, some discussion occurred here: #2491 (comment). Edit: there actually already is the schema await command which can be used for that purpose.

Currently indexes and schema creation statements aren't properly generated, they need to be separate statements. Issue: #2491

@nawroth raised the question whether this change will break the integrated live console in the manual here: #2576 (comment) So this needs to be tested.

Robustness

Newline characters need to be properly escaped (also: tab, ...). Issue: #2577

Strings containing && confuse the shell. There might be more problems if the shell attempts to parse something inside a string. Issue: #2579

Byte arrays are exported as int arrays. Does Cypher support byte arrays? Should it? Issue: #2491

Maybe (no personal experience with large data sets): scaling to allow inserting more data than fitting a single transaction. This depends on what the goal of the dump command is, whether it shall be usable the same way SQL people dump DBs to SQL scripts to load them into another DB or whether dump is designed for smaller data sets (this should also be documented, so people will know what to expect from the command).

Cosmetics: there shouldn't be a BEGIN/COMMIT pair for schema creation if no schema is created

Order of dumped statements (esp. index/constrains), discussion: #4437
Issue 1:
Updating to 2.7 breaks a few of my forms that use choice_list with an ObjectChoiceList:

'choice_list' => new ObjectChoiceList($choices, 'label', array(), null, 'value'),

results in:

LogicException in Form.php line 374:
The form's view data is expected to be an instance of class Acme\Model\Choice, but is a(n) string. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms a(n) string to an instance of Acme\Model\Choice.

I understand that choice_list is deprecated, so I've tried using:

'choices' => $choices,
'choices_as_values' => true,

as well as using a DefaultChoiceListFactory as described in https://github.com/symfony/symfony/blob/2.7/UPGRADE-2.7.md, but I'm not really getting anywhere.

Is there documentation anywhere for how to use objects as choices in 2.7?

Issue 2:
Imagine this form:

public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('transportType', 'entity',
array(
'class' => 'MyBundle:TransportType',
'property' => 'language.name',
'expanded' => true,
'query_builder' => function (EntityRepository $er) {
return $er->createQueryBuilder('e')
->join('e.language', 'l')
->orderBy('l.name', 'DESC');
},
)
);
}

public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'BLA\MyBundle\Form\Model\Shipping',
));
}

After upgrading to Symfony 2.7, the form throws the following exception:

An exception has been thrown during the rendering of a template ("The form's view data is expected to be of type scalar, array or an instance of \ArrayAccess, but is an instance of class Proxies\__CG__\BLA\MyBundle\Entity\TransportType. You can avoid this error by setting the "data_class" option to "Proxies\__CG__\BLA\MyBundle\Entity\TransportType" or by adding a view transformer that transforms an instance of class Proxies\__CG__\BLA\MyBundle\Entity\TransportType to scalar, array or an instance of \ArrayAccess.") in MyBundle:Shipping:form.html.twig at line 8.

Setting the data_class seems to work but I wonder why this has not been documented in the upgrade file?
Issue 1:
Rogério Meneguelli Gatto opened SPR-2903 and commented

The standard distribution (spring-framework-2.0.1.zip) does not include API javadocs. There are no downloads in the documentation page either.

Affects: 2.0.1

Issue Links:

#8590 Spring ZIP file should include Javadoc for Spring ("is duplicated by")

Issue 2:
Dane King opened SPR-5957 and commented

When doing a redirect anything that is not org.springframework.beans.BeanUtils.isSimpleValueType silently gets left off of the redirect query string. We were using UUIDs in the query string and they left off. We had to extend queryProperties, but there was alot of logic that we needed to duplicate. There are a couple of options that I feel would be better, throwing a parameter not supported exception or a provide a better extension point, maybe making isTypeHandled protected.

Affects: 2.5.5

Issue Links:

#11462 Provide precise control over the attributes used in a redirect scenario
Issue 1:
Summary of the new feature/enhancement

It would be useful to have a shortcut that would cycle all applications that are currently in Fanzy Zones. That is,

the application that was in zone 1 would move to zone 2

2 -> 3

3 -> 4

4 -> 1

(This example applies to a 4-zone configuration)

The workflow I'm imagining is, if you are multitasking with >3 applications, you could cycle which one of them appears in a larger, "priority" zone, while the rest are delegated to smaller, "standby" zones.

Issue 2:
Summary of the new feature/enhancement

When the user presses a HotKey, FZ should shift Windows one place left or right.

In a Scenario like "Priority Grid". User can cycle and bring into the center focus one of the 3 Windows. Of course, an alternative is to Use Win+Arrow, but that leaves a spot open.

Please note, I'm requesting that the Window shift from their original grid positions, not merely shifting the focus (#358 #175 )

That said, I have not thought about how to deal with overlapping windows.
Issue 1:
There's a playground snippet showing the issue here: http://is.gd/tYeNHE

Here's the gist:

use std::collections;
static VERSION: &'static str = "rustc 0.13.0-dev (77cd5cc54 2014-12-07 19:02:18 +0000)";
fn main() {
let r = {
// this works fine
let d = collections::HashMap::new();
d.insert("foo", "bar");

// this doesn't
type Header = collections::HashMap<String, Vec<String>>;
let x = Header::new();
};
println!("{}", r)
}

Issue 2:
Compile this:

pub mod foo {
pub mod bar {
pub mod baz {
struct Qux;

impl Qux {
pub fn new() {}
}
}
}
}

fn main() {
type Ham = foo::bar::baz::Qux;
let Foo = foo::bar::baz::Qux::new(); // works fine
let Bar = Ham::new(); // oops!
}

$ rustc ty.rs
!!! (resolving module in lexical scope) module wasn't actually a module!
ty.rs:16:14: 16:22 error: unresolved name
ty.rs:16 let Bar = Ham::new();
^~~~~~~~
ty.rs:16:14: 16:22 error: use of undeclared module `Ham`
ty.rs:16 let Bar = Ham::new();
^~~~~~~~
!!! (resolving module in lexical scope) module wasn't actually a module!
ty.rs:16:14: 16:22 error: unresolved name `Ham::new`.
ty.rs:16 let Bar = Ham::new();
^~~~~~~~
error: aborting due to 3 previous errors
task 'rustc' failed at 'explicit failure', /root/catacombs/scrap/rust/src/libsyntax/diagnostic.rs:102
task '<main>' failed at 'explicit failure', /root/catacombs/scrap/rust/src/librustc/lib.rs:392

I can't imagine that this is intentional, as it greatly limits the utility of type aliases.
Issue 1:
Hi all,

I added six -to seven carousel slides on my page, and from back-end I am setting some div (item) style to display none. This code will only hiding the div contain but actual div is not removed from the slide show . (so if i set style="display:none" in slide show it is showing empty slide.

Regards,

Issue 2:
Hi All,

I want to add dynamic user control in ASP.net in carousel control . How I could approach this problem.

Regards,

Vishal Bedre
Issue 1:
Hello, the video_player does not show the texture, just the sound on the IOS devices, the android works correctly.

video_player: 0.6.5

Issue 2:
Steps to Reproduce

I'm trying to use flutter with a FlutterTexture in the iOS emulator and I'm repeatedly hitting:

[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661

I downloaded this sample:

https://github.com/flutter/plugins/tree/master/packages/video_player

and hit the play button. This also repeatedly shows this error and doesn't render video.

Logs

Launching lib/main.dart on iPhone X in debug mode...
Running Xcode build...
Syncing files to device iPhone X...
[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661
[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661
[VERBOSE-1:ios_external_texture_gl.mm(37)] Failed to create GLES texture cache: -6661
...

Flutter Doctor

[✓] Flutter (on Mac OS X 10.13.2 17C205, locale en-US, channel dev)
• Flutter version 0.0.25-pre.5 at [redacted]
• Framework revision 4ae1b5f415 (5 days ago), 2018-02-07 15:18:04 -0800
• Engine revision 9bc2efdf47
• Tools Dart version 2.0.0-dev.19.0
• Engine Dart version 2.0.0-edge.ea91bc9888184d5a2fc309c36656fdd325ef503c

[✓] Android toolchain - develop for Android devices (Android SDK 26.0.2)
• Android SDK at [redacted]
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-26, build-tools 26.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.2, Build version 9C40b
• ios-deploy 1.9.2
• CocoaPods version 1.4.0

[✓] Android Studio (version 3.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] IntelliJ IDEA Community Edition (version 2017.3.4)
• Flutter plugin version 21.2.3
• Dart plugin version 173.4548.30

[✓] Connected devices
• iPhone X • 0094171F-87B1-4C62-8DC5-8AE28FC5800A • ios • iOS 11.2 (simulator)

• No issues found!
Issue 1:
In scipy/integrate/quadpack.h, function init_c_multivariate stores a pointer to n_args_ref in the global variable global_n_args. Unfortunately n_args_ref is a local variable which very soon goes out of scope, so later dereferencing global_n_args produces a nonsensical value.

Issue 2:
This code looks wrong: https://github.com/scipy/scipy/blob/master/scipy/integrate/__quadpack.h#L128

check = PyObject_GetAttrString(func, "argtypes");
if (!PyTuple_Check(check) || (PyTuple_GET_SIZE(check) != 1) ||
(PyTuple_GET_ITEM(check, 0) != c_double)) {
if ((PyTuple_GET_ITEM(check, 0) == c_int) && (PyTuple_GET_ITEM(check, 1) == c_double)){
/*If first param is int and second is of double type, we have valid_multivariate */
...
return Valid_Multivariate_Ctype;
}
else
goto fail;
}

The argument checks are done wrong (PyTuple_GET_ITEM called even if PyTuple_Check fails, etc).

Moreover, the actual argument type used later on is a pointer to a double, not double. The check should check that.

The check at https://github.com/scipy/scipy/blob/master/scipy/integrate/__quadpack.h#L396 should check for equality, not inequality.

This code stores a pointer to a local variable, which is invalid: https://github.com/scipy/scipy/blob/master/scipy/integrate/quadpack.h#L176

The code stores pointers of different types in global_args and storage->args, e.g. https://github.com/scipy/scipy/blob/master/scipy/integrate/quadpack.h#L170. These variables should be void*, not PyObject*.

I didn't have time to look at the PR that added these at the time...
Issue 1:
A briefer way than, say, df.xs(df.index[247]) though this isn't really all that bad

Issue 2:
_libs/window both includes "skiplist.pyx" and cimports from skiplist. I don't know if it is necessary, but it is definitely confusing. (closed by #18420)

_libs/reshape.pyx is an 18 line stub that just includes reshape_helper.pxi. Could we just change reshape_helper.pxi.in to reshape.pyx.in? updateIt is correct as is.

src/reduce.pyx and src/inference.pyx are a minor PITA, should be merged directly into lib or made into their own modules.

src/numpy.pxd should be dropped, just defer to np.get_include() (closed by #19418)

Only a small fraction of src/datetime/ is used outside of src/, a lot of it is only used by src/ujson/python/objToJSON.c. On the one hand it would be nice to separate out the pieces that are only needed by objToJSON. On the other hand, most of src/datetime is copy/pasted from numpy, and diverging from the original is liable to cause headaches.

src/helper.h defines PANDAS_INLINE. Cython has a CYTHON_INLINE that AFAICT would be a drop-in replacement. I have no idea how one would do that.

src/skiplist.h has a duplicate definition of PANDAS_INLINE

pandas_datetimestruct should either be aliased to or replaced by npy_datetimestruct (closed by #21886)

from libc.math cimport sqrt is not nogil, whereas cdef extern from src/headers/math.h... is. That appears to have a nontrivial perf impact. See #18420. Go through and make sure we're using the performant implementation.

Benchmarks (technically belongs elsewhere, but not worth opening a new issue)

asv is particularly volatile on my machine, so this may be just me. But I'm consistently seeing these as outliers: timeseries.AsOfDataFrame.time_asof, timeseries.AsOfDataFrame.time_asof_nan, timeseries.DatetimeIndex.time_dti_tz_factorize, timeseries.DatetimeIndex.time_dti_factorize
Issue 1:
What problem does this feature solve?

能否让$emit方法返回一个Promise对象？这可以知道分发的事件在什么时候完成，方便在对这个事件进行监听的所有方法完成后进行一些额外的操作。

比如说，一个按钮组件，在点击之后变成加载中状态，在点击操作（这个操作可能是向服务器请求数据，也有可能仅仅只是个同步操作）完成之后，还原成之前的状态。这样的话，可以让按钮的状态变化与事件逻辑分离开。

What does the proposed API look like?

可以像下面一样的使用

{
async onClick () {
this.loading = true
await this.$emit('click')
this.loading = false
}
}

Issue 2:
Version

2.2.6

Reproduction link

https://jsfiddle.net/50wL7mdz/27555/

Steps to reproduce

<component @click="callback">
</component>

function callbcak() {
return new Promise(function(resolve, reject) {
setTimeout(() => {
resolve('resolved')
}, 2000)
})
}

// in component
<script>
...
methods: {
handleClick(evt) {
var promise = this.$emit('click', evt)
console.log(promise) // promise is component self, not the return promise
}
}
...
</script>

What is expected?

expect $emit get the return value of event's callback

What is actually happening?

get component self
Issue 1:
Open markdown file in preview mode while sidebar is closed.

Open Explorer View sidebar

Expected: markdown file stays in preview mode

Actual: file switches to source mode

Version 0.10.8
Commit db71ac615ddf9f33b133ff2536f5d33a77d4774e
Date 2016-02-05T10:10:11.194Z
Shell 0.35.6
Renderer 45.0.2454.85
Node 4.1.1

Issue 2:
VSCode very quickly got to nearly being my default editor. One thing I'm missing is something like https://atom.io/packages/symbols-tree-view where I can view the structure of a file whilst editing. I've used this view across many editors for years.
Issue 1:
Oliver Drotbohm opened SPR-5763 and commented

AnnotationMethodHandlerAdapter contains a private class ServletHandlerMethodResolver that could be used to tweak URL mappings for custom requirements if one was able to subclass it. Furthermore it would be very cool to use in test cases as you could easily test if you mappings work for certain requests. Currently you have to use AnnotationMethodHandlerAdapter directly and thus execute the method entirely.

Affects: 3.0 M3

Issue Links:

#12109 Make ServletHandlerMethodResolver protected (instead of private) to allow subclassing

7 votes, 6 watchers

Issue 2:
Bruno Navert opened SPR-5087 and commented

It would be useful to expose ServletHandlerMethodInvoker and ServletHandlerMethodResolver as public classes, rather than private inner classes. This would allow application code to call this directly to mimick the behaviour of Spring when calling handler methods.

I have one such use case in my application, and ended up copy/pasting the invoker class, which is far from ideal.

Affects: 2.5.4

Sub-tasks:

#14048 expose ServletHandlerMethodResolver AnnotationMethodHandlerAdapter.getMethodResolver(Object handler) to application code

7 votes, 11 watchers
Issue 1:
Challenge Escape Sequences in Strings has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; AskTbORJ/5.15.9.29495; BRI/2; GWX:QUALIFIED; rv:11.0) like Gecko.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

var myStr = "FirstLine\n\Secondline\\rThirdLine"; // Change this line

var myStr = "FirstLine\n\\Secondline\\\rThirdLine"; // Change this line

Issue 2:
This issue references #541.
Issue 1:
FreeCodeCamp streaks not updating unless it is after around 6 PST

Hello Everyone. In FCC for some reason, if I do not get any brownie points after around 6 PST it does not update for that day. Even if it is after 6 and I already got 7 brownie points, for some reason it doesn't update unless I get another.

Here is what I mean:

As you may be able to see I got 9 brownies today and did something for 29 days but it doesn't update and only shows 28 days and if I don't do something after 6ish I loose the streak.

My browser info:

Chrome Version 55.0.2883.87 m (64-bit)

Windows 10

Thank you in advance!

Cheers,

Ryan

Issue 2:
One of the most common complaints I get (as person in charge of support emails) is that the streak isn't accurate. This may be due to timezones.

We probably need to go ahead and write some test cases and really tighten up this code. Any volunteers?
Issue 1:
On QWERTZ keyboards and their derivates, which are used in Germany, Switzerland, Austria and most of Central Europe, the key combination for the @ symbol is alt-g q.

When pressing alt-g q in Atom Editor, all lines are reformatted so that they break at the preferred line length, instead of entering an @ symbol.

I've gone through all keybindings, but I could not find any for alt-g q.

Issue 2:
Atom doesn't handle keyboards with Right Alt (i.e. AltGr). This is a very basic mistake. I have a Hungarian keyboard layout, I can only write specific keys like "|" (pipe) by pressing Right Alt (AltGr) and then W, which Atom doesn't recognize and treat like Alt-W or something?

The point is there are some layouts like greek, hungarian, czech with special keys, which an EDITOR should handle the right way!!

E.g. I can't write CTRL-", because it writes the number "2" instead. I think this key might be interpreted like CTRL-ALT sequence, but not sure either.

Anyway, without it, it's just not an editor.

Like Windows Media player; you can't pause a movie with it hitting space bar...

From: support/9f98abca9f4a11e3955c6445541b1a76