WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Electron version: 2.0.6

Operating system: MacOS High Sierra (latest)

Expected behavior

The mas build should be accepted by the App Store.

Actual behavior

The App Store suddenly started to reject my mas build based on the Electron Framework v. 1.7.9. The upgrade to the last stable version 2.0.6 didn’t solve the problem. Any ideas?

I always get the following message:

Your app uses or references the following non-public APIs:

From framework:

-Symbol: _CGDisplayUsesForceToGray

From framework: /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics

-Symbols: ___CFRunLoopSetOptionsReason, __CFIsObjC

From framework: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation

In binary:

-Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework

Please help.

Issue 2:
Electron Version: v3.0.x, v2.0.x

OS: Windows 10 (1803) x64

Expected Behavior

Context menu of a flash object should stay open until user performs an action that normally closes it.

Actual behavior

Opening a flash context menu works fine but it randomly disappears when clicking nothing. Once it is gone, the app gets somewhat unresponsive. JS code is not getting executed, navigation does not work, reopening the context menu is impossible...

I noticed that when I was using multiple electron windows, the bug only occured once and was only affecting that one window. Every other window was fine after that and the bug could not be reproduced a second time.

To Reproduce

Right click onto a flash object, so that the context menu appears. Then do nothing and wait until it disappears.

Additional Information

This one is very tricky to reproduce. It can take quite some time until it disappears, it is completely random when it disappears and I have no idea why it is happening. I was able to reproduce this issue in v2.0.2, v3.0.0-beta.3 and v3.0.0-beta.4 in various main.js setups.

Workaround

I came up with disabling the context menu, which seems to avoid the issue entirely (inline JS in HTML file):

document.getElementById("flash").oncontextmenu = function(){return false};
Issue 1:
We have two Code of Conduct pages:

In the Sphinx pages

In the Hugo pages

Should the Sphinx version be removed?

Issue 2:
random.choice enhancement request:

random.choice should support multidimensional arrays by taking an axis number. With this enhancement, axis=None would choose from a flattened array, while an integer argument would chose from the subarrays along that axis.

Apologies if this is a duplicate. My previous submission seems to have vanished.
Issue 1:
🐛 Bug

python: symbol lookup error: /usr/lib/python3.6/site-packages/torch/lib/libtorch_python.so: undefined symbol: PySlice_Unpack

when generating and displaying big tensors.

To Reproduce

$ python
Python 3.6.0 (default, Jan 16 2017, 12:12:55)
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'1.0.1.post2'
>>> torch.ones(10000)
python: symbol lookup error: /usr/lib/python3.6/site-packages/torch/lib/libtorch_python.so: undefined symbol: PySlice_Unpack
$

Env

PyTorch 1.0.1.post2 installed via pip. cuda 9 (but same bug without cuda)

Linux os

Python 3.6.0

Issue 2:
Python 3.6.0 (default, Nov 17 2017, 11:43:46)

[GCC 4.8.4] on linux

Type "help", "copyright", "credits" or "license" for more information.

import torch

torch.version

'1.0.0'

m=torch.randn(2,3)

m

tensor([[-0.3711, 0.5104, -0.8859],

[-0.5211, -0.6502, -0.5249]])

m[:,1]=1

python: symbol lookup error: /home/slhome/sz128/ve3_cpu/lib/python3.6/site-packages/torch/lib/libtorch_python.so: undefined symbol: PySlice_Unpack

I just installed pytorch 1.0.0 by "pip3 install http://download.pytorch.org/whl/cu80/torch-1.0.0-cp36-cp36m-linux_x86_64.whl && pip3 install torchvision" in a new virtualenv.
Issue 1:
Hi,

On a test website (http://ks3364357.kimsufi.com/) I have a navbar with a menu and a button. Both are right aligned. It works well in firefox but the behaviour in chrome is very strange.

First time you go on the page the button break from the line makin the navbar bigger. But if you resize it (til it gets in navbar-collapse mode) then go back to normal, the button is right where it belongs.

Here is the code :

<div class="navbar-wrapper">
<div class="container-fluid">

<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Friendly Monthly</a>
</div>
<div class="navbar-collapse collapse navbar-right">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Curated Newsletter</a></li>
<li><a href="#about">Try it now</a></li>
<li class="dropdown">
<a class="dropdown-toggle" href="#" data-toggle="dropdown">Login <strong class="caret"></strong></a>
<div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px; min-width: 300px;">
<form class="form-horizontal" role="form">
<div class="form-group">
<div class="col-sm-12">
<input id="user_username" class="form-control" type="text" name="user[username]" placeholder="Email">
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<input id="user_password" class="form-control" type="password" name="user[password]" placeholder="Password">
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<div class="checkbox">
<label>
<input type="checkbox"> Remember me
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<button type="submit" class="btn btn-primary btn-block" style="width: auto;">Login</button>
</div>
</div>
</form>
</div>
</li>
</ul>
<p class="navbar-text">or</p>
<button type="button" class="btn btn-primary navbar-btn navbar-right">Subscribe</button>
</div>
</div>
</div>

</div>
</div>

Issue 2:
This bug exists only in google chrome, both in Windows and in OSX

If a fixed navbar is used with navbar-right elements, such as a button, and input type=password is used inside a form anywhere on the page, when the page is reloaded the navbar pushes elements to a new row, making it too tall.

http://jsbin.com/daxopusa/3/ - Reload the page after navigating to it.

http://jsbin.com/daxopusa/3/edit - If you remove type=password from the input, the issue disappears.
Issue 1:
HTML elements at in many in examples are using single quote instead of double but examples in readme and blog of zeit are not. IMO It might make users confused specially in terms of using lint like standard, which report an error of double quotes in JSX. I'm not sure which style is your recommendation.

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

Expected Behavior

Using consistence expression for quote

Current Behavior

Using mixin styles between examples project and document

Issue 2:
I'm trying next export in an app that uses apollo client to load content from our CMS. When navigating from page to page via or imperative Router actions w/ prefetching, getInitialProps fires on page load & emits a call to my graphql API.

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

Expected Behavior

I'd hoped that the static export process would 'pre-hydrate' the apollo cache such that the data for a route is packed into the HTML/JS of the route payload. When loading a route, then, no calls should be fired to the content API at all (we don't have any dynamic content).

This works fine when fetching the response w/ curl or something, and when navigating directly to a route, no calls are fired to our API endpoint (per the Network tab).

My expectation is that no API calls would be fired when loading subsequent routes accessed via <Link prefetch>

Current Behavior

When clicking a prefetch link (or using the imperative Router.prefetch), getInitialProps is fired on route transition & I get a 'loading' state.

If I use vanilla <a>, the transition happens as expected and no API call is fired. But, there's no prefetching w/ this option, so not really ideal.

Your Environment

Tech
Version

next
4.14

node
8.6

OS
win10 w/ WSL bash

browser
chrome 62

etc
Issue 1:
If it is happening now, it will happen again.

Issue 2:
Motivation

If I was setting up frontend infrastructure on kube, I might do something like this:

L1 [ Ingress ] service state <- |
| | per service Dos policy
(certs, geo) --- (hostname, ip) --- [dos engine]
|
L2 [ Services ] endpoint state
|
(enforces routing rules)
|
endpoints (produce web page)

Today, there's only 1 routing rule at the Service layer (rr to all endpoints), and 1 routing rule at the ingress layer (http hostname, path prefix match). This is insufficent to express more complex group membership patterns we see in PetSet (leader election, broadcast) and common routing patterns observed in tiered applications (retry GET, traffic splitting, consistent hashing to memcache farm).

Proposal

Add a new RoutingRule subtype and embed it either in the Ingress or Service. The subtype would implement rules like:

Leader (#1542, #10456)

Broadcast (#12026)

Failover on error (It's been asked for before, can't find issue)

Hash based on incoming request or backend server (#8731)

Canary (#25485)

Vanilla lb algorithms

I'd like L2 in the diagram above to implement the rules, because storing all endpoints at L1 might not be practical. In my mind L1 is the layer you can duplicate across the globe and use at the edge of your network, or even in someone elses DC.

I can't decide what L2 is, I'm tempted to say it's a Service but:

sticky session and lb algorithms are common at L1 and L2

Services don't understand l7

The most obvious way to implement a majority of the routing rules is through a webserver

Ties in with the "internal ingress" concept

Service is no longer a simple intra-cluster, low latency "dumb" routing abstraction

@smarterclayton @thockin @kubernetes/sig-network (we need a @kubernetes/lb)
Issue 1:
This might not necessarily a new thing since 0.14, but I find the output of group.head() not appropriate for a grouping:

df = pd.DataFrame(np.random.randn(6,2))
df['A'] = [1,2,2,1,1,2]
df

0 1 A
0 -0.047101 0.828542 1
1 1.617815 0.362700 2
2 1.366453 -1.116897 2
3 0.086743 -0.611371 1
4 1.918440 -1.230909 1
5 -1.003828 -0.592541 2

g = df.groupby('A')
g.head(2)

0 1 A
0 -0.047101 0.828542 1
1 1.617815 0.362700 2
2 1.366453 -1.116897 2
3 0.086743 -0.611371 1

My expectation of the previous output would be:

0 1 A
0 -0.047101 0.828542 1
3 0.086743 -0.611371 1
1 1.617815 0.362700 2
2 1.366453 -1.116897 2

because, after all, this is the result of a grouping, so things should be displayed grouped, shouldn't they?

Issue 2:
When sort = True is passed to groupby (which is by default) the groups will be in sorted order. If you loop through them they are in sorted order, if you compute the mean, std... they are in sorted order but if you use the method head they are NOT in sorted order.

import pandas as pd

df = pd.DataFrame([[2, 100], [2, 200], [2, 300], [1, 400], [1, 500], [1, 600]], columns = ['A', 'B'])

grouped = df.groupby(df['A'], sort = True)
for name, group in grouped:
print(group)
print(grouped.mean())
print(grouped.head(1))

Is this expected? I have not found this behaviour documented.

I think it is confusing and has caused me a headache because I was combining output of the mean and head methods in the same DataFrame, and since the data was not ordered before those results were getting mixed because of these order issues. I have pandas 0.20.3
Issue 1:
Add2App, when i runing my host app,there is a exception:

Check failed: vm. Must be able to initialize the VM.

and,my flutter doctor -v info :

[✓] Flutter (Channel master, v1.0.1-pre.3, on Mac OS X 10.13.6 17G65, locale zh-Hans-CN)
• Flutter version 1.0.1-pre.3 at /Users/zhenqiang/flutter_sdk/flutter
• Framework revision d74b1c2051 (2 days ago), 2018-12-07 14:19:09 -0800
• Engine revision 7375a0f414
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at /Users/zhenqiang/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/zhenqiang/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.

[✗] iOS toolchain - develop for iOS devices
✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
✗ libimobiledevice and ideviceinstaller are not installed. To install with Brew, run:
brew update
brew install --HEAD usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
✗ ios-deploy not installed. To install with Brew:
brew install ios-deploy
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
For more info, see https://flutter.io/platform-plugins
To install:
brew install cocoapods
pod setup

[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 31.1.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] Connected device (1 available)
• H60 L01 • 7N2SSE155J045614 • android-arm • Android 6.0 (API 23)

and i am in master channel.

Can anybody help me for this problem?

Issue 2:
here is the report

flutter_01.log

flutter_02.log
Issue 1:
Feature Request

Now, when a user executes an insert into on duplicate key update statement on a sharding key, an exception will be thrown.

/**
* Sharding insert statement validator.
*/
@RequiredArgsConstructor
public final class ShardingInsertStatementValidator extends ShardingDMLStatementValidator<InsertStatement> {

private final ShardingConditions shardingConditions;

@Override
public void preValidate(final ShardingRule shardingRule, final SQLStatementContext<InsertStatement> sqlStatementContext,
final List<Object> parameters, final ShardingSphereSchema schema) {
if (null == ((InsertStatementContext) sqlStatementContext).getInsertSelectContext()) {
validateMultipleTable(shardingRule, sqlStatementContext);
}
InsertStatement sqlStatement = sqlStatementContext.getSqlStatement();
Optional<OnDuplicateKeyColumnsSegment> onDuplicateKeyColumnsSegment = InsertStatementHandler.getOnDuplicateKeyColumnsSegment(sqlStatement);
String tableName = sqlStatement.getTable().getTableName().getIdentifier().getValue();
if (onDuplicateKeyColumnsSegment.isPresent() && isUpdateShardingKey(shardingRule, onDuplicateKeyColumnsSegment.get(), tableName)) {
throw new ShardingSphereException("INSERT INTO ... ON DUPLICATE KEY UPDATE can not support update for sharding column.");
}
Optional<SubquerySegment> insertSelectSegment = sqlStatement.getInsertSelect();
if (insertSelectSegment.isPresent() && isContainsKeyGenerateStrategy(shardingRule, tableName)
&& !isContainsKeyGenerateColumn(shardingRule, sqlStatement.getColumns(), tableName)) {
throw new ShardingSphereException("INSERT INTO ... SELECT can not support applying keyGenerator to absent generateKeyColumn.");
}
TablesContext tablesContext = sqlStatementContext.getTablesContext();
if (insertSelectSegment.isPresent() && !isAllSameTables(tablesContext.getTableNames()) && !shardingRule.isAllBindingTables(tablesContext.getTableNames())) {
throw new ShardingSphereException("The table inserted and the table selected must be the same or bind tables.");
}
}

But if the routing results before and after the update have not changed, then we should support this type of insert into on duplicate key update statement.

Is your feature request related to a problem?

No

Describe the feature you would like.

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

Which version of Sharding-Jdbc do you using?

2.0.0 使用 java config 配置数据源

Expected behavior

表 IM_TEST 分为2库TEST_00 TEST_01，每库5表，分库 id%2，分表 id%5

select * from IM_TEST where id in(4,5)

期望路由到TEST_00.IM_TEST_04 和 TEST_01.TEST_00

Actual behavior

实际路由到了TEST_00.IM_TEST_04 和 TEST_00.TEST_00 TEST_01.IM_TEST_04 和 TEST_01.TEST_00

Steps to reproduce the behavior

Please provide the reproduce example codes (such as github link) if possible.
Issue 1:
build.go:130: duplicate field work
build.go:206: ambiguous DOT reference *builder.work
build.go:206: ambiguous DOT reference builder.work
build.go:208: ambiguous DOT reference *builder.work
build.go:208: ambiguous DOT reference builder.work
build.go:213: ambiguous DOT reference *builder.work
build.go:213: ambiguous DOT reference builder.work
build.go:215: ambiguous DOT reference *builder.work
build.go:215: ambiguous DOT reference builder.work
build.go:307: ambiguous DOT reference *builder.work

the 'ambiguous DOT reference' could be better phrased
also that is a type on the lhs of the dot but should probably
be the actual expression.

Issue 2:
Please consider implementing dup for netFDs on Windows. Currently calling .File() on
users of this type returns the error "dup not implemented on Windows".

There's no equivalent to dup for sockets on Windows. DuplicateHandle doesn't work for
sockets, and WSADuplicateSocket has other purposes. I think it may be necessary to
implement an open/close ref count in addition to the completion port ref counting that's
currently used.

http://stackoverflow.com/questions/11319025/get-syscall-handle-from-a-go-net-udpconn-on-windows
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: xxx

Operating System version: xxx

Java version: xxx

Steps to reproduce this issue

xxx

xxx

xxx

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!

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

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.1-SNAPSHOT

org.apache.dubbo.common.utils.IOUtils 这个类看起来像是一个公共类，但实际上里面有坑，不要在你自己的项目里面使用这个类！

问题描述

该类有一个 write() 方法，内容如下：

public static long write(InputStream is, OutputStream os, int bufferSize) throws IOException {
int read;
long total = 0;
byte[] buff = new byte[bufferSize];
while (is.available() > 0) { // !!!
read = is.read(buff, 0, buff.length);
if (read > 0) {
os.write(buff, 0, read);
total += read;
}
}
return total;
}

其中的 while 循环使用了 InputStream.available() 的返回值来作为结束判断条件，这个方法在网络环境当中是不能作为读取结束的依据的，因为当网络传输出现延迟时，该方法立刻会返回 0，导致循环结束。测试代码如下：

@Test
public void testWriteURL() throws Exception {
String url = "https://pan.baidu.com/static/images/16new/bg2.jpg";
long expectedSize = 77_949L;

InputStream inputStream = new URL(url).openStream();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
long writeSize = org.apache.dubbo.common.utils.IOUtils.write(inputStream, bos);
assertThat(writeSize, equalTo(expectedSize)); // org.hamcrest.MatcherAssert
}

这个测试通常会失败，write() 方法在读取了部分内容后就结束循环并返回了。

正确的写法请参考 org.apache.commons.io.IOUtils#copy(java.io.InputStream, java.io.OutputStream) 的实现，对应的测试方法如下：

public static void main(String[] args) throws IOException {
String url = "https://pan.baidu.com/static/images/16new/bg2.jpg";
long expectedSize = 77_949L;

InputStream inputStream = new URL(url).openStream();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
long writeSize = org.apache.commons.io.IOUtils.copy(inputStream, bos);
assertThat(writeSize, equalTo(expectedSize)); // org.hamcrest.MatcherAssert
}

上面这个方法就不会运行失败。

为什么这个问题一直没有暴露出来呢？因为这个方法在整个 dubbo 项目中只有一个地方用到了：org.apache.dubbo.common.io.Bytes#unzip()，而这个方法只用来处理内存中的字节串，而与网络无关。万一 dubbo 项目将来在某个地方用它来读取网络内容，问题就会暴露出来。
Issue 1:
Challenge Name

https://www.freecodecamp.com/challenges/line-up-form-elements-responsively-with-bootstrap

Issue Description

The Like, Info, and Delete buttons need more padding on the right side. Also, the 'Loving' checkbox label should be on the same line as the checkbox that it labels. Also, shouldn't the Submit button be on the same line as the text input?

Browser Information

Browser Name, Version: Chrome, Version 50.0.2661.94 (64-bit)

Operating System: Mac OSX, Yosemite, version 10.10.5

Mobile, Desktop, or Tablet: Mac Book Pro 15"

Your Code

// If relevant, paste all of your challenge code in here

Screenshot

Issue 2:
Forewarning, this may be bike-shedding worthy....

Workspace

User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36. (Chrome on Windows 7)

Setting

The CatPhoto is where you make an web page and one component is adding three buttons like below.

Problem

But then you will eventually make it into something like this below.

Notice that the red Delete button is squished and on the side (this is mostly a desktop problem; mobile user won't have the same issue -- see below)

Mobile Version

Solution

So I propose two things:

Change the "Delete" button into a "Edit" button so it'll fit on the button better.

This is fairly easy. You'll just need to change this in the challenge seeds starting with the challenge Warn your Users of a Dangerous Action where the button is added.

Then change the challenges up until the last one on Line up Form Elements Responsively with Bootstrap.

You could also change the icon if appropriate.

Add new challenge to add in making all three of those buttons also have the class btn-sm to make the text inside the button not seem all smushed.

This one will require a little more effort in making an entirely new challenge, which may be unnecessary.

Example:

<button class="btn btn-block btn-info btn-sm"><i class="fa fa-info-circle"></i> Info</button>

If the proposed changes were made, the finished app will look like this:
Issue 1:
Migrated issue, originally created by Dmitry Tyutryumov

Hi guys, i need you help.

How i can create a schema on ORM, for few tables,

MetaData doesn't work when schema doesn't exist.

event.listen(DeclBase.metadata, 'before_create', CreateSchema('schema')) i see an error if schema is exist, but i don't know how to check schema on ORM

Will be appreciate for help

Issue 2:
Migrated issue, originally created by Rémy Roy (@remyroy)

IF EXISTS and IF NOT EXISTS are already part of many DBMSs DDL vocabulary. They have many use cases which are highly useful in some situations.

For instance, creating a table if it does not already exists or dropping a column if it exists.

It would be nice to have those directives with standard SQLAlchemy DDL methods. I guess they could be implemented using the native support for DBMSs that support them or with some introspection for those that do not.