WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
System information (version)

OpenCV => 4.1

Operating System / Platform => MacOS

Compiler => emsdk

Detailed description

I'm trying to use a freshly build opencv.js build with increased memory as I need a bit more as the default provides me. This leads me to having even less memory available on the go when compiled a build having a flag of '-s TOTAL_MEMORY=1342177280 '.

I'm using the latest emsdk and latest opencv version.

Steps to reproduce

Issue 2:
System information (version)

OpenCV => 3.3.1

Operating System / Platform => Windows 64 Bit

Compiler => Visual Studio 2017

Detailed description

Running multiple template matching operations in parallel on separate threads results in the following error from within the pMatcher->match() function:

`OpenCV Error: Assertion failed (allocSize == allocations.back()) in`anonymous-namespace'
::MemoryStack::returnMemory, file C:\Users\derrickb\Documents\opencv\modules\core\src\cuda_stream.cpp, line 99

The error is not entirely repeatable. It may happen with 4 threads and not with 16 threads, and is probably dependent on the performance of the test system. But on my system the error is fairly easy to trigger. Setting N_THREADS = 1 never reproduces the problem.

Steps to reproduce

void threadCallback(GpuMat &imS, GpuMat &imT, int count)
{
std::vector<GpuMat> imR;
Ptr<TemplateMatching> pMatcher = cuda::createTemplateMatching(CV_8U, TM_CCOEFF_NORMED);

// Use a separate results array for each match
for (int j = 0; j < count; j++) {
imR.push_back(GpuMat(imS.size().height - imT.size().height + 1,
imS.size().width - imT.size().width + 1, CV_8UC1));
}

cuda::Stream stream;
for (int j = 0; j < count; j++) {
pMatcher->match(imS, imT, imR[j], stream); // ABORT HAPPENS ON THIS LINE
}
stream.waitForCompletion();
}

void TestTemplateMatchThreads()
{
// Does threading improve performance for many matches?
int IMG_SIZE = 300;
int TEM_SIZE = 100;
GpuMat imT = GpuMat(TEM_SIZE, TEM_SIZE, CV_8UC1);
GpuMat imS = GpuMat(IMG_SIZE, IMG_SIZE, CV_8UC1);

std::vector< std::thread> threads;

int N_THREADS = 4;
int count = 10;

for (int j = 0; j < N_THREADS; j++) {
std::thread threadObj(threadCallback, imS, imT, count);
threads.push_back(std::move(threadObj));
}
for (int j = 0; j < N_THREADS; j++) {
threads[j].join();
}
}

One theory of why the match() function is not threadsafe is that it uses calls to non-stream based versions of:

Scalar templ_sum = cuda::sum(templ);
Scalar templ_sqsum = cuda::sqrSum(templ);

from: https://github.com/opencv/opencv_contrib/blob/master/modules/cudaimgproc/src/match_template.cpp, line 549.

Other similar bugs seem to have been resolved by using the corresponding stream based equivalent functions:

Scalar templ_sum = cuda::calcSum(templ, stream);
Scalar templ_sqsum = cuda::calcSqrSum(templ, stream);

Such as #6788 (comment)

So this "fix" is purely speculative. If it is indeed the problem, it exists in a similar form in ~10 places in the same file (https://github.com/opencv/opencv_contrib/blob/master/modules/cudaimgproc/src/match_template.cpp) .

The problem has been reproduced using: TM_CCOEFF_NORMED, TM_CCORR, TM_CCORR_NORMED, and TM_CCOEFF.
Issue 1:
I'm seeing exactly the same problem as described in issue #2100, which has now been closed without any comment.

On sending a second GET to an endoint that has previously received a POST on the same endpoint, Flask prepends the previous POST data to the method of the GET resulting in a Method Not Allowed for that request:

The GET page contains a very simple form, with a submit button named action set to value login.

127.0.0.1 - - [07/Apr/2022 16:43:00] "GET /login/UOFVq8Wu HTTP/1.1" 200 -
127.0.0.1 - - [07/Apr/2022 16:43:03] "POST /login/UOFVq8Wu HTTP/1.1" 200 -
127.0.0.1 - - [07/Apr/2022 16:43:14] "action=loginGET /login/u4onflQV HTTP/1.1" 405 -

Environment:

Python version: 3.10.4

Flask version: 2.1.1

Issue 2:
With the following example:

from flask import Flask

app = Flask(__name__)

@app.route('/', methods=['POST'])
def hello_world():
return 'Hello World!'

if __name__ == '__main__':
app.run()

When you set the request body to {} with Postman or any HTTP clients, the first request will return 200, while the second request will return a 405 error response. The log shows the request method is {}POST:

"{}POST / HTTP/1.1" 405

Notice the request body became the part of the request method.
Issue 1:
objdump cannot disassemble powerpc. In src/cmd/internal/objfile, the disasms map lists only 386, amd64, and arm.

Issue 2:
The attached program generates garbage.

It does not generate garbage if I compile with -l:

Compare:

$ go run -gcflags -l leak.go
vs.
$ go run leak.go

Attachments:

leak.go (998 bytes)
Issue 1:
It will be nice to see http://www.google.com/design/spec/components/lists.html#lists-content with avatar addon.

Issue 2:
After I updated the material-UI the transitions.create function is generating invalid css like:

transition: margin 225ms cubic-bezier(0.0, false, false.2, false) 0ms,width 225ms cubic-bezier(0.0, false, false.2, false) 0ms;

Tech
Version

Material-UI
1.0.0-beta.28

React
16.2.0

browser
Chrome
Issue 1:
James Shaw opened SPR-8229 and commented

When an ApplicationContext is closed, any @Configuration class that was registered in that context does not get garbage collected. If I understand the way class loading works, this is because the ClassLoader still holds a reference to the enhanced Configuration class.

This is a problem for me because I want to create ApplicationContexts at runtime.

Issue Links:

#12556 ConfigurationClassEnhancer prevents BeanFactory from being GCd ("duplicates")

#12556 ConfigurationClassEnhancer prevents BeanFactory from being GCd

Issue 2:
Tommy Becker opened SPR-7901 and commented

We're experiencing OOM errors during unit test runs. We make fairly heavy use of Java based context configuration in our application as well as the tests. Upon investigation, I see that there are a number of ApplicationContext instances still referenced on the heap that should be collectable. It appears that the way the ConfigurationClassEnhancer is registering its BeanMethodInterceptor with the CGLIB generated subclass is the problem. In #10601, this was changed from Enhancer.registerCallbacks() to Enhancer.registerStaticCallbacks() to work around the fact that the former only applies the advice when method calls originate from the same thread that registered the callback. However using the static callback mechanism results in a static reference from the generated subclass to the interceptor, which in turn keeps a reference to the BeanFactory. So the BeanFactory is never eligible for GC, even after its been closed. Although problems running unit tests reveled the problem, we're most likely experiencing it at runtime as well since our application does close contexts and start new ones dynamically in response to some events.

As a potential fix, it would be nice if the BeanMethodInterceptor could receive a callback itself when the BeanFactory it references is closed, so it can then unregister itself from the CGLIB proxy. Alternatively, perhaps a WeakReference to the BeanFactory could be used from the interceptor.

Affects: 3.0.3

Attachments:

mylyn-context.zip (105.42 kB)

Issue Links:

#12878 CGLIB enhanced @Configuration classes cannot be garbage collected ("is duplicated by")

#12663 MemoryLeak in Cglib2AopProxy.ProxyCallbackFilter

#12878 CGLIB enhanced @Configuration classes cannot be garbage collected

Referenced from: commits d2faef4, 43676bd

5 votes, 3 watchers
Issue 1:
Bug summary

The autoscale limits do not work when using mpl.collections.PathCollection

Code for reproduction

import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np

fig, axs = plt.subplots(1, 3, figsize=(6, 2))

# One red triangle as a simple path
# In my use case these are parsed from vector graphics
my_path = mpl.path.Path(np.array([[7, 7], [7, 15], [15, 15], [7, 7]]))

# Add same path to all axes
for ax in axs:
collection = mpl.collections.PathCollection([my_path],
edgecolors='k',
facecolors='r')
ax.add_artist(collection)

# Use autoscale in first axes
ax = axs[0]
ax.autoscale()
ax.set_title('ax.autoscale()')

# Use margin in second axes
ax = axs[1]
ax.margins(0.1)
ax.set_title('ax.margins(0.1)')

# Manually set limits in third axes
ax = axs[2]
ax.set_xlim(0, 20)
ax.set_ylim(0, 20)
ax.set_title('ax.set_xlim(0, 20)\nax.set_ylim(0, 20)')

plt.savefig('PathCollection_autoscale_bug.png', facecolor='w', bbox_inches='tight')

Actual outcome

Expected outcome

The outcome of autoscaling should show the path(s) and automatically update the x and y limits so that the paths are not out of view.

Additional information

No response

Operating system

Ubuntu

Matplotlib Version

3.7.1.

Matplotlib Backend

module://matplotlib_inline.backend_inline

Python version

3.11.0

Jupyter version

No response

Installation

None

Issue 2:
Bug report

Bug summary

When using axes.annotate to generate an arrow, sometimes, regardless of zorder, the arrow is drawn below the grid. It's expected that with zorder >2.5 it should draw above the grid.

This does not happen for all arrows. For the arrows that do have this behavior it is consistent. So for example, on the default settings an arrow from (0.2, 0.2) to (0.8, 0.2) has the expected behavior, but in the reproduction example it does not.

This is particularly obvious when the grid is dashed.

Possibly related issues

#5045

Code for reproduction

import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.set_xlim(-1, 7)
ax.set_ylim(-1, 6)
ax.grid(True, linestyle='dashed')
an = ax.annotate("", xy=(2, 1), xytext=(6, 1), arrowprops=dict(arrowstyle="-", shrinkA=0, shrinkB=0, color='g', zorder=4))
plt.show()

Actual outcome

Expected outcome

The line should cover the grid

Working example

import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.grid(True, linestyle='dashed')
an = ax.annotate("", xy=(0.2, 0.2), xytext=(0.8, 0.2), arrowprops=dict(arrowstyle="-", shrinkA=0, shrinkB=0, color='g', zorder=4))
plt.show()

Matplotlib version

Operating System: Windows 10

Matplotlib Version: 2.0.2

Python Version: 3.6.2

Installed using pip install
Issue 1:
<select class="form-control">
<option value="standard">Standard: 7 day</option>
<option value="rush">Rush: 3 days</option>
<option value="express">Express: next day</option>
<option value="overnight">Overnight</option>
</select>

I'm using above code for HTML select. Arrow icon is not displayed. it is displayed as a text box. But list items can be selected. This issue is happening on a android webview.

Issue 2:
Bootstrap version 2.3.1

Samsung S3 default android browser

android 4.1.1

the <select> looks identical to an <input> -- there's no dropdown "icon" on the right side.. for multiple <select multiple="multiple"> there's no "scrollbar" or content

to duplicate, use default browser, surf to:

http://twitter.github.io/bootstrap/base-css.html#forms

scroll down to the select area..
Issue 1:
Version

2.5.2

Reproduction link

https://jsfiddle.net/Twinpix/sfjhLcxw/

Steps to reproduce

Click on showA or showB button to see which transition hooks is fired

What is expected?

When clicking on showA or showB button, appear hooks should be fired first on the first time the component is loaded

What is actually happening?

On transition, enter hooks are the only ones fired

I need this feature because for my projects I need a different animation/transition when a component is first loaded. I'm using vue-router to load component so I put the issue for vue-router, but now I realized it-s more a vue issue. thanks for help.

Issue 2:
Version

3.0.1

Reproduction link

https://jsfiddle.net/Twinpix/hgs7w26f/2/

Steps to reproduce

When changing to route A or Route B, Router should fire appear hook of Component on the first time and but enter hook is fired instead.

What is expected?

I want to get a different transition/animation on the first load of components by vue-router, so I want to use appear hooks for this purpose.

What is actually happening?

But it seems that appear hook can only fired on the first component that is loaded in , even if appear hooks are defined at component level and not around .
Issue 1:
Challenge http://www.freecodecamp.com/challenges/waypoint-target-the-parent-of-an-element-using-jquery has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

First checklist item on this page just says "missing ) after argument list" no matter what's in the code window.

Issue 2:
I noticed that when I hit the "Run Test" button after completing the challenge, two "#target5" buttons appear on the "left-well". Not sure if that's intentional or a bug. Thanks.
Issue 1:
Martin Dames opened SPR-4454 and commented

Hey,

I used the normal JdbcDaoSupport class for my DAO's, and I mocked the JdbcTemplate within my test classes by using the .setJdbcTemplate() method. So, now I want to use the SimpleJdbcTemplate in my DAO and I inherited my DAO from the org.springframework.jdbc.core.simple.SimpleJdbcDaoSupport.

I wanted to mock the SimpleJdbcTemplate as well but I couldn't find any obvious Spring way to use a Mock in this situation.

I don't know if this isn't wanted by you guys, but I tried a patch and the tests are running fine:

I wrote my own SimpleJdbcDaoSupport class, which is the same as the normal one, but offers a Setter method for the SimpleJdbcTemplate.

If this sounds quite reasonable for you, just commit the patch to your next Spring version as you like.

/**

*

@author Martin Dames

*/

public class MyOwnSimpleJdbcDaoSupport extends JdbcDaoSupport {

private SimpleJdbcTemplate simpleJdbcTemplate;

/**

Create a SimpleJdbcTemplate based on the configured JdbcTemplate.

*/

@Override

protected void initTemplateConfig() {

this.simpleJdbcTemplate = new SimpleJdbcTemplate(getJdbcTemplate());

}

/**

Return a SimpleJdbcTemplate wrapping the configured JdbcTemplate.

*/

public SimpleJdbcTemplate getSimpleJdbcTemplate() {

return this.simpleJdbcTemplate;

}

/**

Sets an other SimpleJdbcTemplate, can be used for mocking the template.

*/

public void setSimpleJdbcTemplate(SimpleJdbcTemplate simpleJdbcTemplate) {

this.simpleJdbcTemplate = simpleJdbcTemplate;

}

}

Affects: 2.5.1

Issue Links:

#9133 Ability to change the SimpleJdbcTemplate in DAO's ("is duplicated by")

Issue 2:
Andrei Badea opened SPR-7824 and commented

Have the following test classes:

@ContextConfiguration(...)
public class MyTestBase extends AbstractTestNGSpringContextTests {

protected boolean beforeTransaction;

@Test
public void test() {
Assert.assertTrue(beforeTransaction);
}
}

@TestExecutionListeners({ TransactionalTestExecutionListener.class })
@Transactional
public class MyTest extends MyTestBase {

@BeforeTransaction
public void before() {
beforeTransaction = true;
}
}

Run MyTest.java. The expectation is that the @Transactional annotation is handled and the test() method runs in a transaction. This does not happen. AbstractFallbackTransactionAttributeSource seems to have been written with interfaces in mind, where the "most specific method" is in the implementation class. So for the case above, one would expect the most specific method to be MyTest.test(), but it actually is MyTestBase.test(). I did not find a way to get a java.lang.reflect.Method handle for MyTest.test().

Affects: 3.0.4

Issue Links:

#15877 @Transactional annotation does not apply to inherited methods from abstract class during tests ("is duplicated by")
Issue 1:
Referenced briefly in the OP at #3275

In [11]: idx = pd.MultiIndex.from_tuples([('a', 1), ('a', 2), ('a', 3), ('b', 1), ('b', 2), ('b', 3)])

In [12]: idx.names = ['outer', 'inner']

In [13]: df = pd.DataFrame({"A": np.arange(6), 'B': ['one', 'one', 'two', 'two', 'one', 'one']}, index=idx)

So the idea is to be able to call

df.groupby('B', level='inner')

instead of

In [15]: df.reset_index().groupby(['B', 'inner']).mean()
Out[15]:
A
B inner
one 1 0.0
2 2.5
3 5.0
two 1 3.0
3 2.0

[5 rows x 1 columns]

Currently this raises TypeError: 'numpy.ndarray' object is not callable. Mostly just syntactic sugar, but I've been having to do a lot of this lately and all the reset_indexes are getting annoying. Thoughts?

Issue 2:
I have created a branch adding a to_latex method to Styler.

It is nowhere near readiness, and in particular:

supports only cell background color as of now - adding some attributes should be trivial, adding others might be less so

most importantly, it works on a copy of the dataframe casted .astype(str), which is plain wrong because it discards features such as float formatting. For a good result, a better integration is needed with the code that currently does cell formatting in DataFrame.to_latex.

This said, if anyone feels like experimenting, it might be slightly better than starting from scratch.

One aspect which I think is useful, even aside from this branch, and might benefit some discussion, is the pair of methods _latex_preserve and _latex_restore, which basically replace LaTeX commands so that they are not disturbed by escaping, and then restores them. There might be better way to code this, but I really think this is something we need to implement, and to offer to users who happen to nest LaTeX code in their cells.
Issue 1:
Version

2.6.11

Reproduction link

https://codepen.io/Tsdy/pen/mdEaYzL

Steps to reproduce

src/shared/util.js

/**
* Check if value is primitive.
*/
function isPrimitive (value){
return (
typeof value === 'string' ||
typeof value === 'number' ||
// $flow-disable-line
typeof value === 'symbol' ||
typeof value === 'boolean'
)
}
console.log(isPrimitive(100n));
// false

What is expected?

Bigint should be included in the primitive type

What is actually happening?

console.log(isPrimitive(100n));

// false

Issue 2:
Version

2.6.11

Reproduction link

https://stackblitz.com/edit/js-bafxzt

Steps to reproduce

<a @click="点击">btn1

<a @click="点击($event)">btn2

<a @click="onClick">btn3

methods:{

点击:function(e){

},
onClick:function(e){

}

}

What is expected?

btn1 event not work

What is actually happening?

write $event in console
Issue 1:
After updating to 2.6.5 we got the error in our tests:

Acme/Bundle/TestBundle/Tests/Controller/Foo/BarControllerTest::testSomeAction
LogicException: Cannot set session ID after the session has started.

vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php:134
vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php:199
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/TestSessionListener.php:45
vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php:61
vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:164
vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:53
vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php:167
vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:112
vendor/jmikola/wildcard-event-dispatcher/src/Jmikola/WildcardEventDispatcher/WildcardEventDispatcher.php:36
vendor/event-band/symfony-adapter/src/EventBand/Adapter/Symfony/BandEventDispatcher.php:57
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:126
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:66
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php:64
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:186
vendor/acme/core-bundle/Acme/Bundle/CoreBundle/Component/Phpunit/WebTestCase.php:328
src/Acme/Bundle/TestBundle/Tests/Controller/Foo/BarControllerTest.php:170

On 2.6.4 everything is ok

Issue 2:
Hi there,

the exception is thrown by this line:

https://github.com/symfony/symfony/blob/2.5/src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php#L134

My setup works completely fine within a valid PHP environment (without TestSessionListener) - data getting stored in the session before the TestSessionListener::onKernelRequest has been executed (using MockFileSessionStorage).

What's the intention of this exception? I can't get my head around it. The TestSessionListener is explicitly doing this (setId) and if there is another object accessing the session before the TestSessionListener sets the id, an id is automatically generated. The listener is not correctly mimicking the session creation of PHP and this exception makes it (for some parts) unusable.

If there is no actual use on this exception, it may be removed, no?
Issue 1:
With the latest release of TypeScript, I think it's possible to remove all the duplicated overloading functions, I was planning to make a pull request to @types/ramda but got stuck: A rest element must be last in both tuple type and parameters. Anyone has any idea how to get around this?

Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @donus, @tycho01, @mdekrey, @mrdziuban, @sbking, @afharo, @teves-castro, @1M0reBug, @hojberg, @charlespwd, @samsonkeung, @angeloocana, @googol, @moshensky, @ethanresnick, @leighman, @CaptJakk, @deftomat, @deptno, @blimusiek, @biern, @rayhaneh.

Issue 2:
I have started working on TS 2 typings for A-Frame. I figured I should file a ticket to avoid any duplication of work and (potentially) help out anyone looking for A-Frame typings in the meantime. They're a WIP published here https://github.com/devpaul/aframe-typings.

I'm using a testing library ATM to ensure all of my assumptions are correct about A-Frame, especially in regards to optional types, but I'm not really sure how to boil that down to code that might exercise the API without rewriting things outside of the testing framework. Advice is welcome.