WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I'm submitting a bug report

Webpack version:

1.13.2

Please tell us about your environment:

Windows 7

Current behavior:

For the following code snippet

require.ensure(
['./module'],
(syncedRequire) => {
doSomething(syncedRequire('./module'));
},
'module');

webpack generates this:

__webpack_require__.e/* nsure */(1, function (syncedRequire) {
doSomething(syncedRequire('./module'));
});

This is invalid, because syncedRequire will be the webpack_require function, and that function expects a number instead of a string. For the string it'll fail.

Expected/desired behavior:

One solution is to remove the callback argument that won't be required anyway, if you're implementing the following code:

require.ensure(
['./module'],
() => {
doSomething(require('./module'));
},
'module');

Webpack generates this:

__webpack_require__.e/* nsure */(1, function () {
doSomething(__webpack_require__(2));
});

You can see, the require('./module') call is now compiled into webpack_require(2) and now everything will work correctly.

Other solution is that the callback will receive a function that can handle the string as an input parameter. That means:

__webpack_require__.e/* nsure */(1, function (syncedRequire) {
doSomething(syncedRequire('./module'));
});

in this code webpack has to pass a different function than webpack_require into this callback. So the syncedRequire shouldn't be the webpack_require function. Instead of that it has to be capable to handle the string input parameter.

Browser: [all]

Language: [all]

Feel free to close this bug anyway, if it's fixed in webpack version 2, as the workaround basically just to write require inside the function and not expecting any parameter in the callback function.

So workaround again:

require.ensure(
['./module'],
() => {
doSomething(require('./module'));
},
'module');

Issue 2:
Once i want to develop a custom loader which can receive an JSON options in the query as following:

var urls = JSON.stringify({
value: {
cdnUrl: 'http://xxx.domain.com/imgs/'
}
});

module.exports = {
entry: {
index: path.resolve(__dirname, 'public', 'js', 'index.js')
},
output: {
path: path.resolve(__dirname, '..', '..', '..', '..', 'public', 'build', 'js'),
filename: '[name].bundle.js',
chunkFilename: '[id].bundle.js',
publicPath: '/build/js/'
},
module: {
loaders: [
{
test: /\.scss$/,
loader: 'my-custom-loader?' + urls
}
]
}
};

The thing i found is the this.query always remove one / right after http: from the passed options:

module.exports = function(source) {
'use strict';
this.cacheable && this.cacheable();
console.log(this.query);//?{"value":{"cdnUrl":"http:/xxx.domain.com/imgs/"}}
};

Is this by design?
Issue 1:
Implement Chrome DevTools Protocol for Node-like debug

Issue 2:
// main.ts

import { parse } from "https://deno.land/std/flags/mod.ts"

console.log(parse(Deno.args))

Platform: macos aarch64
Version: 1.25.0
Args: ["deno", "compile", "main.ts"]

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /Users/ib/.cargo/registry/src/github.com-1ecc6299db9ec823/eszip-0.25.0/src/v2.rs:512:60
stack backtrace:
0: _rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::panic
3: eszip::v2::EszipV2::from_graph::visit_module
4: eszip::v2::EszipV2::from_graph::visit_module
5: deno::compile_command::{{closure}}
6: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
7: deno::main::{{closure}}
8: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
9: deno_runtime::tokio_util::run_local
10: deno::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Issue 1:
I just did a pull from the HEAD and using mesos 0.25. To reproduce, I use a very simple guestbook yaml:

apiVersion: v1
kind: Pod
metadata:
name: guestbook
spec:
containers:
- name: redis
image: redis
- name: guestbook
image: google/guestbook-python-redis
ports:
- name: www
containerPort: 80

Creating the pod with kubect create -f guestbook.yaml. After the pod is showing as RUNNING, run kubectl logs -c redis guestbook will result in the following error message:

Error from server: the server could not find the requested resource ( Pod guestbook)

This only seems to impact k8sm setup, and k8s-standalone works as expected.

cc @jdef @sttts

Issue 2:
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.):

What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.):

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

Kubernetes version (use kubectl version):

Environment:

Cloud provider or hardware configuration:

OS (e.g. from /etc/os-release):

Kernel (e.g. uname -a):

Install tools:

Others:

What happened:

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else do we need to know:
Issue 1:
Julia currently links to OpenSSL (via libgit2). However, OpenSSL has a GPL-incompatible license. Since a build of Julia that links to FFTW is under the GPL this is a serious problem.

The only solution that I can think of is to use a different crypto lib (such as Mozilla Network Security Services).

Issue 2:
Inspired by JuliaWeb/Roadmap#5 (comment), I wanted to check here. Since Julia uses libgit2, which is in turn built using OpenSSL, are we OK with using OpenSSL derivatives elsewhere within Julia or are there licensing issues with the dual-licensed OpenSSL stuff?

If there are licensing issues associated with the use of OpenSSL in Julia, does Julia's reliance on libgit2 (and libgit2's reliance on OpenSSL) pose any problem?

(Bottom line: I'd love to be able to use OpenSSL within Julia without having to worry about license restrictions / violations. IANAL. Please tell me how to do this.)
Issue 1:
Challenge Waypoint: Add Different Padding to Each Side of an Element has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0.

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

My code:

<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}

.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
padding-bottom: 20px;
}

.yellow-box {
background-color: yellow;
padding:10px;
}

.red-box {
background-color:red;
padding-top: 40px;
padding-right: 20px;
padding-bottom: 20px;
padding-left: 40px;
}

.green-box {
background-color: green;
padding: 40px 20px 20px 40px;
}
</style>
<h5 class="injected-text">margin</h5>

<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box green-box">padding</h5>
</div>

Issue 2:
Challenge Waypoint: Use Clockwise Notation to Specify the Padding of an Element has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0.

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

My code:

<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}

.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}

.yellow-box {
background-color: yellow;
padding: 20px 40px 20px 40px;
}

.red-box {
background-color:red;
padding: 20px 40px 20px 40px;
}

.green-box {
background-color: green;
padding: 40px 20px 20px 40px;
}
</style>
<h5 class="injected-text">margin</h5>

<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box green-box">padding</h5>
</div>

What am I doing wrong???
Issue 1:
Material-UI provides a way to know the device size and perform rendering based on screen size. However, documentation doesn't detail any way that indicates that Grid is device/screen orientation aware.

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

Expected Behavior

Material UI should expose an attribute within grid content or make a component available to the user that would allow one to know the device orientation. This would allow one to know create a layout based on screen orientation in addition to device size.

Tech
Version

Material-UI
1.0.0-beta.16

React
15.3.0

Issue 2:
Problem description

When I use Grid component, I always see horizontal scrollbar. I found this page on StackOverflow: https://stackoverflow.com/questions/45519275/grid-in-material-ui-causes-horizontal-scroll-react where it is explained more.

Steps to reproduce

import * as ui from 'material-ui';

<ui.Grid container>
<ui.Grid item xs={12}>
content of the cell
</ui.Grid>
</ui.Grid>

Versions

Material-UI: 1.0.0-beta.6

React: 15.6.1

Browser: Google Chrome 60.0.3112.101
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Current Behavior

Steps to Reproduce (for bugs)

Context

Your Environment

Tech
Version

Material-UI

React

browser

etc

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

Expected Behavior

Current Behavior

Steps to Reproduce (for bugs)

Context

Your Environment

Tech
Version

Material-UI

React

browser

etc
Issue 1:
This looks to be an issue introduced in 2.0.

If you look in the 2.0 example below you'll see that the zoom and street view controls become corrupted. When the marker is clicked, the infobox for it is also messed up.

Bootstrap 2.0 - http://jsbin.com/obilec/

No Bootstrap - http://jsbin.com/obilec/2/

Bootstrap 1.4 - http://jsbin.com/obilec/3

Issue 2:
First of all thanks for your fantastic work. It does SAVE me a lot of time.

When I put Google Maps into Bootstrap layout, img tag in Google Maps breaks because Bootstrap set img max-width to 100%. When I comment max-width, it's working find but I'm not sure whether it'll break something else in Bootstrap or not.

Bootstrap and Google Maps

http://jsfiddle.net/jhnRD/1/

Google Maps without Bootstrap

http://jsfiddle.net/aVx8L/

Cheers,
Issue 1:
Ref #22034 (comment), on 0.6 and master I can only produce one deprecation warning per julia session.

master and 0.6-rc2:

julia> f2(x) = 2; f4(x) = 4;

julia> @deprecate f1(x) f2(x);

julia> @deprecate f3(x) f4(x);

julia> f1(1)
WARNING: f1(x) is deprecated, use f2(x) instead.
Stacktrace:
[1] depwarn(::String, ::Symbol) at ./deprecated.jl:64
[2] f1(::Int64) at ./deprecated.jl:51
[3] eval(::Module, ::Any) at ./boot.jl:235
[4] eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:66
[5] macro expansion at ./REPL.jl:97 [inlined]
[6] (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73
while loading no file, in expression starting on line 0
2

julia> f3(1) # why does this not warn?
4

And on 0.5.2:

julia> f2(x) = 2; f4(x) = 4;

julia> @deprecate f1(x) f2(x);

julia> @deprecate f3(x) f4(x);

julia> f1(1)
WARNING: f1(x) is deprecated, use f2(x) instead.
in depwarn(::String, ::Symbol) at ./deprecated.jl:64
in f1(::Int64) at ./deprecated.jl:50
in eval(::Module, ::Any) at ./boot.jl:234
in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:64
in macro expansion at ./REPL.jl:95 [inlined]
in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:68
while loading no file, in expression starting on line 0
2

julia> f3(1)
WARNING: f3(x) is deprecated, use f4(x) instead.
in depwarn(::String, ::Symbol) at ./deprecated.jl:64
in f3(::Int64) at ./deprecated.jl:50
in eval(::Module, ::Any) at ./boot.jl:234
in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:64
in macro expansion at ./REPL.jl:95 [inlined]
in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:68
while loading no file, in expression starting on line 0
4

Seems like a bad bug in these days of new releases and fixing deprecation warnings.

Issue 2:
Referring to the discussion here (https://groups.google.com/forum/#!topic/julia-users/0XTidbuInbQ), launching with small number of workers and small matrix size works fine, but as workers and size of matrix is increased, the code breaks.

test code : https://github.com/kapiliitr/JuliaBenchmarks/blob/master/ptrans.jl

error : https://github.com/kapiliitr/JuliaBenchmarks/blob/master/error.txt

This code has been run using Julia v0.3.1, 0.3.3, v0.4.0-dev+1061.
Issue 1:
Problem description

If you leave a selectField as empty (i.e. value is undefined) it defaults to 0, whereas it used to show an empty selectField.

Steps to reproduce

Create a selectField without a value prop.

Versions

Material-UI: 0.15.3

React: 15.2.1

Browser: Chrome 51

Issue 2:
Problem description

Floating Labels (0.15.3) render like this:

in 0.15.2 they looked like this:

### Steps to reproduce

Go to http://www.material-ui.com/#/components/select-field and go to the Floating Label section.

const items = [
<MenuItem key={1} value={1} primaryText="Never" />,
<MenuItem key={2} value={2} primaryText="Every Night" />,
<MenuItem key={3} value={3} primaryText="Weeknights" />,
<MenuItem key={4} value={4} primaryText="Weekends" />,
<MenuItem key={5} value={5} primaryText="Weekly" />,
];

<SelectField
value={this.state.value}
onChange={this.handleChange}
floatingLabelText="Floating Label Text"
>
{items}
</SelectField>

Versions

Material-UI: 0.15.3

React: 15.3.0

Browser: Chrome
Issue 1:
Only the half of the last line is seen when a horizontal bar is present in the editor.

Tested under Mac OS X 10.9.2, Atom 0.95.0

Issue 2:
As the picture shows, when the line-wrap is toggled it works normally with Latin letters but misbehaves when there are Chinese characters.

I am using Atom 0.108.0(the latest) with Mac OS X 10.9.4.
Issue 1:
Currently multiple assignemnt is supported at declaration like this

let (critPos, period) =
if critPos1 > critPos2 {
(critPos1, period1)
} else {
(critPos2, period2)
};

I think it would be nice to be able do something like this:

// "improved" version of maximal_suffix in src/libcore/str.rs

fn maximal_suffix(arr: &[u8], reversed: bool) -> (uint, uint) {
let mut left = -1; // Corresponds to i in the paper
let mut right = 0; // Corresponds to j in the paper
let mut offset = 1; // Corresponds to k in the paper
let mut period = 1; // Corresponds to p in the paper

while right + offset < arr.len() {
let (a, b) =
if reversed {
(arr[left + offset], arr[right + offset])
} else {
(arr[right + offset], arr[left + offset])
};
// THIS IS THE IMPORTANT PART
(left, right, offset, period) =
if a < b {
// Suffix is smaller, period is entire prefix so far.
(left, right + offset, 1, right - left)
} else if a == b {
// Advance through repetition of the current period.
if offset == period {
(left, right + offset, 1, period)
} else {
(left, right, offset + 1, period)
}
} else {
// Suffix is larger, start over from current location.
(right, right + 1, 1, 1)
};
}
(left + 1, period)
}

Currently something similar is at the moment only possible with a small workaround:

fn maximal_suffix(arr: &[u8], reversed: bool) -> (uint, uint) {
let mut left = -1; // Corresponds to i in the paper
let mut right = 0; // Corresponds to j in the paper
let mut offset = 1; // Corresponds to k in the paper
let mut period = 1; // Corresponds to p in the paper

while right + offset < arr.len() {
let (a, b) =
if reversed {
(arr[left + offset], arr[right + offset])
} else {
(arr[right + offset], arr[left + offset])
};
// HERE I NEED TO INTRODUCE TEMPORARY VARIABLES
let (left_temp, right_temp, offset_temp, period_temp) =
if a < b {
// Suffix is smaller, period is entire prefix so far.
(left, right + offset, 1, right - left)
} else if a == b {
// Advance through repetition of the current period.
if offset == period {
(left, right + offset, 1, period)
} else {
(left, right, offset + 1, period)
}
} else {
// Suffix is larger, start over from current location.
(right, right + 1, 1, 1)
};
// AND NOW I CAN PUT THE VALUES BACK IN THE REAL VARIABLES
left = left_temp;
right = right_temp;
offset = offset_temp;
period = period_temp;
}
(left + 1, period)
}

Issue 2:
How about we add a new command line option to change the entry point from "fn main()" to another?

for example

$ rustc a.rs --entry=myEntry
Issue 1:
Hi guys,

I'm trying to test the performance of my app by using react perf tools. The problem is its not working.

I call

Perf.start()

Perf.stop()

Perf.printWasted()

in the console, which works (no console errors or warnings), but printWasted() always returns empty Array and a message

Total time: 0.00 ms

This also happens for other functions like printInclusive() and printExclusive()

What can be the problem?

P.S I'm using react-router, how is react perf performing with that? Maybe that's causing some issues?

Also, process.env.NODE_ENV is not set to production, and I'm using React 0.13.3

Issue 2:
It would be great if in debug mode react would warn you when you pass in a property on props which is not specified in the propTypes object for that component. i.e. a way to enforce that props should ONLY have the props specified in propTypes and no others.

This would prevent use of undocumented properties and also allow better code maintenance as unused props would be more easily removed.
Issue 1:
Just a remark, though: the default key bindings for "Shrink/expand selection" (Shift+Alt+Left/Right) conflict with a feature that doesn't exist yet, but which I hope will be implemented someday: column selection. In Visual Studio, and many other editors, if you hold Alt at the same time as you change the selection with Shift+arrows, it changes the selection across multiple lines. So Shift+Alt+arrows should be reserved for column selection, unless you plan to never implement this (very useful) feature.

Issue 2:
Please Implement Column Mode selection/editing.

Previously requested here

https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/7761618-implement-column-mode-selection-editing

On Mac preferred shortcut is cmd+option(alt) like Sublime Text does.
Issue 1:
Hi guys. I'm getting really weird behavior in my latest project. I assume it's a bug in React.

I want to override default browser context menu. I subscribed for contextmenu and click events in componentDidMount. On right click (context menu) I want to show my custom div. On left click, this div should hide. In event listeners I do:

onContextMenu = (e) => {
if ((e.target as any).id === CONTEXT_MENU_ID) {
const {offsetX, offsetY} = e
const contextMenu = {
isActive: true,
position: {
x: offsetX,
y: offsetY,
},
}
this.setState({contextMenu})
e.preventDefault()
}
}

onClick = (e) => {
const contextMenu = {
isActive: false,
position: {x: 0, y: 0},
}
this.setState({contextMenu})
}

and in render there's:

{(this.state.contextMenu.isActive) && (
<div className='menu-item noselect'>
<i className='fa fa-plus'/>
<span> Add new note </span>
</div>
)}

I assume everybody can imagine expected behavior. But real behavior is:

right click > context menu shows up > left click > context menu is still there > right click > another context menu shows up... and so on... You can literally see DOM nodes being duplicated in Elements tab in DevTools

You can try it here: https://github.com/jake-daniels/zen-tab

The code is in src/app/controller/NotesBoard.tsx file.

Try npm install npm start, then right/left click somewhere on blue area.

Environment:

MS Windows 8.1 x64

Chrome 63.0.3239.84

React 16.2.0

Issue 2:
I'd like to configure my testsuite to fail if there are any react warnings triggered.

I'm currently using a variant on this SO answer http://stackoverflow.com/questions/29651950/karma-and-react-have-warnings-to-cause-errors

console.warn = (function(warn) {
return function(msg) {

// Detect react warnings & error
if (/^Warning: /.test(msg)) {
throw new Error("React " + msg);
}

return warn.apply(this, arguments);
};
})(console.warn);

This basically works, but has a problem because there's some global-state memoisation in the code which triggers warning to try not to trigger too often:

react/src/isomorphic/classic/element/ReactElementValidator.js

Line 46
in
500d4c3

var ownerHasKeyUseWarning = {};

Could we provide a way to clear this state, or even better a supported API for opt-in erroring on warnings?
Issue 1:
One can't cast static data to a static pointer to a trait. This seems like a valid corner case that should be implemented.

Issue 2:
I had a brief chat on IRC today about adding support for deducing the function return type. I realize we decided against doing this a couple years ago, but I think it's worth revisiting in light of iterators. One of the challenges with our iterators is that the types of complex iterators are unwieldy. For example, here's the type of chaining two vecs together:

type T<'self> = std::iter::Chain<
std::vec::VecIterator<'self, int>,
std::vec::VecIterator<'self, int>
>;

fn main() {
let x = [1,2,3];
let y = [4,5,6];
let iter: T = x.iter().chain(y.iter());
}

While we can generally rely on type inference inside a function, things get really messy once we try to return an iterator from a function. One way to avoid this complicated type is to box of the iterators inside a ~Iterator<int>, but according to @thestinger, this is ~1000x slower than with a monomorphized iterator. Having return type deduction would make it much easier to pass around iterators.

This would also be really handy for macros and syntax extensions. For example, we could convert the serialize.rs over to iterators without needing generators (#9145).

This has been proposed for (C++14)[http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3638.html].

@cmr had an argument against this. He felt that adding return type deduction would make it that much easier to break ABIs.
Issue 1:
Code Sample, a copy-pastable example if possible

weeks = pd.Series(pd.date_range('2018-01', '2018-02', freq='7D', tz='America/New_York'))
week_ago = weeks.groupby([1, 1, 1, 1, 1]).shift()
print(week_ago)

Outputs:

0 NaT
1 2018-01-01 05:00:00
2 2018-01-08 05:00:00
3 2018-01-15 05:00:00
4 2018-01-22 05:00:00
dtype: datetime64[ns]

Problem description

Shifting a groupby'd datetime column removes the timezone. It's not mentioned in the documentation so either the timezone should be preserved or the documentation should mention that timezone is removed (by converting to UTC it seems).

I had a quick look and couldn't find another issue for this. I glanced at the GroupBy shift implementation and my guess is that it's due to cython/numpy not supporting timezones.

I'm happy to work on a fix if someone says what the preferred solution is.

Expected Output

0 NaT
1 2018-01-01 00:00:00-05:00
2 2018-01-08 00:00:00-05:00
3 2018-01-15 00:00:00-05:00
4 2018-01-22 00:00:00-05:00
dtype: datetime64[ns, America/New_York]

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 3.6.3.final.0

python-bits: 64

OS: Linux

OS-release: 3.10.0-693.el7.x86_64

machine: x86_64

processor: x86_64

byteorder: little

LC_ALL: en_US.UTF-8

LANG: en_US.UTF-8

LOCALE: en_US.UTF-8

pandas: 0.21.0

pytest: 3.4.1

pip: 9.0.1

setuptools: 38.5.1

Cython: None

numpy: 1.13.3

scipy: 1.0.0

pyarrow: 0.8.0

xarray: None

IPython: 6.2.1

sphinx: None

patsy: 0.5.0

dateutil: 2.6.1

pytz: 2018.3

blosc: None

bottleneck: 1.2.1

tables: None

numexpr: 2.6.4

feather: 0.4.0

matplotlib: 2.1.2

openpyxl: None

xlrd: None

xlwt: None

xlsxwriter: None

lxml: None

bs4: None

html5lib: 0.9999999

sqlalchemy: 1.2.1

pymysql: None

psycopg2: None

jinja2: 2.10

s3fs: None

fastparquet: 0.1.4

pandas_gbq: None

pandas_datareader: None

Issue 2:
need a systematic test of all groupby methods here.

This works as expected:

pd.DataFrame({'time': [pd.Timestamp('2012-01-01 13:00:00+00:00')],
'A': [3]}).groupby('A', as_index=False).head(1)

However, this loses the timezone:

pd.DataFrame({'time': [pd.Timestamp('2012-01-01 13:00:00+00:00')],
'A': [3]}).groupby('A', as_index=False).first()