WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
First I just indexed 2 documents:

curl -XPUT http://192.168.0.118:9200/test/company/apple -d '{data:"Apple corp"}'

curl -XPUT http://192.168.0.118:9200/test/fruit/apple -d '{data:"Just red apple"}'

According to example above we have test index with 2 documents (both with "apple" id) in different types.

When we make curl -XGET http://192.168.0.118:9200/test/_mget?pretty -d '{ids:["apple","apple"]}'

We see this:

{

"docs" : [ {

"_index" : "test",

"_type" : "fruit",

"_id" : "apple",

"_version" : 1,

"found" : true, "_source" : {data:"Just red apple"}

}, {

"_index" : "test",

"_type" : "fruit",

"_id" : "apple",

"_version" : 1,

"found" : true, "_source" : {data:"Just red apple"}

} ]

}

As you can see documents are duplicated.

So if we request curl -XGET http://192.168.0.118:9200/test/_mget?pretty -d '{ids:["apple","apple","apple"]}' we will see 3 documents in result set and so on.

I think the right way to resolve this issue is to ignore duplicate identificators in "ids" parameter.

Issue 2:
First I just indexed 2 documents:

curl -XPUT http://192.168.0.118:9200/test/company/apple -d '{data:"Apple corp"}'

curl -XPUT http://192.168.0.118:9200/test/fruit/apple -d '{data:"Just red apple"}'

As you can see, they have same id and placed in same index,but different types.

Ok, next I perform multi get request:

curl -XGET http://192.168.0.118:9200/test/_mget?pretty -d '{ids:["apple"]}'

Response:

{

"docs" : [ {

"_index" : "test",

"_type" : "fruit",

"_id" : "apple",

"_version" : 1,

"found" : true, "_source" : {data:"Just red apple"}

} ]

}

As you can see only one document returned. Why not both? I find such behavior very ambiguous. I think if we request whole index, so all documents with given id should be returned regardless of type.
Issue 1:
Is it possible to add option batch_first = True for MultiheadAttention and transformer modules like it is done for RNN ?

Batch x Sequence x Embedding

I find it more understandable and intuitive when batch_first is true

Issue 2:
🚀 Feature

Like recurrent nets (nn.RNN, nn.GRU, nn.LSTM etc) nn.Transformer is missing batch_first defualt parameter

Motivation

torchtext BuckterIteror also has batch_first default parameter hence if nn.Transformer would have batch_first, it will save the dimension permutation

Pitch

A conditional statement inside the nn.Transformer's forward method to check whether batch_first is True or not we can permute inside the nn.Transformer module if required

cc @albanD @mruberry @zhangguanheng66
Issue 1:
What problem does this feature solve?

I am trying to integrate Vue with Meteor Blaze and am working on rendering of Vue components from Blaze templates. I would like to programmatically create an Vue instance (new Vue(...)) and pass it props and args which would be equivalent to doing <vue-component :prop="propValue" :arg="argValue">. So an object of key/values which would then be mapped to props, if keys are among props, or be set as element attributes otherwise. But the important part is to also be able to update all of them afterwards. So if any of the props or args change, allowing to call a function to update them would be great.

What does the proposed API look like?

I propose that propData could be a function. So that I could provide a reactive function which would be used to populate both props and args (so any keys returned from the function which are not props would become args).

Alternatively. we could have vm.$propsUpdate function which I could run to update props and args in a more imperative way.

Issue 2:
Version

2.6.14

Reproduction link

codesandbox.io

Steps to reproduce

View the codesandbox render result

What is expected?

The custom element render the json content

What is actually happening?

The custom element render "[object Object]"

Accorading to source code:

vue/src/platforms/web/runtime/modules/dom-props.js

Line 49
in
0603ff6

elm.value = strCur

, any prop name 'value' on dom element will be stringified, but when using custom elements, the 'value' prop may be an object or number and it should not be stringified.
Issue 1:
Using Typescript 1.7.3.

Here is some sample code:

var MainMenu:React.StatelessComponent<{}> = (props)=>(<div>
<h3>Main Menu</h3>
</div>);

var App:React.StatelessComponent<{children}> = ({children}) => (
<div >
<MainMenu/>
</div>
);

The line containing <MainMenu/> inside App will throw this error msg:

Error:(5, 3) TS2605: JSX element type 'ReactElement<any>' is not a constructor function for JSX elements.
Property 'render' is missing in type 'ReactElement<any>'.

At first I thought this was #6349 but even assigning a type to props in MainMenu doesnt help.

Issue 2:
Not that I want to do that. But just for creating a quick demo I did that and it fails to compile:

const Foo = (props:any) => <div/>;
const foo = <Foo/>; // Error : render is missing

Of master from yesterday 🌹
Issue 1:
The nomenclatures Bootstrap 3 relating to the sizes of the buttons remain the same Bootstrap 2. By placing btn-xs does not, however, put the btn-mini works perfectly.

Look: http://jsfiddle.net/theus/jFsG7/2/

Issue 2:
To increase/decrease the size of form controls, you can add the classes input-lg or input-sm (at least according to the website [http://getbootstrap.com/css/#forms] - which is the most consistent solution). In the css code, however, the classes are called input-large and input-small.
Issue 1:
This is likely related to, or the same issue as these 3: #6687 #6802 #6516

It appears that using compiler hints for types causes issues with bundle.

Take this example:

index.ts

// @deno-types="./foo.d.ts"
import * as Foo from './foo.js';

console.log(Foo.bar);

foo.js

export const bar = 'string';

foo.d.ts

export as namespace Foo;
export const bar: string;

If I just do deno run index.ts it runs without error.

If I do deno bundle index.ts app.js && deno run app.js, then I get this output:

Bundle file:///home/mcpqndq/repos/typeHintTest/index.ts
Emit "app.js" (2.51 KB)
error: Uncaught TypeError: Cannot read property 'bar' of undefined
console.log(Foo.bar);
^
at execute (file:///home/mcpqndq/repos/typeHintTest/app.js:112:29)
at gExp (file:///home/mcpqndq/repos/typeHintTest/app.js:90:7)
at __instantiate (file:///home/mcpqndq/repos/typeHintTest/app.js:97:27)
at file:///home/mcpqndq/repos/typeHintTest/app.js:117:1

Not going to go through it of course, but removing the hint the error goes away.

Issue 2:
https://eslint.org/docs/rules/require-await

There is an eslint rule of require-await which would catch this as well. With TypeScript checking the return type it is very unlikely enforcing this would cause incorrect behaviour.

@kitsonk I did a quick check and we'd have to add a lot of supressions to tests (because there's a lot of mocks that assert async functions were called). I'm open to that change, but I'd open a new issue for that.

Originally posted by @bartlomieju in #4384 (comment)

A new rule "require-await" should be added to .eslintrc.json; then code in core/, cli/ and std/ should be linted accordingly.
Issue 1:
Thanks for next.js , I think it's awesome and has enabled me to progress a universal website much quicker than I could of done trying to build it out from scratch!

I have added an entry point in my config for a component that ends up in the /static folder, this is a script that I am loading onto a script tag on componentDidMount and accessed via a Web Worker:

const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
const { ANALYZE } = process.env
const path = require('path');

module.exports = {
webpack: function (config) {
console.log(config);
if (ANALYZE) {
config.plugins.push(new BundleAnalyzerPlugin({
analyzerMode: 'server',
analyzerPort: 8888,
openAnalyzer: true
}))
}

return Object.assign({}, config, { entry: function() {
return config.entry().then((entry) => {
return Object.assign({}, entry, { '../static/components/canvasAnim.js': './components/CanvasAnim'})
})
}})

return config;

}
}

My script is working in dev, but when I build it does not seem to get touched. I was expecting this to end up all minified. So when I run the code in prod, React complains with: Error: Minified React error #130;

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

Expected Behavior

I don't think I am describing a bug here, probably something I am missing around the way next.js config works!

Current Behavior

During build the entry does not seem to be touched.

Steps to Reproduce (for bugs)

Add an entry point that maps to static and then build

Your Environment

Tech
Version

next
latest

node
8.6.0

OS
macOs 10.12.6

browser
chrome 61

etc

Issue 2:
The client bundle always includes node-libs-browser, even if it is unnecessary. Removing it would reduce a hello world Next.js app page load by 19.62 KB (2.02 KB min gzip):

This package is necessary if using process.browser, but this is currently only used in examples and can be replaced easily with typeof window !== 'undefined'.

I don't know the best way to remove it, as it is included by Webpack. Here are some related links:

https://medium.com/walmartlabs/webpack-optimization-a-case-study-92b130334b6c

webpack/webpack#4976

webpack/webpack#4995

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

Expected Behavior

The client bundle does not include node-libs-browser if it's unnecessary.

Current Behavior

The client bundle includes node-libs-browser even if it's unnecessary.

Steps to Reproduce (for bugs)

Follow the basic Next.js setup instructions.

Follow the basic @zeit/next-bundle-analyzer setup instructions to see the problem visually.

Your Environment

Tech
Version

next
v5.1.0 (or v6.0.0-canary.3)

node
v9.10.0
Issue 1:
TypeScript Version:

1.8.6

Code

import {Component} from 'angular2/core';

@Component({
selector: 'igx-test',
directives: [Test],
templateUrl: 'app/ngTest/Templates/Test.html'
})

export class Test {
//test
constructor() {
console.log("ng2 is working");
}
}

<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<TypeScriptNoImplicitAny>False</TypeScriptNoImplicitAny>
<TypeScriptGeneratesDeclarations>False</TypeScriptGeneratesDeclarations>
<TypeScriptModuleKind>none</TypeScriptModuleKind>
<TypeScriptTarget>ES5</TypeScriptTarget>
<TypeScriptRemoveComments>False</TypeScriptRemoveComments>
<TypeScriptCompileOnSaveEnabled>True</TypeScriptCompileOnSaveEnabled>
<TypeScriptSourceMap>False</TypeScriptSourceMap>
<TypeScriptModuleResolution>node</TypeScriptModuleResolution>
<TypeScriptOutFile />
<TypeScriptOutDir />
<TypeScriptNoEmitOnError>False</TypeScriptNoEmitOnError>
<TypeScriptMapRoot />
<TypeScriptSourceRoot />
<TypeScriptExperimentalDecorators>true</TypeScriptExperimentalDecorators>
</PropertyGroup>

Expected behavior:

Visual studio finds the module ''angular2/core' with:

<TypeScriptModuleResolution>node</TypeScriptModuleResolution>

has full IntelliSense and no build errors.

Actual behavior:

There is a IntelliSense error ("Cannot fine module angular2/core") and no auto completion; the msbuild and build on save both work fine however. The IntelliSense works fine when I put:

<TypeScriptModuleResolution>NodeJs</TypeScriptModuleResolution>

in the proj xml. If I do this I get the must be 'node' or 'classic' error when I use msbuild. Build on save works fine still.

Issue 2:
TypeScript Version:

nightly (1.9.0-dev.20160422)

Current code in tslint.json:

{
"rules": {
"semicolon": true
}
}

Desirable code:

{
"rules": {
"semicolon": [true,
"always"
]
}
}

Description:

According to the TSLint spec and their json scheme, value of semicolon option should be array. So, When I use vscode-tslint, vscode show error message. this is noizy.
Issue 1:
Have an old Flutter SDK

Run flutter upgrade

=> we recommend running flutter upgrade 😄

C:\Users\mit\dev>flutter upgrade
Updating flutter tool...
╔════════════════════════════════════════════════════════════════════════════╗
║ WARNING: your installation of Flutter is 44 days old. ║
║ ║
║ To update to the latest version, run "flutter upgrade". ║
╚════════════════════════════════════════════════════════════════════════════╝

Upgrading Flutter from C:\Users\mit\dev\github\flutter...

Issue 2:
Steps to Reproduce

When using the CLI to upgrade the local Flutter installation (using flutter upgrade), the CLI provides a warning that the installations is XY days old and that flutter upgrade should be run in order to update the installation.

Expected behavior

When running flutter upgrade this warning should be suppressed.
Issue 1:
VSCode Version: 0.10.11

OS Version: OS X El Capitan 10.11.4

Node Version: 5.10.1

Steps to Reproduce:

Launch code from terminal code .. It fails with the following error -

File "<string>", line 1
import os,sys; print os.path.realpath(sys.argv[1])
^
SyntaxError: invalid syntax
/usr/local/bin/code: line 10: ./MacOS/Electron: No such file or directory

It used to work perfectly alright before the OS X upgrade to 10.11.4. Just to be sure, I uninstalled code from PATH and installed it again through command palette but no luck.

Issue 2:
Just installed 0.10.10 and installed the code shell command:

$ code --help
File "<string>", line 1
import os,sys; print os.path.realpath(sys.argv[1])
^
SyntaxError: invalid syntax
/usr/local/bin/code: line 10: ./MacOS/Electron: No such file or directory

VS Code itself works fine if I launch it via Spotlight.

I believe the problem is that I had a Python virtual environment active, and python points to Python 3. If I try code outside of that virtualenv, where python means Python 2, everything works fine.

I guess the options are:

Make the launch script Python 2/3 compatible. (Step one would probably be to add from __future__ import print_function and update the print statements accordingly.)

Do some extra work to guarantee that you launch the system Python and not the user's configured Python, though this is probably not a viable long-term approach since distributions like Fedora now default to Python 3 and don't even install Python 2 by default.
Issue 1:
I'm submitting a ... (check one with "x")

[x] bug report

Current behavior

Change detections running outside of zones have no effect.

Expected behavior

Either the change detection should succeed or an explicit error should be thrown.

Minimal reproduction of the problem with instructions

Demo: http://plnkr.co/edit/wtB971qbdZivPSyTkpvj

Cause an event to occur outside of Zone.js

Attempts to effect changes resulting from that event in an Angular component

(note: this also happens when the change detection strategy on OnPush)

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

In general, any events that happen outside of Zones. My situation came about as a result of listening to paused / play events on a video element, which apparently Zone.js does not wrap properly or did not wrap in this situation. It could also easily happen if a first or third-party module initializes some routine when it is first imported on which events can be fired.

This would have been substantially more difficult to debug if it happened deep in some such 3rd party dependency 😛

Please tell us about your environment:

Irrelevant. OSX Sierra, VS Code.

Angular version: 2.0.2

Browser: all

Language: all

Issue 2:
Hello!

On directives I have detected the following problem:

If you include coreDirectives and NgFor in the same component, the ng-for instruction will be executed two times.

Example in this plunker: http://plnkr.co/edit/tFGJVjO3z78GEXCTKFh4?p=preview

I think the framework need report an error with this info or render only one time the ng-for...

Thanks and sorry my bad english 😄
Issue 1:
Version

2.5.13

Reproduction link

https://jsfiddle.net/x78pz6u1/7/

Steps to reproduce

click emit1, alert something, no problem.

click switch.

click emit2, alert again, not expected!

What is expected?

not alert when I click the button emit2

What is actually happening?

alert when I click the button emit2

not considering the edge case: listeners are removed on component reuse.

perhaps a bug at line 260 in v2.5.13/src/core/instance/lifecycle.js

Issue 2:
Version

2.5.13

Reproduction link

https://codepen.io/posva/pen/baeJzd?editors=1111

Steps to reproduce

define a custom component witch emit custom event;

use v-if v-else create 2 component instances;

on first instance use v-on listen the custom event, the second DONOT;

toggle the v-if condition;

emit the custom event on the second instance

What is expected?

the listener on the first instance not been triggered

What is actually happening?

the listener on the first instance been triggered
Issue 1:
EDIT: title was change from 'HTML Widget' to 'Support for styling text with html markup' after the discussion

Hello,

I know that the question has been asked before about the possible support for rendering html content simirarly as the native platforms do, and that the answer was that it wasn't planned: #25 #7311

But I've also seen the comment by @DaveShuckerow from Dec 2017 https://github.com/flutter/flutter_markdown/issues/19#issuecomment-350358715 that there is a plan to release a widget that is being used and developed internally at Google.

Being able to show html content is a critical part of our small project now and we don't really have the resources to develop this on our own.

So I would like to ask whether it would be possible for you guys to make that widget available in it's current state? Like a preview version, or even just a gist that we could use clearly at our own risk without any guarantees. It would be a big help for us.

(If you didn't want to publish it publicly yet, but maybe can send it in private, my email is: edit: removed)

Thanks for any response in advance

Issue 2:
Presumably this requires some compositor work, similar to maps or video?
Issue 1:
I opened this thread at StackOverflow and had my worst suspicions enforced that this is not idea for my personal private vision (aka use case) for THREE in general.

http://stackoverflow.com/questions/35075432/how-to-change-a-boxs-dimensions-size-after-creation

I think it would be nice that if in any new THREEtype declaration you could simple pass it an Object aka JSON with standard format for values and have it create and/or assign them that way is idea for a more transparent implementation (I aspire to achieve).

So for BoxGeometry passing an object to the constructor like {dim:{width:1, height:1, depth:1}} (and castShadow etc. would work as well as passing the 3 arguments (+ any others, a benefit). I think it actually exists in "parameters:" and not dim.

This reminds me of what might be another change request where object merging got an error when setting position (in that case doing it per key works [x, y, z] but I still have to check every key for "position" and handle it differently) of a light with this way of constructing the object.

I think they should all be callable with nothing THREEtype and just have defaults. For box it would be 1, 1, 1 and I guess you could scale to size and have that become potentially animated too.

So the question is would the scaling effect children (but I guess that's suppose to go back to StackOverflow where there's a special way to turn that off or something I am recalling), except I'm asking about a better solution for constructors and wondering what superior alternative I'm missing otherwise.

Anyway I'm thinking one bit of code can generate all object types from an like so.

let item = {type:"BoxGemoetry", size:{w:2, h:1, d:5}};
let thing = new THREE[item.type](item);

and have it skip things it doesn't know like type, maybe a second array of skipKeys, which is self explanatory.

Also I feel ideally you should be able to adjust them later, call it reuse. One case might be to pool created objects and then be able to re-purpose and reuse them. Sounds like that's impossible in cases with Geometry without blotting code but would be a nice idea. Geometry like a box should be able to change it's dimensions, no? I'd argue animate, but I'm sensing the confines of GL say otherwise.

Issue 2:
I was trying to instance a geometry, but i find it too hard to manipulate. The scenario is this. I have a geometry & shader of some over-used thing in my game. But having to manage a lot of instances separately is really difficult when every attribute of every instance is somewhere on an array, and it's even more difficult when you want to destroy some instances and create new ones still drawing the ones you need. I came to the conclusion that is better to add some abstraction layer to this cases, in which i'm interested of program it.

I made some idea of the API that i think would be good, to make more developer-friendly instances, that manages by itself all the memory exchange to the GPU. Here

:)
Issue 1:
Hopefully you can see a demonstration here, although it may depend on your browser font sizes: http://jsbin.com/hofeg/2/edit

If the tooltip appears too close to the edge of the container, then the browser reshapes it to stay inside the container. Tooltip doesn't properly account for this change in size.

It seems to attempt to; at the end of applyPlacement it tried to reposition the arrow:

this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], arrowPosition)

Before this line, the arrow is actually in the right place. After it, the arrow has moved to somewhere behind the tooltip, so it's not visible.

Issue 2:
The placement of the tooltip arrow appears to get cached in some situations, meaning it won't always be centered. Please see a reduced test case: http://jsfiddle.net/ytD5t/8/
Issue 1:
import matplotlib.pyplot as plt
import matplotlib.patches as mpatch

fig, ax = plt.subplots()
arrow = mpatch.FancyArrowPatch((0, 0), (0.8, 0.8))
ax.add_artist(arrow)

plt.show()

FancyArrowPatch defaults to arrowstyle='simple', which according to the docstring should set

head_length=0.5,head_width=0.5,tail_width=0.2

however, this definitely isn't the case.

Current master branch installed from source, python 3.6, OSX.

Issue 2:
Bug report

Adding a FancyArrowPatch to an axis changes the result returned by get_path(). I would expect adding an artist to an axis to have no effect on its path in data co-ordinates.

Code for reproduction

import matplotlib.pyplot as plt
import matplotlib.patches as mpatch

# Create arrow patch
arrow = mpatch.FancyArrowPatch((0, 0), (0, 1))

# Print original path
print(arrow.get_path())
# Add to an axis
fig, ax = plt.subplots()
ax.add_artist(arrow)
# Print new path
print(arrow.get_path())

Actual outcome

Path(array([[-0.1 , 0. ],
[-0.1 , 0.25195312],
[-0.1 , 0.50390625],
[-0.25 , 0.50390625],
[-0.125 , 0.75195312],
[ 0. , 1. ],
[ 0.125 , 0.75195312],
[ 0.25 , 0.50390625],
[ 0.1 , 0.50390625],
[ 0.1 , 0.25195312],
[ 0.1 , 0. ],
[-0.1 , 0. ],
[-0.1 , 0. ]]), array([ 1, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 2, 79], dtype=uint8))

Path(array([[ -2.01612903e-04, 5.40924072e-03],
[ -2.01612903e-04, 4.99324011e-01],
[ -2.01612903e-04, 9.93238781e-01],
[ -5.04032258e-04, 9.93238781e-01],
[ -2.52016129e-04, 9.93914224e-01],
[ 0.00000000e+00, 9.94589667e-01],
[ 2.52016129e-04, 9.93914224e-01],
[ 5.04032258e-04, 9.93238781e-01],
[ 2.01612903e-04, 9.93238781e-01],
[ 2.01612903e-04, 4.99324011e-01],
[ 2.01612903e-04, 5.40924072e-03],
[ -2.01612903e-04, 5.40924072e-03],
[ -2.01612903e-04, 5.40924072e-03]]), array([ 1, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 2, 79], dtype=uint8))

Expected outcome

Clearly the two paths are different - I expected them to be the same (and I would expect the first one to be the correct one based on the FancyArrowPatch docstring).

Matplotlib version

Operating System: OSX

Matplotlib Version: master branch

Python Version: 3.6.1