code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/src/components/fx/hover.js b/src/components/fx/hover.js @@ -268,7 +268,7 @@ function _hover(gd, evt, subplot, noHoverEvent) {
// mapped onto each of the currently selected overlaid subplots
var xvalArray, yvalArray;
- var itemnum, curvenum, cd, trace, subplotId, subploti, mode,
+ var itemnum, curvenum, cd, trace, subplotId, subploti, _mode,
xval, yval, pointData, closedataPreviousLength;
// spikePoints: the set of candidate points we've found to draw spikes to
@@ -403,9 +403,9 @@ function _hover(gd, evt, subplot, noHoverEvent) {
}
// within one trace mode can sometimes be overridden
- mode = hovermode;
- if(helpers.isUnifiedHover(mode)) {
- mode = mode.charAt(0);
+ _mode = hovermode;
+ if(helpers.isUnifiedHover(_mode)) {
+ _mode = _mode.charAt(0);
}
// container for new point, also used to pass info into module.hoverPoints
@@ -463,20 +463,20 @@ function _hover(gd, evt, subplot, noHoverEvent) {
// for a highlighting array, figure out what
// we're searching for with this element
- if(mode === 'array') {
+ if(_mode === 'array') {
var selection = evt[curvenum];
if('pointNumber' in selection) {
pointData.index = selection.pointNumber;
- mode = 'closest';
+ _mode = 'closest';
} else {
- mode = '';
+ _mode = '';
if('xval' in selection) {
xval = selection.xval;
- mode = 'x';
+ _mode = 'x';
}
if('yval' in selection) {
yval = selection.yval;
- mode = mode ? 'closest' : 'y';
+ _mode = _mode ? 'closest' : 'y';
}
}
} else if(customXVal !== undefined && customYVal !== undefined) {
@@ -490,7 +490,7 @@ function _hover(gd, evt, subplot, noHoverEvent) {
// Now if there is range to look in, find the points to hover.
if(hoverdistance !== 0) {
if(trace._module && trace._module.hoverPoints) {
- var newPoints = trace._module.hoverPoints(pointData, xval, yval, mode, {
+ var newPoints = trace._module.hoverPoints(pointData, xval, yval, _mode, {
hoverLayer: fullLayout._hoverlayer
});
@@ -650,7 +650,7 @@ function _hover(gd, evt, subplot, noHoverEvent) {
// If in compare mode, select every point at position
if(
- helpers.isXYhover(mode) &&
+ helpers.isXYhover(_mode) &&
hoverData[0].length !== 0 &&
hoverData[0].trace.type !== 'splom' // TODO: add support for splom
) {
| 10 |
diff --git a/src/popup.js b/src/popup.js @@ -75,6 +75,14 @@ app.view = function(vnode) {
}, [
m("i.fa.fa-check[aria-hidden='true']"),
"Mark all as read"
+ ]),
+ m("button.ciTrigger.btn.btn-info", {
+ onclick: () => {
+ window.open("trigger.html");
+ }
+ }, [
+ m("i.fa.fa-send[aria-hidden='true']"),
+ " ci trigger"
])
]),
]),
| 0 |
diff --git a/bin/openapi.js b/bin/openapi.js @@ -385,7 +385,9 @@ function deserialize(errors, prefix, schema, value) {
let result;
switch (type) {
case 'array':
- if (Array.isArray(value)) return value.map((v,i) => deserialize(errors, prefix + '/' + i, schema.items, v));
+ if (Array.isArray(value)) return schema.items
+ ? value.map((v,i) => deserialize(errors, prefix + '/' + i, schema.items, v))
+ : value;
errors.push(prefix + ' Expected an array. Received: ' + value);
break;
| 9 |
diff --git a/lib/cartodb/models/dataview/date-histogram.js b/lib/cartodb/models/dataview/date-histogram.js @@ -168,7 +168,7 @@ const DATE_AGGREGATIONS = {
}
}
*/
-module.exports = class Histogram extends BaseDataview {
+module.exports = class DateHistogram extends BaseDataview {
constructor (query, options, queries) {
super();
| 10 |
diff --git a/src/web/InputWaiter.mjs b/src/web/InputWaiter.mjs /**
* @author n1474335 [[email protected]]
* @author j433866 [[email protected]]
- * @copyright Crown Copyright 2019
+ * @copyright Crown Copyright 2016
* @license Apache-2.0
*/
@@ -103,8 +103,6 @@ class InputWaiter {
data: log.getLevel()
});
this.inputWorker.addEventListener("message", this.handleInputWorkerMessage.bind(this));
-
-
}
/**
@@ -238,7 +236,7 @@ class InputWaiter {
const r = e.data;
if (!r.hasOwnProperty("action")) {
- log.error("No action");
+ log.error("A message was received from the InputWorker with no action property. Ignoring message.");
return;
}
@@ -497,24 +495,16 @@ class InputWaiter {
input: recipeStr
});
- if (typeof value === "string") {
+ // Value is either a string set by the input or an ArrayBuffer from a LoaderWorker,
+ // so is safe to use typeof === "string"
+ const transferable = (typeof value !== "string") ? [value] : undefined;
this.inputWorker.postMessage({
action: "updateInputValue",
data: {
inputNum: inputNum,
value: value
}
- });
- } else {
- // ArrayBuffer is transferable
- this.inputWorker.postMessage({
- action: "updateInputValue",
- data: {
- inputNum: inputNum,
- value: value
- }
- }, [value]);
- }
+ }, transferable);
}
/**
@@ -525,23 +515,14 @@ class InputWaiter {
* @param {object} inputData - The new data object
*/
updateInputObj(inputNum, inputData) {
- if (typeof inputData === "string") {
+ const transferable = (typeof inputData !== "string") ? [inputData.fileBuffer] : undefined;
this.inputWorker.postMessage({
action: "updateInputObj",
data: {
inputNum: inputNum,
data: inputData
}
- });
- } else {
- this.inputWorker.postMessage({
- action: "updateInputObj",
- data: {
- inputNum: inputNum,
- data: inputData
- }
- }, [inputData.fileBuffer]);
- }
+ }, transferable);
}
/**
@@ -893,17 +874,17 @@ class InputWaiter {
width = width < 2 ? 2 : width;
const totalStr = total.toLocaleString().padStart(width, " ").replace(/ /g, " ");
- let msg = "Total: " + totalStr;
+ let msg = "total: " + totalStr;
const loadedStr = loaded.toLocaleString().padStart(width, " ").replace(/ /g, " ");
- msg += "<br>Loaded: " + loadedStr;
+ msg += "<br>loaded: " + loadedStr;
if (pending > 0) {
const pendingStr = pending.toLocaleString().padStart(width, " ").replace(/ /g, " ");
- msg += "<br>Pending: " + pendingStr;
+ msg += "<br>pending: " + pendingStr;
} else if (loading > 0) {
const loadingStr = loading.toLocaleString().padStart(width, " ").replace(/ /g, " ");
- msg += "<br>Loading: " + loadingStr;
+ msg += "<br>loading: " + loadingStr;
}
document.getElementById("input-files-info").innerHTML = msg;
@@ -1272,8 +1253,6 @@ class InputWaiter {
if (!this.getTabItem(inputNum) && numTabs < this.maxTabs) {
const newTab = this.createTabElement(inputNum, false);
-
-
tabsWrapper.appendChild(newTab);
if (numTabs > 0) {
| 7 |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -35,8 +35,8 @@ In addition to contributing core CesiumJS code, we appreciate many types of cont
For ideas for CesiumJS code contributions, see:
-* issues labeled [beginner](https://github.com/AnalyticalGraphicsInc/cesium/labels/beginner) and
-* issues labeled [roadmap](https://github.com/AnalyticalGraphicsInc/cesium/labels/roadmap).
+* issues labeled [`good first issue`](https://github.com/AnalyticalGraphicsInc/cesium/labels/good%20first%20issue) and
+* issues labeled [`roadmap`](https://github.com/AnalyticalGraphicsInc/cesium/labels/roadmap).
See the [Build Guide](Documentation/Contributors/BuildGuide/README.md) for how to build and run Cesium on your system.
| 3 |
diff --git a/RedactedScreenshots.user.js b/RedactedScreenshots.user.js // @description Masks and hides user-identifing info
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 1.8
+// @version 1.8.1
//
// @include https://*stackoverflow.com/*
// @include https://*serverfault.com/*
// Remove/Reset other SOMU items
$('body').removeClass('usersidebar-open');
$('.old-comment, .cmmt-rude, .cmmt-chatty').removeClass('old-comment cmmt-rude cmmt-chatty');
- $('#usersidebar, #qtoc, .meta-mentioned, .post-stickyheader, .dissociate-post-link, .post-id').remove();
+ $('#usersidebar, #qtoc, .meta-mentioned, .post-stickyheader, .dissociate-post-link, .post-id, .js-better-inline-menu, .print-comment-buttons').remove();
// Remove other userscript items
$('#roombaTableDiv').remove();
$('.my-profile, .user-gravatar32, .user-info .-flair').remove();
// Remove admin stuff from page
- $('.js-post-issues, .js-mod-inbox-button, .flag-count-item, .delete-comment').remove();
+ $('.js-post-issue, .js-post-issues, .js-mod-inbox-button, .flag-count-item, .delete-comment, .js-post-flag-bar').remove();
// Redact IP and email addresses in content div
const content = $('#content');
| 2 |
diff --git a/js/core/bis_bidsutils.js b/js/core/bis_bidsutils.js 'use strict';
const bis_genericio = require('bis_genericio');
-const bis_util = require('bis_util');
const colors=bis_genericio.getcolorsmodule();
const fs = bis_genericio.getfsmodule();
@@ -19,7 +18,7 @@ const dicomParametersFilename = 'dicom_job_info.json';
const sourceDirectoryName = 'sourcedata';
const DEBUG=false;
-function timeout(ms) { return bis_util.sleep(ms); }
+//function timeout(ms) { return bis_util.sleep(ms); }
// DICOM2BIDS
/**
@@ -37,7 +36,6 @@ let dicom2BIDS = async function (opts) {
try {
let errorfn = ((msg) => {
- timeout(100);
console.log('---- ERROR');
console.log('---- dicom2BIDS Error=', msg);
return msg;
@@ -78,7 +76,6 @@ let dicom2BIDS = async function (opts) {
let dirnames = await makeBIDSDirectories(outputdirectory, subjectdirectory, errorfn);
dirnames.outputdirectory = outputdirectory, dirnames.subjectdirectory = subjectdirectory;
- timeout(500);
if (DEBUG)
console.log('++++ BIDS',dirnames.outputdirectory,dirnames.subjectdirectory,'\n\n\n------------------------');
@@ -91,10 +88,7 @@ let dicom2BIDS = async function (opts) {
let dicomobj = makeDicomJobsFile(imageFilenames, supportingFilenames, jobFileSettings);
-
- await timeout(2000);
await Promise.all(moveFilesPromiseArray);
- await timeout(200);
if (calcHash) {
let checksums=await calculateChecksums(imageFilenames);
for (let val of checksums) {
@@ -385,7 +379,6 @@ let generateMoveFilesArrays = (imagefiles, supportingfiles, dirs) => {
}
- timeout(100);
let formattedBasename = makeBIDSFilename(basename, dirbasename, dirs.subjectdirectory);
let target = bis_genericio.joinFilenames(dirname, formattedBasename);
@@ -407,11 +400,9 @@ let generateMoveFilesArrays = (imagefiles, supportingfiles, dirs) => {
function makeBIDSFilename(filename, directory, subjectdirectory) {
- timeout(200);
let splitsubdirectory = subjectdirectory.split(SEPARATOR);
if (DEBUG) {
console.log('\n\n split=',splitsubdirectory);
- timeout(1000);
}
let fileExtension = filename.split('.');
| 2 |
diff --git a/weapons-manager.js b/weapons-manager.js @@ -853,7 +853,7 @@ const itemSpecs1 = [
name: 'Geometry',
icon: 'fa-dice-d10',
detailsHtml: `\
- <video class=video src="./assets/darkbooth.webm"></video>
+ <img class=video src="./assets/screenshot.png">
<div class=wrap>
<b>Geometry</b> lets you build walls, floors, and structures.
</div>
@@ -888,7 +888,7 @@ const itemSpecs1 = [
name: 'Model',
icon: 'fa-alien-monster',
detailsHtml: `\
- <video class=video src="./assets/darkbooth.webm"></video>
+ <img class=video src="./assets/screenshot.png">
<div class=wrap>
<b>Model</b> lets you place a 3D model in GLTF format.
</div>
@@ -901,7 +901,7 @@ const itemSpecs1 = [
name: 'Avatar',
icon: 'fa-user-ninja',
detailsHtml: `\
- <video class=video src="./assets/darkbooth.webm"></video>
+ <img class=video src="./assets/screenshot.png">
<div class=wrap>
<b>Avatar</b> lets you place an avatar model in VRM format.
</div>
@@ -914,7 +914,7 @@ const itemSpecs1 = [
name: 'Image',
icon: 'fa-image',
detailsHtml: `\
- <video class=video src="./assets/darkbooth.webm"></video>
+ <img class=video src="./assets/screenshot.png">
<div class=wrap>
<b>Image</b> lets you place a simple image billboard.
</div>
@@ -927,7 +927,7 @@ const itemSpecs1 = [
name: 'Audio',
icon: 'fa-headphones',
detailsHtml: `\
- <video class=video src="./assets/darkbooth.webm"></video>
+ <img class=video src="./assets/screenshot.png">
<div class=wrap>
<b>Audio</b> lets you place spatial audio.
</div>
@@ -940,7 +940,7 @@ const itemSpecs1 = [
name: 'Voxel',
icon: 'fa-cube',
detailsHtml: `\
- <video class=video src="./assets/darkbooth.webm"></video>
+ <img class=video src="./assets/screenshot.png">
<div class=wrap>
<b>Voxel</b> lets you place a voxel model in VOX format.
</div>
@@ -953,7 +953,7 @@ const itemSpecs1 = [
name: 'Link',
icon: 'fa-portal-enter',
detailsHtml: `\
- <video class=video src="./assets/darkbooth.webm"></video>
+ <img class=video src="./assets/screenshot.png">
<div class=wrap>
<b>Link</b> lets you create a web link portal.
</div>
@@ -966,7 +966,7 @@ const itemSpecs1 = [
name: 'Web Frame',
icon: 'fa-browser',
detailsHtml: `\
- <video class=video src="./assets/darkbooth.webm"></video>
+ <img class=video src="./assets/screenshot.png">
<div class=wrap>
<b>Web Frame</b> lets you place a web content iframe.
</div>
@@ -979,7 +979,7 @@ const itemSpecs1 = [
name: 'Media Stream',
icon: 'fa-signal-stream',
detailsHtml: `\
- <video class=video src="./assets/darkbooth.webm"></video>
+ <img class=video src="./assets/screenshot.png">
<div class=wrap>
<b>Media Stream</b> lets you build walls, floors, and structures.
</div>
| 4 |
diff --git a/src/XR.js b/src/XR.js @@ -95,7 +95,7 @@ class XRSession extends EventTarget {
this.exclusive = exclusive;
this.outputContext = outputContext;
- this._frame = new XRPresentationFrame(this);
+ this._frame = new XRFrame(this);
this._frameOfReference = new XRFrameOfReference();
this._inputSources = (() => {
const result = Array(2 + maxNumTrackers);
@@ -386,7 +386,7 @@ class XRWebGLLayer {
}
module.exports.XRWebGLLayer = XRWebGLLayer;
-class XRPresentationFrame {
+class XRFrame {
constructor(session) {
this.session = session;
this.views = [
@@ -421,7 +421,7 @@ class XRPresentationFrame {
return inputSource._pose;
}
}
-module.exports.XRPresentationFrame = XRPresentationFrame;
+module.exports.XRFrame = XRFrame;
class XRView {
constructor(eye = 'left') {
| 10 |
diff --git a/userscript.user.js b/userscript.user.js @@ -23709,8 +23709,6 @@ var $$IMU_EXPORT$$;
(domain_nowww === "rightsinfo.org" && string_indexof(src, "/uploads/") >= 0) ||
// http://spotted.tv/app/uploads/20131210-2339481-750x355.jpg
(domain_nowww === "spotted.tv" && string_indexof(src, "/uploads/") >= 0) ||
- // http://img.marieclairekorea.com/2018/03/mck_5a9de416ee7a4-570x381.jpg
- domain === "img.marieclairekorea.com" ||
// http://tokyopopline.com/images/2013/01/130106kara6-515x341.jpg
(domain_nowww === "tokyopopline.com" && string_indexof(src, "/images/") >= 0) ||
// http://px1img.getnews.jp/img/archives/2017/10/ba35fadf68725a24224b306250f20c2f-1024x761.jpg
@@ -84466,6 +84464,15 @@ var $$IMU_EXPORT$$;
if (newsrc) return newsrc;
}
+ if (domain === "img.marieclairekorea.com") {
+ // http://img.marieclairekorea.com/2018/03/mck_5a9de416ee7a4-570x381.jpg
+ // http://img.marieclairekorea.com/2018/03/mck_5a9de416ee7a4.jpg
+ // thanks to rEnr3n on github: https://github.com/qsniyg/maxurl/issues/530
+ // https://img.marieclairekorea.com/2020/11/mck_5fb36322aa3c3-scaled.jpg -- 1920x1516
+ // https://img.marieclairekorea.com/2020/11/mck_5fb36322aa3c3.jpg -- 2244x1772
+ return src.replace(/(\/mck_[0-9a-f]+)-(?:[0-9]+x[0-9]+|scaled)(\.[^/.]+)(?:[?#].*)?$/, "$1$2");
+ }
+
| 7 |
diff --git a/lib/slack/commands/subscribe.js b/lib/slack/commands/subscribe.js @@ -34,7 +34,7 @@ module.exports = async (command, { robot }) => {
return Installation.getForOwner(owner.id);
}
- const [, subcommand, url] = command.args.match(/^((?:un)?subscribe) (.*)$/);
+ const [, subcommand, url] = command.text.match(/^((?:un)?subscribe) (.*)$/);
// Check if user exists, if not invoke signin
let gitHubUser;
| 4 |
diff --git a/CHANGELOG.md b/CHANGELOG.md All notable changes to this project are documented in this file.
-## Head
+## 13.8.0
+- Deprecated: `StylelintStandaloneReturnValue.reportedDisables`, `.descriptionlessDisables`, `.needlessDisables`, and `.invalidScopeDisables`. `.reportedDisables` will always be empty and the other properties will always be undefined, since these errors now show up in `.results` instead ([#4973](https://github.com/stylelint/stylelint/pull/4973)).
- Added: disable comments that are reported as errors for various reasons are now reported as standard lint errors rather than a separate class of errors that must be handled specially ([#4973](https://github.com/stylelint/stylelint/pull/4973)).
-- Added: configured pattern in `*-pattern` rules violation message ([#4975](https://github.com/stylelint/stylelint/pull/4975)).
- Added: `comment-pattern` rule ([#4962](https://github.com/stylelint/stylelint/pull/4962)).
- Added: `selector-attribute-name-disallowed-list` rule ([#4992](https://github.com/stylelint/stylelint/pull/4992)).
- Added: `ignoreAtRules[]` to `property-no-unknown` ([#4965](https://github.com/stylelint/stylelint/pull/4965)).
-- Deprecated: `StylelintStandaloneReturnValue.reportedDisables`, `.descriptionlessDisables`, `.needlessDisables`, and `.invalidScopeDisables`. `.reportedDisables` will always be empty and the other properties will always be undefined, since these errors now show up in `.results` instead ([#4973](https://github.com/stylelint/stylelint/pull/4973)).
- Fixed: `*-notation` false negatives for dollar variables ([#5031](https://github.com/stylelint/stylelint/pull/5031)).
+- Fixed: `*-pattern` missing configured pattern in violation messages ([#4975](https://github.com/stylelint/stylelint/pull/4975)).
## 13.7.2
| 6 |
diff --git a/weapons-manager.js b/weapons-manager.js @@ -424,11 +424,11 @@ const _grab = object => {
const crosshairEl = document.querySelector('.crosshair');
const _updateWeapons = timeDiff => {
const transforms = rigManager.getRigTransforms();
- const _snap = (v, n) => v.set(
+ /* const _snap = (v, n) => v.set(
Math.round(v.x/n)*n,
Math.round(v.y/n)*n,
Math.round(v.z/n)*n,
- );
+ ); */
const _handleHighlight = () => {
if (!editedObject) {
@@ -533,8 +533,8 @@ const _updateWeapons = timeDiff => {
let collision = geometryManager.geometryWorker.raycastPhysics(geometryManager.physics, position, quaternion);
if (collision) {
const {point} = collision;
- _snap(localVector.fromArray(point), 1);
- grabbedObject.position.copy(localVector)
+ // _snap(localVector.fromArray(point), 1);
+ grabbedObject.position.fromArray(point)
.add(localVector2.set(0, 0.01, 0));
/* localEuler.setFromQuaternion(quaternion, 'YXZ');
localEuler.x = 0;
@@ -552,6 +552,7 @@ const _updateWeapons = timeDiff => {
}
if (appManager.grabbedObjectOffsets[0] >= maxGrabDistance || !!collision) {
+ _snapPosition(grabbedObject, weaponsManager.getGridSnap());
grabbedObject.quaternion.setFromEuler(grabbedObject.savedRotation);
moveMesh.position.copy(grabbedObject.position);
@@ -588,8 +589,10 @@ const _updateWeapons = timeDiff => {
}
}
if (!collision) {
- deployMesh.position.copy(position).add(localVector.set(0, 0, -maxDistance).applyQuaternion(quaternion));
+ deployMesh.position.copy(position)
+ .add(localVector.set(0, 0, -maxDistance).applyQuaternion(quaternion));
deployMesh.rotation.setFromQuaternion(quaternion, 'YXZ');
+ _snapPosition(deployMesh, weaponsManager.getGridSnap());
_snapRotation(deployMesh, rotationSnap);
}
@@ -1148,6 +1151,13 @@ const _snapRotation = (o, rotationSnap) => {
o.rotation.y = Math.round(o.rotation.y / rotationSnap) * rotationSnap;
o.rotation.z = Math.round(o.rotation.z / rotationSnap) * rotationSnap;
};
+const _snapPosition = (o, positionSnap) => {
+ if (positionSnap > 0) {
+ o.position.x = Math.round(o.position.x / positionSnap) * positionSnap;
+ o.position.y = Math.round(o.position.y / positionSnap) * positionSnap;
+ o.position.z = Math.round(o.position.z / positionSnap) * positionSnap;
+ }
+};
const keyTabEl = document.getElementById('key-tab');
const keyTab1El = document.getElementById('key-tab-1');
@@ -1487,6 +1497,13 @@ const weaponsManager = {
}
gridSnapEl.innerText = this.gridSnap > 0 ? (this.gridSnap + '') : 'off';
},
+ getGridSnap() {
+ if (this.gridSnap === 0) {
+ return 0;
+ } else {
+ return 4/this.gridSnap;
+ }
+ },
setWorld(newCoord, newHighlightedWorld) {
lastCoord.copy(coord);
coord.copy(newCoord);
| 0 |
diff --git a/app/assets/javascripts/ang/controllers/observation_search.js b/app/assets/javascripts/ang/controllers/observation_search.js @@ -10,12 +10,9 @@ var application = angular.module( "ObservationSearch", [
// Load translations for moment if available
// http://stackoverflow.com/a/22965260
-if (I18n.translations[I18n.locale] &&
- I18n.translations[I18n.locale].momentjs &&
- I18n.translations[I18n.locale].momentjs.shortRelativeTime) {
- moment.locale(I18n.locale, {
- relativeTime: I18n.translations[I18n.locale].momentjs.shortRelativeTime
- })
+var shortRelativeTime = I18n.t( "momentjs" ) ? I18n.t( "momentjs" ).shortRelativeTime : null;
+if ( shortRelativeTime ) {
+ moment.locale( I18n.locale, { relativeTime: shortRelativeTime } );
}
// defining the views
| 1 |
diff --git a/package.json b/package.json ],
"license": "MIT",
"dependencies": {
+ "@types/node": "< 17.0.6",
"bson": "^4.2.2",
"kareem": "2.3.3",
"mongodb": "4.2.2",
"sift": "13.5.2"
},
"devDependencies": {
- "@types/node": "< 17.0.6",
"@babel/core": "7.10.5",
"@babel/preset-env": "7.10.4",
"@typescript-eslint/eslint-plugin": "5.8.0",
| 13 |
diff --git a/example/nextjs/pages/_app.js b/example/nextjs/pages/_app.js @@ -40,7 +40,7 @@ export default class MyApp extends App {
{...pageProps}
ns="common"
i18n={(pageProps && pageProps.i18n) || i18n}
- wait={false}
+ wait={process.browser}
>
{t => (
<React.Fragment>
| 12 |
diff --git a/app/assets/stylesheets/editor-3/_widget-list.scss b/app/assets/stylesheets/editor-3/_widget-list.scss border: 2px solid $cBlueHover;
border-radius: 4px;
content: '';
- z-index: 10000;
pointer-events: none;
}
}
border: 2px solid $cMainText;
border-radius: 4px;
content: '';
- z-index: 10000;
pointer-events: none;
}
}
| 2 |
diff --git a/test/jasmine/tests/heatmap_test.js b/test/jasmine/tests/heatmap_test.js @@ -428,6 +428,28 @@ describe('heatmap calc', function() {
expect(out._xcategories).toEqual(['a', 'b', 'c']);
expect(out._ycategories).toEqual(['A', 'B', 'C']);
});
+
+ it('should handle the date x/y/z/ column case', function() {
+ var out = _calc({
+ x: [
+ '2016-01-01', '2016-01-01', '2016-01-01',
+ '2017-01-01', '2017-01-01', '2017-01-01',
+ '2017-06-01', '2017-06-01', '2017-06-01'
+ ],
+ y: [0, 1, 2, 0, 1, 2, 0, 1, 2],
+ z: [0, 50, 100, 50, 0, 255, 100, 510, 1010]
+ });
+
+ expect(out.x).toBeCloseToArray([
+ 1435795200000, 1467417600000, 1489752000000, 1502798400000
+ ]);
+ expect(out.y).toBeCloseToArray([-0.5, 0.5, 1.5, 2.5]);
+ expect(out.z).toBeCloseTo2DArray([
+ [0, 50, 100],
+ [50, 0, 510],
+ [100, 255, 1010]
+ ]);
+ });
});
describe('heatmap plot', function() {
| 0 |
diff --git a/rcloud.packages/rcloud.web/man/rcw.url.Rd b/rcloud.packages/rcloud.web/man/rcw.url.Rd @@ -25,7 +25,7 @@ rcw.parameters()
\item{detailed}{logical, if \code{TRUE} then a full list of various
components is returned, if \code{FALSE} only the URL string is
returned}
- \item{new full URL}
+ \item{url}{new full URL to redirect to}
\item{raw}{logical, if \code{FALSE} then the cookies are parsed into a
named list. If \code{TRUE} then the full cookie string is passed
as-is which is useful for passing credentials to related services.}
| 1 |
diff --git a/docs/articles/documentation/test-api/typescript-support.md b/docs/articles/documentation/test-api/typescript-support.md @@ -75,3 +75,6 @@ Option | Value
`noImplicitAny` | `false`
`pretty` | `true`
`suppressOutputPathCheck` | `true`
+`skipLibCheck` | `true`
+
+> TestCafe enables the `skipLibCheck` option for performance reasons. If you need to check types in your declaration files, set `skipLibCheck` to `false` in `tsconfig.json`.
| 0 |
diff --git a/src/constants.js b/src/constants.js @@ -377,7 +377,8 @@ module.exports = {
},
mob_names: {
- "unburried_zombie": "Crypt Ghoul"
+ "unburried_zombie": "Crypt Ghoul",
+ "zealot_enderman": "Zealot",
},
// Object with fairy soul, skill, slayer bonuses and enchantment bonuses
| 10 |
diff --git a/test/acceptance/user-render-timeout-limit.js b/test/acceptance/user-render-timeout-limit.js @@ -213,12 +213,12 @@ describe('user render timeout limit', function () {
serverOptions.renderer.mvt.usePostGIS = usePostGIS;
const mapconfig = createMapConfig();
this.testClient = new TestClient(mapconfig, 1234);
- this.testClient.setUserDatabaseTimeoutLimit(50, done);
+ this.testClient.setUserRenderTimeoutLimit('localhost', 50, done);
});
afterEach(function (done) {
serverOptions.renderer.mvt.usePostGIS = originalUsePostGIS;
- this.testClient.setUserDatabaseTimeoutLimit(0, (err) => {
+ this.testClient.setUserRenderTimeoutLimit('localhost', 0, (err) => {
if (err) {
return done(err);
}
| 1 |
diff --git a/lib/assets/javascripts/builder/editor/layers/layer-content-views/analyses/analysis-source-options-model.js b/lib/assets/javascripts/builder/editor/layers/layer-content-views/analyses/analysis-source-options-model.js @@ -106,6 +106,7 @@ module.exports = Backbone.Model.extend({
show_stats: false,
show_table_size_and_row_count: false,
show_permission: false,
+ show_table: false,
show_synchronization: false,
show_uses_builder_features: false,
load_totals: false,
| 12 |
diff --git a/.travis/deploy.sh b/.travis/deploy.sh @@ -82,7 +82,7 @@ fi
# Set the GitHub deploy key we will use to publish.
set-up-ssh --key "$encrypted_f19708b15817_key" \
--iv "$encrypted_f19708b15817_iv" \
- --path-encrypted-key ".travis/github_deploy_docs_key.enc"
+ --path-encrypted-key " ${DIR}/.travis/github_deploy_docs_key.enc"
# push the html documents
# Configure the Git repository and clean any untracked and unignored build files.
@@ -92,12 +92,13 @@ git config push.default simple
echo ${DIR}
cd ${DIR}/site/out
-rm -rf gh-pages
export REPO="fabric-composer.github.io"
git clone [email protected]:fabric-composer/${REPO}.git
-cd ${REPO}
+git remote set-url origin ${REPO}.git
+
+cd ${DIR}/site/out${REPO}
rm -rf ${DIR}/site/out/${REPO}/*
cp -rf ${DIR}/site/out/jekylldocs/_site/* .
| 12 |
diff --git a/publish/src/commands/deploy/configure-futures.js b/publish/src/commands/deploy/configure-futures.js @@ -26,43 +26,49 @@ module.exports = async ({
network,
});
+ const FUTURES_MIN_INITIAL_MARGIN = await getDeployParameter('FUTURES_MIN_INITIAL_MARGIN');
await runStep({
contract: 'FuturesMarketSettings',
target: futuresMarketSettings,
read: 'minInitialMargin',
- expected: input => input !== '0', // only change if zero
+ expected: input => input === FUTURES_MIN_INITIAL_MARGIN,
write: 'setMinInitialMargin',
- writeArg: await getDeployParameter('FUTURES_MIN_INITIAL_MARGIN'),
+ writeArg: FUTURES_MIN_INITIAL_MARGIN,
comment: 'Set the minimum margin to open a futures position (SIP-80)',
});
+ const FUTURES_LIQUIDATION_FEE_RATIO = await getDeployParameter('FUTURES_LIQUIDATION_FEE_RATIO');
await runStep({
contract: 'FuturesMarketSettings',
target: futuresMarketSettings,
read: 'liquidationFeeRatio',
- expected: input => input !== '0', // only change if zero
+ expected: input => input === FUTURES_LIQUIDATION_FEE_RATIO,
write: 'setLiquidationFeeRatio',
- writeArg: await getDeployParameter('FUTURES_LIQUIDATION_FEE_RATIO'),
+ writeArg: FUTURES_LIQUIDATION_FEE_RATIO,
comment: 'Set the reward for liquidating a futures position (SIP-80)',
});
+ const FUTURES_LIQUIDATION_BUFFER_RATIO = await getDeployParameter(
+ 'FUTURES_LIQUIDATION_BUFFER_RATIO'
+ );
await runStep({
contract: 'FuturesMarketSettings',
target: futuresMarketSettings,
read: 'liquidationBufferRatio',
- expected: input => input !== '0', // only change if zero
+ expected: input => input === FUTURES_LIQUIDATION_BUFFER_RATIO,
write: 'setLiquidationBufferRatio',
- writeArg: await getDeployParameter('FUTURES_LIQUIDATION_BUFFER_RATIO'),
+ writeArg: FUTURES_LIQUIDATION_BUFFER_RATIO,
comment: 'Set the reward for liquidating a futures position (SIP-80)',
});
+ const FUTURES_MIN_KEEPER_FEE = await getDeployParameter('FUTURES_MIN_KEEPER_FEE');
await runStep({
contract: 'FuturesMarketSettings',
target: futuresMarketSettings,
read: 'minKeeperFee',
- expected: input => input !== '0', // only change if zero
+ expected: input => input === FUTURES_MIN_KEEPER_FEE,
write: 'setMinKeeperFee',
- writeArg: await getDeployParameter('FUTURES_MIN_KEEPER_FEE'),
+ writeArg: FUTURES_MIN_KEEPER_FEE,
comment: 'Set the minimum reward for liquidating a futures position (SIP-80)',
});
| 3 |
diff --git a/lib/util/compute.js b/lib/util/compute.js @@ -15,6 +15,7 @@ function getPercentage(value, totalValue) {
function computeStats() {
const {currentRevisions, communesSummary} = getCommunesStats()
const currentRevisionsIndex = keyBy(currentRevisions, 'codeCommune')
+ const communesSummaryIndex = keyBy(communesSummary, 'codeCommune')
const otherPublishedCommunes = new Set(
communesSummary
@@ -30,8 +31,11 @@ function computeStats() {
.filter(codeCommune => getContourCommune(codeCommune))
.map(codeCommune => {
const revisions = currentRevisionsIndex[codeCommune]
+ const summary = communesSummaryIndex[codeCommune]
const contourCommune = getContourCommune(codeCommune)
const {nom, code, departement} = contourCommune.properties
+ const nbNumeros = spaceThousands(summary.nbNumeros)
+ const certificationPercentage = getPercentage(summary.nbNumerosCertifies, summary.nbNumeros)
return {
type: 'Feature',
@@ -39,6 +43,8 @@ function computeStats() {
nom,
code,
departement,
+ nbNumeros,
+ certificationPercentage,
idClient: revisions ? revisions.client.id : null,
nomClient: revisions ? revisions.client.nom : 'Moissonneur'
},
@@ -49,5 +55,6 @@ function computeStats() {
}
module.exports = {
- computeStats
+ computeStats,
+ getPercentage
}
| 0 |
diff --git a/package.json b/package.json {
"name": "tether-shepherd",
"version": "1.8.1",
+ "repository": "https://github.com/HubSpot/shepherd",
"description": "Guide your users through a tour of your app.",
"authors": [
"Adam Schwartz <[email protected]>",
| 0 |
diff --git a/config/redirects.js b/config/redirects.js @@ -706,21 +706,6 @@ module.exports = [
from: '/sso/single-sign-on',
to: '/sso'
},
- {
- from: '/libraries/lock/i18n',
- to: '/libraries/lock/v11/i18n',
- status: 302
- },
- {
- from: '/libraries/lock/migration-guide',
- to: '/libraries/lock/v11/migration-guide',
- status: 302
- },
- {
- from: '/libraries/lock/sending-authentication-parameters',
- to: '/libraries/lock/v11/sending-authentication-parameters',
- status: 302
- },
{
from: '/libraries/lock/v10/installation',
to: '/libraries/lock',
@@ -736,11 +721,6 @@ module.exports = [
to: '/libraries/lock/v11/customization#container-string-',
status: 302
},
- {
- from: '/libraries/lock/ui-customization',
- to: '/libraries/lock/v11/ui-customization',
- status: 302
- },
{
from: '/cancel-paid-subscriptions',
to: '/tutorials/cancel-paid-subscriptions'
@@ -1134,18 +1114,6 @@ module.exports = [
from: '/api-auth/config/asking-for-access-tokens',
to: '/api-auth/tutorials/client-credentials'
},
- {
- from: '/libraries/auth0js',
- to: '/libraries/auth0js/v9'
- },
- {
- from: '/libraries/lock',
- to: '/libraries/lock/v11'
- },
- {
- from: '/libraries/lock-ios',
- to: '/libraries/lock-ios/v2'
- },
{
from: '/protocols/oauth2/oauth-implicit-protocol',
to: '/api-auth/tutorials/implicit-grant'
| 2 |
diff --git a/layouts/partials/helpers/text-color.html b/layouts/partials/helpers/text-color.html {{- printf " text-%s" .overwrite -}}
{{- else -}}
{{- if or (eq $bg "white") (eq $bg "light") (eq $bg "secondary") (eq $bg "primary") -}}
- {{- printf " %s%s" $text_muted $text_dark -}}
+ {{- printf " %s%s" $text_dark -}}
{{- else -}}
{{- printf " %s%s" $text_muted $text_light -}}
{{- end -}}
| 2 |
diff --git a/src/core/operations/ExtractFiles.mjs b/src/core/operations/ExtractFiles.mjs @@ -23,7 +23,7 @@ class ExtractFiles extends Operation {
this.name = "Extract Files";
this.module = "Default";
- this.description = "Performs file carving to attempt to extract files from the input.";
+ this.description = "Performs file carving to attempt to extract files from the input.<br><br>This operation is currently capable of carving out the following formats:<ul><li>JPG</li><li>EXE</li><li>ZIP</li><li>PDF</li><li>PNG</li><li>BMP</li><li>FLV</li><li>RTF</li><li>DOCX, PPTX, XLSX</li><li>EPUB</li><li>GZIP</li><li>ZLIB</li><li>ELF, BIN, AXF, O, PRX, SO</li></ul>";
this.infoURL = "https://forensicswiki.org/wiki/File_Carving";
this.inputType = "ArrayBuffer";
this.outputType = "List<File>";
| 7 |
diff --git a/src/components/Match/MatchStory.jsx b/src/components/Match/MatchStory.jsx @@ -8,21 +8,12 @@ import {
import { IconRadiant, IconDire } from 'components/Icons';
import heroes from 'dotaconstants/build/heroes.json';
import items from 'dotaconstants/build/items.json';
+import itemColors from 'dotaconstants/json/item_colors.json';
import ReactTooltip from 'react-tooltip';
import styles from './Match.css';
const heroesArr = jsonFn(heroes);
-const itemQualityColor = {
- rare: '#1a87f9',
- artifact: '#e29b01',
- secret_shop: '#ffffff',
- consumable: '#1d80e7',
- common: '#2bab01',
- epic: '#b812f9',
- component: '#ffffff',
-};
-
// can be used in conjunction with is_radiant
const TEAM = {
radiant: true,
@@ -82,7 +73,7 @@ const ItemSpan = item => (
<span
key={`item_${item}`}
className={styles.storySpan}
- style={{ color: itemQualityColor[items[item].qual] }}
+ style={{ color: itemColors[items[item].qual] }}
>
<img
width="26px"
| 5 |
diff --git a/test/browser/render.test.js b/test/browser/render.test.js @@ -400,8 +400,9 @@ describe('render()', () => {
});
it('should support css custom properties', () => {
- render(<div style={{ ' --foo': 'red' }}>test</div>, scratch);
- expect(scratch.firstChild.style.cssText).to.equal('--foo:red;');
+ render(<div style={{ ' --foo': 'red', color: 'var(--foo)' }}>test</div>, scratch);
+ expect(scratch.firstChild.style.cssText).to.equal('--foo:red; color: var(--foo);');
+ expect(window.getComputedStyle(scratch.firstChild).color).to.equal('rgb(255, 0, 0)');
});
});
| 7 |
diff --git a/magda-registry-api/src/main/scala/au/csiro/data61/magda/registry/RecordPersistence.scala b/magda-registry-api/src/main/scala/au/csiro/data61/magda/registry/RecordPersistence.scala @@ -510,7 +510,7 @@ class DefaultRecordPersistence(config: Config)
limit: Option[Int] = None,
recordSelector: Iterable[Option[SQLSyntax]] = Iterable()
)(implicit session: DBSession): List[String] = {
- val recordsFilteredByTenantClause = filterRecordsByTenantClause(tenantId)
+ val recordsFilteredByTenantClause = SQLUtils.tenantIdToWhereClause(tenantId)
val authQueryConditions = authDecision.toSql()
@@ -1509,7 +1509,7 @@ class DefaultRecordPersistence(config: Config)
)
}
- val recordsFilteredByTenantClause = filterRecordsByTenantClause(
+ val recordsFilteredByTenantClause = SQLUtils.tenantIdToWhereClause(
tenantId
)
@@ -1802,7 +1802,7 @@ class DefaultRecordPersistence(config: Config)
aspectIds: Iterable[String],
dereference: Boolean = false
)(implicit session: DBSession): Iterable[scalikejdbc.SQLSyntax] = {
- val tenantFilterCondition = filterRecordsByTenantClause(tenantId)
+ val tenantFilterCondition = SQLUtils.tenantIdToWhereClause(tenantId)
val authDecisionCondition = authDecision.toSql()
val accessControlConditions =
@@ -1955,17 +1955,6 @@ class DefaultRecordPersistence(config: Config)
result
}
- private def filterRecordsByTenantClause(
- tenantId: TenantId,
- tenantIdSqlRef: String = "records.tenantid"
- ): Option[SQLSyntax] =
- tenantId match {
- case SpecifiedTenantId(inner) if (inner >= 0) =>
- Some(sqls"${SQLUtils.escapeIdentifier(tenantIdSqlRef)}=${inner}")
- case AllTenantsId => None
- case _ => throw new Exception("Invalid tenant value " + tenantId)
- }
-
private def aspectIdsToWhereClause(
aspectIds: Iterable[String],
recordIdSqlRef: String = "records.recordid",
| 14 |
diff --git a/assets/scripts/lobby.js b/assets/scripts/lobby.js @@ -777,6 +777,8 @@ function draw(){
}
else{
+ //if we are the host
+ if(ownUsername === getUsernameFromIndex(0)){
currentOptions = getOptions();
var str = "";
@@ -809,6 +811,10 @@ function draw(){
}
document.querySelector("#status").innerText = "Current roles: " + str;
+ }
+ else{
+ document.querySelector("#status").innerText = "Waiting for game to start... ";
+ }
enableDisableButtons();
}
}
| 1 |
diff --git a/test/jasmine/tests/parcoords_test.js b/test/jasmine/tests/parcoords_test.js @@ -45,6 +45,23 @@ function purgeGraphDiv(done) {
return delay(50)().then(done);
}
+function getAvgPixelByChannel(id) {
+ var canvas = d3.select(id).node();
+
+ var imgData = readPixel(canvas, 0, 0, canvas.width, canvas.height);
+ var n = imgData.length * 0.25;
+ var r = 0;
+ var g = 0;
+ var b = 0;
+
+ for(var i = 0; i < imgData.length; i++) {
+ r += imgData[i++];
+ g += imgData[i++];
+ b += imgData[i++];
+ }
+ return [r / n, g / n, b / n];
+}
+
describe('parcoords initialization tests', function() {
'use strict';
@@ -799,22 +816,39 @@ describe('parcoords Lifecycle methods', function() {
});
});
- it('@gl line.color `Plotly.restyle` should work', function(done) {
- function getAvgPixelByChannel() {
- var canvas = d3.select('.gl-canvas-focus').node();
- var imgData = readPixel(canvas, 0, 0, canvas.width, canvas.height);
- var n = imgData.length / 4;
- var r = 0;
- var g = 0;
- var b = 0;
+ it('@gl line.color `Plotly.restyle` should change focus layer', function(done) {
+ var testLayer = '.gl-canvas-focus';
+ Plotly.plot(gd, [{
+ type: 'parcoords',
+ dimensions: [{
+ values: [1, 2]
+ }, {
+ values: [2, 4]
+ }],
+ line: {color: 'blue'}
+ }], {
+ width: 300,
+ height: 200
+ })
+ .then(function() {
+ var rgb = getAvgPixelByChannel(testLayer);
+ expect(rgb[0]).toBe(0, 'no red');
+ expect(rgb[2]).not.toBe(0, 'all blue');
- for(var i = 0; i < imgData.length; i++) {
- r += imgData[i++];
- g += imgData[i++];
- b += imgData[i++];
- }
- return [r / n, g / n, b / n];
- }
+ return Plotly.restyle(gd, 'line.color', 'red');
+ })
+ .then(function() {
+ var rgb = getAvgPixelByChannel(testLayer);
+ expect(rgb[0]).not.toBe(0, 'all red');
+ expect(rgb[2]).toBe(0, 'no blue');
+ })
+ .catch(failTest)
+ .then(done);
+ });
+
+ it('@gl line.color `Plotly.restyle` should not change context layer', function(done) {
+ var testLayer = '.gl-canvas-context';
+ var old_rgb, new_rgb;
Plotly.plot(gd, [{
type: 'parcoords',
@@ -829,16 +863,20 @@ describe('parcoords Lifecycle methods', function() {
height: 200
})
.then(function() {
- var rbg = getAvgPixelByChannel();
- expect(rbg[0]).toBe(0, 'no red');
- expect(rbg[2]).not.toBe(0, 'all blue');
+ var rgb = getAvgPixelByChannel(testLayer);
+ old_rgb = rgb[0] + rgb[1] + rgb[2] / 3.0;
+ expect(old_rgb).toBeGreaterThan(0, 'not all black');
+ expect(old_rgb).toBeLessThan(255, 'not all white');
return Plotly.restyle(gd, 'line.color', 'red');
})
.then(function() {
- var rbg = getAvgPixelByChannel();
- expect(rbg[0]).not.toBe(0, 'all red');
- expect(rbg[2]).toBe(0, 'no blue');
+ var rgb = getAvgPixelByChannel(testLayer);
+ new_rgb = rgb[0] + rgb[1] + rgb[2] / 3.0;
+ expect(new_rgb).toBeGreaterThan(0, 'not all black');
+ expect(new_rgb).toBeLessThan(255, 'not all white');
+
+ expect(new_rgb).toBe(old_rgb, 'no change to context');
})
.catch(failTest)
.then(done);
| 0 |
diff --git a/app/views/about.scala.html b/app/views/about.scala.html User-contributed labels are used to develop new accessibility-friendly mapping tools (e.g., route planners, map visualizations), to train machine learning algorithms to semi-automatically assess cities in the future, and to create better transparency about city accessibility (imagine a <a href="http://walkscore.com">walkscore.com</a> for sidewalk accessibility!).
</p>
<p class="bold">
- You can help by completing a few missions (<a href="http://sidewalk.umiacs.umd.edu/audit">click here to start!</a>) and by sharing about Project Sidewalk with your family, friends, and colleagues via email or social media (for example, you could <a href="https://twitter.com/projsidewalk/status/888040060163162117">retweet this tweet</a>!). You can also 'like' us on <a href="https://www.facebook.com/projsidewalk/">Facebook</a>!
+ You can help by completing a few missions (<a href="http://projectsidewalk.io/audit">click here to start!</a>) and by sharing about Project Sidewalk with your family, friends, and colleagues via email or social media (for example, you could <a href="https://twitter.com/projsidewalk/status/888040060163162117">retweet this tweet</a>!). You can also 'like' us on <a href="https://www.facebook.com/projsidewalk/">Facebook</a>!
</p>
<p class="bold">
Watch the video below to find out more!
| 3 |
diff --git a/weapons-manager.js b/weapons-manager.js @@ -1695,12 +1695,61 @@ const _addSphere = () => {
tickers.push(ticker);
};
_addSphere();
+const glowHeight = 5;
+const glowGeometry = new THREE.CylinderBufferGeometry(0.01, 0.01, glowHeight)
+ .applyMatrix4(new THREE.Matrix4().makeTranslation(0, glowHeight/2, 0));
+const glowMaterial = new THREE.ShaderMaterial({
+ uniforms: {
+ uTime: {
+ type: 'f',
+ value: 0,
+ needsUpdate: true,
+ },
+ },
+ vertexShader: `\
+ precision highp float;
+ precision highp int;
+
+ varying vec2 vUv;
+
+ void main() {
+ vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);
+ gl_Position = projectionMatrix * mvPosition;
+
+ vUv = uv;
+ }
+ `,
+ fragmentShader: `\
+ precision highp float;
+ precision highp int;
+
+ uniform float uTime;
+
+ varying vec2 vUv;
+
+ void main() {
+ vec3 c = vec3(${new THREE.Color(0xef5350).toArray().join(', ')});
+ gl_FragColor = vec4(c, 1. - vUv.y);
+ }
+ `,
+ transparent: true,
+ polygonOffset: true,
+ polygonOffsetFactor: -1,
+ // polygonOffsetUnits: 1,
+});
(async () => {
const u = `./card-placeholder.glb`; // `https://webaverse.github.io/assets/card-placeholder.glb`;
let o = await new Promise((accept, reject) => {
gltfLoader.load(u, accept, function onprogress() {}, reject);
});
o = o.scene;
+
+ const glowMesh = new THREE.Mesh(
+ glowGeometry,
+ glowMaterial
+ );
+ o.add(glowMesh);
+
const _addCard = () => {
o.position.set(-1, 0.4, 0.5);
o.rotation.order = 'YXZ';
@@ -1737,6 +1786,9 @@ _addSphere();
rigManager.localRig.modelBoneOutputs.Head.getWorldPosition(localVector)
.add(localVector2.set(0, headOffset, 0));
o.position.copy(animation.startPosition).lerp(localVector, f);
+
+ const f2 = cubicBezier(timeFactor / tailTimeFactorCutoff);
+ glowMesh.scale.setScalar(1 - f2);
} else {
{
const f = cubicBezier(tailTimeFactorCutoff);
| 0 |
diff --git a/src/snapshot/filesaver.js b/src/snapshot/filesaver.js @@ -23,13 +23,6 @@ function fileSaver(url, name, format) {
var blob;
var objectUrl;
- // Safari doesn't allow downloading of blob urls
- if(Lib.isSafari()) {
- var prefix = format === 'svg' ? ',' : ';base64,';
- helpers.octetStream(prefix + encodeURIComponent(url));
- return resolve(name);
- }
-
// IE 10+ (native saveAs)
if(Lib.isIE()) {
// At this point we are only dealing with a decoded SVG as
| 2 |
diff --git a/lib/console_web/controllers/router/device_controller.ex b/lib/console_web/controllers/router/device_controller.ex @@ -174,7 +174,7 @@ defmodule ConsoleWeb.Router.DeviceController do
event = case event["data"]["req"]["body"] do
nil -> event
_ ->
- if String.contains?(event["data"]["req"]["body"], <<0>>) or String.contains?(event["data"]["req"]["body"], <<1>>) or String.contains?(event["data"]["req"]["body"], "\\u0000\\") do
+ if String.contains?(event["data"]["req"]["body"], <<0>>) or String.contains?(event["data"]["req"]["body"], <<1>>) or String.contains?(event["data"]["req"]["body"], "\\u0000") do
Kernel.put_in(event["data"]["req"]["body"], "Unsupported unicode escape sequence in request body")
else
event
| 9 |
diff --git a/src/components/tabs/Tabs.js b/src/components/tabs/Tabs.js -import React, {useState, useEffect} from 'react';
+import React, {useEffect} from 'react';
import PropTypes from 'prop-types';
import {omit} from 'ramda';
import classnames from 'classnames';
@@ -51,10 +51,15 @@ const Tabs = props => {
} = props;
children = parseChildrenToArray(children);
- active_tab =
- active_tab !== undefined
- ? active_tab
- : children && (resolveChildProps(children[0]).tab_id || 'tab-0');
+ // if active_tab not set initially, choose first tab
+ useEffect(() => {
+ if (setProps && active_tab === undefined) {
+ setProps({
+ active_tab:
+ children && (resolveChildProps(children[0]).tab_id || 'tab-0')
+ });
+ }
+ }, []);
const toggle = tab => {
if (setProps) {
| 12 |
diff --git a/lib/node_modules/@stdlib/math/base/special/gcd/lib/bitwise_binary_gcd.js b/lib/node_modules/@stdlib/math/base/special/gcd/lib/bitwise_binary_gcd.js @@ -33,7 +33,7 @@ function gcd( a, b ) {
while ( (a & 1) === 0 && (b & 1) === 0 ) {
a >>>= 1; // right shift
b >>>= 1; // right shift
- k++;
+ k += 1;
}
// Reduce `a` to an odd number...
while ( (a & 1) === 0 ) {
@@ -51,7 +51,7 @@ function gcd( a, b ) {
b = a;
a = t;
}
- b = b - a; // b=0 iff b=a
+ b -= a; // b=0 iff b=a
}
// Restore common factors of 2...
return a << k;
| 14 |
diff --git a/js/lykke.js b/js/lykke.js @@ -17,12 +17,19 @@ module.exports = class lykke extends Exchange {
'has': {
'CORS': false,
'fetchOHLCV': false,
- 'fetchTrades': true,
'fetchOpenOrders': true,
'fetchClosedOrders': true,
'fetchOrder': true,
'fetchOrders': true,
+ 'fetchTrades': true,
'fetchMyTrades': true,
+ 'createOrder': true,
+ 'cancelOrder': true,
+ 'cancelAllOrders': true,
+ 'fetchBalance': true,
+ 'fetchMarkets': true,
+ 'fetchOrderBook': true,
+ 'fetchTicker': true,
},
'timeframes': {
'1m': 'Minute',
@@ -267,7 +274,7 @@ module.exports = class lykke extends Exchange {
return await this.privateDeleteOrdersId (this.extend (request, params));
}
- async cancelOrders (symbol = undefined, params = {}) {
+ async cancelAllOrders (symbol = undefined, params = {}) {
await this.loadMarkets ();
const request = {};
let market = undefined;
| 10 |
diff --git a/client/src/components/Feed/StyledAccordion.js b/client/src/components/Feed/StyledAccordion.js @@ -39,6 +39,9 @@ export const FilterAccordionPanel = styled(Accordion.Panel)`
display: flex !important;
font-weight: bold !important;
font-size: ${theme.typography.size.large} !important;
+ padding: 0;
+ margin-left 1.5rem;
+ margin-right: 3rem;
@media screen and ${mq.phone.wide.max} {
height: 35px;
| 14 |
diff --git a/src/components/App.js b/src/components/App.js @@ -445,9 +445,13 @@ class App extends Component {
this.setState({showInfoOverlay: false})
}
- flashInfoOverlay(text) {
+ flashInfoOverlay(text, duration = null) {
+ if (duration == null) duration = setting.get('infooverlay.duration')
+
this.showInfoOverlay(text)
- setTimeout(() => this.hideInfoOverlay(), setting.get('infooverlay.duration'))
+
+ clearTimeout(this.hideInfoOverlayId)
+ this.hideInfoOverlayId = setTimeout(() => this.hideInfoOverlay(), duration)
}
clearConsole() {
| 7 |
diff --git a/packages/2018/package.json b/packages/2018/package.json "@emotion/core": "^10.0.10",
"@emotion/styled": "^10.0.10",
"@hackoregon/civic-babel-presets": "^3.0.0",
- "@hackoregon/component-library": "^3.0.0",
"@hackoregon/dev-server": "^3.0.0",
"@hackoregon/webpack-common": "^3.0.0",
"autoprefixer": "^9.4.10",
| 2 |
diff --git a/docs/styles.css b/docs/styles.css @@ -55,6 +55,11 @@ code, .commands td:first-child {
font-family: 'Hack', monospace;
}
+.permissions {
+ color: #77dd77;
+ font-family: 'Hack', monospace;
+}
+
table {
width: 75%;
margin: auto;
@@ -63,7 +68,24 @@ table {
th [colspan="2"] {
text-align: center;
}
-
+tr:nth-child(even) {
+ background-color: #2d3034;
+}
+.commands td {
+ width: 500px;
+ padding-bottom: 8px;
+ padding-top: 8px;
+}
+.commands td:nth-child(1) {
+ text-align:left;
+ padding-left: 5px;
+}
+.commands td:nth-child(2) {
+ text-align:left;
+}
+.commands {
+ border-spacing:0px;
+}
footer {
position:fixed;
left:0px;
@@ -151,7 +173,3 @@ div.tab button.active {
text-align: center;
margin-bottom:40px;
}
-
-.commands td {width: 500px; padding-bottom: 12px;}
-.commands td:nth-child(1) {text-align:left;}
-.commands td:nth-child(2) {text-align:left;}
| 3 |
diff --git a/generators/client/templates/vue/src/main/webapp/app/core/jhi-navbar/jhi-navbar.vue.ejs b/generators/client/templates/vue/src/main/webapp/app/core/jhi-navbar/jhi-navbar.vue.ejs <font-awesome-icon icon="list" />
<span v-text="$t('global.menu.admin.configuration')">Configuration</span>
</b-dropdown-item>
- <%_ if ((databaseType !== 'no' || authenticationType === 'uaa') && databaseType !== 'cassandra') { _%>
- <b-dropdown-item to="/admin/audits" active-class="active">
- <font-awesome-icon icon="bell" />
- <span v-text="$t('global.menu.admin.audits')">Audits</span>
- </b-dropdown-item>
- <%_ } _%>
<b-dropdown-item to="/admin/logs" active-class="active">
<font-awesome-icon icon="tasks" />
<span v-text="$t('global.menu.admin.logs')">Logs</span>
| 2 |
diff --git a/nin/backend/nin b/nin/backend/nin @@ -18,7 +18,7 @@ program.Command.prototype.outputHelp = function() {
program
.command('new')
- .description('Turn the current directory into a nin project')
+ .description('Turns <dirname> into a nin project')
.arguments('<dirname>', 'Where to create the new project')
.action(function(dirname) {
init.init(dirname);
| 7 |
diff --git a/source/touch/tap.js b/source/touch/tap.js @@ -54,7 +54,10 @@ class TrackedTouch {
this.cancelOnMove = inScrollView;
this.activeEls = activeEls;
do {
- if (/^(?:A|BUTTON|INPUT|LABEL)$/.test(target.nodeName)) {
+ if (
+ /^(?:A|BUTTON|INPUT|LABEL)$/.test(target.nodeName) ||
+ (target.classList && target.classList.contains('tap-target'))
+ ) {
activeEls.push(target);
target.classList.add('tap-active');
}
| 11 |
diff --git a/contributors.json b/contributors.json },
"lontchilionelle":{
"country": "Cameroon",
- "linkedin": "https://www.linkedin.com/in/lontchi-lionelle-6a887715b",
- "name": "Kamthie Lontchi Lionelle"
+ "name": "Kamthie Lontchi Lionelle",
+ "linkedin": "https://www.linkedin.com/in/lontchi-lionelle-6a887715b"
},
"maeeast": {
"country": "United States",
| 3 |
diff --git a/shared/js/https.js b/shared/js/https.js @@ -71,7 +71,7 @@ class HTTPS {
}, (data, res) => {
// This only gets called if the etag is different
// and it was able to get a new list from the server:
- console.log("HTTPS: updateList() got updated list from server: ")
+ console.log("HTTPS: updateList() got updated list from server")
let newEtag = res.getResponseHeader('etag') || ''
| 2 |
diff --git a/assets/js/modules/tagmanager/components/setup/SetupForm.js b/assets/js/modules/tagmanager/components/setup/SetupForm.js @@ -50,7 +50,7 @@ const { useSelect, useDispatch } = Data;
export default function SetupForm( { finishSetup, setIsNavigating } ) {
const canSubmitChanges = useSelect( ( select ) => select( STORE_NAME ).canSubmitChanges() );
- const gtmAnalyticsPropertyID = useSelect( ( select ) => select( STORE_NAME ).getSingleAnalyticsPropertyID() );
+ const singleAnalyticsPropertyID = useSelect( ( select ) => select( STORE_NAME ).getSingleAnalyticsPropertyID() );
const analyticsModuleActive = useSelect( ( select ) => select( CORE_MODULES ).isModuleActive( 'analytics' ) );
const hasEditScope = useSelect( ( select ) => select( CORE_USER ).hasScope( EDIT_SCOPE ) );
const analyticsModuleReauthURL = useSelect( ( select ) => select( MODULES_ANALYTICS ).getAdminReauthURL() );
@@ -75,7 +75,7 @@ export default function SetupForm( { finishSetup, setIsNavigating } ) {
setValues( FORM_SETUP, { autoSubmit: false } );
// If the property ID is set in GTM and Analytics is active,
// we disable the snippet output via Analyics to prevent duplicate measurement.
- if ( gtmAnalyticsPropertyID && analyticsModuleActive ) {
+ if ( singleAnalyticsPropertyID && analyticsModuleActive ) {
dispatchAnalytics.setUseSnippet( false );
const saveAnalyticsSettings = await dispatchAnalytics.saveSettings();
if ( saveAnalyticsSettings.error ) {
@@ -98,7 +98,7 @@ export default function SetupForm( { finishSetup, setIsNavigating } ) {
}
finishSetup();
}
- }, [ finishSetup, dispatchAnalytics, gtmAnalyticsPropertyID, analyticsModuleActive, analyticsModuleReauthURL, receiveError ] );
+ }, [ finishSetup, dispatchAnalytics, singleAnalyticsPropertyID, analyticsModuleActive, analyticsModuleReauthURL, receiveError ] );
// If the user lands back on this component with autoSubmit and the edit scope,
// resubmit the form.
@@ -108,7 +108,7 @@ export default function SetupForm( { finishSetup, setIsNavigating } ) {
}
}, [ hasEditScope, initialAutoSubmit, submitForm, initialSubmitMode ] );
- const isSetupWithAnalytics = !! ( gtmAnalyticsPropertyID && ! analyticsModuleActive );
+ const isSetupWithAnalytics = !! ( singleAnalyticsPropertyID && ! analyticsModuleActive );
// Form submit behavior now varies based on which button is clicked.
// Only the main buttons will trigger the form submit so here we only handle the default action.
| 10 |
diff --git a/src/modules/utils/modals/sendAsset/components/singleSend/SingleSend.js b/src/modules/utils/modals/sendAsset/components/singleSend/SingleSend.js * @return {boolean}
*/
isOldMoneroAddress() {
- return this.state.assetId === WavesApp.defaultAssets.XMR && this.state.assetId.substr(0, 1) === '4';
+ return this.state.assetId === WavesApp.defaultAssets.XMR && this.tx.recipient.substr(0, 1) === '4';
}
/**
| 1 |
diff --git a/marshal.js b/marshal.js @@ -180,7 +180,8 @@ export function passStyleOf(val) {
throw new Error(`property "${QCLASS}" reserved`);
}
if (!Object.isFrozen(val)) {
- throw new Error(`cannot pass non-frozen objects like ${val}`);
+ throw new Error(
+ `cannot pass non-frozen objects like ${val}. [Use harden()]`,
}
if (Promise.resolve(val) === val) {
return 'promise';
| 7 |
diff --git a/articles/client-auth/v2/mobile-desktop.md b/articles/client-auth/v2/mobile-desktop.md @@ -88,3 +88,18 @@ Request Parameters:
::: panel-info Arbitrary Claims
To improve Client application compatibility, Auth0 returns profile information using an [OIDC-defined structured claim format](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims). This means that arbitrary claims to ID or access tokens must conform to a namespaced format to avoid collisions with standard OIDC claims. For example, if your namespace is `https://foo.com/` and you want to add an arbitrary claim named `myclaim`, you would name the claim `https://foo.com/myclaim`, not `myclaim`.
:::
+
+As an example, your HTML snippet for your authorization URL might look as follows:
+
+```html
+<a href="https://${account.namespace}/authorize?
+ audience=appointments:api&
+ scope=appointments%20contacts&
+ response_type=code&
+ client_id=${account.clientId}&
+ code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM&
+ code_challenge_method=S256&
+ redirect_uri=com.myclientapp://myclientapp.com/callback">
+ Sign In
+</a>
+```
| 0 |
diff --git a/src/js/services/wallet-history.service.js b/src/js/services/wallet-history.service.js var overlappingTxFraction = overlappingTxsCount / Math.min(cachedTxs.length, PAGE_OVERLAP);
console.log('overlappingTxFraction:', overlappingTxFraction);
+ console.log('overlappingTxsCount:', overlappingTxsCount);
- if (overlappingTxFraction >= MIN_KNOWN_TX_OVERLAP_FRACTION) { // We are good
+ if (overlappingTxFraction >= MIN_KNOWN_TX_OVERLAP_FRACTION || (someTransactionsWereNew && overlappingTxsCount === 0)) { // We are good
if (someTransactionsWereNew) {
saveTxHistory(walletId, cachedTxs);
} else if (confirmationsUpdated) {
| 1 |
diff --git a/app-manager.js b/app-manager.js @@ -245,10 +245,13 @@ class AppManager extends EventTarget {
}
})(),
});
+
app.position.fromArray(position);
app.quaternion.fromArray(quaternion);
app.scale.fromArray(scale);
app.updateMatrixWorld();
+ app.lastMatrix.copy(app.matrixWorld);
+
app.contentId = contentId;
app.instanceId = instanceId;
app.setComponent('physics', true);
| 0 |
diff --git a/assets/js/components/wp-dashboard/WPDashboardClicks.js b/assets/js/components/wp-dashboard/WPDashboardClicks.js * WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
-import { useEffect } from '@wordpress/element';
/**
* Internal dependencies
@@ -32,7 +31,7 @@ import {
} from '../../modules/search-console/datastore/constants';
import { CORE_USER } from '../../googlesitekit/datastore/user/constants';
import { isZeroReport } from '../../modules/search-console/util';
-import { calculateChange, trackEvent } from '../../util';
+import { calculateChange } from '../../util';
import sumObjectListValue from '../../util/sum-object-list-value';
import { partitionReport } from '../../util/partition-report';
import DataBlock from '../DataBlock';
@@ -78,12 +77,6 @@ const WPDashboardClicks = ( { WidgetReportZero, WidgetReportError } ) => {
).hasFinishedResolution( 'getReport', [ reportArgs ] )
);
- useEffect( () => {
- if ( error ) {
- trackEvent( 'plugin_setup', 'search_console_error', error.message );
- }
- }, [ error ] );
-
if ( loading || isGatheringData === undefined ) {
return <PreviewBlock width="48%" height="92px" />;
}
| 2 |
diff --git a/src/js/components/DateTimeDrop.js b/src/js/components/DateTimeDrop.js @@ -53,7 +53,7 @@ export default class DateTimeDrop extends Component {
this.state = this._stateFromProps(props);
this.state.mouseActive = false;
- this._buildDateRows();
+ this._buildDateRows(this.state);
}
componentDidMount () {
@@ -78,7 +78,6 @@ export default class DateTimeDrop extends Component {
}
_buildDateRows (state) {
- state = state || this.state;
const { timeOfDay, value } = state;
const start = moment(value).startOf('month').startOf('week').add(timeOfDay);
const end = moment(value).endOf('month').endOf('week').add(timeOfDay);
@@ -224,7 +223,7 @@ export default class DateTimeDrop extends Component {
_onPrevious (scope, notify=true) {
const { format, step, onChange } = this.props;
- const { stepScope, value } = this.state;
+ const { stepScope, timeOfDay, value } = this.state;
let delta = (scope === stepScope ? step : 1);
if (scope === 'ampm') {
delta = 12;
@@ -240,12 +239,17 @@ export default class DateTimeDrop extends Component {
});
if (notify) {
onChange(newValue.format(format));
+ } else {
+ // rebuild grid
+ let state = { timeOfDay, value: newValue };
+ this._buildDateRows(state);
+ this.setState(state);
}
}
_onNext (scope, notify=true) {
const { format, step, onChange } = this.props;
- const { stepScope, value } = this.state;
+ const { stepScope, timeOfDay, value } = this.state;
let delta = (scope === stepScope ? step : 1);
if (scope === 'ampm') {
delta = 12;
@@ -261,10 +265,16 @@ export default class DateTimeDrop extends Component {
});
if (notify) {
onChange(newValue.format(format));
+ } else {
+ // rebuild grid
+ let state = { timeOfDay, value: newValue };
+ this._buildDateRows(state);
+ this.setState(state);
}
}
_renderGrid () {
+ const { value: propsValue } = this.props;
const { activeCell, dateRows, focus, mouseActive, value } = this.state;
const { intl } = this.context;
@@ -279,7 +289,7 @@ export default class DateTimeDrop extends Component {
const days = row.map((date, columnIndex) => {
const classes = classnames(
`${CLASS_ROOT}__day`, {
- [`${CLASS_ROOT}__day--active`]: date.isSame(value, 'day'),
+ [`${CLASS_ROOT}__day--active`]: date.isSame(propsValue, 'day'),
[`${CLASS_ROOT}__day--hover`]: (
!date.isSame(value, 'day') &&
[rowIndex, columnIndex].toString() === activeCell.toString()
| 1 |
diff --git a/tests/profile.test.js b/tests/profile.test.js @@ -14,16 +14,14 @@ describe('Profile', function ( ) {
]
, targets: {
targets: [
- { offset: 0, high: 120, low: 100 },
- { offset: 480, high: 115, low: 95}
+ { offset: 0, high: 120, low: 100 }
]
}
, temptargets: [
]
, isf: {
sensitivities: [
- { offset: 0, i: 0, x: 0, start: '00:00:00', sensitivity: 100 },
- { offset: 480, i: 16, x: 1, start: '08:00:00', sensitivity: 80 }
+ { offset: 0, i: 0, x: 0, start: '00:00:00', sensitivity: 100 }
]
}
, carbratio: {
| 13 |
diff --git a/src/plots/cartesian/layout_attributes.js b/src/plots/cartesian/layout_attributes.js @@ -227,7 +227,8 @@ module.exports = {
'Moreover, matching axes share auto-range values, category lists and',
'histogram auto-bins.',
'Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint',
- 'is currently forbidden.'
+ 'is currently forbidden.',
+ 'Moreover, note that matching must have the same `type`.'
].join(' ')
},
// ticks
| 0 |
diff --git a/src/lib/gundb/UserStorage.js b/src/lib/gundb/UserStorage.js @@ -194,16 +194,12 @@ class UserStorage {
this.feedIndex = orderBy(toPairs(changed), day => day[0], 'desc')
}
async initFeed() {
- logger.debug('initFeed')
this.feed = global.gun.user().get('feed')
await this.feed
.get('index')
.map()
.once(this.updateFeedIndex)
.then()
-
- logger.debug('initFeed after await')
-
this.feed.get('index').on(this.updateFeedIndex, false)
}
async getProfileFieldValue(field: string): Promise<any> {
| 2 |
diff --git a/edit.js b/edit.js @@ -968,6 +968,17 @@ const geometryWorker = (() => {
};
let messageIndex = 0;
const MESSAGES = {
+ [--messageIndex]: function updateSubparcel(offset) {
+ const subparcelOffset = callStack.ou32[offset++];
+ const subparcelSize = callStack.ou32[offset++];
+
+ const x = moduleInstance.HEAP32[subparcelOffset/Uint32Array.BYTES_PER_ELEMENT];
+ const y = moduleInstance.HEAP32[subparcelOffset/Uint32Array.BYTES_PER_ELEMENT + 1];
+ const z = moduleInstance.HEAP32[subparcelOffset/Uint32Array.BYTES_PER_ELEMENT + 2];
+ const index = moduleInstance.HEAP32[subparcelOffset/Uint32Array.BYTES_PER_ELEMENT + 3];
+
+ // console.log('update subparcel', x, y, z, index, subparcelSize);
+ },
[--messageIndex]: function updateGeometry(offset) {
{
const positionsFreeEntry = callStack.ou32[offset++];
| 9 |
diff --git a/weapons-manager.js b/weapons-manager.js import * as THREE from './three.module.js';
import {BufferGeometryUtils} from './BufferGeometryUtils.js';
-import {makeCubeMesh, makeRayMesh, intersectUi} from './vr-ui.js';
+import {makeCubeMesh, makeRayMesh, makeTextInput, intersectUi} from './vr-ui.js';
import geometryManager from './geometry-manager.js';
import cameraManager from './camera-manager.js';
import uiManager from './ui-manager.js';
@@ -1677,6 +1677,17 @@ const _renderWheel = (() => {
};
})();
+const menuMesh = (() => {
+ const object = new THREE.Object3D();
+
+ const header = makeTextInput(undefined, 'Search...');
+ object.add(header);
+
+ return object;
+})();
+menuMesh.visible = false;
+scene.add(menuMesh);
+
const weaponsManager = {
weapons,
cubeMesh,
@@ -1737,6 +1748,18 @@ const weaponsManager = {
_renderWheel(selectedSlice);
}
},
+ getMenu() {
+ return menuMesh.visible;
+ },
+ setMenu(newOpen) {
+ if (newOpen) {
+ const xrCamera = renderer.xr.getSession() ? renderer.xr.getCamera(camera) : camera;
+ menuMesh.position.copy(xrCamera.position)
+ .add(new THREE.Vector3(0, 0, -1.5).applyQuaternion(xrCamera.quaternion));
+ menuMesh.quaternion.copy(xrCamera.quaternion);
+ }
+ menuMesh.visible = newOpen;
+ },
update(timeDiff) {
_updateWeapons(timeDiff);
},
| 0 |
diff --git a/src/plots/cartesian/select.js b/src/plots/cartesian/select.js @@ -25,8 +25,9 @@ function getAxId(ax) { return ax._id; }
module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
var zoomLayer = dragOptions.gd._fullLayout._zoomlayer,
dragBBox = dragOptions.element.getBoundingClientRect(),
- xs = dragOptions.plotinfo.xaxis._offset,
- ys = dragOptions.plotinfo.yaxis._offset,
+ plotinfo = dragOptions.plotinfo,
+ xs = plotinfo.xaxis._offset,
+ ys = plotinfo.yaxis._offset,
x0 = startX - dragBBox.left,
y0 = startY - dragBBox.top,
x1 = x0,
@@ -71,6 +72,7 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
searchInfo,
selection = [],
eventData;
+
for(i = 0; i < gd.calcdata.length; i++) {
cd = gd.calcdata[i];
trace = cd[0].trace;
@@ -106,9 +108,41 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
function ascending(a, b) { return a - b; }
+ // allow subplots to override fillRangeItems routine
+ var fillRangeItems;
+
+ if(plotinfo.fillRangeItems) {
+ fillRangeItems = plotinfo.fillRangeItems;
+ } else {
+ if(mode === 'select') {
+ fillRangeItems = function(eventData, poly) {
+ var ranges = eventData.range = {};
+
+ for(i = 0; i < allAxes.length; i++) {
+ var ax = allAxes[i];
+ var axLetter = ax._id.charAt(0);
+
+ ranges[ax._id] = [
+ ax.p2d(poly[axLetter + 'min']),
+ ax.p2d(poly[axLetter + 'max'])
+ ].sort(ascending);
+ }
+ };
+ } else {
+ fillRangeItems = function(eventData, poly, pts) {
+ var dataPts = eventData.lassoPoints = {};
+
+ for(i = 0; i < allAxes.length; i++) {
+ var ax = allAxes[i];
+ dataPts[ax._id] = pts.filtered.map(axValue(ax));
+ }
+ };
+ }
+ }
+
dragOptions.moveFn = function(dx0, dy0) {
- var poly,
- ax;
+ var poly;
+
x1 = Math.max(0, Math.min(pw, dx0 + x0));
y1 = Math.max(0, Math.min(ph, dy0 + y0));
@@ -158,27 +192,7 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
}
eventData = {points: selection};
-
- if(mode === 'select') {
- var ranges = eventData.range = {},
- axLetter;
-
- for(i = 0; i < allAxes.length; i++) {
- ax = allAxes[i];
- axLetter = ax._id.charAt(0);
- ranges[ax._id] = [
- ax.p2d(poly[axLetter + 'min']),
- ax.p2d(poly[axLetter + 'max'])].sort(ascending);
- }
- }
- else {
- var dataPts = eventData.lassoPoints = {};
-
- for(i = 0; i < allAxes.length; i++) {
- ax = allAxes[i];
- dataPts[ax._id] = pts.filtered.map(axValue(ax));
- }
- }
+ fillRangeItems(eventData, poly, pts);
dragOptions.gd.emit('plotly_selecting', eventData);
};
| 11 |
diff --git a/materials.js b/materials.js @@ -61,6 +61,18 @@ class WebaverseShaderMaterial extends THREE.ShaderMaterial {
class WebaverseRawShaderMaterial extends THREE.RawShaderMaterial {
constructor(opts = {}) {
opts.vertexShader = formatVertexShader(opts.vertexShader);
+ const lines = opts.vertexShader.split('\n');
+ let firstNonPrecisionLine = -1;
+ for (let i = 0; i < lines.length; i++) {
+ if (!lines[i].trim().startsWith('precision')) {
+ firstNonPrecisionLine = i;
+ break;
+ }
+ }
+ if (firstNonPrecisionLine !== -1 && !lines.some(l => l.trim().startsWith('#define USE_LOGDEPTHBUF'))) {
+ lines.splice(firstNonPrecisionLine, 0, '#define USE_LOGDEPTHBUF');
+ opts.vertexShader = lines.join('\n');
+ }
// opts.vertexShader = opts.vertexShader.replace('#define EPSILON 1e-6', '#define EPSILON 1e-6\n#define USE_LOGDEPTHBUF 1');
opts.fragmentShader = formatFragmentShader(opts.fragmentShader);
super(opts);
| 0 |
diff --git a/assets/js/googlesitekit/data/utils.js b/assets/js/googlesitekit/data/utils.js @@ -244,7 +244,6 @@ export const commonControls = {
* @return {Object} FSA-compatible action.
*/
[ GET_REGISTRY ]: createRegistryControl( ( registry ) => () => registry ),
- // [ SNAPSHOT_START ]: createRegistryControl( ( registry ) => () => registry ),
};
/**
| 2 |
diff --git a/data.js b/data.js @@ -2411,6 +2411,14 @@ module.exports = [
url: "http://millermedeiros.github.io/js-signals/",
source: "https://raw.githubusercontent.com/millermedeiros/js-signals/master/dist/signals.js"
},
+ {
+ name: "Dragonbinder",
+ github: "Masquerade-Circus/dragonbinder",
+ tags: ["store", "state", "state management", "reactive", "vuex", "redux", "flux", "manager"],
+ description: "1kb progressive state management library inspired by Vuex.",
+ url: "https://github.com/Masquerade-Circus/dragonbinder",
+ source: "https://raw.githubusercontent.com/Masquerade-Circus/dragonbinder/master/lib/index.js"
+ },
{
name: "Crossroads.js",
tags: ["route", "events", "spa"],
| 0 |
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -340,20 +340,22 @@ const loadPromise = (async () => {
swordSideSlash = animations.find(a => a.isSwordSideSlash);
swordTopDownSlash = animations.find(a => a.isSwordTopDownSlash)
+ function mergeAnimations(a, b) {
+ const o = {};
+ for (const k in a) {
+ o[k] = a[k];
+ }
+ for (const k in b) {
+ o[k] = b[k];
+ }
+ return o;
+ }
jumpAnimation = animations.find(a => a.isJump);
// sittingAnimation = animations.find(a => a.isSitting);
floatAnimation = animations.find(a => a.isFloat);
// rifleAnimation = animations.find(a => a.isRifle);
// hitAnimation = animations.find(a => a.isHit);
- useAnimations = {
- combo: animations.find(a => a.isCombo),
- slash: animations.find(a => a.isSlash),
- rifle: animations.find(a => a.isRifle),
- pistol: animations.find(a => a.isPistol),
- magic: animations.find(a => a.isMagic),
- drink: animations.find(a => a.isDrinking),
- };
aimAnimations = {
swordSideIdle: animations.find(a => a.name === 'sword_idle_side.fbx'),
swordSideIdleStatic: animations.find(a => a.name === 'sword_idle_side_static.fbx'),
@@ -361,6 +363,14 @@ const loadPromise = (async () => {
swordTopDownSlash: animations.find(a => a.name === 'sword_topdown_slash.fbx'),
swordUndraw: animations.find(a => a.name === 'sword_undraw.fbx'),
};
+ useAnimations = mergeAnimations({
+ combo: animations.find(a => a.isCombo),
+ slash: animations.find(a => a.isSlash),
+ rifle: animations.find(a => a.isRifle),
+ pistol: animations.find(a => a.isPistol),
+ magic: animations.find(a => a.isMagic),
+ drink: animations.find(a => a.isDrinking),
+ }, aimAnimations);
sitAnimations = {
chair: animations.find(a => a.isSitting),
saddle: animations.find(a => a.isSitting),
@@ -2231,8 +2241,9 @@ class Avatar {
} = spec;
if (isTop) {
- const useAnimation = (this.useAnimation && useAnimations[this.useAnimation]);
- // console.log('get use animation', [this.useAnimation, useAnimation]);
+ // XXX this should support combos
+ const useAnimationName = Array.isArray(this.useAnimation) ? this.useAnimation[0] : this.useAnimation;
+ const useAnimation = (useAnimationName && useAnimations[useAnimationName]);
if (useAnimation) {
const t2 = (this.useTime/useMaxTime) % useAnimation.duration;
const src2 = useAnimation.interpolants[k];
| 0 |
diff --git a/accessibility-checker-engine/help/Rpt_Aria_RequiredChildren_Native_Host_Sematics.mdx b/accessibility-checker-engine/help/Rpt_Aria_RequiredChildren_Native_Host_Sematics.mdx @@ -30,7 +30,7 @@ An element with WAI-ARIA `role` must contain required children
## What to do
- * Add the appropriate required child element(s) with implicit or explicit role(s) ({$1}) to this element.
+ * Add the appropriate required child element(s) to this element.
For example, the following element uses the `"radiogroup"` role. The `"radiogroup"` role requires child elements with `role="radio"` set in a manner that represents the checked or unchecked state of the radio button.
| 2 |
diff --git a/content/react/en/get-started.md b/content/react/en/get-started.md @@ -7,7 +7,7 @@ commit: ebe2ae2
# Storybook for React tutorial
-Storybook runs alongside your app in development mode. It helps you build UI components isolated from the business logic and context of your app. This edition of Learn Storybook is for React; other editions exist for [Vue](/vue/en/get-started) and [Angular](/angular/en/getstarted).
+Storybook runs alongside your app in development mode. It helps you build UI components isolated from the business logic and context of your app. This edition of Learn Storybook is for React; other editions exist for [Vue](/vue/en/get-started) and [Angular](/angular/en/get-started).

| 1 |
diff --git a/src/lang/en.json b/src/lang/en.json "Any" : "Any"
},
"VehicleAttack": {
- "Type" : "Vehicle Attack",
- "Nonlethal" : "Is Nonlethal",
- "canAvoid" : "Can be avoided",
- "avoidDC" : "Avoiding DC (Reflex)"
+ "Type" : "Vehicle Attack"
},
"Weapon": {
"Details" : "Weapon Details",
| 2 |
diff --git a/index.d.ts b/index.d.ts @@ -20,7 +20,7 @@ declare namespace Moleculer {
trace(...args: any[]): void;
}
- type ActionHandler = ((ctx: Context) => Bluebird<any>) & ThisType<Service>;
+ type ActionHandler = ((ctx: Context) => Bluebird<any> | any) & ThisType<Service>;
type ActionParamSchema = { [key: string]: any };
type ActionParamTypes = "boolean" | "number" | "string" | "object" | "array" | ActionParamSchema;
type ActionParams = { [key: string]: ActionParamTypes };
| 11 |
diff --git a/src/pages/start/index.css b/src/pages/start/index.css display: flex;
height: auto;
justify-content: space-around;
+ flex-flow: wrap;
}
.start-wrapper ul {
padding: 10px;
margin-top: 10px;
margin-bottom: 10px;
- width: 24%;
text-align: center;
+ width: 95%;
}
.start-section-wrapper h3 {
text-transform: uppercase;
}
+.start-section-wrapper img {
+ max-width: 100%;
+}
+
+@media screen and (min-width: 800px){
+ .start-section-wrapper {
+ width: 50%;
+ }
+}
+
+@media screen and (min-width: 1220px){
.start-section-wrapper img {
max-width: 256px;
}
+
+ .start-section-wrapper {
+ width: 24%;
+ }
+}
| 1 |
diff --git a/token-metadata/0x5Af2Be193a6ABCa9c8817001F45744777Db30756/metadata.json b/token-metadata/0x5Af2Be193a6ABCa9c8817001F45744777Db30756/metadata.json "symbol": "VGX",
"address": "0x5Af2Be193a6ABCa9c8817001F45744777Db30756",
"decimals": 8,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/lib/https/index.js b/lib/https/index.js @@ -15,6 +15,7 @@ var getDomain = httpsUtil.getDomain;
var serverAgent = httpsUtil.serverAgent;
var parseReq = require('hparser').parse;
+var ERR_RES = { statusCode: 502, headers: {'x-server':'whistle' } };
var LOCALHOST = '127.0.0.1';
var tunnelTmplData = {};
var proxy;
@@ -456,9 +457,14 @@ function _handleWebsocket(socket, clientIp, clientPort, callback, wss) {
} else {
reqEmitter.emit('end', data);
}
-
+ if (err) {
+ pluginMgr.getResRules(socket, ERR_RES, function() {
+ callback(err, _socket);
+ });
+ } else {
callback(err, _socket);
}
+ }
});
}
| 1 |
diff --git a/metaversefile-api.js b/metaversefile-api.js @@ -53,7 +53,7 @@ import particleSystemManager from './particle-system.js';
import domRenderEngine from './dom-renderer.jsx';
import dropManager from './drop-manager.js';
import hitManager from './character-hitter.js';
-import terrainManager from './terrain-manager.js';
+import dcWorkerManager from './dc-worker-manager.js';
import cardsManager from './cards-manager.js';
const localVector2D = new THREE.Vector2();
@@ -1202,8 +1202,8 @@ export default () => {
useHitManager() {
return hitManager;
},
- useTerrainManager() {
- return terrainManager;
+ useDcWorkerManager() {
+ return dcWorkerManager;
},
useCardsManager() {
return cardsManager;
| 10 |
diff --git a/package.json b/package.json {
"name": "prettier-atom",
"main": "./dist/main.js",
- "version": "0.54.0",
+ "version": "0.55.0",
"description": "Atom plugin for formatting JavaScript using prettier with (optional) prettier-eslint integration",
"keywords": [
"atom",
| 6 |
diff --git a/test/cases/parsing/issue-11353/index.js b/test/cases/parsing/issue-11353/index.js +"use strict";
+
import generator from "./generator_function.js";
import asyncGenerator from "./async_generator_function";
@@ -10,7 +12,7 @@ it('should correctly build the correct function string', () => {
});
it('should correctly provide the generator function interface', () => {
- var gen = generator();
+ let gen = generator();
expect(gen.next().value).toBe(0);
expect(gen.next().value).toBe(1);
expect(gen.next().value).toBe(2);
| 14 |
diff --git a/app/controllers/carto/api/data_import_presenter.rb b/app/controllers/carto/api/data_import_presenter.rb @@ -117,11 +117,7 @@ module Carto
end
def get_error_text
- if @data_import.error_code.nil?
- nil
- else
- @data_import.error_code.blank? ? CartoDB::IMPORTER_ERROR_CODES[99999] : CartoDB::IMPORTER_ERROR_CODES[@data_import.error_code]
- end
+ @data_import.get_error_text
end
def display_name
| 4 |
diff --git a/src/plugins/modules/_anchor.js b/src/plugins/modules/_anchor.js @@ -124,7 +124,7 @@ export default {
contextAnchor.anchorText.value = this.getSelection().toString();
} else if (contextAnchor.linkAnchor) {
this.context.dialog.updateModal = true;
- const href = contextAnchor.linkAnchor.href;
+ const href = this.options.linkNoPrefix ? contextAnchor.linkAnchor.href.replace(contextAnchor.linkAnchor.origin + '/', '') : contextAnchor.linkAnchor.href;
contextAnchor.linkValue = contextAnchor.preview.textContent = contextAnchor.urlInput.value = /\#.+$/.test(href) ? href.substr(href.lastIndexOf('#')) : href;
contextAnchor.anchorText.value = contextAnchor.linkAnchor.textContent.trim() || contextAnchor.linkAnchor.getAttribute('alt');
contextAnchor.newWindowCheck.checked = (/_blank/i.test(contextAnchor.linkAnchor.target) ? true : false);
| 14 |
diff --git a/analytics/utils/getContext.js b/analytics/utils/getContext.js @@ -32,6 +32,14 @@ export const getContext = async (obj: EntityObjType) => {
const message = await getMessageById(reaction.messageId);
const thread = await getThreadById(message.threadId);
+ // if no thread was found, we are in a dm
+ if (!thread) {
+ return {
+ reaction: transformations.analyticsReaction(reaction),
+ message: transformations.analyticsMessage(message),
+ };
+ }
+
const [
channel,
community,
@@ -71,6 +79,13 @@ export const getContext = async (obj: EntityObjType) => {
const message = await getMessageById(obj.messageId);
const thread = await getThreadById(message.threadId);
+ // if no thread was found, we are in a dm
+ if (!thread) {
+ return {
+ message: transformations.analyticsMessage(message),
+ };
+ }
+
const [
channel,
community,
| 9 |
diff --git a/deploy.py b/deploy.py @@ -4,7 +4,7 @@ from utils.testutils import ZERO_ADDRESS
# Source files to compile from
SOLIDITY_SOURCES = ["contracts/Havven.sol", "contracts/EtherNomin.sol",
"contracts/Court.sol", "contracts/HavvenEscrow.sol",
- "contracts/ERC20State.sol", "contracts/ERC20FeeState.sol",
+ "contracts/ExternStateProxyFeeToken.sol", "contracts/ExternStateProxyToken.sol",
"contracts/Proxy.sol"]
OWNER = MASTER
| 3 |
diff --git a/token-metadata/0xD7B7d3C0bdA57723Fb54ab95Fd8F9EA033AF37f2/metadata.json b/token-metadata/0xD7B7d3C0bdA57723Fb54ab95Fd8F9EA033AF37f2/metadata.json "symbol": "PYLON",
"address": "0xD7B7d3C0bdA57723Fb54ab95Fd8F9EA033AF37f2",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/package.json b/package.json {
"name": "prettier-atom",
"main": "./dist/main.js",
- "version": "0.58.1",
+ "version": "0.58.2",
"description": "Atom plugin for formatting JavaScript using prettier with (optional) prettier-eslint integration",
"keywords": [
"atom",
| 6 |
diff --git a/Solve.js b/Solve.js @@ -64,6 +64,8 @@ if ((typeof module) !== 'undefined') {
core.Settings.SOLUTION_PROXIMITY = 1e-14;
//Indicate wheter to filter the solutions are not
core.Settings.FILTER_SOLUTIONS = true;
+ //the maximum number of recursive calls
+ core.Settings.MAX_SOLVE_DEPTH = 10;
core.Symbol.prototype.hasTrig = function () {
return this.containsFunction(['cos', 'sin', 'tan', 'cot', 'csc', 'sec']);
@@ -942,7 +944,13 @@ if ((typeof module) !== 'undefined') {
* @param {type} solve_for
* @returns {Array}
*/
- var solve = function (eqns, solve_for, solutions) {
+ var solve = function (eqns, solve_for, solutions, depth) {
+ depth = depth || 0;
+
+ if(depth++ > Settings.MAX_SOLVE_DEPTH) {
+ return solutions;
+ }
+
//make preparations if it's an Equation
if (eqns instanceof Equation) {
//if it's zero then we're done
@@ -1312,6 +1320,11 @@ if ((typeof module) !== 'undefined') {
if (solutions.length === 0)
add_to_result(__.divideAndConquer(eq, solve_for));
}
+
+ if(solutions.length === 0) {
+ //try factoring
+ add_to_result(solve(factored, solve_for, solutions, depth));
+ }
}
}
| 0 |
diff --git a/package.json b/package.json "status": "prod",
"display-name": "Comboboxes",
"last-accessibility-review": {
- "date-iso-8601": "2017/08/21",
- "commit-sha": "295a4766f712a5f93743c4ecd3ba62d91c1fc153"
+ "date-iso-8601": "2019/01/10",
+ "commit-sha": "ad49735c8055420c4c95872299986f5fbbb2236e"
},
"SLDS-component-path": "/components/combobox",
"url-slug": "comboboxes"
| 3 |
diff --git a/ios/reactNativeApp/AppDelegate.m b/ios/reactNativeApp/AppDelegate.m rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
+ [self.window setTintColor:[UIColor colorWithRed: 0 green:169.0/255.0 blue:145.0/255.0 alpha:1]];
return YES;
}
| 12 |
diff --git a/OurUmbraco.Site/config/CommunityBlogs.json b/OurUmbraco.Site/config/CommunityBlogs.json "checkTitles": false,
"title": "My Umbraco Adventures",
"url": "https://jvantroyen.blogspot.com/",
- "rss": "http://jvantroyen.blogspot.com/feeds/posts/default",
+ "rss": "https://feeds.feedburner.com/MyUmbracoAdventures",
"logo": "https://our.umbraco.com/media/upload/0e40926e-0884-42e4-abc4-ed72ab2f2c31/Jeroen%20Vantroyen.png?width=500&height=500&mode=crop&upscale=true",
"memberId": 274827
}
| 3 |
diff --git a/js/igvxhr.js b/js/igvxhr.js @@ -67,7 +67,7 @@ const igvxhr = {
if (method === "POST") {
options.contentType = "application/json";
}
- const result = await load(url, options)
+ const result = await this.loadString(url, options)
if (result) {
return JSON.parse(result);
} else {
@@ -267,10 +267,22 @@ async function loadFileSlice(localfile, options) {
let blob = (options && options.range) ?
localfile.slice(options.range.start, options.range.start + options.range.size) :
localfile;
+
if ("arraybuffer" === options.responseType) {
return blob.arrayBuffer();
} else {
- throw Error("binary string not implemented")
+ return new Promise(function (resolve, reject) {
+ const fileReader = new FileReader();
+ fileReader.onload = function (e) {
+ resolve(fileReader.result);
+ };
+ fileReader.onerror = function (e) {
+ console.error("reject uploading local file " + localfile.name);
+ reject(null, fileReader);
+ };
+ fileReader.readAsBinaryString(blob)
+ console.warn("Deprecated method used: readAsBinaryString")
+ })
}
}
| 1 |
diff --git a/packages/frontend/src/redux/slices/ledger/index.js b/packages/frontend/src/redux/slices/ledger/index.js @@ -104,6 +104,20 @@ const ledgerSlice = createSlice({
unset(state, ['signInWithLedger']);
unset(state, ['txSigned']);
});
+ builder.addCase(addLedgerAccountId.pending, (state, { payload, meta: { arg: { accountId } } }) => {
+ set(state, ['signInWithLedgerStatus'], 'confirm-accounts');
+ set(state, ['signInWithLedger', accountId, 'status'], 'confirm');
+ });
+ builder.addCase(addLedgerAccountId.fulfilled, (state, { payload, meta: { arg: { accountId } } }) => {
+ set(state, ['signInWithLedgerStatus'], 'confirm-accounts');
+ set(state, ['signInWithLedger', accountId, 'status'], 'success');
+ });
+ builder.addCase(addLedgerAccountId.rejected, (state, { error, meta: { arg: { accountId } } }) => {
+ set(state, ['signInWithLedgerStatus'], 'confirm-accounts');
+
+ const transportError = error?.name === 'TransportStatusError';
+ set(state, ['signInWithLedger', accountId, 'status'], transportError ? 'rejected' : 'error');
+ });
})
});
| 9 |
diff --git a/src/modules/auth/actions.js b/src/modules/auth/actions.js @@ -109,6 +109,7 @@ export const setUser = (user) => (dispatch) => {
};
export const logout = () => (dispatch) => {
- formiojs.logout();
+ formiojs.logout().then(() => {
dispatch(logoutUser());
+ });
};
| 1 |
diff --git a/chunk-worker.js b/chunk-worker.js @@ -278,11 +278,11 @@ const _handleMessage = data => {
const {method} = data;
switch (method) {
case 'loadPotentials': {
- const {seed: seedData, meshId, x, y, z, baseHeight, freqs, octaves, scales, uvs, amps, potentials, parcelSize, subparcelSize} = data;
+ const {seed: seedData, meshId, x, y, z, baseHeight, freqs, octaves, scales, uvs, amps, potentials, force, parcelSize, subparcelSize} = data;
const chunk = _getChunk(meshId, subparcelSize);
const slab = chunk.getSlab(x, y, z);
- if (!slab) {
+ if (!slab || force) {
const shiftsData = [x*subparcelSize, y*subparcelSize, z*subparcelSize];
const genSpec = _makeLandPotentials(seedData, baseHeight, freqs, octaves, scales, uvs, amps, shiftsData, parcelSize, subparcelSize);
if (potentials) {
@@ -290,8 +290,12 @@ const _handleMessage = data => {
genSpec.potentials[i] += potentials[i];
}
}
+ if (slab) {
+ slab.potentials.set(genSpec.potentials);
+ } else {
chunk.setSlab(x, y, z, genSpec.potentials);
}
+ }
self.postMessage({
result: {},
| 0 |
diff --git a/src/index.js b/src/index.js @@ -130,6 +130,9 @@ class Offline {
disableCookieValidation: {
usage: 'Used to disable cookie-validation on hapi.js-server',
},
+ enforceSecureCookies: {
+ usage: 'Enforce Secure Cookies',
+ },
},
},
};
@@ -301,25 +304,47 @@ class Offline {
this.server.register(require('h2o2'), err => err && this.serverlessLog(err));
- const connectionOptions = {
- host: this.options.host,
- port: this.options.port,
- state: {
+ const insecureCookieState = {
isHttpOnly: false,
isSecure: false,
isSameSite: false,
- },
};
+
+ const secureCookieState = {
+ isHttpOnly: true,
+ isSecure: true,
+ isSameSite: false,
+ };
+
+ const connectionOptions = {
+ host: this.options.host,
+ port: this.options.port,
+ };
+
const httpsDir = this.options.httpsProtocol;
// HTTPS support
if (typeof httpsDir === 'string' && httpsDir.length > 0) {
+ // Set secure cookie ONLY if enforceSecureCookies is not defined (DEFAULT)
+ connectionOptions.state = typeof(this.options.enforceSecureCookies) == 'undefined'?secureCookieState:undefined;
connectionOptions.tls = {
key: fs.readFileSync(path.resolve(httpsDir, 'key.pem'), 'ascii'),
cert: fs.readFileSync(path.resolve(httpsDir, 'cert.pem'), 'ascii'),
};
}
+ if( this.options.enforceSecureCookies ) {
+ // Always enforce even if HTTP
+ connectionOptions.state = secureCookieState;
+ }
+
+ if( !connectionOptions.state ) {
+ // DEFAULT state is to not be secure
+ // HTTP & enforceSecureCookies = undefined
+ // HTTP/HTTPS & enforceSecureCookies = false
+ connectionOptions.state = insecureCookieState;
+ }
+
// Passes the configuration object to the server
this.server.connection(connectionOptions);
| 0 |
diff --git a/src/components/MapTable/MapTable.styles.js b/src/components/MapTable/MapTable.styles.js @@ -67,7 +67,7 @@ export const MainContainer: ComponentType<*> = (() => {
grid-template-rows: 660px 1fr;
@media only screen and (max-width: 768px) {
- grid-template-rows: 660px 1fr auto;
+ grid-template-rows: auto 660px auto;
grid-row: 2/4;
}
@@ -85,12 +85,13 @@ export const MainContainer: ComponentType<*> = (() => {
export const TabContainer: ComponentType<*> = (() => {
return styled.div`
- grid-column: 1;
+ grid-column: 2;
grid-row: 1/-1;
@media only screen and (max-width: 768px) {
height: unset;
grid-column: 1/-1;
+ grid-row: 2/-1;
}
& .govuk-tabs__panel {
@@ -102,7 +103,6 @@ export const TabContainer: ComponentType<*> = (() => {
}
@media only screen and (max-width: 768px) {
- width: 100%;
max-height: none;
}
}
@@ -113,12 +113,11 @@ export const ChildrenContainer: ComponentType<*> = (() => {
return styled.div`
grid-column: 2;
grid-row: 2;
- // height: 600px;
@media only screen and (max-width: 768px) {
height: unset;
- grid-column: 1;
- grid-row: 3;
+ grid-column: 1/-1;
+ grid-row: 1;
}
`;
})();
| 7 |
diff --git a/packages/openneuro-server/datalad/snapshots.js b/packages/openneuro-server/datalad/snapshots.js @@ -76,7 +76,12 @@ const createIfNotExistsDoi = async (
if (config.doi.username && config.doi.password) {
// Mint a DOI
// Get the newest description
- const snapshotDoi = 'mockDOI'
+ const oldDesc = await description({}, { datasetId, revision: 'HEAD' })
+ const snapshotDoi = await doiLib.registerSnapshotDoi(
+ datasetId,
+ tag,
+ oldDesc,
+ )
if (snapshotDoi) descriptionFieldUpdates['DatasetDOI'] = snapshotDoi
else throw new Error('DOI minting failed.')
}
| 13 |
diff --git a/src/pages/item/index.js b/src/pages/item/index.js @@ -40,6 +40,25 @@ dayjs.extend(relativeTime);
const CraftsTable = React.lazy(() => import('../../components/crafts-table'));
+const loadingData = {
+ name: 'Loading...',
+ types: [],
+ iconLink: `${process.env.PUBLIC_URL}/images/unknown-item-icon.jpg`,
+ sellFor: [
+ {
+ source: 'fleaMarket',
+ price: 0,
+ },
+ ],
+ buyFor: [
+ {
+ source: 'flea-market',
+ price: 0,
+ requirements: [],
+ },
+ ],
+};
+
function TraderPrice({ currency, price }) {
if (currency === 'USD') {
return (
@@ -117,7 +136,7 @@ function Item() {
!currentItemData &&
(itemStatus === 'idle' || itemStatus === 'loading')
) {
- return <Loading />;
+ currentItemData = loadingData;
}
if (
@@ -268,6 +287,8 @@ function Item() {
alt={currentItemData.name}
className={'item-image'}
loading="lazy"
+ height={62}
+ width={62}
src={currentItemData.iconLink}
/>
</h1>
@@ -323,7 +344,6 @@ function Item() {
>
<img
alt="Flea market"
- loading="lazy"
height="86"
width="86"
src={`${process.env.PUBLIC_URL}/images/flea-market-icon.jpg`}
@@ -413,7 +433,6 @@ function Item() {
currentItemData.traderName
}
height="86"
- loading="lazy"
width="86"
src={`${
process.env
| 7 |
diff --git a/src/trumbowyg.js b/src/trumbowyg.js @@ -588,7 +588,7 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', {
}, 200);
})
.on('mouseup keydown keyup', function () {
- if(!e.ctrlKey) {
+ if ((!e.ctrlKey && !e.metaKey) || e.altKey) {
setTimeout(function () { // "hold on" to the ctrl key for 200ms
ctrl = false;
}, 200);
| 4 |
diff --git a/src/action.js b/src/action.js @@ -163,7 +163,7 @@ class Action extends Emitter {
link(actions) {
let outstanding = actions.length
- const onDone = () => {
+ const onResolve = () => {
outstanding -= 1
if (outstanding <= 0) {
@@ -172,8 +172,8 @@ class Action extends Emitter {
}
actions.forEach(action => {
- action.onDone(onDone)
- action.onCancel(onDone)
+ action.onDone(onResolve)
+ action.onCancel(onResolve)
action.onError(this.reject)
})
| 10 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.