WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Migrated issue, originally created by Stijn van Drongelen (@rhymoid)

I programmatically create a bunch of (complex) INSERT ... SELECT statements. I regularly use the pattern

target_columns, source_elements = *query_components
statement = target_table.insert().from_select(
target_columns,
select(source_elements).select_from(source_selectable)
)

after building query_components and source_selectable from some specification. When I (granted: inadvertedly) had a duplicate column in source_elements, the database complained that there was a mismatch in the numer of columns in the INSERT ... SELECT statement.

It took me a while to figure out what the problem was, but I've distilled a MVCE that explains my expectations and how they mismatch SQLAlchemy's actual behaviour. I'm not sure what the reasoning behind it is, as having duplicate columns after SELECT isn't semantically wrong. If I wanted to target multiple columns with the same source column, I could of course work around it by labeling every source column, but unlike .alias(), .label() can't be called without an argument (and I'd like to leverage SQLAlchemy's ability to generate fresh names).

So, in short: simple code may end up generating broken SQL because duplicate columns get dropped by Select. Why does it do that, and how do I generate fresh .label()s if I'd want to work around that for Insert.from_select?

The problem occurs in 1.0.15, 1.0.17, and 1.1.11.

Attachments: sqlalchemy_duplicate_columns_in_select_bug.py

Issue 2:
Apart from having option to select isolation level, it may come handy to create a transaction in a read only mode. This option is supported on postgres, see https://www.postgresql.org/docs/current/sql-set-transaction.html. I'm not sure about other database backends, but mysql seems to support them as well, see https://dev.mysql.com/doc/refman/8.0/en/set-transaction.html.

I suggest to add an optional parameter transaction mode with possible values READ WRITE (default) or READ ONLY to execution options, similarly to isolation level.
Issue 1:
Following the discussion on Slack.

Currently this works :

julia> (1:2) - (1.0:2)
0.0:0.0:0.0

But these operations fail:

julia> (1:2) - (1:2)
ERROR: ArgumentError: step cannot be zero

and

julia> (1:1:2) - (1:1:2)
ERROR: ArgumentError: step cannot be zero

It would be more consistent to allow them, but then internal design of UnitRange and StepRange would need to change (and a tricky part is that the length can span from 0 to 2^(sizeof(type)*8) which is just one value too much to use the same storage type for values and for length).

Additionally we have the following problems with ragne:

julia> a = 2^60
1152921504606846976

julia> a:-a
1152921504606846976:1152921504606846975

julia> BigFloat(a):BigFloat(-a)
ERROR: ArgumentError: length cannot be negative, got -2305843009213693951

Issue 2:
record_reference_images = true
recordpath = "blah"
if record_reference_images
cd(homedir()) do
isdir(dirname(recordpath)) || run(`git clone git@github.com:SimonDanisch/ReferenceImages.git`)
isdir(recordpath) && rm(recordpath)
end
end

Unreachable reached at 0x7f4bd800eda3

signal (4): Illegal instruction
in expression starting at no file:0
cd at ./file.jl:99
unknown function (ip: 0x7f4bd800edc5)
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1829
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:324
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:428
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:363 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:686
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:799
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f4be357ff2f)
unknown function (ip: 0x9)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:808
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:787
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/builtins.c:622
eval at ./boot.jl:319
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182
eval_user_input at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:85
macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:117 [inlined]
#28 at ./task.jl:259
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2182
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1536 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:268
unknown function (ip: 0xffffffffffffffff)
Allocations: 263206 (Pool: 263125; Big: 81); GC: 0
Illegal instruction (core dumped)

Versioninfo:

julia> versioninfo()
Julia Version 1.0.0
Commit 5d4eaca0c9 (2018-08-08 20:58 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, skylake)
Issue 1:
Checklist

I have checked the issues list

for similar or identical feature requests.

I have checked the pull requests list

for existing proposed implementations of this feature.

I have checked the commit log

to find out if the if the same feature was already implemented in the

master branch.

I have included all related issues and possible duplicate issues

in this issue (If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Brief Summary

Forgive me if this is already trivially possible, but the docs suggest it isn't.

For the simplest case, it would be nice to have an option to not allow tasks to overlap per worker i.e. where by simplest case I mean a single instance with one worker running Periodic Tasks for example (non-distributed)

Design

Architectural Considerations

Current behavior would remain default

Proposed Behavior

Each worker checks if the task is already running on itself. Exponential backoff comes free?

Proposed UI/UX

Checkbox on django-celery-beat admin maybe?

Diagrams

N/A

Alternatives

Implement locking as per http://docs.celeryproject.org/en/latest/tutorials/task-cookbook.html#ensuring-a-task-is-only-executed-one-at-a-time, a heavy burden compared to the proposal.

Issue 2:
Checklist

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues in this issue

(If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Description

The "first-steps-with-celery" advises to use the following docker command to start RabbitMQ instance:

docker run -d -p 5462:5462 rabbitmq

However this won't work, as the default port for rabbit is 5672, not 5462.

Suggestions

replace 5462 with 5672.
Issue 1:
Have code like this:

setTimeout(null, () => {

});

Run "Format". The end result is:

setTimeout(null,() => {

});

There is a whitespace missing between "null" and the lambda.

Issue 2:
Not sure if it has been reported yet, tried to find similar issues but didn't find anything.

TypeScript Version:

1.9.0-dev.20160518-1.0

Code

// A self-contained demonstration of the problem follows...
<div name="test"
data="test"
onClick={() => { }}
>
<div>test</div>
</div>

Expected behavior:

Same as in example

Actual behavior:

<div name="test"
onClick={() => { } }
data="test"
>
<div>test</div>
</div>

Attributes need to aligned and take indentation from top attribute (name)

Closing tag indentation is a bit strange - any way to make it have same indentation level as opening one?
Issue 1:
I want to sample uint8s uniformly including the maximum value of 255, but this doesn't work:

from jax import random, numpy as jnp
random.randint(random.PRNGKey(0), (10,), 0, 256, jnp.uint8) # [0 0 0 0 0 0 0 0 0 0]

The reason is that maxval is converted into the uint8. This is in contrast to

import numpy as np
np.random.randint(0, 256, (10,), np.uint8) # [197 133 228 202 216 177 116 78 244 176]

The same happens for all integer datatypes. (Workaround is of course to use a larger type and then cast.)

Issue 2:
According to randint docstring: Sample uniform random values in [minval, maxval) with given shape/dtype.

However because of the conversion here

jax/jax/_src/random.py

Line 439
in
5bbb449

maxval = lax.convert_element_type(maxval, dtype)

passing maxval={dtype max value + 1} will generate an all-zero array.

The behavior in numpy is different (and correct):

jax.random.randint(jax.random.PRNGKey(0), shape=(10,), minval=0, maxval=256, dtype=jnp.uint8)
>> DeviceArray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=uint8)

np.random.randint(size=(10,), low=0, high=256, dtype=np.uint8)
>> array([ 87, 136, 195, 254, 95, 94, 113, 7, 66, 13], dtype=uint8)

A workaround is to not pass the dtype to randint (or use a dtype with a higher maximum value), and cast the output:

jax.random.randint(jax.random.PRNGKey(0), shape=(10,), minval=0, maxval=256).astype(jnp.uint8)
>> DeviceArray([178, 233, 99, 238, 39, 149, 46, 139, 68, 142], dtype=uint8)
Issue 1:
The following example duplicates i declaration.

for (let i = 0; i < 5; i++);
for (let i = 0; i < 5; i++);

But the following doesn't:

for (let i = 0; i < 5; i++);
for (let i = 0; i < 5; i++);
i;

I would expect both snippets to produce the same result.

Issue 2:
Bug Report

Current behavior

Spreading an HTMLcollection over an array does not work in iPhone 4s and produces this error:

Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects
must have a [Symbol.iterator]()method.

Input Code

const test = [...document.getElementsByTagName('div'), 'xyz'];

Working: Mac browsers (Chrome, Firefox, Safari), Android Chrome (Meizu M5 Note - 2016), and iPhone 8

Not working: iPhone 4s (iOS 9) and very likely other old devices

Expected behavior

It should just work on old devices like the iPhone 4s because new browsers now consider HTML collections as iterables (the fact that they work in most, if not all of, recent browsers).

Environment

System:
OS: macOS 10.15.5
Binaries:
Node: 12.13.1 - /usr/local/bin/node
npm: 6.14.5 - /usr/local/bin/npm
Babel: 7.9.0
Babel preset-env: 7.9.5
- How you are using Babel: [`loader`]
Issue 1:
TypeScript Version:

typescript@1.9.0-dev.20160409

Code

export enum SMTypeEnum { // расположены в порядке возрастания приоритета
S, I
}
type SMItemType = { messageType: SMTypeEnum, description: string, cssClassSuffix: string}
export var S_M_TYPES: SMItemType[] = [
{messageType: SMTypeEnum.S, description: "Success", cssClassSuffix: "success"}, // type: "S"
{messageType: SMTypeEnum.I, description: "Info", cssClassSuffix: "info"}, // type: "I"
];

.....

for (var apm of this.afterPostMessages) {
this.maxMessageType = Math.max(this.maxMessageType, SMTypeEnum[apm.msgType]);
}

Expected behavior:

no error

Actual behavior:

error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.

Issue 2:
interface A<a> {
brand: 'a';
nested: a;
}

interface B<a> {
brand: 'b';
nested: a;
}

type C<a> = A<a> | B<a>;

type D = C<D> | string; // <-- i wish
Issue 1:
TypeScript Version:

1.8.10

Problem

Sometimes we want to opt-out strict object literal check for a specific property. Some types have large amount or even unlimited number of properties, and we only want to model the most frequently used ones. However when we do use an unmodeled property in an object literal, the compiler complains. E.g.:

interface AttrBag {
id?: string;
style?: string;
title?: string;
'class'?: string;
}

function setAttrs(el: Element, attrs: AttrBag) {
//...
}

setAttrs(document.createElement('a'), {
title: 'foo',
href: 'bar', // error
'data-x': 'y', //error
});

Existing solutions

Existing solutions have some limitations:

Add a type assertion for the object literal. This turns off object literal check entirely, which is undesirable, e.g.:

setAttrs(document.createElement('a'), {
titile: 'foo', // typo, but no error
href: 'bar',
'data-x': 'y',
} as AttrBag);

Augument the interface for all used properties. This is heavy weight for infrequently used properties; and more importantly, the effect is usually global and can't be undone in a specific source file.

Proposed solution: "additional property" modifier

If a property name in a object literal is modified with + ("additional property" modifier), and it doesn't exist in the target type, compiler should skip strict object literal check for this property, and treat this property as optional. E.g.:

setAttrs(document.createElement('a'), {
title: 'foo',
+href: 'bar', // OK
+'data-x': 'y', // OK
});

// The type of attrs is { title: string, href?: string, 'data-x'?: string }
var attrs = {
title: 'foo',
+href: 'bar',
+'data-x': 'y',
};

attrs = { // OK
title: 'bar',
};

Issue 2:
If there's a decorator that takes all optional parameters it's easy to mistake and write

@decorator class A {}

instead of

@decorator() class A {}

The problem is that there's no warning and the decorator function does not get called at all.

I suggest to make the parameterless version @decorator to be the same thing of @decorator(), thus avoiding confusion.
Issue 1:
This issue is similar to the issue #3283, which actually proposed exactly the same feature. I'm creating a new issue to bring attention back to this feature.

It seems useful to be able to run only single task from a playbook. It can be achieved by defining a tag in 'roles' section of the playbook. However this approach has drawback: in every playbook where we will use the role we will have to define the same tag (which may clutter the playbook and introduces duplication).

Implicit tag defined for each of the roles could be a option. Nice I think, since being able to run only selected role(s) seems to be useful. But it can also be considered as little mysterious. Maybe it would be better to introduce '--roles' parameter to ansible-playbook CLI instead.

The other option could be ability to define tags for a role in the role itself (instead of in the playbook). It could be done i.e. by extending role's meta/main.yml file by adding section 'tags' to it (next to 'dependencies') which would define role's tags. The tags defined in meta could sum up with the tags defined in playbook.

This way we could avoid duplication and avoid introducing the implicit tag.

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

module name: user

ANSIBLE VERSION

ansible 2.4.2.0
config file = None
configured module search path = [u'/Users/user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/2.4.2.0_1/libexec/lib/python2.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.14 (default, Sep 25 2017, 09:53:17) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]

CONFIGURATION

nothing changed

OS / ENVIRONMENT

host: OSX High Sierra all patches

remote machines using Vagrant:

config.vm.box = "centos/7"

config.vm.box = "geerlingguy/ubuntu1604"

SUMMARY

I tried to create a user via the user module and set the skeleton option to /etc/skel . The module did not copy the contents of /etc/skel to the user's home directory.

STEPS TO REPRODUCE

- name: Create Jenkins user
user:
name: jenkins
comment: "Jenkins slave user"
system: yes
createhome: yes
skeleton: /etc/skel
home: /data/jenkins
shell: /bin/bash

EXPECTED RESULTS

The contents of /etc/skel should be copied to /data/jenkins

ACTUAL RESULTS

Nothing happened. The files were not copied. No errors were reported when running Ansible playbook.
Issue 1:
As shown in screenshot the select tag is not properly styled.

Tested on stock browser on android 4.1.2 and 4.2.1.

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:
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: master

Operating System version: deepin 15.9

Java version: 8

I want to know more about dubbo.And I found this code in module dubbo-metrics/dubbo-metrics-api/.../MetrcLevel

static {
for (MetricLevel level : MetricLevel.values()) {
if (level.ordinal() < 0) {
throw new RuntimeException("MetricLevel can not < 0");
}
}
}

I think this code is futility.Is it possible of level.ordinal() < 0?

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

Operating System version: mac

Java version: 8

Steps to reproduce this issue

错误

020-04-10 10:36:22.117 WARN 12008 --- [Report-thread-1] o.a.d.m.s.z.ZookeeperMetadataReport : [DUBBO] Failed to save service store file, cause: 文件名、目录名或卷标语法不正确。, dubbo version: 2.7.4.1.ZDUBBO-SNAPSHOT, current host: 10.45.19.17

java.io.IOException: 文件名、目录名或卷标语法不正确。

at java.io.WinNTFileSystem.createFileExclusively(Native Method) ~[na:1.8.0_101]

at java.io.File.createNewFile(File.java:1012) ~[na:1.8.0_101]

at org.apache.dubbo.metadata.support.AbstractMetadataReport.doSaveProperties(AbstractMetadataReport.java:144) [dubbo-2.7.4.1.ZDUBBO-SNAPSHOT.jar:2.7.4.1.ZDUBBO-SNAPSHOT]

at org.apache.dubbo.metadata.support.AbstractMetadataReport.access$100(AbstractMetadataReport.java:70) [dubbo-2.7.4.1.ZDUBBO-SNAPSHOT.jar:2.7.4.1.ZDUBBO-SNAPSHOT]

at org.apache.dubbo.metadata.support.AbstractMetadataReport$SaveProperties.run(AbstractMetadataReport.java:224) [dubbo-2.7.4.1.ZDUBBO-SNAPSHOT.jar:2.7.4.1.ZDUBBO-SNAPSHOT]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_101]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_101]

at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]

配置zk地址配置成：127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183就会出现，改成

zookeeper://127.0.0.1:2181?backup=127.0.0.1:2182,127.0.0.1:2183 就好了
Issue 1:
VSCode Version: Latest insiders

OS Version: Win10

see gif

i have settings javascript.validation.enable set to false

Issue 2:
VSCode Version: 0.10.13 (insider)

OS Version: OS X 10.10.5

Steps to Reproduce:

1.create a new .js file and past the following example code in:

export default function promiseMiddleware () {
return next => action => {
const {promise , type , ...rest} = action;
if (!promise) return next(action);
const SUCCESS = type;
const REQUEST = type + '_REQUEST';
const FAILURE = type + '_FAILURE';

next({...rest,type: REQUEST});

return promise
.then(res => {
next({res,type: SUCCESS});
return true;
})
.catch(error => {
next({...rest,error,type: FAILURE});
return false;
});
};
}

2.cmd-shift-p then type format code

With the spread operator (...rest) this causes a weird formatting issue (indent level) resulting in:

export default function promiseMiddleware() {
return next => action => {
const {promise, type, ...rest} = action;
if (!promise) return next(action);
const SUCCESS = type;
const REQUEST = type + '_REQUEST';
const FAILURE = type + '_FAILURE';

next({...rest, type: REQUEST});

return promise
.then(res => {
next({ res, type: SUCCESS });
return true;
})
.catch(error => {
next({...rest, error, type: FAILURE});
return false;
});
};
}

Removing all instances of the spread operator (...rest) and repeating step 2 formats the code properly
Issue 1:
I'm trying to pass an Input component styled with styled-components into select and getting the warning:

Material-UI: you have provided an invalid value to the inputproperty., We expect an element instance of theInput component.

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

Expected Behavior

I should be able to pass an Input styled with styled components to Select

const StyledInput = styled(Input)
<Select input={<StyledInput />} />

Current Behavior

Throws warning:

warning(
isMuiElement(input, ['Input']),
[
'Material-UI: you have provided an invalid value to the `input` property.',
'We expect an element instance of the `Input` component.',
].join('\n'),
);

Steps to Reproduce (for bugs)

https://codesandbox.io/s/4qql0opo0w

Context

I'm trying to compose some custom mui elements

Your Environment

Tech
Version

Material-UI
1.0.0-beta.26

React
16.2.0

StyledComponents
2.2.4

browser
63.0.3239.84

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

Expected Behavior

<TextField type="number" min="0" max="10" step="1" /> should compile with Typescript

Current Behavior

Receive following Typescript error for min, similar for max and step: [ts] Property 'min' does not exist on type 'IntrinsicAttributes & TextFieldProps & { children?: ReactNode; }'.

Your Environment

Tech
Version

Material-UI
1.0.0-beta.21

React
16.0.0

Typescript
2.6.1
Issue 1:
There seems to be an outdated tutorial page online at https://matplotlib.org/users/beginner.html . It has the old “Matplotlib 2.0.0rc2 is available – Install the release candidate now!“ banner.

I guess it’s not reachable from the main page, but it comes up in Google results.

Issue 2:
On the current live docs, the examples page claims to be from release 2.0.2, but it should be 2.1: http://matplotlib.org/examples/index.html
Issue 1:
Looking at the demos on http://material-ui.com for Buttons I noticed the click effect is broken in Firefox. The click effect works fine on Lists though, so there's just something weird going on with buttons in Firefox. It works fine on Chrome.

Issue 2:
I am using Firefox 45 on Linux, and the demo app at http://www.material-ui.com/#/customization/themes (version 0.14.4) shows that the ripple effect works well for everything but the buttons.

That includes the Tab headers, which I suspect are buttons as well.

The problem is present with alphas for 0.15 as well