WhereIsAI/github-issue-similarity huggingface dataset:
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 specifying a provider where provide is an abstract class and useClass is a concrete one, ngOnDestroy will never be called in the concrete class.

Expected behavior

ngOnDestroy should be called.

Minimal reproduction of the problem with instructions

https://plnkr.co/edit/eIs7pjvldhcFrMmaJ4IV?p=preview

Open the console.

Click the "Create Component" button one or many times

After a 2 second delay the component will be destroyed, but no console output will be seen.

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

Providing abstract classes with concrete implementations that utilize ngOnDestroy to do cleanup.

Please tell us about your environment:

Angular version: 2.4.8

Browser: Chrome 56.0.2924.87

Language: TypeScript 2.0

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

Issue 2:
I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x] 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 you provide a service using useFactory, ngOnDestroy will never be called.

Expected behavior

Regardless of how you provide the service, ngOnDestroy should get called if it is a method on the service.

Minimal reproduction of the problem with instructions

https://plnkr.co/edit/aUaz6ewyM3m5JorsAoCO?p=preview

Open the console.

Click the "Create Component" button one or many times

After a 2 second delay the component will be destroyed, but no console output will be seen.

If you replace useFactory with useClass the problem goes away and you'll see output.

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

There are many cases, main motivator is that this isn't intuitive.

Please tell us about your environment:

Angular version: 2.4.8

Browser: Chrome 56.0.2924.87

Language: TypeScript 2.0

Node (for AoT issues): node --version =
Issue 1:
Electron version: v0.37.4

Operating system: Windows 10 x64

When writing a file using the fs module, the renderer process crashes. This doesn't happen in Electron v0.37.3. To reproduce this, add the following lines in index.html of the default app:

<script>
var contents = []
var max = 10

for (var i = 0; i < max; i++) {
contents.push('Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet.')
}

require('fs').writeFileSync('./blah', contents.join('\n'))
</script>

Oddly enough, when setting max = 5 the renderer process doesn't crash.

Issue 2:
Electron version:3.7.4

Operating system:Windows 7 (x64)

Hello, I just update electron from 3.6.9 to 3.7.4, and found that my app lose control when I try to parse a long string to buffer.

And I tested in the DevTools console, found that:

new Buffer(new Array(1000).join(' ')); // normal
new Buffer(new Array(10000).join(' ')); // disconnected...
Issue 1:
see: http://plnkr.co/edit/FnmjWBd6flYiyUTkXuTs?p=preview

EXCEPTION: Only one template directive per element is allowed: ng-if true and ng-for cannot be used simultaneously in null
...
EXCEPTION: TypeError: Cannot read property 'elementBinders' of undefined

why do we print ng-if true rather than just ng-if

why is there null at the end of error message?

what's up the second elementBinders exception?

Issue 2:
Say I create a component:

@Component({
selector: 'md-tile',
host: {
'[style.top]': 'style.top',
'[style.left]': 'styl.left', // <<< typo here
},
})
@View(...)
class MdTile {}

Run this component and you get

TypeError: Cannot read property 'left' of undefined in [styl.left in hostProperties of null]

The error here is decent, but the hostProperties of null part seems like it should actually be providing the name of the Component.
Issue 1:
I got this problem when trying to run a chief worker of distribute tensorflow. The tensorflow was installed by pip,not from source. Then I uninstalled protobuf by pip and then download the source and changed 256 << 20 in coded_stream.h .

And I installed protobuf as Readme said.But the same problem occurred, It seems that tensorflow did not use the new compiled libprotobuf. How could I fixed this issue? If I have to reinstall tensorflow? Or someone can give me a updated protobuf that can fix the 64m limit? Thanks If someone could help me, I am going to mad about this issue(T_T)

Issue 2:
After doing "pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/protobuf-3.0.0b2.post2-cp27-none-linux_x86_64.whl" as said in "https://www.tensorflow.org/versions/r0.10/get_started/os_setup.html#protobuf-library-related-issues"

, my tensorflow did not work and got a segment fault after import tensorflow.

Could some one give me a right pip install version of >64MB limited protobuf?Thanks!
Issue 1:
Software

Version 0.10.6 (0.10.6) a80232bbcfe8a5cdad1ebc98638673d9dcb02458

Code(In a definition file)

class Console2 {
constructor(opt: IConsole2Opt);

time(): this;
date(): this;
tag(...args: Array<string|ITag>): this;
file(): this;
f(): this;
addLogger(name: string, colors?: string[]|string, opt?: ILoggerOpt): this;
// TODO buildArgs(log)
// TODO buildContext(log, opt)
// TODO [your logger](*args)
}

This copy of code can compile with the newest TypeScript compiler (message TS6029: Version 1.7.5) but in Visual Studio Code it raises an error Duplicate identifier 'this'.

According to Announcing TypeScript 1.7, such code should compile with the TypeScript compiler without raising errors. But Visual Studio Code raised errors.

Issue 2:
Clone https://github.com/Pure-D/code-d and checkout commit 09ce158566e94bd28cfba9a9fd1365717fa863fd.

Open that workspace in Code.

Open launch.json and change the outDir values to use ${workspaceRoot}

Hit F5

You get this error:

Open the task log and you'll see this:

Meaning that the npm task failed to execute.

When I run that task in the terminal, I can confirm that it returns a non-zero value. So why isn't Debug picking that up and informing me that the problem occurred in the task itself?
Issue 1:
Documentation

Note that I am using the Python Idle here. Since I do not use any IDE, I suspect that this problem is caused by Numpy, and not by an editor.

I successfully uninstalled Numpy version 1.19.4, and installed Numpy version 1.19.3. Rolling back to Numpy 1.19.3 is a temporary fix.

The problematic Numpy code seems to be:

How to contribute to the NumPy documentation.docx

def _win_os_check():

"""
Quick Sanity check for Windows OS: look for fmod bug issue 16744.
"""
try:
a = arange(13 * 13, dtype= float64).reshape(13, 13)
a = a % 17 # calls fmod
linalg.eig(a)
except Exception:
msg = ("The current Numpy installation ({!r}) fails to "
"pass a sanity check due to a bug in the windows runtime. "
"See this issue for more information: "
"https://developercommunity.visualstudio.com/content/problem/1207405/fmod-after-an-update-to-windows-2004-is-causing-a.html")
raise RuntimeError(msg.format(__file__)) from None

if sys.platform == "win32" and sys.maxsize > 2**32:
_win_os_check()

del _win_os_check

Issue 2:
The newest version of numpy raises an exception when being imported. I am using Python 3.9 64-bit on Windows 10.

Reproducing code example:

import numpy as np # raises a RuntimeError

Error message:

$ python -c "import numpy"
** On entry to DGEBAL parameter number 3 had an illegal value
** On entry to DGEHRD parameter number 2 had an illegal value
** On entry to DORGHR DORGQR parameter number 2 had an illegal value
** On entry to DHSEQR parameter number 4 had an illegal value
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Song\AppData\Roaming\Python\Python39\site-packages\numpy\__init__.py", line 305, in <module>
_win_os_check()
File "C:\Users\Song\AppData\Roaming\Python\Python39\site-packages\numpy\__init__.py", line 302, in _win_os_check
raise RuntimeError(msg.format(__file__)) from None
RuntimeError: The current Numpy installation ('C:\\Users\\Song\\AppData\\Roaming\\Python\\Python39\\site-packages\\numpy\\__init__.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: https://tinyurl.com/y3dm3h86

NumPy/Python version information:

NumPy 1.19.4

Python 3.9.0 (3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)])
Issue 1:
syntax highlight not working at all,

"var", "import", "from" and so on

Issue 2:
0.10.10 (Feburary build) has a regression is that the following JavaScript keywords are no longer highlighted in the Dark Visual Studio & Light Visual Studio themes:

var let const function get set class interface module namespace

This only affects JavaScript (not TypeScript).

The workaround if to switch to the Dark+ Default and Light+ theme.

Note that there are other colorizing issues open, not caused by this regression: e.g. 'import' and 'from'. See microsoft/TypeScript-TmLanguage#37
Issue 1:
VSCode Version: [Window Title]

Visual Studio Code

[Main Instruction]

Visual Studio Code

[Content]

Version 0.10.10

Commit 5b5f4db

Date 2016-03-07T10:38:23.764Z

Shell 0.35.6

Renderer 45.0.2454.85

Node 4.1.1

OS Version: Windows 10

Steps to Reproduce:

name variable dbTypes.varchar

word var is colored as key word but it's just a part of other word

Issue 2:
From @f111fei on February 23, 2016 6:14

version： 0.10.10

letter

Copied from original issue: microsoft/vscode#3270
Issue 1:
Bug Report

Current Behavior

cli option '--copy-files' copies all non-compiled files, including ignored files

Input Code

Not behave as what i expect

// package.json
{
"scripts": {
"build": "babel src --out-dir dist --copy-files --ignore src/**/*.test.js --presets=@babel/env"
}
}

run in terminal

$ npm run build

Expected behavior/code

'--copy-files' copies all non-compiled files, and skip ignored files

Environment

Babel version(s): [v7.7.4]

Node/npm version: [ Node v12.13]

OS: [OSX 10.15.1,]

How you are using Babel: [cli]

Issue 2:
💻

Would you like to work on a fix?

How are you using Babel?

Programmatic API (babel.transform, babel.parse)

Input code

// this "A" is an Interface
import { A } from './interface';

class A {}

Configuration file name

No response

Configuration

No response

Current and expected behavior

In babel, it throw TypeError: Duplicate declaration "A".

But it compile success in typescript.

Environment

@babel/core: 7.18.2

Possible solution

No response

Additional context

No response
Issue 1:
I'm using symfony 2.6.1 and try to call : "/_error/404.html" as described at http://symfony.com/blog/new-in-symfony-2-6-error-page-previews and got this :

Issue 2:
I'm using symfony 2.6.1 and try to call : "/_error/404.html" as described at http://symfony.com/blog/new-in-symfony-2-6-error-page-previews and got this :
Issue 1:
A = sprand(100,100,0.1); A = A'*A;
A = A + im*speye(100);
b = randn(100);
x = A\b
Error code -4 from numeric factorization

This type of systems are very important to many problems in electrical engineering and geoscience

[jiahao: edit for code formatting]

Issue 2:
A simple example:

M = speye(2) + im * speye(2);
lufact(M);
ERROR: Error code -4 from numeric factorization
in error at error.jl:21
in umfpack_numeric! at linalg/umfpack.jl:159

Sparse real matrices and complex full matrices work fine.
Issue 1:
TypeScript Version:

nightly (1.9.0-dev.20160307)

Code

// A self-contained demonstration of the problem follows...
export abstract class CaseClass {
constructor(...args: any[]) {}
}

abstract class TestCaseClass extends CaseClass {
static A = <typeof CaseClass> class extends TestCaseClass {
v: number;
constructor(v: number) {
super();
this.v = v;
}
};
static B = <typeof CaseClass> class extends TestCaseClass {
v: string;
constructor(v: string) {
super();
this.v = v;
}
};
}

function test(v: TestCaseClass.A) {
return v.v;
}

Expected behavior:

I would expect this to compile.

Actual behavior:

A failure in the compilation of test:

error TS2503: Cannot find namespace \'TestCaseClass\'.

Issue 2:
Is this by design or a bug?
Issue 1:
VSCode Version: 1.2.0

OS Version: Windows 8.1

Steps to Reproduce:

Open a repo in vscode so that the git bindings are active, leave this running in the background

Do your git interaction with TortoiseGit as usual

Notice that tortoise will regularly and randomly give errors failing to perform various operations because the repository appears to be locked (ie, some other git client is performing an operation). Tortoise will usually offer a 'retry' button; clicking retry almost always completes the action as intended.

I've noticed this seems to be related to whether I have vscode running or not. I suspect vscode is semi-actively doing fetches or something?

I'm sure this is manually configurable, but I feel like it should be more intelligent than that... perhaps vscode may also silently be experiencing repo lock failures when I'm interacting with TortoiseGit, and perhaps vscode might take this as an indicator that I'm using a separate git client, and automatically (or offer to) reduce it's auto fetch behaviour?

I'm not actually sure it's fetching, it could be something else, I just notice that the problems with TortoiseGit complaining about repo locks only seem to happen while vscode is running in the background.

Issue 2:
Several times now I've had mysteriously deleted files when doing a git pull in a console while Visual Studio Code is running. I've seen this roughly since version 0.10.

It seems that when auto-merging, Git is able to delete a file but not able to write the merged file back if it's open in Code. However that is just a hypothesis.

Seen the issue last with git version 1.9.5.msysgit.1 and Code 0.10.2.
Issue 1:
Hello,

When using a method based task, celery leaks the class instance causing a TypeError because it passes the argument twice. This problem seems to only occur when using the task retry feature. Here's the code you can use to reproduce this bug:

class SampleTask(object):
def test_celery_bug(self):
for i in range(10):
self._test_celery_bug.apply_async(args=[i])

@current_app.task(filter=task_method, default_retry_delay=2, max_retries=3)
def _test_celery_bug(self, asins):
try:
raise CustomError('ERROR D:<')
except CustomError as error:
self._test_celery_bug.retry(exc=error)

The code below causes the following error:

TypeError: _test_celery_bug() takes exactly 2 arguments (3 given)

I'm currently using celery from master and was able to reproduce the bug on celery 2.3.23 . I'm also using Python 2.7.5.

Issue 2:
Hi,

I get a lot of traces like this one when tasks are re-launched after I called a .retry() from inside them.

The code I use (basic version):

from celery.contrib.methods import task as celery_task_method

class test_retry(object):

@celery_task_method(name='test_retry.test1')
def test1(self, arg1=None, arg2=False):

print 'in test1, %s, %s, %s' % (self, arg1, arg2)

raise self.test1.retry(exc=RuntimeError("bla bla"))

t = test()
t.test1.delay() # OK
# 1st retry will print "self, None, False"
# 2nd retry will print "self, self, False"
# 3rd retry will print "self, self, self"
# 4th retry will raise an exception inside celery " TypeError('test1() takes at most 3 arguments (4 given)',) !"

NOTE: don't know it that matters or not, but IRL the class test_retry doesn't inherit from object but from mongoengine.Document.

PS: as both concern tasks as methods, perhaps my other bug could be related ? by the way, I had no problems with .delay() as far as I used it.

Regards,
Issue 1:
PyHive provides a nice API to access the partition metadata.

Inspector get_indexes function that provides the indexes and the partition information.

By the way, displaying the indexes is a nice feature too.

More information can be found here:

http://pythonhosted.org/PyHive/pyhive.html#module-pyhive.sqlalchemy_backports

from sqlalchemy import *
from sqlalchemy.engine import create_engine
from sqlalchemy.schema import *
engine = create_engine('presto://localhost:${port_number}/hive/default')
insp = inspect(engine)
insp.get_indexes('${table_name}', '${schema_name}')

>> [{u'unique': False, u'column_names': [u'ds'], u'name': u'partition'}]

Issue 2:
Issue 1:
Version

2.5.2

Reproduction link

https://jsfiddle.net/50wL7mdz/584489/

Steps to reproduce

Run the JSfiddle, if the v-for :key is index, when you delete one item from the array it will animate the last item, if you change to :key error, it will work properly but give an Vue warn: Avoid using non-primitive value as key, use string/number value instead.

Vue Warn: Duplicate keys detected: '[object Object]'. This may cause an update error.

What is expected?

Expected to animate the item that is being removed like using error.

What is actually happening?

animating only the last item of the loop when using index.

Trying to create one alert notification component.

Issue 2:
Hello!

Can't say for sure what's going on, but I've got the problem.

In 0.12.7 everything is ok, but in 0.12.8 my app started to lag a lot and now I've got warnings like

You may have an infinite update loop for the watcher with expression "offersList"

The code I've got most warnings for looks like this:

<div
v-if="isOffersPresent"
v-component="{{offersView}}"
offers-list="{{offers.result}}"
></div>

So it's a dynamic component with dynamic props and replace: false

Any hints?
Issue 1:
Seems like every git related functions of Atom not working for me. I used the official windows installer, but in the past I used the zip package, still the same. git is in my PATH, just like apm and atom.

For the records I'm in an actual .git repo and editing a file when this happens (or more accurate: not happening anything).

Issue 2:
If the .git/ directory isn't in the top level directory then git integration doesn't work:
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Router.beforePopState should be easy to set. The code should reside in pages/_app.js with client-side only guard since it should be run on client only once.

Current Behavior

I put up an example repository here.

Server-side went ok without an error, but browsers complain with the following.

No router instance found.
You should only use "next/router" inside the client side of your app.

Error: No router instance found.
You should only use "next/router" inside the client side of your app.

at throwIfNoRouter (http://localhost:3000/_next/static/commons/main.js:7835:11)
at Object.SingletonRouter.(anonymous function) [as beforePopState] (http://localhost:3000/_next/static/commons/main.js:7799:5)
at Object.<anonymous> (http://localhost:3000/_next/-/page/_app.js:2819:55)
at Object../pages/_app.js (http://localhost:3000/_next/-/page/_app.js:2955:30)
at __webpack_require__ (http://localhost:3000/_next/static/commons/manifest.js:715:31)
at fn (http://localhost:3000/_next/static/commons/manifest.js:118:20)
at Object.1 (http://localhost:3000/_next/-/page/_app.js:2962:18)
at __webpack_require__ (http://localhost:3000/_next/static/commons/manifest.js:715:31)
at webpackJsonpCallback (http://localhost:3000/_next/static/commons/manifest.js:26:23)
at http://localhost:3000/_next/-/page/_app.js:5:7

Steps to Reproduce (for bugs)

Example repository

Context

See "Expected Behavior" above.

Your Environment

Tech
Version

next
6.0.0

node
10.0.0

OS
macOS High Sierra 10.13.4

browser
Google Chrome 66.0.3359.139

etc

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

pages/
components/
component.js
index.js
catalog.js
about.js

const listOfPages = await getListOfPages()
console.log(listOfPages)
// [ 'index', 'catalog', 'about' ]

Is it possible to implement such a thing?
Issue 1:
Electron version:

v2.0.0

Operating system:

Windows 10 64bit

Last known working Electron version:

Unknown

Expected behavior

In the dev tool's timeline, the listener/node count (and the JS Heap size?) should go back down when webviews are removed. They should not show up in Detached DOM tree when taking a heap snapshot. It's as if they never existed.

Actual behavior

If you don't add a preload script the memory consumption eventually goes back down, but if you do, it doesn't, even with manual garbage collection. Also regardless, the number of nodes and listeners just keeps increasing. If I take a heap snapshot I can see all the elements are under Detached DOM trees in Containment.

I thought maybe I was closing the webviews incorrectly, but there's isn't any documentation on this, except for the close event example which seemed to imply one should set the src to about:blank on close. So I tried just setting it to about:blank from the start and this allowed the memory to drop back down with the preload script (but listener/node count still increases). Is this intended behavior?

How to reproduce

$ git clone https://github.com/AlansCodeLog/electron-quick-start.git -b webview-problem
$ npm install
$ npm start || electron .

Start recording a timeline in the dev tools, click Add 10 2-3 times, then Remove All. Manually garbage collect. Stop recording.

Issue 2:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

7.1.2

Operating System:

Windows 10 1909

Last Known Working Electron version:

7.x.x (in another Windows 10 1909 computer)

Expected Behavior

The menu that appears below the app title (the one with File, Edit, View...) must dissappear.

Actual Behavior

Nothing. It does nothing. The menu is still there. as if nothing happened.

To reproduce

This is basically the code I am testing:

const { app, BrowserWindow } = require('electron');

function createWindow() {

let win = new BrowserWindow({

width: 800,

height: 600,

webPreferences: {

nodeIntegration: true,

}

})

win.setMenuBarVisibility(false);

win.loadFile('./public/index.html')

}

app.on('ready', createWindow)

Everything works as expected, except the menu, which it still shows.

Screenshots

https://i.imgur.com/kJJf0JE.png