code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/js/templates/modals/editListing/editListing.html b/js/templates/modals/editListing/editListing.html <div class="contentBox padMd clrP clrBr clrSh3"> <div class="flexHRight flexVCent gutterH"> - <a class="txU js-viewListing js-viewListingWrap <% if (ob.createMode) print('hide') %>"><%= ob.polyT('editListing.viewListingLink') %></a> + <%= ob.viewListingsT({ createMode: ob.createMode }) %> <a class="btn clrP clrBAttGrad clrBrDec1 clrTOnEmph js-save"><%= ob.polyT('settings.btnSave') %></a> </div> </div>
4
diff --git a/web-sourcecode/src/components/SumaClient.vue b/web-sourcecode/src/components/SumaClient.vue @@ -276,7 +276,6 @@ export default { this.activityvaluesmulti = []; this.countNumber = 1; document.getElementById('countsform').scrollTop = 0; - document.getElementById('countsform').documentElement.scrollTop = 0; this.requiredFieldsCheck(); }, sendCounts: function(syncObj, totals) {
3
diff --git a/lib/models/transaction.js b/lib/models/transaction.js @@ -93,7 +93,8 @@ TransactionSchema.statics.addTransactions = function(params){ wallets: wallets } }, - upsert: true + upsert: true, + forceServerObjectId: true } }; cb(null, op); @@ -146,7 +147,8 @@ TransactionSchema.statics.mintCoins = async function (params) { wallets: wallets } }, - upsert: true + upsert: true, + forceServerObjectId: true } }; mintOps.push(op);
12
diff --git a/src/Output.js b/src/Output.js @@ -198,11 +198,11 @@ export class Output extends EventEmitter { * [MIDI messages]{@link https://www.midi.org/specifications/item/table-1-summary-of-midi-message} * from the MIDI Manufacturers Association. * - * @param status {Number} The MIDI status byte of the message (128-255). + * @param status {Number} The MIDI status byte of the message (integer between 128-255). * - * @param [data=[]] {Array} An array of unsigned integers for the message. The number of data + * @param [data=[]] {number[]} An array of unsigned integers for the message. The number of data * bytes varies depending on the status byte. It is perfectly legal to send no data for some - * message types (use undefined or an empty array in this case). Each byte must be between 0 and + * message types (use `undefined` or an empty array in this case). Each byte must be between 0 and * 255. * * @param {Object} [options={}] @@ -242,12 +242,19 @@ export class Output extends EventEmitter { */ send(status, data = [], options= {}) { - /* START.VALIDATION */ if (!Array.isArray(data)) data = [data]; + /* START.VALIDATION */ + if (!(parseInt(status) >= 128 && parseInt(status) <= 255)) { + throw new RangeError("The status must be an integer between 128 and 255."); + } + data.map(value => { value = parseInt(value); - if (isNaN(value)) throw new TypeError("Data cannot be NaN."); + if (isNaN(value)) throw new TypeError("Data bytes must be integers."); + if (!(parseInt(value) >= 0 && parseInt(status) <= 255)) { + throw new RangeError("The data bytes must be integers between 0 and 255."); + } return value; }); /* END.VALIDATION */
7
diff --git a/token-metadata/0x06FF1a3B08b63E3b2f98A5124bFC22Dc0AE654d3/metadata.json b/token-metadata/0x06FF1a3B08b63E3b2f98A5124bFC22Dc0AE654d3/metadata.json "symbol": "KASSIAHOTEL", "address": "0x06FF1a3B08b63E3b2f98A5124bFC22Dc0AE654d3", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/userscript.user.js b/userscript.user.js @@ -9999,7 +9999,7 @@ var $$IMU_EXPORT$$; }, redirect: { name: "Enable redirection", - description: "Redirect images opened in their own tab", + description: "Automatically redirect media opened in their own tab to their larger/original versions", category: "redirection" }, redirect_history: {
7
diff --git a/aura-impl/src/main/resources/aura/locker/SecureElement.js b/aura-impl/src/main/resources/aura/locker/SecureElement.js @@ -1858,6 +1858,10 @@ SecureElement.metadata = { "onsuspend": EVENT, "ontimeupdate": EVENT, "ontoggle": EVENT, + "ontouchcancel": EVENT, + "ontouchend": EVENT, + "ontouchmove": EVENT, + "ontouchstart": EVENT, "onvolumechange": EVENT, "onwaiting": EVENT, "style": DEFAULT,
11
diff --git a/src/components/common/TmSessionWelcome.vue b/src/components/common/TmSessionWelcome.vue @@ -80,7 +80,10 @@ export default { methods: { setState(value) { if (!navigator.userAgent.includes(`Chrome`)) { - alert(`Please use Chrome or Brave.`) + this.$store.commit(`notifyError`, { + title: ``, + body: `Please use Chrome or Brave.` + }) return } else { this.$store.commit(`setSessionModalView`, value)
14
diff --git a/bin/calculate_carry_over_allowance_for_all_users.js b/bin/calculate_carry_over_allowance_for_all_users.js const Promise = require('bluebird'), + moment = require('moment'), models = require('../lib/model/db'); const - YEAR_FROM = '2017', - YEAR_TO = '2018'; + YEAR_FROM = '2018', + YEAR_TO = '2019'; /* * 1. Get all users @@ -26,13 +27,14 @@ models.User .then(users => Promise.map( users, user => { - return user - .reload_with_leave_details({YEAR_FROM}) - .then( user => user.promise_number_of_days_available_in_allowance(YEAR_FROM) ) - .then(remainer => { + let carryOver; + return Promise.resolve(user.getCompany().then(c => carryOver = c.carry_over)) + .then(() => user.reload_with_leave_details({YEAR_FROM})) + .then(user => user.promise_allowance({year:moment.utc(YEAR_FROM, 'YYYY')})) + .then(allowance => { return user.promise_to_update_carried_over_allowance({ year : YEAR_TO, - carried_over_allowance : remainer, + carried_over_allowance : Math.min(allowance.number_of_days_available_in_allowance, carryOver), }); }) .then(() => Promise.resolve(console.log('Done with user ' + user.id)));
1
diff --git a/.vscode/settings.json b/.vscode/settings.json "files.exclude": { "**/.git": true, "**/coverage": true - }, - "eslint.options": { - "configFile": "/Users/mmaciorowski/Documents/Projekty/JS/carbon/.eslintrc" - }, - "editor.tabSize": 2, - "editor.detectIndentation": false, + } } \ No newline at end of file
13
diff --git a/src/components/dashboard/Dashboard.js b/src/components/dashboard/Dashboard.js @@ -364,29 +364,24 @@ const Dashboard = props => { /** * rerender on screen size change */ - const handleResize = useCallback( - debounce(() => { + const _handleResize = useCallback(() => { setUpdate(Date.now()) calculateHeaderLayoutSizes() - }, 100), - [setUpdate], - ) + }, [setUpdate]) - // const nextFeed = x => console.log('end reached', { x }) - const nextFeed = useCallback( - debounce( + const _nextFeed = useCallback( ({ distanceFromEnd }) => { if (distanceFromEnd > 0 && feedRef.current.length > 0) { log.debug('getNextFeed called', feedRef.current.length, { distanceFromEnd }) return getFeedPage() } }, - 100, - { leading: false }, //this delay seems to solve error from dexie about indexeddb transaction - ), [getFeedPage], ) + const handleResize = useDebouncedCallback(_handleResize, 100) + const nextFeed = useDebouncedCallback(_nextFeed, 100) + const initDashboard = async () => { await handleFeedEvent() handleDeleteRedirect() @@ -636,29 +631,33 @@ const Dashboard = props => { const goToProfile = useOnPress(() => screenProps.push('Profile'), [screenProps]) - const handleScrollEnd = useCallback( - ({ nativeEvent }) => { - fireEvent(SCROLL_FEED) + const dispatchScrollEvent = useDebouncedCallback(() => fireEvent(SCROLL_FEED), 250) + + const scrollData = useMemo(() => { const minScrollRequired = 150 - const scrollPosition = nativeEvent.contentOffset.y const minScrollRequiredISH = headerLarge ? minScrollRequired : minScrollRequired * 2 - const scrollPositionISH = headerLarge ? scrollPosition : scrollPosition + minScrollRequired + const scrollPositionGap = headerLarge ? 0 : minScrollRequired const newsCondition = activeTab === FeedCategories.News && feedRef.current.length > 3 + const isFeedSizeEnough = feedRef.current.length > 10 || newsCondition - if ((feedRef.current.length > 10 || newsCondition) && scrollPositionISH > minScrollRequiredISH) { - if (headerLarge) { - setHeaderLarge(false) - } - } else { - if (!headerLarge) { - setHeaderLarge(true) - } - } + return { minScrollRequiredISH, scrollPositionGap, isFeedSizeEnough } + }, [headerLarge, activeTab]) + + const handleScrollEnd = useCallback( + ({ nativeEvent }) => { + const scrollPosition = nativeEvent.contentOffset.y + const { minScrollRequiredISH, scrollPositionGap, isFeedSizeEnough } = scrollData + const scrollPositionISH = scrollPosition + scrollPositionGap + + setHeaderLarge(isFeedSizeEnough && scrollPositionISH > minScrollRequiredISH) }, - [headerLarge, setHeaderLarge, activeTab], + [scrollData, setHeaderLarge], ) - const handleScrollEndDebounced = useDebouncedCallback(handleScrollEnd, 250) + const handleScroll = useCallback(() => { + dispatchScrollEvent() + handleScrollEnd() + }, [dispatchScrollEvent, handleScrollEnd]) const calculateFontSize = useMemo( () => ({ @@ -779,7 +778,7 @@ const Dashboard = props => { onEndReachedThreshold={0.8} windowSize={10} // Determines the maximum number of items rendered outside of the visible area onScrollEnd={handleScrollEnd} - onScroll={handleScrollEndDebounced} + onScroll={handleScroll} headerLarge={headerLarge} scrollEventThrottle={300} />
0
diff --git a/src/components/Control.jsx b/src/components/Control.jsx @@ -15,6 +15,7 @@ function Control(props) { const typeRefs = { ammo: useRef(null), map: useRef(null), + lootTier: useRef(null), }; const handleConnectClick = (event) => { @@ -50,6 +51,10 @@ function Control(props) { handleViewChange('ammo', typeRefs['ammo'].current.value); }; + const handleLootTierChange = () => { + handleViewChange('loot-tier', typeRefs['lootTier'].current.value); + }; + const handleViewChange = (view, eventOrValue) => { let value = eventOrValue.target?.value || eventOrValue; @@ -115,11 +120,26 @@ function Control(props) { className = {'control-section'} > <span>View loot tiers:</span> + <select + name="loot-tier" + onChange={handleLootTierChange} + ref = {typeRefs['lootTier']} + > + <option + value = 'barter-items' + > + {'Barter items'} + </option> + <option + value = 'keys' + > + {'Keys'} + </option> + </select> <button - className = {'full-width'} - onClick = {handleViewChange.bind(this, 'loot-tier', 'barter')} + onClick = {handleLootTierChange} > - Barter items + Go </button> </div> <div className="info-wrapper">
11
diff --git a/README.md b/README.md @@ -15,7 +15,7 @@ You can import a theme into your styles using either LESS or SASS. LESS: -``` +```less @import "bootstrap/less/bootstrap.less"; @import "bootswatch/theme/variables.less"; @import "bootswatch/theme/bootswatch.less"; @@ -24,7 +24,7 @@ LESS: SASS: -``` +```sass @import "bootswatch/theme/variables"; @import "bootstrap-sass-official/assets/stylesheets/bootstrap"; @import "bootswatch/theme/bootswatch";
7
diff --git a/src/post/PostActionButtons.js b/src/post/PostActionButtons.js import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; +import { FormattedMessage } from 'react-intl'; import numeral from 'numeral'; import LikeButton from './actionButtons/LikeButton'; import PayoutLabel from './actionButtons/PayoutLabel'; @@ -92,25 +93,13 @@ export default class PostActionButtons extends Component { </a> {' '} - {(post.children > 0 && isCardLayout) && - <a onClick={e => this.handleCommentsTextClick(e)}> - {numeral(post.children).format('0,0')} - <span className="hidden-xs"> Comment - {post.children > 1 && 's'} - </span> - </a> - } - - {(!post.children && isCardLayout) && - <span className="hidden-xs">0 Comment</span> + {isCardLayout && + <span className="hidden-xs"><FormattedMessage id="comment" /></span> } {isListLayout && - <span> - {numeral(post.children).format('0,0')} - </span> + <span>{numeral(post.children).format('0,0')}</span> } - </li> <li>
2
diff --git a/src/content/developers/docs/transactions/index.md b/src/content/developers/docs/transactions/index.md @@ -131,9 +131,9 @@ Bob's account will be debited **-1.0042 ETH** Alice's account will be credited **+1.0 ETH** -The base fee will be burned **-0.003735 ETH** +The base fee will be burned **-0.00399 ETH** -Miner keeps the tip **+0.000197 ETH** +Miner keeps the tip **+0.000210 ETH** Gas is required for any smart contract interaction too.
7
diff --git a/ThirdParty.json b/ThirdParty.json "license": [ "MIT" ], - "version": "3.16.0", + "version": "3.16.2", "url": "https://www.npmjs.com/package/autolinker" }, { "license": [ "MIT" ], - "version": "0.2.2", + "version": "0.4.5", "url": "https://www.npmjs.com/package/ktx-parse" }, { "license": [ "MIT" ], - "version": "0.16.1", + "version": "0.18.1", "url": "https://www.npmjs.com/package/meshoptimizer" }, { "license": [ "MIT" ], - "version": "0.9.0", + "version": "0.12.0", "url": "https://www.npmjs.com/package/nosleep.js" }, { "license": [ "MIT" ], - "version": "1.0.11", + "version": "2.0.4", "url": "https://www.npmjs.com/package/pako", "notes": "pako is MIT, and its dependency zlib is attributed separately" }, "license": [ "BSD-3-Clause" ], - "version": "7.0.0", + "version": "7.1.2", "url": "https://www.npmjs.com/package/protobufjs" }, {
3
diff --git a/tooling/rollup/rollup-plugin-svg.js b/tooling/rollup/rollup-plugin-svg.js @@ -34,6 +34,15 @@ const drawIcon${name} = (props) => { } const svg = cachedNode.cloneNode(true); setAttributes(svg, props); + const title = props && props.title; + if (title) { + const titleTag = document.createElementNS( + 'http://www.w3.org/2000/svg', + 'title' + ); + titleTag.textContent = title; + svg.appendChild(titleTag); + } return svg; }
12
diff --git a/runner/src/main/java/com/codingame/gameengine/runner/Renderer.java b/runner/src/main/java/com/codingame/gameengine/runner/Renderer.java @@ -7,6 +7,7 @@ import java.net.JarURLConnection; import java.net.URISyntaxException; import java.net.URL; import java.nio.file.Files; +import java.nio.file.NoSuchFileException; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; @@ -115,6 +116,7 @@ class Renderer { jsonAssets.add("images", images); Path origAssetsPath = tmpdir.resolve("assets"); + try { Files.find(origAssetsPath, 100, (p, bfa) -> bfa.isRegularFile()).forEach(f -> { try { if (assetsPath != null) { @@ -133,6 +135,9 @@ class Renderer { e.printStackTrace(); } }); + } catch (NoSuchFileException e) { + System.out.println("Directory src/main/resources/view/assets not found."); + } out.print("export const assets = "); out.println(jsonAssets.toString());
8
diff --git a/lib/apollo/withData.js b/lib/apollo/withData.js @@ -38,9 +38,11 @@ export default ComposedComponent => { // Server-side we initialize a fresh apollo with all headers (including cookie) // and forward cookies from backend responses to the user const apollo = initApollo(undefined, ctx.req.headers, response => { - const cookie = response.headers.get('Set-Cookie') - if (cookie) { - ctx.res.set('Set-Cookie', cookie) + // headers.raw() is a node-fetch specific API and apparently the only way to get multiple cookies + // https://github.com/bitinn/node-fetch/issues/251 + const cookies = response.headers.raw()['set-cookie'] + if (cookies) { + ctx.res.set('Set-Cookie', cookies) } }) // Provide the `url` prop data in case a GraphQL query uses it
9
diff --git a/src/core/operations/RawInflate.mjs b/src/core/operations/RawInflate.mjs @@ -82,7 +82,6 @@ class RawInflate extends Operation { }), result = new Uint8Array(inflate.decompress()); - // This seems to be the easiest way... return result.buffer; }
2
diff --git a/test/common/tests.js b/test/common/tests.js const assert = require('assert') const stream = require('stream') const { join } = require('path') +const util = require('util') const ISOLATION_LEVELS = require('../../lib/isolationlevel') const BaseTransaction = require('../../lib/base/transaction') const versionHelper = require('./versionhelper') @@ -1262,7 +1263,12 @@ module.exports = (sql, driver) => { connectionTimeout: 1000, pool: { idleTimeoutMillis: 500 } }, (err) => { - assert.strictEqual((message ? (message.exec(err.message) != null) : (err instanceof sql.ConnectionPoolError)), true) + if (message) { + const match = message.exec(err.message) + assert.notStrictEqual(match, null, util.format('Expected timeout error message to match', message, 'but instead received error message:', err.message)) + } else { + assert.strictEqual(err instanceof sql.ConnectionPoolError, true, util.format('Expected timeout error to be an instance of ConnectionPoolError, but instead received an instance of', Object.getPrototypeOf(err), err)) + } conn.close() done() })
7
diff --git a/components/tabs/Tabs.js b/components/tabs/Tabs.js @@ -86,15 +86,21 @@ const factory = (Tab, TabContent, FontIcon) => { } updateArrows = () => { - const nav = this.navigationNode; + const idx = this.navigationNode.children.length - 2; + + if (idx >= 0) { + const scrollLeft = this.navigationNode.scrollLeft; + const nav = this.navigationNode.getBoundingClientRect(); + const lastLabel = this.navigationNode.children[idx].getBoundingClientRect(); + this.setState({ arrows: { - left: nav.scrollLeft > 0, - right: nav.scrollWidth > nav.clientWidth - && (nav.scrollLeft + nav.clientWidth) < nav.scrollWidth + left: scrollLeft > 0, + right: nav.right < (lastLabel.right - 5) } }); } + } scrollNavigation = (factor) => { const oldScrollLeft = this.navigationNode.scrollLeft;
1
diff --git a/src/TemplateWriter.js b/src/TemplateWriter.js @@ -166,7 +166,7 @@ TemplateWriter.prototype.write = async function() { usedTemplateContentTooEarlyMap.push(mapEntry); } else { return Promise.reject( - TemplateWriterWriteError( + new TemplateWriterWriteError( `Having trouble writing template: ${mapEntry.outputPath}`, e ) @@ -180,7 +180,7 @@ TemplateWriter.prototype.write = async function() { promises.push( this._writeTemplate(mapEntry).catch(function(e) { return Promise.reject( - TemplateWriterWriteError( + new TemplateWriterWriteError( `Having trouble writing template (second pass): ${mapEntry.outputPath}`, e )
1
diff --git a/docs/Air.md b/docs/Air.md @@ -100,7 +100,7 @@ If Low Fare Shop Async request has more results in cache, use this method to ret For fetching detailed fare rules after itinerary selection this method is used. **Returns**: `Promise` - +**See**: [Fare Rules](https://support.travelport.com/webhelp/uapi/Content/Air/Fare_Rules/Fare_Rules.htm) | Param | Type | Description | | --- | --- | --- | | segments | `Array<Segment>` | See `Segment` description [below](#segment). |
0
diff --git a/lib/node_modules/@stdlib/plot/sparklines/unicode/base/lib/defaults.js b/lib/node_modules/@stdlib/plot/sparklines/unicode/base/lib/defaults.js @@ -37,14 +37,17 @@ function defaults() { // Boolean indicating whether to re-render on a `change` event: out.autoRender = false; + // Data buffer size: + out.bufferSize = FLOAT64_MAX; + // Sparkline data: out.data = []; // Sparkline description: out.description = ''; - // Data buffer size: - out.bufferSize = FLOAT64_MAX; + // Data labels: + out.labels = []; // Maximum value of y-axis domain: out.yMax = null;
12
diff --git a/test/integration/offline.js b/test/integration/offline.js -/* global describe before context it */ - const { expect } = require('chai'); const ServerlessBuilder = require('../support/ServerlessBuilder'); const OfflineBuilder = require('../support/OfflineBuilder');
2
diff --git a/token-metadata/0x26946adA5eCb57f3A1F91605050Ce45c482C9Eb1/metadata.json b/token-metadata/0x26946adA5eCb57f3A1F91605050Ce45c482C9Eb1/metadata.json "symbol": "BSOV", "address": "0x26946adA5eCb57f3A1F91605050Ce45c482C9Eb1", "decimals": 8, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/package.json b/package.json "lingui-extract": "lingui extract", "lingui-compile": "lingui compile", "lingui": "lingui extract && lingui compile", - "postinstall": "patch-package && cp patches/realm+1.3.0-package-patched.json node_modules/realm-web/package.json" + "postinstall": "patch-package && cp patches/realm+1.3.0-package-patched.json node_modules/realm-web/package.json", + "code-push:dev": "appcenter codepush release-react -a GoodDollar/GoodDollar-Android-development -d Staging", + "code-push:stage": "appcenter codepush release-react -a GoodDollar/GoodDollar-Android-staging -d Staging", + "code-push:prod": "appcenter codepush release-react -a GoodDollar/GoodDollar-Android-production -d Production" }, "repository": { "type": "git",
0
diff --git a/README.md b/README.md @@ -184,6 +184,7 @@ TestCafe developers and community members made these plugins: * [Nightmare headless provider](https://github.com/ryx/testcafe-browser-provider-nightmare) (by [@ryx](https://github.com/ryx)) * [fbsimctl iOS emulator](https://github.com/Ents24/testcafe-browser-provider-fbsimctl) (by [@ents24](https://github.com/Ents24)) * [Electron](https://github.com/DevExpress/testcafe-browser-provider-electron) (by [@AndreyBelym](https://github.com/AndreyBelym)) + * [Puppeteer](https://github.com/jdobosz/testcafe-browser-provider-puppeteer) (by [@jdobosz](https://github.com/jdobosz)) * **Framework-Specific Selectors**<br/> Work with page elements in a way that is native to your framework.
0
diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js @@ -121,12 +121,7 @@ class BaseTextInput extends Component { } onFocus(event) { - if (this.props.disabled) { - return; - } - if (this.props.onFocus) { - this.props.onFocus(event); - } + if (this.props.onFocus) { this.props.onFocus(event); } this.setState({isFocused: true}); this.activateLabel(); } @@ -306,7 +301,6 @@ class BaseTextInput extends Component { keyboardType={getSecureEntryKeyboardType(this.props.keyboardType, this.props.secureTextEntry, this.state.passwordHidden)} value={this.state.value} selection={this.state.selection} - editable={!this.props.disabled} // FormSubmit Enter key handler does not have access to direct props. // `dataset.submitOnEnter` is used to indicate that pressing Enter on this input should call the submit callback.
13
diff --git a/extension/data/styles/toolbox.css b/extension/data/styles/toolbox.css @@ -159,7 +159,7 @@ div#tb-context-menu #tb-context-header { } .mod-toolbox-rd .tb-settings .tb-window-wrapper { - width: 845px; + max-width: 845px; } .mod-toolbox-rd .tb-window-wrapper-two { @@ -250,7 +250,7 @@ div#tb-context-menu #tb-context-header { .mod-toolbox-rd .tb-settings .tb-window-tabs-wrapper { display: inline-block; vertical-align: top; - width: 705px; + width: calc(100% - 135px); } .mod-toolbox-rd .tb-window-content input {
11
diff --git a/src/sdk/conference/conference.js b/src/sdk/conference/conference.js self.signaling.on('text', function(data) { var evt = new Woogeen.MessageEvent({ type: 'message-received', - msg: data.message + msg: data.msg.message }); self.dispatchEvent(evt); });
1
diff --git a/src/components/AnnotationTabs/AnnotationTabs.js b/src/components/AnnotationTabs/AnnotationTabs.js @@ -92,6 +92,8 @@ export const AnnotationTabs = observer(({ if (showPredictions) list.push(...as.predictions); if (showAnnotations) list.push(...as.annotations); + const tabsDisabled = !showPredictions && !showAnnotations && !allowViewAll && !allowCreateNew; + useEffect(() => { if (selectedRef.current) { const list = listRef.current; @@ -105,7 +107,7 @@ export const AnnotationTabs = observer(({ } }, [store.annotationStore.selected, selectedRef, listRef]); - return visible ? ( + return (visible && !tabsDisabled) ? ( <Block name="annotation-tabs" mod={{ viewAll: allowViewAll, addNew: allowCreateNew }}
11
diff --git a/CHANGES.md b/CHANGES.md @@ -12,6 +12,8 @@ Change Log * Added `Math.log2` to compute the base 2 logarithm of a number. * Added 'PeliasGeocoderService', which provides geocoding via a [Pelias](https://pelias.io) server. * Added `GeocodeType` enum and use it as an optional parameter to all `GeocoderService` instances to differentiate between autocomplete and search requests. +* Improved `MapboxImageryProvider` performance by 300% via `tiles.mapbox.com` subdomain switching. [#6426](https://github.com/AnalyticalGraphicsInc/cesium/issues/6426) +* Added more ParticleSystem Sandcastle examples for rocket and comet tails and weather. [#6375](https://github.com/AnalyticalGraphicsInc/cesium/pull/6375) ##### Fixes :wrench: * Fixed bugs in `TimeIntervalCollection.removeInterval`. [#6418](https://github.com/AnalyticalGraphicsInc/cesium/pull/6418). @@ -22,11 +24,6 @@ Change Log * Fix Firefox WebGL console warnings. [#5912](https://github.com/AnalyticalGraphicsInc/cesium/issues/5912) * Fix parsing Cesium.js in older browsers that do not support all TypedArray types. [#6396](https://github.com/AnalyticalGraphicsInc/cesium/pull/6396) * Fix flicker when adding, removing, or modifiying entities. [#3945](https://github.com/AnalyticalGraphicsInc/cesium/issues/3945) -##### Additions :tada: -* Improved `MapboxImageryProvider` performance by 300% via `tiles.mapbox.com` subdomain switching. [#6426](https://github.com/AnalyticalGraphicsInc/cesium/issues/6426) - -##### Additions :tada: -* Added more ParticleSystem Sandcastle examples for rocket and comet tails and weather. [#6375](https://github.com/AnalyticalGraphicsInc/cesium/pull/6375) ### 1.44 - 2018-04-02
3
diff --git a/client/app/vps/vps-task.service.js b/client/app/vps/vps-task.service.js @@ -9,6 +9,16 @@ class VpsTaskService { this.firstCall = true; } + /* + * subscribe : reset values and get pending tasks + * + */ + subscribe (serviceName) { + this.tasks = []; + this.firstCall = true; + this.getTasks(serviceName); + } + /* * getTasks : retrieve task in progress * @@ -25,6 +35,7 @@ class VpsTaskService { */ handleTasks (serviceName, tasks) { _.forEach(tasks, task => { + this.tasks = tasks; this.manageMessage(task); }); // refresh while there's task in progress
12
diff --git a/lib/utilities.js b/lib/utilities.js @@ -575,7 +575,7 @@ export function arrayBuffertoBase64(buffer) { return binary */ // User fixc for UTF characers on Mac and Linux hosts - return new TextDecoder().decode(xhr.response) + return new TextDecoder().decode(buffer) } export function quotedAttackName(item) {
14
diff --git a/assets/js/googlesitekit/modules/datastore/modules.js b/assets/js/googlesitekit/modules/datastore/modules.js @@ -387,11 +387,12 @@ const baseActions = { const registry = yield Data.commonActions.getRegistry(); - // As we can specify a custom checkRequirements function here, we're invalidating the resolvers for activation checks. - yield registry + // As we can specify a custom checkRequirements function here, we're + // invalidating the resolvers for activation checks. + registry .dispatch( CORE_MODULES ) .invalidateResolution( 'canActivateModule', [ slug ] ); - yield registry + registry .dispatch( CORE_MODULES ) .invalidateResolution( 'getCheckRequirementsError', [ slug ] ); }
2
diff --git a/test/test-0.10.3.js b/test/test-0.10.3.js @@ -75,3 +75,17 @@ describe('#230 #249 cookies manipulation', (report, done) => { }) }) + +describe('#254 IOS fs.stat lastModified date correction', (report, done) => { + + let path = dirs.DocumentDir + '/temp' + Date.now() + fs.createFile(path, 'hello', 'utf8' ) + .then(() => fs.stat(path)) + .then((stat) => { + console.log(stat) + let p = stat.lastModified / Date.now() + report(<Assert key="date is correct" expect={true} actual={ p< 1.05 && p > 0.95}/>) + done() + }) + +})
0
diff --git a/packages/2018-neighborhood-development/src/state/explore-urban-campsite-sweeps/explore-urban-campsite-sweeps.test.js b/packages/2018-neighborhood-development/src/state/explore-urban-campsite-sweeps/explore-urban-campsite-sweeps.test.js @@ -67,28 +67,34 @@ describe('explore-urban-campsite-sweeps', () => { pending: true, error: null, data: null, + timer: 0, + max_timer: 18, }); }); it('should handle API_SUCCESS', () => { - expect(reducer({ pending: true, error: null, data: null }, { + expect(reducer({ pending: true, error: null, data: null, timer: 0, max_timer: 18 }, { type: actions.API_SUCCESS, payload, })).to.eql({ pending: false, data: payload, error: null, + timer: 0, + max_timer: 18, }); }); it('should handle API_ERROR', () => { - expect(reducer({ pending: true, error: null, data: null }, { + expect(reducer({ pending: true, error: null, data: null, timer: 0, max_timer: 18 }, { type: actions.API_ERROR, payload, })).to.eql({ data: null, pending: false, error: payload, + timer: 0, + max_timer: 18, }); }); });
3
diff --git a/userscript.user.js b/userscript.user.js @@ -33175,17 +33175,25 @@ if (domain_nosub === "lystit.com" && domain.match(/cdn[a-z]?\.lystit\.com/)) { // https://hayabusa.io/abema/programs/12-20_s0_p25/thumb002.png // https://hayabusa.io/abema/series/26-24agzukmebpc/thumb.v1557970510.png // https://hayabusa.io/abema/series/26-24agzukmebpc/thumb.png + // https://hayabusa.io/makuake/upload/temporary/2926/detail/detail_2926_1543415491.jpeg?width=640&quality=95&format=jpeg&ttl=31536000&force + // https://hayabusa.io/makuake/upload/temporary/2926/detail/detail_2926_1543415491.jpeg?q=100&quality=100 + // https://hayabusa.io/openrec-image/thumbnails/12009/1200829/origin/6/captured_5511.q95.w350.ttl604800.headercache300.jpeg?q=100&quality=100 + // https://hayabusa.io/openrec-image/thumbnails/12009/1200829/origin/6/captured_5511.jpeg?q=100&quality=100 + // https://hayabusa.io/makuake/upload/project/4248/main_4248.fit-scale.jpeg?q=100&quality=100 + // https://hayabusa.io/makuake/upload/project/4248/main_4248.jpeg?q=100&quality=100 // thanks again to fireattack: // https://hayabusa.io/abema/programs/386-48_s0_p25/thumb001.webp // https://hayabusa.io/abema/programs/386-48_s0_p25/thumb001.q100.webp -- is the same as: // https://hayabusa.io/abema/programs/386-48_s0_p25/thumb001.webp?q=100 return src - .replace(/(\/(?:thumb)?[0-9]*)(?:\.[a-z]+[0-9]+)*(\.[^/.]*)(?:[?#].*)?$/, "$1$2") + .replace(/(\/[^/.]*)(?:\.[-a-z]+[0-9]*)*(\.[^/.]*)(?:[?#].*)?$/, "$1$2") //.replace(/(\/adcross\/.*\/[-0-9a-f]{25,})(\.[^/.]*?)(?:[?#].*)?$/, "$1$2") .replace(/\?[whq]=[0-9]+(?:&(.*))?$/, "?$1") .replace(/&[whq]=[0-9]+(&.*)?$/, "$1") + .replace(/\?(?:width|height|quality)=[0-9]+(?:&(.*))?$/, "?$1") + .replace(/&(?:width|height|quality)=[0-9]+(&.*)?$/, "$1") .replace(/\?$/, "") - .replace(/(\.(?:jpg|png|webp|gif))(?:\?.*)?/, "$1?q=100"); + .replace(/(\.(?:jpe?g|png|webp|gif))(?:\?.*)?/, "$1?q=100&quality=100"); } if (domain === "s.dou.ua") { @@ -34733,6 +34741,14 @@ if (domain_nosub === "lystit.com" && domain.match(/cdn[a-z]?\.lystit\.com/)) { "$1$2$3"); } + if (domain === "dspvdh6gst59b.cloudfront.net") { + // https://dspvdh6gst59b.cloudfront.net/https%3A%2F%2Fhayabusa.io%2Fmakuake%2Fupload%2Fproject%2F3890%2Fdetail_3890_1519727224.png?w=630 + // https://hayabusa.io/makuake/upload/project/3890/detail_3890_1519727224.png?q=100&quality=100 + newsrc = src.replace(/^[a-z]+:\/\/[^/]*\/(http.*?)(?:[?#].*)?$/, "$1"); + if (newsrc !== src) + return decodeuri_ifneeded(newsrc); + } +
7
diff --git a/js/webcomponents/bisweb_filetreepanel.js b/js/webcomponents/bisweb_filetreepanel.js @@ -446,7 +446,6 @@ class FileTreePanel extends HTMLElement { }; listContainer.on('select_node.jstree', (event, data) => { - console.log('select_node', event, data); $('.bisweb-elements-menu').find('select').prop('disabled', ''); this.currentlySelectedNode = data.node; @@ -667,16 +666,16 @@ class FileTreePanel extends HTMLElement { changeTagSelectMenu(menu, node) { let defaultSelection = node.original.tag || "none"; - console.log('tag select', menu); //clear selected options let options = menu.find('option'); - console.log('options', options); for (let i = 0; i < options.length; i++) { options[i].removeAttribute('selected'); } - menu.find(`option[value=${defaultSelection}]`).attr('selected', 'selected'); + menu.find(`option[value=${defaultSelection}]`).prop('selected', true); + //menu.html(defaultSelection); + console.log('default selection', defaultSelection); } }
1
diff --git a/test/externalTests/plugins/testCommon.js b/test/externalTests/plugins/testCommon.js @@ -251,10 +251,6 @@ function inject (bot) { bot.on('message', joinHandler) const child = spawn('node', [file, 'localhost', `${bot.test.port}`]) - child.on('close', (code) => { - console.log('close requested ' + code) - cb() - }) // Useful to debug child processes: child.stdout.on('data', (data) => { console.log(`${data}`) }) @@ -262,12 +258,17 @@ function inject (bot) { const timeout = setTimeout(() => { console.log('Timeout, test took too long') - closeExample() + closeExample(new Error('Timeout, test took too long')) }, 10000) - function closeExample () { + function closeExample (err) { if (timeout) clearTimeout(timeout) console.log('kill process ' + child.pid) + + child.once('close', (code) => { + console.log('close requested ' + code) + cb(err) + }) process.kill(child.pid, 'SIGTERM') } }
7
diff --git a/assets/sass/components/global/_googlesitekit-data-block.scss b/assets/sass/components/global/_googlesitekit-data-block.scss .googlesitekit-data-block--is-gathering-data { cursor: auto; + + &.googlesitekit-data-block--selected { + + // FIXME: The bar still goes blue when navigating away, during the + // transition/fade. + &::before { + background-color: $c-jumbo; + opacity: 0.6; + } + } } }
1
diff --git a/tests/phpunit/integration/Core/Dashboard_Sharing/Active_ConsumersTest.php b/tests/phpunit/integration/Core/Dashboard_Sharing/Active_ConsumersTest.php @@ -41,34 +41,28 @@ class Active_ConsumersTest extends TestCase { // Setting the value to a non-array will result in an empty array. $this->set_value( false ); - $this->assertEquals( array(), $this->get_value() ); $this->set_value( 123 ); - $this->assertEquals( array(), $this->get_value() ); // Setting the value to a non-associative array will result in an empty array. $this->set_value( array( 'a', 'b', 'c' ) ); - $this->assertEquals( array(), $this->get_value() ); // Setting the value to an associative array but with non-integer keys // will result in an empty array. $this->set_value( array( 'a' => array( 'x', 'y', 'z' ) ) ); - $this->assertEquals( array(), $this->get_value() ); // Setting the value to an associative array with integer keys but a non-array // value will result in an empty array. $this->set_value( array( 1 => 'a' ) ); - $this->assertEquals( array(), $this->get_value() ); // Setting the value to an associative array with integer keys but array // with non-string values as the value will result in an empty array. $this->set_value( array( 1 => array( 2, 3, 4 ) ) ); - $this->assertEquals( array(), $this->get_value() ); // Setting the value to an associative array with integer keys and array
2
diff --git a/programs/generateLicenseList.js b/programs/generateLicenseList.js @@ -11,13 +11,27 @@ function get(url, callback) { } } -function downloadToStream(project, url) { - if (!url || url.indexOf('raw') === -1) { +function downloadToStream(project, url, licenseId, originalLicenseUrl) { + if (!url) { return Promise.resolve({project, stream: null, url}); } + // handle projects that declare a license but only with their SPDX id in package.json + // and don't provide the license text in their repo + // SPDX provides a repo with all licenses at https://github.com/spdx/license-list + if (url.indexOf('raw') === -1) { + const SPDXUrl = `https://github.com/spdx/license-list/raw/master/${licenseId}.txt`; + return downloadToStream(project, SPDXUrl, licenseId, url); + + } + return new Promise((resolve, reject) => { const callback = (response) => { + // we want the original license to be printed. if the license + // was retrieved from the SDPX repo we get the original url + // as the last parameter + url = originalLicenseUrl || url; + // handle redirects if (response.statusCode >= 300 && response.statusCode < 400) { const location = response.headers.location; @@ -71,7 +85,7 @@ crawler.dumpLicenses({start: ['.']}, (error, res) => { let output = fs.createWriteStream("LicensesOfDependencies.txt"); let streams = Object.keys(res) - .map(project => downloadToStream(project, res[project].licenseUrl)); + .map(project => downloadToStream(project, res[project].licenseUrl, res[project].licenses)); streamCollector(streams, 0, output); }); \ No newline at end of file
9
diff --git a/services/importer/spec/unit/downloader_spec.rb b/services/importer/spec/unit/downloader_spec.rb @@ -25,6 +25,10 @@ describe Downloader do @user = FactoryGirl.create(:carto_user) end + after do + @user.destroy + end + after(:each) do Typhoeus::Expectation.clear end
2
diff --git a/core/algorithm-queue/lib/jobs/producer.js b/core/algorithm-queue/lib/jobs/producer.js @@ -50,7 +50,7 @@ class JobProducer { log.info(`${Events.FAILED} ${data.jobId}, error: ${data.error}`, { component: componentName.JOBS_PRODUCER, jobId: data.jobId, status: Events.FAILED }); }); this._producer.on(Events.STUCK, async (job) => { - const { jobId, taskId, nodeName, retry } = job.options; + const { jobId, taskId, nodeName, batchIndex, retry } = job.options; let err; let status; const maxAttempts = (retry && retry.limit) || MAX_JOB_ATTEMPTS; @@ -69,7 +69,7 @@ class JobProducer { } const error = `node ${nodeName} is in ${err}, attempts: ${attempts}/${maxAttempts}`; log.warning(`${error} ${job.jobId} `, { component: componentName.JOBS_PRODUCER, jobId }); - await this.etcd.jobs.tasks.set({ jobId, taskId, nodeName, status, error, retries: attempts }); + await this.etcd.jobs.tasks.set({ jobId, taskId, nodeName, batchIndex, status, error, retries: attempts }); }); }
0
diff --git a/bin/rekit.js b/bin/rekit.js @@ -147,6 +147,16 @@ mvCmd.addArgument('target', { help: 'The target element to reach.', }); +rekit.core.plugin.getPlugins('cli.defineArgs').forEach(p => { + p.cli.defineArgs({ + parser, + subparsers, + addCmd, + rmCmd, + mvCmd, + }); +}); + const args = parser.parseArgs(); // Convert aliases
11
diff --git a/src/patterns/components/toggle/base.hbs b/src/patterns/components/toggle/base.hbs @@ -4,7 +4,7 @@ order: 1 --- <div data-sprk-toggle="container"> <a class="sprk-b-TypeBodyThree sprk-b-Link sprk-b-Link--standalone" data-sprk-toggle="trigger" href="#"> - <svg class="sprk-c-Icon sprk-c-Icon--large sprk-u-mrs" data-sprk-toggle="icon" viewBox="0 0 448 512"> + <svg class="sprk-c-Icon sprk-u-mrs" data-sprk-toggle="icon" viewBox="0 0 448 512"> <use xlink:href="#chevron-down"></use> </svg> My Disclaimer
3
diff --git a/docs/quick-start.md b/docs/quick-start.md @@ -77,7 +77,6 @@ backend: name: github repo: owner-name/repo-name # Path to your Github repository branch: master # Branch to update - site_domain: site-name.netlify.com # Your Netlify site address if different from host ``` This names GitHub as the authentication provider, points to the repo location on github.com, and declares the branch where you want to merge changes. If you leave out the `branch` declaration, it will default to `master`.
2
diff --git a/plugins/block_storage/app/javascript/app/components/volumes/new.jsx b/plugins/block_storage/app/javascript/app/components/volumes/new.jsx import { Modal, Button } from 'react-bootstrap'; import { Form } from 'lib/elektra-form'; -const FormBody = ({values, availabilityZones, images, volumes}) => +const defaultVolumeType="premium_ssd" + +const FormBody = ({values, availabilityZones, images, volumes, typeDescription, setTypesDescription}) => <Modal.Body> <Form.Errors/> <Form.ElementHorizontal label='Name' name="name" required> @@ -57,7 +59,8 @@ const FormBody = ({values, availabilityZones, images, volumes}) => <Form.Input elementType='select' className="select required form-control" - defaultValue="vmware" + defaultValue={defaultVolumeType} + onChange={() => setTypesDescription(event.target.value)} name='volume_type'> { volumes.types.map((vt,index) => { return <option value={vt.name} key={index}> {vt.name} </option>; @@ -66,6 +69,20 @@ const FormBody = ({values, availabilityZones, images, volumes}) => } </Form.ElementHorizontal> + <div className="row"> + <div className="col-md-4"></div> + <div className="col-md-8"> + { typeDescription != null ? + <p className="help-block"> + <i className="fa fa-info-circle"></i> + {typeDescription} + </p> + : + null + } + </div> + </div> + <Form.ElementHorizontal label='Availability Zone' required name="availability_zone"> { availabilityZones.isFetching ? <span className='spinner'/> @@ -89,7 +106,10 @@ const FormBody = ({values, availabilityZones, images, volumes}) => </Modal.Body> export default class NewVolumeForm extends React.Component { - state = { show: true } + state = { + show: true, + typeDescription: null + } componentDidMount() { this.loadDependencies(this.props) @@ -97,6 +117,7 @@ export default class NewVolumeForm extends React.Component { UNSAFE_componentWillReceiveProps(nextProps) { this.loadDependencies(nextProps) + this.setTypesDescription(defaultVolumeType) } loadDependencies = (props) => { @@ -123,6 +144,17 @@ export default class NewVolumeForm extends React.Component { return this.props.handleSubmit(values).then(() => this.close()); } + setTypesDescription = (name) => { + if (name && this.props.volumes.types) { + this.props.volumes.types.map((vt,index) => { + if (vt.name === name) { + //console.log(vt.description) + this.setState({typeDescription: vt.description}) + } + }) + } + } + render(){ const initialValues = {} return ( @@ -147,6 +179,8 @@ export default class NewVolumeForm extends React.Component { availabilityZones={this.props.availabilityZones} images={this.props.images} volumes={this.props.volumes} + typeDescription={this.state.typeDescription} + setTypesDescription={this.setTypesDescription} /> <Modal.Footer>
12
diff --git a/token-metadata/0x4156D3342D5c385a87D264F90653733592000581/metadata.json b/token-metadata/0x4156D3342D5c385a87D264F90653733592000581/metadata.json "symbol": "SALT", "address": "0x4156D3342D5c385a87D264F90653733592000581", "decimals": 8, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/lib/assets/javascripts/locale/en.json b/lib/assets/javascripts/locale/en.json }, "area-of-influence": { "title": "Create Travel or Distance Buffers", - "description": "Create travel or distance buffers creates polygons according to the parameters set by the user.", + "description": "Create Travel or Distance Buffers creates polygons according to the parameters set by the user.", "the-geom": "This column was updated to show the travel or distance buffers requested." }, "aggregate-intersection": { }, "filter-by-node-column": { "title": "Link Second Layer", - "description": "Link Second layer allows you to filter the data in your layer by propagating the filters in the attached layer. Now if you filter on widgets added to the first node, the results in the second node would be also filtered." + "description": "Link Second Layer allows you to filter the data in your layer by propagating the filters in the attached layer. Now if you filter on widgets added to the first node, the results in the second node would be also filtered." }, "spatial-markov-trend": { "title": "Predict Trends and Volatility",
1
diff --git a/assets/js/util/date-range.js b/assets/js/util/date-range.js @@ -64,24 +64,24 @@ export function getCurrentDateRangeSlug() { */ export function getAvailableDateRanges() { /* translators: %s: Number of days to request data. */ - const template = __( 'Last %s days', 'google-site-kit' ); + const format = __( 'Last %s days', 'google-site-kit' ); return { 'last-7-days': { slug: 'last-7-days', - label: sprintf( template, 7 ), + label: sprintf( format, 7 ), }, 'last-14-days': { slug: 'last-14-days', - label: sprintf( template, 14 ), + label: sprintf( format, 14 ), }, 'last-28-days': { slug: 'last-28-days', - label: sprintf( template, 28 ), + label: sprintf( format, 28 ), }, 'last-90-days': { slug: 'last-90-days', - label: sprintf( template, 90 ), + label: sprintf( format, 90 ), }, }; }
10
diff --git a/client/src/components/NearestHospital/HealthFacilities.js b/client/src/components/NearestHospital/HealthFacilities.js @@ -159,20 +159,66 @@ const NearestHealthFacilities = props => { } const [ userCoords, setCoords ] = useState(null); + const [ gettingLocation, setGettingLocation ] = useState(false); const userLocation = () => { if(navigator.geolocation) { - navigator.geolocation.getCurrentPosition((position, error) => { - if(error) { - // change error message - alert("Sorry we could not get your location. Your browser may not be compatible") + setGettingLocation(true); + + const errorCallback_highAccuracy = error => { + if (error.code === error.TIMEOUT) { + // Attempt to get GPS loc timed out after 5 seconds, + // try low accuracy location + navigator.geolocation.getCurrentPosition( + successCallback, + errorCallback_lowAccuracy, + {maximumAge:600000, timeout:30000, enableHighAccuracy: false} + ); + + return; + } + setGettingLocation(false); + let errorMsg; + if (error.code === 1) { + errorMsg = "PERMISSION_DENIED."; + } + else if (error.code === 2) { + errorMsg = "POSITION_UNAVAILABLE."; + } + let msg = `${errorMsg} We could not get your location. Check browser settings`; + alert(msg); + } + + const errorCallback_lowAccuracy = error => { + setGettingLocation(false); + let errorMsg; + if (error.code === 1) { + errorMsg = "PERMISSION_DENIED."; } + else if (error.code === 2) { + errorMsg = "POSITION_UNAVAILABLE."; + } + else if (error.code === 3) + errorMsg = "TIMEOUT"; + let msg = `${errorMsg} We could not get your location. Check browser settings`; + alert(msg); + } + + const successCallback = position => { + setGettingLocation(false); setCoords(position.coords) + } + + navigator.geolocation.getCurrentPosition( + successCallback, + errorCallback_highAccuracy, + {maximumAge:600000, timeout:25000, enableHighAccuracy: true} + ); - }); } else { alert("Browser not supported!") } + } @@ -216,7 +262,7 @@ const NearestHealthFacilities = props => { /> <ShareLocation onClick={userLocation}> <SvgIcon src={shareLocation} style={shareIconStyles} /> - Share My Location + {gettingLocation ? 'Getting location...' : 'Share My Location' } </ShareLocation> </SearchBarContainer> </ShareLocationContainer>
7
diff --git a/html/components/highlight-board.stories.js b/html/components/highlight-board.stories.js @@ -10,7 +10,7 @@ export default { }, }; -export const defaultHighlightBoard = () => ` +export const defaultStory = () => ` <div class="sprk-c-HighlightBoard sprk-c-HighlightBoard--has-image sprk-u-mbm" data-id="highlightboard-1" @@ -57,7 +57,7 @@ export const defaultHighlightBoard = () => ` </div> `; -defaultHighlightBoard.story = { +defaultStory.story = { name: 'Default', };
3
diff --git a/packages/vue/src/stories/getting-started/1. installation.stories.mdx b/packages/vue/src/stories/getting-started/1. installation.stories.mdx @@ -132,23 +132,31 @@ If you want to use your own font instead, use this [snippet generator](https://g For Nuxt.js project, you can add the following to the `head` section of `nuxt.config.js` (or a specific page component). ```js +export default { + head: { + meta: [ { - { - rel: 'preconnect', - href: 'https://fonts.gstatic.com/', crossorigin: 'anonymous' + rel: "preconnect", + href: "https://fonts.gstatic.com/", + crossorigin: "anonymous", }, { - rel: 'preload', - as: 'style', href: 'https://fonts.googleapis.com/css?family=Raleway:300,400,400i,500,600,700|Roboto:300,300i,400,400i,500,700&display=swap', - crossorigin: 'anonymous' + rel: "preload", + as: "style", + href: + "https://fonts.googleapis.com/css?family=Raleway:300,400,400i,500,600,700|Roboto:300,300i,400,400i,500,700&display=swap", + crossorigin: "anonymous", }, { - rel: 'stylesheet', - href: 'https://fonts.googleapis.com/css?family=Raleway:300,400,400i,500,600,700|Roboto:300,300i,400,400i,500,700&display=swap', - media: 'print', - onload: "this.media='all'" + rel: "stylesheet", + href: + "https://fonts.googleapis.com/css?family=Raleway:300,400,400i,500,600,700|Roboto:300,300i,400,400i,500,700&display=swap", + media: "print", + onload: "this.media='all'", }, -} + ], + }, +}; ``` ## Using with Nuxt
1
diff --git a/app.rb b/app.rb @@ -10,9 +10,6 @@ require 'sinatra/subdomain' require 'json' require 'mongo' -# Allows all connections -set :bind, '0.0.0.0' - # Uses the modular version of Sinatra class SpacexAPI < Sinatra::Base register Sinatra::Subdomain
13
diff --git a/layouts/partials/helpers/fragments-renderer.html b/layouts/partials/helpers/fragments-renderer.html {{- $real_page := $layout_info.real_page -}} {{- $root := $layout_info.root -}} -{{- range sort ($page_scratch.Get "page_fragments") "Params.weight" -}} +{{- range sort ($page_scratch.Get "page_fragments" | default slice) "Params.weight" -}} {{/* If a fragment contains a slot variable in it's frontmatter it should not be rendered on the page. It would be later handled by the slot helper. */}} {{- if (not (isset .Params "slot")) (ne .Params.slot "") -}}
0
diff --git a/alpha/CollateralisedNomin.sol b/alpha/CollateralisedNomin.sol @@ -609,13 +609,14 @@ contract CollateralisedNomin is ERC20Token { onlyOwner { stalePeriod = period; - StalePeriodUpdate(price); + StalePeriodUpdate(period); } /* True iff the current block timestamp is later than the time * the price was last updated, plus the stale period. */ function priceIsStale() public + view returns (bool) { return lastPriceUpdate + stalePeriod < now;
1
diff --git a/public/javascripts/SVLabel/src/SVLabel/alert/RatingReminderAlert.js b/public/javascripts/SVLabel/src/SVLabel/alert/RatingReminderAlert.js @@ -18,7 +18,8 @@ function RatingReminderAlert(alertHandler) { if (self['ratingCount'] >= MINIMUM_NO_RATING_BEFORE_ALERT && (svl.onboarding == null || svl.onboarding.isOnboarding() == false)) { - alertHandler.showAlert('Please provide severity ratings for each label by pressing keys <kbd>'+1+'</kbd> through <kbd>'+5+'</kbd>', 'reminderMessage', true); + alertHandler.showAlert('Please provide severity ratings for each label by pressing' + + ' keys <kbd>' + 1 + '</kbd> through <kbd>' + 5 + '</kbd>', 'reminderMessage', true); self['ratingCount'] = 0; }//not in tutorial screen
7
diff --git a/src/models/entities.js b/src/models/entities.js @@ -103,7 +103,7 @@ const EntitiesModel = DataConnected.extend({ const dim = this.dim; this._entitySets = { [dim]: this._root.dataManager.getAvailableDataForKey(dim, null, "entities") - .filter(d => ["entity_set"].includes(this._root.dataManager.getConceptProperty(d.value, "concept_type"))) + .filter(d => ["entity_set", "entity_domain"].includes(this._root.dataManager.getConceptProperty(d.value, "concept_type"))) .map(d => d.value) }; this._entitySetsValues = { [dim]: [] };
13
diff --git a/src/config/backpack/base.php b/src/config/backpack/base.php @@ -148,7 +148,7 @@ return [ // All JS and CSS assets defined above have this string appended as query string (?v=string). // If you want to manually trigger cachebusting for all styles and scripts, - // append or prepent something to the string below, so that it's different. + // append or prepend something to the string below, so that it's different. 'cachebusting_string' => \PackageVersions\Versions::getVersion('backpack/crud'), /* @@ -210,7 +210,7 @@ return [ 'user_model_fqn' => App\User::class, // The classes for the middleware to check if the visitor is an admin - // Can be a single class or an array of clases + // Can be a single class or an array of classes 'middleware_class' => [ App\Http\Middleware\CheckIfAdmin::class, \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
3
diff --git a/package.json b/package.json { - "name": "math-editor-poc", + "name": "math-editor", "version": "1.0.0", "description": "Matematiikkaeditori-spike", "author": "", - "homepage": "https://github.com/digabi/math-editor-poc", + "homepage": "https://github.com/digabi/math-editor", "scripts": { "start": "app/index.js", "dev": "supervisor -i public,test app/index.js", }, "repository": { "type": "git", - "url": "https://github.com/digabi/math-editor-poc.git" + "url": "https://github.com/digabi/math-editor.git" }, "devDependencies": { "chai": "^3.5.0",
2
diff --git a/instancing.js b/instancing.js @@ -446,3 +446,15 @@ export class InstancedGeometryAllocator { } */ } } + +export class BatchedMesh extends THREE.InstancedMesh { + constructor(geometry, material, allocator) { + super(geometry, material); + + this.isBatchedMesh = true; + this.allocator = allocator; + } + getDrawSpec(multiDrawStarts, multiDrawCounts, multiDrawInstanceCounts) { + this.allocator.getDrawSpec(multiDrawStarts, multiDrawCounts, multiDrawInstanceCounts); + } +} \ No newline at end of file
0
diff --git a/bids-validator/validators/events/hed.js b/bids-validator/validators/events/hed.js @@ -185,23 +185,21 @@ export default function checkHedStrings(events, headers, jsonContents, dir) { hedStringsFound = true } - for (const hedString of hedStrings) { const [ - isHedStringValid, + isHedDatasetValid, hedIssues, - ] = hedValidator.validator.validateHedEvent( - hedString, + ] = hedValidator.validator.validateHedDataset( + hedStrings, hedSchema, true, ) - if (!isHedStringValid) { + if (!isHedDatasetValid) { const convertedIssues = convertHedIssuesToBidsIssues( hedIssues, eventFile.file, ) issues = issues.concat(convertedIssues) } - } }) if (hedStringsFound && Object.entries(schemaDefinition).length === 0) { issues.push(new Issue({ code: 132 }))
4
diff --git a/deepfence_ui/app/scripts/components/compliance-view/start-scan-modal/index.jsx b/deepfence_ui/app/scripts/components/compliance-view/start-scan-modal/index.jsx @@ -312,20 +312,8 @@ const checkTypes = { ], kubernetes: [ { - id: 'hipaa', - displayName: 'HIPAA', - }, - { - id: 'gdpr', - displayName: 'GDPR', - }, - { - id: 'pci', - displayName: 'PCI', - }, - { - id: 'nist', - displayName: 'NIST', + id: 'cis', + displayName: 'CIS', }, ], gcp: [
3
diff --git a/options.html b/options.html <label class="fancy-checkbox"> <input type="checkbox" name="ext-etheraddresslookup-twitter_validation" id="ext-etheraddresslookup-twitter_validation"> - <span>Twitter Validation</span> <sup>[<a href="https://github.com/409H/EtherAddressLookup/wiki/Twitter-Badges" target="_blank">?</a>]</sup> + <span>Twitter Badges</span> <sup>[<a href="https://github.com/409H/EtherAddressLookup/wiki/Twitter-Badges" target="_blank">?</a>]</sup> </label> <label class="fancy-checkbox">
10
diff --git a/Source/Scene/Model.js b/Source/Scene/Model.js @@ -1524,15 +1524,14 @@ define([ function parseTextures(model, context) { var gltf = model.gltf; var images = gltf.images; - var binary; var uri; ForEach.texture(gltf, function(texture, id) { var imageId = texture.source; var gltfImage = images[imageId]; var extras = gltfImage.extras; - binary = undefined; - uri = undefined; + var bufferViewId = gltfImage.bufferView; + uri = gltfImage.uri; // First check for a compressed texture if (defined(extras) && defined(extras.compressedImage3DTiles)) { @@ -1542,52 +1541,44 @@ define([ var etc1 = extras.compressedImage3DTiles.etc1; if (context.s3tc && defined(crunch)) { - if (defined(crunch.extensions) && defined(crunch.extensions.KHR_binary_glTF)) { - binary = crunch.extensions.KHR_binary_glTF; + if (defined(crunch.bufferView)) { + bufferViewId = crunch.bufferView; } else { uri = crunch.uri; } } else if (context.s3tc && defined(s3tc)) { - if (defined(s3tc.extensions) && defined(s3tc.extensions.KHR_binary_glTF)) { - binary = s3tc.extensions.KHR_binary_glTF; + if (defined(s3tc.bufferView)) { + bufferViewId = s3tc.bufferView; } else { uri = s3tc.uri; } } else if (context.pvrtc && defined(pvrtc)) { - if (defined(pvrtc.extensions) && defined(pvrtc.extensions.KHR_binary_glTF)) { - binary = pvrtc.extensions.KHR_binary_glTF; + if (defined(pvrtc.bufferView)) { + bufferViewId = pvrtc.bufferView; } else { uri = pvrtc.uri; } } else if (context.etc1 && defined(etc1)) { - if (defined(etc1.extensions) && defined(etc1.extensions.KHR_binary_glTF)) { - binary = etc1.extensions.KHR_binary_glTF; + if (defined(etc1.bufferView)) { + bufferViewId = etc1.bufferView; } else { uri = etc1.uri; } } } - // No compressed texture, so image references either uri (external or base64-encoded) or bufferView - if (!defined(binary) && !defined(uri)) { - if (defined(gltfImage.extensions) && defined(gltfImage.extensions.KHR_binary_glTF)) { - binary = gltfImage.extensions.KHR_binary_glTF; - } else { - uri = new Uri(gltfImage.uri); - } - } - // Image references either uri (external or base64-encoded) or bufferView - if (defined(binary)) { + if (defined(bufferViewId)) { model._loadResources.texturesToCreateFromBufferView.enqueue({ id : id, image : undefined, - bufferView : binary.bufferView, - mimeType : binary.mimeType + bufferView : bufferViewId, + mimeType : gltfImage.mimeType }); } else { ++model._loadResources.pendingTextureLoads; - var imagePath = joinUrls(model._baseUri, uri); + uri = new Uri(uri); + var imagePath = joinUrls(model._baseUri, gltfImage.uri); var promise; if (ktxRegex.test(imagePath)) { @@ -1597,7 +1588,7 @@ define([ } else { promise = loadImage(imagePath); } - promise.then(imageLoad(model, id)).otherwise(getFailedLoadFunction(model, 'image', imagePath)); + promise.then(imageLoad(model, id, imageId)).otherwise(getFailedLoadFunction(model, 'image', imagePath)); } }); }
3
diff --git a/src/index.js b/src/index.js @@ -254,7 +254,7 @@ app.on('login', (event, webContents, request, authInfo, callback) => { callback(ps.user, ps.password); }); } else if (authInfo.scheme === 'basic') { - console.log('basic auth handler', authInfo); + debug('basic auth handler', authInfo); basicAuthHandler(mainWindow, authInfo); } });
14
diff --git a/assets/js/googlesitekit/datastore/forms/index.js b/assets/js/googlesitekit/datastore/forms/index.js @@ -23,17 +23,15 @@ import Data from 'googlesitekit-data'; import invariant from 'invariant'; import { STORE_NAME } from './constants'; -// Actions -const SET_FORM_VALUES = 'SET_FORM_VALUES'; - export { STORE_NAME }; -export const INITIAL_STATE = { -}; +const SET_FORM_VALUES = 'SET_FORM_VALUES'; + +export const INITIAL_STATE = {}; export const actions = { setValues( formName, formData ) { - invariant( formName, 'form name is required.' ); + invariant( formName, 'formName is required for setting values.' ); return { payload: { formName, formData }, @@ -65,13 +63,6 @@ export const resolvers = {}; export const selectors = { getValue( state, formName, key ) { - if ( ! formName ) { - return undefined; - } - if ( ! key ) { - return undefined; - } - return state[ formName ][ key ]; }, };
2
diff --git a/src/renderer/lib/torrent-poster.js b/src/renderer/lib/torrent-poster.js @@ -74,15 +74,23 @@ function filterOnExtension (torrent, extensions) { } function scoreCoverFile (file) { - const name = path.basename(file.name, path.extname(file.name)).toLowerCase() - switch (name) { - case 'cover': return 100 - case 'folder': return 95 - case 'front': return 85 - case 'front-cover': return 90 - case 'back': return 40 - default: return 0 + const fileName = path.basename(file.name, path.extname(file.name)).toLowerCase() + const relevanceScore = { + cover: 100, + folder: 95, + front: 90, + back: 20 } + + for (let keyword in relevanceScore) { + if (fileName === keyword) { + return relevanceScore[keyword] + } + if (fileName.indexOf(keyword) !== -1) { + return 0.8 * relevanceScore[keyword] + } + } + return 0 } function torrentPosterFromAudio (torrent, cb) { @@ -94,7 +102,9 @@ function torrentPosterFromAudio (torrent, cb) { score: scoreCoverFile(file) } }).sort((a, b) => { - return b.score - a.score + const delta = b.score - a.score + // If score is equal, pick the largest file, aiming for highest resolution + return delta === 0 ? b.file.length - a.file.length : delta }) if (bestCover.length < 1) return cb(new Error('Generated poster contains no data'))
7
diff --git a/waitlist/admin.py b/waitlist/admin.py from django.contrib import admin +from waitlist.models import WaitlistItem -# Register your models here. +class WaitlistItemAdmin(admin.ModelAdmin): + model = WaitlistItem + list_display = ['id', 'book', 'library', 'user'] + search_fields = ['book__title', 'user__username'] + autocomplete_fields = ['book', 'library', 'user'] + +admin.site.register(WaitlistItem, WaitlistItemAdmin)
0
diff --git a/related.js b/related.js @@ -23,6 +23,9 @@ module.exports = function (db) { //which causes messages to be queried twice. var n = 1 var msgs = {key: key, value: null} + + related(msgs, depth) + db.get(key, function (err, msg) { msgs.value = msg if (err && err.notFound) @@ -30,8 +33,6 @@ module.exports = function (db) { done(err) }) - related(msgs, depth) - function related (msg, depth) { if(depth <= 0) return if (n<0) return
9
diff --git a/plugins/compute/app/views/compute/keypairs/show.html.haml b/plugins/compute/app/views/compute/keypairs/show.html.haml %tbody %tr %th Name - %td= @keypair.name + %td= @keypair.nil? ? "" : @keypair.name %tr %th User ID - %td= @keypair.user_id + %td= @keypair.nil? ? "" : @keypair.user_id %tr %th Fingerprint - %td= @keypair.fingerprint + %td= @keypair.nil? ? "" : @keypair.fingerprint %tr %th Public Key %td.big-data-cell - = @keypair.public_key + = @keypair.nil? ? "" : @keypair.public_key - if modal? .modal-footer
1
diff --git a/src/components/HeaderButton.js b/src/components/HeaderButton.js import React, { Component } from 'react' -import { TouchableOpacity } from 'react-native' -import { Icon } from 'native-base' +import { TouchableOpacity, StyleSheet } from 'react-native' +import { Text, Icon } from 'native-base' class HeaderButton extends Component { + render() { + + const containerStyles = [ styles.base ] + if (this.props.textLeft) { + containerStyles.push(styles.withText) + } + return ( <TouchableOpacity onPress={ this.props.onPress } - style={{ paddingHorizontal: 20, paddingVertical: 5 }}> + style={ containerStyles }> + { this.props.textLeft && ( + <Text style={ styles.textLeft }>{ this.props.textLeft }</Text> + )} <Icon name={ this.props.iconName } style={{ color: '#fff' }} /> </TouchableOpacity> ) } } +const styles = StyleSheet.create({ + base: { + paddingHorizontal: 20, + paddingVertical: 5 + }, + withText: { + flex: 1, + flexDirection: 'row', + alignItems: 'center' + }, + textLeft: { + color: '#fff', + paddingRight: 15 + } +}) + export default HeaderButton
9
diff --git a/src/api/auth.js b/src/api/auth.js @@ -14,6 +14,9 @@ export function signOut() { } function verifyUserFromToken(token) { + if (!token) { + return Promise.resolve(unauthenticatedUser); + } const user = atob(token.split(".")[1]); if (!user) {
9
diff --git a/.github/workflows/zips.yml b/.github/workflows/zips.yml @@ -79,7 +79,7 @@ jobs: - uses: actions/checkout@v2 with: repository: ${{ github.repository }}.wiki - ref: main + ref: master token: ${{ secrets.GITHUB_PERSONAL_ACCESS_TOKEN }} - name: Download artifacts uses: actions/download-artifact@v1 @@ -93,7 +93,7 @@ jobs: git diff --staged --quiet && echo 'No changes to commit; exiting!' && exit 0 git pull --no-edit --quiet git commit -m "Build and publish ${{ github.ref }}" - git push origin main + git push origin master env: GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com GIT_AUTHOR_NAME: ${{ github.actor }} @@ -108,7 +108,7 @@ jobs: - uses: actions/checkout@v2 with: repository: ${{ github.repository }}.wiki - ref: main + ref: master token: ${{ secrets.GITHUB_PERSONAL_ACCESS_TOKEN }} - name: Prune PR files run: | @@ -118,7 +118,7 @@ jobs: git diff --staged --quiet && echo 'No changes to commit; exiting!' && exit 0 git pull --no-edit --quiet git commit -m "Prune refs/pull/${{ github.event.pull_request.number }}" - git push origin main + git push origin master env: GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com GIT_AUTHOR_NAME: ${{ github.actor }}
1
diff --git a/_locales/en/messages.json b/_locales/en/messages.json "description": "[options] Copyright and version number in page footer" }, "msgClickPageToPlayVideo": { - "message": "click page then hover again", + "message": "Click anywhere on the page then hover again", "description": "User must interact with the document first to play video: https://goo.gl/xX8pDD" } }
7
diff --git a/src/js/controllers/wallet-details.controller.js b/src/js/controllers/wallet-details.controller.js @@ -405,7 +405,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun ]; }); - var refreshInterval; + var refreshInterval = null; $scope.$on("$ionicView.afterEnter", function onAfterEnter(event, data) { updateTxHistoryFromCachedData(); @@ -417,18 +417,31 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun }, 1000); }); - $scope.$on("$ionicView.afterLeave", function(event, data) { + $scope.$on("$ionicView.afterLeave", _onAfterLeave); + $scope.$on("$ionicView.leave", _onLeave); + + function _onAfterLeave(event, data) { + console.log('walletDetailsController onAfterLeave() Cancelling interval.'); + if (refreshInterval !== null) { $interval.cancel(refreshInterval); + refreshInterval = null; + } if ($window.StatusBar) { $window.StatusBar.backgroundColorByHexString('#000000'); } - }); + } - $scope.$on("$ionicView.leave", function(event, data) { + function _onLeave(event, data) { + console.log('walletDetailsController onLeave()'); lodash.each(listeners, function(x) { x(); }); - }); + } + + function _callLeaveHandlers() { + _onLeave(); + _onAfterLeave(); + } function setAndroidStatusBarColor() { var SUBTRACT_AMOUNT = 15; @@ -474,12 +487,15 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun } $scope.goToSend = function() { + _callLeaveHandlers(); // During testing these weren't automatically called sendFlowService.start({ fromWalletId: $scope.wallet.id }); }; $scope.goToReceive = function() { + console.log('walletDetailsController goToReceive()'); + _callLeaveHandlers(); // During testing these weren't automatically called $state.go('tabs.home', { walletId: $scope.wallet.id }).then(function () { @@ -491,6 +507,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun }; $scope.goToBuy = function() { + _callLeaveHandlers(); // During testing these weren't automatically called $state.go('tabs.home', { walletId: $scope.wallet.id }).then(function () {
1
diff --git a/Makefile b/Makefile @@ -34,7 +34,7 @@ test: test-unit test-e2e test-ci: test-unit-ci test-e2e-ci test-unit: build build/test-unit.js @$(karma) karma.conf.js -test-unit-debug: build build/test.js +test-unit-debug: build build/test-unit.js BROWSER=ChromeDebug $(karma) karma.conf.js test-unit-ci: build build/test-unit.js @$(karma) karma.ci.conf.js
1
diff --git a/scene-cruncher.js b/scene-cruncher.js @@ -7,9 +7,9 @@ import physicsManager from './physics-manager.js'; const localVector = new THREE.Vector3(); const localVector2 = new THREE.Vector3(); -const localVector3 = new THREE.Vector3(); +// const localVector3 = new THREE.Vector3(); const localVector4D = new THREE.Vector4(); -const localMatrix = new THREE.Matrix4(); +// const localMatrix = new THREE.Matrix4(); const cameraNear = 0; @@ -24,7 +24,7 @@ const floatImageData = imageData => { for (let y = 0; y < height / 2; y++) { for (let x = 0; x < width; x++) { const i = y * width + x; - const j = (height - y - 1) * width + x; + const j = (height - 1 - y) * width + x; const tmp = result[i]; result[i] = result[j]; result[j] = tmp; @@ -160,7 +160,7 @@ const _makeGeometry = (position, quaternion, worldSize, worldDepthResolution, de const worldDepthVoxelSize = new THREE.Vector2(worldSize.x, worldSize.y).divide(worldDepthResolution); const cameraFar = worldSize.z + worldDepthVoxelSize.x * 2; - const cubePositions = []; + // const cubePositions = []; const forwardDirection = _snap(new THREE.Vector3(0, 0, 1).applyQuaternion(quaternion)); const upDirection = _snap(new THREE.Vector3(0, 1, 0).applyQuaternion(quaternion)); @@ -193,7 +193,7 @@ const _makeGeometry = (position, quaternion, worldSize, worldDepthResolution, de const index = y * worldDepthResolutionP3.x + x; let z = depthFloatImageData[index]; - { + /* { const x2 = x - 1; const y2 = -(y - 1); const z2 = (1 + z / cameraFar) * worldDepthResolutionP2.x - 2; @@ -209,7 +209,7 @@ const _makeGeometry = (position, quaternion, worldSize, worldDepthResolution, de .multiplyScalar(worldDepthVoxelSize.x) .add(baseWorldPosition); cubePositions.push(absoluteLocation.clone()); - } + } */ { const x2 = x; @@ -318,7 +318,7 @@ const _makeGeometry = (position, quaternion, worldSize, worldDepthResolution, de geometry2.setIndex(new THREE.BufferAttribute(faces, 1)); geometry2.computeVertexNormals(); - return [geometry2, cubePositions]; + return [geometry2/*, cubePositions*/]; }; const normalMaterial = new THREE.MeshNormalMaterial(); const baseMaterial = new THREE.MeshBasicMaterial({ @@ -500,7 +500,7 @@ export function snapshotMapChunk( const [ geometry2, - cubePositions, + // cubePositions, ] = _makeGeometry( camera.position, camera.quaternion, @@ -544,18 +544,18 @@ export function snapshotMapChunk( mesh2.frustumCulled = false; mesh2.updateMatrixWorld(); - const cubeGeometry = new THREE.BoxBufferGeometry(0.2, 0.2, 0.2); + /* const cubeGeometry = new THREE.BoxBufferGeometry(0.2, 0.2, 0.2); const mesh3 = new THREE.InstancedMesh(cubeGeometry, normalMaterial, cubePositions.length); for (let i = 0; i < cubePositions.length; i++) { const position = cubePositions[i]; mesh3.setMatrixAt(i, localMatrix.makeTranslation(position.x, position.y, position.z)); } mesh3.instanceMatrix.needsUpdate = true; - mesh3.frustumCulled = false; + mesh3.frustumCulled = false; */ return [ mesh2, - mesh3, + // mesh3, ]; }; @@ -664,7 +664,7 @@ export function snapshotMapChunk( const object = new THREE.Object3D(); object.add(topMesh[0]); - object.add(topMesh[1]); + // object.add(topMesh[1]); // object.add(bottomMesh); // object.add(leftMesh); // object.add(rightMesh);
2
diff --git a/src/components/select/Select.js b/src/components/select/Select.js @@ -97,14 +97,13 @@ export class SelectComponent extends BaseComponent { if (typeof data === 'string') { return this.t(data); } - if (!data.data) { - return '' || this.component.placeholder - } const template = this.component.template ? this.interpolate(this.component.template, {item: data}) : data.label; + if (template) { const label = template.replace(/<\/?[^>]+(>|$)/g, ''); return template.replace(label, this.t(label)); } + } itemValue(data) { return (this.component.valueProperty && _.isObject(data)) ? _.get(data, this.component.valueProperty) : data;
14
diff --git a/src/ember-app.js b/src/ember-app.js @@ -231,7 +231,7 @@ class EmberApp { /** * @private * - * Main funtion that creates the app instance for every `visit` request, boots + * Main function that creates the app instance for every `visit` request, boots * the app instance and then visits the given route and destroys the app instance * when the route is finished its render cycle. *
1
diff --git a/src/components/Widgets/Markdown/unified.js b/src/components/Widgets/Markdown/unified.js @@ -446,11 +446,6 @@ const remarkImagesToText = () => { export const markdownToRemark = markdown => { const parsed = unified() .use(markdownToRemarkPlugin, { fences: true, pedantic: true, footnotes: true, commonmark: true }) - .use(function() { - const { blockMethods } = this.Parser.prototype; - // Remove the yaml tokenizer, as the rich text editor doesn't support frontmatter - blockMethods.splice(blockMethods.indexOf('yamlFrontMatter'), 1); - }) .parse(markdown); const result = unified()
11
diff --git a/assets/data/modules/Ohio.json b/assets/data/modules/Ohio.json ] }, { - "name": "Appalachian Region", + "name": "Northeast-Central Region", "id": "ohakron", "limit": "community", "state": "Ohio", ] } ], - "name": "Southeast Region", + "name": "Appalachia Region", "id": "ohse", "limit": "community", "districtingProblems": [
10
diff --git a/sparta.go b/sparta.go @@ -417,11 +417,13 @@ type IAMRolePrivilege struct { } func (rolePrivilege *IAMRolePrivilege) resourceExpr() *gocf.StringExpr { - switch rolePrivilege.Resource.(type) { + switch typedPrivilege := rolePrivilege.Resource.(type) { case string: - return gocf.String(rolePrivilege.Resource.(string)) + return gocf.String(typedPrivilege) + case gocf.RefFunc: + return typedPrivilege.String() default: - return rolePrivilege.Resource.(*gocf.StringExpr) + return typedPrivilege.(*gocf.StringExpr) } }
0
diff --git a/packages/input-amount/test/lion-input-amount.test.js b/packages/input-amount/test/lion-input-amount.test.js @@ -230,6 +230,28 @@ describe('<lion-input-amount>', () => { expect(currLabel?.getAttribute('aria-label')).to.equal('euros'); }); + it('sets currency label on the after after element', async () => { + const el = /** @type {LionInputAmount} */ ( + await fixture(` + <lion-input-amount> + <span slot="after" id="123">Currency, please</span> + </lion-input-amount>`) + ); + const mySlotLabel = /** @type {HTMLElement[]} */ (Array.from(el.children)).find( + child => child.slot === 'after', + ); + expect(mySlotLabel?.id).to.equal('123'); + + el.currency = 'EUR'; + await el.updateComplete; + const currLabel = /** @type {HTMLElement[]} */ (Array.from(el.children)).find( + child => child.slot === 'after', + ); + expect(currLabel).to.equal(mySlotLabel); + expect(currLabel?.id).to.equal('123'); + expect(currLabel?.innerText).to.equal('EUR'); + }); + describe('Accessibility', () => { it('is accessible', async () => { const el = await fixture(
0
diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js @@ -673,7 +673,7 @@ function readNewestAction(reportID, created) { API.write('ReadNewestAction', { reportID, - created: DateUtils.getDBTime(created), + createdDate: DateUtils.getDBTime(created), sequenceNumber, }, { @@ -702,7 +702,7 @@ function markCommentAsUnread(reportID, created, sequenceNumber) { reportID, // We subtract 1 millisecond so that the lastRead is updated to just before this reportAction's created date - created: DateUtils.getDBTime(new Date(created) - 1), + createdDate: DateUtils.getDBTime(new Date(created) - 1), sequenceNumber, }, {
10
diff --git a/app/views/signUp.scala.html b/app/views/signUp.scala.html @password(signInForm("password"), "Password", icon = "key") <div class="form-group"> <div class="checkbox"> - <label><input type="checkbox" id="sign-up-page-agree-to-terms">You agree to our <a target="_blank" href="@routes.ApplicationController.terms">Terms of Use and Privacy Policy</a></label> + <label><input type="checkbox" id="sign-up-page-agree-to-terms"> + You agree to our <a target="_blank" href="@routes.ApplicationController.terms"> + Terms of Use and Privacy Policy</a> + </label> </div> <div> <button id="sign-up-page-submit" type="submit" value="submit" class="btn btn-lg btn-primary btn-block" disabled>Submit</button>
7
diff --git a/userscript.user.js b/userscript.user.js @@ -37630,7 +37630,7 @@ var $$IMU_EXPORT$$; return options.cb({ url: urljoin(src, match[1], true), extra: { - page: page + page: result.finalUrl } }); } else {
7
diff --git a/CHANGES.md b/CHANGES.md @@ -11,7 +11,7 @@ Change Log ##### Fixes :wrench: * `PolygonGraphics.hierarchy` now converts constant array values to a `PolygonHierarchy` when set, so code that accesses the value of the property can rely on it always being a `PolygonHierarchy`. -* Fixed undefined `quadDetails` error from zooming into the map really close +* Fixed undefined `quadDetails` error from zooming into the map really close. [#8011](https://github.com/AnalyticalGraphicsInc/cesium/pull/8011) ### 1.59 - 2019-07-01
3
diff --git a/scripts/typescript-declarations/generate.js b/scripts/typescript-declarations/generate.js @@ -68,11 +68,9 @@ async function execute() { // Add TypeScript WebMidi namespace before native Web MIDI API objects WEB_MIDI_API_CLASSES.forEach(element => { - const re = new RegExp("{" + element + "}", "g"); - const options = { files: TMP_FILE_PATH, - from: re, + from: new RegExp("{" + element + "}", "g"), to: () => `{WebMidi.${element}}` }; @@ -80,8 +78,14 @@ async function execute() { }); + // Replace callback type by simply "function" + replace.sync({ + files: TMP_FILE_PATH, + from: new RegExp("EventEmitter~callback", "g"), + to: () => "function" + }); + // Generate declaration file - // const cmd = "npx -p typescript tsc " + path.join(OUT_DIR, target.name, target.source) + const cmd = "npx -p typescript tsc " + TMP_FILE_PATH + " --declaration --allowJs --emitDeclarationOnly" + " --module " + target.type +
14
diff --git a/articles/users/search/v2/index.md b/articles/users/search/v2/index.md @@ -16,7 +16,7 @@ useCase: # User Search ::: version-warning -User search v2 has been deprecated as of **June 6th 2018**. Tenants created after this date will not have the option of using it. User search v2 will be removed from service on **November 13th 2018**. We recommend that you use [User Search v3](/users/search/v3) instead. +User search v2 has been deprecated as of **June 6th 2018**. Tenants created after this date will not have the option of using it. We recommend that you use [User Search v3](/users/search/v3) instead. ::: Auth0 allows you, as an administrator, to search for users using [Lucene Query Syntax](http://www.lucenetutorial.com/lucene-query-syntax.html).
2
diff --git a/runtime.js b/runtime.js @@ -549,11 +549,12 @@ const _loadWebBundle = async (file, opts, instanceId) => { }; const _mapScript = script => { if (instanceId) { + script = script.replace("document.monetization", `window.document.monetization${instanceId}`); + script = script.replace("document.monetization.addEventListener", `window.document.monetization${instanceId}.addEventListener`); script = ` - document.monetization${instanceId} = document.createElement('div'); + window.document.monetization${instanceId} = window.document.createElement('div'); ` + script; } - script = script.replace("document.monetization", `document.monetization${instanceId}`); const r = /^(\s*import[^\n]+from\s*['"])(.+)(['"])/gm; script = script.replace(r, function() { const u = _mapUrl(arguments[2]);
14
diff --git a/demo/selection.html b/demo/selection.html When a row is clicked, the item object from that row is assigned to <code>activeItem</code>. </p> <p> - To select items on click, <code>activeItem</code> can be pushed to <code>selectedItems</code>. + To select items on click, <code>activeItem</code> can be added + to the <code>selectedItems</code> array. You can also call + <code>selectItem(item)</code> or <code>deselectItem(item)</code> in order + to select or deselect the grid item. + </p> + <p> + In the example below, the <code>selectedItems</code> array is replaced + whenever <code>activeItem</code> changes, making single-item selection. </p> <demo-snippet> <template>
7
diff --git a/src/core/fonts.js b/src/core/fonts.js @@ -297,8 +297,8 @@ const Font = (function FontClosure() { ); } + let data; try { - var data; switch (type) { case "MMType1": info("MMType1 font (" + name + "), falling back to Type1."); @@ -307,7 +307,7 @@ const Font = (function FontClosure() { case "CIDFontType0": this.mimetype = "font/opentype"; - var cff = + const cff = subtype === "Type1C" || subtype === "CIDFontType0C" ? new CFFFont(file, properties) : new Type1Font(name, file, properties); @@ -474,8 +474,8 @@ const Font = (function FontClosure() { } function buildToFontChar(encoding, glyphsUnicodeMap, differences) { - let toFontChar = [], - unicode; + const toFontChar = []; + let unicode; for (let i = 0, ii = encoding.length; i < ii; i++) { unicode = getUnicodeForGlyph(encoding[i], glyphsUnicodeMap); if (unicode !== -1) { @@ -1299,7 +1299,7 @@ const Font = (function FontClosure() { // - symbolic fonts the preference is a 3,0 table then a 1,0 table // The following takes advantage of the fact that the tables are sorted // to work. - for (var i = 0; i < numTables; i++) { + for (let i = 0; i < numTables; i++) { const platformId = file.getUint16(); const encodingId = file.getUint16(); const offset = file.getInt32() >>> 0; @@ -1392,8 +1392,8 @@ const Font = (function FontClosure() { // might be changed const segCount = file.getUint16() >> 1; file.skip(6); // skipping range fields - let segIndex, - segments = []; + const segments = []; + let segIndex; for (segIndex = 0; segIndex < segCount; segIndex++) { segments.push({ end: file.getUint16() }); } @@ -1406,7 +1406,8 @@ const Font = (function FontClosure() { segments[segIndex].delta = file.getUint16(); } - let offsetsCount = 0; + let offsetsCount = 0, + offsetIndex; for (segIndex = 0; segIndex < segCount; segIndex++) { segment = segments[segIndex]; const rangeOffset = file.getUint16(); @@ -1415,7 +1416,7 @@ const Font = (function FontClosure() { continue; } - var offsetIndex = (rangeOffset >> 1) - (segCount - segIndex); + offsetIndex = (rangeOffset >> 1) - (segCount - segIndex); segment.offsetIndex = offsetIndex; offsetsCount = Math.max( offsetsCount, @@ -1480,7 +1481,7 @@ const Font = (function FontClosure() { mappings.sort(function (a, b) { return a.charCode - b.charCode; }); - for (i = 1; i < mappings.length; i++) { + for (let i = 1; i < mappings.length; i++) { if (mappings[i - 1].charCode === mappings[i].charCode) { mappings.splice(i, 1); i--; @@ -1887,12 +1888,12 @@ const Font = (function FontClosure() { glyphNames = MacStandardGlyphOrdering; break; case 0x00020000: - var numGlyphs = font.getUint16(); + const numGlyphs = font.getUint16(); if (numGlyphs !== maxpNumGlyphs) { valid = false; break; } - var glyphNameIndexes = []; + const glyphNameIndexes = []; for (i = 0; i < numGlyphs; ++i) { const index = font.getUint16(); if (index >= 32768) { @@ -1904,8 +1905,8 @@ const Font = (function FontClosure() { if (!valid) { break; } - var customNames = []; - var strBuf = []; + const customNames = [], + strBuf = []; while (font.pos < end) { const stringLength = font.getByte(); strBuf.length = stringLength; @@ -2522,7 +2523,7 @@ const Font = (function FontClosure() { ) { const glyphsUnicodeMap = getGlyphsUnicode(); for (let charCode = 0; charCode < 256; charCode++) { - var glyphName, standardGlyphName; + let glyphName; if (this.differences && charCode in this.differences) { glyphName = this.differences[charCode]; } else if ( @@ -2537,9 +2538,12 @@ const Font = (function FontClosure() { continue; } // Ensure that non-standard glyph names are resolved to valid ones. - standardGlyphName = recoverGlyphName(glyphName, glyphsUnicodeMap); + const standardGlyphName = recoverGlyphName( + glyphName, + glyphsUnicodeMap + ); - var unicodeOrCharCode; + let unicodeOrCharCode; if (cmapPlatformId === 3 && cmapEncodingId === 1) { unicodeOrCharCode = glyphsUnicodeMap[standardGlyphName]; } else if (cmapPlatformId === 1 && cmapEncodingId === 0) { @@ -2595,7 +2599,7 @@ const Font = (function FontClosure() { if (charCodeToGlyphId[i] !== undefined) { continue; } - glyphName = this.differences[i] || baseEncoding[i]; + const glyphName = this.differences[i] || baseEncoding[i]; if (!glyphName) { continue; }
1
diff --git a/assets/js/googlesitekit/datastore/site/info.js b/assets/js/googlesitekit/datastore/site/info.js */ import invariant from 'invariant'; -/** - * WordPress dependencies - */ -// TODO: change this to use: -// import Data from `googlesitekit-data`; -// const { createRegistrySelector } = Data; -// After https://github.com/google/site-kit-wp/pull/1278 is merged into `develop`. -import { createRegistrySelector } from '@wordpress/data'; - /** * Internal dependencies */ +import Data from 'googlesitekit-data'; import { STORE_NAME } from './index'; +const { createRegistrySelector } = Data; + // Actions const RECEIVE_SITE_INFO = 'RECEIVE_SITE_INFO';
4
diff --git a/support/index.js b/support/index.js @@ -3,6 +3,13 @@ import { configure } from '@testing-library/cypress'; configure({ testIdAttribute: 'data-testid' }); +// dont fail tests on uncaught exceptions of websites +Cypress.on('uncaught:exception', () => { + if (!process.env.FAIL_ON_ERROR) { + return false; + } +}); + Cypress.on('window:before:load', win => { cy.stub(win.console, 'error').callsFake(message => { cy.now('task', 'error', message);
9
diff --git a/lib/BannerPlugin.js b/lib/BannerPlugin.js @@ -46,14 +46,16 @@ const getReplacer = (value, allowEmpty) => { const interpolate = (banner, file, hash, chunkHash) => { - const [name, ext] = file.split("."); + const parts = file.split("."); + const name = parts[0]; + const ext = parts[1]; return banner .replace(REGEXP_HASH, withHashLength(getReplacer(hash))) .replace(REGEXP_CHUNKHASH, withHashLength(getReplacer(chunkHash))) .replace(REGEXP_NAME, name) .replace(REGEXP_EXT, ext); -} +}; class BannerPlugin { constructor(options) {
2