WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I'm submitting a ... (check one with "x")

[x] bug report
[ ] 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

Angular 2 rc2 - Routing throws an exception in INTERNET EXPLORER 11 when using the back button more than once

Not only that. Components lifecycle hooks are not called correctly. Duplicate of (#7722)

Expected/desired behavior

It should not throw an exception

Reproduction of the problem

Open plunker provided by official documentation :

https://angular.io/docs/ts/latest/guide/router.html

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

Do some navigation

Press f12(open developer console)

Use back button more than once

This is the result :

Unhandled Promise rejection: EXCEPTION: Error in :0:0

ORIGINAL EXCEPTION: TypeError: Unable to get property 'unsubscribe' of undefined or null reference

ORIGINAL STACKTRACE:

TypeError: Unable to get property 'unsubscribe' of undefined or null reference

at HeroListComponent.prototype.ngOnDestroy (eval code:32:9)

at _View_HeroListComponent_Host0.prototype.destroyInternal (Function code:33:3)

at AppView.prototype.destroyLocal (eval code:11773:13)

at DebugAppView.prototype.destroyLocal (eval code:11935:17)

at AppView.prototype.destroyRecurse (eval code:11761:13)

at AppView.prototype.destroy (eval code:11747:13)

at ComponentRef.prototype.destroy (eval code:8889:57)

at RouterOutlet.prototype.deactivate (eval code:47:13)

at ActivateRoutes.prototype.deactivateOutletAndItChildren (eval code:381:13)

at ActivateRoutes.prototype.activateRoutes (eval code:363:13)

ERROR CONTEXT:

[object Object] ; Zone: ; Task: Promise.then ; Value: EXCEPTION: Error in :0:0

ORIGINAL EXCEPTION: TypeErro

"Unhandled Promise rejection:"

"EXCEPTION: Error in :0:0

Please tell us about your environment:

Angular version: 2.0.0-rc.2

Browser: [IE 11]

Issue 2:
I'm submitting a clarification. It might be a feature request:

Scenario:

I have a popup in my application which does not belongs to any route. What I need to ensure is, while the popup is open, when user clicks on a navigation (which takes to a component route), before activating this route, I need to close the popup. This popup when closing gives user a prompt to close or not close. Now in case user chooses to not close, the route should not change.

Is there a way I can provide $canDeactivate hook at the rootRouter level which is executed at each route change along with component specific $canDeactivate hooks?

Thanks,

Pranav Kaushik
Issue 1:
@sjudd I have the same problem（#2859），The glide version which using is V4.5.0. please have a check. below is the bug info.

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference

at android.util.Log.printlns(Log.java:441)

at android.util.Log.w(Log.java:219)

at com.bumptech.glide.request.SingleRequest.obtain(SingleRequest.java)

begin(SingleRequest.java)

releaseResource(SingleRequest.java)

loadDrawable(SingleRequest.java)

onSizeReady(SingleRequest.java)

maybeApplySizeMultiplier(SingleRequest.java)

onResourceReady(SingleRequest.java)

onLoadFailed(SingleRequest.java)

isEquivalentTo(SingleRequest.java)

logV(SingleRequest.java)

at com.bumptech.glide.request.SingleRequest.obtain(SingleRequest.java)

begin(SingleRequest.java)

releaseResource(SingleRequest.java)

loadDrawable(SingleRequest.java)

onSizeReady(SingleRequest.java)

maybeApplySizeMultiplier(SingleRequest.java)

onResourceReady(SingleRequest.java)

onLoadFailed(SingleRequest.java)

isEquivalentTo(SingleRequest.java)

logV(SingleRequest.java)

at com.bumptech.glide.load.engine.EngineJob.handleExceptionOnMainThread(EngineJob.java)

at com.bumptech.glide.load.engine.EngineJob$MainThreadCallback.handleMessage(EngineJob.java)

at android.os.Handler.dispatchMessage(Handler.java:101)

at android.os.Looper.loop(Looper.java:156)

at android.app.ActivityThread.main(ActivityThread.java:6523)

at java.lang.reflect.Method.invoke(Method.java)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)

Issue 2:
I have a problem.

Glide Version: 4.3.1

Android Version:5.1.1

Device:SM_J200H

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference

at android.util.Log.getStackTraceString(Log.java:340)

at android.util.Log.w(Log.java:192)

at com.bumptech.glide.request.SingleRequest.onLoadFailed(SourceFile:581)

at com.bumptech.glide.request.SingleRequest.onLoadFailed(SourceFile:574)

at com.bumptech.glide.load.engine.EngineJob.handleExceptionOnMainThread(SourceFile:282)

at com.bumptech.glide.load.engine.EngineJob$MainThreadCallback.handleMessage(SourceFile:314)

at android.os.Handler.dispatchMessage(Handler.java:107)

at android.os.Looper.loop(Looper.java:194)

at android.app.ActivityThread.main(ActivityThread.java:5667)

at java.lang.reflect.Method.invoke(Native Method)

at java.lang.reflect.Method.invoke(Method.java:372)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:969)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:764)

I think it is GlideException.appendExceptionMessage() cause this problem:

private static void appendExceptionMessage(Throwable t, Appendable appendable) {

try {

appendable.append(t.getClass().toString()).append(": ").append(t.getMessage()).append('\n');

} catch (IOException e1) {

throw new RuntimeException(t);

}

}
Issue 1:
The ES6 definition of the "class" construct has the concept of "class expression" - i.e. class definitions may be used as values, such as:

var obj = new (class { x = 5; });
var cls = class { x = 5; };
var cls2 = class extends cls { y = 6; };
var obj2 = new cls2();
// and so on

Sadly, this support is absent in the current TypeScript compiler (I'm using the 9.2 branch) - that is, the above examples would not compile.

Aside from TS team's own argument of "closely aligning with the ES6 specification", this support would enable many useful scenarios for which I currently have to fall back to "any-typed" plain JavaScript.

Here are a few examples of such scenarios which I actually use in my daily work:

Returning a class (not object) from a function. With TypeScript, it is currently possible to describe the return type of such function, but not to actually write its body using the "class" construct.

"Bind" a class - similar to "binding" a function, i.e. produce another class with certain constructor parameters bound to specific values.

Declare a "private" class within the body of a function or within another class.

Issue 2:
module foobar
{
export function foo()
{
return;
}

export enum foo
{
bar,
baz
}
}

results in valid javascript:

var foobar;
(function (foobar) {
function foo() {
return;
}
foobar.foo = foo;

(function (foo) {
foo[foo["bar"] = 0] = "bar";
foo[foo["baz"] = 1] = "baz";
})(foobar.foo || (foobar.foo = {}));
var foo = foobar.foo;
})(foobar || (foobar = {}));

...and even shows proper code hinting/completion in Visual Studio.

Yet it doesn't compile due to a duplicate identifier error: Error 2 Duplicate identifier 'foo'

Seeing as both the resulting JS and IDE support are already functioning, why is this a syntax error to tsc?
Issue 1:
by alex@zylman.com:

Similar to issue #6258, but not the same.

What steps will reproduce the problem?
Try to read a CSV file where the fields are unquoted and one of them begins in something
that would need lazy quotes, e.g.
Field1,Field2,"LazyQuotes" Field3,Field4,Field5

What is the expected output?
["Field1", "Field2", "\"LazyQuotes\" Field3",
"Field4", "Field5"]
Length 5

What do you see instead?
["Field1", "Field2", "LazyQuotes\"
Field3,Field4,Field5"]
Length 3

Which compiler are you using (5g, 6g, 8g, gccgo)?
Whatever the default is from https://code.google.com/p/go/downloads/list

Which operating system are you using?
Mac OS X 10.8

Which version are you using? (run 'go version')
go version go1.1.2 darwin/amd64

Issue 2:
by whitetiger0990:

What steps will reproduce the problem?
1. _,error:=net.Dial("tcp","",host);
2. Have a 2Wire router (which is what I believe is causing the problem, but
may be wrong)

What is the expected output? What do you see instead?
I expect error==nil, but instead error=="dial tcp google.com:80: lookup
google.com. on 192.168.1.254:53: no answer from server"

What is your $GOOS? $GOARCH?
linux amd64

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

Please provide any additional information below.
See attached for 4 packets associated with the execution of my test script.
Also attached is my test script. It sometimes works, outputting:

google.com:80
B <nil>

but then sometimes outputs:
google.com:80
B dial tcp google.com:80: lookup google.com. on 192.168.1.254:53: no answer
from server

I'm pretty sure it's something related to the 2Wire router because both my
mother and grandmother have one and it appears to be the same issue, and
nothing else on my computer seems to be experiencing any difficulty (but if
someone can provide some way to test that, I'll be glad to do it. I'm not
completely ruling out some problem with the computer).

The router doesn't even seem to respond several google.com queries, but it
responds right away to the incorrect google.com.gateway.2wire.net.

Thanks, if any more information is needed, just ask.

Attachments:

packets.txt (5198 bytes)

dialing.go (162 bytes)
Issue 1:
Example

Set up a brand new FastAPI venv:

virtualenv venv
source venv/bin/activate
pip install fastapi[all] pytest

Copy/paste example from the testing docs at https://fastapi.tiangolo.com/tutorial/testing/:

from fastapi import FastAPI
from fastapi.testclient import TestClient

app = FastAPI()

@app.get("/")
async def read_main():
return {"msg": "Hello World"}

client = TestClient(app)

def test_read_main():
response = client.get("/")
assert response.status_code == 200
assert response.json() == {"msg": "Hello World"}

Observe that the tests take 30s to run. If you add another .get call, they take 60s.

Description

On Mac with new install of FastAPI, every call to TestClient.get() takes exactly 30s to complete. The response is correct.

Environment

OS: macOS

FastAPI Version: 0.56.1

Python version:

Python version: 3.6

Issue 2:
First Check

I added a very descriptive title to this issue.

I used the GitHub search to find a similar issue and didn't find it.

I searched the FastAPI documentation, with the integrated search.

I already searched in Google "How to X in FastAPI" and didn't find any information.

I already read and followed all the tutorial in the docs and didn't find an answer.

I already checked if it is not related to FastAPI but to Pydantic.

I already checked if it is not related to FastAPI but to Swagger UI.

I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

I commit to help with one of those options 👆

Example Code

from fastapi import APIRouter, FastAPI, Request
from fastapi.responses import JSONResponse

app = FastAPI()
router = APIRouter(tags=["items", "items"])

@router.get("/items/")
def read_items(request: Request):
return JSONResponse({"hello": "world"})

app.include_router(router)

# or just simply
@app.get('/test/', tags=["test", "test"])
def read_test():
return "test"

Description

Open the browser and call endpoint '/redoc'

Observe duplicate entries for /items and /test:

This is caused by treating tags as a List of strings or enum inside APIRouter.

The root cause is duplicate tags ending up in openapi.json:

Using Class Based Views in fastapi-utils trigger this bug (external package).

Added a fix for the issue in PR #5533 (with test)

Operating System

macOS

Operating System Details

No response

FastAPI Version

0.85.1

Python Version

Python 3.10.8

Additional Context

No response
Issue 1:
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:

v11.0.2, with @electron/remote v1.0.0

Operating System:

Windows 10 (1803)

Last Known Working Electron version:

10.1.2, with @electron/remote v1.0.0

Expected Behavior

Calling require('@electron/remote/main').initialize(); in main.js should not produce any errors.

Actual Behavior

When running electron . the following error is thrown:

TypeError: process.electronBinding is not a function
at Object.<anonymous> (C:\Projects\msal electron poc\node_modules\@electron\remote\dist\src\main\objects-registry.js:3:24)
at Module._compile (internal/modules/cjs/loader.js:1152:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:10)
at Module.load (internal/modules/cjs/loader.js:992:32)
at Module._load (internal/modules/cjs/loader.js:885:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12694)
at Module.require (internal/modules/cjs/loader.js:1032:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (C:\Projects\msal electron poc\node_modules\@electron\remote\dist\src\main\server.js:8:44)
at Module._compile (internal/modules/cjs/loader.js:1152:30)

To Reproduce

Simply include require('@electron/remote/main').initialize(); at the top of your main.js. I tried creating a fiddle, but it hangs on Installing node modules using npm: @electron/remote/main...

Example project

at https://github.com/SubliemeSiem/electron-bug-example

npm i
npm start

Shows the error. Change the electron version to 10.1.2 and run npm i and npm start again and the error disappears.

Issue 2:
I'm using the latest beta of electron 11 (beta.23), with electron/remote 1.0. I tried running my app, and I see a crash with the following stack trace.

Uncaught Exception: TypeError: process.electronBinding is not a function
at Object.<anonymous> (/my_app/ui/node_modules/@electron/remote/dist/src/main/objects-registry.js:3:24)
at Module._compile (internal/modules/cjs/loader.js:1152:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:10)
at Module.load (internal/modules/cjs/loader.js:992:32)
at Module._load (internal/modules/cjs/loader.js:885:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12694)
at Module.require (internal/modules/cjs/loader.js:1032:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (my_app/ui/node_modules/@electron/remote/dist/src/main/server.js:8:44)
at Module._compile (internal/modules/cjs/loader.js:1152:30)

I'm initializing the remote module in my main process as

require('@electron/remote/main').initialize(). enableRemoteModule is also set to true.
Issue 1:
Hello us it possible to translate Powertoys in Dutch

Issue 2:
Summary of the new feature/enhancement

The windows key shortcut guide UI strings need to be localized.

The application will be localized in the following langauges:

Language
Culture Code

English
en

German
de

Spanish
es

French
fr

Italian
it

Japanese
ja

Korean
ko

Portuguese (Brazil)
pt-BR

Russian
ru

Chinese (Simplified)
zh-Hans

Chinese (Traditional)
zh-Hant

Czech
cs

Dutch
nl

Hungarian
hu

Portuguese (Portugal)
pt-PT

Polish
pl

Swedish
sv

Turkish
tr
Issue 1:
Why does everyone use GIL incorrectly?

Recently reported a bug in Pytorch.

Today updated numpy 1.16.3 to 1.16.4

Same problem with GIL.

Issue 2:
If an application is using multiple embedded sub interpreters that use numpy, there is a possibility that floating point errors can cause the thread to deadlock. I traced this down to ufunc_object's _error_handler() method where it does NPY_ALLOW_C_API and that freezes on PyGILStateEnsure(). Interestingly, the PyGILState API is allegedly unsafe for applications using sub interpreters, but it works fine as long as long as each sub interpreter is on its own thread.

There is a workaround to call numpy.seterr(all='ignore') as that will not even enter the method. Ideally the print option would also not get the GIL as the GIL should not be needed for that. In the meantime I added a warning to Jep when it detects an interpreter on the same thread in the hopes of deterring the conditions that can cause this. I have a test case that illustrates the problem at https://github.com/mrj0/jep/blob/v3.3.0rc/src/jep/test/numpy/TestNumpyGILFreeze.java

This is somewhat related to gh-3837. If you have problems running the test case, you may need to configure the environment variables PATH, LD_LIBRARY_PATH, or LD_PRELOAD depending on your system.
Issue 1:
The commit 7e87eb1 removes the _format param being passed to twig.controller.exception:showAction. No updates were made to the TwigBundle's ExceptionController to account for this change and as such errors or exceptions from non-html requests render incorrectly with the html templates.

One possible fix for this is to update the ExceptionController to rely on $request->getRequestFormat() instead of the $_format argument being passed around in the ExceptionController to its various methods.

Issue 2:
Hello,

I was wondering if it could be interesting to provide a intergration between the security and form components for the login part.

The security listeners for login work with the request object directly. It's easy to create a formType class and use it to display the form, but it will never be submitted.

I see two main benefits of using a formType for the login:

templating: use the same markup as in other form without writing all the html, with the form_* twig functions

validation: ease validation of the scalar values of the fields (without security considerations) like an email format

Do you think it is worth working on it ? If so where should it live ? Any other recommandations ?

Thank you
Issue 1:
http://stackoverflow.com/questions/28857937/trying-to-check-data-frequency-with-pandas-series-of-datetime64-objects/28858228?noredirect=1#comment45982435_28858228

It works fine with datetime64. Currently you have to convert to datetime in order to check allclose

Issue 2:
numpy.isfinite should support datetime64 and timedelta64 objects. It should return True for any ordinary value, and False for datetime64('NaT') and timedelta64('NaT').

As a side-effect, this will make isclose and allclose usable for datetime64 and timedelta64 objects.

In [97]: numpy.isfinite(numpy.datetime64(10**9, 's'))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-97-8555b18406e5> in <module>()
----> 1 numpy.isfinite(numpy.datetime64(10**9, 's'))

TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
Issue 1:
The peek function is very useful and an efficient alternative to marking and resetting a stream when all you need to do is get a single character. The current peek returns a byte, however, which leads to errors when people assume that they can compare that byte to a character and check for a character (only works for UTF-8 streams and ASCII characters). This was a significant annoyance in implementing #16024. This is technically not breaking since Base.peek isn't exported. Most code that uses it will actually continue to work.

Issue 2:
As discussed here: https://groups.google.com/forum/?fromgroups=#!topic/julia-users/kDKL1dS4L0w

Basically, I'd like to be able to peek at the first few characters of an IO stream, without removing the characters from the stream. In particular, it needs to work with streams that are not files and therefore not seekable.
Issue 1:
Elasticsearch version: Amazon Elasticsearch 2.3.2

Description of the problem including expected versus actual behavior:

Inserting same field to same index with different mapping don't create new mapping.

Field name change creates new mapping

Issue seems to be duplicate of closed #16348 #15138 #15568

Steps to reproduce:

$ curl -XPOST -d '{"timestamp": "2016/08/18 12:55:43"}' https://aws-elasticsearch/logstash-2016.08.18/test_map1
{"_index":"logstash-2016.08.18","_type":"test_map1","_id":"AVadvLddEO70PGmPaHHU","_version":1,"_shards":{"total":2,"successful":1,"failed":0},"created":true}

$ curl -XPOST -d '{"timestamp": "2016-08-18T12:42:06.623000+0000"}' https://aws-elasticsearch/logstash-2016.08.18/test_map2 ; echo
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"failed to parse [timestamp]"}],"type":"mapper_parsing_exception","reason":"failed to parse [timestamp]","caused_by":{"type":"illegal_argument_exception","reason":"Invalid format: \"2016-08-18T12:42:06.623000+0000\" is malformed at \"-08-18T12:42:06.623000+0000\""}},"status":400}

$ curl -XPOST -d '{"new_timestamp": "2016-08-18T12:42:06.623000+0000"}' https://aws-elasticsearch/logstash-2016.08.18/test_map2 ; echo
{"_index":"logstash-2016.08.18","_type":"test_map2","_id":"AVadx4_NEO70PGmPaHHc","_version":1,"_shards":{"total":2,"successful":1,"failed":0},"created":true}

Issue 2:
Describe the feature: Ability to retain only the top N buckets given an aggregated metric on parent buckets. This would be similar to the bucket_selector aggregation (which removes buckets based on a script).

Example: Given a filters aggregation that's provided with 300 filters, we have a sub-aggregation that calculates a metric. We only want the results of buckets having the 5 largest values of the aggregated metric. Today, without a "Top N bucket selector" aggregation, the client has to retrieve all 300 and sort/filter on client side.
Issue 1:
Hey Sokra,

This is my first webpack plugin and contribution to the open source community.

The issue that I was faced with is that we have multiple projects and even some runtime loadable code and many developers. Some parts of one project may run standalone or is loaded by another project.

The idea is that we'd like to have separate webpack and some non-webpack projects but be able to share code in memory without duplicating it.

To do this I created a plugin that:

Uses the request as the module id instead of an integer so require("jquery") because _webpack_require("jquery")

Causes the bootloader to construct and use internal and a global table for installed modules. it checks the internal table first then the global table then constructs the module and puts it in the global table.

Allows modules that are defined as external to be require()'d without throwing a build error

Skips rendering modules that are defined as external

Now using this plugin I can successfully have loadable code that assumes its dependencies have already been loaded.

There are many more features that I'd like to add to it such as being able to wait until' a dependency is loaded and etc...

I'd like to get your opinion on this plugin. it is located at:

https://github.com/EliteScientist/SharedRequirePlugin

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

Report a bug.

What is the current behavior?

Duplicate entries are added to records when RuleSet ref-- values are needed and the order of loader config changes. This causes the records file to balloon over time.

If the current behavior is a bug, please provide the steps to reproduce.

Please see https://github.com/rowanoulton/webpack-records-ruleset-ref-bug for an example.

What is the expected behavior?

Duplicate entries should not occur. Perhaps RecordIdsPlugin should strip ref-- values from the loader request to prevent this.

Reproduced on webpack 3.4 and 3.10.0.