WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
VSCode Version: Version 0.10.10 / 5b5f4db

OS Version: Mac OS X Yosemite 10.10.5 / 14F1605

Steps to Reproduce:

Save a new file with a .js extension

Add some JS code

Expected

I'll see a full range of syntax highlighting

Actual

I'm surprised that keywords like var, let, const, and function are not being highlighted.

I've seen this on other people's machines as well.

I can't imagine that I'm the first one to notice this. Is this by design? Is there some JS support extension I'm supposed to install?

Maybe this issue should be going to microsoft/vscode-textmate but I'm not sure.

Thanks!

Issue 2:
0.10.10 (Feburary build) has a regression is that the following JavaScript keywords are no longer highlighted in the Dark Visual Studio & Light Visual Studio themes:

var let const function get set class interface module namespace

This only affects JavaScript (not TypeScript).

The workaround if to switch to the Dark+ Default and Light+ theme.

Note that there are other colorizing issues open, not caused by this regression: e.g. 'import' and 'from'. See microsoft/TypeScript-TmLanguage#37
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I'm trying to upgrade from Next 4.2.3 to 5.1. I have styletron set up as per the example provided here with a few tweaks to make it work for version 3 of styletron. When using Next 5.1, the server side rendering isn't rendering the styles correctly. Client-side rehydration is still happening. This is causing a flash of unstyled content when loading a page for the first time.

Current Behavior

In the example, the styletron object is loaded in the getInitialProps function of a custom Document. In 4.2.3, this object is there, but for some reason it's undefined/null in 5.1+.

See here: https://github.com/zeit/next.js/blob/canary/examples/with-styletron/pages/_document.js#L7

Steps to Reproduce (for bugs)

yarn create next-app --example with-styletron with-styletron-app

Remove styletron-client and styletron-server from package.json, add styletron at ^3.0.0 and update styletron-react to ^3.0.0

Change line 11 in styletron.js to const Styletron = require('styletron-client').default.

Run the development server, experience the flash of unstyled content. Also observe that the <style> tag that should be re-hydrated is empty.

Try it on 4.2.3. No flash of unstyled content. The rehydrated <style> tag is not empty.

In 5.1.0, the styletron object on this line is undefined/null when server side rendering happens.

Context

Just trying to upgrade to 5+ to take advantage of the improvements! I'd be more than happy to update the styletron example to the latest version of styletron if we can get this working.

Your Environment

Tech
Version

next
5.1.0

node
8.1.3

OS
Mac

browser
Chrome

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

Expected Behavior

My app run smoothly.

Current Behavior

Throw error

Steps to Reproduce (for bugs)

I have typescript project, which I cannot use .babelrc to my project. So I decided to make custom babel config via webpack (next.config.js).

This is my custom config in my next.config.ts

module.exports = {
webpack: (config: Webpack.Configuration) => {
(config.module as Webpack.NewModule).rules.push({
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
plugins: [
[require('babel-plugin-module-resolver'), {
root: './',
alias: {
'@': './app'
}
}]
]
}
}
})

return config
}
}

That will throw an error

error in ./dist/pages?entry

Module build failed: Error: Plugin 0 specified in "base" provided an invalid property of "defaultExtensions"

Any solution to write babel config via webpack config without .babelrc file?

Context

Your Environment

Next.js version: next

Environment name and version (e.g. Chrome 39, Node.js 5.4): node 8

Operating System (Linux, maxOS, Windows): macOS
Issue 1:
Original ticket http://projects.scipy.org/scipy/ticket/425 on 2007-05-25 by @cournape, assigned to @cournape.

It looks like the scipy.stats module needs some updating. First, there are now some duplicate with numpy functionality. Also, the API do not match between numpy and scipy. Eg :

#!python
from numpy.random import randn
from scipy.stats import mean
a = randn(10, 10)
print a.mean()
print mean(a)

What is the feeling of other people on changing the module so that numpy and scipy behaviour match for all moments related function (mean, variance, kurtosis, etc...) ?

Issue 2:
To avoid duplication of the same question, can you please check out this topic on stackoverflow? http://bit.ly/TVcbz4
Issue 1:
Pretty regularly, when I create a file in a project, ctrl-p won't reveal the new file in results unless I drill into Preferences, check, and then uncheck, Exclude VCS Ignored Paths. After that, the new file shows up as expected.

Issue 2:
I really don't know when this is happening. But it seems that sometimes when I add files with touch file.txt the fuzzy-finder does not list it, and you have to close the window and reopen it to show it (reload window also works). Worth noting is that it appears as it should in the tree-view.
Issue 1:
Joern Huxhorn opened SPR-7924 and commented

org.springframework.web.servlet.config.AnnotationDrivenBeanDefinitionParser

executes

messageConverters.add(createConverterBeanDefinition(MappingJacksonHttpMessageConverter.class, source));

at line 187 in spring-webmvc-3.0.5.RELEASE

There is no way that I'm aware of to configure the created MappingJacksonHttpMessageConverter instance.

I'd need to set the ObjectMapper of this instance so it's able to use my MixIn configuration (special handling of certain data types defined using serializationConfig.addMixInAnnotations or deserializationConfig.addMixInAnnotations) and other ObjectMapper configuration.

Otherwise, serializing e.g. a java.awt.Dimension is guaranteed to explode.

Is there any way to configure it that I'm missing? I searched quite extensive but couldn't find anything so far. Any workaround would be highly appreciated, even a hacky, temporary one...

This issue may be related to #11397.

Affects: 3.0.5

Issue 2:
Martin Zeltner opened SPR-1142 and commented

Example:

file1.xml:

<beans>

<import resource="classpath:common/common-config.xml"/>

...

</beans>

file2.xml:

<beans>

<import resource="classpath:common/common-config.xml"/>

...

</beans>

If I load now an application context which has "file1.xml" and "file2.xml" as config locations, the file "common-config.xml" will be loaded twice. I suggest to remember the url of already loaded config files.

Thanks,

Martin

Affects: 1.2.1

Attachments:

SPR-1142-xml-application-context-import-once-2010-01-05.patch (17.65 kB)

Issue Links:

#14160 Ignore duplicated import files or property-placeholder files

#12263 When a bean definition is overridden, detect whether the definition has changed and log accordingly

67 votes, 52 watchers
Issue 1:
Please see https://github.com/microsoft/PowerToys/wiki/Application-Compatibility

Issue 2:
Summary of the new feature/enhancement

Option for launcher that lets you choose between showing just file/folder results vs other kinds of results. (similar to how alfredapp works on mac)

Why? I usually use the launcher because I want a file/folder or an app - I know this before pressing the launcher hotkey. Launcher then shows me both files and apps and I have to visually filter out the one I want.

Proposed technical implementation details (optional)

Press a specific key (e.g. space) as the first character in the launcher input box means, 'only show me files or folders'. If the specific key isn't the first character typed, show non-file/folder results only.
Issue 1:
The module source looks like:

import parseIRI from './iri';
import typeProcessors from './typeProcessors';
import * as qs from './qs';
import {
clone,
defaults,
parseResponseHeaders,
createResult,
startsWith,
callHandlers
}
from './helpers';
export default Pajax;
export * from './iri';
export * from './qs';

I'm setting a resolveModuleSource function which is providing a normalized value for all of these dependencies.

The resulting output looks like:

System.register('github:n-fuse/pajax@0.1.7/pajax', ['npm:babel-runtime@5.1.11/helpers/create-class', 'npm:babel-runtime@5.1.11/helpers/class-call-check', 'npm:babel-runtime@5.1.11/helpers/define-property', 'npm:babel-runtime@5.1.11/core-js/promise', 'npm:babel-runtime@5.1.11/core-js/object/keys', 'github:n-fuse/pajax@0.1.7/iri', 'github:n-fuse/pajax@0.1.7/typeProcessors', 'github:n-fuse/pajax@0.1.7/qs', 'github:n-fuse/pajax@0.1.7/helpers', './iri', './qs'], function (_export) {
// ...
});

That is, the duplicated names aren't being normalized properly.

Note it should also be fine to dedupe dependencies at this level, as long as the first use order is maintained.

Issue 2:
Feature Request

I have an idea in my head. Not sure if it's already implemented.

In JavaScript modules, Babel could detect same strings and create one small variable for that.

Then It would replace those duplicates with that variable. It could prevent the JS engine from creating strings every single time.

It might even decrease the file size. Like Google does it with CSS class names.

Example

// Original
const doBlah = _ => {
const arr = [
{ name: "John", age: 19 },
{ name: "Sophia", age: 12 },
{ name: "Max", age: 45 }
];

console.log(arr[0]["name"]);
console.log(arr[1]["name"]);
console.log(arr[2]["name"]);

console.log(arr[0]["age"]);
console.log(arr[1]["age"]);
console.log(arr[2]["age"]);

arr.push({ name: "Kate", age: 23 });

console.log(arr[3]["name"]);
console.log(arr[3]["age"]);
};

// Babel (Without converting back to es5)
const doBlah = _ => {
const arr = [
{ name: "John", age: 19 },
{ name: "Sophia", age: 12 },
{ name: "Max", age: 45 }
];

// Extra variables
var a = "name", b = "age";

// Replacing strings with variables
console.log(arr[0][a);
console.log(arr[1][a]);
console.log(arr[2][a]);

// Replacing strings with variables
console.log(arr[0][b]);
console.log(arr[1][b]);
console.log(arr[2][b]);

arr.push({ name: "Kate", age: 23 });

// Replacing strings with variables
console.log(arr[3][a]);
console.log(arr[3][b]);
};
Issue 1:
🐛 Bug

It seems there is an issue with the pip installation of 1.1. After upgrading, I get an error when calling import torch.

To Reproduce

Steps to reproduce the behavior:

Install torch==1.1.0 with pip

Traceback (most recent call last):

File "", line 1, in

File "/anaconda3/envs/torch/lib/python3.6/site-packages/torch/init.py", line 79, in

from torch._C import *

ImportError: dlopen(/anaconda3/envs/torch/lib/python3.6/site-packages/torch/_C.cpython-36m-darwin.so, 9): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib

Referenced from: /anaconda3/envs/torch/lib/python3.6/site-packages/torch/lib/libshm.dylib

Reason: image not found

Expected behavior

The torch package should import...

Environment

PyTorch version: N/A

Is debug build: N/A

CUDA used to build PyTorch: N/A

OS: Mac OSX 10.14.4

GCC version: Could not collect

CMake version: Could not collect

Python version: 3.6

Is CUDA available: N/A

CUDA runtime version: Could not collect

GPU models and configuration: Could not collect

Nvidia driver version: Could not collect

cuDNN version: Could not collect

Versions of relevant libraries:

[pip3] numpy==1.16.3

[pip3] torch==1.1.0

[conda] blas 1.0 mkl

[conda] mkl 2019.3 199

[conda] mkl-service 1.1.2 py37hfbe908c_5

[conda] mkl_fft 1.0.10 py37h5e564d8_0

[conda] mkl_random 1.0.2 py37h27c97d8_0

Issue 2:
🐛 Bug

I tried to install PyTorch, but I can't use it. It can't link dynamic library libomp.dylib

To Reproduce

Steps to reproduce the behavior:

pipenv install torch torchvision

from torch.utils.data import Dataset

Traceback (most recent call last):
File "/Users/kaspersapala/Documents/Airly/new-pollution-forecast/Datasets/__init__.py", line 3, in <module>
from torch.utils.data import Dataset
File "/Users/kaspersapala/.local/share/virtualenvs/new-pollution-forecast-BSetKF9E/lib/python3.7/site-packages/torch/__init__.py", line 79, in <module>
from torch._C import *
ImportError: dlopen(/Users/kaspersapala/.local/share/virtualenvs/new-pollution-forecast-BSetKF9E/lib/python3.7/site-packages/torch/_C.cpython-37m-darwin.so, 9): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib
Referenced from: /Users/kaspersapala/.local/share/virtualenvs/new-pollution-forecast-BSetKF9E/lib/python3.7/site-packages/torch/lib/libshm.dylib
Reason: image not found

Expected behavior

Being able to use and import PyTorch

Environment

PyTorch Version (e.g., 1.0): 1.1.0

OS (e.g., Linux): Mac OS Mojave

How you installed PyTorch (conda, pip, source): pipenv

Python version: 3.7.1
Issue 1:
Always fire first element callback.

<ul>
<li
v-repeat="todos"
v-on="click:callback"
>
{{content}} : {{done}}
</li>
</ul>

var demo = new Vue({
template: demo_template,
data: {
title: 'todos',
todos: [
{callback: function(){console.log(this.$index);}},
{callback: function(){console.log(this.$index);}}
]
}

All element retrun 0. My code is wrong?

Issue 2:
Version

2.6.10

Reproduction link

https://github.com/meditatingdragon/starter-gridsome-vuetify

Steps to reproduce

Have gridsome as a dependency (or whatever depends on vue-server-renderer) and observe GitHub and Snyk.

What is expected?

No vulnerabilities

What is actually happening?

XSS vulnerability caused by an outdated version of serialize-javascript (i.e. older than v2.1.1).

I tried highlighting this issue in the discord server but it didn't seem that people cared.

https://npmjs.com/advisories/1426
Issue 1:
Applying an invalid style will use property from previous render. This can cause some hard to pin down bugs since you may inadvertently be applying invalid styles but not notice because the style on the previous render was fine. But then rendering later on with the same props/state will cause a different style to be applied, because of what happened on the previous render.

React version: 17.0.2

Steps To Reproduce

Apply a valid style property to a component (e.g backgroundColor: red)

Apply an invalid style property to a component (for example: backgroundColor: 5)

note: Background stays red

Change state to apply a valid style (or no style) (e.g backgroundColor: white)

note: background is now white

Change state to apply an invalid style again

Note that the background stays white, even though it has the same props as step 2 when it rendered red

Link to code example:

https://codesandbox.io/s/frosty-water-hwbj6

Click change then clear then change again to see it in action.

The current behaviour

When a style object property is invalid, it applies style property from the previous render

The expected behaviour

I think the sensible thing to do would be:

Display a warning in development mode if a property is invalid

Remove any the previous style property from the element if the property passed is invalid.

However I think as long as it does the same thing regardless of props passed in the previous render it is acceptable.

Issue 2:
Consider, for example, a relatively generic <Field /> component:

var fieldCounter = 0;

var Field = React.createClass({
getInitialState: function() {
return { inputId: 'field-' + ++fieldCounter };
},
render: function() {
var props = this.props,
inputId = this.state.inputId;

return (
<div className='field'>
<label htmlFor={inputId}>{props.label}</label>
<input type={props.type} id={inputId} name={props.name} value='' />
</div>
);
}
});

In order for the <label /> tag to be semantically related to the <input /> tag, we obviously need to match the for attribute to the <input /> tag's id attribute. Outside of that requirement, however, we have no need of the id attribute, so a solution like the one above is convenient as it handles that all internally, with no need for a consuming component to pass in an actual id value.

The problem I'm running into, however, is that this causes the id attributes generated client-side to mismatch what was sent down by the server (the client-side fieldCounter restarts at 0 on every load, whereas the server-side reference obviously just keeps growing).

This mismatch then results in an error being thrown:

Invariant Violation: You're trying to render a component to the document using server rendering [...]

So, my question is this: am I overlooking an obvious solution here? I would like for the <Field /> component to be able to simply internalize the id generation as an implementation detail, but I can't seem to come up with a good mechanism for then matching up that id generation client-side.

Thanks in advance!
Issue 1:
In #8990 we added a WPT runner, and the entire WPT test suite to the repo. We are now able to run web platform tests. Currently only a very limited amount of tests is enabled, and many tests will fail once we enable testing them. We would like to get more coverage for our built in Web APIs. I have listed all of the suites that are potentially relevant for us below.

Compression (once we add CompressionStream and DecompressionStream)

Broadcast Channel API (#10527)

Console API (#9013)

DOM APIs

abort/event.any.js

Encoding (#9004)

HR Time

monotonic-clock.any.js

window-worker-timeOrigin.window.js requires blob URL support for workers

HTML

webappapis/atob

webappapis/timers

webappapis/microtask-queuing

various tests from browsers/the-window-object

Fetch API (ignore tests related to same site policy, like CORS)

Requires relative fetch (#7369)

Headers (#10199)

Request (#10203)

Response (#10203)

fetch (#10203)

File API

WHATWG Stream API

URL API (#9046)

User Timing (self.perfomance)

WebGPU (once we land it)

WebSockets

Workers (not the SharedWorker tests)

WASM

If you would like to enable one of these suites (and fix the resulting issues), please comment on the issue so we don't have multiple people working on the same suites.

Issue 2:
I'm trying to make a proxy server that analyzes the response body for each request.

The problem comes when using res.clone() after the request has been proxied, I try to save the body data after the server responds, and then return the response to the client like this

const body = await res.clone().body.json().catch(console.error)
await req.respond(res.clone()).catch(console.error)

And the server throws error: Uncaught TypeError: Failed to execute 'clone' on 'Response': Response body is already used because the body stream seems to be the same and it has finished reading.

I've tried getReader() too but it's not implemented yet

Here is a minimum reproducible gist

Meanwhile... is there any workaround of this issue?

Thanks!
Issue 1:
marc schipperheyn opened SPR-9418 and commented

I have been playing around with RedirectAttributes and although I like the FlashAttribute function, I don't really like the way it has been implemented.

For me, FlashAttributes come into play in the GET/POST/Redirect/displayStatus chain. What I don't like is that FlashAttributes aren't a transparent part of the ModelMap but instead separated through RedirectAttributes. I would prefer to say

model.addFlashAttribute(...) in stead of having the specify RedirectAttributes separately redirectAttributes.addFlashAttribute(...).

Also, when I add a FlashAttribute to a Model/RedirectAttributes and I don't redirect, I expect the FlashAttribute to be treated as a normal model attribute. and because they are separate, it isn't.

In the flow of a Controller, whether one redirects often depends on the context. And because RedirectAttributes are separate from ModelAttributes (when they are conceptually the same), I find myself having to duplicate certain actions, which is exactly what I want to avoid.

if(!member.isActive()){
redirectAttributes.addFlashAttribute("status","Denied",RequestUtils.getLocale(request)));
model.addAttribute("status","Denied",RequestUtils.getLocale(request)));
}

if(group.isHiddenToNonMembers()){
return "empty";
}else{
return "redirect:" + URLUtils.getGroupUrl(group, request);
}

What I would expect is to have a single action against the ModelMap

model.addFlashAttribute(...)

if the controller redirects, it is treated as a flash attribute

if the controller doesn't redirect, it treated as a model attribute

No further details from SPR-9418

Issue 2:
Leigh Anderson opened SPR-9176 and commented

New entries are added to dependentBeanMap and dependenciesForBean map every time that a new instance of the request-scoped bean is created. This is because the proxy object representing the HttpServletRequest has a bean name like "$Proxy10@XXXXX" where XXXXX changes for each request. These entries are never removed, and eventually fill up the old generation.

Attached is a web application which demonstrates the issue. Visit "http://localhost:8080/leak" repeatedly and watch the count increase.

Affects: 3.0.5

Attachments:

dridi-spring-9176-quickfix.patch (1.74 kB)

request-memory-leak.tar.gz (3.41 kB)

Sub-tasks:

#14000 Backport "Scoped-proxy memory leak w/ @Resource injection"

Issue Links:

#12420 memory leak occurs in SpringMVC(DefaultListableBeanFactory.dependentBeanMap, DefaultListableBeanFactory.dependenciesForBeanMap) ("is duplicated by")

#14261 Regression: scoped beans being cached too aggressively

3 votes, 4 watchers
Issue 1:
Feature Request

OpenCV already provides its own IMPORTED library targets. For example:

opencv_calib3d
opencv_core
opencv_dnn
opencv_features2d
opencv_flann
opencv_gapi
opencv_highgui
...

However, I hope OpenCV can provide this form pkg::comp or pkg::pkg of IMPORTED library targets. For example:

opencv::calib3d
opencv::core
opencv::dnn
opencv::features2d
opencv::flann
opencv::gapi
opencv::highgui
...

Because lots of other libraries take it.

Some examples of other libraries

fmt::fmt

CLI11::CLI11

libevent::core

Poco::Data

spdlog::spdlog

Qt6::Core

protobuf::libprotobuf

Boost::regex

Eigen3::Eigen

...etc

Issue 2:
While the syntax :: seems to be more modern and conventional in cmake, it has a obvious benefit.

The following won't get any error until the linking time with a undefined reference error to cv::imshow.

find_package(OpenCV 3.3 REQUIRED COMPONENTS core)
target_link_libraries(myExe opencv_core opencv_highgui)

But if using opencv::highgui, we get a configuration error from cmake:

Target "myExe" links to target "opencv::highgui" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
Issue 1:
Q
A

Bug report?
yes

Feature request?
no

BC Break report?
no

Symfony version
3.3

I was playing with Symfony Flex when I noticed this:

Create a project with Symfony Flex:

$ composer create-project symfony/skeleton:3.3.x-dev my_project/
$ cd my_project/
$ make serve

Browse http://localhost:8000/

Problem 1: I still see the old exception page design ... because TwigBundle is not installed. I'll propose a solution for this in a separate issue.

Install TwigBundle:

$ composer req twig-bundle

Browse http://localhost:8000/

Problem 2: I can see the new design ... but everything is broken because the JavaScript features are not enabled because we link to src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig and that file does not exist (because WebProfilerBundle is not installed).

Install WebProfilerBundle:

$ composer req profiler

Browse http://localhost:8000/

Now everything works as expected.

TwigBundle is not "a real bundle" because is not standalone. If WebProfilerBundle is not installed too, it doesn't work.

Which solution do you propose? The obvious one would be duplicating the WebProfilerBundle's base_js.html.twig file in TwigBundle too. What do you think?

Issue 2:
Q
A

Bug report?
no

Feature request?
no

BC Break report?
no

RFC?
no

Symfony version
3.4

That's because of #24562, so this is actually a duplicate.

BUT, we can fix this one now, by not using FQCN ids internally. This has to be done NOW, before the release.

WDYT?