WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
nicolas de loof opened SPR-5149 and commented

When using Spring Assert class to check preconditions, the message is expected to be a String. If you want to pass contextual datas in the message, this requires some String concat even if condition is validated.

It would be nice to follow slf4j example and support a MessageFormat pattern. With help of varargs, we could write :

Assert.isTrue( text.length() <= maxSize, "Value '{0}' is too large ! max size is {1}", text, maxSize );

Affects: 2.5.5

Issue Links:

#11001 Assert should use MessageFormat to avoid building unecessary Strings as error message ("is duplicated by")

Issue 2:
Samuel Bernet opened SPR-9627 and commented

The bugfix #13814 "Scoped-proxy memory leak w/ @Resource injection" leads to bean instances being cached too eagerly in CommonAnnotationBeanPostProcessor. Besides the (desired) caching of AOP scoped-proxies to prevent the memory leak the current code also caches custom scoped bean instances that should not be cached. This happens for example if client code uses AutowireCapableBeanFactory#autowireBean(Object) to inject dependencies (annotation-based) into a manually created bean. In this case no AOP proxies are involved but the cached instances are still used. The underlying scope is never consulted and can thus never signalize that a new instance is to be created and injected because the context of the scope (e.g. request, session) is different from the first call which resulted in the cached instance.

I attached a Test-Case (JUnit 4 Test, requires JUnit and Spring to run). The test-case illustrates the breaking change:

Runs fine with Spring version 3.1.1 and older (tested with 3.0.5)

Fails with Spring version 3.1.2 and 3.2.M1

The defect was introduced in the bugfix for #13814 in version 3.2.M1 with commit f779c19

The defect was back-ported to version 3.1.2 with #14000

I understand this calling pattern is not very common but nevertheless the affected API is public and our framework relies on this to provide service beans to instances of "visual" classes (a visual models a single page in a web application). This basically renders custom scoped beans (also being used heavily) unusable for us in releases > 3.1.1, thus my classification as "major".

Best regards

Samuel Bernet

MSc ETH Software Engineering

samuel.bernet@raiffeisen.ch

Affects: 3.1.2, 3.2 M1

Attachments:

SPR-9176-TestCase.zip (3.29 kB)

Issue Links:

#14318 @Resource injection regression with scope prototype ("is duplicated by")

#13814 Scoped-proxy memory leak w/ @Resource injection

#14214 Injecting prototypes into tests using @Resource appears to be broken

#14000 Backport "Scoped-proxy memory leak w/ @Resource injection"

#14485 @Resource injection of singleton in prototype using AnnotationConfigApplicationContext is not thread-safe

Referenced from: commits 04af54a, 26ee0c4, 68c5f20, 1971870

1 votes, 5 watchers
Issue 1:
There is a bug (TypeScript 1.4.1) in js code generation when new line is missing after end comment.

To reproduce create new ts project add foo.ts:

/*
class Foo {
foo() {
}
} */

The generated js is:

/*
class Foo {
foo() {
}
/*
class Foo {
foo() {
}

//# sourceMappingURL=foo.js.map

If there is new line after */ it works ok.

Issue 2:
We have a large Typescript application, and sometimes we have code like

if (shouldFireNuclearMissiles)...

while we should have written

if (shouldFireNuclearMissiles())...

(pun intended).

So forgetting to evaluate a function results in a truthy value.

I forked the tsc compiler to add basic checks for this in the conditional operator, the if-then-else, while, do and for statements, and that was very easy. We found several bugs in our large code using this forked compiler.

Would such a stricter compiler option (maybe even emitting warnings) be a sound idea?

These automatic truthy and falsy conversions are very handy, but IMHO, for large projects, the comfort they bring does not outweigh the dangers.

Most likely this idea is too much non-Javascript-like, but we're coming from sharp & strongly-typed languages, so I must make this suggestion ;-)

Thanks,

Peter

PS: I first suggested this as a TSLINT rule , but from the friendly feedback I got, it seems this belongs in the compiler instead.
Issue 1:
Hi,

a really good way to improve test performance would be to add the flag/option to run async tests in parallel. Currently this is not possible but it would increase test speed of independent (well-written) tests A LOT.

I understand that this might break some existing tests so I would either go with the --unstable flag or add a new option like --parallel.

What do you think about this?

Issue 2:
Would be nice if tests could be run in parallel.

Of course, assuming you take care of any shared resources correctly.

I'm fine giving up "leaking async ops" checks, or maybe just have one at the end "One of your tests leaked async ops, run without --parallel to troubleshoot"...
Issue 1:
A small, complete example of the issue

"""Example of Pandas bug."""
from numpy.random import randn
from pandas import DataFrame, read_msgpack

POWER = 6
ROWS = 10 ** POWER
COLS = 280
SIZE = ROWS * COLS
# COL_NAMES = ['Columns']

print('rows: {:,}; cols: {}; data points: {:,}; float memory (bytes): {:,}; '
'float memory (GiB): {:.3}'.format(ROWS, COLS, SIZE, SIZE * 8,
float(SIZE * 8) / 1024 / 1024 / 1024))

DTF = DataFrame(randn(ROWS, COLS)) # , columns=COL_NAMES
print(DTF)
DTF.to_msgpack('foobar_{}.msg'.format(POWER))
print('Reading exercise')
DTF2 = read_msgpack('foobar_{}.msg'.format(POWER))
print(DTF2)

Current Output

rows: 1,000,000; cols: 280; data points: 280,000,000; float memory (bytes): 2,240,000,000; float memory (GiB): 2.09
0 1 2 3 4 5 6 \
0 -0.026045 1.102096 0.702563 -1.508039 0.308464 0.504351 2.887272

7 8 9 ... 270 271 272 273 \
0 -0.700034 -0.11521 -0.447198 ... -0.566173 0.16131 -0.581333 -0.362

274 275 276 277 278 279
0 -1.433336 0.60287 0.799355 0.628572 0.542312 -0.410359

[1 rows x 280 columns]
Reading exercise
Traceback (most recent call last):
File "../bug/pandas_bug6.py", line 20, in <module>
print(DTF2.head(1))
AttributeError: 'list' object has no attribute 'head'

Expected Output

rows: 1,000,000; cols: 280; data points: 280,000,000; float memory (bytes): 2,240,000,000; float memory (GiB): 2.09
0 1 2 3 4 5 6 \
0 -0.026045 1.102096 0.702563 -1.508039 0.308464 0.504351 2.887272

7 8 9 ... 270 271 272 273 \
0 -0.700034 -0.11521 -0.447198 ... -0.566173 0.16131 -0.581333 -0.362

274 275 276 277 278 279
0 -1.433336 0.60287 0.799355 0.628572 0.542312 -0.410359

[1 rows x 280 columns]
Reading exercise
0 1 2 3 4 5 6 \
0 -0.026045 1.102096 0.702563 -1.508039 0.308464 0.504351 2.887272

7 8 9 ... 270 271 272 273 \
0 -0.700034 -0.11521 -0.447198 ... -0.566173 0.16131 -0.581333 -0.362

274 275 276 277 278 279
0 -1.433336 0.60287 0.799355 0.628572 0.542312 -0.410359

[1 rows x 280 columns]

Output of pd.show_versions()

## INSTALLED VERSIONS

commit: None

python: 2.7.10.final.0

python-bits: 64

OS: Darwin

OS-release: 16.0.0

machine: x86_64

processor: i386

byteorder: little

LC_ALL: None

LANG: None

pandas: 0.18.1

nose: None

pip: 8.1.2

setuptools: 18.5

Cython: None

numpy: 1.8.0rc1

scipy: 0.13.0b1

statsmodels: None

xarray: None

IPython: None

sphinx: None

patsy: None

dateutil: 1.5

pytz: 2013.7

blosc: None

bottleneck: None

tables: None

numexpr: None

matplotlib: 1.3.1

openpyxl: None

xlrd: None

xlwt: None

xlsxwriter: None

lxml: None

bs4: None

html5lib: None

httplib2: None

apiclient: None

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: None

boto: None

pandas_datareader: None

None

Issue 2:
Hi guys,

I am happy to help you improve msgpack.

I tried to export my massive dataframe this morning using msgpack, and I got this error.

ValueError: EXT data is too large

What does that mean? Is there a size limit?
Issue 1:
-->

Environment

Windows build number: Windows 1903

Windows Terminal version (if applicable): 0.2.1715.0

Any other software?

Tried different version of PSh (5.x / 6.2.1 / 7.0.0), and CMD

Steps to reproduce

the sign | cannot by typed using a german keyboard in Windows 10.

Expected behavior

I expected this sign to work as it is one of the most important commands in PoSh

Actual behavior

the output is < instead of |

parent issues:

#521

related duplicate issues:

#1596,#940,#1027,#1010

Issue 2:
I don't know if this can be done already, but can we have an option to launch the terminal as an normal/elevated user from the context menu in explorer, similar to what you can already do with CMD/Powershell?
Issue 1:
Detailed description

Intel's Inference Engine supports asynchronous forward passes using multiple inference requests. Let users enable async. networks inference.

Initial proposal

Requires adding a new method Net::enableAsync(bool) to specify if we want to execute network asynchronously.

Net::setInput is used to set input data in the internal inputs queue and Net::forward to retrieve outputs in the same order.

Net::forward returns an empty Mat in case of output is not ready => User need to check that output is not empty.

Considered scenarios of Net in async mode:

Standard loop

net.enableAsync(1);

net.setInput(inp1);
out1 = net.forward();

net.setInput(inp2);
out = net.forward(); // out is output for inp1 if out1 is empty. Otherwise it's output for inp2
...

This way user should store inputs and pop them by ready outputs (i.e. render detections).

Prefetch

net.enableAsync(1);

net.setInput(inp1);
net.setInput(inp2);
...

out1 = net.forward();
out = net.forward(); // out is output for inp1 if out1 is empty. Otherwise it's output for inp2

Syncing

net.enableAsync(1);

net.setInput(inp1);

out = net.forward(); // assume out is empty here (not ready)
out = net.forward(); // assume out is not ready again

net.enableAsync(0);
out = net.forward(); // wait here until output is ready

Syncing let users control maximum number of asynchronous requests. In example, if number of fetched inputs equals to specified maximum number of requests, we disable async mode and wait for the output of the first input in queue. Note that it doen't disable asynchronous computations at that time but specifies that next Net::forward invocation should return output.

Steps to reproduce

Issue 2:
System information (version)

OpenCV => OpenCV online documentation

Operating System / Platform => Not applicable

Compiler => Python

Detailed description

The Python code for Otsu's binarization gven in the online documentation for OpenCV Image Thresholding at

https://docs.opencv.org/3.4/d7/d4d/tutorial_py_thresholding.html

requires the following corrections:

Histogram normalization should be done by dividing by the sum, not max:

hist_norm = hist.ravel()/hist.sum()

The computation of mean and variances can generate the division-by-zero run-time error when either q1 or q2 is zero. To avoid this, we must include the statement

if q1 < 1.e-6 or q2 < 1.e-6: continue

Corrected code

img = cv.imread('noisy2.png',0)
blur = cv.GaussianBlur(img,(5,5),0)

hist = cv.calcHist([blur],[0],None,[256],[0,256])
hist_norm = hist.ravel()/hist.sum()
Q = hist_norm.cumsum()
bins = np.arange(256)
fn_min = np.inf
thresh = -1
for i in xrange(1,256):
p1,p2 = np.hsplit(hist_norm,[i]) # probabilities
q1,q2 = Q[i],Q[255]-Q[i] # cum sum of classes
if q1 < 1.e-6 or q2 < 1.e-6: continue
b1,b2 = np.hsplit(bins,[i]) # weights

m1,m2 = np.sum(p1*b1)/q1, np.sum(p2*b2)/q2
v1,v2 = np.sum(((b1-m1)**2)*p1)/q1,np.sum(((b2-m2)**2)*p2)/q2

fn = v1*q1 + v2*q2
if fn < fn_min:
fn_min = fn
thresh = i

ret, otsu = cv.threshold(blur,0,255,cv.THRESH_BINARY+cv.THRESH_OTSU)
print( "{} {}".format(thresh,ret) )
Issue 1:
by namegduf:

What steps will reproduce the problem?
1. Get a copy of the Go source.
2. Set the appropriate environmental variables for compilation and issue
./all.make

What is the expected output? What do you see instead?

The expected result is a successful compilation with all tests passing. What
I see is, during tests:

--- FAIL: path.TestWalk
1. error expected, none found
node testdata/d/x mark = 2; expected 1
node testdata/d/y mark = 2; expected 1
node testdata/d/z mark = 2; expected 1
node testdata/d/z/u mark = 2; expected 1
node testdata/d/z/v mark = 2; expected 1
FAIL

What is your $GOOS? $GOARCH?

Linux/AMD64.

Which revision are you sync'ed to? (hg log -l 1)

4010:91c471680dc9

Please provide any additional information below.

I was performing this compilation and install as root, in order to install
system wide into /usr/local. This might be related, but should work.

Issue 2:
by orthopteroid:

The string replacer appears to have a problem with single replacements that would happen
at the start of a string:

s := "Hello World"
fmt.Println(strings.NewReplacer("Hello","").Replace(s))
fmt.Println(strings.NewReplacer("World","").Replace(s))

Produces:

Hello World
Hello

Which is incorrect. I would expect:

World
Hello

Whereas, when I add another substitution for replacement:

s := "Hello World"
fmt.Println(strings.NewReplacer("Hello","","l","").Replace(s))
fmt.Println(strings.NewReplacer("World","","l","").Replace(s))

Producing a correct result:

Word
Heo

Alternatively, if I perform a single replacement which is not at the start of the string:

s := "Hello World"
fmt.Println(strings.NewReplacer("ello","").Replace(s))
fmt.Println(strings.NewReplacer("orld","").Replace(s))

Produces the correct result:

H World
Hello W

So, the problem appears to be with single substitution when the match is at the start of
the string. I have noticed that strings.NewReplacer tries to handle single substitutions
as a special case... perhaps that code has a problem?

--------------
http://play.golang.org/p/Hj1V9d8fAj
go version devel +f4d1cb8d9a91 Thu Sep 19 22:34:33 2013 +1000 linux/386
Issue 1:
This is on master and a recent build of the release-0.3 branch.

If there are duplicates in the indexes, sparsevec creates a matrix as advertised, and values with duplicate indexes are added by default.

julia> sv = sparsevec([1,1,2,3,4], ones(5))
4x1 sparse matrix with 4 Float64 entries:
[1, 1] = 2.0
[2, 1] = 1.0
[3, 1] = 1.0
[4, 1] = 1.0

But the rowval and nvval fields sometimes but not always have extra values.

julia> sv.rowval
5-element Array{Int64,1}:
1
2
3
4
4

I'm not sure that this is actually a bug, because it seems intentional, but this causes hcat not to work:

julia> [sv sv]
ERROR: DimensionMismatch("tried to assign 5 elements to 4 destinations")
in throw_setindex_mismatch at operators.jl:233
in setindex! at array.jl:330
in hcat at sparse/sparsematrix.jl:1802

Using sparse([1,1,2,3,4], ones(Int, 5), ones(5)) instead of sparsevec does not cause this issue.

Issue 2:
hi All,

I am attempting to compile Julia as per instructions but receiving the following message at the end of the compilation

make[4]: *** [dgemm_kernel_HASWELL.o] Error 1

make[4]: *** Waiting for unfinished jobs....

make[3]: *** [libs] Error 1

*** Clean the OpenBLAS build with 'make -C deps clean-openblas'. Rebuild with 'make OPENBLAS_USE_THREAD=0 if OpenBLAS had trouble linking libpthread.so, and with 'make OPENBLAS_TARGET_ARCH=NEHALEM' if there were errors building SandyBridge support. Both these options can also be used simultaneously. ***

make[2]: *** [openblas-v0.2.10.rc2/libopenblas.so] Error 1

make[1]: *** [julia-release] Error 2

make: *** [release] Error 2

Could anyone help shed some light as to what the problem is please.

For Info - the OS is centos 6.5

Thanks

Peter
Issue 1:
When attempting to play Borderlands 3 the game will keep minimising itself instead of starting. Took a little while to realise that exiting PowerTools returned the correct functionality.

Environment

Windows build number: 10.0.17763.805
PowerToys version: Original version (will load latest tonight and try again came to report and found new version)
PowerToy module for which you are reporting the bug (if applicable): FancyZones (I suspect)

Steps to reproduce

Run Borderlands 3 with PowerTools running in the system tray.

Expected behavior

Borderlands runs full screen.

Actual behavior

Borderlands keeps disappearing back to a minimised icon on the task bar.

Issue 2:
📝 Provide a description of the new feature

I would like to see the ability to add a Prefix/Suffix to file names, without the need to subistute anything

If you'd like to see this feature implemented, add a 👍 reaction to this post.
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-SNAPSHOT

Operating System version: windows1

Java version: 1.8

Steps to reproduce this issue

public class RedisMetadataReport extends AbstractMetadataReport {

private final static Logger logger = LoggerFactory.getLogger(RedisMetadataReport.class);

final JedisPool pool;

public RedisMetadataReport(URL url) {
super(url);
pool = new JedisPool(new JedisPoolConfig(), url.getHost(), url.getPort());
}
}

I see the construct method used JedisPool,

if cluster ，how should do？

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

Operating System version:win7

Java version: jdk 8

Steps to reproduce this issue

Create a ReferenceConfig , and do not set MetadataReportConfig

Use ReferenceConfigCache to cache referenceConfig

Get referenceConfig from ReferenceConfigCache and use it to get reference instance for call.

do referenceConfig.get() frequently and invoke service .

ReferenceConfig<HelloBOMService> referenceConfig = new ReferenceConfig();
ApplicationConfig application = new ApplicationConfig("application");
referenceConfig.setApplication(application);
RegistryConfig registryConfig = new RegistryConfig("zookeeper://localhost:21170");
referenceConfig.setInterface(HelloBOMService.class.getName());
referenceConfig.setRegistry(registryConfig);

//referenceConfig.setMetadataReportConfig();
for (;;) {
ReferenceConfigCache cache = ReferenceConfigCache.getCache();
HelloBOMService service = cache.get(referenceConfig);
SomeResponse response = service.get(new SomeRequest());
Thread.sleep(10);
}

Expected Result

When the referenceConfig is first initialization successufully,

the client will not do any operations which affects performance.

Actual Result

a log of log message loged by dubbo as we call ReferenceCofnig.get() ,whiche affects the health of application.

[DUBBO] There's no valid metadata config found, if you are using the simplified mode of registry url, please make sure you have a metadata address configured properly., dubbo version: 2.7.3, current host:
[DUBBO] There's no valid metadata config found, if you are using the simplified mode of registry url, please make sure you have a metadata address configured properly., dubbo version: 2.7.3, current host:
Issue 1:
Describe the bug

Trying Next with layout pattern:

https://github.com/zeit/next.js/tree/canary/examples/layout-component

And the problem is that Layout component get remounted on every page change. I need to use layout component as a Container so it'll fetch data from server on every mount. How can I prevent layout to get re-mounted? Or am I missing something there?

To Reproduce

Download https://github.com/zeit/next.js/tree/canary/examples/layout-component

Add following code to Layout component:

React.useEffect(() => {
console.log("layount mounted " + new Date());
}, []);

See how Layout get remounted on every page, even though it's not supposed to.

System information

MacOS

Chrome

Next.js latest

Additional context

I've found a workaround in this article:

https://adamwathan.me/2019/10/17/persistent-layout-patterns-in-nextjs/

So maybe it's a feature request partly.

Issue 2:
I'm seeing that the contents of Head (next/head) are doubling when I use apollo, it doesn't seem to have any negative effects but I wanted to let you know.

link to the repo

the head is duplicated because of this:

if (!process.browser) {
const app = (
<ApolloProvider client={client} store={store}>
<Component {...props} />
</ApolloProvider>
)
await getDataFromTree(app)
}

btw if I use Head multiple times, there should be no problem right ? (in the repo I'm using it only once)
Issue 1:
I used setup.py install today to install matplotlib in a venv. I got some rather hard to tackle tracebacks, as they were filled with exec's (meaning one can not see what the actual code is that fails).

Ultimately this was caused by pyparsing calling .filename and .lineno on a tuple (it obviously expected some kind of different object). But the tuple did contain a filename and a lineno as the first two elements, and some other stuff (the tuple seemed to be coming from the backtrace package). This code was wrapped in something like if PY3: ...

As a random guess I decided to downgrade pyparsing from 2.1.2 to 2.1.1, and this solved the problem. Unfortunately, I am not able to reproduce this anymore, even when upgrading pyparsing to 2.1.2. Still I though a heads-up might be in place, if someone seems AttributeError: 'tuple' object has no attribute 'filename' with a traceback that is more of less useless.

Issue 2:
Every day we have a bunch of EC2 machines that start and install themselves.

This morning, the pip install matplotlib returned this :

Complete output from command /usr/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-y7e201wb/matplotlib/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-1h1al542-record/install-record.txt --single-version-externally-managed --compile:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-y7e201wb/matplotlib/setup.py", line 167, in <module>
result = package.check()
File "/tmp/pip-build-y7e201wb/matplotlib/setupext.py", line 1246, in check
import pyparsing
File "/usr/local/lib/python3.4/site-packages/pyparsing.py", line 3478, in <module>
_escapedPunc = Word( _bslash, r"\[]-*.$+^?()~ ", exact=2 ).setParseAction(lambda s,l,t:t[0][1])
File "/usr/local/lib/python3.4/site-packages/pyparsing.py", line 948, in setParseAction
self.parseAction = list(map(_trim_arity, list(fns)))
File "/usr/local/lib/python3.4/site-packages/pyparsing.py", line 808, in _trim_arity
this_line = extract_stack()[-1]
File "/usr/local/lib/python3.4/site-packages/pyparsing.py", line 793, in extract_stack
return [(frame_summary.filename, frame_summary.lineno)]
AttributeError: 'tuple' object has no attribute 'filename'
============================================================================
Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
matplotlib: yes [1.5.1]
python: yes [3.4.3 (default, Apr 1 2015, 18:10:40) [GCC
4.8.2 20140120 (Red Hat 4.8.2-16)]]
platform: yes [linux]

REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.11.0]
dateutil: yes [using dateutil version 2.5.3]
pytz: yes [using pytz version 2016.4]
cycler: yes [using cycler version 0.10.0]
tornado: yes [using tornado version 4.3]

What happens ?

Our stack

python 3.4, amazon linux