WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Steve Cresswell opened SPR-2627 and commented

Using XMLSpy:

When you attempt to validate a context definition that uses elements from the jee namespace, validation fails because the following two imports in the jee schema don't include schemaLocation...

<xsd:import namespace="http://www.springframework.org/schema/beans"/>
<xsd:import namespace="http://www.springframework.org/schema/tool"/>

How to reproduce:

Opening the following in XMLSpy will highlight the problem

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"

xmlns:jee="http://www.springframework.org/schema/jee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd

http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.0.xsd"

default-lazy-init="true">

</beans>

Possible Fix:

Change the imports in jee as follows

<xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"/>

<xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool-2.0.xsd"/>

Affects: 2.0 RC3

Issue Links:

#7394 oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'. Unable to Start OC4J Server ("depends on")

Issue 2:
Michael Hunger opened SPR-4039 and commented

the protected method convertValueToRequiredType ignores its supplied parameter requiredType and uses the instance variable required type instead. This should be fixed by either removing the parameter or using it.

Perhaps the Methods convertValueToRequiredType, getColumnValue and the part of mapRow that calls them should be moved to a separate Util Class so that they can be used outside the SingleColumnRowMapper.

Thanks

Michael

Affects: 2.0.7, 2.5 RC1
Issue 1:
By the looks of the code this is partially implemented, not sure if it's just incomplete or a bug.

Expected syntax:

code --install-extension ext1 ext2

Issue 2:
#6099

VSCode Version: alpha

OS Version: OS X

It would be cool if I could pass multiple extensons to the install-extension / uninstall-extension command and we would install / uninstall multiple extensions at once.

Currently only the first argument is respected, while the others are ignored.
Issue 1:
Challenge http://freecodecamp.com/challenges/waypoint-target-html-elements-with-selectors-using-jquery has an issue.

When you edit the code or make any changes to it, the entire spec suite disappears. The only way around it was to keep running the code, but as soon as you change it, it goes back.

Issue 2:
Challenge http://freecodecamp.com/challenges/waypoint-use-appendto-to-move-elements-with-jquery has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

Several of the jQuery Waypoint challenges don't show the checkmarks unless you hit the run code, so you don't always have the instructions on what to code unless you hit the run code box and then they they are gone again.
Issue 1:
Description of the new feature/enhancement

Microsoft has a number of CLIs that are worth having on-hand without having to install, for example, Visual Studio: C# and F# interactive prompts come to mind.

I'd propose that some of these should be brought in either directly or as Store apps that tie into WT. C# and F# would be good starts, since they are otherwise unavailable except by installing Visual Studio.

Office/Exchange prompt may be another good candidate.

Proposed technical implementation details (optional)

Given the addition of the Azure Cloud prompt to WT, I expect the technical details of bundling such things is understood.

Where it's not tractible to include the CLI itself (eg, Git), it may be useful to have at least the icon available (see #2282).

Proposed list:

C# Interactive

F# Interactive

Exchange

HttpRepl

Issue 2:
Environment

Windows build number: Win32NT 10.0.18362.0 Microsoft Windows NT 10.0.18362.0
Windows Terminal version (if applicable): 0.4.2382.0

Any other software? WSL 16.04

Steps to reproduce

Use Terminal

Expected behavior

Terminal shouldn't close unless I tell it to close

Actual behavior

Terminal will occasionally pause for a few seconds, then close, taking with it all of my sessions. I am unsure whether this is a crash or not because it doesn't pop up a crash dialog box. This happens once every day or two.

For example, this just happened while doing a wget

If this is expected behavior, it's not good. If it's a crash, then it should present a dialog box indicating it's a crash, along with something such as a stack trace or crash reason.
Issue 1:
On my Dell XPS 13 9343 (2015) atom's menus are very ... unreadable.

Issue 2:
Mac OS, Atom 1.0

I'd like "cmd+d" to duplicate the currently line. This is more natural to me than the default "cmd+shift+d" command.

I went into "Atom > Open Your Keymap" and set it to:

'.atom-text-editor':
'cmd-d': 'editor:duplicate-lines'

However, this seems to have no effect. cmd+d still selects the previous character instead of duplicating the line.

Based on everything I've seen in the docs - this should work. Any ideas what I'm doing wrong?
Issue 1:
getting pretty long, could create a sub-dir and split out into separate files.

Issue 2:
Dataframe.duplicated() is flagging rows as duplicates when they are in fact distinct. This happens when using large dataframes, and duplicated(keep=False):

import pandas as pd, numpy as np
df = pd.DataFrame({'a': pd.Series(range(1,100000)),
'b': pd.Series(range(10,1000000)),
'c': pd.Series(3*range(2,200000,2))})
df.head()

np.sum(df.duplicated())

Out[]: 0

np.sum(df.duplicated(keep=False))

Out[]:110

Changing column order results in different (but still incorrect) behavior.

np.sum(df[['c','b','a']].duplicated(keep=False))

Out[]:2138

Tested on 0.17.1. Environment details are provided below:

>> pd.util.print_versions.show_versions()

INSTALLED VERSIONS

------------------

commit: None

python: 2.7.11.final.0

python-bits: 64

OS: Darwin

OS-release: 14.5.0

machine: x86_64

processor: i386

byteorder: little

LC_ALL: None

LANG: en_GB.UTF-8

pandas: 0.17.1
nose: None
pip: 7.1.2
setuptools: 18.5
Cython: None
numpy: 1.10.1
scipy: 0.16.0
statsmodels: None
IPython: 4.0.0
sphinx: 1.3.3
patsy: None
dateutil: 2.4.2
pytz: 2015.7
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.4.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.9
pymysql: None
psycopg2: 2.6.1 (dt dec pq3 ext)
Jinja2: None

This looks like the same kind of problem described in #11668, though the specific examples provided in that issue work properly in 0.17.1
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

While running in production mode, throwing an unhandled exception during getInitialProps should re-throw during renderToHTML

Current Behavior

when rendering a route using renderToHTML and an unhandled exception is throw in getInitialProps, renderToHTML should re-throw the error.

In many cases with a custom server (see SSR Caching example) you want to cache the HTML after it is generated. This is a common use case for renderToHTML. However, if an unhandled exception is thrown during that process, the HTML is still returned.

desired behavior

try {
const html = await app.renderToHTML(req, res, '/some-route', params);
// cache
doSomeCaching(html);
// send
res.send(html);
} catch (e) {
// Something happened during the render, pass it up the chain
next(e);
}

Steps to Reproduce (for bugs)

Here is a repository with a barebones recreation. Running under production mode, I would expect this method to catch errors.

https://github.com/bringking/error-example-nextjs/blob/master/server.js#L40

Context

What I was trying to accomplish is any unhandled exception thrown during server render would trigger an express error handler and render the _error.js page.

Your Environment

Tech
Version

next
4.1.4

node
8.9.0

OS
MacOS

browser

etc

Issue 2:
Bug report

Describe the bug

The page state is not reset for navigation between dynamic routes that served by the same source component.

for example, give page source /a/[param]/index.js, when navigating from /a/1 to /a/b, states on the page won't' be reset.

The causing is that for this kind of navigation, what actually happened is the same React Component been rendered with different props. Thus react takes it as a component is rerendering itself, and causing the new navigated page receive stale states.

To fix it, just add {key: <composed base on URL routing params> } to page initial props.

To Reproduce

I've created a live example:

Expected behavior

Page should be fully reloaded and states should be reset.

Screenshots

N/A

System information

OS: ALL

Browser: ALL

Version of Next.js: 9.1.6

Additional context
Issue 1:
I ran my Logistic Regression benchmark for threads. Not sure if this is related to earlier issues or not, but I thought I'd post an issue anyway.

Usually the output would be (on a version of master sometime in January)

Warm up run : 25 iterations!
Time taken by serial implementation = 1.508228316
Time taken by parallel implementation = 0.429550363
Speedup over 4 threads : 3.5111792374390336

Now, with the current threaded build of master, it's this:

Warm up run : 25 iterations!
Time taken by serial implementation = 1.831504341
Time taken by parallel implementation = 42.974081761
Speedup over 4 threads : 0.04261881268774738

Issue 2:
Consider the following code:

using Base.Threads
println("Number of threads = $(nthreads())")
x = rand(10^6)
y = zeros(10^6)
println("Warmup!")
for i = 1:10^6
y[i] = sin(x[i])^2 + cos(x[i])^2
end
t1 = @elapsed for i = 1:10^6
y[i] = sin(x[i])^2 + cos(x[i])^2
end
@assert sum(y) == 10^6
t2 = @elapsed @threads for i = 1:10^6
y[i] = sin(x[i])^2 + cos(x[i])^2
end
@assert sum(y) == 10^6
println("Serial time = $t1")
println("Parallel time = $t2")

The output recorded on OSX is:

Number of threads = 4
Warmup!
Serial time = 0.239838418
Parallel time = 0.282324893

The output recorded on Linux is:

Number of threads = 4
Warmup!
Serial time = 0.227327406
Parallel time = 0.542067206
Issue 1:
We currently only support some baked-in forms of type checking for type guards -- typeof and instanceof. In many cases, users will have their own functions that can provide run-time type information.

Proposal: a new syntax, valid only in return type annotations, of the form x is T where x is a declared parameter in the signature, or this, and T is any type. This type is actually considered as boolean, but "lights up" type guards. Examples:

function isCat(a: Animal): a is Cat {
return a.name === 'kitty';
}

var x: Animal;
if(isCat(x)) {
x.meow(); // OK, x is Cat in this block
}

class Node {
isLeafNode(): this is LeafNode { throw new Error('abstract'); }
}
class ParentNode extends Node {
isLeafNode(): this is LeafNode { return false; }
}
class LeafNode extends Node {
isLeafNode(): this is LeafNode { return true; }
}
var someNode: LeafNode|ParentNode;
if(someNode.isLeafNode()) {
// someNode: LeafNode in this block
}

The forms if(userCheck([other args,] expr [, other args])) { and if(expr.userCheck([any args])) would apply the type guard to expr the same way that expr instanceof t and typeof expr === 'literal' do today.

Issue 2:
I'm trying to use local installation of ts compiler and having lots of "TS2300" errors.

Step by step:

install typescript as a local npm module (npm install typescript without -g)

create some .ts source files

create tsconfig.json file

use "rootDir" entry in tsconfig.json to make typescript compile everything inside some project dir

use "outDir" entry in tsconfig.json to point output somewhere inside project dir

run tsc from local installation (./node_modules/typescript/bin/tsc -p ./)

As result I have lots of "TS2300", looks like tsc for some reason is trying to use some internal .d.ts files twice ore more.

As a workaround I've tried to add "exclude" section to tsconfig with the only "node_modules" inside it. And it worked! No "TS2300" errors anymore.

So the bug is (as it seems to me) that tsc is trying to use node_modules even when it's not inside rootDir.

PS

Please be aware that I'm new to typescript compiler and thanks in advance =)
Issue 1:
Hi,I am trying to dynamic load pytorch with dlopen in a C++ program, but something is not wrong. Here is how i am doing.

First I build libxxx.so which is dynamic linked with pytorch lib. Then I dlopen pytorch lib and libxxx.so in another program.

Which means pytorch lib is dynamic linked to libxxx.so and pytorch lib and libxxx.so is dlopened in another program in order.

Everything goes right util the end of the main function. It throws a segmentfault and its backtrace is as follow:

#0 0x0000000000000000 in ?? ()
#1 0x00007fffe7587f61 in c10::Dispatcher::deregisterDef_(c10::OperatorHandle const&, c10::OperatorName const&) ()
from lib/libtorch_cpu.so
#2 0x00007fffe75be795 in c10::RegisterOperators::~RegisterOperators() ()
from lib/libtorch_cpu.so
#3 0x00007fffe5aac15e in __static_initialization_and_destruction_0 ()
from lib/libxxx.so
#4 0x00007fffe5aac35b in _GLOBAL__sub_D_vision.cpp ()
from lib/libxxx.so
#5 0x00007ffff7de7e27 in _dl_fini () at dl-fini.c:235
#6 0x00007ffff6dac008 in __run_exit_handlers (status=0, listp=0x7ffff71365f8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true)
at exit.c:82
#7 0x00007ffff6dac055 in __GI_exit (status=<optimized out>) at exit.c:104
#8 0x00007ffff6d92847 in __libc_start_main (main=0x4156bc <main(int, char**)>, argc=7, argv=0x7fffffffd2d8, init=<optimized out>,
fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd2c8) at ../csu/libc-start.c:325
#9 0x0000000000415019 in _start ()

I think it might be caused by duplicated destruction of some resources.

Another thing is curious that the destruction seems not to happen when dlclose, but happen at the end of the main function.

I have tried everything i can, but just can't find a solution.

I will be very grateful if anybody can help.

cc @malfet @seemethere @walterddr

Issue 2:
It seems like if we use LongTensor indexing to duplicate entries of a Variable, this breaks autograd. Specifically, if any entry in a vector is duplicated, backward() only maintains gradients for the last copy of the element. Simple example:

y = Variable(torch.ones(1), requires_grad=True)
y_dup = y[torch.LongTensor([0,0])]
y_dup[1].backward() # backprop on second element
print(y.grad)
"""
Variable containing:
1
[torch.FloatTensor of size 1]"""

However:

y = Variable(torch.ones(1), requires_grad=True)
y_dup = y[torch.LongTensor([0,0])]
y_dup[0].backward() # backprop on first element, same exact value as second
print(y.grad)
"""
Variable containing:
0
[torch.FloatTensor of size 1]"""

This is version under version 0.1.11+fc48d2c, tested on 0.1.11+9f3119a as well. This happens for both cuda and cpu tensors.
Issue 1:
Using TypeScript 1.7.3.

Suppose I have the below npm packages.

The declaration files are generated by TypeScript compiler, and referred to from the other packages by means of the way described here.

package-a

ts src:

export default class ClassA {
private foo: string;
bar: number;
}

ts declaration:

declare class ClassA {
private foo;
bar: number;
}
export default ClassA;

package-b (depends on package-a):

ts src:

import ClassA from 'package-a';

namespace ClassAFactory {
export function create(): ClassA {
return new ClassA();
}
}
export default ClassAFactory;

ts declaration:

import ClassA from 'package-a';

declare namespace ClassAFactory {
function create(): ClassA;
}
export default ClassAFactory;

package-c (depends on package-a and package-b):

ts src:

import ClassA from 'package-a';
import ClassAFactory from 'package-b';

let classA: ClassA;
classA = ClassAFactory.create(); // error!!

The last line causes an error during compilation:

error TS2322: Type 'ClassA' is not assignable to type 'ClassA'.
Types have separate declarations of a private property 'foo'.

When I remove the line private foo; from the declaration of package-a, TypeScript does not emit any error.

However this workaround is a bit painful.

I understand that exposing private properties to declaration is by design (#1532).

I think TypeScript should ignore private properties when compiling variable assignment.

Or is there any better workaround for this?

Issue 2:
(This is rather difficult to search for so apologies in advance for duplicates.)

TS lacks Java-like inner classes or package-scoped visibility which makes it cumbersome to encapsulate parent-children object relationship where the child needs to manipulate parent's internal datastructure. This is not only common in many complicated object graphs but also in OO designs where an object wants to issue a limited "handle"-like object that only implements a specific subset of features.

Currently the use cases above can only be implemented by exposing the internal datasturectures to the "child" or handing out loads of lambdas. This adds more tight coupling.

An good example is the API to remove of an Element in the DOM. Currently one have to call parent.removeChild(child) which is not only clumsy but also makes it difficult for the child to impose additional logic on the removal. Ideally, we'd want to have a remove() method on the child (like in jQuery) and make the Node.removeChild() method only visible to Node implementors.

Proposed solution:

Create a pseudo- or built-in decorator that accepts a list of types. Members decorated with this can only be accessed by types listed. Alternatively, can extend the private keyword to accept an argument list like private (to A, B) name:type...
Issue 1:
Out of range axes are forbidden and raise an AxisError in numpy.expand_dims, but it seems that the rule only works to single parameter of axis, but a tuple of axes.

Reproducing code example:

import numpy as np
x = np.array([1, 2]) # x.ndim = 1
y = np.expand_dims(x, axis=2) # axis = 2 > x.ndim is not allowed, and will raise an AxisError
y = np.expand_dims(x, axis=(2, 0)) # axis = 2 > x.ndim but is allowed

Error message:

AxisError Traceback (most recent call last)

in

1 import numpy as np

2 x = np.array([1, 2]) # x.ndim = 1

----> 3 y = np.expand_dims(x, axis=2) # axis = 2 > x.ndim is not allowed, and will raise an AxisError

4 y = np.expand_dims(x, axis=(2, 0)) # axis = 2 > x.ndim but is allowed

<array_function internals> in expand_dims(*args, **kwargs)

C:\Softwares\anaconda3\lib\site-packages\numpy\lib\shape_base.py in expand_dims(a, axis)

595

596 out_ndim = len(axis) + a.ndim

--> 597 axis = normalize_axis_tuple(axis, out_ndim)

598

599 shape_it = iter(a.shape)

C:\Softwares\anaconda3\lib\site-packages\numpy\core\numeric.py in normalize_axis_tuple(axis, ndim, argname, allow_duplicate)

1325 pass

1326 # Going via an iterator directly is slower than via list comprehension.

-> 1327 axis = tuple([normalize_axis_index(ax, ndim, argname) for ax in axis])

1328 if not allow_duplicate and len(set(axis)) != len(axis):

1329 if argname:

C:\Softwares\anaconda3\lib\site-packages\numpy\core\numeric.py in (.0)

1325 pass

1326 # Going via an iterator directly is slower than via list comprehension.

-> 1327 axis = tuple([normalize_axis_index(ax, ndim, argname) for ax in axis])

1328 if not allow_duplicate and len(set(axis)) != len(axis):

1329 if argname:

AxisError: axis 2 is out of bounds for array of dimension 2

Numpy/Python version information:

Python: 3.7.7

Numpy: 1.81.1

Issue 2:
There are duplicated entries, and also e->e comes after f->f, which probably means there'll always be a conversion to float32.

>>> np.sqrt.types
['f->f', 'd->d', 'e->e', 'f->f', 'd->d', 'g->g', 'F->F', 'D->D', 'G->G', 'O->O']
Issue 1:
Hi guys!

I can't build my App, because there is a mistake about GlideApp symbol (everywhere):

Error:(315, 9) error: cannot find symbol variable GlideApp

In 4.3.1 (and before) there were no pb, and since yesterday with this new Glide version, I have this error.

I've tried:

to clean, then Build : No effect

Invalidate caches / restart (from Android Studio) : No effect

to delete "build/" folder, then clean, build : No effect

I've extended AppGlideModule (since couple of months, so I don't touch this class):

@GlideModule
public class GlideConfiguration extends AppGlideModule {
@Override
public void applyOptions(Context context, GlideBuilder builder) {
// Apply options to the builder here.

In my Gradle:

compileSdkVersion 27
buildToolsVersion "26.0.2"
...
implementation 'com.github.bumptech.glide:glide:4.4.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'
implementation 'com.github.bumptech.glide:okhttp3-integration:4.4.0'

Have you got some ideas guys?

Thank you very much!

Issue 2:
I'm trying to use glide 4.0.0-RC0 by Gradle:

dependencies {
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.caverock:androidsvg:1.2.2-beta-1'
compile 'com.github.bumptech.glide:glide:4.0.0-RC0'
compile 'com.android.support:support-v4:25.3.1'
}

I followed the example here: https://github.com/bumptech/glide/tree/master/samples/svg/src/main/java/com/bumptech/glide/samples/svg

but after add glide by Gradle, I got error: Cannot resolve symbol 'GlideApp'

My source:

package com.example.quangson.glidesvg;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import static com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions.withCrossFade;

import android.content.ContentResolver;
import android.graphics.drawable.PictureDrawable;
import android.net.Uri;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.bumptech.glide.RequestBuilder;
import com.example.quangson.glidesvg.glide.SvgSoftwareLayerSetter;

public class MainActivity extends AppCompatActivity {

private static final String TAG = "SVGActivity";

private ImageView imageViewRes;
private ImageView imageViewNet;
private RequestBuilder<PictureDrawablerequestBuilder;
LinearLayout ll;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

imageViewNet = (ImageView) findViewById(R.id.svg_image_view2);

requestBuilder = GlideApp.with(this)
.as(PictureDrawable.class)
.placeholder(R.drawable.image_loading)
.error(R.drawable.image_error)
.transition(withCrossFade())
.listener(new SvgSoftwareLayerSetter());

Uri uri = Uri.parse("http://www.clker.com/cliparts/u/Z/2/b/a/6/android-toy-h.svg");
requestBuilder.load(uri).into(imageViewNet);
}
}

Please help
Issue 1:
Copy and paste inside the Atom works. When you insert one Atom to another application it hangs up for a second and nothing sticks. Then, the clipboard is cleared. When you paste from another application in the Atom, the Atom sometimes falling, sometimes inserts. Change the frequency, once every hour or two, once every few inserts.

Issue 2:
I'm using Atom ver. 0.189.0 on Ubuntu 14.04.2 LTS. When I copy a piece of text in atom and I try to paste it the right-click menu either won't show up or will show up without giving me option to paste. The paste shortcut doesn't work either and it creates issues even if I try to copy and paste text from other programs (after I have coping something from atom). I have disable all the extra plugins, so it isn't a plugin issue. I didn't had this issue with the previous version (I am using webupd8 ppa). If I do a right click on a place where there isn't a text entry (meaning a place where it doesn't support paste anyway) the right click menu appears fine.