code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/lib/assets/test/spec/builder/components/modals/publish/publish-view.spec.js b/lib/assets/test/spec/builder/components/modals/publish/publish-view.spec.js @@ -68,6 +68,8 @@ describe('components/modals/publish/publish-view', function () { configModel: configModel }); + var modals = new Backbone.Model(); + this.view = new PublishView({ mapcapsCollection: mapcapsCollection, modalModel: new Backbone.Model(), @@ -76,7 +78,8 @@ describe('components/modals/publish/publish-view', function () { userModel: userModel, configModel: configModel, isOwner: true, - ownerName: 'matata' + ownerName: 'matata', + modals: modals }); this.view.render();
1
diff --git a/source/core/sortByProperties.js b/source/core/sortByProperties.js @@ -30,11 +30,23 @@ const sortByProperties = function (properties) { return function (a, b) { const hasGet = !!a.get; for (let i = 0; i < l; i += 1) { - const prop = properties[i]; - const aVal = hasGet ? a.get(prop) : a[prop]; - const bVal = hasGet ? b.get(prop) : b[prop]; + let prop = properties[i]; + let reverse = false; + if (prop.startsWith('-')) { + prop = prop.slice(1); + reverse = true; + } + + let aVal = hasGet ? a.get(prop) : a[prop]; + let bVal = hasGet ? b.get(prop) : b[prop]; const type = typeof aVal; + if (reverse) { + const temp = aVal; + aVal = bVal; + bVal = temp; + } + // Must be the same type if (type === typeof bVal) { if (type === 'boolean' && aVal !== bVal) {
11
diff --git a/src/registry/registry.js b/src/registry/registry.js @@ -38,7 +38,7 @@ class Registry { this.StrategyFactory = Strategies.resolve(this.opts.strategy); - this.logger.info("Strategy:", this.StrategyFactory.name); + this.logger.info(`Strategy: ${this.StrategyFactory.name}`); this.nodes = new NodeCatalog(this, broker); this.services = new ServiceCatalog(this, broker);
1
diff --git a/src/XR.js b/src/XR.js @@ -8,6 +8,10 @@ const {_elementGetter, _elementSetter} = require('./utils'); const _getXrDisplay = window => window[symbols.mrDisplaysSymbol].xrDisplay; const _getXmDisplay = window => window[symbols.mrDisplaysSymbol].xmDisplay; +const _getFakeVrDisplay = window => { + const {fakeVrDisplay} = window[symbols.mrDisplaysSymbol]; + return fakeVrDisplay.isActive ? fakeVrDisplay : null; +}; const localVector = new THREE.Vector3(); const localVector2 = new THREE.Vector3(); @@ -21,8 +25,11 @@ class XR extends EventEmitter { this._window = window; } requestDevice(name = null) { - if ((name === 'VR' || name === null) && GlobalContext.nativeVr && GlobalContext.nativeVr.VR_IsHmdPresent()) { - return Promise.resolve(_getXrDisplay(this._window)); + const fakeVrDisplay = _getFakeVrDisplay(this._window); + if (fakeVrDisplay) { + return Promise.resolve(fakeVrDisplay); + } else if ((name === 'VR' || name === null) && GlobalContext.nativeVr && GlobalContext.nativeVr.VR_IsHmdPresent()) { + return Promise.resolve(); } else if ((name === 'AR' || name === null) && GlobalContext.nativeMl && GlobalContext.nativeMl.IsPresent()) { return Promise.resolve(_getXmDisplay(this._window)); } else {
11
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,18 @@ 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.28.3] -- 2017-06-26 + +### Fixed +- Fix deselect on double-clicking for gl2d traces [#1811] +- Fix `Plotly.purge` for gl2d and gl3d subplots + (bug introduced in 1.28.0, leading to memory leaks) [#1821] +- Fix hover labels for `ohlc` and `candlestick` traces + (bug introduced in 1.28.0) [#1808] +- Fix event data for `scattergeo` traces [#1819] +- Fix support of HTML entity number in pseudo-html inputs [#1820] + + ## [1.28.2] -- 2017-06-21 ### Fixed
3
diff --git a/docs/index.html b/docs/index.html <div class="col-lg-4 col-sm-4"> <div class="preview"> <div class="image"> - <a target="_blank" class="img-responsive" href="https://bootstrapbay.sjv.io/6k92E"><img class="img-responsive" src="https://bootstrapbaybox.s3.eu-central-1.amazonaws.com/uploads/theme/screenshot/BEEB58E/1500px-50_-off.png" alt="Clean Canvas"></a> + <a target="_blank" class="img-responsive" href="https://bootstrapbay.sjv.io/6k92E"><img class="img-responsive" src="https://bootstrapbaybox.s3.eu-central-1.amazonaws.com/uploads/theme/screenshot/BEEB58E/1500px.png" alt="Clean Canvas"></a> </div> <div class="options"> <h3>Datta Able</h3>
1
diff --git a/src/components/checkout/templates/container/content.json b/src/components/checkout/templates/container/content.json }, "en": { "windowMessage": "Don\u2019t see the secure PayPal browser? We\u2019ll help you re-launch the window to complete your purchase. ", - "continue": "Continue" + "continue": "Click to Continue" } }, "VN": {
7
diff --git a/sass/bootstrap-select.scss b/sass/bootstrap-select.scss @function fade($color, $amnt) { @if $amnt > 1 { - $amnt: $amnt / 100; // convert to percentage if int + $amnt: $amnt * 0.01; // convert to percentage if int } @return rgba($color, $amnt); }
14
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js @@ -205,11 +205,6 @@ RED.view = (function() { function init() { -// setTimeout(function() { -// function snap(p) { return RED.view.gridSize() * Math.round(p/RED.view.gridSize())}; for (var i = 0;i<10;i++) { -// RED.nodes.addJunction({_def:{defaults:{}}, type:'junction', z:"0ccdc1d81f2729cc",id:RED.nodes.id(),x:snap(Math.floor(Math.random()*600)),y:snap(Math.floor(Math.random()*600)), w:0,h:0}) -// } ; RED.view.redraw(true) -// },2000) chart = $("#red-ui-workspace-chart"); outer = d3.select("#red-ui-workspace-chart") @@ -1862,7 +1857,7 @@ RED.view = (function() { slicePath = null; RED.view.redraw(true); } else if (mouse_mode == RED.state.SLICING_JUNCTION) { - var removedLinks = [] + var removedLinks = new Set() var addedLinks = [] var addedJunctions = [] @@ -1871,8 +1866,14 @@ RED.view = (function() { var sourceId = l.source.id+":"+l.sourcePort groupedLinks[sourceId] = groupedLinks[sourceId] || [] groupedLinks[sourceId].push(l) + + groupedLinks[l.target.id] = groupedLinks[l.target.id] || [] + groupedLinks[l.target.id].push(l) }); var linkGroups = Object.keys(groupedLinks) + linkGroups.sort(function(A,B) { + return groupedLinks[B].length - groupedLinks[A].length + }) linkGroups.forEach(function(gid) { var links = groupedLinks[gid] var junction = { @@ -1887,6 +1888,10 @@ RED.view = (function() { inputs: 1, dirty: true } + links = links.filter(function(l) { return !removedLinks.has(l) }) + if (links.length === 0) { + return + } links.forEach(function(l) { junction.x += l._sliceLocation.x junction.y += l._sliceLocation.y @@ -1902,21 +1907,39 @@ RED.view = (function() { RED.nodes.addJunction(junction) addedJunctions.push(junction) - var newLink = { + let newLink + if (gid === links[0].source.id+":"+links[0].sourcePort) { + newLink = { source: links[0].source, sourcePort: links[0].sourcePort, target: junction } + } else { + newLink = { + source: junction, + sourcePort: 0, + target: links[0].target + } + } addedLinks.push(newLink) RED.nodes.addLink(newLink) links.forEach(function(l) { - removedLinks.push(l) + removedLinks.add(l) RED.nodes.removeLink(l) - var newLink = { + let newLink + if (gid === l.target.id) { + newLink = { + source: l.source, + sourcePort: l.sourcePort, + target: junction + } + } else { + newLink = { source: junction, sourcePort: 0, target: l.target } + } addedLinks.push(newLink) RED.nodes.addLink(newLink) nodeGroups.add(l.source.g || "__NONE__") @@ -1937,7 +1960,7 @@ RED.view = (function() { t: 'add', links: addedLinks, junctions: addedJunctions, - removedLinks: removedLinks + removedLinks: Array.from(removedLinks) }) RED.nodes.dirty(true) }
9
diff --git a/userscript.user.js b/userscript.user.js @@ -36474,6 +36474,15 @@ var $$IMU_EXPORT$$; return src.replace(/\/photo\/+[a-z]+\//, "/photo/full/"); } + if (host_domain_nosub === "500px.com" && options && options.element) { + if (src.indexOf("://drscdn.500px.org/") < 0) { + if (options.element.tagName === "A" && options.element.parentElement && options.element.parentElement.classList.contains("nsfw_placeholder")) { + var img = options.element.querySelector("img"); + return img.src; + } + } + } + if (domain === "drscdn.500px.org" && options && options.cb && options.do_request) { // https://drscdn.500px.org/photo/110928613/w%3D70_h%3D70/v2?webp=true&v=5&sig=44ba66ac19d9f5852e30c17e59f45a48c3fd8a00661cc83486506469823d81ad
7
diff --git a/src/utils/wallet.js b/src/utils/wallet.js @@ -25,7 +25,7 @@ export const IS_MAINNET = process.env.REACT_APP_IS_MAINNET === 'true' || process export const DISABLE_CREATE_ACCOUNT = process.env.DISABLE_CREATE_ACCOUNT === 'true' || process.env.DISABLE_CREATE_ACCOUNT === 'yes' export const DISABLE_SEND_MONEY = process.env.DISABLE_SEND_MONEY === 'true' || process.env.DISABLE_SEND_MONEY === 'yes' export const ACCOUNT_ID_SUFFIX = process.env.REACT_APP_ACCOUNT_ID_SUFFIX || 'testnet' -export const MULTISIG_MIN_AMOUNT = process.env.REACT_APP_MULTISIG_MIN_AMOUNT || '35' +export const MULTISIG_MIN_AMOUNT = process.env.REACT_APP_MULTISIG_MIN_AMOUNT || '40' export const LOCKUP_ACCOUNT_ID_SUFFIX = process.env.LOCKUP_ACCOUNT_ID_SUFFIX || 'lockup' export const ACCESS_KEY_FUNDING_AMOUNT = process.env.REACT_APP_ACCESS_KEY_FUNDING_AMOUNT || nearApiJs.utils.format.parseNearAmount('0.01') export const LINKDROP_GAS = process.env.LINKDROP_GAS || '100000000000000'
3
diff --git a/src/pages/EvidencePage/ProfileHeader.js b/src/pages/EvidencePage/ProfileHeader.js @@ -38,7 +38,7 @@ function ProfileHeader() { const diseaseSynonyms = []; - if (data) { + if (synonyms) { synonyms.forEach(({ terms }) => { terms.forEach(term => { diseaseSynonyms.push(term); @@ -87,7 +87,9 @@ function ProfileHeader() { /> <CardContent className={classes.cardContent}> <Description>{diseaseDescription}</Description> + {diseaseSynonyms.length > 0 ? ( <ChipList title="Synonyms">{diseaseSynonyms}</ChipList> + ) : null} </CardContent> </Card> )}
9
diff --git a/examples/unittest.js b/examples/unittest.js @@ -18,45 +18,36 @@ describe('Math', function () { logLevel: 'info' }) - // Should return the payload "hello" when someone call the pattern "topic:test" - Act.stub(hemera, { topic: 'test' }, null, 'hello') + // stub act calls + Act.stub(hemera, { topic: 'math', cmd: 'sub', a: 10, b: 5 }, null, 5) + Act.stub(hemera, { topic: 'math', cmd: 'add', a: 1, b: 2 }, null, 3) hemera.ready(function () { hemera.add({ topic: 'math', cmd: 'add' }, function (args, cb) { - this.act({ topic: 'test' }, function (err, resp) { - this.log.info('hello') + this.act({ topic: 'math', cmd: 'sub', a: 10, b: 5 }, function (err, resp) { cb(err, args.a + args.b + resp) }) }) - hemera.add({ - topic: 'math', - cmd: 'sub' - }, function (args, cb) { - cb(null, args.a - args.b) - }) - // Important stub when "add" was already added // Should execute the server method with the pattern topic:math,cmd:add,a:1,b:2" Add.stub(hemera, { topic: 'math', cmd: 'add' }, { a: 1, b: 2 }, function (err, result) { expect(err).to.be.not.exists() - expect(result).to.be.equals('3hello') - }) - - Add.stub(hemera, { topic: 'math', cmd: 'sub' }, { a: 20, b: 10 }, function (err, result) { - expect(err).to.be.not.exists() - expect(result).to.be.equals(10) - done() + expect(result).to.be.equals(8) }) hemera.act({ topic: 'math', - cmd: 'add' - }, function() { - this.act({ topic: 'math', cmd: 'sub' }) + cmd: 'add', + a: 1, + b: 2 + }, function(err, result) { + expect(err).to.be.not.exists() + expect(result).to.be.equals(3) + done() }) })
7
diff --git a/plugins/object_storage/config/routes.rb b/plugins/object_storage/config/routes.rb @@ -13,7 +13,7 @@ ObjectStorage::Engine.routes.draw do end end - scope 'containers/:container', format: false do + scope 'containers/:container', constraints: { container: /[^\/]+/ }, format: false do # a simple `resources :objects` won't work since the object path shall be # in the URL directly and can contain literally anything, so we need to # put all action names etc. before it
9
diff --git a/includes/Core/Permissions/Permissions.php b/includes/Core/Permissions/Permissions.php @@ -346,10 +346,6 @@ final class Permissions { $caps[] = self::SETUP; } - if ( self::MANAGE_OPTIONS === $cap && ! $this->is_user_authenticated( $user_id ) ) { - return array_merge( $caps, array( 'do_not_allow' ) ); - } - if ( ! in_array( $cap, array( self::AUTHENTICATE, self::SETUP, self::VIEW_DASHBOARD, self::VIEW_POSTS_INSIGHTS ), true ) ) { // For regular users, require being authenticated. if ( ! $this->is_user_authenticated( $user_id ) ) {
2
diff --git a/examples/eventloop/c_eventloop.c b/examples/eventloop/c_eventloop.c #include "duktape.h" -#define MAX_TIMERS 4096 /* this is quite excessive for embedded use, but good for testing */ +#define TIMERS_SLOT_NAME "eventTimers" #define MIN_DELAY 1.0 #define MIN_WAIT 1.0 #define MAX_WAIT 60000.0 #define MAX_EXPIRIES 10 #define MAX_FDS 256 +#define MAX_TIMERS 4096 /* this is quite excessive for embedded use, but good for testing */ typedef struct { int64_t id; /* numeric ID (returned from e.g. setTimeout); zero if unused */ @@ -31,7 +32,7 @@ typedef struct { int removed; /* timer has been requested for removal */ /* The callback associated with the timer is held in the "global stash", - * in <stash>.eventTimers[String(id)]. The references must be deleted + * in <stash>.TIMERS_SLOT_NAME[String(id)]. The references must be deleted * when a timer struct is deleted. */ } ev_timer; @@ -113,7 +114,7 @@ static void expire_timers(duk_context *ctx) { */ duk_push_global_stash(ctx); - duk_get_prop_string(ctx, -1, "eventTimers"); + duk_get_prop_string(ctx, -1, TIMERS_SLOT_NAME); /* [ ... stash eventTimers ] */ @@ -441,7 +442,7 @@ static int create_timer(duk_context *ctx) { /* Finally, register the callback to the global stash 'eventTimers' object. */ duk_push_global_stash(ctx); - duk_get_prop_string(ctx, -1, "eventTimers"); /* -> [ func delay oneshot stash eventTimers ] */ + duk_get_prop_string(ctx, -1, TIMERS_SLOT_NAME); /* -> [ func delay oneshot stash eventTimers ] */ duk_push_number(ctx, (double) timer_id); duk_dup(ctx, 0); duk_put_prop(ctx, -3); /* eventTimers[timer_id] = callback */ @@ -514,7 +515,7 @@ static int delete_timer(duk_context *ctx) { */ duk_push_global_stash(ctx); - duk_get_prop_string(ctx, -1, "eventTimers"); /* -> [ timer_id stash eventTimers ] */ + duk_get_prop_string(ctx, -1, TIMERS_SLOT_NAME); /* -> [ timer_id stash eventTimers ] */ duk_push_number(ctx, (double) timer_id); duk_del_prop(ctx, -2); /* delete eventTimers[timer_id] */ @@ -615,6 +616,6 @@ void eventloop_register(duk_context *ctx) { /* Initialize global stash 'eventTimers'. */ duk_push_global_stash(ctx); duk_push_object(ctx); - duk_put_prop_string(ctx, -2, "eventTimers"); + duk_put_prop_string(ctx, -2, TIMERS_SLOT_NAME); duk_pop(ctx); }
4
diff --git a/src/control/Control.Attribution.js b/src/control/Control.Attribution.js @@ -4,7 +4,7 @@ import Map from '../map/Map'; /** * @property {Object} options - options - * @property {Object} [options.position='bottom-left'] - position of the control, enmu: bottom-left, bottom-right + * @property {Object} [options.position='bottom-left'] - position of the control, this option defined in [Control.position]{@link Control#positions}. * @property {String} [options.content='Powered by <a href="http://maptalks.org" target="_blank">maptalks</a>'] - content of the attribution control, HTML format * @memberOf control.Attribution * @instance
1
diff --git a/CHANGELOG.md b/CHANGELOG.md All notable changes to this project are documented in this file. -## Head +## 14.8.0 - Added: `keyframe-block-no-duplicate-selectors` rule ([#6024](https://github.com/stylelint/stylelint/pull/6024)). - Added: `property-*-list` support for vendor prefixes ([#6025](https://github.com/stylelint/stylelint/pull/6025)).
6
diff --git a/src/Element.js b/src/Element.js @@ -350,17 +350,7 @@ export default class Element { } get placeholderChar() { - if (!this.component.inputMaskPlaceholderChar) { - if (!this.component?.inputMask?.includes('\u02cd')) { - return '\u02cd'; - } - // If some fields already use \u02cd in the mask, use an underscore as a placeholderChar - else { - return '_'; - } - } - - return this.component?.inputMaskPlaceholderChar; + return this.component?.inputMaskPlaceholderChar || '_'; } /**
12
diff --git a/config/models.js b/config/models.js @@ -93,9 +93,12 @@ module.exports.models = { var data = []; self.seedData.forEach(function (seed) { - data.push(_.merge(_.filter(results,function (item) { - return item.name === seed.name - })[0] || {},seed)) + + const updateItem = _.find(results, (item) => { + return item.name === seed.name; + }) + + if(updateItem) data.push(_.merge(seed, updateItem)); }) var fns = [];
1
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -7,7 +7,7 @@ jobs: - checkout - run: name: notify build started - command: ./notify-slack notifications "CircleCI starting pipeline for $CIRCLE_PULL_REQUEST" circleci + command: ./notify-slack notifications "CircleCI starting pipeline for ${CIRCLE_PULL_REQUEST:-master}" circleci - add_ssh_keys - run: name: Check docker version @@ -56,7 +56,7 @@ jobs: - run: docker push kindlyops/havenweb:latest - run: name: notify failed job - command: ./notify-slack notifications "CircleCI pipeline for $CIRCLE_PULL_REQUEST failed in $CIRCLE_JOB" circleci + command: ./notify-slack notifications "CircleCI pipeline for ${CIRCLE_PULL_REQUEST:-master} failed in $CIRCLE_JOB" circleci when: on_fail flyway-build-job: docker: @@ -75,7 +75,7 @@ jobs: - run: docker push kindlyops/havenflyway:latest - run: name: notify failed job - command: ./notify-slack notifications "CircleCI pipeline for $CIRCLE_PULL_REQUEST failed in $CIRCLE_JOB" circleci + command: ./notify-slack notifications "CircleCI pipeline for ${CIRCLE_PULL_REQUEST:-master} failed in $CIRCLE_JOB" circleci when: on_fail postgrest-build-job: docker: @@ -94,7 +94,7 @@ jobs: - run: docker push kindlyops/postgrest:latest - run: name: notify failed job - command: ./notify-slack notifications "CircleCI pipeline for $CIRCLE_PULL_REQUEST failed in $CIRCLE_JOB" circleci + command: ./notify-slack notifications "CircleCI pipeline for ${CIRCLE_PULL_REQUEST:-master} failed in $CIRCLE_JOB" circleci when: on_fail keycloak-build-job: docker: @@ -113,7 +113,7 @@ jobs: - run: docker push kindlyops/keycloak:latest - run: name: notify failed job - command: ./notify-slack notifications "CircleCI pipeline for $CIRCLE_PULL_REQUEST failed in $CIRCLE_JOB" circleci + command: ./notify-slack notifications "CircleCI pipeline for ${CIRCLE_PULL_REQUEST:-master} failed in $CIRCLE_JOB" circleci when: on_fail havenapi-build-job: docker: @@ -132,7 +132,7 @@ jobs: - run: docker push kindlyops/havenapi:latest - run: name: notify failed job - command: ./notify-slack notifications "CircleCI pipeline for $CIRCLE_PULL_REQUEST failed in $CIRCLE_JOB" circleci + command: ./notify-slack notifications "CircleCI pipeline for ${CIRCLE_PULL_REQUEST:-master} failed in $CIRCLE_JOB" circleci when: on_fail havenapi-testing-job: docker: @@ -193,7 +193,7 @@ jobs: docker run --volumes-from configs --network container:db --workdir /usr/src/app kindlyops/apitest cucumber - run: name: notify failed job - command: ./notify-slack notifications "CircleCI pipeline for $CIRCLE_PULL_REQUEST failed in $CIRCLE_JOB" circleci + command: ./notify-slack notifications "CircleCI pipeline for ${CIRCLE_PULL_REQUEST:-master} failed in $CIRCLE_JOB" circleci when: on_fail deploy-staging: docker: @@ -222,7 +222,7 @@ jobs: oc set image deployment/keycloak keycloak=havengrc-docker.jfrog.io/kindlyops/keycloak:$CIRCLE_SHA1 - run: name: notify failed job - command: ./notify-slack notifications "CircleCI pipeline for $CIRCLE_PULL_REQUEST failed in $CIRCLE_JOB" circleci + command: ./notify-slack notifications "CircleCI pipeline for ${CIRCLE_PULL_REQUEST:-master} failed in $CIRCLE_JOB" circleci when: on_fail workflows: version: 2
7
diff --git a/source/views/collections/ToolbarView.js b/source/views/collections/ToolbarView.js @@ -390,6 +390,12 @@ const ToolbarView = Class({ } } }, + + preventOverlapDidChange: function () { + if (this.get('preventOverlap') && this.get('isInDocument')) { + this.preMeasure().postMeasure().computedPropertyDidChange('left'); + } + }.observes('preventOverlap'), }); ToolbarView.OverflowMenuView = OverflowMenuView;
9
diff --git a/story.js b/story.js @@ -414,7 +414,6 @@ story.handleWheel = e => { } }; -story.listenHack = () => { const _startConversation = (comment, remotePlayer, done) => { const localPlayer = getLocalPlayer(); currentConversation = new Conversation(localPlayer, remotePlayer); @@ -431,6 +430,11 @@ story.listenHack = () => { currentConversation.addLocalPlayerMessage(comment); done && currentConversation.finish(); }; +story.startLocalPlayerComment = comment => { + _startConversation(comment, null, true); +}; + +story.listenHack = () => { window.document.addEventListener('click', async e => { if (cameraManager.pointerLockElement) { if (e.button === 0 && (cameraManager.focus && zTargeting.focusTargetReticle)) {
0
diff --git a/web/firefox_print_service.js b/web/firefox_print_service.js @@ -128,7 +128,7 @@ function FirefoxPrintService( this._printResolution = printResolution || 150; this._optionalContentConfigPromise = optionalContentConfigPromise || pdfDocument.getOptionalContentConfig(); - this._optionalContentConfigPromise = + this._printAnnotationStoragePromise = printAnnotationStoragePromise || Promise.resolve(); }
1
diff --git a/userscript.user.js b/userscript.user.js @@ -33134,10 +33134,13 @@ if (domain_nosub === "lystit.com" && domain.match(/cdn[a-z]?\.lystit\.com/)) { return src.replace(/(\/uploads\/+pj\/+)thumbs(?:-[a-z]+)?\/+/, "$1"); } - if (domain_nowww === "hayabusa.io" && src.indexOf("/openrec-image/") >= 0) { + if (domain_nowww === "hayabusa.io") { // https://hayabusa.io/openrec-image/user/3322602/332260162.q95.w164.ttl604800.headercache0.v1540223173.png?format=png // https://hayabusa.io/openrec-image/user/3322602/332260162.png?format=png - return src.replace(/(\/[0-9]+)(?:\.[a-z]+[0-9]+)*(\.[^/.]*)(?:[?#].*)?$/, "$1$2"); + // thanks to fireattack on github: https://github.com/qsniyg/maxurl/issues/98 + // https://hayabusa.io/abema/programs/386-48_s0_p25/thumb002.q85.w200.h114.v1534496588.webp + // https://hayabusa.io/abema/programs/386-48_s0_p25/thumb002.webp + return src.replace(/(\/(?:thumb)?[0-9]+)(?:\.[a-z]+[0-9]+)*(\.[^/.]*)(?:[?#].*)?$/, "$1$2"); } if (domain === "s.dou.ua") {
7
diff --git a/components/measurement/DetailsBox.js b/components/measurement/DetailsBox.js @@ -68,7 +68,7 @@ export const DetailsBox = ({ title, content, collapsed = false, ...rest }) => { <Heading h={4}>{title}</Heading> </Box> <Box ml='auto'> - <CollapseTrigger size={36} open={isOpen} /> + <CollapseTrigger size={36} $open={isOpen} /> </Box> </StyledDetailsBoxHeader> }
4
diff --git a/src/App/MiddleColumn/StoryCard/index.js b/src/App/MiddleColumn/StoryCard/index.js import React, { Component, PropTypes } from 'react'; import { Link } from 'react-router-dom'; import { connect } from 'react-redux'; +import deepEqual from 'deep-eql'; import { track } from '../../../EventTracker'; // eslint-disable-next-line import { @@ -67,6 +68,11 @@ class StoryCard extends Component { } }; + shouldComponentUpdate = (nextProps, nextState) => { + return !deepEqual(this.props, nextProps) || + !deepEqual(this.state, nextState); + }; + componentWillUpdate = nextProps => { if (nextProps.metadata !== this.props.metadata) { if (nextProps.metadata && !nextProps.story.deleted) {
7
diff --git a/src/Plugins/RenderPlugin.js b/src/Plugins/RenderPlugin.js @@ -16,6 +16,7 @@ async function render( if (!templateConfig) { templateConfig = new TemplateConfig(null, false); } + // TODO should this run every time??? probably not? if (config && typeof config === "function") { await config(templateConfig.userConfig); @@ -313,6 +314,8 @@ function EleventyPlugin(eleventyConfig, options = {}) { } // Render strings + if (opts.tagName) { + // use falsy to opt-out eleventyConfig.addJavaScriptFunction(opts.tagName, renderStringShortcodeFn); eleventyConfig.addLiquidTag(opts.tagName, function (liquidEngine) { @@ -322,15 +325,22 @@ function EleventyPlugin(eleventyConfig, options = {}) { eleventyConfig.addNunjucksTag(opts.tagName, function (nunjucksLib) { return nunjucksTemplateTag(nunjucksLib, opts.tagName); }); + } // Render File - eleventyConfig.addJavaScriptFunction(opts.tagNameFile, renderFileShortcodeFn); + if (opts.tagNameFile) { + // use `false` to opt-out + eleventyConfig.addJavaScriptFunction( + opts.tagNameFile, + renderFileShortcodeFn + ); eleventyConfig.addLiquidShortcode(opts.tagNameFile, renderFileShortcodeFn); eleventyConfig.addNunjucksAsyncShortcode( opts.tagNameFile, renderFileShortcodeFn ); } +} module.exports = EleventyPlugin; module.exports.File = renderFile;
9
diff --git a/src/components/inspectors/LoopCharacteristics.vue b/src/components/inspectors/LoopCharacteristics.vue @@ -382,10 +382,13 @@ export default { } }, setLoopMaximum(value) { + if (!value) { + value = null; + } this.local.loopCharacteristics.loopMaximum = value; }, getLoopMaximum() { - if (!this.local.loopCharacteristics) return 0; + if (!this.local.loopCharacteristics) return null; return this.local.loopCharacteristics.loopMaximum; }, setLoopCondition(value) {
2
diff --git a/contributors.js b/contributors.js @@ -39,4 +39,8 @@ module.exports = { name: 'Abhijeet Rohidas Ekad', linkedin: 'https://www.linkedin.com/in/abhijeet-ekad-767a691aa/', }, + "nisargpawade": { + country: "India", + name: "Nisarg Pawade", + }, }
3
diff --git a/test/sanity/testcfg.py b/test/sanity/testcfg.py @@ -37,6 +37,8 @@ class RemotingTestCase(test.TestCase): return self.path[-1] def GetEnv(self): + libpath=os.getenv('PYTHONPATH') + if libpath is None: libpath = join(self.file, '..', '..', '..', '..', '..', 'third_party/webdriver/pylib') return {'PYTHONPATH': libpath, 'CHROMEDRIVER': self.GetChromeDriver(self.arch, self.mode, self.nwdir)}
3
diff --git a/server/game/player.js b/server/game/player.js @@ -319,11 +319,6 @@ class Player extends Spectator { } initDynastyDeck() { - this.hand.each(card => { - card.moveTo('dynasty deck'); - this.dynastyDeck.push(card); - }); - this.hand = _([]); this.shuffleDynastyDeck(); }
1
diff --git a/src/browser/nw_extensions_browser_hooks.cc b/src/browser/nw_extensions_browser_hooks.cc @@ -144,7 +144,7 @@ std::unique_ptr<base::DictionaryValue> MergeManifest() { // retrieve `window` manifest set by `new-win-policy` std::string manifest_str = base::UTF16ToUTF8(nw::GetCurrentNewWinManifest()); - std::unique_ptr<base::Value> val(base::JSONReader().ReadToValueDeprecated(manifest_str)); + std::unique_ptr<base::Value> val(base::JSONReader::ReadDeprecated(manifest_str)); if (val && val->is_dict()) { manifest.reset(static_cast<base::DictionaryValue*>(val.release())); } else {
14
diff --git a/tasks/gulp/copy-to-destination.js b/tasks/gulp/copy-to-destination.js @@ -15,17 +15,24 @@ const taskArguments = require('../task-arguments') gulp.task('copy-files', () => { return merge( - // Copy source JavaScript + /** + * Copy files to destination with './govuk-esm' suffix + * Includes only source JavaScript ECMAScript (ES) modules + */ gulp.src([ `${configPaths.src}**/*.mjs`, `!${configPaths.src}**/*.test.*` ]).pipe(gulp.dest(`${taskArguments.destination}/govuk-esm/`)), + /** + * Copy files to destination with './govuk' suffix + * Includes fonts, images, polyfills, component files + */ merge( gulp.src([ `${configPaths.src}**/*`, - // Exclude files from copy + // Exclude files we don't want to publish '!**/.DS_Store', '!**/*.mjs', '!**/*.test.*', @@ -36,8 +43,10 @@ gulp.task('copy-files', () => { // https://github.com/alphagov/govuk-frontend/tree/main/package#readme `!${configPaths.src}README.md`, - // Exclude files from other streams + // Exclude Sass files handled by PostCSS stream below `!${configPaths.src}**/*.scss`, + + // Exclude source YAML handled by JSON streams below `!${configPaths.components}**/*.yaml` ]),
7
diff --git a/CHANGES.md b/CHANGES.md - Fixed handling of subtree root transforms in `Implicit3DTileContent`. [#9971](https://github.com/CesiumGS/cesium/pull/9971) - Fixed issue in `ModelExperimental` where indices were not the correct data type after draco decode. [#9974](https://github.com/CesiumGS/cesium/pull/9974) - Fixed WMS 1.3.0 `GetMap` `bbox` parameter so that it follows the axis ordering as defined in the EPSG database. [#9797](https://github.com/CesiumGS/cesium/pull/9797) -- Fixed a typo in the `KmlDataSource` documentation. +- Fixed a typo in the `KmlDataSource` documentation. [#9976](https://github.com/CesiumGS/cesium/pull/9976) ### 1.88 - 2021-12-01
3
diff --git a/game.js b/game.js @@ -968,7 +968,6 @@ const _updateWeapons = (timestamp) => { // moveMesh.visible = false; const localPlayer = useLocalPlayer(); - const oldGrabUseTarget = grabUseMesh.visible ? grabUseMesh.target : null; const _isWear = o => localPlayer.wears.some(wear => wear.instanceId === o.instanceId); grabUseMesh.visible = false; @@ -1042,13 +1041,6 @@ const _updateWeapons = (timestamp) => { grabUseMesh.visible = true; grabUseMesh.target = object; - if (object !== oldGrabUseTarget) { - const localPlayer = useLocalPlayer(); - let activateActionIndex = localPlayer.actions.findIndex(action => action.type === 'activate'); - if (activateActionIndex !== -1) { - localPlayer.actions.splice(activateActionIndex, 1); - } - } grabUseMesh.setComponent('value', weaponsManager.getActivateFactor(now)); } }
2
diff --git a/src/userscript.ts b/src/userscript.ts @@ -65104,7 +65104,21 @@ var $$IMU_EXPORT$$; if (domain === "global.unitednations.entermediadb.net") { // https://global.unitednations.entermediadb.net/assets/mediadb/services/module/asset/downloads/preset/assets/2014/07/19535/image1170x530cropped.jpg // https://global.unitednations.entermediadb.net/assets/mediadb/services/module/asset/downloads/preset/assets/2014/07/19535/image.jpg - return src.replace(/\/image[0-9]+x[0-9]+(?:cropped)?(\.[^/.]*)$/, "/image$1"); + // https://global.unitednations.entermediadb.net/assets/mediadb/services/module/asset/downloads/preset/assets/2014/07/19535/image3000x3000.jpg -- doesn't exist + // other: + // https://global.unitednations.entermediadb.net/assets/mediadb/services/module/asset/downloads/preset/Libraries/Production+Library/29-11-2021-Dubai-Expo-opportunity-zone.JPEG/image770x420cropped.jpg + // https://global.unitednations.entermediadb.net/assets/mediadb/services/module/asset/downloads/preset/Libraries/Production+Library/29-11-2021-Dubai-Expo-opportunity-zone.JPEG/image3000x3000.jpg -- 2048x1536 + // https://global.unitednations.entermediadb.net/assets/mediadb/services/module/asset/downloads/preset/Libraries/Production+Library/10-12-2021_Mont-Blanc-02.jpg/image770x420cropped.jpg + // https://global.unitednations.entermediadb.net/assets/mediadb/services/module/asset/downloads/preset/Libraries/Production+Library/10-12-2021_Mont-Blanc-02.jpg/image3000x3000.jpg -- 2000x1125 + // https://global.unitednations.entermediadb.net/assets/mediadb/services/module/asset/downloads/preset/Libraries/Production+Library/5-11-2021-COP26-Glasgow-Youth-02.jpg/image770x420cropped.jpg + // https://global.unitednations.entermediadb.net/assets/mediadb/services/module/asset/downloads/preset/Collections/Embargoed/11-11-2021-Haiti-FAO4.jpg/image770x420cropped.jpg + // https://global.unitednations.entermediadb.net/assets/mediadb/services/module/asset/downloads/preset/Collections/Embargoed/11-11-2021-Haiti-FAO4.jpg/image3000x3000.jpg -- 2000x1333 + // https://global.unitednations.entermediadb.net/assets/mediadb/services/module/asset/downloads/preset/Libraries/Graphics+Library/Human-Rights-Day-QuoteCard-Bachelet.png/image1024x768.jpg + // https://global.unitednations.entermediadb.net/assets/mediadb/services/module/asset/downloads/preset/Libraries/Graphics+Library/Human-Rights-Day-QuoteCard-Bachelet.png/image3000x3000.jpg -- 1941x3000 + // removing the last /image.* returns a text file containing the images available + return src + .replace(/(\/downloads\/+preset\/+[^/]+\/+[^/]+\/+[^/]+\.[a-zA-Z]{3,4}\/+)image[0-9]+x[0-9]+(?:cropped)?(\.[^/.]*)$/, "$1image3000x3000$2") + .replace(/(\/downloads\/+preset\/+assets\/+[0-9]{4}\/+[0-9]{2}\/+[0-9]+\/+)image[0-9]+x[0-9]+(?:cropped)?(\.[^/.]*)$/, "$1image$2"); } if (domain === "rimg.bookwalker.jp") {
7
diff --git a/src/components/PageMetadata.js b/src/components/PageMetadata.js @@ -71,6 +71,7 @@ const PageMetadata = ({ description, meta, title, image, canonicalUrl }) => { canonicalUrl || `${site.siteMetadata.url}${canonicalPath}` /* Set fallback ogImage based on path */ + const siteUrl = site.siteMetadata.url let ogImage = getImage(ogImageDefault)?.images.fallback.src if (pathname.includes("/developers/")) { ogImage = getImage(ogImageDevelopers)?.images.fallback.src @@ -84,7 +85,7 @@ const PageMetadata = ({ description, meta, title, image, canonicalUrl }) => { if (image) { ogImage = image } - const ogImageUrl = host.concat(ogImage) + const ogImageUrl = siteUrl.concat(ogImage) return ( <Helmet
13
diff --git a/src/imba/router.imba b/src/imba/router.imba @@ -178,8 +178,16 @@ export class Router < EventEmitter let href = a.getAttribute('href') let url = new URL(a.href) let target = url.href.slice(url.origin.length) + let currpath = realpath.split('#')[0] + let newpath = target.split('#')[0] + # console.log 'clicklink',target,url,currpath,newpath + # checking if we are only changing the hash here + if currpath == newpath + global.document.location.hash = url.hash + else self.go(target) + e.stopPropagation() e.preventDefault()
12
diff --git a/semantics.json b/semantics.json "H5P.Text 1.1", "H5P.Table 1.1", "H5P.Link 1.3", - "H5P.Image 1.0", + "H5P.Image 1.1", "H5P.Summary 1.8", "H5P.SingleChoiceSet 1.9", "H5P.MultiChoice 1.10",
0
diff --git a/themes/shared/routes/widgets/Forms.js b/themes/shared/routes/widgets/Forms.js @@ -69,6 +69,6 @@ export default <cx> </Section> <Section mod="well" title="MonthPicker"> - <MonthPicker range from:bind="dateFrom" to:bind="dateTo"/> + <MonthPicker style={{ height: '25em' }} range from:bind="dateFrom" to:bind="dateTo"/> </Section> </cx>
12
diff --git a/src/web/containers/Settings/Settings.jsx b/src/web/containers/Settings/Settings.jsx import classNames from 'classnames'; import i18next from 'i18next'; -import cookie from 'js-cookie'; import _ from 'lodash'; +import Uri from 'jsuri'; import React, { Component, PropTypes } from 'react'; import { Link } from 'react-router'; import shallowCompare from 'react-addons-shallow-compare'; @@ -146,17 +146,11 @@ class Settings extends Component { return; } - // Force set lang cookie - cookie.set('lang', lang, { expires: 365 }); - - if (window.location.search) { - // Redirect to the originating page if URL query parameters exist - // For example: ?lang=de#/settings - window.location.replace(window.location.pathname); - return; - } - - window.location.reload(); + i18next.changeLanguage(lang, (err, t) => { + const uri = new Uri(window.location.search); + uri.replaceQueryParam('lang', lang); + window.location.search = uri.toString(); + }); }); }, restoreSettings: () => {
1
diff --git a/token-metadata/0x5b535EDfA75d7CB706044Da0171204E1c48D00e8/metadata.json b/token-metadata/0x5b535EDfA75d7CB706044Da0171204E1c48D00e8/metadata.json "symbol": "808TA", "address": "0x5b535EDfA75d7CB706044Da0171204E1c48D00e8", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/legacy.js b/legacy.js +'use strict' var pull = require('pull-stream') var pl = require('pull-level') var Live = require('pull-live') @@ -74,9 +75,18 @@ module.exports = function (db, flumedb) { ) } + function update (since) { + var prog = flumedb.progress + var start = (prog.start = flumedb.progress.start ? flumedb.progress.start : +since) + prog.current = +since + prog.ratio = + (prog.current - start) / (prog.target - start) + } + one({reverse: true, limit: 1}, function (err, last) { if(!last) ready() //empty legacy database. - else + else { + flumedb.progress.target = +last.timestamp flumedb.since.once(function (v) { if(v === -1) load(null) else flumedb.get(v, function (err, data) { @@ -85,32 +95,30 @@ module.exports = function (db, flumedb) { else ready() }) }) + } function load(since) { - flumedb.progress = { - target: +last.timestamp, current: +since, - from: +since - } + update(since) pull( db.createLogStream({gt: since}), paramap(function (data, cb) { - var prog = flumedb.progress - prog.from = flumedb.progress.from ? flumedb.progress.from : +data.timestamp - prog.current = +data.timestamp - prog.ratio = - (prog.current - prog.from) / (prog.target - prog.from) + update(data.timestamp) flumedb.append(data, cb) }, 32), pull.drain(null, ready) ) } function ready () { - console.log('loaded!') - flumedb.progress.current = flumedb.progress.target + if(!flumedb.progress.target) { + flumedb.progress.target = flumedb.progress.current = flumedb.progress.ratio = 1 + flumedb.progress.start = 0 + } flumedb.ready.set(true) - } }) } } + + +
12
diff --git a/lib/reporters/dot_reporter.js b/lib/reporters/dot_reporter.js @@ -14,6 +14,7 @@ function DotReporter(silent, out) { this.results = []; this.startTime = new Date(); this.endTime = null; + this.currentLineChars = 0; this.out.write('\n'); this.out.write(' '); } @@ -36,6 +37,10 @@ DotReporter.prototype = { if (this.silent) { return; } + if (this.currentLineChars > 60) { + this.currentLineChars = 0; + this.out.write('\n '); + } if (result.passed) { this.out.write('.'); } else if (result.skipped) { @@ -43,6 +48,7 @@ DotReporter.prototype = { } else { this.out.write('F'); } + this.currentLineChars += 1; }, finish: function() { if (this.silent) {
7
diff --git a/frontend/src/containers/consul_kv.js b/frontend/src/containers/consul_kv.js @@ -396,11 +396,11 @@ class ConsulKV extends Component { &nbsp; &nbsp; { this.props.consulKVPair.Key - ? <RaisedButton - style={{ float: 'right' }} + ? <FlatButton + style={{ float: 'right', color: 'white' }} backgroundColor={ red500 } onClick={ () => { this.deleteKey() } } - label='Delete' + label='Delete key' /> : null }
7
diff --git a/screenshot.html b/screenshot.html const mediaRecorder = new MediaRecorder(stream, { mimeType: 'video/webm; codecs=vp9', + videoBitsPerSecond: 5000000, }); mediaRecorder.ondataavailable = event => {
0
diff --git a/generators/openapi-client/files.js b/generators/openapi-client/files.js @@ -46,12 +46,15 @@ function writeFiles() { } Object.keys(this.clientsToGenerate).forEach(cliName => { - removeClientFiles(cliName); + const baseCliPackage = `${this.packageName}.client.`; + const cliPackage = `${baseCliPackage}${_.toLower(cliName)}`; + const snakeCaseCliPackage = `${baseCliPackage}${_.snakeCase(cliName)}`; + this.removeFolder(path.resolve(constants.SERVER_MAIN_SRC_DIR, ...cliPackage.split('.'))); + this.removeFolder(path.resolve(constants.SERVER_MAIN_SRC_DIR, ...snakeCaseCliPackage.split('.'))); + const inputSpec = this.clientsToGenerate[cliName].spec; const generatorName = this.clientsToGenerate[cliName].generatorName; - const baseCliPackage = `${this.packageName}.client.`; - const cliPackage = `${baseCliPackage}${_.toLower(cliName)}`; let openApiCmd; if (generatorName === 'spring') { this.log(chalk.green(`\n\nGenerating npm script for generating client code ${cliName} (${inputSpec})`)); @@ -173,18 +176,3 @@ function writeFiles() { } }; } - -function removeClientFiles(cliName) { - const baseCliPackage = `${this.packageName}.client.`; - const cliPackage = `${baseCliPackage}${_.toLower(cliName)}`; - const snakeCaseCliPackage = `${baseCliPackage}${_.snakeCase(cliName)}`; - removeFolder(path.resolve(constants.SERVER_MAIN_SRC_DIR, ...cliPackage.split('.'))); - removeFolder(path.resolve(constants.SERVER_MAIN_SRC_DIR, ...snakeCaseCliPackage.split('.'))); -} - -function removeFolder(folder) { - if (shelljs.test('-d', folder)) { - this.log(`Removing the folder - ${folder}`); - shelljs.rm('-rf', folder); - } -}
2
diff --git a/src/MUIDataTable.js b/src/MUIDataTable.js @@ -951,7 +951,7 @@ class MUIDataTable extends React.Component { ); }; - getSortDirection(column) { + getSortDirectionLabel(column) { return column.sortDirection === 'asc' ? 'ascending' : 'descending'; } @@ -979,7 +979,7 @@ class MUIDataTable extends React.Component { } } - const orderLabel = this.getSortDirection(columns[index]); + const orderLabel = this.getSortDirectionLabel(columns[index]); const announceText = `Table now sorted by ${columns[index].name} : ${orderLabel}`; let newState = { @@ -1014,7 +1014,7 @@ class MUIDataTable extends React.Component { if (this.options.onColumnSortChange) { this.options.onColumnSortChange( this.state.columns[index].name, - this.getSortDirection(this.state.columns[index]), + this.state.columns[index].sortDirection, ); } },
3
diff --git a/userscript.user.js b/userscript.user.js @@ -30132,6 +30132,12 @@ var $$IMU_EXPORT$$; return src.replace(/(:\/\/[^/]*\/)(?:in|out)\/[0-9]+x[0-9]+\//, "$1"); } + if (domain_nosub === "luscious.net" && /^w[0-9]+\./.test(domain)) { + // https://w100.luscious.net/Piclocked/316083/29737493_385675231951060_2443315356056420352_n_01CHCAG9S2B6ZYCNE0STTDBZP3.100x100.jpg + // https://cdnio.luscious.net/Piclocked/316083/29737493_385675231951060_2443315356056420352_n_01CHCAG9S2B6ZYCNE0STTDBZP3.jpg + return src.replace(/^[a-z]+:\/\/[^/]+\/+/, "https://cdnio.luscious.net/"); + } + if (domain_nosub === "luscious.net" && domain.match(/cdn[a-z]*\.luscious\.net/)) { // https://cdnio.luscious.net/Piclocked/316083/29737493_385675231951060_2443315356056420352_n_01CHCAG9S2B6ZYCNE0STTDBZP3.100x100.jpg @@ -50264,6 +50270,15 @@ var $$IMU_EXPORT$$; return src.replace(/(\/img\/+[0-9]+(?:\/+|-))[^/]*((?:\/+|-)[0-9]+[^0-9])/, "$1origin$2"); } + if (domain === "img.ngfiles.com") { + // https://img.ngfiles.com/icons/hovers/rankandrate.png?cached=1578181342 + if (/\/icons\/+hovers\/+[a-z]+\.png/.test(src)) + return { + url: src, + bad: "mask" + }; + } + if (domain === "uimg.ngfiles.com") { // https://uimg.ngfiles.com/icons/7097/7097354_small.png?f1547808730 // https://uimg.ngfiles.com/icons/7097/7097354_large.png?f1547808730 @@ -50274,6 +50289,113 @@ var $$IMU_EXPORT$$; return src.replace(/(\/icons\/+[0-9]+\/+[0-9]+_)(?:small|medium)\./, "$1large.") } + if (domain === "art.ngfiles.com") { + // https://art.ngfiles.com/thumbnails/779000/779568_full.jpg?f1551377356 + // https://art.ngfiles.com/images/779000/779568_incaseart_the-invitation-chapter-2-page-1.jpg?f1547047570 + + newsrc = src.replace(/(\/thumbnails\/+[0-9]+\/+[0-9]+)\./, "$1_full."); + if (newsrc !== src) + return newsrc; + + var get_origpage_for_ngart = function(id, cb) { + var cache_key = "ngart_page:" + id; + api_cache.fetch(cache_key, cb, function(done) { + options.do_request({ + url: "https://www.newgrounds.com/content/share/" + id + "/4", // 4 = art?, 3 = audio + method: "GET", + onload: function(resp) { + if (resp.readyState !== 4) + return; + + if (resp.status !== 200) { + console_error(cache_key, resp); + return done(null, false); + } + + var match = resp.responseText.match(/<div\s+class=["']embed-link["'][\s\S]{10,100}<input\s+type="text"\s+value=["']([^"']+)/); + if (!match) { + console_error(cache_key, "Unable to find match for", resp); + return done(null, false); + } + + return done(decode_entities(match[1]), 12*60*60); + } + }); + }); + }; + + var get_orig_from_ngartpage = function(pageurl, cb) { + var cache_key = "ngart_orig:" + pageurl; + api_cache.fetch(cache_key, cb, function(done) { + options.do_request({ + url: pageurl, + method: "GET", + onload: function(resp) { + if (resp.readyState !== 4) + return; + + if (resp.status !== 200) { + console_error(cache_key, resp); + return done(null, false); + } + + var match = resp.responseText.match(/PHP\.merge\(({.*?"full_image_text":.*?})\);/); + if (!match) { + console_error(cache_key, "Unable to find match for", resp); + return done(null, false); + } + + try { + var json = JSON_parse(match[1]); + var img = json.full_image_text; + + match = img.match(/src="([^"]+)"/); + if (!match) { + console_error(cache_key, "Unable to find img match for", img); + } else { + return done(decode_entities(match[1]), 12*60*60); + } + } catch (e) { + console_error(cache_key, e); + } + + return done(null, false); + } + }); + }); + }; + + id = src.match(/\/(?:thumbnails|images)\/+[0-9]+\/+([0-9]+)/); + if (id && options.do_request && options.cb) { + id = id[1]; + get_origpage_for_ngart(id, function(page) { + var obj = { + url: src + }; + + if (page) { + obj.extra = {page: page}; + + if (src.indexOf("/thumbnails/") >= 0) { + return get_orig_from_ngartpage(page, function(url) { + if (url) { + obj.url = url; + } + + return options.cb(obj); + }); + } + } + + return options.cb(obj); + }); + + return { + waiting: true + }; + } + } + if (domain_nowww === "pinimg.icu") { // https://pinimg.icu/wall/200x200/south-korean-girls-pinterest-heyitsmesophia-asian-girl-korean-girl-cute-girls-korean-E4da4470ff0b1335d96e2d15858679d5e.jpg?t=5d7744985798c // https://pinimg.icu/wall/0x0/south-korean-girls-pinterest-heyitsmesophia-asian-girl-korean-girl-cute-girls-korean-E4da4470ff0b1335d96e2d15858679d5e.jpg?t=5d7744985798c @@ -57131,6 +57253,12 @@ var $$IMU_EXPORT$$; .replace(/\/(game-(?:header|thumbnail))\/+[0-9]+\/+([0-9]+-)(?:crop[0-9]+(?:_[0-9]+){3}-)?/, "/$1/999999999/$2"); } + if (domain_nowww === "crosti.ru") { + // http://crosti.ru/patterns/00/11/40/4fc8aa7305/thumbnail.jpg + // http://crosti.ru/patterns/00/11/40/4fc8aa7305/picture.jpg + return src.replace(/(\/patterns\/+(?:[0-9a-f]{2}\/+){3}[0-9a-f]{5,}\/+)thumbnail(\.[^/.]+)(?:[?#].*)?$/, "$1picture$2"); + } +
7
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -14,7 +14,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - 'alternate' as a listed 'rel' type with recommended 'text/html' to communicate there is an html version. - Added a code of conduct based on github's template. -- overview document that gives a more explanatory discussion of the various parts of the spec and how they relate +- Overview document that gives a more explanatory discussion of the various parts of the spec and how they relate +- Several new sections to 'best practices' document. - Added the ability to define Item properties under Assets (item-spec/item-spec.md) - Add `proj:shape` and `proj:transform` to the projections extension.
0
diff --git a/userscript.user.js b/userscript.user.js @@ -23974,7 +23974,9 @@ var $$IMU_EXPORT$$; // https://cdn.britannica.com/50/71350-118-1F17F9C4.jpg // https://cdn.britannica.com/s:500x350/35/155335-004-7F46A7C3.jpg // https://cdn.britannica.com/35/155335-004-7F46A7C3.jpg - return src.replace(/(:\/\/[^/]*\/)(?:s:)?[0-9]+x[0-9]+\//, "$1"); + // https://cdn.britannica.com/s:180x120,c:crop/77/170477-050-1C747EE3/Laptop-computer.jpg + // https://cdn.britannica.com/77/170477-050-1C747EE3/Laptop-computer.jpg + return src.replace(/(:\/\/[^/]*\/)(?:s:)?[0-9]+x[0-9]+(?:,[^/]+)?\//, "$1"); } if (domain === "cdn.awsli.com.br") {
7
diff --git a/packages/insight-previous/src/components/head-nav/head-nav.ts b/packages/insight-previous/src/components/head-nav/head-nav.ts @@ -72,7 +72,7 @@ export class HeadNavComponent { this.resetSearch(); this.loading = false; this.reportBadQuery('Server error. Please try again'); - console.log(err); + this.logger.error(err); }); } else { this.resetSearch(); @@ -84,6 +84,7 @@ export class HeadNavComponent { /* tslint:disable:no-unused-variable */ private reportBadQuery(message): void { this.presentToast(message); + this.logger.info(message); } private presentToast(message): void {
14
diff --git a/store/queue.js b/store/queue.js @@ -73,6 +73,8 @@ function runReliableQueue(queueName, parallelism, processor) { return processOneJob(); }); }); + }).catch((err) => { + throw err; }); } for (let i = 0; i < parallelism; i += 1) {
9
diff --git a/packages/app/src/server/service/page.ts b/packages/app/src/server/service/page.ts @@ -2708,7 +2708,7 @@ class PageService { * @param user To be used to filter pages to update. If null, only public pages will be updated. * @returns Promise<void> */ - async normalizeParentRecursively(paths: string[], user: any | null, shouldEmit = false): Promise<number> { + async normalizeParentRecursively(paths: string[], user: any | null, shouldEmitAvailable = false): Promise<number> { const Page = mongoose.model('Page') as unknown as PageModel; const ancestorPaths = paths.flatMap(p => collectAncestorPaths(p, [])); @@ -2727,7 +2727,7 @@ class PageService { const grantFiltersByUser: { $or: any[] } = Page.generateGrantCondition(user, userGroups); - return this._normalizeParentRecursively(pathAndRegExpsToNormalize, ancestorPaths, grantFiltersByUser, user, shouldEmit); + return this._normalizeParentRecursively(pathAndRegExpsToNormalize, ancestorPaths, grantFiltersByUser, user, shouldEmitAvailable); } private buildFilterForNormalizeParentRecursively(pathOrRegExps: (RegExp | string)[], publicPathsToNormalize: string[], grantFiltersByUser: { $or: any[] }) { @@ -2777,7 +2777,7 @@ class PageService { publicPathsToNormalize: string[], grantFiltersByUser: { $or: any[] }, user, - shouldEmit = false, + shouldEmitAvailable = false, count = 0, skiped = 0, isFirst = true, @@ -2785,7 +2785,7 @@ class PageService { const BATCH_SIZE = 100; const PAGES_LIMIT = 1000; - const socket = shouldEmit ? this.crowi.socketIoService.getAdminSocket() : null; + const socket = shouldEmitAvailable ? this.crowi.socketIoService.getAdminSocket() : null; const Page = mongoose.model('Page') as unknown as PageModel; const { PageQueryBuilder } = Page; @@ -2950,7 +2950,16 @@ class PageService { await streamToPromise(migratePagesStream); if (await Page.exists(matchFilter) && shouldContinue) { - return this._normalizeParentRecursively(pathOrRegExps, publicPathsToNormalize, grantFiltersByUser, user, shouldEmit, nextCount, nextSkiped, false); + return this._normalizeParentRecursively( + pathOrRegExps, + publicPathsToNormalize, + grantFiltersByUser, + user, + shouldEmitAvailable, + nextCount, + nextSkiped, + false, + ); } // End
10
diff --git a/slick.editors.js b/slick.editors.js }; this.serializeValue = function () { - var rtn = parseFloat($input.val()) || 0; + var rtn = parseFloat($input.val()); + if (FloatEditor.AllowEmptyValue) { + if (!rtn && rtn !==0) { rtn = ''; } + } else { + rtn |= 0; + } var decPlaces = getDecimalPlaces(); if (decPlaces !== null } FloatEditor.DefaultDecimalPlaces = null; + FloatEditor.AllowEmptyValue = false; function DateEditor(args) { var $input;
11
diff --git a/userscript.user.js b/userscript.user.js @@ -1675,6 +1675,7 @@ var $$IMU_EXPORT$$; // thanks to regis on discord for the idea scroll_incremental_mult: 1.25, mouseover_move_with_cursor: false, + // thanks to regis on discord for the idea mouseover_move_within_page: true, zoom_out_to_close: false, // thanks to 07416 on github for the idea: https://github.com/qsniyg/maxurl/issues/20#issuecomment-439599984 @@ -29009,6 +29010,7 @@ var $$IMU_EXPORT$$; if ((domain_nosub === "redditmedia.com" || domain_nosub === "redd.it" || + (domain_nosub === "reddit.com" && /:\/\/[^/]+\/+[ru]\/+/.test(src)) || string_indexof(origsrc, "blob:") === 0) && host_domain_nosub === "reddit.com" && options.element && options.do_request && options.cb) { @@ -29160,6 +29162,20 @@ var $$IMU_EXPORT$$; } } + // classic reddit link title + if (options.element.classList.contains("title") && + options.element.parentElement.classList.contains("title")) { + try { + var current = doubleparent.parentElement.parentElement; + var id = current.getAttribute("data-fullname"); + if (id) { + newsrc = request(id); + if (newsrc) + return newsrc; + } + } catch (e) {} + } + if (doubleparent.parentElement) { if (doubleparent.parentElement.tagName === "A" && options.do_request && options.cb) { // card @@ -67353,7 +67369,9 @@ var $$IMU_EXPORT$$; fill_object: true, exclude_problems: [], // todo: use settings' exclude_problems instead use_cache: "read", + //use_cache: false, use_api_cache: false, + host_url: window.location.href, element: el, document: document, window: get_window(),
7
diff --git a/src/components/app/App.jsx b/src/components/app/App.jsx @@ -147,7 +147,7 @@ export const App = () => { <div className={ styles.App } id="app" > <AppContext.Provider value={{ state, setState, app }}> <Header setSelectedApp={ setSelectedApp } selectedApp={ selectedApp } /> - <canvas className={ styles.canvas } ref={ canvasRef } id="canvas" /> + <canvas className={ styles.canvas } ref={ canvasRef } /> <Crosshair /> <ActionMenu /> <Settings />
2
diff --git a/test/jasmine/tests/gl2d_plot_interact_test.js b/test/jasmine/tests/gl2d_plot_interact_test.js @@ -261,6 +261,57 @@ describe('Test gl plot side effects', function() { .catch(failTest) .then(done); }); + + it('@gl should not clear context when dimensions are not integers', function(done) { + spyOn(Plots, 'cleanPlot').and.callThrough(); + spyOn(Lib, 'log').and.callThrough(); + + var w = 500.5; + var h = 400.5; + var w0 = Math.floor(w); + var h0 = Math.floor(h); + + function assertDims(msg) { + var fullLayout = gd._fullLayout; + expect(fullLayout.width).toBe(w, msg); + expect(fullLayout.height).toBe(h, msg); + + var canvas = fullLayout._glcanvas; + expect(canvas.node().width).toBe(w0, msg); + expect(canvas.node().height).toBe(h0, msg); + + var gl = canvas.data()[0].regl._gl; + expect(gl.drawingBufferWidth).toBe(w0, msg); + expect(gl.drawingBufferHeight).toBe(h0, msg); + } + + Plotly.plot(gd, [{ + type: 'scattergl', + mode: 'lines', + y: [1, 2, 1] + }], { + width: w, + height: h + }) + .then(function() { + assertDims('base state'); + + // once from supplyDefaults + expect(Plots.cleanPlot).toHaveBeenCalledTimes(1); + expect(Lib.log).toHaveBeenCalledTimes(0); + + return Plotly.restyle(gd, 'mode', 'markers'); + }) + .then(function() { + assertDims('after restyle'); + + // one more supplyDefaults + expect(Plots.cleanPlot).toHaveBeenCalledTimes(2); + expect(Lib.log).toHaveBeenCalledTimes(0); + }) + .catch(failTest) + .then(done); + }); }); describe('Test gl2d plots', function() {
0
diff --git a/js/kiri-init.js b/js/kiri-init.js @@ -1474,12 +1474,12 @@ var gs_kiri_init = exports; slaFillDensity: UC.newInput('density', {title:'percent infill\n0.0-1.0', convert:UC.toFloat, bound:UC.bound(0,1), modes:SLA}), slaFillLine: UC.newInput('line width', {title:'hatch line width\nin millimeters', convert:UC.toFloat, bound:UC.bound(0,5), modes:SLA}), - slaSupport: LOCAL ? UC.newGroup('support', null, {modes:SLA, group:"sla-support"}) : null, - slaSupportLayers: LOCAL ? UC.newInput('layers', {title:'base support layers\n0-10', convert:UC.toInt, bound:UC.bound(0,10), modes:SLA}) : null, - slaSupportDensity: LOCAL ? UC.newInput('density', {title:'used to compute the\nnumber of support pillars\n0.0-1.0 (0 = disable)', convert:UC.toFloat, bound:UC.bound(0,1), modes:SLA}) : null, - slaSupportSize: LOCAL ? UC.newInput('size', {title:'max size of a\nsupport pillar\nin millimeters', convert:UC.toFloat, bound:UC.bound(0,1), modes:SLA}) : null, - slaSupportPoints: LOCAL ? UC.newInput('points', {title:'number of points in\neach support pillar\nin millimeters', convert:UC.toInt, bound:UC.bound(3,10), modes:SLA, expert:true}) : null, - slaSupportGap: LOCAL ? UC.newInput('gap layers', {title:'number of layers between\nraft and bottom of obejct', convert:UC.toInt, bound:UC.bound(3,10), modes:SLA, expert:true}) : null, + slaSupport: UC.newGroup('support', null, {modes:SLA, group:"sla-support"}) : null, + slaSupportLayers: UC.newInput('layers', {title:'base support layers\n0-10', convert:UC.toInt, bound:UC.bound(0,10), modes:SLA}), + slaSupportDensity: UC.newInput('density', {title:'used to compute the\nnumber of support pillars\n0.0-1.0 (0 = disable)', convert:UC.toFloat, bound:UC.bound(0,1), modes:SLA}), + slaSupportSize: UC.newInput('size', {title:'max size of a\nsupport pillar\nin millimeters', convert:UC.toFloat, bound:UC.bound(0,1), modes:SLA}), + slaSupportPoints: UC.newInput('points', {title:'number of points in\neach support pillar\nin millimeters', convert:UC.toInt, bound:UC.bound(3,10), modes:SLA, expert:true}), + slaSupportGap: UC.newInput('gap layers', {title:'number of layers between\nraft and bottom of obejct', convert:UC.toInt, bound:UC.bound(3,10), modes:SLA, expert:true}), slaOutput: UC.newGroup('output', null, {modes:SLA, group:"sla-first"}), slaFirstOffset: UC.newInput('z offset', {title:'z layer offset\nalmost always 0.0\n0.0-1.0 in millimeters', convert:UC.toFloat, bound:UC.bound(0,1), modes:SLA, expert:true}),
2
diff --git a/generators/server/templates/src/main/java/package/repository/PersistentTokenRepository.java.ejs b/generators/server/templates/src/main/java/package/repository/PersistentTokenRepository.java.ejs @@ -48,9 +48,6 @@ import org.springframework.data.mongodb.repository.MongoRepository; <%_ if (databaseTypeNeo4j) { _%> import org.springframework.data.neo4j.repository.Neo4jRepository; <%_ } _%> -<%_ if (databaseTypeCouchbase) { _%> -import org.springframework.data.couchbase.repository.CouchbaseRepository; -<%_ } _%> <%_ if (databaseTypeCassandra) { _%> import org.springframework.boot.autoconfigure.cassandra.CassandraProperties; import org.springframework.stereotype.Repository; @@ -62,48 +59,26 @@ import javax.validation.Validator; import java.util.ArrayList; <%_ } _%> import java.util.List; -<%_ if (databaseTypeCassandra || databaseTypeCouchbase) { _%> +<%_ if (databaseTypeCassandra) { _%> import java.util.Optional; <%_ } _%> <%_ if (databaseTypeCassandra) { _%> import java.util.Set; <%_ } _%> -<%_ if (databaseTypeCouchbase) { _%> - -import static <%= packageName %>.config.Constants.ID_DELIMITER; -<%_ } _%> /** <%_ if (databaseTypeSql) { _%> * Spring Data JPA repository for the {@link PersistentToken} entity. <%_ } else if (databaseTypeMongodb) { _%> * Spring Data MongoDB repository for the {@link PersistentToken} entity. -<%_ } else if (databaseTypeCouchbase) { _%> - * Spring Data Couchbase repository for the {@link PersistentToken} entity. <%_ } else if (databaseTypeCassandra) { _%> * Cassandra repository for the {@link PersistentToken} entity. <%_ } _%> */ -<%_ if (databaseTypeSql || databaseTypeMongodb || databaseTypeNeo4j || databaseTypeCouchbase) { _%> -public interface PersistentTokenRepository extends <% if (databaseTypeSql) { %>JpaRepository<% } %><% if (databaseTypeMongodb) { %>MongoRepository<% } %><% if (databaseTypeNeo4j) { %>Neo4jRepository<% } %><% if (databaseTypeCouchbase) { %>CouchbaseRepository<% } %><PersistentToken, String> { - <%_ if (databaseTypeCouchbase) { _%> - - default Optional<PersistentToken> findBySeries(String series) { - return findById(PersistentToken.PREFIX + ID_DELIMITER + series); - } +<%_ if (databaseTypeSql || databaseTypeMongodb || databaseTypeNeo4j) { _%> +public interface PersistentTokenRepository extends <% if (databaseTypeSql) { %>JpaRepository<% } %><% if (databaseTypeMongodb) { %>MongoRepository<% } %><% if (databaseTypeNeo4j) { %>Neo4jRepository<% } %><PersistentToken, String> { - default void deleteBySeries(String series) { - deleteById(PersistentToken.PREFIX + ID_DELIMITER + series); - } - - default List<PersistentToken> findByUser(<%= asEntity('User') %> user) { - return findByLogin(user.getLogin()); - } - - List<PersistentToken> findByLogin(String login); - <%_ } else { _%> List<PersistentToken> findByUser(<%= asEntity('User') %> user); - <%_ } _%> List<PersistentToken> findByTokenDateBefore(LocalDate localDate);
2
diff --git a/src/resources/views/crud/buttons/delete.blade.php b/src/resources/views/crud/buttons/delete.blade.php success: function(result) { if (result == 1) { // Redraw the table + if (typeof crud != 'undefined' && typeof crud.table != 'undefined') { crud.table.draw(false); + } // Show a success notification bubble new Noty({
1
diff --git a/userscript.user.js b/userscript.user.js @@ -11816,16 +11816,22 @@ var $$IMU_EXPORT$$; // https://geo1.ggpht.com/cbk?panoid=G27yBPFPohgfkiutzyysbg&output=thumbnail&cb_client=search.gws-prod.gps&thumb=2&w=408&h=240&yaw=108.68918&pitch=0&thumbfov=100 // https://geo1.ggpht.com/cbk?panoid=G27yBPFPohgfkiutzyysbg&output=thumbnail&cb_client=search.gws-prod.gps&thumb=2&w=1000&h=588&yaw=108.68918&pitch=0&thumbfov=100 queries = get_queries(src); - if (queries.w && queries.h) { - var w = parseInt(queries.w); - var h = parseInt(queries.h); + if (queries.panoid) { + var w = parseInt(queries.w) || 0; + var h = parseInt(queries.h) || 0; var largest = Math.max(w, h); var smallest = Math.min(w, h); - var ratio = largest / smallest; + var ratio; + + if (!smallest || !largest) { + ratio = 1; + } else { + ratio = largest / smallest; + } - if (largest < 1000) { - largest = 1000; + if (largest < 9999) { + largest = 9999; smallest = parseInt(largest / ratio); if (w > h) {
7
diff --git a/source/localisation/Locale.js b/source/localisation/Locale.js @@ -315,6 +315,25 @@ Object.assign(Locale.prototype, { // === Strings === + /** + Method (private): Method: O.Locale#_lr + + Accepts a list of translated strings/arguments and, when no DOM + elements are included in the list, reduces them to a single string. + + Parameters: + parts - {*[]} Array of items. + + Returns: + {String|*[]} A single string or array of items. + */ + _lr(parts) { + if (parts.some((p) => typeof p === 'object')) { + return parts; + } + return parts.join(''); + }, + /** Property: O.Locale#macros Type: String[Function]
0
diff --git a/backend/portal_api/pkg/handler.go b/backend/portal_api/pkg/handler.go @@ -871,7 +871,7 @@ func enrichResponseWithProgramDetails(response interface{}) []interface{}{ for _,objects := range responseArr { obj := objects.(map[string]interface{}) - programs := obj["programs"].([]interface{}) + if programs, ok := obj["programs"].([]interface{}); ok { updatedPrograms := []interface{}{} if programs != nil && len(programs) > 0 { for _, obj := range programs { @@ -892,6 +892,7 @@ func enrichResponseWithProgramDetails(response interface{}) []interface{}{ } results = append(results, obj) } + } return results }
9
diff --git a/lib/event/onJoinRequestHandle.js b/lib/event/onJoinRequestHandle.js @@ -20,20 +20,15 @@ exports.func = function (args) { return getJoinRequests({jar: jar, group: group}) .timeout(timeout) .then(function (requests) { - var jobs = []; var complete = { data: [], latest: -2, repeat: requests.length >= 20 }; - for (var i = 0; i < requests.length; i++) { - var request = requests[i]; - jobs.push(request.requestId); - evt.emit('data', request); - } var handled = 0; - if (jobs.length > 0) { - return new Promise(function (resolve, reject) { + var promise; + if (requests.length > 0) { + promise = new Promise(function (resolve, reject) { evt.on('handle', function (request, accept, callback) { var id = request.requestId; handleJoinRequestId({jar: jar, group: group, requestId: id, accept: accept}) @@ -42,7 +37,7 @@ exports.func = function (args) { if (callback) { callback(); } - if (handled === jobs.length) { + if (handled === requests.length) { evt.removeAllListeners('handle'); resolve(complete); } @@ -51,6 +46,13 @@ exports.func = function (args) { }); }); } + for (var i = 0; i < requests.length; i++) { + var request = requests[i]; + evt.emit('data', request); + } + if (requests.length > 0) { + return promise; + } return complete; }); }
6
diff --git a/test/external.spec.js b/test/external.spec.js @@ -8,6 +8,7 @@ if (typeof process === 'object') { var pathModule = require('path'); var childProcess = require('child_process'); var basePath = pathModule.join(findNodeModules()[0], '..'); + var externaltestsDir = pathModule.join(__dirname, '..', 'externaltests'); var extend = require('../lib/utils').extend; describe('executed through mocha', function () { expect.addAssertion('<array|string> executed through mocha <object?>', function (expect, subject, env) { @@ -15,9 +16,9 @@ if (typeof process === 'object') { subject = [subject]; } return expect.promise(function (run) { - childProcess.execFile(pathModule.resolve(basePath, 'node_modules', '.bin', 'mocha'), subject.map(function (fileName) { - return pathModule.resolve(basePath, 'externaltests', fileName + '.spec.js'); - }), { + childProcess.execFile(pathModule.resolve(basePath, 'node_modules', '.bin', 'mocha'), ['--opts', 'mocha.opts'].concat(subject.map(function (fileName) { + return pathModule.resolve(externaltestsDir, fileName + '.spec.js'); + })), { cwd: basePath, env: extend({}, process.env, env || {}) }, run(function (err, stdout, stderr) { @@ -118,9 +119,9 @@ if (typeof process === 'object') { expect.addAssertion('<string> executed through jasmine', function (expect, subject) { return expect.promise(function (run) { childProcess.execFile(pathModule.resolve(basePath, 'node_modules', '.bin', 'jasmine'), { - cwd: basePath, + cwd: pathModule.join(externaltestsDir, '..'), env: extend({}, process.env, { - JASMINE_CONFIG_PATH: 'externaltests/' + subject + '.jasmine.json' + JASMINE_CONFIG_PATH: externaltestsDir + '/' + subject + '.jasmine.json' }) }, run(function (err, stdout, stderr) { return [err, stdout, stderr]; @@ -166,9 +167,9 @@ if (typeof process === 'object') { } return expect.promise(function (run) { childProcess.execFile(pathModule.resolve(basePath, 'node_modules', '.bin', 'jest'), [ - '--config', pathModule.resolve(basePath, 'externaltests', 'jestconfig.json') + '--config', pathModule.resolve(externaltestsDir, 'jestconfig.json') ].concat(subject.map(function (fileName) { - return pathModule.resolve(__dirname, '..', 'externaltests', fileName + '.spec.js'); + return pathModule.resolve(externaltestsDir, fileName + '.spec.js'); })), { cwd: basePath, env: extend({}, process.env, env || {})
1
diff --git a/token-metadata/0x4588C3c165a5C66C020997d89C2162814Aec9cD6/metadata.json b/token-metadata/0x4588C3c165a5C66C020997d89C2162814Aec9cD6/metadata.json "symbol": "BTCWH", "address": "0x4588C3c165a5C66C020997d89C2162814Aec9cD6", "decimals": 8, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/app/src/renderer/components/common/TmBalance.vue b/app/src/renderer/components/common/TmBalance.vue <div class="tabs"> <div v-for="tab in tabs" - :key="tab.path" + :key="tab.pathName" :class="{ 'tab-selected': $route.name === tab.pathName }" class="tab" >
3
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md - [ ] This PR has **no** breaking changes. - [ ] I have added my changes to the [CHANGELOG](https://github.com/radiantearth/stac-spec/blob/dev/CHANGELOG.md) **or** a CHANGELOG entry is not required. -- [ ] API only: I have run `npm run generate-all` to update the [generated OpenAPI files](https://github.com/radiantearth/stac-spec/blob/dev/api-spec/README.md#openapi-definitions). \ No newline at end of file
2
diff --git a/app/builtin-pages/views/view-source.js b/app/builtin-pages/views/view-source.js @@ -25,16 +25,25 @@ window.history.replaceState = _wr('replaceState') var archiveKey = '' var fileTree = '' var archive -var filePath +var filePath = '' var fileContent = '' +var pathInfo setup() async function setup () { update() - ;[archiveKey, filePath] = await parseURL() + + + pathInfo = await parseURL() + if (pathInfo.type === 'dat') { + filePath = pathInfo.path + archiveKey = pathInfo.key archive = new DatArchive(archiveKey) fileTree = new FileTree(archive, {onDemand: true}) await fileTree.setup().catch(err => null) + } else { + filePath = pathInfo.path + } update() await loadFile() @@ -44,14 +53,26 @@ async function setup () { async function loadFile () { fileContent = '' - ;[archiveKey, filePath] = await parseURL() + + pathInfo = await parseURL() + filePath = pathInfo.path + var mimetype = mime.lookup(filePath) if (/^(video|audio|image)/.test(mimetype) == false) { + + if (pathInfo.type === 'dat') { try { fileContent = await archive.readFile(filePath, 'utf8') } catch (e) { console.warn(e) } + } else { + try { + fileContent = await beakerBrowser.fetchBody(filePath.slice(1)) + } catch (err) { + console.error(err) + } + } } update() } @@ -59,15 +80,20 @@ async function loadFile () { async function parseURL () { var path = window.location.pathname if (path === '/' || !path) { - throw new Error('Invalid dat URL') + throw new Error('Invalid URL') + } + + if (path.startsWith('/http')) { + return {type: 'http', path: window.location.pathname} } + try { // extract key from url var [_, key, path] = /^\/([^\/]+)(.*)/.exec(path) if (/[0-9a-f]{64}/i.test(key) == false) { key = await DatArchive.resolveName(key) } - return [key, path] + return {type: 'dat', key, path} } catch (e) { console.error('Failed to parse URL', e) throw new Error('Invalid dat URL') @@ -78,11 +104,12 @@ async function parseURL () { // = function update () { + if (pathInfo && pathInfo.type === 'dat') { + if (!archive) { yo.update(document.querySelector('main'), yo`<main>Loading...</main>`) return - } - + } else { yo.update(document.querySelector('main'), yo` <main> <div class="sidebar"> @@ -98,18 +125,38 @@ function update () { </main> `) } + } else { + if (!fileContent) { + yo.update(document.querySelector('main'), yo`<main>Loading...</main>`) + } else { + yo.update(document.querySelector('main'), yo` + <main> + ${renderFile()} + </main> + `) + } + } +} function renderFile () { - var url = archive.url + filePath - var mimetype = mime.lookup(url) - url += '?cache-buster=' + Date.now() - if (!fileContent) { + var url = filePath + var mimetype = mime.lookup(filePath) + + if (pathInfo.type === 'dat') { + url = archive.url + filePath + + if (!archive) { return yo` <div class="file-view empty"> <i class="fa fa-code"></i> </div> ` - } else if (mimetype.startsWith('image/')) { + } + } + + url += '?cache-buster=' + Date.now() + + if (mimetype.startsWith('image/')) { return yo` <div class="file-view"> <img src=${url} />
9
diff --git a/src/structure/immutable/setIn.js b/src/structure/immutable/setIn.js @@ -10,7 +10,7 @@ const undefinedArrayMerge = (previous, next) => const mergeLists = (original, value) => original && List.isList(original) - ? original.mergeDeepWith(undefinedArrayMerge, value) + ? original.toMap().mergeDeepWith(undefinedArrayMerge, value.toMap()).toList() : value /*
1
diff --git a/src/pages/gettingstarted/design-principles.hbs b/src/pages/gettingstarted/design-principles.hbs @@ -18,10 +18,7 @@ title: Design Principles Clarity </h2> <p> - Eliminate ambiguity so that the user can see the - important elements on the page, understand what - they're supposed to do and act confidently. - Keep the user focused on their goal without distraction. + Eliminate ambiguity. Enable people to see, understand and act with confidence. </p> </div> @@ -30,12 +27,7 @@ title: Design Principles Consistency </h2> <p> - Create familiarity by applying the same solution to the - same problem each time. Use consistent language, - patterns and components across the experience. - This will allow the user to better predict what'll - be on the page and understand what they're supposed - to do without having to carefully examine the content and design. + Create familiarity and strengthen intuition by applying the same solution to the same problem every time. </p> </div> @@ -44,11 +36,8 @@ title: Design Principles Beauty </h2> <p> - Every aesthetic design decision - from how we design - components, to illustrations, to choices about - color - should be purposeful. Build trust and - further build confidence with an experience that - looks beautiful and functions seamlessly. + Every design decision should be purposeful. Build trust and further build confidence with an experience that + looks beautiful and flows seamlessly. </p> </div> @@ -57,8 +46,8 @@ title: Design Principles Inclusion </h2> <p> - Be inclusive, legible and readable across the experience. - Thoughtfully serve the needs of all people. + Craft an experience that recognizes the varying abilities of all people. Designing for those with disabilities + will result in a better experience for everyone. </p> </div> @@ -67,10 +56,7 @@ title: Design Principles Delight </h2> <p> - With all our principles accounted for, - enhance the user's experience through - thoughtful craftsmanship and elegant - micro-interactions and transitions. + Enhance expressions through thoughtful and unexpected details that bring joy to every touchpoint. </p> </div> </div>
3
diff --git a/app.js b/app.js @@ -78,13 +78,11 @@ const server = createServer(serverOptions); const backlog = global.environment.maxConnections || 128; const listener = server.listen(serverOptions.bind.port, serverOptions.bind.host, backlog); -const version = require('./package').version; +const { version, name } = require('./package'); listener.on('listening', function () { - logger.info(`Using Node.js ${process.version}`); - logger.info(`Using configuration file ${configurationFile}`); const { address, port } = listener.address(); - logger.info(`Windshaft tileserver ${version} started on ${address}:${port} PID=${process.pid} (${process.env.NODE_ENV})`); + logger.info({ 'Node.js': process.version, pid: process.pid, environment: process.env.NODE_ENV, [name]: version, address, port, config: configurationFile }, `${name} initialized successfully`); }); function getCPUUsage (oldUsage) {
6
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -15,7 +15,7 @@ Contributions and pull requests are always welcome. Contributors may often be fo - renamed the `paper-radio-group` `paper-radio` to just `radio` -- usage would now be `group.radio` as opposed to `group.paper-radio`. - Flex and layout attributes are replaced by classes (see [the documentation](http://miguelcobain.github.io/ember-paper/release-1/#/layout/introduction)). `flex=true` on Ember Paper components has also been removed and replaced by classes. -### master +### 1.0.0-beta.1 (July 20, 2017) - Chester Bennington release. RIP. - [#730](https://github.com/miguelcobain/ember-paper/pull/730) ready for fastboot 1.0 - [#752](https://github.com/miguelcobain/ember-paper/pull/752) Tooltips are now available. Contrasts are now set correctly. - [#750](https://github.com/miguelcobain/ember-paper/pull/750) Toasts are now available.
6
diff --git a/articles/logs/index.md b/articles/logs/index.md @@ -109,7 +109,7 @@ The following table lists the codes associated with the appropriate log events. | `limit_mu` | Blocked IP Address | An IP address is blocked with 100 failed login attempts using different usernames, all with incorrect passwords in 24 hours, or 50 sign-up attempts per minute from the same IP address. | [Anomaly Detection](/anomaly-detection) | | `limit_ui` | Too Many Calls to /userinfo | Rate limit exceeded to `/limit_ui` endpoint | [API Rate Limit Policy](/policies/rate-limits) | | `limit_wc` | Blocked Account | An IP address is blocked with 10 failed login attempts into a single account from the same IP address. | [Anomaly Detection](/anomaly-detection) | -| `pwd_leak` | Breached password | | | +| `pwd_leak` | Breached password | Someone behind the IP address: `ip` attempted to login with a leaked password. | [Anomaly Detection](/anomaly-detection) | | `s` | Success Login | Successful login event. | | | `sapi` | Success API Operation | | | | `sce` | Success Change Email | | [Emails in Auth0](/email) |
3
diff --git a/src/components/Cluster/RKEClusterAdd/index.js b/src/components/Cluster/RKEClusterAdd/index.js @@ -257,7 +257,8 @@ export default class RKEClusterConfig extends PureComponent { const { dispatch } = this.props; dispatch({ type: 'cloud/getInitNodeCmd', - callback: data => { + callback: res => { + const data = (res && res.response_data) || {}; this.setState({ initNodeCmd: data.cmd }); } });
1
diff --git a/js/bcex.js b/js/bcex.js @@ -91,7 +91,6 @@ module.exports = class bcex extends Exchange { async fetchBalance (params = {}) { await this.loadMarkets (); - params['api_key'] = this.apiKey let response = await this.privatePostApiUserUserBalance (params) let data = response['data']; let keys = Object.keys(data); @@ -156,7 +155,6 @@ module.exports = class bcex extends Exchange { await this.loadMarkets(); let request = {}; let marketId = this.marketId(symbol); - request['api_key'] = this.apiKey; if (typeof symbol !== 'undefined') { request['symbol'] = marketId } @@ -170,7 +168,6 @@ module.exports = class bcex extends Exchange { async fetchOrder (id, symbol = undefined, params = {}) { await this.loadMarkets(); let request = { - 'api_key': this.apiKey, 'symbol': this.marketId(symbol), 'trust_id': id } @@ -244,7 +241,6 @@ module.exports = class bcex extends Exchange { await this.loadMarkets(); let request = {}; let marketId = this.marketId(symbol); - request['api_key'] = this.apiKey; request['type'] = 'open'; if (typeof symbol !== 'undefined') { request['symbol'] = marketId @@ -262,7 +258,6 @@ module.exports = class bcex extends Exchange { async createOrder (symbol, type, side, amount, price = undefined, params = {}) { await this.loadMarkets(); let order = { - 'api_key': this.apiKey, 'symbol': this.marketId (symbol), 'type': side, 'price': price, @@ -279,7 +274,6 @@ module.exports = class bcex extends Exchange { async cancelOrder (id, symbol = undefined, params = {}) { await this.loadMarkets (); let request = {}; - request['api_key'] = this.apiKey; if (typeof symbol !== 'undefined') { request['symbol'] = symbol; } @@ -301,8 +295,7 @@ module.exports = class bcex extends Exchange { if (api === 'private') { this.checkRequiredCredentials(); if (method !== 'GET') { - if (Object.keys(query).length) { - let messageParts = [] + let messageParts = ['api_key=' + this.encodeURIComponent(this.apiKey)]; let paramsKeys = Object.keys(params).sort(); for (let i = 0; i < paramsKeys.length; i++) { let paramKey = paramsKeys[i]; @@ -318,7 +311,6 @@ module.exports = class bcex extends Exchange { headers['Content-Type'] = 'application/x-www-form-urlencoded'; } } - } return { 'url': url, 'method': method, 'body': body, 'headers': headers }; } };
12
diff --git a/Sources/Web3Core/EthereumABI/ABIElements.swift b/Sources/Web3Core/EthereumABI/ABIElements.swift @@ -262,7 +262,7 @@ extension ABI.Element { extension ABI.Element.Function { public func decodeInputData(_ rawData: Data) -> [String: Any]? { - return Web3Core.decodeInputData(rawData, methodEncoding: methodEncoding, inputs: inputs) + return ABI.Element.decodeInputData(rawData, methodEncoding: methodEncoding, inputs: inputs) } /// Decodes data returned by a function call. Able to decode `revert(string)`, `revert CustomError(...)` and `require(expression, string)` calls. @@ -432,10 +432,11 @@ extension ABI.Element.Function { extension ABI.Element.Constructor { public func decodeInputData(_ rawData: Data) -> [String: Any]? { - return Web3Core.decodeInputData(rawData, inputs: inputs) + return ABI.Element.decodeInputData(rawData, inputs: inputs) } } +extension ABI.Element { /// Generic input decoding function. /// - Parameters: /// - rawData: data to decode. Must match the following criteria: `data.count == 0 || data.count % 32 == 4`. @@ -443,7 +444,7 @@ extension ABI.Element.Constructor { /// - inputs: expected input types. Order must be the same as in function declaration. /// - Returns: decoded dictionary of input arguments mapped to their indices and arguments' names if these are not empty. /// If decoding of at least one argument fails, `rawData` size is invalid or `methodEncoding` doesn't match - `nil` is returned. -private func decodeInputData(_ rawData: Data, + static private func decodeInputData(_ rawData: Data, methodEncoding: Data? = nil, inputs: [ABI.Element.InOut]) -> [String: Any]? { let data: Data @@ -490,3 +491,4 @@ private func decodeInputData(_ rawData: Data, } return returnArray } +} \ No newline at end of file
5
diff --git a/app-manager.js b/app-manager.js @@ -27,9 +27,10 @@ const localFrameOpts = { }; class AppManager extends EventTarget { - constructor({state = new Y.Doc(), apps = []} = {}) { + constructor({prefix = appsMapName, state = new Y.Doc(), apps = []} = {}) { super(); + this.prefix = prefix; this.state = state; this.apps = apps; @@ -56,7 +57,7 @@ class AppManager extends EventTarget { this.pushingLocalUpdates = pushingLocalUpdates; } bindState(state) { - const apps = state.getArray(appsMapName); + const apps = state.getArray(this.prefix); let lastApps = []; apps.observe(() => { if (!this.stateBlindMode) { @@ -78,7 +79,7 @@ class AppManager extends EventTarget { for (const instanceId of lastApps) { if (!nextApps.includes(instanceId)) { // console.log('detected app removal', instanceId); - const trackedApp = state.getMap(appsMapName + '.' + instanceId); + const trackedApp = state.getMap(this.prefix + '.' + instanceId); const app = this.getAppByInstanceId(instanceId); this.dispatchEvent(new MessageEvent('trackedappremove', { data: { @@ -245,7 +246,7 @@ class AppManager extends EventTarget { } getOrCreateTrackedApp(instanceId) { const {state} = this; - const apps = state.getArray(appsMapName); + const apps = state.getArray(this.prefix); let hadObject = false; for (const app of apps) { @@ -258,21 +259,21 @@ class AppManager extends EventTarget { apps.push([instanceId]); } - return state.getMap(appsMapName + '.' + instanceId); + return state.getMap(this.prefix + '.' + instanceId); } getTrackedApp(instanceId) { const {state} = this; - const apps = state.getArray(appsMapName); + const apps = state.getArray(this.prefix); for (const app of apps) { if (app === instanceId) { - return state.getMap(appsMapName + '.' + instanceId); + return state.getMap(this.prefix + '.' + instanceId); } } return null; } hasTrackedApp(instanceId) { const {state} = this; - const apps = state.getArray(appsMapName); + const apps = state.getArray(this.prefix); for (const app of apps) { if (app === instanceId) { return true; @@ -338,7 +339,7 @@ class AppManager extends EventTarget { } removeTrackedAppInternal(removeInstanceId) { const {state} = this; - const apps = state.getArray(appsMapName); + const apps = state.getArray(this.prefix); const appsJson = apps.toJSON(); const removeIndex = appsJson.indexOf(removeInstanceId); if (removeIndex !== -1) { @@ -348,7 +349,7 @@ class AppManager extends EventTarget { apps.delete(removeIndex, 1); - const trackedApp = state.getMap(appsMapName + '.' + instanceId); + const trackedApp = state.getMap(this.prefix + '.' + instanceId); const keys = Array.from(trackedApp.keys()); for (const key of keys) { trackedApp.delete(key); @@ -366,8 +367,9 @@ class AppManager extends EventTarget { } setTrackedAppTransform(instanceId, p, q, s) { const {state} = this; + const self = this; state.transact(function tx() { - const trackedApp = state.getMap(appsMapName + '.' + instanceId); + const trackedApp = state.getMap(self.prefix + '.' + instanceId); trackedApp.set('position', p.toArray()); trackedApp.set('quaternion', q.toArray()); trackedApp.set('scale', s.toArray());
0
diff --git a/src/pages/using-spark/foundations/color-usage.mdx b/src/pages/using-spark/foundations/color-usage.mdx @@ -124,11 +124,14 @@ import { <SprkDivider element="span" additionalClasses="sprk-u-mvn"/> <h2 class="docs-b-h2 sprk-b-TypeDisplayTwo sprk-u-mbl sprk-u-Measure">Our Color Story</h2> <p> - The Orbit palette conveys the tapestry of colors seen from a rocket entering space. As it leaves the earth's curvature, its atmospheres evolve in radiance and hue. + The Orbit palette conveys the tapestry of colors seen from a rocket as it ascends into space. Our color choices capture the evolving hue and brilliance of the earth's atmospheres. </p> -<p class="sprk-u-mbh sprk-b-TypeBodyTwo sprk-u-Measure"> - We've curated this palette with color psychology and user testing in mind. It's built for modern, human-centered, and <a href="/using-spark/foundations/color-accessibility">WCAG 2.1 (Level AA) accessible</a> experiences. +<p> + We've employed color psychology and user testing to develop this palette. It's built for modern, human-centered, and accessible experiences. </p> +<blockquote class="docs-b-Blockquote sprk-u-mvl sprk-u-Measure"> + Our color usage guidelines follow <a href="/using-spark/foundations/color-accessibility">WCAG 2.1 (Level AA)</a> contrast standards. +</blockquote> <div class="sprk-u-TextAlign--right sprk-u-mbl"> <a class="sprk-b-Link" href="#table-of-contents"> Back to Table of Contents
7
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -115,10 +115,3 @@ workflows: - dockerfile-lint - eslint - test-unit - - create-gitops-pull-request: - context: reaction-gitops - requires: - - docker-build-push - filters: - branches: - only: /^trunk$/
2
diff --git a/client/app/locales/locale-en.json b/client/app/locales/locale-en.json "CREATE": "Create", "CANCEL": "Cancel", "DELETE": "Delete", - "JOIN": "Join" + "JOIN": "Join", + "LEAVE": "Leave" }, "GROUP": { "LEAVE": "Leave group...", + "LEAVE_TEXT": "Are you sure you want to leave this group?", "EDIT": "Edit group", "TITLE": "Title of this group", "DESCRIPTION": "Group description, visible for members",
3
diff --git a/docs/components/Checkboxes/1.Usage.md b/docs/components/Checkboxes/1.Usage.md @@ -13,43 +13,44 @@ Checkboxes can be either checked, unchecked or indeterminate. //title=Using indeterminate state <Form {...{ fields: { - chicken: { + meat: { inline: true, hideHelpRow: true, labelPosition: 'after', - label: 'Chicken', - initialValue: false, - children: <Checkbox className="mlxl"/> + label: 'Meat (Click below)', + children: ({state: {current, current: {meat, chicken, beef}}, setValues}) => ( + <Checkbox {...{ + indeterminate: !!((chicken || beef) && !(chicken && beef)), + onChange: () => setValues({chicken: !meat, beef: !meat}) + }}/> + ) }, - beef: { + chicken: { inline: true, hideHelpRow: true, labelPosition: 'after', - label: 'Beef', - initialValue: false, - children: <Checkbox className="mlxl"/> + label: 'Chicken', + children: ({state: {current: {chicken, beef}}, setValues}) => + <Checkbox onChange={() => setValues({meat: !chicken && beef})}/> }, - meat: { + beef: { inline: true, hideHelpRow: true, labelPosition: 'after', - label: 'Meat (Click below)', - children: ({state}) => { - const checked = state.current.chicken && state.current.beef; - const indeterminate = ( state.current.chicken || state.current.beef ) && !( state.current.chicken && state.current.beef ); - return <Checkbox {...{checked, indeterminate}}/>; - } + label: 'Beef', + children: ({state: {current: {chicken, beef}}, setValues}) => + <Checkbox onChange={() => setValues({meat: chicken && !beef})}/> } } }}> -{({fields}) => { - return ( +{({fields: {meat, chicken, beef}}) => ( <div> - {fields.meat} - {fields.chicken} - {fields.beef} + {meat} + <div className="mlxl"> + {chicken} + {beef} + </div> </div> - ); -}} +)} </Form> ``` \ No newline at end of file
7
diff --git a/lib/assets/javascripts/locale/en.json b/lib/assets/javascripts/locale/en.json }, "data-observatory-measure": { "title": "Enrich from Data Observatory", - "short-title": "Data Observatory", + "short-title": "Enrich from Data observatory", "age-and-gender": "Age and Gender", "boundaries": "Boundaries", "education": "Education", "add": "Add new measurement" }, "header": { - "title": "Select region", - "description": "For augmenting your layer" + "title": "Select a region", + "description": "Region must match your geometry location" }, "parameters": { "title": "Select measurements", - "description": "Pick up to 10 measurements" + "description": "Contextual data to augment your layer" }, "source": { - "label": "Source" + "label": "Base layer" }, "region": { "label": "Region", "trade-area": "Trade area", "georeference-street-address": "Geocode street address", "georeference-cities": "Geocode cities", - "data-observatory-measure": "Data Observatory" + "data-observatory-measure": "Enrich from Data Observatory" } }, "public_transport": "Public transport",
3
diff --git a/content/questions/combining-different-types/index.md b/content/questions/combining-different-types/index.md @@ -14,11 +14,10 @@ answers: What gets logged in the following scenario? ```javascript - console.log(2 + "1"); console.log(2 - "1"); ``` <!-- explanation --> -The first expression evaluates to `"21"` because the `+` operator defaults to string concatenation when used with a string. On the other hand, the `-` operator cannot act on strings so `"1"` gets converted to a number in the evaluation of the second expression. +The first expression evaluates to `"21"` because the `+` operator results in string concatenation when either operand is a string. On the other hand, the `-` operator cannot act on strings so `"1"` gets converted to a number in the evaluation of the second expression.
2
diff --git a/articles/api/authentication/_change-password.md b/articles/api/authentication/_change-password.md @@ -21,6 +21,7 @@ curl --request POST \ ``` ```javascript +<!--Script uses auth0.js v8. See Remarks for details.--> <script src="${auth0js_urlv8}"></script> <script type="text/javascript"> var webAuth = new auth0.WebAuth({ @@ -80,6 +81,8 @@ This endpoint only works for database connections. - If you are using Lock version 9 and above, **do not set the password field** or you will receive a *password is not allowed* error. You can only set the password if you are using Lock version 8. - If a password is provided, when the user clicks on the confirm password change link, the new password specified in this POST will be set for this user. - If a password is NOT provided, when the user clicks on the password change link they will be redirected to a page asking them for a new password. +- The sample auth0.js script uses the library version 8. If you are using auth0.js version 7, please see this [reference guide](/libraries/auth0js/v7). +- Auth0.js version 8 verifies ID tokens during authentication transactions. Only tokens which are signed with the `RS256` algorithm can be verified on the client side, meaning that your Auth0 client must be configured to sign tokens with `RS256`. See the [auth0.js migration guide](/libraries/auth0js/migration-guide#switching-from-hs256-to-rs256) for more details. ### More Information
0
diff --git a/lib/helpers/populate/assignRawDocsToIdStructure.js b/lib/helpers/populate/assignRawDocsToIdStructure.js @@ -6,6 +6,8 @@ const utils = require('../../utils'); module.exports = assignRawDocsToIdStructure; +const kHasArray = Symbol('assignRawDocsToIdStructure.hasArray'); + /** * Assign `vals` returned by mongo query to the `rawIds` * structure returned from utils.getVals() honoring @@ -43,7 +45,16 @@ function assignRawDocsToIdStructure(rawIds, resultDocs, resultOrder, options, re let i = 0; const len = rawIds.length; - const hasResultArrays = Object.values(resultOrder).find(o => Array.isArray(o)); + + if (sorting && recursed && options[kHasArray] === undefined) { + options[kHasArray] = false; + for (const key in resultOrder) { + if (Array.isArray(resultOrder[key])) { + options[kHasArray] = true; + break; + } + } + } for (i = 0; i < len; ++i) { id = rawIds[i]; @@ -55,7 +66,7 @@ function assignRawDocsToIdStructure(rawIds, resultDocs, resultOrder, options, re continue; } - if (id === null && !sorting) { + if (id === null && sorting === false) { // keep nulls for findOne unless sorting, which always // removes them (backward compat) newOrder.push(id); @@ -79,7 +90,7 @@ function assignRawDocsToIdStructure(rawIds, resultDocs, resultOrder, options, re if (doc) { if (sorting) { const _resultOrder = resultOrder[sid]; - if (hasResultArrays) { + if (options[kHasArray]) { // If result arrays, rely on the MongoDB server response for ordering newOrder.push(doc); } else {
7
diff --git a/pages/questionnaireCrowd.js b/pages/questionnaireCrowd.js @@ -27,7 +27,7 @@ import MdArrow from 'react-icons/lib/md/trending-flat' const { Headline, P } = Interaction const mutation = gql` - mutation updateMe( + mutation submitQuestionnaireAndUpdateMe( $questionnaireId: ID! $phoneNumber: String $address: AddressInput
4
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -305,6 +305,20 @@ const loadPromise = (async () => { for (const animation of animations) { animations.index[animation.name] = animation; } + + /* const animationIndices = animationStepIndices.find(i => i.name === 'Fast Run.fbx'); + for (let i = 0; i < animationIndices.leftFootYDeltas.length; i++) { + const mesh = new THREE.Mesh(new THREE.BoxBufferGeometry(0.02, 0.02, 0.02), new THREE.MeshBasicMaterial({color: 0xff0000})); + mesh.position.set(-30 + i * 0.1, 10 + animationIndices.leftFootYDeltas[i] * 10, -15); + mesh.updateMatrixWorld(); + scene.add(mesh); + } + for (let i = 0; i < animationIndices.rightFootYDeltas.length; i++) { + const mesh = new THREE.Mesh(new THREE.BoxBufferGeometry(0.02, 0.02, 0.02), new THREE.MeshBasicMaterial({color: 0x0000ff})); + mesh.position.set(-30 + i * 0.1, 10 + animationIndices.rightFootYDeltas[i] * 10, -15); + mesh.updateMatrixWorld(); + scene.add(mesh); + } */ })(), (async () => { const srcUrl = '/animations/animations-skeleton.glb';
0
diff --git a/src/journeys_utils.js b/src/journeys_utils.js @@ -961,7 +961,9 @@ journeys_utils.tryReplaceJourneyCtaLink = function (html){ try{ if(journeys_utils.hasJourneyCtaLink()){ var journeyLinkReplacePattern = /validate[(].+[)];/g; - return html.replace(journeyLinkReplacePattern, 'validate("' + journeys_utils.getJourneyCtaLink() + '")'); + var pattern = 'validate("' + journeys_utils.getJourneyCtaLink() + '")' + var replacedHtml = html.replace(journeyLinkReplacePattern, pattern); + return replacedHtml.replace('window.top.location.replace(', 'window.top.location = ') } }catch(e){ return html;
2
diff --git a/react/.storybook/preview-head.html b/react/.storybook/preview-head.html @@ -18,7 +18,7 @@ document.addEventListener('DOMContentLoaded',() => { }; const observer = new MutationObserver(callback); - const config = { childList: true, subtree: false }; + const config = { childList: true, subtree: true }; observer.observe(document.getElementById('root'), config); }, false);
3
diff --git a/packages/build/src/log/main.js b/packages/build/src/log/main.js @@ -24,7 +24,7 @@ ${EMPTY_LINE}`) const logFlags = function(flags) { const flagsA = filterObj(flags, isDefined) if (Object.keys(flagsA).length !== 0) { - log(cyanBright.bold(`${HEADING_PREFIX} Flags`), flagsA, '') + log(cyanBright.bold(`${HEADING_PREFIX} Flags`), flagsA, EMPTY_LINE) } } @@ -40,7 +40,8 @@ ${EMPTY_LINE}`) const logConfigPath = function(configPath) { if (configPath === undefined) { - log(`${cyanBright.bold(`${HEADING_PREFIX} No config file was defined: using default values.`)}`) + log(`${cyanBright.bold(`${HEADING_PREFIX} No config file was defined: using default values.`)} +${EMPTY_LINE}`) return } @@ -64,10 +65,7 @@ const logInstallPlugins = function() { } const logLoadPlugins = function() { - log( - cyanBright.bold(`${EMPTY_LINE} -${HEADING_PREFIX} Loading plugins`), - ) + log(cyanBright.bold(`${HEADING_PREFIX} Loading plugins`)) } const logLoadedPlugins = function(pluginCommands) { @@ -204,7 +202,7 @@ const logBuildError = function(error) { const errorStack = error.cleanStack ? cleanStacks(error.message) : `\n${error.stack}` log(`${EMPTY_LINE} ${redBright.bold(getHeader('Netlify Build Error'))} -${errorStack} +${errorStack || EMPTY_LINE} ${EMPTY_LINE} ${redBright.bold(getHeader('END Netlify Build Error'))} ${EMPTY_LINE}`)
7
diff --git a/packages/nexrender-provider-ftp/src/index.js b/packages/nexrender-provider-ftp/src/index.js @@ -43,19 +43,40 @@ const upload = (job, settings, src, params) => { } return new Promise((resolve, reject) => { - const file = fs.createReadStream(src); - const con = new FTP(); + // Read file + try{ + const file = fs.createReadStream(src); + } + catch(e){ + throw new Error('Cloud not read file, Please check path and permissions.') + } file.on('error', (err) => reject(err)) + var filename = path.basename(src) + // Connect to FTP Server + try{ + const con = new FTP(); con.connect(params); - var filename = path.basename(src) + } + catch(e){ + throw new Error('Cloud not connect to FTP Server, Please check Host and Port.') + } + + // Put file + try{ con.put(file, filename, function(err) { if (err) return reject(err) con.end() resolve() }); + } + catch(e){ + throw new Error('Cloud not upload file, Please make sure FTP user has write permissions.') + con.end() + } + }) }
7
diff --git a/pykeg/web/kegadmin/views.py b/pykeg/web/kegadmin/views.py # import datetime import os +import re import zipfile import isodate @@ -1067,6 +1068,10 @@ def link_device(request): form = forms.LinkDeviceForm(request.POST) if form.is_valid(): code = form.cleaned_data.get("code") + result = re.match("^([A-Z1-9]{3})-?([A-Z1-9]{3})$", code.upper()) + if not result: + messages.error('Link code is not in the form of "XXX-XXX"') + code = "{}-{}".format(result.group(1), result.group(2)) try: status = devicelink.confirm_link(code) name = status.get("name", "New device")
11
diff --git a/package.json b/package.json "mustache": "1.1.0", "perfect-scrollbar": "git://github.com/CartoDB/perfect-scrollbar.git#master", "postcss": "5.0.19", - "tangram.cartodb": "0.5.3", + "tangram.cartodb": "~0.5.4", "torque.js": "CartoDB/torque#master", "underscore": "1.8.3" },
4
diff --git a/Candles.js b/Candles.js let maxValue = { x: MAX_PLOTABLE_DATE.valueOf(), - y: nextPorwerOf10(USDT_BTC_HTH) / 4 // TODO: This 4 is temporary + y: nextPorwerOf10(MAX_DEFAULT_RATE_SCALE_VALUE) / 4 // TODO: This 4 is temporary }; continue } - if (onScreenCandles.length < 5000) { + //if (onScreenCandles.length < 15000) { onScreenCandles.push(candle) - } + //} if (userPositionDate >= candle.begin && userPositionDate <= candle.end) { mouseCandle = candle
11
diff --git a/app/scripts/controllers/address-book.js b/app/scripts/controllers/address-book.js @@ -14,8 +14,8 @@ class AddressBookController { // PUBLIC METHODS // - setAddressList (address, name) { - return this.addToAddressList(address, name) + setAddressBook (address, name) { + return this.addToAddressBook(address, name) .then((addressBook) => { this.store.updateState({ addressBook, @@ -24,9 +24,9 @@ class AddressBookController { }) } - addToAddressList (address, name) { - let addressBook = this.getAddressList() - let index = addressBook.findIndex((element) => { return element.address === address }) + addToAddressBook (address, name) { + let addressBook = this.getAddressBook() + let index = addressBook.findIndex((element) => { return element.address === address || element.name === name }) if (index !== -1) { addressBook.splice(index, 1) } @@ -37,7 +37,7 @@ class AddressBookController { return Promise.resolve(addressBook) } - getAddressList () { + getAddressBook () { return this.store.getState().addressBook }
10
diff --git a/assets/js/googlesitekit/datastore/user/user-info.test.js b/assets/js/googlesitekit/datastore/user/user-info.test.js @@ -119,7 +119,7 @@ describe( 'core/user userInfo', () => { } ).toThrow( 'The isUserInputCompleted param is required.' ); } ); - it( 'receives and sets userInputData', async () => { + it( 'receives and sets isUserInputCompleted', async () => { const { isUserInputCompleted } = userData; await registry .dispatch( CORE_USER )
10
diff --git a/articles/api-auth/tutorials/client-credentials/customize-with-hooks.md b/articles/api-auth/tutorials/client-credentials/customize-with-hooks.md --- -description: Describes using rules with Client Credentials Grants. +description: How to use Hooks to change the scopes and add custom claims to the tokens you got using Client Credentials Grant. +toc: true --- -# Using Rules with Client Credentials Grants +# Using Hooks with Client Credentials Grants You can now add [rules](/rules) into the [client credentials](/api-auth/grant/client-credentials) exchange pipeline where you exchange a `client_id` and `secret` for an `access_token`. -## Prior to Beginning Your Configuration +## Overview + +## Before you start Please ensure that: -* You have the [Webtask Command Line Interface (CLI) installed](${manage_url}/#/account/webtasks); -* You have created an [API defined with the appropriate scopes](${manage_url}/#/apis); -* You have created a [non-interactive client](${manage_url}/#/applications) that is authorized to use the API created in the previous step. +- You have created an [API defined with the appropriate scopes](${manage_url}/#/apis) +- You have created a [non-interactive client](${manage_url}/#/clients) that is authorized to use the API created in the previous step + +If you haven't done these yet, refer to these docs for details: +- How to set up a Client Credentials Grant: + - [Using the Dashboard](/api-auth/config/using-the-auth0-dashboard) + - [Using the Management API](/api-auth/config/using-the-management-api) +- [How to execute a Client Credentials Grant](/api-auth/config/asking-for-access-tokens) + +## Use the Dashboard + +## Use the Auth0 CLI + +## Manage your Hooks + +You can disable, enable, delete or edit hooks using either the Auth0 CLI or the [dashboard]((${manage_url}/#/hooks)). You can also review your logs using the Auth0 CLI. For details, refer to the articles below. + +Use the Dashboard to: +- [Delete Hooks](/auth0-hooks/dashboard/create-delete) +- [Edit Hooks](/auth0-hooks/dashboard/edit) +- [Enable or disable Hooks](/auth0-hooks/dashboard/enable-disable) + +Use the Auth0 CLI to: +- [Delete Hooks](/auth0-hooks/cli/create-delete) +- [Edit Hooks](/auth0-hooks/cli/edit) +- [Enable or disable Hooks](/auth0-hooks/cli/enable-disable) +- [Review Logs](/auth0-hooks/cli/logs) + +--- + +# OLD - to be removed ## Creating the Rule @@ -33,7 +64,7 @@ module.exports = function(client, scope, audience, context, cb) { ``` This is a sample rule that will: -* add an arbitrary claim (`https://foo.com/claim`) to the access_token; +* add an arbitrary claim (`https://foo.com/claim`) to the access_token * add an extra scope to the default scopes configured on your [API](${manage_url}/#/apis). ### 2. Create the Webtask to Use Your Rule @@ -134,7 +165,3 @@ The Auth0 Runtime expects you to return an `access_token` that looks like the fo ``` If you decide not to issue the token, you can return `Error (cb(new Error('access denied')))`. - -### Logs - -You can use `wt logs` to see realtime logs. For additional information on reading the output, please consult [Webtask Streaming Logs](https://webtask.io/docs/api_logs).
0