WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Today I'm update a version of the Symfony using

$>bin/vendors update

After the update, I need clear the cache, but I found this error.

$>php app\console cache:clear

Catchable fatal error: Object of class Symfony\Component\ClassLoader\DebugUniversalClassLoader could not be converted to string in E:\Projetos\eMarketing\vendor\symfony\src\Symfony\Component\ClassLoader\DebugUniversalClassLoader.php on line 42

Issue 2:
Q
A

Bug report?
yes

Feature request?
no

BC Break report?
no

RFC?
no

Symfony version
4.0.3

TL;DR; Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinder doesn't find templates inside the templates/ folder.

This is because the TemplateFinder is unaware of the paths setting in the twig config. Changing the default directory structure in Symfony 4 means this setting is used more often now.

Related issue: #21035

Example usage in the wild: Tracker

Steps to reproduce:

composer create-project symfony/skeleton my_project
cd my_project
composer require templating twig frameworkbundle

Add to config/services.yaml

App\Controller\MyController:
arguments:
$template_finder: "@templating.finder"
public: true

Add to src/Controller/MyController.php

<?php
namespace App\Controller;

use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinder;
use Symfony\Component\HttpFoundation\Response;

class MyController
{
private $twig;
private $template_finder;

public function __construct(\Twig_Environment $environment, TemplateFinder $template_finder)
{
$this->twig = $environment;
$this->template_finder = $template_finder;
}

public function listTemplates()
{
return new Response(
$this->twig->render('templates.html.twig', ['templates' => $this->template_finder->findAllTemplates()])
);
}
}

Add to config/routes.yaml

index:
path: /
controller: App\Controller\MyController::listTemplates

Finally, add to templates/templates.html.twig

{% extends "base.html.twig" %}
{% block body %}
{% for template in templates %}
{{ template }}<br />
{% endfor %}
{% endblock %}

Expected: base.html.twig and templates.html.twig part of the output

Result: Only files inside the FrameworkBundle and TwigBundle found.
Issue 1:
I'm submitting a ... (check one with "x")

[x] feature request

Current behavior

We don't have an SPA. And we can't go full SPA right now. So there are multiple root components placed in the DOM

<my-app1></my-app1>
<my-app2></my-app2>

@NgModule({
imports: [ BrowserModule ],
providers: [ MyService ],
})
export class BaseModule {
ngDoBootstrap(applicationRef: ApplicationRef) {
const zone = applicationRef.zone;
platform._injector = applicationRef.injector;

zone.runOutsideAngular(() => {
// run several modules in same zone and with same parent injector
platform._bootstrapModuleWithZone(AppModule1, [], zone);
platform._bootstrapModuleWithZone(AppModule2, [], zone);
});
}
}

const platform = platformBrowserDynamic();

platform.bootstrapModule(BaseModule);

Expected/desired behavior

Have multiple root modules that share one base injector and zone. Don't have to override private properties and call private methods. Maybe a applicationRef.bootstrapChildModule(AppModule1) method.

Reproduction of the problem

Plunkr: http://plnkr.co/edit/80s1jvwrqH3a3YEuxz6D?p=preview

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

Not everyone that might want to switch to angular2 can go full single-page-app.

Angular version: 2.0.0-rc.5

Issue 2:
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

The Header class in the Http bundle uses the normalize function to normalize the header key, before adding the header key value pair to the header. In chrome the normalize function always transforms the header key to lower case. However, in the header we almost always want the first letter of the header key to be upper case.

Expected behavior

Make sure, that the header key is not modified.

Reproduction of the problem

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

This problem is especially a problem, when we want to set authorization headers

Please tell us about your environment:

latest Chrome Browser on the latest Mac OS

Angular version: 2.0.0-rc.X

Angular 2.0.0 stable

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

This problem only occurs in Chrome (Firefox was also tested)

Language: [all | TypeScript X.X | ES6/7 | ES5]

Node (for AoT issues): node --version =
Issue 1:
The following syntax:

Model.query.filter('table_name.column_name % 'query_string'').all()

will generate a correct sql expression, except by the percentage sign, which will be duplicated, rendering: "model.column_name %% 'query_string'".

This duplication is unavoidable so far as I know by the docs, but it should be possible to provide literal SQL to the filter clause, in order to not disturb code which dynamically relies on concatenation of filters.

The above % syntax is compatible with posgres fuzzy search module.

Issue 2:
Migrated issue, originally created by Anonymous

Python 3.3 has added a timestamp() method to datetime.datetime objects.

In this example SettingDefaults.start_time is defined as Column(DateTime, default=datetime.now, nullable=False).

default_settings = session.query(SettingDefaults).\
filter(SettingDefaults.start_time.timestamp() <= start_timestamp)

gives:

Traceback (most recent call last):
File "/sites/metrics_dev/env/lib/python3.3/site-packages/SQLAlchemy-0.8.0-py3.3.egg/sqlalchemy/sql/expression.py", line 2267, in __getattr__
return getattr(self.comparator, key)
AttributeError: 'Comparator' object has no attribute 'timestamp'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/sites/metrics_dev/env/lib/python3.3/site-packages/SQLAlchemy-0.8.0-py3.3.egg/sqlalchemy/orm/attributes.py", line 262, in __getattr__
return getattr(self.comparator, key)
File "/sites/metrics_dev/env/lib/python3.3/site-packages/SQLAlchemy-0.8.0-py3.3.egg/sqlalchemy/orm/properties.py", line 209, in __getattr__
return getattr(self.__clause_element__(), key)
File "/sites/metrics_dev/env/lib/python3.3/site-packages/SQLAlchemy-0.8.0-py3.3.egg/sqlalchemy/sql/expression.py", line 2273, in __getattr__
key)
AttributeError: Neither 'AnnotatedColumn' object nor 'Comparator' object has an attribute 'timestamp'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
[SNIP ***](***)
filter(SettingDefaults.start_time.timestamp() <= start_timestamp)
File "/sites/metrics_dev/env/lib/python3.3/site-packages/SQLAlchemy-0.8.0-py3.3.egg/sqlalchemy/orm/attributes.py", line 270, in __getattr__
key)
AttributeError: Neither 'InstrumentedAttribute' object nor 'Comparator' object associated with SettingDefaults.start_time has an attribute 'timestamp'
Issue 1:
Code Sample, a copy-pastable example if possible

import pandas as pd

class KV(object):

def __init__(self, key, val):
self.key = key
self.val = val

def __str__(self):
return 'KV({!r}:{!r})'.format(self.key, self.val)

def __hash__(self):
return hash(self.key)

def __eq__(self, other):
if isinstance(other, basestring):
return self.key == other
elif isinstance(other, KV):
return self.key == other.key and self.val == other.val
return NotImplemented

def __ne__(self, other):
equals = self == other
if equals is NotImplemented:
return NotImplemented
return not equals

def __lt__(self, other):
if isinstance(other, basestring):
return self.key < other
return NotImplemented

def __le__(self, other):
if isinstance(other, basestring):
return self.key <= other
return NotImplemented

def __gt__(self, other):
if isinstance(other, basestring):
return self.key > other
return NotImplemented

def __ge__(self, other):
if isinstance(other, basestring):
return self.key >= other
return NotImplemented

# labels with transitive equality
idx = pd.Index(['a', 'a'])

assert idx.get_loc('a') == slice(0, 2) # string selects both values
assert (idx == 'a').tolist() == [True, True] # string selects both values

# labels with non-transitive equality
a1 = KV('a', 1)
a2 = KV('a', 2)

assert a1 == 'a' # KV and string match on key
assert a2 == 'a' # KV and string match on key
assert a1 != a2 # KV and KV match on key, but not on value

idx = pd.Index([a1, a2])

assert idx.get_loc('a') == 0 # string selects first KV
assert (idx == 'a').tolist() == [True, True] # string selects both KVs

Problem description

Selection by labels with non-transitive equality has inconsistent behavior with duplicate labels. I would expect duplicate labels to be selected in all cases.

Expected Output

assert idx.get_loc('a') == slice(0, 2) # string selects both KVs

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 2.7.6.final.0

python-bits: 64

OS: Linux

OS-release: 3.13.0-96-generic

machine: x86_64

processor: x86_64

byteorder: little

LC_ALL: None

LANG: en_US.UTF-8

LOCALE: None.None

pandas: 0.20.3

pytest: 3.1.3

pip: 9.0.1

setuptools: 36.2.0

Cython: 0.26

numpy: 1.13.1

scipy: 0.19.1

xarray: None

IPython: 5.4.1

sphinx: 1.6.3

patsy: 0.4.1

dateutil: 2.6.1

pytz: 2017.2

blosc: None

bottleneck: 1.2.1

tables: 3.4.2

numexpr: 2.6.2

feather: None

matplotlib: 2.0.2

openpyxl: None

xlrd: None

xlwt: 0.7.5

xlsxwriter: None

lxml: None

bs4: None

html5lib: 0.999

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: 2.9.6

s3fs: None

pandas_gbq: None

pandas_datareader: None

Issue 2:
A few of the methods in groupby_helper.pxi.in have a pattern that goes:

N, K = (<object> values).shape

with nogil:

if K > 1:
# loop over j in range(K) and do stuff
...
else:
# do stuff with j=0
...

Unless I'm missing something simple I don't think there's a reason to have the conditional and duplicate code branches. In the case where K=1 (which is all the time?) then the for j in range(K) construct inherently sets j=0, bypassing the need for the conditional
Issue 1:
If a single element array is passed to np.float64() in the following way, it is returned not as an array but as a numpy scalar. I have not observed this behavior when converting in this way via other dtypes, though my tests are not exhaustive. Code to reproduce below:

import numpy as np

# Returns float 0.699..., not array([0.699])
np.float64(np.array([0.7], dtype=np.float64))

# Broken for conversion within floats; returns 0.5
np.float64(np.array([0.5], dtype=np.float32))

# Broken for conversion from uint; returns 42.0
np.float64(np.array([42], dtype=np.uint8))

# Works as expected for 2-element arrays
np.float64(np.array([0.7, 0.7], dtype=np.float64))

# np.float32() and np.uint8() properly return arrays
np.float32(np.array([0.7], dtype=np.float64) # array([0.699], dtype=float32)
np.uint8(np.array([42.], dtype=np.float64) # array([4], dtype=uint8)

This was observed on both NumPy 1.6.1 and 1.6.2. I realize a workaround is to use the .astype() method, and that would probably be more correct. However, this functionality is exposed and I do not believe it is expected behavior.

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/764 on 2008-04-29 by @charris, assigned to unknown.

In [1]: float32(array([[1]]))
Out[1]: array([[ 1.]], dtype=float32)

In [2]: float64(array([[1]]))
Out[2]: 1.0

In [3]: int64(array([[1]]))
Out[3]: array([[1]], dtype=int64)

In [4]: int32(array([[1]]))
Out[4]: 1

But also

In [5]: float64([[1]])
Out[5]: array([[ 1.]])

In [6]: int32([[1]])
Out[6]: array([[1]])
Issue 1:
Test case (the order is important):

print(type(numpy.exp(1) + Variable(torch.zeros(2, 5))))
# <class 'numpy.ndarray'> (of really strange shape)

I understand why this is happening but I'd prefer an error to be thrown here if possible when the "expected" behaviour cannot be achieved.

Issue 2:
Pytorch shows the following inconsistent behaviour.

import numpy as np
import torch
from torch.autograd import Variable

1.0 + Variable(torch.ones(1))
# returns as expected
# Variable containing:
# 2
# [torch.FloatTensor of size 1]

np.sum(1.0) + Variable(torch.ones(1))
# returns an unexpected (depth of array is 32)
# array([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[Variable containing:
# 2
# [torch.FloatTensor of size 1]
# ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]], dtype=object)

# Switching their order
Variable(torch.ones(1)) + np.sum(1.0)
# returns the expected
# Variable containing:
# 2
# [torch.FloatTensor of size 1]
Issue 1:
Q
A

Bug report?
no

Feature request?
yes

BC Break report?
yes

RFC?
no

Symfony version
4.0

Hello,

Following #21409, I think it would be very more user-friendly to enable passing parameters as objects to Router::generate().

Indeed, the user is used to get objects from parameters in the controller using explicit or implicit param converters, so it would be nice to be able to pass these very same objects to generate routes.

It should be possible insofar the task of the Router is exactly managing controller arguments for making routes.

Issue 2:
For Symfony2 Router with the help of standart bundle (sensio extra) we can write ParamConverters to convert request param=>object. Is there any standart way to use reversed convertion?

Now we must do something like this:

path('DevBlogBundle_post_show',{'post':post.id})

While a better way would be:

path('DevBlogBundle_post_show',{'post':post})

I've found even example jist:

https://gist.github.com/stevelacey/3226510

Maybe, we should think about adding such functionality to future releases of, for example, sensioFrameworkExtra bundle?

If there is no such functionality, is bundle providing such extension would be needed?

Thanks.
Issue 1:
Hey, I am not sure if this is a duplicate or not, but I could not find this exact issue. I realize we are not running 3.1.7 so I will upgrade all machines to check

Running:

amqp==1.3.3

billiard==3.3.0.10

celery==3.1.6

eventlet==0.14.0

kombu==3.0.7

Getting the following issue:

[2014-01-10 12:13:17,420: WARNING/MainProcess] consumer: Connection to broker lost. Trying to re-establish the connection...
Traceback (most recent call last):
File "/usr/local/virtualenvs/shapeup/local/lib/python2.7/site-packages/celery/worker/consumer.py", line 270, in start
blueprint.start(self)
File "/usr/local/virtualenvs/shapeup/local/lib/python2.7/site-packages/celery/bootsteps.py", line 123, in start
step.start(parent)
File "/usr/local/virtualenvs/shapeup/local/lib/python2.7/site-packages/celery/worker/consumer.py", line 790, in start
c.loop(*c.loop_args())
File "/usr/local/virtualenvs/shapeup/local/lib/python2.7/site-packages/celery/worker/loops.py", line 99, in synloop
connection.drain_events(timeout=2.0)
File "/usr/local/virtualenvs/shapeup/local/lib/python2.7/site-packages/kombu/connection.py", line 279, in drain_events
return self.transport.drain_events(self.connection, **kwargs)
File "/usr/local/virtualenvs/shapeup/local/lib/python2.7/site-packages/kombu/transport/pyamqp.py", line 90, in drain_events
return connection.drain_events(**kwargs)
File "/usr/local/virtualenvs/shapeup/local/lib/python2.7/site-packages/amqp/connection.py", line 282, in drain_events
chanmap, None, timeout=timeout,
File "/usr/local/virtualenvs/shapeup/local/lib/python2.7/site-packages/amqp/connection.py", line 345, in _wait_multiple
channel, method_sig, args, content = read_timeout(timeout)
File "/usr/local/virtualenvs/shapeup/local/lib/python2.7/site-packages/amqp/connection.py", line 316, in read_timeout
return self.method_reader.read_method()
File "/usr/local/virtualenvs/shapeup/local/lib/python2.7/site-packages/amqp/method_framing.py", line 195, in read_method
raise m
UnexpectedFrame: Received 0x2d while expecting 0xce

Issue 2:
I'm encountering an issue using the Consul result backend which I suspect is NOT a Celery issue as such but rather an issue in the lack of thread safety in the library the backend uses.

The symptoms are consistent with confusion between the sorts of responses that Consul gives to the library when creating saved results, and expiring those saved results. So, if Celery both writes and expires saved results using threads and, the lack of thread-safety in the python-consul library could produce the results described.

Can somebody confirm if Celery access to a results backend involves multiple threads?
Issue 1:
Would be great if 6g had POPCNTQ/L/W and TZCNTQ/L/W instructions added.

Real world usage:

bits-and-blooms/bitset#19

Issue 2:
go version
go version devel +bddf2a72f5e1 Wed Nov 27 19:32:15 2013 +1100 windows/amd64

cd $(GOROOT)/src/cmd/yacc
make
rename expr expr.exe

expr.exe
> 1+2*3
2013/11/30 11:14:44 unrecognized character '\r'
7
>

1. expr need append executable extension.
2. need support '\r' character.
Issue 1:
when using typescript, expect assertions are not typechecked. since playwright supports typescript, i would expect the assertions to be typechecked, otherwise the typescript support is completely pointless

System info

Playwright Version: 1.30.0

Operating System: windows 10

Browser: all

Source code

I provided exact source code that allows reproducing the issue locally.

Test file (self-contained)

// tests/test.ts
test('asdf', async ({ page }) => {
// this is wrong:
expect(page.locator('li').count()).toBe(2)

// the argument to expect needs to be awaited, like so:
// expect(await page.locator('li').count()).toBe(2)
});

Steps

run tsc on the test file

run the test

Expected

compile error because it's comparing a Promise to a number

Actual

no compile error, fails at runtime with a misleading error message:

1) tests\test.ts:8:1 › asdf ====================================================

Error: expect(received).toBe(expected) // Object.is equality

Expected: 1
Received: {}

as well as an even more misleading error (#17869 (comment)):

Test timeout of 30000ms exceeded while tearing down "context".

Issue 2:
System info

Playwright Version: [v1.24]

Operating System: [macOS 13.4.]

Browser: [All, Chromium, Firefox, WebKit]

Other info: nodejs v18

Source code

I provided exact source code that allows reproducing the issue locally.

Config file

// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';
console.log("this in config file", this)
export default defineConfig({
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], },
},
});

Test file (self-contained)

test('test this keyword in test', async ({ page }) => {
await page.goto('https://maps.google.com');
console.log("this in test",this)
this.page="google page"
console.log("page:", this.page)
});

Steps

[Run the test]

Expected

this in config should be {}
this in test should be {}
this.page="google page"

Actual

this in config is: undefined
this in test is: undefined
error when executing line "this.page" since page is "undefined"

When I test the same case in playwright v1.23, it works as expected.
Issue 1:
Version

2.5.2

Reproduction link

https://github.com/Pistos/vue-unknown-custom-element-bug

Steps to reproduce

See README, but I duplicate the steps here for your convenience:

npm install

npm run dev

Browse to http://localhost:8080

Click "Example Tab" at top of page

Observe lack of second tabset on page

Observe console error: [Vue warn]: Unknown custom element: <tab-link> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

Open App.vue in an editor

Remove the three lines marked with comments; save file

Refresh example page in browser

Observe presence of expected tabset on page

Put three lines back in App.vue

Refresh browser

Observe disappearance of tabset

What is expected?

No JS console errors or warnings about components that seem to be correctly defined, imported, named and referenced.

Rendering of components (i.e. not missing)

What is actually happening?

JS console error: [Vue warn]: Unknown custom element: <tab-link> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

Component and its children are absent.

See the repro steps and README for a clue or workaround. This might have something to do with the usage of a child component twice on a page, but via different parent components.

Issue 2:
Version

2.2.6

Reproduction link

https://jsbin.com/pusozum/edit?html,js,console,output

Steps to reproduce

Please check minimal reproduction:

2 components which are parent and child, parent pass props to child.

Child component will not update if the props is not referred in its template.

What is expected?

Child component trigger its updated hook.

What is actually happening?

Child component never trigger its updated hook
Issue 1:
On this page, https://doc.rust-lang.org/std/macro.unimplemented!.html, the [src] hyperlink points to https://doc.rust-lang.org/src/std/%3Ccore%20macros%3E.html#1, which does not exist.

The same problem happens on https://doc.rust-lang.org/std/macro.format!.html, which points to https://doc.rust-lang.org/src/std/%3Ccore_collections%20macros%3E.html#1-2. The filename here is <core_collections macros>.html, which matches the name that collections is aliased to in libstd below.

I think the problem happens with macros that are reexported from another crate.

This seems to be a complete list of reexported macros in Rust's standard library:

src/libstd/lib.rs:

#[macro_use]
#[macro_reexport(assert, assert_eq, debug_assert, debug_assert_eq,
unreachable, unimplemented, write, writeln)]
extern crate core;

#[macro_use]
#[macro_reexport(vec, format)]
extern crate collections as core_collections;

Issue 2:
see http://doc.rust-lang.org/std/macro.assert!.html
Issue 1:
On Windows, when I am behind a proxy server I am able to get the list of possible extensions to install but every time I try to install one of them it gives an error that it can't find the proxy server.

Note in the error message that I replaced the real address with the text proxyAddress. I did notice that some of the message has the port number appended twice.

I tried using both the system environment variable for http_proxy and https_proxy as well as setting it just in the VS Code settings.json file. Same error on both.

getaddrinfo ENOTFOUND proxyAddress:911 proxyAddress:911:911: Error: getaddrinfo ENOTFOUND proxyAddress:911 proxyAddress:911:911, at errnoException (dns.js:25:10), at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)

About screen version info:

Issue 2:
Whenever I try to install any extension, using ext install, I get a connect ETIMEDOUT 191.238.172.191:443 error.

Trying to navigate to https://191.238.172.191 in the browser produces a warning regarding the certificate being valid only for *.market.visualstudio.com, but I'm allowed to proceed.

Shouldn't VSCode try to connect to the name instead of the IP?

I'm behind a proxy, VSCode updates just fine behind it, and also lists the available extensions. The firewall here logs the invalid certificate but allows the connection to proceed. Doesn't look like a problem in my end...

OS: Windows 7

VSCode: 0.10.1
Issue 1:
When ever I get to a new challenge my cursor refuses to go to the end of a closing tag. I do that so I can start a new line for my code. Instead it will start in the middle of my code and then jump down two lines in the middle of other code. Seriously needs fixing.

Issue 2:
Challenge http://www.freecodecamp.com/challenges/waypoint-remove-classes-from-an-element-with-jquery has an issue. right now, whenever the camper write the removeClass() function -even before specifying the class he/she wants to be removed-. the application automatically marks the challenge as completed.

The reason: when the parameter isn't specified to removeClass() function it removes ALL classes of the selected element, which means that the "btn-default" class (as required by the challenge) is going to be removed but the problem is that it will remove all other classes at the same time.

I think the test should make sure that other classes still added to the element while "btn-default" is removed.