WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
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

ngc produces not validated (un-typed) context within embedded template directives like *ngIf, *ngFor, etc.

Validated context (produces error when running ngc - expected behavior):

@Component({
selector: 'my-app',
template: '<h1>{{errorProperty}}</h1>'
})
export class AppComponent { }

Not validated context (does not produce error when running ngc - unexpected behavior):

@Component({
selector: 'my-app',
template: '<div *ngIf="false">{{errorProperty}}</div>'
})
export class AppComponent { }

Expected behavior

ngc produces error in the second example above.

Minimal reproduction of the problem with instructions

Run ngc with above examples 1 and 2.

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

Detects errors in complex templates during compile time.

Please tell us about your environment:

Angular version: 2.4.1

Browser: N/A

Language: [TypeScript 2.0.10 | ES6]

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

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

[X ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When implementing a directive that listens to @HostListener('click', ['$event']) and event.cancelBubble = true and a (click) is set to the same element as the directive the (click) does not respect the event.cancelBubble but still processes even though the event is first fired in the directive.

Expected behavior

Event should be canceled and not fired in the (click) event.

Minimal reproduction of the problem with instructions

Create a directive

Implement

@HostListener('click', ['$event'])

private onClick(event:MouseEvent):void

{

console.log("here 1");

event.cancelBubble = true;

}

Add directive to component

Add (click)="console.log('here 2')"

Output:

here 1

here 2

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

You want to stop the standard behavior on for example a long click.

Please tell us about your environment:

Windows 10, Visual Studio Code, Angular CLI

Angular version: 2.0.X

2.4.0

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

Chrome

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

TypeScript 2.X

Node (for AoT issues): node --version =
Issue 1:
Currently, I developing a component that requires both props and themes object.

At first, it works great with theme object

const styles = theme => ({
title: {
...theme.typography.headline,
textAlign: 'center',
padding: '8px 16px',
margin: 0,
color: theme.palette.common.white,
backgroundColor: theme.palette.primary[500],
},

withStyles(styles, { withTheme: true })(Component);
....

But I also need access to props in styles object.

I tried example but it not working.

{
....
display: (props) => props.display
}

I end up combine react-jss and withTheme to do that

import { withTheme } from 'material-ui/styles';
import injectSheet from 'react-jss';

function withStyles(styles, Component) {
return withTheme()(injectSheet(styles)(Component));
}

export default withStyles;

....

const styles = {
title: {
display: (props) => props.display,
textAlign: 'center',
padding: '8px 16px',
margin: 0,
color: ({ theme }) => theme.palette.common.white,
backgroundColor: ({ theme }) => theme.palette.primary[500],
},

It works but I really miss

title: {
...theme.typography.headline,

Issue 2:
Description

When using createStyleSheet, there is no way (at least that i know of) to access the component's props. I think this is important, as sometimes it is wanted to pass sizes, url images, and other stylings as props to the component.

Today the only solution to this is to separate these stuff into inline-styles, but as far as i know, material-ui v1 uses jss and react-jss, and those two already gives you the possibility of access the props via functions that receive the props and then return the desired style, like that:

const styles = {
button: {
background: props => props.color
},
root: {
backgroundImage: props => `url(${props.backgroundImage})`
}
}

// Reference: https://github.com/cssinjs/react-jss#example

What do you think of implementing something like that on material-ui too?
Issue 1:
Description of the problem

Works only in Chrome

If I use Raycaster to IntersectObject I can experience some unpredictable problem in extream slowdown of the raycasting.

To reproduce that problem you should somewhere in the code declare Vector3 with strings in it's properties. Just create such Vector3 not use it:

var test = new THREE.Vector3("foo", "bar", "baz")

jsfiddle (reproduced problem)

Try to move your mouse around to see your FPS while moving the mouse

Click "slowdown" button at the top right corner

Move your mouse again to see huge performance drop

In real life we do not put strings to Vector3 properties but sometime people can get some poor JSON output or some other issues where the problem will be revealed only when you trying to use Raycaster and those not easily fixed. Vector3 works well with strings like "1.234" but Raycaster will be slowed down in such cases. So the problem can be seamless. You should always parseFloat before you put values to Vector3

Three.js version

Dev

r100

...

Browser

[] All of them

Chrome

Firefox

Internet Explorer

OS

All of them

Windows

macOS

Linux

Android

iOS

Issue 2:
Description of the problem

So I'm not sure what to even call this... I guess an oddity more than anything. I noticed this on a site i have when my raycasting was way slower than i had expected in certain scenarios. Here is the easiest way to reproduce:

Use this example: https://threejs.org/examples/webgl_geometry_terrain_raycast

Move your mouse around and notice the fps (whatever it may be)

Open up the console and enter: var testVector = new THREE.Vector3("1",2,3);

Move your mouse around again... there should be a huge drop in fps (45 --> 15 for me on my computer)

Set testVector.x back to some float/integer after making it a string.. it wont fix anything.

I just don't understand what the heck is going on. Was it my fault for creating a vector 3 with a string? Probably. But i just don't get how doing something like this grenades the performance of the entire scene. Maybe you could force a parseFloat on vector data?

Im not sure if this bug makes all threejs actions slower or just raycasting, but that is where i noticed it the most.

Extra notes: Doing the same thing with vector2/vector4 does nothing.

Three.js version

Dev

r89 (example above)

r79 (my app)

Browser

All of them

Chrome

Firefox

Internet Explorer

OS

All of them

Windows

macOS

Linux

Android

iOS
Issue 1:
Environment

Windows build number: Win32NT 10.0.18362.0
Windows Terminal version (if applicable): 0.5.2762.0

Steps to reproduce

Sibling issue of #3080. Execute this:

echo -ne '\e[?12'; sleep 1; echo -ne '34h'

Expected behavior

As if the delay wasn't there, this should attempt to enable DEC private mode 1234, which is unsupported by WT (actually undefined), so no action should be taken.

Actual behavior

34h is printed, suggesting that parsing the sequence got interrupted.

Note that if the given number is supported (e.g. 1049 to switch to the alternate screen) then the sequence is parsed and executed correctly even when a delay is injected.

Update:

The same goes for unsupported CSI modes too, e.g. \e[22;0;0t (save title on stack) or \e[4l (replace mode).

Issue 2:
Environment

Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 0.6.2951.0_x64

Any other software?
* Powershell 7 Preview (x64)
* WSL - Ubuntu

Steps to reproduce

Open microsoft store

Search for terminal

Install terminal

Launch terminal

Expected behavior

Terminal launches

Actual behavior

An error message is displayed:

[Window Title]

C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe

[Content]

C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe

No applicable app licenses found.

[OK]
Issue 1:
Hi All,

I've got lambda function which I access via API Gateway.

This function works ok when I test it via Postman or via this test which uses request library:

it('shoudl work via request', async () => {

var options = { method: 'POST',
url: 'https://-----------.execute-api.eu-central-1.amazonaws.com/dev/generate',
headers:
{
'Cache-Control': 'no-cache',
'Content-Type': 'application/json' },
body:
{ html: 'PGgxPkhlbGxvIHt7bmFtZX19PC9oMT48aDI+SGVsbG8gd29ybGQhISE8L2gyPg==',
variables: 'eyJuYW1lIjoiV29ybGQiLCJwYXRoIjoiL2hvbWUvcGF3ZWwvLm52bS92ZXJzaW9ucy9ub2RlL3Y4LjExLjMvYmluOi91c3IvbG9jYWwvc2JpbjovdXNyL2xvY2FsL2JpbjovdXNyL3NiaW46L3Vzci9iaW46L3NiaW46L2JpbjovdXNyL2dhbWVzOi91c3IvbG9jYWwvZ2FtZXM6L3NuYXAvYmluOi91c3IvbGliL2p2bS9qYXZhLTgtb3JhY2xlL2JpbjovdXNyL2xpYi9qdm0vamF2YS04LW9yYWNsZS9kYi9iaW46L3Vzci9saWIvanZtL2phdmEtOC1vcmFjbGUvanJlL2JpbjovdmFyL3Rhc2sifQ==',
css: 'aDEge2NvbG9yOiByZWR9' },
json: true };

request(options, function (error, response, body) {
if (error) throw new Error(error);
expect(body.generated).toBeTruthy()
expect(body.pdf).toBeTruthy()
});
})

Problem

Unfortunately, when I'm using Axis I get following message Error: Cross origin http://localhost forbidden.

Could you please tell me what am I doing wrong?

My code looks like that:

it('should work via axios', async () => {
const event = {
html: "PGgxPkhlbGxvIHt7bmFtZX19PC9oMT48aDI+SGVsbG8gd29ybGQhISE8L2gyPg==",
variables: "eyJuYW1lIjoiV29ybGQiLCJwYXRoIjoiL2hvbWUvcGF3ZWwvLm52bS92ZXJzaW9ucy9ub2RlL3Y4LjExLjMvYmluOi91c3IvbG9jYWwvc2JpbjovdXNyL2xvY2FsL2JpbjovdXNyL3NiaW46L3Vzci9iaW46L3NiaW46L2JpbjovdXNyL2dhbWVzOi91c3IvbG9jYWwvZ2FtZXM6L3NuYXAvYmluOi91c3IvbGliL2p2bS9qYXZhLTgtb3JhY2xlL2JpbjovdXNyL2xpYi9qdm0vamF2YS04LW9yYWNsZS9kYi9iaW46L3Vzci9saWIvanZtL2phdmEtOC1vcmFjbGUvanJlL2JpbjovdmFyL3Rhc2sifQ==",
css: "aDEge2NvbG9yOiByZWR9"
}

await axios.post(url, event, {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
responseType: 'json',
withCredentials: true,
})
.then(function (response) {
console.log(response);
// console.log('ok')
expect(response.generated).toBeTruthy()
expect(response.pdf).toBeTruthy()
})
.catch(function (error) {
console.log(error);
});
})

Context

axios version: v0.18.0

Environment: node v8.11.3

Issue 2:
Summary

I have noticed that npm package includes the dist folder which contains both minified and full versions of axios. At the same time, the npm package itself is only using the lib folder. Is there a reason to ship pre-built versions via npm in addition to the library itself? The duplication adds around 200KB and requires a workaround when packaging axios for the AWS Lambda.

Context

axios version: latest
Issue 1:
The Keyboard Manager can map keys onto keys, and shortcuts onto shortcuts, but it would be good if it could also map shortcuts onto keys, and vice-versa. For example, I'd like to map ctrl-E onto Up Arrow, but that isn't possible in the current beta version.

Issue 2:
Summary of the new feature/enhancement

Ability to remap a single key (² for example, sleeping in the top left corner of my KB), and assign it for example to alt+space, in order to open powertoys run, or to "open a new terminal", or whatever
Issue 1:
Broadcasting a unitary operation like exp against a Symmetric matrix should be almost 2x faster since it only needs to process 1/2 the elements.

But instead is is almost 2x slower.

(So like 4x slower than expected)

julia> using LinearAlgebra

julia> using BenchmarkTools

julia> const data = Matrix(Symmetric(randn(2_000, 2_000)));

julia> @benchmark exp.($data)
BenchmarkTools.Trial:
memory estimate: 30.52 MiB
allocs estimate: 2
--------------
minimum time: 23.570 ms (0.00% GC)
median time: 24.860 ms (0.00% GC)
mean time: 27.109 ms (9.95% GC)
maximum time: 98.043 ms (70.41% GC)
--------------
samples: 185
evals/sample: 1

julia> @benchmark exp.($(Symmetric(data)))
BenchmarkTools.Trial:
memory estimate: 30.52 MiB
allocs estimate: 2
--------------
minimum time: 37.712 ms (0.00% GC)
median time: 38.774 ms (0.00% GC)
mean time: 41.895 ms (7.72% GC)
maximum time: 115.427 ms (59.57% GC)
--------------
samples: 120
evals/sample: 1

Issue 2:
Currently, map and broadcast on Symmetric arguments don’t take advantage of the fact that you only have to compute n*(n+1)/2 elements of the output matrix instead of n^2elements. For big matrices, this can leave a lot of performance on the table.
Issue 1:
PowerToys Run should allow + shortcuts

Proposed technical implementation details (optional)

Issue 2:
Environment

Windows build number: 10.0.17763.737
PowerToys version: 0.12.0.0
PowerToy module for which you are reporting the bug (if applicable): N/A

Steps to reproduce

Difficult to reproduce as it seems to not happen instantly. On both my home PC and my work PC, while PowerToys is running, my number row stops working. I can't use the shift key to enter the symbols on the number keys or use the numbers at all. Nothing happens when hitting one of these keys.

As soon as I close PowerToys, the number row is once again available to use. I can then open PowerToys again and use the number row fine for a while until it randomly decides to stop the number keys from working again.

Expected behaviour

To be able to use my number keys :P

Actual behaviour

???

Screenshots

N/A
Issue 1:
This code causes an ICE:

fn main() {
println!("x");
return;
let test = if x() { 1 } else { 2 };
}

fn x() -> bool { unreachable!() }

complaining that the the test variable isn't an alloca. This is true, since we don't output any LLVM IR for unreachable code, which is everything after the return. For some reason, this only happens with if expressions (or at least, it doesn't happen with plain expressions or ordinary blocks) on the RHS.

Issue 2:
error: internal compiler error: debuginfo::create_local_var_metadata() - Referenced variable location is not an alloca!

Test.rs:131 let take = if num_items <= split_by {

^~~~

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html

note: run with RUST_BACKTRACE=1 for a backtrace

thread 'rustc' panicked at 'Box', C:\bot\slave\nightly-dist-rustc-win-64\build\src\libsyntax\diagnostic.rs:130
Issue 1:
When a key binding on Windows matches a menu shortcut, such as the file menu's "Alt-f", the menu drops down and the bound command runs after the menu is dismissed.

This makes it impossible to map keys like Alt-f, Alt-n, etc. which are common readline, bash, emacs, keys.

This is critical for people that use more than one platform and want to use a single set of key bindings by key location. For example a Mac Cmd key is in the same physical location as a Windows Alt key. To make a set of Windows bindings that mimic Mac Cmd bindings one would use Alt. I would dearly like to switch to Atom on my Windows laptop and VMs but I really want to use the same set of key bindings.

Issue 2:
I'm on Windows 7, Atom version 0.113.0.

When I use Alt+Shift+S, I get two menu - both the Alt+S menu and the Alt+Shift+S menu. Alt seems to underline the menu options that can be selected next (F for File, E for Edit, etc.) but that underlining, and the ability to select a menu option, should go away if the next pressed key is not one of the menu options. Other windows apps like MS Word work this way. Below is the screen shot of the result of press Alt+Shift+S - I get both the menu dropdown for Selection and the Snippet window.
Issue 1:
Declaring a const a second time in a switch should be possible if the second statement is unreachable.

testytest = () => {
switch (foo) {
case a:
const bar = 'foo';
return bar;
case b:
const bar = 'baz';
return bar;
}
}

Throws error Duplicate declaration "bar"

Issue 2:
Issue originally reported by @ssilve1989 in babel/babel-preset-env#411

Specifying a target of "safari >= 10" doesn't use the transform-es2015-block-scoping plugin. Yet Safari 10 does need this because of this bug.

Ex:

{
let a = 3
}

let a = 3

is an error in Safari 10.1.2 resulting in SyntaxError: Can't create duplicate variable that shadows a global property: 'a'.

I've had to manually include this plugin in the include option to get Safari working.
Issue 1:
ℹ Computer information

PowerToys version: 0.23

PowerToy Utility: Remap

Running PowerToys as Admin: Yes

Windows build number: [run "winver"] 1903.18362.592

📝 Provide detailed reproduction steps (if any)

I miss my mac and so I remap the left Ctrl <--> Win keys.

With Firefox, Win+L doesn't activate the address bar anymore.

The remapping causes Windows some headaches as often, typing letter keys, triggers Windows shortcuts instead of the intended letters.

✔️ Expected result

It should work as expected, but maybe it's not possible due to Windows internals.

❌ Actual result

Sometimes you get some messy results with a lot of windows open because typing letters triggered some Windows shortcuts.

📷 Screenshots

Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form

Issue 2:
Environment

Windows build number: Microsoft Windows [Version 10.0.18363.836]
PowerToys version: 0.18.0
PowerToy module for which you are reporting the bug (if applicable): Power Launcher

Steps to reproduce

Start PowerToys

Expected behavior

Using a lot less memory

Actual behavior

Consuming over 400mb memory even not actually using Power Launcher seems excessive. Is this normal?

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

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.7 及其之前的版本

Steps to reproduce this issue

贴出源码

private final ConcurrentMap<String, Object> locks = new ConcurrentHashMap<>();

private List<ReferenceCountExchangeClient> getSharedClient(URL url, int connectNum) {
String key = url.getAddress();
// 略去无关代码

// 【1】
locks.putIfAbsent(key, new Object());

// 【2】
synchronized (locks.get(key)) {
clients = referenceClientMap.get(key);
if (checkClientCanUse(clients)) {
batchClientRefIncr(clients);
return clients;
}
connectNum = Math.max(connectNum, 1);
if (CollectionUtils.isEmpty(clients)) {
clients = buildReferenceCountExchangeClientList(url, connectNum);
referenceClientMap.put(key, clients);
} else {
for (int i = 0; i < clients.size(); i++) {
ReferenceCountExchangeClient referenceCountExchangeClient = clients.get(i);
if (referenceCountExchangeClient == null || referenceCountExchangeClient.isClosed()) {
clients.set(i, buildReferenceCountExchangeClient(url));
continue;
}
referenceCountExchangeClient.incrementAndGetCount();
}
}

// 【3】
locks.remove(key);
return clients;
}
}

问题描述：

注意上述 【1】、【2】、【3】处代码

假设这种情况：并发环境下，线程 A、B 持有相同的 key，执行到该方法时。如果 A 执行到 同步块中，并在 locks.remove(key) 真正 remove 之前，线程 B 刚好执行到 locks.putIfAbsent(key, new Object())。

当 B 执行完该语句后，在 B 执行 locks.get(key) 之前，正好 A remove 完成。

此时，B 执行到 locks.get(key) 将拿到 null，此时 抛出 NPE

问题提出：

查看过历史 issue 后，使用 ConcurrentHashMap 解决了历史版本中 key.intern() 潜在性的死锁问题，但是随之也可能会有上述的 NPE 问题，所以这是被允许的吗?

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

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: xxx

Operating System version: xxx

Java version: xxx

Steps to reproduce this issue

xxx

xxx

xxx

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!
Issue 1:
hi

when i setting file_urls "http://m.baidu.com/api?action=redirect&token=kpyysd&from=1014090y&type=app&dltype=new&refid=2650327114&tj=soft_5845028_88031597_%E8%AF%AD%E9%9F%B3%E6%90%9C%E7%B4%A2&refp=action_search&blink=da5b687474703a2f2f7265736765742e39312e636f6d2f536f66742f436f6e74726f6c6c65722e617368783f616374696f6e3d646f776e6c6f61642674706c3d312669643d34313034393931c658&crversion=1"

this url redirect 3 times so when i use scrap download it the scrapy retrun 302 how can i setting it can working ? please help me!

Issue 2:
Basically, what's happened is that my spider is unable to download the files because the file_urls provided are actually redirected to the final download link. However, because of the following code, the redirect download middleware is effectively disabled, which makes the download fail.

def _check_media_to_download(self, result, request, info):
if result is not None:
return result
if self.download_func:
# this ugly code was left only to support tests. TODO: remove
dfd = mustbe_deferred(self.download_func, request, info.spider)
dfd.addCallbacks(
callback=self.media_downloaded, callbackArgs=(request, info),
errback=self.media_failed, errbackArgs=(request, info))
else:
request.meta['handle_httpstatus_all'] = True
dfd = self.crawler.engine.download(request, info.spider)
dfd.addCallbacks(
callback=self.media_downloaded, callbackArgs=(request, info),
errback=self.media_failed, errbackArgs=(request, info))
return dfd

And here is the check in the redirect middleware that disables it:

if (request.meta.get('dont_redirect', False) or
response.status in getattr(spider, 'handle_httpstatus_list', []) or
response.status in request.meta.get('handle_httpstatus_list', []) or
request.meta.get('handle_httpstatus_all', False)):
return response

My question is: What is the point of enabling the handling of httpstatus_all, when it effectively disables all of the checks?
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

https://github.com/zeit/next.js/tree/canary/examples/with-i18next should run when I run yarn && yarn dev

Current Behavior

I get the following error:

TypeError: Cannot read property 'node' of undefined
at Object.<anonymous> (/Users/julia/with-i18next/node_modules/react-i18next/dist/commonjs/interpolate.js:100:29)
at Module._compile (module.js:570:32)
at Module._compile (/Users/julia/with-i18next/node_modules/source-map-support/source-map-support.js:492:25)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/julia/with-i18next/node_modules/react-i18next/dist/commonjs/index.js:12:20)

Steps to Reproduce (for bugs)

yarn && yarn dev

Open localhost:3000

Context

Your Environment

Tech
Version

next
latest

node
6.10.0

OS
10.12.5

browser
62.0.3202.94

etc

Issue 2:
Changing the hash in the URL causes getInitialProps to be fired, which I think should've been fixed in this PR. See the following example repo: https://github.com/ldthorne/nextjs-back-reproduction.

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

Expected Behavior

If the user clicks the go somewhere link that leads to an anchor -- which will add a hash to the url -- and then clicks the back button, getInitialProps should not be called.

Current Behavior

If the user clicks the go somewhere link that leads to an anchor -- which will add a hash to the url -- and then clicks the back button, getInitialProps is called.

Steps to Reproduce (for bugs)

Clone repo: https://github.com/ldthorne/nextjs-back-reproduction.

yarn.

Open dev tools.

Click the go somewhere link. Notice that nothing is logged.

Click the browser's back button. Notice that getInitialProps is logged.

Your Environment

Tech
Version

next
3.0.6

node
8.1.2

OS
macOS 10.12.6

browser
All