WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

This should work:

// in pages/index.js
import { Layout } from 'layout'
export default () => <Layout />

// in layout/index.js
export { default as Layout } from './Layout'

Current Behavior

export { default as Layout } from './Layout'
^^^^^^

SyntaxError: Unexpected token export

Steps to Reproduce

Create a new next app.

Add a custom server.js.

Create a component outside of the pages directory.

Import that component from within pages/index.js.

yarn dev

Your Environment

Tech
Version

next
3.0.6

node
8.2.1

OS
macOS Sierra 10.12.4

Issue 2:
Hello! I'm just now getting started with next (using version 1.2.3), and I have the following folder structure:

package.json

pages

index.js

lib

components

Test.js

I have a symlink: node_modules/lib -> ../lib.

I import my Test component with import Test from 'lib/components/Test'.

This works fine, but it seems to not be transpiled: if I import anything from my Test component, I get the following error: SyntaxError: Unexpected token import.

Any guidance here? I'd be fine having my /components under /pages but I don't want them to be able to be served up standalone.

Thanks!
Issue 1:
I like the scrollBeyondLastLine feature but it scrolls too much to my state and i often find myself beeing scared to have cleared my file :s

That would be great if editor.scrollBeyondLastLine could be a boolean or an integer that would represent the maximium of lines it would overscroll.

Thanks

Issue 2:
We want to adopt tslint for checking our typescript code.

Most of our style guide should be checked by tslint.

General

Add initial tslint.json

Add tslint to our gulp script

Add a Code task with a problem matcher for tslint

Document its use in the Contribution Guidelines

Implement non externalised strings rule

Add tslint to the pre-commit hygene (wait until we are down to 0 with the warnigs)

Projects

Add tslint checking to other vscode projects

vscode-omnisharp

vscode-node-debugger-adapter

Others non-core projects

vsce

vscode-vscode

Extensions

vscode-tslint

vscode-eslint

vscode-jslint

vscode-editorConfig

Rules

no-unused-expression

no-unreachable

no-duplicate-variable

no-unexternalized-strings

no-duplicate-key (in object literals)

no-unused-variable (includes imports) - 500 instances

curly (braces for if/do/while, in style guide) - 70 instances

class-name (PacalCased class and interface names), in style guide) - 3

semicolon (semicolon at end of statements) - 220 instances

no-unnecessary-semicolons - 60 instances

no-duplicate-case - 3 instances

tripple-equals - 10 instances

Candidates

promise-must-complete - 10 instances (false positives?)

no-switch-case-fall-through - 25

forin (for ... statement must be filtered with an if) - 80 instances

prefer-const (rule is in the TS repository) - ???

Future

no-var-keyword - 5800

indent tabs (covered by hygene tasks, in style guide)

jsdoc-format - 200

no-trailing-whitespace

whitespace ...

Rejected

no-shadowed-variable - 300 instances

no-string-literal (disallow object access via string literals) - 16

no-unused-imports (subset of no-unused-variables) - 170 instances

no-function-expression (use arrow functions, in style guide) - 190 instances

missing-optional-annotation - 10 instances

no-use-before-declare

no-empty-interfaces (we them in our service injection patterns)

no-multiple-var-decl

no-missing-visibility-modifiers
Issue 1:
[ x ] I tried using the latest mongoose/mongoose.d.ts "@types/mongoose": "^4.6.1" file in this repo and had problems.

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

[ x ] I want to talk about mongoose/mongoose.d.ts.

The authors of that type definition are cc/ @simonxca

Hi, there is the problem with mongoose middleware definitions:

According to the docs http://mongoosejs.com/docs/middleware.html function signature for the hook post save is may looks like this (error: MongoError, doc: Document, next: (err?: NativeError) => void)

schema.post('save', function(error, doc, next) {
if (error.name === 'MongoError' && error.code === 11000) {
next(new Error('There was a duplicate key error'));
} else {
next(error);
}
});

But typings has this

/**
* Defines a post hook for the document
* Post hooks fire on the event emitted from document instances of Models compiled
* from this schema.
* @param method name of the method to hook
* @param fn callback
*/
post<T extends Document>(method: string, fn: (doc: T, next: (err?: NativeError) => void,
...otherArgs: any[]) => void): this;
post<T extends Document>(method: string, fn: (doc: T) => void, ...args: any[]): this;

in other words, error signature was omitted

Issue 2:
I tried using the @types/xxxx 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: @alloy @gyzerok @huhuanming @jeremistadler

Hey there! I'm combining Node, React, React DOM and React Native code in the same codebase (So that I can generate simultaneously iOS, Android and Web apps with Server-side rendering support), and I'm hitting the following errors in the type definitions for React native:

ERROR in [at-loader] ./node_modules/@types/node/index.d.ts:60:13
TS2451: Cannot redeclare block-scoped variable 'global'.

ERROR in [at-loader] ./node_modules/@types/node/index.d.ts:84:13
TS2300: Duplicate identifier 'require'.

ERROR in [at-loader] ./node_modules/@types/react-native/index.d.ts:8872:11
TS2451: Cannot redeclare block-scoped variable 'global'.

ERROR in [at-loader] ./node_modules/@types/react-native/index.d.ts:8873:14
TS2300: Duplicate identifier 'require'.

ERROR in [at-loader] ./node_modules/@types/webpack-env/index.d.ts:186:13
TS2300: Duplicate identifier 'require'.

It looks like React Native redefines global and require:

declare global {
const global: GlobalStatic;
function require(name: string): any;

/**
* This variable is set to true when react-native is running in Dev mode
* Typical usage:
* <code> if (__DEV__) console.log('Running in dev mode')</code>
*/
var __DEV__: boolean
}

Since these are already defined by @types/node, the compiler complains. I was able to work around the issue by adding the following option to my tsconfig.json file, however I'd like to avoid doing that if possible:

{
"skipLibCheck": true
}

Thanks in advance
Issue 1:
Description

Currently, there is support only for one_success trigger_rule, which starts the task instance the moment after one of the upstream tasks succeeds. The idea for the new trigger_rule is to wait for all upstream tasks to be done and at least one of them succeed.

Use case/motivation

The use case is to allow a OR-like behavior to trigger_rules.

Maybe even XOR-like behavior could be added as a second extra trigger_rule.

Related issues

No response

Are you willing to submit a PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct

Issue 2:
Description

I would like to have a trigger rule that triggers a task if all the upstream tasks have executed (all_done) and there is atleast one successful upstream task. This would be like the trigger rule: one_success, except it'll wait for all upstream tasks to finish.

Use case / motivation

I have downstream tasks that should run after all the upstream tasks have finished execution. I can't trigger the downstream task if none of the upstream tasks pass, but I need to trigger it if even one of them passes.

Are you willing to submit a PR?

I can work on a PR, if the feature is approved.
Issue 1:
.navbar-brand has max-width: 200px. Don't see why this constaint is there, because some sites may wish to have wider logos. This can affect the centering of the logo at mobile (< 768px) resolution

Issue 2:
I am using the 3.0 RC1 scripts and styles and it seems the navbar-brand (bootstrap.css line 2736) has its max-width set to 200px. Text beyond 200px wrap around. For desktop mode 200px can be restrictive.

Was the 200px width enforced due to a previous feature request? If not, dropping the max-width (or increasing by another 100px) maybe desirable for the desktop style. Tablet and Mobiles styles can still use 200px.
Issue 1:
When sending OPTION requests with token requests, IE11 and below said that the list could not find the request header. They tried various methods, such as reducing the browser blocking script, using es6-primise, using babel-polyfill. All browsers except IE browser were normal, and asked for your help. Look at the reason. Thank you.

Issue 2:
在有带token请求的情况下，IE11及以下发送OPTION请求的时候说列表找不到请求头，尝试了各种办法，比如降低浏览器阻止脚本、使用es6-primise、使用babel-polyfill都尝试了依然不行，除了IE浏览器其他浏览器都正常，求大家的帮助帮看看是什么原因啊，谢谢。
Issue 1:
The preview iframe on the right of the code window shows duplicate code.

When I checked the source code for the iframe, I did see the code duplicated twice as well.

This occurs on many, if not all challenges that I have taken so far. A refresh of the screen seems to temporarily resolve the issue at times, until I go to the next challenge. At which time, the code duplicates again.

Using Firefox 41.0.1 on Linux Mint 17

Issue 2:
Challenge http://www.freecodecamp.com/challenges/waypoint-line-up-form-elements-responsively-with-bootstrap has an issue.

I think the problem is happening on all Waypoint pages; the device right side of the screen where the CatPhotoApp page displays the information is being displayed duplicated;

Another point is that the HTML / CSS code is not completely displayed when the page is loaded, it is necessary to click or edit the code so that the code from the previous lesson is displayed correctly;
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I would like to have an Avatar component with the logged in person's image.

Current Behavior

Does not work, only if I import the image at the top, and write a static string as src.

Steps to Reproduce (for bugs)

Here is my code. I get user.img from this.state. I checked, it is the right value.

<Avatar src={img/${user.img}.jpg}/>

Your Environment

Using create-react-app

Tech
Version

Material-UI
v0.19.2

React
v15.6.1

browser
Chrome 62

Issue 2:
Problem description

It's inconsistence, but seems like TabIndicator's width does not calculated correctly.

Versions

Material-UI: 1.0.0-alpha.21

React: 15.6.1

Browser: Safari

Images & references

When defined with:

You get this:

When commenting out the width it works:
Issue 1:
All of the base jumps refer us back to the "get set for basejumps" waypoint for a review of cloud9, etc to setup the appropriate environment. However, half the pages (as you step through the 14 pages for that waypoint) FORCE you to open an external site in order to progress to the next page. It's a horrible user experience the first time through, and even worse if you go back to review and just want to refresh your memory and end up with half a dozen pages open just to get to the info you wanted.

Also, all the base jumps say to go back to this section in order to review how to setup Heroko, and there's no instructions for Heroku.

Issue 2:
The GIF Style challenges are great for short introductions, but more challenging for longer content, like "Get Set for Basejumps" there are several improvements that would make them easier to use:

Enable "Previous" button on final screen

Right now there is no "Previous" button on the "Finish Challenge" screen. If I accidentally double-clicked or wanted to go back, I should be able to go back from the final slide.

Add (Step X of Y) somewhere on the screen

It would be helpful to be able to see how many steps there are and how many are to go. As I am clicking through the "Get Set for BaseJumps" set, it seems interminable and there is no clear end in sight.

Add sidebar navigation

This would require giving each slide a title, but would make it significantly easier to go back and forth between slides if you missed something or just want to review. On first view, unvisited slides could be grayed out until visited. This would also reinforce (or possibly replace) 1 above.

Add navigable anchors and windows.history entries for each slide

This would make it possible to link to a specific slide, ties into the navigation above.

Examples #slide1, #slide-title-slug-here, or #slideX-title-here

Disable force "Click To Open" if Waypoint has been previously completed

I shouldn't be forced to click to open another window if I've completed the challenge. If I'm just looking for a specific piece of information (especially in longer step challenges), it's a drag to have to open all those windows.
Issue 1:
What version of Go are you using (go version)?

1.4

tip +9ef10fde754f

What operating system and processor architecture are you using?

OS X 10.10.1 amd64

What did you do?

package main

func main() {
_ = complex(0)
}

http://play.golang.org/p/BdgB06q5te

What did you expect to see?

prog.go:4: not enough arguments in call to complex
[process exited with non-zero status]

What did you see instead?

prog.go:4: internal compiler error: fault
[process exited with non-zero status]

Issue 2:
http://play.golang.org/p/gOwL0S64NQ

reported by lvd

package main

import (
"fmt"
"math"
)

func main() {
for i := 0; i < 4; i++ {
ii := float64(i)
e := ii * (math.Log(4/2) - math.Log(ii))
fmt.Println(e, math.Jn(i, 4))
}
var c complex128
c = math.Sqrt2 / 2
fmt.Println(c)
var f float64
f = 2
c *= complex(f)
fmt.Println(c)
}
Issue 1:
Bug report

Bug summary

On macOS with PyQt4, when placing a FigureCanvasQTAgg and a QGraphicsView in the same widget, some QWidget recursive repaint and Core Graphics errors (see below) occur when showing the widget.

Code for reproduction

from PyQt4 import Qt
import matplotlib

matplotlib.use('Qt4Agg')

from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg
from matplotlib.figure import Figure

app = Qt.QApplication([])

fig = Figure()
ax = fig.add_subplot(111)
ax.plot([0, 1])
canvas = FigureCanvasQTAgg(fig)

scene = Qt.QGraphicsScene()
scene.addRect(0, 0, 10, 10)
view = Qt.QGraphicsView(scene)

layout = Qt.QHBoxLayout()
layout.addWidget(canvas)
layout.addWidget(view)

widget = Qt.QWidget()
widget.setLayout(layout)
widget.show()

app.exec_()

Actual outcome

The widgets show correctly, but the following errors are displayed in the console:

QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
Oct 2 14:23:47 python[52865] <Error>: CGContextGetCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Oct 2 14:23:47 python[52865] <Error>: CGContextConcatCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
[...]

Expected outcome

This does not occur with PyQt5 (tested with 5.9).

This does not occur with matplotlib 2.0.2 and PyQt4.

Also, commenting the call to processEvents in FigureCanvasQTAggBase .paintEvent solves the issue:

matplotlib/lib/matplotlib/backends/backend_qt5agg.py

Line 75
in
793635c

QtWidgets.QApplication.instance().processEvents()

Matplotlib version

Operating System: macOS Sierra 10.12.5

Matplotlib Version: 2.1.0rc1

Python Version: Tested with 2.7 (both system and macPorts) and 3.6 (macPorts)

Jupyter Version (if applicable):

Other Libraries: PyQt4 4.12.1

Issue 2:
Bug report

Bug summary

As of master,

$ python examples/images_contours_and_fields/plot_streamplot.py
QWidget::repaint: Recursive repaint detected
Fatal Python error: Segmentation fault

(Qt5Agg backend)

Code for reproduction

See above.

Actual outcome

NA

Expected outcome

Don't crash.

Matplotlib version

Operating System: Arch Linux

Matplotlib Version: master

Python Version: 3.6

Jupyter Version (if applicable):

Other Libraries: Qt5.9 from pypi in a venv. does not occur with Arch repo PyQt5 (recursive repaint message occurs sometimes, but does not crash even then)

bisects back to d0eeddb which is the merge commit for #9103; however, interestingly, the tip of that commit does not crash so something went wrong during the merge.
Issue 1:
Checklist

I have included the output of celery -A proj report in the issue.

(if you are not able to do this, then at least specify the Celery

version affected).

I have verified that the issue exists against the master branch of Celery.

Steps to reproduce

I am using celery version 3.0.23 and scheduling the tasks using apply_async the issue is that the i encountered that the tasks are being duplicated by 15x so our users are getting 15 push notifications instead of one. The duplicacy of the tasks can be seen in the file attached below:

bug.txt

Expected behavior

Actual behavior

Issue 2:
Checklist

I have checked the issues list

for similar or identical feature requests.

I have checked the pull requests list

for existing proposed implementations of this feature.

I have checked the commit log

to find out if the if the same feature was already implemented in the

master branch.

I have included all related issues and possible duplicate issues

in this issue (If there are none, check this box anyway).

Related Issues and Possible Duplicates

Related Issues

#4551

#4525

Possible Duplicates

#4551

Brief Summary

Memory leaks can be difficult to track down, especially when they are caused by 3rd party packages. In theory these obviously should be fixed, but in real life, where one needs to keep things running, one might be happy enough if the memory leaks were contained.

So I'd like to propose a solution to quarantene memory leaks in task specific processes in order to avoid an increasing memory usage of the Celery workers, which appears to be a common reason for restarting the workers.

Design

Architectural Considerations

None

Proposed Behavior

My proposal looks as follows:

The Celery workers fork/spawn/... a new child process before executing a task.

Task execution is done in this child process.

The result is retrieved from the child process

The child process is terminated.

The results is handed to the result backend by the worker process

In a variation, this proposal might be extended to allow processing of a chunk in child process or the delegation of the task execution might be made optional.

In all other regards (e.g. errors, exceptions) this feature should behave identically to the current behavior.

Proposed UI/UX

Diagrams

This diagram illustrates the basic idea. If a task leaks memory, the memory consumption will rise until the Worker process (e.g. the Celery systemd service) is restarted. If the execution of such a task is contained in a separate child process, memory is freed after each task.

Alternatives

Instead of including this feature in Celery itself, one could implement this feature in a subclass of celery.Task?
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Grow transition honors the enter/leave durations propagated from the Dialog component.

Current Behavior

Dialog accepts enter and leaveTransitionDuration props but the Grow transition only accepts the transitionDuration prop. This effectively ignores the props given to the Dialog.

Steps to Reproduce (for bugs)

https://codesandbox.io/s/l476j33mjq

Click 'Show dialog'

Observe that react warning in console

Context

One can use props directly on a Grow transition (and in fact the defaults are great in my case) so not a super important bug but it might rear it's head in other places.

Your Environment

Tech
Version

Material-UI
1.0.0-beta.12

React
16 rc3

browser
chrome

Issue 2:
Tooltip in a narrow table head cell wraps its content while tooltips in ordinary table cells don't.

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

Expected Behavior

I expect it to behave the same as a tooltip in any other table cell

Current Behavior

I added tooltips in the first column of the table:

https://codesandbox.io/s/9yqjyx68o

Your Environment

Tech
Version

Material-UI
1.0.0-beta.19

React
16.0.0

browser
Chrome
Issue 1:
julia> collect(Iterators.Stateful(2x for x in 1:3))
2-element Vector{Int64}:
2
4

The input has 3 elements, I would therefore expect the output also to have 3 elements, but there are only 2.

On the other hand, the problem disappears if

we remove the generator

collect(Iterators.Stateful(1:3))
3-element Vector{Int64}:
1
2
3

we use iterate directly

julia> s = Iterators.Stateful(2x for x in 1:3);

julia> iterate(s)
(2, nothing)

julia> iterate(s, ans[2])
(4, nothing)

julia> iterate(s, ans[2])
(6, nothing)

julia> iterate(s, ans[2])

julia>

versioninfo

julia> versioninfo()
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, ivybridge)

julia>

The problem also appears in julia 1.3.1, but it seems to be behaving as expected in 1.0.

Edit:

My 1.3.1 trial was in an online REPL (https://replit.com/languages/julia) which claims to be 1.3.1 but versioninfo() shows 1.4.1

julia version 1.3.1
 versioninfo()
Julia Version 1.4.1
Commit 381693d3df* (2020-04-14 17:20 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Xeon(R) CPU @ 2.30GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-8.0.1 (ORCJIT, haswell)

 collect(Iterators.Stateful(2x for x in 1:3))
2-element Array{Int64,1}:
2
4

Issue 2:
Strage behaviour of Stateful iterator:

Although

julia> for a in Iterators.Stateful([1,2,3])
print(a)
end
123

works as it should,

With list comprehension it fails to iterate over last element

julia> [a for a in Iterators.Stateful([1,2,3])]
2-element Array{Int64,1}:
1
2

julia> [a for a in Iterators.Stateful([1])]
ERROR: BoundsError: attempt to access 0-element Array{Int64,1} at index [1]

tried on Julia 1.3.1, Julia 1.4.0 and Julia 1.4.1.

More details in https://discourse.julialang.org/t/strange-behavior-with-list-comprehensions-using-iterators-stateful/29715
Issue 1:
Oliver Drotbohm opened SPR-6467 and commented

Currently ContentNegotiatingViewResolver acts lenient as it returns null when it can not resolve any view to indicate that further ViewResolvers configured shall step in and try to resolve the view.

In cases when ContentNegotiatingViewResolver is the only resolver configured, not resolving the view should be answered with a 406 Not Acceptable status code. A quick hack I did was to add a property beStrict to CNVR an implement an inner class to return the appropriate statuscode. See applied patch.

This solves the problem at a first glance but I think it would be more clean to prevent processing of the request entirely if no valid accept header was set by using the algorithm getmediaTypes(..) in CNVR. Currently this method is not public, but I could imagine a HandlerInterceptor implementation that gets a reference to the CNVR injected and call to getMediaType(..) to decide whether to process the request at all.

Affects: 3.0 RC2

Attachments:

bestrict.patch (2.43 kB)

Issue Links:

#11559 exotic MIME-Type leads to 500 Internal Server Error ("is duplicated by")

Referenced from: commits 1cd0a97

Issue 2:
Chris Beams opened SPR-9779 and commented

Per email.

This issue is a sub-task of #14349

Issue Links:

#14417 Upgrade to JUnit 4.11 snapshot in support of JDK7 ("depends on")

#14350 Build against JDK 7, test against JDK 6+7 ("is depended on by")

#14625 AdvisorAdapterRegistrationTests fails intermittently under Java 7 ("is duplicated by")

#14625 AdvisorAdapterRegistrationTests fails intermittently under Java 7

Referenced from: commits a9a90ca