WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I have been having this issue since last night, i did some research but couldn't find any solution

I'm not using Material ui or Styled components

CustomLink

import { withRouter } from "next/router";
import Link from "next/link";
import React, { Children } from "react";
import cx from "classnames";

const ActiveLink = ({ router, children, ...props }) => {
const child = Children.only(children);

const className = cx(child.props.className, {
[props.activeClassName]: router.asPath === props.as && props.activeClassName
});

delete props.activeClassName;

return <Link {...props}>{React.cloneElement(child, { className })}</Link>;
};

export default withRouter(ActiveLink);

Nav.js

import "../../static/styles/Nav.scss";

const Nav = () => {
return (
<nav className="navbar">
<Link
href="/player?name=xXSARKURDZz&platform=psn"
as="/player/psn/xXSARKURDZz"
activeClassName="navbar__item-active"
>
<a className="navbar__item">Profile</a>
</Link>

<Link
href="/gambit?name=xXSARKURDZz&platform=psn"
as="/player/psn/xXSARKURDZz/gambit"
activeClassName="navbar__item-active"
>
<a className="navbar__item">Gambit</a>
</Link>

</nav>
);
};

export default Nav;

Issue 2:
Examples bug report

Example name

with-styled-components

Describe the bug

Also posted here: #2538

Using css prop introduced with styled-components v4 causes Warning: Prop className did not match..

To Reproduce

Add any HTML element with css prop.

Expected behavior

Correctly styled rendering on the server side without any warnings.

Screenshots

System information

OS: Windows

Chrome

Version of Next.js: 8.1.0

Additional context

Here is an example I created to demonstrate the issue: https://codesandbox.io/embed/jlwvwyy0ow

Open this and refresh once the building is done: https://jlwvwyy0ow.sse.codesandbox.io/
Issue 1:
When customizing bootstrap by changing the colors in less/variables.less one might also want to change the :focus border and glow because if you change your primary color it doesn't look very nice if you still have to stick with the hardcoded blue. Please make the colors in less/forms.css from lines 126 to 131 somehow dependent from variables.

Issue 2:
I would like to reopen the issue 517. Thx

#517
Issue 1:
The error message caused by the query at the top does not give any sane hint as to what is actually wrong:

https://gist.github.com/0dc816b64318e5898b62

Error messages should be a bit more helpful and actually try to tell the user what was expected.

Issue 2:
In 2.1.1 (and, I think, all 2.X versions), there's no support for loading plugins to a client-only node.

For example, there's no (obvious) way to load plugins when doing something like:

Node node = NodeBuilder.nodeBuilder()
.clusterName("my-cluster")
.settings(settings)
.client(true)
.build();

An addPlugin method on NodeBuilder along the lines of TransportClient.addPlugin would be helpful.

The work-around is to override Node, duplicate the environment/version constructor logic, and provide your custom list of plugins to load:

private static class PluginEnabledNode extends Node {
public PluginEnabledNode(Settings settings, Collection<Class<? extends Plugin>> plugins) {
super(InternalSettingsPreparer.prepareEnvironment(settings, null),
Version.CURRENT,
plugins);
}
}

And then you can directly instantiate a PluginEnabledNode (being careful to set "node.client" and "cluster.name" in your settings)

Node node = new PluginEnabledNode(settings, ImmutableList.<Class<? extends Plugin>>of(CloudAwsPlugin.class)).start()

Note to anyone attempting this work-around -- my initial attempt resulted in a very large number of Guice related injection errors when the Node was initializing. These were due to a library version conflict between what was used by my project and what was used by the plugin I was adding. In my case, I had an older version of Jackson and the plugin was using a new version that relied on methods that didn't exist in the older version.
Issue 1:
I meet a problem . When I index an value , for example {"id": -8848340816900692111},

then i search it ,it shows that "id": -8848340816900692000.

Anyone can help? I want know why does elasticsearch do this and how can i deal with.

Thanks.

Issue 2:
Insert a document :

PUT test/Test/1
{
"value" : 1201169796353347552
}

Get it :

GET test/Test/1

The received value for the field is : 1201169796353347600.

When searching, only '1201169796353347552' - the original value must be used in order to get the document.
Issue 1:
Do you want to request a feature or report a bug?

feature

What is the current behavior?

https://codesandbox.io/s/zn7p0168vp

Wrapping in act doesn't help because setState is called later, on another tick, so warning is printed in a console.

What is the expected behavior?

Some way to test code like this without getting warning in a console about wrapping inside act.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

16.8.0

Issue 2:
Do you want to request a feature or report a bug?

bug

What is the current behavior?

If a component performs a second (non user triggered) update, act cannot detect it and warns about the update.

For example, a button is clicked and updates its text. After a second, the button resets and its text reverts to its original state.

https://codesandbox.io/s/6xkyl37x7k?previewwindow=tests

(The reproduction is a bit contrived, but demonstrates the issue.)

What is the expected behavior?

The test runs without warning about being wrapped in act.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

React & React DOM @ 16.8.0
Issue 1:
Electron version: 1.6.6

Operating system: Ubuntu 16.04

Expected behavior

Tray.setTitle("Something...") should work on Linux (at least on Unity/appindicator) because text can be displayed alongside the icon.

Actual behavior

It only works on macOS

How to reproduce

const {app, Menu, Tray} = require('electron')

let appIcon = null
app.on('ready', () => {
appIcon = new Tray('/path/to/my/icon')
appIcon.setTitle("Something")
})

Issue 2:
Electron version: 0.36.10 (latest stable)

Operating system: Ubuntu 15.10

I already asked this on stackoverflow: http://stackoverflow.com/questions/35755240/how-to-add-text-to-ubuntu-app-indicator-with-with-nw-js-or-electron

I would like to add text to the ubuntu (unity) app indicator. That's possible via the python package libindicator but not via electron so far.
Issue 1:
Description

If I create a OneHotEncoder instance defining the categories manually and then try to transform data directly (skipping the fitting step), I get a NotFittedError.

Steps/Code to Reproduce

import numpy as np
from sklearn.preprocessing import OneHotEncoder
categories = ['a', 'b', 'c']
ohe = OneHotEncoder(categories=categories)
new = ohe.transform(['a', 'c', 'b', 'b'])

Expected Results

No error, since the categories were defined manually. This is the behaviour that I expected from the documentation:

By default, the encoder derives the categories based on the unique values in each feature. Alternatively, you can also specify the categories manually.

Actual Results

NotFittedError Traceback (most recent call last)

in

3 categories = ['a', 'b', 'c']

4 ohe = OneHotEncoder(categories=categories)

----> 5 new = ohe.transform(['a', 'c', 'b', 'b'])

~\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\preprocessing_encoders.py in transform(self, X)

724 Transformed input.

725 """

--> 726 check_is_fitted(self, 'categories_')

727 if self._legacy_mode:

728 return _transform_selected(X, self._legacy_transform, self.dtype,

~\AppData\Local\Continuum\anaconda3\lib\site-packages\sklearn\utils\validation.py in check_is_fitted(estimator, attributes, msg, all_or_any)

912

913 if not all_or_any([hasattr(estimator, attr) for attr in attributes]):

--> 914 raise NotFittedError(msg % {'name': type(estimator).name})

915

916

NotFittedError: This OneHotEncoder instance is not fitted yet. Call 'fit' with appropriate arguments before using this method.

Versions

Windows-10-10.0.17134-SP0

Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)]

NumPy 1.16.4

SciPy 1.2.1

Scikit-Learn 0.21.2

Issue 2:
Right now there's some estimators that don't require calling "fit", two that I'm aware of: Normalizer and FunctionTransformer. They do input validation if fit is called.

There's one estimator that is stateless but requires calling fit for no real reason I can see, AdditiveChi2Sampler.

My questions are:

Should we remove the requirement to calling fit if it can be avoided?

If fit is called, should we ensure that the number of features is the same in fit and transform, even though that's not required by the algorithm to avoid user errors?
Issue 1:
Have a look at this:

function foo (a, b) {
if (b) {
return foo(b);
} else {
return a;
}
}

One would expect foo("Michael", "Jackson") to evaluate to "Jackson", yes? Yes. Except it doesn't. Rather, the function never returns and your computer probably heats up a little.

A quick look at the compiled code shows what the problem is:

function foo(_x, _x2) {
var _again = true;

_function: while (_again) {
var a = _x,
b = _x2; // (1)
_again = false;

if (b) { // (2)
_x = b; // (3)
_again = true;
continue _function;
} else {
return a;
}
}
}

At (3) we simulate the tail call foo(b) by setting _x to b and jumping back to the start of the loop. Only problem is, _x2 is still the same value as b so (1) is a noop on the second go round. Obviously this means that (2) evaluates true and we just keep spinning like that.

Solution: Reset all parameters, not just the ones passed to the tail call. Unless, perhaps, you can be certain they (the unpassed parameters) won't be dereferenced again, but that seems like difficult logic to implement for very little performance gain.

But wait! There's more!

function foo (a, b) {
if (arguments.length == 2) {
return foo(() => console.log(a, b));
} else {
return a;
}
}

foo("Michael", "Jackson")();

Can you guess what this prints? No cheating now...

Yes that's right! It prints something like:

function () { return console.log(a, b); } Jackson

This is because the lambda closes over a, but a is promptly reset by the TCE loop from "Michael" to the lambda itself.

Solution?: check for parameters being closed over with the resulting closure escaping the scope of the current TCE loop iteration. Surround them with an extra closure or with or something? Not sure what would be performant.

Sorry I couldn't resist.

Issue 2:
function callbackPerInt(count, cb){
if (count < 0) return;

cb(function(){ return count; });

return callbackPerInt(count - 1, cb);
}

Currently, TCO makes this

function callbackPerInt(_x, _x2) {
var _again = true;

_function: while (_again) {
_again = false;
var count = _x,
cb = _x2;

if (count < 0) return;

cb(function () {
return count;
});

_x = count - 1;
_x2 = cb;
_again = true;
continue _function;
}
}

which means that the value returned by the final callback depends on when the function passed to the callback is called. If it's called synchronously inside cb then it will return the correct value, but otherwise it'll a later version of count.

I don't know the spec, but I'd guess we either need to skip optimizing, or the while loop body needs to be treated like all function-scoped variables are block-scoped inside the while loop like a normal while loop.
Issue 1:
Hi

soon with Android Q the night mode will be very important in my opinion and it would be nice if you can fix this little problem. Glide does not find pictures in the following directories:

drawable-night

drawable-night-hdpi (also mdpi, xhdpi, xxhdpi and xxxhdpi)

Greets

Frank

Issue 2:
Enhancement Request:

Problem:

Glide makes duplicate network calls when loading (or prefetching) the same image URL into multiple ImageViews if the below is true:

The requests were made before Glide saved them to DISK cache.

The ImageViews differ in size or there are other minor differences in the GlideRequest.

Solution:

Ideally, Glide should wait for an ongoing network call to complete so it can reuse the response, rather than making another call because there are slight differences in the GlideRequest.

If Glide could be smarter about this it would make prefetching significantly easier because it would become less important to determine the exact GlideRequest params ahead of time, such as ImageView dimensions.
Issue 1:
Will scikit-learn accept pull requests for low-level code with static type hints? Does it ever plan to?

I don't know where the core team stands on static type hints in Python, but I think they make it 10x easier to grok code and convert users to contributors.

2018 seems like a great time to make this change, in light of Numpy dropping support for new features in Python 2.7. #11115

Supported version would need to change from Python (>= 2.7 or >= 3.4) to Python (>= 3.5) to support static type hints.

Issue 2:
Describe the workflow you want to enable

Support Python typing, which is available in Python 3.5+, compatible with scikit-learn. This can enable tools to automatically get the estimator arg types (e.g., linters), for example. And it's a Python standard now.

Describe your proposed solution

For example, SVC could be like this:

def __init__(
self,
C: float = 1.0,
kernel: Union[Callable[[np.ndarray, np.ndarray], np.ndarray],
Literal["linear", "poly", "rbf", "sigmoid", "precomputed"]] = "rbf",
degree: int = 3,
gamma: Union[float, Literal["scale", "auto"]] = "scale",
coef0: float = 0.0,
shrinking: bool = True,
probability: bool = False,
tol: float = 1e-3,
cache_size: int = 200,
class_weight: Optional[Union[Mapping[int, float], Literal["balanced"]]] = None,
verbose: bool = False,
max_iter: int = -1,
decision_function_shape: Literal["ovo", "ovr"] = "ovr",
break_ties: bool = False,
random_state: Optional[Union[int, RandomState]] = None,
) -> None:

Describe alternatives you've considered, if relevant

An alternative is to keep the types just in the docstrings. However, is hard for tools to parse the arg types.
Issue 1:
Fork from #3329 ...

When something goes bad, the system generates tons of events which are identical except the timestamps. For example, pulling a non existing image, Kubelet will generate a lot of image_not_existing events and container_is_waiting events until upstream components corrects the image. When such things happen, the entire event mechanism becomes useless. This also causes memory pressure for etcd #3853

Issue 2:
Provide DNS resolution for pod addresses.
Issue 1:
Hello,

currently, I'm trying to integrate a custom third-party input field (source code editor) written in JavaScript which is not based on Angular. Thus I need to wrap it to a component, use EventEmitter to report changes outside and use ngOnChanges to apply changes coming from outside.

The Input of the component is named model and the Output is named modelChange so that the other components can take advantage of a two-way data binding.

I've noticed that if the parent component applies the two-way data binding and if the child emits an event, the change of the parent's data emits another event which is sent back to the child. If you imagine that the ngOnChanges calls an expensive method that handles the change, you probably agree with me that this effect is something I would like to avoid. Can you please provide a mechanism to achieve this?

Or am I doing something wrong? Can it be done better?

Here is a Plunk demonstrating the echo effect: http://plnkr.co/edit/drRlJRCsvnzcTqlR4UlX

PS - I am not sure if this is related to #4593

PS - Feel free to make the title more understandable.

Issue 2:
E.g.

export class Checkbox {
@Output() change: EventEmitter = new EventEmitter();

@HostListener('change', [
'$event.target.value'
])
onChange(event) { ... }
}
Issue 1:
error: TS2345 [ERROR]: Argument of type '{ depth: number; sorted: boolean; trailingComma: boolean; compact: boolean; iterableLimit: number; }' is not assignable to parameter of type 'InspectOptions'.

Object literal may only specify known properties, and 'sorted' does not exist in type 'InspectOptions'.

sorted: true,

~~~~~~~~~~~~

at https://deno.land/std@0.61.0/testing/asserts.ts:26:9

Issue 2:
I have a very simple oak server running both locally and on an external server. It is hosting static content, nothing else.

I ran deno cache --reload server.ts yesterday, and got the following:

error: TS2345 [ERROR]: Argument of type '{ depth: number; sorted: boolean; trailingComma: boolean; compact: boolean; iterableLimit: number; }' is not assignable to parameter of type 'InspectOptions'.
Object literal may only specify known properties, and 'sorted' does not exist in type 'InspectOptions'.
sorted: true,
~~~~~~~~~~~~
at https://deno.land/std@0.61.0/testing/asserts.ts:26:9

I ran deno cache --reload server.ts again today with the same result, so I figured I should probably post the issue here.
Issue 1:
I'm pretty sure this is a bug. When you set itRtl in your theme and create a TimePicker instance, clock digits are started from left which is wrong.

react: 15.3.1

material-ui: "^0.15.4"

Issue 2:
Problem description

TimePicker displays incorrect with RTL direction

Versions

Material-UI: 0.15.4

React: 15.2.0

Browser: any browser

Images & references

-->
Issue 1:
It would be great to have another possibility of template representation besides string. Inspired by React JSX/TSX, if there exists AngularJSX custom JSX factory (which creates JavaScript object tree, consumed by Angular as an alternative to string template) we can use JavaScript x Typescript template (see below). Both for inline and HTML templates. In the second case there could be e.g. templateJsxUrl='./teplates/myTemplate.jsx' component attribute:

Pure JavaScript example:

var AppComponent = function () {
this.templateJsx = React.createElement("div", null,
React.createElement("h3", null, title),
this.items.map(function (it) { return this.displayItem(it); }),
this.okButton(this.doClick)
);
this.items = [1, 2, 3];
}
AppComponent.prototype.okButton = function (doClick) {
return [
AngularJSX.createElement("hr", null),
AngularJSX.createElement("div", {onClick: doClick}, " OK")];
};
AppComponent.prototype.displayItem = function (it) {
AngularJSX.createElement("span", null, it);
};

Strictly typed Typescript example

if Angular accepts AngularJSX-like template representation, the rest is almost completely covered by Typescript 1.8., with all IDE benefits as refactoring, intellisence, syntax highlighting, auto-indent etc.

Developer writes:

@Component({selector: 'my-app'}
class AppComponent {
templateJsx = <div>
<h3>{ title } </h3>
{ items.map(it => displayItem(it)) }
{ okButton(doClick) }
</div>;

okButton(doClick: React.MouseEventHandler) {
return [<hr/>, <div onClick = { doClick }> OK</div >]
}
displayItem(it: any) {
<span>{ it }</span>
}
items = [1,2,3];
doClick () { alert('onClick'); }
}
...

Typescript 1.8 transpiler generates:

...
this.templateJsx = AngularJSX.createElement("div", null,
AngularJSX.createElement("h3", null, title,
this.items.map(function (it) { return this.displayItem(it); }),
this.okButton(this.doClick)
);
...

For external template:

@Component({selector: 'my-app'}
class AppComponent {
templateJsxUrl = './teplates/myTemplate.jsx'
...

AngularJSX.createElement encodes template to JavaScript object tree consumed by Angular as an string alternative.

Issue 2:
It would be cool to support JSX like templates in angular 2. JSX can hold all required information required to generate the DOM at run time. Following are some benefits come with JSX to angular:

Type safety to catch errors at compile time

Better run time performance. No need to parse template string at run time. DOM info and may be AST can be serialized at compile time

Typescript already supports JSX and understands the syntax

More intelligence and easier refactoring support for IDEs when dealing with templates

Possibility to share component templates with React
Issue 1:
I've set an alias to some location outside of the project

"alias": {
"infamous": "/home/trusktr/src/infamous+infamous"
}

(it so happens to be an NPM package) which causes errors similar to #1866.

Module build failed: ReferenceError: Unknown plugin "transform-es2015-arrow-functions" specified in "base" at 0, attempted to resolve relative to "/home/trusktr/src/infamous+infamous"
at /home/trusktr/src/trusktr+portfolio/.meteor/local/rocket-module/platform-builds/web.browser/node_modules/babel-core/lib/transformation/file/options/option-manager.js:193:17

This time I've included the whole output (don't know why I didn't last time). Is

babel-core/lib/transformation/file/options/option-manager.js:193:17

provide any clue?

This might be a dupe of #1866.

Issue 2:
I've linked a package that is outside of the project by first running npm link in the outside package, then npm link name-of-package inside the project.

I am now getting this error:

Module build failed: ReferenceError: Unknown plugin "transform-es2015-arrow-functions" specified in "base" at 0, attempted to resolve relative to "/path/to/location/far/away/from/project/name-of-package"

Of course there's no babel plugin there.
Issue 1:
The problem is, of course, as follows:

import names::{Alice, Bob};
...
match name {
Alice => ...,
Bob => ...,
Carol => ..., // <- treated as a variable because of forgotten import
_ => ..., //~ WARNING unreachable pattern
}

or:

match name {
Alice => ...,
Bob | Carol => ..., //~ ERROR variable Carol not bound in all patterns
}

We should be able to emit a hint that says something like Maybe you forgot to import Carol?.

Issue 2:
Right now the compiler has one lookup path, defined by -L and RUST_PATH. This one lookup path is used for many different purposes, leading to a number of conflicts. In the compiler today there are a number of distinct concepts of lookup paths, including:

A lookup path to find native libraries for inclusion in rlibs

A lookup path to find extern crate dependencies

A lookup path to find transitive dependencies of extern crate directives.

Conflating all of these concepts into one lookup path leads to bugs such as rust-lang/cargo#1037 and #16402 which would benefit greatly from distinct sets of lookup paths.

I would initially propose something like:

-L [KIND=]PATH Add a directory to the compiler's search paths. The
KIND provided may be omitted or one of `crate`,
`native`, or `dependency`. Each value adds the lookup
path to a separate lookup path in the compiler, and if
omitted the path is added to all lookup paths.

Using this, cargo itself would only pass -L dependency=..., build scripts would pass -L native=..., and normal uses of the compiler would continue just using -L. This behavior is also backwards compatible with today's semantics.

I'd like to nominate this issue, however, as rust-lang/cargo#1037 is quite a worrying issue which needs to be solved as part of Cargo's stability story.
Issue 1:
At the moment, the dataSource is a string, ie the url, and we cannot pass headers (from what I understood by reading the source code). This means the plugin only works for public video urls.

Please consider adding the option to add headers (eg in Android code, use setDataSource (Context context, Uri uri, Map<String, String> headers) ). This would allow us to use the plugin to show videos hosted on our servers (for which we need Authorization header).

Issue 2:
hi i want to create my app to use ARCore in Flutter like this project : https://www.youtube.com/watch?v=EP-s2ayECsI

my project is Google Reverse Image Search

please guide me

thanks