WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Make sure these boxes are checked before submitting your issue - thank you!

I have checked the superset logs for python stacktraces and included it here as text if any

I have reproduced the issue with at least the latest released version of superset

I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

0.20.1

Expected results

Can use % wildcard in custom WHERE clause

Actual results

% wildcard gets duplicated when included in the custom where clause

Steps to reproduce

Create a slice

Add a custom query to the "custom WHERE clause" section that includes a wildcard

Click "view query"

Observe that the wildcard is duplicated

Screenshot (observe the where field in the background):

Issue 2:
Name change for chart is not reflected on chart view without refresh and After click on ALTERED then we see white screen and error in the console.

Expected results

New name should be displayed. Altered should show the difference.

Actual results

Old name is displayed. Unhandled error after click on altered. @junlincc

Screenshots

How to reproduce the bug

Go to charts

Click on any chart

edit chart title and save

see that name has not changed

click on altered

see that white screen is dispplayed

Environment

(please complete the following information):

built with docker-compose up

master commit f121107

Checklist

Make sure to follow these steps before submitting your issue - thank you!

I have checked the superset logs for python stacktraces and included it here as text if there are any.

[x ] I have reproduced the issue with at least the latest released version of superset.

[ x] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context
Issue 1:
What is the expected behavior of the proposed feature? What is the scenario this would be used?

I would really like to go from A to B with a single shortcut

A

B

I really enjoyed this feature while using i3 and would love to see it implemented in windows. It is how I most often maintained productivity during class

If you'd like to see this feature implemented, add a 👍 reaction to this post.

Issue 2:
The Shortcut Guide shows the Windows Key shortcuts.

However, Shortcut Guide also needs to show the PowerToys Shortcuts too.

So that we can learn how to use PowerToys more efficiently.
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

There seems to be no way to focus a FormControl.

Expected behavior

FormControl provides a .focus() instance method, or access to the native HTML element.

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

To give input focus to a control when it is invalid, as in the following example:

if (!this.form.valid) {
let invalid = <FormControl[]>Object.keys(this.form.controls).map(key => this.form.controls[key]).filter(ctl => ctl.invalid);
if (invalid.length > 0) {
// Give input focus to invalid[0]... how?
}
return false;
}

Please tell us about your environment:

Angular version: 2.2.1

Browser: N/A

Language: TypeScript 2.0.3

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

Suggestion

Create an API on FormControl that would easily allow the input to be focused without having to resort to bringing in Renderer or ElementRef.

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

This could be used widely to either easily focus the first input in a form after it is rendered, or focus inputs which have invalid data entered into them.
Issue 1:
🐛 Bug

torch.Tensor is creating tensor only on CPU. The device argument isn't working

To Reproduce

Steps to reproduce the behavior:

Expected behavior

torch.Tensor should create tensor on cuda:0 device

Environment

Google Colaboratory + Python 3 + GPU

Collecting environment information...

PyTorch version: 0.4.1

Is debug build: No

CUDA used to build PyTorch: 9.0.176

OS: Ubuntu 17.10

GCC version: (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0

CMake version: Could not collect

Python version: 3.6

Is CUDA available: Yes

CUDA runtime version: Could not collect

GPU models and configuration: GPU 0: Tesla K80

Nvidia driver version: 384.111

cuDNN version: Could not collect

Versions of relevant libraries:

[pip] Could not collect

[conda] Could not collect

Issue 2:
Issue description

torch.LongTensor silently ignores device='cuda' parameter

Code example

import torch

i = torch.LongTensor(3, device='cuda')
assert i.is_cuda

Output:

Traceback (most recent call last):
File "tmp_prog/test.py", line 4, in <module>
assert i.is_cuda
AssertionError

System Info

PyTorch version: 0.4.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.10) 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: Tesla M60
Nvidia driver version: 384.130
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.5.1.10
/usr/lib/x86_64-linux-gnu/libcudnn.so.6.0.21
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.0.3
/usr/lib/x86_64-linux-gnu/libcudnn_static_v5.a
/usr/lib/x86_64-linux-gnu/libcudnn_static_v6.a
/usr/lib/x86_64-linux-gnu/libcudnn_static_v7.a

Versions of relevant libraries:
[pip] numpy (1.14.3)
[pip] torch (0.4.1)
[pip] torchtext (0.2.3)
[pip] torchvision (0.2.1)
[conda] pytorch 0.4.1 py36_cuda9.0.176_cudnn7.1.2_1 pytorch
[conda] torchtext 0.2.3 <pip>
[conda] torchvision 0.2.1 py36_1 pytorch
Issue 1:
In the sparse case, preprocessing.binarize always converts the input matrix to CSR format. For COO and CSC, the data attribute can also be accessed directly so in those cases there's no reason to convert to CSR. (CSC is especially useful for coordinate descent algorithms)

Issue 2:
This is a placeholder issue for sparse matrices support in the Histogram-based GBDT estimators.

I guess #15550 should be tackled first.

Below are my thoughts and potential plan on the matter, feel free to ignore.

Binning:

We need a utility to compute quantiles on sparse data, and we need to map a float sparse matrix to a binned sparse matrix given those quantiles. To avoid having to densify X_binned, the zeros in X should be mapped to bin 0, even if that's not their actual bin (called actual_bin_zeros). I guess that means all the bins in range(0, actual_bin_zeros) have an offset of 1, i.e. now they're actually mapped to range(1, actual_bin_zeros + 1). Though maybe we can avoid the offset by distinguishing between explicit and implicit zeros, IDK.

Histograms:

We need a histogram builder that can handle sparse data and that is aware of actual_bin_zeros in some way. We can't just build the histograms as usual, because that would mean that the zeros would be treated as the lowest value in the splitter. In the histogram, the zeros should be placed in their proper bin, i.e. at index actual_bin_zeros. This way, the splitter can be left unchanged. The offset of the bins in range(1, actual_bin_zeros) should also be canceled here.

When building a histogram, we can focus only on the non-zeros entries. We already know the totals sum_gradients, sum_hessians, and count at any given node. So we can just go through the samples that have non-zero values and fill-in the histogram at their respective bins, and then set hist[actual_bin_zeros]['grad'] = total_sum_gradients - hist[:]['grad'].sum().
Issue 1:
I'm submitting a bug (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

Binding to an input's type causes number value accessor in forms to not work as expected.

Expected behavior

Same as when not binding to the input's type.

Minimal reproduction of the problem with instructions

Run Plunker

Enter number in left input, note "Type of age" is number.

Modify number in right input, note "Type of age" is now a string.

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

I would be more convenient to not have to parse the string. In a simple form, parsing the string into a number is not a problem. The problem arises when you have more complex forms that are being generated at run-time. Ideally, once a form is valid, I want to be able to just access it's value, JSON stringify it, and POST it to some API without having to muck about with it.

Please tell us about your environment:

I don't think it matters for this issue.

Angular version: 2.0.X

Version 4.0.1

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 57.0.2987.133

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

TypeScript 2.2

Issue 2:
in creating a options list that allows the user to change different settings i found a problem with the type checkbox . take this component

(function(app){
app.testing=ng.core.Component({
selector:"testing",
template:"<input type='checkbox' [(ngModel)]='testing'/>"+
"<template ngFor #item [ngForOf]='list'>"+
"<input [type]='item.type' [(ngModel)]='item.value'/>"+
"</template>"
}).Class({
constructor:[function(){
this.testing=true;
this.list=[
{type:"checkbox",value:true},
{type:"text",value:"hello world"}
];
}],
});
})(window.app||(window.app={}));

because of the ngFor loop combining with the dynamic setting of inputs and their types ngModel does not work on the second checkbox although it does on the first which is not dynamically set. im guessing this is a problem with how ngModel determines that the input is type checkbox. a example of this can be found here

sorry to those of you who work in typescript i was not able to use typescript so it is in plain es5. i hope you can still interpret what its meaning and maybe someone can translate it to typescript.
Issue 1:
Hi,

Why don't implemented internal class in typescript?

Element.ts:

namespace Library {
export class Element {
//....
}
}

SelectElement.ts:

namespace Library{
export class SelectElement extends Element {
//....
}
}

Program.ts:

namespace Library{
export class Program {
var selectElement = new Library.SelectElement();
var element = new Library.Element();
}
}

If i put to export keyword before Element class, other developer can access to Element class, but i remove export keyword i don't use Element class in Library namespace. Does internal class will be able to use now or next version?

Issue 2:
Currently to protect integrity of data one can only use classes with private or protected fields. Classes are harder to work with compared to object literals. Being able to specify that certain fields are invisible to outside modules would be a valuable addition to support programming in functional style in TypeScript.

So what I am suggesting is to be able to specify whether a field of an interface is exported from a module or not. This also means that the instance of such interface can only be created within the module it is declared.

The similar features can be found in:

F# called signature files: http://msdn.microsoft.com/en-us/library/dd233196.aspx

Haskell called export lists: http://www.haskell.org/onlinereport/modules.html
Issue 1:
Ussama Baggili opened SPR-5743 and commented

In web.xml, using the following fails to register all the mappings:

<context-param>

<param-name>contextConfigLocation</param-name>

<param-value>

/WEB-INF/applicationContext*.xml

</param-value>

</context-param>

<listener>

<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

</listener>

<servlet>

<servlet-name>security-ws</servlet-name>

<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

<init-param>

<param-name>contextConfigLocation</param-name>

<param-value></param-value> <----------------------------------------------- empty value

</init-param>

<load-on-startup>1</load-on-startup>

</servlet>

while using the following without the global context-param for contextConfigLocation succeeds:

<servlet>

<servlet-name>security-ws</servlet-name>

<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

<init-param>

<param-name>contextConfigLocation</param-name>

<param-value>/WEB-INF/applicationContext*.xml</param-value>

</init-param>

<load-on-startup>1</load-on-startup>

</servlet>

Affects: 3.0 M3

Issue Links:

#10041 @Controllers deployed in the root Spring context not auto-detected by default annotation handler mapping ("duplicates")

Issue 2:
Scott Rankin opened SPR-2278 and commented

In RC1, when the DefaultAdvisorAutoProxyCreator is initialized, it finds and initializes all candidate advisors (code is in AbstractAdvisorAutoProxyCreator.setBeanFactory()). This code has the effect of initializing my Hibernate SessionFactoryBean before any other beans come along and need it.

In RC2, the code to pre-load candidate advisors has been removed. What this seems to produce is a circular dependency. When my application beans try to request the Hibernate SessionFactoryBean, it goes through a lot of dependencies, including the AutoProxyCreator, which depends on the TransactionSourceAdvisor, which depends on the TransactionInterceptor, which depends on the SessionFactoryBean. And so I get a NPE trying to instantiate the autoproxy creator.

This only seems to happen if the first bean in the XML file references the session factory. If I move the bean that references the session factory to below it, the problem goes away.

Affects: 2.0 RC2

Attachments:

spring-beans.xml (2.49 kB)

TestSpringBug.java (822 bytes)

Issue Links:

#6972 NPE in AbstractAutoProxyCreator when using RC2 ("is duplicated by")

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

[x] bug report
[ ] feature request
[ ] support request

Current behavior

See API guide for ContentChild.

The example in that guide page attempts to illustrate ContentChild by showing a directive that extracts child content.

How does a directive - which lacks a template - extract child content (or a child view)? From what? The example itself is unclear, perhaps nonsense?

It did reveal that ngAfterContent... and ngAfterView... hooks are called on a directive. Why? How would I use them?

This all came up in an issue filed in angular.io about our lifecycle hook documentation where I asserted that these hooks really don't apply to directives.

I replied with some sample code there ... code that is a slight tweak of that documentation chapter's plunker.

Can elaborate if need be.

Issue 2:
I'm submitting a ... Hard to say....

Current behavior

ngAfterContentInit

ngAfterContentChecked

ngAfterViewInit

ngAfterViewChecked

Fire on directives.

Expected/desired behavior

According to the docs these lifecycle hooks are Components only

ngAfterContentInit

ngAfterContentChecked

ngAfterViewInit

ngAfterViewChecked

The compiler registers them to invoke on directives as well.

The view factory of a component containing a directive will invoke the lifecycle hook on that directive. This is not by change, this is by intent from the compiler as it requires accessing the directive instance and calling the hook within the detectChangesInternal method.

Here's a plunker

I can only assume the docs are incorrect...
Issue 1:
We should be making preview releases on npm available, preferably in an automated fashion.

As discussed a bit on #1818.

Seems like this should have the 1.5 milestone (but should begin prior to 1.5's release, as would be appropriate).

Issue 2:
TypeScript in master contains many new and interesting features. It would be great if pre-release versions could be installed via npm. This would hopefully help get more testing and exposure for these features for downstreams who can tolerate the risks.

eg. via

npm install typescript@future
Issue 1:
Hi,

I am using Vis Network with Vue.js and I created two very simple applications, but none of them is working properly.

1) The first app is here: https://jsfiddle.net/Filip_Z/9k2s3dgj/4/

The problem is that it cannot delete only the first node (with id=0). All of the other nodes can be deleted.

In the browser console there are no errors.

Vue.component('ovs-network', {
template: "#mytmp",
data() {
return {
network: null,
nodes: [
{ id: 0, label: '0' },
{ id: 1, label: '1' },
{ id: 2, label: '2' },
{ id: 3, label: '3' },
{ id: 4, label: '4' }
],
edges: [],
options: {
manipulation: {
enabled: true,
initiallyActive: true,
deleteNode: function (deleteData, callback) {
callback(deleteData)
}
}
},
container: ''
}
},

mounted() {
this.container = document.getElementById('mynetwork');
var data = {
nodes: this.nodes,
edges: this.edges
};
this.network = new vis.Network(this.container, data, this.options);
}
});

const app = new Vue({
el: '#app'
});

2) The second app is here: https://jsfiddle.net/Filip_Z/3ead4r51/1/

The problem is that after applying the setData method, wrong labels are displayed. As you can see in the example, when you click on the button - this Vue method will be executed:

updateData() {
var nodes = [
{ id: 0, label: '0' },
{ id: 1, label: '1' },
{ id: 4, label: '4' }
];

this.network.setData({ nodes: nodes, edges: []});
console.log('Updated!');
this.disabled = true;
}

So there will be three nodes but, for some reason, all these nodes will have the same label: '4'.

In the browser console there are no errors.

Now, I'm not sure where the problem is (Vue or Vis).

Issue 2:
Hi,

In which case Vis changes the color of nodes to red?

I have created a very simple app using Vue.js & Vis Network. You can take a look at it here: https://jsfiddle.net/Filip_Z/2ewtzh7w/1/

For some reason, when I add a new edge - all nodes become red and every newly added edge will overlap with the existing one:

Now, here is the same version of this app without Vue: https://jsfiddle.net/Filip_Z/63jcj26y/2/

... and there is no this problem. But, the problem for me is that there are no errors in the browser console and I cannot figure out why is this happening. Do you know in what case Vis changes the color of nodes to red (and every newly added edge will overlap with the existing ones), in which cases Vis behaves like that? I'm asking because I don't know how to debug/solve this, I have no idea what is causing this behavior.
Issue 1:
Almost all the doc examples in numpy.polynomial.polynomial begin with

>>> import numpy.polynomial as P

but it should actually be:

>>> import numpy.polynomial.polynomial as P

Issue 2:
In most of the functions in polynomial.polynomial you can read this line:

>>> from numpy import polynomial as P

and then:

>>> P.polyline(1,-1)
>>> sum = P.polyadd(c1,c2); sum
>>> P.polysub(c1,c2)
>>> P.polyder(c) # (d/dx)(c) = 2 + 6x + 12x**2
[...]

https://github.com/numpy/numpy/blob/v1.7.1/numpy/polynomial/polynomial.py

but all these lines fail because all those members are part of the polynomial module in the polynomial package. It should be therefore like:

>>> P.polynomial.polyline(1,-1)
>>> sum = P.polynomial.polyadd(c1,c2); sum
>>> P.polynomial.polysub(c1,c2)
>>> P.polynomial.polyder(c) # (d/dx)(c) = 2 + 6x + 12x**2
[...]

Nevertheless, this looks like a bit too long for me and I wonder if it would be possible to import some convenience functions using power series polynomials (polynomial.polyfit and things like that) directly into the polynomial package namespace.

I wrote "polynomial" too many times already :)
Issue 1:
VSCode Version: 0.10.11

OS Version: Ubuntu 14.04

Theme: Dark+ (dark default)

Steps to Reproduce:

Create file test.js

Add code to test.js

var a = 1, b = 2,
c = 3, d = 4;

The a and b variables get colored (light blue on this theme), the c and d variables get no color (white on this theme).

Also, whe you use the variable it get no special color, but I'm not sure if this is intended. I would prefer it colored as well.

All variables get no color, nor the console.log (the hole line is white on this theme):

console.log(a,b,c,d);

Issue 2:
From @vsccarl on March 10, 2016 1:2

When defining multiple var in JavaScript the colorization is not working properly after the first defined variable if they are on separate lines.

var wm1 = new WeakMap(), wm2 = new WeakMap(), wm3 = new WeakMap();

On the same line they are correctly colorized

Expected: wm2 and wm3 should be the same color as wm1 regardless of the line they are on.

Version 0.10.12-alpha

Commit e8d5a7932b99f6b7559d48536bfc84732bfc8582

Date 2016-03-09T09:53:18.387Z

Shell 0.35.6

Renderer 45.0.2454.85

Node 4.1.1

Copied from original issue: microsoft/vscode#3940
Issue 1:
Feature request

I'm writing a Next app on Windows and deploying it on Elastic Beanstalk. The deployment process involves running next build locally and then deploying the necessary files along with the .next folder to Elastic Beanstalk. However, this isn't possible since the files in the .next build folder use os-specific directory separators, making any build from a Windows machine incompatible with one on a Linux machine.

What I'd like to see done is have a configuration option that would allow you to specify the directory separator used in build files to either the system default, /, or \. or preferrably, replace the directory separators at runtime to support the build in any operating system.

While running next build is still an option, I've personally had issues with permissions doing while building locally works, that is, after manually changing all the directory separators in the config files in the .next folder.

EDIT: after posting this last night, I thought it over and realized that just making the changes at runtime when parsing the build folder would be more user intuitive.

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

Assuming the code below and an ID param of 1, when this Link is clicked the URL should be masked as speaker/1, with the Link navigating via query params, i.e. speaker?id=1

<Link prefetch href={`/speaker?id=${this.props.id}`} as={`/speaker/${this.props.id}`} >
<div>some content</div>
</Link>

This code updates the URL correctly as speaker/1 but does not navigate anywhere.

Also, the query params are not working. When I try to manually navigate to a page via query params it does not work. I've tested out using query params with other pages in the app and it is working fine.

When I take away the query params from the 'href' attribute and remove the 'as' attribute, the navigation works, except that a 404 page flickers for a moment on page load.

(i.e. <Link href={`/speaker/${this.props.id}`> )

I have heard of others with the same issue, but I haven't found a solution that works.

For reference, the following is the routing on the server:

app.prepare()
.then(() => {
const server = express()

server.get('/speaker/:id', (req, res) => {
const actualPage = '/speaker';
const queryParams = { id: req.params.id };
app.render(req, res, actualPage, queryParams);
})

server.get('*', (req, res) => {
return handle(req, res)
})

server.listen(3000, err => err ? console.log(err) : console.log(`Server listening on http://localhost:${port}`));
})
.catch((ex) => {
console.error(ex.stack)
process.exit(1)
})