WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Do you want to request a feature or report a bug?

Bug

What is the current behavior?

When I upgraded Webpack from 3 to 4 I'v got strange output in dev mode:

vue__WEBPACK_IMPORTED_MODULE_0__["default"]vue__WEBPACK_IMPORTED_MODULE_1__["default"].config.performance = "development""development" !== 'production'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

SyntaxError: Unexpected identifier

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

Here is config:

const path = require('path'),
webpack = require('webpack'),
VueSSRServerPlugin = require('vue-server-renderer/server-plugin'),
CopyWebpackPlugin = require('copy-webpack-plugin')

module.exports = {
mode: 'development',

entry: path.resolve(__dirname, './js/entry-server.js'),

output: {
path: path.resolve(__dirname, '../dist/server'),
libraryTarget: 'commonjs2',
filename: 'ssr-bundle.js'
},

target: 'node',

module: {
rules: [
{
test: /\.vue?$/,
loader: 'vue-loader'
}
]
},

plugins: [
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new webpack.DefinePlugin({
'API_PATH': '"http://192.168.1.8:3001/api/"'
}),
new VueSSRServerPlugin(),
new CopyWebpackPlugin([{from: './js/server'}])
],

performance: {
maxEntrypointSize: 400000,
assetFilter: assetFilename => assetFilename.endsWith('.js')
},

devtool: false
}

Here is part of code:

import Vue from 'vue'
Vue.config.performance = process.env.NODE_ENV !== 'production'

What is the expected behavior?

Output must be correсt without strange duplication.

If this is a feature request, what is motivation or use case for changing the behavior?

N/A

Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.

Win 7 x64

Node 9.7.1

Webpack 4.1

Issue 2:
I am working on a loader for OJ that compiles .oj files to JS. So far, this works very nicely especially since the compiler doesn't mind an async loader.

There is one catch that I came across that is making things a bit complicated_

When I inject the runtime via the following header:

var header = [
"var oj = require('!!ojc/src/runtime');",
"global.oj = global['$oj_oj'] = oj;"
].join("\n");

I get back a snippet in my output file that looks like:

/***/ function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {
// Within here we have the runtime. Runtime calls itself like:
;(function(){ /* snip */ }).call(this);
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ }

The problem with this injection is, that exports is transformed into the this of the function - and further, that internal function calls its first argument global, effectively shaddowing the real global (window in a browser). And I can't quite recognize what (function() { return this; }()) will return... and I doubt it's the real global, which is mandatory.

My questions are:

How do I properly inject this runtime?

Is there a way to only inject my header once into the global space? As in, reducing the duplication of code. $oj_oj is expected to keep its state, so I only want to assign it once, and only once.

Kind regards, Ingwie!
Issue 1:
It would be nice to be able to use the minhash token filter, using minHash token filter added to Lucene.

The minhash algorithm implements locality-sensitive hashing. Basically, every token is hashed into a hash table. The hash table is then sampled to generate a smaller set of representative tokens.

This has several applications

Dimensionality reduction that preserves information that can be used in similarity calculations. For example, efficient deduplication over large sets of text, more like this, etc.

Issue 2:
See elasticsearch-cloud-aws PR 118 from @NicolasTr

elastic/elasticsearch-cloud-aws#118
Issue 1:
This surfaces the discussion in #5216. Here are some precision differences than @JPFrancoia and I are looking at:

import numpy as np
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from sklearn.utils.testing import assert_array_almost_equal

state = np.random.RandomState(0)
X = state.normal(loc=0, scale=100, size=(40, 20))
y = state.randint(0, 3, size=(40, 1))

# Train the LDA classifier. Use the eigen solver
lda_eigen = LDA(solver='eigen', n_components=5)
lda_eigen.fit(X, y)

lda_svd = LDA(n_components=5, solver='svd')
lda_svd.fit(X, y)
assert_array_almost_equal(lda_eigen.explained_variance_ratio_, lda_svd.explained_variance_ratio_)

AssertionError:
Arrays are not almost equal to 6 decimals

(shapes (20,), (3,) mismatch)
x: array([ 6.03795532e-01, 3.96204468e-01, 5.85621882e-16,
3.18609950e-16, 2.08378911e-16, 1.21510637e-16,
7.83079028e-17, 7.58612317e-17, 3.89040436e-17,...
y: array([ 5.52469269e-01, 4.47530731e-01, 7.08925911e-17])

Besides the fact that lda_eigen has the wrong number of components for the explained_variance_ratio_ (according to the docs, it should have only n_components=5), there are numeric differences as well.

Issue 2:
The docs say that LDA.explained_variance_ratio_ should have only n_components_. But it doesn't.

It looks like this bug only exists when we use the eigen solver, not the svd solver.

>>> import numpy as np
>>> from sklearn.lda import LDA
>>> from sklearn.utils.testing import assert_equal
>>>
>>> state = np.random.RandomState(0)
>>> X = state.normal(loc=0, scale=100, size=(40, 20))
>>> y = state.randint(0, 3, size=(40, 1))
>>>
>>> # Train the LDA classifier. Use the eigen solver
>>> lda_eigen = LDA(solver='eigen', n_components=5)
>>> lda_eigen.fit(X, y)
>>> assert_equal(lda_eigen.explained_variance_ratio_.shape, (5,))
AssertionError: Tuples differ: (20,) != (5,)

First differing element 0:
20
5

- (20,)
+ (5,)

Looks like we fix either the docs or the code. Which one?

Pinging @JPFrancoia.

Addresses an issue in #6031.
Issue 1:
Electron version: v1.8.2-beta.4

Operating system: Windows 7 Ultimate x64

Expected behavior

Enter the command and its execution

Actual behavior

the electron crash when I start enter the command

How to reproduce

open developer tools

open console

try to enter any character (and you will get a crash)

Issue 2:
Electron version: 1.8.2-beta.3

Operating system: Windows_NT 10.0.15063

Expected behavior

When devtools are open I should be able to type directly into the console.

Actual behavior

When you type into the console in devtools it crashes the electron app without showing any errors.

How to reproduce

git clone https://github.com/electron/electron-api-demos.git
cd electron-api-demos
npm install --save-dev electron@1.8.2-beta.3
npm install
npm start

When the electron window opens, go to View menu, then Toggle Developer Tools option.

Go to Console tab.

Click into the console by the > and start typing anything.
Issue 1:
Q
A

Bug report?
no

Feature request?
no

BC Break report?
no

RFC?
no

Symfony version
3.3.5

We have a custom user provider created based on this documentation and a custom authenticator based on this documentation. Furthermore we trigger the firewall ourselves during our routing, because we have dynamic firewalls depending on dynamic page paths and settings.

Now with cookie based session authentication, the ContextListener calls refreshUser() on the provider.

The token is still not authenticated here. Only a first authorization request such as configured access directives on the route or a call to isGranted() will cause the token to be authenticated, which is fine, we can still manually authenticate the token if need be.

However, upon authentication the authenticator will call loadUserByUsername(), loading the user again, despite the refreshUser() before.

What is the intended workflow here? Is the documentation faulty? Should the authenticator not load the user again? Or should the ContextListener not refresh the user? Because right now the only thing the refresh does is finding out if the user was deleted, but all the other checks, like the user's isActive-flag, are only checked during authentication. Maybe the ContextListener should immediately authenticate the user?

Issue 2:
$in = <<<EOF
a:
b: 5
b: 6
EOF;
var_dump(\Symfony\Component\Yaml\Yaml::parse($in));

will give that a[b] = 5 instead of complaining b was defined twice.
Issue 1:
I tried writing tarai function with Rust, version info is:

$ rustc --version
rustc 1.0.0-dev (3d5fbae33 2015-01-13 01:08:03 +0000)

written code is:

#![feature(unboxed_closures)]

fn tarai<F:Fn() -> i32>(x:i32, y:i32, z:F) -> i32 {
if x <= y {
y
}
else {
let fz = z();
let nx = tarai(x - 1, y, z);
let ny = tarai(y - 1, fz, |&:| { x });
let nz = |&:| { tarai(fz - 1, x, |&:| { y }) };

tarai(nx, ny, nz)
}
}

fn main() {
println!("{}", tarai(12, 6, |&:| { 0 }));
}

but compiling this code, occurs an error like this:

$ rustc ./21-161505.rs
21-161505.rs:3:1: 15:2 error: reached the recursion limit during monomorphization
21-161505.rs:3 fn tarai<F:Fn() -> i32>(x:i32, y:i32, z:F) -> i32 {
21-161505.rs:4 if x <= y {
21-161505.rs:5 y
21-161505.rs:6 }
21-161505.rs:7 else {
21-161505.rs:8 let fz = z();
...

Why my code is wrong? And what should I do for pass compiling without errors?

Please show me these. Sorry for poor my english. Thank you.

Issue 2:
Came up with this issue while "unboxing" the collections::trie::map::InternalNode::each_reverse method.

Reduced test case

#![feature(unboxed_closures)]

struct Struct;

impl Struct {
fn method_ok(&self, f: |()| -> bool) -> bool {
self.method_ok(|t| f(t))
}

fn method_bad<F>(&self, f: F) -> bool where F: Fn(()) -> bool {
self.method_bad(|t| f(t))
}

fn method_bad2<F>(&self, f: F) -> bool where F: Fn(()) -> bool {
let f: &Fn(()) -> bool = &f;

self.method_bad2(|t| f.call((t,)))
}
}

fn main() {
Struct.method_ok(|_| true);
// Pick one
Struct.method_bad(|_| true);
//Struct.method_bad2(|_| true);
}

Output

limit.rs:10:5: 12:6 error: reached the recursion limit during monomorphization
limit.rs:10 fn method_bad<F>(&self, f: F) -> bool where F: Fn(()) -> bool {
limit.rs:11 self.method_bad(|t| f(t))
limit.rs:12 }

Version

rustc 0.13.0-dev (d9c7c00b9 2014-12-04 21:33:07 +0000)

cc @nikomatsakis (you already know, but I want to keep track of the issue)
Issue 1:
I couldn't find anything like this which would have removed the need for parsing some text in my extension.

https://atom.io/docs/api/v1.1.0/ScopeDescriptor

Issue 2:
From @billti on November 1, 2015 6:10

The API call document.getWordRangeAtPosition(position) appears to use its own definition of a word. For example, my tmLanguage defines attrib-name as a token/scope, yet getWordRangeAtPosition appears to break this into 2 words on the - character.

How can I get token ranges at a position based on my custom syntax? (And it would be really useful if I could get the scope name that goes along with it too).

Copied from original issue: Microsoft/vscode-extensionbuilders#76
Issue 1:
Question

Which version of Sharding-Jdbc do you using?（您使用的Sharding-Jdbc版本为？）

sharding-jdbc-spring-boot-starter:3.1.0

springboot: 2.1.1.release

druid-spring-boot-starter:1.1.10

mybatis-spring-boot-starter:1.3.2

Expected behavior （您预期的结果是）

正常运行

Actual behavior （实际运行的结果是）

The bean 'dataSource', defined duplicate.

Steps to reproduce the behavior （可重现问题的操作步骤）

APPLICATION FAILED TO START

Description:

The bean 'dataSource', defined in class path resource [io/shardingsphere/shardingjdbc/spring/boot/SpringBootConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class] and overriding is disabled.

Issue 2:
使用python sqlalchemy ，在创建连接中，必须添加autocommit参数，否则在进行连接中便会报错：

报错提示（4.1.0）：

这个问题在 sharding-porxy 4.1.1 or sharding-porxy 5.0.0 版本都会出现

另外，即使添加了这个参数，不用报错了，但是在 commit 之前使用 session.flush() 预提交数据时，便已经提交数据保存了，之后不管是 rollback还是 commit都无效：
Issue 1:
I raised this against VS Code, but they advise it's Electron's doing. When I go to select a debug session and there are several, the dropdown menu grows upwards but there's limited space on the screen so it ends up being quite difficult to use.

Electron Version: 1.7.12

Operating System (Platform and Version): macOS High Seirra

Last known working Electron version: Unknown

Expected Behavior

Drop-down lists near the edge of the screen should expand away from the edge of the screen.

Actual behavior

Drop-down renders upwards when at the top of the screen, making a tiny scrollable menu.

To Reproduce

Open VS Code; and start several debugging sessions, then open the drop-down that lets you select between them.

Screenshots

Issue 2:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Electron Version

12.0.0

What operating system are you using?

Windows

Operating System Version

Windows 10

What arch are you using?

x64

Last Known Working Electron version

12.0.0

Expected Behavior

Electron version: 12.0.0

Problem: Need to disable new windows popup, for this use the event and its working but this is deprecated in Electron 12.0

win.webContents.on('new-window'', event => {
event.preventDefault()
})

So instead of above used the suggested alternative handler but this is not getting called during new windows open or mouse mid click.

win.webContents.setWindowOpenHandler(() => {
return { action: 'deny' };
});

Expected behavior: On mouse mid click new windows creation should prevented.

Actual Behavior

Actual : New window opens on mouse windows click.

Testcase Gist URL

No response
Issue 1:
Apologies if this is a duplicate of an existing issue, but I haven't been able to find an answer to this specific issue. I note however #2839

A summary of the config/setup for our app:

TypeScript v1.7.0-dev.20150827

tsd v0.6.4-beta

tsconfig.json:

{
"compilerOptions": {
"target": "es5",
"module": "system",
"declaration": false,
"noImplicitAny": true,
"removeComments": false,
"noLib": false,
"sourceMap": true,
"jsx": "react"
}
}

Our app depends on bootstrap-slider; as you can see this type definition does not define a module. Instead it 'extends' jquery in what I understand is the usual way for JQuery components. Via tsd our app defines a tsd.d.ts file that references the bootstrap-slider and jquery type definitions, amongst others.

Now consider a .tsx file where we define a React component that wraps bootstrap-slider. This .tsx file references the tsd.d.ts definition.

jquery declares $, hence there is no need to import jquery. Nor is there a need to import bootstrap-slider from a typing perspective because we will reference everything we need via jquery's $ (indeed to try and do so would fail because there is no module by the name of "bootstrap-slider" defined)

However, this now presents a problem because nowhere in our application are we declaring via an import a dependency on bootstrap-slider. The generated code (target ES5, module SystemJS) does not include a reference to bootstrap-slider and hence the relevant JS files are not loaded at runtime.

What is the recommended solution in this situation?

Should the bootstrap-slider type definition include a module definition for exactly this reason?

Or are we missing a more obvious solution?

Thanks

Issue 2:
In a .d.ts file, I have the following:

import * as interfaces from './interfaces';

declare module sequelize {
export import Promise = interfaces.Promise;
}
declare var sequelize: interfaces.Static;

export = sequelize;

I'm getting an error saying "duplicate identifier 'sequelize'".

I think this might not be the best way of doing things, but I couldn't find any other way.

What I want to achieve is exporting the sequelize variable using export = syntax while also exporting some interfaces using declare module.

If I do this instead it works fine:

import * as interfaces from './interfaces';

declare module sequelize {
type Promise<T> = interfaces.Promise<T>;
}
declare var sequelize: interfaces.Static;

export = sequelize;

but I don't want to use types because you cannot extend a type. another option is:

import * as interfaces from './interfaces';

declare module sequelize {
interface Promise<T> extends interfaces.Promise<T> {}
}
declare var sequelize: interfaces.Static;

export = sequelize;

which works fine but is very confusing. Is there a better way to achieve this?

On a side note, it's very confusing to me how there are two types of modules. The one with exports and the one that's a namespace.

A better title for this issue is probably cannot re-export interfaces in declare module without switching its type to object
Issue 1:
Apologies is this is a dupe - I searched a number of different ways and couldn't fine anything existing. Obviously, I'd be surprised if this hasn't come up somewhere before.

Default syntax highlighting, and setting syntax highlighting for files without a default works great in Atom - except for one significant thing: if Atom doesn't have a syntax highlighting match for your filetype, then you have to set it manually ever time you open a file of that type.

That gets quite cumbersome when, for example, you're working with a repo filled entirely with .liquid files.

Other editors, like Sublime, handle this by offering an option to Open all with current extension as... which lets you set a default syntax for all files with that extension.

Since we're not offering a place to set filetype in the menubar (and certainly not suggesting we should; setting from command palette is ✨), one simple way to expose this could be to add an option to the command palette list for syntax options for set all as this type.

Issue 2:
Several halp issues about people wanting to add extensions to language plugins.

Currently they have to fork the package to do this, might be nice to support this through the config.
Issue 1:
I can't found DatePicker after install material-ui

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

I'm using Material-ui for web _ ver 1.0.0-beta.4

Issue 2:
Here small button is small.

But here it looks like a medium size button.

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

Expected Behavior

Button with size="small" looks smaller then medium size button, independently by content inside.

Current Behavior

It looks almost like medium size button.
Issue 1:
Creating a model in Three.js/editor and exporting with roughness or metal maps to GLB or GLTF will not export the rough/metal maps whether they are combined as a single file AO/Rough/Metal RGB or as individual images.

I'm trying to apply these images in the Editor and export them as a gltf file. However when the exporter ignores them because it says they are not the same image (even though they are in the case of a hand merged file.

When I reimport the glb in the editor the images are not their, but if I exported the AO map (same image) it is exported.

Is there a way to check that the user is trying to apply a merged image or the same image and go ahead and export the metal roughness maps?

here is a shot of the editor before export...

And here is a shot after import with a console log showing the export problem.

Three.js version

version r.96

Browser

Chrome

OS

Windows 10

Issue 2:
It would be nice if the TransformControls had optional constraints (minimum, maximum) for each axis. It would be also nice if some gizmo definitions/helpers could be enabled/disabled.

The example below shows a max scale constraint for all axes and most of the gizmo definitions/helpers disabled.
Issue 1:
🚀 Feature

Per @pritamdamania87's comment on #30020, we can have duplicated code in the shutdown implementation of different RPC backends. We should unify this code in RpcAgent's shutdown function, and then each backend can have a shutdownImpl for their custom shutdown implementation details.

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @rohan-varma @xush6528

Issue 2:
Hi guys:

I have build a seq2seq model using nn.LSTMCELL in it. And I want to export a trained one to onnx form. However, when I do this, I have an error says:

UserWarning: ONNX export failed on ATen operator _thnn_fused_lstm_cell because torch.onnx.symbolic_opset9._thnn_fused_lstm_cell does not exist
.format(op_name, opset_version, op_name))

I think this maybe due to the opset nort supporting nn.LSTMCELL.

Any one could help and share some advice?

Thank you！

cc @albanD @mruberry @houseroad @spandantiwari @lara-hdr @BowenBao @neginraoof @zou3519
Issue 1:
This issue formalizes @pcwalton's RFC on the mailing list. This was also discussed in the 2013-05-14 meeting and in #6087. Steps towards this have already been made in #6462.

Whilst this is not a high priority change at the moment (understandably there are far bigger fish to fry), this is a semi-common question on the IRC and I think it's good if we have some place to redirect questions to.

Instead of the current:

Real::pi::<float>()

this change would allow you to do:

float::pi()

or

type T = float;
T::pi()

This could also allow for neat things like a generic SizeOf trait: T::size_of(), which is far nicer than the current size_of::<T>(). Or maybe there could be an Init trait for default initializers: T::init().

Issue 2:
I get an internal compiler error on the input detailed below.

I tried this code:

struct B;

impl B {
fn func(&self) { }
}

fn main() {
let x:&fn(&B) = &B::func;
}

I expected to see this happen: Maybe it should work like let x = &B::func, but I'm guessing that I have some error here. I get an error message when I try a variant of the above;

fn main() {
let y = &B::func;
let z:&fn(&B) = y;
}

This gives me the compile time error:

bug.rs:10:18: 10:19 error: mismatched types:
expected `&fn(&B)`,
found `&fn(&B) {B::func}`
(expected fn pointer,
found fn item) [E0308]
bug.rs:10 let z:&fn(&B) = y;
^
error: aborting due to previous error

Instead, this happened:

error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'path not fully resolved: PathResolution { base_def: DefTy(DefId { krate: 0, node: 4 }, false), last_private: LastMod(AllPublic), depth: 1 }', /build/buildd/rust-nightly-201504110408~93f7fe3~utopic/src/librustc/middle/def.rs:80

Meta

rustc --version --verbose:

rustc 1.0.0-dev (built 2015-04-11)
binary: rustc
commit-hash: unknown
commit-date: unknown
build-date: 2015-04-11
host: x86_64-unknown-linux-gnu
release: 1.0.0-dev

From the rust-nightly package here: https://launchpad.net/~hansjorg/+archive/ubuntu/rust

Backtrace:

Running RUST_BACKTRACE=1 rustc bug.rs gives me only this output:

Illegal instruction
Issue 1:
Hi,

I see the atom helper process not responding in my activity monitor. When I quit the process atom crashes with the attached error message. If I click 'reload' from that button I see a blank atom window.

Issue 2:
Looking at activity monitor, I always get a Atom Helper (Not Responding), even if I start atom in safe mode.

I'm on OSX mavericks and atom 0.138.0. I noticed this at least a few versions back too.