WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
When writing a class, method names have their own syntax color, but if I use the less than operator, <, in a for loop in a method, all methods after that have their name appear as white instead of their normal syntax color.

Image of problem

Edit: Also causes syntax highlighting in other places to also be buggy. (Eg changing the if highlighting to method highlighting)

Issue 2:
Ported from microsoft/TypeScript-Sublime-Plugin#285

Related to microsoft/TypeScript-Sublime-Plugin#265.

Issue:

Correct:
Issue 1:
System information (version)

OpenCV => ❔

Operating System / Platform => ❔

Compiler => ❔

Detailed description

Steps to reproduce

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

There is reproducer code and related data files: videos, images, onnx, etc

Issue 2:
I'm trying to use OpenCV with Python's multiprocessing module, but it breaks on me even with very simple code. Here is an example:

import cv2
import multiprocessing
import glob
import numpy

def job(path):

image = cv2.imread(path)
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)

return path

if __name__ == "__main__":

main_image = cv2.imread("./image.png")
main_image = cv2.cvtColor( main_image, cv2.COLOR_BGR2GRAY)

paths = glob.glob("./data/*")
pool = multiprocessing.Pool()
result = pool.map(job, paths)

print 'Finished'

for value in result:
print value

If I remove main_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) script works, but with it in there it doesn't, even though that line shouldn't affect jobs processed by the pool.

All image paths lead to simple images, about ~20 of them in total.

Funny enough code works fine if I create images in memory with numpy instead of reading them with imread().

I'm guessing OpenCV uses some shared variables behind the scene that aren't protected from race conditions.

My environment: Mac OS X 10.10, OpenCV 3.0.0, Python 2.7.

The last few lines of stack trace are:

Application Specific Information:
crashed on child side of fork pre-exec

Thread 0 Crashed:: Dispatch queue: com.apple.root.default-qos
0 libdispatch.dylib 0x00007fff8668913f dispatch_apply_f + 769
1 libopencv_core.3.0.dylib 0x000000010ccebd14 cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double) + 152
2 libopencv_imgproc.3.0.dylib 0x000000010c8b782e void cv::CvtColorLoop<cv::RGB2Gray<unsigned char> >(cv::Mat const&, cv::Mat&, cv::RGB2Gray<unsigned char> const&) + 134
3 libopencv_imgproc.3.0.dylib 0x000000010c8b1fd4 cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int) + 23756
4 cv2.so 0x000000010c0ed439 pyopencv_cv_cvtColor(_object*, _object*, _object*) + 687
5 org.python.python 0x000000010bc64968 PyEval_EvalFrameEx + 19480
6 org.python.python 0x000000010bc5fa42 PyEval_EvalCodeEx + 1538\

BTW - I got other OpenCV functions to crash when used with Python multiprocessing too, above is just the smallest example I could produce that reflects the problem.

Also, I got above algorithm (and much more complicated ones) to work in multithreaded C++ programs, using same OpenCV build on same machine, so I guess the issue lies on Python bindings side.
Issue 1:
This could be related to #10934 but I don't think so, so raising a new issue.

I'm sending a hot reload with pause=true then when I get PausePostRequest I'm deleting and re-sending breakpoints (I also then send a resume, which fails, but I'm discarding the error for now - that's what #10934 is about).

However, my breakpoints never appear to be hit after this has happened. I'm aware that #10934 means there's a race, however I'm doing this:

Hitting breakpoint in Stocks example app theme getter (main.dart:66)

Sending resume (twice, since this getter is called twice)

Changing the colour of one of the themes

Sending a hot reload - the colour correctly updates

Switching theme using the app's slide-out drawer

When switching theme, the theme updates on the screen but the debugger never breaks.

It's harder to repro this in a script like I did for the other cases so I'm hoping this is enough info to go on; but if you really can't repro/understand this then I can try and find time to do this.

Here's the log - I've included a trimmed version without all the stuff I think is not relevant but also the full log (best viewed without wrapping).

observatory.trimmed.txt

observatory.txt

Issue 2:
The trivial app below is wrong because the build function is missing its BuildContext argument. I have made this mistake several times.

import 'package:flutter/material.dart';

class BadApp extends StatelessComponent {

Widget build() {
return new Text("FAIL");
}
}

void main() {
runApp(new MaterialApp(
routes: {
'/': (RouteArguments args) => new BadApp()
}
));
}

I assume that the analyzer would have warned me off running the app. Doing so yields 128 stack frames, only one of which comes from the app. The failure mode is somewhat confusing, moreso in the context of a larger app.

android: --------- beginning of system
android: I/flutter : -- EXCEPTION CAUGHT BY WIDGETS LIBRARY ---------------------------------
android: I/flutter : Exception caught while building _ModalScopeStatus(active)
android: I/flutter : type '() => Widget' is not a subtype of type 'WidgetBuilder' of 'value'.
android: I/flutter : Stack trace:
android: I/flutter : #0 ComponentElement._builder= (packages/flutter/src/widgets/framework.dart:1136)
android: I/flutter : #1 StatelessComponentElement.StatelessComponentElement (packages/flutter/src/widgets/framework.dart:1206)
android: I/flutter : #2 StatelessComponent.createElement (packages/flutter/src/widgets/framework.dart:309)
...
android: I/flutter : #128 main (/builds/dev/flutter/examples/widgets/test.dart:15)

I don't know if it would be worth doing something about this.
Issue 1:
query like this not work now!

{
"queryType": "select",
"dataSource": "ZhuanYeFanyi",
"granularity": "all",
"dimensions": [],
"metrics": [],
"intervals": [
"2015-12-26T00:00:00+08:00/2015-12-31T00:00:00+08:00"
],
"pagingSpec": {
"pagingIdentifiers": {},
"threshold": 1
}
}

error message:

com.fasterxml.jackson.databind.JsonMappingException: Unexpected end-of-input: expected close marker for OBJECT (from [Source: java.io.SequenceInputStream@663e37b8; line: -1, column: -1]) at [Source: java.io.SequenceInputStream@663e37b8; line: -1, column: 2104] (through reference chain: java.util.ArrayList[0])

if I use this query, no error shown.

{
"queryType": "select",
"dataSource": "ZhuanYeFanyi",
"granularity": "all",
"dimensions": ["a"],
"metrics": ["b"],
"intervals": [
"2015-12-26T00:00:00+08:00/2015-12-31T00:00:00+08:00"
],
"pagingSpec": {
"pagingIdentifiers": {},
"threshold": 1
}
}

Issue 2:
When ingestion

{
"type": "thetaSketch",
"name": "userid_sketch",
"fieldName": "userid"
}

when you issue such query

{
"queryType": "select",
"dataSource": "mysource",
"granularity": "all",
"dimensions": [
"my_dimension"
],
"metrics": [
"userid_sketch" #not allowed
],
"intervals": [
"2015-12-26T00:00:00+08:00/2015-12-31T00:00:00+08:00"
],
"pagingSpec": {
"pagingIdentifiers": {},
"threshold": 100
}
}

you get error message like:

com.fasterxml.jackson.databind.JsonMappingException: Unexpected end-of-input: expected close marker for OBJECT (from [Source: java.io.SequenceInputStream@9d71041; line: -1, column: -1]) at [Source: java.io.SequenceInputStream@9d71041; line: -1, column: 2410](through reference chain: java.util.ArrayList[0])
Issue 1:
I am experiencing an issue with the Material UI Icons (SVG) with typescript.

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

Expected Behavior

I expect the following code to generate the menu icon inside of a div:

import * as React from 'react';
import MenuIcon from 'material-ui-icons/Menu';

const styles = (theme: any): any => ({ ... styles ... });

class ExampleComponent extends React.Component<any, any> {
render() {
return (
<div>
<MenuIcon />
</div>
);
}

export default withStyles(styles)(ExampleComponent);

Current Behavior

This code instead generates the following error on MenuIcon (or any icon added):

[ts]
JSX element type 'Menu' is not a constructor function for JSX elements.
Property 'render' is missing in type 'Menu'.
import MenuIcon

Also in the browser it displays the following:

Failed to compile
...\my-app\node_modules\material-ui-icons\Menu.d.ts
(2,35): error TS2507: Type 'ComponentType<SvgIconProps & StyledComponentProps<"root">>' is not a constructor function type.
This error occurred during the build time and cannot be dismissed.

When I remove the menu icon the app works as expected.

Steps to Reproduce (for bugs)

Create an app with a typescript create react app wrapper:

https://github.com/wmonk/create-react-app-typescript

create-react-app testing-material-ui-icon-error-typescript --scripts-version=react-scripts-ts
cd testing-material-ui-icon-error-typescript/

Add material-ui and material-ui-icons:

yarn add material-ui material-ui-icons || npm install material-ui material-ui-icons

Start the server:

yarn start || npm start

Add the menu icon into the default /src/App.tsx:

import * as React from "react";
import "./App.css";
import MenuIcon from "material-ui-icons/Menu";
const logo = require("./logo.svg");

class App extends React.Component {
render() {
return (
<div className="App">
<div className="App-header">
<MenuIcon />
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
</div>
<p className="App-intro">
To get started, edit <code>src/App.tsx</code> and save to reload.
</p>
</div>
);
}
}

export default App;

Your Environment

Windows 10

Node 8.5.0

NPM 5.3.0

Tech
Version

Material-UI
1.0.0-beta.13

Material-UI-Icons
1.0.0-beta.14

React
16.0.0

Thank you for your time!

Issue 2:
I am trying to create a Menu but is getting the following warning. React does not recognize theanchorEl prop on a DOM element

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

Expected Behavior

No Warning

Current Behavior

Warning

Steps to Reproduce (for bugs)

<Menu id="simple-menu" anchorEl={plusAnchorElem} > </Menu>

Your Environment

Tech
Version

Material-UI
^0.20.0

React
^16.2.0

browser
chrome

etc
Issue 1:
Oliver Drotbohm opened SPR-8554 and commented

In line 62 of MapToMapConverter the implementation simply returns the source Map in case it is empty. This is invalid in the following scenario: suppose you have a simple empty LinkedHashMap and the target type is a SortedMap. Given the current implementation we'd return the LinkedHashMap unconverted which does not implement SortedMap (that's why the conversion was triggered initially).

Simply removing that clause should do the trick as for an empty Map the only code being executed after that is the creation of the new Map type anyway.

Candidate for 3.0.6 back-porting?

Affects: 3.0.5

Issue Links:

#12384 CollectionToCollectionConverter does not convert if the source is empty ("duplicates")

1 votes, 1 watchers

Issue 2:
HC opened SPR-7728 and commented

CollectionToCollectionConverter returns the original source object if the collection is empty. Relevant source code is attached (see convertEmptyVector_shouldReturnEmptyArrayList unit test)

Best Regards

Horatiu

Affects: 3.0.4

Attachments:

CollectionToCollectionConverterTest.java (1.44 kB)

Issue Links:

#13198 MapToMapConverter invalidly returns source map for empty maps ("is duplicated by")

Referenced from: commits 58d68ce

Backported to: 3.0.7
Issue 1:
In Python 2, the following code used to work, but no longer in Python 3:

In [6]: x = np.array([1.1, 'a'], dtype=np.object)

In [7]: np.unique(x)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-7-9a478241c930> in <module>()
----> 1 np.unique(x)

/Users/tom/Library/Python/3.4/lib/python/site-packages/numpy/lib/arraysetops.py in unique(ar, return_index, return_inverse, return_counts)
193 aux = ar[perm]
194 else:
--> 195 ar.sort()
196 aux = ar
197 flag = np.concatenate(([True], aux[1:] != aux[:-1]))

TypeError: unorderable types: float() > str()

Is this intended behavior, and if so, are there any suggested alternatives in this situation?

Issue 2:
Describe the issue:

Just a tracking issue here, sorry if this is a duplicate (I tried searching and didn't notice anything).

Reproduce the code example:

# N/A

Error message:

# N/A

NumPy/Python version information:

1.21.2
Issue 1:
This results in a constant binding:

bar = 2;
var bar = 1;

So does this:

function foo() {
bar = 2;
}
var bar = 1;

According to scope.bindings.bar.constant, but I would expect it to be false.

(Babel 5.8.25)

Issue 2:
Bindings created after references aren't collected and are considered globals.
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Simulating click on a mounted switch control should call onChange

Current Behavior

onChange isn't called.

Steps to Reproduce (for bugs)

class Toggle extends React.Component<ToggleProps> {
private toggleChange = (event, checked) => {
this.props.field.visible = checked;
}

render() {
const value = this.props.field.visible ? 'on' : 'off';
return (
<div data-hook="toggle">
<Switch
value={value}
checked={this.props.field.visible}
onChange={this.toggleChange}
/>
</div>
);
}
}

test:

wrapper = mount(<Toggle field={this.field}/>, {attachTo: document.createElement('div')});
input = () => wrapper.find('input')
on = () => input().props().value === 'on'

// these options do nothing
wrapper.simulate('click')
input().simulate('click')

// also tried this which throws
input().props().onChange()

TypeError: Cannot read property 'target' of undefined
at Object.SwitchBase._this.handleInputChange [as onChange] (node_modules/material-ui/internal/SwitchBase.js:115:27)

Context

Your Environment

Tech
Version

Material-UI
1.0.0-beta.27

React
16.2.0

Enzyme
3.3.0

browser
chrome

etc
mac

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

Expected Behavior

In the documentation for the Select component when using the multi option a check mark appears next to the selected item.

Current Behavior

The selected text appears red, but the check mark does not appear.

Steps to Reproduce (for bugs)

Codesandbox link

Your Environment

Tech
Version

Material-UI
0.19.4

React
16.0

browser
Chrome 61.0.3163.100
Issue 1:
David Ward opened SPR-6411 and commented

At alfresco, we have a large number of spring bean files containing wildcard imports such as this

<beans>

<import resource="classpath*:alfresco/module-context.xml" />
<import resource="classpath*:alfresco/enterprise/*-context.xml"/>

</beans>

Unfortunately, this no longer works with Spring 3.0 RC2.

I have tracked down the problem to

org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(Element)

and have successfully fixed the issue in my own subclass with the following change

// Discover whether the location is an absolute or relative URI
boolean absoluteLocation = false;

try
{
absoluteLocation = location.startsWith(ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX) // ADDED THIS LINE
|| ResourceUtils.toURI(location).isAbsolute();
}
catch (Exception ex)
{
// cannot convert to an URI, considering the location relative
}

Affects: 3.0 RC2

Issue Links:

#11032 Cannot import bean definitions using classpath*: resource location ("duplicates")

Issue 2:
Thomas Ziem opened SPR-7908 and commented

In cases if a HttpResponse contains no content (e.g. if status code is 204), no Content-Type header will be sent.

But HttpMessageConverterExtractor expects always a Content-Type header:

public T extractData(ClientHttpResponse response) throws IOException {
MediaType contentType = response.getHeaders().getContentType();
if (contentType == null) {
throw new RestClientException("Cannot extract response: no Content-Type found");
}
...
}

Affects: 3.0.5

Attachments:

RestTemplateTests.java (2.59 kB)

Issue Links:

#12970 HttpMessageConverterExtractor throws RestClientException if no Content-Type header was found in HttpRespone ("is duplicated by")

ROO-2274 Sending back ResponseEntity without Content-Type header causes RestClientExceptions when using RestTemplate

3 votes, 2 watchers
Issue 1:
I have a task defined that uses a problem matcher to create warnings.

Assume it creates 5 warnings for file A and 2 warnings for file B. The total warning count shown in the status bar is now 7.

Now follow these steps:

Open View>Show Errors and Warnings

Navigate to file A (do not fix any warnings)

Open View>Show Errors and Warnings again

Navigate to file B

At this point the warning count in the status bar drops to 2. This is confusing since without doing anything the 5 warnings have disappeared.

The reason is that when I open file A from Errors and Warnings it isn't put into the working files. Then when I open file B, File A is closed and its markers get cleared.

To avoid this confusion I suggest that opening a file from Errors and Warnings puts the file into the 'Working files' section, that is, the file is kept open and the warnings do not disappear. So the effect would be the same as if I double clicked the file from the explorer.

Assigning to Jo as the owner of diagnostics and the Errors and Warnings quick box. @dbaeumer fyi.

Issue 2:
Use Go To Definition (F12) on a function call to jump to its definition. Then immediately use "Back" (Ctrl-minus). Your cursor will not be back to where it was when you hit F12. Sometimes it's just off a character, other times it's several lines away.

It seems to be more consistently reproducible when jumping between files and jumping to a file that's not already in the "Working Files" area. Even jumping within a file by repeatedly doing F12, Ctrl-minus will eventually jump to the wrong spot.

This was happening while using the Go plugin with v0.10.1 on Mac OS X 10.10.5
Issue 1:
The idea is to expose the mentioned paths in the Deno namespace as a const.

Deno.DENO_DIR maybe.

or maybe some sort of const or function that has/return an object as its value. This object would contain the three mentioned

{ deno_dir, remote_modules, typescript_compiler_cache }

Issue 2:
Currently "deno info https://deno.land/std/http/file_server.ts" will display a dependency graph of the specified module. It would be nice to be able to access this information in a programmatic way.

let depTree = await Deno.deps("https://deno.land/std/http/file_server.ts")

Where depTree would be some JSON encodable object similar to the current output.

The first step to exposing this would be pure rust functionality of turning a Deps structure into a JSON string:

deno/cli/modules.rs

Line 188
in
960ee52

pub struct Deps {
Issue 1:
Summary

Describe your issue here, including as much detail as necessary.

If you're reporting a bug, include the relevant code and stack traces to debug it (removing any private information).

If you're requesting a feature, include some context and examples of code using it.

Context

axios version: e.g.: v0.16.0

Environment: e.g.: node v6.9.4, chrome 54, windows 7

Issue 2:
ERROR TypeError: Restricted in strict mode, js engine: hermes
LOG Running "TheClub" with {"rootTag":1}
ERROR Invariant Violation: "TheClub" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes

If I downgrade to 0.27 no errors anymore.
Issue 1:
Bug report

Describe the bug

Running testonly crashes my computer due to the numerous (50+) Chrome instances it opens for testing.

To Reproduce

Fork a fresh copy of next.js repo

Clone to local machine

yarn to install dependencies

yarn run bootstrap as state in contributing.md

yarn testonly

Tests run and open windows and gradually slow down my machine until it crashes and needs restarting.

Expected behaviour

I am not entirely sure whether this is a bug that causes the issue or whether this is something that just needs a warning in contributing.md. I'm running a 2016 15" MacBook pro so hopefully this isn't an issue with not having enough specs.

Screenshots

System information

OS: macOS 10.14.2

Version of Next.js: 7.0.2 (Canary as of 15th Jan)

Additional context

Add any other context about the problem here.

Issue 2:
Feature request

Is your feature request related to a problem? Please describe.

Currently we're using https://npmjs.com/wd / chromedriver which fails at random on Azure Pipelines (Windows), to make the tests as reliable as possible.

Describe the solution you'd like

@HaNdTriX already did some initial investigation / converting, however he doesn't have time to finish converting all tests. So if someone from the community wants to step in and contribute to these feel free to 🙏 it would be much appreciated. PR can be found here: #5561, however check below message under additional context.

Additional context

The best way to do this would be to start small and progressively move tests towards the puppeteer implementation, considering we have a lot of tests.
Issue 1:
Bug report

Bug summary

See example code and image.

Code for reproduction

import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import sys

print(sys.version)
print(mpl.__version__)

a = np.arange(4*5).reshape((4, 5))

fig, (ax1, ax2) = plt.subplots(1, 2)

ax1.imshow(a, interpolation='none', origin='lower')
ax1.yaxis.set_ticks([1, 2])

ax2.imshow(a, interpolation='none', origin='upper')
ax2.yaxis.set_ticks([1, 2])

plt.show()

Actual outcome

Expected outcome

A similar plot in both cases

Matplotlib version

Operating system: Linux

Matplotlib version: 3.1.1

Matplotlib backend (print(matplotlib.get_backend())): module://backend_interagg

Python version: 3.6.7 | packaged by conda-forge

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: