WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Issue originally made by @Riim

Bug information

Babel version: 6.x.x

Options

loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel',
query: { presets: ['es2015'] }
}
]

Input code

let Component = createClass({
setTimeout(cb, delay) {
let id = nextUID();

let timeoutId = setTimeout(() => {
delete this._disposables[id];
cb.call(this);
}, delay);

let _clearTimeout = () => {
if (this._disposables[id]) {
clearTimeout(timeoutId);
delete this._disposables[id];
}
};

let timeout = this._disposables[id] = {
clear: _clearTimeout,
dispose: _clearTimeout
};

return timeout;
}
});

Description

Output code in babel5:

var Component = createClass({
setTimeout: (function (_setTimeout) {
function setTimeout(_x2, _x3) {
return _setTimeout.apply(this, arguments);
}

setTimeout.toString = function () {
return _setTimeout.toString();
};

return setTimeout;
})(function (cb, delay) {
var _this4 = this;

var id = nextUID();

var timeoutId = setTimeout(function () {
delete _this4._disposables[id];
cb.call(_this4);
}, delay);

var _clearTimeout = function _clearTimeout() {
if (_this4._disposables[id]) {
clearTimeout(timeoutId);
delete _this4._disposables[id];
}
};

var timeout = this._disposables[id] = {
clear: _clearTimeout,
dispose: _clearTimeout
};

return timeout;
})
});

Output code in babel6:

var _this4 = this;

var Component = createClass({
setTimeout: (function (_setTimeout) {
function setTimeout(_x2, _x3) {
return _setTimeout.apply(this, arguments);
}

setTimeout.toString = function () {
return _setTimeout.toString();
};

return setTimeout;
})(function (cb, delay) {
var id = nextUID();

var timeoutId = setTimeout(function () {
delete _this4._disposables[id];
cb.call(_this4);
}, delay);

var _clearTimeout = function _clearTimeout() {
if (_this4._disposables[id]) {
clearTimeout(timeoutId);
delete _this4._disposables[id];
}
};

var timeout = this._disposables[id] = {
clear: _clearTimeout,
dispose: _clearTimeout
};

return timeout;
})
});

Issue 2:
It fails with "<name>" is read-only.

Sample code:

class A {
b() {
const b = 1;
}
}
Issue 1:
Let's say we have two pages: PageA, PageB, and they have pageA.js and pageB.js. Both of them depdends on a common bunch of stuffs, which can be packed into a file called "common.js".

pageA.js:

require(['common', 'someOtherThingsANeeds'], function(){//do sth.})

pageB.js:

require(['common', 'someOtherThingsBNeeds'], function(){//do sth.})

I want to load chunks when the page runs, so I use a config like this:

new CommonsChunkPlugin({
name: "pageA",
async: true,
}),
new CommonsChunkPlugin({
name: "pageB",
async: true,
})

But it comes out that both chunks of pageA and pageB have the same content of module "common", which are duplicated and should be extracted to a single module called "common"

In this example, we can just specify something like this:

new CommonsChunkPlugin({
name: "commons.js",
chunks: ["pageA", "pageB", "admin-commons.js"],
minChunks: 2
}),

However, I have to declare the reference of "common.js" in the html file. In addition, I can't control when my "common.js" should be loaded by js. And I can't control my dependencies in my js only. I have to remember to write it and I have to ordering the declarations in an old way.

In r.js of require.js, there's such a config that we can customize which of the modules should be seperated into individual ones, like this:

modules:[ { name:"common",
include:[ "allThingsCommonNeeds" ] },
{ name:"pageA",
include:[ "blabla ],
exclude:["common"] }]

So how could I achieve this by webpack? Do you guys have any suggestions or ideas? Thank you very much.

Issue 2:
Bug report

What is the current behavior?

Webpack 5 persistent cache + EnvironmentPlugin: environment variables changing doesn't affect cache.

If the current behavior is a bug, please provide the steps to reproduce.

make webpack config with persistent cache and EnvironmentPlugin

build code, for example, with env variable TEST_VAR=1, output code will contain value 1

next build with TEST_VAR=2, output code will still contain value 1

What is the expected behavior?

Environment variable change will affect output code.

Other relevant information:

webpack version: 5

Node.js version: 12

Operating System: macOS
Issue 1:
When you clone an Object3D object that contains animation, the newly created object cannot be displayed in the scene.

Issue 2:
Skinned material need their own geometry to work. This is because the material deforms the geometry, so if you share the same geometry between two meshes with deformation, things are going to get weird (at least that's how I understand it).

Now the problem is, if you load a mesh from a FBX or something else and it contains at some point a skinned mesh, and you need multiple instances of it, here's what happens:

You call clone(); on the mesh to generate your new instances

The clone function doesn't generate a new geometry, so both models share geometry, and things gets bad (the mesh doesn't appear at all).

Here's a code sample: I was able to replicate this problem in the webgl_loader_fbx.html demo with a simple modification: Just clone the mesh once loaded before using it, and you'll see that the cloned version of it doesn't work:

loader.load( 'models/fbx/xsi_man_skinning.fbx', function( originalObject ) {

// Using a clone of the mesh, it won't work
var object = originalObject.clone();
object.mixer = new THREE.AnimationMixer( object );
mixers.push( object.mixer );

var action = object.mixer.clipAction( object.animations[ 0 ] );
action.play();

scene.add( object );

}, onProgress, onError );

Is there a way to fix this behaviour? Like a deep clone function that also recreates geometries?

If not, should I just write a function that recursively recreates all the meshes in my object, regenerating their geometry? Or is it a bad idea?
Issue 1:
if you load a gltf model with some skinned animation and then try to clone that mesh - you will find yourself in a bit of a pickle!

Skinned geometry loaded with GLTF has no "bones" property, which is expected by "SkinnedMesh", see:

three.js/src/objects/SkinnedMesh.js

Lines 38 to 47
in
17264b9

initBones: function () {

var bones = [], bone, gbone;

var i, il;

if ( this.geometry && this.geometry.bones !== undefined ) {

// first, create array of 'Bone' objects from geometry data

for ( i = 0, il = this.geometry.bones.length; i < il; i ++ ) {

so you'll end up with a skinned mesh, alright, but your character will have no spine! ..or any other bones for that matter. From my experience - the mesh will not render at all as a result.

Issue 2:
Description of the problem

GLTF2 models that are clones do not displayed correctly. This is for a number of reasons

the onBeforeRender callback is not copied

GLTFShader is not cloned across

SkinnedModel skeleton is reinitialised to 0 bones and the source skinnedmodel skeleton is not cloned

http://jsfiddle.net/mn768h35/

Three.js version

[X ] Dev

r85

...

Browser

All of them

Chrome

Firefox

Internet Explorer

OS

All of them

Windows

macOS

Linux

Android

iOS

Hardware Requirements (graphics card, VR Device, ...)
Issue 1:
Not certain if this is a bug or defined behaviour (but then the error message is not clear in any case).

In 0.13.1:

In [28]: df = pd.DataFrame(np.random.randn(9).reshape(3,3), index=[0.1,0.2,0.2],
columns=['a','b','c'])
In [29]: df
Out[29]:
a b c
0.1 1.711117 1.218853 -1.322363
0.2 0.956266 0.230374 -1.005935
0.2 -0.137729 -0.993931 -0.902793

In [30]: df.ix[0.2,'a']
Out[30]: array([ 0.95626607, -0.13772877])

In [31]: df.ix[0.2]
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
...
ValueError: Length mismatch: Expected axis has 0 elements, new values have 2 ele
ments

In master, both (df.loc[0.2] and df.loc[0.2, 'a']) give this error message. Wile for integer index, this works.

Issue 2:
Series.unique returns an numpy array but np.unique(series) returns a series. Not sure if it is intentional but it might be better to keep both the calls consistent.

In [173]: a[:10]

Out[173]:

0 4

1 210

2 210

3 210

4 3197

5 3197

6 3197

7 3457

8 3713

9 3741

In [174]: a[:10].unique()

Out[174]: array([ 4, 210, 3197, 3457, 3713, 3741])

In [176]: np.unique(a[:10])

Out[176]:

0 4

1 210

4 3197

7 3457

8 3713

9 3741
Issue 1:
I know there are a lot of threads out there but I cannot found an "official" solution to this question.

What is the best way of removing the padding between the columns, and the container?

Sorry if the question already have an answer.

Issue 2:
I have tried to make my layout 100%. And for that I didn't use any <div class ="container">. Just started with <div class ="row">.

<div class="row">
<div class="col-md-3">
<div class="sectionLeft">
Sidebar Content
</div>
</div>
<div class="col-md-9">
Test content
</div>
</div>

but it showing horizontal scroll bar. I don't know why. But I saw that it may cause from margin-left and margin-right negative value.

But I am using Bootstrap v3.0.0 it should be fixed.

Please see my full code from http://bootply.com/81888
Issue 1:
Bug Report

For English only, other languages will not accept.

Before report a bug, make sure you have:

Searched open and closed GitHub issues.

Read documentation: ShardingSphere Doc.

Please pay attention on issues you submitted, because we maybe need more details.

If no response more than 7 days and we cannot reproduce it on current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Which version of ShardingSphere did you use?

3.1.0

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

Sharding-JDBC

Expected behavior

support dynamic parameter on INSERT ON DUPLICATE KEY UPDATE.

for example (mybatis mapper):

INSERT INTO BlackMember (memberId, activeId, passiveId, project, platform, source)
VALUE (#{memberId}, #{activeId}, #{passiveId},#{project}, #{platform}, #{source})
ON DUPLICATE KEY UPDATE shieldStatus = #{shieldStatus}

Actual behavior

Cause: java.sql.SQLException: No value specified for parameter 7

Reason analyze (If you can)

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

Example codes for reproduce this issue (such as a github link).

PS

Although I can find some explanation about why this feature should not be supported #1066 , it's not convictive enough I think. As the official doc says sharding-jdbc is 100% compatible for single-node routing SQL, it will not be true if this issue exists, and I find it's really hard to migrate my projects from Mycat to the Sharding-Sphere since it is common usage in my projects.

So, could you please reconsider the possibility to support this feature.

Issue 2:
Which version of ShardingSphere did you use?

4.0.0-RC1

jOOQ 3.11.11

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

Sharding-JDBC

Expected behavior

select dest_regional_fee_1.LOGNO from dest_regional_fee_1 where dest_regional_fee_1.ID = ?

Actual behavior

select dest_regional_fee.LOGNO from dest_regional_fee_1 where dest_regional_fee_1.ID = ?

Reason analyze (If you can)

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

Example codes for reproduce this issue (such as a github link).

2019-08-12 23:25:12.950 INFO 2833 --- [ main] ShardingSphere-SQL : Logic SQL: select dest_regional_fee.LOGNO from dest_regional_fee where dest_regional_fee.ID = ?
2019-08-12 23:25:12.952 INFO 2833 --- [ main] ShardingSphere-SQL : Actual SQL: ds0 ::: select dest_regional_fee.LOGNO from dest_regional_fee_1 where dest_regional_fee_1.ID = ? ::: [100]
Issue 1:
Right now Scikit-Learn provides several Naive Bayes models.

GaussianNB: For continuous features that are assumed to be Gaussian distributed.

MultinomialNB: For discreet features that are multinomially distributed, e.g. counts of words of occurrences

BernoulliNB: For indicator features (True/False) which are assumed to be Bernoulli distributed

The obvious thing that is missing is a variant for categorical features like color for instance. It is of course possible to use dummy encoding to transform a categorical feature into indicator features for each category but this breaks the categorical correlation. If a car is red, it obviously isn't green and yellow.

So long story short, are there any plans to add a CategoricalNB? Would you like to see a PR? Or am I missing here something obvious?

Issue 2:
Random Forest is a popular classification technique; recent benchmarks [1][2] have shown that performance of sklearn's RandomForestClassifier is inferior to competing software implementations.

The performance penalty most likely stems from the underlying tree building procedure, however, changes here require considerable effort. These changes include:

Better representations for data set partitions (currently we use a bit mask)

Some low-hanging fruits may be found in the forest module itself:

Sampling w/ replacement requires memory copies and re-computation of X_argsorted -> this can be mitigated by introducing sample weights (see #522)

[1] http://continuum.io/blog/wiserf-use-cases-and-benchmarks

[2] http://wise.io/wiserf.html
Issue 1:
penguins = sns.load_dataset("penguins")

sns.displot(data=penguins, x="flipper_length_mm", col='species', facet_kws=dict(sharex=False, sharey=False))

The x-axis should not be shared.

Issue 2:
I am trying to use displot to plot distributions of different variables in the same figure. I might be using displot incorrectly, but it seems to me that the sharex option passed to facet_kws is not working correctly (while sharey does work as expected).

Simple code snippet to reproduce:

import pandas as pd

import seaborn as sns
from matplotlib import pyplot as plt

titanic = sns.load_dataset("titanic")
df = pd.melt(titanic, id_vars=["sex", "class"], value_vars=["fare", "age"])
sns.displot(
data=df,
x="value",
col="variable",
hue="sex",
facet_kws={"sharex": False, "sharey": False},
)
plt.savefig("test.png")

The result is the following:

As you can see, the y axes have different values, while the x axes seem to be shared despite the "sharex": False keyword.
Issue 1:
The ES7 proposal is available at: https://github.com/leebyron/ecmascript-more-export-from

The additions include:

reexporting default:

// proposed:
export v from "mod";

// symmetric to:
import v from "mod";
export {v};

reexporting as sub-module:

// proposed:
export * as ns from "mod";

// symmetric to:
import * as ns from "mod";
export {ns};

also allowing combining

// proposed
export v, {x, y as w} from "mod"
// symmetric to
import v, {x, y as w} from "mod"
As well as

// proposed
export v, * as ns from "mod"
// symmetric to
import v, * as ns from "mod"

Issue 2:
Looking at history : https://github.com/Microsoft/TypeScript/commits/master/bin/lib.d.ts

Was there on April 11 : https://github.com/Microsoft/TypeScript/blob/6f1feffe6710a3201fb46a0b01e16051bfc18a29/bin/lib.d.ts#L1689

Isn't there on April 18: https://github.com/Microsoft/TypeScript/blob/b8ebf561f94ea27ecfc6af3c2b20661e6fcd79ed/bin/lib.d.ts

Report by Atom-TypeScript user @vaughnroyko

The following code now fails (source from : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView):

var littleEndian = (function() {
var buffer = new ArrayBuffer(2);
new DataView(buffer).setInt16(0, 256, true);
return new Int16Array(buffer)[0] === 256;
})();
console.log(littleEndian); // true or false
Issue 1:
System information (version)

OpenCV => 3.4.1

Operating System / Platform => Windows 64 Bit

Compiler => Visual Studio 2017

Detailed description

cv::MotionJpegCapture crashes if grabFrame is called after the end of stream is reached due to unchecked iterator increment ++m_frame_iterator.

Steps to reproduce

#include <opencv2/videoio.hpp>

int main()
{
cv::VideoCapture capture( "some MJPEG video file" );
cv::Mat image;
while( capture >> image, !image.empty() );
capture >> image; // < deque iterator is not incrementable
return EXIT_SUCCESS;
}

Issue 2:
System information (version)

OpenCV => 2.4+ (All versions since 2012)

Operating System / Platform => Debian 64 Bit

Compiler => GCC 6

Detailed description

Background

I found this issue while trying to use the Conan package manager. I realise that the OpenCV does not provide any official package manager support, but I believe this fix could help others too. https://github.com/conan-community/community/issues/114

Description

In the FindOpenEXR.cmake file (https://github.com/opencv/opencv/blob/master/cmake/OpenCVFindOpenEXR.cmake), there is support for using a variable called 'OPENEXR_ROOT' to find a version of OpenEXR installed in a user-defined location. Currently this is a cache variable with a default of C:\Deploy and is only defined/useable in Windows:

if(WIN32)
SET(OPENEXR_ROOT "C:/Deploy" CACHE STRING "Path to the OpenEXR \"Deploy\" folder")
if(CMAKE_CL_64)
SET(OPENEXR_LIBSEARCH_SUFFIXES x64/Release x64 x64/Debug)
elseif(MSVC)
SET(OPENEXR_LIBSEARCH_SUFFIXES Win32/Release Win32 Win32/Debug)
endif()
else()
set(OPENEXR_ROOT "")
endif()

It would be great if it could also be a cache variable for other platforms, we can keep the default to "", as it is being set to now.

The second thing that would be required is to change the following blob:

SET(LIBRARY_PATHS
/usr/lib
/usr/local/lib
/sw/lib
/opt/local/lib
"${ProgramFiles_ENV_PATH}/OpenEXR/lib/static"
"${OPENEXR_ROOT}/lib")

to

SET(LIBRARY_PATHS
"${OPENEXR_ROOT}/lib"
/usr/lib
/usr/local/lib
/sw/lib
/opt/local/lib
"${ProgramFiles_ENV_PATH}/OpenEXR/lib/static")

i.e. if we explicitly define OPENEXR_ROOT then we would expect to search that location first before any system installed versions. This is in particular important for use with package managers (which is where I ran into the problem).

If there are problems using that OPENEXR_ROOT for whatever reason, maybe it would be OK to use a new variable instead e.g. OPENEXR_USER_ROOT, which could default?
Issue 1:
When running Flutter on desktop (desktop embedder), hitting the Enter key while editing a TextField doesn't call onSubmitted or onEditingComplete. This only happens on iOS and Android simulators.

Issue 2:
Enter key blurs the field, which is unexpected. It essentially maps to the "done" key on the android keyboard which hides the keyboard, but that seems wrong when using a physical keyboard. We should seek UX guidance on what the right behavior is here.
Issue 1:
I'm working on a library using TypeScript called monapt. I have a grunt task to compile multiple files and concatenate them together. However, the output definition has some potential downsides. (I can't remember exactly what they are at the moment, but hopefully someone else can shed some light on this)

Here is a common manual fix I need to do every time before release: jklmli/monapt@0da8b09

Issue 2:
Tried using allowJs with a minified version of google analytics and ran into some duplicate identifier errors. Cut down testcase:

function bar(a) {
if (a)
this.x = 1;
else
this.x = 1;

// This also fails and is closer to the actual minified GA version.
// a ? (this.x = 1) : (this.x = 1);
}

tsc --allowJs pretty.js --out foo.js
pretty.js(3,5): error TS2300: Duplicate identifier 'x'.
pretty.js(5,5): error TS2300: Duplicate identifier 'x'.
Issue 1:
Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04.5 LTS - docker images tensorflow/tensorflow:latest and tensorflow/devel

Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: -

TensorFlow installed from (source or binary): source

TensorFlow version: commit a2bb5db

Python version: Python 2.7.12

Installed using virtualenv? pip? conda?: sources

Bazel version (if compiling from source): 0.19.2

GCC/Compiler version (if compiling from source): gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609

CUDA/cuDNN version: -

GPU model and memory: -

Describe the problem

Some of the tests don't compile because of the incorrect order of parameters and cause the following error:

sorry, unimplemented: non-trivial designated initializers not supported

Problem is caused by the order in designated initializer which is different from the order in struct.

How should be tensorflow tested so that this test passes? It even doesn't pass on official Google tensorflow images.

Provide the exact sequence of commands / steps that you executed before running into the problem

bazel test --config=opt --test_size_filters=small,medium -- tensorflow/lite/toco/tflite:operator_test

Any other info / logs

Issue 2:
Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04.1 LTS

Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:

TensorFlow installed from (source or binary): source

TensorFlow version: commit a2bb5db

Python version: 2.7.15rc1

Installed using virtualenv? pip? conda?: sources

Bazel version (if compiling from source): 0.20.0

GCC/Compiler version (if compiling from source): gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0

CUDA/cuDNN version: -

GPU model and memory: -

Describe the problem

During compilation I get an error: sorry, unimplemented: non-trivial designated initializers not supported.

It can be solved by setting all function pointers to null and applying initialization in order as in the struct defintion.

Provide the exact sequence of commands / steps that you executed before running into the problem

bazel test --verbose_failures tensorflow/lite/delegates/nnapi:nnapi_delegate

Any other info / logs

I attach diff which fixes this error for me.

diff.txt
Issue 1:
Environment

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Windows Terminal version (if applicable):

Any other software?

Steps to reproduce

Expected behavior

Actual behavior

Issue 2:
Environment

Windows build number: Version 10.0.18362.239
Windows Terminal version (if applicable):0.2.1831.0

Symfony 4.3

Steps to reproduce

Render a block with background color after the text. The used command is from Symfony 4.3. I can provide instructions or find the exact control codes that were used if needed.

Expected behavior

A solid block of background color. The screenshot is from cmd.

Actual behavior

The background color ends after the text.
Issue 1:
This is a somewhat cosmetic/quality of life issue, but I found the compiler error in this particular case could have been much more helpful.

TypeScript Version: 1.8.9

Code

interface A { }
class B extends A { }

Expected behavior: An error alluding to the fact that A cannot be extended because it is an interface.

Actual behavior:

a.ts(2,17): error TS2304: Cannot find name 'A'.

Issue 2:
TypeScript Version:

1.8.7

Code

tsconfig.json

{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"declaration": true
},
"files": [
"main.ts",
"mytypes.ts"
]
}

main.ts

import {MyClassAlias} from './mytypes';

let a: MyClassAlias = new MyClassAlias();

mytypes.ts

export class MyClass {
public a: number;
}

export type MyClassAlias = MyClass;

Expected behavior:

Object created using alias type.

Actual behavior:

Compilation error:

main.ts(3,27): error TS2304: Cannot find name 'MyClassAlias'.

in vscode (0.10.11) syntax is marked as error as well:

but IntelliSense seems to work: