code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/test/jasmine/tests/violin_test.js b/test/jasmine/tests/violin_test.js @@ -522,7 +522,8 @@ describe('Test violin hover:', function() { it('should show in two-sided base case', function(done) { Plotly.plot(gd, fig).then(function() { mouseEvent('mousemove', 250, 250); - assertViolinHoverLine([299.35, 250, 200.65, 250]); + // assertViolinHoverLine([299.35, 250, 200.65, 250]); + assertViolinHoverLine([178.67823028564453, 250, 80, 250]); }) .catch(failTest) .then(done); @@ -533,7 +534,8 @@ describe('Test violin hover:', function() { Plotly.plot(gd, fig).then(function() { mouseEvent('mousemove', 300, 250); - assertViolinHoverLine([299.35, 250, 250, 250]); + // assertViolinHoverLine([299.35, 250, 250, 250]); + assertViolinHoverLine([178.67823028564453, 250, 80, 250]); }) .catch(failTest) .then(done); @@ -544,7 +546,8 @@ describe('Test violin hover:', function() { Plotly.plot(gd, fig).then(function() { mouseEvent('mousemove', 200, 250); - assertViolinHoverLine([200.65, 250, 250, 250]); + // assertViolinHoverLine([200.65, 250, 250, 250]); + assertViolinHoverLine([321.3217315673828, 250, 420, 250]); }) .catch(failTest) .then(done);
3
diff --git a/src/runtime/offers-flow.js b/src/runtime/offers-flow.js @@ -18,6 +18,7 @@ import {ActivityIframeView} from '../ui/activity-iframe-view'; import {PayStartFlow} from './pay-flow'; import {SubscriptionFlows, ProductType, ReplaceSkuProrationMode} from '../api/subscriptions'; import {feArgs, feUrl} from './services'; +import {assert} from '../utils/log'; /** * Offers view is closable when request was originated from 'AbbrvOfferFlow' @@ -66,20 +67,13 @@ export class OffersFlow { } if (feArgsObj['oldSku']) { - if (!feArgsObj['skus']) { - console.error('Need a sku list if old sku is provided!'); - return; - } + assert(feArgsObj['skus'], 'Need a sku list if old sku is provided!') // remove old sku from offers if in list let skuList = feArgsObj['skus']; const /** @type {String} */ oldSku = feArgsObj['oldSku']; skuList = skuList.filter(sku => sku !== oldSku); - if (skuList.length > 0) { + assert(skuList.length > 0, 'Sku list only contained offer user already has'); feArgsObj['skus'] = skuList; - } else { - console.error('Sku list only contained offer user already has'); - return; - } } // redirect to payments if only one upgrade option is passed
14
diff --git a/deepfence_ui/app/scripts/components/settings-view/email-configuration/email-configuration-view.js b/deepfence_ui/app/scripts/components/settings-view/email-configuration/email-configuration-view.js @@ -187,12 +187,12 @@ class EmailConfiguration extends React.Component { type="password" className="form-control" name="password" - placeholder="Password" + placeholder="App password" onChange={this.handleChange} /> {submitted && !this.state.password && ( <div className="field-error"> - Password is required + App password is required </div> )} </div> @@ -267,12 +267,12 @@ class EmailConfiguration extends React.Component { type="text" className="form-control" name="smtp" - placeholder="SMTP mail" + placeholder="SMTP server" onChange={this.handleChange} /> {submitted && !this.state.smtp && ( <div className="field-error"> - SMTP mail is required + SMTP server is required </div> )} </div> @@ -293,12 +293,12 @@ class EmailConfiguration extends React.Component { type="number" className="form-control" name="port" - placeholder="Port" + placeholder="Gmail SMTP port (SSL)" onChange={this.handleChange} /> {submitted && !this.state.port && ( <div className="field-error"> - Port is required + Gmail SMTP port (SSL) is required </div> )} </div>
1
diff --git a/contribs/gmf/apps/desktop_alt/Controller.js b/contribs/gmf/apps/desktop_alt/Controller.js @@ -74,7 +74,7 @@ class Controller extends AbstractDesktopController { center: [2632464, 1185457], zoom: 3, resolutions: [250, 100, 50, 20, 10, 5, 2, 1, 0.5, 0.25, 0.1, 0.05], - constrainResolution: true, + constrainResolution: false, }, }, $scope,
12
diff --git a/components/Account/UpdateMe.js b/components/Account/UpdateMe.js @@ -28,7 +28,7 @@ import { Hint } from './Elements' const { H2, P } = Interaction const birthdayFormat = '%d.%m.%Y' -export const birthdayParse = swissTime.parse(birthdayFormat) +const birthdayParse = swissTime.parse(birthdayFormat) const fields = t => [ {
13
diff --git a/learn/configuration/typo_tolerance.md b/learn/configuration/typo_tolerance.md @@ -55,7 +55,7 @@ You can disable typo tolerance for a specific [document attribute](/learn/core_c <CodeSamples id="typo_tolerance_guide_2" /> -If you type `Dunbo` instead of `Dumbo` with the above settings, Meilisearch won't match any documents. +With the above settings, matches in the `title` attribute will not tolerate any typos. For example, a search for `beautiful` (9 characters) will not match the movie "Biutiful" starring Javier Bardem. With the default settings, this would be a match. ## Impact of typo tolerance on the `typo` ranking rule
7
diff --git a/screen/send/details.js b/screen/send/details.js @@ -50,10 +50,12 @@ export default class SendDetails extends Component { if (props.navigation.state.params) fromAddress = props.navigation.state.params.fromAddress; let fromSecret; if (props.navigation.state.params) fromSecret = props.navigation.state.params.fromSecret; - let fromWallet = {}; + let fromWallet = null; + + const wallets = BlueApp.getWallets(); let startTime2 = Date.now(); - for (let w of BlueApp.getWallets()) { + for (let w of wallets) { if (w.getSecret() === fromSecret) { fromWallet = w; break; @@ -64,6 +66,24 @@ export default class SendDetails extends Component { } } + // fallback to first wallet if it exists + if (!fromWallet && wallets[0]) fromWallet = wallets[0]; + + let amount = ''; + let parsedBitcoinUri = null; + if (props.navigation.state.params.uri) { + try { + parsedBitcoinUri = bip21.decode(props.navigation.state.params.uri); + + address = parsedBitcoinUri.address ? parsedBitcoinUri.address : address; + amount = parsedBitcoinUri.options.amount ? parsedBitcoinUri.options.amount : amount; + memo = parsedBitcoinUri.options.label ? parsedBitcoinUri.options.label : memo; + } catch (error) { + console.error(error); + alert('Error: Unable to decode Bitcoin address'); + } + } + let endTime2 = Date.now(); console.log('getAddress() took', (endTime2 - startTime2) / 1000, 'sec'); console.log({ memo }); @@ -75,7 +95,7 @@ export default class SendDetails extends Component { fromSecret: fromSecret, isLoading: true, address: address, - amount: '', + amount, memo, fee: 1, networkTransactionFees: new NetworkTransactionFee(1, 1, 1), @@ -601,6 +621,7 @@ SendDetails.propTypes = { satoshiPerByte: PropTypes.string, fromSecret: PropTypes.fromSecret, memo: PropTypes.string, + uri: PropTypes.string, }), }), }),
9
diff --git a/js/bitmart.js b/js/bitmart.js @@ -537,59 +537,35 @@ module.exports = class bitmart extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const settle = this.safeCurrencyCode (settleId); - // - // https://github.com/bitmartexchange/bitmart-official-api-docs/blob/master/rest/public/symbols_details.md#response-details - // from the above API doc: - // quote_increment Minimum order price as well as the price increment - // price_min_precision Minimum price precision (digit) used to query price and kline - // price_max_precision Maximum price precision (digit) used to query price and kline - // - // the docs are wrong: https://github.com/ccxt/ccxt/issues/5612 - // - const contractType = this.safeValue (market, 'contract_type'); - const future = contractType === 2; - const swap = contractType === 1; - let type = 'contract'; - let symbol = base + '/' + quote; - const expiry = this.parse8601 (this.safeString (market, 'delive_at')); - if (swap) { - type = 'swap'; - symbol = symbol + ':' + settle; - } else if (future) { - type = 'future'; - symbol = symbol + ':' + settle + '-' + this.yymmdd (expiry, ''); - } - const feeConfig = this.safeValue (market, 'fee_config', {}); result.push ({ 'id': id, 'numericId': undefined, - 'symbol': symbol, + 'symbol': base + '/' + quote + ':' + settle, 'base': base, 'quote': quote, 'settle': settle, 'baseId': baseId, 'quoteId': quoteId, 'settleId': settleId, - 'type': type, + 'type': 'swap', 'spot': false, 'margin': false, - 'swap': swap, - 'future': future, + 'swap': true, + 'future': false, 'option': false, 'active': undefined, 'contract': true, - 'linear': quote === settle, - 'inverse': base === settle, - 'taker': this.safeNumber (feeConfig, 'taker_fee'), - 'maker': this.safeNumber (feeConfig, 'maker_fee'), - 'contractSize': this.safeNumber (market, 'contract_size'), - 'expiry': expiry, - 'expiryDatetime': this.iso8601 (expiry), + 'linear': true, + 'inverse': false, + 'contractSize': undefined, + 'maintenanceMarginRate': undefined, + 'expiry': undefined, + 'expiryDatetime': undefined, 'strike': undefined, 'optionType': undefined, 'precision': { - 'amount': this.safeNumber (market, 'vol_unit'), - 'price': this.safeNumber (market, 'price_unit'), + 'amount': undefined, + 'price': undefined, }, 'limits': { 'leverage': {
13
diff --git a/packages/cx/src/widgets/form/Field.js b/packages/cx/src/widgets/form/Field.js @@ -410,8 +410,8 @@ export function getFieldTooltip(instance) { export function autoFocus(el, component) { if (isTouchEvent()) return; let data = component.props.data || component.props.instance.data; - let autoFocusEl = data.autoFocus && el; - if (autoFocusEl && autoFocusEl != component.autoFocusEl) + let autoFocusValue = el && data.autoFocus; + if (autoFocusValue && autoFocusValue != component.autoFocusValue) FocusManager.focus(el); - component.autoFocusEl = autoFocusEl; + component.autoFocusValue = autoFocusValue; }
11
diff --git a/js/coreweb/bisweb_studytaskmanager.js b/js/coreweb/bisweb_studytaskmanager.js @@ -444,7 +444,6 @@ class StudyTaskManager { /** Plot data for a single run */ plotTaskDataRun(runName) { - console.log('runName', runName, 'taskdata', this.taskdata); const taskNames = this.taskdata.taskNames; let canvas=this.canvas; @@ -471,7 +470,6 @@ class StudyTaskManager { context.fillStyle=`rgba(${cl[0]},${cl[1]},${cl[2]},${OPACITY})`; context.fillRect(x,y,this.textWidth,1.25*texth); context.fillStyle="#000000"; - console.log('X=',x+OFFSET/2); context.fillText(taskNames[i],Math.floor(x+this.textWidth/2),Math.floor(y+0.625*texth)); } @@ -482,24 +480,19 @@ class StudyTaskManager { const parsedRuns = this.taskdata.runs; const runInfo=parsedRuns[runName]; - - let maxt=0; for (let i=0;i<taskNames.length;i++) { let task=taskNames[i]; - let runpairs=runInfo[task]; - - // TODO: Fix this in parsing runpairs SHOULD ALWAYS by an array of arrays! - /*if (typeof runpairs[0] === "number") - runpairs=[runpairs]; - */ + let runpairs=runInfo[task] || []; for (let i = 0; i < runpairs.length; i++) { let m = parseFloat(runpairs[i][1]); if (m > maxt) maxt = m; } + } + maxt=Math.ceil(maxt/20)*20; // draw Time axis; @@ -520,10 +513,8 @@ class StudyTaskManager { for (let i=0;i<taskNames.length;i++) { let task=taskNames[i]; - let runpairs=runInfo[task]; - // TODO: Fix this in parsing runpairs SHOULD ALWAYS by an array of arrays! - if (typeof runpairs[0] === "number") - runpairs=[runpairs]; + let runpairs=runInfo[task] || []; + let maxy=this.htaskbase+this.htask*(i+1)+OFFSET; let miny=maxy-0.8*this.htask;
1
diff --git a/token-metadata/0x7841B2A48D1F6e78ACeC359FEd6D874Eb8a0f63c/metadata.json b/token-metadata/0x7841B2A48D1F6e78ACeC359FEd6D874Eb8a0f63c/metadata.json "symbol": "KERMAN", "address": "0x7841B2A48D1F6e78ACeC359FEd6D874Eb8a0f63c", "decimals": 4, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/base/TapCursorMixin.js b/src/base/TapCursorMixin.js @@ -80,16 +80,16 @@ export default function TapCursorMixin(Base) { ? event.composedPath()[0] : event.target; - // Find which item was clicked on and, if found, make it current. For - // elements which don't require a cursor, a background click will + // Find which item was clicked on and, if found, make it current. Ignore + // clicks on disabled items. + // + // For elements which don't require a cursor, a background click will // determine the item was null, in which we case we'll remove the cursor. - const { items, currentIndex, currentItemRequired } = this[state]; + const { items, currentItemRequired } = this[state]; if (items && target instanceof Node) { const targetIndex = indexOfItemContainingTarget(items, target); - if ( - targetIndex >= 0 || - (!currentItemRequired && currentIndex !== targetIndex) - ) { + const item = targetIndex >= 0 ? items[targetIndex] : null; + if ((item && !item.disabled) || (!item && !currentItemRequired)) { this[setState]({ currentIndex: targetIndex, });
8
diff --git a/scene-previewer.js b/scene-previewer.js @@ -164,9 +164,9 @@ class ScenePreviewer extends THREE.Object3D { this.rendered = false; } async loadScene(sceneUrl) { - if (this.scene) { + /* if (this.scene) { this.detachScene(); - } + } */ const popPreviewContainerTransform = !this.focused ? this.#pushPreviewContainerTransform() : null; this.scene = await metaversefile.createAppAsync({ @@ -188,7 +188,7 @@ class ScenePreviewer extends THREE.Object3D { this.render(); } } - attachScene(scene) { + /* attachScene(scene) { this.scene = scene; this.previewContainer.add(scene); @@ -203,7 +203,7 @@ class ScenePreviewer extends THREE.Object3D { this.scene = null; } return oldScene; - } + } */ setFocus(focus) { this.focused = focus;
2
diff --git a/client/HowToPlay.jsx b/client/HowToPlay.jsx @@ -63,7 +63,7 @@ class HowToPlay extends React.Component { the conflict. You will also get the option to use a Manual Action in action windows which puts an announcement in chat and passes priority to your opponent, but won't have any other in-game effect.</p> <p>In manual mode, clicking cards and rings will bring up a menu which allows you to easily change the game state. Most of the functions in - these menus mirror the Manual Commands listed below, but there are a coupld of things which can only be done in menus. The ring menu lets + these menus mirror the Manual Commands listed below, but there are a couple of things which can only be done in menus. The ring menu lets you flip a ring, which you can use to change the conflict type during conflicts. You can also change the contested ring by selecting the ring you want to switch to and choosing the appropriate menu button. Finally, there is also an option to initiate a conflict in case someone passed by accident. NB: Initiate Conflict can only be used during a pre-conflict action window, and it won't count against your conflict
1
diff --git a/CHANGELOG.md b/CHANGELOG.md ## 14.13.0 - Added: `cacheStrategy` option ([#6357](https://github.com/stylelint/stylelint/pull/6357)) ([@kaorun343](https://github.com/kaorun343)). -- Fixed: `selector-pseudo-element-no-unknown` false positives for `::highlight` pseudo-element ([#6367](https://github.com/stylelint/stylelint/pull/6367)) ([@jathak](https://github.com/jathak)). - Fixed: cache refresh when config is changed ([#6356](https://github.com/stylelint/stylelint/pull/6356)) ([@kimulaco](https://github.com/kimulaco)). +- Fixed: `selector-pseudo-element-no-unknown` false positives for `::highlight` pseudo-element ([#6367](https://github.com/stylelint/stylelint/pull/6367)) ([@jathak](https://github.com/jathak)). ## 14.12.1
6
diff --git a/articles/tokens/index.html b/articles/tokens/index.html @@ -117,7 +117,7 @@ useCase: </p> <ul> <li> - <i class="icon icon-budicon-695"></i><a href="/libraries/lock-ios/save-and-refresh-jwt-tokens">Lock iOS: Saving and Refreshing JWT Tokens</a> + <i class="icon icon-budicon-695"></i><a href="/libraries/auth0-swift/save-and-refresh-jwt-tokens">Auth0.Swift: Saving and Refreshing JWT Tokens</a> </li> <li> <i class="icon icon-budicon-695"></i><a href="/libraries/lock-android/refresh-jwt-tokens">Lock Android: Refreshing JWT Tokens</a>
3
diff --git a/src/components/DemographicDetailView/index.js b/src/components/DemographicDetailView/index.js @@ -60,7 +60,7 @@ const DemographicDetailView = ({ demographics }) => { <div style={chartStyle}> <RechartsPie data={demographics.populations} - chartProportions={chartProportions} // eslint-disable-line max-len + chartProportions={chartProportions} colors={colors} styles={RechartsPieStyles} />
2
diff --git a/token-metadata/0xF80D589b3Dbe130c270a69F1a69D050f268786Df/metadata.json b/token-metadata/0xF80D589b3Dbe130c270a69F1a69D050f268786Df/metadata.json "symbol": "DAM", "address": "0xF80D589b3Dbe130c270a69F1a69D050f268786Df", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/commands/punish.js b/commands/punish.js const util = require('../lib/util.js'); exports.command = async (message, args, database, bot) => { - if (!await util.isMod(message.member)) { + if (!await util.isMod(message.member) && !message.member.hasPermission('MANAGE_GUILD')) { message.channel.send("You don't have the permission to execute this command."); return; }
11
diff --git a/package.json b/package.json "test-requirejs": "node tasks/test_requirejs.js", "test-plain-obj": "node tasks/test_plain_obj.js", "test": "npm run test-jasmine -- --nowatch && npm run test-bundle && npm run test-image && npm run test-export && npm run test-syntax && npm run lint", - "start-test_dashboard": "node devtools/test_dashboard/server.js", - "start": "npm run start-test_dashboard", + "start": "node devtools/test_dashboard/server.js", "baseline": "node test/image/make_baseline.js", "noci-baseline": "npm run cibuild && ./tasks/noci_test.sh image && git checkout dist && echo 'Please do not commit unless the change was expected!'", "preversion": "check-node-version --node 12 --npm 6.14 && npm-link-check && npm ls --prod",
2
diff --git a/weapons-manager.js b/weapons-manager.js @@ -847,14 +847,23 @@ const _makeRigCapsule = () => { return mesh; }; const rigCapsule = _makeRigCapsule(); -const _intersectRigs = raycaster => { - const intersections = raycaster.intersectObjects([rigCapsule], false, []); +const _intersectRigs = (() => { + const intersects = []; + return raycaster => { + const intersections = raycaster.intersectObjects([rigCapsule], false, intersects); if (intersections.length > 0) { - return intersections[0]; + const [{object, point, uv}] = intersects; + intersects.length = 0; + return { + object, + point, + uv, + }; } else { return null; } }; +})(); const _updateWeapons = timeDiff => { for (let i = 0; i < 2; i++) { anchorSpecs[i] = null; @@ -1173,7 +1182,27 @@ const _updateWeapons = timeDiff => { const _damage = dmg => { uiManager.hpMesh.damage(dmg); }; + const _openTradeMesh = (point, mesh) => { + for (const infoMesh of uiManager.infoMeshes) { + infoMesh.visible = false; + } + + const xrCamera = renderer.xr.getSession() ? renderer.xr.getCamera(camera) : camera; + uiManager.tradeMesh.position.copy(point); + localEuler.setFromQuaternion(localQuaternion.setFromUnitVectors( + new THREE.Vector3(0, 0, -1), + uiManager.tradeMesh.position.clone().sub(xrCamera.position).normalize() + ), 'YXZ'); + localEuler.x = 0; + localEuler.z = 0; + uiManager.tradeMesh.quaternion.setFromEuler(localEuler); + uiManager.tradeMesh.visible = true; + }; const _openDetailsMesh = (point, mesh) => { + for (const infoMesh of uiManager.infoMeshes) { + infoMesh.visible = false; + } + const xrCamera = renderer.xr.getSession() ? renderer.xr.getCamera(camera) : camera; uiManager.detailsMesh.position.copy(point); localEuler.setFromQuaternion(localQuaternion.setFromUnitVectors( @@ -1197,11 +1226,15 @@ const _updateWeapons = timeDiff => { if (anchorSpec.object.click) { // menu non-icon anchorSpec.object.click(anchorSpec); } else { // non-menu + if (anchorSpec.object === rigCapsule) { + _openTradeMesh(anchorSpec.point, anchorSpec.object); + } else { _openDetailsMesh(anchorSpec.point, anchorSpec.object); } } } } + } }; switch (selectedWeapon) { case 'rifle': { @@ -1437,9 +1470,17 @@ const _updateWeapons = timeDiff => { drawThingMesh.material.uniforms.uSelectColor.value.setHex(0xFFFFFF); drawThingMesh.material.uniforms.uSelectColor.needsUpdate = true; } */ + + if (rigCapsule.parent && !uiManager.tradeMesh.visible) { + rigCapsule.parent.remove(rigCapsule); + } + switch (selectedWeapon) { case 'select': { - if (raycastChunkSpec) { + if (anchorSpecs[0] && anchorSpecs[0].object === rigCapsule) { + rigCapsule.position.copy(anchorSpecs[0].object.position); + scene.add(rigCapsule); + } else if (raycastChunkSpec) { if (raycastChunkSpec.objectId === 0) { for (const material of geometryManager.currentChunkMesh.material) { const minX = Math.floor(raycastChunkSpec.point.x / SUBPARCEL_SIZE);
0
diff --git a/guides/airflow-vs-oozie.md b/guides/airflow-vs-oozie.md @@ -3,7 +3,7 @@ title: "Airflow vs. Oozie" description: "How Airflow differs from Oozie." date: 2018-05-21T00:00:00.000Z slug: "airflow-vs-oozie" -heroImagePath: "https://s3.amazonaws.com/astronomer-cdn/website/img/guides/Oozie+vs+Airflow.png" +heroImagePath: "https://assets.astronomer.io/website/img/guides/Oozie+vs+Airflow.png" tags: ["Oozie", "Competition"] --- @@ -29,17 +29,17 @@ While it has been used successfully by a few teams, [it has been reported](https As mentioned above, Airflow allows you to write your DAGs in Python while Oozie uses Java or XML. Per [Codecademy](https://codecademy.com)'s recent report, the Python community has grown exponentially in recent years, and even excelled to the most active programming language on Stack Overflow in 2017: -![pythongraph](https://s3.amazonaws.com/astronomer-cdn/website/img/guides/lo5t9UKVQ1VDW8zq1fQg_growth-of-python.png) +![pythongraph](https://assets.astronomer.io/website/img/guides/lo5t9UKVQ1VDW8zq1fQg_growth-of-python.png) ## Community Airflow is the most active workflow management tool on the market and has 8,636 stars on Github and 491 active contributors. See below for an image documenting code changes caused recent commits to the project. -![airflow](https://s3.amazonaws.com/astronomer-cdn/website/img/guides/Screen+Shot+2018-07-10+at+4.26.28+PM.png) +![airflow](https://assets.astronomer.io/website/img/guides/Screen+Shot+2018-07-10+at+4.26.28+PM.png) Oozie has 386 stars and 16 active contributors on Github. See below for an image documenting code changes caused by recent commits to the project. -![oozie](https://s3.amazonaws.com/astronomer-cdn/website/img/guides/Screen+Shot+2018-07-10+at+4.26.17+PM.png) +![oozie](https://assets.astronomer.io/website/img/guides/Screen+Shot+2018-07-10+at+4.26.17+PM.png) Note that, with open source projects, community contributions are significant in that they're reflective of the community's faith in the future of the project and indicate that features are actively being developed.
14
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -363,6 +363,7 @@ const loadPromise = (async () => { swordSideSlash: animations.find(a => a.name === 'sword_side_slash.fbx'), swordSideSlashStep: animations.find(a => a.name === 'sword_side_slash_step.fbx'), swordTopDownSlash: animations.find(a => a.name === 'sword_topdown_slash.fbx'), + swordTopDownSlashStep: animations.find(a => a.name === 'sword_topdown_slash_step.fbx'), swordUndraw: animations.find(a => a.name === 'sword_undraw.fbx'), }; useAnimations = mergeAnimations({
0
diff --git a/src/plots/mapbox/mapbox.js b/src/plots/mapbox/mapbox.js @@ -367,7 +367,10 @@ proto.resolveOnRender = function(resolve) { if(map.loaded()) { map.off('render', onRender); // resolve at end of render loop - setTimeout(resolve, 0); + // + // Need a 10ms delay (0ms should suffice to skip a thread in the + // render loop) to workaround mapbox-gl bug introduced in v1.3.0 + setTimeout(resolve, 10); } }); };
0
diff --git a/src/static/js/pad_automatic_reconnect.js b/src/static/js/pad_automatic_reconnect.js @@ -28,6 +28,7 @@ var createCountDownElementsIfNecessary = function($modal) { $('<span>') .attr('data-l10n-id', 'pad.modals.reconnecttimer') .text('Trying to reconnect in')) + .append(' ') .append( $('<span>') .addClass('timetoexpire'));
5
diff --git a/kotobaweb/src/bot/quiz_builder_components/font_editor.jsx b/kotobaweb/src/bot/quiz_builder_components/font_editor.jsx @@ -44,16 +44,16 @@ class FontEditor extends PureComponent { <div className="card-block-title" style={{ backgroundColor: this.props.fontSettings.backgroundColor }}> <h5 className="card-title d-inline-block" style={{ color: this.props.fontSettings.textColor }}>Font Settings</h5> </div> - <div className="card-body d-flex flex-row"> - <div className="mr-5"> + <div className="card-body d-flex flex-row flex-wrap"> + <div className="mr-5 mb-4"> <h6 className="text-center">Text Color</h6> <SketchPicker color={this.props.fontSettings.textColor} onChange={this.handleTextColorChanged} /> </div> - <div className="mr-5"> + <div className="mr-5 mb-4"> <h6 className="text-center">Background Color</h6> <SketchPicker color={this.props.fontSettings.backgroundColor} onChange={this.handleBackgroundColorChanged} /> </div> - <div> + <div className="mb-4"> <div className="form-group"> <label htmlFor="fontFamilySelect">Font Family</label> <select className="form-control" id="fontFamilySelect" onChange={this.handleFontFamilyChanged} >
11
diff --git a/articles/support/index.md b/articles/support/index.md @@ -117,7 +117,7 @@ The Support Program applies to **production instances** of the Auth0 Platform on Your Sales Order will indicate whether you are subscribed to the **Standard** Support Program or the **Enterprise** Support Program. The features of each program are as follows: -| Support Feature | Standard | Enterprise | +| Support Feature | Standard | Enterprise / Preferred | | - | - | - | | Answer questions concerning usage issues related to Auth0 Platform specific features, options and configurations | Yes | Yes | | Provide initial and high-level suggestions regarding the appropriate usage, features, or solution configurations for the particular type of reporting, analysis, or functionality | Yes | Yes | @@ -145,12 +145,12 @@ Auth0 will assign all Defects one of four response priorities, dependent upon th The priority of a Defect will dictate the timing and nature of the response as specified in the table below: -| Defect Severity Level | Target Response Time (Standard) | Target Response Time (Enterprise) | Solution Definition (one or more of the following) | +| Defect Severity Level | Target Response Time (Standard) | Target Response Time (Enterprise) | Target Response Time (Preferred) | Solution Definition (one or more of the following) | | - | - | - | - | -| 1 (Urgent) | 1 business hours | 30 minutes | Issue is resolved. Workaround is provided. Fix is provided. Fix incorporated into future release. | -| 2 (High) | 4 business hours | 2 hours | Issue is resolved. Workaround is provided. Fix is provided. Fix incorporated into future release. | -| 3 (Normal) | 1 business day | 12 hours | Issue is resolved. Workaround is provided. Fix incorporated into future release. Answer to question is provided. | -| 4 (Low) | 2 business days | 24 hours | Answer to question is provided. Enhancement request logged. | +| 1 (Urgent) | 1 business hours | 30 minutes | 30 minutes | Issue is resolved. Workaround is provided. Fix is provided. Fix incorporated into future release. | +| 2 (High) | 4 business hours | 2 hours | 1 hour | Issue is resolved. Workaround is provided. Fix is provided. Fix incorporated into future release. | +| 3 (Normal) | 1 business day | 12 hours | 8 hours | Issue is resolved. Workaround is provided. Fix incorporated into future release. Answer to question is provided. | +| 4 (Low) | 2 business days | 24 hours | 12 hours | Answer to question is provided. Enhancement request logged. | ## Program Hours @@ -158,7 +158,7 @@ Auth0 will provide support for Severity Level 1 Defects on a 24x7x365 basis. For all other defects, Auth0 will provide support during the hours specified below: -| Standard | Enterprise | +| Standard | Enterprise / Preferred | | - | - | | 6AM to 6PM (your local time) Monday to Friday | 24 hours a day, Monday to Friday (your local time) |
0
diff --git a/config/environments/test.rb b/config/environments/test.rb @@ -42,4 +42,6 @@ Rails.application.configure do # config.action_view.raise_on_missing_translations = true config.vapid_public_key = "BP0eSFqHWrs8xtF96UegaSl5rZJDbPkRen_9oQPZfq9q6iFmbwuELSKqm89qydRcG_F5xSsavxvbGyh_ci9_SQM=" config.vapid_private_key = "uGNkt259yGQDgGQYP1R4r3q1vTKkCddZe3rImyZvM4w=" + + config.action_mailer.default_url_options = { host: "example.com" } end
12
diff --git a/lib/core/file.js b/lib/core/file.js @@ -12,6 +12,7 @@ class File { this.path = options.path; this.basedir = options.basedir; this.resolver = options.resolver; + this.downloadedImports = false; } parseFileForImport(content, isHttpContract, callback) { @@ -52,12 +53,12 @@ class File { // We already parsed this file return callback(null, newContent); } - self.downloadedImports = true; async.each(filesToDownload, ((fileObj, eachCb) => { self.downloadFile(fileObj.fileRelativePath, fileObj.url, (_content) => { eachCb(); }); }), (err) => { + self.downloadedImports = true; callback(err, newContent); }); } @@ -98,7 +99,7 @@ class File { fs.readFile(filename, next); }, function parseForImports(content, next) { - self.parseFileForImport(content, true, (err) => { + self.parseFileForImport(content.toString(), true, (err) => { next(err, content); }); }
12
diff --git a/src/encoded/types/pipeline.py b/src/encoded/types/pipeline.py @@ -10,8 +10,10 @@ from .base import ( from .shared_calculated_properties import ( CalculatedAssayTermID ) +from pyramid.traversal import ( + find_root, +) -import re @collection( name='pipelines', @@ -53,7 +55,6 @@ class Pipeline(Item, CalculatedAssayTermID): class AnalysisStep(Item): item_type = 'analysis_step' schema = load_schema('encoded:schemas/analysis_step.json') - name_key = 'name' rev = { 'pipelines': ('Pipeline', 'analysis_steps'), 'versions': ('AnalysisStepVersion', 'analysis_step') @@ -65,16 +66,28 @@ class AnalysisStep(Item): 'parents' ] - ''' Add this back to use as @id if that change can be made. Current names will also need to be updated. + def unique_keys(self, properties): + keys = super(AnalysisStep, self).unique_keys(properties) + keys.setdefault('analysis_step:name', []).append(self._name(properties)) + return keys + @calculated_property(schema={ - "title": "Full name", + "title": "Name", "type": "string", "description": "Full name of the analysis step with major version number.", - "comment": "Do not submit. Value is automatically assigned by the server." + "comment": "Do not submit. Value is automatically assigned by the server.", + "uniqueKey": "name" }) - def fullname(self, name, major_version): - return u'{}-{}'.format(name, major_version) - ''' + def name(self): + return self.__name__ + + @property + def __name__(self): + properties = self.upgrade_properties() + return self._name(properties) + + def _name(self, properties): + return u'{}-v-{}'.format(properties['step_label'], properties['major_version']) @calculated_property(schema={ "title": "Pipelines", @@ -115,6 +128,7 @@ class AnalysisStep(Item): @collection( name='analysis-step-versions', + unique_key='analysis-step-version:name', properties={ 'title': 'Analysis step versions', 'description': 'Listing of Analysis Step Versions', @@ -125,18 +139,26 @@ class AnalysisStepVersion(Item): def unique_keys(self, properties): keys = super(AnalysisStepVersion, self).unique_keys(properties) - value = u'{analysis_step}/{minor_version}'.format(**properties) - keys.setdefault('analysis_step_version:analysis_step_minor_version', []).append(value) + keys.setdefault('analysis-step-version:name', []).append(self._name(properties)) return keys @calculated_property(schema={ "title": "Name", "type": "string", }) - def name(self, analysis_step, minor_version): - analysis_step = re.sub('^\/analysis-steps\/', '', analysis_step) - analysis_step = re.sub('/', '', analysis_step) - return u'{}-{}'.format(analysis_step, minor_version) + def name(self): + return self.__name__ + + @property + def __name__(self): + properties = self.upgrade_properties() + return self._name(properties) + + def _name(self, properties): + root = find_root(self) + analysis_step = root.get_by_uuid(properties['analysis_step']) + step_props = analysis_step.upgrade_properties() + return u'{}-v-{}-{}'.format(step_props['step_label'], step_props['major_version'], properties['minor_version']) @collection(
0
diff --git a/ReviewQueueHelper.user.js b/ReviewQueueHelper.user.js // @description Keyboard shortcuts, skips accepted questions and audits (to save review quota) // @homepage https://github.com/samliew/SO-mod-userscripts // @author @samliew -// @version 3.6.2 +// @version 3.6.3 // // @include https://*stackoverflow.com/review* // @include https://*serverfault.com/review* @@ -857,7 +857,7 @@ async function waitForSOMU() { // Select default radio based on previous votes, ignoring the off-topic reason let opts = popup.find('.s-badge__mini').not('.offtopic-indicator').get().sort((a, b) => Number(a.innerText) - Number(b.innerText)); const selOpt = $(opts).last().closest('li').find('input:radio').click(); - //console.log(opts, selOpt); + //console.log(opts, selOpt); debugger; // If selected option is in a subpane, display off-topic subpane instead const pane = selOpt.closest('.popup-subpane'); @@ -901,30 +901,43 @@ async function waitForSOMU() { // If dupe, edited, answered, positive score, skip review if(post.accepted || post.answers >= 2) { - console.log('AUTO SKIP - accepted or has answers'); toastMessage('AUTO SKIP - accepted or has answers'); skipReview(); return; } else if(post.votes > 1) { - console.log('AUTO SKIP - positive score'); toastMessage('AUTO SKIP - positive score'); skipReview(); return; } else if(currentReview.instructions.toLowerCase().includes('duplicate') || flaggedReason.toLowerCase().includes('duplicate')) { - console.log('AUTO SKIP - ignore dupe closure'); toastMessage('AUTO SKIP - ignore dupe closure'); skipReview(); return; } else if(post.content.length >= 700 && $('.reviewable-post').find('.post-signature').length === 2) { - console.log('AUTO SKIP - edited long question'); toastMessage('AUTO SKIP - edited long question'); skipReview(); return; } + // Ignore these close reasons on SO + if($('#closeReasonId-Duplicate').is(':checked')) { // dupes + toastMessage('AUTO SKIP - ignore dupes'); + skipReview(); + return; + } + else if($('#siteSpecificCloseReasonId-11-').is(':checked')) { // typos + toastMessage('AUTO SKIP - ignore typo'); + skipReview(); + return; + } + else if($('siteSpecificCloseReasonId-2-').is(':checked') || $('input[name="belongsOnBaseHostAddress"]:checked').length > 0) { // migrate + toastMessage('AUTO SKIP - ignore migration'); + skipReview(); + return; + } + // After short delay setTimeout(postId => { if(postId !== post.id) return; // Review changed, do nothing
8
diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js @@ -116,7 +116,9 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit if (!tx || !vm.originWallet) return; if (vm.paymentExpired) { - popupService.showAlert(null, gettextCatalog.getString('This bitcoin payment request has expired.')); + popupService.showAlert(null, gettextCatalog.getString('This bitcoin payment request has expired.', function () { + $ionicHistory.goBack(); + })); vm.sendStatus = ''; $timeout(function() { $scope.$apply(); @@ -486,20 +488,26 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit walletService.getAddress(vm.originWallet, false, function onReturnWalletAddress(err, returnAddr) { if (err) { ongoingProcess.set('connectingShapeshift', false); - popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString()); + popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString(), function () { + $ionicHistory.goBack(); + }); return; } walletService.getAddress(toWallet, false, function onWithdrawalWalletAddress(err, withdrawalAddr) { if (err) { ongoingProcess.set('connectingShapeshift', false); - popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString()); + popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString(), function () { + $ionicHistory.goBack(); + }); return; } shapeshiftService.shiftIt(vm.originWallet.coin, toWallet.coin, withdrawalAddr, returnAddr, function onShiftIt(err, shapeshiftData) { if (err && err != null) { ongoingProcess.set('connectingShapeshift', false); - popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString()); + popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString(), function () { + $ionicHistory.goBack(); + }); } else { vm.memo = 'ShapeShift Order:\nhttps://www.shapeshift.io/#/status/' + shapeshiftData.orderId; vm.memoExpanded = !!vm.memo; @@ -640,7 +648,9 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit $timeout(function() { $scope.$apply(); }); - popupService.showAlert(gettextCatalog.getString('Error at confirm'), bwcError.msg(msg)); + popupService.showAlert(gettextCatalog.getString('Error at confirm'), bwcError.msg(msg), function () { + $ionicHistory.goBack(); + }); }; function setupTx(tx) { @@ -825,7 +835,9 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit if (tx.sendMax && sendMaxInfo.amount == 0) { ongoingProcess.set('calculatingFee', false); setNotReady(gettextCatalog.getString('Insufficient confirmed funds')); - popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Not enough funds for fee')); + popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Not enough funds for fee'), function () { + $ionicHistory.goBack(); + }); return cb('no_funds'); }
9
diff --git a/ui/src/plugins/Platform.js b/ui/src/plugins/Platform.js @@ -50,6 +50,30 @@ function getPlatformMatch (userAgent) { [] } +const hasTouch = isSSR === false + ? 'ontouchstart' in window || window.navigator.maxTouchPoints > 0 + : false + +let unpatchedClientBrowser + +function applyIosCorrection (is) { + unpatchedClientBrowser = { is: Object.assign({}, is) } + + delete is.mac + delete is.desktop + + const platform = Math.min(window.innerHeight, window.innerWidth) > 414 + ? 'ipad' + : 'iphone' + + Object.assign(is, { + mobile: true, + ios: true, + platform, + [ platform ]: true + }) +} + function getPlatform (userAgent) { const platformMatch = getPlatformMatch(userAgent), @@ -196,6 +220,21 @@ function getPlatform (userAgent) { browser.nativeMobile = true browser.nativeMobileWrapper = 'cordova' } + else if ( + hasTouch === true && + browser.desktop === true && + browser.mac === true && + browser.safari === true + ) { + /* + * Correction needed for iOS since the default + * setting on iPad is to request desktop view; if we have + * touch support and the user agent says it's a + * desktop, we infer that it's an iPhone/iPad with desktop view + * so we must fix the false positives + */ + applyIosCorrection(browser) + } fromSSR = browser.nativeMobile === void 0 && browser.electron === void 0 && @@ -231,9 +270,7 @@ export const client = isSSR === false userAgent, is: getPlatform(userAgent), has: { - touch: (() => 'ontouchstart' in window || - window.navigator.maxTouchPoints > 0 - )(), + touch: hasTouch, webStorage: (() => { try { if (window.localStorage) { @@ -264,7 +301,8 @@ const Platform = { // must match with server-side before // client taking over in order to prevent // hydration errors - Object.assign(this, client, ssrClient) + Object.assign(this, client, unpatchedClientBrowser, ssrClient) + unpatchedClientBrowser = void 0 // takeover should increase accuracy for // the rest of the props; we also avoid
1
diff --git a/lib/build/files/webpack_files.js b/lib/build/files/webpack_files.js @@ -3,7 +3,7 @@ var files = { page: 'dashboard', stylesheets: [ '/stylesheets/common_new.css', - '/stylesheets/dashboard.css', + '/stylesheets/dashboard.css' ], scripts: [ '/javascripts/common.js', @@ -27,7 +27,7 @@ var files = { profile: { page: 'profile', stylesheets: [ - '/stylesheets/common_new.css', + '/stylesheets/common_new.css' ], scripts: [ '/javascripts/common.js',
2
diff --git a/docs/index.md b/docs/index.md @@ -251,6 +251,39 @@ If you are calling Facebook's API, be sure to send an `Accept: application/json` .end(callback) ``` +### HTTPS Request + +SuperAgent supports method to make HTTP request using TLS/SSL. + +- `.ca()`: Set the CA certificate(s) to trust +- `.cert()`: Set the client certificate chain(s) +- `.key()`: Set the client private key(s) +- `.pfx()`: Set the client PFX or PKCS12 encoded private key and certificate chain + +For more information, see Node.js [https.request docs](https://nodejs.org/api/https.html#https_https_request_options_callback). + +```js +var ca = fs.readFileSync('ca.cert.pem'), + key = fs.readFileSync('key.pem'), + cert = fs.readFileSync('cert.pem'); + +request + .post('/secure') + .ca(ca) + .key(key) + .cert(cert) + .end(callback); +``` + +```js +var pfx = fs.readFileSync('cert.pfx'); + +request + .post('/secure') + .pfx(pfx) + .end(callback); +``` + ## Parsing response bodies SuperAgent will parse known response-body data for you, currently supporting `application/x-www-form-urlencoded`, `application/json`, and `multipart/form-data`.
0
diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js @@ -44,12 +44,7 @@ function getMergeLogsAsJSON(fromRef, toRef) { // Then format as JSON and convert to a proper JS object const json = `[${sanitizedOutput}]`.replace('},]', '}]'); - try { return JSON.parse(json); - } catch (e) { - console.log('Invalid JSON found', json); - throw e; - } }); }
13
diff --git a/rig.js b/rig.js @@ -25,6 +25,7 @@ const animationFileNames = [ // `ybot.fbx`, `walking backwards.fbx`, `running backwards.fbx`, + `falling.fbx`, `falling idle.fbx`, `falling landing.fbx`, ]; @@ -44,8 +45,9 @@ const animationsSelectMap = { // `ybot.fbx`, 'walking backwards.fbx': new THREE.Vector3(0, 0, 0.5), 'running backwards.fbx': new THREE.Vector3(0, 0, 1), + 'falling.fbx': new THREE.Vector3(0, -1, 0), 'falling idle.fbx': new THREE.Vector3(0, -0.5, 0), - 'falling landing.fbx': new THREE.Vector3(0, -1, 0), + 'falling landing.fbx': new THREE.Vector3(0, -2, 0), }; let testRig = null, objects = [], animations = [], idleAnimation = null, jumpAnimation = null, lastPosition = new THREE.Vector3(), smoothVelocity = new THREE.Vector3(); (async () => { @@ -68,6 +70,29 @@ let testRig = null, objects = [], animations = [], idleAnimation = null, jumpAni */ } animations.forEach(animation => { + animation.direction = (() => { + switch (animation.name) { + case 'running.fbx': + case 'walking.fbx': + return 'forward'; + case 'running backwards.fbx': + case 'walking backwards.fbx': + return 'backward'; + case 'left strafe walking.fbx': + case 'left strafe.fbx': + return 'left'; + case 'right strafe walking.fbx': + case 'right strafe.fbx': + return 'right'; + case 'jump.fbx': + case 'falling.fbx': + case 'falling idle.fbx': + case 'falling idle.fbx': + return 'jump'; + default: + return null; + } + })(); animation.isIdle = /idle/i.test(animation.name); animation.isJump = /jump/i.test(animation.name); animation.initialDuration = animation.duration; @@ -538,8 +563,8 @@ class RigManager { 'mixamorigLeftToeBase.quaternion': null, }; const _selectAnimations = v => { - const jumpState = physicsMananager.getJumpState(); - const closestAnimations = animations.slice().sort((a, b) => { + // const jumpState = physicsMananager.getJumpState(); + const selectedAnimations = animations.slice().sort((a, b) => { const targetPosition1 = animationsSelectMap[a.name]; const distance1 = targetPosition1.distanceTo(v); @@ -548,15 +573,25 @@ class RigManager { return distance1 - distance2; }).slice(0, 2); - closestAnimations[0].duration = closestAnimations[1].duration = Math.max(closestAnimations[0].initialDuration, closestAnimations[1].initialDuration); - return closestAnimations; + /* const selectedAnimations = []; + for (let i = 0; i < closestAnimations.length; i++) { + const animation = closestAnimations[i]; + if (selectedAnimations.length === 0 || selectedAnimations[0].direction !== animation.direction) { + selectedAnimations.push(animation); + } + if (selectedAnimations.length >= 2) { + break; + } + } */ + selectedAnimations[0].duration = selectedAnimations[1].duration = Math.max(selectedAnimations[0].initialDuration, selectedAnimations[1].initialDuration); + return selectedAnimations; }; const currentPosition = this.localRig.outputs.hips.position.clone(); const positionDiff = lastPosition.clone() .sub(currentPosition) .multiplyScalar(10); - smoothVelocity.lerp(positionDiff, 0.9); + smoothVelocity.lerp(positionDiff, 0.7); const selectedAnimations = _selectAnimations(smoothVelocity.clone().applyQuaternion(this.localRig.outputs.hips.quaternion.clone().invert())); const distance1 = animationsSelectMap[selectedAnimations[0].name].distanceTo(positionDiff); @@ -587,7 +622,10 @@ class RigManager { dst.z = 0; dst.y -= testRig.hipsHeight * 1.25; } else { - dst.fromArray(v1).slerp(localQuaternion.fromArray(v2), factor2); + dst.fromArray(v1); + if (selectedAnimations[0].direction !== selectedAnimations[1].direction) { + dst.slerp(localQuaternion.fromArray(v2), factor2); + } } if (physicsMananager.getJumpState()) {
0
diff --git a/tests/pactHelper.js b/tests/pactHelper.js @@ -52,7 +52,7 @@ const shareResponseOcsData = function (node, shareType, id, permissions, fileTar if (shareType === 3) { res.appendElement('url', '', MatchersV3.regex( '.*\\/s\\/[a-zA-Z0-9]+', - config.backendHost + 's/yrkoLeS33y1aTya')) + getMockServerBaseUrl() + 's/yrkoLeS33y1aTya')) } return res } @@ -132,7 +132,7 @@ const sanitizeUrl = (url) => { const createOwncloud = function (username = config.adminUsername, password = config.adminPassword) { const oc = new OwnCloud({ - baseUrl: config.backendHost, + baseUrl: getMockServerBaseUrl(), auth: { basic: { username,
14
diff --git a/tutorial/dep.md b/tutorial/dep.md @@ -73,6 +73,8 @@ go.sum: go.mod Golang has a few dependency management tools. In this tutorial you will be using [`Go Modules`](https://github.com/golang/go/wiki/Modules). `Go Modules` uses a `go.mod` file in the root of the repository to define what dependencies the application needs. Cosmos SDK apps currently depend on specific versions of some libraries. The below manifest contains all the necessary versions. To get started replace the contents of the `./go.mod` file with the `constraints` and `overrides` below: +> _*NOTE*_: If you are following along in your own repo you will need to change the module path to reflect that (`github.com/{ .Username }/{ .Project.Repo }`). + ``` module sdk-application-tutorial
7
diff --git a/src/content/platform/limits.md b/src/content/platform/limits.md @@ -134,8 +134,7 @@ Each environment variable has a size limitation of 5 KiB. ### Script size -<!-- TODO(soon): Broken link to Bindings API documentation. --> -A Workers script plus any [Asset Bindings](/tooling/api/bindings) can be up to 1MB in size after compression. +A Workers script plus any [Asset Bindings](/platform/scripts#resource-bindings) can be up to 1MB in size after compression. ### Number of scripts
1
diff --git a/includes/Context.php b/includes/Context.php @@ -191,10 +191,12 @@ final class Context { // If currently in WP admin, run admin-specific checks. if ( is_admin() ) { // Support specific URL stats being checked in Site Kit dashboard details view. - $entity_url_query_param = 'googlesitekit-dashboard' === $this->input()->filter( INPUT_GET, 'page' ) ? $this->input()->filter( INPUT_GET, 'permaLink' ) : ''; + if ( 'googlesitekit-dashboard' === $this->input()->filter( INPUT_GET, 'page' ) ) { + $entity_url_query_param = $this->input()->filter( INPUT_GET, 'permaLink' ); if ( ! empty( $entity_url_query_param ) ) { return $this->get_reference_entity_from_url( $entity_url_query_param ); } + } $post = get_post(); if ( $post instanceof \WP_Post ) {
7
diff --git a/test/entity.spec.js b/test/entity.spec.js @@ -24,7 +24,6 @@ const expectedFiles = { `${CLIENT_MAIN_SRC_DIR}app/entities/foo/foo-delete-dialog.component.ts`, `${CLIENT_MAIN_SRC_DIR}app/entities/foo/foo-detail.component.ts`, `${CLIENT_MAIN_SRC_DIR}app/entities/foo/foo.service.ts`, - `${CLIENT_MAIN_SRC_DIR}app/entities/foo/foo-popup.service.ts`, `${CLIENT_MAIN_SRC_DIR}app/shared/model/foo.model.ts`, `${CLIENT_TEST_SRC_DIR}spec/app/entities/foo/foo-delete-dialog.component.spec.ts`, `${CLIENT_TEST_SRC_DIR}spec/app/entities/foo/foo-detail.component.spec.ts`, @@ -43,7 +42,6 @@ const expectedFiles = { `${CLIENT_MAIN_SRC_DIR}app/entities/foo-management/foo-management-delete-dialog.component.ts`, `${CLIENT_MAIN_SRC_DIR}app/entities/foo-management/foo-management-detail.component.ts`, `${CLIENT_MAIN_SRC_DIR}app/entities/foo-management/foo-management.service.ts`, - `${CLIENT_MAIN_SRC_DIR}app/entities/foo-management/foo-management-popup.service.ts`, `${CLIENT_MAIN_SRC_DIR}app/shared/model/foo-management.model.ts`, `${CLIENT_TEST_SRC_DIR}spec/app/entities/foo-management/foo-management-delete-dialog.component.spec.ts`, `${CLIENT_TEST_SRC_DIR}spec/app/entities/foo-management/foo-management-detail.component.spec.ts`, @@ -62,7 +60,6 @@ const expectedFiles = { `${CLIENT_MAIN_SRC_DIR}app/entities/test-root/foo/foo-delete-dialog.component.ts`, `${CLIENT_MAIN_SRC_DIR}app/entities/test-root/foo/foo-detail.component.ts`, `${CLIENT_MAIN_SRC_DIR}app/entities/test-root/foo/foo.service.ts`, - `${CLIENT_MAIN_SRC_DIR}app/entities/test-root/foo/foo-popup.service.ts`, `${CLIENT_MAIN_SRC_DIR}app/shared/model/test-root/foo.model.ts`, `${CLIENT_TEST_SRC_DIR}spec/app/entities/test-root/foo/foo-delete-dialog.component.spec.ts`, `${CLIENT_TEST_SRC_DIR}spec/app/entities/test-root/foo/foo-detail.component.spec.ts`, @@ -81,7 +78,6 @@ const expectedFiles = { `${CLIENT_MAIN_SRC_DIR}app/entities/test-root/foo-management/foo-management-delete-dialog.component.ts`, `${CLIENT_MAIN_SRC_DIR}app/entities/test-root/foo-management/foo-management-detail.component.ts`, `${CLIENT_MAIN_SRC_DIR}app/entities/test-root/foo-management/foo-management.service.ts`, - `${CLIENT_MAIN_SRC_DIR}app/entities/test-root/foo-management/foo-management-popup.service.ts`, `${CLIENT_MAIN_SRC_DIR}app/shared/model/test-root/foo-management.model.ts`, `${CLIENT_TEST_SRC_DIR}spec/app/entities/test-root/foo-management/foo-management-delete-dialog.component.spec.ts`, `${CLIENT_TEST_SRC_DIR}spec/app/entities/test-root/foo-management/foo-management-detail.component.spec.ts`,
2
diff --git a/src/traces/parcoords/lines.js b/src/traces/parcoords/lines.js @@ -176,7 +176,7 @@ function setAttributes(attributes, sampleCount, points) { function emptyAttributes(regl) { var attributes = {}; for(var i = 0; i < 16; i++) { - attributes['p' + i.toString(16)] = regl.buffer({usage: 'dynamic', type: 'float', data: null}); + attributes['p' + i.toString(16)] = regl.buffer({usage: 'dynamic', type: 'float', data: new Uint8Array()}); } return attributes; }
0
diff --git a/articles/quickstart/webapp/php/01-login.md b/articles/quickstart/webapp/php/01-login.md @@ -24,14 +24,11 @@ ${snippet(meta.snippets.dependencies)} ## Configure Auth0 PHP Plugin ```php -use Auth0\SDK\Auth0; +use Auth0\SDK\API\Authentication; -$auth0 = new Auth0(array( - 'domain' => '${account.namespace}', - 'client_id' => '${account.clientId}', - 'client_secret' => '${account.clientSecret}', - 'redirect_uri' => '${account.callback}' -)); +$auth0 = new Authentication('${account.namespace}', '${account.clientId}'); + +$auth0Oauth = $auth0->get_oauth_client('${account.clientSecret}', '${account.callback}'); ``` ## Add Auth0 Callback Handler @@ -42,7 +39,7 @@ Now, we can call `$auth0->getUser()` to retrieve the user information. If we cal // callback.php ... -$userInfo = $auth0->getUser(); +$userInfo = $auth0Oauth->getUser(); if (!$userInfo) { // We have no user info @@ -77,7 +74,7 @@ You can access the user information via the `getUser` method from Auth0 ```php <?php ... -$userInfo = $auth0->getUser(); +$userInfo = $auth0Oauth->getUser(); ?> <html> <body class="home">
3
diff --git a/TRANSLATIONS.md b/TRANSLATIONS.md @@ -22,11 +22,9 @@ Similar to Readme's, please translate the assignments as well. 1. Add your translation to the quiz-app by adding a file [here](https://github.com/microsoft/Web-Dev-For-Beginners/tree/main/quiz-app/src/assets/translations), with proper naming convention (en.json, fr.json). **Please don't localize the words 'true' or 'false' however. thanks!** -2. Add your language code to the dropdown in the quiz-app's App.vue file. +2. Edit the quiz-app's [translations index.js file](https://github.com/microsoft/Web-Dev-For-Beginners/blob/main/quiz-app/src/assets/translations/index.js) to add your language. -3. Edit the quiz-app's [translations index.js file](https://github.com/microsoft/Web-Dev-For-Beginners/blob/main/quiz-app/src/assets/translations/index.js) to add your language. - -4. Finally, edit ALL the quiz links in your translated README.md files to point directly to your translated quiz: https://ashy-river-0debb7803.1.azurestaticapps.net/quiz/1 becomes https://ashy-river-0debb7803.1.azurestaticapps.net/quiz/1?loc=id +3. Finally, edit ALL the quiz links in your translated README.md files to point directly to your translated quiz: https://ashy-river-0debb7803.1.azurestaticapps.net/quiz/1 becomes https://ashy-river-0debb7803.1.azurestaticapps.net/quiz/1?loc=id **THANK YOU**
3
diff --git a/common/components/utils/metrics.js b/common/components/utils/metrics.js @@ -3,6 +3,7 @@ import { TagDefinition } from "./ProjectAPIUtils.js"; import TagCategory from "../common/tags/TagCategory.jsx"; import Async from "./async.js"; import { SectionType } from "../enums/Section.js"; +import type { Dictionary } from "../types/Generics.jsx"; import _ from "lodash"; const tagCategoryEventMapping: { [key: string]: string } = _.fromPairs([ @@ -13,13 +14,18 @@ const tagCategoryEventMapping: { [key: string]: string } = _.fromPairs([ [TagCategory.PROJECT_STAGE, "addProjectStageTag"], ]); +type HeapInterface = {| + track: (eventName: string, properties: ?Dictionary<string | number>) => void, +|}; + +// TODO: Wait for window.heap to populate if it doesn't immediately +const heap: HeapInterface = window.heap; + function _logEvent( eventName: string, parameters: ?{ [key: string]: string } ): void { - Async.onEvent("fbLoaded", () => { - FB.AppEvents.logEvent(eventName, null, parameters); - }); + heap.track(eventName, parameters); } class metrics {
14
diff --git a/src/generic-provider-views/TableRow.js b/src/generic-provider-views/TableRow.js @@ -12,13 +12,16 @@ module.exports = (props) => { <input type="checkbox" role="option" tabindex="0" + aria-label="Select file: ${props.title}" id=${uniqueId} checked=${props.isChecked} disabled=${props.isDisabled} onchange=${props.handleCheckboxClick} /> <label for=${uniqueId}></label> </div> - <button class="BrowserTable-item" tabindex="0" onclick=${props.handleClick}>${props.getItemIcon()} ${props.title}</button> + <button type="button" class="BrowserTable-item" aria-label="Select file: ${props.title}" tabindex="0" onclick=${props.handleClick}> + ${props.getItemIcon()} ${props.title} + </button> </td> </tr> `
0
diff --git a/hotbar.js b/hotbar.js @@ -306,7 +306,10 @@ class HotbarRenderer { canvas.ctx = ctx; this.canvases.push(canvas); - + this.needsUpdate = true; + } + removeCanvas(canvas) { + this.canvases.splice(this.canvases.indexOf(canvas), 1); this.needsUpdate = true; } setSelected(selected) {
0
diff --git a/assets/js/modules/optimize/components/common/OptimizeSnippetNotice.js b/assets/js/modules/optimize/components/common/OptimizeSnippetNotice.js /** * WordPress dependencies */ -import { useMemo } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; /** @@ -45,34 +44,28 @@ export default function OptimizeSnippetNotice() { select( MODULES_ANALYTICS ).getUseSnippet() ); - const notice = useMemo( () => { + let notice = null; + if ( ! useUASnippet && analytics4ModuleConnected && ! useGA4Snippet ) { - return __( + notice = __( 'Site Kit is currently configured to neither place the Universal Analytics snippet nor the Google Analytics 4 snippet. If you have manually inserted these snippets, you will have to modify them to include the Optimize ID, or alternatively you will need to enable Site Kit to place them.', 'google-site-kit' ); - } - - if ( + } else if ( ! useUASnippet && ( ! analytics4ModuleConnected || useGA4Snippet ) ) { - return __( + notice = __( 'Site Kit is currently configured to not place the Universal Analytics snippet. If you have manually inserted this snippet, you will have to modify it to include the Optimize ID, or alternatively you will need to enable Site Kit to place it.', 'google-site-kit' ); - } - - if ( analytics4ModuleConnected && ! useGA4Snippet && useUASnippet ) { - return __( + } else if ( analytics4ModuleConnected && ! useGA4Snippet && useUASnippet ) { + notice = __( 'Site Kit is currently configured to not place the Google Analytics 4 snippet. If you have manually inserted this snippet, you will have to modify it to include the Optimize ID, or alternatively you will need to enable Site Kit to place it.', 'google-site-kit' ); } - return null; - }, [ analytics4ModuleConnected, useGA4Snippet, useUASnippet ] ); - if ( ! notice ) { return null; }
2
diff --git a/OurUmbraco.Site/Views/Partials/Navigation/TopNavigation.cshtml b/OurUmbraco.Site/Views/Partials/Navigation/TopNavigation.cshtml <li class="@(page.IsAncestorOrSelf(Model.Content) ? "current" : null)"> @if (page.Name == "Contribute") { - <a href="https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/.github/CONTRIBUTING.md" target="_blank">@page.Name</a> + <a href="https://github.com/umbraco/Umbraco-CMS/blob/v8/dev/.github/CONTRIBUTING.md" target="_blank">@page.Name</a> } else {
1
diff --git a/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java b/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java @@ -148,6 +148,9 @@ public class RNFetchBlobReq extends BroadcastReceiver implements Runnable { if(options.addAndroidDownloads.hasKey("path")) { req.setDestinationUri(Uri.parse("file://" + options.addAndroidDownloads.getString("path"))); } + if(options.addAndroidDownloads.hasKey("mime")) { + req.setMimeType(options.addAndroidDownloads.getString("mime")); + } // set headers ReadableMapKeySetIterator it = headers.keySetIterator(); while (it.hasNextKey()) {
12
diff --git a/source/app/action/index.mjs b/source/app/action/index.mjs if (dryrun) info("Actions to perform", "(none)") else { + await fs.mkdir(paths.dirname(paths.join("/renders", filename)), {recursive:true}) await fs.writeFile(paths.join("/renders", filename), Buffer.from(rendered)) info(`Save to /metrics_renders/${filename}`, "ok") }
9
diff --git a/docs/policies/README.md b/docs/policies/README.md @@ -8,7 +8,7 @@ The following documents set forth the legal policies for the project: - [Copyright][stdlib-copyright] - [License][stdlib-license] - [Privacy Policy][stdlib-privacy-policy] -- [Terms of Use][stdlib-terms-of-use] +- [Terms of Service][stdlib-terms-of-service] - [List of Official Domains][stdlib-domains] These documents are periodically updated. Please refer to the project [git history][stdlib-git-commit-log] to view the changes. @@ -23,7 +23,7 @@ These documents are periodically updated. Please refer to the project [git histo [stdlib-privacy-policy]: https://github.com/stdlib-js/stdlib/blob/develop/PRIVACY.md -[stdlib-terms-of-use]: https://github.com/stdlib-js/stdlib/blob/develop/docs/policies/TERMS_OF_USE.md +[stdlib-terms-of-service]: https://github.com/stdlib-js/stdlib/blob/develop/docs/policies/TERMS_OF_SERVICE.md [stdlib-domains]: https://github.com/stdlib-js/stdlib/blob/develop/docs/policies/domains.md
10
diff --git a/apps/aptsciclk/app.js b/apps/aptsciclk/app.js @@ -144,6 +144,7 @@ var curWarning = Math.floor(Math.random() * (maxWarning+1)); function buttonPressed(){ if (curWarning < maxWarning) curWarning += 1; else curWarning = 0; + g.reset(); buttonImg = getImg("butPress"); g.drawImage(buttonImg, 0, 0);
1
diff --git a/package.json b/package.json "homepage": "https://github.com/CityOfZion/neon-wallet", "author": "Ethan Fast <[email protected]> (https://github.com/Ejhfast)", "scripts": { - "postinstall": "electron-builder install-app-deps && electron-rebuild --force --module_dir . -w node-hid -v 1.7.11", + "postinstall": "electron-builder install-app-deps && electron-rebuild --force --module_dir . -w node-hid -v 1.8.4", "start": "cross-env NODE_ENV=production electron .", "assets": "cross-env NODE_ENV=production webpack --config ./config/webpack.config.prod", "dev": "cross-env START_HOT=1 NODE_ENV=development node_modules/.bin/webpack-dev-server --config ./config/webpack.config.dev",
3
diff --git a/packages/vulcan-core/lib/modules/components/Card/Card.jsx b/packages/vulcan-core/lib/modules/components/Card/Card.jsx @@ -73,6 +73,15 @@ const CardEditForm = ({ collection, document, closeModal, ...editFormProps }) => ); const Card = ({ title, className, collection, document, currentUser, fields, showEdit = true, Components, ...editFormProps }, { intl }) => { + + if (!document) { + return ( + <div> + <Components.FormattedMessage id="error.no_document" defaultMessage="No document" /> + </div> + ); + } + const fieldNames = fields ? fields : without(Object.keys(document), '__typename'); let canUpdate = false; @@ -90,7 +99,7 @@ const Card = ({ title, className, collection, document, currentUser, fields, sho user: currentUser, context: { Users }, operationName: 'update', - document + document, }); } else if (check) { canUpdate = check && check(currentUser, document, { Users }); @@ -101,7 +110,8 @@ const Card = ({ title, className, collection, document, currentUser, fields, sho className, 'datacard', typeName && `datacard-${typeName}`, - document && document._id && `datacard-${document._id}`); + document && document._id && `datacard-${document._id}` + ); return ( <div className={semantizedClassName}>
9
diff --git a/assets/js/components/legacy-notifications/dashboard-modules-alerts.js b/assets/js/components/legacy-notifications/dashboard-modules-alerts.js @@ -74,7 +74,7 @@ class DashboardModulesAlerts extends Component { title={ notification.title || '' } description={ notification.description || '' } blockData={ notification.blockData || [] } - winImage={ notification.winImage ? `${ global._googlesitekitLegacyData.admin.assetsRoot }images/${ notification.winImage }` : '' } + WinImageSVG={ notification.WinImageSVG || null } format={ notification.format || 'small' } learnMoreURL={ notification.learnMoreURL || '' } learnMoreDescription={ notification.learnMoreDescription || '' }
14
diff --git a/contracts/ExpectedRate.sol b/contracts/ExpectedRate.sol @@ -46,10 +46,11 @@ contract ExpectedRate is Withdrawable, ExpectedRateInterface, Utils { require(srcQty <= MAX_QTY); require(srcQty * quantityFactor <= MAX_QTY); + uint bestReserve; uint minSlippage; - expectedRate = kyberNetwork.findBestRates(src, dest, srcQty); - slippageRate = kyberNetwork.findBestRates(src, dest, (srcQty * quantityFactor)); + (bestReserve, expectedRate) = kyberNetwork.findBestRate(src, dest, srcQty); + (bestReserve, slippageRate) = kyberNetwork.findBestRate(src, dest, (srcQty * quantityFactor)); require(expectedRate <= MAX_RATE);
13
diff --git a/src/features/settings/settingsSlice.js b/src/features/settings/settingsSlice.js @@ -96,6 +96,29 @@ export const fetchTarkovTrackerProgress = createAsyncThunk( }, ); +const localStorageReadJson = (key, defaultValue) => { + try { + const value = localStorage.getItem(key); + + console.log('read', { key, value }); + + if (typeof value === 'string') { + return JSON.parse(value); + } + } catch (error) { + /* noop */ + } + + return defaultValue; +}; +const localStorageWriteJson = (key, value) => { + try { + localStorage.setItem(key, JSON.stringify(value)); + } catch (error) { + /* noop */ + } +}; + const settingsSlice = createSlice({ name: 'settings', initialState: { @@ -158,8 +181,7 @@ const settingsSlice = createSlice({ useTarkovTracker: JSON.parse(localStorage.getItem('useTarkovTracker')) || false, tarkovTrackerModules: [], - hideRemoteControl: - JSON.parse(localStorage.getItem('hide-remote-control')) || false, + hideRemoteControl: localStorageReadJson('hide-remote-control', false), }, reducers: { setTarkovTrackerAPIKey: (state, action) => { @@ -189,9 +211,9 @@ const settingsSlice = createSlice({ }, toggleHideRemoteControl: (state, action) => { state.hideRemoteControl = !state.hideRemoteControl; - localStorage.setItem( + localStorageWriteJson( 'hide-remote-control', - JSON.stringify(state.hideRemoteControl), + state.hideRemoteControl, ); }, },
4
diff --git a/app/src/common/constants/permissions.js b/app/src/common/constants/permissions.js @@ -91,7 +91,7 @@ export const PERMISSIONS_MAP = { [ACTIONS.EDIT_OWN_ACCOUNT]: ALL, [ACTIONS.DELETE_LAUNCH]: OWNER, [ACTIONS.EDIT_LAUNCH]: OWNER, - [ACTIONS.FORCE_FINISH_LAUNCH]: OWNER, + [ACTIONS.FORCE_FINISH_LAUNCH]: ALL, [ACTIONS.START_ANALYSIS]: ALL, [ACTIONS.DELETE_TEST_ITEM]: OWNER, [ACTIONS.MOVE_TO_DEBUG]: OWNER, @@ -128,7 +128,7 @@ export const PERMISSIONS_MAP = { [ACTIONS.EDIT_OWN_ACCOUNT]: ALL, [ACTIONS.DELETE_LAUNCH]: OWNER, [ACTIONS.EDIT_LAUNCH]: OWNER, - [ACTIONS.FORCE_FINISH_LAUNCH]: OWNER, + [ACTIONS.FORCE_FINISH_LAUNCH]: ALL, [ACTIONS.START_ANALYSIS]: ALL, [ACTIONS.DELETE_TEST_ITEM]: OWNER, [ACTIONS.MERGE_LAUNCHES]: OWNER,
11
diff --git a/plugins/auth/auth_proxy.js b/plugins/auth/auth_proxy.js @@ -90,19 +90,18 @@ exports.try_auth_proxy = function (connection, hosts, user, passwd, cb) { socket.on('line', function (line) { connection.logprotocol(self, "S: " + line); var matches = smtp_regexp.exec(line); - if (!matches) return; + if (!matches) { + connection.logerror(self, "unrecognised response: " + line); + socket.end(); + return; + } var code = matches[1]; var cont = matches[2]; var rest = matches[3]; response.push(rest); - if (cont !== ' ') { - // Unrecognized response. - connection.logerror(self, "unrecognized response: " + line); - socket.end(); - return; - } + if (cont !== ' ') return; connection.logdebug(self, 'command state: ' + command); if (command === 'ehlo') {
1
diff --git a/src/effects/effects.js b/src/effects/effects.js @@ -966,15 +966,20 @@ function addProficiencies(modifiers, name) { * @param {*} modifiers * @param {*} name */ -function addHPEffect(modifiers, name, consumable) { +function addHPEffect(ddb, modifiers, name, consumable) { let changes = []; // HP per level - const hpPerLevel = utils.filterModifiers(modifiers, "bonus", "hit-points-per-level").reduce((a, b) => a + b.value, 0); - if (hpPerLevel && hpPerLevel > 0) { - logger.debug(`Generating HP Per Level effects for ${name}`); - changes.push(generateAddChange(`${hpPerLevel} * @details.level`, 14, "data.attributes.hp.max")); + utils.filterModifiers(modifiers, "bonus", "hit-points-per-level").forEach((bonus) => { + const cls = utils.findClassByFeatureId(ddb, bonus.componentId); + if (cls) { + logger.debug(`Generating HP Per Level effects for ${name} for class ${cls.definition.name}`); + changes.push(generateAddChange(`${bonus.value} * @classes.${cls.definition.name.toLowerCase()}.levels`, 14, "data.attributes.hp.max")); + } else { + logger.debug(`Generating HP Per Level effects for ${name} for all levels`); + changes.push(generateAddChange(`${bonus.value} * @details.level`, 14, "data.attributes.hp.max")); } + }); const hpBonusModifiers = utils.filterModifiers(modifiers, "bonus", "hit-points"); if (hpBonusModifiers.length > 0 && !consumable) { @@ -1278,7 +1283,7 @@ function generateGenericEffects(ddb, character, ddbItem, foundryItem, isCompendi ); const profs = addProficiencies(ddbItem.definition.grantedModifiers, foundryItem.name); - const hp = addHPEffect(ddbItem.definition.grantedModifiers, foundryItem.name, ddbItem.definition.isConsumable); + const hp = addHPEffect(ddb, ddbItem.definition.grantedModifiers, foundryItem.name, ddbItem.definition.isConsumable); const skillBonus = addSkillBonuses(ddbItem.definition.grantedModifiers, foundryItem.name); const initiative = addInitiativeBonuses(ddbItem.definition.grantedModifiers, foundryItem.name); const disadvantageAgainst = addAttackRollDisadvantage(ddbItem.definition.grantedModifiers, foundryItem.name);
7
diff --git a/packages/cx/src/widgets/grid/Grid.js b/packages/cx/src/widgets/grid/Grid.js @@ -1706,6 +1706,7 @@ class GridComponent extends VDOM.Component { } moveCursor(index, {focused, hover, scrollIntoView, select, selectRange, selectOptions, cellIndex, cellEdit, cancelEdit} = {}) { + console.log(...arguments, new Error().stack) let {widget} = this.props.instance; if (!widget.selectable && !widget.cellEditable) return; @@ -1750,6 +1751,7 @@ class GridComponent extends VDOM.Component { this.setState(newState, () => { let wasCellEditing = prevState.focused && prevState.cellEdit; if (!this.state.cellEdit && wasCellEditing) { + if (focused) FocusManager.focus(this.dom.scroller); let record = this.getRecordAt(prevState.cursor); if ((!this.cellEditorValid || cancelEdit) && this.cellEditUndoData) @@ -1920,6 +1922,27 @@ class GridComponent extends VDOM.Component { } break; + case KeyCode.tab: + if (widget.cellEditable) { + e.stopPropagation(); + e.preventDefault(); + let cellIndex = (this.state.cursorCellIndex + 1) % widget.row.line1.columns.length; + let cursor = this.state.cursor + (cellIndex == 0 ? 1 : 0); + for (;;cursor++) { + let record = this.getRecordAt(cursor); + if (!record) break; + if (record.type != "data") continue; + this.moveCursor(cursor, { + focused: true, + cellIndex, + scrollIntoView: true, + cellEdit: false + }); + break; + } + } + break; + case KeyCode.down: for (let cursor = this.state.cursor + 1; ; cursor++) { let record = this.getRecordAt(cursor); @@ -1931,7 +1954,7 @@ class GridComponent extends VDOM.Component { focused: true, scrollIntoView: true, select: e.shiftKey, - selectRange: true + selectRange: true, }); e.stopPropagation(); e.preventDefault();
7
diff --git a/articles/cross-origin-authentication/index.md b/articles/cross-origin-authentication/index.md @@ -45,6 +45,10 @@ Note that using `crossOriginVerification` as a fallback will only work if the br Provide a page in your application which instantiates `WebAuth` from [auth0.js](/libraries/auth0js). Call `crossOriginVerification` immediately. The name of the page is at your discretion. +![Cross-Origin Authentication switch](/media/articles/cross-origin-authentication/cross-origin-settings.png) + +This URL should be added to the [Dashboard](${manage_url}) client settings (Advanced -> OAuth) in the **Cross Origin Authentication Location** field. + ```html <!-- callback-cross-auth.html -->
0
diff --git a/source/index/contracts/Index.sol b/source/index/contracts/Index.sol @@ -18,8 +18,15 @@ pragma experimental ABIEncoderV2; import "openzeppelin-solidity/contracts/ownership/Ownable.sol"; + /** * @title Index: A List of Locators + * @notice The Locators are sorted in reverse order based on the score + * meaning that the first element in the list has the largest score + * and final element has the smallest + * @dev A mapping is used to mimic a circular linked list structure + * where every mapping Entry contains a pointer to the next + * and the previous */ contract Index is Ownable {
3
diff --git a/src/js/Events.js b/src/js/Events.js @@ -431,7 +431,7 @@ function setuplisteners(canvas, data) { let used = Object.values(multiiddict); //find the smallest integer >= 1 that is not already used in O(n log n) - used = used.sort(); + used = used.sort((a, b) => a - b); //https://alligator.io/js/array-sort-numbers/ let isset = false; for (let k in used) { if (!isset && used[k] > (k | 0) + 1) {
11
diff --git a/articles/server-platforms/aspnet/01-login.md b/articles/server-platforms/aspnet/01-login.md @@ -15,7 +15,7 @@ budicon: 448 ] }) %> -## Install Auth0-ASPNET NuGet Package +## 1. Install Auth0-ASPNET NuGet Package Use the NuGet Package Manager (Tools -> Library Package Manager -> Package Manager Console) to install the **Auth0-ASPNET** package, running the command: @@ -23,23 +23,23 @@ ${snippet(meta.snippets.dependencies)} > This package will add a `LoginCallback.ashx` to your project, which will process the login. -## Configure Callback URLs +## 2. Configure Callback URLs -After authenticating the user on Auth0, we will do a POST to the `/LoginCallback.ashx` URL on your website, e.g. `http://localhost:PORT/LoginCallback.ashx`. For security purposes, you have to register this URL on the [Application Settings](${manage_url}/#/applications/${account.clientId}/settings) section on Auth0 Admin app. +After authenticating the user on Auth0, we will do a POST to the `/LoginCallback.ashx` URL on your website, e.g. `http://localhost:PORT/LoginCallback.ashx`. For security purposes, you have to register this URL in the [Client Settings](${manage_url}/#/applications/${account.clientId}/settings) section on Auth0 Admin app. ![Callback URLs](/media/articles/server-platforms/aspnet/callback_url.png) -## Filling Web.Config with your Auth0 Settings +## 3. Filling Web.Config with your Auth0 Settings The NuGet package also created three settings on `<appSettings>`. Replace those with the following settings: ${snippet(meta.snippets.setup)} -## Triggering Login Manually or Integrating Lock +## 4.Triggering Login Manually or Integrating Lock <%= include('../../_includes/_lock-sdk') %> -## Accessing User Information +## 5. Accessing User Information Once the user successfully authenticated to the application, a `ClaimsPrincipal` will be generated which can be accessed through the `Current` property: @@ -52,7 +52,7 @@ public ActionResult Index() The user profile is normalized regardless of where the user came from. We will always include these: `user_id`, `name`, `email`, `nickname` and `picture`. For more information about the user profile [read this](/user-profile). -## Further Reading +## 6. Further Reading ### Authorization @@ -88,7 +88,7 @@ public ActionResult Login(string returnUrl) } ``` -### Log Out +### Logout To clear the cookie generated on login, use the `FederatedAuthentication.SessionAuthenticationModule.SignOut()` method on the `AccountController\Logout` method.
1
diff --git a/src/lib/userStorage/UserModel.js b/src/lib/userStorage/UserModel.js // @flow +import { assign, mapValues, pick, pickBy } from 'lodash' import type { UserRecord } from '../API/api' import isMobilePhone from '../validators/isMobilePhone' import isValidUsername from '../validators/isValidUsername' @@ -53,7 +54,11 @@ const getEmailErrorMessage = (email?: string) => { * @returns {string} Mobile error message if invalid, or empty string */ const getMobileErrorMessage = (mobile?: string) => { - if (mobile && !isMobilePhone(mobile)) { + if (!mobile) { + return '' + } + + if (!isMobilePhone(mobile)) { return 'Please enter a valid phone format' } @@ -77,31 +82,47 @@ export const userModelValidations = { username: getUsernameErrorMessage, } +class UserModelClass { + constructor(userRecord) { + assign(this, userRecord) + } + + setAvatars(userRecord) { + const avatars = pick(userRecord, 'avatar', 'smallAvatar') + + assign(this, pickBy(avatars)) + } + + isValid(update: boolean = false) { + const errors = this.getErrors(update) + + return this._isValid(errors) + } + + validate(update: boolean = false) { + const errors = this.getErrors(update) + + return { isValid: this._isValid(errors), errors } + } + + getErrors(update: boolean = false) { + const fieldsToValidate = pick(this, 'email', 'mobile', 'username') + + // eslint-disable-next-line + return mapValues(fieldsToValidate, (value, field) => + false === update || value ? userModelValidations[field](value) : '', + ) + } + + _isValid(errors) { + return Object.keys(errors).every(key => errors[key] === '') + } +} + /** * Returns an object with record attributes plus some methods to validate, getErrors and check if it is valid * * @param {UserRecord} record - User record * @returns {UserModel} User model with some available methods */ -export const getUserModel = (record: UserRecord): UserModel => { - const _isValid = errors => Object.keys(errors).every(key => errors[key] === '') - - return { - ...record, - isValid: function(update: boolean = false) { - const errors = this.getErrors(update) - return _isValid(errors) - }, - getErrors: function(update: boolean = false) { - return { - email: update === false || this.email ? userModelValidations.email(this.email) : '', - mobile: update === false || this.mobile ? userModelValidations.mobile(this.mobile) : '', - username: update === false || this.username ? userModelValidations.username(this.username) : '', - } - }, - validate: function(update: boolean = false) { - const errors = this.getErrors(update) - return { isValid: _isValid(errors), errors } - }, - } -} +export const getUserModel = (record: UserRecord): UserModel => new UserModelClass(record)
3
diff --git a/src/middleware/boilerplates/mailer/templates/notification-mail.html b/src/middleware/boilerplates/mailer/templates/notification-mail.html <tr> <td style="font-size:18px;font-family:Arial,Helvetica,sans-serif;text-align:center;color:#ffffff;font-weight:normal;padding-left:14px;padding-right:14px;background-color:#e68c1e;border-radius:4px;border-collapse:separate;border:0px None #000" align="center" valign="middle" bgcolor="#e68c1e" width="auto" height="45"> <span style="color:#ffffff;font-weight:normal" class="button"> - <a style="text-decoration:none;color:#ffffff;font-weight:normal" href="{{ this.[pair:aboutPage] }}" rel="noopener noreferrer" target="_blank"> + <a style="text-decoration:none;color:#ffffff;font-weight:normal" href="{{{ this.[pair:aboutPage] }}}" rel="noopener noreferrer" target="_blank"> En savoir plus </a> </span>
7
diff --git a/js/web-server.js b/js/web-server.js @@ -907,9 +907,9 @@ function remap(path) { } // load module and call returned function with helper object -function loadModule(dir) { - const modjs = dir + "/init.js"; - lastmod(modjs) && require(modjs)({ +function initModule(file, dir) { + console.log({module:file}); + require(file)({ api: api, const: { script: script, @@ -951,7 +951,19 @@ function loadModule(dir) { reply404: reply404, reply: quickReply } - }); + }) +} + +// add static assets to be served +function addStatic(dir) { + console.log({static:dir}); + modPaths.push(serveStatic(dir)); +} + +// either add module assets to path or require(init.js) +function loadModule(dir) { + const modjs = dir + "/init.js"; + lastmod(modjs) ? initModule(modjs, dir) : addStatic(dir); } /* ********************************************* @@ -960,7 +972,10 @@ function loadModule(dir) { // load modules lastmod("mod") && fs.readdirSync(currentDir + "/mod").forEach(dir => { - loadModule(currentDir + "/mod/" + dir); + const fullpath = currentDir + "/mod/" + dir; + if (dir.charAt(0) === '.') return; + if (!fs.lstatSync(fullpath).isDirectory()) return; + loadModule(fullpath); }); // create cache dir if missing
11
diff --git a/packages/stockflux-launcher/public/app.dev.json b/packages/stockflux-launcher/public/app.dev.json "devtools_port": 9091, "runtime": { "arguments": "--enable-aggressive-domstorage-flushing", - "version": "12.69.43.22" + "version": "13.76.43.31" }, "startup_app": { "name": "stockflux-launcher",
13
diff --git a/src/injected/utils/index.js b/src/injected/utils/index.js @@ -16,26 +16,27 @@ function removeElement(id) { } } -let doInject; -export function inject(code) { - if (!doInject) { - const id = getUniqId('VM-'); - const detect = domId => { - const span = document.createElement('span'); - span.id = domId; - document.documentElement.appendChild(span); - }; - injectViaText(`(${detect.toString()})(${jsonDump(id)})`); - if (removeElement(id)) { - doInject = injectViaText; - } else { - // For Firefox in CSP limited pages - doInject = injectViaBlob; - } - } - doInject(code); -} +// let doInject; +// export function inject(code) { +// if (!doInject) { +// const id = getUniqId('VM-'); +// const detect = domId => { +// const span = document.createElement('span'); +// span.id = domId; +// document.documentElement.appendChild(span); +// }; +// injectViaText(`(${detect.toString()})(${jsonDump(id)})`); +// if (removeElement(id)) { +// doInject = injectViaText; +// } else { +// // For Firefox in CSP limited pages +// doInject = injectViaBlob; +// } +// } +// doInject(code); +// } +export const inject = injectViaText; function injectViaText(code) { const script = document.createElement('script'); const id = getUniqId('VM-'); @@ -47,18 +48,19 @@ function injectViaText(code) { } // Firefox does not support script injection by `textCode` in CSP limited pages -// have to inject via blob URL, leading to delayed first injection -function injectViaBlob(code) { - const script = document.createElement('script'); - // https://en.wikipedia.org/wiki/Byte_order_mark - const blob = new Blob(['\ufeff', code], { type: 'text/javascript' }); - const url = URL.createObjectURL(blob); - script.src = url; - document.documentElement.appendChild(script); - const { parentNode } = script; - if (parentNode) parentNode.removeChild(script); - URL.revokeObjectURL(url); -} +// have to inject via blob URL, leading to delayed first injection. +// This is rejected by Firefox reviewer. +// function injectViaBlob(code) { +// const script = document.createElement('script'); +// // https://en.wikipedia.org/wiki/Byte_order_mark +// const blob = new Blob(['\ufeff', code], { type: 'text/javascript' }); +// const url = URL.createObjectURL(blob); +// script.src = url; +// document.documentElement.appendChild(script); +// const { parentNode } = script; +// if (parentNode) parentNode.removeChild(script); +// URL.revokeObjectURL(url); +// } export function getUniqId() { return Date.now().toString(36) + Math.random().toString(36).slice(2, 6);
1
diff --git a/Makefile b/Makefile @@ -24,7 +24,7 @@ setup-build-dir: chrome-release-zip: rm -f build/chrome/release/chrome-release-*.zip - zip -r build/chrome/release/chrome-release-$(shell date +"%Y%m%d_%H%M%S").zip build/chrome/release + cd build/chrome/release/ && zip -rq chrome-release-$(shell date +"%Y%m%d_%H%M%S").zip * fonts: mkdir -p build/$(browser)/$(type)/public
3
diff --git a/assets/js/googlesitekit/modules/datastore/settings-panel.test.js b/assets/js/googlesitekit/modules/datastore/settings-panel.test.js /** * Internal dependencies */ -import Data from 'googlesitekit-data'; -import Modules from 'googlesitekit-modules'; import { STORE_NAME } from './constants'; import { initialState } from './settings-panel'; import { createTestRegistry } from '../../../../../tests/js/utils'; @@ -29,21 +27,10 @@ describe( 'core/modules settings-panel', () => { let registry; let store; const slug = 'test-module'; - const moduleStoreName = `modules/${ slug }`; const expectedInitialState = { ...initialState.settingsPanel }; beforeEach( () => { - const storeDefinition = Modules.createModuleStore( moduleStoreName ); - registry = createTestRegistry(); - registry.dispatch( STORE_NAME ).receiveGetModules( [ - { slug, active: true }, - ] ); - - registry.registerStore( moduleStoreName, Data.combineStores( - storeDefinition, - ) ); - store = registry.stores[ STORE_NAME ].store; } );
2
diff --git a/packages/2019-transportation/src/components/MorningRush/MorningRushVisualization.js b/packages/2019-transportation/src/components/MorningRush/MorningRushVisualization.js @@ -55,9 +55,7 @@ const MorningRushVisualization = ({ data }) => { <> <BaseMap> <ScatterPlotMap - data={data.busAmRushSummary.value.results.features - .filter(feature => feature.properties.samples > 100) - .map(feature => { + data={data.busAmRushSummary.value.results.features.map(feature => { const featureWithTotalOnOffs = feature; featureWithTotalOnOffs.properties.total_ons_offs = totalOnsOffsAccessor( feature
2
diff --git a/CHANGELOG.md b/CHANGELOG.md All notable changes to this project are documented in this file. -## Head +## 14.6.0 - Added: `declaration-property-max-values` rule ([#5920](https://github.com/stylelint/stylelint/pull/5920)). - Fixed: `*-no-important` column position ([#5957](https://github.com/stylelint/stylelint/pull/5957)).
6
diff --git a/sirepo/server.py b/sirepo/server.py @@ -31,7 +31,7 @@ import werkzeug.exceptions #TODO(pjm): this import is required to work-around template loading in listSimulations, see #1151 -if any(k in feature_config.cfg().sim_types for k in ('flash', 'rs4pi', 'synergia', 'warppba', 'warpvnd')): +if any(k in feature_config.cfg().sim_types for k in ('flash', 'rs4pi', 'rsradia', 'synergia', 'warppba', 'warpvnd')): import h5py #: See sirepo.srunit
11
diff --git a/js/bootstrap-select.js b/js/bootstrap-select.js this.tabIndex(); - var selectedItems = $selectOptions.map(function () { + // limit title to 100 options + // anything more is too slow + var selectedItems = $selectOptions.slice(0, 100).map(function () { if (this.selected) { if (that.options.hideDisabled && (this.disabled || this.parentNode.tagName === 'OPTGROUP' && this.parentNode.disabled)) return; //Fixes issue in IE10 occurring when no default option is selected and at least one option is disabled //Convert all the values into a comma delimited string var title = !this.multiple ? selectedItems[0] : selectedItems.join(this.options.multipleSeparator); + // add ellipsis + if ($selectOptions.length > 100 && selectedItems.length === 100) title += '...'; //If this is multi select, and the selectText type is count, the show 1 of 2 selected etc.. if (this.multiple && this.options.selectedTextFormat.indexOf('count') > -1) { }, togglePlaceholder: function () { - var value = this.$element.val(); - this.$button.toggleClass('bs-placeholder', value === null || value === '' || (value.constructor === Array && value.length === 0)); + // much faster than calling $.val() + var nothingSelected = this.$element[0].selectedIndex === -1; + this.$button.toggleClass('bs-placeholder', nothingSelected); }, tabIndex: function () { if (!this.multiple) return; if (typeof status === 'undefined') status = true; - this.findLis(); - - var $options = this.$element.find('option'), - $lisVisible = this.$lis.not('.divider, .dropdown-header, .disabled, .hidden'), - lisVisLen = $lisVisible.length, - selectedOptions = []; - - if (status) { - if ($lisVisible.filter('.selected').length === $lisVisible.length) return; - } else { - if ($lisVisible.filter('.selected').length === 0) return; - } + var $selectOptions = this.$element.find('option'); - $lisVisible.toggleClass('selected', status); + for (var i = 0; i < this.viewObj._currentLis.length; i++) { + var index = this.viewObj.current_optionObj[i], // faster than $(li).data('originalIndex') + option = $selectOptions.eq(index)[0]; - for (var i = 0; i < lisVisLen; i++) { - var origIndex = $lisVisible[i].getAttribute('data-original-index'); - selectedOptions[selectedOptions.length] = $options.eq(origIndex)[0]; + if (option) option.selected = status; } - $(selectedOptions).prop('selected', status); - - this.render(); + this.setOptionStatus(); this.togglePlaceholder();
7
diff --git a/packages/idyll-cli/src/pipeline/parse.js b/packages/idyll-cli/src/pipeline/parse.js @@ -163,7 +163,11 @@ exports.getHighlightJS = (ast, paths, server) => { if (languageMap[language]) { cleanedLanguage = languageMap[language]; } + try { rsh.registerLanguage(language, require(slash(path.join(rshPath, 'languages', cleanedLanguage))).default); + } catch(e) { + console.warn(`Warning: could not find syntax highlighter for ${language}`); + } }); return; } @@ -175,7 +179,13 @@ exports.getHighlightJS = (ast, paths, server) => { if (languageMap[language]) { cleanedLanguage = languageMap[language]; } - js += `\nrsh.registerLanguage('${language}', require('${slash(path.join(rshPath, 'languages', cleanedLanguage))}').default);` + js += ` + try { + rsh.registerLanguage('${language}', require('${slash(path.join(rshPath, 'languages', cleanedLanguage))}').default); + } catch(e) { + console.warn("Warning: could not find syntax highlighter for ${language}"); + } + ` }); return js;
9
diff --git a/token-metadata/0x56015BBE3C01fE05bc30A8a9a9Fd9A88917e7dB3/metadata.json b/token-metadata/0x56015BBE3C01fE05bc30A8a9a9Fd9A88917e7dB3/metadata.json "symbol": "CAT", "address": "0x56015BBE3C01fE05bc30A8a9a9Fd9A88917e7dB3", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/6_branch.js b/src/6_branch.js @@ -767,6 +767,11 @@ Branch.prototype['track'] = wrap(callback_params.CALLBACK_ERR, function(done, ev options = options || {}; + if (event && event === "pageview") { + // For targeting Journeys based on hosted deep link data + metadata = utils.addPropertyIfNotNull(metadata, "hosted_deeplink_data", utils.getHostedDeepLinkData()); + } + self._api(resources.event, { "event": event, "metadata": utils.merge({
11
diff --git a/edit.js b/edit.js @@ -1829,10 +1829,13 @@ const _renderObjects = () => { objectsEl.innerHTML = ` <div class=object-detail> <h1><nav class=back-button><i class="fa fa-arrow-left"></i></nav>${p.name}</h1> - <img class=screenshot draggable=true> - <!-- <nav class="button reload-button">Reload</nav> --> + <img class=screenshot draggable=true style="display: none;"> + ${p.hash ? `\ <nav class="button inspect-button">Inspect</nav> <nav class="button wear-button">Wear</nav> + ` : `\ + <nav class="button upload-button">Upload</nav> + `} <nav class="button remove-button">Remove</nav> <b>Position</b> <div class=row> @@ -1912,6 +1915,26 @@ const _renderObjects = () => { backButton.addEventListener('click', e => { _setSelectTarget(null); }); + (async () => { + const img = objectsEl.querySelector('.screenshot'); + const u = await p.getScreenshotImageUrl(); + img.src = u; + img.onload = () => { + URL.revokeObjectURL(u); + img.style.display = null; + }; + img.onerror = err => { + console.warn(err); + URL.revokeObjectURL(u); + }; + img.addEventListener('dragstart', e => { + _startPackageDrag(e, { + name: p.name, + id: p.id, + }); + }); + })(); + if (p.hash) { const inspectButton = objectsEl.querySelector('.inspect-button'); inspectButton.addEventListener('click', async e => { const b = new Blob([p.data], { @@ -1920,15 +1943,23 @@ const _renderObjects = () => { const u = URL.createObjectURL(b); window.open(`inspect.html?u=${u}`, '_blank'); }); - /* const reloadButton = objectsEl.querySelector('.reload-button'); - reloadButton.addEventListener('click', async e => { - await p.reload(); - }); */ const wearButton = objectsEl.querySelector('.wear-button'); wearButton.addEventListener('click', async e => { const dataHash = await p.getHash(); loginManager.setAvatar(dataHash); }); + } else { + const uploadButton = objectsEl.querySelector('.upload-button'); + uploadButton.addEventListener('click', async e => { + const {hash} = await fetch(`${apiHost}/`, { + method: 'PUT', + body: p.data, + }) + .then(res => res.json()); + p.hash = hash; + _renderObjects(); + }); + } const removeButton = objectsEl.querySelector('.remove-button'); removeButton.addEventListener('click', e => { pe.remove(p); @@ -2003,25 +2034,6 @@ const _renderObjects = () => { p.sendEvent(name, value); }); }); - - (async () => { - const img = objectsEl.querySelector('.screenshot'); - const u = await p.getScreenshotImageUrl(); - img.src = u; - img.onload = () => { - URL.revokeObjectURL(u); - }; - img.onerror = err => { - console.warn(err); - URL.revokeObjectURL(u); - }; - img.addEventListener('dragstart', e => { - _startPackageDrag(e, { - name: p.name, - id: p.id, - }); - }); - })(); } else { if (pe.children.length > 0) { const _renderChildren = (objectsEl, children, depth) => {
0
diff --git a/etc/dtslint/tslint.json b/etc/dtslint/tslint.json "indent": [ true, "tabs", 4 ], "linebreak-style": [ true, "LF" ], "max-classes-per-file": [ true, 1 ], - "max-file-line-count": [ true, 300 ], + "max-file-line-count": [ true, 1000 ], "max-line-length": [ true, { "limit": 80,
11
diff --git a/slick.grid.js b/slick.grid.js @@ -1254,6 +1254,14 @@ if (typeof Slick === "undefined") { .on('mouseleave', onMouseLeave); } + if(m.hasOwnProperty('headerCellAttrs') && m.headerCellAttrs instanceof Object) { + for (var key in m.headerCellAttrs) { + if (m.headerCellAttrs.hasOwnProperty(key)) { + header.attr(key, m.headerCellAttrs[key]); + } + } + } + if (m.sortable) { header.addClass("slick-header-sortable"); header.append("<span class='slick-sort-indicator" @@ -3121,7 +3129,7 @@ if (typeof Slick === "undefined") { var toolTip = formatterResult && formatterResult.toolTip ? "title='" + formatterResult.toolTip + "'" : ''; var customAttrStr = ''; - if(m.cellAttrs) { + if(m.hasOwnProperty('cellAttrs') && m.cellAttrs instanceof Object) { for (var key in m.cellAttrs) { if (m.cellAttrs.hasOwnProperty(key)) { customAttrStr += ' ' + key + '="' + m.cellAttrs[key] + '" ';
7
diff --git a/types.d.ts b/types.d.ts @@ -24,27 +24,47 @@ interface JQueryDataTables extends JQuery { } declare global { - interface jQueryDataTable extends DataTables.StaticFunctions { - (opts?: DataTables.Settings): JQueryDataTables; - } - interface JQuery { + /** + * Create a new DataTable, returning a DataTables API instance. + * @param opts Configuration settings + */ DataTable<T = any>(opts?: DataTables.Settings): DataTables.Api<T>; - dataTable: jQueryDataTable; + + /** + * Create a new DataTable, returning a jQuery object, extended + * with an `api()` method which can be used to access the + * DataTables API. + * @param opts Configuration settings + */ + dataTable(opts?: DataTables.Settings): JQueryDataTables; } } /** - * DataTables API class object (recursive) + * DataTables class */ declare interface Api<T> extends DataTables.StaticFunctions { - new <T=any>(opts?: DataTables.Settings): DataTables.Api<T> + /** + * Create a new DataTable + * @param selector Selector to pick one or more `<table>` elements + * @param opts Configuration settings + */ + new <T=any>( + selector: DataTables.InstSelector, + opts?: DataTables.Settings + ): DataTables.Api<T> } declare const Api: Api<any>; export default Api; declare namespace DataTables { + type InstSelector = + string | + Node | + JQuery; + type RowIdx = number; type RowSelector<T> = RowIdx |
1
diff --git a/src/functionHelper.js b/src/functionHelper.js @@ -116,7 +116,9 @@ exports.createExternalHandler = function createExternalHandler( function handleFatal(error) { debugLog(`External handler received fatal error ${stringify(error)}`); - handlerContext.inflight.forEach((id) => messageCallbacks[id](error)); + handlerContext.inflight.forEach((id) => { + messageCallbacks[id](error); + }); handlerContext.inflight.clear(); delete handlerCache[funOptions.handlerPath]; }
0
diff --git a/src/components/rangeslider/draw.js b/src/components/rangeslider/draw.js @@ -236,21 +236,24 @@ function setupDragElement(rangeSlider, gd, axisOpts, opts) { var grabAreaMin = rangeSlider.select('rect.' + constants.grabAreaMinClassName).node(); var grabAreaMax = rangeSlider.select('rect.' + constants.grabAreaMaxClassName).node(); - rangeSlider.on('mousedown', function() { + function mouseDownHandler() { var event = d3.event; var target = event.target; - var startX = event.clientX; + var startX = event.clientX || event.touches[0].clientX; var offsetX = startX - rangeSlider.node().getBoundingClientRect().left; var minVal = opts.d2p(axisOpts._rl[0]); var maxVal = opts.d2p(axisOpts._rl[1]); var dragCover = dragElement.coverSlip(); + this.addEventListener('touchmove', mouseMove); + this.addEventListener('touchend', mouseUp); dragCover.addEventListener('mousemove', mouseMove); dragCover.addEventListener('mouseup', mouseUp); function mouseMove(e) { - var delta = +e.clientX - startX; + var clientX = e.clientX || e.touches[0].clientX; + var delta = +clientX - startX; var pixelMin, pixelMax, cursor; switch(target) { @@ -295,9 +298,14 @@ function setupDragElement(rangeSlider, gd, axisOpts, opts) { function mouseUp() { dragCover.removeEventListener('mousemove', mouseMove); dragCover.removeEventListener('mouseup', mouseUp); + this.removeEventListener('touchmove', mouseMove); + this.removeEventListener('touchend', mouseUp); Lib.removeElement(dragCover); } - }); + } + + rangeSlider.on('mousedown', mouseDownHandler); + rangeSlider.on('touchstart', mouseDownHandler); } function setDataRange(rangeSlider, gd, axisOpts, opts) {
0
diff --git a/src/events/http/lambda-events/LambdaProxyIntegrationEvent.js b/src/events/http/lambda-events/LambdaProxyIntegrationEvent.js @@ -175,13 +175,13 @@ export default class LambdaProxyIntegrationEvent { userAgent: _headers['user-agent'] || '', userArn: 'offlineContext_userArn', }, - path: route.path, + path: this.#path, protocol: 'HTTP/1.1', requestId: createUniqueId(), requestTime, requestTimeEpoch, resourceId: 'offlineContext_resourceId', - resourcePath: this.#path, + resourcePath: route.path, stage: this.#stage, }, resource: this.#path,
1
diff --git a/src/components/send-money/SendMoneyAmountInput.js b/src/components/send-money/SendMoneyAmountInput.js @@ -81,7 +81,7 @@ class SendMoneyAmountInput extends Component { let amountAttoNear = '' if (value !== '') { let input = new Big(value).times(new Big(10).pow(NOMINATION)) - amountAttoNear = input.toString() + amountAttoNear = input.toFixed() let balance = new Big(this.props.amount) if (balance.sub(input).s < 0) { amountStatus = 'Not enough tokens.'
1
diff --git a/tools/subgraph/src/PricingHelper.ts b/tools/subgraph/src/PricingHelper.ts @@ -27,7 +27,7 @@ function getTokenDecimals(tokenAddress: string): BigInt { if (value.reverted) { return BigInt.fromI32(0) } - return value.value + return BigInt.fromI32(value.value) } export function computeFeeAmountUsd(signerToken: string, signerAmount: BigInt, signerFee: BigInt, divisor: BigInt): BigInt { @@ -37,8 +37,8 @@ export function computeFeeAmountUsd(signerToken: string, signerAmount: BigInt, s let signerTokenPriceNormalizedx64 = signerTokenPrice.times(base64).div(BigInt.fromI32(10).pow(8)) //should be a decimal whole, precision kept by base64 let feeAmount = signerAmount.times(signerFee).div(divisor) // quantity of token - let tokenDecimals = getTokenDecimals(signerToken) // 6,8,18 decimals - depends on the token - let feeAmountNormalizedx64 = feeAmount.times(base64).div(BigInt.fromI32(10).pow(tokenDecimals)) // should be a decimal whole, precision kept by base64 + let tokenDecimals: BigInt = getTokenDecimals(signerToken) // 6,8,18 decimals - depends on the token + let feeAmountNormalizedx64 = feeAmount.times(base64).div(BigInt.fromI32(10).pow(<u8>tokenDecimals)) // should be a decimal whole, precision kept by base64 let priceUsdx64 = feeAmountNormalizedx64.times(signerTokenPriceNormalizedx64) let priceUsd = priceUsdx64.div(base64)
9
diff --git a/src/encoded/tests/test_upgrade_file.py b/src/encoded/tests/test_upgrade_file.py @@ -98,6 +98,15 @@ def file_9(file_base): return item [email protected] +def file_10(file_base): + item = file_base.copy() + item.update({ + 'schema_version': '10' + }) + return item + + @pytest.fixture def old_file(experiment): return { @@ -188,3 +197,9 @@ def test_file_upgrade8(upgrader, file_8a, file_8b): def test_file_upgrade_9_to_10(upgrader, file_9): value = upgrader.upgrade('file', file_9, current_version='9', target_version='10') assert value['date_created'] == '2017-04-28T00:00:00.000000+00:00' + + +def test_file_upgrade_10_to_11(upgrader, file_10): + value = upgrader.upgrade('file', file_10, current_version='10', target_version='11') + assert value['schema_version'] == '11' + assert value['no_file_available'] is False
0
diff --git a/packages/kotlin-webpack-plugin/example/webpack.config.js b/packages/kotlin-webpack-plugin/example/webpack.config.js @@ -15,7 +15,10 @@ module.exports = { { test: /\.js$/, include: path.resolve(__dirname, '../kotlin_build'), - exclude: /kotlinx-html-js/, //TODO: include it back when kotlinx sourcemaps get fixed + exclude: [ + /kotlinx-html-js/, //TODO: include it back when kotlinx sourcemaps get fixed + /kotlin\.js$/, // Kotlin runtime doesn't have sourcemaps at the moment + ], use: ['source-map-loader'], enforce: 'pre', }, @@ -31,7 +34,7 @@ module.exports = { new KotlinWebpackPlugin({ src: __dirname, verbose: true, - optimize: true, // Turn it off to work with sourcemaps + optimize: true, libraries: [ '@jetbrains/kotlin-extensions', '@jetbrains/kotlin-react',
8
diff --git a/app/src/RoomClient.js b/app/src/RoomClient.js @@ -1256,7 +1256,7 @@ export default class RoomClient // resume this Consumer (which was paused for now). cb(null); - if (consumer.kind === 'audio') + if (kind === 'audio') { const stream = new MediaStream(); @@ -1285,7 +1285,7 @@ export default class RoomClient { consumer.volume = volume; - store.dispatch(stateActions.setPeerVolume(consumer.peerId, volume)); + store.dispatch(stateActions.setPeerVolume(peerId, volume)); } }); }
3
diff --git a/src/card/docs/Vaulting/README.md b/src/card/docs/Vaulting/README.md # Vaulting with HCF ## Outline of Vaulting Flow -1. Calling `POST /checkout/orders` creates the order specifying the card as payment method, and indicates vaulting for the specified customer. -2. The order is successfully created and the `orderId` is returned along with vaulting details such as the `id` of the vaulted payment method. -3. The returned `orderId` is passed along to the `POST /checkout/capture` call and processing continues as usual. +1. Define the `CardFields` `createOrder` callback to pass relevant payment information (excluding card details) and desire to vault payment method to server-side API. +2. API calls `POST /checkout/orders` with vault specific field. +3. The order is successfully created and the `orderId` is returned along with vaulting details such as the `id` of the vaulted payment method. +4. Define the `CardFields` `onApprove` callback to pass the returned `orderId` to server-side API. +5. API calls `POST /checkout/capture`, vault details are returned and processing continues as usual. ## Modifications to `createOrder` -In order to vault the card, the request body of the `POST /checkout/orders` call must include the `customerId` and the instruction to vault the payment method. For example: +In order to vault the card, some indicator needs to be set inside of `createOrder` to pass through to the `POST /checkout/orders` call; for example, a checkbox on a page that, when checked, includes the vault parameter and customer id in the body passed to the server-side API. ```json -{ - payment_source: { +let vaulting = vaultCheckbox.checked; +if (vaulting) { + payload.payment_source = { card: { attributes: { customer: { id: "vwxj123", }, vault: { - store_in_vault: "ON_SUCCESS" - }, + store_in_vault: "ON_SUCCESS", }, }, }, + }; } ``` +## Modifications to `onApprove` +After the order is successfully created via `createOrder`, the order needs to be captured. This is done by defining the `CardFields.onApprove` callback to pass the orderId to a server-side API that calls `POST checkout/orders/${orderId}/capture`. No vault specific data is required in the body of the call. Once the order is successfully captured, the response will include the vaulting data. + Depending on the type of card being used, several different responses may be returned to indicate the vaulting status. Generally, if vaulting occurred successfully, you will see the `payment_source.card.attributes.vault` field populated with an `id` field. This is the id of the vaulted payment method that can be stored and used to retrieve the vaulted payment method for subsequent transactions. Example response: ```json { @@ -66,6 +72,7 @@ Depending on the type of card being used, several different responses may be ret ### Card Specific Requirements #### Visa +No special considerations required for Visa implementation. #### MasterCard Vaulting with MasterCard uses an asynchronous process. Instead of a vault `id` being returned, a `setup_token` is returned. More details TBD.
3
diff --git a/packages/vulcan-accounts/package.js b/packages/vulcan-accounts/package.js @@ -14,8 +14,7 @@ Package.onUse(function(api) { api.use('[email protected]', { weak: true }); api.use('[email protected]', { weak: true }); api.use('[email protected]'); - - api.imply('[email protected]'); + api.use('[email protected]'); api.mainModule('main_client.js', 'client'); api.mainModule('main_server.js', 'server');
4
diff --git a/generators/client/templates/angular/src/main/webapp/app/home/home.component.ts.ejs b/generators/client/templates/angular/src/main/webapp/app/home/home.component.ts.ejs @@ -36,7 +36,7 @@ import { <% if (authenticationType !== 'oauth2') { %>LoginModalService<% } else export class HomeComponent implements OnInit <%_ if (authenticationType !== 'oauth2') { _%>, OnDestroy <%_ } _%> { account: Account; <%_ if (authenticationType !== 'oauth2') { _%> - eventSubscriber: Subscription; + authSubscription: Subscription; modalRef: NgbModalRef; <%_ } _%> @@ -60,7 +60,7 @@ export class HomeComponent implements OnInit <%_ if (authenticationType !== 'oau } registerAuthenticationSuccess() { - this.eventSubscriber = this.eventManager.subscribe('authenticationSuccess', (message) => { + this.authSubscription = this.eventManager.subscribe('authenticationSuccess', (message) => { this.accountService.identity().then((account) => { this.account = account; }); @@ -82,7 +82,9 @@ export class HomeComponent implements OnInit <%_ if (authenticationType !== 'oau <%_ if (authenticationType !== 'oauth2') { _%> ngOnDestroy() { - this.eventManager.destroy(this.eventSubscriber); + if(this.authSubscription) { + this.eventManager.destroy(this.authSubscription); + } } <%_ }_%> }
10
diff --git a/docs/css/docs.css b/docs/css/docs.css @@ -109,6 +109,25 @@ code { color: #9e9e9e; } +table { + font-size: 14px; + border: 3px solid #3b4863; +} + +table thead { + background-color: #3b4863; +} + +table th { + padding: 15px 5px; +} + +table td { + padding: 15px; + color: #fff; + border-bottom: solid 1px rgb(59, 72, 99) !important; +} + @media (max-width: 600px) { .docs-nav { position: fixed;
7
diff --git a/engine/modules/toggle/src/main/resources/view/toggle-module/ToggleModule.js b/engine/modules/toggle/src/main/resources/view/toggle-module/ToggleModule.js @@ -16,7 +16,7 @@ export class ToggleModule { const toggleInfo = this.currentFrame.registered[registeredEntity] const toggleState = toggles[toggleInfo.name] - if (toggleState === undefined && !this.missingToggles[toggleInfo.name]) { + if (toggleState == null && !this.missingToggles[toggleInfo.name]) { ErrorLog.push(new MissingToggleError(toggleInfo.name)) this.missingToggles[toggleInfo.name] = true }
1
diff --git a/package.json b/package.json { "name": "espruino-web-ide", - "version": "0.73.3", + "version": "0.73.4", "description": "A Terminal and Graphical code Editor for Espruino JavaScript Microcontrollers", "//1": "-------------------------------------------------------- nw.js", "main": "main.html", "websocket": "^1.0.23" }, "optionalDependencies": { - "noble": "^1.9.1", + "@abandonware/noble": "^1.9.2-3", "serialport": "^7.1.4", "winnus": "" },
4
diff --git a/src/client/websocket_client.js b/src/client/websocket_client.js @@ -83,7 +83,7 @@ class WebSocketClient { } } - this.conn = new Socket(connectionUrl, [], {origin}); + this.conn = new Socket(connectionUrl, [], {headers: {origin}}); this.connectionUrl = connectionUrl; this.token = token; this.dispatch = dispatch;
12