WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
It is my first application with Next.js and I am facing problems to deploy the project to Heroku.

I am using Express server and a external .babelrc file.

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

Expected Behavior

No errors building/running project in Heroku.

Current Behavior

I am running yarn build and then git init / add / commit / push in .next/dist folder and copying package.json into it too.

Context

This is my scripts from package.json:

"scripts": {
"start": "NODE_ENV=production node server/server.js",
"dev": "nodemon -w server server/server.js --exec babel-node",
"build": "next build && babel server -d .next/dist/server",
"lint": "eslint --fix components lib pages server **/*.js",
"snyk": "snyk test",
"heroku-postbuild": "next build && babel server -d .next/dist/server"
}

next.config.js:

module.exports = {
webpack: (config, { dev }) => {
// For the development version, we'll use React.
// Because, it support react hot loading and so on.
if (dev) {
return config;
}

config.resolve.alias = {
react: 'inferno-compat',
'react-dom': 'inferno-compat'
};
return config;
}
};

And the .babelrc:

{
"presets": [
[
"next/babel",
{
"preset-env": {
"modules": "commonjs"
}
}
]
],
"env": {
"development": {
"plugins": ["inline-dotenv"]
},
"production": {
"plugins": ["transform-inline-environment-variables"]
}
}
}

Your Environment

Tech
Version

next
6.0.1

node
9.5.0

@babe/*
^7

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

Expected Behavior

The expected behavior is that of the online demo.

Current Behavior

Unfortunately, when you clone the repo, npm install and run it gives an error when you navigate client-side to the Home:

TypeError: Cannot read property 'data' of undefined at new WithData (http://localhost:3000/_next/1509705233244/page/:19478:79)

Steps to Reproduce (for bugs)

The steps of the example installation guide:

curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/with-apollo

cd with-apollo

npm install

npm run dev

navigate from home to /about

Navigate back to Home

Context

I tried to clone the repo because I found the issue on my project after upgrading to React Apollo 2 and copying the /lib code of the example (initApollo and withData).

On my project I see another issue: I see always the client-side network call even on refresh. I fear that it has to do with some confusion with Apollo 2 InMemoryCache, sometimes found imported from apollo-cache-inmemory and sometimes from apollo-client-preset.

Thank you,

Matteo
Issue 1:
Hello,

I am using the latest version of google chrome (29.0.1547.57 m) on Windows 8.

I am reproducing the same bug on the 28 version.

Open the Justified nav example in large size.

http://getbootstrap.com/examples/justified-nav/

Reduce the window to the XS size and re-extend it to the large size.

Nav bar menu is glitched.

Seb.

Issue 2:
The justified nav example (http://getbootstrap.com/examples/justified-nav) collapses perfectly when the screen is narrowed, but when the screen is expanded it get wonky.

expanded
Issue 1:
Currently the file is only used to detect the virtual project. Now that we have tsconfig.json support we can use the language service bound to a tsconfig.json file to find navto items. I would propose the following handling in case of the absense of a file:

no tsconfig project. Command return no content message

all projects are tsconfig project: return the nav to items (filter duplicates)

there is a mix: the response contains a flag indicating that the result might be incomplete.

Issue 2:
Example:

function f(T:{new (...args:any[]):any}) {
return class extends T {}
}

Error:

src/test.ts(2,23): error TS2509: Base constructor return type 'any' is not a class or interface type.

Seemingly arbitrary fix:

interface I {}
function f(T:{new (...args:any[]):I}) {
return class extends T {}
}

Afaik any should be an acceptable type here?
Issue 1:
Version

2.6.6

Reproduction link

https://jsfiddle.net/azg65dsv/3/

Steps to reproduce

Click the "Push" button and you will see that the focus of the window is now on the top input. Wait a few seconds, and should now see that the focus has been lost from the input.

What is expected?

The first input should still be focused.

What is actually happening?

The entire DOM is shifted around, new elements are created for no reason and changed, while the input ends up unfocused.

My setup is pretty similar to the fiddle, I have a loading bar at the top and an information box at the bottom. When testing it, however, a lot of weird things happened:

My custom directive didn't work properly because the underlying element was changed (this was actually my fault, I have now fixed it)

If I selected the input before data came, it lost focus

My custom button ripple animation got shifted around to a button at the bottom of the screen

After debugging a little bit, I found the issue. Vue thought that those divs were the same element when calling sameVnode(oldEndVnode, newEndVnode). Adding a custom key into the second div works wonderfully, and no more DOM shifting, but I would like to be warned by the template compiler if something like this could happen (or maybe key all divs?).

Workaround

Add a key to the first div that is not toggled.

Issue 2:
Version

2.6.10

Reproduction link

https://codepen.io/timbenniks/pen/yPOLej

Steps to reproduce

Add a noscript tag inside the DOM node that is given to the Vue constructor.

In that noscript tag, add an image tag.

Open the network tab of the developer tools.

Load the page.

What is expected?

The expected result would be that Vue.js ignores whatever is found in the noscript tag.

What is actually happening?

That is actually happening: observe that Vue.js loads the image inside the noscript tag. Hence, Vue.js parses the noscript tag and whatever is found within it.

We found this issue as we are using Vue.js not in SPA mode but sprinkling it on top of existing HTML. When turning off the JS the page still renders HTML. The goal is to have lazy loading images and without JS we still want to see the images. Hence an image tag in a noscript element.

This sounds like an edge case but in fact this is common usage for big e-commerce systems and cms' like Sitecore and Adobe AEM.
Issue 1:
ℹ Computer information

Windows build number: 19042.330

PowerToys version: 0.20.0

PowerToy module: Color Picker

📝 Provide detailed reproduction steps (if any)

Launch the Color Picker

Open the start menu with the windows key

Try to select a color from the taskbar or from the start menu

✔️ Expected result

The color picker's tooltip appears above the taskbar and start menu

❌ Actual result

The color picker's tooltip appears behind them. Clicking on them still successfully copies the color of whatever is under the mouse pointer.

📷 Screenshots

Issue 2:
ℹ Computer information

Windows build number: 17134.950

PowerToys version: 0.20

PowerToy module: ?

📝 Provide detailed reproduction steps (if any)

right-click tray icon and click setting

happened

✔️ Expected result

no g-sync indicator. and no frame/refresh rate drop.

suggest turn off g-sync support for PT and non-game app

❌ Actual result

more than one g-sync indicator display in the middle of PT's GUI. and frame rate and refresh rate both dropped blow 30fps/hz causing mouse lagging.

📷 Screenshots
Issue 1:
demo: https://babeljs.io/repl/#?babili=false&evaluate=true&lineWrap=false&presets=es2015%2Cstage-0&code=async%20function%20foo()%7B%0A%20%20%0A%7D%0A%0Aconsole.log(foo.constructor)%3B&experimental=true&loose=false&spec=false&playground=true

it outputs 'Function'

The spec https://tc39.github.io/ecmascript-asyncawait/#async-function-constructor-arguments seems to tell about a AsyncFunction type

Issue 2:
This would be really nice for larger applications that aren't libraries, where they could still use the full, globally polluting polyfill, but the helpers wouldn't be duplicated across several modules. It would make the compiled code faster to load, and a lot smaller overall. These benefits are nice for both Node applications and web applications, where the deduplication would make programs significantly smaller. As for the core-js aliasing, it could just require the module at the top of every file that needs a feature from it, which doesn't add a lot of size overhead to the files.
Issue 1:
I'm an end user and I'm new to ES and I've been immediately faced with the problem of getting my data processed correctly.

The problem with ES (vs. Splunk) is that data is being indexed/analyzed first, then stored, then you can't change it. (vs. Splunk, where almost everything happens during search time, thus you can adjust your plans).

Currently, in order to test my new mapping params, I have to (using kopf plugin -- otherwise I'd throw ES immediately out of window for lack of usability):

Have my data ready -- either stored in some safe index or in local .json file on disk

delete index / index template -- /_plugin/kopf/#!/cluster

adjust index appropriately and create it -- /_plugin/kopf/#!/createIndex

Use stream2es in order to copy index from "safe place" to the index above -- cat mydata.json | stream2es stdin --target http://blah:9200/newidx/type1

OR

stream2es es --source http://blah:9200/safe_idx/type1 --target http://blah:9200/newidx/type1

Run some query, see it failing/misbehaving, read docs, see that you need mapping adjustment, GO TO step #2.

Now imagine doing this 50 times, because you can't get ES behave properly with your data....

This is very tedious for someone who expected modern easy-to-use software.

Ideally, I want to input my new mapping, press button, and let it do the reindex automatically.

Of course, this would be useful for dev env only as on production, you'd sync the mapping changes with app schema changes.

Issue 2:
Be able to ask the system to reindex from the saved JSON by document ID or query. This is useful once we have ES style plugins for manipulating documents that might later change and therefore cause you to want to reindex some set of documents.

#490 and #491 would let you query by a set of documents indexed before the required change.

If you are going to store the JSON, you can take advantage of that by reindex requests.

This might also allow the system to handle schema changes in the future more automatically by reindexing to the new analyzer over time in batch.
Issue 1:
Right now test.step resolves to undefined.

It would be great if it resolved to the value the callback resolves to, so we could have tests like this:

test('test something', async ({ pageObject, page }) => {
await pageObject.navigateTo();

const link = await test.step('is able to retrieve a link', async () => {
const link = await pageObject.getLink();

// tests...
expect(link).toBe(blabla);

return link;
});

await test.step('link is accessible', async () => {
await page.goto(link)
// tests...
expect(page.locator('#my-element')).toBeVisible();
});
})

Right now the workaround is to have let variables before the step (notice the ! to avoid type errors):

test('test something', async ({ pageObject, page }) => {
await pageObject.navigateTo();

let link!: string
await test.step('is able to retrieve a link', async () => {
link = await pageObject.getLink();

// tests...
expect(link).toBe(blabla);
});

await test.step('link is accessible', async () => {
await page.goto(link)
// tests...
expect(page.locator('#my-element')).toBeVisible();
});
})

I'm free to work on this if it is something that would be accepted in the library.

Issue 2:
It would be useful to be able to return a value from a test step and use it in a subsequent step.

This way we could avoid mutable state (let).

const invitationLink = await test.step('Create invitation link', async () => {
await page.goto('create-invitation-link');
…
return await page.locator('#link').getAttribute('href');
});

await test.step('Accept invitation', async () => {
await page.goto(invitationLink);
});

The test.step method would probably need a generic signature:

step<A>(title: string, body: () => Promise<A>): Promise<A>;
Issue 1:
12 -span columns is great for nearly all cases - except creating 5 column layouts.

But I can't create a 10 column system without deleting the 12 column one. And the reason is mainly because @grid-column -variable is called inside the https://github.com/twbs/bootstrap/blob/master/less/mixins/grid-framework.less -mixins.

If @grid-column was passed to the mixin as the default value parameter then creating both 12 and 10 (and whatever) column systems would be easy.

Like instead of this:

.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {
.col-@{class}-@{index} {
width: percentage((@index / @grid-columns));
}
}

It would be:

.calc-grid-column(@index, @class, @type, @grid-column-count: @grid-columns) when (@type = width) and (@index > 0) {
.col-@{class}-@{index} {
width: percentage((@index / @grid-column-count));
}
}

I already got it to work (SASS version) and I think this would be a logical addition.

Issue 2:
Cause @grid-columns will be used to define the number of columns in make-grid() and make-grid-columns-float() it will be impossible to compile sub grid with different number of columns. See also: http://stackoverflow.com/a/19724075/1596547

The extra parameter will make possible to do:

make-grid(@grid-columns, sm, width,@grid-columns); and make-grid(6, sm, width,6); etc.
Issue 1:
I'm submitting a ... (check one with "x")

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

With multiple <ng-content></ng-content> only works last one.

Expected/desired behavior

Both should paint content if condition met.

Reproduction of the problem

http://stackoverflow.com/questions/38768324/angular2-rc-4-ng-content-duplicated-dont-work

<div *ngIf="dialog">
<ng-content></ng-content>
</div>

<!-- for pages not in dialog popups put all div structure -->
<div *ngIf="!dialog" class="container content">
<div class="page-header">
<h2>{{title}}</h2>
</div>
<div class="row">
<div class="col-md-12">
<ng-content></ng-content>
</div>
</div>
</div>

What is the expected behavior?

Both should paint content if condition met.

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

Paint content in one or another container

Please tell us about your environment:

Angular version: 2.0.0-rc.4

Browser: [all]

Language: [ TypeScript ]

Issue 2:
**I'm submitting a ...

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

Current behavior

I'm using a guard to protect a route (View Two). User can go from View One to View Two. Guard checks if application has some state. If not, the guard redirect the user on a dedicated page (View State). On that page user will give the expected state to application. After that, I do a location.back(). This calls send back the user on page View One not on View Two.

Expected behavior

I will like that 'location.back()' back to the cancelled route (View Two)

Minimal reproduction of the problem with instructions

A demonstration on plunkr

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

In my application, there are optional pages (optional functionalities). Those pages can be accessed only if some configurations has been done before. When users try to navigate to those pages for the first time, I redirect them to the configuration pages. On those configuration pages, I want to use 'location.back()' to back to the cancelled routes.

Please tell us about your environment:

Environment: Windows 7, Atom, npm, Webpack-dev-server

Angular version: 2.4.8

Browser: all

Language: TypeScript 2.1.5

Node (for AoT issues): node --version = 6.9.5
Issue 1:
Reproducing code example:

scipy test fails

>>> import scipy

>>> scipy.test()

Error message:

=================================== FAILURES ===================================
____________________________ test_tolerance_float32 ____________________________

@pytest.mark.xfail(platform.machine() == 'ppc64le',
reason="fails on ppc64le")
def test_tolerance_float32():
"""Check lobpcg for attainable tolerance in float32.
"""
np.random.seed(1234)
n = 50
m = 3
vals = -np.arange(1, n + 1)
A = diags([vals], [0], (n, n))
A = A.astype(np.float32)
X = np.random.randn(n, m)
X = X.astype(np.float32)
eigvals, _ = lobpcg(A, X, tol=1e-9, maxiter=50, verbosityLevel=0)
> assert_allclose(eigvals, -np.arange(1, 1 + m), atol=1e-5)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=1e-05
E
E Mismatched elements: 1 / 3 (33.3%)
E Max absolute difference: 0.01461172
E Max relative difference: 0.00487057
E x: array([-1. , -1.999997, -3.014612], dtype=float32)
E y: array([-1, -2, -3])

A = <50x50 sparse matrix of type '<class 'numpy.float32'>'
with 50 stored elements (1 diagonals) in DIAgonal format>
X = array([[ 4.71435159e-01, -1.19097567e+00, 1.43270695e+00],
[-3.12651902e-01, -7.20588744e-01, 8.87162924e-01]...241e+00, -5.24336100e-01, 7.00907707e-01],
[ 9.84188080e-01, -1.21728405e-01, 2.36576867e+00]], dtype=float32)
_ = array([[-1.00000000e+00, 2.00615219e-12, -2.44451428e-08],
[ 1.97884764e-12, 1.00000012e+00, -7.59038812e-07]...590e-08, -1.29014893e-07, -3.75821907e-03],
[ 7.36326111e-09, 1.62651048e-08, 1.63773284e-03]], dtype=float32)
eigvals = array([-1. , -1.9999971, -3.0146117], dtype=float32)
m = 3
n = 50
vals = array([ -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13,
-14, -15, -16, -17, -18, -19, -20, -21,..., -29, -30, -31, -32, -33, -34, -35, -36, -37, -38, -39,
-40, -41, -42, -43, -44, -45, -46, -47, -48, -49, -50])

lib/python3.8/site-packages/scipy/sparse/linalg/eigen/lobpcg/tests/test_lobpcg.py:288: AssertionError
=========================== short test summary info ============================
FAILED lib/python3.8/site-packages/scipy/sparse/linalg/eigen/lobpcg/tests/test_lobpcg.py::test_tolerance_float32
= 1 failed, 19510 passed, 1332 skipped, 10954 deselected, 78 xfailed, 7 xpassed in 370.28s (0:06:10) =
False

After running test, I exited python and got these

>>> exit()

Normal return from subroutine COBYLA

NFVALS = 50 F = 2.485185E+01 MAXCV = 1.999965E-10
X = 4.955358E+00 6.666553E-01

NNLS quitting on iteration count.

Scipy/Numpy/Python version information:

scipy 1.4.1

numpy 1.18.4

python 3.8.2

OS ubuntu 16.04, python installed from source.

Issue 2:
Original ticket http://projects.scipy.org/scipy/ticket/1314 on 2010-10-18 by trac user markMiscavage, assigned to @wnbell.

I have this bug in a larger program but I've narrowed it down to a script consisting of just :

import sys
import scipy.sparse.sparsetools
sys.exit("EXIT")

This will always exit with code 0. It seems it is the .pyd files in the sparsetools folder that are the source of this problem. I have the same problem in both 0.7.1 and 0.8.0 builds of scipy. I am using python 2.6 on a Windows 7 - 64 bit system.
Issue 1:
This was posted onto stackoverflow but it seems more like a bug than anything:

http://stackoverflow.com/questions/43242246/pandas-dataframe-groupby-failed-zooming-for-x-axis-ticks

Issue 2:
As pointed out here (https://stackoverflow.com/questions/24468333/set-xlim-for-pandas-matplotlib-where-index-is-string/24477138#24477138) if the index of a data frame is objects (that is not, the index obviously convertible to scalars and the data is being plotted against range(len(df))), the ticklabels are set to be string representations of the objects (I presume via set_xticklabels) but the locator is still a AutoLocator which means if you change the xlimits or pan/zoom the axes, the ticklabels become de-coupled from the data.

A solution is to also use a fixed locator which will pin the ticks to only be on the index locations.

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.ticker as mticker

df = pd.DataFrame({'Foo': pd.Series([2,3,4], index=['2002', '2003', '2004'])})
fig, ax = plt.subplots()

df.plot(ax=ax)

ax.xaxis.set_major_locator(mticker.FixedLocator(np.arange(len(df))))
ax.xaxis.set_major_formatter(mticker.FixedFormatter(df.index))

I can make changes to the code if someone points me to where the relevant section is.
Issue 1:
Install Code Alpha only.

Check add code to path.

in command type code or codeAlpha

Observe: both fail.

code.cmd refers to Code.exe, however in Alpha channel code is named CodeAlpha.

Issue 2:
For import statement in typescript it would be nice if we can reference an object in a class (for e,g.) and the IDE can write (when you click on the object reference Foo in example below) an import statement for you.

For e.g.

import {Foo} from "../../../bar/somelongpath/foo"

export class Test {

private f: Foo;

}

Webstorm already provides this and it makes a lot of difference (productivitywise) as you dont have to manually type and figure out the path to the import statement.
Issue 1:
Environment

Windows build number: 2004 19041.329
PowerToys version: 19
PowerToy module for which you are reporting the bug (if applicable):

Steps to reproduce

Press the Space Bar in most applications, I get the Power Toys search, even with all modules disabled. Notably Adobe Premiere Pro, Edge Chromium, Chrome.

Expected behavior

The space bar works as its supposed to.

Actual behavior

The Power Toys search appears, blocking the space bar input from the intended application even when all modules are disabled.

Screenshots

Issue 2:
Environment

Windows build number: [run "ver" at a command prompt]
PowerToys version: 0.19
PowerToy module for which you are reporting the bug (if applicable): PT Run

Steps to reproduce

Remap key from alt-space to win-space

execute shortcut multiple times

Expected behavior

don't have start menu false positive executions

Actual behavior

Lots of start menu executions
Issue 1:
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 the form control of an input is changed (e.g. async pipe), the HTML element disabled property is not properly updated to the one on the new form control.

Expected behavior

The HTMLElement disabled property should be synchronised with the one of the corresponding FormControl associated.

Minimal reproduction of the problem with instructions

Here's a plunkr https://plnkr.co/edit/WL7DjZHHmzLR8o5NBO1R?p=preview

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

We use dynamic forms with a BehaviorSubject of the formGroup to use. When new forms are pushed, all the values work fine, but the disabled properties don't get updated properly.

Please tell us about your environment:

Mac OS X 10.12.3

Angular version: 2.4.9

Happens in 2.4.9. Will check in current 4RC now and update the issue.

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 ]

Language: TypeScript 2.0.2

Issue 2:
I'm submitting a ...

[X] Bug report

Current behavior

When setting new FormControl instance to [formControl]/formControlName directive the disabled property/attribute of control DOM element does not update to the newest value.

Expected behavior

When setting new FormControl instance to [formControl]/formControlName directive the disabled property/attribute of control DOM element should reflect the newest value.

Minimal reproduction of the problem with instructions

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

Please tell us about your environment

Angular version: 4.2.4

Browser:
- [X] Chrome (desktop) version 58.0