WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Trying to launch ec2 instance using ansible 1.8.3 gives me:

Traceback (most recent call last):

File "/var/lib/jenkins/.ansible/tmp/ansible-tmp-1424337493.09-167968274609306/ec2", line 2998, in

main()

File "/var/lib/jenkins/.ansible/tmp/ansible-tmp-1424337493.09-167968274609306/ec2", line 1203, in main

(tagged_instances, instance_dict_array, new_instance_ids, changed) = enforce_count(module, ec2)

File "/var/lib/jenkins/.ansible/tmp/ansible-tmp-1424337493.09-167968274609306/ec2", line 682, in enforce_count

= create_instances(module, ec2, override_count=to_create)

File "/var/lib/jenkins/.ansible/tmp/ansible-tmp-1424337493.09-167968274609306/ec2", line 817, in create_instances

params['tenancy'] = tenancy

NameError: global name 'tenancy' is not defined

Same recipe in the 1.8.2 works ok.

Issue 2:
Issue Type:

Bug Report

Ansible Version:

1.8.3

Environment:

Ubuntu 14.04 kernel: 3.13.0-45-generic

Summary:

Cannot to create new AWS EC2 instance using ec2 module, the following failure is raised:

NameError: global name 'tenancy' is not defined

Steps To Reproduce:

Have playbook like:

- hosts: localhost
connection: local
gather_facts: False
tasks:
# security groups, VPCs, and so on

- ec2:
region: "{{ aws_region }}"
aws_secret_key: "{{ aws_secret_key }}"
aws_access_key: "{{ aws_access_key }}"
key_name: "{{ aws_key_name }}"
instance_type: "{{ item.instance_type }}"
instance_tags:
Name: "{{ item.name }}"
image: "{{ item.image }}"
wait: yes
group: "{{ item.name }}"
exact_count: 1
count_tag:
Name: "{{ item.name }}"
vpc_subnet_id: "{{ vpc_subnet_id }}"
assign_public_ip: yes
with_items:
- name: existing_server1
image: ami-f0b11187
instance_type: t2.micro
- name: existing_server2
image: ami-f0b11187
instance_type: t2.micro
- name: new-server
image: ami-f0b11187
instance_type: t2.micro

2)run this playbook

ansible-playbook stack.yml

Expected Results:

EC2 instance with tag Name: new-server is successfully created

Actual Results:

ok: [localhost] => (item={'instance_type': 't2.micro', 'image': 'ami-f0b11187', 'name': 'existing_server1'})
ok: [localhost] => (item={'instance_type': 't2.micro', 'image': 'ami-f0b11187', 'name': 'existing_server2'})
failed: [localhost] => (item={'instance_type': 't2.micro', 'image': 'ami-f0b11187', 'name': 'new-server'}) => {"failed": true, "item": {"image": "ami-f0b11187", "instance_type": "t2.micro", "name": "new-server"}, "parsed": false}
Traceback (most recent call last):
File "/home/provectus/.ansible/tmp/ansible-tmp-1424268793.19-187172363730612/ec2", line 2998, in <module>
main()
File "/home/provectus/.ansible/tmp/ansible-tmp-1424268793.19-187172363730612/ec2", line 1203, in main
(tagged_instances, instance_dict_array, new_instance_ids, changed) = enforce_count(module, ec2)
File "/home/provectus/.ansible/tmp/ansible-tmp-1424268793.19-187172363730612/ec2", line 682, in enforce_count
= create_instances(module, ec2, override_count=to_create)
File "/home/provectus/.ansible/tmp/ansible-tmp-1424268793.19-187172363730612/ec2", line 817, in create_instances
params['tenancy'] = tenancy
NameError: global name 'tenancy' is not defined
Issue 1:
When rendering:

render: function() {
<span contentEditable={this.state.isEditing}>{this.state.value}</span>
}

Output:

<span contenteditable="true" data-reactid=".1msoq843u9s.1.$49.1.0">Hello World</span>

There is only a text node as a child of this span, no react components and yet I still receive the

"A component is contentEditable and contains children managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."

Is this expected?

Issue 2:
Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Getting this error message: Should have a queue. This is likely a bug in React. Please file an issue.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React.

I tried to implement a simple data cache in a custom hook:

import { useState, useEffect } from 'react'

const get = url => {
return fetch(url)
.then(res => res.text())
.then(data => JSON.parse(data))
}

const cache = new Map()

const useData = dataURL => {
const [data, setData] = useState(null)
if (cache.has(dataURL)) {
return cache.get(dataURL)
}

useEffect(() => {
get(dataURL).then(data => {
cache.set(dataURL, data)
setData(data)
})
}, [dataURL])

return data
}

export default useData

The entire project code is here: https://github.com/justin0022/dashboard/tree/cache

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

Using React 16.8.2, Chrome, and MacOS.
Issue 1:
/*
aa
*/var c = 1;

generate

/*
aa
/*
aa
var c = 1;

Issue 2:
Hi,

TS Version: 1.4

The following code:

var x: any;
/*
var bar;
*/

Emits the following JavaScript

var x;
/*
var bar;
var x: any;
/*
var bar;

Expected

var x;
/*
var bar;
*/
Issue 1:
There are two files,main.go and main1.go

-------------------------content of main.go----------------------------------------

package main

import "code.google.com/p/go.net/websocket"

func main() {

websocketConn := websocket.Conn{}

TestFunc(&websocketConn)

}

----------------------------------end of main.go--------------------------------------------------

----------------------content of main1.go------------------------------------------

package main

import (

"fmt"

"net"

"reflect"

"golang.org/x/net/websocket"

)

func TestFunc(conn net.Conn) {

switch conn.(type) {

case *websocket.Conn:

fmt.Println("OK")

default:

fmt.Println("NOT")

}

}

----------------------------------------end of main1.go----------------------------------------------

We should get OK from console by running this program on windows 10 compiling with go 1.5.2,but I got NOT,when I moved TestFunc to file main.go,then I got OK

Issue 2:
There are two files,main.go and main1.go

-------------------------content of main.go----------------------------------------

package main

import "code.google.com/p/go.net/websocket"

func main() {

conn := websocket.Conn{}

TestFunc(&conn)

}

----------------------------------end of main.go--------------------------------------------------

----------------------content of main1.go------------------------------------------

package main

import (

"fmt"

"net"

"reflect"

"golang.org/x/net/websocket"

)

func TestFunc(conn net.Conn) {

switch conn.(type) {

case *websocket.Conn:

fmt.Println("OK")

default:

fmt.Println("NOT")

}

}

----------------------------------------end of main1.go----------------------------------------------

We should get OK from console by running this program on windows 10 compiling with go 1.5.2,but I got NOT,when I moved TestFunc to file main.go,then I got OK
Issue 1:
Environment

Windows build number: Microsoft Windows [Version 10.0.18362.418]
Windows Terminal version : 0.6.2951.0
White screen when drag the window with large "initialCols" & "initialRows" set(e.g. 110 * 30).

Steps to reproduce

set "initialCols" to 110, and set "initialRows" to 30, then drag a new opened window.

Expected behavior

normally show.

Actual behavior

terminal screen be white when I open a window and drag it, but when I maximize it, it recover to normal.

Issue 2:
Filed re: discussion on https://www.reddit.com/r/bashonubuntuonwindows/comments/8j6xbt/vim_tmux_on_wsl/

sam007961

It sort of works. The tmux theme is buggy and unusable, but everything else works fine.

The thing is I'm not sure if the source of the bug is tmux or the default terminal or even the theme. The major issue was was the tmux status line would keep reprinting and eventually filling up the screen when the theme is enabled. I read somewhere that this is an issue related to Unicode character width. It could also be some kind of Unicode mismatch between tmux and the default terminal.

I was able to fix the buggy status line somehow by configuring both bash and tmux to 256 color mode. Not sure why or how that fixed it, but some colors are still off in tmux. My guess is it might have to do with bold fonts. (i.e cmd interprets bold as a color)

zadjii

The major issue was was the tmux status line would keep reprinting and eventually filling up the screen when the theme is enabled

Oooh, that might actually be a real bug. I think I've noticed that with my own tmux instance - I assumed it was a bug with the interop work I was doing, but that's clearly not the case if it's reproing for you on Fall Creator's Update. I probably regressed something here.

I was able to fix the buggy status line somehow by configuring both bash and tmux to 256 color mode.

... That's certainly interesting. That almost raises more questions, but might be helpful in figuring it out.

My guess is it might have to do with bold fonts. (i.e cmd interprets bold as a color)

Right on - conhost doesn't support bolded fonts, so we only bold the color (which is pretty typical behavior). There is still some outstanding bugginess with 256 color and bolding, so that should get better in April Update.
Issue 1:
Q
A

Bug report?
yes

Feature request?
no

BC Break report?
no

RFC?
no

Symfony version
3.4.*

PHP version
5.6.25

We're currently upgrading a Symfony project to 3.4 on PHP 5.6.25 and my colleague has been having this issue since I've added the following block of code to our AppKernel::registerContainerConfiguration method:

$loader->load(function (ContainerBuilder $container) {
$container->setParameter('container.autowiring.strict_mode', true);
$container->setParameter('container.dumper.inline_class_loader', true);
$container->addObjectResource($this);
});

It only happened on a second request, and often it had to be a different request, not just the same one (aka refresh didn’t cause it).

He found two ways to make it work :

Commenting out the line $container->setParameter('container.dumper.inline_class_loader', true);, or

Commenting out the line $kernel->loadClassCache(); in app_dev.php

I personally can't reproduce the issue on my setup. Any idea what might be happening here ?

Also, it might look like we're not the only ones : https://stackoverflow.com/questions/47617879/symfony-duplicate-class-definition-in-cache

Thanks for your help.

gnutix

Issue 2:
Q
A

Bug report?
no

Feature request?
yes

BC Break report?
no

RFC?
yes

Symfony version
3.3.0

Custom tags support is a very important feature imo that currently lacks to the yaml component.

It is basically allowing things like:

services:
square_printer:
arguments: [ !color red ]

By having a dedicated system for tags, we could centralize their management and avoid duplication (here and here).

If wanted, it could also be used in the core to remove reserved keys in config files.

For example,

services:
_defaults:
autowire: true

my_service:
class: FooBar
arguments:
- '@service1'
- =iterator:
- '@service2'
- '@service3'

# could become
services:
!defaults:
autowire: true

my_service:
class: FooBar
arguments:
- '@service1'
- !iterator
- '@service2'
- '@service3'

WDYT?
Issue 1:
Bug report

I install matplotlib in mac os with version Big Sur 11.3.1 successfully, when i import matplotlib, I find traceback as followings:

Type "help", "copyright", "credits" or "license" for more information.

import matplotlib

Traceback (most recent call last):

File "", line 1, in

File "/opt/homebrew/lib/python3.9/site-packages/matplotlib/init.py", line 107, in

from . import _api, cbook, docstring, rcsetup

File "/opt/homebrew/lib/python3.9/site-packages/matplotlib/cbook/init.py", line 31, in

from matplotlib import _api, _c_internal_utils

ImportError: dlopen(/opt/homebrew/lib/python3.9/site-packages/matplotlib/_c_internal_utils.cpython-39-darwin.so, 2): no suitable image found. Did find:

/opt/homebrew/lib/python3.9/site-packages/matplotlib/_c_internal_utils.cpython-39-darwin.so: mach-o, but wrong architecture

/opt/homebrew/lib/python3.9/site-packages/matplotlib/_c_internal_utils.cpython-39-darwin.so: mach-o, but wrong architecture

notes:

I use pip3 install -U matplotlib

Matplotlib version

Operating system: MacOs Big Sur 11.3.1

Matplotlib version (import matplotlib; print(matplotlib.__version__)): 3.4.2

Matplotlib backend (print(matplotlib.get_backend())):

Python version: 3.9

Jupyter version (if applicable):

Other libraries:

Issue 2:
Bug report

I install matplotlib in mac os with version Big Sur 11.3.1 successfully, when i import matplotlib, I find traceback as followings:

Type "help", "copyright", "credits" or "license" for more information.

import matplotlib

Traceback (most recent call last):

File "", line 1, in

File "/opt/homebrew/lib/python3.9/site-packages/matplotlib/init.py", line 107, in

from . import _api, cbook, docstring, rcsetup

File "/opt/homebrew/lib/python3.9/site-packages/matplotlib/cbook/init.py", line 31, in

from matplotlib import _api, _c_internal_utils

ImportError: dlopen(/opt/homebrew/lib/python3.9/site-packages/matplotlib/_c_internal_utils.cpython-39-darwin.so, 2): no suitable image found. Did find:

/opt/homebrew/lib/python3.9/site-packages/matplotlib/_c_internal_utils.cpython-39-darwin.so: mach-o, but wrong architecture

/opt/homebrew/lib/python3.9/site-packages/matplotlib/_c_internal_utils.cpython-39-darwin.so: mach-o, but wrong architecture

notes:

I use pip3 install -U matplotlib

Matplotlib version

Operating system: MacOs Big Sur 11.3.1

Matplotlib version (import matplotlib; print(matplotlib.__version__)): 3.4.2

Matplotlib backend (print(matplotlib.get_backend())):

Python version: 3.9

Jupyter version (if applicable):

Other libraries:
Issue 1:
Challenge Use a CSS Class to Style an Element has an issue.

User Agent is: Mozilla/5.0 (Linux; Android 5.1; KFFOWI Build/LMY47O) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<style>
.red-text {
color: red;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

Issue 2:
Challenge Use a CSS Class to Style an Element has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<style>
.red-text {
color: red;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
Issue 1:
I've written this task for sass-lint – is it possible to run it automatically when I save a *.scss file?

{
"version": "0.1.0",
"command": "sass-lint",
"isShellCommand": true,
"args": ["-c", "path/to/.sass-lint.yml", "-v", "${file}"],
"showOutput": "silent",
"problemMatcher": {
"owner": "sass",
"fileLocation": "absolute",
"pattern": [
{
"regexp": "^([^\\s].*)$",
"file": 1
},
{
"regexp": "^\\s+(\\d+):(\\d+)\\s+(error|warning|info)\\s+(.*)\\s\\s+(.*)$",
"line": 1,
"column": 2,
"severity": 3,
"message": 4,
"code": 5,
"loop": true
}
]
}
}

Issue 2:
From @jsturtevant on October 26, 2015 23:25

Is there an API or way to detect which lines are visible in the current editor?

In a large file if i use

let count = doc.getLineCount();

I get all the count of all the lines in the document but I my case I need to restrict my search to only the current visible lines. In the example below I would get a count of 35 lines although the file is 90+.

Copied from original issue: Microsoft/vscode-extensionbuilders#63
Issue 1:
Please add the ability to open a console in Admin mode.

Issue 2:
Environment

Windows build number: Microsoft Windows [Version 10.0.18362.207]

Any other software?
FreeBSD VM, remote FreeBSD systems.

Steps to reproduce

Hit control-T

Expected behavior

A ^T character is delivered to stdin on the controlling process which, on UNIX systems, will cause the pty layer to deliver SIGINFO to the foreground application.

Actual behavior

A new tab opens, leaving me with no mechanism to deliver SIGINFO.

This is a regression relative to the old console host. The convention for other terminals on platforms that don't have a command key is to always use control-shift for terminal control commands (e.g. control-shift-c instead of control-c for copy, control-shift-t instead of control-t for new tab) so that they do not conflict with normal command entry.
Issue 1:
Issue Type:

Bug Report

Ansible Version:

ansible 1.9.2

configured module search path = None

Ansible Configuration:

No changes to .cfg, using vanilla installed package version installed with pip

Environment:

Ubuntu 14.04

Summary:

using with_sequence will skip the play when the sequence is only a single item long.

Steps To Reproduce:

tasks:
- name: print thing
debug: var={{ item }}
with_sequence: count=1

Expected Results:

ok: [localhost] => (item=1) => {
"item": "1",
"var": {
"1": "1"
}
}

Actual Results:

skipping: [localhost]

Issue 2:
ansible 1.9.2

osx and ubuntu

- name: count=2
debug: var=item
with_sequence: count=2

- name: count=1
debug: var=item
with_sequence: count=1

results in:

TASK: [count=2] ***************************************************************
ok: [localhost] => (item=1) => {
"item": "1",
"var": {
"item": "1"
}
}
ok: [localhost] => (item=2) => {
"item": "2",
"var": {
"item": "2"
}
}

TASK: [count=1] ***************************************************************
skipping: [localhost]
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

When a provided service implements the ngOnDestroy lifecycle hook (the only LC hook honored by Angular at this point), Angular instantiates the service eagerly with the module/component/directive that creates it. But if the service does not implement this hook, Angular waits and only instantiates it when the service is requested.

This is clearly intended behavior. There is a test for it here:

angular/modules/@angular/core/test/linker/ng_module_integration_spec.ts

Line 919
in
d169c24

let created = false;

At a minimum we need to document this extraordinary result.

p.s. We also need to add documentation about ngOnDestroy in the regular docs; that is already on the docs' todo list.

More importantly, I believe this behavior is mistaken on several grounds.

It is inconsistent. Why create in the presence of a destroy method and but not create w/o a destroy method?

Such a service could unintentionally acquire resources and start working when it isn't actually needed at all. Developers don't know about this behavior and won't know that their constructors are called before they are expected to be called.

Adding the destroy hook changes the behavior of the service. A service that was once constructed lazily will now be created eagerly for no apparent reason.

It complicates the service API. There is no easy way to make the service wait until needed before it starts doing potentially expensive initialization work. Folks will have to come up with private protocols to call init on the service or bury the init logic in the methods of the service's public API.

It's not clear that its scope of application is as intended. The behavior appears to have been introduced in connection with NgModules but, per the test and my experience, it applies also when the service is provided to components and directives.

This "feature" appears to have been in the product since August of 2016 (ecdaded) so I can't say that it is a breaking change.

Expected behavior

Please either remove this behavior for Angular v.4 OR explain what good purpose it serves. In the latter case, the documentation should convey this explanation to users so they will understand what is otherwise a mysterious and inconsistent result.

Angular version: 2.4.X (since RC5)

It's still in master.

Issue 2:
Currently we can eager initialize a service by adding ngOnDestroy hook, but:

Very few people know that services can have ngOnDestroy (afaik it's still not documented on angular.io).

Even less know that if ngOnDestroy is present, service will be initialized eagerly.

We don't always have a disposal logic, so we are forced to add an empty ngOnDestroy method with a comment so it won't be remove by accident.

According to #13820 in 4.x @Injectable will be mandatory, so I think it will be more intuitive to control instantiation via annotation @Injectable({lazy: false})
Issue 1:
My application is hosted in Microsoft Azure. I have tried to implement automatic updated using squirrel or auto-updater. But none of them is working.

Also I have gone through various articles provided in internet but none of them using Azure.

So, can you please help me out how to implement auto update feature in my electron app using Azure.

Issue 2:
I've been trying to use a tray icon on Windows with v0.30.3 and v0.30.2 and I get the following errors:

Unable to create status tray icon.

Error setting status tray icon image.

However, using v0.30.1 it works.

var appIcon = null;
var iconPlain = path.join(__dirname, 'image.png');
app.on('ready',function(){
appIcon = new Tray(iconPlain);
Issue 1:
We have a library of components for angular that we are currently migrating to Angular 2. We have a container that injects content using ng-content. We would like to have a child component that injects the parent if you nest it inside of the parent, like so:

<parent>
<child></child>
</parent>

This works beautifully in angular 2. However, since are in the process of migration, we would like to use the ngUpgrade adapter for this. The dependency injection seems to fail if the parent and child are specified in an angular 1 context. Any insights on this issue? Is this something that is going to be supported in the ngUpgrade adapter?

I have a working plunker that illustrates the problem:

http://plnkr.co/edit/9qb6ZK9SpJyrWoJDEFEj?p=preview

In both cases, the template includes a parent with the child transcluded/projected into it. The child tries to inject the parent and then calls a function on it when you press the button. The ng2 example works, but not the ng1/ngUpgrade one.

Issue 2:
I'm submitting a

[x] bug report

Current behavior

I'm having a problem with when HostBindings are applied to parent elements when a child element is using a ngIf. If the child element has an ngIf then host binding of it's parents are applied after the ngAfterViewInit of the child element is called. If no ngIf they are applied before.

Expected behavior

Parent element HostBindings are applied before the child element ngAfterViewInit regardless of whether the child element has an ngIf or not.

Minimal reproduction of the problem with instructions

See plnkr to duplicate the issue.

http://plnkr.co/edit/jy5oEQNRbQ6VdqqpGJOy?p=preview

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

Please tell us about your environment:

Operating system: Window7

IDE: Intellij 2016.3.4

package manager: npm 3.10.10

HTTP server: angular-cli server

Angular version: 2.4.8

Browser: all

Language: TypeScript 2.0.10

Node (for AoT issues): node --version =