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

Using the npm-name module outputs true or false in a next project.

Current Behavior

Attempts to use npm-name result in the error:

This dependency was not found:
* electron in ./node_modules/npm-name/node_modules/got/index.js
To install it, you can run: npm install --save electron

Steps to Reproduce (for bugs)

In a Next.JS project:

import npmName from 'npm-name'
npmName('npm-name') // throws the error

Context

Trying to use the npm-name module results in Next throwing an error because electron is not installed. I don't want to introduce electron to the project obviously, and looking through the source of got, I'm not sure why it's being required.

Your Environment

Tech
Version

next
4.2.3

node
9.2.0

OS
macOS 10.12.6

browser
chrome63

Corresponding ticket with npm-name: sindresorhus/npm-name#16

I believe this is a NextJS issue.

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

Expected Behavior

Following the README.md instructions to run a next.js project, but create the project's folder in a subfolder which starts with a "."

Changing the text in index.js should initiate a recompile which is reflected in the browser.

Current Behavior

Next never recompiles after change are made to index.js. Must ctrl+c to quit, then run npm run dev again.

Steps to Reproduce (for bugs)

Please review video here: https://www.youtube.com/watch?v=HfOiCxw6bKw&feature=youtu.be

note that the project is running out a folder ".nosync" (because of this: https://discussions.apple.com/thread/6811420?start=0&tstart=0)

Context

Simply trying out next. basic HMR is not working correctly.

Your Environment

Tech
Version

next
^4.1.3

node
8.7.0

OS
OSX 10.13

browser
Chrome 61

etc
npm 5.4.2
Issue 1:
Hi guys, I hope this isnt't a really stupic question, but I'm unable to change the color (or even edit any less variable) in the getbootstrap/customize page.. I've tride in both Chrome and FF. Is this expected behavior?

Thanks,

John

Issue 2:
Just an idea.

Make it so that when you are about to enter text into the text boxes, rather than putting the cursor at the start and deleting the old content on type, you would instead mark it all when you enter a text box, and the user could then "unmark" a portion to merely edit the value slightly.

This is properly mostly useful for the "fonts" section, where you might not wan't to define your own complete set of font's but merely add or change a single of them and put that in higher priority.

Right now you have to retype all the font's, including the ones already there as defaults...

It's quite a minor thing, but it should also be a minor thing to fix I believe.

Cheers.
Issue 1:
razzle.cmd only checks Community and Enterprise paths of VS2017 to find msbuild.

Simply adding another two if blocks for checking %ProgramFiles%\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe and %ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe fixes the issue.

Issue 2:
Environment

Windows build number:

powershell version

$psversiontable

PSVersion 5.1.18362.145

PSEdition Desktop

PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}

BuildVersion 10.0.18362.145

CLRVersion 4.0.30319.42000

WSManStackVersion 3.0

PSRemotingProtocolVersion 2.3

SerializationVersion 1.1.0.1

Windows Terminal version (if applicable): Windows Terminal (Preview) 0.4.2382.0

Any other software?

No

Steps to reproduce

Open two tabs in the terminal.

In the first terminal, type "ubuntu" to go into WSL.

cd it into a path with a long name.

Expected behavior

Every tab name should be limited in a certain length or set adaptively.

It should be easy to switch among tabs and easy to close.

Actual behavior

The tab name is too long but the terminal doesn't give it a length limit, and it strongly affects the function of following tabs.

There is no close button for the second tab.
Issue 1:
[root@irlab julia]# make

LINK uijulia-release-readline

/usr/bin/ld: cannot find -lncurses

collect2: ld 返回 1

make[1]: *** [/home/huangshaomang/soft/julia/julia-release-readline] 错误 1

make: *** [julia-release] 错误 2

[root@irlab julia]#

what's up? please help me..

Issue 2:
CC src/jltypes.o
CC src/gf.o
CC src/support/hashing.o
CC src/support/timefuncs.o
CC src/support/dblprint.o
CC src/support/ptrhash.o
CC src/support/operators.o
CC src/support/socket.o
CC src/support/utf8.o
CC src/support/ios.o
CC src/support/dirpath.o
CC src/support/htable.o
CC src/support/bitvector.o
CC src/support/int2str.o
CC src/support/dump.o
CC src/support/libsupportinit.o
CC src/support/arraylist.o
LINK src/support/libsupport.a
CC src/flisp/flisp.o
CC src/flisp/builtins.o
CC src/flisp/string.o
CC src/flisp/equalhash.o
CC src/flisp/table.o
CC src/flisp/iostream.o
CC src/flisp/julia_extensions.o
LINK src/flisp/libflisp.a
CC src/flisp/flmain.o
CC src/flisp/flisp
FLISP src/julia_flisp.boot
FLISP src/julia_flisp.boot.inc
CC src/ast.o
CC src/builtins.o
CC src/module.o
CC src/codegen.o
CC src/interpreter.o
CC src/alloc.o
CC src/dlload.o
CC src/sys.o
CC src/init.o
CC src/task.o
CC src/array.o
CC src/dump.o
CC src/gc.o
LINK src/libjulia-release.a
LINK libjulia-release.so
CC ui/repl.o
CC ui/repl-basic.o
LINK uijulia-release-basic
CC ui/repl-readline.o
LINK uijulia-release-readline
LINK ui/webserverjulia-release-webserver
PERL j/pcre_h.j
PERL j/errno_h.j
JULIA sys0.ji

make: *** [sys0.ji] Error 1
Issue 1:
Description

dag import fails sometimes due to some changes in sys config, ignored rare case scenario.

Need an alert on slack/mail whenever dag import fails.

Use case/motivation

No response

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

It would be great to be able to grant permission for each connection with the Airflow permission value.

Currently, there are ​​"an create on Connections, can read on Connections, can edit on Connections, can delete on Connections and menu access on Connections".

I think we need "can access on Connection:CONNECTION_NAME, can read on Connection:CONNECTION_NAME, can edit on Connection:CONNECTION_NAME, can delete on Connection:CONNECTION_NAME" as well.

Use case/motivation

When multiple people use airflow, there needs to limit the connections each user can access.

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 1:
I'm running into this error:

./request.rs:1:7: 1:29 error: duplicate definition of type request
./request.rs:1 import mre::request::request;
^~~~~~~~~~~~~~~~~~~~~~

even though I only import mre::request::request once in that file. Perhaps I'm running into a compiler bug, or maybe I just don't quite understand the import rules. So, it would be helpful if the duplicate definition error also reported where rust first found the definition.

Issue 2:
This code:

static TEST: int = 10;
static TEST2: &'static int = &TEST;

Produces the following IR:

@_ZN4TEST20h60213af30ae88ef1eaaE = internal constant i64 10
@const = private constant i64 10
@_ZN5TEST220hc4be0dea553bf116iaaE = internal constant i64* @const

So TEST2 points to a duplicate of TEST, namely @const, rather than TEST itself.
Issue 1:
Currently, there are two formulations in the documentation: (1) in the Returns description, some form of "N trials given n successes" where the last trial is incorrectly indexed as N + n and (2) in the Notes, "N failures given n successes and p(success) = p". However, neither of these descriptions match the variable that is actually returned, which via the gamma-Poisson mixture is "N successes given n failures and p(success) = p". While "N failures given n successes" and "N successes given n failures" have the same expression as their respective pmfs, they are not equivalent except when p=0.5:

import numpy as np
import scipy as sp
import scipy.special

N = np.arange(100)
p = 0.5
# N successes given 5 failures
p0 = sp.special.binom(N + 5 - 1, N) * p**N *(1-p)**5
# N failures given 5 succeses
p1 = sp.special.binom(5 + N - 1, 4) * p**5 *(1-p)**N
np.allclose(p0 ,p1)
# True

p = 0.75
p0 = sp.special.binom(N + 5 - 1, N) * p**N *(1-p)**5
p1 = sp.special.binom(5 + N - 1, 4) * p**5 *(1-p)**N
np.allclose(p0, p1)
# False

Clearly "N failures given n successes and p(success) = p" is equivalent to "N successes given n failures and p(success) = 1 - p". The quickest solution is to change the description to match "N successes given n failures and p(success) = p". I also suggest switching to the p(k; r, p) notation used on the negative binomial distribution Wikipedia page.

EDIT: On further inspection, the output does match the second description, given the shape and scale parameterization of the gamma distribution. I've changed the title to reflect this.

Issue 2:
The docstring says that negative_binomial() returns:

out : ndarray or scalar
Drawn samples from the parameterized negative binomial distribution,
where each sample is equal to N, the number of trials it took to
achieve n - 1 successes, N - (n - 1) failures, and a success on the,
(N + n)th trial.

N isn't the number of trials, it's the number of failures. The number of trials (excluding "the (N+n)th trial") is N+n-1, as in the equation in the "Notes" section. The formula N - (n - 1) is wrong too, it should be just N.

If the drawn sample were the number of trials, the minimum returned value would be n-1, but it plainly is not:

>>> import numpy as np
>>> np.random.negative_binomial(10, .99)
0
>>>
Issue 1:
Bayesian classifier for categorical data when we have observations in test data that not present in train data

can not believe you do not have it

since in real live it is always the case

Issue 2:
Describe the bug

NB crashes when there is data in test data what was not used in train data

https://scikit-learn.org/stable/modules/generated/sklearn.naive_bayes.CategoricalNB.html#sklearn.naive_bayes.CategoricalNB

in real live test data values are different from train data
Issue 1:
Since constructor visibility #2341 got merged. I haven't been able to utilise it fully because the classes I can benefit from requires type parameters and this typings on static methods.

abstract class Model<P> {
static create(props: P): this {
let model = window.store[this.name + props.id];
if (model) {
return model;
}
return window.store[this.name + props.id] = new this(props)
}

protected constructor(props: P) {
}
}

The Model class is a base class. A this typing would be very good to refer to the subclass instead of the base class. Since many classes has type arguments in their constructors, it makes sense to allow type arguments in static factory methods as well, otherwise you cannot create type safe factory methods.

Issue 2:
When trying to implement a fairly basic, but polymorphic, active record style model system we run into issues with the type system not respecting this when used in conjunction with a constructor or template/generic.

I've posted before about this here, #5493, and #5492 appears to mention this behavior also.

And here is an SO post this that I made:

http://stackoverflow.com/questions/33443793/create-a-generic-factory-in-typescript-unsolved

I have recycled my example from #5493 into this ticket for further discussion. I wanted an open ticket representing the desire for such a thing and for discussion but the other two are closed.

Here is an example that outlines a model Factory which produces models. If you want to customize the BaseModel that comes back from the Factory you should be able to override it. However this fails because this cannot be used in a static member.

// Typically in a library
export interface InstanceConstructor<T extends BaseModel> {
new(fac: Factory<T>): T;
}

export class Factory<T extends BaseModel> {
constructor(private cls: InstanceConstructor<T>) {}

get() {
return new this.cls(this);
}
}

export class BaseModel {
// NOTE: Does not work....
constructor(private fac: Factory<this>) {}

refresh() {
// get returns a new instance, but it should be of
// type Model, not BaseModel.
return this.fac.get();
}
}

// Application Code
export class Model extends BaseModel {
do() {
return true;
}
}

// Kinda sucks that Factory cannot infer the "Model" type
let f = new Factory<Model>(Model);
let a = f.get();

// b is inferred as any here.
let b = a.refresh();

Maybe this issue is silly and there is an easy workaround. I welcome comments regarding how such a pattern can be achieved.
Issue 1:
Question

For English only, other languages will not accept.

Before asking a question, make sure you have:

Googled your question.

Searched open and closed GitHub issues.

Read documentation: ShardingSphere Doc.

Please pay attention on issues you submitted, because we maybe need more details.

If no response anymore and we cannot reproduce it on current information, we will close it.

version 4.1.1

Issue 2:
Please answer these questions before submitting your issue. Thanks!

Which version of Sharding-Jdbc do you using?

1.4.2

目前可以显示下发到对应数据库执行的sql明细么？
Issue 1:
Hi Electron team,

A few days ago，we make a new issue about this，but the problem is not solved, you can see this issue:

#24443

Recently, we have scanned both BoringSSL and Chromium, but both of them have no vulnerabilities .

so could you please help us .

Looking forward your soon feedback.

Thank you in advance.

Issue 2:
Output of node_modules/.bin/electron --version: v2.0.11

Operating System (Platform and Version): Arch Linux

Expected Behavior

Menu bar text font color should be white for a black/dark background.

Actual behavior

Menu bar text color is gray(close to black) with black background. So the text is unreadable.

To Reproduce

Have had this problem since installation.

Screenshots

Additional Information

I am facing this problem on both Atom and VS Code so I am presuming it to be related to Electron. This is happening on both light and dark themes. In fact there is no change in the menu bar colors for Adapta and Adapta-Nokto themes. I have read abt this issue on another thread here but it was last updated an year ago and mentions the problem being related to electron not having GTK3 support. I presume this has been achieved so I dont know what to do now.
Issue 1:
If mode == 'w' and warn==True then weird raw_input is requested. Change this to raise/warn as appropriate

change the _quiet field (default is False) to a warning (about duplicates in readback)

Issue 2:
In #14576, we consolidated compression code and introduced support for compressed URLs beyond just gzip. However, as described in #14576 (comment), the c-engine cannot read bz2-compressed URLs in python 2. This error is coming from parser.pyx#L615-L621. There may be potential to entirely bypass this offending code as it appears to duplicate the functionality of _get_handle.
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I should be able to use the package request without crashes.

Current Behavior

The server crashes when I import the package.

These dependencies were not found:

* fs in ./node_modules/needle/lib/needle.js, ./node_modules/needle/lib/multipart.js and 1 other
* net in ./node_modules/forever-agent/index.js, ./node_modules/tough-cookie/lib/cookie.js and 1 other
* tls in ./node_modules/forever-agent/index.js, ./node_modules/tunnel-agent/index.js

To install them, you can run: npm install --save fs net tls

Steps to Reproduce (for bugs)

Get a next.js project running (I've utilized the Basic CSS Exaple)

Add the package with npm install request

Import the package anywhere with import request from 'request'

Try to run, the server crashes as soon as it reaches the import.

Context

I am just trying to create a POST request to an API.

Your Environment

Tech
Version

next
v4.2.3

node
v8.1.3

OS
Ubuntu 16.04.3 LTS

browser
Chrome 62.0.3202.89

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

I've been following the https://github.com/zeit/next.js/tree/master/examples/with-redux-saga example and noticed when I change the code in the saga files, the app is hot-reloaded, although not the saga files. The new saga code starts working after F5 reload.

Expected Behavior

When saga files changed, the changes are propagated with the rest of the app and replaced the existing saga code.

Current Behavior

client.js?3cc2700:199 [HMR] bundle rebuilding
client.js?3cc2700:207 [HMR] bundle rebuilt in 439ms
process-update.js?3cc2700:27 [HMR] Checking for updates on the server...
process-update.js?3cc2700:100 [HMR] Updated modules:
process-update.js?3cc2700:102 [HMR] - ./saga.js
process-update.js?3cc2700:102 [HMR] - ./store.js
process-update.js?3cc2700:102 [HMR] - ./pages?entry
process-update.js?3cc2700:107 [HMR] App is up to date.

But saga code is still the former one, until next server render.

Steps to Reproduce (for bugs)

clone the with-redux-saga example

Run with next

Add some changes, e.g. console.log at the saga beginning https://github.com/zeit/next.js/blob/master/examples/with-redux-saga/saga.js#L31

save, watch the code replace, but not the saga.

Is this even possible? The saga file is executed after change, but the saga code in the generators does not.

Your Environment

Tech
Version

next
v3.2.1

node
v5.12.0

OS
Windows 10 x64

browser
Google Chrome, Version 60.0.3112.113 (Official Build) (64-bit)
Issue 1:
Users who want a macro that expands to a collection items are required to wrap the RHS in {} in order to get them to expand to a whole block. However, if they fail to do so, they unexpectedly just get the first item of the block, rather than an error message.

macro_rules! print_if_nonzero(
($msg:expr, $($field:ident),*) => ( /*{*/
$(
if t.$field != 0 {
println($msg);
}
)*
/*}*/ )
)

struct T { x: int, y: int }

fn main() {
let t = T { x: 0, y: 0 };
print_if_nonzero!("hello", x, y);
}

...expands to...

fn main() { let t = T{x: 0, y: 0,}; if t.x != 0 { println("hello"); }; }

Issue 2:
When two items in the same documentation page have the same name, rustdoc generates duplicate HTML id attributes for them. This makes the HTML invalid, but more importantly, it makes it impossible to link to anything but the one that shows up first in the source.

For example, Vec's page contains multiple impls of IntoIterator, and therefore multiple HTML elements that have an id attribute of assoc_type.Item, assoc_type.IntoIter, and method.into_iter.

This is not limited to impls of the same trait, as different traits (and inherent impls) could define methods or associated types with the same name.
Issue 1:
Stéphane Nicoll opened SPR-7630 and commented

While migrating our app from 2.5.7 to 3.0.4 we have noticed a major slowdown in the application context's startup.

Our application is using Spring Batch and has 22 batches. I have ran a profiling session and noticed an abusive call to java.lang.Class.getMethod(String, Class[]).

The culprit seems to be a change in AnnotationUtils.findAnnotation(Method,Class).

Attached the back trace calls for both Spring 2.5 and 3.0.4. The only thing that changed between the profiling sessions is the Spring version and the profiler only starts the (same) application context.

I also have the yourkit snapshots if you are interested to run a snapshot comparison.

This is obviously blocking us to upgrade. Let me know if there anything I can do to help.

Affects: 3.0.4

Reference URL: http://forum.springsource.org/showthread.php?p=323388#post323388

Attachments:

spring25-batch-register-step-listeners-call-stack.png (108.12 kB)

spring25-getMethod.png (19.30 kB)

spring25-register-item-listeners-call-stack.png (91.53 kB)

spring-3.0.4.xls (594.00 kB)

spring-3.0.5-SNAP-getMethod.PNG (16.06 kB)

spring-3.0.5-SNAP-register-item-listeners-call-stack.png (46.23 kB)

spring3-getMethod.png (59.53 kB)

spring3-register-item-listeners-call-stack.png (67.84 kB)

spring3-register-step-listeners-call-stack.png (66.47 kB)

Issue Links:

#16501 ReflectionUtils slow down application startup on WebSphere

#21216 Comprehensively cache annotated methods for interfaces and superclasses

Referenced from: commits 3c067e5

1 votes, 5 watchers

Issue 2:
Oliver Drotbohm opened SPR-8880 and commented

Suppose you have an application with a base package of com.acme with an @Configuration class located in this package. Now suppose you use this configuration class as basePackageClass inside @ComponentScan. This will result in an exception saying the class is registered twice. So you pretty much end up with always adding this exclude.

Would it make sense to default the excludeFilters attribute of the @ComponentScan annotation as follows?

@Filter(type = FilterType.ANNOTATION, value = Configuration.class)

Affects: 3.1 RC2

Issue Links:

#13450 Allow @Configuration classes to self-@ComponentScan ("duplicates")
Issue 1:
Series.map works when passed a dict, but Index.map doesn't:

>>> s = pd.Series(['a', 'b', 'c', 'd'], index=['a', 'b', 'c', 'd'])
>>> d = {'a': 0, 'b': 1, 'c': 2, 'd': 3}
>>> s.map(d)
a 0
b 1
c 2
d 3
dtype: int64
>>> s.index.map(d)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/evanpw/Workspace/pandas/pandas/indexes/base.py", line 2305, in map
return self._arrmap(self.values, mapper)
File "pandas/src/generated.pyx", line 2356, in pandas.algos.arrmap_object (pandas/algos.c:70221)
TypeError: 'dict' object is not callable

PR to follow shortly

Issue 2:
A DataFrame index has the map function, which expects a mapper. However, unlike mapping a Series, it only accepts callables, and won't work when mapping through dictionaries or series.

Code Sample:

df = pd.DataFrame({'col1': range(5)})
d = {0: 'zero', 1: 'one', 2: 'two', 3: 'three', 4: 'four'}
df.col1.map(d) # perfectly valid
df.index.map(d) # TypeError: 'dict' object is not callable
s = pd.Series(d)
df.col1.map(s) # perfectly valid
df.index.map(s) # TypeError: 'Series' object is not callable

Expected Output:

I would expect the same output for df.col1.map(s) and df.index.map(s), or at least that it returns an nparray with the mapped values, as it does when we do pass a callable, but not that it breaks like it does.

output of pd.show_versions():

INSTALLED VERSIONS

commit: None

python: 2.7.6.final.0

python-bits: 64

OS: Linux

OS-release: 3.16.0-67-generic

machine: x86_64

processor: x86_64

byteorder: little

LC_ALL: en_US.UTF-8

LANG: en_DE.UTF-8

pandas: 0.18.0

nose: 1.3.7

pip: 8.1.1

setuptools: 20.6.6

Cython: 0.23.5

numpy: 1.11.0

scipy: 0.17.0

statsmodels: 0.6.1

xarray: None

IPython: 4.1.2

sphinx: 1.4

patsy: 0.4.1

dateutil: 2.5.2

pytz: 2016.3

blosc: None

bottleneck: None

tables: None

numexpr: 2.5.1

matplotlib: 1.5.1

openpyxl: 2.3.4

xlrd: 0.9.4

xlwt: None

xlsxwriter: None

lxml: 3.6.0

bs4: None

html5lib: 0.9999999

httplib2: 0.9.2

apiclient: None

sqlalchemy: 1.0.12

pymysql: None

psycopg2: 2.6.1 (dt dec pq3 ext lo64)

jinja2: 2.8

boto: 2.39.0