code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/app/controllers/ValidationController.scala b/app/controllers/ValidationController.scala @@ -39,7 +39,7 @@ class ValidationController @Inject() (implicit val env: Environment[User, Sessio
request.identity match {
case Some(user) =>
WebpageActivityTable.save(WebpageActivity(0, user.userId.toString, ipAddress, "Visit_Validate", timestamp))
- val possibleLabelTypeIds: ListBuffer[Int] = LabelTable.retrievePossibleLabelTypeIds(user.userId, 10)
+ val possibleLabelTypeIds: ListBuffer[Int] = LabelTable.retrievePossibleLabelTypeIds(user.userId, 10, None)
val hasWork: Boolean = possibleLabelTypeIds.nonEmpty
// Checks if there are still labels in the database for the user to validate.
| 1 |
diff --git a/blocks/datatypes.js b/blocks/datatypes.js @@ -111,26 +111,34 @@ Blockly.Blocks['create_construct_typed'] = {
var fieldName = value.getContainerFieldName();
var def = valueBlock.getTypeCtorDef(fieldName);
- if (this.definition_ === def) {
- return outType;
- }
-
var input = this.getInput('PARAM');
- if (input) {
- this.removeInput('PARAM');
+
+ if (input && this.definition_ === def) {
+ var expected = input.connection.typeExpr;
+ var paramType = this.callInfer_('PARAM', ctx);
+ if (paramType) {
+ expected.unify(paramType);
+ }
+ return outType;
}
+ if (!input) {
if (def === 'int') {
this.appendValueInput('PARAM')
.setTypeExpr(new Blockly.TypeExpr.INT())
} else if (def === 'float') {
this.appendValueInput('PARAM')
.setTypeExpr(new Blockly.TypeExpr.FLOAT())
- } else if (!def) {
- // Definition is cleared by user.
+ } else if (def === null) {
+ // Do nothing. there is no arguments.
} else {
goog.asserts.assert(false, 'Unknown type ctor.');
}
+ }
+ if (input && !def) {
+ // Definition is cleared by user.
+ this.removeInput('PARAM');
+ }
this.definition_ = def;
return outType;
}
| 2 |
diff --git a/editor.js b/editor.js @@ -65,6 +65,8 @@ const s = `\
import React, {Fragment, useState, useRef} from 'react';
import ReactThreeFiber from '@react-three/fiber';
const {Canvas, useFrame, useThree} = ReactThreeFiber;
+ import {physics} from 'webaverse';
+ const PhysicsBox = physics.Box;
function Box(props) {
// This reference will give us direct access to the THREE.Mesh object
@@ -81,7 +83,7 @@ const s = `\
const t = 2000;
const f = (Date.now() % t) / t;
mesh.current.position.x = Math.cos(f * Math.PI * 2);
- mesh.current.position.y = Math.sin(f * Math.PI * 2);
+ mesh.current.position.y = 2 + Math.sin(f * Math.PI * 2);
});
}
// Return the view, these are regular Threejs elements expressed in JSX
@@ -107,6 +109,26 @@ const s = `\
useFrame(() => ref.current.updateMatrixWorld())
return <perspectiveCamera ref={ref} {...props} />
} */
+
+ const Floor = () => {
+ const h = 0.1;
+ const position = [0, -h/2, 0];
+ const scale = [10, h, 10];
+ return (
+ <Fragment>
+ <Box
+ position={position}
+ scale={scale}
+ color={0x0049ef4}
+ />
+ <PhysicsBox
+ position={position}
+ scale={scale}
+ />
+ </Fragment>
+ );
+ };
+
const lightQuaternion = new THREE.Quaternion().setFromUnitVectors(new THREE.Vector3(0, 0, -1), new THREE.Vector3(-1, -1, -1).normalize()).toArray();
const render = () => {
// console.log('render', r, React, r === React);
@@ -115,7 +137,7 @@ const s = `\
<ambientLight />
<directionalLight position={[1, 1, 1]} quaternion={lightQuaternion} intensity={2}/>
<Box position={[0, 1, 0]} color="hotpink" animate />
- <Box position={[0, -2, 0]} color={0x0049ef4} scale={[10, 0.1, 10]} />
+ <Floor />
</Fragment>
);
};
| 0 |
diff --git a/pages/chart/mat.js b/pages/chart/mat.js @@ -88,13 +88,18 @@ const MeasurementAggregationToolkit = ({ testNames }) => {
pathname: router.pathname,
query: {
test_name: 'web_connectivity',
+ domain: 'twitter.com',
axis_x: 'measurement_start_day',
+ axis_y: 'probe_cc',
since: monthAgo.format('YYYY-MM-DD'),
- unti: today.format('YYYY-MM-DD'),
+ until: today.format('YYYY-MM-DD'),
},
}
router.push(href, href, { shallow: true })
}
+ // Ignore the dependency on `router` because we want
+ // this effect to run only once, on mount, if query is empty.
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
const shouldFetchData = router.pathname !== router.asPath
| 4 |
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.38.2] -- 2018-06-04
+
+### Fixed
+- Fix bar text removal (bug introduced in 1.36.0) [#2689]
+- Fix handling number `0` in hover labels and on-graph text [#2682]
+
+
## [1.38.1] -- 2018-05-29
### Fixed
| 3 |
diff --git a/includes/Experiments.php b/includes/Experiments.php @@ -218,6 +218,7 @@ class Experiments {
'label' => __( 'Quick Tips', 'web-stories' ),
'description' => __( 'Enable quick tips for first time user experience (FTUE)', 'web-stories' ),
'group' => 'editor',
+ 'default' => true,
],
/**
* Author: @carlos-kelly
| 12 |
diff --git a/test/server/effect.spec.js b/test/server/effect.spec.js @@ -211,8 +211,8 @@ describe('Effect', function () {
expect(this.effect.targets).toContain(this.matchingCard);
});
- it('should add targets from active plot', function() {
- this.matchingCard.location = 'active plot';
+ it('should add targets from province', function() {
+ this.matchingCard.location = 'province';
this.effect.addTargets([this.matchingCard]);
expect(this.effect.targets).toContain(this.matchingCard);
});
@@ -235,8 +235,8 @@ describe('Effect', function () {
expect(this.effect.targets).not.toContain(this.matchingCard);
});
- it('should reject targets from active plot', function() {
- this.matchingCard.location = 'active plot';
+ it('should reject targets from province', function() {
+ this.matchingCard.location = 'province';
this.effect.addTargets([this.matchingCard]);
expect(this.effect.targets).not.toContain(this.matchingCard);
});
@@ -264,8 +264,8 @@ describe('Effect', function () {
expect(this.effect.targets).toContain(this.matchingCard);
});
- it('should add targets from active plot', function() {
- this.matchingCard.location = 'active plot';
+ it('should add targets from province', function() {
+ this.matchingCard.location = 'province';
this.effect.addTargets([this.matchingCard]);
expect(this.effect.targets).toContain(this.matchingCard);
});
@@ -288,8 +288,8 @@ describe('Effect', function () {
expect(this.effect.targets).not.toContain(this.matchingCard);
});
- it('should reject targets from active plot', function() {
- this.matchingCard.location = 'active plot';
+ it('should reject targets from province', function() {
+ this.matchingCard.location = 'province';
this.effect.addTargets([this.matchingCard]);
expect(this.effect.targets).not.toContain(this.matchingCard);
});
| 14 |
diff --git a/packages/app/src/components/Navbar/GrowiContextualSubNavigation.tsx b/packages/app/src/components/Navbar/GrowiContextualSubNavigation.tsx @@ -167,7 +167,7 @@ const GrowiContextualSubNavigation = (props) => {
const { data: isAbleToShowPageAuthors } = useIsAbleToShowPageAuthors();
const { mutate: mutateSWRTagsInfo, data: tagsInfoData } = useSWRxTagsInfo(pageId);
- const { data: tagsOnEditorMode, mutate: mutateEditorContainerTags } = useStaticPageTags(tagsInfoData?.tags);
+ const { data: tagsOnEditMode, mutate: mutateTagsOnEditMode } = useStaticPageTags(tagsInfoData?.tags);
const { open: openDuplicateModal } = usePageDuplicateModal();
const { open: openRenameModal } = usePageRenameModal();
@@ -184,7 +184,7 @@ const GrowiContextualSubNavigation = (props) => {
const tagsUpdatedHandler = useCallback(async(newTags: string[]) => {
// It will not be reflected in the DB until the page is refreshed
if (!isViewMode) {
- return mutateEditorContainerTags(newTags, false);
+ return mutateTagsOnEditMode(newTags, false);
}
try {
@@ -192,7 +192,7 @@ const GrowiContextualSubNavigation = (props) => {
// revalidate SWRTagsInfo
mutateSWRTagsInfo();
- mutateEditorContainerTags(newTags, false);
+ mutateTagsOnEditMode(newTags, false);
toastSuccess('updated tags successfully');
}
@@ -200,7 +200,7 @@ const GrowiContextualSubNavigation = (props) => {
toastError(err, 'fail to update tags');
}
- }, [editorMode, pageId, revisionId, mutateSWRTagsInfo, mutateEditorContainerTags]);
+ }, [isViewMode, mutateTagsOnEditMode, pageId, revisionId, mutateSWRTagsInfo]);
const duplicateItemClickedHandler = useCallback(async(page: IPageForPageDuplicateModal) => {
const duplicatedHandler: OnDuplicatedFunction = (fromPath, toPath) => {
@@ -323,7 +323,7 @@ const GrowiContextualSubNavigation = (props) => {
isGuestUser={isGuestUser}
isDrawerMode={isDrawerMode}
isCompactMode={isCompactMode}
- tags={isViewMode ? tagsInfoData?.tags || [] : tagsOnEditorMode}
+ tags={isViewMode ? tagsInfoData?.tags || [] : tagsOnEditMode}
tagsUpdatedHandler={tagsUpdatedHandler}
controls={ControlComponents}
additionalClasses={['container-fluid']}
| 10 |
diff --git a/src/typescript/typescript.ts b/src/typescript/typescript.ts @@ -130,7 +130,7 @@ export const language = {
{ include: '@whitespace' },
// regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
- [/\/(?=([^\\\/]|\\.)+\/([gimuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/, { token: 'regexp', bracket: '@open', next: '@regexp' }],
+ [/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/, { token: 'regexp', bracket: '@open', next: '@regexp' }],
// delimiters and operators
[/[()\[\]]/, '@brackets'],
| 11 |
diff --git a/README.md b/README.md @@ -8,6 +8,9 @@ ERP beyond your fridge
## Getting in touch
There is the [r/grocy subreddit](https://www.reddit.com/r/grocy) to connect with other grocy users. If you've found something that does not work or if you have an idea for an improvement or new things which you would find useful, feel free to open an issue in the [issue tracker](https://github.com/grocy/grocy/issues) here.
+## Community contributions
+See the website for a list of community contributed Add-ons / Tools: [https://grocy.info/#addons](https://grocy.info/#addons)
+
## Motivation
A household needs to be managed. I did this so far (almost 10 years) with my first self written software (a C# windows forms application) and with a bunch of Excel sheets. The software is a pain to use and Excel is Excel. So I searched for and tried different things for a (very) long time, nothing 100 % fitted, so this is my aim for a "complete household management"-thing. ERP your fridge!
| 0 |
diff --git a/src/components/ContactForm/ContactForm.js b/src/components/ContactForm/ContactForm.js -/* eslint-disable jsx-a11y/label-has-for */
-/* eslint-disable jsx-a11y/label-has-associated-control */
+/* eslint-disable react/jsx-one-expression-per-line */
import React, { useState } from 'react';
import { css } from '@emotion/core';
@@ -16,10 +15,10 @@ const ContactFrom = () => {
phone: '',
website: '',
});
- const [sending, updateSending] = useState(false);
const [errors, updateErrors] = useState(null);
-
+ const [hasSubmitted, setHasSubmitted] = useState(false);
const updateInput = event => {
+ updateErrors(null);
updateForm({ ...formState, [event.target.name]: event.target.value });
};
@@ -31,15 +30,26 @@ const ContactFrom = () => {
const submitContact = event => {
event.preventDefault();
- updateSending(true);
const { name, email } = formState;
+ if (hasSubmitted) {
+ // deter multiple submissions
+ updateErrors({ error: 'The form has already been submitted.' });
+ return;
+ }
// validate inputs
if (!name || !email) {
// notify user of required fields
- updateSending(false);
- updateErrors({ name, email });
+ const currentErrs = {};
+ if (!name) {
+ currentErrs.name = 'Name is required';
+ }
+ if (!email) {
+ currentErrs.email = 'Email is required';
+ }
+ updateErrors(currentErrs);
return;
}
+ // the form has not been submitted
fetch('/', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
@@ -52,15 +62,16 @@ const ContactFrom = () => {
phone: '',
website: '',
});
- updateSending(false);
+ setHasSubmitted(true);
});
};
+ // eslint-disable-next-line react/prop-types
const ErrorToaster = ({ errs }) => {
- const hasErrors = errs && Object.keys(errs).filter(key => !errs[key]);
return errs ? (
<span
css={css`
+ position: absolute;
align-self: center;
p {
display: inline;
@@ -68,11 +79,11 @@ const ContactFrom = () => {
}
`}
>
- {hasErrors &&
- hasErrors.map((key, i) => (
- <p>
- {key} is required{' '}
- {i !== hasErrors.length - 1 && <span> & </span>}
+ {errs &&
+ Object.values(errs).map((err, i) => (
+ <p key={err}>
+ {err}{' '}
+ {i !== Object.keys(errs).length - 1 && <span> - </span>}
</p>
))}
</span>
@@ -170,12 +181,20 @@ const ContactFrom = () => {
display: flex;
justify-content: center;
margin-top: 4rem;
- flex-direction: column;
`}
>
- <Button data-cy='contactSubmit' disabled={sending} type='submit'>
+ <Button data-cy='contactSubmit' type='submit'>
send
</Button>
+ </span>
+ <span
+ css={css`
+ display: flex;
+ justify-content: center;
+ margin-top: 4rem;
+ flex-direction: column;
+ `}
+ >
<ErrorToaster errs={errors} />
</span>
</form>
| 9 |
diff --git a/server/game/cards/13.3-PoS/TheFaithsDecree.js b/server/game/cards/13.3-PoS/TheFaithsDecree.js @@ -24,7 +24,7 @@ class TheFaithsDecree extends DrawCard {
return false;
}
- this.game.addMessage('{0} plays {1} to prevent opponent\'s from triggering {2}', player, cardName, this);
+ this.game.addMessage('{0} plays {1} to prevent opponent\'s from triggering {2}', player, this, cardName);
this.untilEndOfPhase(ability => ({
targetController: 'opponent',
effect: ability.effects.cannotTriggerCardAbilities(ability => ability.card.name === cardName)
| 1 |
diff --git a/src/components/Story/Story.less b/src/components/Story/Story.less @import (reference) "../../styles/custom.less";
+@import (reference) "../../styles/modules/variables.less";
.Story {
- border-radius: 4px;
background-color: @white;
color: #353535;
+ border-top: solid 1px #e9e7e7;
+ border-bottom: solid 1px #e9e7e7;
+ @media @small {
+ border-radius: 4px;
border: solid 1px #e9e7e7;
+ }
&__content {
position: relative;
| 2 |
diff --git a/docs/Watcher-Wizard.md b/docs/Watcher-Wizard.md # Using the Wizard
-SENTINL provides a built-in wizard to assist forming proper watchers using a _step-by-step_ sequence
+SENTINL provides a wizard to help create watchers using a _step-by-step_ sequence.
#### Step 1: New Watcher
-The first step is to give our Watcher a name and choose an execution frequency
-<img src="http://i.imgur.com/WTtFrDx.png" >
-#### Step 2: Input Query
-The input query is the focal part of our watcher. Make sure time-range fields are dynamic
-<img src="http://i.imgur.com/HxY0YHR.png" >
-#### Step 3: Condition
-Condition is used as a gate to validate if the results received back are worth processing
-<img src="http://i.imgur.com/XF2eurd.png" >
-#### Step 4: Transform
-Our data might need adjustments or post processing. Process our payload using a javascript expression/script
-<img src="http://i.imgur.com/TjpADFn.png" >
-#### Step 5: Actions
-Our data is ready! Let's form a notification using the mustache templating language
-<img src="http://i.imgur.com/swzR4fo.png" >
-#### Step 6: Expert Mode
-Here's our fully formed SENTINL JSON watcher in its naked beauty
-<img src="http://i.imgur.com/6CSyx59.png" >
+The first step is to give our Watcher a name and choose an execution frequency. In this example, we choose to run every day.
+
+
+
+#### Step 2: Input Query and Condition
+Here you specify the query parameters and the condition to trigger on, based on a date histogram aggregation.
+In this example, the watcher will trigger an alert when there are more than two articles in an hour during the day.
+
+
+
+In this section, you can also take a look at the search query sent to Elasticsearch, as well as the JSON representation of the watcher and the ability to convert to an advanced watcher.
+
+#### Step 3: Actions
+Time to send an alert! Here, you can setup a variety of actions to when your condition has been met.
+In this example, we send a HTML-formatted email injected with data from the watcher and query response using the mustache templating language.
+
+
+
| 3 |
diff --git a/src/plots/geo/constants.js b/src/plots/geo/constants.js @@ -123,113 +123,6 @@ exports.projNames = {
'peirce quincuncial': 'peirceQuincuncial',
};
-var keys = Object.keys(exports.projNames).sort();
-var totalN = keys.length;
-var nRow = 8;
-var nCol = Math.ceil(totalN / nRow);
-var layout = {
- grid: {
- rows: nRow,
- columns: nCol
- },
- showlegend: false,
- width: 1800,
- height: 1200,
- margin: {
- l: 20,
- t: 20,
- r: 20,
- b: 20
- },
- annotations: [{
- showarrow: false,
- text: 'all<br>projection<br>types<br>in Plotly',
- font: { size: 20 },
- x: 1,
- xref: 'paper',
- xanchor: 'right',
- yref: 'paper',
- y: 0,
- yanchor: 'bottom'
- }],
-};
-var data = [];
-var n = -1;
-for(var col = 0; col < nCol; col++) {
- for(var row = 0; row < nRow; row++) {
- n++;
- if(n >= totalN) continue;
-
- var name = keys[n];
- var geo = 'geo' + (n ? n + 1 : '');
- var usa = name.indexOf('usa') !== -1;
- var locationmode = usa ? 'USA-states' : undefined;
- var locations = usa ? ['TX', 'WA', 'NY', 'AK'] : ['GHA', 'ARG', 'AUS', 'CAN'];
-
- data.push({
- name: name,
- geo: geo,
- type: 'choropleth',
- locationmode: locationmode,
- locations: locations,
- z: [1, 2, 3, 4],
- showscale: false,
- hovertemplate: name
- });
-
- data.push({
- geo: geo,
- type: 'scattergeo',
- mode: 'markers+text',
- text: ['Cape Town', 'Los Angeles'],
- textfont: { size: 6 },
- marker: { color: ['lightgreen', 'yellow'], size: [20, 10] },
- lat: [-34, 34],
- lon: [18, -118]
- });
-
- data.push({
- geo: geo,
- type: 'scattergeo',
- mode: 'text',
- text: [name.replace(' ', '<br>')],
- textfont: { color: 'darkblue', family: 'Gravitas One, cursive' },
- locationmode: locationmode,
- locations: locations,
- hoverinfo: 'skip'
- });
-
- layout[geo] = {
- domain: {
- row: row,
- column: col,
- },
- projection: { type: name },
- lonaxis: {
- showgrid: true,
- gridwidth: 1,
- gridcolor: 'lightgray'
- },
- lataxis: {
- showgrid: true,
- gridwidth: 1,
- gridcolor: 'lightgray'
- }
- // fitbounds: 'locations'
- };
-
- if(!usa) {
- layout[geo].showcoastlines = false;
- layout[geo].showocean = true;
- }
- }
-}
-
-console.log(JSON.stringify({
- data: data,
- layout: layout
-}, null, 2));
-
// name of the axes
exports.axesNames = ['lonaxis', 'lataxis'];
| 2 |
diff --git a/physics-manager.js b/physics-manager.js @@ -22,6 +22,9 @@ const physicsManager = new EventTarget();
const velocity = new THREE.Vector3();
physicsManager.velocity = velocity;
+const offset = new THREE.Vector3();
+physicsManager.offset = offset;
+
let jumpState = false;
const getJumpState = () => jumpState;
physicsManager.getJumpState = getJumpState;
@@ -134,6 +137,10 @@ const _applyAvatarPhysics = (camera, avatarOffset, cameraBasedOffset, velocityAv
const oldVelocity = localVector3.copy(physicsManager.velocity);
applyVelocity(camera.position, physicsManager.velocity, timeDiff);
+
+ camera.position.add(physicsManager.offset);
+ physicsManager.offset.setScalar(0);
+
camera.updateMatrixWorld();
camera.matrixWorld.decompose(localVector, localQuaternion, localVector2);
if (avatarOffset) {
| 0 |
diff --git a/assets/js/modules/analytics/wp-dashboard/wp-dashboard-widget-top-pages-table.js b/assets/js/modules/analytics/wp-dashboard/wp-dashboard-widget-top-pages-table.js @@ -36,6 +36,7 @@ const { Component } = wp.element;
class WPAnalyticsDashboardWidgetTopPagesTable extends Component {
render() {
const { data } = this.props;
+ const { siteURL: siteUrl } = googlesitekit.admin;
if ( isDataZeroForReporting( data ) ) {
return null;
@@ -49,7 +50,8 @@ class WPAnalyticsDashboardWidgetTopPagesTable extends Component {
const links = [];
const dataMapped = map( data[ 0 ].data.rows, ( row, i ) => {
const [ title, url ] = row.dimensions;
- links[ i ] = url;
+ links[ i ] = siteUrl + url;
+
return [
title,
numberFormat( row.metrics[ 0 ].values[ 0 ] ),
| 12 |
diff --git a/src/js/controllers/marco-coino.controller.js b/src/js/controllers/marco-coino.controller.js ) {
var MARCO_COINO_BASE_URL = 'https://marco-coino.firebaseapp.com/marcocoino-embed.html?zoom=5&color=gold';
- var ADD_MERCHANT_URL = 'https://shop.bitcoin.com/submit-listing/';
+ var ADD_MERCHANT_URL = 'https://marcocoino.bitcoin.com/submit-listing/';
var vm = this;
// Functions
| 3 |
diff --git a/js/webcomponents/bisweb_grapherelement.js b/js/webcomponents/bisweb_grapherelement.js @@ -1115,7 +1115,7 @@ class GrapherModule extends HTMLElement {
if (settings.flipPolarity) { polarityButton = createCheck('Reverse polarity'); }
if (settings.smooth) { smoothButton = createCheck('Smooth input'); }
- if (polarityButton && this.polarity === 'negative') { flipPolarityButton.find('.form-check-input').prop('checked', true); }
+ if (polarityButton && this.polarity === 'negative') { polarityButton.find('.form-check-input').prop('checked', true); }
if (smoothButton && this.usesmoothdata) { smoothButton.find('.form-check-input').prop('checked', true); }
if (optionalChartsButton && this.showOptionalCharts) { smoothButton.find('.form-check-input').prop('checked', true); }
| 1 |
diff --git a/package.json b/package.json {
"name": "minimap",
"main": "./lib/main",
- "version": "4.29.7",
+ "version": "4.29.8",
"private": true,
"description": "A preview of the full source code.",
"author": "Fangdun Cai <[email protected]>",
| 6 |
diff --git a/io-manager.js b/io-manager.js @@ -9,15 +9,19 @@ import {isInIframe} from './util.js';
import {renderer, renderer2, camera, avatarCamera, dolly, iframeContainer} from './app-object.js';
/* import {menuActions} from './mithril-ui/store/actions.js';
import {menuState} from './mithril-ui/store/state.js'; */
+import geometryManager from './geometry-manager.js';
const localVector = new THREE.Vector3();
const localVector2 = new THREE.Vector3();
const localVector3 = new THREE.Vector3();
+const localVector2D = new THREE.Vector2();
+const localVector2D2 = new THREE.Vector2();
const localQuaternion = new THREE.Quaternion();
const localQuaternion2 = new THREE.Quaternion();
const localEuler = new THREE.Euler();
const localMatrix2 = new THREE.Matrix4();
const localMatrix3 = new THREE.Matrix4();
+const localRaycaster = new THREE.Raycaster();
const ioManager = new EventTarget();
@@ -570,12 +574,35 @@ ioManager.bindInput = () => {
camera.updateMatrixWorld();
}
};
+ const _updateMouseHover = e => {
+ const {clientX, clientY} = e;
+
+ renderer.getSize(localVector2D2);
+ localVector2D.set(
+ (clientX / localVector2D2.x) * 2 - 1,
+ -(clientY / localVector2D2.y) * 2 + 1
+ );
+ localRaycaster.setFromCamera(localVector2D, camera);
+ const position = localRaycaster.ray.origin;
+ const quaternion = localQuaternion.setFromUnitVectors(
+ localVector.set(0, 0, -1),
+ localRaycaster.ray.direction
+ );
+
+ const result = geometryManager.geometryWorker.raycastPhysics(geometryManager.physics, position, quaternion);
+
+ if (result) {
+ // XXX console.log('update mouse hover', result, position.toArray(), quaternion.toArray());
+ }
+ };
renderer.domElement.addEventListener('mousemove', e => {
if (weaponsManager.weaponWheel) {
weaponsManager.updateWeaponWheel(e);
} else {
if (document.pointerLockElement) {
_updateMouseMovement(e);
+ } else {
+ _updateMouseHover(e);
}
}
});
| 0 |
diff --git a/packages/core/src/utils/page-path-utils.ts b/packages/core/src/utils/page-path-utils.ts import nodePath from 'path';
-import ObjectId from 'bson-objectid';
import escapeStringRegexp from 'escape-string-regexp';
-
+import { isValidObjectId } from './objectid-utils';
import { addTrailingSlash } from './path-utils';
/**
@@ -28,7 +27,7 @@ export const isUsersTopPage = (path: string): boolean => {
*/
export const isPermalink = (path: string): boolean => {
const pageIdStr = path.substring(1);
- return ObjectId.isValid(pageIdStr);
+ return isValidObjectId(pageIdStr);
};
/**
| 7 |
diff --git a/addon/components/polaris-resource-list/filter-control.js b/addon/components/polaris-resource-list/filter-control.js @@ -135,10 +135,11 @@ export default Component.extend(context.ConsumerMixin, {
}).readOnly(),
handleAddFilter(newFilter) {
- let { onFiltersChange, appliedFilters = [] } = this.getProperties(
+ let { onFiltersChange, appliedFilters } = this.getProperties(
'onFiltersChange',
'appliedFilters'
);
+ appliedFilters = appliedFilters || [];
if (!onFiltersChange) {
return;
@@ -159,10 +160,11 @@ export default Component.extend(context.ConsumerMixin, {
handleRemoveFilter(filter) {
let filterId = idFromFilter(filter);
- let { onFiltersChange, appliedFilters = [] } = this.getProperties(
+ let { onFiltersChange, appliedFilters } = this.getProperties(
'onFiltersChange',
'appliedFilters'
);
+ appliedFilters = appliedFilters || [];
if (!onFiltersChange) {
return;
| 9 |
diff --git a/articles/api/management/v2/tokens.md b/articles/api/management/v2/tokens.md @@ -223,7 +223,7 @@ __How long is the token valid for?__</br>
The Management APIv2 token has by default a validity of __24 hours__. After that the token will expire and you will have to get a new one. If you get one manually from [the API Explorer tab of your Auth0 Management API](${manage_url}/#/apis/management/explorer) though, you can change the expiration time. However, having non-expiring tokens is not secure.
__The old way of generating tokens was better, since the token never expired. Why was this changed?__</br>
-The old way of generating tokens was insecure since the tokens had an infinite lifespan and could not be revoked. The new way allows tokens to be generated with specific scopes, expirations, and with the ability to revoke tokens if they were to be breached. We decided to move to the most secure implementation because your security, and that of your users, is priority number one for us.
+The old way of generating tokens was insecure since the tokens had an infinite lifespan. The new implementation allows tokens to be generated with specific scopes and expirations. We decided to move to the most secure implementation because your security, and that of your users, is priority number one for us.
__Can I change my token's validity period?__</br>
You cannot change the default validity period, which is set to 24 hours. However, if you get a token manually from [the API Explorer tab of your Auth0 Management API](${manage_url}/#/apis/management/explorer) you can change the expiration time for the specific token. Note though, that your applications should use short-lived tokens to minimize security risks.
@@ -231,9 +231,6 @@ You cannot change the default validity period, which is set to 24 hours. However
__Can I refresh my token?__</br>
You cannot renew a Management APIv2 token. A [new token](#2-get-the-token) should be created when the old one expires.
-__My token was compromised! Can I invalidate it?__</br>
-Sure. You can terminate the Management APIv2 tokens calling the [blacklist endpoint](/api/v2#!/Blacklists/post_tokens).
-
__I need to invalidate all my tokens. How can I do that?__</br>
All your tenant's Management APIv2 tokens are signed using the Client Secret of your non interactive client, hence if you change that, all your tokens will be invalidated. To do this, go to your [Client's Settings](${manage_url}/#/clients/${account.clientId}/settings) and click the __Rotate__ icon <i class="notification-icon icon-budicon-171"></i>, or use the [Rotate a client secret](/api/management/v2#!/Clients/post_rotate_secret) endpoint.
@@ -244,7 +241,7 @@ __I can see some `current_user` scopes in my `id_token`. What is that?__</br>
Within the Users API some endpoints have scopes related to the current user (like `read:current_user` or `update:current_user_identities`). These are [special scopes](/api/v2/changes#the-id_token-and-special-scopes) in the `id_token`, which are granted automatically to the logged in user.
-## More reading
+## Keep reading
[Calling APIs from a Service](/api-auth/grant/client-credentials)
| 2 |
diff --git a/src/lib/project-loader-hoc.jsx b/src/lib/project-loader-hoc.jsx @@ -27,7 +27,9 @@ const ProjectLoaderHOC = function (WrappedComponent) {
if (this.state.projectId !== prevState.projectId) {
storage
.load(storage.AssetType.Project, this.state.projectId, storage.DataFormat.JSON)
- .then(projectAsset => this.setState({projectData: JSON.stringify(projectAsset.data)}))
+ .then(projectAsset => projectAsset && this.setState({
+ projectData: JSON.stringify(projectAsset.data)
+ }))
.catch(err => log.error(err));
}
}
| 9 |
diff --git a/detox/package.json b/detox/package.json "signal-exit": "^3.0.3",
"stream-json": "^1.7.4",
"strip-ansi": "^6.0.1",
- "tail": "^2.0.0",
"telnet-client": "1.2.8",
"tempfile": "^2.0.0",
"trace-event-lib": "^1.3.1",
| 2 |
diff --git a/bin/templates/scripts/cordova/Api.js b/bin/templates/scripts/cordova/Api.js @@ -445,7 +445,7 @@ Api.prototype.addPodSpecs = function (plugin, podSpecs, frameworkPods) {
return podfileFile.install(check_reqs.check_cocoapods)
.then(function () {
- self.setSwiftVersionForCocoaPodsLibraries(podsjsonFile);
+ return self.setSwiftVersionForCocoaPodsLibraries(podsjsonFile);
});
} else {
events.emit('verbose', 'Podfile unchanged, skipping `pod install`');
@@ -564,7 +564,7 @@ Api.prototype.removePodSpecs = function (plugin, podSpecs, frameworkPods) {
return podfileFile.install(check_reqs.check_cocoapods)
.then(function () {
- self.setSwiftVersionForCocoaPodsLibraries(podsjsonFile);
+ return self.setSwiftVersionForCocoaPodsLibraries(podsjsonFile);
});
} else {
events.emit('verbose', 'Podfile unchanged, skipping `pod install`');
@@ -582,6 +582,10 @@ Api.prototype.removePodSpecs = function (plugin, podSpecs, frameworkPods) {
Api.prototype.setSwiftVersionForCocoaPodsLibraries = function (podsjsonFile) {
var self = this;
var __dirty = false;
+ return check_reqs.check_cocoapods().then(function (toolOptions) {
+ if (toolOptions.ignore) {
+ events.emit('verbose', '=== skip Swift Version Settings For Cocoapods Libraries');
+ } else {
var podPbxPath = path.join(self.root, 'Pods', 'Pods.xcodeproj', 'project.pbxproj');
var podXcodeproj = xcode.project(podPbxPath);
podXcodeproj.parseSync();
@@ -617,6 +621,8 @@ Api.prototype.setSwiftVersionForCocoaPodsLibraries = function (podsjsonFile) {
if (__dirty) {
fs.writeFileSync(podPbxPath, podXcodeproj.writeSync(), 'utf-8');
}
+ }
+ });
};
/**
| 8 |
diff --git a/breaking_changes.md b/breaking_changes.md @@ -2,8 +2,8 @@ This file will be updated with breaking changes, before you update you should ch
**27th Jul 2019 (1.19.12-dev)**
- - You can't access old message logs unless you migrate them from the old format using the `migratelogs` owner only command. Be carefull and only run this once as otherwise youll have duplicate log entries.
- - Message log tables has been restructured, the ones used now are messages2 and message_logs2.
+ - You can't access old message logs unless you migrate them from the old format using the `migratelogs` owner only command. Be careful and only run this once as otherwise you'll have duplicate log entries.
+ - Message log tables has been restructured, the ones used now are `messages2` and `message_logs2`.
- Note that this does not remove the old logs after migrating them, so you'll have to delete those tables (messages, message_logs) yourself if you want to save space.
- If you somehow to manage to run it several times then use the following query to delete legacy imported duplicates:
@@ -44,11 +44,11 @@ This file will be updated with breaking changes, before you update you should ch
+ This is to support having multiple bot processes in the near future
**24th october 2018 (1.9.2-dev)**
- - mqueue no longer supports the postgres queue, meaning if you're upgrading from a version earlier than v1.4.7 and there's still messages in the queue then those wont be processed. Versions after v1.4.7 queued new messages to the new queue but still continued to also poll the postgres queue, so to get around this you can run v1.9.1 until it's empty then upgrade to v1.9.2 or later.
+ - `mqueue` no longer supports the postgres queue, meaning if you're upgrading from a version earlier than v1.4.7 and there's still messages in the queue then those wont be processed. Versions after v1.4.7 queued new messages to the new queue but still continued to also poll the postgres queue, so to get around this you can run v1.9.1 until it's empty then upgrade to v1.9.2 or later.
+ Things that uses mqueue: reddit, youtube, and reminders when triggered
+ To find out if theres still messages in the queue run `select * from mqueue where processed=false;` on the yagpdb db
**3rd aug 2018 (1.4-dev)**
- dutil now only has one maintained branch, the master which was merged with dgofork.
- - my discordgo fork's default branch is now yagpdb
+ - my discordgo fork's default branch is now `yagpdb` instead of `master`
- Updated build scripts (docker and circle) as a result, if your docker script isnt working in the future this is most likely the reason if you have a old version of the docker build script
| 1 |
diff --git a/README.md b/README.md @@ -116,6 +116,7 @@ All CLI options are optional:
--useChildProcesses Run handlers in a child process
--useWorkerThreads Uses worker threads for handlers. Requires node.js v11.7.0 or higher
--websocketPort WebSocket port to listen on. Default: 3001
+--useDocker Run handlers in a docker container.
```
Any of the CLI options can be added to your `serverless.yml`. For example:
| 0 |
diff --git a/examples/public/filters/circle-filter.html b/examples/public/filters/circle-filter.html <div class="box" style="max-height:90vh; overflow: auto;">
<header>
<h1>Circle Filter</h1>
+ <p class="open-sans">Draw a circle to get filtered results</p>
</header>
<br />
<div>
// 4. raiload --> timeseries
function initializeWidgetTimeSeries() {
- const widgetElement = document.getElementById("railroadWidget").getContext('2d');
+ const widgetElement = document.getElementById("railroadWidget");
- railroadWidget = new Chart(widgetElement, {
+ railroadWidget = new Chart(widgetElement.getContext('2d'), {
type: 'bar',
data: {
datasets: [{
}
}
});
+ widgetElement.style.display = 'none';
}
function renderWidgetTimeSeries(data) {
+ const widget = document.getElementById("railroadWidget");
+ if (data.totalAmount === 0){
+ widget.style.display = 'none';
+ }else{
+ widget.style.display = 'block';
+ }
railroadWidget.data.labels = data.bins.map(function (x) {
let dt = new Date(x.start);
return dt.getFullYear() + "/" + (dt.getMonth() + 1) + "/" + dt.getDate();
| 7 |
diff --git a/src/sections/target/MolecularInteractions/StringTab.js b/src/sections/target/MolecularInteractions/StringTab.js @@ -283,7 +283,7 @@ const getHeatmapCell = (score, classes) => {
const id = 'string';
const index = 0;
-const size = 15000;
+const size = 10000;
const color = d3
.scaleQuantize()
.domain([0, 1])
| 12 |
diff --git a/script.json.schema b/script.json.schema "maxItems": 0,
"additionalProperties": {
"type": "string",
- "enum": ["read", "write", "read, write", "write, read"]
+ "enum": ["read", "write", "read, write", "write, read", "read,write", "write,read"]
}
},
"conflicts":{
| 3 |
diff --git a/components/Discussion/enhancers.js b/components/Discussion/enhancers.js @@ -579,11 +579,24 @@ ${fragments.comment}
const nodes = [].concat(data.discussion.comments.nodes)
+ const parentIndex = parentId && nodes.findIndex(n => n.id === parentId)
const insertIndex = parentId
- ? nodes.findIndex(n => n.id === parentId) + 1
+ ? parentIndex + 1
: 0
nodes.splice(insertIndex, 0, comment)
+ if (parentIndex) {
+ const parent = nodes[parentIndex]
+ nodes.splice(parentIndex, 1, {
+ ...parent,
+ comments: {
+ ...parent.comments,
+ totalCount: parent.comments.totalCount + 1,
+ directTotalCount: parent.comments.directTotalCount + 1
+ }
+ })
+ }
+
proxy.writeQuery({
query: query,
variables: {discussionId, parentId: ownParentId, orderBy},
@@ -593,6 +606,8 @@ ${fragments.comment}
...data.discussion,
comments: {
...data.discussion.comments,
+ totalCount: data.discussion.comments.totalCount +
+ 1,
nodes
}
}
| 7 |
diff --git a/javascripts/game.js b/javascripts/game.js @@ -5930,6 +5930,10 @@ window.addEventListener('keydown', function(event) {
}, false);
window.addEventListener('keyup', function(event) {
+ if (event.keyCode === 70) {
+ $.notify("Paying respects", "info")
+ giveAchievement("It pays to have respect")
+ }
if (!player.options.hotkeys || controlDown === true || document.activeElement.type === "text") return false
switch (event.keyCode) {
case 67: // C
@@ -5940,10 +5944,6 @@ window.addEventListener('keydown', function(event) {
document.getElementById("eternitybtn").onclick();
break;
- case 70: // F
- $.notify("Paying respects", "info")
- giveAchievement("It pays to have respect")
- break;
}
}, false);
| 11 |
diff --git a/tests/browser/nightwatch.js b/tests/browser/nightwatch.js @@ -75,7 +75,7 @@ module.exports = {
// Confirm that it has been added to the recipe
browser
.useCss()
- .waitForElementVisible(op)
+ .waitForElementVisible(op, 100)
.expect.element(op).text.to.contain("To Hex");
// Enter input
@@ -107,6 +107,10 @@ module.exports = {
loadOp("BSON deserialise", browser)
.waitForElementNotVisible("#output-loader", 5000);
+ // Charts
+ loadOp("Entropy", browser)
+ .waitForElementNotVisible("#output-loader", 5000);
+
// Ciphers
loadOp("AES Encrypt", browser)
.waitForElementNotVisible("#output-loader", 5000);
@@ -135,6 +139,10 @@ module.exports = {
loadOp("Encode text", browser)
.waitForElementNotVisible("#output-loader", 5000);
+ // Hashing
+ loadOp("Streebog", browser)
+ .waitForElementNotVisible("#output-loader", 5000);
+
// Image
loadOp("Extract EXIF", browser)
.waitForElementNotVisible("#output-loader", 5000);
@@ -162,6 +170,62 @@ module.exports = {
// UserAgent
loadOp("Parse User Agent", browser)
.waitForElementNotVisible("#output-loader", 5000);
+
+ // YARA
+ loadOp("YARA Rules", browser)
+ .waitForElementNotVisible("#output-loader", 5000);
+
+ browser.click("#clr-recipe");
+ },
+
+ "Move around the UI": browser => {
+ const otherCat = "//a[contains(@class, 'category-title') and contains(@data-target, '#catOther')]",
+ genUUID = "//li[contains(@class, 'operation') and text()='Generate UUID']";
+
+ browser.useXpath();
+
+ // Scroll to a lower category
+ browser
+ .getLocationInView(otherCat)
+ .expect.element(otherCat).to.be.visible;
+
+ // Open category
+ browser
+ .click(otherCat)
+ .expect.element(genUUID).to.be.visible;
+
+ // Drag and drop op into recipe
+ browser
+ .getLocationInView(genUUID)
+ .moveToElement(genUUID, 10, 10)
+ .mouseButtonDown("left")
+ .pause(100)
+ .useCss()
+ .moveToElement("#rec-list", 10, 10)
+ .waitForElementVisible(".sortable-ghost", 100)
+ .mouseButtonUp("left")
+ /* mouseButtonUp drops wherever the actual cursor is, not necessarily in the right place
+ so we can't test Sortable.js properly using Nightwatch. html-dnd doesn't work either.
+ Instead of relying on the drop, we double click on the op to load it. */
+ .useXpath()
+ .moveToElement(genUUID, 10, 10)
+ .doubleClick()
+ .useCss()
+ .waitForElementVisible(".operation .op-title", 1000)
+ .waitForElementNotVisible("#stale-indicator", 1000)
+ .expect.element("#output-text").to.have.value.which.matches(/[\da-f-]{36}/);
+
+ browser.click("#clr-recipe");
+ },
+
+ "Search": browser => {
+ // Search for an op
+ browser
+ .useCss()
+ .clearValue("#search")
+ .setValue("#search", "md5")
+ .useXpath()
+ .waitForElementVisible("//ul[@id='search-results']//u[text()='MD5']", 1000);
},
after: browser => {
| 0 |
diff --git a/app/models/cluster.js b/app/models/cluster.js @@ -89,8 +89,8 @@ export const DEFAULT_GKE_NODE_POOL_CONFIG = {
},
initialNodeCount: 3,
management: {
- autoRepair: false,
- autoUpgrade: false,
+ autoRepair: true,
+ autoUpgrade: true,
},
maxPodsConstraint: 110,
name: null,
| 12 |
diff --git a/src/client/client4.ts b/src/client/client4.ts @@ -1627,17 +1627,17 @@ export default class Client4 {
// Post Routes
createPost = async (post: Post) => {
- const analyticsData = {channel_id: post.channel_id, post_id: post.id, user_actual_id: post.user_id, root_id: post.root_id};
+ const result = await this.doFetch(
+ `${this.getPostsRoute()}`,
+ {method: 'post', body: JSON.stringify(post)},
+ );
+ const analyticsData = {channel_id: result.channel_id, post_id: result.id, user_actual_id: result.user_id, root_id: result.root_id};
this.trackEvent('api', 'api_posts_create', analyticsData);
- if (post.root_id != null && post.root_id !== '') {
+ if (result.root_id != null && result.root_id !== '') {
this.trackEvent('api', 'api_posts_replied', analyticsData);
}
-
- return this.doFetch(
- `${this.getPostsRoute()}`,
- {method: 'post', body: JSON.stringify(post)},
- );
+ return result;
};
updatePost = async (post: Post) => {
| 1 |
diff --git a/includes/Modules/Thank_With_Google/Settings.php b/includes/Modules/Thank_With_Google/Settings.php @@ -119,7 +119,18 @@ class Settings extends Module_Settings implements Setting_With_Owned_Keys_Interf
* @return string The sanitized value.
*/
private function sanitize_color_theme( $color_theme ) {
- if ( in_array( $color_theme, array( 'blue' ), true ) ) {
+ $allowed_colors = array(
+ 'blue',
+ 'cyan',
+ 'green',
+ 'purple',
+ 'pink',
+ 'orange',
+ 'brown',
+ 'black',
+ );
+
+ if ( in_array( $color_theme, $allowed_colors, true ) ) {
return $color_theme;
}
return '';
| 1 |
diff --git a/assets/js/googlesitekit/data/create-snapshot-store.js b/assets/js/googlesitekit/data/create-snapshot-store.js @@ -126,8 +126,6 @@ export const createSnapshotStore = ( storeName ) => {
return deleteItem( `datastore::cache::${ storeName }` );
},
[ CREATE_SNAPSHOT ]: createRegistryControl( ( registry ) => () => {
- // console.log( `saving ${ storeName }`, registry.stores[ storeName ].store.getState() );
- // registry.stores[ storeName ].store.getState().foo();
return setItem( `datastore::cache::${ storeName }`, registry.stores[ storeName ].store.getState() );
} ),
[ RESTORE_SNAPSHOT ]: () => {
| 2 |
diff --git a/react/src/components/dropdown/SprkDropdown.js b/react/src/components/dropdown/SprkDropdown.js @@ -351,7 +351,11 @@ SprkDropdown.propTypes = {
items: PropTypes.arrayOf(
PropTypes.shape({
/** The element to render for each menu item. */
- element: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
+ element: PropTypes.oneOfType([
+ PropTypes.string,
+ PropTypes.func,
+ PropTypes.elementType,
+ ]),
/**
* Determines the href of the choice item.
*/
| 11 |
diff --git a/bot.js b/bot.js @@ -5,22 +5,35 @@ const config = require('./config');
const bot = new Discord.Client();
bot.login(config.auth_token);
+var channels = new Discord.Collection();
+
//connect to mysql db
const database = mysql.createConnection(config.db);
database.connect(function(err) {
if (err) throw err;
console.log("Connected!");
+ database.query("CREATE TABLE IF NOT EXISTS `channels` (`id` VARCHAR(20) NOT NULL, `mode` TINYINT NOT NULL, PRIMARY KEY (`id`), UNIQUE INDEX `id_UNIQUE` (`id` ASC) VISIBLE)");
+ // id => discord channel snowflake
+ // mode => 1 = reuqire ips, 2 = forbid ips
+
+ //load channels
+ database.query("SELECT * FROM channels",function(err, result){
+ if(err) throw err;
+ result.forEach( row => {
+ channels.set(row.id, row.mode);
+ });
+ });
});
//bot commands
bot.on('message', async (message) => {
if(!message.guild || message.author.bot) return;
- if(!message.content.startsWith(config.prefix)) return;
+ if(!message.content.toLowerCase().startsWith(config.prefix.toLowerCase())) return;
const args = message.content.split(/\s+/g);
- const command = args.shift().slice(cfg.prefix.length).toLowerCase();
+ const command = args.shift().slice(config.prefix.length).toLowerCase();
switch(command){
}
-})
+});
| 12 |
diff --git a/packages/idyll-document/src/components/author-tool.js b/packages/idyll-document/src/components/author-tool.js @@ -44,12 +44,10 @@ class AuthorTool extends React.PureComponent {
});
const {isAuthorView, debugHeight} = this.state;
const currentDebugHeight = isAuthorView ? debugHeight : 0;
- const marginToGive = isAuthorView ? 15 : 0;
return (
<div className="debug-collapse"
style={{
height: currentDebugHeight + 'px',
- marginBottom: marginToGive + 'px'
}}
>
<div className="author-component-view" ref="inner">
@@ -65,12 +63,12 @@ class AuthorTool extends React.PureComponent {
</tbody>
</table>
<div className="icon-links">
+ <span style={{fontFamily: 'courier', fontSize: '12px'}}>docs</span>
<a className="icon-link" href={componentDocsLink}>
<img className="icon-link-image"
src="https://raw.githubusercontent.com/google/material-design-icons/master/action/svg/design/ic_description_24px.svg?sanitize=true"
/>
</a>
- <div className="icon-tooltip">docs</div>
</div>
</div>
</div>
| 2 |
diff --git a/token-metadata/0xd0929d411954c47438dc1d871dd6081F5C5e149c/metadata.json b/token-metadata/0xd0929d411954c47438dc1d871dd6081F5C5e149c/metadata.json "symbol": "RFR",
"address": "0xd0929d411954c47438dc1d871dd6081F5C5e149c",
"decimals": 4,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/components/Frame/Header.js b/components/Frame/Header.js @@ -377,7 +377,7 @@ class Header extends Component {
onClick={toggleExpanded}
/>
</div>
- {inNativeIOSApp && <a
+ {(inNativeIOSApp || backButton) && <a
style={{
opacity: backButton ? 1 : 0,
pointerEvents: backButton ? undefined : 'none',
@@ -393,7 +393,7 @@ class Header extends Component {
() => {
if (!routeChangeStarted) {
Router.replaceRoute(
- 'front'
+ 'index'
).then(() => window.scrollTo(0, 0))
}
},
| 1 |
diff --git a/js/independentreserve.js b/js/independentreserve.js @@ -186,7 +186,14 @@ module.exports = class independentreserve extends Exchange {
// "CreatedTimestampUtc":"2022-01-14T22:52:29.5029223Z"
// }
const timestamp = this.parse8601 (this.safeString (ticker, 'CreatedTimestampUtc'));
- const symbol = this.safeSymbol (undefined, market);
+ const baseId = this.safeString (ticker, 'PrimaryCurrencyCode');
+ const quoteId = this.safeString (ticker, 'SecondaryCurrencyCode');
+ let defaultMarketId = undefined;
+ if ((baseId !== undefined) && (quoteId !== undefined)) {
+ defaultMarketId = baseId + '/' + quoteId;
+ }
+ market = this.safeMarket (defaultMarketId, market, '/');
+ const symbol = market['symbol'];
const last = this.safeNumber (ticker, 'LastPrice');
return this.safeTicker ({
'symbol': symbol,
| 7 |
diff --git a/BUILD.gn b/BUILD.gn @@ -310,7 +310,7 @@ if (is_win && !is_component_build) {
deps = [
"//chrome:reorder_imports",
- "//chrome:main_dll",
+ "//chrome:chrome_dll",
":copy_node",
":payload",
"//v8:nwjc",
@@ -364,7 +364,7 @@ if (is_linux && !is_component_build) {
"$root_build_dir/payload"]
deps = [
"//chrome:chrome_initial",
- "//chrome:main_dll",
+ "//chrome:chrome_dll",
":copy_node",
":payload",
"//v8:nwjc",
| 10 |
diff --git a/publish/deployed/kovan/config.json b/publish/deployed/kovan/config.json "SynthsCNY": {
"deploy": false
},
- "SynthsSGD": {
- "deploy": false
- },
- "SynthsRUB": {
- "deploy": false
- },
"SynthsINR": {
"deploy": false
},
- "SynthsBRL": {
- "deploy": false
- },
- "SynthsNZD": {
- "deploy": false
- },
- "SynthsPLN": {
- "deploy": false
- },
"SynthsXAU": {
"deploy": false
},
"ProxysCNY": {
"deploy": false
},
- "ProxysSGD": {
- "deploy": false
- },
- "ProxysRUB": {
- "deploy": false
- },
"ProxysINR": {
"deploy": false
},
- "ProxysBRL": {
- "deploy": false
- },
- "ProxysNZD": {
- "deploy": false
- },
- "ProxysPLN": {
- "deploy": false
- },
"ProxysXAU": {
"deploy": false
},
"TokenStatesCNY": {
"deploy": false
},
- "TokenStatesSGD": {
- "deploy": false
- },
- "TokenStatesRUB": {
- "deploy": false
- },
"TokenStatesINR": {
"deploy": false
},
- "TokenStatesBRL": {
- "deploy": false
- },
- "TokenStatesNZD": {
- "deploy": false
- },
- "TokenStatesPLN": {
- "deploy": false
- },
"TokenStatesXAU": {
"deploy": false
},
| 2 |
diff --git a/setup.py b/setup.py @@ -5,7 +5,7 @@ here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.md')).read()
CHANGES = open(os.path.join(here, 'CHANGES.rst')).read()
# Edit Snovault version after the `@` here, can be a branch or tag
-SNOVAULT_DEP = "git+https://github.com/ENCODE-DCC/snovault.git@SNO-192-update-pip-install"
+SNOVAULT_DEP = "git+https://github.com/ENCODE-DCC/[email protected]"
INSTALL_REQUIRES = [
"PasteDeploy==2.1.0",
| 3 |
diff --git a/package.json b/package.json {
"name": "kuzzle",
"author": "The Kuzzle Team <[email protected]>",
- "version": "2.17.8",
+ "version": "2.17.6",
"description": "Kuzzle is an open-source solution that handles all the data management through a secured API, with a large choice of protocols.",
"bin": {
"kuzzle": "bin/start-kuzzle-server"
| 13 |
diff --git a/validators/bids.js b/validators/bids.js @@ -481,10 +481,22 @@ BIDS = {
dataFile = true
break
}
+ // MEG datafiles may be a folder, therefore not contained in fileList, will need to look in paths
+ if (
+ noExt.endsWith('_meg') ||
+ noExt.endsWith('_coordsystem')
+ ) {
+ // Check for folder ending in meg.ds
+ if (fileList[i].relativePath.includes('_meg.ds')) {
+ dataFile = true
+ break
}
}
}
}
+ }
+ }
+
if (!dataFile) {
self.issues.push(
new Issue({
| 9 |
diff --git a/source/agent/conference/conference.js b/source/agent/conference/conference.js @@ -1443,6 +1443,10 @@ var Conference = function (rpcClient, selfRpcId) {
return false;
}
+ //FIXME: allow bitrate 1.0x for client-sdk
+ if (req.parameters.bitrate === 'x1.0') {
+ req.parameters.bitrate = undefined;
+ }
if (req.parameters.bitrate && !isBitrateAcceptable(streams[req.from].media.video, req.parameters.bitrate)) {
return false;
}
| 11 |
diff --git a/docs/components/Modal.md b/docs/components/Modal.md @@ -22,14 +22,14 @@ class MyModal extends React.Component {
render() {
return (
<div>
- <Form>
+ <Form className="mbn">
<FormRow>
- <FormCol fixed>
+ <FormCol fixed hideHelpRow>
<DefaultButton onClick={() => this.setState({show: true})}>
Open Modal
</DefaultButton>
</FormCol>
- <FormCol inline labelPosition="after" label="Disable Animation">
+ <FormCol inline hideHelpRow labelPosition="after" label="Disable Animation">
<Toggle size="medium" onChange={() => this.setState({disableAnimation: !this.state.disableAnimation})}/>
</FormCol>
</FormRow>
| 7 |
diff --git a/snowpack/src/commands/dev.ts b/snowpack/src/commands/dev.ts @@ -44,6 +44,8 @@ import {
} from '../util';
import {getPort, startDashboard, paintEvent} from './paint';
import {cssModuleJSON} from '../build/import-css';
+import {runPipelineCleanupStep} from '../build/build-pipeline';
+
export class OneToManyMap {
readonly keyToValue = new Map<string, string[]>();
readonly valueToKey = new Map<string, string>();
@@ -1013,6 +1015,7 @@ export async function startServer(
getServerRuntime: (options) => getServerRuntime(sp, options),
async shutdown() {
watcher && (await watcher.close());
+ await runPipelineCleanupStep(config);
server && server.close();
},
};
| 11 |
diff --git a/src/server/app.js b/src/server/app.js @@ -204,8 +204,8 @@ app.get("/sitemap.xml", async (req, res)=>{
});*/
let sitemap;
async function gensitemap(){
- const allbots = await Bots.find({}).select('id');
- const botsmap = await allbots.map(function(id){`<url>\n<loc>${process.env.DOMAIN}/bots/${id}</loc>\n<lastmod>2022-04-26</lastmod>\n<priority>0.9</priority>\n<changefreq>hourly</changefreq></url>`}).join("\n");
+ const allbots = await Bots.find({});
+ const botsmap = await allbots.map(function(bot){`<url>\n<loc>${process.env.DOMAIN}/bots/${bot.id}</loc>\n<lastmod>2022-04-26</lastmod>\n<priority>0.9</priority>\n<changefreq>hourly</changefreq></url>`}).join("\n");
const Sitemap='<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">'+`\n<url>\n<loc>${process.env.DOMAIN}/</loc>\n<lastmod>2021-04-26T11:55:48+00:00</lastmod>\n<priority>1.00</priority><changefreq>daily</changefreq>\n</url>`+botsmap+'</urlset>';
return Sitemap;
};
| 1 |
diff --git a/README.md b/README.md @@ -328,7 +328,7 @@ document.querySelector
```javascript
// <hello-world>
-// <!-- `onclick` is "automagically" attached -->
+// `onclick` is "automagically" attached
//
// <a onclick=onsneeze> ACHOO! </a>
// </hello-world>
| 2 |
diff --git a/new-client/src/plugins/information/information.js b/new-client/src/plugins/information/information.js @@ -35,12 +35,14 @@ class Information extends React.PureComponent {
if (this.options.visibleAtStart === true) {
if (
this.options.showInfoOnce === true &&
- parseInt(window.localStorage.getItem("alreadyShown")) === 1
+ parseInt(
+ window.localStorage.getItem("pluginInformationMessageShown")
+ ) === 1
) {
dialogOpen = false;
} else {
if (this.options.showInfoOnce === true) {
- window.localStorage.setItem("alreadyShown", 1);
+ window.localStorage.setItem("pluginInformationMessageShown", 1);
}
dialogOpen = true;
}
| 10 |
diff --git a/frontend/lost/src/components/SIA/SIA.js b/frontend/lost/src/components/SIA/SIA.js @@ -18,12 +18,13 @@ class SIA extends Component{
return(
<React.Fragment>
<Row>
- <Col xs='11' sm='11' lg='11'>
- <Canvas></Canvas>
- </Col>
<Col xs='1' sm='1' lg='1'>
<ToolBar></ToolBar>
</Col>
+ <Col xs='11' sm='11' lg='11'>
+ <Canvas></Canvas>
+ </Col>
+
</Row>
<Row>
<Col>
| 5 |
diff --git a/src/dom_components/view/ComponentTextView.js b/src/dom_components/view/ComponentTextView.js @@ -62,18 +62,20 @@ export default ComponentView.extend({
* Disable element content editing
* @private
* */
- disableEditing() {
+ async disableEditing() {
const { model, rte, activeRte, em } = this;
- const editable = model.get('editable');
+ // There are rare cases when disableEditing is called when the view is already removed
+ // so, we have to check for the model, this will avoid breaking stuff.
+ const editable = model && model.get('editable');
- if (rte && editable) {
+ if (rte) {
try {
- rte.disable(this, activeRte);
+ await rte.disable(this, activeRte);
} catch (err) {
em.logError(err);
}
- this.syncContent();
+ editable && this.syncContent();
}
this.toggleEvents();
@@ -164,7 +166,7 @@ export default ComponentView.extend({
* @param {Boolean} enable
*/
toggleEvents(enable) {
- const { em, model } = this;
+ const { em, model, $el } = this;
const mixins = { on, off };
const method = enable ? 'on' : 'off';
em.setEditing(enable ? this : 0);
@@ -175,11 +177,11 @@ export default ComponentView.extend({
mixins.off(elDocs, 'mousedown', this.disableEditing);
mixins[method](elDocs, 'mousedown', this.disableEditing);
em[method]('toolbar:run:before', this.disableEditing);
- model[method]('removed', this.disableEditing);
+ model && model[method]('removed', this.disableEditing);
// Avoid closing edit mode on component click
- this.$el.off('mousedown', this.disablePropagation);
- this.$el[method]('mousedown', this.disablePropagation);
+ $el && $el.off('mousedown', this.disablePropagation);
+ $el && $el[method]('mousedown', this.disablePropagation);
// Fixes #2210 but use this also as a replacement
// of this fix: bd7b804f3b46eb45b4398304b2345ce870f232d2
| 9 |
diff --git a/src/DatabaseProvider/withDatabase.d.ts b/src/DatabaseProvider/withDatabase.d.ts -import type { NonReactStatics } from 'hoist-non-react-statics'
-import { ComponentType } from 'react'
+import * as React from 'react'
+import { NonReactStatics } from 'hoist-non-react-statics'
import type Database from '../Database'
type WithDatabaseProps<T> = T & {
database: Database
}
+
+type GetProps<C> = C extends React.ComponentType<infer P & { database?: Database }> ? P : never
+
// HoC to inject the database into the props of consumers
-export default function withDatabase<T extends React.ComponentType<any>>(
- Component: ComponentType<WithDatabaseProps<T>>,
-): React.FunctionComponent<Omit<T, 'database'>> & NonReactStatics<T>
+export default function withDatabase<
+C extends React.ComponentType<any>,
+P = GetProps<C>,
+R = Omit<P, 'database'>
+>(Component: C): React.FunctionComponent<R> & NonReactStatics<C>
\ No newline at end of file
| 13 |
diff --git a/core/algorithm-builder/environments/nodejs/wrapper/package.json b/core/algorithm-builder/environments/nodejs/wrapper/package.json "author": "",
"license": "ISC",
"dependencies": {
- "@hkube/nodejs-wrapper": "^2.0.40"
+ "@hkube/nodejs-wrapper": "^2.0.41"
},
"devDependencies": {}
}
\ No newline at end of file
| 3 |
diff --git a/src/workingtitle-vcockpits-instruments-airliners/html_ui/Pages/VCockpit/Instruments/Airliners/Shared/WT/AirspeedIndicator.js b/src/workingtitle-vcockpits-instruments-airliners/html_ui/Pages/VCockpit/Instruments/Airliners/Shared/WT/AirspeedIndicator.js @@ -1848,6 +1848,16 @@ class Jet_PFD_AirspeedIndicator extends HTMLElement {
else {
this.vSpeedSVG.setAttribute("visibility", "hidden");
}
+ if (Simplane.getIndicatedSpeed() > 200 && SimVar.GetSimVarValue("L:WT_CJ4_VT_SPEED", "Knots") != 0) {
+ SimVar.SetSimVarValue("L:WT_CJ4_V1_SPEED", "Knots", 0);
+ SimVar.SetSimVarValue("L:WT_CJ4_VR_SPEED", "Knots", 0);
+ SimVar.SetSimVarValue("L:WT_CJ4_V2_SPEED", "Knots", 0);
+ SimVar.SetSimVarValue("L:WT_CJ4_VT_SPEED", "Knots", 0);
+ SimVar.SetSimVarValue("L:WT_CJ4_V1_FMCSET", "Bool", true);
+ SimVar.SetSimVarValue("L:WT_CJ4_VR_FMCSET", "Bool", true);
+ SimVar.SetSimVarValue("L:WT_CJ4_V2_FMCSET", "Bool", true);
+ SimVar.SetSimVarValue("L:WT_CJ4_VT_FMCSET", "Bool", true);
+ }
}
}
computeIAS(_currentSpeed) {
| 12 |
diff --git a/module/modifier-bucket/resolve-diceroll-app.js b/module/modifier-bucket/resolve-diceroll-app.js @@ -154,7 +154,7 @@ export default class ResolveDiceRoll extends Application {
results.push(value)
- generate(dice, target - value, results)
+ this.generate(dice, target - value, results)
}
return results
}
| 1 |
diff --git a/detox/ios/Detox/DetoxAppDelegateProxy.m b/detox/ios/Detox/DetoxAppDelegateProxy.m @@ -27,6 +27,38 @@ static DetoxAppDelegateProxy* _currentAppDelegateProxy;
return _currentAppDelegateProxy;
}
+static void __copyMethods(Class orig, Class target)
+{
+ //Copy class methods
+ Class targetMetaclass = object_getClass(target);
+
+ unsigned int methodCount = 0;
+ Method *methods = class_copyMethodList(object_getClass(orig), &methodCount);
+
+ for (unsigned int i = 0; i < methodCount; i++)
+ {
+ Method method = methods[i];
+ if(strcmp(sel_getName(method_getName(method)), "load") == 0 || strcmp(sel_getName(method_getName(method)), "initialize") == 0)
+ {
+ continue;
+ }
+ class_addMethod(targetMetaclass, method_getName(method), method_getImplementation(method), method_getTypeEncoding(method));
+ }
+
+ free(methods);
+
+ //Copy instance methods
+ methods = class_copyMethodList(orig, &methodCount);
+
+ for (unsigned int i = 0; i < methodCount; i++)
+ {
+ Method method = methods[i];
+ class_addMethod(target, method_getName(method), method_getImplementation(method), method_getTypeEncoding(method));
+ }
+
+ free(methods);
+}
+
+ (void)load
{
Method m = class_getInstanceMethod([UIApplication class], @selector(setDelegate:));
@@ -35,17 +67,14 @@ static DetoxAppDelegateProxy* _currentAppDelegateProxy;
//Only create a dupe class if the provided instance is not already a dupe class.
if(origDelegate != nil && [origDelegate respondsToSelector:@selector(__dtx_canaryInTheCoalMine)] == NO)
{
-
NSString* clsName = [NSString stringWithFormat:@"%@(%@)", NSStringFromClass([origDelegate class]), NSStringFromClass([DetoxAppDelegateProxy class])];
Class cls = objc_getClass(clsName.UTF8String);
if(cls == nil)
{
- cls = objc_duplicateClass([DetoxAppDelegateProxy class], clsName.UTF8String, 0);
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated"
- class_setSuperclass(cls, origDelegate.class);
-#pragma clang diagnostic pop
+ cls = objc_allocateClassPair(origDelegate.class, clsName.UTF8String, 0);
+ __copyMethods([DetoxAppDelegateProxy class], cls);
+ objc_registerClassPair(cls);
}
object_setClass(origDelegate, cls);
@@ -62,7 +91,7 @@ static DetoxAppDelegateProxy* _currentAppDelegateProxy;
- (void)__dtx_applicationDidLaunchNotification:(NSNotification*)notification
{
- [self.userNotificationDispatcher dispatchOnAppDelegate:self simulateDuringLaunch:YES];
+ [self.__dtx_userNotificationDispatcher dispatchOnAppDelegate:self simulateDuringLaunch:YES];
}
- (NSURL*)_userNotificationDataURL
@@ -112,7 +141,7 @@ static DetoxAppDelegateProxy* _currentAppDelegateProxy;
return rv;
}
-- (DetoxUserNotificationDispatcher*)userNotificationDispatcher
+- (DetoxUserNotificationDispatcher*)__dtx_userNotificationDispatcher
{
DetoxUserNotificationDispatcher* rv = objc_getAssociatedObject(self, _cmd);
@@ -127,7 +156,7 @@ static DetoxAppDelegateProxy* _currentAppDelegateProxy;
- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(nullable NSDictionary<UIApplicationLaunchOptionsKey, id>*)launchOptions
{
- launchOptions = [self _prepareLaunchOptions:launchOptions userNotificationDispatcher:self.userNotificationDispatcher];
+ launchOptions = [self _prepareLaunchOptions:launchOptions userNotificationDispatcher:self.__dtx_userNotificationDispatcher];
BOOL rv = YES;
if([class_getSuperclass(object_getClass(self)) instancesRespondToSelector:_cmd])
@@ -142,7 +171,7 @@ static DetoxAppDelegateProxy* _currentAppDelegateProxy;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(nullable NSDictionary<UIApplicationLaunchOptionsKey, id> *)launchOptions
{
- launchOptions = [self _prepareLaunchOptions:launchOptions userNotificationDispatcher:self.userNotificationDispatcher];
+ launchOptions = [self _prepareLaunchOptions:launchOptions userNotificationDispatcher:self.__dtx_userNotificationDispatcher];
BOOL rv = YES;
if([class_getSuperclass(object_getClass(self)) instancesRespondToSelector:_cmd])
@@ -152,7 +181,7 @@ static DetoxAppDelegateProxy* _currentAppDelegateProxy;
rv = super_class(&super, _cmd, application, launchOptions);
}
- if(self.userNotificationDispatcher == nil && [self _URLOverride] && [class_getSuperclass(object_getClass(self)) instancesRespondToSelector:@selector(application:openURL:options:)])
+ if(self.__dtx_userNotificationDispatcher == nil && [self _URLOverride] && [class_getSuperclass(object_getClass(self)) instancesRespondToSelector:@selector(application:openURL:options:)])
{
[self application:application openURL:[self _URLOverride] options:launchOptions];
}
| 1 |
diff --git a/NiL.JS/Core/Functions/ConstructorProxy.cs b/NiL.JS/Core/Functions/ConstructorProxy.cs @@ -168,8 +168,6 @@ namespace NiL.JS.Core.Functions
return new Date().ToString();
}
- try
- {
object obj;
if (_staticProxy._hostedType == typeof(BaseLibrary.Array))
{
@@ -289,15 +287,6 @@ namespace NiL.JS.Core.Functions
return res;
}
- catch (TargetInvocationException e)
- {
-#if !(PORTABLE || NETCORE)
- if (System.Diagnostics.Debugger.IsAttached)
- System.Diagnostics.Debugger.Log(10, "Exception", e.ToString());
-#endif
- throw e.GetBaseException();
- }
- }
protected internal override JSValue ConstructObject()
{
| 2 |
diff --git a/generators/server/files.js b/generators/server/files.js * See the License for the specific language governing permissions and
* limitations under the License.
*/
-const mkdirp = require('mkdirp');
const cleanup = require('../cleanup');
const constants = require('../generator-constants');
@@ -1528,15 +1527,7 @@ const serverFiles = {
],
},
{
- condition: generator => {
- if (generator.gatlingTests) {
- mkdirp(`${TEST_DIR}gatling/user-files/data`);
- mkdirp(`${TEST_DIR}gatling/user-files/bodies`);
- mkdirp(`${TEST_DIR}gatling/user-files/simulations`);
- return true;
- }
- return false;
- },
+ condition: generator => generator.gatlingTests,
path: TEST_DIR,
templates: [
// Create Gatling test files
@@ -1907,9 +1898,6 @@ function writeFiles() {
this.javaDir = `${this.packageFolder}/`;
this.testDir = `${this.packageFolder}/`;
- // Create Java resource files
- mkdirp(SERVER_MAIN_RES_DIR);
- mkdirp(`${SERVER_TEST_SRC_DIR}/${this.testDir}`);
this.generateKeyStore();
},
| 2 |
diff --git a/src/ui/UIMarker.js b/src/ui/UIMarker.js @@ -14,6 +14,8 @@ import UIComponent from './UIComponent';
* @property {Number} [options.single=false] - if the marker is a global single one.
* @property {String|HTMLElement} options.content - content of the marker, can be a string type HTML code or a HTMLElement.
* @property {Number} [options.altitude=0] - altitude.
+ * @property {Number} [options.minZoom=0] - the minimum zoom to display .
+ * @property {Number} [options.maxZoom=null] - the maximum zoom to display.
* @memberOf ui.UIMarker
* @instance
*/
| 3 |
diff --git a/avatars/util.mjs b/avatars/util.mjs @@ -602,6 +602,13 @@ export const animationBoneToModelBone = {
'mixamorigLeftFoot': 'Left_ankle',
'mixamorigLeftToeBase': 'Left_toe',
};
+export const modelBoneToAnimationBone = (() => {
+ const result = {};
+ for (const key in animationBoneToModelBone) {
+ result[animationBoneToModelBone[key]] = key;
+ }
+ return result;
+})();
/* const _setSkeletonToAnimationFrame = (modelBones, animation, frame) => {
for (const track of animation.tracks) {
const match = track.name.match(/^(mixamorig.+)\.(position|quaternion)/);
| 0 |
diff --git a/tests/resize.html b/tests/resize.html position: absolute;
left: 10px;
right: 10px;
- top: 40px;
+ top: 50px;
bottom: 10px;
}
</style>
</head>
<body>
- <p>Resize the window. The dygraph will resize with it.</p>
+ <p>Resize the window. The dygraph will resize with it.
+ This is distinct from the <tt>{ resizable: "both" }</tt> feature.</p>
<div id="div_g"></div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
| 7 |
diff --git a/app/views/full-page-examples/feedback/index.njk b/app/views/full-page-examples/feedback/index.njk {# This example is based of the live "Send your feedback to GOV.UK Verify" start page: https://www.signin.service.gov.uk/feedback #}
{% extends "_generic.njk" %}
+{% from "warning-text/macro.njk" import govukWarningText %}
{% from "radios/macro.njk" import govukRadios %}
{% from "input/macro.njk" import govukInput %}
{% from "character-count/macro.njk" import govukCharacterCount %}
Use this form to ask a question, report a problem or suggest an improvement this service can make.
</p>
- <p class="govuk-body govuk-!-font-weight-bold">
- Don't include any personal or financial information like your National Insurance number or credit card details.
- </p>
+ {{ govukWarningText({
+ text: "Don't include any personal or financial information like your National Insurance number or credit card details."
+ }) }}
{{ govukCharacterCount({
name: "what-were-you-trying-to-do",
| 14 |
diff --git a/src/components/AddressSearch.js b/src/components/AddressSearch.js @@ -26,7 +26,7 @@ const propTypes = {
* @param {Object} props - props passed to the input
* @returns {Object} - returns an Error object if isFormInput is supplied but inputID is falsey or not a string
*/
- inputID: props => FormUtils.getInputIDPropTypes(props),
+ inputID: props => FormUtils.validateInputIDProps(props),
/** Saves a draft of the input value when used in a form */
shouldSaveDraft: PropTypes.bool,
| 10 |
diff --git a/src/compiler/lexer.imba1 b/src/compiler/lexer.imba1 @@ -144,6 +144,7 @@ var OPERATOR = /// ^ (
var WHITESPACE = /^[^\n\S]+/
var COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)?$)/
+var JS_COMMENT = /^\/\*([\s\S]*?)\*\//
# var INLINE_COMMENT = /^(\s*)((#[ \t\!]||\/\/)(.*)|#[ \t]?(?=\n|$))+/
var INLINE_COMMENT = /^(\s*)((#[ \t\!]|\/\/)(.*)|#[ \t]?(?=\n|$))+/
@@ -1034,6 +1035,11 @@ export class Lexer
var typ = 'HERECOMMENT'
+ if match = JS_COMMENT.exec(@chunk)
+ token 'HERECOMMENT', match[1], match[1]:length
+ token 'TERMINATOR', '\n'
+ return match[0]:length
+
if match = INLINE_COMMENT.exec(@chunk) # .match(INLINE_COMMENT)
# console.log "match inline comment"
length = match[0]:length
@@ -1068,7 +1074,6 @@ export class Lexer
tVs(prev,tV(prev) + note)
# prev[1] += note
elif pt == 'INDENT'
- # console.log "adding comment to INDENT: {note}" # why not add directly here?
addLinebreaks(1,note)
else
# console.log "comment here"
| 11 |
diff --git a/token-metadata/0x82daD985AfD3708680Bac660f4E527DA4f0dCfA5/metadata.json b/token-metadata/0x82daD985AfD3708680Bac660f4E527DA4f0dCfA5/metadata.json "symbol": "INFD",
"address": "0x82daD985AfD3708680Bac660f4E527DA4f0dCfA5",
"decimals": 8,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/Navigation.js b/src/Navigation.js @@ -82,15 +82,21 @@ export const getTabTestId = (routeName: string) => {
switch (routeName) {
case EVENT_LIST:
return "events-tab-button";
+ case PARADE:
+ return "parade-tab-button";
+ case SAVED:
+ return "saved-events-tab-button";
+ case SUPPORT_US:
+ return "support-us-tab-button";
default:
return "";
}
};
export const getNavigationOptions = (
- navigation: object,
- navigationOptions: object,
- tabBarLessRoutes: array
+ navigation: Object,
+ navigationOptions: Object,
+ tabBarLessRoutes: Array
) => {
const { routeName } = navigation.state.routes[navigation.state.index];
if (tabBarLessRoutes.includes(routeName)) {
| 0 |
diff --git a/src/utils/telemetry/index.js b/src/utils/telemetry/index.js const path = require('path')
const { spawn } = require('child_process')
const isValidEventName = require('./validation')
-const GlobalConfig = require('../../base/global-config')
+const globalConfig = require('../../base/global-config')
const ci = require('ci-info')
-const globalConfig = GlobalConfig.all
-const TELEMETRY_DISABLED = globalConfig.telemetryDisabled
const IS_INSIDE_CI = ci.isCI
const DEBUG = false
@@ -52,6 +50,7 @@ function track(eventName, payload) {
}
// exit early if tracking disabled
+ const TELEMETRY_DISABLED = globalConfig.get('telemetryDisabled')
if (TELEMETRY_DISABLED && !properties.force) {
if (DEBUG) {
console.log('Abort .track call TELEMETRY_DISABLED')
@@ -59,7 +58,16 @@ function track(eventName, payload) {
return Promise.resolve()
}
- const { userId, cliId } = globalConfig
+ let userId = properties.userID
+ let cliId = properties.cliId
+
+ if (!userId) {
+ userId = globalConfig.get('userId')
+ }
+
+ if (!cliId) {
+ cliId = globalConfig.get('cliId')
+ }
// automatically add `cli:` prefix if missing
if (eventName.indexOf('cli:') === -1) {
@@ -98,6 +106,7 @@ function identify(payload) {
}
// exit early if tracking disabled
+ const TELEMETRY_DISABLED = globalConfig.get('telemetryDisabled')
if (TELEMETRY_DISABLED && !data.force) {
if (DEBUG) {
console.log('Abort .identify call TELEMETRY_DISABLED')
@@ -105,10 +114,18 @@ function identify(payload) {
return Promise.resolve()
}
+ let userId = data.userID
+ let cliId = data.cliId
+
+ if (!userId) {
+ userId = globalConfig.get('userId')
+ }
+
+ if (!cliId) {
+ cliId = globalConfig.get('cliId')
+ }
- const userId = globalConfig.userId
- const userProfile = globalConfig.users[`${userId}`]
- const cliId = globalConfig.cliId
+ const userProfile = globalConfig.get(`users.${userId}`)
const defaultTraits = {
name: userProfile.name,
| 3 |
diff --git a/src/components/mdx/anchor-link.js b/src/components/mdx/anchor-link.js @@ -4,9 +4,12 @@ import { Link } from "gatsby"
const linkClassName = "DocsMarkdown--link" // TODO - get prefix from somewhere
export default ({ href, className, ...props }) => {
- const external = !!href.match(/^https?:/)
+ const isExternal = !!href.match(/^https?:/)
+ const isHash = href.indexOf("#") === 0
- return external ? (
+ const useRegularLink = isExternal || isHash
+
+ return useRegularLink ? (
<a href={href} className={className || linkClassName} {...props}/>
) : (
<Link to={href} className={className || linkClassName} {...props}/>
| 7 |
diff --git a/src/components/staking/TableValidators.vue b/src/components/staking/TableValidators.vue <div>
<table class="data-table">
<thead>
- <PanelSort :sort="sort" :properties="properties" />
+ <PanelSort
+ :sort="sort"
+ :properties="properties"
+ />
</thead>
<tbody>
<LiValidator
@@ -70,8 +73,8 @@ export default {
return Object.assign({}, v, {
small_moniker: v.description.moniker.toLowerCase(),
my_delegations:
- session.signedIn && committedDelegations[v.id] > 0
- ? committedDelegations[v.id]
+ session.signedIn && committedDelegations[v.operator_address] > 0
+ ? committedDelegations[v.operator_address]
: 0,
commission: v.commission.rate,
voting_power: BN(v.tokens)
| 1 |
diff --git a/package.json b/package.json "homepage": "https://github.com/z-------------/cumulonimbus",
"dependencies": {
"@polymer/polymer": "1.7.1-npm-test.4",
- "electron": "^1.7.5",
"jimp": "^0.2.28",
"jquery": "^3.2.1",
"js2xmlparser": "^1.0.0",
},
"devDependencies": {
"autoprefixer": "^6.3.6",
+ "electron": "^1.7.5",
"electron-builder": "^19.27.2",
"gulp": "^3.9.0",
"gulp-concat": "^2.6.0",
| 12 |
diff --git a/docs/charts/line.md b/docs/charts/line.md @@ -91,7 +91,7 @@ The style of each point can be controlled with the following properties:
| `pointHitRadius` | The pixel size of the non-displayed point that reacts to mouse events.
| `pointRadius` | The radius of the point shape. If set to 0, the point is not rendered.
| `pointRotation` | The rotation of the point in degrees.
-| `pointStyle` | Style of the point. [more...](../configuration/elements#point-styles)
+| `pointStyle` | Style of the point. [more...](../configuration/elements.md#point-styles)
All these values, if `undefined`, fallback first to the dataset options then to the associated [`elements.point.*`](../configuration/elements.md#point-configuration) options.
| 1 |
diff --git a/src/common/blockchain/interface-blockchain/transactions/protocol/Transactions-Download-Manager.js b/src/common/blockchain/interface-blockchain/transactions/protocol/Transactions-Download-Manager.js @@ -375,7 +375,7 @@ class TransactionsDownloadManager{
for (let txId in this._transactionsQueue)
for( let i =0; i<this._transactionsQueue[txId].socket.length; i++){
- if ( this._transactionsQueue[txId].socket[i] === socket )
+ if ( this._transactionsQueue[txId].socket[i].node.sckAddress.uuid === socket.node.sckAddress.uuid )
this._transactionsQueue[txId].socket.splice(i,1);
if( this._transactionsQueue[txId].socket.length === 0 )
@@ -405,7 +405,8 @@ class TransactionsDownloadManager{
for ( let txId in this._transactionsQueue )
for( let i =0; i<this._transactionsQueue[txId].socket.length; i++)
if ( this._transactionsQueue[txId].socket[i].node.sckAddress.uuid === socket.node.sckAddress.uuid ){
- this._transactionsQueue[txId].socket[i] = socket;
+ this._transactionsQueue[txId].socket[i].splice(i,1);
+ this._transactionsQueue[txId].push(socket);
found = true;
}
| 14 |
diff --git a/extension/options.css b/extension/options.css @@ -551,6 +551,7 @@ input:checked + label, button, .button, .button:visited, .dark .button:visited,
#options .category > h2 {
font-size: 1.5em;
font-weight: 100;
+ margin-top: 2em;
margin-bottom: 1em;
padding-bottom: 0.5em;
@@ -560,12 +561,24 @@ input:checked + label, button, .button, .button:visited, .dark .button:visited,
border-image-slice: 1;
}
+#options .subcat.frame {
+ border: 1px solid #ccc;
+ margin-top: 1.5em;
+ margin-bottom: 1em;
+}
+
+.dark #options .subcat.frame {
+ border-color: #777;
+}
+
#options .subcat > h3 {
- font-size: 1.2em;
+ font-size: 1.3em;
font-weight: 100;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
+ text-align: center;
+
+ margin-top: 1em;
+ margin-bottom: 1.3em;
}
@media (max-width:700px) {
| 7 |
diff --git a/services/integration-content-repository/app/api/swagger/swagger.json b/services/integration-content-repository/app/api/swagger/swagger.json "type": "object",
"properties": {
"data": { "$ref": "#/components/schemas/Flow" },
- "meta": { "$ref": "#/components/schemas/Meta" }
+ "meta": {
+ "type": "object"
+ }
}
}
}
| 1 |
diff --git a/edit.js b/edit.js @@ -2475,10 +2475,11 @@ document.getElementById('inventory-drop-zone').addEventListener('drop', async e
jsonItem.getAsString(resolve);
});
const j = JSON.parse(s);
- let {name, dataHash, id, iconHash} = j;
+ let {name, dataHash, id, iconHash, contractAddress} = j;
if (!dataHash) {
const p = pe.children.find(p => p.id === id);
dataHash = await p.getHash();
+ contractAddress = p.contractAddress;
}
const inventory = loginManager.getInventory();
@@ -2486,6 +2487,7 @@ document.getElementById('inventory-drop-zone').addEventListener('drop', async e
name,
hash: dataHash,
iconHash,
+ contractAddress,
});
await loginManager.setInventory(inventory);
}
@@ -2532,6 +2534,7 @@ window.addEventListener('avatarchange', e => {
name: p.name,
dataHash: p.hash,
iconHash: null,
+ contractAddress: null,
});
});
(async () => {
@@ -2573,13 +2576,14 @@ const _changeInventory = inventory => {
const is = inventorySubtabContent.querySelectorAll('.item');
is.forEach((itemEl, i) => {
const item = inventory[i];
- const {name, hash, iconHash} = item;
+ const {name, hash, iconHash, contractAddress} = item;
itemEl.addEventListener('dragstart', e => {
_startPackageDrag(e, {
name,
dataHash: hash,
iconHash,
+ contractAddress,
});
});
@@ -2629,9 +2633,12 @@ const _makePackageHtml = p => `
</div>
</div>
`;
-const _addPackageFromHash = async (hash, matrix) => {
- const p = await XRPackage.download(hash);
- p.hash = hash;
+const _addPackageFromHash = async (dataHash, contractAddress, matrix) => {
+ if (!contractAddress) {
+ debugger;
+ }
+ const p = await XRPackage.download(dataHash);
+ p.contractAddress = contractAddress;
if (matrix) {
p.setMatrix(matrix);
}
@@ -2648,14 +2655,14 @@ const _startPackageDrag = (e, j) => {
});
};
const _bindPackage = (pE, pJ) => {
- const {name, dataHash} = pJ;
+ const {name, dataHash, contractAddress} = pJ;
const iconHash = pJ.icons.find(i => i.type === 'image/gif').hash;
pE.addEventListener('dragstart', e => {
- _startPackageDrag(e, {name, dataHash, iconHash});
+ _startPackageDrag(e, {name, dataHash, iconHash, contractAddress});
});
const addButton = pE.querySelector('.add-button');
addButton.addEventListener('click', () => {
- _addPackageFromHash(dataHash);
+ _addPackageFromHash(dataHash, contractAddress);
});
const wearButton = pE.querySelector('.wear-button');
wearButton.addEventListener('click', () => {
@@ -2705,7 +2712,7 @@ pe.domElement.addEventListener('drop', async e => {
jsonItem.getAsString(resolve);
});
const j = JSON.parse(s);
- const {type, dataHash} = j;
+ const {type, dataHash, contractAddress} = j;
if (dataHash) {
_updateRaycasterFromMouseEvent(raycaster, e);
localMatrix.compose(
@@ -2715,7 +2722,7 @@ pe.domElement.addEventListener('drop', async e => {
new THREE.Vector3(1, 1, 1)
)
- await _addPackageFromHash(dataHash, localMatrix);
+ await _addPackageFromHash(dataHash, contractAddress, localMatrix);
}
}
});
@@ -3152,12 +3159,15 @@ const _handleUrl = async u => {
if (q.p) { // package
const metadata = await fetch(packagesEndpoint + '/' + q.p)
.then(res => res.json())
- const {dataHash} = metadata;
+ const {dataHash, contractAddress} = metadata;
const arrayBuffer = await fetch(`${apiHost}/${dataHash}.wbn`)
.then(res => res.arrayBuffer());
const p = new XRPackage(new Uint8Array(arrayBuffer));
+ if (contractAddress) {
+ p.contractAddress = contractAddress;
+ }
await p.waitForLoad();
await pe.add(p);
} else if (q.i) { // index
| 0 |
diff --git a/src/components/dashboard/Receive.js b/src/components/dashboard/Receive.js @@ -27,9 +27,12 @@ const Receive = ({ screenProps, styles }: ReceiveProps) => {
const amount = 0
const reason = ''
const codeObj = useMemo(() => generateCode(account, networkId, amount, reason), [account, networkId, amount, reason])
- const share = useMemo(() => generateReceiveShareObject(codeObj, amount, '', profile.fullName), [codeObj])
- const shareLink = useMemo(() => share.text + ' ' + share.url)
-
+ const share = useMemo(() => generateReceiveShareObject(codeObj, amount, '', profile.fullName), [
+ codeObj,
+ profile.fullName,
+ amount,
+ ])
+ const shareLink = useMemo(() => share.message + ' ' + share.url, [share])
const shareAction = useCallback(async () => {
try {
fireEvent('RECEIVE_DONE', { type: 'wallet' })
| 0 |
diff --git a/docs/articles/documentation/using-testcafe/using-testcafe-docker-image.md b/docs/articles/documentation/using-testcafe/using-testcafe-docker-image.md @@ -89,7 +89,7 @@ where `$PORT1` and `$PORT2` are vacant container's ports, `$EXTERNAL_HOSTNAME` i
If you are testing a heavy website, you may need to allocate extra resources for the Docker image.
-The most common case is when the temporary file storage `/dev/shm` runs out of free space. It usually happens when you run tests in Chromium. The following example shows how to allow additional space (1GB) for this storage using the `--shm-size` option.
+The most common case is when the temporary file storage `/dev/shm` runs out of free space. The following example shows how to allow additional space (1GB) for this storage using the `--shm-size` option.
```sh
docker run --shm-size=1g -v ${TEST_FOLDER}:/tests -it testcafe/testcafe ${TESTCAFE_ARGS}
| 2 |
diff --git a/src/modules/DataLabels.js b/src/modules/DataLabels.js @@ -338,7 +338,7 @@ class DataLabels {
for (let i = 0; i < elDataLabelsNodes.length; i++) {
if (elSeries) {
- elSeries.insertAdjacentElement('beforeEnd', elDataLabelsNodes[i])
+ elSeries.insertBefore(elDataLabelsNodes[i], elSeries.nextSibling)
}
}
}
| 14 |
diff --git a/packages/openneuro-app/src/scripts/utils/bids.js b/packages/openneuro-app/src/scripts/utils/bids.js @@ -156,7 +156,7 @@ export default {
let snapshotQuery = options.snapshot
? (await datalad.getSnapshot(projectId, options)).data
: null
- let snapshot = snapshotQuery ? snapshotQuery.dataset : null
+ let snapshot = snapshotQuery ? snapshotQuery.snapshot : null
let draftFiles = draft && draft.files ? draft.files : []
let snapshotFiles = snapshot ? snapshot.files : []
let tempFiles = !snapshot
| 1 |
diff --git a/packages/rekit-core/core/vio.js b/packages/rekit-core/core/vio.js @@ -253,8 +253,9 @@ function ls(folder) {
return _.union(diskFiles, memoFiles);
}
-function del(filePath) {
- toDel[filePath] = true;
+function del(filePath, noWarning) {
+ toDel[filePath] = noWarning ? 'no-warning' : true;
+ delete toSave[filePath];
}
function reset() {
@@ -305,7 +306,7 @@ function flush() {
Object.keys(toDel).forEach(filePath => {
const absFilePath = paths.map(filePath);
if (!fs.existsSync(absFilePath)) {
- log('Warning: no file to delete: ', 'yellow', filePath);
+ if (toDel[filePath] !== 'no-warning') log('Warning: no file to delete: ', 'yellow', filePath);
res.push({
type: 'del-file-warning',
warning: 'no-file',
| 11 |
diff --git a/README.md b/README.md @@ -5,7 +5,7 @@ Physically-Based Rendering in glTF 2.0 using WebGL
This is a raw WebGL demo application for the introduction of physically-based materials to the core glTF 2.0 spec. This project is meant to be a barebones reference for developers looking to explore the widespread and robust capabilities of these materials within a WebGL project that isn't tied to any external graphics libraries. For a DirectX sample please head over to [this repo](https://github.com/Microsoft/glTF-DXViewer) instead.
-If you would like to see this in action, [view the live demo](http://github.khronos.org/glTF-WebGL-PBR/).
+If you would like to see this in action, [view the live demo](http://gltf.ux3d.io/).
> **Controls**
>
| 3 |
diff --git a/app/public/javascripts/utils/filter.js b/app/public/javascripts/utils/filter.js let found = false;
let cardsTimer;
+ let title = getTitle();
+ if(title === 'Cameras'){
+ title = window.i18next.t('views.cameras.title');
+ } else if(title === 'Notifications'){
+ title = window.i18next.t('views.notifications.title');
+ } else if(title === 'Recordings'){
+ title = window.i18next.t('views.recordings.title');
+ }
+
let sections = $('[data-filterable="yes"]');
function jsUcfirst(string) {
});
- if(!checked)
+ if(!checked){
+ breadTitle = window.i18next.t('breadcrumb.all') + ' ' + title;
$('.filterBtn:checkbox[value=all]').prop('checked', true).change();
+ }
}
+
} else {
+
if (this.checked) {
- let title = getTitle();
- if(title === 'Cameras'){
- title = window.i18next.t('views.cameras.title');
- } else if(title === 'Notifications'){
- title = window.i18next.t('views.notifications.title');
- } else if(title === 'Recordings'){
- title = window.i18next.t('views.recordings.title');
- }
- breadTitle = title = window.i18next.t('breadcrumb.all') + ' ' + title;
+ breadTitle = window.i18next.t('breadcrumb.all') + ' ' + title;
+
setTimeout(() => {
if(mainTitle === 'Recordings')
}
}, 500);
+
}
+
}
$('#breadTitle').text(breadTitle);
+
});
if(cardsTimer)
| 1 |
diff --git a/packages/node_modules/@node-red/editor-client/src/types/node-red/func.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node-red/func.d.ts @@ -27,7 +27,7 @@ interface NodeStatus {
/** The shape property can be: ring or dot */
shape?: string,
/** The text to display */
- text?: string
+ text?: string|boolean|number
}
declare class node {
@@ -35,48 +35,33 @@ declare class node {
* Send 1 or more messages asynchronously
* @param {object | object[]} msg The msg object
* @param {Boolean} [clone=true] Flag to indicate the `msg` should be cloned. Default = `true`
- * @example Send 1 msg to output 1
- * ```javascript
- * node.send({ payload: "a" });
- * ```
- * @example Send 2 msg to 2 outputs
- * ```javascript
- * node.send([{ payload: "output1" }, { payload: "output2" }]);
- * ```
- * @example Send 3 msg to output 1
- * ```javascript
- * node.send([[{ payload: 1 }, { payload: 2 }, { payload: 3 }]]);
- * ```
* @see node-red documentation [writing-functions: sending messages asynchronously](https://nodered.org/docs/user-guide/writing-functions#sending-messages-asynchronously)
*/
- static send(msg:object, clone?:Boolean);
+ static send(msg:object|object[], clone?:Boolean): void;
/** Inform runtime this instance has completed its operation */
static done();
/** Send an error to the console and debug side bar. Include `msg` in the 2nd parameter to trigger the catch node. */
static error(err:string|Error, msg?:object);
/** Log a warn message to the console and debug sidebar */
- static warn(warning:string|Object);
+ static warn(warning:string|object);
/** Log an info message to the console (not sent to sidebar)' */
- static log(info:string|Object);
- /** Set the status icon and text underneath the node.
+ static log(info:string|object);
+ /** Sets the status icon and text underneath the node.
* @param {NodeStatus} status - The status object `{fill, shape, text}`
- * @example clear node status
- * ```javascript
- * node.status({});
- * ```
- * @example set node status to red ring with text
- * ```javascript
- * node.status({fill:"red",shape:"ring",text:"error"})
- * ```
* @see node-red documentation [writing-functions: adding-status](https://nodered.org/docs/user-guide/writing-functions#adding-status)
*/
static status(status:NodeStatus);
+ /** Sets the status text underneath the node.
+ * @param {string} status - The status to display
+ * @see node-red documentation [writing-functions: adding-status](https://nodered.org/docs/user-guide/writing-functions#adding-status)
+ */
+ static status(status:string|boolean|number);
/** the id of this node */
public readonly id:string;
/** the name of this node */
public readonly name:string;
/** the number of outputs of this node */
- public readonly outputCount:Number;
+ public readonly outputCount:number;
}
declare class context {
/** Get a value from context */
| 1 |
diff --git a/spec/models/carto/helpers/billing_cycle_spec.rb b/spec/models/carto/helpers/billing_cycle_spec.rb require_relative '../../../../app/models/carto/helpers/billing_cycle'
require 'ostruct'
-require 'timecop'
+require 'delorean'
describe Carto::BillingCycle do
describe :last_billing_cycle do
@@ -32,7 +32,7 @@ describe Carto::BillingCycle do
# See commit 83850567
# Maybe better to throw an error if that happens?
@user.period_end_date = nil
- Timecop.freeze(Date.parse(today)) do
+ Delorean.time_travel_to(today) do
@user.last_billing_cycle.should eq Date.parse(expected)
end
end
@@ -51,7 +51,7 @@ describe Carto::BillingCycle do
it "returns the current month if period_end_date.day <= today.day" \
" (today = #{today}, period_end_date = #{period_end_date}, expected = #{expected})" do
@user.period_end_date = Date.parse(period_end_date)
- Timecop.freeze(Date.parse(today)) do
+ Delorean.time_travel_to(today) do
@user.last_billing_cycle.should eq Date.parse(expected)
end
end
@@ -70,7 +70,7 @@ describe Carto::BillingCycle do
it "returns the previous month if period_end_date.day > today.day" \
" (today = #{today}, period_end_date = #{period_end_date}, expected = #{expected})" do
@user.period_end_date = Date.parse(period_end_date)
- Timecop.freeze(Date.parse(today)) do
+ Delorean.time_travel_to(today) do
@user.last_billing_cycle.should eq Date.parse(expected)
end
end
@@ -88,7 +88,7 @@ describe Carto::BillingCycle do
it "returns the previous valid day when dealing with 28, 29 or 30-day month corner cases" \
" (today = #{today}, period_end_date = #{period_end_date}, expected = #{expected})" do
@user.period_end_date = Date.parse(period_end_date)
- Timecop.freeze(Date.parse(today)) do
+ Delorean.time_travel_to(today) do
@user.last_billing_cycle.should eq Date.parse(expected)
end
end
| 14 |
diff --git a/token-metadata/0x6c5bA91642F10282b576d91922Ae6448C9d52f4E/metadata.json b/token-metadata/0x6c5bA91642F10282b576d91922Ae6448C9d52f4E/metadata.json "symbol": "PHA",
"address": "0x6c5bA91642F10282b576d91922Ae6448C9d52f4E",
"decimals": 18,
- "dharmaVerificationStatus": "UNVERIFIED"
+ "dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
| 3 |
diff --git a/core/server/api/canary/mail.js b/core/server/api/canary/mail.js const Promise = require('bluebird');
-const i18n = require('../../../shared/i18n');
+const tpl = require('@tryghost/tpl');
const mailService = require('../../services/mail');
const api = require('./');
let mailer;
let _private = {};
+const messages = {
+ unableToSendEmail: 'Ghost is currently unable to send email.',
+ seeLinkForInstructions: 'See {link} for instructions.',
+ testGhostEmail: 'Test Ghost Email'
+};
+
_private.sendMail = (object) => {
if (!(mailer instanceof mailService.GhostMailer)) {
mailer = new mailService.GhostMailer();
@@ -17,8 +23,8 @@ _private.sendMail = (object) => {
notifications: [{
type: 'warn',
message: [
- i18n.t('warnings.index.unableToSendEmail'),
- i18n.t('common.seeLinkForInstructions', {link: 'https://ghost.org/docs/concepts/config/#mail'})
+ tpl(messages.unableToSendEmail),
+ tpl(messages.seeLinkForInstructions, {link: 'https://ghost.org/docs/concepts/config/#mail'})
].join(' ')
}]
},
@@ -47,7 +53,7 @@ module.exports = {
mail: [{
message: {
to: frame.user.get('email'),
- subject: i18n.t('common.api.mail.testGhostEmail'),
+ subject: tpl(messages.testGhostEmail),
html: content.html,
text: content.text
}
| 14 |
diff --git a/extensions/dbgobject/arrays/arrays.js b/extensions/dbgobject/arrays/arrays.js @@ -22,7 +22,7 @@ Loader.OnLoad(function() {
ArrayField.prototype.ensureCompatibleResult = function(result, parentDbgObject) {
if (!Array.isArray(result)) {
- throw new Error("The \"" + this.name + "\" array on " + parentDbgObject.type.name() + " did not return an array.");
+ throw new Error("The \"" + this.name + "\" array on " + parentDbgObject.type.htmlName() + " did not return an array.");
}
var that = this;
@@ -36,7 +36,7 @@ Loader.OnLoad(function() {
.then(function (areAllTypes) {
var incorrectIndex = areAllTypes.indexOf(false);
if (incorrectIndex != -1) {
- throw new Error("The \"" + that.name + "\" array on " + parentDbgObject.type.name() + " was supposed to return an array of " + resultType + " but there was an unrelated " + result[incorrectIndex].type.name() + ".")
+ throw new Error("The \"" + that.name + "\" array on " + parentDbgObject.type.htmlName() + " was supposed to return an array of " + resultType + " but there was an unrelated " + result[incorrectIndex].type.htmlName() + ".")
}
return result;
@@ -95,7 +95,7 @@ Loader.OnLoad(function() {
return registeredArrayTypes.getExtensionIncludingBaseTypes(this, name)
.then(function (result) {
if (result == null) {
- throw new Error("There was no array \"" + name + "\" on " + that.type.name());
+ throw new Error("There was no array \"" + name + "\" on " + that.type.htmlName());
}
return Promise.resolve(result.extension.getter(result.dbgObject))
.then(function (resultArray) {
| 4 |
diff --git a/tmp/test2.py b/tmp/test2.py @@ -12,26 +12,34 @@ while True:
m = common.parse(i)
for ship in m.ships[tag]:
+ assigned = False
+
if ship.docked == "docked":
planet = m.planets[ship.planet]
+ # Undock ships from unproductive planets
+ if planet.remaining == 0:
+ common.send_string("u {ship}".format(ship=ship.id))
+ assigned = True
if ship.docked != "undocked":
continue
- assigned = False
-
for planet in sorted(m.planets.values(), key=common.distance(ship)):
- if planet.owned and planet.owner == tag and not planet.docked_ships:
- pass
+ angle, d = common.orient_towards(ship, planet)
- if not planet.owned:
+ if d < planet.r + 2:
+ if (not planet.owned or
+ (planet.owned and planet.owner == tag and not planet.docked_ships)):
+ # Prevent later ships from going towards this one
planet.owned = True
+ planet.docked_ships.append(ship.id)
- angle, d = common.orient_towards(ship, planet)
- if d < planet.r + 2:
common.send_string("d {ship} {planet}".format(ship=ship.id, planet=planet.id))
assigned = True
break
+
+ if not planet.owned:
+ planet.owned = True
common.move_to(ship, angle, 2)
assigned = True
break
| 7 |
diff --git a/src/plugins/DragDrop/index.js b/src/plugins/DragDrop/index.js @@ -125,6 +125,7 @@ module.exports = class DragDrop extends Plugin {
</svg>
<label class="uppy-DragDrop-label">
<input style={hiddenInputStyle}
+ class="uppy-DragDrop-input"
type="file"
name="files[]"
multiple={restrictions.maxNumberOfFiles !== 1 || !restrictions.maxNumberOfFiles}
| 0 |
diff --git a/commands/etherscan.js b/commands/etherscan.js @@ -3,7 +3,7 @@ const sleep = require('util').promisify(setTimeout);
let retries = 0;
module.exports = {
- getTransactionStatus: async ({ txid }) => {
+ getTransactionStatus: async txid => {
const { getNetwork } = require('../helpers');
const currentNetwork = getNetwork().networkName;
const etherscanApi = require('etherscan-api').init(
@@ -15,7 +15,7 @@ module.exports = {
const txReceipt = await etherscanApi.proxy.eth_getTransactionReceipt(txid);
return { txStatus, txReceipt };
},
- waitForTxSuccess: async ({ txid }) => {
+ waitForTxSuccess: async txid => {
const txStatus = await module.exports.getTransactionStatus(txid);
if (
// status success
| 1 |
diff --git a/assets/scripts/lobby/chat4.js b/assets/scripts/lobby/chat4.js @@ -317,7 +317,7 @@ function addToRoomChat(data) {
if (roomChatHistory.filter(d => (['server-text-teal', 'server-text'].includes(d.classStr) && // either msg from server
s.slice(8).trim() === d.message.trim()) ||
(d.username === username && // or was said by that user
- d.dateStr === dateStr &&
+ d.dateStr.slice(4,6) === dateStr.slice(4,6) && // only check that the minutes are correct (to ignore timezone)
d.message.startsWith(text.trim()))
).length > 0)
{
| 8 |
diff --git a/protocols/peer/contracts/Peer.sol b/protocols/peer/contracts/Peer.sol @@ -180,7 +180,7 @@ contract Peer is IPeer, Ownable {
.mul(10 ** rule.priceExp).div(rule.priceCoef);
// Ensure the takerParam does not exceed maximum and is greater than zero.
- if(takerParam <= rule.maxTakerAmount && takerParam > 0) {
+ if(takerParam <= rule.maxTakerAmount) {
return takerParam;
}
}
| 2 |
diff --git a/packages/@uppy/react/src/propTypes.js b/packages/@uppy/react/src/propTypes.js @@ -19,7 +19,10 @@ const metaField = PropTypes.shape({
name: PropTypes.string.isRequired,
placeholder: PropTypes.string,
})
-const metaFields = PropTypes.arrayOf(metaField)
+const metaFields = PropTypes.oneOfType([
+ PropTypes.arrayOf(metaField),
+ PropTypes.func,
+])
// A size in pixels (number) or with some other unit (string).
const cssSize = PropTypes.oneOfType([
| 0 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.