WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Rob Moore opened SPR-605 and commented

I needed to provide a single view which can output multiple export types (pdf, xls, etc). In the process of implementing a solution, I came up with something that may seem like a hack in some respects, but at least provides food for thought.

I've found some shortcomings to the current classes. I attempt to address these as well (which probably belong in another ticket...):

Need additional information required for Internet Explorer to properly handle content types. See http://www.lowagie.com/iText/faq.html#msie.

Need ability to specify report parameters.

Need to support for JRDataSourceProvider. This is a useful addition for those using JasperAssistant.

Need ability to specify content disposition on response (in part due to issue 1).

I attempt to resolve views by using the report name and the extension of the type I want to export. So views take the form of <view-name>.<extension> (that's the hackish part of this solution). So, for example, to resolve a view called myReport and export it to PDF, I pass in the view name "myReport.pdf."

I define the various view components using a parameters class that contains the unique aspects of each view-export type. See JasperReportsViewParameters for info.

I have attempted to use as much of the existing Jasper classes as possible, but I have had to override AbstractJasperReportsView extensively.

Here is the snippet from my *-servlet.xml:

<bean id="jasperReportsViewResolver" class="jasper.JasperReportsViewResolver">
<property name="order">
<value>1</value>
</property>
<property name="prefix">
<value>/WEB-INF/jasper/</value>
</property>
<property name="suffix">
<value>.jasper</value>
</property>
<property name="reportDataKey">
<value>reportDataSource</value>
</property>
<property name="exporterParameters">
<map>
<entry key="net.sf.jasperreports.engine.export.JRHtmlExporterParameter.IMAGES_URI">
<value>../../images/spacer.gif?</value>
</entry>
<entry key="net.sf.jasperreports.engine.export.JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET">
<bean id="java.lang.Boolean.TRUE" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"/>
</entry>
</map>
</property>
<property name="contentDispositions">
<props>
<prop key="html">inline; filename=report.html</prop>
<prop key="pdf">inline; filename=report.pdf</prop>
<prop key="xls">inline; filename=report.xls</prop>
<prop key="xml">inline; filename=report.xml</prop>
<prop key="ser">attachment; filename=report.ser</prop>
</props>
</property>
</bean>

Please feel free to contact me with questions are clarifications.

Thanks,

Rob

Affects: 1.1.3

Attachments:

jasper.tar.gz (4.25 kB)

Issue 2:
Aleksander Blomskøld opened SPR-1484 and commented

Maven 2 POMs with dependencies is missing for Spring. It's a lot of extra job for maven 2 users to find out which dependencies Spring needs, and to have to include them manually.

Attachments:

buildsources.sh (590 bytes)

spring-maven.tgz (10.81 kB)

spring-poms-1.2.8.zip (22.40 kB)

Issue Links:

#6209 maven pom hosed on repo1.maven.org ("is duplicated by")

#6533 Missing m2 POMs at ibiblio.net ("is duplicated by")

121 votes, 60 watchers
Issue 1:
Feature:

Make all Tensors have an optional list of dimension names like ['B','C','H','W']

Then the broadcasting in binary operations like

a + b

can be done according to the names (if they both have named dimensions). For example, if Tensor a has a list ['B','C','H','W'] and b has list ['C'] , then the expected result is efficiently equivalent to

a + b.view([1,-1,1,1])

This will make the broadcasting safe and very convenient to use.

Currently, because broadcasting is implicit, if something goes wrong it is a luck if a dimension mismatch happens somewhen later on or there is an out of memory error thrown.

I think it could further ease the writing of a generic code that has to work with different number of spatial dimensions (e.g. fully connected layers and conv layers), debug problems, etc. Maybe the named dimensions method be also adopted in functions to allow for the syntax like

log_softmax(axis='C')

Why the usual axis number is not sufficient? The axes are hardwired to the dimensionality. For example, the affine weight in BatchNorm is 1D, and its dimension 0 is by default not matching to the dimension 0 in e.g. the input data. So there going to be lots of these .view() commands and if you expect the input with or without spatial dimensions it is going to be more pain.

Now consider the code using named dimensions. It will pretty much work if you change the data layout (how it is linearized in the memory). Or if you increase the number of dimensions. For example, you want to extend to a siamese (or 4-stream) network processing, for which it is convenient to use 5D Tensors with dimensions 'instance', 'stream', 'channels','width','height'. Suddenly 'channels' becomes dimension number 2 instead of 1, but if dimensions are matched by names there is no problem.

Issue 2:
It would be great if there was a way to name tensor dimensions and use the names in all of the tensor methods that take dim as an argument.

images = torch.Tensor(data, dims=('batch', 'channel', 'height', 'width'))
more_images = torch.Tensor(data, dims=('batch', 'channel', 'height', 'width'))

torch.cat((images, more_images), dim='batch')

This could obviously be expanded to support axis objects that could support a basic algebra to allow using dimensions in functions like view().

Another somewhat related feature would be a way to add type annotations as proposed in this google doc:

Batch = DimensionVar('Batch')
Row = DimensionVar('Row')
Column = DimensionVar('Column')
Channel = DimensionVar('Channel', size=3)

RGBImage = NDArray[Batch, Row, Column, Channel]
GrayscaleImage = NDArray[Batch, Row, Column]

def rgb_to_grayscale(array: RGBImage) -> GrayscaleImage:
return numpy.mean(array, axis=RGBImage.axis(Channel))

Datarray: numpy with axis names

python mailing list discussion

Google doc proposing array shape annotations

Python PEP 472 proposing named indexing

cc @ezyang @gchanan @zou3519
Issue 1:
William Ashley opened SPR-6093 and commented

I currently run a patched M4 build to work around problems with @ExceptionHandler methods (and @ResponseStatus on them) not functioning with overridden methods (in my case it's due to @Transactional CGlib proxies). While patching these issues, I also changed handling of some other annotations which were being queried using Method.getAnnotation/Method.isAnnotationPresent as opposed to AnnotationUtils.findAnnotation.

I have attached my patch as a starting point. I believe I found all instances where AnnotationUtils.findAnnotation was not being used and fixed them. However, I only updated the tests for AnnotationMethodHandlerExceptionResolver. I did not feel confident with the amount of time I had to update the tests for AnnotationMethodHandlerAdapter.

I think these changes are in line with a recent checkin (revision 1852) related to inheritance of JMX annotations (#8316 #9714 and #10483).

Affects: 3.0 M4

Attachments:

mvc-annotation-inheritance.patch (7.99 kB)

Issue Links:

#10627 @ExceptionHandler on CGLib-proxied controller is ineffectual ("is duplicated by")

#10604 @Controller marked class cannot implements Comparator

Referenced from: commits 04fa5d4

1 votes, 1 watchers

Issue 2:
adi ofry opened SPR-7004 and commented

When running CronTrigger on short interval I get the task triggered sooner then requested and also get duplicates.

public void initScheduler() {

System.out.println("Got initScheduler");

taskExecutor = new ThreadPoolTaskScheduler();

taskExecutor.initialize();

taskExecutor.schedule(new Runnable() {
@Override
public void run() {
System.out.println(new Date());
}
},new CronTrigger("0/5 * * * * ?"));

}

The output is:

Got initScheduler

Thu Mar 18 17:08:19 IST 2010

Thu Mar 18 17:08:24 IST 2010

Thu Mar 18 17:08:24 IST 2010

Thu Mar 18 17:08:25 IST 2010

Thu Mar 18 17:08:29 IST 2010

Thu Mar 18 17:08:30 IST 2010

Affects: 3.0.1

Attachments:

spr-7004.zip (7.98 kB)

Issue Links:

#11646 Spring TaskScheduler not accurate ("is duplicated by")

#11525 Scheduled tasks seem to run twice

Referenced from: commits dea5918
Issue 1:
xref #9667 Now we also have string methods available on the index, the possible options for return_type ('series', 'frame') are a bit confusing I think: it will be confusing for users to get a Index back even if he/she supplies return_type='series' on a Index.str.split, or to get a series back with Series.str.split(.., return_type='index')?

Possible ways to make this a better API:

An expand keyword (or another name), that indicates for False: give same dimension back (so for series/index keep it a series/index), and for True: expand series to dataframe.

This would then be a duplicate for return_type of course. But the return_type was only introduced in 0.15.1 (and for partition it is still in a PR), so if we want to change this: better now than later. Or has this ship sailed?

easier solution of @jreback: return_type='same'|'expand' to satisfy this need? (and can be easily back-compat) -> so no need to change the name of the keyword, only the arguments.

Issue 2:
use Tempita support to provide templates for routines in hashtable.pyx. Lots of duplicated code by dtype that can easily use fused types, so code generation is needed. Following along the lines of #13716 would be nice.
Issue 1:
When installing a dependency with npm link, babel register will attempt to compile those modules instead of ignoring them like other modules in node_modules.

Issue 2:
Issue originally made by @timbur

Bug information

Babel version: 6.3.26

Node version: 4.2.0

npm version: 2.14.7

Description

Babel attempts to transform symlinks in node_modules which seems to break things.
Issue 1:
From #9562

The purpose:

transform Three to monorepository with multiple npm packages.

Why:

@sompylasar

The monorepo concept is where multiple independent packages that are published to npm separately but maintained together in a single repository. Almost like three.js repo is organized now, and almost like you described in the organization structure you posted, but all in one repo.

This structure helps maintainers to make well-integrated changes across multiple packages and release versions of them that are compatible with each other: the goals the maintainers are strive for throughout this issue thread.

Having multiple repositories puts more maintenance and process work on all the developers, having to have duplicate configurations, workflow scripts, documentation, etc.

How:

With help of some script like @donmccurdy did here.

Issue 2:
Description of the problem

I've noticed a little regression since r112 MeshToonMaterial: Stop deriving from MeshPhongMaterial. : clippingPlanes using meshToonMaterial don't work anymore. The following stacktrace appears :

THREE.WebGLProgram: shader error: 0 35715 false gl.getProgramInfoLog No compiled fragment shader when at least one graphics shader is attached. THREE.WebGLShader: gl.getShaderInfoLog() vertex ERROR: 0:224: 'vViewPosition' : redefinition

After digging a little, this problem has been confirmed and resolved with meshNormalMaterial. One of the fragment needs having the new '#define TOON' check to avoid variable duplication. In the meantime, I've overcome this issue by replacing the define in the fragment shader.

Three.js version

Dev

r113

r112

[ ]...

Browser

All of them

Chrome

Firefox

Internet Explorer

OS

All of them

Windows

macOS

Linux

Android

iOS
Issue 1:
I found this bug while trying to update a counter for the number of relationships on a node after deleting 1 or more relationships. The workaround is to count a second time.

Example 1: http://console.neo4j.org/r/3jzrwy

start n=node(0)

match n-[r?:TEST]->()

with n, COUNT(r) as c0 foreach(i in [1,2,3,4,5] :

create unique n-[:TEST]->(m {id: i}))

match n-[r?:TEST]-m

delete r, m

with n, c0

match n-[r?:TEST]->()

with n, c0, COUNT(r) as c1

match n-[r?:TEST]->()

return n, c0, c1, COUNT(r) as c2

Example 2: http://console.neo4j.org/r/6t8v0p

start n=node(0)

match n-[r?:TEST]->()

with n, COUNT(r) as c0 foreach(i in [1,2,3,4,5] :

create unique n-[:TEST]->(m {id: i}))

match n-[r?:TEST]->()

with n, c0, COUNT(r) as c1

match n-[r?:TEST]->m

delete r, m

with n, c0, c1, COUNT(r) as c2

match n-[r?:TEST]->()

return n, c0, c1, c2, COUNT(r) as c3

Issue 2:
Adding, editing and deleting properties of or to a node is not possible at the moment, although they are nicely displayed when clicking on a node in the graph visualization window of neo4js web browser
Issue 1:
Typescript 1.7.

When targeting commonjs / es6, the following typescript produces no errors on compilation:

export default function() {

var hello = "world";

}

but generates invalid javascript:

function () {

var hello = "world";

}

exports.default = default_1;

Issue 2:
Compiling the following code:

"use strict";
export default class {};

Using the command line tsc --t es6 --m commonjs produces illegal JavaScript:

"use strict";
class {
}
exports.default = default_1
;

I realize this is a weird combination of switches, however it seems necessary to target current versions of Node.js/V8 that don't yet natively support ES6 modules.
Issue 1:
This is perhaps similar or related to #13065

React version: 17.0.2

(I observe the same behavior on 18.2.0)

Steps To Reproduce

Link to code example:

https://codesandbox.io/s/react-input-caret-strange-behavior-gdd6ve?file=/src/App.tsx

Put the caret somewhere in the middle or at the beginning of the input field text.

Type something

Observe the caret behavior

The current behavior

The caret moves (jumps) to the end of the text

The expected behavior

The caret should stay in place

Issue 2:
I love that there are "invariant"s everywhere, but sometimes the errors they report aren't immediately understandable. For example, if a mixin defines a default prop that's also defined in your component, you get the lovely error:

Uncaught Error: Invariant Violation: mergeObjectsWithNoDuplicateKeys(): Tried to merge two objects with the same key: [the duplicate key was here]

It took me a while to figure out the cause. jsfiddle

Another I've run into is Each child in an array should have a unique "key" prop. Check the render method of undefined. (console.warn'd) Which happened when I had passed in an undefined function as an onClick prop.
Issue 1:
Hi,

I've been watching Deno for a while and I think what you guys have done is amazing. I started learning rust 6 months ago and the fact that you have Rust on the backend of this has me as a fan. I did wonder if there was any thought around potentially being able to compile an executable for javascript applications?

Essentially wrapping your entire JS project into a binary instead of having all your code exposed when you deploy into production. This question is more or less for the backend bits rather than the frontend. I know from a frontend perspective the browser will have to use your plain view javascript files, but I was wondering if you guys have given some thought into potentially having a flag within Deno to create a binary of your javascript service for the backend?

Thanks in advance.

Issue 2:
I was wondering if there's any plan to support compiling deno scripts into a single executable?

I saw "Single executable" as a feature, but the code that follows seems to suggest it's deno as the single executable, not the programs executed with it.

It'd be awesome to support something like go build main.go or something like zeit/pkg.
Issue 1:
event.dataTransfer.types.contains(...) is broken in Chrome.

Issue 2:
I'm currently implementing drag-and-drop in a React application where different kinds of data is dragged and dropped. This means I want to check for certain types on the event.dataTransfer object to see if drop should be enabled or not. Basically it looks like this:

onDragOver: function (event) {
if (event.dataTransfer.types.indexOf('application/x-custom-type') > -1) {
event.preventDefault();
}
}

This works fine in Chrome, but less so in Firefox. It turns out that in Firefox the type of DataTransfer.types is DOMStringList, which does not have an indexOf method. According to the latest drafts of the HTML5 specification (W3C, WHATWG), returning an array like Webkit does is correct. Obviously, the fix is easy on my side (check which one of indexOf and contains is available and use that one), but I thought it might be useful to fix this in React instead, since it is at least related to the event system.

I could probably take a stab at this, but I wanted to gauge the interest. Perhaps the DataTransfer object is deemed to be out of scope for the synthetic event handler.
Issue 1:
I've run into a number of bugs that were introduced by columns with the same name. For example, if I try to select a duplicate column from a dataframe, I get a dataframe back, which leads to confusing bugs:

df = pd.DataFrame({'name': ('jimmy', 'hortense', 'knut'), 'age': (10, 13, 20)})

df = df[['name','name','age']]

df['name']

Gives a dataframe, not a series.

Any reason for not automatically renaming duplicated columns with a .1, .2... .n or throwing an error?

Issue 2:
We currently use a slightly adapted version of the 'nature' theme (you can also see it in this list of built-in themes: http://www.sphinx-doc.org/en/stable/theming.html#builtin-themes).

I think this can use an update, for some reasons:

a mobile friendly theme (more and more useful, and currently this completely fails on mobile)

more powerful theme (allowing eg better nested structure of the docs, which could enable a reorganisation of the docs. Now we have a single flat table of contents on the left)

refreshed look (but this is subjective of course :-))

(could go together with a refresh of the main website as well, but not necessarily I think)

http://www.writethedocs.org/guide/tools/sphinx-themes/
Issue 1:
Moved from webpack-contrib/mini-css-extract-plugin#501

Operating System: Mac OS Catalina

Node Version: 12.15.0

NPM Version: 6.13.4

webpack Version: 4.41.4

mini-css-extract-plugin Version: 0.9.0

Expected Behavior

Rules order is consistent between development and production

Actual Behavior

Rule order is defined by imports order in development, and by usage order in production

Code / How Do We Reproduce?

https://github.com/Hypnosphi/style-loader-duplicates/tree/mcep

Note that I import a before b, but use b before a. This leads to text being red in dev and blue in prod

import {a} from './a.css'
import {b} from './b.css'

document.body.innerHTML = `<div class="${b} ${a}">Text</div>`

Issue 2:
Do you want to request a feature or report a bug?

Bug

What is the current behavior?

CSS seems to be out of order in "development" vs "production" mode. It appears somehow related to sideEffects and tree shaking.

If the current behavior is a bug, please provide the steps to reproduce.

Here's a repo demonstrating the issue: https://github.com/brycehill/webpack-css-order.

There are instructions in the readme. Basically, if you build in development mode, the outputted CSS is different from production mode.

What is the expected behavior?

CSS order is consistent from one environment to another.

I don't want to depend on a specific CSS order, but I do expect it to be consistent from when I develop to when I build for production.

If this is a feature request, what is motivation or use case for changing the behavior?

N/A

Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.

Node: v8.9.1

Webpack: v4.6.0

OS: MacOS High Sierra
Issue 1:
I found --start-at-task one of the most useful features for debugging late-in-playbook tasks.

ansible-playbook -i hosts site.yml --start-at-task="Name of a task"

Previously this worked (though you had to take care you used the full phrase with no spelling errors").

Now, it always just skips over all tasks starting at the named task.

Has there been a change in how this feature works?

I just pulled the latest from github (oct 10th), and see the same behavior.

I can reproduce this on any task in my playbook.

kesten

Issue 2:
Simple test case:

# file: playbook.yml

---
- hosts: 127.0.0.1
connection: local
roles:
- test

# file: roles/test/tasks/main.yml

---
- name: foo
debug: msg=foo

$ ansible-playbook playbook.yml --start-at-task='foo'
PLAY [127.0.0.1] *************************

GATHERING FACTS **************************
ok: [127.0.0.1]

PLAY RECAP *******************************
127.0.0.1 : ok=1 changed=0 unreachable=0 failed=0
Issue 1:
Just upgraded to atom 1.0 on Ubuntu 14.04, and realized that the zooming feature (crtl + either + or -, or using ctrl and the mouse wheel) changes font size, but also jumps to a different position in the document.

To me it looks like the position is maintained in form of pixels from the top of the document, but when for example zooming out (crtl + -), more text fits within those pixels, so that I end up way down in my document.

Would be cooler if instead of the pixel from top the current line was maintained.

Issue 2:
Issue 1:
Context:

Playwright Version: 1.25.1

Operating System: Linux 5.17 Pop!_OS 20.04 LTS

Node.js version: v16.14.2 LTS

Browser: All

Extra: N/A

Code Snippet

Folder input component:

...
const onFolderChange = () => {
const files = ref.current ? ref.current.files : null
if (files && files.length > 0) {
for (let i = 0; i < files.length; i += 1) {
console.log(`name: "${files[i].name}"`)
console.log(`path: "${files[i].path}"`)
console.log(`webkitRelativePath: "${files[i].webkitRelativePath}"`)
}
}
}
...
return (
...
<input
style={{ display: 'none' }}
id="file"
type="file"
ref={ref}
multiple
onChange={onFolderChange}
/>
)

Test:

test('folder can be opened and navigated', async () => {
const electronApp = await electron.launch({ args: ['src/main.prod.js'] })
const rendererWindow = await electronApp.firstWindow()

rendererWindow.addListener('console', (msg) => {
console.log('rendererWindow msg:', msg)
})

const folderInput = rendererWindow.locator('input#file')

await folderInput.setInputFiles(['e2e/mocks/test_file_1.txt', 'e2e/mocks/test_file_2.txt'])

console.log('files:', await folderInput.getAttribute('files'))

await electronApp.close()
})

Describe the bug

I've been trying to test a file input element. Using the multiple property on the element lets me select a folder. Unfortunately, although the file names are correct, the file paths on the files from the files property are missing.The files definitely exist since ENOENT: no such file or folder is not thrown. Unfortunately this is breaking my e2e test because my component performs validation on the file paths before setting state.

I've also tested the <input> component without the multiple prop passed and only passing one relative filepath as a string to setInputFiles. This didn't set the paths either.

Also, the files property on the element returns null from my test, which seems incorrect but isn't as big of a deal.

Test output:

rendererWindow msg: name: "test_file_1.txt"
rendererWindow msg: path: ""
rendererWindow msg: webkitRelativePath: ""
rendererWindow msg: name: "test_file_2.txt"
rendererWindow msg: path: ""
rendererWindow msg: webkitRelativePath: ""
files: null

Issue 2:
Context:

Playwright Version: 1.25

Operating System: Mac

Node.js version: 16

Browser: All

Code Snippet

await page
.locator("text=Add Folder(s)")
.setInputFiles([
"tests/testData/Site100/P2-73305-001_100_001_2022-02-02_OCT_02.png",
"tests/testData/Site100/116_154_IMG_0095_OD_4.jpg",
]);

My app relies on the relative path of the folder where the files are contained in order to implement some logic on the upload. I get this from the File.webkitRelativePath read only attribute. The problem is that when using setInputFiles that attribute seems to be an empty string.

Is any workaround for this?

Thanks in advance!