WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
CanActivate hooks are currently executed in order of child -> parent. This causes problems when the child route's CanActivate depends on data that is set by the parent's CanActivate. An example might be the checking of current user permissions in the child CanActivate when the current user will not be bootstrapped until the parent's CanActivate is called.

Is this by design? It would seem more logical to have this perform the way OnActivate does (from parent -> child).

Issue 2:
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

I have this ngFor reading data from a Firebase database:

<div *ngFor="let post of myPosts | async" >

myPosts is of type FirebaseListObservable

Each time a new post is being pushed, all of the posts elements are being re rendered.

Expected/desired behavior

Only the newly pushed post would render.

Please tell us about your environment:

Angular version: 2.0.0-rc.4
Issue 1:
TypeScript Version:

nightly

Code

class A {
get a(): this is A {
return true
}
}

Expected behavior:

The getter type guard should not complain

Actual behavior:

tsc
Library/DataStore.ts(55,27): error TS1228: A type predicate is only allowed in return type position for functions and methods.
Library/DataStore.ts(103,20): error TS1228: A type predicate is only allowed in return type position for functions and methods.

Issue 2:
Angular/Typescript teams discussed this in person.

Angular 2 includes a template parser, and an expression language which may be used in places in the template.

We would like to translate the template to a TypeScript buffer, and pass the buffer to the language services for things like producing semantic errors, requesting intellisense, and the other usual editor features.

However, the template has a backing class (actually a virtual class per @tbosch ) where the fields may be referenced by template expressions. In our canonical example,

@Component({selector: 'greet', template: 'Hello {{name}}!'})
class Greet {
name: string;
constructor() {
this.name = 'World';
}
}

The template could be represented in TypeScript with the expression

`Hello ${this.name}`

In order to get intellisense or errors for that expression, we need to evaluate it in a place where this.name is defined. The obvious way to do this is for us to pass a "detached buffer", meaning a range of the SourceFile which lives outside the file content. It could look like (just a wild stab at possible syntax):

__template_eval(): string { return `Hello ${this.name}`; }

as if this code existed inside the Greet class.

Also we would expect any ranges in the result to give the pos and width locations relative to the buffer we passed, not the Greet class.
Issue 1:
If you know how to fix the issue, make a pull request instead.

I tried using the @types/react 16.0.17 package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).

Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @....

interface LinkHTMLAttributes extends HTMLAttributes {

as?: string;

href?: string;

hrefLang?: string;

integrity?: string;

media?: string;

rel?: string;

sizes?: string;

type?: string;

as?: string;

}

Issue 2:
I tried using the @types/phantomjs & @types/node package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).

Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @keesey

When attempting to compile phantom js file and node js I am met with the following error

node_modules/@types/node/index.d.ts(84,13): error TS2300: Duplicate identifier 'require'.
node_modules/@types/phantomjs/index.d.ts(6,18): error TS2300: Duplicate identifier 'require'.

By the looks of it the require definition is clashing with the node require definition. Is there anything I can do about this?
Issue 1:
I'm trying to use ng2 with ng1 so use ngUpgrade.

But type definitions conflict.

error TS2403: Subsequent variable declarations must have the same type. Variable '$' must be of type 'cssSelectorHelper', but here has type ‘JQueryStatic’

angularjs/angular.d.ts (https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/angularjs/angular.d.ts)

angular2 (npm-bundled definitions)

Cannot I use angularjs and angular2 together with typescript?

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

[x] feature request

Current behavior

The *.ngfactory.ts files generated by ngc are huge. In my case 1.5MB in total (80 Components). And the code doesn't become much smaller with minify/mangle as there is this. before 95% of all statements.

Example Component: gist.github.com/sod/049ce...

ngc output for that component: gist.github.com/sod/ca6dc...

If I transcode & mangle this factory alone, the output is 66kb for this one component.

Expected/desired behavior

More minify friendly output of ngc.

Angular version: 2.0.0-rc.5
Issue 1:
Challenge Waypoint: Change the CSS of an Element Using jQuery has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<script>
$(document).ready(function() {
$("#target1").css("color", "red");
});
</script>

<!-- Only change code above this line. -->

<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
<div class="col-xs-6">
<h4>#left-well</h4>
<div class="well" id="left-well">
<button class="btn btn-default target" id="target1">#target1</button>
<button class="btn btn-default target" id="target2">#target2</button>
<button class="btn btn-default target" id="target3">#target3</button>
</div>
</div>
<div class="col-xs-6">
<h4>#right-well</h4>
<div class="well" id="right-well">
<button class="btn btn-default target" id="target4">#target4</button>
<button class="btn btn-default target" id="target5">#target5</button>
<button class="btn btn-default target" id="target6">#target6</button>
</div>
</div>
</div>
</div>

Issue 2:
Challenge Waypoint: Use Hex Code for Specific Colors has an issue.

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My answer is correct but wrongly flagged as erroneous.

My code:

<style>
body {
background-color: #000000;
}
</style>
Issue 1:
Challenge http://www.freecodecamp.com/challenges/waypoint-make-circular-images-with-a-border-radius has an issue. Please describe how to reproduce it, and include links to screen shots if possible.

Issue 2:
Challenge http://www.freecodecamp.com/challenges/waypoint-add-different-margins-to-each-side-of-an-element has an issue. Please describe how to reproduce it, and include links to screen shots if possible.
Issue 1:
Consider the following example

@Component({
selector: "my-comp"
})
@View({
template: "<div>My Compponent</div>"
})
export class MyComponent {
constructor(dep1:Dependency1,dep2:Dependency2){};
}

This generates (ts 1.6-beta) a compilation error TS2345: Argument of type 'typeof MyComponent' is not assignable to parameter of type 'Type'.

This boils down to an equivalent simpler example that generates a compilation error:

var dec : TypeDecorator;

@dec
export class MyClass {
constructor(x1:number,x2:number){};
}

The problem lies in the fact that the definition of Type contains a "new" declaration with 1 argument causing MyClass not to be assignable to Type.

Issue 2:
dgeni generates type in angular2.d.ts with

interface Type extends Function {
new(args: any): any;
}

Typescript 1.6.0 throws an error during compilation:

@Component({
selector: 'audio-tile',
properties: ['summaryInfo: summary-info'],
events: ['tileEvent']
})
@View(<any>{ // TEMP
template: <string>require('./audio-tile.html'),
directives: [NgIf, NgClass],
pipes: [SecsAsMmSsPipe]
})
export class AudioTile {
constructor (resetPlaybackEventEmitter: ResetPlaybackEventEmitter,
resetExpansionEventEmitter: ResetExpansionEventEmitter) {
}
}

ERROR in /Users/bestander/work/booktrack/mandrill/app/studio/audio/audio-tile/audio-tile.ts:9:1
Argument of type 'typeof AudioTile' is not assignable to parameter of type 'Type'.

If I manually replace what dgeni generated into (as in modules/angular2/src/core/facade/lang.ts)

interface Type extends Function {
new(...args): any;
}

Then it works fine.
Issue 1:
I'd really like to have an option to choose between system standard and manual light or dark mode for the search bar and search results.

Issue 2:
Summary of the new feature/enhancement

The ability to override the theme that is used for PowerToys Run. Currently it's only possible to do this in the OS settings.

Proposed technical implementation details (optional)

In terms of UX, very similar to what we have in the General and Shortcut Guide app:
Issue 1:
TOSTRING() fails in cases where STR() worked

Neo4j Version: 2.3.1

Operating System: Ubuntu 14.10

Steps to reproduce

I have an collection of arrays

`Collect([TOINT(idn),STR(name),TOINT(status),TOINT(days_norm),TOINT(days_spent)]) as flowsteps``

This

REDUCE (x=0, i IN flowsteps | x + TOINT(STR(i[3]))) as normP

works, but this

REDUCE (x=0, i IN flowsteps | x + TOINT(TOSTRING(i[3]))) as normP`

throws an error

Cypher error: Type mismatch: expected Float, Integer or String but was Any (line 33, column 57 (offset: 1271)) " REDUCE (x=0, i IN flowsteps | x + TOINT(TOSTRING(i[3]))) as normP

Same error can be observed when running this:

`UNWIND [1,"12",37,"27654"] as elt RETURN toString(elt)``

Expected behavior

TOSTRING() should accept Any, like STR() dis

Issue 2:
Neo4j Version: 2.3.1

Operating System: Ubuntu 14.10

Steps to reproduce

Creating a collection of collections, e.g.

Collect([TOINT(idn),STR(name),TOINT(status),TOINT(days_norm),TOINT(days_spent)]) as flowsteps

and later on adding up corresponding items

REDUCE (x=0, i IN flowsteps | x + TOINT(STRING(i[3]))) as normP

throws an error

Cypher error: Type mismatch: expected Float, Integer or String but was Any (line 33, column 57 (offset: 1271)) " REDUCE (x=0, i IN flowsteps | x + TOINT(TOSTRING(i[3]))) as normP

Expected behavior

If I cast something WITH TOINT(), then this should work:

REDUCE (x=0, i IN flowsteps | x + i[3]) as normP

Actual behavior

Only works with a workaround by TOINT(STR()), which is no longer works in 3.0, because STR() is no longer available.
Issue 1:
Hi,

I wonder whether Superset offers a stepped line chart (I have been googled for quite some times but couldn't find any).

It is like something like this.

Useful cases:

Showing the bid and the ask price of stock price over time in 1 single chart.

Showing multiple time series in one chart.

Currently, I have a database schema like this:

symbol varhcar(16);

is_bid boolean;

price double;

time timestamp(6);

And then I use "time series - line chart" as the visualization type, "sum(price)" as metrics, and group by "symbol" and "is_bid".

Then the chart will have many broken lines because not every timestamp for each set of symbol and is_bid exists for another set of symbol and is_bid. Concrete example:

DB row 1: symbol = AAPL, time = 9:00:00AM, is_bid = TRUE, price = 140.00

DB row 2: symbol = AAPL, time = 9:00:01AM, is_bid = FALSE, price = 140.05

DB row 3: symbol = AAPL, time = 9:00:03AM, is_bid = TRUE, price = 140.01

DB row 4: symbol = AAPL, time = 9:00:05AM, is_bid = FALSE, price = 140.06

Then the line for AAPL's bid price will be broken between 9:00:00 and 9:00:03 because there is no entry in the DB for time = 9:00:01AM.

One solution is to have a script to get all the unique timestamps, and then populate additional rows per symbol per is_bid based on the previous value of the corresponding set of symbol and is_bid (as "step before interpolation" makes sense in this case), creating a giant table and additional work for all stepped line charts.

Hence, it would be great that superset supports (or already supported) step line chart.

Thanks.

Issue 2:
Column selection is not saved in export file, and saving dataset id in export file doesn't seem to be a correct approach

Expected results

Import a dashboard with native filter to a new workspace should work seemlessly.

Actual results

Selected column is not present in the export file, resulting in new dashboard native filter error with missing column selection.

Saving dataset id in the export file is an incorrect approach. The dataset id in a different workspace is different. In my example, dataset id =29 is already taken in the new workspace, this result in the imported dashboard showing the wrong dataset selection in native filter.

Screenshots

How to reproduce the bug

Create a dashboard

Create a value native filter and select dataset and column

Export this dashboard

Import this dashboard to a new workspace
Issue 1:
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.):

kube-apiserver.log

kube api logs

log file link

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

Kubernetes version (use kubectl version):

Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.3", GitCommit:"4957b090e9a4f6a68b4a40375408fdc74a212260", GitTreeState:"clean", BuildDate:"2016-10-16T06:20:04Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}

Environment:

Cloud provider or hardware configuration: aws

OS (e.g. from /etc/os-release): what kops provisions by default

Kernel (e.g. uname -a): what kops provisions by default

Install tools: kops

Others:

What happened:

The HTML links generated by the kube api server for the /logs endpoint do not prefix the filename with /logs.

What you expected to happen:

Clicking the link to a log file should result in a request GET /logs/kube-apiserver.log

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

Request to api server: GET /logs

Click link for kube-apiserver.log

Anything else do we need to know:

no

Issue 2:
In #1458, Brendan introduced a pattern for accessing and defaulting values: Rather than actually setting the value in the struct during validation (which we do for some other fields), he wrapped the comparisons in functions that captured the defaulting.

This pattern has a distinct advantage of working in tests, where input validation has not run. It has the distinct disadvantage that not all fields are so self-contained - some set their default based on another field's value.

We should choose a pattern and apply it liberally. I'd like to be consistent as much as possible.
Issue 1:
When using stacked progress bars, the value 0 is not usable with the aria-valuenow attribute.

See:

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

This is due to the min-width for the [aria-valuenow=0] pushing the 100% bar element to the next line.

Discovered while testing angular-ui/bootstrap#2511 .

Issue 2:
The min-width on progress bars meant for showing 0% text cases can sometimes cause stacked bars to not appear. This problem arises when using the aria-valuenow attribute.

jsbin demo

Resizing the browser to a grid size medium or below shows the problems in the 90%s.
Issue 1:
Original title: Support having non-page js/jsx files in pages dir

This is an often requested feature. See issues #3508 #1914 #1689 #1545 #988 and there are likely more. edit: Also #3183.

This issue was fixed in PR #3195 but somewhere along the way the pagesGlobPattern config became broken, and was cleaned out in PR #3578.

This feature would allow us to place files that support specific pages, with the pages that they support. These "support" files could be tests, components, utilities, and more. This would improve the application's file organization, especially for large projects.

Issue 2:
(I searched for duplicates, apologies if this has been discussed before.)

The package.json files in Next.js and styled-jsx omit the conventional ^ on dependency versions.

Why is this? I'm guessing it's intentional, as it seems to be this way on multiple Zeit projects, and you obviously know what you're doing.

Why it causes a problem for me: I'm making a Next.js website. I found a bug coming from Stylis the other night, and it got fixed by @thysultan quickly. But then I had to wait for styled-jsx to be republished, which happened the next day. And Next.js is still not republished (at time of writing), so I'm still blocked until that happens.

If it's a defence against regressions in dependencies, FWIW, it seems like opting out of automatic patches does more harm than good. I know patch releases can sometimes introduce regressions, but they fix bugs more often. The approach would make sense to me if you had an automated nightly test-and-republish system to ensure you pick up patches quickly, but this doesn't seem to be in place – for example, until a few hours ago, styled-jsx was fixed to a two-month-old Stylis version (3.2.8), from July 24. Stylis has released 10 patches over that time, and none of them made it into styled-jsx until 5 hours ago. (And they're still not in Next.js.) On balance, wouldn't it make more sense to use ^?
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Compiles without errors.

Current Behavior

Compiles with the following errors:

ERROR in /Users/radu/code/notes-react/node_modules/@types/material-ui/index.d.ts

(18,23): error TS2688: Cannot find type definition file for 'react-addons-linked-state-mixin'.

webpack: Failed to compile.

Steps to Reproduce (for bugs)

npm install --save typescript@2.5.3, material-ui@0.17.4, @types/material-ui@0.17.23

Build

Context

I've also tried with different material-ui versions like 0.17/0.18/0.19, but I get the same error.

The same project works fine with typescript@2.3.4, but fails with typescript@2.4.2.

Your Environment

Tech
Version

Material-UI
0.17.4

React
15.6.5

TypeScript
2.5.3

@ types/material-ui
0.17.23

Issue 2:
material-ui 1.0.0-beta.25

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

Problem could be with button style:

disabled: {
color: theme.palette.action.disabled,
}

in Button/Button.js, where theme.palette.action.disabled is defined as

disabled: 'rgba(255, 255, 255, 0.3)'

in styles/createPalette.js.

Changing action.disabled to e.g. disabled: 'gray' works well.
Issue 1:
This was originally reported as a question on stackoverflow: http://stackoverflow.com/questions/32707467/reading-png-does-not-give-expected-result

The stackoverflow question has a link to a dropbox site that contains the file W0002_0004.png that triggers a seg. fault when it is read using scipy.misc.imread.

I get the seg. fault in both of these setups:

python 2.7.10, numpy 1.9.2, scipy '0.17.0.dev0+81c0960', PIL.PILLOW_VERSION 2.5.3

pyhton 3.4.3, numpy 1.9.2, scipy 0.16.0, PIL.PILLOW_VERSION 2.9.0

The program pngcheck does not report any errors in the file:

$ pngcheck -vt W0002_0004.png
File: W0002_0004.png (3721 bytes)
chunk IHDR at offset 0x0000c, length 13
4968 x 527 image, 1-bit grayscale, non-interlaced
chunk tIME at offset 0x00025, length 7: 8 Feb 2015 15:18:29 UTC
chunk IDAT at offset 0x00038, length 3645
zlib: deflated, 32K window, default compression
chunk IEND at offset 0x00e81, length 0
No errors detected in W0002_0004.png (4 chunks, 98.9% compression).

imread calls fromimage, and the seg. fault occurs when fromimage calls array(im). Here's the sequence of calls equivalent to calling imread('W0002_0004.png'):

In [1]: import numpy as np

In [2]: from PIL import Image

imread uses Image.open to read the file. It then passes im to fromimage.

In [3]: im = Image.open('W0002_0004.png')

If im.mode is '1', fromimage does im.convert('L'):

In [4]: im.mode
Out[4]: '1'

In [5]: im.convert('L')
Out[5]: <PIL.Image.Image image mode=L size=4968x527 at 0x10431E710>

Then fromimage returns array(im). This is where the seg. fault occurs.

In [6]: result = np.array(im)
/Users/warren/anaconda/bin/python.app: line 3: 41981 Segmentation fault: 11 /Users/warren/anaconda/python.app/Contents/MacOS/python "$@"

Issue 2:
Original ticket http://projects.scipy.org/scipy/ticket/1613 on 2012-02-29 by trac user wiredfool, assigned to unknown.

This is similar to bug 1205, closed as invalid.

When trying to open a 1 bit png, I get segfaults.

Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)

[GCC 4.4.3] on linux2

Type "help", "copyright", "credits" or "license" for more information.

import scipy, numpy

f = scipy.misc.imread('test/horiz_stripe_front.png')

Segmentation fault

Opening through PIL, converting to L or RGB, then doing asarray succeeds:

Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)

[GCC 4.4.3] on linux2

Type "help", "copyright", "credits" or "license" for more information.

import Image

import scipy, numpy

f = Image.open('test/horiz_stripe_front.png')

print f.mode

1

front = f.convert("L")

arr = numpy.asarray(front)

type(arr)

<type 'numpy.ndarray'>

I've tested in 0.8 (ubuntu oneiric), but I've checked the code and nothing has changed here in head. This is PIL 1.1.7
Issue 1:
On Linux,

$ GOOS=windows GOARCH=386 ./make.bash
...
/home/bradfitz/go/src/libmach/windows.c:49: error: conflicting types for 'pread'
/usr/include/bits/unistd.h:88: note: previous definition of 'pread' was here
/home/bradfitz/go/src/libmach/windows.c:56: error: conflicting types for 'pwrite'
/usr/include/unistd.h:388: note: previous declaration of 'pwrite' was here
go tool dist: FAILED: gcc -Wall -Wno-sign-compare -Wno-missing-braces -Wno-parentheses
-Wno-unknown-pragmas -Wno-switch -Wno-comment -Werror -fno-common -ggdb -O2 -c -m64 -I
/home/bradfitz/go/include -I /home/bradfitz/go/src/libmach -o $WORK/windows.o
/home/bradfitz/go/src/libmach/windows.c

Issue 2:
This was brought up by jgr on IRC. I can't come up with an explanation for this
behavior. Apologies if there's a mistake in the code.

This code: http://play.golang.org/p/U4elciYqmL
triggers the deadlock detector on playground, hangs on Linux (go tip 5439c77d4acb).
Exporting "msg" as "Msg" makes it work. `type Reply struct{}` makes
it work.

I don't see how different message contents would trigger deadlock/hang. I expected to
just see a "main.Reply{}" output for the non-exported case.
Issue 1:
I have this data frame.

728 562 599 642 592 686 602 744 640 678

309 96 29 99 63 73 48 81 48 13 25

337 40 25 41 47 14 33 54 63 33 45

395 64 95 63 90 52 82 66 26 26 20

264 38 56 73 17 98 56 80 77 44 49

I want to sort it horizontally based on row index 264

I tried:

df.sort_values(by=264, axis=1)

I gives me: ValueError: When sorting by column, axis must be 0 (rows)

What is the usecase with axis=1

Issue 2:
xref #10726

This is possible, just not implemented

In [3]: df = DataFrame(np.arange(16).reshape(4, 4), index=[1, 2, 3, 4], columns=['A', 'B', 'C', 'D'])

In [4]: df
Out[4]:
A B C D
1 0 1 2 3
2 4 5 6 7
3 8 9 10 11
4 12 13 14 15

In [5]: df.sort_values(by=1,axis=1)
ValueError: When sorting by column, axis must be 0 (rows)