code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/client/src/styles/styles.scss b/client/src/styles/styles.scss @@ -65,7 +65,7 @@ body{
}
.container{
- padding: 70px 15px 70px 15px;
+ padding: 15px 15px 15px 15px;
margin-left: auto;
margin-right: auto;
@@ -371,6 +371,8 @@ header.menu{
}
.homePage.container{
+ padding-top: 70px;
+ padding-bottom: 70px;
.title{
padding: 0 0 10px 0;
@include fluid-type($break-xs, $break-lg, 24px, 45px);
| 12 |
diff --git a/lib/core/service_layer/api_error_handler.rb b/lib/core/service_layer/api_error_handler.rb @@ -3,10 +3,13 @@ module Core
class ApiErrorHandler
def self.get_api_error_messages(error)
+
if error.respond_to?(:response_data) and error.response_data
+ puts error.response_data
return read_error_messages(error.response_data)
elsif error.respond_to?(:response) and error.response and error.response.body
response_data = JSON.parse(error.response.body) rescue error.response.body
+ puts response_data
return read_error_messages(response_data)
else
# try to parse error from exception
@@ -23,7 +26,8 @@ module Core
def self.read_error_messages(hash,messages=[])
return [ hash.to_s ] unless hash.respond_to?(:each)
hash.each do |k,v|
- messages << v if k=='message' or k=='type'
+ # title and description are realted to monasca error response
+ messages << v if k=='message' or k=='type' or k=='title' or k=='description'
if v.is_a?(Hash)
read_error_messages(v,messages)
elsif v.is_a?(Array)
| 9 |
diff --git a/contribs/gmf/less/desktop.less b/contribs/gmf/less/desktop.less @@ -211,6 +211,9 @@ gmf-search {
gmf-themeselector {
width: 1.5 * @left-panel-width;
+ max-height: 1.5 * @left-panel-width;
+ overflow: hidden;
+ overflow-y: auto;
}
gmf-backgroundlayerselector {
width: 25rem;
| 12 |
diff --git a/test/server/cards/04.6-EU/AgashaShunsen.spec.js b/test/server/cards/04.6-EU/AgashaShunsen.spec.js @@ -33,10 +33,6 @@ describe('Agasha Shunsen', function () {
this.player1.clickCard('agasha-shunsen');
this.player1.clickPrompt('Cancel');
expect(this.player1).toHavePrompt('Conflict Action Window');
- this.player1.clickCard('agasha-shunsen');
- this.player1.clickCard('agasha-shunsen');
- this.player1.clickPrompt('Cancel');
- expect(this.player1).toHavePrompt('Conflict Action Window');
});
it('should prompt the player to return a ring', function () {
| 2 |
diff --git a/src/components/ReportActionItem/RenameAction.js b/src/components/ReportActionItem/RenameAction.js @@ -13,7 +13,7 @@ const propTypes = {
...withLocalizePropTypes,
};
-const AnnounceAction = (props) => {
+const RenameAction = (props) => {
const displayName = lodashGet(props.action, ['message', 0, 'text']);
const oldName = lodashGet(props.action, 'originalMessage.oldName', '');
const newName = lodashGet(props.action, 'originalMessage.newName', '');
@@ -28,7 +28,7 @@ const AnnounceAction = (props) => {
);
};
-AnnounceAction.propTypes = propTypes;
-AnnounceAction.displayName = 'AnnounceAction';
+RenameAction.propTypes = propTypes;
+RenameAction.displayName = 'RenameAction';
-export default withLocalize(AnnounceAction);
+export default withLocalize(RenameAction);
| 10 |
diff --git a/packages/cli/test/scripts/update.test.js b/packages/cli/test/scripts/update.test.js @@ -476,7 +476,7 @@ describe('update script', function() {
implementation: this.withLibraryImplV2Address,
});
});
- });
+ }).timeout(5000);
};
const shouldHandleUpdateOnDependency = function() {
@@ -613,7 +613,7 @@ describe('update script', function() {
.methods.version()
.call()).should.eq('1.2.0');
});
- });
+ }).timeout(5000);
};
describe('on application contract', function() {
| 0 |
diff --git a/lib/plugins/platform/platform.js b/lib/plugins/platform/platform.js @@ -199,7 +199,7 @@ class Platform {
function: this.serverless.service.getFunction(fn).name,
type: event.type,
app: this.data.app,
- service: this.data.service,
+ service: this.data.service.name,
stage: this.serverless.service.provider.stage,
},
provider: {
| 1 |
diff --git a/src/Output.js b/src/Output.js @@ -241,10 +241,25 @@ export class Output extends EventEmitter {
* @returns {Output} Returns the `Output` object so methods can be chained.
*/
send(status, data = [], options= {}) {
+
+ /* START.VALIDATION */
if (!Array.isArray(data)) data = [data];
- if (typeof options === "number") options = {time: options}; // legacy support
+
+ data.map(value => {
+ value = parseInt(value);
+ if (isNaN(value)) throw new TypeError("Data cannot be NaN.");
+ return value;
+ });
+ /* END.VALIDATION */
+
+ // Legacy support
+ if (typeof options === "number") options = {time: options};
+
+ // Actually send the message
this._midiOutput.send([status].concat(data), WebMidi.convertToTimestamp(options.time));
+
return this;
+
}
/**
| 7 |
diff --git a/src/libs/KeyboardShortcut/index.js b/src/libs/KeyboardShortcut/index.js @@ -3,7 +3,7 @@ import lodashGet from 'lodash/get';
import getOperatingSystem from '../getOperatingSystem';
import CONST from '../../CONST';
-const events = {};
+const eventHandlers = {};
const keyboardShortcutMap = {};
/**
@@ -20,11 +20,11 @@ function getKeyboardShortcuts() {
* @private
*/
function bindHandlerToKeyupEvent(event) {
- if (events[event.keyCode] === undefined) {
+ if (eventHandlers[event.keyCode] === undefined) {
return;
}
- const eventCallbacks = events[event.keyCode];
+ const eventCallbacks = eventHandlers[event.keyCode];
const reversedEventCallbacks = [...eventCallbacks].reverse();
// Loop over all the callbacks
@@ -116,7 +116,7 @@ function getKeyCode(key) {
*/
function unsubscribe(key) {
const keyCode = getKeyCode(key);
- events[keyCode].pop();
+ eventHandlers[keyCode].pop();
}
/**
@@ -156,10 +156,10 @@ function addKeyToMap(key, modifiers, descriptionKey) {
*/
function subscribe(key, callback, descriptionKey, modifiers = 'shift', captureOnInputs = false) {
const keyCode = getKeyCode(key);
- if (events[keyCode] === undefined) {
- events[keyCode] = [];
+ if (eventHandlers[keyCode] === undefined) {
+ eventHandlers[keyCode] = [];
}
- events[keyCode].push({callback, modifiers: _.isArray(modifiers) ? modifiers : [modifiers], captureOnInputs});
+ eventHandlers[keyCode].push({callback, modifiers: _.isArray(modifiers) ? modifiers : [modifiers], captureOnInputs});
if (descriptionKey) {
addKeyToMap(key, modifiers, descriptionKey);
| 10 |
diff --git a/client/src/components/views/ComputerCore/style.scss b/client/src/components/views/ComputerCore/style.scss .list-group {
.list-group-item {
&.selected {
- background-color: rgba(255, 255, 255, 0.5);
+ background-color: rgba(255, 255, 255, 0.3);
+ font-weight: 800;
}
}
}
max-height: 60vh;
overflow-y: auto;
tr.selected {
- background-color: rgba(255, 255, 255, 0.5);
+ background-color: rgba(255, 255, 255, 0.3);
}
td {
vertical-align: middle;
| 1 |
diff --git a/core/server/api/v3/pages-public.js b/core/server/api/v3/pages-public.js -const i18n = require('../../../shared/i18n');
+const tpl = require('@tryghost/tpl');
const errors = require('@tryghost/errors');
const models = require('../../models');
const ALLOWED_INCLUDES = ['tags', 'authors'];
+const messages = {
+ pageNotFound: 'Page not found'
+};
module.exports = {
docName: 'pages',
@@ -63,7 +66,7 @@ module.exports = {
.then((model) => {
if (!model) {
throw new errors.NotFoundError({
- message: i18n.t('errors.api.pages.pageNotFound')
+ message: tpl(messages.pageNotFound)
});
}
| 14 |
diff --git a/src/LambdaContext.js b/src/LambdaContext.js @@ -36,6 +36,7 @@ module.exports = class LambdaContext extends EventEmitter {
// properties
awsRequestId,
+ callbackWaitsForEmptyEventLoop: true,
clientContext: {},
functionName: lambdaName,
functionVersion: `offline_functionVersion_for_${lambdaName}`,
| 0 |
diff --git a/packages/app/src/components/Common/Dropdown/PageItemControl.tsx b/packages/app/src/components/Common/Dropdown/PageItemControl.tsx @@ -135,19 +135,21 @@ const PageItemControlDropdownMenu = React.memo((props: DropdownMenuProps): JSX.E
type PageItemControlSubstanceProps = CommonProps & {
pageId: string,
- fetchOnOpen?: boolean,
+ fetchOnInit?: boolean,
}
export const PageItemControlSubstance = (props: PageItemControlSubstanceProps): JSX.Element => {
const {
- pageId, pageInfo: presetPageInfo, fetchOnOpen,
+ pageId, pageInfo: presetPageInfo, fetchOnInit,
onClickBookmarkMenuItem,
} = props;
const [isOpen, setIsOpen] = useState(false);
- const shouldFetch = presetPageInfo == null && (!fetchOnOpen || isOpen);
+ const shouldFetch = fetchOnInit === true || (!isIPageInfoForOperation(presetPageInfo) && isOpen);
+ const shouldMutate = fetchOnInit === true || !isIPageInfoForOperation(presetPageInfo);
+
const { data: fetchedPageInfo, mutate: mutatePageInfo } = useSWRxPageInfo(shouldFetch ? pageId : null);
// mutate after handle event
@@ -156,10 +158,10 @@ export const PageItemControlSubstance = (props: PageItemControlSubstanceProps):
await onClickBookmarkMenuItem(_pageId, _newValue);
}
- if (shouldFetch) {
+ if (shouldMutate) {
mutatePageInfo();
}
- }, [mutatePageInfo, onClickBookmarkMenuItem, shouldFetch]);
+ }, [mutatePageInfo, onClickBookmarkMenuItem, shouldMutate]);
return (
<Dropdown isOpen={isOpen} toggle={() => setIsOpen(!isOpen)}>
@@ -169,7 +171,7 @@ export const PageItemControlSubstance = (props: PageItemControlSubstanceProps):
<PageItemControlDropdownMenu
{...props}
- pageInfo={presetPageInfo ?? fetchedPageInfo}
+ pageInfo={fetchedPageInfo ?? presetPageInfo}
onClickBookmarkMenuItem={bookmarkMenuItemClickHandler}
/>
</Dropdown>
@@ -193,7 +195,7 @@ export const PageItemControl = (props: PageItemControlProps): JSX.Element => {
};
-type AsyncPageItemControlProps = CommonProps & {
+type AsyncPageItemControlProps = Omit<CommonProps, 'pageInfo'> & {
pageId?: string,
}
@@ -204,5 +206,5 @@ export const AsyncPageItemControl = (props: AsyncPageItemControlProps): JSX.Elem
return <></>;
}
- return <PageItemControlSubstance pageId={pageId} fetchOnOpen {...props} />;
+ return <PageItemControlSubstance pageId={pageId} fetchOnInit {...props} />;
};
| 7 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,13 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master
where X.Y.Z is the semver of most recent plotly.js release.
+## [1.29.2] -- 2017-07-26
+
+### Fixed
+- Add fallback for `ArrayBuffer.isView` fixing gl2d and gl3d rendering
+ in environments that don't support it (e.g. RStudio) [#1915]
+
+
## [1.29.1] -- 2017-07-25
### Fixed
| 3 |
diff --git a/lib/components/helpers/tag-translator.js b/lib/components/helpers/tag-translator.js @@ -5,7 +5,7 @@ const buildChoicesMap = (replaceChoices) => {
var choices = {};
replaceChoices.forEach(function(choice) {
var key = choice.value;
- choices[key] = choice.label;
+ choices[key] = choice.tagLabel || choice.label;
});
return choices;
};
| 11 |
diff --git a/vaadin-date-picker-overlay.html b/vaadin-date-picker-overlay.html @@ -460,9 +460,13 @@ This program is available under Apache License Version 2.0, available at https:/
announce.push(this.i18n.week);
announce.push(Vaadin.DatePickerHelper._getISOWeekNumber(focusedDate));
}
- var e = new Event('iron-announce', {bubbles: true, composed: true});
- e.detail = {text: announce.join(' ')};
- this.dispatchEvent(e);
+ this.dispatchEvent(new CustomEvent('iron-announce', {
+ bubbles: true,
+ composed: true,
+ detail: {
+ text: announce.join(' ')
+ }
+ }));
return;
}
@@ -628,12 +632,15 @@ This program is available under Apache License Version 2.0, available at https:/
this.$.scroller.position = currentPos;
window.requestAnimationFrame(smoothScroll);
} else {
- var e = new Event('scroll-animation-finished', {bubbles: true, composed: true});
- e.detail = {
+ this.dispatchEvent(new CustomEvent('scroll-animation-finished', {
+ bubbles: true,
+ composed: true,
+ detail: {
position: this._targetPosition,
oldPosition: initialPosition
- };
- this.dispatchEvent(e);
+ }
+ }));
+
this.$.scroller.position = this._targetPosition;
this._targetPosition = undefined;
}
| 14 |
diff --git a/docs/source/tutorial/local-state.mdx b/docs/source/tutorial/local-state.mdx @@ -235,6 +235,11 @@ Next, specify a client resolver on the `Launch` type to tell Apollo Client how t
<MultiCodeBlock>
```tsx:title=src/resolvers.tsx
+// previous imports
+import { GET_CART_ITEMS } from './pages/cart';
+
+// type defs and other previous variable declarations
+
interface AppResolvers extends Resolvers {
Launch: ResolverMap; // highlight-line
}
@@ -242,7 +247,9 @@ interface AppResolvers extends Resolvers {
export const resolvers: AppResolvers = { // highlight-line
Launch: {
isInCart: (launch: LaunchTileTypes.LaunchTile, _, { cache }): boolean => {
- const queryResult = cache.readQuery<GetCartItemTypes.GetCartItems, any>({ query: GET_CART_ITEMS });
+ const queryResult = cache.readQuery<GetCartItemTypes.GetCartItems, any>({
+ query: GET_CART_ITEMS
+ });
if (queryResult) {
return queryResult.cartItems.includes(launch.id)
}
| 7 |
diff --git a/includes/Core/Assets/Assets.php b/includes/Core/Assets/Assets.php namespace Google\Site_Kit\Core\Assets;
use Google\Site_Kit\Context;
-use Google\Site_Kit\Core\Modules\Modules;
use Google\Site_Kit\Core\Permissions\Permissions;
-use Google\Site_Kit\Core\Storage\Cache;
use Google\Site_Kit\Core\Util\BC_Functions;
use Google\Site_Kit\Core\Util\Feature_Flags;
use WP_Dependencies;
@@ -669,7 +667,6 @@ final class Assets {
global $wpdb;
$site_url = $this->context->get_reference_site_url();
$current_user = wp_get_current_user();
- $modules = new Modules( $this->context );
$inline_data = array(
'homeURL' => trailingslashit( $this->context->get_canonical_home_url() ),
| 2 |
diff --git a/src/assets/url-builder.njk b/src/assets/url-builder.njk @@ -102,7 +102,7 @@ oLayoutStyle: "o-layout--query"
<div id="{{item.name}}-tooltip-element" data-o-component="o-tooltip" data-o-tooltip-position="right" data-o-tooltip-target="{{item.name}}-tooltip-target" data-o-tooltip-toggle-on-click="true">
<div class="o-tooltip-content">
<ul>
- {% if item.license %}<li class='license'><a title='This polyfill has a specific licence' href='https://choosealicense.com/licenses/{{licenseLowerCase}}'>License: {{item.license}}</a></li>{% endif %}
+ {% if item.license %}<li class='license'><a title='This polyfill has a specific licence' href='https://choosealicense.com/licenses/{{item.licenseLowerCase}}'>License: {{item.license}}</a></li>{% endif %}
{% if spec %}<li><a href='{{item.spec}}'>Specification</a></li>{% endif %}
{% if docs %}<li><a href='{{item.docs}}'>Documentation</a></li>{% endif %}
<li><a href='https://github.com/Financial-Times/polyfill-library/tree/master/polyfills/{{item.baseDir}}'>Polyfill source</a></li>
| 1 |
diff --git a/samples/csharp_dotnetcore/02.echo-with-counter/Startup.cs b/samples/csharp_dotnetcore/02.echo-with-counter/Startup.cs // Licensed under the MIT License.
using System;
+using System.IO;
using System.Linq;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
@@ -62,7 +63,10 @@ public void ConfigureServices(IServiceCollection services)
var secretKey = Configuration.GetSection("botFileSecret")?.Value;
var botFilePath = Configuration.GetSection("botFilePath")?.Value;
-
+ if (!File.Exists(botFilePath))
+ {
+ throw new FileNotFoundException($"The .bot configuration file was not found. botFilePath: {botFilePath}");
+ }
// Loads .bot configuration file and adds a singleton that your Bot can access through dependency injection.
BotConfiguration botConfig = null;
try
| 0 |
diff --git a/test/jasmine/tests/animate_test.js b/test/jasmine/tests/animate_test.js @@ -840,6 +840,24 @@ describe('animating scatter traces', function() {
});
it('should animate axis ranges using the less number of steps', function(done) {
+ // sanity-check that scatter points and bars are still there
+ function _assertNodeCnt() {
+ var gd3 = d3.select(gd);
+ expect(gd3.select('.scatterlayer').selectAll('.point').size())
+ .toBe(3, '# of pts on graph');
+ expect(gd3.select('.barlayer').selectAll('.point').size())
+ .toBe(3, '# of bars on graph');
+ }
+
+ // assert what Cartesian.transitionAxes does
+ function getSubplotTranslate() {
+ var sp = d3.select(gd).select('.subplot.xy > .plot');
+ return sp.attr('transform')
+ .split('translate(')[1].split(')')[0]
+ .split(',')
+ .map(Number);
+ }
+
Plotly.plot(gd, [{
y: [1, 2, 1]
}, {
@@ -847,12 +865,16 @@ describe('animating scatter traces', function() {
y: [2, 1, 2]
}])
.then(function() {
+ var t = getSubplotTranslate();
+ expect(t[0]).toBe(80, 'subplot translate[0]');
+ expect(t[1]).toBe(100, 'subplot translate[1]');
+
spyOn(gd._fullData[0]._module.basePlotModule, 'transitionAxes').and.callThrough();
spyOn(gd._fullData[0]._module, 'plot').and.callThrough();
spyOn(gd._fullData[1]._module, 'plot').and.callThrough();
spyOn(Registry, 'call').and.callThrough();
- return Plotly.animate('graph', {
+ var promise = Plotly.animate('graph', {
layout: {
xaxis: {range: [0.45, 0.55]},
yaxis: {range: [0.45, 0.55]}
@@ -861,12 +883,21 @@ describe('animating scatter traces', function() {
transition: {duration: 500},
frame: {redraw: false}
});
+
+ setTimeout(function() {
+ _assertNodeCnt();
+ var t = getSubplotTranslate();
+ expect(t[0]).toBeLessThan(80, 'subplot translate[0]');
+ expect(t[1]).toBeLessThan(100, 'subplot translate[1]');
+ }, 100);
+
+ return promise;
})
.then(function() {
- // sanity-check that scatter points and bars are still there
- var gd3 = d3.select(gd);
- expect(gd3.select('.scatterlayer').selectAll('.point').size()).toBe(3, '# of pts on graph');
- expect(gd3.select('.barlayer').selectAll('.point').size()).toBe(3, '# of bars on graph');
+ _assertNodeCnt();
+ var t = getSubplotTranslate();
+ expect(t[0]).toBe(80, 'subplot translate[0]');
+ expect(t[1]).toBe(100, 'subplot translate[1]');
// the only redraw should occur during Cartesian.transitionAxes,
// where Registry.call('relayout') is called leading to a _module.plot call
| 7 |
diff --git a/karma.conf.js b/karma.conf.js @@ -10,6 +10,11 @@ module.exports = function (config) {
browserName: 'chrome',
version: '49'
},
+ sl_safari_8: {
+ base: 'SauceLabs',
+ browserName: 'safari',
+ version: '8'
+ },
sl_chrome_latest: {
base: 'SauceLabs',
browserName: 'chrome',
| 0 |
diff --git a/scss/layout/_navbar.scss b/scss/layout/_navbar.scss @@ -54,7 +54,7 @@ $siimple-navbar-subtitle-padding-left: 15px;
top: $siimple-navbar-padding-top;
bottom: $siimple-navbar-padding-bottom;
}
- vertical-align: middle;
+ //vertical-align: middle;
@include siimple-size();
| 1 |
diff --git a/src/styles/interactive-video.css b/src/styles/interactive-video.css .h5p-interactive-video .h5p-bookmark {
position: absolute;
top: -14px;
- width: 1px;
+ width: 0.042em;
height: 36px;
background: unset;
border-color: #a2a2a2;
.h5p-interactive-video .h5p-endscreen {
position: absolute;
top: -14px;
- width: 1px;
+ width: 0.042em;
height: 36px;
background: #a2a2a2;
color: #fefefe;
| 0 |
diff --git a/src/technologies/h.json b/src/technologies/h.json ],
"description": "HighStore is an ecommerce platform from Iran.",
"meta": {
- "generator": "^HighStore.IR$",
- "hs:version": "^([\\d\\.]+)$\\;version:\\1"
+ "generator": "^HighStore\\.IR$",
+ "hs:version": "^([\\d\\.]+)$\\;version:\\1\\;confidence:50"
},
"implies": "Microsoft ASP.NET",
"saas": true,
| 7 |
diff --git a/package.json b/package.json "karma-webpack": "^2.0.3",
"main-bower-files": "~2.11.1",
"mversion": "^1.10.1",
+ "react-bootstrap": "^0.31.0",
"reactcss": "^1.2.2",
"slugid": "^1.1.0",
"style-loader": "^0.13.2",
]
}
},
+ "peerDependencies": {
+ "react": "^0.14.3 || ^15.0.0",
+ "react-dom": "^0.14.3 || ^15.0.0"
+ },
"dependencies": {
"babel-preset-es2015": "^6.18.0",
"box-intersect": "^1.0.1",
"react-autocomplete": "tiemevanveen/react-autocomplete#fix-176",
"react-color": "^2.11.1",
"react-contextmenu": "^2.0.0-beta.2",
- "react-data-menu": "^1.0.12",
"react-dimensions": "^1.3.0",
"react-grid-layout": "^0.13.9",
"react-resizable": "^1.4.5",
| 2 |
diff --git a/lib/node_modules/@stdlib/repl/ctor/lib/set_aliases_global.js b/lib/node_modules/@stdlib/repl/ctor/lib/set_aliases_global.js var logger = require( 'debug' );
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
-var setReadOnly = require( '@stdlib/utils/define-read-only-property' );
-var setMemoizedReadOnly = require( '@stdlib/utils/define-memoized-read-only-property' );
+var setConfigurableReadOnly = require( '@stdlib/utils/define-configurable-read-only-property' );
+var setMemoizedConfigurableReadOnly = require( '@stdlib/utils/define-memoized-configurable-read-only-property' ); // eslint-disable-line id-length
var contains = require( './contains.js' );
var createAccessor = require( './create_accessor.js' );
var ALIASES = require( './aliases.js' );
@@ -79,7 +79,7 @@ function setAliasesGlobal( out1, out2, context, skip ) {
FLG = true;
out1.push( key.slice( 0, j+1 ).join( '.' ) );
}
- setReadOnly( o, k, {} );
+ setConfigurableReadOnly( o, k, {} );
}
o = o[ k ];
}
@@ -92,7 +92,7 @@ function setAliasesGlobal( out1, out2, context, skip ) {
if ( FLG === false ) {
out1.push( alias );
}
- setMemoizedReadOnly( o, k, createAccessor( out2, context.require, alias ) ); // eslint-disable-line max-len
+ setMemoizedConfigurableReadOnly( o, k, createAccessor( out2, context.require, alias ) ); // eslint-disable-line max-len
}
}
return context;
| 12 |
diff --git a/src/main.js b/src/main.js @@ -33,13 +33,13 @@ function gltf_rv(canvasId, index, headless = false, onRendererReady = undefined)
function getWebGlContext()
{
const parameters = { alpha: false, antialias: true };
- const type = [ "webgl", "experimental-webgl" ];
+ const contextTypes = [ "webgl", "experimental-webgl" ];
let context;
- for (const name of names)
+ for (const contextType of contextTypes)
{
- context = canvas.getContext(type, parameters);
+ context = canvas.getContext(contextType, parameters);
if (context)
{
return context;
| 10 |
diff --git a/js/core/bis_bidsutils.js b/js/core/bis_bidsutils.js @@ -147,11 +147,12 @@ let dicom2BIDS = async function (opts) {
let formattedSuppfile = makeBIDSFilename(suppBasename, dirbasename);
let suppTarget = bis_genericio.joinFilenames(dirname, formattedSuppfile);
-
+ if (!formattedSuppfile.includes('DISCARD')) {
movedsuppfiles.push(suppTarget);
changedNames.push(bis_genericio.getBaseName(suppfile) + ' -> ' + bis_genericio.getBaseName(suppTarget));
moveSupportingFiles.push(bis_genericio.copyFile(suppfile + '&&' + suppTarget));
}
+ }
let formattedBasename = makeBIDSFilename(basename, dirbasename);
| 1 |
diff --git a/tests/e2e/global-setup.js b/tests/e2e/global-setup.js @@ -2,9 +2,7 @@ const jsdom = require("jsdom");
exports.startApplication = function (configFilename, exec) {
jest.resetModules();
- if (global.app) {
- global.app.stop();
- }
+ this.stopApplication();
// Set config sample for use in test
if (configFilename === "") {
process.env.MM_CONFIG_FILE = "config/config.js";
| 7 |
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -5,7 +5,7 @@ defaults: &defaults
docker:
- image: circleci/node:7.10
jobs:
- setup:
+ build:
<<: *defaults
steps:
- checkout
@@ -50,10 +50,10 @@ jobs:
workflows:
microcosm:
jobs:
- - setup
+ - build
- audit:
- requires: [setup]
+ requires: [build]
- test-dev:
- requires: [setup]
+ requires: [build]
- test-prod:
- requires: [setup]
+ requires: [build]
| 10 |
diff --git a/magefile.go b/magefile.go @@ -30,18 +30,22 @@ const (
hugoVersion = "0.52"
)
+func xplatPath(pathParts ...string) string {
+ return filepath.Join(pathParts...)
+}
+
var (
ignoreSubdirectoryPaths = []string{
- ".vendor",
- ".sparta",
- ".vscode",
- "resources/describe",
- "docs_source/themes/",
+ xplatPath(".vendor"),
+ xplatPath(".sparta"),
+ xplatPath(".vscode"),
+ xplatPath("resources", "describe"),
+ xplatPath("docs_source", "themes"),
}
- hugoDocsSourcePath = "./docs_source"
+ hugoDocsSourcePath = xplatPath(".", "docs_source")
hugoDocsPaths = []string{
hugoDocsSourcePath,
- "./docs",
+ xplatPath(".", "docs"),
}
hugoPath = filepath.Join(localWorkDir, "hugo")
header = strings.Repeat("-", 80)
| 0 |
diff --git a/app/shared/components/TabMenu.js b/app/shared/components/TabMenu.js @@ -98,17 +98,13 @@ class TabMenu extends Component<Props> {
{(connection && connection.chain)
? (
<Menu.Item
- name="about"
- position="right"
- active={activeItem === 'about'}
- onClick={handleItemClick}
+ name="blockchain"
>
- <span>
- {t('tab_menu_blockchain_message')}
- </span>
- <span>
- {connection.chain}
- </span>
+ <Label
+ size="medium"
+ color="grey"
+ content={connection.chain}
+ />
</Menu.Item>
) : ''}
<Menu.Item
| 1 |
diff --git a/app/models/observation.rb b/app/models/observation.rb @@ -2021,22 +2021,22 @@ class Observation < ActiveRecord::Base
precision = 10**5.0
range = ((-1 * precision)..precision)
half_cell = COORDINATE_UNCERTAINTY_CELL_SIZE / 2
- base_lat, base_lon = uncertainty_cell_southwest_latlon( lat, lon )
- [ base_lat + ((rand(range) / precision) * half_cell),
- base_lon + ((rand(range) / precision) * half_cell)]
+ center_lat, center_lon = uncertainty_cell_center_latlon( lat, lon )
+ [ center_lat + ((rand(range) / precision) * half_cell),
+ center_lon + ((rand(range) / precision) * half_cell)]
end
#
# Coordinates of the southwest corner of the uncertainty cell for any given coordinates
#
- def self.uncertainty_cell_southwest_latlon( lat, lon )
+ def self.uncertainty_cell_center_latlon( lat, lon )
half_cell = COORDINATE_UNCERTAINTY_CELL_SIZE / 2
# how many significant digits in the obscured coordinates (e.g. 5)
# doing a floor with intervals of 0.2, then adding 0.1
# so our origin is the center of a 0.2 square
- base_lat = lat - (lat % COORDINATE_UNCERTAINTY_CELL_SIZE) + half_cell
- base_lon = lon - (lon % COORDINATE_UNCERTAINTY_CELL_SIZE) + half_cell
- [base_lat, base_lon]
+ center_lat = lat - (lat % COORDINATE_UNCERTAINTY_CELL_SIZE) + half_cell
+ center_lon = lon - (lon % COORDINATE_UNCERTAINTY_CELL_SIZE) + half_cell
+ [center_lat, center_lon]
end
#
@@ -2044,12 +2044,13 @@ class Observation < ActiveRecord::Base
# for the given coordinates.
#
def self.uncertainty_cell_diagonal_meters( lat, lon )
- base_lat, base_lon = uncertainty_cell_southwest_latlon( lat, lon )
+ half_cell = COORDINATE_UNCERTAINTY_CELL_SIZE / 2
+ center_lat, center_lon = uncertainty_cell_center_latlon( lat, lon )
lat_lon_distance_in_meters(
- base_lat,
- base_lon,
- base_lat + COORDINATE_UNCERTAINTY_CELL_SIZE,
- base_lon + COORDINATE_UNCERTAINTY_CELL_SIZE
+ center_lat - half_cell,
+ center_lon - half_cell,
+ center_lat + half_cell,
+ center_lon + half_cell
).ceil
end
| 10 |
diff --git a/kitty-items-js/src/index.ts b/kitty-items-js/src/index.ts @@ -64,8 +64,9 @@ async function run() {
marketService
);
- app.listen(3000, () => {
- console.log("Listening on port 3000!");
+ const port = process.env.PORT || 3000;
+ app.listen(port, () => {
+ console.log(`Listening on port ${port}!`);
});
}
| 0 |
diff --git a/autoButtons/autoButtons.js b/autoButtons/autoButtons.js @@ -34,7 +34,7 @@ const autoButtons = (() => { // eslint-disable-line no-unused-vars
// 0.6.x => 0.8.0 Setting additions
imageIcons: {
type: 'boolean',
- default: false,
+ default: true,
name: `Image Icons`,
description: `Render default icons as images (may solve font aligntment issues on Mac / ChromeOS)`,
menuAction: `$--imageicon`,
| 3 |
diff --git a/CHANGELOG.md b/CHANGELOG.md +## Version 3.0.0
+**Features**
+* Added ability to sort on any field where an endpoint returns an array - #129
+* Added array of links to official SpaceX flickr photos for rockets, dragon capsules, launches, and the tesla roadster
+* Added `tentative_max_precision` field for more information about partial dates in upcoming launches. Values can include hour, day, month, quarter, half, or year. This provides important context about how precise the future date is
+* Added link to api status page - 42aec55
+* Added reusable date parsing utility - 0d8ebc0
+* Added ability to pretty print json results with the `pretty=true` querystring - d8c51e6
+* Added ability to mask and filter specific json fields from the response to reduce JSON payload size - 9558453 - ( thanks **@jhpratt** )
+* Added script to update payload orbit params on an hourly basis - 03777f4
+* Added missions endpoint with additional data regarding groups of 2 or more launches by the same company
+* Added `arg_of_pericenter` and `mean_anomaly` to current orbital params for full Keplerian element support
+* Added automated update script to pull updated launch times from the [r/SpaceX wiki manifest](https://www.reddit.com/r/spacex/wiki/launches/manifest) every 10 min
+* Added automated script to pull current orbital data from the [SpaceTrack API](https://www.space-track.org) every hour
+* Added automated script to pull current lat/long, status, course, and speed of SpaceX support ships from [MarineTraffic.com](https://www.marinetraffic.com/) every 10 min
+* Updated docker compose to use alpine redis to reduce image size - 3e70fd1
+* Updated production logger to strip private info from response object - d9b47c1
+* Switched from day.js to moment.js in update scripts for improved UTC support - bf596e5
+
+**Fixes**
+* Fixed bug where duplicates might show up in payload endpoint - 5e608d5
+* Fixed bug where v3 rocket id was removed - 82c2568
+* Fixed bug where roadster epoch was displayed as a string instead of an int - 884c713
+
+**Docs Changes**
+* Now using [Postman](https://www.getpostman.com/) for [docs](https://documenter.getpostman.com/view/2025350/RWaEzAiG)
+* A Postman collection with all the new endpoints is available [here](https://app.getpostman.com/run-collection/3aeac01a548a87943749)
+* Added link to community made apps/bots/clients [here](https://github.com/r-spacex/SpaceX-API/blob/master/clients.md)
+
+**Endpoint Changes**
+* `/v2/launches/all` ----> `/v3/launches`
+* `/v2/launches` ----> `/v3/launches/past`
+* `/v2/info/history` ----> `/v3/history`
+* `/v2/info/roadster` ----> `/v3/roadster`
+* `/v2/parts/cores` ----> `/v3/cores`
+* `/v2/parts/caps` ----> `/v3/capsules`
+* `/v2/capsules` ----> `/v3/dragons`
+
+**Database Changes**
+* Added `flickr_images`, `landing_intent`, `arg_of_pericenter`, `mean_anomaly`, `fairings`, `ships`, `static_fire_date_unix`, `is_tentative`, and `tentative_max_precision` to launches
+* Added `reuse_count` to capsules
+* Added `reuse_count` to cores
+* Added Ships collection
+* Added Missions collection
+* Updated `rtls_attempts` and `asds_attempts` in cores to be an int instead of boolean
+* In rockets, `id` is now `rocket_id`, `rocketid` is now `id`, and `type` is now `rocket_type` to bring the fields in line with the launch fields
+* In launchpads, `id` is now `site_id`, `padid` is now `id`, and `full_name` is now `site_name_long` to bring the fields in line with the launch fields
+* The `reuse` object is no longer included on v3 launches. Reuse information has been moved into each core, payload, and fairing object
+* `capsules`, `cores`, and `ships` endpoints now have a new array format for the missions array. The new format provides more context, and allows the flight number to be passed in easily as a query param to quickly get launch data: `/launches/18`
+ * Old:
+ ```json
+ "missions": [
+ "CRS-4"
+ ]
+ ```
+ * New:
+ ```json
+ "missions": [
+ {
+ "name": "CRS-4",
+ "flight": 18
+ }
+ ]
+ ```
+
## Version 2.8.0
**TLDR**
* Migrated from east U.S. Heroku to central U.S. Linode
| 3 |
diff --git a/protocols/peer/contracts/Peer.sol b/protocols/peer/contracts/Peer.sol @@ -254,6 +254,11 @@ contract Peer is IPeer, Ownable {
// Perform the swap.
swapContract.swap(_order);
+ }
+ function setTradeWallet(address _newTradeWallet) external onlyOwner {
+ require(_newTradeWallet != address(0), 'TRADE_WALLET_REQUIRED');
+ tradeWallet = _newTradeWallet;
}
+
}
| 12 |
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:windowSoftInputMode="adjustResize"
- android:launchMode="singleTask">
+ android:launchMode="singleTask"
+ android:taskAffinity="">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
| 12 |
diff --git a/lib/determine-basal/determine-basal.js b/lib/determine-basal/determine-basal.js @@ -522,6 +522,7 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
rT.reason += "BG " + convert_bg(bg, profile) + "<" + convert_bg(threshold, profile) + "; ";
if ((glucose_status.delta <= 0 && minDelta <= 0) || (glucose_status.delta < expectedDelta && minDelta < expectedDelta) || bg < 60 ) {
// BG is still falling / rising slower than predicted
+ // TODO: carbsReq
return tempBasalFunctions.setTempBasal(0, 30, profile, rT, currenttemp);
}
if (glucose_status.delta > minDelta) {
@@ -610,7 +611,7 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
} else {
// calculate a long enough zero temp to eventually correct back up to target
if ( rate < 0 ) {
- var bgUndershoot = target_bg - (naive_eventualBG + minIOBPredBG)/2;
+ var bgUndershoot = target_bg - naive_eventualBG;
var worstCaseInsulinReq = bgUndershoot / sens;
var durationReq = round(60*worstCaseInsulinReq / profile.current_basal);
if (durationReq < 0) {
| 4 |
diff --git a/front/src/actions/login/loginGateway.js b/front/src/actions/login/loginGateway.js @@ -80,10 +80,17 @@ function createActions(store) {
route('/link-gateway-user');
}
} catch (e) {
+ const error = get(e, 'response.error');
+ // if user was previously linked to another instance, we reset the user id
+ if (error === 'LINKED_USER_NOT_FOUND') {
+ await state.session.gatewayClient.updateUserIdInGladys(null);
+ route('/link-gateway-user');
+ } else {
store.setState({
gatewayLoginStatus: RequestStatus.Error
});
}
+ }
},
updateLoginEmail(state, e) {
store.setState({
| 9 |
diff --git a/src/electron/ipc-api/browserViewManager.ts b/src/electron/ipc-api/browserViewManager.ts @@ -37,10 +37,10 @@ const mockTodosService = ({ isActive = false }: { isActive?: boolean }): IIPCSer
const todosRecipe = loadRecipeConfig(TODOS_RECIPE_ID);
return {
- id: 'franz-todos',
+ id: TODOS_RECIPE_ID,
name: 'Franz Todos',
url: todosRecipe.config.serviceURL,
- partition: 'franz-todos',
+ partition: TODOS_RECIPE_ID,
state: {
isActive,
spellcheckerLanguage: '',
| 14 |
diff --git a/examples/kml/kml.js b/examples/kml/kml.js const osm = new og.layer.XYZ('osm', { isBaseLayer: true, url: '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' });
const globus = new og.Globe({ target: 'globus', terrain: new og.terrain.GlobusTerrain(), layers: [osm] });
const billboard = { src: './carrot.png', color: 'red' };
-let extent;
+let kmlExtent;
/**
* Read the kml files as xml files and extract the coordinates tags.
@@ -23,25 +23,38 @@ const readKmlFile = file => {
};
/**
- * Creates billboard or polyline from array of lonlat.
+ * Creates billboards or polylines from array of lonlat.
* @param {Array} pathes
* @param {string} color
* @returns {Array<og.Entity>}
*/
const extractPathes = (pathes, color) => {
const entities = [];
+ const extent = new og.Extent(new og.LonLat(180.0, 90.0), new og.LonLat(-180.0, -90.0));
+ const addToExtent = (c) => {
+ const lon = c[0], lat = c[1];
+ if (lon < extent.southWest.lon) extent.southWest.lon = lon;
+ if (lat < extent.southWest.lat) extent.southWest.lat = lat;
+ if (lon > extent.northEast.lon) extent.northEast.lon = lon;
+ if (lat > extent.northEast.lat) extent.northEast.lat = lat;
+ };
+
pathes.forEach(kmlFile => kmlFile.forEach(path => {
if (path.length === 1) {
const lonlat = path[0];
const _entity = new og.Entity({ lonlat, billboard });
entities.push(_entity);
+ addToExtent(lonlat);
} else if (path.length > 1) {
- const pathLonLat = path.map(item => new og.LonLat(item[0], item[1], item[2]));
+ const pathLonLat = path.map(item => {
+ addToExtent(item);
+ return new og.LonLat(item[0], item[1], item[2]);
+ });
const _entity = new og.Entity({ polyline: { pathLonLat: [pathLonLat], thickness: 3, color, isClosed: false } });
entities.push(_entity);
}
}));
- return entities;
+ return { entities, extent };
};
document.getElementById('upload').onchange = async e => {
@@ -49,15 +62,14 @@ document.getElementById('upload').onchange = async e => {
billboard.color = color;
const files = Array.from(e.target.files);
const pathes = await Promise.all(files.map(f => readKmlFile(f)));
- const entities = extractPathes(pathes, color);
- const ptsLayer = new og.layer.Vector('pts', { entities });
+ const { entities, extent } = extractPathes(pathes, color);
+ const ptsLayer = new og.layer.Vector('pts', { entities, clampToGround: true });
globus.planet.addLayer(ptsLayer);
- // extent = ptsLayer.getExtent(); doesn't work :(
- extent = entities[0].getExtent();
+ kmlExtent = extent;
globus.planet.flyExtent(extent);
document.getElementById('viewExtent').style.display = 'inline';
};
document.getElementById('viewExtent').onclick = () => {
- globus.planet.flyExtent(extent);
+ globus.planet.flyExtent(kmlExtent);
};
| 4 |
diff --git a/app/components/Contacts/Network.scss b/app/components/Contacts/Network.scss }
.channels {
- padding: 20px;
- height: 100%;
+ padding: 20px 0px 20px 20px;
overflow-y: auto;
.listHeader {
flex-direction: row;
justify-content: space-between;
align-items: baseline;
+ padding-right: 20px;
h2, h2 span {
color: $white;
ul {
margin-top: 20px;
- height: auto;
+ height: calc(100vh - 202px);
overflow-y: auto;
overflow-x: hidden;
}
flex-direction: row;
justify-content: space-between;
color: $white;
- padding: 10px 0;
+ padding: 10px 20px 10px 0px;
margin: 10px 0;
cursor: pointer;
| 1 |
diff --git a/src/base/index.js b/src/base/index.js @@ -76,6 +76,7 @@ class BaseCommand extends Command {
}
async authenticate(authToken) {
+ const webUI = process.env.NETLIFY_WEB_UI || 'https://app.netlify.com'
const token = authToken || this.configToken
if (token) {
// Update the api client
@@ -93,7 +94,7 @@ class BaseCommand extends Command {
})
// Open browser for authentication
- const authLink = `https://app.netlify.com/authorize?response_type=ticket&ticket=${ticket.id}`
+ const authLink = `${webUI}/authorize?response_type=ticket&ticket=${ticket.id}`
this.log(`Opening ${authLink}`)
await openBrowser(authLink)
| 11 |
diff --git a/elasticdump.js b/elasticdump.js @@ -175,7 +175,9 @@ class elasticdump extends EventEmitter {
})
if (data.length === 0) {
- return queue.onIdle().then(() => resolve(totalWrites))
+ return queue.onIdle()
+ .then(() => resolve(totalWrites))
+ .catch(reject)
} else {
return queue.add(() => overlappedIoPromise)
.then(() => {
@@ -185,7 +187,8 @@ class elasticdump extends EventEmitter {
return this.__looper(limit, offset, totalWrites, queue)
.then(resolve)
})
- }).catch(reject)
+ })
+ .catch(reject)
}
})
})
| 9 |
diff --git a/jazz_deployments/index.js b/jazz_deployments/index.js @@ -550,7 +550,7 @@ function buildNowRequest (serviceDetails, config, refDeployment) {
});
}
-const factory = {
+const exportable = {
handler,
genericInputValidation,
processDeploymentCreation,
@@ -572,4 +572,4 @@ const factory = {
buildNowRequest
}
-module.exports = factory;
\ No newline at end of file
+module.exports = exportable;
\ No newline at end of file
| 10 |
diff --git a/src/libs/ValidationUtils.js b/src/libs/ValidationUtils.js @@ -90,9 +90,10 @@ function isValidExpirationDate(string) {
return false;
}
- // Use the first of the month to check if the expiration date is in the future or not
+
+ // Use the last of the month to check if the expiration date is in the future or not
const expirationDate = `${getYearFromExpirationDateString(string)}-${getMonthFromExpirationDateString(string)}-01`;
- return moment(expirationDate).isAfter(moment());
+ return moment(expirationDate).endOf('month').isAfter(moment());
}
/**
| 4 |
diff --git a/lib/assets/core/javascripts/cartodb3/data/data-observatory/regions-collection.js b/lib/assets/core/javascripts/cartodb3/data/data-observatory/regions-collection.js var BaseCollection = require('./data-observatory-base-collection');
var BaseModel = require('../../components/custom-list/custom-list-item-model');
-var REGIONS_QUERY = "SELECT count(*) num_measurements, tag.key region_id, tag.value region_name FROM (SELECT * FROM OBS_GetAvailableNumerators((SELECT ST_SetSRID(ST_Extent(the_geom), 4326) FROM ({{{ query }}}) q)) WHERE jsonb_pretty(numer_tags) LIKE '%subsection/%') numers, Jsonb_Each(numers.numer_tags) tag WHERE tag.key like 'section%' GROUP BY tag.key, tag.value";
+var REGIONS_QUERY = "SELECT count(*) num_measurements, tag.key region_id, tag.value region_name FROM (SELECT * FROM OBS_GetAvailableNumerators() WHERE jsonb_pretty(numer_tags) LIKE '%subsection/%') numers, Jsonb_Each(numers.numer_tags) tag WHERE tag.key like 'section%' GROUP BY tag.key, tag.value ORDER BY region_name";
module.exports = BaseCollection.extend({
buildQuery: function () {
| 2 |
diff --git a/src/client/components/composer/NewRequest/GRPCAutoInputForm.jsx b/src/client/components/composer/NewRequest/GRPCAutoInputForm.jsx @@ -86,7 +86,6 @@ class GRPCAutoInputForm extends Component {
this.toggleShow = this.toggleShow.bind(this);
this.setService = this.setService.bind(this);
this.setRequest = this.setRequest.bind(this);
- this.setStreamingType = this.setStreamingType.bind(this);
}
// waiting for server to work to test functionality of service and request dropdowns
@@ -126,12 +125,7 @@ class GRPCAutoInputForm extends Component {
this.setState({
...this.state,
selectedRequest: requestName
- });
-
- this.setStreamingType();
- }
-
- setStreamingType() {
+ }, () => {
const selectedService = this.state.selectedService;
const selectedRequest = this.state.selectedRequest;
const services = this.state.services;
@@ -148,6 +142,7 @@ class GRPCAutoInputForm extends Component {
this.setState({ selectedStreamingType: streamingType });
const streamBtn = document.getElementById('stream')
streamBtn.innerText = streamingType
+ });
}
render() {
| 1 |
diff --git a/js/options.js b/js/options.js @@ -290,9 +290,14 @@ objBrowser.runtime.onMessage.addListener(
case 'neutral' :
default :
chrome.browserAction.setIcon({
- path: "images/ether-128x128-black_badge.png",
+ path: "images/ether-128x128.png",
tabId: sender.tab.id
});
+
+ chrome.browserAction.setTitle({
+ title: "EtherAddressLookup (Powered by MyCrypto)",
+ });
+
break;
}
break;
| 12 |
diff --git a/src/web/widgets/Laser/index.styl b/src/web/widgets/Laser/index.styl border: 1px solid #ccc;
text-align: right;
padding: 5px 10px;
+ height: 32px;
font-size: 18px;
font-weight: bold;
margin-right: 5px;
| 12 |
diff --git a/includes/Core/Assets/Assets.php b/includes/Core/Assets/Assets.php @@ -440,7 +440,7 @@ final class Assets {
new Script(
'googlesitekit-admin',
array(
- 'src' => $base_url . 'js/googlesitekit-admin.js',
+ 'version' => null,
'dependencies' => array( 'googlesitekit-apifetch-data', 'googlesitekit-admin-data' ),
'execution' => 'defer',
)
| 2 |
diff --git a/generators/client/templates/angular/src/main/webapp/app/layouts/error/error.component.ts.ejs b/generators/client/templates/angular/src/main/webapp/app/layouts/error/error.component.ts.ejs @@ -57,7 +57,10 @@ export class ErrorComponent implements OnInit<% if (enableTranslation) { %>, OnD
<%_ if (enableTranslation) { _%>
private getErrorMessageTranslation(): void {
- this.translateService.get(this.errorKey).subscribe(translatedErrorMessage => this.errorMessage = translatedErrorMessage);
+ this.errorMessage = '';
+ if (this.errorKey) {
+ this.translateService.get(this.errorKey).subscribe(translatedErrorMessage => (this.errorMessage = translatedErrorMessage));
+ }
}
ngOnDestroy(): void {
| 1 |
diff --git a/packages/storybook/jest.config.js b/packages/storybook/jest.config.js @@ -7,5 +7,6 @@ module.exports = {
rootDir: "../../",
setupFiles: ["raf/polyfill"],
setupTestFrameworkScriptFile: "<rootDir>/packages/storybook/support/jest/setupTests.js",
+ testPathIgnorePatterns: ["<rootDir>/packages/vanilla"],
unmockedModulePathPatterns: ["node_modules"]
};
| 8 |
diff --git a/server/views/topics/apicache.py b/server/views/topics/apicache.py @@ -32,11 +32,11 @@ def topic_media_list(user_mc_key, topics_id, **kwargs):
'link_id': request.args.get('linkId'),
}
merged_args.update(kwargs) # passed in args override anything pulled form the request.args
- return _cached_topic_media_list(user_mc_key, topics_id, **merged_args)
+ return _cached_topic_media_list_with_metadata(user_mc_key, topics_id, **merged_args)
@cache.cache_on_arguments(function_key_generator=key_generator)
-def _cached_topic_media_list(user_mc_key, topics_id, **kwargs):
+def _cached_topic_media_list_with_metadata(user_mc_key, topics_id, **kwargs):
'''
Internal helper - don't call this; call topic_media_list instead. This needs user_mc_key in the
function signature to make sure the caching is keyed correctly.
| 10 |
diff --git a/aura-impl/src/main/resources/aura/component/InteropComponent.js b/aura-impl/src/main/resources/aura/component/InteropComponent.js @@ -373,6 +373,11 @@ InteropComponent.prototype.setGlobalAttribute = function (element, attrName, val
* @export
*/
InteropComponent.prototype.get = function (key) {
+ if(!$A.util.isString(key)) {
+ var msg = "The provided key (" + key + ") is not a string and cannot be used to look up values for the current component.";
+ throw new $A.auraError(msg);
+ }
+
key = $A.expressionService.normalize(key);
var path = key.split('.');
path.shift(); // remove provider
| 5 |
diff --git a/src/components/api-request.js b/src/components/api-request.js @@ -128,6 +128,19 @@ export default class ApiRequest extends LitElement {
cursor:pointer;
}
+ .v-tab-btn {
+ height:24px;
+ border:none;
+ background:none;
+ opacity: 0.3;
+ cursor: pointer;
+ }
+ .v-tab-btn.active {
+ font-weight:bold;
+ background: var(--bg);
+ opacity: 1;
+ }
+
@media only screen and (min-width: 768px) {
.textarea {
padding:8px;
@@ -520,7 +533,7 @@ export default class ApiRequest extends LitElement {
}
</div>
</td>
- <td style="width:${fieldType === 'object' ? '100%' : '160px'}; min-width:100px;">
+ <td style="${fieldType === 'object' ? 'width:100%; padding:0;' : 'width:160px;'} min-width:100px;">
${fieldType === 'array'
? fieldSchema.items.format === 'binary'
? html`
@@ -552,14 +565,15 @@ export default class ApiRequest extends LitElement {
: html`
${fieldType === 'object'
? html`
- <div class="tab-panel col" style="border-width:0 0 1px 0;">
- <div class="tab-buttons row" @click="${(e) => {
- if (e.target.classList.contains('tab-btn')) {
+ <div class="tab-panel row" style="min-height:220px; border-left: 6px solid var(--border-color); align-items: stretch;">
+ <div style="width:24px; background-color:var(--border-color)">
+ <div class="row" style="flex-direction:row-reverse; width:160px; height:24px; transform:rotate(270deg) translateX(-160px); transform-origin:top left; display:block;" @click="${(e) => {
+ if (e.target.classList.contains('v-tab-btn')) {
const tab = e.target.dataset.tab;
if (tab) {
const tabPanelEl = e.target.closest('.tab-panel');
- const selectedTabBtnEl = tabPanelEl.querySelector(`.tab-btn[data-tab="${tab}"]`);
- const otherTabBtnEl = [...tabPanelEl.querySelectorAll(`.tab-btn:not([data-tab="${tab}"])`)];
+ const selectedTabBtnEl = tabPanelEl.querySelector(`.v-tab-btn[data-tab="${tab}"]`);
+ const otherTabBtnEl = [...tabPanelEl.querySelectorAll(`.v-tab-btn:not([data-tab="${tab}"])`)];
const selectedTabContentEl = tabPanelEl.querySelector(`.tab-content[data-tab="${tab}"]`);
const otherTabContentEl = [...tabPanelEl.querySelectorAll(`.tab-content:not([data-tab="${tab}"])`)];
selectedTabBtnEl.classList.add('active');
@@ -570,11 +584,12 @@ export default class ApiRequest extends LitElement {
}
if (e.target.tagName.toLowerCase() === 'button') { this.activeSchemaTab = e.target.dataset.tab; }
}}">
- <button class="tab-btn active" data-tab = 'model' >MODEL</button>
- <button class="tab-btn" data-tab = 'example'>EXAMPLE </button>
+ <button class="v-tab-btn" data-tab = 'model'>MODEL</button>
+ <button class="v-tab-btn active" data-tab = 'example'>EXAMPLE </button>
+ </div>
</div>
${html`
- <div class="tab-content col" data-tab = 'model' style="display:block">
+ <div class="tab-content col" data-tab = 'model' style="display:none; padding:0 10px; width:100%;">
<schema-tree
.data = '${formdataPartSchema}'
schema-expand-level = "${this.schemaExpandLevel}"
@@ -583,13 +598,13 @@ export default class ApiRequest extends LitElement {
</div>`
}
${html`
- <div class="tab-content col" data-tab = 'example' style="display:none">
+ <div class="tab-content col" data-tab = 'example' style="display:block; padding:0 10px; width:100%">
<textarea class = "textarea"
+ style = "width:100%; border:none; resize:vertical;"
data-array = "false"
data-ptype = "${mimeType.includes('form-urlencode') ? 'form-urlencode' : 'form-data'}"
data-pname = "${fieldName}"
spellcheck = "false"
- style="width:100%; resize:vertical;"
>${formdataPartExample[0].exampleValue}</textarea>
</div>`
}
| 7 |
diff --git a/.travis.yml b/.travis.yml @@ -44,7 +44,7 @@ before_install:
fi
- |
if [[ "$PHP" == "1" ]] || [[ "$E2E" == "1" ]] || [[ "$SNIFF" == "1" ]]; then
- docker run --rm -v "$PWD:/app" -v "$HOME/.cache/composer:/tmp/cache" composer:2 install
+ docker run --rm -v "$PWD:/app" -v "$HOME/.cache/composer:/tmp/cache" composer install
fi
- |
if [[ "$WP_VERSION" == "latest" ]]; then
@@ -75,7 +75,7 @@ script:
- |
if [[ "$E2E" == "1" ]]; then
npm run build:test || exit 1 # Build for tests.
- docker run --rm -v "$PWD:/app" -v "$HOME/.cache/composer:/tmp/cache" composer:2 install
+ docker run --rm -v "$PWD:/app" -v "$HOME/.cache/composer:/tmp/cache" composer install
npm run env:start || exit 1
npm run test:e2e:ci || exit 1 # E2E tests.
fi
| 2 |
diff --git a/blocks/procedures.js b/blocks/procedures.js @@ -131,7 +131,6 @@ Blockly.Blocks['procedures_defnoreturn'] = {
var parameter = document.createElement('arg');
var argModel = this.argumentVarModels_[i];
parameter.setAttribute('name', argModel.name);
- parameter.setAttribute('varId', argModel.getId());
parameter.setAttribute('var-id', argModel.getId());
if (opt_paramIds && this.paramIds_) {
parameter.setAttribute('paramId', this.paramIds_[i]);
| 2 |
diff --git a/Dockerfile b/Dockerfile @@ -54,6 +54,10 @@ LABEL maintainer="Reaction Commerce <[email protected]>" \
com.reactioncommerce.docker.git.sha1=$GIT_SHA1 \
com.reactioncommerce.docker.license=$LICENSE
+# apk list bash curl less vim | cut -d " " -f 1 | sed 's/-/=/' | xargs
+RUN apk --no-cache add bash curl less vim
+SHELL ["/bin/bash", "-o", "pipefail", "-o", "errexit", "-u", "-c"]
+
# Because Docker Compose uses a volume for node_modules and volumes are owned
# by root by default, we have to initially create node_modules here with correct owner.
# Without this Yarn cannot write packages into node_modules later, when running in a container.
| 2 |
diff --git a/src/cli/commands-cn/run.js b/src/cli/commands-cn/run.js @@ -40,8 +40,6 @@ module.exports = async (config, cli, command) => {
// Start CLI persistance status
cli.sessionStart('Initializing', { timer: true });
- await utils.login();
-
// Load YAML
let instanceDir = process.cwd();
if (config.target) {
@@ -49,6 +47,8 @@ module.exports = async (config, cli, command) => {
}
const instanceYaml = await utils.loadInstanceConfig(instanceDir, command);
+ await utils.login();
+
// Presentation
const meta = `Action: "${command}" - Stage: "${instanceYaml.stage}" - App: "${instanceYaml.app}" - Instance: "${instanceYaml.name}"`;
if (!config.debug) {
| 7 |
diff --git a/src/server/views/layout/layout.html b/src/server/views/layout/layout.html <div id="wrapper">
{% block layout_head_nav %}
- {% set appVersion = window.navigator.appVersion.toLowerCase() %}
- <nav id="grw-navbar" class="navbar grw-navbar sticky-top grw-navbar-for-old-ios navbar-expand navbar-dark mb-0 px-0"></nav>
+ <nav id="grw-navbar" class="navbar grw-navbar navbar-expand navbar-dark sticky-top mb-0 px-0"></nav>
{% endblock %} {# layout_head_nav #}
{% block head_warn_breaking_changes %}{% include '../widget/alert_breaking_changes.html' %}{% endblock %}
| 13 |
diff --git a/src/core/core.controller.js b/src/core/core.controller.js @@ -1133,7 +1133,7 @@ class Chart {
// Invoke onHover hook
callCallback(options.onHover || options.hover.onHover, [e, active, me], me);
- if (e.type === 'mouseup' || e.type === 'click') {
+ if (e.type === 'mouseup' || e.type === 'click' || e.type === 'contextmenu') {
if (_isPointInArea(e, me.chartArea)) {
callCallback(options.onClick, [e, active, me], me);
}
| 11 |
diff --git a/web-monetization.js b/web-monetization.js @@ -26,7 +26,7 @@ setInterval(() => {
document.monetization.addEventListener('monetizationprogress', function monetizationProgress (e) {
const current = pointers[currentIndex];
const currentMonetizationPointer = encodeURIComponent(current.monetizationPointer);
- const apiUrl = `https://api.metaverse.website/monetization/${current.contentId}/${current.ownerAddress}/${currentMonetizationPointer}`;
+ const apiUrl = `https://analytics.webaverse.com/monetization/${current.contentId}/${current.ownerAddress}/${currentMonetizationPointer}`;
if (pendingAnalyticsData[apiUrl]) {
const existing = pendingAnalyticsData[apiUrl];
pendingAnalyticsData[apiUrl] = {
| 0 |
diff --git a/src/components/DateRangePicker.js b/src/components/DateRangePicker.js @@ -482,6 +482,7 @@ const DateRangePicker = React.createClass({
position: 'absolute',
left: this.props.isRelative ? 'auto' : 0,
right: 0,
+ width: window.innerWidth < 450 && '100%',
zIndex: 10
},
calendarWrapper: {
@@ -581,7 +582,7 @@ const DateRangePicker = React.createClass({
fontSize: StyleConstants.FontSizes.MEDIUM,
paddingLeft: isLargeOrMediumWindowSize ? 10 : 0,
paddingTop: 10,
- maxWidth: 250,
+ maxWidth: window.innerWidth > 450 && 250,
width: isLargeOrMediumWindowSize ? 150 : '100%'
},
rangeOption: {
| 12 |
diff --git a/views/recipes.blade.php b/views/recipes.blade.php <h5 class="card-title mb-1">{{ $recipe->name }}</h5>
<p class="card-text">
@if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled == 1)<i class="fas fa-check text-success"></i>@elseif(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1)<i class="fas fa-exclamation text-warning"></i>@else<i class="fas fa-times text-danger"></i>@endif
- <span class="timeago-contextual">@if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled == 1){{ $__t('Enough in stock') }}@elseif(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1){{ $__t('Not enough in stock, %s ingredients missing but already on the shopping list', FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count) }}@else{{ $__t('Not enough in stock, %s ingredients missing', FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count) }}@endif</span>
+ <span class="timeago-contextual">@if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled == 1){{ $__t('Enough in stock') }}@elseif(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1){{ $__n(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count, 'Not enough in stock, %s ingredient missing but already on the shopping list', 'Not enough in stock, %s ingredients missing but already on the shopping list') }}@else{{ $__n(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count, 'Not enough in stock, %s ingredient missing', 'Not enough in stock, %s ingredients missing') }}@endif</span>
</p>
</div>
</div>
| 1 |
diff --git a/src/runtime/audience-action-flow.js b/src/runtime/audience-action-flow.js import {ActivityIframeView} from '../ui/activity-iframe-view';
import {
AlreadySubscribedResponse,
+ CompleteAudienceActionResponse,
EntitlementsResponse,
} from '../proto/api_messages';
import {AutoPromptType} from '../api/basic-subscriptions';
import {Constants} from '../utils/constants';
import {ProductType} from '../api/subscriptions';
+import {SWG_I18N_STRINGS} from '../i18n/swg-strings';
+import {Toast} from '../ui/toast';
import {feArgs, feUrl} from './services';
+import {msg} from '../utils/i18n';
import {parseUrl} from '../utils/url';
/**
@@ -73,12 +77,20 @@ export class AudienceActionFlow {
/** @private @const {!AudienceActionParams} */
this.params_ = params;
+ /** @private @const {!ProductType} */
+ this.productType_ = params.autoPromptType
+ ? autopromptTypeToProductTypeMapping[params.autoPromptType]
+ : DEFAULT_PRODUCT_TYPE;
+
/** @private @const {!../components/dialog-manager.DialogManager} */
this.dialogManager_ = deps.dialogManager();
/** @private @const {!./entitlements-manager.EntitlementsManager} */
this.entitlementsManager_ = deps.entitlementsManager();
+ /** @private @const {?./client-config-manager.ClientConfigManager} */
+ this.clientConfigManager_ = deps.clientConfigManager();
+
/** @private @const {!ActivityIframeView} */
this.activityIframeView_ = new ActivityIframeView(
deps.win(),
@@ -86,9 +98,7 @@ export class AudienceActionFlow {
this.getUrl_(deps.pageConfig(), deps.win()),
feArgs({
'supportsEventManager': true,
- 'productType': params.autoPromptType
- ? autopromptTypeToProductTypeMapping[params.autoPromptType]
- : DEFAULT_PRODUCT_TYPE,
+ 'productType': this.productType_,
}),
/* shouldFadeBody */ true
);
@@ -104,9 +114,8 @@ export class AudienceActionFlow {
return Promise.resolve();
}
- this.activityIframeView_.on(
- EntitlementsResponse,
- this.handleEntitlementsResponse_.bind(this)
+ this.activityIframeView_.on(CompleteAudienceActionResponse, (response) =>
+ this.handleCompleteAudienceActionResponse_(response)
);
this.activityIframeView_.on(
@@ -148,19 +157,57 @@ export class AudienceActionFlow {
* 1) Store the updated user token
* 2) Clear existing entitlements from the page
* 3) Re-fetch entitlements which may potentially provide access to the page
- * @param {EntitlementsResponse} response
+ * @param {CompleteAudienceActionResponse} response
* @private
*/
- handleEntitlementsResponse_(response) {
+ handleCompleteAudienceActionResponse_(response) {
this.dialogManager_.completeView(this.activityIframeView_);
this.entitlementsManager_.clear();
const userToken = response.getSwgUserToken();
if (userToken) {
this.deps_.storage().set(Constants.USER_TOKEN, userToken, true);
}
+ if (response.getActionCompleted()) {
+ this.showSignedInToast_();
+ } else {
+ this.showAlreadyOptedInToast_();
+ }
this.entitlementsManager_.getEntitlements();
}
+ showSignedInToast_() {
+ // Show 'Signed in as [email protected]' toast on the pub page.
+ new Toast(
+ this.deps_,
+ feUrl('/toastiframe', {
+ flavor: 'basic',
+ })
+ ).open();
+ }
+
+ showAlreadyOptedInToast_() {
+ const lang = this.clientConfigManager_.getLanguage();
+ let customText = '';
+ if (this.params_.action === 'TYPE_REGISTRATION_WALL') {
+ customText = msg(
+ SWG_I18N_STRINGS.REGWALL_REGISTERED_BEFORE_LANG_MAP,
+ 'lang'
+ );
+ } else if (this.params_.action === 'TYPE_NEWSLETTER_SIGNUP') {
+ customText = msg(
+ SWG_I18N_STRINGS.NEWSLETTER_SIGNED_UP_BEFORE_LANG_MAP,
+ lang
+ );
+ }
+ new Toast(
+ this.deps_,
+ feUrl('/toastiframe', {
+ flavor: 'custom',
+ customText,
+ })
+ ).open();
+ }
+
/**
* @param {AlreadySubscribedResponse} response
* @private
| 9 |
diff --git a/physics-manager.js b/physics-manager.js @@ -195,6 +195,9 @@ physicsManager.enableGeometryQueries = physicsObject => {
physicsManager.removeGeometry = physicsObject => {
physx.physxWorker.removeGeometryPhysics(physx.physics, physicsObject.physicsId);
};
+physicsManager.getVelocity = (physicsObject, velocity) => {
+ physx.physxWorker.getVelocityPhysics(physx.physics, physicsObject.physicsId, velocity);
+};
physicsManager.setVelocity = (physicsObject, velocity, enableGravity) => {
physx.physxWorker.setVelocityPhysics(physx.physics, physicsObject.physicsId, velocity, enableGravity);
};
| 0 |
diff --git a/src/client/js/components/Admin/SlackIntegration/OfficialBotSettings.jsx b/src/client/js/components/Admin/SlackIntegration/OfficialBotSettings.jsx @@ -52,7 +52,7 @@ const OfficialBotSettings = (props) => {
}
};
- const generateTokenHandler = async(tokenGtoP, tokenPtoG) => {
+ const regenerateTokensHandler = async(tokenGtoP, tokenPtoG) => {
try {
await appContainer.apiv3.put('/slack-integration-settings/access-tokens', { tokenGtoP, tokenPtoG });
}
@@ -143,7 +143,7 @@ const OfficialBotSettings = (props) => {
<WithProxyAccordions
botType="officialBot"
discardTokenHandler={() => discardTokenHandler(tokenGtoP, tokenPtoG)}
- onClickRegenerateTokens={generateTokenHandler(tokenGtoP, tokenPtoG)}
+ onClickRegenerateTokens={regenerateTokensHandler(tokenGtoP, tokenPtoG)}
tokenGtoP={tokenGtoP}
tokenPtoG={tokenPtoG}
/>
| 10 |
diff --git a/src/api-gateway-websocket/WebSocketServer.js b/src/api-gateway-websocket/WebSocketServer.js import { Server } from 'ws'
import debugLog from '../debugLog.js'
-import LambdaFunctionPool from '../lambda/index.js'
import serverlessLog from '../serverlessLog.js'
import { createUniqueId } from '../utils/index.js'
export default class WebSocketServer {
constructor(options, webSocketClients, sharedServer) {
- this._lambdaFunctionPool = new LambdaFunctionPool()
this._options = options
this._server = new Server({
| 2 |
diff --git a/packages/openneuro-app/src/scripts/search/search-results.tsx b/packages/openneuro-app/src/scripts/search/search-results.tsx @@ -99,7 +99,7 @@ const SearchResultsQuery = (): React.SFC => {
variables: {
q: query,
},
- errorPolicy: 'all',
+ errorPolicy: 'ignore',
}),
)
}
| 8 |
diff --git a/src/utils/gh-auth.js b/src/utils/gh-auth.js @@ -76,7 +76,8 @@ async function getGitHubToken(opts) {
server.listen(port, resolve)
})
- const url = 'http://localhost:8080/cli?' + querystring.encode({
+ const webUI = process.env.NETLIFY_WEB_UI || 'https://app.netlify.com'
+ const url = webUI + '/cli?' + querystring.encode({
host: 'http://localhost:' + port,
provider: 'github',
})
| 11 |
diff --git a/src/compiler/grammar.imba1 b/src/compiler/grammar.imba1 @@ -190,6 +190,7 @@ var grammar =
o 'ImportSpecifierList , ImportSpecifier' do A1.add(A3)
o 'ImportSpecifierList OptComma TERMINATOR ImportSpecifier' do A1.add A4
o 'INDENT ImportSpecifierList OptComma OUTDENT' do A2
+ o 'INDENT ImportSpecifierList OptComma TERMINATOR OUTDENT' do A2
o 'ImportSpecifierList OptComma INDENT ImportSpecifierList OptComma OUTDENT' do A1.concat A4
]
| 11 |
diff --git a/lib/bal/api.js b/lib/bal/api.js -import HttpError from '../http-error'
-
export const BACKEND_URL = process.env.NEXT_PUBLIC_BACKEND_URL || 'https://backend.adresse.data.gouv.fr'
async function _fetch(url, method, body) {
@@ -19,7 +17,8 @@ async function _fetch(url, method, body) {
const contentType = response.headers.get('content-type')
if (!response.ok) {
- throw new HttpError(response)
+ const {message} = await response.json()
+ throw new Error(message)
}
if (response.ok && contentType && contentType.includes('application/json')) {
| 9 |
diff --git a/src/vaadin-grid-detailed-event-mixin.html b/src/vaadin-grid-detailed-event-mixin.html @@ -26,18 +26,38 @@ This program is available under Apache License Version 2.0, available at https:/
* to `detailedEvents`, you should listen for `detailed-click` events.
*/
detailedEvents: {
- type: Array,
- observer: '_detailedEventsChanged'
+ type: Array
+ },
+
+ _detailedEventListeners: {
+ type: Object,
+ value: () => {
+ return {};
+ }
}
};
}
- _detailedEventsChanged(newValue, oldValue) {
- newValue.forEach(this._addDetailedEventListener, this);
+ static get observers() {
+ return ['_detailedEventsChanged(detailedEvents, detailedEvents.splices)'];
+ }
+
+ _detailedEventsChanged(newEvents) {
+ const oldEvents = Object.keys(this._detailedEventListeners);
+
+ if (newEvents) {
+ newEvents.filter(event => !(oldEvents && oldEvents.indexOf(event) > -1))
+ .forEach(this._addDetailedEventListener, this);
+ }
+
+ if (oldEvents) {
+ oldEvents.filter(event => !(newEvents && newEvents.indexOf(event) > -1))
+ .forEach(this._removeDetailedEventListener, this);
+ }
}
_addDetailedEventListener(eventName) {
- this.addEventListener(eventName, e => {
+ const listener = e => {
const path = e.composedPath();
const cell = path[path.indexOf(this.$.table) - 3];
@@ -58,7 +78,15 @@ This program is available under Apache License Version 2.0, available at https:/
};
this.dispatchEvent(new CustomEvent('detailed-' + eventName, {detail: detail}));
- });
+ };
+
+ this.addEventListener(eventName, listener);
+ this._detailedEventListeners[eventName] = listener;
+ }
+
+ _removeDetailedEventListener(eventName) {
+ this.removeEventListener(eventName, this._detailedEventListeners[eventName]);
+ delete this._detailedEventListeners[eventName];
}
};
| 9 |
diff --git a/data.js b/data.js @@ -234,6 +234,14 @@ module.exports = [
url: "http://AtSpy.github.io",
source: "https://raw.githubusercontent.com/AtSpy/AtSpy/master/dist/atspy.js"
},
+ {
+ name: "FrontExpress",
+ github: "camelaissani/frontexpress",
+ tags: ["frontexpress", "router", "routing", "express", "spa", "framework", "front-end", "tiny", "parameters", "querystring", "named", "path", "uri"],
+ description: "An Express.js-Style router for the front-end",
+ url: "https://www.frontexpressjs.com",
+ source: "https://raw.githubusercontent.com/camelaissani/frontexpress/master/frontexpress.js"
+ },
{
name: "Tinyscrollbar",
github: "wieringen/tinyscrollbar",
| 0 |
diff --git a/src/app/Sidebar.js b/src/app/Sidebar.js @@ -20,6 +20,7 @@ import './Sidebar.scss';
state => ({
app: state.app,
auth: state.auth,
+ user: state.user,
messages: state.messages,
favorites: state.favorites,
}),
@@ -34,12 +35,9 @@ export default class Sidebar extends Component {
this.state = {
isFetching: true,
isLoaded: false,
- followingIsFetching: false,
- followingFetched: false,
categories: [],
props: {},
price: '',
- following: [],
menu: 'categories',
search: '',
};
@@ -56,34 +54,9 @@ export default class Sidebar extends Component {
categories: categories,
props: result.props,
});
- this.getFollowing();
});
}
- componentDidUpdate() {
- if (!this.state.followingFetched) {
- this.getFollowing();
- }
- }
-
- getFollowing() {
- if (!this.state.following.length &&
- !this.state.followingIsFetching &&
- !this.state.followingFetched) {
- this.setState({ followingIsFetching: true });
- steemdb.accounts({
- account: this.props.auth.user.name
- },
- (err, result) => {
- this.setState({
- following: result[0].following,
- followingIsFetching: false,
- followingFetched: true,
- });
- });
- }
- }
-
filterTagsBySearch(tags = []) {
const { search } = this.state;
return tags.filter((tag) => _.startsWith(tag, search));
@@ -244,7 +217,7 @@ export default class Sidebar extends Component {
<SidebarUsers
messages={this.props.messages}
auth={this.props.auth}
- contacts={this.state.following}
+ contacts={this.props.user.following.list}
favorites={this.props.favorites}
/>
}
| 4 |
diff --git a/examples/py/coinone-markets.py b/examples/py/coinone-markets.py @@ -10,7 +10,7 @@ sys.path.append(root + '/python')
import ccxt # noqa: E402
exchange = ccxt.coinone({
- 'enableRateLimit': true,
+ 'enableRateLimit': True,
# 'verbose': True, # uncomment for verbose output
})
| 1 |
diff --git a/source/Renderer/shaders/pbr.frag b/source/Renderer/shaders/pbr.frag @@ -49,7 +49,7 @@ uniform float u_ClearcoatRoughnessFactor;
// Specular
uniform vec3 u_SpecularColorFactor;
-uniform float u_SpecularFactor;
+uniform float u_SpecularFactor2;
// Transmission
uniform float u_TransmissionFactor;
@@ -254,7 +254,7 @@ MaterialInfo getSheenInfo(MaterialInfo info)
MaterialInfo getSpecularInfo(MaterialInfo info)
{
info.specularColor = u_SpecularColorFactor;
- info.specular = u_SpecularFactor;
+ info.specular = u_SpecularFactor2;
vec4 specularTexture = vec4(1.0);
#ifdef HAS_SPECULAR_MAP
| 10 |
diff --git a/tasks/partial_bundle.js b/tasks/partial_bundle.js @@ -36,6 +36,10 @@ function isFalse(a) {
);
}
+function inputBoolean(a, dflt) {
+ return !a ? dflt : !isFalse(a);
+}
+
function inputArray(a, dflt) {
dflt = dflt.slice();
@@ -52,6 +56,7 @@ if(process.argv.length > 2) {
var args = minimist(process.argv.slice(2), {});
// parse arguments
+ var unminified = inputBoolean(args.unminified, false);
var out = args.out ? args.out : 'custom';
var traces = inputArray(args.traces, allTraces);
var transforms = inputArray(args.transforms, allTransforms);
@@ -61,10 +66,15 @@ if(process.argv.length > 2) {
transformList: createList([], transforms, allTransforms, 'transform'),
name: out,
- index: path.join(constants.pathToLib, 'index-' + out + '.js'),
- distMin: path.join(constants.pathToDist, 'plotly-' + out + '.min.js')
+ index: path.join(constants.pathToLib, 'index-' + out + '.js')
};
+ if(unminified) {
+ opts.dist = path.join(constants.pathToDist, 'plotly-' + out + '.js');
+ } else {
+ opts.distMin = path.join(constants.pathToDist, 'plotly-' + out + '.min.js');
+ }
+
console.log(opts);
opts.calendars = true;
| 0 |
diff --git a/.travis.yml b/.travis.yml @@ -5,12 +5,16 @@ os:
- osx
- windows
+# https://github.com/nodejs/Release#nodejs-release-working-group
node_js:
- - node
- - '8'
- - '6'
+ - 8
+ - 10
+ - 11 # node WG EOL 2019-06-01, AWS deprecation:
+ - 12
+
script:
- npm run lint
- npm test
+
notifications:
email: false
| 0 |
diff --git a/src/kiri-mode/cam/client.js b/src/kiri-mode/cam/client.js @@ -25,7 +25,6 @@ let isAnimate,
current,
currentIndex,
flipping,
- poppedRecOld,
poppedRec,
hoveredOp,
API, FDM, SPACE, STACKS, MODES, VIEWS, UI, UC, LANG, MCAM;
@@ -472,11 +471,10 @@ CAM.init = function(kiri, api) {
if (pos >= 0) {
el.removeChild(poprec.div);
}
- poppedRec = undefined;
popped = false;
};
function onEnter(ev) {
- if (poppedRec && poppedRec != rec) {
+ if (popped && poppedRec != rec) {
func.surfaceDone();
func.traceDone();
}
@@ -484,7 +482,7 @@ CAM.init = function(kiri, api) {
unpop = func.unpop = el.unpop;
inside = true;
// pointer to current rec for trace editing
- poppedRec = poppedRecOld = rec;
+ poppedRec = rec;
popped = true;
poprec.use(rec);
hoveredOp = el;
@@ -813,7 +811,7 @@ CAM.init = function(kiri, api) {
func.surfaceAdd = (ev) => {
func.clearPops();
alert = api.show.alert("analyzing surfaces...", 1000);
- let surfaces = poppedRecOld.surfaces;
+ let surfaces = poppedRec.surfaces;
CAM.surface_prep(currentIndex * RAD2DEG, () => {
api.hide.alert(alert);
alert = api.show.alert("[esc] cancels surface editing");
@@ -843,7 +841,7 @@ CAM.init = function(kiri, api) {
if (!surfaceOn) {
return;
}
- let surfaces = poppedRecOld.surfaces;
+ let surfaces = poppedRec.surfaces;
for (let wid of Object.keys(surfaces)) {
let widget = api.widgets.forid(wid);
if (widget) {
@@ -883,7 +881,7 @@ CAM.init = function(kiri, api) {
widget.trace_stack.show();
return;
}
- let areas = (poppedRecOld.areas[widget.id] || []);
+ let areas = (poppedRec.areas[widget.id] || []);
let stack = new kiri.Stack(widget.mesh);
widget.trace_stack = stack;
widget.traces.forEach(poly => {
@@ -905,7 +903,7 @@ CAM.init = function(kiri, api) {
});
// ensure appropriate traces are toggled matching current record
kiri.api.widgets.for(widget => {
- let areas = (poppedRecOld.areas[widget.id] || []);
+ let areas = (poppedRec.areas[widget.id] || []);
let stack = widget.trace_stack;
stack.meshes.forEach(mesh => {
let { poly } = mesh.trace;
@@ -919,7 +917,7 @@ CAM.init = function(kiri, api) {
}
});
});
- }, poppedRecOld.select === 'lines');
+ }, poppedRec.select === 'lines');
};
func.traceDone = () => {
if (!traceOn) {
@@ -1001,7 +999,7 @@ CAM.init = function(kiri, api) {
let material = obj.material[0];
let { color, colorSave } = material;
let { widget, poly } = obj.trace;
- let areas = poppedRecOld.areas;
+ let areas = poppedRec.areas;
if (!areas) {
return;
}
| 13 |
diff --git a/FAQ.md b/FAQ.md @@ -416,7 +416,7 @@ See the [contributing guide][contributing-guide].
<!-- </faq-questions> -->
-<!-- <links> -->
+<!-- <definitions> -->
[dom]: https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model
[canvas]: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API
@@ -505,4 +505,4 @@ See the [contributing guide][contributing-guide].
[matlab-parfor]: https://www.mathworks.com/help/distcomp/parfor.html
-<!-- </links> -->
+<!-- </definitions> -->
| 10 |
diff --git a/accessibility-checker-engine/help/IBMA_Color_Contrast_WCAG2AA_PV.mdx b/accessibility-checker-engine/help/IBMA_Color_Contrast_WCAG2AA_PV.mdx @@ -16,7 +16,7 @@ import { CodeSnippet, Tag } from "carbon-components-react";
## Why is this important?
-When text and its background colors have less than a 4.5 to 1 contrast ratio it can be difficult for people with moderately low vision to read the text without a contrast-enhancing technology. For larger text of 18 points or more, or bold 14 points text, the text and background colors must give at least a 3 to 1 contrast ratio.
+When text and its background colors have less than a 4.5 to 1 contrast ratio it can be difficult for people with moderately low vision to read the text without a contrast-enhancing technology. For larger text of 18 points or more, or bold 14 point text, the text and background colors must give at least a 3 to 1 contrast ratio.
</Column>
<Column colLg={11} colMd={5} colSm={4} className="toolMain">
| 2 |
diff --git a/api/parser.go b/api/parser.go @@ -312,7 +312,9 @@ func extractHrefs(child *Element) (h Href) {
}
for _, content := range contents {
+ kind := content.Path("meta.title").String()
value := content.Path("content.value.content").String()
+ members := []string{}
if content.Path("content.value.element").String() == "enum" {
// Enum values are stored in a different location.
@@ -323,15 +325,25 @@ func extractHrefs(child *Element) (h Href) {
if err == nil && len(samples) > 0 {
value = samples[0].Path("content").String()
}
+
+ values, err := content.Path("content.value.content").FlatChildren()
+ if err == nil && len(values) > 0 {
+ for i := range values {
+ members = append(members, values[i].Path("content").String())
+ }
+ }
+
+ kind = fmt.Sprintf("enum[%s]", kind)
}
v := &Parameter{
Required: isContains("attributes.typeAttributes", "required", content),
Key: content.Path("content.key.content").String(),
Value: value,
- Kind: content.Path("meta.title").String(),
+ Kind: kind,
Description: content.Path("meta.description").String(),
Default: content.Path("content.value.attributes.default").String(),
+ Members: members,
}
h.Parameters = append(h.Parameters, *v)
| 9 |
diff --git a/config/bisweb_pathconfig.js b/config/bisweb_pathconfig.js @@ -29,12 +29,10 @@ let ok=false;
if (major === 10 && minor >= 11) {
ok=true;
-} else if (major === 12 && minor >= 2 ) {
- ok=true;
-} else if (major === 14 && minor >= 2 ) {
+} else if (major > 12) {
ok=true;
} else {
- console.log(`----\n---- You are using an incompatible version of node (either 8.9 or newer, or 10.13 or newer) (actual version=${v})\n`);
+ console.log(`----\n---- You are using an incompatible version of node (either 10.11 or newer) (actual version=${v})\n`);
process.exit(1);
}
| 3 |
diff --git a/theme/apps/dictionary/scripts/dictionary.js b/theme/apps/dictionary/scripts/dictionary.js {
enum: unfilteredDict.properties[key].enum.filter(
en => !(unfilteredDict.properties[key].deprecated_enum || [])
- .includes(en)
+ .map(dEn => dEn.toLowerCase())
+ .includes(en.toLowerCase())
)
} : {}
)}),
| 13 |
diff --git a/src/h.coffee b/src/h.coffee @@ -233,11 +233,11 @@ class Helpers
""
"o"
]))[1]
- dom = ("WebKit|Moz|MS|O").match(new RegExp("(" + pre + ")", "i"))[1]
+ dom = ("WebKit|Moz|MS|O").match(new RegExp("(" + pre + ")", "i"))?[1]
dom: dom
lowercase: pre
css: "-" + pre + "-"
- js: pre[0].toUpperCase() + pre.substr(1)
+ js: pre?[0].toUpperCase() + pre?.substr(1)
strToArr:(string)->
arr = []
# plain number
| 1 |
diff --git a/README.md b/README.md @@ -70,7 +70,7 @@ Move to [awesome-docsify](https://github.com/docsifyjs/awesome-docsify#showcase)
### Online one-click setup for Contributing
-You can use Gitpod(A free online VS Code-like IDE) for contributing. With single click it'll launch a workspace and automatically:
+You can use Gitpod (a free online VS Code-like IDE) for contributing. With a single click it'll launch a workspace and automatically:
- clone the docsify repo.
- install the dependencies.
| 7 |
diff --git a/src/traces/parcats/calc.js b/src/traces/parcats/calc.js @@ -103,7 +103,7 @@ module.exports = function calc(gd, trace) {
var value;
if(!line) {
value = parcatConstants.defaultColor;
- } else if(Array.isArray(line.color)) {
+ } else if(Lib.isArrayOrTypedArray(line.color)) {
value = line.color[index % line.color.length];
} else {
value = line.color;
| 9 |
diff --git a/src/Item.js b/src/Item.js @@ -83,9 +83,16 @@ class Item extends EventEmitter {
if (typeof this.area === 'string') {
this.area = state.AreaManager.getArea(this.area);
}
+
+ if (Array.isArray(this.inventory)) {
+ if (!this.inventory.length) {
+ this.inventory = null;
+ }
+
// TODO: repopulate any stored items on save
// this.inventory.doStuff();
}
+ }
serialize() {
const data = {
| 1 |
diff --git a/token-metadata/0xF02DAB52205aFf6Bb3d47Cc7B21624a5064F9FBA/metadata.json b/token-metadata/0xF02DAB52205aFf6Bb3d47Cc7B21624a5064F9FBA/metadata.json "symbol": "PGOLD",
"address": "0xF02DAB52205aFf6Bb3d47Cc7B21624a5064F9FBA",
"decimals": 4,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/userscript.user.js b/userscript.user.js @@ -795,6 +795,8 @@ var $$IMU_EXPORT$$;
return raw_request_do(data);
};
+ } else {
+ console_warn("Unable to initialize do_request, most functions will likely fail");
}
var get_cookies = null;
@@ -8330,7 +8332,7 @@ var $$IMU_EXPORT$$;
};
common_functions.get_tiktok_urlvidid = function(url) {
- var match = url.match(/^[a-z]+:\/\/[^/]+\/+(?:[0-9a-f]{32}\/+[0-9a-f]{8}\/+)?video\/+[^/]+\/+[^/]+\/+[^/]+\/+([0-9a-f]{32})\/*\?/);
+ var match = url.match(/^[a-z]+:\/\/[^/]+\/+(?:[0-9a-f]{32}\/+[0-9a-f]{8}\/+)?video\/+(?:[^/]+\/+)?[^/]+\/+[^/]+\/+([0-9a-f]{32})\/*\?/);
if (match)
return match[1];
| 7 |
diff --git a/articles/policies/rate-limits.md b/articles/policies/rate-limits.md @@ -59,7 +59,9 @@ If you are using an API endpoint **not** listed below and you receive rate limit
### Management API v2
-Please note that there is a 50 requests per second limit on all [Management API v2](/api/management/v2) calls per tenant. **This includes calls made via [Rules](/rules).** The limit is set by tenant and not by endpoint.
+Please note that there is a 50 requests per second limit on all [Management API v2](/api/management/v2) calls per *production tenant of paying customers*. **This includes calls made via [Rules](/rules).** The limit is set by tenant and not by endpoint.
+
+Please note that there is a 2 requests per second limit on all [Management API v2](/api/management/v2) calls for *free tenants or non-production child tenants of enterprise customers*. **This includes calls made via [Rules](/rules).** The limit is set by tenant and not by endpoint.
The following Auth0 Management API endpoints return rate limit-related headers. For additional information about these endpoints, please consult the [Management API explorer](/api/management/v2).
| 0 |
diff --git a/includes/Core/Modules/REST_Dashboard_Sharing_Controller.php b/includes/Core/Modules/REST_Dashboard_Sharing_Controller.php @@ -122,7 +122,7 @@ class REST_Dashboard_Sharing_Controller {
),
array(
'methods' => WP_REST_Server::DELETABLE,
- 'callback' => function ( WP_REST_Request $request ) {
+ 'callback' => function () {
$this->modules->delete_dashboard_sharing_settings();
return new WP_REST_Response( true );
| 2 |
diff --git a/scenes/gunroom.scn b/scenes/gunroom.scn 4
]
},
+ {
+ "start_url": "https://webaverse.github.io/eyeblaster/",
+ "position": [
+ 0,
+ 0,
+ 0
+ ]
+ },
{
"position": [
1,
| 0 |
diff --git a/js/control/Profile.js b/js/control/Profile.js @@ -86,6 +86,7 @@ BR.Profile = L.Evented.extend({
callback: L.bind(function(err, profileId, profileText) {
$(button).blur();
if (!err) {
+ this.profileName = profileId;
this.cache[profileId] = profileText;
if (!this.saveWarningShown) {
@@ -127,6 +128,7 @@ BR.Profile = L.Evented.extend({
profileText: profileText,
callback: function(err, profileId, profileText) {
if (!err) {
+ that.profileName = profileId;
that.cache[profileId] = profileText;
}
}
| 12 |
diff --git a/index.d.ts b/index.d.ts @@ -742,13 +742,18 @@ export class Villager extends (EventEmitter as new () => TypedEmitter<Conditiona
}
export interface VillagerTrade {
- firstInput: Item
- output: Item
- hasSecondItem: boolean
- secondaryInput: Item | null
- disabled: boolean
- tooluses: number
- maxTradeuses: number
+ inputItem1: Item
+ outputItem: Item
+ inputItem2: Item | null
+ hasItem2: boolean
+ tradeDisabled: boolean
+ nbTradeUses: number
+ maximumNbTradeUses: number
+ xp?: number
+ specialPrice?: number
+ priceMultiplier?: number
+ demand?: number
+ realPrice?: number
}
export class ScoreBoard {
| 3 |
diff --git a/bin/imbapack b/bin/imbapack var path = require('path');
var fs = require('fs');
-var dir = path.join(path.dirname(fs.realpathSync(__filename)), '../');
+var dir = path.join(path.dirname(fs.realpathSync(__filename)), '..',path.sep);
var enableDebugLog = false;
@@ -13,7 +13,7 @@ if(require.main !== module){
"loader": dir + "loader.js"
}
- var webpack = require(path.join(require.main.filename, '../..'));
+ var webpack = require(path.join(require.main.filename, '..','..'));
var WebpackOptionsDefaulter = webpack.WebpackOptionsDefaulter;
var options = {};
var defaulter = new WebpackOptionsDefaulter;
| 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.