WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
See discussion in https://discourse.julialang.org/t/no-automatic-type-promotion-for-parametric-structs/62664/1

When using different (but convertible) types in a constructor, for "standard" structs the types get converted automatically, e.g.

struct Struct1
x:: Float64
y
end

s1b = Struct1(5, 1) # output: Struct1b(5.0, 1)

However, this is not done if the struct has a type parameter (even if this parameter is for a different field), instead I get a MethodError:

struct Struct2{T}
x:: Float64
y:: T
end

s2b = Struct2(5, 1) # MethodError, I would expect Struct2{Int64}(5.0, 1)

s2c = Struct2(5.0, 1) # this works, output: Struct2{Int64}(5.0, 1)

This behavior is confusing for me, I would expect that type promotion is also done for parametric structs. Or is there a good reason for it which I am not aware of?

Issue 2:
Consider a definition of a parameter-less struct:

struct Bar
x::Int
y::Float64
end

This creates two constructors: A fully specified Bar(x::Int64, y::Float64) and a fully unspecified Bar(x, y). The latter is very convenient because you can just do Bar(1, 1) and it will automatically convert.

For a simple struct with a type param, we have something similar:

struct Baz{T}
x::T
end

creates the specified (::Type{Baz{T}})(x) where T and the unspecified (::Type{Baz})(x::T) where T. The latter handily allows you to call Baz(1.0) and get exactly what you expect.

However, if you make:

struct Foo{T}
x::T
y::Float64
end

You get (::Type{Foo{T}})(x, y) where T and (::Type{Foo})(x::T, y::Float64) where T. But there is no equivalent convenience method (::Type{Foo})(x::T, y) where T that allows you to do Foo(1, 1) and have it work. That would be nice to have though.

This was raised by @arnavs on Slack who found it counterintuitive.
Issue 1:
Why not to think of adding "right to left" support, I think this will be a great feature to bootstrap.

Issue 2:
I believe that bootstrap dropdowns should not close when the dropdowns themselves are clicked on. This will make it possible to put login forms inside the dropdowns.

You can reporoduce this by heading to http://twitter.github.com/bootstrap/javascript.html#dropdowns , opening a dropdown, and clicking in the line seprtating the links.

It appears that line 95 is causing the conflict:

$('html').on('click.dropdown.data-api', clearMenus)

UPDATE:

When logged out, the signin dropdown at http://twitter.com/#!/search-home does not closed when clicked on, but rather closes when clicked outside of the dropdown. This is what I am talking about here.
Issue 1:
VSCode Version: 1.1.1

OS Version: 10

Steps to Reproduce:

Install VS Code.

Install one or more extensions.

Notice that there is a .vscode folder in your user directory.

In Windows, the root of the user directory is NOT the right place to store application settings. This is a very common convention in Linux but Windows != Linux and not all Windows users want to pretend they are running Linux. In windows the correct location for application settings is %APPDATA% and the correct location for extensions is %LOCALAPPDATA% or %PROGRAMDATA% (depending on level of security consciousness).

To avoid a flame war, I want to be clear that this issue isn't debating why C:/Users/<username>/.<appname> is the wrong place for these files, it is only asserting that Microsoft has very clearly documented the right place for settings files and VSCode does not follow it. If the authors of VSCode have consciously decided to go against the long-running convention established by the OS authors then I won't press on the issue (though I think that would be a silly decision for VSCode). I am submitting this issue under the assumption that the authors didn't realize there was an established convention (very common in open source projects) and did what was familiar to them.

Issue 2:
VSCode Version: 0.10.11

OS Version: Windows 7 Enterprise 64-bit

Steps to Reproduce:

Press "Ctrl + =" to zoom in the view.

Search for some text

Click "F3" to jump to the "Next match"

The fonts are rendered with blur.

If I pressed "Ctrl+Home" to "reset" the rendering, then use mouse to scroll to that line, the fonts are clear and sharp.

The details of the fonts are as below:

blur:

sharp:

It seems the height of blurred font is 16px, and the "normal" font is 15px.

Because the monitor in my company is 22" 1920*1080, the default font size of VSCode is too small. Though we can modify the "editor.fontSize" setting, but the font-size of side bar will still be very small, so I think zoom in once is the most comfortable way to make text easy to read...if without this issue.

And I think it's not a duplicate of https://github.com/Microsoft/vscode/issues/4622.
Issue 1:
None of my onClick handlers are working in development mode after updating from 0.14.0 to 0.14.1 using IE11.

When reverting the code that was changed in ReactErrorUtils.js for #5157 I get the onClick handler working again.

Issue 2:
Count up with 0.14.0

http://inuscript.github.io/react-0-14-bug/0-14-0.html

But can't count up 0.14.1

http://inuscript.github.io/react-0-14-bug/0-14-1.html

I got this issue on IE 10 and 11 + Windows 8, 7.

And Windows 10 + IE 11 is move fine.
Issue 1:
Do you want to request a feature or report a bug?

bug

What is the current behavior?

I get:

Warning: Unknown DOM property autocomplete. Did you mean autoComplete?

When I use autoComplete works fine.

This is misleading because the name of the DOM property is autocomplete, not autoComplete. React implies that the DOM property is named differently than it really is.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/84v837e9/).

https://jsfiddle.net/binki/84v837e9/133/

What is the expected behavior?

Accepts autocomplete, rejects autoComplete.

OR

The error message should not claim that autoComplete is the name of a DOM property because it isn’t. I don’t see any mention of a DOM property called autoComplete in the IDL documentation for HTMLInputElement, but I do see mention of autocomplete. It should claim that autoComplete is a “React property name mapped onto a differently-named DOM property” or use some other wording (I’m not good at coming up with wordings).

> typeof document.createElement('input').autocomplete
"string"
> typeof document.createElement('input').autoComplete
"undefined"

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

react-15.6.1

Same issue exists for at least HTMLInputElement.autofocus.

Issue 2:
I'm not sure what counts as a canonical source, but as near as I can tell, the autocomplete input property should be all downcased. I've been having some trouble with form input showing up in Firefox after a refresh and noticed that I had autoComplete='off'. Not sure if that will have an effect on the functionality, though.

https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement

https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
Issue 1:
Heya, I've been trying to get any of the Page.mouse methods to work, but they all return the same error. I'm only using Page.mouse because neither .dragTo() nor .dragAndDrop() were working like some other users have posted about.

System info

Playwright Version: 1.8

Operating System: macOS 13.2

Browser: Chromium

Config file

export default {
browser: "chromium",
contextOptions: {
ignoreHTTPSErrors: true,
viewport: {
width: 1440,
height: 900,
},
},
launchOptions: {
headless: process.env.CI ? true : false,
devtools: false,
args: process.env.CI ? ciArgs : localArgs,
},
};

Code

public async expandBottomPane(): Promise<void> {
await this.page.waitForSelector('.scheduleForecastRowLabels');

const verticalDivider = this.page.locator('.verticalDivider');
const dayLine = this.page.locator('.scheduleHeader .dayLine');
const toDragBox = await verticalDivider.boundingBox();

await this.page.mouse.move(toDragBox!.x, toDragBox!.y)
}

Issue 2:
Context:

Playwright Version: 1.30.0

Operating System: WSL2

Node.js version: v16.18.1

Browser: All

Code Snippet

This is just one short example. It is affecting all tests.

import { test, expect } from '@playwright/test'

test.beforeEach(async ({ page }) => {
await page.goto('http://localhost:1234')
})

test.describe('Home', () => {
test('FullPage', async ({ page }) => {
await expect(page).toHaveScreenshot({ fullPage: true })
})
})

Describe the bug

The firefox, chromium, chrome, msedge and mobile chrome all work perfectly. But all safari based tests fail with the same message:

8) [Mobile Safari] › hombut e.spec.ts:8:7 › Home › FullPage ==========================================

browserContext.newPage: Protocol error (Page.overrideUserPreference): 'Page.overrideUserPreference' was not found [{"code":-32601,"message":"'Page.overrideUserPreference' was not found"}]

This is my first time setting up Playwright so I have no example of it working previously. I've changed very little since npm init playwright@latest so I doubt it's my configuration. I've installed all deps for the browsers as well.

I've tried for several hours to interpret the debug log using the docs, but I am no closer to figuring it out.

I searched for a while and the only similar mention I could find was #17699. I apologise if this is not a bug, but figured it was worth raising here if it's happened recently on an alternate OS.
Issue 1:
It should be possible to make an expanded (but not multiple) choice widget render an additional radio button for the empty_value option (if passed). Otherwise it's not possible to remove the selection if the field is not required. It should be selected by default if no other option is selected.

Issue 2:
As far as i can see there no way to overwrite or set the default messages domain for a certain template or controller. Especially when using the keyword syntax like "email.lostpassword.greeting" i find it very inconvenient to duplicate the keyword "email" (not to mention to add the empty the second argument) as the domain name. It makes my template look a lot more difficult to read and i dont find this approach very DRY.

It has lead to big translation files as i put all my messages in the messages.**.yml simply because its too hard too manage the domains for every single translation. Also, as far as i can see in the documentation there is no way to use includes within the translation files which could also be a solution to split up translation files into multiple subfiles.

All in all i think there should be some enhancements promoting the structuring of your language files.
Issue 1:
Expected Behavior

Use the session.setProxy function of a window to set a user:pass authenticated proxy. Load URL in that window. Expect that app.login event is triggered and request is made.

Actual behavior

Set session proxy to a user:pass authenticated proxy, loadURL requests fail with status "failed" in dev tools. App.login event never called.

To Reproduce

Create a window, use the session setProxy function to set a user:pass authenticated proxy. Then try to load ANY url in that window.

win.webContents.session.setProxy({
proxyRules: `http://user:pass@ip:port`
}, () => {});
}
//Requests fail status "failed"
win.loadURL('https://whatismyipaddress.com');
//This is NOT reached
app.on('login', function (event, request, authInfo, callback) {
if (authInfo.isProxy) {
log.info(`HI ${JSON.stringify(authInfo)}`)
// callback('username', 'password');
}
})

Working code with IP authenticated proxies

win.webContents.session.setProxy({
proxyRules: `http://ip:port`
}, () => {});
}
//Requests succeed
win.loadURL('https://whatismyipaddress.com');
//This is reached
app.on('login', function (event, request, authInfo, callback) {
if (authInfo.isProxy) {
log.info(`HI ${JSON.stringify(authInfo)}`)
// callback('username', 'password');
}
})

This code is working for me with IP authenticated proxies. App.login is triggered and the request completes as expected. Just user:pass proxies that are the issue.

When opening chrome dev tools I can see the requests being attempted and returning status "failed".

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional Information**
Add any other context about the problem here.

Issue 2:
Hello,

I'm hoping for some general guidance... it seems when using electron notifications (either with the html5 api in from within renderer process or the notification module inside the main process) each notification fires off three times, resulting in three identical notifications and an annoyed user. My best guess is this is due to electron's multi-process architecture (I can see three instances of my app running).

Luckily on macOS (if using the html 5 api) the OS is smart enough to recognize the 3 notifications are identical and collapses them into one, not so lucky if the notifications are coming from the main process using the notification module, and likewise on windows from both main and render processes.

I could get into the details of how I'm setting up notifications, but this doesn't seem directly related to notifications rather more to the electron architecture. Anyone have any thoughts or wisdom on how I can work around this?

Electron version: 1.8.4

Operating system: macOS/Windows (Build only)

Expected behavior

Call notification... e.g.:

Render Process

let notify = new Notification('Notification Title', {
body: 'notification body'
});

or

Main Process

let notify = new Notification({
title: 'Notification Title',
body: 'notification body'
});

... see one desktop notification.

Actual behavior

Three desktop notifications are fired.
Issue 1:
Chris Beams opened SPR-8182 and commented

Based on decisions made in other subtasks of #12830.

This issue is a sub-task of #12830

Issue Links:

#12711 Decide what to do with 'local' attribute in beans: namespace ("is duplicated by")

Referenced from: commits 50dfa03

1 votes, 4 watchers

Issue 2:
Kamil opened SPR-9092 and commented

I implement contributions for my application and I found inconsistent behaviour for Provider/ObjectFactory. There are defined classes for different contributions:

@Contribute("rest")
@Named("bean-contrib2a")
public class Contrib2A implements ContribRest { ... }

@Contribute("rest")
@Named("bean-contrib2b")
public class Contrib2B { ... }

@Contribute("non-rest")
@Named("bean-contrib3a")
public class Contrib3A implements ContribRest { ... }

@Contribute("non-rest")
@Named("bean-contrib3b")
public class Contrib3B { ... }

Code to show injecting scenario looks like that:

@Named("applicationRest")
public class ApplicationRest extends Application {

private List<ContribRest> contrib2;
private List<ContribRest> contrib4;

private ObjectFactory<List<ContribRest>> ofContrib2;
private ObjectFactory<List<ContribRest>> ofContrib4;

private Provider<List<ContribRest>> pvdContrib2;
private Provider<List<ContribRest>> pvdContrib4;

@Inject
public void setContrib2(@Contribute("rest") List<ContribRest> contrib2) {
this.contrib2 = contrib2;
}

@Autowired(required = false)
public void setContrib4(@Contribute("other") List<ContribRest> contrib4) {
this.contrib4 = contrib4;
}

@Inject
public void setOfContrib2(@Contribute("rest") ObjectFactory<List<ContribRest>> ofContrib2) {
this.ofContrib2 = ofContrib2;
}

@Autowired(required = false)
public void setOfContrib4(@Contribute("other") ObjectFactory<List<ContribRest>> ofContrib4) {
this.ofContrib4 = ofContrib4;
}

@Inject
public void setPvdContrib2(@Contribute("rest") Provider<List<ContribRest>> pvdContrib2) {
this.pvdContrib2 = pvdContrib2;
}

@Autowired(required = false)
public void setPvdContrib4(@Contribute("other") Provider<List<ContribRest>> pvdContrib4) {
this.pvdContrib4 = pvdContrib4;
}

Injection finish with that result:

INFO contrib2=[Contrib2A@51a19458] -
INFO contrib4=null
ERROR ofContrib2=No unique bean of type [java.lang.Object] is defined: expected single matching bean but found 2: [bean-contrib2b, bean-contrib2a]
INFO ofContrib4=null
ERROR pvdContrib2=No unique bean of type [java.lang.Object] is defined: expected single matching bean but found 2: [bean-contrib2b, bean-contrib2a] -
INFO pvdContrib4=null

Injecting list looks correct - classes with other contribution and type are filtered and only Contrib2A is injected.

Unfortunately injecting Provider or ObjectFactory tries to inject List a not all beans for this list and it looks as a bug.

Maybe you can provide alternative way to how can I provide this list with all instances contributed (scanned) without manually defining list in XML.

Affects: 3.1 GA

Reference URL: http://forum.springsource.org/showthread.php?122488-Injecting-autowiring-collection-provider-to-implement-contribution

Issue Links:

#13669 javax.Provider Spring support doesn't work for collections ("duplicates")
Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

core

ANSIBLE VERSION

2.4.2.0 - v2.4.3.0-0.5.rc2

CONFIGURATION

OS / ENVIRONMENT

N/A

SUMMARY

wrong error generated if import_tasks found in include_tasks file

STEPS TO REPRODUCE

- include_tasks: "os/{{ ansible_distribution }}/main.yml"
...
inside
...
- import_tasks: "firewall.yml"

EXPECTED RESULTS

import error/lint error/any error

ACTUAL RESULTS

fatal: [node1]: FAILED! => {
"reason": "'ansible_distribution' is undefined"
}

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

include_tasks

ANSIBLE VERSION

ansible 2.4.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.12 (default, Nov 20 2017, 18:23:56) [GCC 5.4.0 20160609]

CONFIGURATION

ANSIBLE_PIPELINING(/mnt/speedyg/johnn/Documents/EclipseWS/cloud-network/ansible.cfg) = True
ANSIBLE_SSH_ARGS(/mnt/speedyg/johnn/Documents/EclipseWS/cloud-network/ansible.cfg) = -o ControlMaster=auto -o ControlPersist=300s -o UserKnownHostsFile=./ssh_known_hosts
DEFAULT_BECOME(/mnt/speedyg/johnn/Documents/EclipseWS/cloud-network/ansible.cfg) = True
DEFAULT_LOG_PATH(/mnt/speedyg/johnn/Documents/EclipseWS/cloud-network/ansible.cfg) = /mnt/speedyg/johnn/Documents/EclipseWS/cloud-network/ansible.log
DEFAULT_REMOTE_USER(/mnt/speedyg/johnn/Documents/EclipseWS/cloud-network/ansible.cfg) = automation
DEFAULT_ROLES_PATH(/mnt/speedyg/johnn/Documents/EclipseWS/cloud-network/ansible.cfg) = [u'/mnt/speedyg/johnn/Documents/EclipseWS/cloud-network/roles']

OS / ENVIRONMENT

Management node: Ubuntu 16.04

Remote node: Debian 9

SUMMARY

Untrue/incorrect error message shown when a dynamically-determined dynamic include contains an embedded reference to an unknown file.

STEPS TO REPRODUCE

test.yml:

- hosts: all
tasks:
- debug: var=ansible_system
- include_tasks: '{{ ansible_system }}.yml'

Linux.yml:

- import_tasks: a_file_that_does_not_exist.yml

Execute command:

ansible-playbook -l "pick_an_inventory_host" test.yml

EXPECTED RESULTS

The debug task should execute as expected, showing the remote system's platform (expected in this case to be "Linux").

For the "include_tasks" task, it should result in an error along the lines of:

FAILED! => {"reason": "Unable to retrieve file contents\nCould not find or access '...'"}

(which is what you get with a straight-up static include of a missing file)

ACTUAL RESULTS

Debug task executes as expected (which also proves that ansible_system is defined).

The "import_tasks" task fails, as expected, but does so with an entirely incorrect error message:

FAILED! => {"reason": "'ansible_system' is undefined"}

Ansible thus hides the actual fault in this case behind a completely false error.
Issue 1:
Moshe Moshe opened SPR-7980 and commented

Hi,

It seems that the AdvisedSupport.MethodCacheKey.equals() compares methods by reference and not using Method.equals().

This means if 2 Methods instances are equals() the AdvisedSupport will add both of them to the methodCache Map.

This can be easily recreated if you get the Method instance using reflection Class.getMethod() because it duplicates the method before returning it, meaning each call to Class.getMethod() returns a new instance of Method.

please see sample code:

static public Object invokeMethod(Object obj, String methodName,
Object[] args) {

if (AopUtils.isJdkDynamicProxy(obj)) {
if (args == null) {
args = new Object[0];
}
int arguments = args.length;
Class parameterTypes[] = new Class[arguments];
for (int i = 0; i < arguments; i++) {
parameterTypes[i] = args[i].getClass();
}

Class _targetClass = AopUtils.getTargetClass(obj);
Class[] _targetInterfaces = _targetClass.getInterfaces();
Method method = null;
for (Class _targetInterface : _targetInterfaces) {
method = org.apache.commons.beanutils.MethodUtils.getMatchingAccessibleMethod(_targetInterface, methodName,
parameterTypes);
if (method != null) {
break;
}
}

try {
return java.lang.reflect.Proxy.getInvocationHandler(obj)
.invoke(obj, method, args);
} catch (Throwable e) {
throw new RuntimeException(e);
}
}
return null;
}

If you call this in a loop you can see the methodCache map size growing and growing up to OutOfMemory.

I believe that the correct code should be:

private static class MethodCacheKey {

private final Method method;

private final int hashCode;

public MethodCacheKey(Method method) {
this.method = method;
this.hashCode = method.hashCode();
}

public boolean equals(Object other) {
if (other == this) {
return true;
}
MethodCacheKey otherKey = (MethodCacheKey) other;
return this.method == otherKey.method || this.method.equals(otherKey.method);
}

public int hashCode() {
return this.hashCode;
}
}

Thank you.

Affects: 3.0.5

Issue 2:
Gary Ip opened SPR-2598 and commented

Features request for dealing with Dealing with Single PersistenceUnit in Multiple persistence.xml files as stated in Spring forum.

http://forum.springframework.org/showthread.php?t=29230

suggestion:

allow the method preparePersistenceUnitInfos () in org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager to handle duplicated by adding ManagedClasses to the original one.

or make this method to be easily overrided by opening the "readPersistenceUnitInfos()", etc.

Affects: 2.0 RC4

2 votes, 4 watchers
Issue 1:
It seems that the string from DOM is encoded in UTF-16, then use with node's fs module, it can not handle properly.

For example:

<div id="demo">abc</div>

fs.writeFile(path,document.querySelector('#demo').innerText,function(){
//xxx
})

Then the file written by node is not complete string abc. By using the Buffer module, it showed the the innerText content is something like this:

console.log(new Buffer(document.querySelector('#demo').innerText));
//Buffer {0: 97, 1: 0, 2: 98, 3:0, 3: 99, 4: 0}

Node-webkit has similar problem. Is this correct or a bug?

Workaround: JSON.parse(JSON.stringify(xxx.innerText)) or if the string is changed by string method like substr etc.

Issue 2:
Hey.

When retrieving a hexadecimal string from the user's clipboard and converting it to a Buffer via new Buffer string, 'hex', it seems that the second half of the string isn't parsed correctly and defaults to a random byte string.

document.addEventListener 'paste', (evt) ->
str1 = evt.clipboardData.getData 'Text'
str2 = 'F1F2F3F4'
buf1 = new Buffer str1, 'hex'
buf2 = new Buffer str2, 'hex'
str1 === str2 # => true
buf1.toString 'hex' # => 'f1f20000'
buf2.toString 'hex' # => 'f1f2f3f4'