WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Mauricio Noda opened SPR-6744 and commented

While creating a custom Spring Security AuthenticationProvider I stumbled on the need for instances of both HttpServletRequest and HttpServletResponse. There´s no way to easily access them. Modifying org.springframework.web.context.request.RequestContextListener to register both instances in Spring request scope would be ideal.

I´m trying to integrate Spring Security with Weblogic Servlet Authentication. (http://download.oracle.com/docs/cd/E15051_01/wls/docs103/javadocs/weblogic/servlet/security/ServletAuthentication.html)

I see it becoming a major issue for any web container as JSR-196, which has the same problem, made its way into JEE 1.6 specification.

Affects: 3.0 GA

Issue Links:

#11409 Make HttpServlertRequest and HttpServletResponse available for injection ("is duplicated by")

Issue 2:
Matthew Sgarlata opened SPR-637 and commented

I recently went on a little odyssey fixing a bug that ended up giving me much more insight into the JavaMail framework than I ever wanted ;)

To make a long story short, I think we should include additional file extension to mime type mappings in Spring. I think this is in line with Spring's goal of simplifying J2EE APIs, because providing mappings for these simple file types will alleviate reading up on the Java Activation Framework when you just want to send an email :)

Now the whole story:

JavaMail (and Spring... good work!) use the Java Activation Framework to resolve filename extensions to mime types. The default mime types built into the framework are defined in activation.jar\META-INF\mimetypes.default. They are rather meager, and don't even include types in widespread use such as PNG and CSS. Here are the types that are included in the Java Activation Framework version 1.0.2:

text/html	html htm HTML HTM

text/plain	txt text TXT TEXT java c c++ pl cc h

image/gif	gif GIF

image/ief	ief

image/jpeg	jpeg jpg jpe JPG

image/tiff	tiff tif

image/x-xwindowdump	xwd

application/postscript	ai eps ps

application/rtf	rtf

application/x-tex	tex

application/x-texinfo	texinfo texi

application/x-troff	t tr roff

audio/basic	au

audio/midi	midi mid

audio/x-aifc	aifc

audio/x-aiff aif aiff

audio/x-mpeg	mpeg mpg

audio/x-wav wav

video/mpeg	mpeg mpg mpe

video/quicktime	qt mov

video/x-msvideo	avi

Fortunately, there is a simple mechanism to extend the list of file types. Just drop a mime.types file in your META-INF folder. (See http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/activation/MimetypesFileTypeMap.html for more information).

Attached is such a file, based on the types listed at http://www.utoronto.ca/webdocs/HTMLdocs/Book/Book-3ed/appb/mimetype.html. I used my discretion to remove some of the types listed, but hopefully the attached mime.types file will work for most use cases.

In terms of packaging this file with Spring, I'm not really sure the best approach. Here are two thoughts:

Place the file in dist/META-INF

Include the file in spring.jar/META-INF

Attachments:

mime.types (7.11 kB)

mime.types (7.60 kB)
Issue 1:
It is already possible to use functions with lambda bodies as class properties:

class C {
currentTime = () => Date.time();
}

Perhaps they could also be used with getters and setters?

class C {
..
get currentTime = () => Date.time();
set endTime = (time) => this.timer.setEndTime(time);
}

Edit: or using an even cleaner syntax suggested by @kitsonk

class C {
..
get currentTime() => Date.time();
set endTime(time) => this.timer.setEndTime(time);
}

Since getters and setters (especially getters) are frequently one-liners, this may turn out to be a very handy feature.

I'm not sure whether ES6/7 already supports/plans to support this though, but if this would turn out to make sense in general, perhaps they could consider it as well?

Issue 2:
Issue 1:
Problem description

Floating label text is overlapping the pre-populated value of a SelectField component

Steps to reproduce

Look at the component page

I'm using Chrome.

Images & references

Issue 2:
Problem description

Floating Labels (0.15.3) render like this:

in 0.15.2 they looked like this:

### Steps to reproduce

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

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

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

Versions

Material-UI: 0.15.3

React: 15.3.0

Browser: Chrome
Issue 1:
In some cases, we may want to have a function that read one field of an object identified by a parameter. Here is a small synthetic use case, for the purpose of the discussion:

interface Help {
brief: string;
detailed: string;
contextual: string;
}

function getHelpString(help: Help, format: string): string
{
return help[format];
}

In that particular case, the type checker cannot ensure that we are doing things right. In order to make the type checker happy, we need a way to tell it that format is actually part of an implicit enumeration that only contains the names of the fields of the interface Help. This could be done by introducing a new type inference operator, for example fieldof.

function getHelpString(help: Help, format: fieldof Help): string
{
return help[format];
}

This may not look like a very common use case, but I hoped to have such an operator in order to port incrementally a large amount of javascript code to typescript.

Issue 2:
When I create a blank node.js console app then in the project properties select "redirect to output folder" the output continues going to the default location.

You can see this in the small project at: https://github.com/kevinpas/Klib6

(look at branch AddVS15)
Issue 1:
If a child component requires an input (like the HeroDetailsComponent has, which is the selectedHero), it can't be loaded dynamically. There's no way to instantiate a child component with inputs this way.

Issue 2:
I'm submitting a ... (check one with "x")

[X] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

Throwing error during runtime: ORIGINAL EXCEPTION: not implemented

Expected/desired behavior

Working router with angular 2 in web worker

Reproduction of the problem

Set up bootstrapping angular 2 on web worker like so: https://github.com/angular/angular/tree/master/modules/playground/src/web_workers/kitchen_sink

Add and use "@angular/router": "3.0.0-alpha.6"

What is the expected behavior?

Working without errors.

What is the motivation / use case for changing the behavior?

Using web workers with the new router

Please tell us about your environment:

Angular version: 2.0.0-rc.2

Browser: all

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

Expected Behavior

Get the input html tag under select

Current Behavior

Get only an object with value field

Steps to Reproduce (for bugs)

Try to render MySelect from

const setData = (e) => console.log(e.target)
export const MySelect = () => (
<FormControl fullWidth>
<InputLabel htmlFor="age-simple">Civilité</InputLabel>
<Select
value={'Monsieur'}
onChange={setData}
input={<Input />}
label={'Civilité'}
name='civility'
>
<MenuItem value={'Mr'}>Monsieur</MenuItem>
<MenuItem value={'Mme'}>Madame</MenuItem>
</Select>
</FormControl>
)

Look at your console

Context

I need to get the name field of my Select

However this one is not present in the triggered event

Your Environment

Ubuntu 17.04 (64bit)

Tech
Version

Material-UI
1.0.0-beta.12

React
15.6.1

browser
Chrome 61.0.3163.100 (64bit)

node
8.1.4

npm
5.4.2

create-react-app
1.4.0

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

Expected Behavior

Their should be a method to compensate for the dialogs bahavior when it opens. The dialog remove the scroll bar when it opens. When the site contains fixed elements that causes the element to move slightly.

Current Behavior

I was not able to find a method to solve this issue with the current possibilities.

One way to solve the problem is to stop the removal of the scrollbar. This approach requires a way to diable the compensation in element like the AppBar etc.

The other method could be some kind of Component og props that allows the fixed element to compensate in the same way as the AppBar.

Steps to Reproduce (for bugs)

Go to https://codesandbox.io/s/znwvvwq404

Observe the face icon and the "right" text in the red box.

Click the "Open Dialog" button

Observe the position of the face icon and the "right" text in the red box.

Context

I tried to have fixed tabs right below the AppBar. In order to do that i wrapped the tabs in a div and fixed it. After that i used flexbox to center the Tabs.

Your Environment

Tech
Version

Material-UI
1.0.0-beta.16

React
15.6.1

browser
Google Chrome Version 61.0.3163.100
Issue 1:
var a = [1, 'abc'] as [number, string];

var [b, c] = a;
[a].forEach(([d, e]) => {
alert(d);
alert(e);
});

There's something amiss with the typing in the above code snippet. TypeScript can figure out that b is a number and c is a string, it can even figure out that the callbackFn of my forEach is a (value: [number, string], index: number, ...) => void, but it says d and e are any. I'd have expected it to also know that these are number and string respectively.

Issue 2:
Paste this snippet in the playground:

const result = [{ foo: 'hello' }]
.map(({ foo }) => foo)
.map(foo => foo);

If you hover over foo in the first map() call, you'll notice that its type is any (should be string).

The type of result is correctly inferred to be string[], though. It just seems that there is no type information for destructured function parameters.
Issue 1:
The e2e framework deleteNs needs to be smarter to better help triage issues in this space, as they all typically tend to be unique snowflakes particular to a problem with the node, pod, container runtime itself and rarely the controller that fundamentally drives deletes.

Ideas:

deleteNS caches the set of Events in the namespace prior to invoking deletion, in cases of failure, logs all events that occurred in that namespace prior to the delete to know if there was an unexpected error event

log all pods in YAML or JSON in internal API version to see their state as observed from the API server to give clues as to why they are hung. @lavalamp @smarterclayton - is there a good one liner that I can reference that takes a pod and outputs to YAML?

log all information about nodes in YAML or JSON format that have pods actively scheduled against them that are not terminating (would help us know if there was a node problem encountered).

Input from others would be appreciated, but this seems like the general purpose issue that is often really hard to diagnose and debug during each release since we don't capture any information to help localize why the error happened.

@kubernetes/sig-api-machinery @kubernetes/rh-cluster-infra

Issue 2:
Get all -l'app=cassandra' {{range.items}}{{range .metadata.labels}}{{.}}:{{end}}{{end}}
Expected: cassandra:cassandra:cassandra:
Got: cassandra:cassandra:cassandra:cassandra:
Issue 1:
Version

2.5.1

Reproduction link

https://jsfiddle.net/tbonz/0xx2wxjn/

Steps to reproduce

In the provided jsfiddle, choose option 'three' from the dropdown, the selected option displayed instead shows 'one'.

What is expected?

It is expected that the option selected would be displayed. Using a unique key for each option has no effect either.

What is actually happening?

It's not showing the option selected, and instead choosing another option with the same value.

Issue 2:
Vue.js version

2.0.3

Reproduction Link

https://jsfiddle.net/dede89/rq049kpp/

Steps to reproduce

Click on change button to update the array.

What is Expected?

The dom should update and display "James" and "Bill"

What is actually happening?

Only "James" is displayed. The following warning is logged on the console:

[Vue warn]: It seems there are duplicate keys that is causing an update error. Make sure each v-for item has a unique key.

And then an exception is the raised:

Uncaught (in promise) TypeError: Cannot read property 'tag' of undefined(…) lign 4044
Issue 1:
Currently, we can perform a limited set of logic in the type definition, such as:

type A
a::eltype(Vector{Int})
end

but we can't involve a type parameter, such as:

type B{V <: AbstractVector}
a::eltype(V)
end

AFAICT, at the moment the field types A.types is calculated when the type is defined and type parameters are inserted into the correct slots as they become known.

However, it would be nice if the types could be calculated by arbitrary inferrable or @pure functions. Another simple example (close to my heart) would be:

immutable StaticMatrix{M,N,T}
data::NTuple{M*N, T}
end

However this results in an error that multiplication is not defined for TypeVars. Instead, I need all of this code:

immutable StaticMatrix{M,N,T,L}
data::NTuple{L, T}
function StaticMatrix(d)
check_params(Val{L}, Val{M}, Val{N})
new(d)
end
end

@generated function check_params{L,M,N}(::Type{Val{L}}, ::Type{Val{M}}, ::Type{Val{N}}) # could also be `@pure` in v0.5
if L != M*N
error("Type parameters don't match")
end
end

and my users need to foist around the redundant L paramater when they need to specify a concrete type.

For abstract types, I'm hoping that inference itself could still be used to come up with a least-pessimistic approximation of each field, or otherwise just use Any when that's not possible. If that makes it difficult to avoid regressions, straight types (combinations of types and the relevant TypeVars with apply_type but no other functions) could keep functioning as they currently do.

Issue 2:
Now that we have staged functions (or whatever name that will converge out of the discussion in #7474), can we be more greedy and request something similar to define types, i.e. where the type definition depends on the value of the parameters in a more general way than can currently be expressed?

This would allow the easy implementation of fixed size / stack allocated arrays ( #7568 ), and the construction of @timholy in #8432 to build custom types to be used in the cartesian iterators clearly expresses the need for this. It can also have many other interesting uses. NTuple{N,Int} and Tuple{Int,Int,Float} (in the notation of #8470 ) could be special cases (although I guess there are technical reasons that they need to be implemented separately?).
Issue 1:
Hello together,

the -= assignment seems to break for matrices > (90,90).

Reproduction

import numpy as np
for a in xrange(200):
px=np.arange(a)
#px=np.random.random(a)
dx = np.repeat(px[np.newaxis, :], a, axis=0) - np.repeat(px[:, np.newaxis], a, axis=1)
dx2 = np.repeat(px[np.newaxis, :], a, axis=0)
dx2 -= dx2.T
if len(np.nonzero(dx-dx2)[0]) != 0:
print a
break

I'm using numpy version 1.8.1.

Cheers,

Stephan

-------

Edit: I tested it on different machines:

It gives out

91 onnumpy version 1.6.2, 1.8.0 and 1.8.1.

3 on 1.3.0

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/2075 on 2012-03-07 by trac user lxop, assigned to unknown.

When I try to write to the transpose of an array, I get

AttributeError: attribute 'T' of 'numpy.ndarray' objects is not writable

which seems fine, but the write has actually taken place.

In particular, this occurs with in-place operations (+= etc).

Test code:

a = np.array ([1,2,3]).reshape ((1,3))
b = np.array ([4,5,6]).reshape ((3,1))
a.T += b

The result is the above error is raised and the operation actually goes ahead anyway. I would expect only one or the other.
Issue 1:
Version

2.6.10

Reproduction link

https://codesandbox.io/s/vue-template-7rsmp

Steps to reproduce

componentInstance via this.$slots.foo[bar] which are filled with new v-slot syntax is undefined.

For example:

this.$slots.myslot[0].componentInstance // returns undefined

What is expected?

Should return VueComponent instance

What is actually happening?

undefined is returned

Old slot="xxx" syntax properly returns VueComponent instance in componentInstance property

Issue 2:
Version

2.5.17-beta.0

2.5.16

Reproduction link

https://codepen.io/anon/pen/rKwWXq?editors=1010

Steps to reproduce

Open the console

What is expected?

An instance of MyComponent should be logged

What is actually happening?

undefined is logged

This worked in 2.5.15

It also works if you change RootComponent to be non-functional:

const content = h(MyComponent, {}, this.slots.default)

I'm guessing this was caused by 62a922e, cloneVNode doesn't include that property.
Issue 1:
Search for “AUTO_STYLE” returns two API entries in the search results. Both link to the same API page.

Searching for that in the API search revealed two entries as well: (1) in core, which is deprecated and (2) in animations.

Curiously BOTH pages present the SAME content … the content for the one in animations. The info about the deprecated AUTO_STYLE in core doesn’t appear. The browser address bar shows the two different paths to that content.

There is an API filter for deprecated so clearly we intend to show deprecated objects in the API search. The bug there is that we show the non-deprecated animations content in the deprecated core link.

This may be a symptom of a deeper problem with API pages that have the same title. It is unusual ... perhaps bad ... but not impossible for two different modules to have an object with the same name (that's what is happening here with AUTO_STYLE). If that is OK, then the content should be different. I think a bug is causing the last-generated content to be assigned to all links with the same title.

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Issue 2:
While playing with Angular 2, I realized that the order of providers at bootstrapping is important, but I did not understood why. It would be great if someone can explain it.

HASHLOCATIONSTRATEGY DID NOT WORK

bootstrap(APP, [JSONP_PROVIDERS, provide(LocationStrategy, { useClass: HashLocationStrategy }), provide(APP_BASE_HREF, {useValue: '/'}), ROUTER_PROVIDERS]);

HASHLOCATIONSTRATEGY WORKED

bootstrap(APP, [JSONP_PROVIDERS, ROUTER_PROVIDERS, provide(LocationStrategy, { useClass: HashLocationStrategy }),provide(APP_BASE_HREF, {useValue: '/'})]);
Issue 1:
🚀 Feature request

Google has recently released PEGASUS, a new model for text summarization: https://ai.googleblog.com/2020/06/pegasus-state-of-art-model-for.html. I think It would be interesting to have it included in Transformers library. The code and checkpoints are here: https://github.com/google-research/pegasus. This model seems to accomplish human-like summarization.

Issue 2:
🌟 New model addition

Model description

https://ai.googleblog.com/2020/06/pegasus-state-of-art-model-for.html?m=1

https://arxiv.org/abs/1912.08777

Abstract

Recent work pre-training Transformers with self-supervised objectives on large text corpora has shown great success when fine-tuned on downstream NLP tasks including text summarization. However, pre-training objectives tailored for abstractive text summarization have not been explored. Furthermore there is a lack of systematic evaluation across diverse domains. In this work, we propose pre-training large Transformer-based encoder-decoder models on massive text corpora with a new self-supervised objective. In PEGASUS, important sentences are removed/masked from an input document and are generated together as one output sequence from the remaining sentences, similar to an extractive summary. We evaluated our best PEGASUS model on 12 downstream summarization tasks spanning news, science, stories, instructions, emails, patents, and legislative bills. Experiments demonstrate it achieves state-of-the-art performance on all 12 downstream datasets measured by ROUGE scores. Our model also shows surprising performance on low-resource summarization, surpassing previous state-of-the-art results on 6 datasets with only 1000 examples. Finally we validated our results using human evaluation and show that our model summaries achieve human performance on multiple datasets.

Open source status

the model implementation is available: https://github.com/google-research/pegasus

the model weights are available: https://github.com/google-research/pegasus

who are the authors: Jingqing Zhang @JingqingZ, Yao Zhao @yaozhaogoogle, Mohammad Saleh and Peter J. Liu
Issue 1:
Open new atom window.

Cmd+w (leaves behind a empty window)

Cmd+r

Causes:

Uncaught ReferenceError: jQuery is not defined /Applications/Atom.app/Contents/Resources/app/node_modules/bootstrap/js/tooltip.js:213

Issue 2:
Since I updated to 0.45.0 today, I'm getting the following error in the console after using Atom for a few minutes:

Uncaught ReferenceError: jQuery is not defined
/Applications/Atom.app/Contents/Resources/app/node_modules/bootstrap/js/tooltip.js:213

Atom version: 0.45.0

User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Atom/0.45.0 Atom-Shell/0.7.6 Safari/537.36
Issue 1:
In step 11 of the "Build a Personal Portfolio Webpage" the word "several" is repeated.

Issue 2:
Challenge Name

Slice and Spice

Issue Description

Using the Chrome debugging tools I looked at the result, arr1 and arr2 and they seem to meet the expected output. To clone the array I have tried arr2.slice() and Array.from(arr2), but the test results stay the same.

Expected results

Results say that response is not in the right order

frankenSplice([1, 2], ["a", "b"], 1) should return ["a", 1, 2, "b"]

The first array should remain the same after the function runs.

The second array should remain the same after the function runs.

Browser Information

Browser Name, Version: Chrome Version 52.0.2743.116 m

Operating System: windows 7 64 bit

Mobile, Desktop, or Tablet:

Your Code

function frankenSplice(arr1, arr2, n) {

var result = Array.from(arr2);

for (var i=0;i<arr1.length;i++)

{

result.splice(n+i,0,arr1[i]);

}

return result;

}

frankenSplice([1, 2], ["a", "b"], 1);

Screenshot
Issue 1:
Elasticsearch version:

2.3

JVM version:

1.8.0

OS version:

Windows 7

Description of the problem including expected versus actual behavior:

I have set cors conf in elasticsearch.yml like this

http.cors.enabled : true http.cors.allow-origin : "*" http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type, Content-Length

When requesting elasticsearch from file:///C:/elastic/index.html i got the following error

Request header field Content-Type is not allowed by Access-Control-Allow-Headers

I switched to 2.2 version and i set the same parameters and it works like a charm

Steps to reproduce:

1.Set cors parameters in elasticsearch.yml

2.Request elasticsearch from an url like this: file:///c:/..

Issue 2:
Elasticsearch version: 2.3.0

JVM version: 1.8.0_31

OS version: MAC OS X 10.10.5

Description of the problem including expected versus actual behavior:

Definition of an accepted a custom header does not seem to work.

Steps to reproduce:

Add the following lines to the configuration file

http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"

Ran an ajax POST request with X-User header.

Getting response "Request header field x-user is not allowed by Access-Control-Allow-Headers in preflight response."