WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Hi.

I am trying to upsert sales data (salesId (Primary Key), itemId and description) to a table and I am running into some problems, specifically

(1) an attribute error: AttributeError: 'StrSQLCompiler' object has no attribute 'visit_on_duplicate_key_update' and

(2) an unsupported compilation error: sqlalchemy.exc.UnsupportedCompilationError: Compiler <sqlalchemy.sql.compiler.StrSQLCompiler object at 0x110e4eda0> can't render element of type <class 'sqlalchemy.dialects.mysql.dml.OnDuplicateClause'> error.

Both the errors above trigger when I try to print the on_duplicate_key_stmt variable. I am wondering if I did something wrong here. Thanks

import copy
import sqlalchemy as sa
from sqlalchemy.dialects.mysql import insert

_metadata = sa.MetaData()

Sales = sa.Table(
'sales',
_metadata,
sa.Column('salesId', sa.String(32), primary_key=True),
sa.Column('itemId', sa.String(32)),
sa.Column('description', sa.String(32)),
)

sales_data = {'salesId': '1', 'itemId': '1', 'description': 'TESTING'}
sales_data_no_id = copy.deepcopy(sales_data)
sales_id = sales_data_no_id.pop('salesId')

insert_stmt = insert(Sales).values(sales_data)
on_duplicate_key_stmt = insert_stmt.on_duplicate_key_update(**sales_data_no_id)

print(on_duplicate_key_stmt)

Issue 2:
Migrated issue, originally created by Dmytro Starosud (@dima-starosud)

This is using sqlalchemy 1.2.0b3.

I've faced weird behavior shown in following code snippet. Assertion in that test fails. But if you comment either #1 or #2 or both it will pass.

Base = declarative_base()

class Target(Base):
__tablename__ = 'target'
id = Column(Integer, primary_key=True)

descriptors = lambda: inspect(Target).all_orm_descriptors.keys()

# these two calls make test fail
configure_mappers() #1
descriptors() #2

Target.value = hybrid_property(lambda _: 'Hello!')
configure_mappers()
assert 'value' in descriptors()

Please let me know if I get it wrong.

Thanks a lot in advance!
Issue 1:
I'm using Memcached I set the following session

$m = $this->get("session.handler.memcached"); $m->write($session->getId(),array("lol"=>"mdr")); $m->close();

In another page , I execute this :

$session = $this->getRequest()->getSession(); $session->start(); $m = $this->get("session.handler.memcached"); var_dump($m->read($session->getId())['lol']); $m->close();

Sometimes I get "mdr" sometimes I get "_" . is this a bug ?

is the same session gets overriden ?

Issue 2:
Let's say you add a time field like this:

/** @var FormBuilderInterface $builder */
$builder->add('time', TimeTime::class, [
'model_timezone' => 'UTC',
'view_timezone' => 'America/New_York',
]);

So users are entering the "time" field in their local time. Right now (2016-03-30) this happens to be during daylight savings time in (most of) the US: UTC is four hours ahead.

Saving the form with a time value of 1AM, I would expect the UTC time to be 5am. Instead it comes back as 6am because the model transformer uses 1970-01-01 as the date (not during DST).

I'm not sure if this is actually a bug or not. The behavior makes sense when you look at it from the perspective of the field being time only without a frame of reference for the date -- it doesn't care about DST.

But the fact that it does conversion from one TZ to another makes it a bit weird: the conversion doesn't act as expected.

Might be useful to pass a reference date to the form that the model transformer can use and default that value to 1970-01-01?

$builder->add('time', TimeTime::class, [
'model_timezone' => 'UTC',
'view_timezone' => 'America/New_York',
'current_date' => new \DateTime('now'), // default to 1970-01-01
]);
Issue 1:
Environment

Windows build number: Microsoft Windows [Version 10.0.18362.267]
Windows Terminal version: 0.3.2142.0
Any other software:
* Powershell6
* Windows Subsystem for Linux - Ubuntu

Steps to reproduce

Open Windows Terminal with cmd.exe as the default profile .

Open a new terminal tab hosting pwsh.exe or WSL Ubuntu

Type exit to close the new tab

Back in the cmd.exe tab, type a reasonably sized text file to the console. (Mine was a 59,219 byte csv file)

Expected behavior

The terminal console should scroll through the text file.

Actual behavior

Terminal crashes with no error message.

The Windows Problem Report lists the following detail:

Description
Faulting Application Path:	C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.3.2142.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe

Problem signature
Problem Event Name:	MoAppCrash
Package Full Name:	Microsoft.WindowsTerminal_0.3.2142.0_x64__8wekyb3d8bbwe
Application Name:	praid:App
Application Version:	1.0.1908.2002
Application Timestamp:	5d448424
Fault Module Name:	TerminalControl.dll
Fault Module Version:	1.0.1908.2002
Fault Module Timestamp:	5d448318
Exception Code:	c0000005
Exception Offset:	0000000000018abb
OS Version:	10.0.18362.2.0.0.768.101
Locale ID:	2057
Additional Information 1:	17fc
Additional Information 2:	17fc9f89663473fc7bed7d821c616059
Additional Information 3:	df83
Additional Information 4:	df83cd4f4def141c4bbf7772ff64cc94

Issue 2:
Requesting that an option exist for a quake style drop down of the terminal window from the top of the screen be added. (Not unlike ConEmu for windows, Guake or Yakuake)
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

DubboX version: 2.8.4

Java version: 1.8.0_191

Spring Boot Version: 2.0.3.RELEASE

Spring Cloud Version: Finchley.SR4

Brave version: 5.4.2

brave-instrumentation-dubbo-rpc:5.4.2

Starting with version 2.0.0, Spring Cloud Sleuth uses Brave as the tracing library. This project use Dubbo TraceFilter implemented by brave-instrumentation-dubbo-rpc. The Project configuration as below:

application.properties

spring.sleuth.web.enabled=true
spring.sleuth.web.client.enabled=true
spring.sleuth.sampler.probability=0.0
spring.sleuth.log.slf4j.enabled=true
spring.application.name=${dubbo.app}

dubbo.xml

<dubbo:provider filter="tracing"/>
<dubbo:consumer filter="tracing"/>

we found that some time we lost the tracing information when invoke dubbo service from ServiceB to ServiceC.

the two service log infomation as below:

serviceB

serviceC

the tracing infomation of the first and second invocation is lost, and the third is passed. and we also found that the thread name of the invocation which is lost tracing is all start with [http-nio], but the thread name start with [DubboServerHandler-] got the tracing infomation. We don't know the underlying mechanism between this two invocation.

the tracing infomation is injected into the attachments of the RpcInvocation. We debug and found that

AbstractProxyInvoker is not get and pass down the attachments

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

branch: master

functions take & put in org.apache.dubbo.common.utils.Stack consider no the situation that index plus mSize is negative .

public E get(int index) {
if (index >= mSize) {
throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + mSize);
}

return index < 0 ? mElements.get(index + mSize) : mElements.get(index);
}

public E set(int index, E value) {
if (index >= mSize) {
throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + mSize);
}

return mElements.set(index < 0 ? index + mSize : index, value);
}

public E remove(int index) {
if (index >= mSize) {
throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + mSize);
}

E ret = mElements.remove(index < 0 ? index + mSize : index);
mSize--;
return ret;
}

the implementations are not strict.
Issue 1:
import jax
import jax.numpy as jnp
from jax.experimental import enable_x64

@jax.jit
def f(x):
with enable_x64():
return x.view(jnp.int64)

f(jnp.arange(10).reshape(5,2))

---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
main.py in <module>
----> 1 pack_fragments(jnp.array(-10.01), jnp.array(-1))

[... skipping hidden 14 frame]

.../python3.9/site-packages/jax/_src/util.py in safe_map(f, *args)
42 for arg in args[1:]:
43 assert len(arg) == n, 'length mismatch: {}'.format(list(map(len, args)))
---> 44 return list(map(f, *args))
45
46 def unzip2(xys):

RuntimeError: INVALID_ARGUMENT: Binary op shift-left with different element types: u64[1,2] and u32[1,2].

Issue 2:
minimal repro:

from jax import jit, experimental

@jit
def f(a):
with experimental.enable_x64():
return 1 + a
f(1)

RuntimeError: Invalid argument: Binary op add with different element types: s64[] and s32[].
Issue 1:
[ Y] I have searched the issues of this repository and believe that this is not a duplicate.

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

Environment

Dubbo version: 2.5.9

Operating System version: WIN10

Java version: IBM 1.6

Steps to reproduce this issue

新增src\main\resources\META-INF\Dubbo\internal\com.alibaba.dubb.monitor.MonitorFactory，内容如aaa=com.xxx.xxx.AaaMonitorFactory

应用配置

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

Expected Result

按自定义方式实现服务监控

Actual Result

以DubboMonitorFactory-DubboMonitor实现服务监控

分析原因为MonitorConfig中getProtocol方式配置excluded为true，导致monitor上配置的protocol属性未识别，即无法按自定义的protocol执行

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.7

Operating System version: Linux

Java version: 1.8

Steps to reproduce this issue

build project with dubbo 2.7.7, the deployed directory's structure should satisfy the requirement of start.sh;

run application by start.sh;

Expected Result

the application should be powered successfully

Actual Result

error occur: -bash: ./bin/start.sh: /bin/bash^M: bad interpreter: No such file or directory
Issue 1:
I'm on 5.8.23 (babel-core 5.8.25), and getting the following error for for..of on IE9 and IE11. Haven't tested on IE10.

ReferenceError: 'Symbol' is undefined

Issue 2:
Hey there,

I've used a simple for...of statement in my JSX file, but the output breaks Safari (8.0.7). Works fine in Chrome and Firefox. The error message is "ReferenceError: Can't find variable: Symbol" and I indeed can't find any reference to Symbol in the file. Might be a missing polyfill?

This is the original code:

for (let block of blocks) {
this.createColourBlockScene(scrollController, pageReference, block.blockReference, block.hexColour1, block.hexColour2);
}

Which gets transpiled into this:

var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;

try {
for (var _iterator = blocks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var block = _step.value;

_this.createColourBlockScene(scrollController, pageReference, block.blockReference, block.hexColour1, block.hexColour2);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator['return']) {
_iterator['return']();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}

In case you need it, this is the array I'm looping through:

let blocks = [
{
blockReference: React.findDOMNode(this.refs.blockClient),
hexColour1: '6114CC',
hexColour2: '6A86EC'
},
{
blockReference: React.findDOMNode(this.refs.blockOwnStuff),
hexColour1: '6A86EC',
hexColour2: '3F63D9'
},
{
blockReference: React.findDOMNode(this.refs.blockVenture),
hexColour1: '3F63D9',
hexColour2: '143FCC'
},
{
blockReference: React.findDOMNode(this.refs.blockStudio),
hexColour1: '143FCC',
hexColour2: 'FFBF02'
},
];
Issue 1:
System Information

OpenCV version: 4.5.0

Operating System / Platform: Windows 10

Compiler & compiler version: GCC 9.3.0

Detailed description

When trying to save a matrix that has the depth CV_16F using cv::FileStorage the assertion depth >=0 && depth <= CV_64F in function 'cv::fs::typeSymbol' fails.

A possible explanation of the error might be found in opencv2/core/hal/interface.h. The order of the different depth definitions is incorrect and therefore the assertion fails:

#define CV_8U 0
#define CV_8S 1
#define CV_16U 2
#define CV_16S 3
#define CV_32S 4
#define CV_32F 5
#define CV_64F 6
#define CV_16F 7

Therefore CV_64F <= CV_16F and if CV_16F = depth then depth <= CV_64F is false and the assertion failed. I did not manage to update opencv to 4.7.0 using vcpkg and therefore I could not verify if the issue still persists beyond 4.5.0.

Steps to reproduce

cv::Mat test = cv::Mat::zeros({100, 100}, CV_16F);
cv::FileStorage file("test.yml", cv::FileStorage::WRITE);
file.write("Test Mat", test);

Issue submission checklist

I report the issue, it's not a question

I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution

I updated to the latest OpenCV version and the issue is still there

There is reproducer code and related data files (videos, images, onnx, etc)

Issue 2:
I'm seeking an approach for CV_NODISCARD that will work across all the compilers opencv 4.x and above supports.

The current approach is legacy for gcc and clang. Using __attribute__((__warn_unused_result__)) on functions. No classes. And always at the end of the function declaration. This is supported on gcc 4.8.1 and higher (since 4.8.1 is needed for C++11).

MSVC supports the standard attribute approach of [[nodiscard]]. It can be on classes, functions, vars. And it goes before the name of the item. At the end is not allowed. The support is available with VS2017 v15.3 and later; with /std:c++17 or higher.

So these are somewhat mutually exclusive. One or the other compiler (gcc vs msvc) will complain with warnings. It should still compile. Both compilers have a method to disable the warnings, but I read on the internet that on some versions of gcc, it ignores the ignore command and still puts the warning.

Does the core team have a recommendation?
Issue 1:
Challenge use-a-google-font has an issue.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8.

Please describe how to reproduce this issue, and include links to screenshots if possible.

<link href="https://fonts.googleapis.com/css?family=Open+Sans"
rel="stylesheet">

<style>
body {
font-family:"Open Sans",sans-serif;
}
h4 {
text-align: center;
background-color: rgba(45, 45, 45, 0.1);
padding: 10px;
font-size: 27px;
text-transform: uppercase;
}
p {
text-align: justify;
}
.links {
text-align: left;
color: black;
opacity: 0.7;
}
#thumbnail {
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
.fullCard {
width: 245px;
border: 1px solid #ccc;
border-radius: 5px;
margin: 10px 5px;
padding: 4px;
}
.cardContent {
padding: 10px;
}
.cardText {
margin-bottom: 30px;
}
</style>

<div class="fullCard" id="thumbnail">
<div class="cardContent">
<div class="cardText">
<h4>Alphabet</h4>
<hr>
<em><p>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</p></em>
</div>
<div class="cardLinks">
<a href="https://en.wikipedia.org/wiki/Larry_Page" target="_blank" class="links">Larry Page</a><br><br>
<a href="https://en.wikipedia.org/wiki/Sergey_Brin" target="_blank" class="links">Sergey Brin</a>
</div>
</div>
</div>

Issue 2:
Issue Description

This is for the feature/curriculum-expansion branch only when run locally, and NOT the staging branch.

For several challenges (challengeType: 0, using the code editor with the mobile-phone output layout), the jQuery method .css() doesn't seem to be accessing the styles applied in a style tag in the given code. This is affecting any assert tests that use a pattern of assert($('selector').css('propertyToCheck') == 'valueToCompare', 'message: ...');.Here's an example:

<style>
h2 {
position: relative;
top: 15px;
}
</style>
<body>
<h1>On Being Well-Positioned</h1>
<h2 class="testCode">Move me!</h2>
<p>I still think the h2 is where it normally sits.</p>
</body>
<script>
console.log($('h2').attr('class')); // Works great, returns testCode
console.log($('h2').css('position')); // returns undefined
console.log($('h2').css('top')); // returns undefined
</script>

Related assert tests that aren't passing:

assert($('h2').css('position') == 'relative', 'message: Add a CSS rule to specify that the <code>h2</code> has a <code>position</code> set to <code>relative</code>.');

assert($('h2').css('top') == '15px', 'message: Use a CSS offset to relatively position the <code>h2</code> 15px away from the <code>top</code> of where it normally sits.');

Browser Information

Browser Name, Version: Firefox 48.0.1

Operating System: Mac OS X, El Capitan v10.11.3

Mobile, Desktop, or Tablet:
Issue 1:
Repro gist: https://gist.github.com/mkscrg/9adea6ea14464876460c

Calling electron.ipcRenderer.sendSync() within a drop event handler causes odd behavior with dragEnd event handlers.

Given this code in a BrowserWindow:

<!DOCTYPE html>
<html lang="en">
<body>
<script>
window.allowDrop = function(e) {
e.preventDefault();
};
window.drop = function() {
console.log('DROP (1)');
require('electron').ipcRenderer.sendSync('sync-message');
console.log('DROP (2)');
};
window.dragEnd = function() {
console.log('DRAG END (3)');
};
</script>
<div draggable="true" ondragend="dragEnd(event)" style="width: 50px; height: 50px; background: blue;"></div>
<div ondragover="allowDrop(event)" ondrop="drop(event)" style="width: 100px; height: 100px; margin-top: 50px; background: red;"></div>
</body>
</html>

When the blue box is dragged to the red box, the console shows:

DROP (1)
DRAG END (3)
DROP (2)

Workaround: avoid calling IPC in drag/drop event handlers.

FWIW: this appeared for us as a bunch of React and ReactDnD invariant violations. We were calling remote.getGlobal from a React render method, and causing a re-render from a drop handler.

Issue 2:
I have an example repo here reproducing the issue in the smallest case I could come up with.

https://github.com/aackerman/electron-setImmediate-test

The gist is, when attempting to make a sync call in a 'renderer' process to a remote module in the 'browser' process, based on a reference from remote.require; the call doesn't block the setImmediate queue of tasks from being run. So the calls appear synchronous but don't completely block the run loop.

Is this intended behavior? It really threw me when debugging an issue.
Issue 1:
Electron version: v0.36.8

Operating system: Linux olimp 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u3 x86_64 GNU/Linux

http://electron.atom.io/docs/v0.36.8/api/browser-window/#wincapturepagerect-callback

My app takes periodically screenshot every one second. After one hour electron memory usage is 6GB and then it crashes

Issue 2:
I capture the mainWindows screen every 40ms to stream it to another computer. But the memory consumption rises and rises and at about 15 GB it slows down the webpage.

var handleScreenCapture = function(image) {
image = null;
setTimeout(screenTick, 40);
}

var screenTick = function() {
mainWindow.capturePage({x:0,y:0, width:1920,height:360}, handleScreenCapture);
}

mainWindow.webContents.on('did-finish-load', function() {
setTimeout(screenTick, 40);
});

Is there a fix for that. Is it possible to garbage collect manually?

Thanks

Christoph
Issue 1:
System info

Playwright Version: 1.32.3

Operating System: [macOS 13.2.1 (22D68)]

Browser: [Chromium]

Other info:

Source code

I provided exact source code that allows reproducing the issue locally.

Link to the GitHub repository with the repro

playwright-locator-loop

or

Config file

// playwright.config.ts

import { PlaywrightTestConfig } from "@playwright/test";

const config: PlaywrightTestConfig = {
timeout: 60 * 1000,
retries: 0,
snapshotDir: "./snapshots",
reporter: [
["html", { outputFolder: `playwright-report` }],
["line"],
],
projects: [
{
name: "chrome",
use: {
browserName: "chromium",
channel: "chrome",
headless: true,
viewport: { width: 1500, height: 730 },
acceptDownloads: true,
screenshot: "only-on-failure",
video: "on",
trace: "on",
},
}
],
};

export default config;

Test file (self-contained)

test("should select all checkboxes by a loop", async ({ page }) => {
page.goto(
"https://staging.scrive.com/s/9221714692413010618/9221932570717574475/d0661b5e62380af4"
);
await page.waitForLoadState();
await page.waitForLoadState("networkidle");

const checkboxes = await page.locator("rect[data-test='checkbox']").all();
for (const checkbox of checkboxes) {
await checkbox.click();
}

await expect(page.locator("[data-test='signview_sign_btn']")).toBeEnabled();
});

Steps

npm install

npm test

Expected

All checkboxes should be checked by the end of the tests. And the Next button on the bottom should be enabled

Actual

Some of the checkboxes are clicked multiple times and others are never clicked. When I looked at the trace, it seems when playwright loops through all the matching elements, it calls locator.click(rect[data-test='checkbox'] >> nth=<n> every time, and the order of that matched list may be non deterministic.

Issue 2:
System info

Playwright Version: [1.32.2]

Operating System: [Windows 11]

Browser: [Chrome]

Other info: I haven't tested on other browsers and I can see this issue with versions above 1.30.0

Title: Browser closes unexpectedly when a test fails during Playwright Test execution

Description: When running Playwright Test using the VSCode extension and executing a test suite with two spec.ts files in the same folder, the browser unexpectedly closes and relaunches when the first test fails. This behavior is not expected, as the browser should continue to remain open even if a test fails within the suite.

Steps to Reproduce:

Open VSCode and install the Playwright Test extension.

Create a test suite with two spec.ts files in the same folder.

Add at least one test to each spec file.

Execute the test suite using the "Run Test" option on the folder.

Observe the behavior of the browser during the execution of the tests.

Expected Results:

The browser should remain open throughout the entire execution of the test suite, regardless of whether any individual test fails.

Actual Results:

When the first test fails during the execution of the test suite, the browser unexpectedly closes and then relaunches before the next test is executed.