code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/stories/index.tsx b/stories/index.tsx @@ -168,7 +168,7 @@ storiesOf('Griddle main', module) {css} </style> <small>Sets css-class names on state column (different for header and body), for example to use css rules defined elsewhere</small> - <Griddle data={fakeData}> + <Griddle data={fakeData} plugins={[LocalPlugin]}> <RowDefinition> <ColumnDefinition id="name" /> <ColumnDefinition id="state" cssClassName="customClassName" headerCssClassName="customHeaderClassName"/>
0
diff --git a/src/core/Core.test.js b/src/core/Core.test.js @@ -684,11 +684,147 @@ describe('src/Core', () => { }) describe('progress', () => { - xit('should reset the progress', () => {}) + it('should calculate the progress of a file upload', () => { + const core = new Core() + return core + .addFile({ + source: 'jest', + name: 'foo.jpg', + type: 'image/jpg', + data: utils.dataURItoFile(sampleImageDataURI, {}) + }) + .then(() => { + const fileId = Object.keys(core.state.files)[0] + core.calculateProgress({ + id: fileId, + bytesUploaded: 12345, + bytesTotal: 17175 + }) + expect(core.state.files[fileId].progress).toEqual({ + percentage: 71, + bytesUploaded: 12345, + bytesTotal: 17175, + uploadComplete: false, + uploadStarted: false + }) + + core.calculateProgress({ + id: fileId, + bytesUploaded: 17175, + bytesTotal: 17175 + }) + expect(core.state.files[fileId].progress).toEqual({ + percentage: 100, + bytesUploaded: 17175, + bytesTotal: 17175, + uploadComplete: false, + uploadStarted: false + }) + }) + }) + + it('should calculate the total progress of all file uploads', () => { + const core = new Core() + return core + .addFile({ + source: 'jest', + name: 'foo.jpg', + type: 'image/jpg', + data: utils.dataURItoFile(sampleImageDataURI, {}) + }) + .then(() => { + return core + .addFile({ + source: 'jest', + name: 'foo2.jpg', + type: 'image/jpg', + data: utils.dataURItoFile(sampleImageDataURI, {}) + }) + }).then(() => { + const fileId1 = Object.keys(core.state.files)[0] + const fileId2 = Object.keys(core.state.files)[1] + core.state.files[fileId1].progress.uploadStarted = new Date() + core.state.files[fileId2].progress.uploadStarted = new Date() + + core.calculateProgress({ + id: fileId1, + bytesUploaded: 12345, + bytesTotal: 17175 + }) + + core.calculateProgress({ + id: fileId2, + bytesUploaded: 10201, + bytesTotal: 17175 + }) + + core.calculateTotalProgress() + expect(core.state.totalProgress).toEqual(65) + }) + }) + + it('should reset the progress', () => { + const resetProgressEvent = jest.fn() + const core = new Core() + core.run() + core.on('core:reset-progress', resetProgressEvent) + return core + .addFile({ + source: 'jest', + name: 'foo.jpg', + type: 'image/jpg', + data: utils.dataURItoFile(sampleImageDataURI, {}) + }) + .then(() => { + return core + .addFile({ + source: 'jest', + name: 'foo2.jpg', + type: 'image/jpg', + data: utils.dataURItoFile(sampleImageDataURI, {}) + }) + }).then(() => { + const fileId1 = Object.keys(core.state.files)[0] + const fileId2 = Object.keys(core.state.files)[1] + core.state.files[fileId1].progress.uploadStarted = new Date() + core.state.files[fileId2].progress.uploadStarted = new Date() + + core.calculateProgress({ + id: fileId1, + bytesUploaded: 12345, + bytesTotal: 17175 + }) + + core.calculateProgress({ + id: fileId2, + bytesUploaded: 10201, + bytesTotal: 17175 + }) - xit('should calculate the progress of a file upload', () => {}) + core.calculateTotalProgress() - xit('should calculate the total progress of all file uploads', () => {}) + expect(core.state.totalProgress).toEqual(65) + + core.resetProgress() + + expect(core.state.files[fileId1].progress).toEqual({ + percentage: 0, + bytesUploaded: 0, + bytesTotal: 17175, + uploadComplete: false, + uploadStarted: false + }) + expect(core.state.files[fileId2].progress).toEqual({ + percentage: 0, + bytesUploaded: 0, + bytesTotal: 17175, + uploadComplete: false, + uploadStarted: false + }) + expect(core.state.totalProgress).toEqual(0) + expect(resetProgressEvent.mock.calls.length).toEqual(1) + }) + }) }) describe('checkRestrictions', () => {
0
diff --git a/src/utils_social.js b/src/utils_social.js @@ -196,7 +196,7 @@ const TWITTER_RESERVED_PATHS = 'oauth|account|tos|privacy|signup|home|hashtag|se const TWITTER_REGEX_STRING = `(?<!\\w)(?:http(?:s)?:\\/\\/)?(?:www.)?(?:twitter.com)\\/(?!(?:${TWITTER_RESERVED_PATHS})(?:[\\'\\"\\?\\.\\/]|$))([a-z0-9_]{1,15})(?![a-z0-9_])(?:/)?`; // eslint-disable-next-line max-len, quotes -const FACEBOOK_RESERVED_PATHS = 'rsrc\\.php|apps|groups|events|l\\.php|friends|images|photo.php|chat|ajax|dyi|common|policies|login|recover|reg|help|security|messages|marketplace|pages|live|bookmarks|games|fundraisers|saved|gaming|salesgroups|jobs|people|ads|ad_campaign|weather|offers|recommendations|crisisresponse|onthisday|developers|settings|connect|business'; +const FACEBOOK_RESERVED_PATHS = 'rsrc\\.php|apps|groups|events|l\\.php|friends|images|photo.php|chat|ajax|dyi|common|policies|login|recover|reg|help|security|messages|marketplace|pages|live|bookmarks|games|fundraisers|saved|gaming|salesgroups|jobs|people|ads|ad_campaign|weather|offers|recommendations|crisisresponse|onthisday|developers|settings|connect|business|plugins|intern|sharer'; // eslint-disable-next-line max-len, quotes const FACEBOOK_REGEX_STRING = `(?<!\\w)(?:http(?:s)?:\\/\\/)?(?:www.)?(?:facebook.com|fb.com)\\/(?!(?:${FACEBOOK_RESERVED_PATHS})(?:[\\'\\"\\?\\.\\/]|$))(profile\\.php\\?id\\=[0-9]{3,20}|(?!profile\\.php)[a-z0-9\\.]{5,51})(?![a-z0-9\\.])(?:/)?`;
7
diff --git a/OurUmbraco.Site/config/CommunityBlogs.json b/OurUmbraco.Site/config/CommunityBlogs.json "title": "DotSee Blog", "url": "https://www.dot-see.com", "rss": "https://www.dot-see.com/en/blog/rss", - "logo": "https://www.dot-see.com/media/24590/dotsee.png", + "logo": "https://www.dot-see.com/media/24590/dotsee_logo_01.png", "memberId": 3185 }, { "title": "Perplex", "url": "https://www.perplex.nl/en/blog/umbraco", "rss": "https://www.perplex.nl/rss/en/blog/umbraco", - "logo": "https://scontent-bru2-1.xx.fbcdn.net/v/t1.0-1/p200x200/18301933_1704816986200741_8275590260623615358_n.jpg?oh=8e0135ffe88177980a0c6651a289e216&oe=5B1D527F", + "logo": "https://www.perplex.nl/media/gfx/logoperplex.png", "memberId": null }, {
1
diff --git a/dri/report.py b/dri/report.py @@ -46,7 +46,6 @@ if not GIT_PERSONAL_TOKEN: # Github Repos being monitored REPOS = [ 'BotFramework-DirectLine-DotNet', - 'BotFramework-Composer', 'BotBuilder-V3', 'BotFramework-sdk', 'botbuilder-dotnet',
2
diff --git a/src/tests/utils/get/getCheckBotMsg.ts b/src/tests/utils/get/getCheckBotMsg.ts @@ -11,8 +11,14 @@ export function getCheckBotMsg(t, node, botAlias) { makeArgs(node) ) if (msgRes.response.new_messages && msgRes.response.new_messages.length) { - if (msgRes.response.new_messages[0].sender_alias === botAlias) { - const lastMessage = msgRes.response.new_messages[0] + if ( + msgRes.response.new_messages[msgRes.response.new_messages.length - 1] + .sender_alias === botAlias + ) { + const lastMessage = + msgRes.response.new_messages[ + msgRes.response.new_messages.length - 1 + ] if (lastMessage) { clearInterval(interval) resolve(lastMessage)
1
diff --git a/frontend/imports/ui/client/widgets/neworder.js b/frontend/imports/ui/client/widgets/neworder.js @@ -20,7 +20,7 @@ Template.neworder.viewmodel({ amount: '', shouldShowMaxBtn: false, events: { - 'input input': function () { + 'input input, click .dex-btn-max': function () { const order = Session.get('selectedOrder'); if (order) { Session.set('selectedOrder', '');
1
diff --git a/packages/app/src/components/PageRenameModal.jsx b/packages/app/src/components/PageRenameModal.jsx @@ -83,9 +83,6 @@ const PageRenameModal = (props) => { const checkExistPaths = useCallback(async(newParentPath) => { - if (path == null) { - return; - } try { const res = await apiv3Get('/page/exist-paths', { fromPath: path, toPath: newParentPath }); const { existPaths } = res.data; @@ -99,17 +96,14 @@ const PageRenameModal = (props) => { // eslint-disable-next-line react-hooks/exhaustive-deps const checkExistPathsDebounce = useCallback(() => { - if (path == null) { - return; - } debounce(1000, checkExistPaths); - }, [checkExistPaths, path]); + }, [checkExistPaths]); useEffect(() => { if (path == null) { return; } - if (pageId != null && pageNameInput !== path) { + if (pageId != null && path != null && pageNameInput !== path) { checkExistPathsDebounce(pageNameInput, subordinatedPages); } }, [pageNameInput, subordinatedPages, pageId, path, checkExistPathsDebounce]);
7
diff --git a/articles/appliance/cli/backing-up-the-appliance.md b/articles/appliance/cli/backing-up-the-appliance.md @@ -115,4 +115,4 @@ a0cli -t <target node> backup-delete ## Restore a Backup -To restore a backup, please contact Auth0 for assistance. +To restore a backup, please open up a ticket requesting assistance via the [Auth0 Support Center](https://support.auth0.com/).
0
diff --git a/framer/Animation.coffee b/framer/Animation.coffee @@ -278,7 +278,7 @@ class exports.Animation extends BaseClass for k, v of @_stateB if Color.isColorObject(v) or Color.isColorObject(@_stateA[k]) @_valueUpdaters[k] = @_updateColorValue - else if LinearGradient.isLinearGradient(v) + else if LinearGradient.isLinearGradient(v) or LinearGradient.isLinearGradient(@_stateA[k]) @_valueUpdaters[k] = @_updateGradientValue else @_valueUpdaters[k] = @_updateNumberValue @@ -294,7 +294,14 @@ class exports.Animation extends BaseClass @_target[key] = Color.mix(@_stateA[key], @_stateB[key], value, false, @options.colorModel) _updateGradientValue: (key, value) => - @_target[key] = LinearGradient.mix(@_stateA[key], @_stateB[key], value, @options.colorModel) + gradientA = LinearGradient._asPlainObject(@_stateA[key]) + gradientB = LinearGradient._asPlainObject(@_stateB[key]) + @_target[key] = LinearGradient.mix( + _.defaults(gradientA, gradientB) + _.defaults(gradientB, gradientA) + value + @options.colorModel + ) _currentState: -> return _.pick(@layer, _.keys(@properties)) @@ -323,6 +330,8 @@ class exports.Animation extends BaseClass animatableProperties[k] = v else if Color.isValidColorProperty(k, v) animatableProperties[k] = new Color(v) + else if k is "gradient" and not _.isEmpty(LinearGradient._asPlainObject(v)) + animatableProperties[k] = v return animatableProperties
11
diff --git a/articles/api/authentication/_delegation.md b/articles/api/authentication/_delegation.md @@ -22,6 +22,11 @@ curl --request POST \ --data '{"client_id":"${account.clientId}", "grant_type":"urn:ietf:params:oauth:grant-type:jwt-bearer", "id_token|refresh_token":"TOKEN", "target":"TARGET_CLIENT_ID", "scope":"openid", "api_type":"API_TYPE"}' ``` +```javascript +// Delegation is not supported in version 8 of auth0.js. +// For a version 7 sample refer to: https://auth0.com/docs/libraries/auth0js/v7#delegation-token-request +``` + <%= include('../../_includes/_http-method', { "http_method": "POST", "path": "/delegation", @@ -64,6 +69,7 @@ Given an existing token, this endpoint will generate a new token signed with the - The `profile` scope value requests access to the End-User's default profile Claims, which are: `name`, `family_name`, `given_name`, `middle_name`, `nickname`, `preferred_username`, `profile`, `picture`, `website`, `gender`, `birthdate`, `zoneinfo`, `locale`, and `updated_at`. - The `email` scope value requests access to the `email` and `email_verified` Claims. +- Delegation is __not supported__ in version 8 of [auth0.js](/libraries/auth0js). For a sample in version 7 of the library, refer to [Delegation Token Request](/libraries/auth0js/v7#delegation-token-request). ### More Information - [Delegation Tokens](/tokens/delegation)
0
diff --git a/karma.conf.js b/karma.conf.js @@ -9,6 +9,11 @@ module.exports = function (config) { base: 'SauceLabs', browserName: 'chrome', version: 'latest' + }, + sl_firefox_latest: { + base: 'SauceLabs', + browserName: 'firefox', + version: 'latest' } };
0
diff --git a/src/components/views/Shuttles/index.js b/src/components/views/Shuttles/index.js @@ -233,7 +233,7 @@ class ShuttleBay extends Component { this.updateShuttle(id, "direction", "departing") } > - Prepare for departure + Prepare to Depart </Button> )} {direction === "departing" && docked && ( @@ -245,7 +245,7 @@ class ShuttleBay extends Component { this.updateShuttle(id, "direction", "unspecified") } > - Abort departure sequence + Abort Departure </Button> )} <div className="docking-icon-wrapper">
7
diff --git a/js/colors.js b/js/colors.js @@ -398,7 +398,7 @@ whitingjp : { var reg_color_names = /(black|white|darkgray|lightgray|gray|grey|darkgrey|lightgrey|red|darkred|lightred|brown|darkbrown|lightbrown|orange|yellow|green|darkgreen|lightgreen|blue|lightblue|darkblue|purple|pink|transparent)\s*/; -var reg_color = /^((black|white|gray|darkgray|lightgray|grey|darkgrey|lightgrey|red|darkred|lightred|brown|darkbrown|lightbrown|orange|yellow|green|darkgreen|lightgreen|blue|lightblue|darkblue|purple|pink|transparent)|#[A-Fa-f0-9]+)/; +var reg_color = /^((black|white|gray|darkgray|lightgray|grey|darkgrey|lightgrey|red|darkred|lightred|brown|darkbrown|lightbrown|orange|yellow|green|darkgreen|lightgreen|blue|lightblue|darkblue|purple|pink|transparent)|#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}))/;
7
diff --git a/lib/waterline/utils/system/transformer-builder.js b/lib/waterline/utils/system/transformer-builder.js @@ -71,20 +71,6 @@ Transformation.prototype.serialize = function(values, behavior) { return; } - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // TODO: remove this: - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Handle array of types for findOrCreateEach - if (_.isString(obj)) { - if (_.has(self._transformations, obj)) { - values = self._transformations[obj]; - return; - } - - return; - } - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - _.each(obj, function(propertyValue, propertyName) { // Schema must be serialized in first level only if (behavior === 'schema') {
2
diff --git a/src/engine.mjs b/src/engine.mjs @@ -239,6 +239,10 @@ export function NonSpecRunScript(sourceText) { const realm = surroundingAgent.currentRealmRecord; const s = ParseScript(sourceText, realm, undefined); + if (Array.isArray(s)) { + HostReportErrors(s); + return new NormalCompletion(undefined); + } const res = ScriptEvaluation(s); surroundingAgent.executionContextStack.pop(); @@ -302,6 +306,10 @@ export function ScriptEvaluation(scriptRecord) { export function ScriptEvaluationJob(sourceText, hostDefined) { const realm = surroundingAgent.currentRealmRecord; const s = ParseScript(sourceText, realm, hostDefined); + if (Array.isArray(s)) { + HostReportErrors(s); + return new NormalCompletion(undefined); + } return ScriptEvaluation(s); }
9
diff --git a/package.json b/package.json { "name": "prettier-atom", "main": "./dist/main.js", - "version": "0.38.0", + "version": "0.39.0", "description": "Atom plugin for formatting JavaScript using prettier with (optional) prettier-eslint integration", "keywords": [ "atom",
6
diff --git a/lib/build/tasks/copy.js b/lib/build/tasks/copy.js @@ -16,7 +16,7 @@ exports.task = function (grunt) { // Change all routes from img to asset version path process: function (content, srcpath) { // return content.replace(/\.\.\/img/gi,"/assets/<%= pkg.version %>/images/themes"); - var path = grunt.template.process('<%= env.http_path_prefix %>/assets/<%= pkg.version %>/images/themes'); + var path = grunt.template.process('<%= env.http_path_prefix %>/editor/<%= editor_assets_version %>/images/themes'); return content.replace(/\.\.\/img/gi, path); } }
1
diff --git a/src/patterns/components/masthead/extended.hbs b/src/patterns/components/masthead/extended.hbs @@ -111,15 +111,6 @@ hasReactCodeInfo: true </a> </li> - {{!-- <li> - <a class="sprk-b-Link sprk-b-Link--plain sprk-c-Masthead__link" href="#nogo"> - <svg class="sprk-c-Icon sprk-c-Icon--stroke-current-color sprk-c-Icon--l" viewBox="0 0 64 64"> - <use xlink:href="#settings" /> - </svg> - <span class="sprk-u-ScreenReaderText">Settings</span> - </a> - </li> --}} - <li> <a class="sprk-b-Link sprk-b-Link--plain sprk-c-Masthead__link" @@ -128,7 +119,8 @@ hasReactCodeInfo: true aria-haspopup="true" role="combobox"> <svg class="sprk-c-Icon sprk-c-Icon--l sprk-c-Icon--stroke-current-color" viewBox="0 0 100 100"> - <use xlink:href="#user-account" /> + <!-- TO DO: CHANGE TO user-account when new icon is published --> + <use xlink:href="#user" /> </svg> <span class="sprk-u-ScreenReaderText">User Account</span> </a>
3
diff --git a/token-metadata/0xC0Eb85285d83217CD7c891702bcbC0FC401E2D9D/metadata.json b/token-metadata/0xC0Eb85285d83217CD7c891702bcbC0FC401E2D9D/metadata.json "symbol": "HVN", "address": "0xC0Eb85285d83217CD7c891702bcbC0FC401E2D9D", "decimals": 8, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/application/Component.mjs b/src/application/Component.mjs @@ -76,20 +76,16 @@ export default class Component extends Element { } } - static bindProperty(name, func = null) { + static bindProp(name, func = null) { return {__propertyBinding: true, __name: name, __func: func}; } __bindProperty(propObj, targetObj, targetProp) { - console.log('__bindProperty', targetObj, targetProp, propObj); - - // 1. find binding position: find object and property name to be bound const obj = targetObj; const prop = targetProp; const propName = propObj.__name; const func = propObj.__func ? propObj.__func : (context) => context[propName]; - // 2. create setter for given object if (!this.hasOwnProperty(propName)) { this[`__prop_bindings_${propName}`] = [{__obj: obj, __prop: prop, __func: func}]; Object.defineProperty(this, propName, { @@ -184,7 +180,6 @@ export default class Component extends Element { this.parseTemplatePropRec(value, context, propKey); } } else if (Utils.isObjectLiteral(value) && value.__propertyBinding === true) { - // console.log('PROP BINDING DETECTED', key, value) store.push(value) loc.push(`element.__bindProperty(store[${store.length - 1}], ${cursor}, "${key}")`); } else {
10
diff --git a/includes/Modules/Tag_Manager.php b/includes/Modules/Tag_Manager.php @@ -52,14 +52,6 @@ final class Tag_Manager extends Module implements Module_With_Scopes, Module_Wit */ const USAGE_CONTEXT_AMP = 'amp'; - /** - * Settings instance. - * - * @since 1.2.0 - * @var Settings - */ - protected $settings; - /** * Map of container usageContext to option key for containerID. *
2
diff --git a/src/web/lib/modal.jsx b/src/web/lib/modal.jsx @@ -42,7 +42,7 @@ class ModalHOC extends Component { <Modal {...props} show={show} - onHide={::this.handleClose} + onClose={::this.handleClose} > {title && <Modal.Header>
1
diff --git a/source/views/controls/CheckboxView.js b/source/views/controls/CheckboxView.js @@ -21,6 +21,8 @@ const CheckboxView = Class({ type: '', + isIndeterminate: false, + /** Property: O.CheckboxView#className Type: String @@ -47,6 +49,7 @@ const CheckboxView = Class({ className: 'v-Checkbox-input', type: 'checkbox', checked: this.get( 'value' ), + indeterminate: this.get( 'isIndeterminate' ), }), CheckboxView.parent.draw.call( this, layer, Element, el ), ]; @@ -62,7 +65,7 @@ const CheckboxView = Class({ */ checkboxNeedsRedraw: function ( self, property, oldValue ) { return this.propertyNeedsRedraw( self, property, oldValue ); - }.observes( 'value' ), + }.observes( 'value', 'isIndeterminate' ), /** Method: O.CheckboxView#redrawValue @@ -74,6 +77,10 @@ const CheckboxView = Class({ this._domControl.checked = this.get( 'value' ); }, + redrawIsIndeterminate () { + this._domControl.indeterminate = this.get( 'isIndeterminate' ); + }, + // --- Activate --- /**
0
diff --git a/assets/css/ModalBook.css b/assets/css/ModalBook.css } .modal-book__available-wrapper { - background-color: #999999; + background-color: #e4e4e4; margin-right: 1em; border-radius: 0.8em; padding: 0.5em 1.3em; font-weight: bold; } +.modal-book__publisher-name{ + margin-right: 1em; +} + +.modal-book__publication-date{ + margin-right: 1em; +} + +.modal-book__borrowed-with-label{ + display: flex; + flex-flow: row; + font-weight: bold; + margin-top: 1em; +} + +.modal-book__borrowed-person{ + margin-right: 1em; +} + +.modal-book__borrowed-elapsed-time{ + background-color: #5c5c5c; + color: white; + font-size: 0.9em; + padding: 0.4em; + margin-right: 1.0em; +} + .modal-book__publisher-wrapper { - background-color: #BBBBBB; + background-color: #f2f2f2; display: flex; flex-flow: row; + margin-right: 1em; + border-radius: 0.8em; + padding: 0.5em 1.3em; } .modal-book__description-wrapper {
0
diff --git a/guide/english/agile/five-levels-of-agile-planning/index.md b/guide/english/agile/five-levels-of-agile-planning/index.md @@ -24,6 +24,6 @@ Agile planning is always continuous and should be revised at least every three m 5. Daily Planning: What did I do yesterday? What will I do today? What is blocking me? -#### More Information: +#### More Information -<a href='https://www.scrumalliance.org/why-scrum/agile-atlas/agile-atlas-common-practices/planning/january-2014/five-levels-of-agile-planning' target='_blank' rel='nofollow'>Five Levels of Agile Planning</a> +[Scaling Agile Processes: Five Levels of Agile Planning](https://www.pragmaticmarketing.com/resources/articles/scaling-agile-processes-five-levels-of-planning)
14
diff --git a/src/kiri/ui.js b/src/kiri/ui.js } ip.addEventListener('focus', function(event) { hidePop(); + setSticky(true); }); if (action) { ip.addEventListener('keydown', function(event) { } }); ip.addEventListener('blur', function(event) { + setSticky(false); lastChange = ip; action(event); if (opt.trigger) {
11
diff --git a/public/app/js/cbus-audio.js b/public/app/js/cbus-audio.js @@ -100,11 +100,18 @@ cbus.audio = { duration: cbus.audio.element.duration }); if (cbus.audio.mprisPlayer) { - if (!Number.isNaN(cbus.audio.element.duration)) { + let trackID = cbus.audio.mprisPlayer.objectPath("track/" + cbus.audio.state.episode.urlSha1); + if ( + !Number.isNaN(cbus.audio.element.duration) && + ( + !cbus.audio.mprisPlayer.metadata || + cbus.audio.mprisPlayer.metadata["mpris:trackid"] !== trackID + ) + ) { cbus.audio.mprisPlayer.metadata = { - "mpris:trackid": cbus.audio.mprisPlayer.objectPath("track/" + cbus.audio.state.episode.urlSha1), + "mpris:trackid": trackID, "mpris:length": cbus.audio.element.duration * 1000000, - "mpris:artUrl": cbus.audio.state.feed.image, + "mpris:artUrl": cbus.data.getPodcastImageURI(cbus.audio.state.feed), "xesam:title": cbus.audio.state.episode.title, "xesam:album": cbus.audio.state.feed.title // "xesam:artist"
1
diff --git a/test/acceptance/dataviews/aggregation.js b/test/acceptance/dataviews/aggregation.js @@ -3,7 +3,7 @@ require('../../support/test_helper'); var assert = require('../../support/assert'); var TestClient = require('../../support/test-client'); -describe('aggregations', function() { +describe('aggregations happy cases', function() { afterEach(function(done) { if (this.testClient) { @@ -13,9 +13,10 @@ describe('aggregations', function() { } }); - function aggregationOperationMapConfig(operation, column, aggregationColumn) { + function aggregationOperationMapConfig(operation, query, column, aggregationColumn) { column = column || 'adm0name'; aggregationColumn = aggregationColumn || 'pop_max'; + query = query || 'select * from populated_places_simple_reduced'; var mapConfig = { version: '1.5.0', @@ -23,7 +24,7 @@ describe('aggregations', function() { { type: 'mapnik', options: { - sql: 'select * from populated_places_simple_reduced', + sql: query, cartocss: '#layer0 { marker-fill: red; marker-width: 10; }', cartocss_version: '2.0.1', widgets: {} @@ -62,9 +63,17 @@ describe('aggregations', function() { }); }); - it('should count NULL category', function (done) { - this.testClient = new TestClient(aggregationOperationMapConfig('count', 'namepar')); - this.testClient.getDataview('namepar', { own_filter: 0 }, function (err, aggregation) { + var query = [ + 'select 1 as val, \'a\' as cat, ST_Transform(ST_SetSRID(ST_MakePoint(0,0),4326),3857) as the_geom_webmercator', + 'select null, \'b\', ST_Transform(ST_SetSRID(ST_MakePoint(0,1),4326),3857)', + 'select null, \'b\', ST_Transform(ST_SetSRID(ST_MakePoint(1,0),4326),3857)', + 'select null, null, ST_Transform(ST_SetSRID(ST_MakePoint(1,1),4326),3857)' + ].join(' UNION ALL '); + + operations.forEach(function (operation) { + it('should handle NULL values in category and aggregation columns using "' + operation + '" as aggregation operation', function (done) { + this.testClient = new TestClient(aggregationOperationMapConfig(operation, query, 'cat', 'val')); + this.testClient.getDataview('cat', { own_filter: 0 }, function (err, aggregation) { assert.ifError(err); assert.ok(aggregation); @@ -84,3 +93,4 @@ describe('aggregations', function() { }); }); }); +});
7
diff --git a/tests/integration/python/python2/python2.test.js b/tests/integration/python/python2/python2.test.js @@ -7,7 +7,7 @@ jest.setTimeout(60000) // Could not find 'Python 2' executable, skipping 'Python' tests. const _describe = process.env.PYTHON2_DETECTED ? describe : describe.skip -_describe.skip('Python 2 tests', () => { +_describe('Python 2 tests', () => { // init beforeAll(() => setup({
1
diff --git a/src/lib/transactionBuilder.js b/src/lib/transactionBuilder.js @@ -1069,7 +1069,7 @@ export default class TransactionBuilder { frozen_days: parseInt(frozenDuration) } } - if (this.tronWeb.fullnodeSatisfies('>=3.5.0') && !(parseInt(frozenAmount) > 0)) { + if (!(parseInt(frozenAmount) > 0)) { delete data.frozen_supply } if (precision && !isNaN(parseInt(precision))) {
8
diff --git a/src/errors.js b/src/errors.js @@ -41,7 +41,7 @@ class KafkaJSNumberOfRetriesExceeded extends KafkaJSNonRetriableError { this.originalError = e this.retryCount = retryCount this.retryTime = retryTime - this.name = 'KafkaJSOffsetOutOfRange' + this.name = 'KafkaJSNumberOfRetriesExceeded' } } @@ -50,7 +50,7 @@ class KafkaJSConnectionError extends KafkaJSError { super(e) this.broker = broker this.code = code - this.name = 'KafkaJSOffsetOutOfRange' + this.name = 'KafkaJSConnectionError' } }
1
diff --git a/item-spec/item-spec.md b/item-spec/item-spec.md @@ -185,6 +185,7 @@ Like the Link `rel` field, the `roles` field can be given any value, however her | overview | An asset that represents a possibly larger view than the thumbnail of the Item, for example, a true color composite of multi-band data. | | data | The data itself. This is a suggestion for a common role for data files to be used in case data providers don't come up with their own names and semantics. | | metadata | A metadata sidecar file describing the data in this item, for example the Landsat-8 MTL file. | +| visual | An asset that is a full resolution version of the data, processed for visual use (RGB only, often sharpened ([pan-sharpened](https://en.wikipedia.org/wiki/Pansharpened_image) and/or using an [unsharp mask](https://en.wikipedia.org/wiki/Unsharp_masking))). | It is STRONGLY RECOMMENDED to add to each STAC Item * a thumbnail with the role `thumbnail` for preview purposes
0
diff --git a/src/plots/polar/legacy/axis_attributes.js b/src/plots/polar/legacy/axis_attributes.js @@ -13,6 +13,8 @@ var axesAttrs = require('../../cartesian/layout_attributes'); var extendFlat = require('../../../lib/extend').extendFlat; var overrideAll = require('../../../plot_api/edit_types').overrideAll; +var deprecationWarning = 'Legacy polar charts are deprecated!'; + var domainAttr = extendFlat({}, axesAttrs.domain, { description: [ 'Polar chart subplots are not supported yet.', @@ -26,6 +28,7 @@ function mergeAttrs(axisName, nonCommonAttrs) { valType: 'boolean', role: 'style', description: [ + deprecationWarning, 'Determines whether or not the line bounding this', axisName, 'axis', 'will be shown on the figure.' @@ -35,6 +38,7 @@ function mergeAttrs(axisName, nonCommonAttrs) { valType: 'boolean', role: 'style', description: [ + deprecationWarning, 'Determines whether or not the', axisName, 'axis ticks', 'will feature tick labels.' @@ -45,6 +49,7 @@ function mergeAttrs(axisName, nonCommonAttrs) { values: ['horizontal', 'vertical'], role: 'style', description: [ + deprecationWarning, 'Sets the orientation (from the paper perspective)', 'of the', axisName, 'axis tick labels.' ].join(' ') @@ -54,6 +59,7 @@ function mergeAttrs(axisName, nonCommonAttrs) { min: 0, role: 'style', description: [ + deprecationWarning, 'Sets the length of the tick lines on this', axisName, 'axis.' ].join(' ') }, @@ -61,6 +67,7 @@ function mergeAttrs(axisName, nonCommonAttrs) { valType: 'color', role: 'style', description: [ + deprecationWarning, 'Sets the color of the tick lines on this', axisName, 'axis.' ].join(' ') }, @@ -68,17 +75,20 @@ function mergeAttrs(axisName, nonCommonAttrs) { valType: 'string', role: 'style', description: [ + deprecationWarning, 'Sets the length of the tick lines on this', axisName, 'axis.' ].join(' ') }, endpadding: { valType: 'number', - role: 'style' + role: 'style', + description: deprecationWarning, }, visible: { valType: 'boolean', role: 'info', description: [ + deprecationWarning, 'Determines whether or not this axis will be visible.' ].join(' ') } @@ -97,6 +107,7 @@ module.exports = overrideAll({ { valType: 'number' } ], description: [ + deprecationWarning, 'Defines the start and end point of this radial axis.' ].join(' ') }, @@ -105,6 +116,7 @@ module.exports = overrideAll({ valType: 'number', role: 'style', description: [ + deprecationWarning, 'Sets the orientation (an angle with respect to the origin)', 'of the radial axis.' ].join(' ') @@ -120,6 +132,7 @@ module.exports = overrideAll({ { valType: 'number', dflt: 360 } ], description: [ + deprecationWarning, 'Defines the start and end point of this angular axis.' ].join(' ') }, @@ -133,16 +146,18 @@ module.exports = overrideAll({ values: ['clockwise', 'counterclockwise'], role: 'info', description: [ - 'For polar plots only.', - 'Sets the direction corresponding to positive angles.' + deprecationWarning, + 'Sets the direction corresponding to positive angles', + 'in legacy polar charts.' ].join(' ') }, orientation: { valType: 'angle', role: 'info', description: [ - 'For polar plots only.', - 'Rotates the entire polar by the given angle.' + deprecationWarning, + 'Rotates the entire polar by the given angle', + 'in legacy polar charts.' ].join(' ') } }
0
diff --git a/bin/dkimverify b/bin/dkimverify @@ -24,10 +24,7 @@ const verifier = new DKIMVerifyStream(function (err, result, results) { if (err) console.log(err.message); if (Array.isArray(results)) { results.forEach(function (res) { - console.log('identity="' + res.identity + '" ' + - 'domain="' + res.domain + '" ' + - 'result=' + res.result + ' ' + - ((res.error) ? '(' + res.error + ')' : '')); + console.log(`identity="${res.identity}" domain="${res.domain}" result=${res.result} ${(res.error) ? `(${res.error})` : ''}`); }); } else {
14
diff --git a/src/config/config.js b/src/config/config.js @@ -94,8 +94,9 @@ const notifyOpts = { })(), } +const torusNetwork = env.REACT_APP_TORUS_NETWORK || 'testnet' const torusNetworkUrl = env.REACT_APP_TORUS_NETWORK_URL -const isCustomTorusNetwork = torusNetworkUrl !== 'false' +const isCustomTorusNetwork = torusNetwork === 'testnet' && torusNetworkUrl !== 'false' const Config = { env: appEnv, @@ -127,7 +128,7 @@ const Config = { goodDollarPriceInfoUrl: env.REACT_APP_PRICE_INFO_URL || 'https://datastudio.google.com/u/0/reporting/f1ce8f56-058c-4e31-bfd4-1a741482642a/page/p_97jwocmrmc', marketUrl: env.REACT_APP_MARKET_URL || 'https://goodmarkets.xyz/', torusEnabled: env.REACT_APP_USE_TORUS === 'true', - torusNetwork: env.REACT_APP_TORUS_NETWORK || 'testnet', + torusNetwork, torusNetworkUrl: !isCustomTorusNetwork ? undefined : torusNetworkUrl || 'https://billowing-responsive-arm.ropsten.discover.quiknode.pro/e1f91ad991da6c4a3558e1d2450238ea1fe17af1/', enableSelfCustody: env.REACT_APP_ENABLE_SELF_CUSTODY === 'true', testClaimNotification: appEnv === 'production' ? false : env.REACT_APP_TEST_CLAIM_NOTIFICATION === 'true',
0
diff --git a/spec/vast_trackers.spec.js b/spec/vast_trackers.spec.js @@ -252,6 +252,14 @@ describe('VASTTracker', function() { vastTracker.lastPercentage = 1; expect(spyTrack).toHaveBeenCalledWith('progress-4%', expect.anything()); }); + it('should make the lastPercentage variable at the value -1', () => { + vastTracker.lastPercentage = 1; + expect(spyTrack).toHaveBeenCalledWith('progress-3%', expect.anything()); + }); + it('should make the lastPercentage variable at the value -1', () => { + vastTracker.lastPercentage = 1; + expect(spyTrack).toHaveBeenCalledWith('progress-2%', expect.anything()); + }); }); }); });
0
diff --git a/layouts/partials/fragments/contact.html b/layouts/partials/fragments/contact.html data-validation-error-msg-container="#name-error" placeholder="{{ with .text }}{{ . | markdownify }}{{ end }}" required> - <div class="px-2 d-none" id="name-error"></div> + <div class="px-2" id="name-error"></div> </div> {{ end }} {{ with $contact.fields.email }} data-validation-error-msg-container="#email-error" placeholder="{{ with .text }}{{ . | markdownify }}{{ end }}" required> - <div class="px-2 d-none" id="email-error"></div> + <div class="px-2" id="email-error"></div> </div> {{ end }} {{ with $contact.fields.phone }} data-validation-error-msg="{{ .error | default (i18n "contact.defaultPhoneError") }}" data-validation-error-msg-container="#phone-error" placeholder="{{ with .text }}{{ . | markdownify }}{{ end }}"> - <div class="px-2 d-none" id="phone-error"></div> + <div class="px-2" id="phone-error"></div> </div> {{ end }} </div> placeholder="{{ with .text }}{{ . | markdownify }}{{ end }}" rows="4" required></textarea> - <div class="px-2 d-none" id="message-error"></div> + <div class="px-2" id="message-error"></div> </div> {{ end }} </div>
2
diff --git a/src/three/I3DMLoader.js b/src/three/I3DMLoader.js import { I3DMLoaderBase } from '../base/I3DMLoaderBase.js'; -import { DefaultLoadingManager, Matrix4, InstancedMesh, Vector3, Quaternion } from 'three'; +import { DefaultLoadingManager, Matrix4, InstancedMesh, Vector3, Quaternion,Euler } from 'three'; import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'; const tempFwd = new Vector3(); @@ -201,7 +201,14 @@ export class I3DMLoader extends I3DMLoaderBase { } - tempMat.compose( tempPos, tempQuat, tempSca ); + + const m = new Matrix4(); + m.set(1.0, 0.0, 0.0, 0.0, + 0.0, 0.0, -1.0, 0.0, + 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 1.0); + tempMat.compose( tempPos, tempQuat, tempSca ).multiply(m); + // tempMat.compose( tempPos, tempQuat, tempSca ); for ( let j = 0, l = instances.length; j < l; j ++ ) { @@ -212,6 +219,8 @@ export class I3DMLoader extends I3DMLoaderBase { } + model.scene.rotation.copy(new Euler(model.scene.rotation.x - Math.PI/2,model.scene.rotation.y,model.scene.rotation.z,'XYZ')) + model.batchTable = batchTable; model.featureTable = featureTable;
1
diff --git a/src/collection/style.js b/src/collection/style.js let is = require('../is'); +let util = require('../util'); function styleCache( key, fn, ele ){ var _p = ele._private; - var cache = _p.styleCache = _p.styleCache || {}; + var cache = _p.styleCache = _p.styleCache || []; var val; if( (val = cache[key]) != null ){ @@ -15,12 +16,16 @@ function styleCache( key, fn, ele ){ } function cacheStyleFunction( key, fn ){ + key = util.hashString( key ); + return function cachedStyleFunction( ele ){ return styleCache( key, fn, ele ); }; } function cachePrototypeStyleFunction( key, fn ){ + key = util.hashString( key ); + let selfFn = ele => fn.call( ele ); return function cachedPrototypeStyleFunction(){ @@ -48,7 +53,7 @@ let elesfn = ({ dirtyStyleCache: function(){ let cy = this.cy(); - let dirty = ele => ele._private.styleCache = {}; + let dirty = ele => ele._private.styleCache = null; if( cy.hasCompoundNodes() ){ let eles;
4
diff --git a/README.md b/README.md [![AMO][AmoBadge]][Amo] [![Gitter][GitterBadge]][Gitter] [![devDependencies status][DavidDmBadge]][DavidDm] -[![Build status][TravisBadge]][Travis] +[![Test status][GitHubActionsBadge]][GitHubActions] [![Codacy Badge][CodacyBadge]][Codacy] [![Maintainability][CodeClimateBadge]][CodeClimate] @@ -73,8 +73,8 @@ See the [license file][License]. [CodacyBadge]: https://api.codacy.com/project/badge/Grade/bb2841f875014aaea6a354da6c96bdee [CodeClimateBadge]: https://api.codeclimate.com/v1/badges/be3a9f3b266d8a68e1d9/maintainability [DavidDmBadge]: https://david-dm.org/web-scrobbler/web-scrobbler/dev-status.svg +[GitHubActionsBadge]: https://github.com/web-scrobbler/web-scrobbler/workflows/test/badge.svg [GitterBadge]: https://badges.gitter.im/Join%20Chat.svg -[TravisBadge]: https://api.travis-ci.org/web-scrobbler/web-scrobbler.svg [WebStoreBadge]: https://img.shields.io/chrome-web-store/v/hhinaapppaileiechjoiifaancjggfjm.svg <!-- Dependencies --> @@ -103,9 +103,9 @@ See the [license file][License]. [Codacy]: https://app.codacy.com/project/web-scrobbler/web-scrobbler/dashboard [CodeClimate]: https://codeclimate.com/github/web-scrobbler/web-scrobbler/maintainability [DavidDm]: https://david-dm.org/web-scrobbler/web-scrobbler?type=dev +[GitHubActions]: https://github.com/web-scrobbler/web-scrobbler/actions [Gitter]: https://gitter.im/david-sabata/web-scrobbler [Transifex]: https://www.transifex.com/web-scrobbler/web-scrobbler/dashboard/ -[Travis]: https://travis-ci.org/web-scrobbler/web-scrobbler [Twitter]: https://twitter.com/web_scrobbler <!-- Services -->
14
diff --git a/.gitignore b/.gitignore @@ -77,6 +77,7 @@ upgrade-*.report /index.js lib/api/request/*.js lib/kerror/errors/*.js +lib/kuzzle/kuzzle.js lib/core/backend/applicationManager.js lib/core/backend/backend.js lib/core/backend/backendCluster.js @@ -121,6 +122,7 @@ lib/types/Deprecation.js lib/types/EventHandler.js lib/types/InternalLogger.js lib/types/Plugin.js +lib/types/Kuzzle.js lib/types/PluginManifest.js lib/types/RequestPayload.js lib/types/ResponsePayload.js
8
diff --git a/core/server/api/canary/settings.js b/core/server/api/canary/settings.js @@ -2,13 +2,18 @@ const Promise = require('bluebird'); const _ = require('lodash'); const models = require('../../models'); const routeSettings = require('../../services/route-settings'); -const i18n = require('../../../shared/i18n'); +const tpl = require('@tryghost/tpl'); const {BadRequestError} = require('@tryghost/errors'); const settingsService = require('../../services/settings'); const membersService = require('../../services/members'); const settingsBREADService = settingsService.getSettingsBREADServiceInstance(); +const messages = { + failedSendingEmail: 'Failed Sending Email' + +}; + module.exports = { docName: 'settings', @@ -109,7 +114,7 @@ module.exports = { } catch (err) { throw new BadRequestError({ err, - message: i18n.t('errors.mail.failedSendingEmail.error') + message: tpl(messages.failedSendingEmail) }); } }
14
diff --git a/src/connection.js b/src/connection.js @@ -30,18 +30,18 @@ function clockUnion(clockMap, docId, clock) { // call `setDoc()` on the docSet. The connection registers a callback on the docSet, and it figures // out whenever there are changes that need to be sent to the remote peer. // -// knownClock is the most recent VClock that we think the peer has (either because they've told us +// theirClock is the most recent VClock that we think the peer has (either because they've told us // that it's their clock, or because it corresponds to a state we have sent to them on this -// connection). Thus, everything more recent than knownClock should be sent to the peer. +// connection). Thus, everything more recent than theirClock should be sent to the peer. // -// advertisedClock is the most recent VClock that we've advertised to the peer (i.e. where we've +// ourClock is the most recent VClock that we've advertised to the peer (i.e. where we've // told the peer that we have it). class Connection { constructor (docSet, sendMsg) { this._docSet = docSet this._sendMsg = sendMsg - this._knownClock = Map() - this._advertisedClock = Map() + this._theirClock = Map() + this._ourClock = Map() this._docChangedHandler = this.docChanged.bind(this) } @@ -56,7 +56,7 @@ class Connection { sendMsg (docId, clock, changes) { const msg = {docId, clock: clock.toJS()} - this._advertisedClock = clockUnion(this._advertisedClock, docId, clock) + this._ourClock = clockUnion(this._ourClock, docId, clock) if (changes) msg.changes = changes.toJS() this._sendMsg(msg) } @@ -65,16 +65,16 @@ class Connection { const doc = this._docSet.getDoc(docId) const clock = doc._state.getIn(['opSet', 'clock']) - if (this._knownClock.has(docId)) { - const changes = OpSet.getMissingChanges(doc._state.get('opSet'), this._knownClock.get(docId)) + if (this._theirClock.has(docId)) { + const changes = OpSet.getMissingChanges(doc._state.get('opSet'), this._theirClock.get(docId)) if (!changes.isEmpty()) { - this._knownClock = clockUnion(this._knownClock, docId, clock) + this._theirClock = clockUnion(this._theirClock, docId, clock) this.sendMsg(docId, clock, changes) return } } - if (!clock.equals(this._advertisedClock.get(docId, Map()))) this.sendMsg(docId, clock) + if (!clock.equals(this._ourClock.get(docId, Map()))) this.sendMsg(docId, clock) } // Callback that is called by the docSet whenever a document is changed @@ -85,7 +85,7 @@ class Connection { 'Are you trying to sync a snapshot from the history?') } - if (!lessOrEqual(this._advertisedClock.get(docId, Map()), clock)) { + if (!lessOrEqual(this._ourClock.get(docId, Map()), clock)) { throw new RangeError('Cannot pass an old state object to a connection') } @@ -94,7 +94,7 @@ class Connection { receiveMsg (msg) { if (msg.clock) { - this._knownClock = clockUnion(this._knownClock, msg.docId, fromJS(msg.clock)) + this._theirClock = clockUnion(this._theirClock, msg.docId, fromJS(msg.clock)) } if (msg.changes) { return this._docSet.applyChanges(msg.docId, fromJS(msg.changes)) @@ -102,7 +102,7 @@ class Connection { if (this._docSet.getDoc(msg.docId)) { this.maybeSendChanges(msg.docId) - } else if (!this._advertisedClock.has(msg.docId)) { + } else if (!this._ourClock.has(msg.docId)) { // If the remote node has data that we don't, immediately ask for it. // TODO should we sometimes exercise restraint in what we ask for? this.sendMsg(msg.docId, Map())
10
diff --git a/README.md b/README.md @@ -23,7 +23,8 @@ in a 'beta' state, with no major changes anticipated, so implementors can expect at this point we don't anticipate any major changes, but reserve the right to make them if we get feedback that something just doesn't work. Which is to say the next couple months are a great time to implement STAC, as your changes will be head. After 1.0 our goal is to not change the core in any backwards incompatible way for a very long time, if ever, so that people can build on this until -JSON is no longer relevant. +JSON is no longer relevant. STAC spec aims to follow [Semantic Versioning](https://semver.org/), so once 1.0.0 is reached any breaking +change will require the spec to go to 2.0.0. ## Current version and branches
0
diff --git a/src/slider.js b/src/slider.js @@ -85,6 +85,8 @@ export default class Slider extends React.Component { var settings; var newProps; if (this.state.breakpoint) { + // never executes in the first render + // so defaultProps should be already there in this.props newProps = this.props.responsive.filter(resp => resp.breakpoint === this.state.breakpoint); settings = newProps[0].settings === 'unslick' ? 'unslick' : assign({}, this.props, newProps[0].settings); } else { @@ -96,13 +98,17 @@ export default class Slider extends React.Component { settings.slidesToScroll = 1 } - var children = this.props.children; - if(!Array.isArray(children)) { - children = [children] - } + // makes sure that children is an array, even when there is only 1 child + var children = React.Children.toArray(this.props.children) // Children may contain false or null, so we should filter them - children = children.filter(child => !!child) + // children may also contain string filled with spaces (in certain cases where we use jsx strings) + children = children.filter(child => { + if (typeof child === 'string'){ + return !!(child.trim()) + } + return !!child + }) if (settings === 'unslick') { // if 'unslick' responsive breakpoint setting used, just return the <Slider> tag nested HTML
0
diff --git a/Source/Layer.js b/Source/Layer.js @@ -2,6 +2,19 @@ import { WrappedObject, DefinedPropertiesKey } from './WrappedObject' import { Rectangle } from './Rectangle' import { wrapObject, wrapNativeObject } from './wrapNativeObject' +const DEFAULT_EXPORT_OPTIONS = { + compact: false, + 'include-namespaces': false, + compression: 1.0, + 'group-contents-only': false, + overwriting: false, + progressive: false, + 'save-for-web': false, + 'use-id-for-name': false, + trimmed: false, + output: '~/Documents/Sketch Exports', +} + /** * Abstract class that represents a Sketch layer. */ @@ -85,7 +98,7 @@ export class Layer extends WrappedObject { * @return {Layer} A new layer identical to this one. */ duplicate() { - const object = this.sketchObject + const object = this._object const duplicate = object.copy() object.parentGroup().insertLayers_afterLayer_([duplicate], object) return wrapNativeObject(duplicate) @@ -166,9 +179,7 @@ export class Layer extends WrappedObject { * @return {Rectangle} The converted rectangle expressed in page coordinates. */ localRectToPageRect(rect) { - const _rect = this.sketchObject.convertRectToAbsoluteCoordinates( - rect.asCGRect - ) + const _rect = this._object.convertRectToAbsoluteCoordinates(rect.asCGRect) return new Rectangle(_rect.x, _rect.y, _rect.width, _rect.height) } @@ -188,33 +199,13 @@ export class Layer extends WrappedObject { ) } - /** - * Returns a list of export options with any missing ones replaced by default values. - */ - exportOptionsMergedWithDefaults(options) { - const defaults = { - compact: false, - 'include-namespaces': false, - compression: 1.0, - 'group-contents-only': false, - overwriting: false, - progressive: false, - 'save-for-web': false, - 'use-id-for-name': false, - trimmed: false, - output: '~/Documents/Sketch Exports', - } - - return Object.assign(defaults, options) - } - /** * Export this layer (and the ones below it), using the options supplied. * * @param {dictionary} options Options indicating which layers to export, which sizes and formats to use, etc. */ export(options) { - const merged = this.exportOptionsMergedWithDefaults(options) + const merged = { ...DEFAULT_EXPORT_OPTIONS, ...options } const exporter = MSSelfContainedHighLevelExporter.alloc().initWithOptions( merged ) @@ -234,7 +225,7 @@ Layer.define('index', { */ get() { const ourLayer = this.sketchObject - return ourLayer.parentGroup().indexOfLayer_(ourLayer) + return parseInt(ourLayer.parentGroup().indexOfLayer_(ourLayer), 10) }, })
1
diff --git a/packages/react-router/docs/api/match.md b/packages/react-router/docs/api/match.md A `match` object contains information about how a `<Route path>` matched the URL. `match` objects contain the following properties: - `params` - (object) Key/value pairs parsed from the URL corresponding to the dynamic segments of the path - - `isExact` - `true` if the entire URL was matched (no trailing characters) + - `isExact` - (boolean) `true` if the entire URL was matched (no trailing characters) - `path` - (string) The path pattern used to match. Useful for building nested `<Route>`s - `url` - (string) The matched portion of the URL. Useful for building nested `<Link>`s
0
diff --git a/src/models/CustomCommand.js b/src/models/CustomCommand.js @@ -30,13 +30,16 @@ class CustomCommand extends Command { async run(message, ctx) { if (!message.guild || message.guild.id !== this.guildId) return; let format; - if (ctx['settings.cc.ping']) { + let msg = decodeURIComponent(this.response); const mention = message.mentions.members.size > 0 ? message.mentions.members.first() : message.member; - format = `${mention}, ${decodeURIComponent(this.response)}`; + if (ctx['settings.cc.ping']) { + const hasMtn = msg.indexOf('$mtn') > -1; + msg = msg.replace('$mtn', mention) + format = hasMtn ? msg : `${mention}, ${msg}`; } else { - format = decodeURIComponent(this.response); + format = decodeURIComponent(this.response).replace('$mtn', `**${mention.displayName}**`); } this.messageManager.sendMessage(message, format, false, false); }
11
diff --git a/OurUmbraco/OurUmbraco.csproj b/OurUmbraco/OurUmbraco.csproj <Compile Include="Documentation\Models\Job.cs" /> <Compile Include="Documentation\DocumentationContentFinder.cs" /> <Compile Include="Documentation\Controllers\DocfxController.cs" /> - <Compile Include="Emails\EmailsUtils.cs" /> - <Compile Include="Emails\Models\ActivationEmailModel.cs" /> + <Compile Include="Our\Services\EmailService.cs" /> + <Compile Include="Our\Models\ActivationEmailModel.cs" /> <Compile Include="Events\Api\EventsController.cs" /> <Compile Include="Events\App_Startup\ControllerRouting.cs" /> <Compile Include="Events\Library\Xslt.cs" />
5
diff --git a/index.js b/index.js import * as THREE from 'three'; +import * as ThreeVrm from '@pixiv/three-vrm'; +const {MToonMaterial} = ThreeVrm; +// window.ThreeVrm = ThreeVrm; // import easing from './easing.js'; import {StreetGeometry} from './StreetGeometry.js'; import alea from 'alea'; @@ -10,6 +13,49 @@ const {useApp, useFrame, useActivate, useLoaders, usePhysics, addTrackedApp, use const localVector = new THREE.Vector3(); const localQuaternion = new THREE.Quaternion(); +const _makeBlueSphere = () => { + const geometry = new THREE.SphereGeometry(0.2, 32, 32); + + const c = new THREE.Color(0x2048e0) + .offsetHSL(0, 0.3, 0); + const params = { + // cutoff: 0.1, + + color: new THREE.Vector4().fromArray(c.toArray().concat([1])), + shadeColor: new THREE.Vector4().fromArray(new THREE.Color(0xFFFFFF).toArray().concat([1])), + // emissionColor: new THREE.Vector4().fromArray(new THREE.Color(0x2048e0).toArray().concat([1])), + shadeToony: 1, + shadeShift: 0, + lightColorAttenuation: 0, + indirectLightIntensity: 0, + + rimLightingMix: 1, + rimFresnelPower: 2, + rimLift: -0.1, + rimColor: new THREE.Vector4().fromArray(new THREE.Color(0xFFFFFF).toArray().concat([1])), + + // outlineWidth: 0.5, + // outlineScaledMaxDistance: 0.5, + outlineColor: new THREE.Vector4().fromArray(new THREE.Color(0x000000).toArray().concat([1])), + // outlineLightingMix: 0.5, + }; + const material = new MToonMaterial(params); + + // const material2 = new MToonMaterial(params); + // material2.isOutline = true; + + const group = new THREE.Group(); + const m1 = new THREE.Mesh(geometry, material); + group.add(m1); + + /* const m2 = new THREE.Mesh(geometry, material2); + m2.scale.multiplyScalar(1.05); + m2.updateMatrixWorld + group.add(m2); */ + + return group; +}; + export default () => { const app = useApp(); const physics = usePhysics(); @@ -114,6 +160,11 @@ export default () => { const physicsId = physics.addGeometry(mesh); physicsIds.push(physicsId); + + const blueSphere = _makeBlueSphere(); + blueSphere.position.set(0, 1, -1); + app.add(blueSphere); + blueSphere.updateMatrixWorld(); } useCleanup(() => {
0
diff --git a/src/EventEmitter.mjs b/src/EventEmitter.mjs @@ -155,6 +155,7 @@ EventEmitter.combiner = function(object, name, arg1, arg2, arg3) { EventEmitter.addAsMixin = function(cls) { cls.prototype.on = EventEmitter.prototype.on; + cls.prototype.once = EventEmitter.prototype.once; cls.prototype.has = EventEmitter.prototype.has; cls.prototype.off = EventEmitter.prototype.off; cls.prototype.removeListener = EventEmitter.prototype.removeListener;
0
diff --git a/frontend/packages/dapple/package-post-init.js b/frontend/packages/dapple/package-post-init.js @@ -45,7 +45,7 @@ const tokenSpecs = { VSL: { precision: 18, format: '0,0.00[0000000000000000]' }, PLU: { precision: 18, format: '0,0.00[0000000000000000]' }, MLN: { precision: 18, format: '0,0.00[0000000000000000]' }, - RHOC: { precision: 9, format: '0,0.00[0000000]' } + RHOC: { precision: 8, format: '0,0.00[000000]' } }; Dapple.getQuoteTokens = () => ['W-ETH'];
1
diff --git a/README.md b/README.md ![Imgur](http://i.imgur.com/eL73Iit.png) -![Imgur](https://i.redd.it/8jkukgakvq801.jpg) +![Imgur](https://i.imgur.com/DGVwpos.jpg) # SpaceX Data REST API @@ -29,11 +29,11 @@ GET https://api.spacexdata.com/v2/launches/latest ```json { - "flight_number":53, + "flight_number":54, "launch_year":"2018", - "launch_date_unix":1515373200, - "launch_date_utc":"2018-01-08T01:00:00Z", - "launch_date_local":"2018-01-07T20:00:00-05:00", + "launch_date_unix":1517433900, + "launch_date_utc":"2018-01-31T21:25:00Z", + "launch_date_local":"2018-01-31T16:25:00-05:00", "rocket":{ "rocket_id":"falcon9", "rocket_name":"Falcon 9", @@ -41,35 +41,35 @@ GET https://api.spacexdata.com/v2/launches/latest "first_stage":{ "cores":[ { - "core_serial":"B1043", - "reused":false, + "core_serial":"B1032", + "reused":true, "land_success":true, - "landing_type":"RTLS", - "landing_vehicle":"LZ-1" + "landing_type":"Ocean", + "landing_vehicle":null } ] }, "second_stage":{ "payloads":[ { - "payload_id":"ZUMA", + "payload_id":"GovSat-1", "reused":false, "customers":[ - "Northrop Grumman" + "GovSat" ], "payload_type":"Satellite", - "payload_mass_kg":null, + "payload_mass_kg":4000, "payload_mass_lbs":null, - "orbit":"LEO" + "orbit":"GTO" } ] } }, "telemetry":{ - "flight_club":"https://www.flightclub.io/result?code=ZUMA" + "flight_club":null }, "reuse":{ - "core":false, + "core":true, "side_core1":false, "side_core2":false, "fairings":false, @@ -82,16 +82,16 @@ GET https://api.spacexdata.com/v2/launches/latest }, "launch_success":true, "links":{ - "mission_patch":"https://i.imgur.com/c5pL42B.png", - "reddit_campaign":"https://www.reddit.com/r/spacex/comments/7895bo/zuma_launch_campaign_thread/", - "reddit_launch":"https://www.reddit.com/r/spacex/comments/7oqjf0/rspacex_zuma_official_launch_discussion_updates/", + "mission_patch":"https://i.imgur.com/UJTbQ1f.png", + "reddit_campaign":"https://www.reddit.com/r/spacex/comments/7olw86/govsat1_ses16_launch_campaign_thread/", + "reddit_launch":"https://www.reddit.com/r/spacex/comments/7tvtbh/rspacex_govsat1_official_launch_discussion/", "reddit_recovery":null, - "reddit_media":"https://www.reddit.com/r/spacex/comments/7orksl/rspacex_zuma_media_thread_videos_images_gifs/", - "presskit":"http://www.spacex.com/sites/spacex/files/zumapresskit.pdf", - "article_link":null, - "video_link":"https://www.youtube.com/watch?v=0PWu3BRxn60" + "reddit_media":"https://www.reddit.com/r/spacex/comments/7tzzwy/rspacex_govsat1_media_thread_videos_images_gifs/", + "presskit":"http://www.spacex.com/sites/spacex/files/govsat1presskit.pdf", + "article_link":"https://spaceflightnow.com/2018/01/31/spacex-rocket-flies-on-60th-anniversary-of-first-u-s-satellite-launch/", + "video_link":"https://www.youtube.com/watch?v=ScYUA51-POQ" }, - "details":"Originally planned for mid-November 2017, the mission was delayed due to test results from the fairing of another customer. First-stage booster will attempt landing at LZ-1" + "details":"Reused booster from the classified NROL-76 mission in May 2017. Following a successful experimental ocean landing that used three engines, the booster unexpectedly remained intact; Elon Musk stated in a tweet that SpaceX will attempt to tow the booster to shore." } ```
3
diff --git a/test/jasmine/tests/ternary_test.js b/test/jasmine/tests/ternary_test.js @@ -338,6 +338,39 @@ describe('ternary plots', function() { .then(done); }); + it('should be able to relayout axis tickfont attributes', function(done) { + var gd = createGraphDiv(); + var fig = Lib.extendDeep({}, require('@mocks/ternary_simple.json')); + + function _assert(family, color, size) { + var tick = d3.select('g.aaxis > g.ytick > text').node(); + + expect(tick.style['font-family']).toBe(family, 'font family'); + expect(parseFloat(tick.style['font-size'])).toBe(size, 'font size'); + expect(tick.style.fill).toBe(color, 'font color'); + } + + Plotly.plot(gd, fig).then(function() { + _assert('"Open Sans", verdana, arial, sans-serif', 'rgb(204, 204, 204)', 12); + + return Plotly.relayout(gd, 'ternary.aaxis.tickfont.size', 5); + }) + .then(function() { + _assert('"Open Sans", verdana, arial, sans-serif', 'rgb(204, 204, 204)', 5); + + return Plotly.relayout(gd, 'ternary.aaxis.tickfont', { + family: 'Roboto', + color: 'red', + size: 20 + }); + }) + .then(function() { + _assert('Roboto', 'rgb(255, 0, 0)', 20); + }) + .catch(fail) + .then(done); + }); + function countTernarySubplot() { return d3.selectAll('.ternary').size(); }
0
diff --git a/lib/adapters/http.js b/lib/adapters/http.js @@ -121,8 +121,7 @@ module.exports = function httpAdapter(config) { return true; } if (proxyElement[0] === '.' && - parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement && - proxyElement.match(/\./g).length === parsed.hostname.match(/\./g).length) { + parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) { return true; }
1
diff --git a/src/core/lib/attribute-manager.js b/src/core/lib/attribute-manager.js /* eslint-disable guard-for-in */ import log from '../utils/log'; -import {GL} from 'luma.gl'; +import {GL, Buffer} from 'luma.gl'; import assert from 'assert'; import AttributeTransitionManager from './attribute-transition-manager'; @@ -314,7 +314,13 @@ export default class AttributeManager { * @return {Object} attributes - descriptors */ getAttributes() { - return this.attributes; + const attributes = {}; + for (const attributeName in this.attributes) { + const attribute = this.attributes[attributeName]; + attributes[attributeName] = attribute.buffer || attribute; + } + + return attributes; } /** @@ -337,7 +343,7 @@ export default class AttributeManager { // Only return non-transition attributes if (!attributeTransitionManger.hasAttribute(attributeName)) { - changedAttributes[attributeName] = attribute; + changedAttributes[attributeName] = attribute.buffer || attribute; } } } @@ -420,6 +426,7 @@ export default class AttributeManager { { // Ensure that fields are present before Object.seal() target: undefined, + buffer: null, userData: {} // Reserved for application }, // Metadata @@ -516,7 +523,7 @@ export default class AttributeManager { // Update attribute buffers from any attributes in props // Detach any previously set buffers, marking all // Attributes for auto allocation - /* eslint-disable max-statements */ + /* eslint-disable max-statements, max-depth */ _setExternalBuffers(bufferMap) { const {attributes, numInstances} = this; @@ -524,8 +531,18 @@ export default class AttributeManager { for (const attributeName in attributes) { const attribute = attributes[attributeName]; const buffer = bufferMap[attributeName]; - attribute.isExternalBuffer = false; + if (buffer) { + attribute.isExternalBuffer = true; + attribute.needsUpdate = false; + + if (buffer instanceof Buffer) { + attribute.value = null; + if (attribute.buffer !== buffer) { + attribute.buffer = buffer; + attribute.changed = true; + } + } else { const ArrayType = glArrayFromType(attribute.type || GL.FLOAT); if (!(buffer instanceof ArrayType)) { throw new Error(`Attribute ${attributeName} must be of type ${ArrayType.name}`); @@ -534,14 +551,17 @@ export default class AttributeManager { throw new Error('Attribute prop array must match length and size'); } - attribute.isExternalBuffer = true; - attribute.needsUpdate = false; + attribute.buffer = null; if (attribute.value !== buffer) { attribute.value = buffer; attribute.changed = true; - this.needsRedraw = true; } } + } else { + attribute.isExternalBuffer = false; + } + + this.needsRedraw |= attribute.changed; } } /* eslint-enable max-statements */
11
diff --git a/appjs/logicjavascript.js b/appjs/logicjavascript.js @@ -2235,6 +2235,12 @@ function parallelsolve() var explain1 = document.getElementById("line2"); var m1= (y2-y1)/(x2-x1); var m2 = (y4-y3)/(x4-x3); + if(isNaN(x1) || isNaN(y1) || isNaN(x2) || isNaN(y2) || isNaN(x3) || isNaN(y3) || isNaN(x4) || isNaN(y4)){ + explain.innerHTML = "\\[ Please \\space enter \\space all \\space input \\]"; + renderMathInElement(document.getElementById("line1")); + document.getElementById('line2').innerHTML= ""; + } + else{ if(m1==m2){ explain.innerHTML = "\\[Lines \\space y \\space - \\space" + y1 + "=" + "\\frac{" + y2 +"-"+ y1 + "}{" + x2 + "-" + x1 + "}" + "( \\space x \\space - \\space " + x1 + ") \\space and \\space " + "y \\space - \\space" + y3 + "=" + "\\frac{" + y4 +"-"+ y3 + "}{" + x4 + "-" + x3 + "}" + "( \\space x \\space - \\space " + x3 + ") \\space are \\space Parallel" + "\\] "; renderMathInElement(document.getElementById("line1")); @@ -2245,7 +2251,7 @@ function parallelsolve() renderMathInElement(document.getElementById("line2")); document.getElementById('output2').innerHTML= 'Lines are not parallel'; } - +} } function perpendicularsolve(){
1
diff --git a/tests/phpunit/integration/Core/Notifications/NotificationTest.php b/tests/phpunit/integration/Core/Notifications/NotificationTest.php @@ -34,7 +34,6 @@ class NotificationTest extends TestCase { array( 'title' => 'test-title', 'content' => 'test-content', - 'image' => 'test-image-url', 'cta_url' => 'test-cta-url', 'cta_label' => 'test-cta-label', 'cta_target' => 'test-cta-target', @@ -49,7 +48,6 @@ class NotificationTest extends TestCase { array( 'title' => 'test-title', 'content' => 'test-content', - 'image' => 'test-image-url', 'ctaURL' => 'test-cta-url', 'ctaLabel' => 'test-cta-label', 'ctaTarget' => 'test-cta-target',
2
diff --git a/articles/libraries/lock/v11/migration-lock-passwordless.md b/articles/libraries/lock/v11/migration-lock-passwordless.md @@ -7,7 +7,7 @@ description: Migration Guide from lock-passwordless to Lock v11 with Passwordles The following instructions assume you are migrating from the **lock-passwordless** widget to Lock v11.2+ using **Passwordless Mode**. -The [lock-passwordless](https://github.com/auth0/lock-passwordless) widget was previously a standalone library, separate from [Lock](/libraries/lock/v10). Now, you can migrate your apps to use the Passwordless Mode which is integrated directly into Lock v11. Lock v11 with Passwordless Mode is the latest method by which to deploy a login widget for passwordless authentication in your apps. +The [lock-passwordless](https://github.com/auth0/lock-passwordless) widget was previously a standalone library, separate from [Lock](/libraries/lock). Now, you can migrate your apps to use the Passwordless Mode which is integrated directly into Lock v11. Lock v11 with Passwordless Mode is the latest method by which to deploy a login widget for passwordless authentication in your apps. To get started, you will need to remove **lock-passwordless** from your project, and instead include the [latest release version of Lock v11](https://github.com/auth0/lock/releases). @@ -127,7 +127,7 @@ If you're loading from the CDN, you can still use `Auth0LockPasswordless`. The d ### Choose between SMS or email -We recommend that you setup which passwordless connections you want enabled in [the dashboard](${manage_url}/#/connections/passwordless), but if you want to have more than one passwordless connection enabled in the dashboard, you can restrict `Auth0LockPasswordless` to use only one of them using the [allowedConnections](/libraries/lock/v10/customization#allowedconnections-array-) option. +We recommend that you setup which passwordless connections you want enabled in [the dashboard](${manage_url}/#/connections/passwordless), but if you want to have more than one passwordless connection enabled in the dashboard, you can restrict `Auth0LockPasswordless` to use only one of them using the [allowedConnections](/libraries/lock/v11/customization#allowedconnections-array-) option. If you have both `sms` and `email` passwordless connections enabled in the dashboard, `Auth0LockPasswordless` will use `email` by default. <div class="code-picker"> @@ -141,7 +141,6 @@ If you have both `sms` and `email` passwordless connections enabled in the dashb <div id="sms-enabled" class="tab-pane active"> <pre class="hljs js"><code> var options = { - oidcConformant: true, allowedConnections: ['sms'] }; var lock = new Auth0LockPasswordless(clientID, domain, options); @@ -150,7 +149,6 @@ If you have both `sms` and `email` passwordless connections enabled in the dashb <div id="email-enabled" class="tab-pane"> <pre class="hljs js"><code> var options = { - oidcConformant: true, allowedConnections: ['email'], passwordlessMethod: 'code' };
2
diff --git a/core/field_bound_variable.js b/core/field_bound_variable.js @@ -62,6 +62,11 @@ Blockly.FieldBoundVariable = function(typeExpr, varName, label) { label == Blockly.BoundVariableAbstract.VALUE_VARIABLE || label == Blockly.BoundVariableAbstract.REFERENCE_VARIABLE; + /** + * @type {number} + */ + this.label_ = label; + /** * The value of this field's variable if this.forValue_ is true, otherwise * the reference of that. @@ -250,13 +255,11 @@ Blockly.FieldBoundVariable.prototype.initModel = function() { this.hasPotentialBlock = this.sourceBlock_.isMovable(); this.variable_ = Blockly.BoundVariables.createValue( this.sourceBlock_, this.name, this.defaultTypeExpr_, - this.defaultVariableName_, - Blockly.BoundVariableAbstract.VALUE_VARIABLE); + this.defaultVariableName_, this.label_); } else { this.variable_ = Blockly.BoundVariables.createReference( this.sourceBlock_, this.name, this.defaultTypeExpr_, - this.defaultVariableName_, - Blockly.BoundVariableAbstract.REFERENCE_VARIABLE); + this.defaultVariableName_, this.label_); } } };
1
diff --git a/src/middleware/packages/ldp/services/container/actions/get.js b/src/middleware/packages/ldp/services/container/actions/get.js @@ -37,7 +37,7 @@ module.exports = { jsonContext: { type: 'multi', rules: [{ type: 'array' }, { type: 'object' }, { type: 'string' }], optional: true } }, cache: { - keys: ['containerUri', 'accept', 'queryDepth', 'query', 'jsonContext'] + keys: ['containerUri', 'accept', 'filters', 'queryDepth', 'dereference', 'jsonContext'] }, async handler(ctx) { const { containerUri, filters, webId } = ctx.params; @@ -45,12 +45,58 @@ module.exports = { ...(await ctx.call('ldp.getContainerOptions', { uri: containerUri })), ...ctx.params }; + const filtersQuery = buildFiltersQuery(filters); + // Handle JSON-LD differently, because the framing (https://w3c.github.io/json-ld-framing/) + // does not work correctly and resources are not embedded at the right place. + // This has bad impact on performances, unless the cache is activated + if (accept === MIME_TYPES.JSON) { + const result = await ctx.call('triplestore.query', { + query: ` + ${getPrefixRdf(this.settings.ontologies)} + CONSTRUCT { + <${containerUri}> + a ?containerType ; + ldp:contains ?s1 . + } + WHERE { + <${containerUri}> a ldp:Container, ?containerType . + OPTIONAL { + <${containerUri}> ldp:contains ?s1 . + ${filtersQuery.where} + } + } + `, + accept, + webId + }); + + // Request each resources + let resources = []; + if( result && result.contains ) { + for( const resourceUri of result.contains ) { + resources.push(await ctx.call('ldp.resource.get', { + resourceUri, + webId, + accept, + queryDepth, + dereference, + jsonContext + })); + } + } + + return jsonld.compact({ + '@id': containerUri, + 'ldp:contains': resources + }, + jsonContext || getPrefixJSON(this.settings.ontologies) + ); + } else { const blandNodeQuery = buildBlankNodesQuery(queryDepth); const dereferenceQuery = buildDereferenceQuery(dereference); - const filtersQuery = buildFiltersQuery(filters); - let result = await ctx.call('triplestore.query', { + return await ctx.call('triplestore.query', { query: ` ${getPrefixRdf(this.settings.ontologies)} CONSTRUCT { @@ -75,29 +121,7 @@ module.exports = { accept, webId }); - - if (accept === MIME_TYPES.JSON) { - result = await jsonld.frame(result, { - '@context': jsonContext || getPrefixJSON(this.settings.ontologies), - '@id': containerUri - }); - - // Remove the @graph - result = { - '@context': result['@context'], - ...result['@graph'][0] - }; - - // If the ldp:contains is a single object, wrap it in an array - const ldpContainsKey = Object.keys(result).find(key => - ['http://www.w3.org/ns/ldp#contains', 'ldp:contains', 'contains'].includes(key) - ); - if (ldpContainsKey && !Array.isArray(result[ldpContainsKey])) { - result[ldpContainsKey] = [result[ldpContainsKey]]; } } - - return result; - } } };
1
diff --git a/articles/cms/wordpress/troubleshoot.md b/articles/cms/wordpress/troubleshoot.md @@ -46,7 +46,7 @@ For Connections that don't provide an `email_verified` flag (some Enterprise con ### I see the error message "There is a user with the same email" that prevents me from logging in -This means that there is a user in that has the same email as the one being used to login associated with a different Auth0 user. If you're in the process of testing the plugin or want to associate the existing user with the new Auth user instead: +This means that there is a user in WordPress that has the same email as the one being used to login associated with a different Auth0 user. If you're in the process of testing the plugin or want to associate the existing user with the new Auth user instead: 1. Log in as an admin 1. Go to wp-admin > Users and search for the email being used
13
diff --git a/appjs/logicjavascript.js b/appjs/logicjavascript.js @@ -2540,7 +2540,7 @@ function solvehollowsphere() { var tsaoutput = document.getElementById("resultoftsahollowsp"); var voltemp = ""; var tsatemp = ""; - if (radius != "") { + if (radius1 != "" && radius2 != "") { voltemp += "\\[ \\frac{4}{3} \\times \\pi \\times (" + radius1 + "^3-" + radius2 + "^3) \\]"; voltemp += "\\[Volume \\space of \\space Hollow \\space Sphere \\space is \\space " + eval(String(4 * 3.14159 * ((radius1 * radius1 * radius1) - (radius2 * radius2 * radius2)) / 3)) + "\\]"; voloutput.innerHTML = voltemp;
1
diff --git a/runtime.js b/runtime.js @@ -919,6 +919,8 @@ const _loadScript = async (file, {files = null, parentUrl = null, contentId = nu jitterObject.add(appObject); const app = appManager.createApp(appId); + app.rootObject = mesh; + app.jitterObject = jitterObject; app.object = appObject; app.contentId = contentId; const localImportMap = _clone(importMap);
0
diff --git a/src/components/menu/index.js b/src/components/menu/index.js @@ -4,7 +4,10 @@ import { } from "react-router-dom"; import { useTranslation } from 'react-i18next'; import Icon from '@mdi/react'; -import {mdiCogOutline} from '@mdi/js'; +import { + mdiCogOutline, + mdiRemote, +} from '@mdi/js'; import MenuItem from './MenuItem'; import MenuIcon from './MenuIcon.jsx'; @@ -208,34 +211,40 @@ const Menu = () => { {t('Loot tiers')} </Link> </li> + <li className = "submenu-wrapper" > <Link - to = '/control/' + to = '/barters/' onClick = {setIsOpen.bind(this, false)} > - {t('Remote')} + {t('Barter profit')} </Link> </li> <li className = "submenu-wrapper" > <Link - to = '/barters/' + to = '/hideout-profit/' onClick = {setIsOpen.bind(this, false)} > - {t('Barter profit')} + {t('Hideout profit')} </Link> </li> <li className = "submenu-wrapper" > <Link - to = '/hideout-profit/' + aria-label="Remote control" + to = '/control/' onClick = {setIsOpen.bind(this, false)} > - {t('Hideout profit')} + <Icon + path={mdiRemote} + size={1} + className = 'icon-with-text' + /> </Link> </li> <li
14
diff --git a/client/components/cards/cardDescription.js b/client/components/cards/cardDescription.js @@ -23,9 +23,7 @@ BlazeComponent.extendComponent({ this.data().setDescription(description); }, // Pressing Ctrl+Enter should submit the form - // was keydown - // extraevent for saving input. buffer of keydown vs buffer time - 'keyup form textarea'(evt) { + 'keydown form textarea'(evt) { if (evt.keyCode === 13 && (evt.metaKey || evt.ctrlKey)) { const submitButton = this.find('button[type=submit]'); if (submitButton) {
13
diff --git a/generators/server/templates/gradle.properties.ejs b/generators/server/templates/gradle.properties.ejs @@ -61,7 +61,7 @@ cassandraDriverVersion=4.13.0 # gradle plugin version jibPluginVersion=<%= JIB_VERSION %> -gitPropertiesPluginVersion=2.4.0 +gitPropertiesPluginVersion=2.4.1 <%_ if (!skipClient) { _%> gradleNodePluginVersion=3.2.1 <%_ } _%>
3
diff --git a/api/queries/community/billingSettings.js b/api/queries/community/billingSettings.js @@ -51,8 +51,9 @@ export default async ( : subscriptions; return { - pendingAdministratorEmail: isOwner ? pendingAdministratorEmail : null, - administratorEmail: isOwner ? administratorEmail : null, + pendingAdministratorEmail: + isOwner || isModerator ? pendingAdministratorEmail : null, + administratorEmail: isOwner || isModerator ? administratorEmail : null, sources: sources, invoices: cleanInvoices, subscriptions: subscriptions,
11
diff --git a/tabs/index.js b/tabs/index.js @@ -112,7 +112,9 @@ class TonicTabs extends Tonic { const ariaControls = node.getAttribute('for') if (!ariaControls) { - return '' + return this.html` + ${node} + ` } if (node.attributes.class) {
11
diff --git a/parser/loader.go b/parser/loader.go @@ -165,12 +165,16 @@ func Read(name string) ([]byte, error) { return nil, err } - b, _ := process(s, data, template.FuncMap{"partial": d.partial}) + b, err := process(s, data, template.FuncMap{"partial": d.partial}) + if err != nil { + return nil, err + } - funcMap := sprig.TxtFuncMap() - funcMap["joinString"] = funcMap["join"] - funcMap["join"] = join - funcMap["upcase"] = strings.ToUpper + // backward compatible + funcMap := template.FuncMap{ + "join": join, + "upcase": strings.ToUpper, + } b, err = process(string(b), data, funcMap) if err != nil { @@ -181,7 +185,7 @@ func Read(name string) ([]byte, error) { } func process(s string, data interface{}, funcMap template.FuncMap) ([]byte, error) { - tmpl, err := template.New("apib").Funcs(funcMap).Parse(s) + tmpl, err := template.New("apib").Funcs(sprig.TxtFuncMap()).Funcs(funcMap).Parse(s) if err != nil { return nil, err }
4
diff --git a/packages/core/src/core/mergeOptions.js b/packages/core/src/core/mergeOptions.js @@ -189,6 +189,7 @@ function extractPageHooks (options) { warn(`Duplicate lifecycle [${key}] is defined in root options and methods, please check.`, options.mpxFileResource) } newOptions[key] = methods[key] + delete methods[key] } }) return newOptions
1
diff --git a/Apps/Sandcastle/gallery/3D Tiles Terrain Classification.html b/Apps/Sandcastle/gallery/3D Tiles Terrain Classification.html @@ -38,7 +38,7 @@ geocoder.search(); // Vector 3D Tiles are experimental and the format is subject to change in the future. // For more details, see: // https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/3d-tiles-next/TileFormats/VectorData -var tileset = new Cesium.Cesium3DTileset({ url: Cesium.IonResource.fromAssetId(3841) }); +var tileset = new Cesium.Cesium3DTileset({ url: Cesium.IonResource.fromAssetId(5737) }); viewer.scene.primitives.add(tileset); tileset.style = new Cesium.Cesium3DTileStyle({
3
diff --git a/src/backend/web-gl/kernel.js b/src/backend/web-gl/kernel.js @@ -7,7 +7,8 @@ const Texture = require('../../core/texture'); const fragShaderString = require('./shader-frag'); const vertShaderString = require('./shader-vert'); const kernelString = require('./kernel-string'); - +const canvases = []; +const canvasTexSizes = {}; module.exports = class WebGLKernel extends KernelBase { /** @@ -128,14 +129,28 @@ module.exports = class WebGLKernel extends KernelBase { const texSize = this.texSize; const gl = this._webGl; const canvas = this._canvas; - if (canvas.width < texSize[0]) { - canvas.width = texSize[0]; + let canvasIndex = canvases.indexOf(canvas); + if (canvasIndex === -1) { + canvasIndex = canvases.length; + canvases.push(canvas); + canvasTexSizes[canvasIndex] = []; + } + + const sizes = canvasTexSizes[canvasIndex]; + sizes.push(texSize); + const maxTexSize = [0, 0]; + for (let i = 0; i < sizes.length; i++) { + const size = sizes[i]; + if (maxTexSize[0] < size[0]) { + maxTexSize[0] = size[0]; } - if (canvas.height < texSize[1]) { - canvas.height = texSize[1]; + if (maxTexSize[1] < size[1]) { + maxTexSize[1] = size[1]; } + } + gl.enable(gl.SCISSOR_TEST); - gl.viewport(0, 0, canvas.width, canvas.height); + gl.viewport(0, 0, maxTexSize[0], maxTexSize[1]); const threadDim = this.threadDim = utils.clone(this.dimensions); while (threadDim.length < 3) { threadDim.push(1);
12
diff --git a/Documentation/OfflineGuide/README.md b/Documentation/OfflineGuide/README.md @@ -4,22 +4,22 @@ By default, Cesium uses several external data sources which require internet acc ## Imagery -The default imagery provider in Cesium is Cesium ion global imagery through Bing Maps. This provider loads data from `api.cesium.com` and `dev.virtualearth.net` as well as several other tile servers that are subdomains of `virtualearth.net`. To use another provider, pass it into the constructor for the `Viewer` widget. +The default imagery provider in Cesium is Cesium ion global imagery through Bing Maps. This provider loads data from `api.cesium.com` and `dev.virtualearth.net` as well as several other tile servers that are subdomains of `virtualearth.net`. To use another provider, pass it into the [constructor for the `Viewer` widget](https://cesium.com/learn/cesiumjs/ref-doc/Viewer.html#.ConstructorOptions). If you have an imagery server on your local network (e.g. WMS, ArcGIS, Google Earth Enterprise), you can configure Cesium to use that. Otherwise, Cesium ships with a low-resolution set of images from Natural Earth II in `Assets/Textures/NaturalEarthII`. -By default, the `BaseLayerPicker` includes options for several sample online imagery and terrain sources. In an offline application, you should either disable that widget completely, by passing `baseLayerPicker : false` to the `Viewer` widget, or use the `imageryProviderViewModels` and `terrainProviderViewModels` options to configure the sources that will be available in your offline application. +By default, the `BaseLayerPicker` includes options for several sample online imagery and terrain sources. In an offline application, you should either disable that widget completely, by passing `baseLayerPicker : false` to the `Viewer` widget's constructor, or use the `imageryProviderViewModels` and `terrainProviderViewModels` options to configure the sources that will be available in your offline application. ## Geocoder -The `Geocoder` widget, which allows flying to addresses and landmarks, uses the Cesium ion API at `api.cesium.com`. In your offline application, you should disable this functionality by passing `geocoder : false` to the `Viewer` constructor. +The [`Geocoder`](https://cesium.com/learn/cesiumjs/ref-doc/Geocoder.html?classFilter=geocoder) widget, which allows flying to addresses and landmarks, uses the Cesium ion API at `api.cesium.com`. In your offline application, you should disable this functionality by passing `geocoder : false` to the `Viewer` constructor. ## Example This example shows how to configure Cesium to avoid use of online data sources. ```javascript -var viewer = new Cesium.Viewer("cesiumContainer", { +const viewer = new Cesium.Viewer("cesiumContainer", { imageryProvider: new Cesium.TileMapServiceImageryProvider({ url: Cesium.buildModuleUrl("Assets/Textures/NaturalEarthII"), }),
3
diff --git a/packages/idyll-document/src/runtime.js b/packages/idyll-document/src/runtime.js @@ -69,7 +69,6 @@ const createWrapper = ({ theme, layout, authorView }) => { this.ref = {}; this.onUpdateRefs = this.onUpdateRefs.bind(this); this.onUpdateProps = this.onUpdateProps.bind(this); - this.isAuthorView = authorView; const vars = values(props.__vars__); const exps = values(props.__expr__); @@ -169,14 +168,15 @@ const createWrapper = ({ theme, layout, authorView }) => { key: `${this.key}-${i}`, idyll: { theme: getTheme(theme), - layout: getLayout(layout) + layout: getLayout(layout), + authorView: authorView }, ...state, ...passThruProps, }) }); const metaData = childComponent.type._idyll; - if (this.isAuthorView != 'false' && metaData && metaData.props) { + if (authorView !== false && metaData && metaData.props) { // ensure inline elements do not have this overlay if (metaData.displayType === undefined || metaData.displayType !== "inline") { return ( @@ -441,7 +441,7 @@ class IdyllRuntime extends React.PureComponent { IdyllRuntime.defaultProps = { layout: 'blog', theme: 'github', - authorView: 'false', + authorView: false, insertStyles: false };
4
diff --git a/articles/api/management/v2/tokens.md b/articles/api/management/v2/tokens.md @@ -6,6 +6,10 @@ toc: true # The Auth0 Management APIv2 Token +<div class="alert alert-info"> + We recently changed the way you get Management APIv2 tokens. To read what we changed, why we did that, and how you can work around these changes refer to <a href="/api/management/v2/tokens-flows">Changes in Auth0 Management APIv2 Tokens</a>. +</div> + ## Overview In order to call the endpoints of [Auth0 Management API v2](/api/management/v2), you need a token, what we refer to as Auth0 Management APIv2 Token. This token is a [JWT](/jwt), contains specific granted permissions (known as __scopes__), and is signed with a client API key and secret for the entire tenant.
0
diff --git a/packages/concerto-core/types/index.d.ts b/packages/concerto-core/types/index.d.ts @@ -309,7 +309,7 @@ declare module '@accordproject/concerto-core' { getModelFile(namespace: string): ModelFile | null; private getModelFileByFileName(fileName: string): ModelFile | null; getNamespaces(): string[]; - private getType(qualifiedName: string): ClassDeclaration; + getType(qualifiedName: string): ClassDeclaration; getSystemTypes(): ClassDeclaration[]; getAssetDeclarations(): AssetDeclaration[]; getTransactionDeclarations(): TransactionDeclaration[];
1
diff --git a/public/javascripts/Admin/src/Admin.User.js b/public/javascripts/Admin/src/Admin.User.js @@ -145,7 +145,7 @@ function AdminUser(params) { var localDate = moment(new Date(grouped[auditTaskId][0]["task_end"])); tableRows += "<tr>" + - "<td class='col-xs-1'>" + localDate.formt('L') + "</td>" + + "<td class='col-xs-1'>" + localDate.format('L') + "</td>" + "<td class='col-xs-1'>" + labelCounter["CurbRamp"] + "</td>" + "<td class='col-xs-1'>" + labelCounter["NoCurbRamp"] + "</td>" + "<td class='col-xs-1'>" + labelCounter["Obstacle"] + "</td>" +
1
diff --git a/src/components/DateRangePickerDialog.js b/src/components/DateRangePickerDialog.js @@ -67,6 +67,7 @@ class DateRangePickerDialog extends React.PureComponent<Props> { </Text> } headerRight={ + dateRange ? ( <Touchable onPress={this.clear} accessibilityLabel="Clear date selection" @@ -75,6 +76,7 @@ class DateRangePickerDialog extends React.PureComponent<Props> { Clear </Text> </Touchable> + ) : null } onApply={this.props.onApply} onCancel={this.props.onCancel}
0
diff --git a/src/web/services/user.js b/src/web/services/user.js @@ -25,7 +25,7 @@ async function getUserByAPI (id, accessToken, skipCache) { log.web.info(`[1 DISCORD API REQUEST] [USER] GET /api/users/@me`) const results = await fetch(`${discordAPIConstants.apiHost}/users/@me`, discordAPIHeaders.user(accessToken)) if (results.status !== 200) { - throw new Error('Non-200 status code') + throw new Error(`Bad Discord status code (${results.status})`) } const data = await results.json() CACHED_USERS[id] = { @@ -48,7 +48,7 @@ async function getGuildsByAPI (id, accessToken, skipCache) { log.web.info(`[1 DISCORD API REQUEST] [USER] GET /api/users/@me/guilds`) const res = await fetch(`${discordAPIConstants.apiHost}/users/@me/guilds`, discordAPIHeaders.user(accessToken)) if (res.status !== 200) { - throw new Error(`Non-200 status code (${res.status})`) + throw new Error(`Bad Discord status code (${res.status})`) } const data = await res.json() CACHED_USERS_GUILDS[id] = { @@ -134,7 +134,7 @@ async function isManagerOfGuildByAPI (userID, guildID) { await RedisGuildMember.utils.recognizeNonMember(userID, guildID) return false } - throw new Error(`Bad status code (${res.status})`) + throw new Error(`Bad Discord status code (${results.status})`) } module.exports = {
4
diff --git a/app/front.js b/app/front.js @@ -70,9 +70,12 @@ const mathField = MQ.MathField($equationEditor.get(0), { handlers: { edit: () => !latexEditorFocus && $latexEditor.val(mathField.latex()) } -}); +}) + +function onLatexUpdate() { setTimeout(() => mathField.latex($latexEditor.val()), 0) } + $latexEditor - .keyup(() => setTimeout(() => mathField.latex($latexEditor.val()), 0)) + .keyup(onLatexUpdate) .on('focus blur', e => latexEditorFocus = e.type === 'focus') $answer.get(0).focus() @@ -86,9 +89,13 @@ function initMathToolbar() { $mathToolbar.on('mousedown', 'button', e => { e.preventDefault() const symbol = e.currentTarget.id + if(latexEditorFocus) { + insertAtCursor(symbol) + } else { mathField.typedText(symbol) if(symbol.startsWith('\\')) mathField.keystroke('Tab') setTimeout(() => mathField.focus(), 0) + } }) $mathToolbar.hide() } @@ -137,3 +144,18 @@ function pasteHtmlAtCaret(html) { } } } + +function insertAtCursor(value) { + const myField = $latexEditor.get(0) + if(myField.selectionStart || myField.selectionStart == '0') { + const startPos = myField.selectionStart + const endPos = myField.selectionEnd + myField.value = myField.value.substring(0, startPos) + + value + + myField.value.substring(endPos, myField.value.length) + myField.selectionStart = startPos + value.length; myField.selectionEnd = startPos + value.length + } else { + myField.value += value + } + onLatexUpdate() +}
11
diff --git a/articles/quickstart/spa/react/03-calling-an-api.md b/articles/quickstart/spa/react/03-calling-an-api.md @@ -35,7 +35,9 @@ auth0 = new auth0.WebAuth({ At this point you should try logging into your application again to take note of how the `access_token` differs from before. Instead of being an opaque token, it is now a JSON Web Token which has a payload that contains your API identifier as an `audience` and any `scope`s you've requested. -> **Note:** By default, any user on any client can ask for any scope defined in the scopes configuration area. You can implement access policies to limit this behaviour via [Rules](https://auth0.com/docs/rules). +::: note +By default, any user on any client can ask for any scope defined in the scopes configuration area. You can implement access policies to limit this behaviour via [Rules](/rules). +::: ## Configure a Custom Fetch Function
14
diff --git a/demo/dev/index.htm b/demo/dev/index.htm <script> const colors = ['gold', 'blue', 'silver', 'black', 'white']; - const widths = ['450px', '300px', '150px']; + const widths = ['450px', '300px', '220px', '150px']; const fis = ['venmo', 'credit']; const taglines = [true, false]; const labels = ['checkout', 'pay', 'buynow']; - const products = ['flex']; const instruments = ['card', 'bank', 'balance', 'credit']; const shapes = ['rect', 'pill'] }); } - for (const product of products) { - buttonOpts.push({ - fundingEligibility: { - paypal: { - eligible: true - }, - paylater: { - eligible: true, - products: { - [product]: { - eligible: true - } - } - } - } - }); - } - - for (const product of products) { - buttonOpts.push({ - style: { - layout: 'horizontal', - tagline: false - }, - fundingEligibility: { - paypal: { - eligible: true - }, - paylater: { - eligible: true, - products: { - [product]: { - eligible: true - } - } - } - } - }); - } - for (const tagline of taglines) { buttonOpts.push({ style: {
7
diff --git a/src/js/components/Image/__tests__/Image-test.js b/src/js/components/Image/__tests__/Image-test.js @@ -4,7 +4,7 @@ import 'jest-styled-components'; import 'jest-axe/extend-expect'; import 'regenerator-runtime/runtime'; -import { cleanup, render } from '@testing-library/react'; +import { act, cleanup, fireEvent, render } from '@testing-library/react'; import { axe } from 'jest-axe'; import { Grommet } from '../../Grommet'; import { Image } from '..'; @@ -81,3 +81,18 @@ test('Image fillProp renders', () => { const tree = component.toJSON(); expect(tree).toMatchSnapshot(); }); + +test('Image onError', () => { + const onError = jest.fn(); + const { getByAltText } = render( + <Grommet> + <Image alt="test" onError={onError} /> + </Grommet>, + ); + + act(() => { + fireEvent(getByAltText('test'), new Event('error')); + }); + + expect(onError).toHaveBeenCalledTimes(1); +});
7
diff --git a/data/brands/amenity/cafe.json b/data/brands/amenity/cafe.json "brand": "CoCo", "brand:wikidata": "Q65084369", "cuisine": "bubble_tea", - "name": "Coco", + "name": "CoCo Fresh Tea & Juice", + "short_name": "CoCo", "takeaway": "yes" } },
7
diff --git a/js/plotSegmented.js b/js/plotSegmented.js @@ -71,7 +71,7 @@ function renderFloatLegendNew(props) { if (color[0] === 'no-data') { return null; } - var unitText = (units || [])[0], + var unitText = (units || [''])[0] || '', footnotes = [<span title={unitText}>{addWordBreaks(unitText)}</span>]; var [origin, , max] = color.slice(4),
9
diff --git a/content/concepts/compute-to-data.md b/content/concepts/compute-to-data.md @@ -116,5 +116,7 @@ The Operator Engine is in charge of retrieving all the workflows registered in a - [Tutorial: Writing Algorithms](/tutorials/compute-to-data-algorithms/) - [Tutorial: Set Up a Compute-to-Data Environment](/tutorials/compute-to-data/) -- [Compute-to-Data in Ocean Market](https://blog.oceanprotocol.com) +- [Use Compute-to-Data in Ocean Market](https://blog.oceanprotocol.com/compute-to-data-is-now-available-in-ocean-market-58868be52ef7) +- [Build ML models via Ocean Market or Python](https://medium.com/ravenprotocol/machine-learning-series-using-logistic-regression-for-classification-in-oceans-compute-to-data-18df49b6b165) +- [Compute-to-Data Python Quickstart](https://github.com/oceanprotocol/ocean.py/blob/main/READMEs/c2d-flow.md) - [(Old) Compute-to-Data specs](https://github.com/oceanprotocol-archive/OEPs/tree/master/12) (OEP12)
7
diff --git a/articles/protocols/saml/identity-providers/ssocircle.md b/articles/protocols/saml/identity-providers/ssocircle.md @@ -7,12 +7,12 @@ description: Tutorial for creating an Auth0 app that uses SAML SSO with SSOCircl This tutorial will create a sample application that uses Auth0 for SAML Single Sign On (SSO), authenticating users against identity provider **SSOCircle**. -## 1. Obtain the SSOCircle Metadata - -::: panel-info SSOCircle Metadata +::: panel-danger Deprecation Notice As of July 8, 2016, SSOCircle supports integration via [manual configuration using public settings](http://www.ssocircle.com/en/idp-tips-tricks/public-idp-configuration/). If you have previously used account-specific metadata, your integration will still function, though this usage is now deprecated. ::: +## 1. Obtain the SSOCircle Metadata + Navigate to [SSOCircle's IDP page](https://idp.ssocircle.com/) to see the metadata required for integration. You will be shown an XML file. ![Metadata XML Display](/media/articles/saml/identity-providers/ssocircle/metadata-xml.png)
14
diff --git a/test/definition.operation.test.js b/test/definition.operation.test.js @@ -433,34 +433,6 @@ describe('definitions/operation', () => { expect(err).to.match(/Value must be an array/); }); - it('must have a corresponding securityDefinition in v2', () => { - throw Error('TODO'); - }); - - it('must have a corresponding securityScheme in v3', () => { - throw Error('TODO'); - }); - - it('must be an empty array if not OAuth2', () => { - throw Error('TODO'); - }); - - it('must have array values for OAuth2 that are defined in the securityDefinition scope for v2', () => { - throw Error('TODO'); - }); - - it('must have array values for OAuth2 that are defined in the securityScheme scope for v3', () => { - throw Error('TODO'); - }); - - it('can have valid values for OAuth2 for v2', () => { - throw Error('TODO'); - }); - - it('can have valid values for OAuth2 for v3', () => { - throw Error('TODO'); - }); - }); describe('servers', () => {
2
diff --git a/css/listItem.css b/css/listItem.css width: 100%; display: block; position: relative; - padding: 0.55em 0.55em 0.55em 9px; + padding: 8px 9px 9px 9px; cursor: pointer; transition: 0.2s transform, 0.2s opacity; } overflow: hidden; white-space: nowrap; text-overflow: ellipsis; - line-height: 1.1em; } .searchbar-item .title.wide { max-width: 70%; @@ -152,7 +151,6 @@ body.dark-mode.touch .searchbar-item .action-button { white-space: nowrap; text-overflow: ellipsis; max-height: 2em; - line-height: 1em; } .searchbar-item .image {
7
diff --git a/content_scripts/link_hints.js b/content_scripts/link_hints.js @@ -1141,7 +1141,7 @@ var LocalHints = { let foundElement = false; for (let verticalCoordinate of verticalCoordinates) { for (let horizontalCoordinate of horizontalCoordinates) { - const elementFromPoint = LocalHints.getElementFromPoint(verticalCoordinate, horizontalCoordinate); + const elementFromPoint = LocalHints.getElementFromPoint(horizontalCoordinate, verticalCoordinate); if (elementFromPoint && (element.contains(elementFromPoint) || elementFromPoint.contains(element))) { foundElement = true; break;
1
diff --git a/packages/neutrine/src/core/tabs/index.js b/packages/neutrine/src/core/tabs/index.js @@ -6,7 +6,9 @@ import "@siimple/css/scss/components/tabs.scss"; //Export tabs component export const Tabs = function (props) { - return helpers.createMergedElement("div", props, "siimple-tabs"); + return helpers.createMergedElement("div", props, { + "className": "siimple-tabs" + }); }; //Tabs item component
1
diff --git a/src/og/terrain/GlobusTerrain.js b/src/og/terrain/GlobusTerrain.js @@ -20,6 +20,8 @@ import { Vec3 } from '../math/Vec3.js'; import { Extent } from '../Extent.js'; import { LonLat } from '../LonLat.js'; +import { Ray } from '../math/Ray.js'; + const EVENT_NAMES = [ /** @@ -214,6 +216,66 @@ class GlobusTerrain extends EmptyTerrain { return this._elevationCache[tileIndex]; } + // _getGroundHeightMerc(merc, tileData) { + + // if (!tileData.heights) { + // return 0; + // } + + // let w = tileData.extent.getWidth(), + // gs = Math.sqrt(tileData.heights.length); + + // if (!tileData.extent.isInside(merc)) { + // console.log("GlobusTerrain.js 221 - error!"); + // debugger; + // } + + // let size = w / (gs - 1); + + // /* + // v2-----------v3 + // | | + // | | + // | | + // v0-----------v1 + // */ + + // let i = gs - Math.ceil((merc.lat - tileData.extent.southWest.lat) / size) - 1, + // j = Math.floor((merc.lon - tileData.extent.southWest.lon) / size); + + // let v0Ind = (i + 1) * gs + j, + // v1Ind = v0Ind + 1, + // v2Ind = i * gs + j, + // v3Ind = v2Ind + 1; + + // let h0 = tileData.heights[v0Ind], + // h1 = tileData.heights[v1Ind], + // h2 = tileData.heights[v2Ind], + // h3 = tileData.heights[v3Ind]; + + // let v0 = new LonLat(tileData.extent.southWest.lon + size * j, tileData.extent.northEast.lat - size * i - size), + // v1 = new LonLat(v0.lon + size, v0.lat), + // v2 = new LonLat(v0.lon, v0.lat + size), + // v3 = new LonLat(v0.lon + size, v0.lat + size); + + // let TEST = new Extent(v0, v3); + // if (!TEST.isInside(merc)) { + // console.log("GlobusTerrain.js 251 - error!"); + // debugger; + // } + + // let c = new Array(3); + + // if (cartesianToBarycentricLonLat(merc, v0, v1, v2, c)) { + // return h0 * c[0] + h1 * c[1] + h2 * c[2]; + // } else if (cartesianToBarycentricLonLat(merc, v1, v2, v3, c)) { + // return h1 * c[0] + h2 * c[1] + h3 * c[2]; + // } else { + // console.log("GlobusTerrain.js 266 - error!"); + // debugger; + // } + // } + _getGroundHeightMerc(merc, tileData) { if (!tileData.heights) { @@ -251,25 +313,28 @@ class GlobusTerrain extends EmptyTerrain { h2 = tileData.heights[v2Ind], h3 = tileData.heights[v3Ind]; - let v0 = new LonLat(tileData.extent.southWest.lon + size * j, tileData.extent.northEast.lat - size * i - size), - v1 = new LonLat(v0.lon + size, v0.lat), - v2 = new LonLat(v0.lon, v0.lat + size), - v3 = new LonLat(v0.lon + size, v0.lat + size); + let v0 = new Vec3(tileData.extent.southWest.lon + size * j, h0, tileData.extent.northEast.lat - size * i - size), + v1 = new Vec3(v0.x + size, h1, v0.z), + v2 = new Vec3(v0.x, h2, v0.z + size), + v3 = new Vec3(v0.x + size, h3, v0.z + size); - let TEST = new Extent(v0, v3); - if (!TEST.isInside(merc)) { - console.log("GlobusTerrain.js 251 - error!"); - debugger; + let xyz = new Vec3(merc.lon, 100000.0, merc.lat), + ray = new Ray(xyz, new Vec3(0, -1, 0)); + + let res = new Vec3(); + let d = ray.hitTriangle(v0, v1, v2, res); + + if (d === Ray.INSIDE) { + return res.y; } - let c = new Array(3); + d = ray.hitTriangle(v1, v3, v2, res); + if (d === Ray.INSIDE) { + return res.y; + } - if (cartesianToBarycentricLonLat(merc, v0, v1, v2, c)) { - return h0 * c[0] + h1 * c[1] + h2 * c[2]; - } else if (cartesianToBarycentricLonLat(merc, v1, v2, v3, c)) { - return h1 * c[0] + h2 * c[1] + h3 * c[2]; - } else { - console.log("GlobusTerrain.js 266 - error!"); + if (d === Ray.AWAY) { + console.log("GlobusTerrain.js 337 - error!"); debugger; } }
14
diff --git a/modules/xerte/parent_templates/Nottingham/models_html5/connectorMenu.html b/modules/xerte/parent_templates/Nottingham/models_html5/connectorMenu.html $thisItem = $menuItem; } + switch (menuItems[i]) { + case "[first]": + menuItems.splice(i, 1, x_pageInfo[0].linkID); + break; + case "[last]": + menuItems.splice(i, 1, x_pageInfo[x_pageInfo.length-1].linkID); + break; + case "[previous]": + menuItems.splice(i, 1, x_pageInfo[x_currentPage != 0 ? x_currentPage-1 : 0].linkID); + break; + case "[next]": + menuItems.splice(i, 1, x_pageInfo[x_currentPage != x_pageInfo.length-1 ? x_currentPage+1 : x_pageInfo.length-1].linkID); + break; + } + + var name; + if (i == 0 && menuItems[i] == undefined && x_pageInfo[0].type == 'menu') { + name = x_getLangInfo(x_languageData.find("toc")[0], "label", "Table of Contents"); + menuItems.splice(i, 1, "toc_menu"); + } else { var page = x_lookupPage("linkID", menuItems[i]); - var name = $.isArray(page) ? this.getNestedName(page) : x_pages[page].getAttribute("name"); - page = $.isArray(page) ? page[0] : page; + name = $.isArray(page) ? this.getNestedName(page) : x_pages[page].getAttribute("name"); + } $thisItem .data("id", menuItems[i]) $(".subMenuItem") .button() .click(function() { + if ($(this).data("id") == "toc_menu") { + x_changePage(0); + } else { x_navigateToPage(false, {type:"linkID", ID:$(this).data("id")}); + } });
1
diff --git a/app/src/renderer/styles/vendor/vue-directive-tooltip.styl b/app/src/renderer/styles/vendor/vue-directive-tooltip.styl .vue-tooltip df() - background var(--bc) + background #000 box-sizing border-box - color var(--txt) - // max-width 20rem // addresses are usually longer + color var(--bright) padding 0.5rem 0.75rem border-radius 0.25rem z-index z(modal) + font-size sm .vue-tooltip .vue-tooltip-content text-align center .vue-tooltip[x-placement^="top"] .tooltip-arrow border-width 0.375rem 0.375rem 0 0.375rem - border-top-color var(--bc) + border-top-color #000 border-bottom-color transparent !important border-left-color transparent !important border-right-color transparent !important .vue-tooltip[x-placement^="bottom"] .tooltip-arrow border-width 0 0.375rem 0.375rem 0.375rem - border-bottom-color var(--bc) + border-bottom-color #000 border-top-color transparent !important border-left-color transparent !important border-right-color transparent !important .vue-tooltip[x-placement^="right"] .tooltip-arrow border-width 0.375rem 0.375rem 0.375rem 0 - border-right-color var(--bc) + border-right-color #000 border-top-color transparent !important border-left-color transparent !important border-bottom-color transparent !important .vue-tooltip[x-placement^="left"] .tooltip-arrow border-width 0.375rem 0 0.375rem 0.375rem - border-left-color var(--bc) + border-left-color #000 border-top-color transparent !important border-right-color transparent !important border-bottom-color transparent !important
3
diff --git a/core/server/api/v2/integrations.js b/core/server/api/v2/integrations.js -const i18n = require('../../../shared/i18n'); +const tpl = require('@tryghost/tpl'); const errors = require('@tryghost/errors'); const models = require('../../models'); +const messages = { + resourceNotFound: '{resource} not found.' +}; + module.exports = { docName: 'integrations', browse: { @@ -45,9 +49,7 @@ module.exports = { return models.Integration.findOne(data, Object.assign(options, {require: true})) .catch(models.Integration.NotFoundError, () => { throw new errors.NotFoundError({ - message: i18n.t('errors.api.resource.resourceNotFound', { - resource: 'Integration' - }) + message: tpl(messages.resourceNotFound, {resource: 'Integration'}) }); }); } @@ -78,9 +80,7 @@ module.exports = { return models.Integration.edit(data, Object.assign(options, {require: true})) .catch(models.Integration.NotFoundError, () => { throw new errors.NotFoundError({ - message: i18n.t('errors.api.resource.resourceNotFound', { - resource: 'Integration' - }) + message: tpl(messages.resourceNotFound, {resource: 'Integration'}) }); }); } @@ -136,9 +136,7 @@ module.exports = { return models.Integration.destroy(Object.assign(options, {require: true})) .catch(models.Integration.NotFoundError, () => { return Promise.reject(new errors.NotFoundError({ - message: i18n.t('errors.api.resource.resourceNotFound', { - resource: 'Integration' - }) + message: tpl(messages.resourceNotFound, {resource: 'Integration'}) })); }); }
14
diff --git a/themes/5ePhb.style.less b/themes/5ePhb.style.less @@ -362,6 +362,9 @@ body { dl { color : @headerText; } + hr:last-of-type~dl{ + color : inherit; // After the HRs, hanging indents remain black. + } // Monster Ability table hr + table:first-of-type{
11
diff --git a/public/javascripts/Admin/src/Admin.js b/public/javascripts/Admin/src/Admin.js @@ -293,18 +293,21 @@ function Admin(_, $, c3, turf) { } else if (milesLeft === 0) { popupContent = "<strong>" + regionName + "</strong>: " + compRate + - "\% Complete<br>Less than a mile left! Do you want to explore this area to find accessibility issues? " + - "<a href='" + url + "' class='region-selection-trigger' regionId='" + regionId + "'>Sure!</a>"; + "\% Complete<br>Less than a mile left! " + + "<a href='" + url + "' class='region-selection-trigger' regionId='" + regionId + "'>Click here</a>" + + "to help finish this neighborhood!"; } else if (milesLeft === 1) { var popupContent = "<strong>" + regionName + "</strong>: " + compRate + "\% Complete<br>Only " + - milesLeft + " mile left! Do you want to explore this area to find accessibility issues? " + - "<a href='" + url + "' class='region-selection-trigger' regionId='" + regionId + "'>Sure!</a>"; + milesLeft + " mile left! " + + "<a href='" + url + "' class='region-selection-trigger' regionId='" + regionId + "'>Click here</a>" + + "to help finish this neighborhood!"; } else { var popupContent = "<strong>" + regionName + "</strong>: " + compRate + "\% Complete<br>Only " + - milesLeft + " miles left! Do you want to explore this area to find accessibility issues? " + - "<a href='" + url + "' class='region-selection-trigger' regionId='" + regionId + "'>Sure!</a>"; + milesLeft + " miles left! " + + "<a href='" + url + "' class='region-selection-trigger' regionId='" + regionId + "'>Click here</a>" + + "to help finish this neighborhood!"; } break; }
3
diff --git a/articles/integrations/aws-api-gateway-2/part-3.md b/articles/integrations/aws-api-gateway-2/part-3.md @@ -40,14 +40,17 @@ If successful, you'll be redirected to the **Test Stage Editor**. Copy down the ![](/media/articles/integrations/aws-api-gateway-2/part-3/pt3-8.png) -## Summary - -In this tutorial, you have - -1. Imported an API for use with API Gateway -2. Created a custom authorizer to secure your API's endpoints, which required working with AWS IAM and Lambda -3. Secured your API with your custom authorizer - -<%= include('./_stepnav', { - prev: ["2. Create the Custom Authorizers", /integrations/aws-api-gateway-2/part-2"] -}) %> \ No newline at end of file +## Test Your Deployment + +You can test your deployment by making a `GET` call to the **Invoke URL** you copied in the previous step. + +```har +{ + "method": "GET", + "url": "https://YOUR_INVOKE_URL/pets", + "headers": [{ + "name": "Authorization", + "value": "Bearer TOKEN" + }] +} +``` \ No newline at end of file
2