code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/src/css/custom.css b/src/css/custom.css --docusaurus-highlighted-code-line-bg: rgba(71, 128, 220, 0.4); } +/* prevent fonts from looking so chunky, esp in FF */ +body { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + /* For readability concerns, you should choose a lighter palette in dark mode. */ [data-theme="light"] { --ifm-font-color-base: #2e3138
7
diff --git a/source/Renderer/shaders/pbr.frag b/source/Renderer/shaders/pbr.frag @@ -35,21 +35,6 @@ void main() #if ALPHAMODE == ALPHAMODE_OPAQUE baseColor.a = 1.0; -#endif - -#ifdef MATERIAL_UNLIT -#if ALPHAMODE == ALPHAMODE_MASK - if (baseColor.a < u_AlphaCutoff) - { - discard; - } -#endif - g_finalColor = (vec4(linearTosRGB(baseColor.rgb), baseColor.a)); - -#if DEBUG == DEBUG_NONE - return; -#endif - #endif vec3 v = normalize(u_Camera - v_Position); @@ -227,8 +212,6 @@ void main() f_emissive *= texture(u_EmissiveSampler, getEmissiveUV()).rgb; #endif - vec3 color = vec3(0); - // Layer blending float clearcoatFactor = 0.0; @@ -246,9 +229,14 @@ void main() vec3 diffuse = f_diffuse; #endif + vec3 color = vec3(0); +#ifdef MATERIAL_UNLIT + color = baseColor.rgb; +#else color = f_emissive + diffuse + f_specular; color = f_sheen + color * albedoSheenScaling; color = color * (1.0 - clearcoatFactor * clearcoatFresnel) + f_clearcoat; +#endif #if DEBUG == DEBUG_NONE
9
diff --git a/src/main/webapp/resources/js/viewer/guiInput.js b/src/main/webapp/resources/js/viewer/guiInput.js @@ -17,8 +17,10 @@ function GuiInput(navigationController, controller, gui, textViewer, selector, c // button registration $("#viewer").contextmenu(() => { + if(_controller.getMode() !== Mode.TEXT && !(_gui.isTextLineContentActive() || _textViewer.isOpen())){ _controller.openContextMenu(true); return false; //prevents default contextmenu + } }); let block_mode_switch = false; $('.mode').click(function(){
11
diff --git a/package.json b/package.json { "name": "uk-covid19-dashboard", - "version": "2.10.11", + "version": "2.10.12", "private": true, "homepage": "https://coronavirus.data.gov.uk/", "dependencies": { "lodash.clonedeep": "^4.5.0", "mapbox-gl": "^1.13.1", "moment": "^2.29.1", - "node-sass": "^6.0.1", + "node-sass": "^4.11.0", "numeral": "^2.0.6", "plotly.js": "^2.2.1", "react": "^17.0.2", "react-plotly.js": "^2.5.1", "react-router": "^5.2.0", "react-router-dom": "^5.2.0", - "react-scripts": "^4.0.3", + "react-scripts": "^3.4.4", "react-select": "^4.3.1", "react-spinners": "^0.11.0", "react-syntax-highlighter": "^15.4.3", "scripts": { "lint": "yarn flow", "start": "unset HOST && react-scripts start", - "build": "unset HOST && export NODE_OPTIONS=--max-old-space-size=8192 && react-scripts build", + "build": "unset HOST && export NODE_OPTIONS=--max-old-space-size=8192 && react-scripts build && node scripts/patchUrls.js", "ppostbuild": "react-snap", "test": "react-scripts test", "eject": "react-scripts eject"
13
diff --git a/articles/quickstart/spa/_includes/_auth_service_method_description_auth0js.md b/articles/quickstart/spa/_includes/_auth_service_method_description_auth0js.md @@ -4,7 +4,7 @@ When you set up the `AuthService` service, you create an instance of the `auth0. * Audience and scope, which specify that authentication must be [OIDC-conformant](/api-auth/intro) * The URL where your users are redirected to after authentication. ::: note -In this tutorial, the route is `/callback`, which is implemented in the Add a Callback Component step. +In this tutorial, the route is `/callback`, which is implemented in the [Add a Callback Component](#add-a-callback-component) step. ::: Your users authenticate at the Auth0 hosted login page. They are then redirected back to your application. Their redirect URLs contain a hash fragment with each user's authentication information:
0
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -219,7 +219,7 @@ jobs: command: | git clone [email protected]:luniehq/lunie-browser-extension.git . - attach_workspace: - at: /tmp/voyager/lunie-browser-extension/lunie + at: /tmp/voyager/lunie - yarn-install-extension - setup_remote_docker - run:
4
diff --git a/flows/samples/9_turbomode.tag b/flows/samples/9_turbomode.tag @@ -11,14 +11,14 @@ else if p1 equals to 'on' fs = require('fs'); fs.remove('tagui_header.js'); fs.remove('tagui_chrome.php'); run curl -k -s -L -o tagui_header.js https://github.com/kelaberetiv/TagUI/files/6935769/tagui_header_core.txt run curl -k -s -L -o tagui_chrome.php https://github.com/kelaberetiv/TagUI/files/6935768/tagui_chrome_core.txt - echo [TAGUI] done + echo [TAGUI] done, turbo mode activated else if p1 equals to 'off' echo [TAGUI] reverting to production edition fs = require('fs'); fs.remove('tagui_header.js'); fs.remove('tagui_chrome.php'); run curl -k -s -L -o tagui_header.js https://raw.githubusercontent.com/kelaberetiv/TagUI/master/src/tagui_header.js run curl -k -s -L -o tagui_chrome.php https://raw.githubusercontent.com/kelaberetiv/TagUI/master/src/tagui_chrome.php - echo [TAGUI] done + echo [TAGUI] done, turbo mode deactivated else echo [USAGE] provide on / off as parameter
7
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/envVarList.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/envVarList.js @@ -44,9 +44,7 @@ RED.editor.envVarList = (function() { }).attr("autocomplete","disable").appendTo(envRow); var types = (opt.ui && opt.ui.opts && opt.ui.opts.types); if (!types) { - types = isTemplateNode - ? DEFAULT_ENV_TYPE_LIST - : DEFAULT_ENV_TYPE_LIST_INC_CRED; + types = isTemplateNode ? DEFAULT_ENV_TYPE_LIST : DEFAULT_ENV_TYPE_LIST_INC_CRED; } valueField.typedInput({default:'str',types:types}); valueField.typedInput('type', opt.type);
2
diff --git a/src/core-layers/screen-grid-layer/screen-grid-layer.js b/src/core-layers/screen-grid-layer/screen-grid-layer.js @@ -23,7 +23,6 @@ const {defaultColorRange, quantizeScale} = experimental; import {GL, Model, Geometry} from 'luma.gl'; import {lerp} from './../../core/utils/math-utils'; -import log from './../../core/utils/log'; import vs from './screen-grid-layer-vertex.glsl'; import fs from './screen-grid-layer-fragment.glsl'; @@ -49,9 +48,6 @@ export default class ScreenGridLayer extends Layer { const attributeManager = this.getAttributeManager(); const {gl} = this.context; - if (this.props.minColor || this.props.maxColor) { - log.deprecated('minColor and maxColor', 'colorRange, colorDomain')(); - } /* eslint-disable max-len */ attributeManager.addInstanced({ instancePositions: {size: 3, update: this.calculateInstancePositions},
2
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/assetview/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/assetview/template.vue }, moveAsset() { let root = '/content/assets' - let selectedPath = this.asset.path - let currentPath = selectedPath.substr(0, selectedPath.lastIndexOf('/')) + let type = 'folder' + let assetPath = this.asset.path + let selectedPath = assetPath.substr(0, assetPath.lastIndexOf('/')) + let currentPath + // is selectedPath the root dir? + selectedPath === root + ? currentPath = selectedPath + : currentPath = selectedPath.substr(0, selectedPath.lastIndexOf('/')) const initModalState = { root: root, - type: 'asset', + type: type, current: currentPath, selected: selectedPath } const options = { complete: () => { - const newValue = $perAdminApp.getNodeFromView('/state/pathbrowser/selected') - $perAdminApp.stateAction('moveAsset', { path: selectedPath, to: newValue, type: 'child'}) - $perAdminApp.getNodeFromView('/state/tools').assets = newValue + const newPath = $perAdminApp.getNodeFromView('/state/pathbrowser/selected') + $perAdminApp.stateAction('moveAsset', { path: assetPath, to: newPath, type: 'child'}) + $perAdminApp.getNodeFromView('/state/tools').assets = newPath $perAdminApp.getNodeFromView('/state/tools').asset = null } }
7
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,15 @@ 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.35.1] -- 2018-03-08 + +### Fixed +- Fix `scatterpolar` in dist and CDN bundles + (due to `browser-pack-flat` discrepancy introduced in 1.35.0) [#2458] +- Fix removing and adding scatter(gl) as not the first module [#2455] +- Ensure we don't draw ticks if there are none to draw [#2454] + + ## [1.35.0] -- 2018-03-07 ### Added
3
diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js @@ -519,9 +519,10 @@ function fetchIOUReportByID(iouReportID, chatReportID, shouldRedirectIfEmpty = f * fetching the iouReport and therefore should only be called if we are certain that the fetched iouReport is currently * open - else we would overwrite the existing open iouReportID with a closed iouReportID. * - * Examples of usage include 'receieving a push notification', or 'paying an IOU', because both of these cases can only - * occur for an iouReport that is currently open (notifications are not sent for closed iouReports, and you cannot pay a - * closed IOU). + * Examples of correct usage include 'receieving a push notification', or 'paying an IOU', because both of these cases can only + * occur for an iouReport that is currently open (notifications are not sent for closed iouReports, and you cannot pay a closed + * IOU). Send Money is an incorrect use case, because these IOUReports are never associated with the chatReport and this would + * prevent outstanding IOUs from showing. * * @param {Number} iouReportID - ID of the report we are fetching * @param {Number} chatReportID - associated chatReportID, used to sync the reports @@ -647,6 +648,8 @@ function updateReportWithNewAction( if (reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && reportAction.originalMessage.IOUReportID) { const iouReportID = reportAction.originalMessage.IOUReportID; + // If the IOUDetails object exists we are in the Send Money flow, and we should not fetch and update the chat report + // as this would overwrite any existing IOUs. See the fetchIOUReportByIDAndUpdateChatReport for more information. if (reportAction.originalMessage.IOUDetails === undefined) { // We know this iouReport is open because reportActions of type CONST.REPORT.ACTIONS.TYPE.IOU can only be
7
diff --git a/token-metadata/0x2f3e054D233c93C59140c0905227c7C607c70cbb/metadata.json b/token-metadata/0x2f3e054D233c93C59140c0905227c7C607c70cbb/metadata.json "symbol": "COOM", "address": "0x2f3e054D233c93C59140c0905227c7C607c70cbb", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/planet.js b/planet.js @@ -399,6 +399,7 @@ planet.getSubparcelByIndex = index => { } return subparcel; }; +planet.peekSubparcelByIndex = index => subparcels[index] || null; planet.getSubparcel = (x, y, z) => { const index = _getSubparcelIndex(x, y, z); let subparcel = subparcels[index]; @@ -407,6 +408,7 @@ planet.getSubparcel = (x, y, z) => { } return subparcel; }; +planet.peekSubparcel = (x, y, z) => subparcels[_getSubparcelIndex(x, y, z)] || null; planet.editSubparcel = (x, y, z, fn) => { let index = _getSubparcelIndex(x, y, z); if (!subparcels[index]) {
0
diff --git a/procgen/map-gen.js b/procgen/map-gen.js @@ -102,8 +102,10 @@ export class MapBlock extends THREE.Vector3 { } } export class MapChunk { - constructor(blocks) { + constructor(blocks, width, height) { this.blocks = blocks; + this.width = width; + this.height = height; } getExitBlocks() { return this.blocks.filter(block => block.exitTarget); @@ -111,16 +113,19 @@ export class MapChunk { } export const createMapChunk = (seed = 'map', x = 0, y = 0) => { + const width = numBlocksPerChunk; + const height = numBlocksPerChunk; + // generate blocks - const blocks = new Array(numBlocksPerChunk * numBlocksPerChunk); + const blocks = new Array(width * height); const rng = makeRng(seed, x, y); const r = () => -1 + 2 * rng(); // blocks - for (let y = 0; y < numBlocksPerChunk; y++) { - for (let x = 0; x < numBlocksPerChunk; x++) { - const index = x + y * numBlocksPerChunk; + for (let y = 0; y < height; y++) { + for (let x = 0; x < width; x++) { + const index = x + y * width; const block = new MapBlock(x, y); blocks[index] = block; } @@ -132,16 +137,17 @@ export const createMapChunk = (seed = 'map', x = 0, y = 0) => { const localExits = shuffle(sides.slice(), rng).slice(0, numExits); for (const side of localExits) { let [ox, oy] = sideOffsets[side]; - ox *= numBlocksPerChunk - 1; - oy *= numBlocksPerChunk - 1; + ox *= width - 1; + oy *= height - 1; const [cx, cy] = sideCrossAxes[side]; - const v = Math.floor(rng() * numBlocksPerChunk); + const vx = Math.floor(rng() * width); + const vy = Math.floor(rng() * height); - const x = ox + v * cx; - const y = oy + v * cy; + const x = ox + vx * cx; + const y = oy + vy * cy; - const block = blocks[x + y * numBlocksPerChunk]; + const block = blocks[x + y * width]; block.exitTarget = true; pathCandidates.push(block); @@ -150,10 +156,10 @@ export const createMapChunk = (seed = 'map', x = 0, y = 0) => { // centers const numCenters = Math.floor(rng() * (2 + 1)); for (let i = 0; i < numCenters; i++) { - const x = 1 + Math.floor(rng() * (numBlocksPerChunk - 2)); - const y = 1 + Math.floor(rng() * (numBlocksPerChunk - 2)); + const x = 1 + Math.floor(rng() * (width - 2)); + const y = 1 + Math.floor(rng() * (height - 2)); - const block = blocks[x + y * numBlocksPerChunk]; + const block = blocks[x + y * width]; block.centerTarget = true; pathCandidates.push(block); @@ -197,10 +203,10 @@ export const createMapChunk = (seed = 'map', x = 0, y = 0) => { const x = Math.round(point.x); const y = Math.round(point.z); - if (x >= 0 && x < numBlocksPerChunk && y >= 0 && y < numBlocksPerChunk) { + if (x >= 0 && x < width && y >= 0 && y < height) { splinePoints[i] = point.clone(); - const index = x + y * numBlocksPerChunk; + const index = x + y * width; const block = blocks[index]; block.splinePoint = true; } else { @@ -227,8 +233,8 @@ export const createMapChunk = (seed = 'map', x = 0, y = 0) => { for (const dx of [-1, 1]) { const x = Math.round(point.x); const y = Math.round(point.z); - if (x >= 0 && x < numBlocksPerChunk && y >= 0 && y < numBlocksPerChunk) { - const index = x + y * numBlocksPerChunk; + if (x >= 0 && x < width && y >= 0 && y < height) { + const index = x + y * width; const block = blocks[index]; block.path = true; } @@ -291,6 +297,7 @@ export const createMapChunk = (seed = 'map', x = 0, y = 0) => { }); _connectBlocks(deepestEntry.block, unseenPathCandidates[0]); } - const chunk = new MapChunk(blocks); + + const chunk = new MapChunk(blocks, width, height); return chunk; }; \ No newline at end of file
0
diff --git a/iris/mutations/channel/createChannel.js b/iris/mutations/channel/createChannel.js @@ -41,9 +41,12 @@ export default async ( ); } - // if the current user is not the owner of the parent community + // if the current user is not the owner or moderator of the parent community // they can not create channels - if (!currentUserCommunityPermissions.isOwner) { + if ( + !currentUserCommunityPermissions.isOwner && + !currentUserCommunityPermissions.isModerator + ) { return new UserError( "You don't have permission to create a channel in this community." );
11
diff --git a/packages/idyll-docs/components/example.js b/packages/idyll-docs/components/example.js import { Link } from '../routes'; -const imageUrl = (url) => /^http/.test(url) ? url : `/static/images/${url}` +const imageUrl = url => (/^http/.test(url) ? url : `/static/images/${url}`); -function slugify(text) -{ - return text.toString().split(/([A-Z][a-z]+)/).join('-').toLowerCase() +function slugify(text) { + return text + .toString() + .split(/([A-Z][a-z]+)/) + .join('-') + .toLowerCase() .replace(/\s+/g, '-') // Replace spaces with - .replace(/[^\w\-]+/g, '') // Remove all non-word chars .replace(/\-\-+/g, '-') // Replace multiple - with single - @@ -12,60 +15,58 @@ function slugify(text) .replace(/-+$/, ''); // Trim - from end of text } - export default ({ href, label, subtitle, image, sourceUrl }) => ( <div className="example"> - <Link route='gallery-item' params={{slug: slugify(label)}}> - <a> <div className="example-image" style={{ backgroundImage: `url(${imageUrl(image)})` }} - > - { - sourceUrl ? <div> - <div style={{ - padding: 10, - background: '#fff', - width: 125, - margin: '0 auto', - textAlign: 'center', - border: 'solid 1px black', - color: 'black', - position: 'relative', - top: 5 - }}> - Source Available - </div> - </div> : null - } + /> + <div className="example-label"> + {label} + {subtitle ? <div className="subtitle">{subtitle}</div> : null} </div> - <div className="example-label">{ label } - { - subtitle ? ( - <div className="subtitle">{subtitle}</div> - ) : null - } - </div> - </a> + <div className="example-links"> + <Link href={href}> + <a className="example-button">Open</a> + </Link> + {sourceUrl ? ( + <Link href={sourceUrl}> + <a className="example-button">View Source</a> </Link> + ) : null} + </div> <style jsx>{` .example { border: solid 2px #efefef; background: #efefef; transition: border 0.25s, background 0.25s, color 0.25s; - cursor: pointer; } - .example:hover { - border: solid 2px #6122FB; - background: #6122FB; + .example-links { + display: flex; + flex-direction: row; + margin-bottom: 1em; + justify-content: space-around; + width: 100%; } - .example:hover .example-label { - background: #6122FB; - color: white; + + .example-button { + display: block; + padding: 10px + background: #fff; + width: 125px; + text-align: center; + border: solid 1px black; + color: black; + cursor: pointer; } + .example-button:hover { + transition: border 0.25s, background 0.25s, color 0.25s; + color: white; + background: #6122FB; + } .example a { display: block; @@ -79,6 +80,7 @@ export default ({ href, label, subtitle, image, sourceUrl }) => ( background: #efefef; padding: 15px; transition: background 0.25s, color 0.25s; + min-height: 85px; } .example-label .subtitle { font-weight: normal; @@ -93,4 +95,4 @@ export default ({ href, label, subtitle, image, sourceUrl }) => ( } `}</style> </div> -) \ No newline at end of file +);
2
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js that.typeMap[result.value] = result; return result; }); + if (this.typeList.length < 2) { + this.selectTrigger.attr("tabindex", -1) + } else { + this.selectTrigger.attr("tabindex", 0) + } this.selectTrigger.toggleClass("disabled", this.typeList.length === 1); this.selectTrigger.find(".fa-caret-down").toggle(this.typeList.length > 1) if (this.menu) {
2
diff --git a/bin/oref0-mdt-trend.js b/bin/oref0-mdt-trend.js @@ -56,11 +56,15 @@ if (!module.parent) { continue; } + if (record.sgv == 0) + { + continue; + } var used_records = 0; for (var j = 0; j < max_entries; j++) { var past_record = last_entries[j]; - if (typeof past_record == "undefined") + if (typeof past_record == "undefined" || past_record.sgv == 0) { continue; }
8
diff --git a/lib/services/query/castUpdate.js b/lib/services/query/castUpdate.js @@ -231,6 +231,10 @@ function walkUpdatePath(schema, obj, op, strict, context, pref) { hasError = true; _handleCastError(error, context, key, aggregatedError); } + + if (Array.isArray(obj[key]) && (op === '$addToSet' || op === '$push') && key !== '$each') { + obj[key] = { $each: obj[key] }; + } } } } @@ -311,11 +315,7 @@ function castUpdateVal(schema, val, op, $conditional, context) { // Ensures embedded documents get ObjectIds etc. var tmp = schema.cast(val); if (Array.isArray(val)) { - if (op === '$push' || op === '$addToSet') { - val = { $each: tmp }; - } else { val = tmp; - } } else if (Array.isArray(tmp)) { val = tmp[0]; } else {
1
diff --git a/cy_scripts/should-deploy.js b/cy_scripts/should-deploy.js @@ -88,6 +88,7 @@ function lastDeployedCommit (env) { const changedFilesSince = (branchName) => (sha) => { la(is.unemptyString(branchName), 'missing branch name', branchName) + debug('finding files changed in branch %s since commit %s', branchName, sha) return git.changedFilesAfter(sha, branchName) .then(tap((list) => { debug('%s changed since last docs deploy in branch %s', @@ -96,6 +97,9 @@ const changedFilesSince = (branchName) => (sha) => { })) } +// if something fails, then assume there are changes to deploy +const assumeChangesOnProblem = T + function docsFilesChangedSinceLastDeploy (env, branchName) { return lastDeployedCommit(env) .then(changedFilesSince(branchName)) @@ -108,6 +112,7 @@ function docsFilesChangedSinceLastDeploy (env, branchName) { console.log('in branch %s against environment %s', branchName, env) })) .then(docsChanged) + .catch(assumeChangesOnProblem) .then(tap((hasDocumentChanges) => { console.log('has document changes?', hasDocumentChanges) }))
9
diff --git a/src/components/modeler/XMLManager.js b/src/components/modeler/XMLManager.js @@ -23,16 +23,54 @@ export default class XMLManager { definitions.exporter = 'ProcessMaker Modeler'; definitions.exporterVersion = '1.0'; + // Clean broken references when loading definitions + this.cleanBrokenReferences(definitions); + resolve(definitions); }); }); } + cleanBrokenReferences(definitions) { + const { rootElements, diagrams } = definitions; + const removed = []; + + // Remove broken bpmn:SequenceFlow from bpmn:Process + rootElements.forEach(element => { + if (element.$type === 'bpmn:Process' && element.flowElements) { + element.flowElements = element.flowElements.filter(child => { + if (child.$type === 'bpmn:SequenceFlow') { + if (!(child.sourceRef && child.targetRef)) { + removed.push(child); + } + return child.sourceRef && child.targetRef; + } + return true; + }); + } + }); + + // Remove BPMNEdge from bpmndi:BPMNDiagram + diagrams.forEach(element => { + if (element.$type === 'bpmndi:BPMNDiagram' && element.plane && element.plane.planeElement) { + element.plane.planeElement = element.plane.planeElement.filter(child => { + if (child.$type === 'bpmndi:BPMNEdge') { + return child.bpmnElement && !removed.includes(child.bpmnElement); + } + return true; + }); + } + }); + } + download() { if (!this.#definitions) { return; } + // Clean broken references before save the definitions + this.cleanBrokenReferences(this.#definitions); + this.#moddle.toXML(this.#definitions, { format: true }, (err, xml) => { if (err) { alert(err);
1
diff --git a/token-metadata/0xFFc63b9146967A1ba33066fB057EE3722221aCf0/metadata.json b/token-metadata/0xFFc63b9146967A1ba33066fB057EE3722221aCf0/metadata.json "symbol": "A", "address": "0xFFc63b9146967A1ba33066fB057EE3722221aCf0", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/index.js b/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/index.js @@ -126,6 +126,10 @@ function init(_settings, _runtime) { } else { activeProject = globalSettings.projects.activeProject; } + if (!globalSettings.projects.projects) { + globalSettings.projects.projects = {}; + saveSettings = true; + } if (settings.flowFile) { // if flowFile is a known project name - use it if (globalSettings.projects.projects.hasOwnProperty(settings.flowFile)) { @@ -133,14 +137,19 @@ function init(_settings, _runtime) { globalSettings.projects.activeProject = settings.flowFile; saveSettings = true; } else { - // if it resolves to a dir - use it... but: - // - where to get credsecret from? - // - what if the name clashes with a known project? - - // var stat = fs.statSync(settings.flowFile); - // if (stat && stat.isDirectory()) { - // activeProject = settings.flowFile; - // } + // if it resolves to a dir - use it + var stat = fs.statSync(fspath.join(projectsDir,settings.flowFile)); + if (stat && stat.isDirectory()) { + activeProject = settings.flowFile; + globalSettings.projects.activeProject = activeProject; + // Now check for a credentialSecret + if (settings.credentialSecret !== undefined) { + globalSettings.projects.projects[settings.flowFile] = { + credentialSecret: settings.credentialSecret + } + saveSettings = true; + } + } } } if (!activeProject) {
11
diff --git a/src/components/bio.js b/src/components/bio.js @@ -16,7 +16,7 @@ const Bio = () => { <a href="https://github.com/nas5w/typeofnan-javascript-quizzes"> Star this repo on Github </a>{' '} - to follow along as new questions are added! + to follow along as new questions are added! Created by <a href="https://twitter.com/nas5w">Nick Scialli</a> and many other contributors listed below! </p> </div> );
0
diff --git a/assets/js/components/link.js b/assets/js/components/link.js @@ -42,6 +42,11 @@ class Link extends Component { id, } = this.props; const SemanticLink = href ? 'a' : 'button'; + // Note: the disabled attribute does not alter behavior of anchor tags, + // hence the conditional click handler. + const clickHandler = disabled ? + ( e ) => e.preventDefault() : + onClick; return ( <SemanticLink @@ -58,11 +63,12 @@ class Link extends Component { ${ danger ? 'googlesitekit-cta-link--danger' : '' } ${ disabled ? 'googlesitekit-cta-link--disabled' : '' } ` } - onClick={ onClick } + onClick={ clickHandler } id={ id } href={ href ? href : undefined } target={ external ? '_blank' : undefined } rel={ external ? 'noopener noreferrer' : undefined } + disabled={ disabled } > { children } </SemanticLink>
3
diff --git a/components/maplibre/ban-map/layers.js b/components/maplibre/ban-map/layers.js @@ -48,6 +48,50 @@ const getColors = () => { return [...array] } + +export const positionsCircleLayer = { + id: 'positions', + source: 'positions', + type: 'circle', + paint: { + 'circle-color': ['match', ['get', 'type'], ...getColors(), '#000'], + 'circle-stroke-color': [ + 'case', + ['boolean', ['feature-state', 'hover'], false], + theme.primary, + '#fff' + ], + 'circle-stroke-width': [ + 'case', + ['boolean', ['feature-state', 'hover'], false], + 3, + 1 + ], + 'circle-radius': { + stops: [ + [12, 0.8], + [17, 6] + ] + } + } +} + +export const positionsLabelLayer = { + id: 'positions-label', + source: 'positions', + type: 'symbol', + paint: { + 'text-color': ['match', ['get', 'type'], ...getColors(), '#000'] + }, + layout: { + 'text-font': ['Noto Sans Bold'], + 'text-field': ['get', 'type'], + 'text-ignore-placement': false, + 'text-variable-anchor': ['bottom'], + 'text-radial-offset': 1 + } +} + export const adresseCircleLayer = { id: 'adresse', source: 'base-adresse-nationale',
0
diff --git a/run_tests.py b/run_tests.py @@ -187,7 +187,7 @@ def main(argv): argv, "hs:p:o:", [ "sketch=", "plugin=", "outputFilePath="]) except getopt.GetoptError: - print('test.py -s <sketch> -p <plugin> -o <outputFilePath>') + print('run_tests.py -s <sketch> -p <plugin> -o <outputFilePath>') sys.exit(2) for opt, arg in opts:
1
diff --git a/src/sections/Projects/Project-grid/projectGrid.style.js b/src/sections/Projects/Project-grid/projectGrid.style.js @@ -182,16 +182,12 @@ export const ProjectWrapper = styled.div` grid-column: 3/6; grid-row: 7/8; img{ - width: 150px; + width: 6rem; align-self: center; - margin-top: 8px; margin: auto; @media only screen and (min-width: 780px) { align-self: flex-start; - margin-top: 15px; - - } } h5{ @@ -203,15 +199,12 @@ export const ProjectWrapper = styled.div` } .project__card-container-seven{ max-width: 100%; - height: 10rem; - width: 12rem; display: flex; flex-direction: column; justify-content: space-between; img{ align-self: center; - - max-width: 200%; + max-width: 100%; max-height: 100%; }
1
diff --git a/src/components/Backtester/reports/HistoricalReport.js b/src/components/Backtester/reports/HistoricalReport.js @@ -11,6 +11,7 @@ export default (opts, results, backtestData, backtestOptions) => { const { indicators } = opts const { candles = [] } = backtestData const { tf } = backtestOptions + const hasCandles = candles.length !== 0 // convert candles to array for the chart const candleArr = Object.values(candles).map(c => ( @@ -30,7 +31,7 @@ export default (opts, results, backtestData, backtestOptions) => { results={results} execRunning={false} /> - {candles.length && ( + {hasCandles && ( <AutoSizer disableHeight style={{ height: 400 }}> {({ width, height = 400 }) => ( <BFXChart
1
diff --git a/frontend/src/styles/pages/person.scss b/frontend/src/styles/pages/person.scss position: absolute; top: 0; left: 0; - height: 300px; + height: 235px; width: 100%; background-position: center; background-size: cover; - // background-attachment: fixed; background-repeat: no-repeat; - // opacity: 0.2; + opacity: 0.8; overflow: hidden; filter: grayscale(1) brightness(0.5); transform: translateZ(0); - // transition: background-position 0.05s linear; + top: -25px; + left: -20px; + right: -20px; + width: calc(100% + 40px); @include media-breakpoint-up(md) { background-position: 50% 200%; background-size: 100% auto; - height: 50vh; + height: calc(50vh - 65px); background-attachment: fixed; } left: -50px; right: -50px; width: calc(100% + 100px); + opacity: 1; } } left: 0; height: 200px; width: 100%; - background: rgba(black, 0.2); z-index: -1; } }
1
diff --git a/src/normalizers/cookies.js b/src/normalizers/cookies.js @@ -14,7 +14,7 @@ export default (req, cookies) => { const headerCookie = cookie && ((headers && headers.cookie) || req.getHeader('Cookie')); - if (headerCookie && cookie) { + if (headerCookie && cookie && cookie.parse) { if (cookies) { const parsedCookie = cookie.parse(headerCookie); for (const cookie in parsedCookie) {
1
diff --git a/src/js/core/bindEventListeners.js b/src/js/core/bindEventListeners.js @@ -17,7 +17,7 @@ export default function bindEventListeners() { document.body.classList.add('tippy-touch') } - if (Browser.dynamicInputDetection) { + if (Browser.dynamicInputDetection && window.performance) { document.addEventListener('mousemove', mousemoveHandler) } } @@ -26,12 +26,13 @@ export default function bindEventListeners() { let time return () => { - const now = performance && performance.now() + const now = performance.now() - if (now && now - time < 10) { + // Chrome 60+ is 1 mousemove per rAF, use 20ms time difference + if (now - time < 20) { Browser.touch = false document.removeEventListener('mousemove', mousemoveHandler) - if ( ! Browser.iOS() && document.body.classList.contains('tippy-touch')) { + if ( ! Browser.iOS()) { document.body.classList.remove('tippy-touch') } } @@ -41,7 +42,6 @@ export default function bindEventListeners() { })() const clickHandler = event => { - // Simulated events dispatched on the document if (!(event.target instanceof Element)) { return hideAllPoppers()
4
diff --git a/src/index.js b/src/index.js -import React from 'react'; -import ReactDOM from 'react-dom'; -import './index.css'; -import App from './App'; -import * as serviceWorker from './serviceWorker'; +import React from "react"; +import ReactDOM from "react-dom"; +import "./index.css"; +import App from "./App"; +import * as serviceWorker from "./serviceWorker"; -ReactDOM.render(<App />, document.getElementById('root')); +import { ApolloClient } from "apollo-client"; +import { ApolloProvider } from "react-apollo"; +import { InMemoryCache } from "apollo-cache-inmemory"; +import { HttpLink } from "apollo-link-http"; + +const client = new ApolloClient({ + link: new HttpLink({ + uri: "http://localhost:4000/graphql", + }), + cache: new InMemoryCache(), +}); + +ReactDOM.render( + <ApolloProvider client={client}> + <App /> + </ApolloProvider>, + document.getElementById("root") +); // If you want your app to work offline and load faster, you can change // unregister() to register() below. Note this comes with some pitfalls.
12
diff --git a/app/views/shared/_google_tag_manager.html.erb b/app/views/shared/_google_tag_manager.html.erb <!-- Google Tag Manager --> -<%=# Tags for GTM are being included in VendorScripts templates for static pages as well. +<%# Tags for GTM are being included in VendorScripts templates for static pages as well. # So if you change anything here, please make sure that you change it there too. %> <% if current_user %>
1
diff --git a/src/generators/output/toString.js b/src/generators/output/toString.js @@ -28,7 +28,6 @@ module.exports = async (str, options) => { let html = frontMatter.body const config = maizzleConfig.isMerged ? maizzleConfig : deepmerge(maizzleConfig, frontMatter.attributes) - const layout = config.layout || config.build.layout if (typeof options.afterConfig === 'function') { await options.afterConfig(config) @@ -55,17 +54,7 @@ module.exports = async (str, options) => { await options.beforeRender(nunjucks, config) } - const blockStart = config.build.nunjucks && config.build.nunjucks.tags ? config.build.nunjucks.tags.blockStart : '{%' - const blockEnd = config.build.nunjucks && config.build.nunjucks.tags ? config.build.nunjucks.tags.blockEnd : '%}' - - html = layout ? `${blockStart} extends "${layout}" ${blockEnd}\n${html}` : html - html = nunjucks.renderString(html, { page: config, env: options.env, css: compiledCSS }) - - while (fm(html).attributes.layout) { - const front = fm(html) - html = `${blockStart} extends "${front.attributes.layout}" ${blockEnd}\n${blockStart} block template ${blockEnd}${front.body}${blockStart} endblock ${blockEnd}` html = nunjucks.renderString(html, { page: config, env: options.env, css: compiledCSS }) - } html = html // Rewrite class names in `<head>` CSS
1
diff --git a/aleph/authz.py b/aleph/authz.py @@ -73,7 +73,10 @@ class Authz(object): if collection is None: return False + try: collection = int(collection) + except ValueError: + return False return collection in self.collections(action) def can_stream(self):
9
diff --git a/v3/src/components/graph/components/graph.tsx b/v3/src/components/graph/components/graph.tsx @@ -77,6 +77,7 @@ export const Graph = observer(( }, [layout.plotHeight, layout.plotWidth, margin.left, xScale]) const toast = useToast() + const handleDropAttribute = (place: AxisPlace, attrId: string) => { // TODO: will need to be more sophisticated const attrPlace = place === "left" ? "y" : "x" @@ -115,7 +116,6 @@ export const Graph = observer(( const [, caseID] = target.property('id').split("_"), attrIDs = graphModel.config.uniqueTipAttributes, tipText = getPointTipText(dataset, caseID, attrIDs) - tipText !== '' && dataTip.show(tipText, event.target) } } @@ -153,11 +153,20 @@ export const Graph = observer(( const handleIsActive = (active: Active) => !!getDragAttributeId(active) - const handleDrop = () => { - console.log("droppableId: ", droppableId) + const handlePlotDropAttribute = (active: Active) => { + const dragAttributeID = getDragAttributeId(active) + if (dragAttributeID){ + const attrName = dataset?.attrFromID(dragAttributeID)?.name + toast({ + position: "top-right", + title: "Attribute dropped on plot", + description: `The attribute ${attrName || dragAttributeID} was dropped on the plot!`, + status: "success" + }) + } } - const data: IDropData = {accepts: ["attribute"], onDrop: handleDrop} + const data: IDropData = {accepts: ["attribute"], onDrop: handlePlotDropAttribute} return ( <DataConfigurationContext.Provider value={graphModel.config}>
10
diff --git a/lib/assets/core/test/spec/cartodb3/editor/layers/layer-header-view.spec.js b/lib/assets/core/test/spec/cartodb3/editor/layers/layer-header-view.spec.js @@ -45,7 +45,7 @@ describe('editor/layers/layer-header-view', function () { simple_geom: simple_geom }); this.queryGeometryModel.hasValue = function () { - return true; + return !!this.get('simple_geom'); }; this.querySchemaModel = new Backbone.Model({ @@ -128,6 +128,15 @@ describe('editor/layers/layer-header-view', function () { this.view.render(); expect(this.view.$('.js-zoom')[0].style['display']).toBe('none'); }); + + it('should show warning icon when there is no geometry', function () { + createView.call(this, { + simple_geom: '' + }); + + this.view.render(); + expect(this.view.$el.find('.js-nogeometrylayer').length).toBe(1); + }); }); describe('._initViews', function () { @@ -252,6 +261,26 @@ describe('editor/layers/layer-header-view', function () { }); }); + describe('._isQueryGeometryEmpty', function () { + it('should return false if there is no simple geom', function () { + createView.call(this, { + simple_geom: '' + }); + + var result = this.view._isQueryGeometryEmpty(); + + expect(result).toBe(false); + }); + + it('should return true if there is simple geom', function () { + createView.call(this, {}); + + var result = this.view._isQueryGeometryEmpty(); + + expect(result).toBe(true); + }); + }); + describe('._checkIfGeometryVisible', function () { it('should set zoomVisible to false is there is no simple geom', function () { createView.call(this, {});
7
diff --git a/lib/serialize-error.js b/lib/serialize-error.js @@ -26,9 +26,8 @@ function extractSource(stack, testFile) { const relFile = path.relative(process.cwd(), testFile); const normalizedFile = process.platform === 'win32' ? slash(relFile) : relFile; for (const line of stack.split('\n')) { - try { const callSite = stackUtils.parseLine(line); - if (callSite.file === normalizedFile) { + if (callSite && callSite.file === normalizedFile) { return { isDependency: false, isWithinProject: true, @@ -36,7 +35,6 @@ function extractSource(stack, testFile) { line: callSite.line }; } - } catch {} } return null;
7
diff --git a/src/symbols.js b/src/symbols.js @@ -310,10 +310,10 @@ defineSymbol(math, ams, textord, "\u03dd", "\\digamma", true); defineSymbol(math, ams, textord, "\u03f0", "\\varkappa"); // AMS Delimiters -defineSymbol(math, ams, open, "\u250c", "\\ulcorner", true); -defineSymbol(math, ams, close, "\u2510", "\\urcorner", true); -defineSymbol(math, ams, open, "\u2514", "\\llcorner", true); -defineSymbol(math, ams, close, "\u2518", "\\lrcorner", true); +defineSymbol(math, ams, open, "\u250c", "\\@ulcorner", true); +defineSymbol(math, ams, close, "\u2510", "\\@urcorner", true); +defineSymbol(math, ams, open, "\u2514", "\\@llcorner", true); +defineSymbol(math, ams, close, "\u2518", "\\@lrcorner", true); // AMS Binary Relations defineSymbol(math, ams, rel, "\u2266", "\\leqq", true);
7
diff --git a/package.json b/package.json "name": "find-and-replace", "main": "./lib/find", "description": "Find and replace within buffers and across the project.", - "version": "0.208.0", + "version": "0.208.1", "license": "MIT", "activationCommands": { "atom-workspace": [
6
diff --git a/articles/_includes/_api-auth-customize-tokens.md b/articles/_includes/_api-auth-customize-tokens.md @@ -15,5 +15,5 @@ function(user, context, callback) { ``` ::: panel-warning Namespacing Custom Claims -You must properly namespace your custom claims with URI format to avoid conflicting with spec claims. +In order to improve compatibility for client applications, Auth0 will now return profile information in a [structured claim format as defined by the OIDC specification](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims). This means that in order to add custom claims to ID tokens or access tokens, they must [conform to a namespaced format](/api-auth/tutorials/adoption/scope-custom-claims) to avoid possible collisions with standard OIDC claims. For example, if you choose the namespace `https://foo.com/` and you want to add a custom claim named `myclaim`, you would name the claim `https://foo.com/myclaim`, instead of `myclaim`. :::
0
diff --git a/frontend/static/javascript/app/survey-builder/directives/edit-question/edit-question.html b/frontend/static/javascript/app/survey-builder/directives/edit-question/edit-question.html <tr ng-if="surveyBuilder.currentQuestionFields.question_type == surveyBuilder.QUESTION_TYPES.slider"> <td><label for="min">Minimum Value:</label></td> <td> - <input type="number" name="min" id="min" class="form-control" min="0" max="100" + <input type="number" name="min" id="min" class="form-control" min="-100" max="100" ng-keyup="surveyBuilder.checkSliderValue('min')" ng-model="surveyBuilder.currentQuestionFields.min"> </td> <tr ng-if="surveyBuilder.currentQuestionFields.question_type == surveyBuilder.QUESTION_TYPES.slider"> <td><label for="max">Maximum Value:</label></td> <td> - <input type="number" name="max" id="max" class="form-control" min="1" max="100" + <input type="number" name="max" id="max" class="form-control" min="-100" max="100" ng-keyup="surveyBuilder.checkSliderValue('max')" ng-model="surveyBuilder.currentQuestionFields.max"> </td>
11
diff --git a/README.md b/README.md @@ -12,10 +12,10 @@ npm install polyfill-library --save ## Usage ```javascript -const PolyfillLibrary = require('polyfill-service'); +const PolyfillLibrary = require('polyfill-library'); const polyfillLibrary = new PolyfillLibrary; -const polyfillBundle = polyfillLibary.getPolyfillString({ +const polyfillBundle = polyfillLibrary.getPolyfillString({ uaString: 'Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)', minify: true, features: { @@ -54,7 +54,7 @@ Create an options object for use with `getPolyfills` or `getPolyfillString`. - `@param {object} opts` - Valid keys are uaString, minify, unknown, excludes, rum and features. - `@param {Boolean} [opts.minify=true]` - Whether to return the minified or raw implementation of the polyfills. -- `@param {'ignore'|'polyfill'} [opts.unknown='ignore']` - Whether to return all polyfills or no polyfills if the user-agent is unknown or unsupported. +- `@param {'ignore'|'polyfill'} [opts.unknown='polyfill']` - Whether to return all polyfills or no polyfills if the user-agent is unknown or unsupported. - `@param {Object} [opts.features={}]` - Which features should be returned if the user-agent does not support them natively. - `@param {Array<String>} [opts.excludes=[]]` - Which features should be excluded from the returned object. - `@param {String} [opts.uaString='']` - The user-agent string to check each feature against. @@ -68,7 +68,7 @@ Given a set of features that should be polyfilled in 'opts.features' (with flags - `@param {object} opts` - Valid keys are uaString, minify, unknown, excludes, rum and features. - `@param {Boolean} [opts.minify=true]` - Whether to return the minified or raw implementation of the polyfills. -- `@param {'ignore'|'polyfill'} [opts.unknown='ignore']` - Whether to return all polyfills or no polyfills if the user-agent is unknown or unsupported. +- `@param {'ignore'|'polyfill'} [opts.unknown='polyfill']` - Whether to return all polyfills or no polyfills if the user-agent is unknown or unsupported. - `@param {Object} [opts.features={}]` - Which features should be returned if the user-agent does not support them natively. - `@param {Array<String>} [opts.excludes=[]]` - Which features should be excluded from the returned object. - `@param {String} [opts.uaString='']` - The user-agent string to check each feature against. @@ -82,7 +82,7 @@ Create a polyfill bundle. - `@param {object} opts` - Valid keys are uaString, minify, unknown, excludes, rum and features. - `@param {Boolean} [opts.minify=true]` - Whether to return the minified or raw implementation of the polyfills. -- `@param {'ignore'|'polyfill'} [opts.unknown='ignore']` - Whether to return all polyfills or no polyfills if the user-agent is unknown or unsupported. +- `@param {'ignore'|'polyfill'} [opts.unknown='polyfill']` - Whether to return all polyfills or no polyfills if the user-agent is unknown or unsupported. - `@param {Object} [opts.features={}]` - Which features should be returned if the user-agent does not support them natively. - `@param {Array<String>} [opts.excludes=[]]` - Which features should be excluded from the returned object. - `@param {String} [opts.uaString='']` - The user-agent string to check each feature against.
3
diff --git a/components/evenement/event.js b/components/evenement/event.js @@ -102,7 +102,7 @@ function Event({event, background, isPassed, id, activeEvent, handleOpen}) { border-radius: ${theme.borderRadius}; font-size: 14px; position: relative; - z-index: ${activeEvent === id ? 1 : ''}; + z-index: ${activeEvent === id ? 1 : 0}; filter:${isEventOpen ? '' : 'blur(2px)'}; position: relative; }
0
diff --git a/cypress/v0.0/documentation/1-Getting Started/1-Writing Your First Test.md b/cypress/v0.0/documentation/1-Getting Started/1-Writing Your First Test.md @@ -231,12 +231,12 @@ You can dynamically generate tests using JavaScript. ```javascript describe('if your app uses jQuery', function(){ ['mouseover', 'mouseout', 'mouseenter', 'mouseleave'].forEach((event) => { - it(`triggers event: '${event}`, function(){ + it('triggers event: ' + event, function(){ // if your app uses jQuery, then we can trigger a jQuery // event that causes the event callback to fire cy .get('#with-jquery').invoke('trigger', event) - .get('#messages').should('contain', `the event ${event} was fired`) + .get('#messages').should('contain', 'the event ' + event + 'was fired') }) }) })
14
diff --git a/app/stylesheets/shell-window/toolbar-input-group.less b/app/stylesheets/shell-window/toolbar-input-group.less height: 26px; border: 1px solid #ddd; - border-radius: 2px; - font-size: 14px; + border-radius: 3px; + font-size: 13.5px; -webkit-app-region: no-drag; background: #fff; margin: 0 2px 0 5px; box-shadow: none; max-height: 100%; color: @color-text; - flex: 1; padding: 1px 0 1px 7px; - + border-radius: 3px; border: 0; background: transparent; cursor: text;
4
diff --git a/packages/idyll-components/src/text-input.js b/packages/idyll-components/src/text-input.js @@ -12,8 +12,9 @@ class TextInput extends React.PureComponent { } render() { + const { idyll, hasError, updateProps, ...props } = this.props; return ( - <input type="text" onChange={this.onChange} {...this.props} /> + <input type="text" onChange={this.onChange} {...props} /> ); } }
2
diff --git a/src/js/helpers/index.js b/src/js/helpers/index.js @@ -120,13 +120,13 @@ export function createGeodesicPolygon( const points = []; for (let i = 0; i < sides; i += 1) { - angle = (i * 360) / sides + rotation; if (withBearing) { + angle = (i * 360) / sides + rotation; newLonlat = destinationVincenty(origin, angle, radius); geomPoint = L.latLng(newLonlat.lng, newLonlat.lat); } else { - const pLat = origin.lat + Math.cos(angle) * radius; - const pLng = origin.lng + Math.sin(angle) * radius; + const pLat = origin.lat + Math.cos((2 * i * Math.PI) / sides) * radius; + const pLng = origin.lng + Math.sin((2 * i * Math.PI) / sides) * radius; geomPoint = L.latLng(pLat, pLng); } points.push(geomPoint);
14
diff --git a/iris/utils/get-random-default-photo.js b/iris/utils/get-random-default-photo.js @@ -18,6 +18,6 @@ export default () => { const color = faker.random.arrayElement(PALETTE); return { profilePhoto: `https://s3.amazonaws.com/spectrum-chat/default_images/profile-${color}.png`, - coverPhoto: `https://s3.amazonaws.com/spectrum-chat/default_images/cover-${color}.png`, + coverPhoto: `https://s3.amazonaws.com/spectrum-chat/default_images/cover-${color}.svg`, }; };
4
diff --git a/src/main/index.js b/src/main/index.js @@ -176,11 +176,11 @@ ipcMain.on('version-info-requested', () => { }, }; let result = ''; - - const req = https.get(Object.assign(opts, url.parse(latestReleaseAPIURL)), res => { + const onSuccess = res => { res.on('data', data => { result += data; }); + res.on('end', () => { const tagName = JSON.parse(result).tag_name; const [, remoteVersion] = tagName.match(/^v([\d.]+(?:-?rc\d+)?)$/); @@ -199,14 +199,27 @@ ipcMain.on('version-info-requested', () => { } } }); + }; + + const requestLatestRelease = (apiUrl, alreadyRedirected = false) => { + const req = https.get(Object.assign(opts, url.parse(apiUrl)), res => { + if (res.statusCode === 301 || res.statusCode === 302) { + requestLatestRelease(res.headers.location, true); + } else { + onSuccess(res); + } }); + if (alreadyRedirected) return; req.on('error', err => { console.log('Failed to get current version from GitHub. Error:', err); if (rendererWindow) { rendererWindow.webContents.send('version-info-received', null); } }); + }; + + requestLatestRelease(latestReleaseAPIURL); }); ipcMain.on('get-auth-token', event => {
11
diff --git a/userscript.user.js b/userscript.user.js @@ -26648,12 +26648,22 @@ var $$IMU_EXPORT$$; return src.replace(/(:\/\/[^/]*\/media\/[^/]*\/)[^/]*(\/[0-9]+\/[0-9]+\/[^/]*)$/, "$1original$2"); } + if (domain_nosub === "fbcdn.net" || domain_nosub === "cdninstagram.com") { + // https://instagram.fcxh2-1.fna.fbcdn.net/v/t51.2885-15/e35/85066278_101857984707704_1091284702256776100_n.jpg?_nc_ht=instagram.fcxh2-1.fna.fbcdn.net&_nc_cat=1&se=7 + // https://instagram.fcxh2-1.fna.fbcdn.net/v/t51.2885-15/e35/85066278_101857984707704_1091284702256776100_n.jpg?_nc_ht=instagram.fcxh2-1.fna.fbcdn.net + + // thanks to remlap on github: https://github.com/qsniyg/maxurl/issues/239 + newsrc = remove_queries(src, ["se", "_nc_cat", "ig_cache_key"]); + if (newsrc !== src) + return newsrc; + } + if (((domain_nosub === "fbcdn.net" && domain.match(/^instagram\./)) || domain_nosub === "cdninstagram.com") && host_domain_nosub === "instagram.com" && options.element && options.do_request && options.cb) { // ig_cache_key, se, _nc_cat aren't needed - // _nt_ht is needed + // _nt_ht, _nc_ohc is needed // if oe is missing, "Bad URL timestamp" // if oh is missing, "Bad URL hash" newsrc = (function() {
7
diff --git a/plugins-bitcoincom/cordova-plugin-qrreader/readme.md b/plugins-bitcoincom/cordova-plugin-qrreader/readme.md 3. `node_modules/cordova/bin/cordova plugin add ./plugins-bitcoincom/cordova-plugin-qrreader` -4. `npm run start:android` \ No newline at end of file +4. `npm run start:android` it will run, but the scanning may not work. + +5. Add the contents of + + plugins-bitcoincom/cordova-plugin-qrreader/src/android/qrreader.gradle + +to the end of + +platforms/android/build-extras.gradle + +Contents presented here for your convenience: + + dependencies { + // Important - the CameraSource implementation in this project requires version 8.1 or higher. + compile 'com.google.android.gms:play-services-vision:11.8.0' + } +
3
diff --git a/devices/sonoff.js b/devices/sonoff.js @@ -70,11 +70,11 @@ module.exports = [ exposes: [e.battery(), e.action(['single', 'double', 'long'])], fromZigbee: [fz.ewelink_action, fz.battery], toZigbee: [], - meta: {battery: {voltageToPercentage: '3V_2500'}}, configure: async (device, coordinatorEndpoint, logger) => { const endpoint = device.getEndpoint(1); await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genPowerCfg']); await reporting.batteryVoltage(endpoint); + await reporting.batteryPercentageRemaining(endpoint); }, }, { @@ -126,12 +126,12 @@ module.exports = [ description: 'Motion sensor', fromZigbee: [fz.ias_occupancy_alarm_1, fz.battery], toZigbee: [], - meta: {battery: {voltageToPercentage: '3V_2500'}}, configure: async (device, coordinatorEndpoint, logger) => { const endpoint = device.getEndpoint(1); const bindClusters = ['genPowerCfg']; await reporting.bind(endpoint, coordinatorEndpoint, bindClusters); await reporting.batteryVoltage(endpoint); + await reporting.batteryPercentageRemaining(endpoint); }, exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery()], },
7
diff --git a/packages/nexrender-core/package.json b/packages/nexrender-core/package.json }, "dependencies": { "@nexrender/types": "^1.14.0", - "data-uri-to-buffer": "^2.0.0", - "file-uri-to-path": "^1.0.0", - "mkdirp": "^0.5.1", + "data-uri-to-buffer": "^3.0.0", + "file-uri-to-path": "^2.0.0", + "mkdirp": "^1.0.4", "node-fetch": "^2.3.0", "requireg": "^0.2.1" },
3
diff --git a/core/server/api/v2/slugs.js b/core/server/api/v2/slugs.js const models = require('../../models'); -const i18n = require('../../../shared/i18n'); +const tpl = require('@tryghost/tpl'); const errors = require('@tryghost/errors'); +const messages = { + couldNotGenerateSlug: 'Could not generate slug.' +}; + const allowedTypes = { post: models.Post, tag: models.Tag, @@ -37,7 +41,7 @@ module.exports = { .then((slug) => { if (!slug) { return Promise.reject(new errors.GhostError({ - message: i18n.t('errors.api.slugs.couldNotGenerateSlug') + message: tpl(messages.couldNotGenerateSlug) })); } return slug;
14
diff --git a/packages/turf-boolean-overlap/index.ts b/packages/turf-boolean-overlap/index.ts -import { coordAll, segmentEach } from '@turf/meta'; +import { segmentEach } from '@turf/meta'; import { getGeom } from '@turf/invariant'; import lineOverlap from '@turf/line-overlap'; import lineIntersect from '@turf/line-intersect'; import GeojsonEquality from 'geojson-equality'; -import { Feature, LineString, MultiLineString, Polygon, MultiPolygon, Geometry } from '@turf/helpers'; +import { Feature, Geometry, MultiPoint } from '@turf/helpers'; /** * Compares two geometries of the same dimension and returns true if their intersection set results in a geometry @@ -48,14 +48,16 @@ export default function booleanOverlap( switch (type1) { case 'MultiPoint': - const coords1 = coordAll(feature1); - const coords2 = coordAll(feature2); - coords1.forEach((coord1) => { - coords2.forEach((coord2) => { - if (coord1[0] === coord2[0] && coord1[1] === coord2[1]) overlap++; - }); - }); - break; + for (var i=0; i<(geom1 as MultiPoint).coordinates.length; i++) { + for (var j=0; j<(geom2 as MultiPoint).coordinates.length; j++) { + var coord1 = geom1.coordinates[i]; + var coord2 = geom2.coordinates[j]; + if (coord1[0] === coord2[0] && coord1[1] === coord2[1]) { + return true; + } + } + } + return false; case 'LineString': case 'MultiLineString':
7
diff --git a/package.json b/package.json "test": "mocha --reporter spec", "pretest": "npm run lint", "lint": "standard", - "prepare": "npm install require-self && require-self", + "prepare": "require-self", "prepublishOnly": "cp docs/README.md README.md" }, "repository": {
2
diff --git a/src/modules/tooltip/Intersect.js b/src/modules/tooltip/Intersect.js @@ -57,7 +57,10 @@ class Intersect { w.globals.clientX - seriesBound.left - (x > w.globals.gridWidth / 2 ? ttCtx.tooltipRect.ttWidth : 0) - y = w.globals.clientY - seriesBound.top + y = + w.globals.clientY - + seriesBound.top - + (y > w.globals.gridHeight / 2 ? ttCtx.tooltipRect.ttHeight : 0) } }
7
diff --git a/ReduceClutter.user.js b/ReduceClutter.user.js // @description Revert recent changes that makes the page more cluttered // @homepage https://github.com/samliew/SO-mod-userscripts // @author @samliew -// @version 1.14.3 +// @version 1.15 // // @include https://*stackoverflow.com/* // @include https://*serverfault.com/* @@ -135,6 +135,15 @@ ul.comments-list .comment-up-on { z-index: unset !important; } + +/* + Set a variable max-height for code blocks + https://meta.stackoverflow.com/q/397012 +*/ +.post-text pre, .wmd-preview pre { + max-height: 80vh; +} + `);
12
diff --git a/token-metadata/0xD8912C10681D8B21Fd3742244f44658dBA12264E/metadata.json b/token-metadata/0xD8912C10681D8B21Fd3742244f44658dBA12264E/metadata.json "symbol": "PLU", "address": "0xD8912C10681D8B21Fd3742244f44658dBA12264E", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/packages/openneuro-server/datalad/dataset.js b/packages/openneuro-server/datalad/dataset.js @@ -213,7 +213,7 @@ export const addFile = async (datasetId, path, file) => { const stream = createReadStream() - // This does not close the fs-capacitor stream until downstreamRequest has finished + // This does not close the fs-capacitor stream until the stream has finished // but it does prevent new readers and allows for cleanup of the temp file buffer capacitor.destroy()
7
diff --git a/src/pages/using-spark/components/box.mdx b/src/pages/using-spark/components/box.mdx @@ -57,4 +57,4 @@ color to illustrate how Box works. ## Anatomy -- Box is an empty container using Inset Space. \ No newline at end of file +- Box is an empty container with padding. \ No newline at end of file
3
diff --git a/src/client/js/components/Admin/SlackIntegration/WithProxyAccordions.jsx b/src/client/js/components/Admin/SlackIntegration/WithProxyAccordions.jsx @@ -73,9 +73,9 @@ const RegisteringProxyUrlProcess = () => { const GeneratingTokensAndRegisteringProxyServiceProcess = withUnstatedContainers((props) => { const { t } = useTranslation(); - const generateTokenHandler = () => { + const regenerateTokensHandler = () => { if (props.generateTokenHandler != null) { - props.generateTokenHandler(); + props.onClickRegenerateTokens(); } }; @@ -128,7 +128,7 @@ const GeneratingTokensAndRegisteringProxyServiceProcess = withUnstatedContainers <button type="button" className="btn btn-primary mx-2" - onClick={generateTokenHandler} + onClick={regenerateTokensHandler} > { t('admin:slack_integration.access_token_settings.generate') } </button>
10
diff --git a/articles/getting-started/index.md b/articles/getting-started/index.md @@ -32,4 +32,8 @@ Let's get started! <i class="icon icon-budicon-715"></i><a href="/getting-started/deployment-models">Deployment Models</a> <p>Read about the four different deployment models that Auth0 offers</p> </li> + <li> + <i class="icon icon-budicon-715"></i><a href="/videos">Developer Videos</a> + <p>A selection of videos showing developers how to perform common tasks with Auth0.</p> + </li> </ul>
0
diff --git a/package.json b/package.json "Brandon Evans (https://github.com/BrandonE)", "Cameron Cooper (https://github.com/cameroncooper)", "Chris Trevino (https://github.com/darthtrevino)", + "Chris Watson (https://github.com/c24w)", "Christoph Gysin (https://github.com/christophgysin)", "Daniel Parker (https://github.com/rlgod)", "Dave Sole (https://github.com/dsole)",
0
diff --git a/plugins.json b/plugins.json { "author": "cball", "description": "Replaces ENV vars with ENV vars that are prefixed/suffixed with the context or branch name", - "name": "Env", - "package": "netlify-plugin-env", - "repo": "https://github.com/cball/netlify-plugin-env" + "name": "Contextual ENV", + "package": "netlify-plugin-contextual-env", + "repo": "https://github.com/cball/netlify-plugin-contextual-env" } ]
10
diff --git a/web/template.go b/web/template.go @@ -90,7 +90,7 @@ func tmplRoleDropdown(roles []*discordgo.Role, highestBotRole *discordgo.Role, a if k == len(roles)-1 { break } - if role.Managed { + if role.Managed && highestBotRole != nil { continue } @@ -131,7 +131,7 @@ func tmplRoleDropdownMutli(roles []*discordgo.Role, highestBotRole *discordgo.Ro if k == len(roles)-1 { break } - if role.Managed { + if role.Managed && highestBotRole != nil { continue }
11
diff --git a/packages/feedfetcher/package.json b/packages/feedfetcher/package.json "build": "tsc", "test": "jest" }, + "publishConfig": { + "access": "public" + }, "repository": { "type": "git", "url": "git+https://github.com/MonitoRSS/typescript-template.git"
12
diff --git a/src/js/framework7/picker.js b/src/js/framework7/picker.js @@ -82,11 +82,12 @@ var Picker = function (params) { }; p.updateValue = function (forceValues) { var newValue = forceValues || []; - var newDisplayValue = [], i; + var newDisplayValue = [], i, column; if (p.cols.length === 0) { for (i = 0; i < p.params.cols.length; i++) { - if (p.params.cols[i].displayValues !== undefined) { - newDisplayValue.push(p.params.cols[i].displayValues[newValue[i]]); + column = p.params.cols[i]; + if (column.displayValues !== undefined && column.values !== undefined && column.values.indexOf(newValue[i]) !== undefined) { + newDisplayValue.push(column.displayValues[column.values.indexOf(newValue[i])]); } else { newDisplayValue.push(newValue[i]);
1
diff --git a/vr-ui.js b/vr-ui.js @@ -788,6 +788,7 @@ p { <div class=buttons> <a class=button id=run-button>Run</a> <a class=button id=add-button>Add to inventory</a> + <a class=button id=remove-button>Remove</a> </div> <div class=header> <a class=close-button id=close-button>X</a>
0
diff --git a/framer/Color.coffee b/framer/Color.coffee @@ -303,12 +303,11 @@ class exports.Color extends BaseClass colorA = new Color(colorA) colorB = new Color(colorB) - tolerance = 1 - alphaTolerance = 0.01 + tolerance = 0.01 return false if Math.abs(colorA.r - colorB.r) >= tolerance return false if Math.abs(colorA.g - colorB.g) >= tolerance return false if Math.abs(colorA.b - colorB.b) >= tolerance - return false if Math.abs(colorA.a - colorB.a) >= alphaTolerance + return false if Math.abs(colorA.a - colorB.a) >= tolerance return true @rgbToHsl: (a, b, c) ->
7
diff --git a/package.json b/package.json "private": true, "scripts": { "build": "npm run build:production && npm run build:static", - "build:production": "webpack -p --mode=production", - "build:test": "webpack -p --mode=production --include-tests", + "build:production": "webpack --mode=production", + "build:test": "webpack --mode=production --include-tests", "build:dev": "webpack --mode=development --debug --devtool cheap-source-map --output-pathinfo && npm run build:static", "build:static": "gulp svg imagemin", "dev": "npm run build:dev && npm run build:static", "dev-zip": "npm run build:dev && gulp release", - "watch": "webpack --watch --mode=development --debug --devtool cheap-module-eval-source-map --output-pathinfo && npm run build:static", + "watch": "npm run build:static && webpack --watch --mode=development --debug --devtool cheap-module-eval-source-map --output-pathinfo", "release-zip": "npm run build && gulp release", "test": "webpack --mode=production --display=none && bundlesize", "test:visualtest": "npm run build:static && start-server-and-test storybook http-get://localhost:9001 backstopjs", "test:visualapprove": "backstop approve --config=tests/backstop/config.js", - "test:analyze": "webpack -p --mode=production --env.analyze=true --json --progress --profile > /tmp/stats.json && cp ./dist/assets/js/*.js /tmp && webpack-bundle-analyzer /tmp/stats.json", + "test:analyze": "webpack --mode=production --env.analyze=true --json --progress --profile > /tmp/stats.json && cp ./dist/assets/js/*.js /tmp && webpack-bundle-analyzer /tmp/stats.json", "test:js": "wp-scripts test-unit-js --config=tests/js/jest.config.js", "test:js:watch": "wp-scripts test-unit-js --config=tests/js/jest.config.js --watch", "test:e2e": "WP_BASE_URL=http://localhost:9002 wp-scripts test-e2e --config=tests/e2e/jest.config.js",
2
diff --git a/generators/client/templates/vue/package.json.ejs b/generators/client/templates/vue/package.json.ejs @@ -156,7 +156,7 @@ limitations under the License. "prettier:format": "prettier --write \"{,src/**/,webpack/}*.{md,json,js,ts,tsx,css,scss}\"", "lint": "tslint --project tsconfig.json -e 'node_modules/**'", "lint:fix": "<%= clientPackageManager %> run lint <%= optionsForwarder %>--fix", - "cleanup": "rimraf <%= DIST_DIR %> <%= AOT_DIR %>", + "cleanup": "rimraf <%= DIST_DIR %>", "clean-www": "rimraf <%= DIST_DIR %>app/{src,<%= BUILD_DIR %>}", "start": "<%= clientPackageManager %> run webpack:dev", "start-tls": "<%= clientPackageManager %> run webpack:dev <%= optionsForwarder %>--env.tls",
2
diff --git a/lib/assets/javascripts/builder/editor/style/style-content-view.js b/lib/assets/javascripts/builder/editor/style/style-content-view.js @@ -23,6 +23,13 @@ var EXTRA_STYLE_PROPERTIES = [ 'strokeColor' ]; +var EXTRA_LABELS_STYLE_PROPERTIES = [ + 'fillSize', + 'fillColor', + 'haloSize', + 'haloColor' +]; + var REQUIRED_OPTS = [ 'configModel', 'layerDefinitionsCollection', @@ -102,6 +109,7 @@ module.exports = CoreView.extend({ this.listenTo(this._layerDefinitionModel, 'change:autoStyle', this._onAutoStyleChanged); this.listenTo(this._layerDefinitionModel, 'change', this._onStyleChanged); this.listenTo(this._styleModel, 'change:fill', this._onStyleChanged); + this.listenTo(this._styleModel, 'change:labels', this._onStyleLabelChanged); this.listenTo(this._styleModel, 'undo redo', this.render); this.listenTo(this._layerContentModel, 'change:state', this._setViewValues); this.listenTo(this._layerContentModel, 'change:state', this._checkEditorModel); @@ -274,6 +282,16 @@ module.exports = CoreView.extend({ }.bind(this)); }, + _onStyleLabelChanged: function () { + var labels = this._styleModel.get('labels'); + + EXTRA_LABELS_STYLE_PROPERTIES.forEach(function (property) { + delete labels[property]; + }); + + this._styleModel.set('labels', labels, { silent: true }); + }, + _setViewValues: function () { this._layerDefinitionModel.isDataFiltered() .then(function (isDataFiltered) {
2
diff --git a/test/modules/util.js b/test/modules/util.js @@ -68,142 +68,20 @@ describe('util', function(){ } }); - if( process.env.TRAVIS ){ - // run this test only on travis because it's slow + it('hash is unique for common values', function(){ + var v = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 22, 24, 25, 30, 32, 35, 36, 40, 42, 45, 48, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100 ]; + var N = v.length; - it('hash is unique per two-uint combos on 0...1000', function(){ - this.timeout(5 * 60 * 1000); + for( var i = 0; i < N; i++ ){ + var vi = v[i]; + var hi = hashInt(vi); - var min = 0; - var max = 1000; - var hashes = {}; - var i, j, h, arr = [0, 0]; - - for( i = min; i <= max; i++ ){ - for( j = min; j <= max; j++ ){ - arr[0] = i; - arr[1] = j; - - h = hashIntsArray(arr); - - expect(hashes[h]).to.not.exist; - - hashes[h] = true; - } - } - }); - } - - it('hash is unique for random int pairs', function(){ - var N = 100000; - var min = 0; - var max = 100; - var hashes = {}; - var i, h, arr = [0, 0]; - var existing; - var a, b, A, B; - - for( i = 0; i < N; i++ ){ - arr = [randInt(min, max), randInt(min, max)]; - - h = hashIntsArray(arr); + for( var j = i + 1; j < N; j++ ){ + var vj = v[j]; + var hj = hashInt(vj); - existing = hashes[h]; - - if( existing != null ){ - a = arr[0]; - b = arr[1]; - A = existing.arr[0]; - B = existing.arr[1]; - - if( (a !== A || b !== B) ){ - throw new Error(a + ',' + b + ' collides with ' + A + ',' + B); - } + expect(hi, 'vi ' + vi).to.not.equal(hj, 'vj ' + vj); } - - hashes[h] = { arr: arr, val: h }; - } - }); - - function testMTuple(M){ - it('hash is unique for random int ' + M + '-tuple', function(){ - var N = 100000; - var min1 = 0; - var max1 = 100; - var min2 = 2147483647 - 1024; - var max2 = 2147483647; - var hashes = {}; - var i, h, arr = [0, 0]; - var existing; - var t1, t2; - var low; - - var getTupleString = function(arr){ return arr.join(','); }; - - for( i = 0; i < N; i++ ){ - arr = []; - - for( var j = 0; j < M; j++ ){ - low = Math.random() < 0.8; - arr.push( low ? randInt(min1, max1) : randInt(min2, max2) ); - } - - h = hashIntsArray(arr); - - existing = hashes[h]; - - if( existing != null ){ - t1 = getTupleString(arr); - t2 = getTupleString(existing.arr); - - console.log(t1, t2) - - if( t1 !== t2 ){ - throw new Error(t1 + ' matches ' + t2 + ' with value ' + h); - } - } - - hashes[h] = { arr: arr, val: h }; - } - }); - } - - (function(){ - for( var i = 3; i <= 10; i++ ){ - testMTuple(i); - } - })(); - - it('hash is unique for random low-high int pairs', function(){ - var N = 1000; - var min1 = 0; - var max1 = 100; - var min2 = 2147483647 - 1024; - var max2 = 2147483647; - var hashes = {}; - var i, h, arr = [0, 0]; - var existing; - var a, b, A, B; - - for( i = 0; i < N; i++ ){ - arr = [randInt(min1, max1), randInt(min2, max2)]; - - h = hashIntsArray(arr); - - existing = hashes[h]; - - if( existing != null ){ - a = arr[0]; - b = arr[1]; - A = existing.arr[0]; - B = existing.arr[1]; - - if( (a !== A || b !== B) ){ - throw new Error(a + ',' + b + ' collides with ' + A + ',' + B); - } - } - - hashes[h] = { arr: arr, val: h }; } });
4
diff --git a/src/analytics/FirebaseTracker.js b/src/analytics/FirebaseTracker.js @@ -6,7 +6,10 @@ FirebaseTracker.prototype = Object.create(BaseTracker.prototype); FirebaseTracker.prototype.constructor = FirebaseTracker; FirebaseTracker.prototype.setCurrentScreen = function(screenName) { - analytics().setCurrentScreen(screenName) + analytics().logScreenView({ + screen_name: screenName, + screen_class: screenName, + }) } FirebaseTracker.prototype.logEvent = function(category, action, text, number) {
4
diff --git a/OurUmbraco.Site/Views/DocumentationSubpage.cshtml b/OurUmbraco.Site/Views/DocumentationSubpage.cshtml @Html.Partial("~/Views/Partials/Documentation/Breadcrumb.cshtml") </div> - <div id="doc-survey" class="docs-default-listing markdown-syntax" style="background-color: #daf0c9; padding: 20px; display: none;"> - <a href="#" id="doc-survey-hide" title="Hide this survey box forever" style="float: right; text-decoration: none">X</a> - <h3 style="margin: 10px 0 0 0">Help us improve the documentation area</h3> - <p> - We'd love to make the documentation for Umbraco even better, but we need your help on where we should focus the most. - So please help us help you by spending a few minutes taking this short survey. - </p> - <a id="doc-survey-link" class="button green" href="https://www.surveymonkey.com/r/OurDocumentation" target="_blank">Take the Survey (and this box will also go away)</a> - </div> - <div class="search-big"> <input type="search" class="docs-search-input" required placeholder="Search for documentation"> <label for="search">Search for documentation</label> </div> - <ul class="search-all-results docs-search-listing"></ul> <div id="markdown-docs" class="docs-default-listing markdown-syntax"> </script> </div> </div> \ No newline at end of file -<script type="text/javascript"> - - // test for cookie - $(document).ready(function () { - - $("#doc-survey-link").click(function () { - // set cookie - document.cookie = 'docSurveyTaken=true; expires=Wed, 1 Jan 2020 20:47:11 UTC; path=/'; - $("#doc-survey").fadeOut(); - }); - - $("#doc-survey-hide").click(function () { - // set cookie - document.cookie = 'docSurveyTaken=true; expires=Wed, 1 Jan 2020 20:47:11 UTC; path=/'; - $("#doc-survey").fadeOut(); - }); - - if (document.cookie.indexOf("docSurveyTaken") == -1) { - // don't show on mobile devices - var ua = navigator.userAgent; - if (!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|mobile|CriOS/i.test(ua)) { - $("#doc-survey").fadeIn(); - } - } - });</script> \ No newline at end of file
2
diff --git a/components/post.js b/components/post.js @@ -10,6 +10,7 @@ import Section from '@/components/section' function Post({title, published_at, feature_image, html, backLink}) { useEffect(() => { if (html) { + const audioPlayer = [...document.querySelectorAll('audio')] const videoPlayer = [...document.querySelectorAll('video')] const dropdownDiv = [...document.querySelectorAll('div.kg-card.kg-toggle-card')] @@ -19,6 +20,12 @@ function Post({title, published_at, feature_image, html, backLink}) { }) } + if (audioPlayer) { + audioPlayer.forEach(a => { + a.setAttribute('controls', true) + }) + } + if (dropdownDiv) { dropdownDiv.forEach(d => { d.addEventListener('click', () => { @@ -295,6 +302,36 @@ function Post({title, published_at, feature_image, html, backLink}) { .kg-video-play-icon svg { display: none; } + + .kg-audio-card { + display: flex; + width: 100%; + padding: .5em; + margin-bottom: 1em; + min-height: 96px; + border-radius: 3px; + box-shadow: inset 0 0 0 1px rgba(124,139,154,.25); + } + + .kg-audio-player-container { + display: flex; + flex-direction: column-reverse; + width: 100%; + } + + .kg-audio-player-container audio { + width: 100%; + border-radius: 5px; + } + + .kg-audio-title, .kg-file-card-title { + padding: .5em; + font-size: 1.3em; + } + + .kg-audio-player, .kg-audio-thumbnail { + display: none; + } `}</style> </Section> )
0
diff --git a/server/app.js b/server/app.js @@ -22,8 +22,6 @@ app.use(compression({ threshold: 0 })); mongoose.Promise = bluebird; mongoose.connect(process.env.MONGO_URI); -app.use(opbeat.middleware.express()); - if (process.env.NODE_ENV === 'development') { // Development Env specific stuff // - Use MemoryStore for the session @@ -78,6 +76,7 @@ app.use(passport.session()); app.use('/', express.static(`${__dirname}/`, { maxAge: 31557600000 })); app.use('/client/', express.static(`${__dirname}/client/`, { maxAge: 31557600000 })); +app.use(opbeat.middleware.express()); routes(app); const port = process.env.PORT || 8080;
14
diff --git a/spec/requests/carto/api/api_keys_controller_spec.rb b/spec/requests/carto/api/api_keys_controller_spec.rb @@ -12,10 +12,9 @@ describe Carto::Api::ApiKeysController do @auth_api_feature_flag.destroy end - def api_key_url(user, id: nil) + def generate_api_key_url(user, id: nil) options = { user_domain: user.username, api_key: user.api_key } - options[:id] = id if id - api_keys_url(options) + id ? api_key_url(options.merge(id: id)) : api_keys_url(options) end describe '#create' do @@ -63,7 +62,7 @@ describe Carto::Api::ApiKeysController do name: name, grants: grants } - post_json api_key_url(@carto_user1), payload do |response| + post_json generate_api_key_url(@carto_user1), payload do |response| response.status.should eq 201 api_key_response = response.body api_key_response[:id].should_not be_empty @@ -82,17 +81,17 @@ describe Carto::Api::ApiKeysController do end it 'fails if grants is not a json array' do - post_json api_key_url(@carto_user1), name: 'wadus' do |response| + post_json generate_api_key_url(@carto_user1), name: 'wadus' do |response| response.status.should eq 422 error_response = response.body error_response[:errors].should match /grants must be a nonempty array/ end - post_json api_key_url(@carto_user1), name: 'wadus', grants: "something" do |response| + post_json generate_api_key_url(@carto_user1), name: 'wadus', grants: "something" do |response| response.status.should eq 422 error_response = response.body error_response[:errors].should match /grants must be a nonempty array/ end - post_json api_key_url(@carto_user1), name: 'wadus', grants: {} do |response| + post_json generate_api_key_url(@carto_user1), name: 'wadus', grants: {} do |response| response.status.should eq 422 error_response = response.body error_response[:errors].should match /grants must be a nonempty array/ @@ -110,7 +109,7 @@ describe Carto::Api::ApiKeysController do ] } ] - post_json api_key_url(@carto_user1), name: 'wadus', grants: grants do |response| + post_json generate_api_key_url(@carto_user1), name: 'wadus', grants: grants do |response| response.status.should eq 422 error_response = response.body error_response[:errors].should match /permissions.*did not match one of the following values: insert, select, update, delete/ @@ -121,7 +120,7 @@ describe Carto::Api::ApiKeysController do describe '#destroy' do it 'destroys the API key' do api_key = FactoryGirl.create(:api_key_apis, user_id: @user1.id) - delete_json api_key_url(@user1, id: api_key.id) do |response| + delete_json generate_api_key_url(@user1, id: api_key.id) do |response| response.status.should eq 200 response.body[:id].should eq api_key.id end @@ -130,18 +129,18 @@ describe Carto::Api::ApiKeysController do end it 'returns 404 if API key is not a uuid or it doesn\'t exist' do - delete_json api_key_url(@user1, id: 'wadus') do |response| + delete_json generate_api_key_url(@user1, id: 'wadus') do |response| response.status.should eq 404 end - delete_json api_key_url(@user1, id: random_uuid) do |response| + delete_json generate_api_key_url(@user1, id: random_uuid) do |response| response.status.should eq 404 end end it 'returns 404 if the API key doesn\'t belong to that user' do api_key = FactoryGirl.create(:api_key_apis, user_id: @user1.id) - delete_json api_key_url(@user2, id: api_key.id) do |response| + delete_json generate_api_key_url(@user2, id: api_key.id) do |response| response.status.should eq 404 end
1
diff --git a/token-metadata/0xCee1d3c3A02267e37E6B373060F79d5d7b9e1669/metadata.json b/token-metadata/0xCee1d3c3A02267e37E6B373060F79d5d7b9e1669/metadata.json "symbol": "YFFI", "address": "0xCee1d3c3A02267e37E6B373060F79d5d7b9e1669", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/test/map/MapCameraSpec.js b/test/map/MapCameraSpec.js @@ -150,6 +150,15 @@ describe('#Map.Camera', function () { c2 = map.containerPointToCoordinate(cp); expect(c2).to.be.closeTo(center); }); + + it('containerPoint and point', function () { + map.setPitch(30); + var point = map._containerPointToPoint({ x: 0, y: 0 }); + var pointMax = map._containerPointToPoint({ x: 0, y: 0 }, map.getMaxZoom()); + var scale = map.getScale(); + expect(pointMax.x).to.be.eql(point.x * scale); + expect(pointMax.y).to.be.eql(point.y * scale); + }); }); describe('polygon\' size when pitching or rotating', function () {
3
diff --git a/src/ModelTraits/SpatieTranslatable/HasTranslations.php b/src/ModelTraits/SpatieTranslatable/HasTranslations.php @@ -88,17 +88,18 @@ trait HasTranslations $locale = $attributes['locale'] ?? \App::getLocale(); $attributes = array_except($attributes, ['locale']); + $non_translatable = []; // do the actual saving foreach ($attributes as $attribute => $value) { if ($this->isTranslatableAttribute($attribute)) { // the attribute is translatable $this->setTranslation($attribute, $locale, $value); } else { // the attribute is NOT translatable - $this->{$attribute} = $value; + $non_translatable[$attribute] = $value; } } - return $this->save($options); + return $this->fill($non_translatable)->save($options); } /*
3
diff --git a/src/GlobalDependencyMap.js b/src/GlobalDependencyMap.js @@ -131,11 +131,12 @@ class GlobalDependencyMap { return new Set(); } - let prevDeps = this.getDependantsFor(node).map((entry) => { - if (entry.startsWith(GlobalDependencyMap.COLLECTION_PREFIX)) { + let prevDeps = this.getDependantsFor(node) + .filter((entry) => { + return entry.startsWith(GlobalDependencyMap.COLLECTION_PREFIX); + }) + .map((entry) => { return GlobalDependencyMap.getEntryFromCollectionKey(entry); - } - return entry; }); let prevDepsSet = new Set(prevDeps); @@ -167,7 +168,11 @@ class GlobalDependencyMap { getTemplatesThatConsumeCollections(collectionNames) { let templates = new Set(); for (let name of collectionNames) { - for (let node of this.map.dependantsOf(GlobalDependencyMap.getCollectionKeyForEntry(name))) { + let collectionName = GlobalDependencyMap.getCollectionKeyForEntry(name); + if (!this.map.hasNode(collectionName)) { + continue; + } + for (let node of this.map.dependantsOf(collectionName)) { if (!node.startsWith(GlobalDependencyMap.COLLECTION_PREFIX)) { templates.add(node); } @@ -190,13 +195,11 @@ class GlobalDependencyMap { return true; } - // filter out layouts + // When includeLayouts is `false` we want to filter out layouts let data = this.map.getNodeData(node); - if (data && data.type) { - if (data.type === "layout") { + if (data && data.type && data.type === "layout") { return false; } - } return true; }); }
1
diff --git a/src/map/Map.js b/src/map/Map.js @@ -1684,15 +1684,7 @@ class Map extends Handlerable(Eventable(Renderable(Class))) { */ _get2DExtent(zoom) { const cExtent = this.getContainerExtent(); - const c1 = this._containerPointToPoint(new Point(cExtent.xmin, cExtent.ymin), zoom), - c2 = this._containerPointToPoint(new Point(cExtent.xmax, cExtent.ymin), zoom), - c3 = this._containerPointToPoint(new Point(this.width, this.height), zoom), - c4 = this._containerPointToPoint(new Point(0, this.height), zoom); - const xmin = Math.min(c1.x, c2.x, c3.x, c4.x), - xmax = Math.max(c1.x, c2.x, c3.x, c4.x), - ymin = Math.min(c1.y, c2.y, c3.y, c4.y), - ymax = Math.max(c1.y, c2.y, c3.y, c4.y); - return new PointExtent(xmin, ymin, xmax, ymax); + return cExtent.convertTo(c => this._containerPointToPoint(c, zoom)); } /**
3
diff --git a/package.json b/package.json "cypress:run": "run-s -n -c cypress:run-no-badge report-summary-mocha-full", "build": "rollup -c", "build:watch": "rollup -c --watch", - "start": "web-dev-server --node-resolve", - "start:watch": "web-dev-server --node-resolve --watch", + "start": "web-dev-server --app-index src/editor/index.html --open --node-resolve", + "start:watch": "web-dev-server --app-index src/editor/index.html --open --node-resolve --watch", "cypress:open": "run-p start cypress:open-no-start", "cypress:open-no-start": "cypress open", "start-allow-origin": "static -p 8001 -H '{\"Access-Control-Allow-Origin\": \"*\"}'",
7
diff --git a/src/public/target/sections/Pathways/custom/ReactomeRenderer.js b/src/public/target/sections/Pathways/custom/ReactomeRenderer.js @@ -4,6 +4,7 @@ import React from 'react'; class ReactomeRenderer extends React.Component { componentDidMount() { + try { const { symbol, reactomeId } = this.props; const diagram = Reactome.Diagram.create({ placeHolder: 'reactome', @@ -12,16 +13,23 @@ class ReactomeRenderer extends React.Component { }); diagram.loadDiagram(reactomeId); - diagram.onDiagramLoaded(function(pathwayId) { + diagram.onDiagramLoaded(function() { diagram.flagItems(symbol); }); this.diagram = diagram; + } catch { + console.log('Something went wrong with Reactome'); + } } componentDidUpdate(prevProps) { + try { const { reactomeId } = this.props; if (reactomeId !== prevProps.reactomeId) { this.diagram.loadDiagram(reactomeId); } + } catch { + console.log('Something went wrong with Reactome'); + } } render() { return <div id="reactome" />;
9
diff --git a/test/jasmine/tests/is_plain_object_test.js b/test/jasmine/tests/is_plain_object_test.js @@ -31,7 +31,8 @@ describe('isPlainObject', function() { new Array(10), new Date(), new RegExp('foo'), - new String('string') + new String('string'), + document.createElement('div') ]; shouldPass.forEach(function(obj) {
0
diff --git a/src/article/editor/ReplaceSupplementaryFileCommand.js b/src/article/editor/ReplaceSupplementaryFileCommand.js @@ -5,21 +5,21 @@ export default class ReplaceSupplementaryFileCommand extends Command { const xpath = params.selectionState.xpath if (xpath.length > 0) { const selectedType = xpath[xpath.length - 1].type - return { - disabled: selectedType !== 'supplementary-file' + if (selectedType === 'supplementary-file') { + const node = params.selectionState.node + if (!node.remote) { + return { disabled: false } + } } - } else { - return { disabled: true } } + return { disabled: true } } execute (params, context) { const state = params.commandState - const files = params.files - const doc = params.editorSession.getDocument() - const supplementaryFileNodeId = params.selection.nodeId - const supplementaryFileNode = doc.get(supplementaryFileNodeId) if (state.disabled) return + const files = params.files + const supplementaryFileNode = params.selectionState.node let api = context.api if (files.length > 0) { api._replaceSupplementaryFile(files[0], supplementaryFileNode)
14
diff --git a/modules/@apostrophecms/piece-type/index.js b/modules/@apostrophecms/piece-type/index.js @@ -429,9 +429,9 @@ module.exports = { ...properties })); - function getOperationOrGroup (currentOpe, [ groupName, groupProperties ], acc) { + function getOperationOrGroup (currentOp, [ groupName, groupProperties ], acc) { if (!groupName) { - return currentOpe; + return currentOp; } return { @@ -439,7 +439,7 @@ module.exports = { ...groupProperties, operations: [ ...(acc[groupName] && acc[groupName].operations) || [], - currentOpe + currentOp ] }; }
10
diff --git a/src/Components/Navigation.js b/src/Components/Navigation.js @@ -9,29 +9,6 @@ import ScrollToNextSectionLink from "./Navigation/ScrollToNextSectionLink"; import isVideoObj from "../utils/isVideoObj"; import urlFromBinary from "../utils/urlFromBinary"; -function ActualNavigation({ - isLandingPage, - bootstrapNavbarClassNames, - toggleSearch, - scrolled, - navigationStyle, - showSearch, -}) { - if (isLandingPage) { - return <LandingPageNavigation navigationStyle={navigationStyle} />; - } - - return ( - <FullNavigation - bootstrapNavbarClassNames={bootstrapNavbarClassNames} - toggleSearch={toggleSearch} - showSearch={showSearch} - scrolled={scrolled} - navigationStyle={navigationStyle} - /> - ); -} - class Navigation extends React.Component { constructor(props) { super(props); @@ -165,6 +142,29 @@ class Navigation extends React.Component { } } +function ActualNavigation({ + isLandingPage, + bootstrapNavbarClassNames, + toggleSearch, + scrolled, + navigationStyle, + showSearch, +}) { + if (isLandingPage) { + return <LandingPageNavigation navigationStyle={navigationStyle} />; + } + + return ( + <FullNavigation + bootstrapNavbarClassNames={bootstrapNavbarClassNames} + toggleSearch={toggleSearch} + showSearch={showSearch} + scrolled={scrolled} + navigationStyle={navigationStyle} + /> + ); +} + function BackgroundVideo({ videoUrl }) { if (!videoUrl) { return null;
5
diff --git a/magda-scala-common/build.sbt b/magda-scala-common/build.sbt @@ -24,8 +24,8 @@ libraryDependencies ++= { "org.locationtech.jts" % "jts-core" % "1.15.0", "org.elasticsearch" % "elasticsearch" % "6.3.0", - "io.github.t83714" %% "elastic4s-core" % "6.2.9", - "io.github.t83714" %% "elastic4s-http" % "6.2.9", + "io.github.t83714" %% "elastic4s-core" % "6.2.10", + "io.github.t83714" %% "elastic4s-http" % "6.2.10", "org.apache.logging.log4j" % "log4j-core" % "2.9.1", "org.apache.logging.log4j" % "log4j-api" % "2.9.1",
4
diff --git a/src/commands/Rooms/Create.js b/src/commands/Rooms/Create.js @@ -147,7 +147,7 @@ class Create extends Command { message.guild.defaultRole, message.author, isPublic, useText, ); let category; - if (!ctx.tempCategory) { + if (!ctx.tempCategory || !(message.guild && message.guild.channels.has(ctx.tempCategory))) { category = await message.guild .createChannel(name, 'category', overwrites); } else {
3
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -238,7 +238,7 @@ jobs: git config user.name "Lunie Bot" git remote add bot https://${GIT_BOT_TOKEN}@github.com/luniehq/lunie.git git checkout develop -f - git pull -f + git pull git merge origin/master git push
13
diff --git a/src/encoded/tests/test_audit_file.py b/src/encoded/tests/test_audit_file.py @@ -304,44 +304,6 @@ def test_audit_file_read_length_controlled_by_exclusion(testapp, file1_2, assert any(error['category'] != 'inconsistent control read length' for error in errors_list) -def test_audit_file_inconsistent_controlled_by(testapp, file1, - file2, file3, - file_rep1_2, - file_rep2): - testapp.patch_json(file1['@id'], {'replicate': file_rep2['@id']}) - testapp.patch_json(file3['@id'], {'replicate': file_rep1_2['@id']}) - testapp.patch_json(file1['@id'], {'controlled_by': [file2['@id'], file3['@id']]}) - - res = testapp.get(file1['@id'] + '@@index-data') - errors = res.json['audit'] - errors_list = [] - for error_type in errors: - errors_list.extend(errors[error_type]) - assert any(error['category'] == 'inconsistent controlled_by replicates' for - error in errors_list) - - -def test_audit_file_missing_paired_controlled_by(testapp, file1, - file2, file3, - file_rep2): - testapp.patch_json(file3['@id'], {'replicate': file_rep2['@id'], - 'paired_with': file2['@id'], - 'run_type': 'paired-ended', - 'paired_end': '2'}) - testapp.patch_json(file2['@id'], {'replicate': file_rep2['@id'], - 'run_type': 'paired-ended', - 'paired_end': '1'}) - testapp.patch_json(file1['@id'], {'controlled_by': [file2['@id']]}) - - res = testapp.get(file1['@id'] + '@@index-data') - errors = res.json['audit'] - errors_list = [] - for error_type in errors: - errors_list.extend(errors[error_type]) - assert any(error['category'] == 'missing paired_with in controlled_by' for - error in errors_list) - - def test_audit_file_replicate_match(testapp, file1, file_rep2): testapp.patch_json(file1['@id'], {'replicate': file_rep2['uuid']}) res = testapp.get(file1['@id'] + '@@index-data')
2
diff --git a/includes/Modules/Subscribe_With_Google/EditPost.php b/includes/Modules/Subscribe_With_Google/EditPost.php @@ -110,19 +110,15 @@ final class EditPost { $product_key = Key::from( 'product' ); $free_key = Key::from( 'free' ); $nonce_key = Key::from( 'nonce' ); - // phpcs:disable - // There might be a bug in one of the WP linters. - // We can't upgrade them while supporting older versions of PHP it seems. if ( ! isset( $_POST[ $nonce_key ] ) || ! isset( $_POST[ $product_key ] ) ) { return; } - $product = $_POST[ $product_key ]; - $free = isset( $_POST[ $free_key ] ) ? $_POST[ $free_key ] : 'false'; - $swg_nonce = $_POST[ $nonce_key ]; - // phpcs:enable + $product = sanitize_key( $_POST[ $product_key ] ); + $free = isset( $_POST[ $free_key ] ) ? sanitize_key( $_POST[ $free_key ] ) : 'false'; + $swg_nonce = sanitize_key( $_POST[ $nonce_key ] ); // Verify settings nonce. if ( ! wp_verify_nonce( sanitize_key( $swg_nonce ), Key::from( 'saving_settings' ) ) ) {
1
diff --git a/src/server/routes/apiv3/pages.js b/src/server/routes/apiv3/pages.js @@ -313,14 +313,14 @@ module.exports = (crowi) => { const ids = result.pages.map((page) => { return page._id }); const relations = await PageTagRelation.find({ relatedPage: { $in: ids } }).populate('relatedTag'); const relationsMap = new Map(); - result.pages.forEach((page) => { - relationsMap.set(page._id.toString(), []); - }); relations.forEach((relation) => { - relationsMap.get(relation.relatedPage.toString()).push(relation.relatedTag); + const pageId = relation.relatedPage.toString(); + relationsMap.set(pageId, []); + relationsMap.get(pageId).push(relation.relatedTag); }); result.pages.forEach((page) => { - page.tags = relationsMap.get(page._id.toString()); + const pageId = page._id.toString(); + page.tags = relationsMap.has(pageId) ? relationsMap.get(pageId) : []; }); return res.apiv3(result);
4
diff --git a/app/templates/client/vue2/dev/app.js b/app/templates/client/vue2/dev/app.js import TodoCmp from './todo/components/todo-cmp' import {router} from './app.route' +import Vue from 'vue' +import VueRouter from 'vue-router' + +Vue.use(VueRouter) export default { el: '#app',
0