WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
There are a lot of duplicated code EncryptSQLRewriterParameterizedTest, MixSQLRewriterParameterizedTest and ShardingSQLRewriterParameterizedTest, It could be a template implementation.

Issue 2:
Bug Report

For English only, other languages will not accept.

Before report a bug, make sure you have:

Searched open and closed GitHub issues.

Read documentation: ShardingSphere Doc.

Please pay attention on issues you submitted, because we maybe need more details.

If no response anymore and we cannot reproduce it on current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Which version of ShardingSphere did you use?

5.0.0.beta

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-JDBC

Expected behavior

抛出异常

Actual behavior

没有任何异常

Reason analyze (If you can)

没看源码

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

很简单，库里一张表某个字段设成非空，然后在insert一条数据，非空字段不传值，正常要报异常，但是在5.0.0beta版本上，没有异常抛出，正常返回，只不过返回值是-1，我退回到4.1.1版本会抛异常

Example codes for reproduce this issue (such as a github link).
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

Multiple inheritance from one class leads to multiple/shared metadata when the base class has an annotation.

import 'reflect-metadata';
import { Injectable, Inject } from '@angular/core';

class A {}
class B {}
class C {}

// Enabling this decorator leads to same log output for booth classes
//@Injectable()
class BaseClass {
constructor(protected a : A) {}
}

@Injectable()
class Cls1 extends BaseClass {
constructor(@Inject(B) protected b : B, @Inject(A) a : A) {
super(a);
}
}

@Injectable()
class Cls2 extends BaseClass {
constructor(@Inject(C) protected c : C, @Inject(A) a : A) {
super(a);
}
}

console.log(Reflect.getMetadata('parameters', Cls1))
console.log(Reflect.getMetadata('parameters', Cls2))

Expected behavior

The DI/Typescript-Metadata should affect only the classes where they are present.

Reproduction of the problem

Simple example project: https://github.com/draconisNoctis/angular2_di_issue

What is the motivation / use case for changing the behavior?

Any larger project needs inheritance of components/services etc.

Angular version: 2.0.0-final

Browser: all & nodejs

Language: all | ES5

Issue 2:
Dependency Injection not working for Components/Directives inherited from Angular2 Components/Directives if using TypeScript Compiler instead of Angular Template Compiler.

Steps to reproduce and a minimal demo of the problem

Define DatePicker directive inherited from DefaultValueAccessor.

Add any additional parameter to DatePicker constructor (e.g. logger: Logger).

Compile source code with TypeScript Compiler.

Run application.

@Injectable()
class Logger {}

@Directive({
selector: '[datePicker]'
})
class DatePicker extends DefaultValueAccessor {
constructor(renderer: Renderer, element: ElementRef, logger: Logger) {
super(renderer, element);
if (!logger) {
console.error('Logger is undefined');
} else {
console.info('Logger is defined');
}
}
}

Minimal demo: http://plnkr.co/edit/UIybCDlayhXRO7x0Y7Lk?p=preview

Current behavior

DatePicker resolved using ctorParameters from DefaultValueAccessor (renderer, element) instead of metadata from DatePicker constructor (renderer, element, logger).

(see ReflectionCapabilities.parameters(typeOrFunc: Type): any[][] implementation for details)

Expected/desired behavior

DatePicker resolved using parameters from its constructor metadata (renderer, element, logger).

Other information

Current implementation of ReflectionCapabilities.parameters(typeOrFunc: Type): any[][] work properly only if code was compiled using Angular Template Compiler, otherwise it will never check metadata, because ctorParameters decorator data inherited from parent hides it.
Issue 1:
Challenge Name

https://www.freecodecamp.com/challenges/call-out-optional-actions-with-button-info

Many challenges before and after.

Issue Description

The type cursor doesn't always end up where clicked by the mouse cursor. In some areas of text, you can't click anywhere within it. When it is possible to place the type cursor, it will automatically move to a random area within the text browser once provided with input from the keyboard.

Browser Information

Browser Name, Version: Version 52.0.2743.82 m

Operating System: Windows 10 Pro x64

Mobile, Desktop, or Tablet: Desktop

Your Code

Screenshot

Not applicable.

Issue 2:
In all the exercises, we the users are forced to press the enter key before writing any code.

Update:

We have locked the conversation temporarily on this thread to collaborators only, this has been resolved in staging, and will be live soon.

The fix can be confirmed on the beta website.

The workaround currently on production website is:

Press the Enter key on the challenge editor and then proceed with the challenge.

Apologies for the inconvenience meanwhile.

Reach us in the chat room if you need any assistance.
Issue 1:
This issue can be quite easily understood from the source of the carousel's pause method. It is the this.cycle() that is the problem. Since that is run without any argument, it sets this.paused to false, effectively undoing what was just set a few lines before. Then the next time cycle fires with an event, like mouseexit, it will actually start cycling. So, this.cycle needs to be called with some argument.

pause: function (e) {

if (!e) this.paused = true

if (this.$element.find('.next, .prev').length && $.support.transition.end) {

this.$element.trigger($.support.transition.end)

this.cycle()

}

clearInterval(this.interval)

this.interval = null

return this

}

Issue 2:
carousels example

I thought this one was fixed with the clearInterval() function, but its not.. =/

go to the carousel example and click on one of the indicators, and stay on the image or indicators.. the carousel doesnt stay paused, it keeps cycling through the images event if you're still hovering on top of them..
Issue 1:
the bug is described at pytorch/examples#148. I just wonder if this is a bug in PyTorch itself, as the example code looks clean to me. Also, I wonder if this is related to #1120.

Issue 2:
🚀 Feature

Add sparse tensor support for torch.blkdiag.

Motivation

Dense matrix support was implemented for issue #31932, but we need sparse as well.

Pitch

See #31932

Alternatives

See #31932

cc @vincentqb
Issue 1:
Problem description

With 0.18.3 version my TextFields lose custom colors. After downgrading to 0.18.2 colors work as expected.

As I see, it's related to #7065

Link to minimal working code that reproduces the issue

https://www.webpackbin.com/bins/-KnEbDVKdLKisHPScLox

Versions

Material-UI: 0.18.3

React: 15.5.4

Browser: Chrome 58.0.3029.110 (64-bit) (windows 10)

Issue 2:
Material UI versions: 0.18.1 and 0.18.3. (I didn't test 0.18.2)

<TextField
className="app-bar-searchbar"
hintStyle={{ color: grey300, fontSize: '12px' }}
inputStyle={{ color: white, fontSize: '12px' }}
underlineFocusStyle={{ borderColor: tealA400 }}
underlineStyle={{ borderColor: tealA400 }}
onChange={this.handleInputChange}
onKeyPress={this.handleKeyPress}
value={this.state.search}
errorText={this.state.searchErrorText}
hintText="Suche..."
/>

The text color is black instead of white.
Issue 1:
I've a component whose render method looks like

render() {
const {condition} = this.state;

if (!condition) {
return null;
}

return <div onClick={() => { doSomething(); }} >
...
</div>
}

When the state changes and condition changes from true to false, this triggers the error

EventListener.js:37 Uncaught TypeError: Cannot read property 'addEventListener' of null

Here is the trace if that helps:

EventListener.listen @ EventListener.js:37
SimpleEventPlugin.didPutListener @ SimpleEventPlugin.js:612
EventPluginHub.putListener @ EventPluginHub.js:113
putListener @ ReactDOMComponent.js:175
_assign.notifyAll @ CallbackQueue.js:66
ON_DOM_READY_QUEUEING.close @ ReactReconcileTransaction.js:79
Mixin.closeAll @ Transaction.js:202
Mixin.perform @ Transaction.js:149
Mixin.perform @ Transaction.js:136
_assign.perform @ ReactUpdates.js:89
flushBatchedUpdates @ ReactUpdates.js:165
ReactUpdates_flushBatchedUpdates @ ReactPerf.js:66
Mixin.closeAll @ Transaction.js:202
Mixin.perform @ Transaction.js:149
ReactDefaultBatchingStrategy.batchedUpdates @ ReactDefaultBatchingStrategy.js:63
batchedUpdates @ ReactUpdates.js:97
ReactEventListener.dispatchEvent @ ReactEventListener.js:150

Returning an empty div instead of null fixes the issue:

render() {
const {condition} = this.state;

if (!condition) {
return <div></div>;
}

return <div onClick={() => { doSomething(); }} >
...
</div>
}

Issue 2:
Hello,

After updating to React 15.0.1, we are getting the following error:

Uncaught TypeError: Cannot read property 'addEventListener' of null
Issue 1:
Summary of the new feature/enhancement

I usually have hundreds and sometimes thousands of files with maybe 10 or 20 different naming variations and I always have to select all files, right click, open PowerRename, write regex, apply changes, select all files again, right click, open PowerRename, write regex, apply changes, and repeat, over and over again.

It would be awesome to have an option to NOT close PowerTools window after renaming files. After renaming, the window would refresh with the new names, and let me change once again the parameters with ease.

It is unfeasible to use a single regex (I tried but if left me with a monster of more than 600 chars) because there are so many different variations and with every delivery it changes again. There are many different areas that would appreciate such option.

Proposed technical implementation details (optional)

Add a checkbox option to "Keep window open after applying changes" or a setting under PowerTools settings.

Issue 2:
Summary of the new feature/enhancement

Clicking on Window toolbars requires a needless degree of precision when all you're trying to do is move a window (or resize with respect to the corner). In Linux you can use ALT+Left Mouse to move a Window so long as the cursor is anywhere within the window and use ALT+Right Mouse to resize a window if the cursor is within it. This is such a great productivity booster and I don't understand why it isn't a built-in feature of Windows already considering it's been in Linux for at least 20 years.

There's already a deprecated Windows program that does it, but a native and supported implementation would be much better.

https://stefansundin.github.io/altdrag/

Proposed technical implementation details (optional)

See this site.

https://stefansundin.github.io/altdrag/
Issue 1:
There seems to have been a recent regression in the placement of the cursor and end-of-line marker on lines with accented characters. For example

ὤὤὤὤὤὤὤὤὤὤ

Has ten characters but if you ctrl-E to the end of the line the cursor is in the wrong place:

This may seem obscure but is making it very difficult to use Atom for natural language processing applications with non-ASCII character sets. It worked fairly recently so is likely a recent regression.

Issue 2:
Halp ticket:

support/e61e5074bc3011e396a434cf997499c3

Support for Unicode is incomplete. Unicode characters are shown, but the cursor get stuck, and the navigation with the keyboard arrows stop working.

The user was using this string as an example ג׳ג׳ג׳dwdwdww

Here's a GIF of me pressing just the right arrow key to get from the beginning of the string to the end:
Issue 1:
Electron version: v1.7.0

Operating system: Linux Mint 18 x64

I tried to debug an electron with visual studio code. But I got an error so I tried to start electron with the same arguments in the shell: "electron --debug-brk", which produces an segmentation fault immediately. Also using "electron --debug" produces this result. Whether I specify a port "electron --debug=9999" does not matter, still the same result.

Issue 2:
Electron version: 1.7.0

Operating system: macOS

Expected behavior

Electron works with --debug or -debug argument

Actual behavior

Electron won't run with arguments above.

How to reproduce

I've tried the standalone .app and the npm modules:

for standalone .app it shows an error and returns a non-zero

(with "IOVARendererID property not found" the welcome window appears and I've manually close it)

for npm module it just won't start and no error returns

I can confirm the --debug works with previous versions including 1.6.9 beta
Issue 1:
Hello, could it be possible to add one or two additional variables to the onResourceReady callback, which states whether the image was downloaded or loaded from cache?

For example:

//final int FROM_INTERNET=0;
//final int FROM_CACHE=1;
//final int FROM_EXTERNAL=2;

Glide.with(c).load(url).listener(new RequestListener<Drawable>(){
@Override
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
return false;
}

@Override
public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource, int loadedFrom, String loadPath) {
Log.d("MainActivity","loadedFrom: "+loadedFrom+", loadPath: "+loadPath);
// loadedFrom could return: 0 (downloaded), 1 (from cache), 2 (from external storage?), etc.
// loadPath could return: url (for 0), path to cache (for 1), path to external location (for 2), etc.
return false;
}
})

Glide version: 4.11.0

Integration: Okhttp3

Device: Xiaomi MA 1A, Android 8.1.0

Why: I simply want to know whether an image has been downloaded or fetched from cache when loaded. I've read and tried to implement onlyRetrieveFromCache(true) with custom target and listener, and it's not reliable, convenient, or efficient for checking it.

Issue 2:
I have a ViewPager with 3 fragments inside. Each fragment is a list to retrieve some exercises from a remote server. The 3 fragments are in order: "explore", "favorite", "recent".

In "explore" list, all images correctly appear. unfortunately in the "favorite" no image appears (just place holder thumbnail).

This is my common adapter:

@Override public View getView(int position, View convertView, ViewGroup parent) {
final T item = getItem(position);
....
Glide.with(getContext())
.load(UIUtils.getThumbnailImageUrl(item.images))
.placeholder(R.drawable.default_thumbnail_picture)
.crossFade()
.listener(new RequestListener<String, GlideDrawable>() {
@Override
public boolean onException(Exception e, String model, Target<GlideDrawable> target, boolean isFirstResource) {
return false;
}

@Override
public boolean onResourceReady(GlideDrawable resource, String model, Target<GlideDrawable> target, boolean isFromMemoryCache, boolean isFirstResource) {
return false;
}
})
.into(viewHolder.mExerciseImageView);
return convertView;
}

I put a breakpoint in "onException()" function, and there are several break. Unfortunately, exception is always equal at null...

Could you help me guys?

Thank you very much!
Issue 1:
When using the openblas based pypi package for numpy on windows, a simply import allocates a lot (25-30MB/core) of committed memory per CPU core by default. This leads to MemoryErrors due to memory exhaustion, when all memory of a machine is committed used up. This can easily happen when using multiprocessing or other multi process architectures on a server with many cpu cores. Basically kills the server, unless you have at least (core*core)*30MB of RAM free.

This is made worse by packages that simply import numpy for functionality unrelated to openblas, like openpyxl that only import some type definitions from numpy, so the memory usage comes as a big surprise.

The problem why this happens is OpenBLAS usage of VirtualAlloc to allocate buffers on init. Using the MEMORY_COMMIT flag right away to emulate Linux mmap behaviour, instead of using only MEMORY_RESERVE and a later MEMORY_COMMIT on first actual use of the buffers, so forcing the reservation of physical (commited) memory instead of just virtual memory.

Setting the OPENBLAS_NUM_THREADS=1 envvar fixes the memory allocation, but i did not see any direct mention of it related to memory usage, only to threading behaviour.

It would be nice if just importing the module did not allocate and commit all that memory.

Reproducing code example:

import numpy

Check the memory usage with sysinternal vmmap.

https://docs.microsoft.com/en-us/sysinternals/downloads/vmmap

The usage in the 'private data' section (private bytes in process explorer) grows by megabytes, proportional to the number of CPU cores.

This can be reduced to zero growth when OPENBLAS_NUM_THREADS is set to 1 before the import.

Numpy/Python version information:

print(numpy.version, sys.version)

('1.16.2', '2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]')

Issue 2:
Related to vscode-restructuredtext/snooty-parser#24 and networkx/networkx#4857

I expect import numpy to commit close to 0 memory.

Reproducing code example:

import numpy as np

Error message:

File "C:\Users\Ark\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\__init__.py", line 153, in <module>
from . import ma
File "C:\Users\Ark\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\ma\__init__.py", line 42, in <module>
from . import core
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 724, in exec_module
File "<frozen importlib._bootstrap_external>", line 818, in get_code
File "<frozen importlib._bootstrap_external>", line 917, in get_data
MemoryError

NumPy/Python version information:

1.19.5 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]
Issue 1:
Vue.js version

1.0.21

Reproduction Link

http://matkovsky.com/vue-svg/

(The left icon is inside a <template> block, the right one is not.)

Steps to reproduce

Put an <svg> tag with an external svg file (with symbols) inside a <template v-if="foo === bar"> block.

What is Expected?

The SVG should be there. (And it is there in Safari, Firefox, Opera, but not in Chrome.)

What is actually happening?

The SVG is not loaded. Not even if the same symbol is already used on the site elsewhere.

I'm not entirely sure whether this is a Chrome bug or a Vue bug.

Issue 2:
Vue.js version

1.0.16

Reproduction Link

https://github.com/asakurayoh/vuejs-svg-bug/tree/master

Steps to reproduce

Only load the index.html in a webserver.

What is Expected?

The svg icon should be display event if in a .

What is actually happening?

The svg do not seam to be rendered in chrome, but work in Firefox and Safari. Bug of VueJS or Chrome?
Issue 1:
Slider does not update self state value if min, max, value props are changed together, so slider gets out of the page layout.

I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

When I change the slider props, I believe that the slider accepts new props, updates its state and re renders properly.

Current Behavior

If I change min, max, value props together, slider does not update value.

Steps to Reproduce (for bugs)

Bug demo: https://codesandbox.io/s/xrl2j6936o (Press "Do a bug" button)

Set slider props - value: 5, minValue: 1, maxValue: 10, step: 1

Change slider props to - minValue: 25, maxValue: 30, value: 27

See that slider's value did not change

Context

I've got slider as a part of big component, that present a service calculator. User can switch different mode, so the slider must change it props.

Your Environment

Tech
Version

Material-UI
0.19.4

React
tried with 15.4.0 and 16.0.0

browser
Google Chrome 62.0.3202.94, Firefox 57, IE11, EDGE and others

Issue 2:
Below you can see two problems with SelectField - one is the wrong position and the second is that hintText is present even if the value is selected.

also I think that SelectField needs some more methods: getValue() setValue() clearValue()
Issue 1:
Whenever suggest widget (e.g. a completion list) is summoned (by a configured trigger character, e.g. . or >), both Tab and Enter are valid for selection by default. More than once I've accidentally accepted the suggestion rather than doing a line break as intended.

mitaki28/vscode-clang#8 is a good example of this where a completionProvider is configured and triggered by >, causing issues when trying to do a line break:

At first I thought I'd suggest that the default should be only Tab to avoid all of this. But then I came to think that perhaps more ideally this should be configurable by the extension that registers a provider with triggerCharacters. What do you think?

Issue 2:
Don't try to content assist / perform intellisense when writing a comment. Really really annoying, when every other word pops up suggestions. Don't want it.

Dupe of #538 that got closed but not fixed really though.
Issue 1:
Patrick Ryan opened SPR-1719 and commented

I described this in the forum at: http://forum.springframework.org/showthread.php?t=22377

I have recently tried the 2.0 M2 Spring.jar and immediately found that what was

working for PropertyPlaceholderConfigurer is suddenly not working in 2.0.

I have a bean with a property like: <property

name="readQueueName"><value>${queue.routerQueue}</value></property>

and a property file like: queue.routerQueue=routerQueue1

but what is set in the bean, is ${queue.routerQueue} and not the substituted

value. I am pretty certain that the PropertyPlaceholderConfigurer bean is able

to read the value - I have set breakpoints and extended the class to provide JMX

viewing of the properties and they are correct. However, when I set a breakpoint at the 'setReadQueueName' method, the value passed in is ${queue.routerQueue}.

I have many, many properties set in my config files, and some get replaced and others do not. I cannot actually track down a pattern just yet. Even though some properties get replaced and some dont, it is very consistent when it decides not to replace a property. That property is never replaced, but I dont know why it decides to replace some but not others.

I would be happy to provide files and I will also look into this more over the weekend.

Affects: 2.0 M2

Attachments:

propertyplaceholdertestcase.zip (1.61 kB)

Issue Links:

#6415 External properties setting fail with abstract beans ("duplicates")

1 votes, 1 watchers

Issue 2:
Craig opened SPR-8604 and commented

I'm attempting to use RestTemplate.execute() and it takes a RequestCallback instance and a ResponseExtractor instance as parameters. It seems that I should be able to use (via direct instantiation or inheritance) the really useful RestTemplate implementations of these interfaces, but they're all marked private. Can they please be marked public?

Affects: 5.0.4

Referenced from: commits 79e809b

3 votes, 6 watchers