WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I encountered problem when using CircleImageView (https://github.com/hdodenhof/CircleImageView). It also happens using CircularImageView (https://github.com/Pkmmte/CircularImageView).

When image is loaded from memory everything works fine but when loading from disk cache CircleImageView shows placeholder image. When using RequestListener method onResourceReady is properly called but placeholder image stays.

If no placeholder is set image is loaded properly.

Glide version: 3.6.1

Tested on Android 4.4 and 5.0

Issue 2:
My activity has a ViewPager. This ViewPager's adapter will load a layout that contains an ImageView

The adapter overrides the method:

@Override
public Object instantiateItem(ViewGroup container, int position) {
Context context = container.getContext();
View view;
LayoutInflater layoutInflater = LayoutInflater.from(context);

view = layoutInflater.inflate(R.layout.image_view_tab, container, false);
com.pkmmte.view.CircularImageView imageView = (com.pkmmte.view.CircularImageView) view.findViewById(R.id.circularImageView);

Glide.with(context)
.load(imageURL) // This is a valid URL
.placeholder(context.getResources().getDrawable(R.drawable.placeholder))
.into(imageView);

container.addView(view);

return view;
}

The problem is that the placeholder is not replaced after the image is loaded. If I switch to another tab in the ViewPager and then switch back, there are two behaviors:

If the other tab is immediate next to the tab containing the ImageView (either left or right), the placeholder will still not be replaced with the image;

If there is at least one tab between the ImageView tab and the second tab I click, then the image will be replaced correctly.

Is anyone able to reproduce this? Am I using the right context instance?

On a second issue, if I decide not to set the placeholder, I can open this activity, but when I press the back button, I get an error Unable to destroy activity.

Both these issues only seem to happen when I use the ViewPager.
Issue 1:
The maxLines attribute simply provides with maximum lines pre-generated by the framework, thus increasing the size of TextField.

There should also be an option of minLines where maxLines will act as the maximum lines to which the TextField can EXPAND and then enables the scrolling.

Or

TextInputType.multiline should set the default maxLines to 1 and then maximum lines can grow till the size defined in the attribute.

Issue 2:
A common UI pattern is having a text field which grows vertically, adding more lines, as you type, up to a certain number of lines, after which the content scrolls.

Presently, we can have a growing TextField by making maxLines=null. However, then the TextField never stops growing. Otherwise, if we make, say, maxLines=6, then it will have 6 fixed lines, and will not grow.

Unfortunatelly, maxLines was a bad name. That should have been called simply "lines", since it fixes the number of lines, and is not a maximum. However, that cannot be changed anymore.

I will now suggest adding another parameter, called maxLineLimit, which lets the number of lines grow until that number and then no more. And while we're at that, I would also add the less important minLineLimit.

So, for example, if we make maxLines=null, minLineLimit=2, maxLineLimit=6, then the TextField starts with 2 lines, and, if necessary to fit the text, grows until 6 lines. After that it scrolls.

This change is very easy to do, in file editable.dart, the method _preferredHeight in class RenderEditable has these last 2 lines:

_layoutText(width);
return math.max(preferredLineHeight, _textPainter.height);

These could be simply changed to:

_layoutText(width);
return math.min(preferredLineHeight * maxLineLimit, math.max(preferredLineHeight * minLineLimit, _textPainter.height));
Issue 1:
Bug report

meta duplicate

Describe the bug

meta duplicate

A clear and concise description of what the bug is.

if add in _document.js

just like

// _document is only rendered on the server side and not on the client side
// Event handlers like onClick can"t be added to this file

// ./pages/_document.js
import Document, {Html, Head, Main, NextScript} from "next/document";
import React from "react";

class MyDocument extends Document {
static async getInitialProps(ctx) {
const initialProps = await Document.getInitialProps(ctx);
return {...initialProps};
}

render() {
return (
<Html>
<Head>
<link rel="icon" href="../static/favicon.ico" type="image/x-icon"/>
<link rel="shortcut icon" href="../static/favicon.ico" type="image/x-icon"/>

<meta name="viewport" content="width=device-width"/> // bug 在每个页面的 Head 里面加这一行，否则系统会默认加这一行
</Head>
<body>
<Main/>
<NextScript/>
</body>
</Html>
);
}
}

export default MyDocument;

and also add Head tag in page.js, just like

import React from "react";
import Head from "next/head";
import {withRouter} from "next/router";

export default withRouter(class extends React.Component {

constructor(props) {
super(props);
}

render() {
console.log(this.props.router.asPath);
return (
<div>
<Head>
<title>xxxxxx</title>
</Head>
</div>
);
}
});

the result is

nextjs will auto add to page

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

Go to '...'

Click on '....'

Scroll down to '....'

See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

OS: [e.g. macOS, Windows]

Browser (if applies) [e.g. chrome, safari]

Version of Next.js: [e.g. 6.0.2]

Additional context

Add any other context about the problem here.

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

I try to use fs in _document.js, developement & build process is success, but when I tried to run in production mode. I got the message.

Error: EBADF: bad file descriptor, fstat

My understand. _document.js can use on _document.js because it only runs on server-side only right?

What else, I need to config

My Environment

Tech
Version

next
5.1

node
8.9.3

OS
OSX

browser
Chrome
Issue 1:
Output of node_modules/.bin/electron --version: v3.0.0

Operating System (Platform and Version): Windows 10 v1803

Output of node_modules/.bin/electron --version on last known working Electron version (if applicable): v2.0.8

Expected Behavior

Get 'screen' sources by calling desktopCapturer.getSources({types: ['screen']}, (error, sources) => {...}).

Actual behavior

Electron crashes.

To Reproduce

In the dev console of any Electron app using v3.0.0:

require("electron").desktopCapturer.getSources({types: ['screen']}, (error, sources) => {})

Additional Information

This was working fine before updating from v2.0.8 to v3.0.0. After updating, trying to get screen sources crashes immediately. I was able to reproduce this with the quick start app using v3.0.0.

I tried unplugging my external monitor to see if that made a difference, but it didn't.

Issue 2:
Electron version: 1.6.1, 1.4.0

Operating system: macOS 10.12.3

I click a file upload button (input element with type 'file'), and try to quick look a numbers file by clicking the 'Quick Look' item from the context menu, but the close button on the upper left of the quick look window is not clickable. I click it, and nothing happens. Have to press ESC.

Expected behavior

Click the close button on the upper left and the quick look window will disappear

Actual behavior

Click the close button on the upper left and nothing happens.

You have to press ESC to close the quick look window.

How to reproduce

https://github.com/zoubin/repro-electron-quick-look-window-unclosable
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

The WebCrypto library makes available a variable "crypto" in browser side. This variable has useful keys like subtle. And in the development environment this works just fine.

Current Behavior

In production however the variable crypto is an empty object. As in {}. This is true in Chromium: Version 65.0.3325.181 (Official Build) Arch Linux (64-bit)

Firefox 50.0.2 works just fine.

Steps to Reproduce (for bugs)

The production site is here: http://159.65.115.61/

Later I'll try produce a minimal code example too.

Context

I need to do ArrayBuffer -> SHA256 hashing on client side.

Your Environment

Tech
Version

next
^5.0.0

node
v8.2.1

OS
docker + ubuntu

browser
Chrome 65.0.3325.181

Other

While this may be a Chrome issue it's unclear how do I debug the situation since it's working in dev env.

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

Expected Behavior

Visiting a path with no handler should return a 404 code.

Current Behavior

The 404 page is rendered, but the status code shows as 200.

Steps to Reproduce (for bugs)

npx create-next-app --example custom-server-hapi custom-server-hapi-app
# or
yarn create next-app --example custom-server-hapi custom-server-hapi-app

Visit http://localhost:3000/foo

Context

Your Environment

Tech
Version

next
5.1.0

hapi
17.1.1

node
9.11.1

OS
macOS High Sierra 10.13.4

browser
Chrome 65.0.3325.181
Issue 1:
Which version of ShardingSphere did you use?

5.0.0-RC1-SNAPSHOT

Expected behavior

After I configured the encrypt rules for t_user_details, if I use logical column name to perform some DDL operations, for example:

CREATE TABLE t_user_details (user_id INT NOT NULL, pwd VARCHAR(45))

It will execute DDL according to the configuration rules to generate the table as follows:

Actual behavior

Reason analyze (If you can)

Not support this feature

Some other sql please refer to #9563

about issue ： #9497

Issue 2:
Hi community,

I found that there are duplicated order of DatabaseRuleBuilder, both FixtureDatabaseRuleBuilder and FixtureDistributedRuleBuilder are orderd 0, which is the same with SingleRuleBuilder.

In addition, according to the current build order, when singleRule is initialized, the builtRules does not include encrypt and mask rules.

I want to adjust the single order to after encrypt and mask, so that it can be more intelligent during building, such as automatically loading the single table required by the feature, no additional user configuration is required. (ref #22887)

Below is the order I plan to tweak, any suggestions are welcome, thanks.

Before

After

Reference: #22759
Issue 1:
Bug report

Describe the bug

Sometimes in both development and production I have a problem where simply does not work.

To Reproduce

Navigate to certain pages

Click link

Observe issue

Expected behavior

Link should navigate me to linked page.

Screenshots

I can provide screen recording if it is helpful

System information

OS: MacOs, phoneOS

Browser Chrome, Safari

Version of Next.js: 9

Additional context

Only happens on certain key pages.

Issue 2:
This is bug report

Link does not work with css-module imported. That happens when page with Link has no css, and linked page has. No errors in console, so im not sure about reasons, but there is minimal repo to reproduce:

https://github.com/standy/next-css-error

Bug appears in next@7.0.0 + next-css@1.0.1,

Older next@6.1.2 + next-css@0.2.0 works fine
Issue 1:
I am unable to receive the text I'm inputting onto the TextfField from my physical keyboard on my laptop

NB -> I am mirroring my physical device (Xiaomi Redmi 4A) on the laptop

Issue 2:
Was reading up on changes for Android P, and it led me to file this...

https://android-developers.googleblog.com/2017/11/getting-your-android-app-ready-for.html

https://code.tutsplus.com/articles/faster-logins-with-password-autofill-in-ios-11--cms-29096

@Hixie do you think this is the domain of the framework or plugins?
Issue 1:
Something along the lines of:

{
"files" : [
"folder1\\*.ts",
"folder2\\**.ts"
]
}

open questions:

Should it be in files or a separate property

What is the expected --watch behavior

Should we add excludes as well (e.g. includes: ".ts", excludes: ".d.ts");

Issue 2:
TypeScript Version:

1.8.7

Code

https://gist.github.com/trainrail/fc5871bb6fc1ebb422e4720b3e3e4264

Quick Description:

Here is a working version of typescript with angular2 and d3 in plunker

Here is also a working version of typescript with angular2 and d3 in my local , however even though the code is working, I am running into compiler error

error TS2304: Cannot find name 'd3'.

Expected behavior:

No compiler error

Actual behavior:

Compiler error

error TS2304: Cannot find name 'd3'.

even though browser could clearly render the d3 code.
Issue 1:
It'd be schway if we had a geodistance query that works between two points, ie show me the distance between 33.8688° S, 151.2093° and 41.3851° N, 2.1734° E.

Inspired by this forum post.

Issue 2:
AbstractCompoundWordTokenFilterFactory stores the word list as Set, but in Lucene, CompoundWordTokenFilterBase checks whether the dictionary is a CharArraySet, and if it's not, creates a new CharArraySet instance and populates it with the words from the input collection. This causes each TokenFilter to store a duplicate version of the dictionary in-memory.

The net effect is that ES ends up using a lot more memory than needed when using decompounding.

For a reproducible example, see https://gist.github.com/93e84d4fc412ae16d899, which fails if ES_MAX_MEM=1g, but works when ES_MAX_MEM=2g (on linux).
Issue 1:
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.): no.

What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.): certs, client, system, pki

Is this a BUG REPORT or FEATURE REQUEST? (choose one): feature request/code refactoring.

Kubernetes version (use kubectl version): master branch, after 1.5 branch of.

Environment:

Cloud provider or hardware configuration: none

OS (e.g. from /etc/os-release): centos

Kernel (e.g. uname -a):

Install tools:

Others:

What happened:

pkg/client/transport/transport.go has function rootCertPool which populates rootCAs for client TLS configuration. Since a093ea3 there is in this function comment:

// What we really want is a copy of x509.systemRootsPool, but that isn't exposed. It's difficult to build (see the go
// code for a look at the platform specific insanity), so we'll use the fact that RootCAs == nil gives us the system values
// It doesn't allow trusting either/or, but hopefully that won't be an issue

Nowadays, with Go 1.7 it is possible to get same system CAs via function in crypto/x509: SystemCertPool(). If we want explicitly initialize rootCAs with system defaults, we can do it now.

However, current code which sets rootCAs to nil gives practically same effect, just relaying on defaults in standard library.

What you expected to happen:

I'd like to either remove this comment about "isn't exposed", or make it explicitly equal to x509.SystemCertPool(). And want to discuss which would be more appropriate.

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

$ vi pkg/client/transport/transport.go +128

Anything else do we need to know:

Potentially, we might want to have combination of defined CA in tls.Config + system default CAs,

but not sure if that is intended behaviour or would be valuable generic case.

Issue 2:
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gci-gke-reboot-release-1.4/356/

Failed: [k8s.io] Reboot [Disruptive] [Feature:Reboot] each node by ordering unclean reboot and ensure they function upon restart {Kubernetes e2e suite}

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/reboot.go:98
Oct 1 04:43:30.313: Test failed; at least one node failed to reboot in the time given.
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/reboot.go:158
Issue 1:
I'm trying to read numpy arrays from a bz2 file using fromfile, but I don't get the expected results.

More specifically I can't round-trip a simple record array through tofile, bz2 compression, bz2.open and fromfile.

The bz2.open function claims that a file-object is returned: https://docs.python.org/3/library/bz2.html#bz2.open

and fromfile claims it can handle file-objects: https://numpy.org/doc/stable/reference/generated/numpy.fromfile.html?highlight=fromfile#numpy.fromfile

but the results from my experiments shows that fromfile is accessing the compressed data, not the uncompressed data.

I understand that fromfile is a C function and thus I'm suspecting it isn't using the BZ2File methods for seeking, telling, reading etc...

Reproducing code example:

import numpy as np
import bz2

_BASIC_INFO_TYPE = np.dtype([("hblock_number", "u1"),
("blocklength", "<u2"),
("total_number_of_hblocks", "<u2"),
("byte_order", "u1"),
("satellite", "S16"),
])

arr = np.array([(1, 282, 11, 0, b'Himawari-8')],
dtype=_BASIC_INFO_TYPE)

arr.tofile('arr.bin')

# zip the resulting file:
with bz2.open('arr.bin.bz2', mode='wb') as zfd:
with open('arr.bin', mode='rb') as fd:
zfd.write(fd.read())

with bz2.open('arr.bin.bz2') as fd:
arr = np.fromfile(fd, dtype=_BASIC_INFO_TYPE, count=1)
print(arr)
# erraneous (compressed data read directly, would return the same if doing `with open('arr.bin.bz2') ...`)
# [(66, 26714, 12601, 65, b'Y&SY\x85z\xe4}\x00\x00\x03\xfd\x80p\x08')]

with bz2.open('arr.bin.bz2') as fd:
arr = np.frombuffer(fd.read(_BASIC_INFO_TYPE.itemsize), dtype=_BASIC_INFO_TYPE, count=1)
print(arr)
# correct
# [(1, 282, 11, 0, b'Himawari-8')]

Error message:

No error message, just erraneous data.

If my assumption is correct that numpy's fromfile shortcuts the fileobject's seek, read, etc, then it will prevent the use of other file objects, like the ones returned by fsspec.

Note that I suspect the same problem is happening with np.memmap.

NumPy/Python version information:

In [1]: import sys, numpy; print(numpy.__version__, sys.version)
1.20.1 3.8.6 | packaged by conda-forge | (default, Jan 25 2021, 23:21:18)
[GCC 9.3.0]

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/505 on 2007-04-24 by trac user mesmith, assigned to unknown.

I would like to use fromfile with a file opened with the gzip module

fp = gzip.open(filename,'r')
arraybuffer = fromfile(fp, sep=',')

but this gives an error

IOError: first argument must be an open file

I found a similar problem at

http://projects.scipy.org/astropy/pyfits/ticket/7

Has this problem been addressed in numpy? I am using version 1.0rc1.
Issue 1:
With the following minimal example, I am seeing memory usage reach 10GB+ within seconds if I start Julia with JULIA_NUM_THREADS=4 (no other options).

If I only use single thread, memory usage remains around 200MB.

I've tested on both the 1.1 release and yesterday's nightly on a Linux Skylake Xeon.

Threads.@threads for i in 1:100000
sum(collect(1:10^6))
end

Issue 2:
Running under TSAN with JULIA_NUM_THREADS=4 gives the following warning:

WARNING: ThreadSanitizer: data race (pid=32587)
Write of size 8 at 0x7f82ec049d80 by thread T3:
#0 jl_gc_pool_alloc /home/vchuravy/src/julia/src/gc.c:959:9 (libjulia.so.0.7+0xc2da4)
#1 jl_gc_alloc_ /home/vchuravy/src/julia/src/./julia_internal.h:274:13 (libjulia.so.0.7+0x7a031)
#2 jl_init_root_task /home/vchuravy/src/julia/src/task.c:714 (libjulia.so.0.7+0x7a031)
#3 ti_threadfun /home/vchuravy/src/julia/src/threading.c:367:5 (libjulia.so.0.7+0xbe187)

Previous write of size 8 at 0x7f82ec049d80 by thread T2:
#0 jl_gc_pool_alloc /home/vchuravy/src/julia/src/gc.c:959:9 (libjulia.so.0.7+0xc2da4)
#1 jl_gc_alloc_ /home/vchuravy/src/julia/src/./julia_internal.h:274:13 (libjulia.so.0.7+0x7a031)
#2 jl_init_root_task /home/vchuravy/src/julia/src/task.c:714 (libjulia.so.0.7+0x7a031)
#3 ti_threadfun /home/vchuravy/src/julia/src/threading.c:367:5 (libjulia.so.0.7+0xbe187)

Location is global 'gc_num' of size 104 at 0x7f82ec049d80 (libjulia.so.0.7+0x00000057fd80)

Thread T3 (tid=32591, running) created by main thread at:
#0 pthread_create /home/vchuravy/src/julia/deps/srccache/llvm-6.0.0/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:992:3 (julia+0x40f766)
#1 uv_thread_create /home/vchuravy/src/julia/deps/srccache/libuv-be317349252699670131395f125c3861d793ca86/src/unix/thread.c:76:9 (libjulia.so.0.7+0x247f22)
#2 _julia_init /home/vchuravy/src/julia/src/init.c:726:5 (libjulia.so.0.7+0x768dc)
#3 julia_init__threading /home/vchuravy/src/julia/src/task.c:302:5 (libjulia.so.0.7+0x79420)
#4 main /home/vchuravy/src/julia/ui/repl.c:234:5 (julia+0x4994d3)

Thread T2 (tid=32590, running) created by main thread at:
#0 pthread_create /home/vchuravy/src/julia/deps/srccache/llvm-6.0.0/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:992:3 (julia+0x40f766)
#1 uv_thread_create /home/vchuravy/src/julia/deps/srccache/libuv-be317349252699670131395f125c3861d793ca86/src/unix/thread.c:76:9 (libjulia.so.0.7+0x247f22)
#2 _julia_init /home/vchuravy/src/julia/src/init.c:726:5 (libjulia.so.0.7+0x768dc)
#3 julia_init__threading /home/vchuravy/src/julia/src/task.c:302:5 (libjulia.so.0.7+0x79420)
#4 main /home/vchuravy/src/julia/ui/repl.c:234:5 (julia+0x4994d3)

SUMMARY: ThreadSanitizer: data race /home/vchuravy/src/julia/src/gc.c:959:9 in jl_gc_pool_alloc

--edit: Already has a // FIXME - need JL_ATOMIC_FETCH_AND_ADD here annotation
Issue 1:
#6372 adds get_feature_names to PolynomialFeatures. It accepts a list of names of input_features (or substitutes with defaults) and constructs feature name strings that are human-readable and informative. Similar support should be available for other transformers, including feature selectors, feature agglomeration, FunctionTransformer, and perhaps even PCA (giving the top contributors to each component). FeatureUnion should be modified to handle the case where an argument is supplied. A proposal for support in Pipeline is given in #6424.

Modelled on #6372, each enhancement can be contributed as a separate PR. Note that default names for features are [x0, x1, ...]

PolynomialFeatures @amueller #6372

feature selection and randomized L1 @yenchenlin1994

feature agglomeration @yenchenlin1994

FunctionTransformer @nelson-liu #6431

scalers, normalizers and imputers: should be trivial like FunctionTransformer #6431

Binarizer #6431

OneHotEncoder #6441

FeatureUnion @yenchenlin1994

PCA?

SparseRandomProjection?

GaussianRandomProjection??

other transformers?

Issue 2:
The scoring parameter allows users to specify a scoring method by name. Currently a list of names is available by getting it wrong:

>>> from sklearn.metrics import get_scorer
>>> get_scorer('rubbish')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/joel/repos/scikit-learn/sklearn/metrics/scorer.py", line 239, in get_scorer
% (scoring, sorted(scorers)))
ValueError: 'rubbish' is not a valid scoring value. Valid options are ['accuracy', 'adjusted_mutual_info_score', 'adjusted_rand_score', 'average_precision', 'balanced_accuracy', 'brier_score_loss', 'completeness_score', 'explained_variance', 'f1', 'f1_macro', 'f1_micro', 'f1_samples', 'f1_weighted', 'fowlkes_mallows_score', 'homogeneity_score', 'mutual_info_score', 'neg_log_loss', 'neg_mean_absolute_error', 'neg_mean_squared_error', 'neg_mean_squared_log_error', 'neg_median_absolute_error', 'normalized_mutual_info_score', 'precision', 'precision_macro', 'precision_micro', 'precision_samples', 'precision_weighted', 'r2', 'recall', 'recall_macro', 'recall_micro', 'recall_samples', 'recall_weighted', 'roc_auc', 'v_measure_score']

I think this error message, and maintaining it, is getting a bit absurd. Instead we should have a function sklearn.metrics.list_scorers implemented in sklearn/metrics/scorer.py and the error message should say "Use sklearn.metrics.list_scorers to get valid strings.". Perhaps we would eventually have list_scorers allow users to filter scorers by task type (binary classification, multiclass classification, multilabel classification, regression, etc.), or even to provide metadata about each scorer (a description, for instance), but initially we should just be able to list them.