WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Migrated issue, originally created by Dariusz Górecki (@canni)

Consider following example of joined-table inheritance:

class Parent(DeclarativeBase):
# ...
parent_column = Column(String(255))

class Child(Parent):
# ...
child_column = synonym('parent_column')

@validates('child_column') # @validates('parent_column') also does not work
def validator(self, name, value):
# not called at all
raise ValueError()

The validator method is never called

Issue 2:
Migrated issue, originally created by Michael Bayer (@zzzeek)

#!python

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)
data = Column(String)

@validates('data')
def validate(self, key, value):
return "yup A " + value

class B(A):
@validates('data')
def validate(self, key, value):
return "yup B " + value

for obj in (A(), B()):
obj.data = "value"
print(obj.data)

so here's a patch that makes the second one print "yup A yup B value", e.g. runs both validators:

diff --git a/lib/sqlalchemy/orm/strategies.py b/lib/sqlalchemy/orm/strategies.py
index 2c18e81..fb8e0aa 100644
--- a/lib/sqlalchemy/orm/strategies.py
+++ b/lib/sqlalchemy/orm/strategies.py
@@ -38,26 +38,21 @@ def _register_attribute(strategy, mapper, useobject,

attribute_ext = list(util.to_list(prop.extension, default=[]))
- listen_hooks = []

+ pre_validate_hooks =[]
+ post_validate_hooks = []

if useobject and prop.single_parent:
- listen_hooks.append(single_parent_validator)
+ pre_validate_hooks.append(single_parent_validator)

- if prop.key in prop.parent.validators:
- fn, opts = prop.parent.validators[prop.key](prop.key)
- listen_hooks.append(
- lambda desc, prop: orm_util._validator_events(desc,
- prop.key, fn, **opts)
- )

if useobject:
- listen_hooks.append(unitofwork.track_cascade_events)
+ post_validate_hooks.append(unitofwork.track_cascade_events)

# need to assemble backref listeners
# after the singleparentvalidator, mapper validator
backref = kw.pop('backref', None)
if backref:
- listen_hooks.append(
+ post_validate_hooks.append(
lambda desc, prop: attributes.backref_listeners(desc,
backref,
uselist)
@@ -85,7 +80,15 @@ def _register_attribute(strategy, mapper, useobject,
**kw
)

- for hook in listen_hooks:
+ for hook in pre_validate_hooks:
+ hook(desc, prop)
+
+ for super_m in m.iterate_to_root():
+ if prop.key in super_m.validators:
+ fn, opts = super_m.validators[prop.key]
+ orm_util._validator_events(desc, prop.key, fn, **opts)
+
+ for hook in post_validate_hooks:
hook(desc, prop)

@properties.ColumnProperty.strategy_for(instrument=False, deferred=False)

but is that what we want? or should B's validator replace A's?

if the latter then we just do this:

for super_m in m.iterate_to_root():
if prop.key in super_m.validators:
fn, opts = super_m.validators[prop.key]
orm_util._validator_events(desc, prop.key, fn, **opts)
break # just the one

Attachments: 2943.patch
Issue 1:
Downloaded from https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe

Julia Version 0.7.0-DEV.4543
Commit 00ac33a3ef* (2018-03-12 04:07 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)

When the cursor is moved on the terminal window (REPL), the cursor disappears until left or right keys are not pressed. Editing a line becomes thus very difficult.

Behavior on 0.6.2 is fine.

Wikipedia describes the wanted behavior nicely https://en.wikipedia.org/wiki/Cursor_(user_interface)

The blinking of the text cursor is usually temporarily suspended when it is being moved; otherwise, the cursor may change position when it is not visible, making its location difficult to follow.

Issue 2:
System & Version

uname:

Arch Linux 4.19.91-lts x86_64 GNU/Linux

versioninfo():

Julia Version 1.4.1
Commit 381693d3df* (2020-04-14 17:20 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-8.0.1 (ORCJIT, skylake)

Bug

When I try to apply ^ to a string more than one character long with an unsigned integer with value 0 (when trying to duplicate the string n (zero) times), it segfaults.

julia> "xx" ^ Int(0) # works
""
julia> "xx" ^ UInt(2) # works
"xxxx"
julia> "x" ^ UInt(0) # works
""
julia> "xx" ^ UInt(0) # segfaults

signal (11): Segmentation fault
in expression starting at REPL[3]:0
unknown function (ip: 0x7f7df8c8d369)
unknown function (ip: 0x7f7df8eb8b0a)
unknown function (ip: 0x7f7df8eb8ef4)
unknown function (ip: 0x7f7e05c9b439)
unknown function (ip: (nil))
Allocations: 962253 (Pool: 961928; Big: 325); GC: 1
[1] 96359 segmentation fault (core dumped) julia

# Expected:
""
Issue 1:
Glide Version:4.0.0 RC0

Integration libraries:No

Issue details / Repro steps / Use case background: I have just added the glide dependency in my gradle file. When I try to use methods like placeholder(), centerCrop(), crossFade(), etc. between load() and into(), it gives me syntax error like there is no such method. Are they removed in this release or am I missing something ?

Glide load line / GlideModule (if any) / list Adapter code (if any):

Glide.with(this)
.load(imgUrl)
.placeholder(R.drawable.downloading)
.into(bikeImageView);

It gives error on placeholder() that the method doesn't exist.

Issue 2:
I'm trying to use glide 4.0.0-RC0 by Gradle:

dependencies {
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.caverock:androidsvg:1.2.2-beta-1'
compile 'com.github.bumptech.glide:glide:4.0.0-RC0'
compile 'com.android.support:support-v4:25.3.1'
}

I followed the example here: https://github.com/bumptech/glide/tree/master/samples/svg/src/main/java/com/bumptech/glide/samples/svg

but after add glide by Gradle, I got error: Cannot resolve symbol 'GlideApp'

My source:

package com.example.quangson.glidesvg;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import static com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions.withCrossFade;

import android.content.ContentResolver;
import android.graphics.drawable.PictureDrawable;
import android.net.Uri;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.bumptech.glide.RequestBuilder;
import com.example.quangson.glidesvg.glide.SvgSoftwareLayerSetter;

public class MainActivity extends AppCompatActivity {

private static final String TAG = "SVGActivity";

private ImageView imageViewRes;
private ImageView imageViewNet;
private RequestBuilder<PictureDrawablerequestBuilder;
LinearLayout ll;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

imageViewNet = (ImageView) findViewById(R.id.svg_image_view2);

requestBuilder = GlideApp.with(this)
.as(PictureDrawable.class)
.placeholder(R.drawable.image_loading)
.error(R.drawable.image_error)
.transition(withCrossFade())
.listener(new SvgSoftwareLayerSetter());

Uri uri = Uri.parse("http://www.clker.com/cliparts/u/Z/2/b/a/6/android-toy-h.svg");
requestBuilder.load(uri).into(imageViewNet);
}
}

Please help
Issue 1:
interface I1 {
a(x: number, y: string): void;
}

interface I2 {
a(x: number, y: string): void;
}

var v: I1 & I2;

v.a/*requestQuickInfoHere*/(/*requestSignatureHelpHere*/

Issue 2:
TypeScript Version:

1.8.7

Code

let s
let a
let b

s = "" // <-- Syntax error iff there is no ';' here
[a, b] = [1, 2]
Issue 1:
When running the services/isolate.dart sample app on a Nexus 5X and clicking Start button it immediately crashes with the following output:

~/projects/flutter/examples/layers$ flutter run -t services/isolate.dart
Running 'pub get' in layers... 6.2s
Building APK in debug mode (android-arm)...
Warning: signing the APK using the debug keystore.
Built build/app.apk (8.7MB).
Running services/isolate.dart on Nexus 5X...
--------- beginning of main
Observatory listening on http://127.0.0.1:8102
Diagnostic server listening on http://127.0.0.1:8103
Application running.
Connected to view '_flutterView/0xf48196c0'.
Type "h" or F1 for help, "r" or F5 to restart the app, and "q", F10, or ctrl-c to quit.
Type "w" to print the widget hierarchy of the app, and "t" for the render tree.
E/DartVM : ../../dart/runtime/vm/object.h: 5455: error: Handle check failed: saw UnhandledException expected Instance
E/DartVM : Dumping native stack trace for thread 3010
E/DartVM : [0xdae75f5d] Unknown symbol
E/DartVM : -- End of DumpStackTrace
--------- beginning of crash
W/ActivityManager: Force finishing activity io.flutter.examples.Layers/org.domokit.sky.shell.SkyActivity
W/ActivityManager: Force finishing activity io.flutter.examples.Layers/org.domokit.sky.shell.SkyActivity
W/ActivityManager: Duplicate finish request for ActivityRecord{7d0b96c u0 io.flutter.examples.Layers/org.domokit.sky.shell.SkyActivity t59 f}
Application finished.

Just in case, here is my flutter doctor output:

$ flutter doctor
[✓] Flutter (on Linux, channel master)
• Flutter at /home/lex/projects/flutter
• Framework revision b298bdc8c4 (26 hours ago), 2016-09-09 16:55:55
• Engine revision a55fa1efb9
• Tools Dart version 1.20.0-dev.1.0

[✓] Android toolchain - develop for Android devices (Android SDK 19.1.0)
• Android SDK at /home/lex/projects/Android/Sdk
• Platform android-19, build-tools 19.1.0
• OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14)

[✓] Atom - a lightweight development environment for Flutter
• flutter plugin version 0.2.4
• dartlang plugin version 0.6.37

[✓] Connected devices
• Nexus 5X • 00dd4847616ed5cd • android-arm

Issue 2:
Steps to Reproduce

I am new to flutter, was just trying to install it on my machine(ubuntu 17.10 , 64-bit). After setting PATH variable as mentioned here, I tried to run command " flutter doctor". And got an error

line 33 : sed : command not found

I opened that shell script here , found that this 's,^/+,/,' to be written in Double quotation marks. And changed it to Single Quotation Marks. And everything Works Fine.

My Questions

Will Changing Quotation marks make any difference? (I know nothing about shell scripting and I think answer would be not as it works correctly )

And if there is no variable there why are we using double quotes as it makes trouble to some of us, maybe. (As mentioned here)

If we are going to change it to Single Quotaion marks, Can I create PR for it?

Flutter Doctor

Everything works fine after changes.
Issue 1:
if some html elements (br for example) is between div items of carousel, the .next class is add to the element and not the the next .item div.

When the next is triggered, the .next css class must be added to the next .item div.

Issue 2:
there is a problem anchor tag is not working on iPad. When I click on http://twitter.github.com/bootstrap/components.html#labels and then on badges nothing will happen.

if i scroll arround and click then on a new anchor link it is working again.

It would be nice, if somebody can test it. :)
Issue 1:
System information (version)

OpenCV => :3.4.9

Operating System / Platform => Ubuntu 16.04

Compiler => :gcc 5.4.0 20160609

Detailed description

Is there any way to call imread() without filename but with image array?

Steps to reproduce

This is not a bug. But I want to know how to load image without filename.

If I have received an image from somewhere and I want to load it as Opencv matrix,

I think it will be better to convert without writing file.

But now I have to write the image to file and call imread() function.

If there is another way to read image without writing file, please let me know.

Thank you.

Issue 2:
System information (version)

OpenCV => 3.4.6

Operating System / Platform => Windows 10 64 Bit

Compiler => Visual Studio 2017

Detailed description

Using OpenCV functions cv::absdiff, cv::sum, and cv::minMaxIdx one can calculate that the sum of the absolute difference of 2 matrices is less than the greatest single absolute difference of a single element.

sum |A-B| < max |A-B|

To my knowledge this only occurs after calling convertTo() on a Mat with more than 2 dimensions.

In other words:

using 2D Mats is not a problem, and

using 3D Mats without calling converTo() is not a problem,

BUT

using 3D Mats and calling convertTo() will result in what should be an impossible result.

Minimal Example To Reproduce

#include <iostream>

#include <opencv/cv.h>

//*****************************************************************************
//*****************************************************************************
bool CalculateSumOfErrorAndMaxError(
const cv::Mat& A,
const cv::Mat& B)
{
cv::Mat AbsDiff;
double SumAbsDiff;
double MaxAbsDiff;

cv::absdiff(A, B, AbsDiff);
SumAbsDiff = cv::sum(AbsDiff)[0];
cv::minMaxIdx(AbsDiff, NULL, &MaxAbsDiff, NULL, NULL);

std::cout << "SumAbsDiff: " << SumAbsDiff << std::endl;
std::cout << "MaxAbsDiff: " << MaxAbsDiff << std::endl;

bool ImpossibleResult = SumAbsDiff < MaxAbsDiff;

return ImpossibleResult;
}

//*****************************************************************************
//*****************************************************************************
int main()
{
const int Size[] = { 10, 10, 10 };
cv::Mat A(3, Size, CV_64F);
cv::randu(A, 0.0, 3.0);

cv::Mat B = A.clone();

A.convertTo(A, CV_32F);
B.convertTo(B, CV_32F);

CalculateSumOfErrorAndMaxError(A, B);

return 0;
}

This should produce the output:

SumAbsDiff: 0
MaxAbsDiff: 1
Issue 1:
Badge on default button is white on white!

Exemple :

http://jsfiddle.net/LJ75v/

Ligne 2345 on bootstrap.css:

.btn-default .badge {

color: #ffffff;

background-color: #fff;

}

It must be :

.btn-default .badge {

color: #ffffff;

background-color: #999999;

}

Issue 2:
There appears to be an issue with a badge on a btn btn-default where the badge background color is white and the color is also white.

Ex: http://plnkr.co/edit/NVcsmFOFRKRIWsPsoKBc?p=preview

Introduced from #11268
Issue 1:
This RFC is regarding distributing typedef files with React. While this would be generally useful (and possibly useful to extract the React.js definitions out of flow itself (especially for renderer-implementers), it would be especially nice for renderer implementers.

(I have manually extracted the minimal required for a react renderer in https://github.com/iamdustan/tiny-react-renderer/tree/fiber/src/fiber-types)

Possible solutions:

ensure flow gen-flow-files .... works and generates all of the *.js.flow files in packages

add a custom step to the build tooling to include the public renderer type def for each public package + a minimal typedef for ReactFiberReconciler.js in each package that receives that file.

Issue 2:
As per comments from @samwgoldman in the following issue, the flow built-in react type definitions are lagging behind and the recommendation is that the definitions be included and maintained in the react repo itself:

facebook/flow#1081

The flow maintainers are doing an excellent job of implementing new JS syntax/features. It would be great if they did not also need to maintain this file:

https://github.com/facebook/flow/blob/master/lib/react.js

One could, of course, also relegate this definition to yet another repo.
Issue 1:
Calling atom.cmd filename on windows, or opening with node atom.js filename , always ends up with UTF-8 encoding, even if its not. Auto-detect doesn't seem to be triggered when opened from arguments.

However, manually triggering auto-detect seems to do the trick.

But this is serious, as there is no warning of any kind, and the file will end up being filled up with garbage due to wrong encoding, with no way to reverse it.

Issue 2:
Atom should try to guess the encoding when opening a file as best as it can and only if it fails, fallback to the default encoding option (which was implemented a few days ago).

Missing libraries (that would presumably help with this issue) shouldn't be a factor here. If there isn't any library that could be used, one should be created from 0 or maybe patch the one that could get the job done with as little amount of work as possible.

The main issue here is that Atom will try to open files in UTF8 (or the default encoding, if set), which will potentially break any non-UTF8 files. And that, imho, is not an acceptable/valid behavior for any editor.

This should be tagged as 1.0 blocker.

Also, maybe this could help:

https://github.com/mooz/node-icu-charset-detector

https://www.npmjs.org/package/detect-encoding
Issue 1:
Since @ScottPJones was mentioning upper/lowercase functions recently, I took a quick look at them and I noticed that we are calling towupper and towlower, which are C99 functions that accept wchar_t arguments.

Unfortunately, this means that they are broken on Windows (where wchar_t is 16 bits) for any character outside the BMP. Even on other platforms with a 32-bit wchar_t, they are going to return different results on different systems, and many systems will have out-of-date Unicode tables. They are also locale-dependent; I'm not sure if this is desirable for us.

utf8proc has up-to-date upper/lower/titlecase mapping data already in its "database" (generated from http://www.unicode.org/Public/UNIDATA/UnicodeData.txt), so maybe we should just add a utf8proc_toupper function (etc.) to utf8proc to make this accessible. Then we could call that (probably plus a check for the common case of ASCII codepoints).

Issue 2:
End-of-word contexts. As reported in #7847, for example, capital sigma Σ should map to lowercase terminal sigma ς at the end of a word, not ordinary sigma σ:

julia> lowercase("ΛΌΓΟΣ") #logos; λόγος
"λόγοσ"

Locale-specific contexts: let's not get anyone accidentally killed thanks to incorrect localization.

$LANG="tr_TR" julia
...
julia> uppercase("sikisinca") #SİKİSİNCA
"SIKISINCA"
Issue 1:
how to upload duplicate files to durid data source.

{ "type" : "index_hadoop", "spec" : { "ioConfig" : { "type" : "hadoop", "appendToExisting":true, "inputSpec" : { "type" : "static", "paths" : "quickstart/20170703.csv" } }, "dataSchema" : { "dataSource" : "smsdata20170708", "granularitySpec" : { "type" : "uniform", "segmentGranularity" : "day", "queryGranularity" : "none", "intervals" : ["2017-02-21/2017-02-23"] }, "parser" : { "type" : "hadoopyString", "parseSpec" : { "format" : "csv", "columns" : ["subscriber_id","trans_id_1","trans_id_2","date_time","subscriber_type","message_type","sub_id_2","account_type","master_sub_id","application_id","sub_type_id","unit_type_id","usage_amount","type_of_charge","identity_id","group_id","charge_code","content_type","fund_usage_type","msc_id","circle_id","sp_id"], "dimensionsSpec" : { "dimensions" : ["subscriber_id","trans_id_1","trans_id_2","date_time","subscriber_type","message_type","sub_id_2","account_type","master_sub_id","application_id","sub_type_id","unit_type_id","usage_amount","type_of_charge","identity_id","group_id","charge_code","content_type","fund_usage_type","msc_id","circle_id","sp_id"] }, "timestampSpec" : { "format" : "auto", "column" : "date_time" } } }, "metricsSpec" : [ { "name" : "count", "type" : "count" } ] }, "tuningConfig" : { "type" : "hadoop", "overwriteFiles":false, "partitionsSpec" : { "type" : "hashed", "targetPartitionSize" : 5000000 }, "jobProperties" : {} } } }

Issue 2:
So this is one of those "borderline" issues.

It turns out that we have some sort of a wildcard catchall DNS here which means that no matter what URL you'd put into that test, it would always resolve to something "legal" since the result would end up being illegal.url.mycompany.com which would then resolve.

So this is not so much an "issue" but a notice that this test can "fail" because of a weird network setup on the computer running the test.
Issue 1:
Problem description

When add onBlur to TextField, the label won't switch to un-focus when blur.

// This work as normal
<TextField label="First name" />
// This won't work
<TextField label="First name" onBlur={() => {}} />

Issue 2:
Problem description

the onFocus floating effect is lost, when overriding the onFocus-props of a TextField- or FormControl-Component. (same problem with onBlur btw)

Link to minimal working code that reproduces the issue

https://www.webpackbin.com/bins/-KkudROJc3XfIoli7IxX

Versions

Material-UI: 1.0.0-alpha.15

React: 15.5.4

Browser: chrome 58.0.3029.110 (64-bit)

possible solution

override the handleFocus and handleBlur-function and rearrange the props in the FormControl-Component:

class FormControl extends Component {
(...)
handleFocus = () => {
if (!this.state.focused) {
this.setState({ focused: true });
}
if (this.props.onFocus) {
this.props.onFocus();
}
};

render() {
return (<div
className={classNames(classes.root, className)}
{...other}
onFocus={this.handleFocus}
onBlur={this.handleBlur}
>
{children}
</div>
);
}
(...)
}

`
Issue 1:
The link for trust_env documentation fails to load.

Issue 2:
Looks like www.python-requests.org and docs.python-requests.org are redirecting to https://2.python-requests.org and failing SSL negotiation, making the site appear down. Google links are all dead, documentation links don't work, etc.

http://2.python-requests.org redirects to https://requests.kennethreitz.org/en/master/, which works.

Expected Result

Website should appear or redirect to non-HTTPS link

Actual Result

Redirection to https://2.python-requests.org breaks the site

Reproduction Steps

Open browser of your choice

Attempt to browse to http://docs.python-requests.org or http://www.python-requests.org.

Browser gets redirect to https://2.python-requests.org which fails with an SSL_PROTOCOL_ERROR

System Information

N/A
Issue 1:
Q
A

Bug report?
no

Feature request?
no

BC Break report?
no

RFC?
yes

Symfony version
3.4 and\or 4.0

Hi, I'm currently working on some kind of RPC server bundle stack on top of symfony and I have a simple internal method routing, which generally repeats the symfony one's. I say repeats but not re-uses (which I hope to do initially), since the current routing have several limitations:

Controller Resolver signature requires the whole Request object, but really it uses only _controller attribute value, can we pass it instead? The Request object is used only to build Exception message with getPathInfo call, but I think we can overcome it with rethrow on higher level or just refactor it out. Most of the exceptions, thrown by ControllerResolver do not use the PathInfo to construct the message.

Controller Name Parser signature hardcodes the Controller\*Controller::*Action controler layout and it is even not configurable. Replacing this layout to another (or making this configurable) leads to full class override with copy&paste despite of the fact it is open for inheritance. we can make action guessing and action parsing to be protected methods, which define the layout

I also have some thoughts on decoupling Route from HTTP since most of the routing loading process could be fully reused for creating internal routing, but the current Route class is all about HTTP routing (i.e it modifies path to match URI format), but I haven't fully formalized this thoughts yet

I hope we can make the components a bit more decoupled with this ideas.

WDYT?

Issue 2:
There's no point in naming $_GET $request->query and $_POST $request->request. They should be called $request->get and $request->post, simply. While I could understand in theory how query is more correct (RFC et al) but this is a PHP app, the parsed query string is called get and that's it.

But I can't fathom the logic where naming $request->post after another existing superglobal ($_REQUEST) would make any sense. Someone suggested that perhaps it's named after request body. But that should be $request->input because php://input.

These could be, for the sake of BC, just references. Very easy fix: add get and post property, document it, add reference-value in constructor, done.