WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
julia> last(CartesianIndex(1, 1, 2))
ERROR: MethodError: no method matching lastindex(::CartesianIndex{3})
Closest candidates are:
lastindex(::Markdown.MD) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Markdown/src/parse/parse.jl:26
lastindex(::Base64.Buffer) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Base64/src/buffer.jl:19
lastindex(::Cmd) at process.jl:639
...
Stacktrace:
[1] last(::CartesianIndex{3}) at ./abstractarray.jl:362
[2] top-level scope at REPL[30]:1

julia> first(CartesianIndex(1, 1, 2))
ERROR: iteration is deliberately unsupported for CartesianIndex. Use `I` rather than `I...`, or use `Tuple(I)...`
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] iterate(::CartesianIndex{3}) at ./multidimensional.jl:164
[3] first(::CartesianIndex{3}) at ./abstractarray.jl:341
[4] top-level scope at REPL[35]:1

Is there some reason why

lastindex(::CartesianIndex{N}) where {N} = N
first(i::CartesianIndex) = i[1]

are not defined?

Issue 2:
I have this type:

## Amino Acid encoded as Integer, like in MATLAB's aminolookup (1:25) and Amino Acid Index Database (1:20)
immutable AminoAcidInteger <: AbstractAminoAcid
byte::Uint8
end

With this show and write definitions:

## Printing and Writing BioUnit as Char
write(io::IO,x::BioUnit) = write(io,uint8(x))
show(io::IO,x::BioUnit) = (write(io,x); nothing)

When I write it to a file, I get garbage instead of the values showed on REPL:

julia> seq = [ convert(NucleotideApe,i) for i in b"ACTG" ]
4-element NucleotideApe Array:
A
C
T
G

julia> fh = open("example.txt","w")
IOStream(<file example.txt>)

julia> write(fh,seq)
4

julia> close(fh)

julia> run(`cat example.txt`)
�(�H

julia> fh = open("example.txt","w")
IOStream(<file example.txt>)

julia> write(fh,seq[1])
1

julia> close(fh)

julia> run(`cat example.txt`)
A

julia> @which write(fh,seq)
write{T}(s::IOStream,a::Array{T,N}) at io.jl:311

julia> @which write(fh,seq[1])
write{T<:BioUnit}(io::IO,x::T<:BioUnit) at /home/dzea/NewSeqII/Compound.jl:178

write is defined. show is defined using write and works fine. On REPL and for single objects are fine... Why printing a vector gives garbage?

julia> isbits(Nucleotide)
true
Issue 1:
Hi there,

I am evaluating an upgrade to 1.7.1 for our 1.4.4 production cluster. We seem to be having some data that has geo shapes that 1.4.4 accepted and indexed but 1.7.1 is choking on. The message below is only a warning but it seems to be rejecting the whole shard to be moved to the newer versioned machine, right? Can I reduce the level of validation checking for geo locations?

Do we have a breaking change in geo shape validator between these versions?

[2015-08-04 11:41:19,543][WARN ][cluster.action.shard ] [hostname] [indexname][5] received shard failed for [indexname][5], node[lxvTTQWSRDiBA9Se21hjHw], relocating [BRUHrGoBQnO9MzyssyMCoQ], [P], s[RELOCATING], indexUUID [d2E1eeDHRB6FOs57k0IxaA], reason [Failed to perform [indices:data/write/bulk[s]] on replica, message [RemoteTransportException[[hostname][inet[/10.10.10.220:9302]][indices:data/write/bulk[s][r]]]; nested: MapperParsingException[failed to parse [message.location.geo]]; nested: InvalidShapeException[Provided shape has duplicate consecutive coordinates at: (-88.097892, 37.771743, NaN)]; ]]

Issue 2:
From @gabriel-tessier on July 17, 2015 2:56

Hi,

I need to update the user dictionary and I usually open close the index to make the change apply.

One question: Is it the only way to update the dict cause in case of typo (missing a , or one bad space) in the file the index don't open at all and on production server it's not an option.

first question (for confirmation): is it the good way to do? open close the index to reload the dict.

second one: is there a way to have an option like check config for apache [apachectl configtest]? so we can open close the index without fear!!

Thanks.

Copied from original issue: elastic/elasticsearch-analysis-kuromoji#65
Issue 1:
It would be useful to have an API to set the linestyle cycle for an axes object, just like there is one for the color cycle. It would allow one to change linestyles independently of the color, which is useful for publications that need both color and black-and-white distinguishability.

Issue 2:
There seems to be some code duplication between tests and examples (e.g. test_triangulation.test_tri_smooth_contouring and pylab_examples/tricontour_smooth_user.py). Perhaps it would make sense for the tests to simply import the relevant example file instead (which should trigger the plotting), in a context where plt.show() is patched to do nothing.
Issue 1:
match std::io::stdin().read_u8() {
Ok(_) => (),
Err(e) => println!("{}",e)
}

Output: "unknown error (OS Error 8 (FormatMessageW() returned error 15100))"

Win 7

rustc 0.10

host: i686-pc-mingw32

Issue 2:
More investigation from #13073.

extern crate native;
extern crate green;
extern crate rustuv;

use std::libc::{c_void, LPWSTR, LPVOID, DWORD};

extern "system" {
fn MessageBoxA(hWnd: u32, lpText: *u8, lpCaption: *u8, uType: u32) -> i32;

fn FormatMessageW(flags: DWORD,
lpSrc: LPVOID,
msgId: DWORD,
langId: DWORD,
buf: LPWSTR,
nsize: DWORD,
args: *c_void)
-> DWORD;

fn GetLastError() -> u32;
}

fn test() {
let mut buf: [u16, ..50] = [0, ..50];
let ret = unsafe {
FormatMessageW(0x1000, 0 as *mut c_void, 1, 0x400,
buf.as_mut_ptr(), buf.len() as u32, 0 as *c_void)
};
if ret == 0 {
let err = unsafe { GetLastError() };
println!("err: {:?}", err);
}
let s = std::str::from_utf16(buf);
println!("{:?}", s);

//unsafe {
// MessageBoxA(0, "ABC".as_ptr(), "ABC".as_ptr(), 0);
//}
}

fn main() {
if cfg!(spawn) {
spawn(proc() {
test();
});
} else {
test();
}
}

#[start]
pub fn start(argc: int, argv: **u8) -> int {
if cfg!(green) {
green::start(argc, argv, rustuv::event_loop, main)
} else if cfg!(raw) {
main();
0
} else {
native::start(argc, argv, main)
}
}

If the code is bulit with --cfg green, --cfg raw or --cfg spawn, it works as expected. However, if it is built with no cfg, it behaves strangely: FormatMessageW() fails to get system locale mssage, and MessageBoxA() shows gui message box with non-system-themed border.

I guess the main task has bad thread-local data due to libnative::start().

cc @alexcrichton
Issue 1:
Description of the new feature/enhancement

A multiplexer feature would be very useful and cool!

By having multiple panes in a single windows:

You can easily copy/paste output from one pane to another.

You can work on multiple tasks at once.

You can monitor multiple commands at once.

You can compose a command in one pane while looking at the 'help' page for that command in another pane.

Issue 2:
I personally prefer having a context menu with right click.

Basically I request that you mimic an option from Visual Studio Code where you have "terminal.integrated.rightClickBehavior" that allows you to specify how right click behaves.
Issue 1:
Hi, I'm using TSC 1.5.3 (latest head) and I'm trying to compile following piece of code

@SomeDecorator()
export class App {
constructor() {
}
}

{"compilerOptions": {
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "system",
"target": "es5"
}}

which will then produce following code

var __decorate = ...;
var __metadata = ...;
System.register([], function(exports_1) { ... };

Now this doesn't really play nice together with systemjs and it works for me only when manually moving the var __decorate and var __metadata declarations into the anonymous function function(exports_1) { ..here... }. Not sure if it's really valid to have these variable declarations outside of the System.register.

Issue 2:
Original issue: systemjs/builder#178
Issue 1:
Hi,

Symfony source code is well commented but we can see a lot of different use of phpDoc. BTW, i think that would be a good idea to define how to write the phpDoc. (We can discuss here and update the symfony-docs)

I think for exemple, this coding standard is the best actually:

https://github.com/opensky/Symfony2-coding-standard

I would like to have yours opinions before make a PR and fix all phpDoc.

I see some cases, i'll list them and can you say me if you're OK on each of them.

A) Usage of inheritDoc

<?php
/**
* @{inheritDoc} ---> No
* {@inheritDoc} ---> No
* {@inheritdoc}
*
* (see http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.inlineinheritdoc.pkg.html)
*/
public function myInheritedMethod()
{
}

Adding too the inheritDoc on method where we use see

<?php
/**
* {@inheritdoc}
*
* see \MyBundle\myInheritedMethod
*/
public function myInheritedMethod()
{
}

B) Aligment

<?php
/**
* ..... description ...
*
* align type of params, var names, and the comment
* ONLY ONE space between params, var names and comments
*
* @param MyObject $a comment of A
* @param string $b comment of b
*/
public function myMethod(MyObject $a, $b)
{
}

C ) Return tag

<?php
/**
* ..... description ...
*
* skip a line between params and @return tag
*
* @param MyObject $a comment of A
* @param string $b comment of b
*
* @return boolean
*/
public function myMethod(MyObject $a, $b)
{
return true;
}

D ) Type

<?php
/**
* ..... description ...
*
* lowercase for type which are not object !
*
* @param string $b comment of b
* @param String $b comment of b <--- NO
*
* @return boolean
* @return Boolean <---- No
*/
public function myMethod(MyObject $a, $b)
{
return true;
}

May have you other cases ?

I can make a PR to rectify these cases on each file of symfony, but i would like to be sure you're OK before doing that :)

Issue 2:
There are several problems with the current way:

default logic is hard-coded in AbstractAuthenticationListener (can not be modified without copy/paste)

there are problems with XHR/automatic background requests that might change the redirect path (this is hard to customize at the moment)
Issue 1:
This tool is extremely useful when performing an arithmetic operation or to launch an application I use it a lot on my PC, but it is extremely useless on my Surface device because it does not have a touch trigger gesture, I could add the option or invocation with three fingers sliding, etc. Thank you.

Issue 2:
Environment

Windows build number: 1909
PowerToys version: 0.18.0 and above
PowerToy module: Settings
Device: HP Notebook, product number X7T77UA

Note: this issue was initially observed on a laptop equipped with a Synaptics touchpad, and does not manifest on another, non-Synaptics computer.

Steps to reproduce

Open PowerToys Settings (i.e. right-click system tray icon, choose Settings)

Attempt to scroll using two fingers on touchpad

Expected behavior

The main settings page should scroll as normal (if it's long enough, which it is on my device).

Actual behavior

The main settings page does not scroll.

Overview:

Method
Functional?

Mouse wheel
✔️

Touchscreen
✔️

Touchpad (two fingers)
❌

Notes

After connecting my wireless mouse, scrolling with its wheel works as expected. While the mouse is connected, however, touchpad scrolling still does not work.

Also, the same issue was originally present in the PowerToys Run results list, but is solved as of at least v0.25.0.
Issue 1:
This came up in Dask (dask/dask#4387). We have an object (dask.delayed.Delayed) that duck-types method/attribute access to build a graph from user code. Unfortunately this means that when np.dtype tries to get the dtype attribute it succeeds but doesn't return a valid dtype (it returns another delayed object). This leads to recursion and eventually a segfault.

I'm able to reproduce his without dask as follows:

import numpy as np

class ShouldHaveNoDtype(object):
"""This class happens to have a dtype attribute, but it doesn't actually
meet the interface"""
@property
def dtype(self):
"""Has the attribute, but doesn't return a dtype, leading to recursion"""
return self

x = ShouldHaveNoDtype()
np.dtype(x)

Issue 2:
The following code crashes numpy (latest master):

import numpy as np
class crashnumpy(object):
@property
def dtype(self):
return self
np.array([1], dtype=crashnumpy())
Issue 1:
System information (version)

OpenCV => 4.0.0-beta

Operating System / Platform => OSX 10.14.1 Beta (18B45d)

Compiler => Xcode (ver 10.0.0.10001145)

Python => 3.7.0

Detailed description

When retrieving frames in the latest version of OpenCV using the python bindings for OpenNI2, I found that the default value of the retrieve is used no matter what is passed into the binding unless the method is called with an additional dummy parameter.

The method signature in the documentation is consistent:

retval, image	= cv.VideoCapture.retrieve([, image[, flag]])

This would be sensible, however if you pass the image in, it doesn't actually change the image as a side effect which is what you would expect. Not only this, but there's no warning (or error) if you pass the flag in place of the image. Thus, while this may not explicitly be a bug, it's certainly a bit confusing, and it might need some clarification.

In addition, this runs a bit contrary to the documentation which says:

[out] | image | the video frame is returned here. If no frames has been grabbed the image will be empty.

Steps to reproduce

Not Working:

capture = cv2.VideoCapture(cv2.CAP_OPENNI2)
capture.grab()
ret_d, depth_map = capture.retrieve(cv2.CAP_OPENNI_DEPTH_MAP)
ret_f, frame = capture.retrieve(cv2.CAP_OPENNI_BGR_IMAGE)

print(cv2.CAP_OPENNI_BGR_IMAGE, cv2.CAP_OPENNI_DEPTH_MAP)
print(frame == depth_map)

The return value is:

>> 5, 0
>> True

Working:

capture = cv2.VideoCapture(cv2.CAP_OPENNI2)
capture.grab()
ret_d, depth_map = capture.retrieve(None, cv2.CAP_OPENNI_DEPTH_MAP)
ret_f, frame = capture.retrieve(None, cv2.CAP_OPENNI_BGR_IMAGE)

print(cv2.CAP_OPENNI_BGR_IMAGE, cv2.CAP_OPENNI_DEPTH_MAP)
print(frame == depth_map)

The return value is:

>> 5, 0
>> False

Odd Behavior:

capture = cv2.VideoCapture(cv2.CAP_OPENNI2)
capture.grab()
frame = None
ret_d, depth_map = capture.retrieve(None, cv2.CAP_OPENNI_DEPTH_MAP)
capture.retrieve(frame, cv2.CAP_OPENNI_BGR_IMAGE)

print(frame)

Output:

>> None

Issue 2:
System information (version)

OpenCV => 4.5.1

Operating System / Platform => Ubuntu 20.04

Compiler => Pycharm

Detailed description

Unable to use sfm with opencv-python.

import cv2
help(cv2.sfm)

error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'cv2.cv2' has no attribute 'sfm'

Steps to reproduce

import cv2
help(cv2.sfm)

Issue submission checklist

I report the issue, it's not a question

I checked the problem with documentation, FAQ, open issues,

forum.opencv.org, Stack Overflow, etc and have not found solution

I updated to latest OpenCV version and the issue is still there
Issue 1:
Bug report

Bug summary

imshow behaviour change between matplotlib 3.1.0 and 3.1.1; y-axis is chopped-off in 3.1.1.

Code for reproduction

Run this in matplotlib 3.1.0 and 3.1.1.

import numpy as np
import matplotlib.pyplot as plt
xy = ["1", "2"]
fig, ax = plt.subplots()
im = ax.imshow(np.array([[0.8, 0.0], [0.1, 6.3]]))
ax.set_xticks(np.arange(len(xy)))
ax.set_yticks(np.arange(len(xy)))
ax.set_xticklabels(xy)
ax.set_yticklabels(xy)
plt.show()

This is a simplified version from the first figure on

https://matplotlib.org/3.1.0/gallery/images_contours_and_fields/image_annotated_heatmap.html

https://matplotlib.org/3.1.1/gallery/images_contours_and_fields/image_annotated_heatmap.html

where the difference can also be observed.

Actual outcome

Expected outcome

Matplotlib version

Operating system: Linux

Matplotlib version: v3.1.0 vs v3.1.1

Matplotlib backend: Qt5Agg

Python version: 3.7

Issue 2:
Bug report

Bug summary

The very top and bottom of the heatmaps are getting truncated to 1/2 height in version 3.1.1. This does not happen for version 3.0.3.

This is the code from a Jupyter Notebook

import matplotlib
import pandas as pd
import numpy as np
import seaborn as sb
%pylab inline

print(matplotlib.__version__)
print(sb.__version__)

grid = pd.DataFrame(np.arange(9).reshape((3,3))/10)
fig, ax = subplots(1, 1, figsize=(5, 5))

sb.heatmap(grid, annot=True, fmt=".0f", ax=ax, cmap='RdBu', vmin=0, vmax=1, cbar=True);

Actual outcome

Populating the interactive namespace from numpy and matplotlib
3.1.1
0.9.0

Matplotlib version

Operating system: Ubuntu Linux

Matplotlib version: 3.1.1

Matplotlib backend: module://ipykernel.pylab.backend_inline

Python version: 3.6

Jupyter version (if applicable): 4.4.0

Other libraries:
Issue 1:
define function with JSDoc which contain callback function as parameter get error about duplicate

Issue 2:
TypeScript Version:

nightly (1.9.0-dev.20160429)

Code

let maybeNumber: number | undefined;
(function () {
maybeNumber = 1;
})();
if (maybeNumber !== undefined) {
maybeNumber++;
}

Expected behavior:

Everything works without errors, maybeNumber preserves type of number | undefined and refines to number in the if block.

let maybeNumber: number | undefined;
// Control flow figured that: maybeNumber === undefined
(function () {
maybeNumber = 1;
})(); // --> oops, unknown side effects
// Revert maybeNumber to initial `number | undefined` to cover all possibilities
if (maybeNumber) {
// Control flow: can refine to `number` again here
maybeNumber++;
}

Actual behavior:

Language service reports type nothing on maybeNumber after the call (even though it's number | undefined before the call), so statement inside of the if condition breaks.
Issue 1:
I have a component that uses NgFor to create other components inside it's view, by iterating over a list.

<ul>
<li *ng-for="#item of playlist"><item [name]="item.name"></item></li>
</ul>

I use ViewQuery to get a hold of the child components.

All is well until i change the playlist getter to return a map of the original array:

get playlist() {
return this.content.map((i) => { return {name: i.name + 'y'} })
}

It seems that NgFor repeatedly destroys and creates the components, on each change, but the ViewQuery keeps accumulating components. After a few ticks, ViewQuery stops working entirely and throws.

Here is a plunker showcasing the bug:

http://plnkr.co/edit/uGKcpQUJoWWo4SPNp3z8

Issue 2:
For performance reasons queries and view queries are stored in element injector fields instead of held in maps. The current limit is 3 and that is already showing to be very limiting.

I propose bumping the limit to 5 and implementing a fallback to maps strategy similar to injectors (instead of current behavior of throwing).
Issue 1:
http://kubekins.dls.corp.google.com/view/Critical%20Builds/job/kubernetes-e2e-gce-scalability/6130/

https://console.cloud.google.com/storage/kubernetes-jenkins/logs/kubernetes-e2e-gce-scalability/6130/

11:24:43
11:24:43 • Failure [1554.510 seconds]
11:24:43 [k8s.io] Load capacity
11:24:43 /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:424
11:24:43 [Feature:Performance] should be able to handle 30 pods per node [It]
11:24:43 /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/load.go:152
11:24:43
11:24:43 creating rc load-test-small-rc-197
11:24:43 Expected error:
11:24:43 <*errors.errorString | 0xc8236fe440>: {
11:24:43 s: "Number of reported pods for load-test-small-rc-197 changed: 4 vs 5",
11:24:43 }
11:24:43 Number of reported pods for load-test-small-rc-197 changed: 4 vs 5
11:24:43 not to have occurred
11:24:43
11:24:43 /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/load.go:218

Issue 2:
There were a couple of flakes, that finished with the error like this one:

/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/load.go:182 creating rc
load-small-rc-4196 Expected error: <*errors.errorString | 0xc8217c0eb0>: { s: "Number of reported pods
for load-small-rc-4196 changed: 4 vs 5", } Number of reported pods for load-small-rc-4196 changed: 4 vs
5 not to have occurred

This particular error come from:

http://kubekins.dls.corp.google.com:8080/view/Scalability/job/kubernetes-kubemark-gce-scale/1183/
Issue 1:
Challenge Friendly Date Ranges has an issue.

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36.

No major problem, but the challenge tells us the current year is 2016. I'm also not sure if the challenge will be checking in some way that considers the current year as 2016.

Issue 2:
Challenge Passing Values to Functions with Arguments has an issue.

User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36.

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

Put this code in Chrome dev tools and got 3. Run it on FCC and get this error, please advise.

My code:

// Example
function ourFunction(a, b) {
console.log(a - b);
}
ourFunction(10, 5); // Outputs 5

// Only change code below this line.

function myFunction(c, d){
console.log(c + d);
}
myFunction(1,2);
Issue 1:
Currently IdsQueryBuilder does support only appending arrays of identifiers and converting them to lists:

public IdsQueryBuilder addIds(String... ids) {
values.addAll(Arrays.asList(ids));
return this;
}

In cases of huge numbers of IDs submitted to builder it could be more wise of performance to merge with lists directly. Or are there any better ideas?

Issue 2:
We want to clean up the code and use only standard accessors (gettters and setters).

So we remove old non standard accessors.

Current request builders to build request with elasticsearch stay the same, and its the recommended way to execute APIs with elasticsearch. The pure "request" APIs have changed, and now have setters methods instead of the non setters options, code will need to change if pure Request objects/api are used.

Last, all response levels objects now only expose the getter API variant. We have had both variants (getter and non getter) for some time, and its time to clean it up as it creates both confusion and overhead on our end to maintain it.
Issue 1:
Hi, I created the following component that accepts a raw svg string and transforms it into a react element. The component works; however, on the server, the SVG is being escaped.

import React, {PropTypes, Component} from 'react';

export default class Svg extends Component {

static propTypes = {
svg: PropTypes.string.isRequired,
}

render() {
const {...other, svg} = this.props;
return (
<span {...other} dangerouslySetInnerHTML={{__html: svg}}></span>
);
}

}

In the browser console I get this error:

"React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server"

(client) .1.0.1"><svg xmlns="http://www.w3.org/20
(server) .1.0.1"><svg xmlns="\&quot;http://www.w3

Issue 2:
With following code:

let keyTitlesMap = {
office: 'Office & <br /> Transport links',
culturePeople: 'Culture & <br /> people',
trainingDevelopment: 'Training & <br /> development',
workLifeBalance: 'Work/Life <br/> balance',
career: 'Career <br /> progression'
}
let itemTitleHtml = {__html: keyTitlesMap[key]}
return <div dangerouslySetInnerHTML={itemTitleHtml}></div>

There's a warning:

Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
(client) office.0.0">Office & <br /> Transport li
(server) office.0.0">Office &amp; <br> Transport

Both environments run code from same webpack bundle