WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
This may be a duplicate of #7234 and/or #3812, but I don't know enough about the internals of TypeScript to know for sure. Let's say I have the following:

interface MyInfo<T> {
data: T;
}

class Foo {
x: number;
}

let fooInfos: MyInfo<Foo>[];
let objectInfos: MyInfo<Object>[];

for (let info of objectInfos) {
if (info.data instanceof Foo) {
fooInfos.push(info); // should infer that info is MyInfo<Foo>, but it doesn't
}
}

In this case, the compiler still thinks info is of type MyInfo<Object> instead of MyInfo<Foo>, whereas I would expect it to be able to properly infer the type.

Issue 2:
I just found out that property access expressions doesn't work on type predicate functions and instanceof type guards.

class A {
propA: number;
}

class B {
propB: number;
}
class C {
propC: A;
}

declare function isA(p1: any): p1 is D;

interface D {
a: A | B
b: A | C;
}

let d: D;
if (isA(d.b)) {
d.b.propA; //error
}

function foo(d: D) {
if (d.b instanceof A) {
d.b.propA // error
}
}

I'm not sure if there is an easy fix on this problem. We are provided just a symbol when narrowing. That symbol represent the left most expression and then we walk up the if statement. There is no easy way of controlling symbol by symbol on each namespace in a property access expression in the if-statement-body. Because there is no info about the property access expression provided in getTypeOfSymbolAtLocation(symbol: Symbol, node: Node).

I also found that type assertion expressions are also not working in type predicate functions. But I will land a fix on that.

if (isA(<A>union)) {
a = union;
}
if (isA(union as A)) {
a = union;
}
Issue 1:
Version

2.6.11

Reproduction link

https://codepen.io/thomaslwq/pen/abdoZXM

Steps to reproduce

1. use the component keep-alive
2. set the max(1) component for cache
3. the max parameter dosen't work

What is expected?

when the max parameter is 1,it works

What is actually happening?

it doesn't work

Issue 2:
Version

2.6.10

Reproduction link

https://jsfiddle.net/p0te9vL3/

Steps to reproduce

Open dev tools to see console

Cycle through the routes

View console and observe lifecycle hook logging

What is expected?

I'd expect once the max cache is reached (in the example case of 1), the component that gets pruned also gets destroyed. In the documentation it states (emphasis mine):

max

The maximum number of component instances to cache. Once this number is reached, the cached component instance that was least recently accessed will be destroyed before creating a new instance.

What is actually happening?

The pruned component is never destroyed, it's just removed from the cache. In the example, the beforeDestroy hook is never called.

Related code:

vue/src/core/components/keep-alive.js

Lines 37 to 49
in
636c9b4

function pruneCacheEntry (

cache: VNodeCache,

key: string,

keys: Array<string>,

current?: VNode

) {

const cached = cache[key]

if (cached && (!current || cached.tag !== current.tag)) {

cached.componentInstance.$destroy()

}

cache[key] = null

remove(keys, key)

}
Issue 1:
In my code

<div id="app">
<test-component type="normal"></test-component>
<test-component type="block"></test-component>
</div>

<template id="template-test-component">
<li v-if="type == 'normal'" class="test">
test
</li>
<div v-if="type == 'block'" class="test">
<p>Hello, World!</p>
</div>
</template>

<script>
var testComponent = Vue.extend({
template: '#template-test-component',
props: ['type']
});

var app = new Vue({
el: '#app',
components: {
'test-component': testComponent
}
})
</script>

This work in plunk, but on real project this code not work. v-if work only in div wrapper, example:

<template id="template-test-component">
<div class=wrapper>
<li v-if="type == 'normal'" class="test">
test
</li>
<div v-if="type == 'block'" class="test">
<p>Hello, World!</p>
</div>
</div>
</template>

But .wrapper screws up my layout.

Issue 2:
Vue.js version

2.0.3

Reproduction Link

<div v-if="type===1"></div>
<div v-if="type===2"></div>
<div v-if="type===3"></div>
<div v-if="type===4"></div>
<div v-if="type===5"></div>

Steps to reproduce

What is Expected?

No warning, because it will generate at most one element.

What is actually happening?

Warning: Component template should contain exactly one root element
Issue 1:
trait Mirror { type It; }
impl<T> Mirror for T { type It = Self; }
#[repr(C)] pub struct S;
extern {
pub fn f(s:*mut <S as Mirror>::It);
}
fn main() {}

error: internal compiler error: type_of with ty_projection

It's apparently crashing in trans. Tested on nightly.

Issue 2:
error: internal compiler error: type_of with ty_projection
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:190

stack backtrace:
1: 0x7fab454c2034 - sys::backtrace::write::he62bcb548164e961YyC
2: 0x7fab454e7df8 - panicking::on_panic::h3cb4936e695d67bdOGI
3: 0x7fab4541efaa - rt::unwind::begin_unwind_inner::hfe13dbe91daef70cmnI
4: 0x7fab428bd41d - rt::unwind::begin_unwind::h10911018176195016387
5: 0x7fab428bdc65 - diagnostic::Handler::bug::h3c5d38abd490322elgB
6: 0x7fab432d507b - session::Session::bug::h23eaba6d447e27ca3yn
7: 0x7fab44b5f17f - trans::type_of::in_memory_type_of::hd518d125e463ffd5lEo
8: 0x7fab44b5ef41 - trans::type_of::in_memory_type_of::hd518d125e463ffd5lEo
9: 0x7fab44c61137 - trans::foreign::foreign_signature::h4618e8fc5486898feOB
10: 0x7fab44c60603 - trans::foreign::foreign_types_for_fn_ty::hbb4f8804cec19fffKPB
11: 0x7fab44c15e2f - trans::foreign::register_rust_fn_with_foreign_abi::hff88e81da38aeb0f6gB
12: 0x7fab44b1e905 - trans::base::get_item_val::hfbaf01eba019b69eVnu
13: 0x7fab44b1bb50 - trans::base::trans_item::h1506a2e4228c48caCSt
14: 0x7fab44c1859c - trans::base::trans_crate::h6ca4511310a24dc9fPu
15: 0x7fab45af55c3 - driver::phase_4_translate_to_llvm::h44ad816874743241kOa
16: 0x7fab45ad11b3 - driver::compile_input::h3bad48bfc23f6006Rba
17: 0x7fab45b88b02 - run_compiler::haa99afb1c99d7db1x2b
18: 0x7fab45b8694c - thunk::F.Invoke<A, R>::invoke::h10898031602178947258
19: 0x7fab45b859d0 - rt::unwind::try::try_fn::h4687345873392121579
20: 0x7fab45558fc8 - rust_try_inner
21: 0x7fab45558fb5 - rust_try
22: 0x7fab45b85e76 - thunk::F.Invoke<A, R>::invoke::h18058446263424162958
23: 0x7fab454d69f5 - sys::thread::thread_start::h8ed6b7636995fe24B1G
24: 0x7fab3f39e373 - start_thread
25: 0x7fab450a027c - __clone
26: 0x0 - <unknown>
Issue 1:
In pandas 0.13.1 this code produces a plot that, when "moused over", indicates incorrect dates on the 't' (x) axis, despite having the correct axis label.

pd.Series([1, 2, 3], index=pd.date_range('2014-01-01', periods=3, freq='D')).plot()

(matplotlib version is 1.3.1)

Issue 2:
After using the asfreq method to change the frequency of a time-series DataFrame from None to something e.g. 15Min the cursor position in matplotlib graphs of that DataFrame is no longer correct (usually shows a datetime just after the unix epoch). The following demonstrates this (NB dt in df1 is not a constant):

df1 = pandas.read_csv('tseries1.csv', names=['tstamp', 'Q'], parse_dates=True,
index_col='tstamp').clip_lower(0).fillna(0)
df1['T'] = pandas.read_csv('tseries2.csv', names=['tstamp', 'T'], parse_dates=True,
index_col='tstamp', squeeze=True).clip_lower(0).fillna(0)

df2 = df1.asfreq(freq='15Min', method='ffill')
# NB df1.index.freq is None
# NB df2.index.freq is <15 * Minutes>
df1.plot()
df2.plot()
plt.show()

I find the Matplotlib cursor position to be invaluable when looking for features in very long time-series.

Versions:

pandas master (commit ID 764b444)

numpy 1.8

matplotlib 1.3.0
Issue 1:
This code

import numpy
a = numpy.zeros(1, dtype = numpy.uint64)[0]
print(type(a))
i = 1
print(type(i))
a += i
print(type(a))

prints

<class 'numpy.uint64'>
<class 'int'>
<class 'numpy.float64'>

which was a big surprise for me. Why would adding an integer to uint64 result in a floating point value?

Issue 2:
We have these financial functions that are exported in the main numpy namespace, and are really out of place:

http://docs.scipy.org/doc/numpy/reference/routines.financial.html

Also:

They have terrible names (even if they weren't in the main namespace, but especially so given that they are)

There are multiple documented, but unimplemented, functions here. WTF.

Let's move them to numpy.financial (currently they're also in numpy.lib.financial, but the .lib. part is just noise IMO) with better names and deprecate the current names.
Issue 1:
🐛 Bug

To Reproduce

Steps to reproduce the behavior:

Expected behavior

Environment

Please copy and paste the output from our

environment collection script

(or fill out the checklist below manually).

You can get the script and run it with:

wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py

PyTorch Version (e.g., 1.0):

OS (e.g., Linux):

How you installed PyTorch (conda, pip, source):

Build command you used (if compiling from source):

Python version:

CUDA/cuDNN version:

GPU models and configuration:

Any other relevant information:

Additional context

Issue 2:
Using the example in https://pytorch.org/cppdocs/installing.html page, developed in IDE, the error message is "std": ambiguous symbol.

There's a lot of information about this type of error.

You guys meet again? how do you solve this?

environment:windows10 ,visual studio 2017,cuda10,c++.
Issue 1:
Hi developers,

I really appreciate the effort spent to develop the most awaited application in Windows. I really want to see it come out of beta as a final product as soon as possible.

My suggestions for Windows Terminal:

Atleast provide all the basic text editing capabilities like the word-by-word cursor navigation using Ctrl+<navigation-key-left>|<navigation-key-right> (Already present in cmd.exe).

Provide the tab re-positioning capability, by dragging tab using the mouse.

Text font looks little bold (a difference noticed in comparison to cmd font even after keeping the same font properties).

Full-screen capability (should have already been there).

Tab switcher pop-up like in other editor applications (e.g. in Visual Studio Code editor when pressed Ctrl+TAB).

Auto-complete feature like in the macOS iTerm.

Add "Open Windows terminal here" to Windows File Explorer right-click context menu.

Support for transparency also like in cmd.exe or wsl.exe.

Thank you. Hope I get to see atleast some of the requested features/suggestions if not all.

Keep doing the awesome work!

Issue 2:
Your Windows build number: Microsoft Windows [Versione 10.0.17677.1000]

What you're doing and what's happening: make menuconfig command

What's wrong / what should be happening instead: as you can see from the screen, the vertical line char is broken and not displayed. Trying to paste it to a nano editor doesn't show anything, trying with other works... For example this is displayed ├ but this not ─
Issue 1:
As of today, videos are stored with uuids which leads to end user SDET's having to create solutions of their own for things that should be considered granted in a Framework that attempts to be a one-solution-for-all.

This issue might be duplicated but I have not seen the staff of PW putting any attention to this issue.

Please provide a way to name the screenshots and videos. I suggest a configuration for each test scenario that can be passed to the playwright Page object.

Issue 2:
Hi team. I love the new video API in 1.5.0. Very clean. I don't see any information about how to name video files in the examples though. Seems like each file is just assigned a random name with no way to change that. When the API was in beta, we could get a handle to the file in order to rename it. Am I missing something in the docs?

https://playwright.dev/docs/videos

Thanks!
Issue 1:
Eberhard Wolff opened SPR-7170 and commented

In JavaConfig beans created by protected methods with @Bean annotation had visibility inside the @Configuration class only but were not exported into the global ApplicationContext and therefore cannot be referenced from there or other @Configuration annotated classes:

@Configuration
public class MyConfiguration {
@Bean
public ABean globallyVisible() { ... }

@Bean
protected ABean visibleOnlyInThisClass() { ... }
}

This is great to structure large configuration because beans can be hidden. Bring that feature back please.

Affects: 3.0 GA, 3.0.1, 3.0.2

Issue Links:

#12839 Revised support for bean definition visibility and overriding ("is depended on by")

#7548 Allow to restrict the visibility of beans to a file ("is duplicated by")

#10325 Consider using javassist for proxy generation

#12637 Support profile exclusivity and/or bean definition finality

#8713 Exporting / Importing beans across ApplicationContexts

27 votes, 22 watchers

Issue 2:
Martin Ahrer opened SPR-5235 and commented

org.springframework.orm.jpa.vendor.HibernateJpaDialect.getSession should not try to cast directly to HibernateEntityManager since there is a chance that the entity manager passed in is just a proxy for the EntityManager interface!

protected Session getSession(EntityManager em) {
return ((HibernateEntityManager) em).getSession();
}

This cast can be avoided (see below)

protected Session getSession(EntityManager em) {
return (Session) em.getDelegate();
}

I'm facing this problem while I'm trying to integrate Seam with Spring. Seam is in charge of managing the life time of the entity manager and passing it on to Spring using org.jboss.seam.ioc.spring.SeamManagedEntityManagerFactoryBean.

Currently a work around is to subclass HibernateJpaDialect and implement getSession as shown!

Affects: 2.5.5

Issue Links:

#9910 HibernateJpaDialect.getSession casting to HibernateEntityManager ("is duplicated by")
Issue 1:
by jonnosan:

What steps will reproduce the problem?
1. grab current version of go with "hg clone -r release
https://go.googlecode.com/hg/ go"
2. cd go
3. ./all.bash

What is the expected output?
###########
1 known bugs; 0 unexpected bugs

---
Installed Go for darwin/amd64 in /Users/jonnosan/src/go.
Installed commands in /Users/jonnosan/src/go/bin.
The compiler is 6g.
###########

What do you see instead?
###########
gopack grc _test/net.a _gotest_.6
--- FAIL: net.TestGoogleSRV
failed: lookup _xmpp-server._tcp.google.com. on 10.5.1.1:53: no answer from server
no results
FAIL
###########

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
OS X 10.6.5

Which revision are you using? (hg identify)
a7800e20064a+ tip

Please provide any additional information below.

It looks like there are two tests that depend on a the host
_xmpp-server._tcp.google.com. resolving, and this hostname is not currently resolving,
which means the test fails, and thus installation of go is aborted. commenting out the
tests using this hostname in pkg/net/srv_test.go and pkg/net/dns_nametest.go allowed
installation to complete.

Issue 2:
by robryk:

When the current client follows a redirect, all subsequent requests are sent without any
of the headers sent on the initial request. The following program demonstrates this
behaviour:

http://play.golang.org/p/AExnEZNwv8

The header which gets printed on stdout is empty; I'd expect it to be equal to
"bytes=0-1", the value set in the original request.

This is counterintuitive and makes the Request.Header useless if a redirect can occur.
It seems that one must either make a custom transport wrapper that adds headers and
create a client on top of that, or use an undocumented feature of CheckRedirect, namely
that the request passed is going to be actually sent, so it can modify it before that.

I'm not sure what resolution I'd expect. My main problem is that this behaviour confused
me, and I can't see an elegant way of setting eg. a Range header on subsequent requests
-- creating a new transport wrapper for every request seems weird, even if it's mostly
cost-free.
Issue 1:
it appears we are not running the sudo variable through the template engine per a mailing list post, and we should, so that behavior can be passed in via -e like everything else.

Issue 2:
In the vein of #2032 sudo_user: can't be set as a variable loaded from vars_files.

For example in playbook.yml

---
- hosts: bitarena
vars_files:
- ../vars/general.yml
user: $sys_user
sudo_user: $sudo_user_db

Connection log

ESTABLISH CONNECTION FOR USER: ansiblemgr on PORT 22 TO bitarena

EXEC /bin/sh -c 'mkdir -p /tmp/ansible-1364316856.83-103086297282724 && chmod a+rx /tmp/ansible-1364316856.83-103086297282724 && echo /tmp/ansible-1364316856.83-103086297282724'

REMOTE_MODULE setup

PUT /tmp/tmpA3E09G TO /tmp/ansible-1364316856.83-103086297282724/setup

EXEC /bin/sh -c 'chmod a+r /tmp/ansible-1364316856.83-103086297282724/setup'

EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=oiokygakeauprdjzkhpyvbfztvactecp] password: " -u $sudo_user_db /bin/sh -c '"'"' /usr/bin/python /tmp/ansible-1364316856.83-103086297282724/setup; rm -rf /tmp/ansible-1364316856.83-103086297282724/ >/dev/null 2>&1'"'"''

fatal: [bitarena] => ssh connection closed waiting for password prompt
Issue 1:
Hi,

I use Symfony 2.1. I declared this code on my entity but the validator UniqueEntity doesn't work with InheritanceType

use Symfony\Bridge\Doctrine\Validator\Constraints as DASSERT; @ORM\InheritanceType("SINGLE_TABLE") @DASSERT\UniqueEntity(fields="name") ...

Sql Error

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Test' for key 'UNIQ_39276025E237E06'

Issue 2:
Currently, the UniqueEntity constraint can fail when used on an inherited Entity, depending on where the validated field was declared in the Inheritance chain. Let me give you an example, suppose we have defined the following classes, where both Student and Teacher extend Person and we have used Doctrine's Class Table Inheritance:

<?php

Class Person
{
/**
* @UniqueEntity("name")
*/
private $name;
}

Class Student extends Person { }

Class Teacher extends Person { }

Now let's insert a new Teacher named "Fabien", the validator kicks in, see that no Teacher with that name exists and "Fabien" is happily inserted on the database (inside the person table).

Trying to insert another Teacher with the same name works as expected, stating that our unique constraint was violated.

Now, if we try to insert a new Student whose name is "Fabien" as well the validator fails to do its work, letting this violation pass unseen and then when Doctrine tries to persist the new Student (assuming your name is a unique field, which probably should) the database will yell back at you saying that another record with the same name already exists in the person table.

This happens because the validator uses the repository of the entity in which the validation was triggered, not the repository in which the field was defined. So a SQL similar to this is generated:

SELECT * FROM student INNER JOIN person ON student.id = person.id WHERE person.name = 'Fabien'

And because of the fact that no Student with the name "Fabien" exists (we have added a Teacher with the name "Fabien") the validation will not work properly.

I'm currently working on a fix for this issue so a PR will follow shortly.
Issue 1:
What problem does this feature solve?

Step by Step guide on how to deploy Vue.js properly

What does the proposed API look like?

No API, just document change

Issue 2:
As per the title, a section of the cookbook could be used to explain how to take an app from development to production and use a CDN to distribute the app

A good structure could be:

How to configure a CDN

describe what needs to be configured/created for the given CDN

How to manually deploy to a CDN

In my experience, it's much easier to manually deploy first and then configure some CI/CD pipeline

CI/CD

configure a CI/CD pipeline for continuos deployment

Production tips

In this section all the tips and tricks that fall into the category "I wish I knew that before deploy the app" e.g. SSL certificate. source map etc

Given there are a lot of CDN and CI/CD providers, this can get complicated but skills are transferable, so if the example covers netifly + travis CI should be enough, and can always be improved in the future

I'll be more than happy to contribute myself to this section of the cookbook 😄
Issue 1:
Deno community is against introducing anything similar to package.json but I am not sure if their approach is better. It's difficult to manage/import packages with absolute URL, there should be something like package.json which gives you details and ability to control versions of external modules which your application is using in single file. Need some sort of cli as well like npm i package@latest.

Not sure how to restrict or bring latest version of package .

Dockerizing Deno application seems confusing at this point.

Issue 2:
Import from url is very hard to use. I think is not a good idea.

If so,

We must manage more js files not our own development.

Heavily dependent on the network, because the third package also can import another packages.

Like C#\Java, the nuget and maven is good for use. Maybe use that mode can help us manage the packages.
Issue 1:
Description of the problem

When using a texture as a map for any kind material, if the texture is not a power of two it looks rotared 180 degrees

To reproduce the problem use the Editor, add a plane or a cube and assigna map to the attached material. If the texture is not a power of two you will see the texture image upside-down.

Strangely, It is working on Firefox.

Three.js version

Dev

r102

...

Browser

[] All of them

Chrome

Firefox

Edge

OS

All of them

Windows

macOS

Linux

Android

iOS

Hardware Requirements (graphics card, VR Device, ...)

Issue 2:
Description of the problem

Sprites are flipped. This happened after somewhere between 101 (which works) and 102. In the sandbox below you can exchange the three version, going back to the last major has them positioned correctly.

https://codesandbox.io/s/1z92z6xwz4

Three.js version

r102

Browser

Chrome

OS

macOS
Issue 1:
Internet explorer 9 ignores width and height of images, ok in Chrome, FF. Bootstrap Bootstrap v2.3.1

Test:

Bootstrap css:

img{max-width:100%;width:auto\9;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;}

Fix: comment height: auto

img{max-width:100%;width:auto\9;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;}

Issue 2:
the image height bug previously fixed in 2.0.3 (issue #1899 and #2779) is back in 2.1.0