WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Electron version: 1.7.8 - 6.0.0-beta.2

Operating system: Windows 7 / Windows 10

Preconditions

Window is frameless

Window has own "-webkit-app-region: drag" element that is styled to change its color when hovered

Expected behavior

Mouse is moved over "-webkit-app-region: drag" element

"-webkit-app-region: drag" element changes its color as styled

Actual behavior

Mouse is moved over "-webkit-app-region: drag" element

"-webkit-app-region: drag" element remains visibly unchanged

How to reproduce

git clone -b webkit-app-region-drag-swallows-mouse-events-bug https://github.com/christian-judt/electron-quick-start.git
cd electron-quick-start
npm install
npm start

Maybe related issues

mouseleave event isn't fired when moving the mouse outside the window (Windows) #611

-webkit-app-region drag disables parts of UI and doesn't act like normal HTML #741

-webkit-app-region: drag eats all click events #1354

App-region: drag on Windows 10, blocking events #7107

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 an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

v8.1.1

Operating System:

macOS 10.15.3

Last Known Working Electron version:

1.8.4

Expected Behavior

The window should be draggable by clicking on elements styled with -webkit-app-region: drag;.

Actual Behavior

The window does not move when clicking and dragging on elements styled with -webkit-app-region: drag;.

To Reproduce

This bug can be reproduced very easily using the most minimal of examples. See code below:

index.js

var {app, BrowserWindow} = require('electron');
var mainWindow = null;

app.whenReady().then( function() {
mainWindow = new BrowserWindow({
width: 800,
height: 600
});
mainWindow.loadFile('index.html');
} );

index.html

<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
</head>
<body style="-webkit-app-region: drag; -webkit-user-select: none;">
<h1>Hello World!</h1>
</body>
</html>

Run this example and you will see the window cannot be dragged by clicking inside the content, even though the entire body is styled with -webkit-app-region: drag;.

Screenshots

None needed.

Additional Information

This bug is related to, but not a duplicate of, the following:

#21621 (talking about BrowserView specifically)

#22474 (says "cannot resize" but I think they mean move / drag)
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I should be able to edit the values of inputs inside of a modal.

Current Behavior

The input receives focus however, I am unable to edit the contents

Steps to Reproduce (for bugs)

Demo: https://codesandbox.io/s/73rov1z63j

Add an Input to a Modal

Open the Modal and try to edit the contents of said Input...

Context

Your Environment

Tech
Version

Material-UI
1.0.0-beta.27

React
16.2.0

browser
Chrome 63.0.3239.132

Issue 2:
We discussed this already in chat with @nathanmarks. I thought it would be good to have a public discussion on this. My idea is to have a component property variant which can be used to define a styling variation.

In case of a Button, raised or primary state can be implemented over a variant internally (and stay backwards compatible) as well.

This opens a door for different use cases, where you have a button but slightly changed, for e.g. with a different color or without a border or anything else. Using a theme user can define a custom variation and pass the variant over the props.

Example

const theme = createMuiTheme({
Button: {
variants: {
special: {
root: {
borderRadius: 0
}
}
}
}
})

<ThemeProvider theme={theme}>
<Button variant="special">Special Button</Button>
</themeProvider>
Issue 1:
see SO here

These are naturally duplicated indexes. These are handled in the underyling code using a pretty inefficient method of indexing.

import pandas as pd
import numpy as np
import string

np.random.seed(1234)
df = pd.DataFrame({'categories': np.tile(np.random.choice(list(string.ascii_letters), 100000), 100),
'values': np.tile(np.random.choice([0,1], 100000), 100)})
df['categories'] = df['categories'].astype('category')

# using the group indexer
In [63]: %timeit -n 3 -r 1 df.take(np.sort(np.concatenate([v for k, v in df.groupby('categories').indices.items() if k in string.ascii_lowercase])))
361 ms +- 0 ns per loop (mean +- std. dev. of 1 run, 3 loops each)

# direct map
In [51]: %timeit -n 3 -r 1 df[df.categories.map(lambda x: x in string.ascii_lowercase)]
625 ms +- 0 ns per loop (mean +- std. dev. of 1 run, 3 loops each)

# isin
In [52]: %timeit -n 3 -r 1 df[df['categories'].isin(list(string.ascii_lowercase))]
456 ms +- 0 ns per loop (mean +- std. dev. of 1 run, 3 loops each)

# groupby with filter
In [53]: %timeit -n 3 -r 1 df.groupby('categories', as_index=False).filter(lambda x: x.name in string.ascii_lowercase)
1.1 s +- 0 ns per loop (mean +- std. dev. of 1 run, 3 loops each)

# loc (fixme!)
In [54]: %timeit -n 3 -r 1 df.set_index('categories').reindex(list(string.ascii_lowercase)).reset_index()
15.4 s +- 0 ns per loop (mean +- std. dev. of 1 run, 3 loops each)

Issue 2:
there’s no way to drop rows with duplicated index using drop_duplicates.

we’d have to add a copy of the index as column, or do this:

df[np.logical_not(df.index.duplicated(take_last=True).values)]
Issue 1:
I want to reuse the previous version image for place holder how can i achieve this?

Issue 2:
I have one ImageView and a button which, when pressed, loads new image (from disk, not from network) into the same ImageView. Unfortunately it causes the first image to disappear for a second (showing white background) and then it loads the new image. How can I avoid that?

I tried:

Glide.with(this).load(photoToLoad.getPath()).dontAnimate().dontTransform().into(imageView);

But the "blinking" still exists.

The only solution I can think of is using two ImageViews with load listeners and showing/hiding them once the new image is loaded.

Is there any better way to do this?
Issue 1:
Repro script:

# run in npm/cli repo
set -x
rm -rf node_modules package-lock.json
git checkout node_modules
rm node_modules/.gitignore node_modules/.package-lock.json
node . i --no-audit --ignore-scripts
node . ls @babel/core # apparently ok, only bundled under tap
rm node_modules/.package-lock.json # remove the hidden lockfile
node . ls @babel/core # ohno! babel cores all over the place!

Why is the hidden lockfile being respected, when there are clearly package folders not found in its list?

Why is Arborist installing @babel/core v7.11 when the only thing depending on it has a copy from the bundle?

Issue 2:
Original bug ticket: [https://npm.community/t/9499](https://npm.community/t/9499)
Originally filed: 2019-08-15T18:59:34.080Z

From original issue: https://npm.community/t/9499

Debug log: n/a

Action triggered: npm install

Platform Info:

$ npm --versions
{
npm: '6.10.2',
ares: '1.15.0',
brotli: '1.0.7',
cldr: '35.1',
http_parser: '2.8.0',
icu: '64.2',
llhttp: '1.1.4',
modules: '72',
napi: '4',
nghttp2: '1.39.1',
node: '12.8.0',
openssl: '1.1.1c',
tz: '2019a',
unicode: '12.1',
uv: '1.30.1',
v8: '7.5.288.22-node.16',
zlib: '1.2.11'
}
$ node -p process.platform
win32

Additional information:

Seems related, but signs of integrity error are present (which could be root cause)
Issue 1:
Toastr is a simple but powerfull javascript library for displaying "Toast" message

See here: http://codeseven.github.com/toastr/

I'm not related in any way with toastr development, but actually it's not simple to use it while using bootstrap :(

Issue 2:
I know this is in the roadmap so just wanted to share some working code here even though it's not really in a point where I could commit a pull request as we are actively developing this functionality:

bootstrap.growl.js

!function( $ ) {
$.fn.growl = function ( flash, params ) {
var growl = this
, params = params || {}
, type = params.text ? 'text' : 'html'
, text = growl.children('p').find('.text')
, label = growl.children('p').find('.label')
, timeout = params.timeout || 5000
;

function set_msg(severity,css,msg){
label[type](severity);
label.removeClass('important notice warning new');
label.addClass(css);
text[type](msg);
}

if(flash.error || flash.notice || flash.warning) {
if (flash.error) { set_msg('Error', 'important', flash.error); }
else if (flash.warning) { set_msg('Warning', 'warning', flash.warning); }
else if (flash.info) { set_msg('Info', 'notice', flash.notice); }
else if (flash.ok) { set_msg('Ok', 'new', flash.ok); }
growl.show('fast');
setTimeout(function() {
growl.hide('slow');
}, timeout);
}
};
}( window.jQuery || window.ender );

Sample CSS

.growl { padding: 10px; position: fixed; top: 5px; left: 50%;
margin-left: -70px; background-color: rgba(0,0,0,0.5); z-index: 10; }
.growl p { color: #fff; margin: 0px;}

Sample HTML

<div id="growl" class="growl round hero-shadow hide">
<p>
<span class="label important">Error</span>
<span class="text">hey</span>
</p>
</div>

Sample Invocation:

$('#growl').growl({error: 'hey'}, {})

Code and stuff is super lame but as said before we are trying to ship product and can't really focus on this right now. But still one could adapt this easily and make it into bootstrap with a decent quality.
Issue 1:
(This seems to have some things in common with #6080 and is strongly related to #1295 as it can be used to provide an alternative solution to it but l opened this separately since I did not feel it was appropriate to continue discussing it there and wanted to approach it in a more generalized way)

This would provide improved type safety for cases where an interface property is referenced through a string having a value that's known at compile time:

type MyType = { "ABC": number };
let x: MyType = { ABC: 42 };

const propName = "ABC"; // 'propName' received the literal type "ABC" (not string)
let y = x[propName]; // 'y' received the type MyType["ABC"] which resolved to 'number'

And with support for generic types added, this could work similarly, but resolve to an intermediate type of the form T[S] where T is an object type and S is a string literal type:

function func<T extends object>() {
let x: T;
const propName = "ABC"; // 'propName' received the literal type "ABC"
let y = x[propName]; // 'y' would receive the type T["ABC"]
}

This could combine with readonly function parameters to provide an alternative solution for #1295 (which was actually where the idea was initially proposed):

function getProperty<T extends object, S extends string>(obj: T, readonly propName: S): T[S] {
return obj[propName];
}

// Here T resolves to { ABC: number }, S resolves to the literal type "ABC",
// and T[S] resolves to number
let x = getProperty({ABC: 42}, "ABC"); // Type of 'x' is number

// Here T resolves to { ABC: number }, S resolves to the literal type "CBA"
// and T[S] resolves to any
let x = getProperty({ABC: 42}, "CBA"); // Type of 'x' is any

// Here T resolves to { ABC: number }, S resolves to string
// and T[S] resolves to any
let x = getProperty({ABC: 42}, getRandomString()); // Type of 'x' is any

This may similarly extend to numeric literal types, for tuples:

type MyTupleType = [number, string, boolean];
let x: MyTupleType;
const index = 1; // 'index' received the literal type 1;

let y = x[index]; // 'y' received the type MyTupleType[1] which resolved to 'string'

And work with generic tuples as well:

function getTupleElement<T extends Array<any>, N extends number>(tuple: T, readonly index: N): T[N] {
return tuple[index];
}

Same can be done with symbol literal types (haven't thought about that much though):

function getSymbolProperty<T extends object, S extends symbol>(obj: T, readonly sym: S): T[S] {
return obj[sym];
}

Issue 2:
Hi,

Constants aren't evaluate to access and cast properly union types values:

const ID = 0;
const NAME = 1;

let data: [number, string] = [0, "bob"];

// This need cast to compile
let id: number = data[ID];
let name: string = data[NAME];

Is there a reason why it's not supported ?

Regards,

Sébastien
Issue 1:
I tried using the @types/angular with @types/angular-mocks package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

Package
Version

typescript
2.4.2

@types/angular
1.6.28

@types/angular-mocks
1.5.10

Hello,

Since I upgraded @types/angular package I have a problem with compilation. I'm getting following error when I try to run the test:

error TS2339: Property 'mock' does not exist on type 'IAngularStatic'.

The problem exists not only with @types/angular-mock but also angular-bootstrap, angular-growl-v2, etc. In short, everything that has an angular. prefix in definition files.

I've found similar issues within this repo's page but none of the solutions or workarounds works.

Issue 2:
I tried using the @types/requirejs package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

I have a question that is inappropriate for StackOverflow.

Authors: @andy-ms @wald-tq @jens-duttke

My index.ts file has following structure after the main code

if( typeof exports === 'object' ) {
module.exports = xyz;
} else if( define.amd ) {
define('a',callback);
}

I need both @ types/requirejs for AMD module and 'define' & also @ types/node otherwise it says cannot find name 'module'. Using both @ types/requirejs and @ types/node gives following errors.

@ types/requirejs Variable 'require' must be of type 'NodeRequire' (Will this be resolved by renaming 'require' in one of them).

Duplicate identifier 'export=' (How do I resolve this ? )

I want to use both types together, so I don't want to use --types tag when compiling, I have also excluded "node_modules" in tsconfig file. I am a newbie in typeScript so this might be a silly question. Please suggest a simple way to solve this.
Issue 1:
Describe the bug

The HTTP adapter does not use caseless comparison before overriding the User-Agent header or deleting the Authorization header.

It also overwrites any provided Content-Length header.

To Reproduce

axios({
method: 'post',
url: 'https://postman-echo.com/post',
auth: {
username: 'janedoe',
password: 's00pers3cret'
},
headers: {
authorization: 'foo',
'Content-Length': 10,
'User-agent': 'bar'
},
data: {
firstName: 'Fred',
lastName: 'Flintstone'
}
})
.then(function (response) {
console.log(response.data);
})
.catch(function (error) {
console.log(error);
});

> { args: {},
data: { firstName: 'Fred', lastName: 'Flintstone' },
files: {},
form: {},
headers:
{ 'x-forwarded-proto': 'https',
host: 'postman-echo.com',
'content-length': '44',
accept: 'application/json, text/plain, */*',
authorization: 'foo',
'content-type': 'application/json;charset=utf-8',
'user-agent': 'axios/0.18.1',
'x-forwarded-port': '443' },
json: { firstName: 'Fred', lastName: 'Flintstone' },
url: 'https://postman-echo.com/post' }

Expected behavior

The server should have received the following headers

'x-forwarded-proto': 'https',
host: 'postman-echo.com',
'content-length': '10', // not '44'
accept: 'application/json, text/plain, */*',
authorization: 'Basic amFuZWRvZTpzMDBwZXJzM2NyZXQ=', // not 'foo'
'content-type': 'application/json;charset=utf-8',
'user-agent': 'bar', // not 'axios/0.18.1'
'x-forwarded-port': '443'

I have a PR ready, but saw you prefer an issue be created first.

Issue 2:
Summary

Headers provided in config are merged with defaults without checking for existing value that can be in different case

i.e. when doing below request we can't predict which value will be set from defaults Accept or from config accept

axios.request(url, {
headers: {
accept: 'some-accept-value'
}
});

Chrome will set Accept, which is not expected

Context

axios version: 0.17.0

Environment: node v9.2.1, chrome 63, macOS
Issue 1:
Currently, rand(1,1e7) fails:

julia> rand(1,1e7)
ERROR: no method rand(Int64,Float64)

Should using FloatingPoints be allowed? Shall it throw InexactError() if round(m)!=m?

Issue 2:
Currently, all matrix constructors only accept integer valued inputs. It should be possible, for example, to do the following:

julia> ones(1e3,1e3)
Issue 1:
I'm submitting a feature request

Webpack version:

2 (and maybe 1 if feasible)

It would be a nice feature for there to be an official API which would enable support for web workers and could be used in a plugin such as webworkify-webpack.

At the moment it looks like webworkify-webpack has to rely on webpack internals which may change in the future.

There is an official webpack loader for web workers but this will result in duplicate code as the webworker code is compiled separately. The webworkify-webpack plugin is nicer because it passes the module code that the webworker entry point needs at runtime, as well as the webpack internals so that the worker can require the modules it needs. This means if the worker code uses moduleA, moduleB and moduleC, and the main application javascript also uses these modules they will only be in the build once. With the official plugin they will be in the build twice (afaik).

Issue 2:
duplicate code in multi chunks and sooooo big common chunk file

Suppose I have a SPA website. And I have a file main.js in which I config the route.

define(function(){
// suppose I define route here
route.when('#/aaa', function(){
// a code split point
require([
'services/A',
'style/a',
'module/a'
])
}).when('#/bbb', function(){
// a code split point
require([
'services/A',
'services/B',
'style/b',
'module/b'
])
}).when('#/ccc', function(){
// a code split point
require([
'services/B',
'serivces/C',
'style/c',
'module/c'
])
}).when('#/ddd', function(){
// a code split point
require([
'services/A',
'serivces/C',
'style/d',
'module/d'
])
})// and has many route configs like this
});

I use webpack to bundle code. My webpack.config.js like this

module.exports = {
entry: {
main: path.resolve(__dirname, 'main.js')
},
output: {
path: path.resolve(__dirname),
filename: 'bundle.js'
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: 'main',
async: true
})
]
}

When I run webpack, various chunks have duplicate services/A services/B etc. code.

This is not I want.

I read webpack docs, and then I add minChunks: 2 option to CommonsChunkPlugin.

Then I run webpack again.

Now, every chunk only have its own code. But I also get a big common chunk file, which include

services/A, services/B, services/C and other shared code between various page file.

When I run these code, in page /aaa, the /aaa's files loaded, and also the big common chunk file.

Now the big problem is, page /aaa doesn't need services/B and services/C code at all, But the common chunk files contains all shared code between various page files. So the common chunk file is so big, and have many unused code.

I know I can set minChunks to bigger number, but in this way, every page file may agagin have duplicate code.

HELP!

Can I have other methods to only load necessary common chunks when route to different page?
Issue 1:
Describe the bug

Not sure if this is a bug but shouldn't RFECV accept a pipeline?

Steps/Code to Reproduce

from imblearn.pipeline import make_pipeline
from imblearn.over_sampling import RandomOverSampler

from sklearn.datasets import load_breast_cancer
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import StratifiedKFold
from sklearn.feature_selection import RFECV
from sklearn.preprocessing import StandardScaler

data = load_breast_cancer()

X = data['data']
y = data['target']

fold = StratifiedKFold()

lr = LogisticRegression()
oversample = RandomOverSampler()
scale = StandardScaler()
pipeline = make_pipeline(oversample, scale, lr)

rfecv = RFECV(estimator=pipeline, step=1, cv=fold, scoring='recall')
rfecv.fit(X, y)

Expected Results

No error is thrown

Actual Results

RuntimeError: The classifier does not expose "coef_" or "feature_importances_" attributes

Versions

Scikit-Learn 0.22

Imbalanced-Learn 0.5.0

Issue 2:
Description

Based on this SO post.

TransformedTargetRegressor is not working with RFECV because coef or feature_importance is not exposed directly in TransformedTargetRegressor.

Steps/Code to Reproduce

from sklearn.datasets import make_friedman1
from sklearn.feature_selection import RFECV
from sklearn.linear_model import LinearRegression
from sklearn.compose import TransformedTargetRegressor

X, y = make_friedman1(n_samples=50, n_features=10, random_state=0)
log_estimator = TransformedTargetRegressor(regressor=LinearRegression(),
func=np.log,
inverse_func=np.exp)

log_selector = RFECV(log_estimator, step=1, cv=5, scoring='r2')
log_seletor = log_selector.fit(X,y)

Expected Results

No error is thrown

Actual Results

RuntimeError: The classifier does not expose "coef_" or "feature_importances_" attributes
Issue 1:
I cannot uninstall or enable this package.

Issue 2:
I just have a problem that when i click disable button and then click the uninstall button on the package and then I think that this package is remove because I can't see it in the package list in the setting.but it not because when i try to reinstall it by searching the package name again ,the uninstall and enable button still show on the package and i can't install it because no install button.Nothing happen when I click that uninstall or enable button.

Thx for help and sorry for my English. :(

I use Windows 8.1
Issue 1:
Since I'm using androidx, I can't implement Glide library and get this error:

Issue 2:
bug如下(bug E.g):文件大小有300M(File size is 300M)

W/Glide: Load failed for http://192.168.1.2/SD/AMBA/190305000/094223AA.MP4 with size [203x130]

class com.bumptech.glide.load.engine.GlideException: Failed to load resource

There was 1 cause:

java.io.FileNotFoundException(No content provider: http://192.168.1.2/SD/AMBA/190305000/094223AA.MP4)

call GlideException#logRootCauses(String) for more detail

Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class android.content.res.AssetFileDescriptor, LOCAL, DataCacheKey{sourceKey=http://192.168.1.2/SD/AMBA/190305000/094223AA.MP4, signature=EmptySignature}

There was 1 cause:

java.io.FileNotFoundException(No content provider: http://192.168.1.2/SD/AMBA/190305000/094223AA.MP4)

call GlideException#logRootCauses(String) for more detail

Cause (1 of 1): class java.io.FileNotFoundException: No content provider: http://192.168.1.2/SD/AMBA/190305000/094223AA.MP4

谁能帮助我解决这个问题?谢谢(Can anyone help me solve this problem? Thank you!)
Issue 1:
Currently, VSCode doesn't show any kind of graphical feedback of where function breakpoints have bound to.

Visual Studio and other IDEs show some graphical feedback to show the function breakpoint has bound to some specific locations / the debugger is in break mode at a particular line because of a function breakpoint.

It would be great for VSCode to support this in the case when debug adapters report the line(s) where the function breakpoint has been bound.

This helps users determine that

there is a breakpoint that will be hit at some locations

a breakpoint has been hit when stopped at a function breakpoint.

@weinand @isidorn

Issue 2:
Testing #2832

I have a breakpoint on if (_key === key) { and I've added a function breakpoint for console.log. The breakpoint for if (_key === key) { is hit, but the console.log near the end is not hit.

I tried clicking Reapply all breakpoints which did not help in this case.

function Safe(_key) {
var _locked = true;
var _value = null;

this.unlock = function(key) {
if (_key === key) {
_locked = false;
}
return;
};

this.lock = function() {
_locked = true;
};

Object.defineProperty(this, 'value', {
get: function() {
if (_locked) {
console.log('thief detected!');
process.exit(0);
}
return _value;
},

set: function(value) {
if (_locked) {
console.log('thief detected!');
process.exit(0);
}
_value = value;
}
});
}

var safe = new Safe('mySecretPassword');

safe.unlock('mySecretPassword');
safe.value = 3;
console.log(safe.value);
safe.lock();