WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I'm wanting to include Bootstrap in a Drupal distribution that I'm working on. Because I'm using the Drupal.org packaging system, I cannot include Bootstrap because the APLv2 is not compatible with GPLv2 (which is what all code on Drupal.org must be licensed as, per our license policy: http://drupal.org/licensing/faq#q4)

I was wondering if you'd be willing to either release Bootstrap under another license (in parallel to the Apache license) that would be compatible with our packaging system, or license Bootstrap specifically to Drupal.org contributors under a compatible license.

Issue 2:
In HTML5, <fieldset> gains support for the disabled attribute, allowing you to disable an entire fieldset at once. However, Bootstrap does not seem to style all input elements under disabled fieldsets appropriately; some aren't grayed-out like individually disabled input elements. They should be.

(Re-reporting since #5605 was somehow erroneously closed as a duplicate of itself.)
Issue 1:
When trying to use object spread in function parameters with default parameter present, transform-object-rest-spread doesn't apply.

Input Code

Minimal test case in REPL . Transform doesn't apply after adding default parameter.

const b = ({ x, ...rest } = {}) => {};

Babel Configuration (.babelrc, package.json, cli command)

Expected Behavior

Transform applies also when default parameter is present.

Current Behavior

Transform doesn't apply when default parameter is present.

Possible Solution

Context

I was trying to use object-rest-spread in node 6 without babel plugins for natively supported ES6 features.

Your Environment

software
version

Babel

node

npm

Operating System

Issue 2:
With latest transform-object-rest-spread 6.19.0 and without transform-es2015-destructuring, transform-es2015-parameters, such code:

function fn({a = 1, ...b} = {}) {
return {a, b};
}

remains the same after transformation

function fn({a = 1, ...b} = {}) {
return {a, b};
}

Without default object = {} it is transformed as expected to

function fn(_ref) {
let { a = 1 } = _ref;
let b = (0, _objectWithoutProperties3.default)(_ref, ["a"]);

return { a, b };
}
}

Babel Configuration (.babelrc)

{
plugins: [
['transform-object-rest-spread', {useBuiltIns: true}]
]
}
Issue 1:
Electron Version: 2.0.7 and 3.0.0-beta5

Operating System (Platform and Version): Windows7 7601

Last known working Electron version: 3.0.0-beta5

Expected Behavior

Render behavior of electron is the same as chrome.

Actual behavior

left: chrome right: electron-3.0.0-beta5 + electron-vue

Electron is more blur than chrome.

Issue 2:
Electron version: 1.7.4, 1.6.11

Operating system: Windows 10

Expected behavior

Default background color is #FFF as described in the documentation. And texts don't have grayscale anti-aliasing.

( <webview> also should have #FFF background (NOT CSS background) by default.)

Actual behavior

BrowserWindow shows different rendering when using backgroundColor: '#FFF' in the constructor.

How to reproduce

Use backgroundColor in BrowserWindow constructor.

Load a html.

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>Electron</p>
</body>
</html>

As far as reading #6344, the window doesn't have background color when not specifying backgroundColor. This might cause other anti-aliasing/blurry-text issues like #8708. When I set backgroundColor, I got good anti-aliasing as well as Chrome.

And due to this anti-aliasing behavior, <webview> also should have #FFF background (NOT CSS background) by default.

Possible fixes

I think the problem is that there are two ways to set background color.

https://github.com/electron/electron/blob/v1.7.4/atom/browser/native_window.cc#L188-L194

https://github.com/electron/electron/blob/v1.7.4/atom/browser/api/atom_api_window.cc#L87-L93

native_window.cc tries to set #FFF by using SetBackgroundColor(), but its implementation is different from atom_api_window.cc.

And atom_api_window.cc doesn't set #FFF when backgroundColor doesn't exist, so the background is not set to #FFF.

Unfortunately I could not imagine a consist way to resolve this.
Issue 1:
Challenge http://freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

There's no syntactic reason to require double quotes. The following should pass, but fails.

$($('.slot')[0]).html(slotOne);
$($('.slot')[1]).html(slotTwo);
$($('.slot')[2]).html(slotThree);

Switching to double quotes passes.

Issue 2:
Challenge http://www.freecodecamp.com/challenges/waypoint-target-the-parent-of-an-element-using-jquery has an issue. Please describe how to reproduce it, and include links to screenshots if possible.
Issue 1:
class Base {
static getCorrectFoo(): any {
return this;
}

static get foo(): any {
return this;
}
}

class Inherited extends Base {}

Base.foo === Base;
Base.getCorrectFoo() === Base;

Inherited.foo === Base; /// Should be `Inherited`
Inherited.getCorrectFoo() === Inherited;

I believe this is because the foo getter will be defined via Object.defineProperty(Base, {..}), which hard-wires this to Base within the getter, rather than binding as expected to Inherited in Inherited.foo.

Issue 2:
The following code:

var i = 0, j = 0;

class Base {
get instanceAccessor() { return ++i; }
static get staticAccessor() { return ++j; }
toString = () => 'instance: ' + this.instanceAccessor + ' static: ' + Base.staticAccessor;
}

class Derived extends Base {
toString = () => 'instance: ' + this.instanceAccessor + ' static: ' + Derived.staticAccessor;
}

console.log('Base:\n%s\n%s\n%s', new Base(), new Base(), new Base());
console.log('Derived:\n%s\n%s\n%s', new Derived(), new Derived(), new Derived());

generates the following output (with the v1.3 compiler):

Base:
instance: 1 static: 2
instance: 2 static: 3
instance: 3 static: 4
Derived:
instance: 4 static: 1
instance: 5 static: 1
instance: 6 static: 1

Clearly Derived.staticAccessor is no longer an accessor, but a 'snapshot' of the value of Base.staticAccessor when the Derived constructor function called __extends.

Just wondering if this is the expected/correct behaviour?

PS. I haven't run into this problem 'in the wild' as I rarely use classes or accessors, but merely came across a rant/blog post about another compile-to-JS language doing something similar, and was curious how TypeScript handled it.
Issue 1:
The responsive classes used for show hide/elements should de "inline-block" insted "block" if i want to use this class on a inline element the "flow natural" will be distroy.

Issue 2:
related to issues #8500 , #7808 , #4929 ; using .hidden-sm to hide span within .nav > li > a . Because class is display: block above -sm then text wraps to new line. Would you consider .hidden-* classes to be display: inline-block instead ?

Here's a jsfiddle of the two cases - but the repercussions could be greater outside of this situation so probably needs more consideration... http://jsfiddle.net/jholl/P86yf/
Issue 1:
I haven't been able to find anything online that documents how the sync of reusable variables happens between CPU and GPU. Specifically, I'm interested in if a CPU pinned variable is used multiple times in a GPU computation without being updated, does it sync only once (i.e. use a dirty flag), or will it try sync again each time?

Issue 2:
Hello dear tensorflowers,

In a research project, I encountered the need to create tensors of the same shape than any other tensor with a custom value (not just 0 or 1), could be Boolean, Floats, Integers and so on.

The functions prototypes are the following and will be implemented in tensorflow/python/ops/array_ops.py:

tf.alphas (shape, alpha_value, name=None)

tf.alphas_like (tensor, alpha_value, name=None, optimize=True)

The code is not created from scratch. It is highly inspired by the functions tf.ones, tf.zeros for tf.alphas and by tf.zeros_like, tf.ones_like for tf.alphas_like.

The code use the latest implementation and has been designed to work with eager_mode.

The number of modification is relatively small, thus I am relatively confident on the robustness of the new implementation (largely based on the existing one).

The idea is to reproduce and merge the functions while enabling to set any custom value in the tensor:

tf.alphas merges:

tf.ones

tf.zeros

tf.alphas_like merges:

tf.zeros_like

tf.ones_like

How is the API Working ?

My new functions take a parameter alpha_value and fill the tensor with this value. This allows me to run such a script:

import tensorflow as tf

a = tf.constant([
[
[4, 5, 6],
[1, 2, 3]
],
[
[4, 5, 6],
[1, 2, 3]
]
])

b1 = tf.alphas_like(a, 0.5431)
b2 = tf.alphas_like(a, 5)
b3 = tf.alphas_like(a, -5)
b4 = tf.alphas_like(a, True)

with tf.Session() as sess:
_b1, _b2, _b3, _b4 = sess.run([b1, b2, b3, b4])

print("b1:", _b1)
print("b2:", _b2)
print("b3:", _b3)
print("b4:", _b4)

############### OUTPUTS ###############

>>> b1: [
[
[ 0.5431 0.5431 0.5431]
[ 0.5431 0.5431 0.5431]
]
[
[ 0.5431 0.5431 0.5431]
[ 0.5431 0.5431 0.5431]
]
]

>>> b2: [
[
[5 5 5]
[5 5 5]
]
[
[5 5 5]
[5 5 5]
]
]

>>> b3: [
[
[-5 -5 -5]
[-5 -5 -5]
]
[
[-5 -5 -5]
[-5 -5 -5]
]
]

>>> b4: [
[
[ True True True]
[ True True True]
]
[
[ True True True]
[ True True True]
]
]

How can you help ?

Before submitting a PR, I would like to know a few things:

Is it something that would be any kind of interest and worth a PR?

Are the names I have chosen (tf.alphas and tf.alphas_like) okay with everyone ?

In my PR, should I delete the implementation of tf.zeros_likes and tf.ones_likes and replace them as an alias of my new function which basically does the same job, just in a more flexible way ?

Thanks for your time and attention,

Best Regards,

Jonathan
Issue 1:
React version: 18.0.0

In 18.0.0, StrictMode causes a useEffect with an empty deps array to execute twice when a component mounts. This did not happen in 17.0.2.

Steps To Reproduce

Add a useEffect with an empty deps array, e.g

useEffect(() => {
console.log("test")
}, [])

And ensure StrictMode is enabled:

<StrictMode>
<App />
</StrictMode>,

Link to code example:

React 17.0.2: https://codesandbox.io/s/youthful-smoke-z3nxmv

React 18.0.0: https://codesandbox.io/s/nervous-tess-7qsm1r

Observe that in the 18.0.0 version, the console.log and fetch statements are executed twice.

The current behavior

useEffect with empty deps array is executed twice.

The expected behavior

17.0.2 behaviour is preserved, the useEffect is only fired once.

Is this an expected change with 18.0.0? One common use case for useEffect is to make a web request - these web requests are now being fired twice when in StrictMode. In the code examples, I am making such a request and both can be seen in the network tab in devtools.

To be clear, its not a major issue for me at the moment, but its plausible that the duplicated useEffect call could result in differing behaviour for a component in development with StrictMode vs in production, depending on what the useEffect is doing.

Issue 2:
Inline styles are awesome. But for better or worse, some CSS properties have vendor-prefixed values. How can we write these inline in React?

display: flex is the example I ran into:

.my-container {
display: flex;
display: -webkit-flex;
/* etc */
}

I found myself building something like

render: function() {
var style = {
display: "flex",
display: "-webkit-flex"
};
return <div style={style}>/*...*/</div>
};

only to be reminded by the linter that it won't work.

What to do in these situations?
Issue 1:
Problem:

Funtional programming needs better support in TypeScript. Values are everything in FP and in TypeScript the expression statements just silently discard them. Not being able to track places where the values are discarded leads to severe bugs. Example:

// before refactoring
function notify(message: string) : void {
window.postMessage(message); // <-- assuming always works
}

// turns out that window.postMessage crashes when window gets closed
// need a check and a conditional result

// after refactoring
function notify(message: string) : Tried<void, 'cant-send-a-message'> {
if (window.closed) {
return failureFrom('cant-send-a-message');
} else {
return successFrom(window.postMessage(message));
}
}

// after such change we need to make sure that all places that call `notify` are addressed
// it's easy to overlook those without a help from a compiler

Workaround:

use a linter rule

Solution:

add a flag to the compiler

Issue 2:
Hello.

Quite often while working with ImmutableJS data structures and other immutable libraries people forget that values are immutable:

They can accidentally write:

obj.set('name', 'newName');

Instead of:

let newObj = obj.set('name', 'newName');

These errors are hard to discover and they are very annoying. I think that this problem can't be solved by tslint, so I propose to add some sort of "you must use the result" check into the compiler. But right now I have no idea how I want it to be expressed in the language, so I create this issue mainly to start a discussion.

Rust lang, for example, solves a similar problem with #[must_use] annotation. This is not exact what we want, but it's a good example and shows that the problem is quite common.
Issue 1:
When write the markdown in Chinese, but display boxes in the preview, see below screenshot:

The atom version is v0.191.0.

Running on openSUSE 13.2 .

Issue 2:
My OS openSUSE 13.2 (Harlequin) (x86_64) 64 位 with GNOME 3.14.2

Atom is 0.190.0

markdown-preview 0.148.0

#ymsWebClient

###build dist
1. 手工删当前的额dist文件夹

2. 项目根目录下执行命令
`
gulp build
`

<h1 id="ymswebclient">ymsWebClient</h1>
<h3 id="build-dist">build dist</h3>
<ol>
<li><p>手工删当前的额dist文件夹</p>
</li>
<li><p>项目根目录下执行命令
<code style="font-family: DejaVu Sans Mono,Source Code Pro,WenQuanYi Micro Hei;">gulp build</code></p>
</li>
</ol>

But privew is

config.cson

"*":
"exception-reporting":
userId: "3c3323ae-d7b7-8749-bdce-32c65bf202da"
welcome:
showOnStartup: false
core:
disabledPackages: [
"welcome"
"language-r"
"javascript-snippets"
"git-diff-details"
]
themes: [
"atom-dark-ui"
"solarized-dark-syntax"
]
projectHome: "/home/mingjunyang/git"
editor:
invisibles: {}
showIndentGuide: true
tabLength: 4
zoomFontWhenCtrlScrolling: false
softWrap: true
fontFamily: "DejaVu Sans Mono,Source Code Pro,WenQuanYi Micro Hei"
fontSize: 22
"atom-beautify":
_analyticsUserId: "9821831b-a2aa-4903-a52f-3599aea0f6c0"
js_keep_function_indentation: true
css_newline_between_rules: true
css_selector_separator_newline: true
minimap:
plugins:
"git-diff": false
"language-context-free":
variation: "A"
"todo-show":
ignoreThesePaths: [
"/node_modules/"
"/.git/"
"/app/bower_components/"
"/app/dist/"
]
"tree-view":
hideVcsIgnoredFiles: true
"css-color-highlight": {}
"atom-color-highlight": {}
"autocomplete-plus": {}
"autocomplete-clang":
preCompiledHeaders: {}
std: {}
"markdown-preview": {}
Issue 1:
Problem

The files struct (Record<string,string>), returned by running Deno.emit has the (semi) correct extensions for the file names (the keys of the struct), but the code inside the emitted output uses the original .ts extension for the import statements.

This requires special handling after emitting the output to search and replace all references to the old file extensions (as using the old ones won't work).

I wrote above that the keys have "semi" correct extensions, because the emit method only appends .js, .js.map & .d.ts to the keys, without considering that the "real" output file shouldn't have .ts in it's name.

Example

You can see below that the output for a.ts.js has import * as b from '/b.ts'; instead of a.ts.js has import * as b from '/b.ts.js';

build.ts

const {files} = await Deno.emit(
"/a.ts",
{
sources: {
"/b.ts": "export const foo=true",
"/a.ts": "import * as b from '/b.ts';\nconsole.log(b)"
}
}
);
console.log(files)

command

deno run -q --unstable build.ts

output

{
"file:///b.ts.js.map": '{"version":3,"file":"","sourceRoot":"","sources":["file:///b.ts"],"names":[],"mappings":"AAAA,MAAM,C...',
"file:///a.ts.js.map": '{"version":3,"file":"","sourceRoot":"","sources":["file:///a.ts"],"names":[],"mappings":"AAAA,OAAO,K...',
"file:///a.ts.js": "import * as b from '/b.ts';\nconsole.log(b);\n",
"file:///b.ts.js": "export const foo = true;\n"
}

Issue 2:
Problem

Deno.compile() does not convert local import URLs from .ts extension to .js extension, making it impossible to use inside browser and Node.js.

Steps to reproduce

Run this file (deno run https://gist.githubusercontent.com/KSXGitHub/c94a9d7eb8e976f1126b4b9dfeba0497/raw/004a9ddb6872b9a2f05506f13f3efdfd6edd6d69/tmp.ts).

Expected behavior

All local import URLs in output JS files should have .js extension.

// foo.js should look like this
export * from "./bar.js";

All local import URLs in output TypeScript definition files (.d.ts) should have no extension.

// foo.d.ts should look like this
export * from "./bar";

Actual behavior

All local import URLs are preserved, which is incorrect.
Issue 1:
VSCode Version:0.10.12-alpha

OS Version: windows10

Steps to Reproduce:

Launch app and open any folder which contains .ts project

Add task.json file or select the node.js environment to generate launch.json.

Try to update the property value with predefined common variables like ${file},${cwd}, ${workspaceRoot} etc. in task.json or launch.json .

Verify intellisense should display for all the predefined common variables.

Actual: Intellisense is displaying only for ${workspaceRoot}.

Issue 2:
It would be great of there are completion proposals for variables in launch.json.

That's now quite easy to add, check out https://github.com/Microsoft/vscode/blob/master/extensions/configuration-editing/src/extension.ts.

This adds completions to keybindings.json.

You could add yourself also to the 'configuration-editing' extension, as launch is also a configuration file.
Issue 1:
In the with-ant-design example, i think these file too big for production. Is this a bug?

Can we optimize it?

Issue 2:
changing response code in custom error page, not working.

This is content in pages/_error.js file.

import React from 'react'

function Error(props) {
return (
<div>
my custom page
</div>
)
}

Error.getInitialProps = ({ req, res, err }) => {
res.status = 200 // changing the response code here
return {}
}

but status is always goes as 404. any suggestion?
Issue 1:
I have a top level navbar component which starts a web socket to listen for user notifications. Unfortunately the navbar is unmounted and remounted on every page load, forcing the websocket to disconnect/reconnect.

Is there no way around this with next.js?

Issue 2:
Having animated route transitions would be nice, as this is one of the many benefits through client-side routing. Doing so should be left up to the user in my opinion (some people prefer CSS transitions over more fine-grained control with react-motion etc). As I understand it, one would need to modify the top-level App component.

The client entry file seems to look for a globally assigned __NEXT_DATA__.app variable but I can't find any documentation on that.
Issue 1:
Please add additional key combinations to default key bindings for copy-paste like:

Copy: CTRL + INS,

Paste: SHIFT + INS

I think many people use this keys combinations.

Issue 2:
Sorry if this is a duplicate, I didn't really know how to search it. My replace button is not large enough to show the entire word Replace. I am not sure what version introduced this, as I haven't used find/replace much as of late. I think it would have been after 0.150.0, but I'm not sure.

Screenshot:
Issue 1:
Hello,

I tried approaching OpenCv at admin@opencv.org yet I got no answer for days.

Hence I didn't who to approach besides this forum.

It seems like the Q&A site of OpenCV isn't available for more than few weeks.

Could you please fix it?

It is a great source for OpenCV.

Thank You.

Issue 2:
System information

OpenCV => 3.1

Operating System / Platform => macOS Sierra 10.12 (16A304a)

Compiler => Xcode

https://github.com/Homebrew/homebrew-science/issues/4104
Issue 1:
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

Current behavior

Angular API reference states that there is only a required ValidatorFn in the class Validators but source code defines required, requiredTrue, compose, composeAsync, email and null.

Expected behavior

API reference reflects the Validators defined.

Minimal reproduction of the problem with instructions

Compare Angular API reference and Validators class source.

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

Fixing an error in documentation.

Please tell us about your environment:

N/A

Angular version: 4.0.0

Browser: N/A

Language: all

This can be considered a bug report for the Angular documentation.

Issue 2:
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

Current behavior

Reactive forms do not support binding multiple input components to one formControl instance

Expected behavior

The opposite

Minimal reproduction of the problem with instructions

Duplicate input with formControlName in reactive forms demo

Form inputs are not in sync after change

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

Combination of slider and input field

Please tell us about your environment:

OSX, VSCode

Angular version: 2.0.X

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Language: [all]

Node (for AoT issues): node --version =