WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I am trying to resolve the image URL's:

app.module.ts code

import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
import { AppComponent } from "./app.component";
import { routing, appRoutingProviders } from "./app.routing";
import { Routes, RouterModule } from "@angular/router";
import { UrlResolver } from '@angular/compiler';

const routes: Routes = [
];

@NgModule({
imports: [
BrowserModule,
routing,
RouterModule.forRoot(routes, { useHash: true })
],
declarations: [
AppComponent
],
providers: [
appRoutingProviders, UrlResolver
],
bootstrap: [AppComponent]
})
export class AppModule {
}

app.component.ts code:

import { Component } from "@angular/core";
import { Router } from "@angular/router";
import { UrlResolver } from '@angular/compiler';

@Component({
moduleId: module.id,
selector: "my-app",
templateUrl: "app.component.html"
})
export class AppComponent {
constructor(private urlResolver: UrlResolver) { }

public resolvePath(path) {
return this.urlResolver.resolve(module.id, path);
}
}

I am providing UrlResolver, but the constructor injection of UrlResolver is causing error:

app.component.html code

<img [src]="resolvePath('Logo.jpg')" alt="Logo" width="50" height="50">

why error on constructor injection, should I add anything in providers ?

Issue 2:
I'm using Gulp with Browserify as my build tools.

Angular2 needs zone as a global variable, normally I would do this like that:

window.zone = require('zone.js');

but I have a problem when it comes to ES6 syntax and TypeScript.

Tried doing it like this:

import 'zone.js';
(<any>window).Zone = zone;

but this of course shows an error "Cannot find name zone' because variable zone is not defined anywhere.

Then I tried defining it like this:

import * as zone from 'zone.js';
(<any>window).Zone = zone;

and now I get "Cannot find module zone.js" but the weird thing is that it works and browserify compiles it correctly.

Also tried:

import {zone} from 'zone.js';

but this causes the same error "Cannot find module zone.js.

Could anyone help me how should I import it correctly?
Issue 1:
System information (version)

OpenCV => 3.4.2

Operating System / Platform => ❔

Compiler => Windows 10 64 Bit

Detailed description

The mask parameter of matchTemplate doesn't work on TM_CCOEFF and TM_CCOEFF_NORMED. Is there any workaround except using other template matching methods? I prefer using CCOEFF_NORMED since it's much faster.

Steps to reproduce

Issue 2:
System information (version)

OpenCV => 4.5.5.64

Operating System / Platform => Ubuntu Linux

Compiler => gcc?

Detailed description

The Swiss QR-bills are detected but not decoded.

See also: https://scanbot.io/en/sdk/scanner-sdk/barcode-scanner-sdk/swiss-qr

Steps to reproduce

import cv2

image = cv2.imread("test-qr-code/155567196-54dbec58-7fa4-473a-a551-b52ecd04e11e.png")
detector = cv2.QRCodeDetector()
print(detector.detect(image))

data, bbox, straight_qrcode = detector.detectAndDecode(image)
print(data)
print(bbox)

With image:

=>

(True, array([[[ 42., 42.],
[433., 42.],
[433., 433.],
[ 42., 433.]]], dtype=float32))

[[[ 42. 42.]
[433. 42.]
[433. 433.]
[ 42. 433.]]]

Issue submission checklist

I report the issue, it's not a question

I checked the problem with documentation, FAQ, open issues,

forum.opencv.org, Stack Overflow, etc and have not found any solution

I updated to the latest OpenCV version and the issue is still there

There is reproducer code and related data files: videos, images, onnx, etc
Issue 1:
A user first reported this in https://groups.google.com/forum/#!topic/julia-users/TgKKZuB891I. The following simple embedding program:

#include <julia.h>

int main(int argc, char *argv[])
{
jl_init("C:/tw/Julia-0.4.0/bin");
jl_eval_string("println(sqrt(2.0))");
jl_atexit_hook(0);
return 0;
}

produces:

$ ./embed_test.exe

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x0 -- unknown function (ip: 0000000000000000)
unknown function (ip: 0000000000000000)

I've done some debugging with gdb and have traced it to some failure in jl_module_run_initializer called from jl_init_restored_modules.

Issue 2:
This scenario grew out of my investigation of why Base.Dates.unix2datetime was crashing, turns out it's not that function but round, I know, weird, rite? Better to simply show an example

#include <julia.h>

int main(int argc, char *argv[])
{

jl_init(JULIA_INIT_DIR);

jl_eval_string("println(sqrt(2.0))");
jl_eval_string("println(round(1.0))");

return 0;
}

and built using the following Makefile in an msys2 env

JL_SHARE = $(shell julia -e 'print(joinpath(JULIA_HOME,Base.DATAROOTDIR,"julia"))')
CFLAGS += $(shell $(JL_SHARE)/julia-config.jl --cflags)
CXXFLAGS += $(shell $(JL_SHARE)/julia-config.jl --cflags)
LDFLAGS += $(shell $(JL_SHARE)/julia-config.jl --ldflags)
LDLIBS += $(shell $(JL_SHARE)/julia-config.jl --ldlibs)
CC = gcc

all: embed_example

Results in the following

$ make
gcc -DJULIA_INIT_DIR=\"C:\\\\Julia\\\\julia-04051e9699\\\\lib\" -IC:\\Julia\\julia-04051e9699\\include\\julia -LC:\\Julia\\julia-04051e9699\\bin embed_example.c -ljulia -o embed_example

jeffw@xun MINGW64 ~/src/julia-embed-test
$ ./embed_example
1.4142135623730951

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x0 -- unknown function (ip: 0)
unknown function (ip: 0)

The call to sqrt is not necessary to cause the error, just to give some context that the Julia engine is functioning. It's not just round either, it's at least trunc as well and I suspect all of the llvm macros. I have not managed to debug this more fully because it's not easy to know where to begin. This does not happen on OS/X or Linux nor in a non-embedding scenario as can be seen when using the REPL of the same Julia install.

$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "help()" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.4.0-dev+9597 (2015-05-23 02:32 UTC)
_/ |\__'_|_|_|\__'_| | Commit 04051e9* (0 days old master)
|__/ | x86_64-w64-mingw32

julia> round(2.0)
2.0
Issue 1:
Currently ArgumentError can be passed a string to use as an error message, but DomainError cannot. It would be nice for the user to have a useful error message also for DomainErrors.

I would make a PR but I can't find where to do this.

Issue 2:
Re: #12121's discussion for @tkelman.

Right now, DomainError doesn't take any arguments and will throw a MethodError if you try to pass an informative string. This is important because it's used in many performance critical math functions like sqrt, cf. @andreasnoack. @simonster chimed in to point out that

We could have DomainError{T<:Union(None,ByteString)} where DomainError() would be a DomainError{None}. I don't think that would be any more expensive when there's no string to be thrown. Would need some changes on the codegen side, though...

and @yuyichao mentioned the performance regression discussed at #11508. @simonster pointed out that

I'm not sure removing the GC frame would be enough. It would eliminate the additional cost for a DomainError with a string parameter in code that doesn't throw a DomainError, but you'd still have additional overhead if you actually throw a DomainError, which might matter.

What do we want to do going forward? Should we fix codegen, use #11508, or something else?
Issue 1:
I noticed this problem since Kubernetes introduced the Dashboard, please see the below image. If possible I would like to contribute to fix this issue:

Kubernetes version: 0.18.0

Environment: Vagrant, CoreOS 717.0.0

Issue 2:
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.):

No

What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.):

'sort output' produced pages of irrelevant bugs.

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

FEATURE REQUEST

Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.4", GitCommit:"3b417cc4ccd1b8f38ff9ec96bb50a81ca0ea9d56", GitTreeState:"clean", BuildDate:"2016-10-21T02:48:38Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}

Environment:

Cloud provider or hardware configuration:

GCP

OS (e.g. from /etc/os-release):

Linux

Kernel (e.g. uname -a):

3.13.0-101-generic

Install tools:

gcloud SDK

Others:

What happened:

When I run 'watch kubectl describe ingress', the order of various fields is random upon subsequent views.

For example, the long list of 'Annotations' changes order every single time the command is called.

This makes "watching" an ingress which is changing difficult to see the changes.

most commands I'm used to have stable outputs for their human-readable messages.

What you expected to happen:

The sort order of tables should be consistent. For example, sorted by key.

How to reproduce it (as minimally and precisely as possible):

Make an ingress, populate it with pods and services, then run

'watch kubectl describe ingress'

Anything else do we need to know:

This is likely a consequence of using a map object in Go and iterating over the output without sorting it. That wouldn't normally be a problem, but while working with k8s, i often need to run the 'watch' command to see transient changes, and having the sort order be random is merely inconvenient. In my experience UNIX tools typically have deterministic output for tables of data.
Issue 1:
Elasticsearch version:

2.3.3

JVM version:

8u91

OS version:

Debian Jessie and CentOS 7

Description of the problem including expected versus actual behavior:

Including a simple query string query with the NOT operator (hyphen) causes all documents to be returned.

Steps to reproduce:

Start from a fresh ElasticSearch instance

docker run -d -p 9200:9200 elasticsearch -Des.network.host=0.0.0.0

Load some data

curl -XPUT localhost:9200/test_index -d '{"settings": {"index" {"number_of_shards": 3, "number_of_replicas": 0}}}'
curl -XPOST localhost:9200/test_index/test_doc -d '{"content": "Buffalo"}'
curl -XPOST localhost:9200/test_index/test_doc -d '{"content": "Buffalo, New York"}'
curl -XPOST localhost:9200/test_index/test_doc -d '{"content": "Canada"}'

Verify normal querying works:

curl -XGET localhost:9200/test_index/test_doc/_search -d'
{
"query": {
"simple_query_string": {
"query": "Buffalo"
}
}
}'
# The two, correct results are returned

Demonstrate queries with the NOT operator don't work:

{
"query": {
"simple_query_string": {
"query": "Buffalo -New"
}
}
}'
# Here, all three documents are returned, including one without terms specified in the query.

Issue 2:
I am creating via BulkRequestBuilder, doing

add(client.prepareIndex(...).setOpType(OpType.CREATE)

I have a test where I bulk insert and a subset of the objects inserted already exist. I then attach a listener to the bulk request, and expect to get .hasFailures() etc. (This is running vs an in memory server created in JUnit, if that makes any difference)

Instead what happens is hasFailures() returns false, and the inserts silently fail (ie they appear in the requests() array with isFailed()==false, but aren't updated).

One difference I do see in the listener is that the new objects have version==1 whereas the failed indexes have ==-3, eg (my duplicate objects start at "id51"):

WORKED2: 29...id50...CREATE...{"_id":"id50","test_string":"test_string250"}...1
WORKED2: 30...id51...CREATE...{"_id":"id51","test_string":"test_string251"}...-3

(for

System.out.println("WORKED2: " + bir.getItemId() + "..." + bir.getId() + "..." + ir.opType().toString() + "..." + ir.source().toUtf8() + "..." + ir.version());

)

I confirm the object is not updated in the DB, eg:

---------------- {"_id":"id50","test_string":"test_string250"} // (newly inserted object)
---------------- {"_id":"id51","test_string":"test_string51"} // (original object)

Any ideas what's going on here?

(EDIT: note if i change from OpType.CREATE to OpType.INDEX then as expected I see versions 1 for new objects, 2 for updated objects, and the objects are updated in the DB)

Is this because I'm using a listener and there's a second wave of verification that occurs after the onResponse()? I'm "happy" to use negative version to indicate "duplicate insert failure" if that's going to be consistent behavior.

(Apologies if this behavior is explained somewhere, I couldn't find it!)
Issue 1:
🐛 Bug

I divide an element by zero and get an inf. But this inf is not used in the following calculation. However, after backward, I still get a nan gradient for this element.

To Reproduce

import torch
divide_tensor = torch.Tensor([1.0, 0.0, 1.0])
weight = torch.ones(3)
weight.requires_grad = True
tmp = weight / divide_tensor
loss = tmp[0]
loss.backward()
print(weight.grad)

Expected behavior

I expect gradient [1., 0., 0.] because second and third elements of weight are not related to loss.

Environment

PyTorch version: 1.0.1

Is debug build: No

CUDA used to build PyTorch: 9.0.176

OS: Ubuntu 16.04.5 LTS

GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609

CMake version: version 3.5.1

Python version: 3.6

Is CUDA available: Yes

CUDA runtime version: 9.0.176

GPU models and configuration:

GPU 0: TITAN Xp

GPU 1: TITAN Xp

GPU 2: TITAN Xp

GPU 3: TITAN Xp

Nvidia driver version: 410.78

cuDNN version: Could not collect

Versions of relevant libraries:

[pip] numpy==1.16.4

[pip] torch==1.0.1

[pip] torchvision==0.2.1

[conda] _tflow_select 2.3.0 mkl

[conda] blas 1.0 mkl

[conda] mkl 2019.4 243

[conda] mkl-service 2.0.2 py36h7b6447c_0

[conda] mkl_fft 1.0.12 py36ha843d7b_0

[conda] mkl_random 1.0.2 py36hd81dba3_0

[conda] pytorch 1.0.1 cuda90py36h8b0c50b_0

[conda] tensorflow 1.13.1 mkl_py36h27d456a_0

[conda] tensorflow-base 1.13.1 mkl_py36h7ce6ba3_0

[conda] torchvision 0.2.1 py36_0

cc @ezyang @ssnl @albanD @zou3519 @gqchen

Issue 2:
🐛 Bug

nan propagates through computations during a backward() pass even if it wasn't accessed at all.

To reproduce

a = torch.arange(4, dtype=torch.float, requires_grad=True)
a.log()[-1].backward()
print(a.grad)

prints tensor([ nan, 0.0000, 0.0000, 0.3333])

Expected behavior

It should print tensor([0.0000, 0.0000, 0.0000, 0.3333]), like the following code does:

a = torch.arange(4, dtype=torch.float, requires_grad=True)
a[-1].log().backward()
print(a.grad)

The same should be true if [-1] is replaced with .max() (which causes the same entry to be accessed, in this particular example), which is how I originally encountered the issue.

Environment

Collecting environment information...
PyTorch version: 1.0.0a0+4c11dee
Is debug build: No
CUDA used to build PyTorch: 10.0

OS: Mac OSX 10.14.2
GCC version: Could not collect
CMake version: version 3.13.0

Python version: 3.6
Is CUDA available: No
CUDA runtime version: 10.0.130
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Probably one of the following:
/usr/local/cuda/lib/libcudnn.7.dylib
/usr/local/cuda/lib/libcudnn.dylib
/usr/local/cuda/lib/libcudnn_static.a

Versions of relevant libraries:
[pip] Could not collect
[conda] blas 1.0 mkl
[conda] mkl 2019.0 <pip>
[conda] mkl 2018.0.3 1
[conda] mkl-include 2019.0 <pip>
[conda] mkl-service 1.1.2 py36h6b9c3cc_4
[conda] mkl_fft 1.0.2 py36h6b9c3cc_0
[conda] mkl_random 1.0.1 py36h5d10147_1
[conda] torch 1.0.0a0+4c11dee <pip>
[conda] torchfile 0.1.0 <pip>
[conda] torchvision 0.2.0 <pip>
Issue 1:
In version 1.0.0-beta.19 a new syntax for specifying the transition of a dialog is documented as:

const Transition = props => <Slide direction="left" {...props} />
<Dialog transition={Transition} />;

In my attempt to keep up with the API change, I replaced my old code with an inline function:

<Dialog transition={props => <Slide direction="left" {...props}} />;

While this seemed to work at first, it took me quite some time to discover that when the dialog is closed, an invisible mask layer still remains, preventing any interaction with the HTML content below.

I think the new API change somewhat unclear. If Transition is a function, why does inline not work? If it is a component, shouldn't we have written the code as:

<Dialog transition={<Transition />} />;

Anyway, the Dialog should throw an error when an inline is used to prevent user from being bitten unexpectedly as I was. At the very least, the following quote from the issue #8858 should be retained in the changelog.

This breaking change increases the consistency of our API. Also, it's allowing a more strict typing definition that can help spotting issues. One important thing to notice is that the component creation needs to be outside of the render method. Otherwise, a new instance will be created and the animation will lose his state.

Issue 2:
My app break after updated to latest beta.

The dialog always shown. Previous version beta 18 don't have this issue

<Drawer
open={false}
type={window.innerWidth < 768 ? 'responsive' : 'persistent'}
anchor="right"
classes={{ paper: classes.paper, docked: classes.docked }}
>

/// content

</Drawer>

I've tried to set open to false still show the drawer.

Your Environment

Tech
Version

Material-UI
v1.0.0-19 beta

React
16

browser
Chrome

etc
Windows 10
Issue 1:
I have "window.reopenFolders": "all" set, and when I restart VS Code it correctly restores all the folders I had open. However, it restores them to the same OS X space, as opposed to the spaces they were originally in.

When VS Code is restarted it should try to restore the windows that were open to the spaces they were originally in.

Issue 2:
VSCode Version: 1.3.0-insiders

OS Version: 10.11.6

2481a7d

Steps to Reproduce:

Open a split screen editing instance with two C files, one that uses a function defined in the other.

Right click and hit "Go To Definition", this should move focus to the other already open file in the editor, not open another instance of the same file in the same side of the split.
Issue 1:
Please add a clipboard manager that lets you add and edit items in your clipboard. The most important keyboard is a hotkey that lets you use the first, second or third items in your clipboard

Issue 2:
Summary of the new feature/enhancement

Hi, everybody!

Is it possible to give us better configurations to the clipboard, like how many items, to move the used items to top of list or to keep/remove formatting?

Thank you, all!
Issue 1:
When using keyboard shortcuts the corresponding menu in the menu bar does not highlight. Pretty minor detail but inconsistent with other OSX applications.

For example when pressing command+s for save, the "File" menu should flash blue as feedback that a keyboard shortcut was pressed from that menu.

Issue 2:
Halp ticket

support/3c957af0c7a211e39af58f4647ff645a

As a Mac user, in general, I expect the appropriate menu bar item to flash blue (or, I guess the system highlight color) when I use a keyboard shortcut. Without this visual feedback, I constantly find myself second-guessing whether or not I've hit the keys for the shortcut hard enough to actually trigger the shortcut.
Issue 1:
A quick question to clarify an answer on StackOverflow:

Is Electron originally forked from NW.js, or is it just inspired by NW.js (if so, is it a fork of any existing repository) ?

Issue 2:
Output of node_modules/.bin/electron --version: v3.0.2

Operating System (Platform and Version): Windows 10 Pro 17134

Output of node_modules/.bin/electron --version on last known working Electron version (if applicable): v1.6.15

Expected Behavior

Reloading (Ctrl R) a BrowserWindow with backgroundColor set should display that background color until the page begins to load.

Actual behavior

Reloading (Ctrl R) a BrowserWindow with backgroundColor set displays white until the page begins to load.

To Reproduce

I've reproduced the issue in electron-quick-start by:

Adding style="background-color: transparent;" to index.html's body tag (pedantic, I know)

Adding backgroundColor: '#ffff0000', to main.js's BrowserWindow options

Alternatively, clone my fork of electron-quick-start:

$ git clone https://github.com/adill/electron-quick-start.git -b background-color-reload
$ npm install
$ npm start

Notice the red background color on the page (transparent body is showing through to the opaque red background.)

Reload (Ctrl R)

Notice the background color is now white
Issue 1:
Hi,

When trying to unmount my whole app, I got some error.

Uncaught TypeError: Cannot read property 'firstChild' of undefined

ReactMount.js:606ReactMount.findComponentRoot

ReactMount.js:606ReactMount.findReactNodeByID ReactMount.js:552getNode

ReactMount.js:128executeDispatch EventPluginUtils.js:109SimpleEventPlugin.executeDispatch

SimpleEventPlugin.js:305forEachEventDispatch EventPluginUtils.js:95executeDispatchesInOrder

EventPluginUtils.js:119executeDispatchesAndRelease EventPluginHub.js:46forEachAccumulated

forEachAccumulated.js:25EventPluginHub.processEventQueue

EventPluginHub.js:251runEventQueueInBatch

ReactEventEmitterMixin.js:18ReactEventEmitterMixin.handleTopLevel

ReactEventEmitterMixin.js:44handleTopLevelImpl ReactEventListener.js:80Mixin.perform

Transaction.js:134ReactDefaultBatchingStrategy.batchedUpdates

ReactDefaultBatchingStrategy.js:66batchedUpdates

ReactUpdates.js:109ReactEventListener.dispatchEvent ReactEventListener.js:175

I think it's not a big deal.

According to what I see with the debugger, it seems to be because a SyntheticMouseEvent is trying to get dispatched. And I guess the target has just been unmounted...

Note that my use case looks like this:

var Hello = React.createClass({
render: function() {
return <div onClick={unmount}>Hello {this.props.name}</div>;
}
});

When using an unmount synchronous implementation, I get this error.

When adding a setTimeout 0 in the unmount code, I got no error.

I could not reproduce this in a jsfiddle, but I guess it's probably because I don't really know how batching work in React.

Issue 2:
Suppose a Backbone View named A, which contains a React component B. In B(React) there's a button, clicking the button unnmounts B(React) and rerenders A(Backbone). In my case I got an error like:

Uncaught TypeError: Cannot read property 'firstChild' of undefined f163bb52.main.min.js:7

After looking into it, I found events still processing even after that component unmounted from DOM. By examining processingEventQueue I found that event is that click event to do all this.

/**
* Dispatches all synthetic events on the event queue.
*
* @internal
*/
processEventQueue: function() {
// Set `eventQueue` to null before processing it so that we can tell if more
// events get enqueued while processing.
var processingEventQueue = eventQueue;
eventQueue = null;
forEachAccumulated(processingEventQueue, executeDispatchesAndRelease); <-- error from here
("production" !== "development" ? invariant(
!eventQueue,
'processEventQueue(): Additional events were enqueued while processing ' +
'an event queue. Support for this has not yet been implemented.'
) : invariant(!eventQueue));
},

For now I added setTimeout(100ms) in my click handler and it became ok.

Is there any plan to fix this case and React will just work with a timeout?
Issue 1:
Could you add functionality to specify which console to open when using the ctrl+shift+c keyboard shortcut to run the command workbench.action.terminal.openNativeConsole

This would allow users to specify using Powershell over Cmd

Issue 2:
VS Code has an option to open a command prompt in a directory by right-clicking, but this is always cmd.exe on Windows. It would be nice if we could change this to powershell.exe through a setting.