WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I feel like I might be missing something obvious, but I'm having trouble running my statically exported Next.js app on a sub-folder. Or in other words, this is what I basically want to do:

Run next build && next export -o dist to create a <proj_root>/dist directory with my static bundle.

The user's browser requests should have the following behaviour:

http://example.com/portal will serve /dist/index.html

http://example.com/portal/orders will serve /dist/orders/index.html

this tag: <img src="/static/image.jpg" /> will serve up /dist/static/image.jps

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

The problem

The problem with the naive approach is that the image request:

<img src="/static/image.jpg" />

will end up trying to make a request to:

http://example.com/static/image.jpg

instead of:

http://example.com/portal/static/image.jpg

assetPrefix

One way of making this work is to add the following to my next.config.js file:

assetPrefix: isProd ? "/portal" : ""

But this means that if the NGINX configuration ever changes, I'll have to update the assetPrefix and deploy accordingly.

This seems like a cross-cutting concern to me, especially since I was under the impression that a static bundle should be exportable with relative paths that would make it work anywhere.

The router (NGINX in this case) is supposed to do all the work, but alas I don't have much experience with NGINX (and on this project the client has not disclosed his nginx.conf to me).

Finally

Of course, this would all be easily solved if we used http://portal.example.com instead of http://example.com/portal, but this is not something I have a say in.

Is there a recipe for making this work? Perhaps an example nginx.conf that works for this use-case? Or is this something that must be set in the assetPrefix. As far as I'm aware, I thought the assetPrefix was for CDNs primarily, and not for this use-case.

Issue 2:
Feature request

Is your feature request related to a problem? Please describe.

In some use cases, we have to set meta tags with the same name (See #4407 for an actual example of use case) . However, you cannot do that because of next/head's duplication-filter feature.

Although, thanks to #4121, in the latest version of Next.js you can set multiple article:tag meta tag as long as they have unique keys, the tag name is hard-coded and you seem to have no way to add other meta tags to ALLOWED_DUPLICATES.

Describe the solution you'd like

It would be great if users can explicitly specify meta tag names to be allowed (e.g. by configuring next.config.js) .

Describe alternatives you've considered

Provide a way of whatever allow duplication (like specifying by environment variables) .

Additional context

We are willing to send you a pull-request if the above concept is acceptable.
Issue 1:
Bug Report

Which version of ShardingSphere did you use?

5.0.0

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-JDBC

Expected behavior

[insert into t_pipeline_info (PIPELINE_ID, PROJECT_ID, PIPELINE_NAME, PIPELINE_DESC) values (?, ?, ?, ?) on duplicate key update t_pipeline_info.PIPELINE_DESC = ?]

can be converted into

[insert into t_pipeline_info_0 (PIPELINE_ID, PROJECT_ID, PIPELINE_NAME, PIPELINE_DESC) values (?, ?, ?, ?) on duplicate key update t_pipeline_info_0.PIPELINE_DESC = ?]

Actual behavior

converted to [insert into t_pipeline_info_0 (PIPELINE_ID, PROJECT_ID, PIPELINE_NAME, PIPELINE_DESC) values (?, ?, ?, ?) on duplicate key update t_pipeline_info.PIPELINE_DESC = ?]

The error message is as follows:

2022-04-29 11:45:55.634|biz-6f32770874f04555a58353f335304281||SQLLogger.java|74|INFO||||||[XNIO-1 task-1] Logic SQL: insert into t_pipeline_info (PIPELINE_ID, PROJECT_ID, PIPELINE_NAME, PIPELINE_DESC) values (?, ?, ?, ?) on duplicate key update t_pipeline_info.PIPELINE_DESC = ?

2022-04-29 11:45:55.634|biz-6f32770874f04555a58353f335304281||SQLLogger.java|74|INFO||||||[XNIO-1 task-1] SQLStatement: MySQLInsertStatement(setAssignment=Optional.empty, onDuplicateKeyColumns=Optional[org.apache.shardingsphere.sql.parser.sql.common.segment.dml.column.OnDuplicateKeyColumnsSegment@4e2038b4])

2022-04-29 11:45:55.634|biz-6f32770874f04555a58353f335304281||SQLLogger.java|74|INFO||||||[XNIO-1 task-1] Actual SQL: ds_0 ::: insert into t_pipeline_info_0 (PIPELINE_ID, PROJECT_ID, PIPELINE_NAME, PIPELINE_DESC) values (?, ?, ?, ?) on duplicate key update t_pipeline_info.PIPELINE_DESC = ? ::: [p-17bd8ac017dsfsd1f, devops0, bnmvvv123dsfdf, 232323yui, 232323yui]

2022-04-29 11:45:55.669|biz-6f32770874f04555a58353f335304281||RuntimeExceptionMapper.kt|47|ERROR||||||[XNIO-1 task-1] Failed with runtime exception org.jooq.exception.DataAccessException: SQL [insert into t_pipeline_info (PIPELINE_ID, PROJECT_ID, PIPELINE_NAME, PIPELINE_DESC) values (?, ?, ?, ?) on duplicate key update t_pipeline_info.PIPELINE_DESC = ?]; Unknown column 't_pipeline_info.PIPELINE_DESC' in 'field list'

at org.jooq_3.14.7.MYSQL.debug(Unknown Source)

at org.jooq.impl.Tools.translate(Tools.java:2880)

Issue 2:
Add API for configuring whether ShardingSphere cache the metadata of the same sharding tables at startup.

Question

Many users will pay more attention on performance at startup, and the metadata of the sharding-tables are mostly the same. So add a cache can reduce startup time.

Therefore we will add API to make user decide to cache metatata or not.
Issue 1:
In wells.less file the classes are '.well-large' and '.well-small'

Docs says '.well-sm' and '.well-lg'

Issue 2:
To increase/decrease the size of form controls, you can add the classes input-lg or input-sm (at least according to the website [http://getbootstrap.com/css/#forms] - which is the most consistent solution). In the css code, however, the classes are called input-large and input-small.
Issue 1:
detectAndDecode return NULL

Issue 2:
System information (version)

OpenCV => 4.0.0

Operating System / Platform => Windows 64 Bit

Compiler => Visual Studio 2015

Detailed description

current implementation refuses to find any QR code when presented with an image that contains more than one.

it would be nice if it could do that.

Steps to reproduce

import cv2 as cv
import numpy as np
im = cv.imread("qrcode.png")
det = cv.QRCodeDetector()
rv, pts = det.detect(im)
print("single:", rv) # True
rv, pts = det.detect(np.hstack([im, im])) # duplicate side by side
print("multiple:", rv) # False
Issue 1:
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles, createStyleSheet } from 'material-ui/styles';
import AppBar from 'material-ui/AppBar';
import Toolbar from 'material-ui/Toolbar';
import Typography from 'material-ui/Typography';
import Button from 'material-ui/Button';
import IconButton from 'material-ui/IconButton';
import MenuIcon from 'material-ui-icons/Menu';
import Paper from 'material-ui/Paper';
import Grid from 'material-ui/Grid';

const styleSheet = createStyleSheet(theme => ({
root: {
width:'100%',
flexGrow: 1,
},
container:{
marginTop:'30px',
},
flex: {
flex: 1,
},
}));

function Main(props) {
const classes = props.classes;
return (
<div className={classes.root}>
<AppBar position="static" color="accent">
<Toolbar>
<IconButton color="contrast" aria-label="Menu">
<MenuIcon />
</IconButton>
<Typography type="title" color="inherit" className={classes.flex}>
美美，我爱你
</Typography>
<Button color="contrast">登录</Button>
</Toolbar>
</AppBar>
<Grid container >
<Grid item xs>
sdf
</Grid>
</Grid>
</div>
);
}

Main.propTypes = {
classes: PropTypes.object.isRequired,
};

export default withStyles(styleSheet)(Main);

Issue 2:
The <Grid container> extends beyond its parent, with half of spacing size.

I have marked the extra width in red, also setting spacing to zero fixes the problem.

Here is a working example: https://codesandbox.io/s/Y8nzGm5W.

Similar code with a zero spacing works as expected: https://codesandbox.io/s/NxvYxvQpL.
Issue 1:
Migrated issue, originally created by Michael Bayer (@zzzeek)

tons of use cases for TextAsFrom that should be intuitive that don't work. When we make a TextAsFrom with a positional set of columns, those columns should be welded to it. The statement should be able to work in any ORM context flawlessly, no reliance on names matching up should be needed as we do not target on name anymore:

from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()

class A(Base):
__tablename__ = 'a'
id = Column(Integer, primary_key=True)
bs = relationship("B")

class B(Base):
__tablename__ = 'b'
id = Column(Integer, primary_key=True)
a_id = Column(ForeignKey('a.id'))

e = create_engine("sqlite://", echo='debug')
Base.metadata.create_all(e)

s = Session(e)
s.add_all([
A(bs=[B(), B()]),
A(bs=[B(), B()])
])
s.commit()

b1 = aliased(B)

# works
sql = "select a.id, ba.id as bid, ba.a_id from "\
"a left outer join b as ba on a.id=ba.a_id"

# fails. why?
# sql = "select a.id as aid, ba.id as bid, ba.a_id from "\
# "a left outer join b as ba on a.id=ba.a_id"

# fails. why?
# sql = "select a.id as aid, ba.id, ba.a_id from "\
# "a left outer join b as ba on a.id=ba.a_id"

# are we relying upon names somehow? we should be able to
# be 100% positional now
t = text(sql).columns(A.id, b1.id, b1.a_id)

q = s.query(A).from_statement(t).options(contains_eager(A.bs, alias=b1))

for a in q:
print a.id
print a, a.bs

# forget about if we try a1 = aliased(A) also...

I've added docs in 7d268d4 and 4f51fa9 that we may even have to dial back for versions that don't have this feature.

Attachments: 3501.patch

Issue 2:
Hi,

I'm trying to upsert a table that has a column named "id" (primary key) and a column named "name" (unique key).

The var "value" is a dict, and the following code gives me:

TypeError: on_duplicate_key_update() takes exactly 1 argument (2 given)

try:
stmt = insert(dbmeta.tables['Assets']).values(values)
ustmt = stmt.on_duplicate_key_update(values)
dbconn.execute(ustmt)
trans.commit()
except exc.SQLAlchemyError as e:
print("[ ERROR ] - Rolling back transation (%s)" % e, file=sys.stderr)
trans.rollback()
return False
return True

What am I doing wrong?

Thanks,

Bruno
Issue 1:
Bug report

Bug summary

Please allow support for multiple markers in the same scatter plot

Code for reproduction

https://stackoverflow.com/questions/43528300/python-matplotlib-scatter-different-markers-in-one-scatter

# Wrapper around scikit-learn PCA
pca_degs = sy.ordination.PrincipalComponentAnalysis(df_clr.loc[:,idx_deg])
# Array of markers
markers = df_meta["temperature"].map(lambda x: {"26C":"o", "30C":"^"}[x])[pca_degs.data.index]
# Wrapper around matplotlib `scatter`
pca_degs.plot(marker=markers.tolist())

Actual outcome

ValueError: Unrecognized marker style ['^', '^', 'o', '^', '^', 'o', '^', '^', 'o', 'o', 'o', 'o', 'o', 'o', 'o', nan, 'o', 'o', '^', '^', 'o']

Expected outcome

Plot multiple markers instead of running a for-loop and creating one per marker style

Matplotlib version

Operating system: OSX

Matplotlib version: 3.2.1

Matplotlib backend (print(matplotlib.get_backend())): module://ipykernel.pylab.backend_inline

Python version: 3.8.2

Jupyter version (if applicable):

Other libraries:

Issue 2:
Feature Request

It would be great if the plot and scatter functions would allow the marker kwarg to be a list.

When using scatter, I can set the color of individual pixels using the c kwarg. c can be a list/array. It would be convenient if I could also set the marker style of the individual points using a list of styles.

I'm using matplotlib 2.2.2 on Python 3.6
Issue 1:
There have been a few time that we've come across the situation where we want to replace nodes instead of updating in place. We are also considering moving to a side by side upgrade deployment system.

The status quo makes it difficult to replace the entire cluster efficiently. We have to spin up nodes, wait for rebalancing, kill an old node, wait for rebalancing, repeat.

It would be nice to be able to mark a node as retiring or soon to be deprecated so that its data would get replicated on the new nodes sooner. So, you could mark a node this way, and it would still be used for the segments it has, but it they would not be considered in the replica count.

Issue 2:
This ask is that historical nodes are able to be put into a maintenance mode such that their nodes do not count towards the replication threshold. This allows for scaling tiers down in a more controlled manner.

We occasionally have capacity issues as we scale our cluster such that a lower tier fills up, and upper tiers need to be expanded to accommodate the handoff of realtime indexing tasks while the lower tiers expand. Once this is completed and segments are flowing as expected through the tiers, the "more recent data" tiers need to be shrunk back to normal operating size.

Being able to put a historical node into a state where it doesn't count towards replication would help in this.
Issue 1:
Furkan KAMACI opened SPR-8840 and commented

I have a model like that:

public class Wrapper<T> {

private String message;
private T data;

public String getMessage() {
return message;
}

public void setMessage(String message) {
this.message = message;
}

public T getData() {
return data;
}

public void setData(T data) {
this.data = data;
}

}

and I use resttemplate as follows:

...
Wrapper<Model> response = restTemplate.getForObject(URL, Wrapper.class, myMap);
Model model = response.getData();
...

However it throws a:

ClassCastException

I think resttemplate can not understand my generic variable and maybe it accepts it as an Object instead of generic T. So it becomes a LinkedHashMap.

Reference URL: http://forum.springsource.org/showthread.php?117511-RestTemplate-Can-Not-Convert-Generic-Types&p=387485#post387485

Issue Links:

#11685 Proper handling of parameterized types in RestTemplate ("duplicates")

Issue 2:
Arjen Poutsma opened SPR-7023 and commented

Currently, the RestTemplate has no way to handle generic types. In other words, the following does not work:

List<MyDomain> myDomainList = restTemplate.getForObject(uri, List.class);

This should be fixed.

Affects: 3.1.1

Issue Links:

#13482 RestTemplate Converting Generic Types ("is duplicated by")

#13028 HttpMessageConverter doesn't support typed collections

#19423 Add PATCH HTTP operation to RestTemplate

#11667 RestTemplate fails to convert properly for Generic Type Container with MappingJacksonHttpMessageConverter

Referenced from: commits ed3823b

14 votes, 16 watchers
Issue 1:
Description of the new feature/enhancement

The ability to group or sectionize machines would be a nice feature to organize your machines and consoles.

See (1) for grouping example

See (2) and (3) for section example

Thanks!

Issue 2:
Environment

Win32NT 10.0.18965.0 Microsoft Windows NT 10.0.18965.0

Windows Terminal (Preview)
Version: 0.4.2382.0

Steps to reproduce

When the window is not maximized, press Windows Key + Up to maximize it.

When the window is maximized, press Windows Key + Down to restore it.

Expected behavior

The maximize/restore button in the top right corner of the window changes icon to reflect the new state of the window.

Actual behavior

The button does not change.
Issue 1:
Hi. I would like to have something like this to load relative modules in the context of a NPM package:

import foo from "npm:./foo";

This would be useful to load npm packages that need some tweaks to work in Deno. I think it's not possible right now.

Issue 2:
My Observation:

kar@earth:~/my/projects/guix-pkg-search$ deno compile main.js
Check file:///home/kar/my/projects/guix-pkg-search/main.js
Compile file:///home/kar/my/projects/guix-pkg-search/main.js
Emit guix-pkg-search
kar@earth:~/my/projects/guix-pkg-search$ du -sh guix-pkg-search
94M	guix-pkg-search
kar@earth:~/my/projects/guix-pkg-search$ strip guix-pkg-search
kar@earth:~/my/projects/guix-pkg-search$ du -sh guix-pkg-search
65M	guix-pkg-search

If possible, Please add an optional feature with --strip flag to deno compile to enable stripping of the output binary
Issue 1:
Incorrect z-index modal-backdrop.

Example: http://jsfiddle.net/aUNr6/1/

Issue 2:
Unexpected empty space appears between two sections "Pictures" and "Videos".

Browsers:

Google Chrome 16.0.899.0 dev

Firefox 7.0.1

Operating System:

Ubuntu Linux 11.04

Code example:

<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css">
<style type="text/css">
body {
padding-top: 20px;
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="sidebar">
<div class="well">
<h5>Sidebar</h5>
<div style="height:700px">
</div>
</div>
</div>
<div class="content">
<h2>Some title here</h2>
<div style="margin:10px 0">
<a class=btn href="#">Button 1</a>
<a class="btn danger" href="#">Button 2</a>
</div>
<ul class=tabs>
<li class=active><a href="javascript:;">Tab 1</a></li>
<li><a href="javascript:;">Tab 1</a></li>
<li><a href="javascript:;">Tab 1</a></li>
<li><a href="javascript:;">Tab 1</a></li>
</ul>
<div style="margin:20px 5px;">
<h4>Pictures</h4>
<ul class="media-grid">
<li>
<a href="javascript:;">
<img class="thumbnail" src="http://placehold.it/210x150" alt="">
</a>
</li>
<li>
<a href="javascript:;">
<img class="thumbnail" src="http://placehold.it/210x150" alt="">
</a>
</li>
<li>
<a href="javascript:;">
<img class="thumbnail" src="http://placehold.it/210x150" alt="">
</a>
</li>
<li>
<a href="javascript:;">
<img class="thumbnail" src="http://placehold.it/210x150" alt="">
</a>
</li>
<li>
<a href="javascript:;">
<img class="thumbnail" src="http://placehold.it/210x150" alt="">
</a>
</li>
</ul>
</div>
<div style="margin:20px 5px;">
<h4>Videos</h4>
<ul class="media-grid">
<li>
<a href="javascript:;">
<img class="thumbnail" src="http://placehold.it/330x230" alt="">
</a>
</li>
<li>
<a href="javascript:;">
<img class="thumbnail" src="http://placehold.it/330x230" alt="">
</a>
</li>
</ul>
</div>
</div>
</div>
</body>
</html>
Issue 1:
I've had a spider running pretty consistently for over a year now and just recently had the following error pop up:

UserWarning: cookielib bug!
Traceback (most recent call last):
File "/usr/lib/python2.7/cookielib.py", line 1582, in make_cookies
parse_ns_headers(ns_hdrs), request)
File "/usr/lib/python2.7/cookielib.py", line 485, in parse_ns_headers
v = http2time(_strip_quotes(v)) # None if invalid
File "/usr/lib/python2.7/cookielib.py", line 266, in http2time
return _str2time(day, mon, yr, hr, min, sec, tz)
File "/usr/lib/python2.7/cookielib.py", line 176, in _str2time
t = _timegm((yr, mon, day, hr, min, sec, tz))
File "/usr/lib/python2.7/cookielib.py", line 76, in _timegm
return timegm(tt)
File "/usr/lib/python2.7/calendar.py", line 613, in timegm
days = datetime.date(year, month, 1).toordinal() - _EPOCH_ORD + day - 1
ValueError: year is out of range
[cookielib.py:1584]

The problem is that this error crashes the spider process completely. The spider is running within scrapyd.

Has anyone seen this before? I'm running Scrapy 0.24.4 on this instance due to an SSL issue that prevented me from upgrading.

Issue 2:
When using the example from http://doc.scrapy.org/en/latest/topics/practices.html "Run Scrapy from a script" using Windows XP and Python 2.7 it seems the item_scraped passed signal is not fired. The scraping works and shows in its stats that "item_scraped_count" is 60, yet not a single time the associated function gets called.

I connected it using

crawler.signals.connect(self._item_passed, signal=signals.item_scraped)

I also tried

crawler.signals.connect(self._item_passed, signal=signals.item_passed)

dispatcher.connect(self._item_passed_2, signals.item_scraped)

dispatcher.connect(self._item_passed_2, signals.item_passed)

which didn't get called either.

item_dropped isn't called either.

I have no explicit pipelines defined, just a single basic spider which works fine as seen in the debug logs.

Connecting other signals like

crawler.signals.connect(self._spider_opened, signal=signals.spider_opened)

works on the other hand.

The main call is:

def _item_passed(self, item, response, spider):
print "PASSED"

def _item_passed_2(self, item, response, spider):
print "PASSED-DISP"

def _item_dropped(self, item, spider, exception):
print "dropped"

def _spider_opened(spider):
print "spider opened"

def run(self):
spider = TestSpider()
settings = get_project_settings()
crawler = Crawler(settings)
crawler.install()
crawler.signals.connect(reactor.stop, signal=signals.spider_closed)
crawler.signals.connect(self._item_passed, signal=signals.item_scraped)
crawler.signals.connect(self._item_passed, signal=signals.item_passed)
crawler.signals.connect(self._item_dropped, signal=signals.item_dropped)
crawler.signals.connect(self._spider_opened, signal=signals.spider_opened)
crawler.configure()
crawler.crawl(spider)
dispatcher.connect(self._item_passed_2, signals.item_passed)
dispatcher.connect(self._item_passed_2, signals.item_scraped)

crawler.start()

log.start(loglevel=log.INFO)
reactor.run()
Issue 1:
I noticed that CacheStorage hasn't been implemented yet, so here's a task to implement it. Thank you for all your hard work! :)

Issue 2:
To build a production ready cloudflare worker/ faas alternative with deno it would be very hard to use the current deno web worker implementation. (basically starting one webworker per handler and then dispatching messages from the main script)

i see some pain points implementing the registration / update workflows that browsers have in the main script, but i think finding a good solution there would REALLY pay of well:

custom caching strategies for fetch events

resourceful lifetime management of external 'processes' like browsers do with service workers, without having to manually start and stop the web workers

handling, rewriting, transforming, monitoring the requests that imported files make (huge number of possibilities here)

would love to help, but i dont know rust (yet) and not even at what point in the architecture this would need to be implemented