code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/transform.js b/transform.js @@ -19,15 +19,56 @@ module.exports = ({ types: t, template }) => { `); } - const returnIfAbruptTemplateGeneric = template.expression(` - do { - const hygenicTemp = ARG; + // Take care not to evaluate ARGUMENT multiple times. + const templates = { + Q: { + dontCare: template.statement(` + { + const hygenicTemp = ARGUMENT; if (hygenicTemp instanceof AbruptCompletion) { return hygenicTemp; } - hygenicTemp instanceof Completion ? hygenicTemp.Value : hygenicTemp; } - `, { plugins: ['doExpressions'] }); + `), + newVariable: template.statements(` + let ID = ARGUMENT; + if (ID instanceof AbruptCompletion) { + return ID; + } + if (ID instanceof Completion) { + ID = ID.Value; + } + `), + existingVariable: template.statements(` + ID = ARGUMENT; + if (ID instanceof AbruptCompletion) { + return ID; + } + if (ID instanceof Completion) { + ID = ID.Value; + } + `), + }, + X: { + dontCare: template.statement(` + Assert(!(ARGUMENT instanceof AbruptCompletion)); + `), + newVariable: template.statements(` + let ID = ARGUMENT; + Assert(!(ID instanceof AbruptCompletion)); + if (ID instanceof Completion) { + ID = ID.Value; + } + `), + existingVariable: template.statements(` + ID = ARGUMENT; + Assert(!(ID instanceof AbruptCompletion)); + if (ID instanceof Completion) { + ID = ID.Value; + } + `), + } + }; function findParentStatementPath(path) { while (path && !path.isStatement()) { @@ -109,29 +150,19 @@ module.exports = ({ types: t, template }) => { } } else { // ReturnIfAbrupt(AbstractOperation()) - if (t.isExpressionStatement(path.parent)) { - // We don't care about the result. - path.parentPath.replaceWith(template.statement.ast` - { - const hygenicTemp = ${argument}; - if (hygenicTemp instanceof AbruptCompletion) { - return hygenicTemp; - } - } - `); - } else { - path.replaceWith(returnIfAbruptTemplateGeneric({ ARG: argument })); - } + replace(templates.Q, 'hygenicTemp'); } } else if (path.node.callee.name === 'X') { state.needCompletion = true; state.needAssert = true; - const [argument] = path.node.arguments; + replace(templates.X, 'val'); + } + + function replace(templateObj, temporaryVariableName) { + const [ARGUMENT] = path.node.arguments; if (t.isExpressionStatement(path.parent)) { // We don't care about the result. - path.parentPath.replaceWith(template.statement.ast` - Assert(!(${argument} instanceof AbruptCompletion)); - `); + path.parentPath.replaceWith(templateObj.dontCare({ ARGUMENT })); } else if ( t.isVariableDeclarator(path.parent) && t.isIdentifier(path.parent.id) @@ -140,13 +171,8 @@ module.exports = ({ types: t, template }) => { // The result is assigned to a new variable, verbatim. const declarator = path.parentPath; const declaration = declarator.parentPath; - declaration.insertBefore(template.statements.ast` - let ${declarator.node.id} = ${argument}; - Assert(!(${declarator.node.id} instanceof AbruptCompletion)); - if (${declarator.node.id} instanceof Completion) { - ${declarator.node.id} = ${declarator.node.id}.Value; - } - `); + const ID = declarator.node.id; + declaration.insertBefore(templateObj.newVariable({ ID, ARGUMENT })); if (declaration.node.declarations.length === 1) { declaration.remove(); } else { @@ -158,26 +184,15 @@ module.exports = ({ types: t, template }) => { && t.isExpressionStatement(path.parentPath.parent) ) { // The result is assigned to an existing variable, verbatim. - const parentStatement = path.parentPath.parentPath; - parentStatement.replaceWithMultiple(template.statements.ast` - ${path.parent.left} = ${argument}; - Assert(!(${path.parent.left} instanceof AbruptCompletion)); - if (${path.parent.left} instanceof Completion) { - ${path.parent.left} = ${path.parent.left}.Value; - } - `); + const assignmentStatement = path.parentPath.parentPath; + const ID = path.parent.left; + assignmentStatement.replaceWithMultiple(templateObj.newVariable({ ID, ARGUMENT })); } else { // Ugliest variant that covers everything else. const parentStatement = findParentStatementPath(path); - const val = parentStatement.scope.generateUidIdentifier('val'); - parentStatement.insertBefore(template.statements.ast` - let ${val} = ${argument}; - Assert(!(${val} instanceof AbruptCompletion)); - if (${val} instanceof Completion) { - ${val} = ${val}.Value; - } - `); - path.replaceWith(val); + const ID = parentStatement.scope.generateUidIdentifier(temporaryVariableName); + parentStatement.insertBefore(templateObj.newVariable({ ID, ARGUMENT })); + path.replaceWith(ID); } } },
2
diff --git a/token-metadata/0x3F382DbD960E3a9bbCeaE22651E88158d2791550/metadata.json b/token-metadata/0x3F382DbD960E3a9bbCeaE22651E88158d2791550/metadata.json "symbol": "GHST", "address": "0x3F382DbD960E3a9bbCeaE22651E88158d2791550", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/closure/goog/structs/pool.js b/closure/goog/structs/pool.js @@ -136,7 +136,7 @@ goog.structs.Pool.prototype.setMinimumCount = function(min) { /** * Sets the maximum count of the pool. - * If max is less than the max count of the pool, an error is thrown. + * If max is less than the min count of the pool, an error is thrown. * @param {number} max The maximum count of the pool. */ goog.structs.Pool.prototype.setMaximumCount = function(max) {
1
diff --git a/app/models/mushroom_observer_import_flow_task.rb b/app/models/mushroom_observer_import_flow_task.rb @@ -99,7 +99,7 @@ class MushroomObserverImportFlowTask < FlowTask return existing if existing o = Observation.new( user: user ) o.observation_field_values.build( observation_field: mo_url_observation_field, value: result[:url] ) - if location = result.at( "location" ) + if location = result.at_css( "> location" ) o.place_guess = location.at( "name" ).text swlat = location.at( "latitude_south" ).text.to_f swlng = location.at( "longitude_west" ).text.to_f @@ -129,12 +129,16 @@ class MushroomObserverImportFlowTask < FlowTask consensus_name.at( "author" ).try(:text) ].compact.join(" ") ) end - if date = result.at( "date" ) + if date = result.at_css( "> date" ) o.observed_on_string = date.text end - if notes = result.at( "notes" ) + if notes = result.at_css( "> notes" ) + if notes.text =~ /\:Other/ + o.description = notes.text[/&gt;&quot;(.+)&quot;\}/, 1] + elsif notes.text != "<p>{}</p>" o.description = notes.text end + end if !options[:skip_images] && ( primary_image = result.at( "primary_image" ) ) [primary_image, result.search( "image" )].flatten.each do |image| image_url = "http://images.mushroomobserver.org/orig/#{image[:id]}.jpg"
1
diff --git a/character-controller.js b/character-controller.js @@ -799,19 +799,6 @@ class StatePlayer extends PlayerBase { } actions.push([action]); } - setMicMediaStream(mediaStream) { - if (this.microphoneMediaStream) { - this.microphoneMediaStream.disconnect(); - this.microphoneMediaStream = null; - } - if (mediaStream) { - this.avatar.setAudioEnabled(true); - const audioContext = audioManager.getAudioContext(); - const mediaStreamSource = audioContext.createMediaStreamSource(mediaStream); - mediaStreamSource.connect(this.avatar.getAudioInput()); - this.microphoneMediaStream = mediaStreamSource; - } - } new() { const self = this; this.playersArray.doc.transact(function tx() {
2
diff --git a/src/core/edgeNetwork/injectExtractEdgeInfo.js b/src/core/edgeNetwork/injectExtractEdgeInfo.js @@ -16,7 +16,13 @@ export default ({ logger }) => adobeEdgeHeader => { if (headerParts.length >= 2 && headerParts[1].length > 0) { try { const regionId = parseInt(headerParts[1], 10); - if (!Number.isNaN(regionId)) { + // eslint recommends using Number.isNaN instead, but this function is + // not available in Internet Explorer. Number.isNaN is more robust to + // non-numeric parameters. Since we already know regionId will be an + // integer, using isNaN is okay. + // https://github.com/airbnb/javascript#standard-library--isnan + // eslint-disable-next-line no-restricted-globals + if (!isNaN(regionId)) { return { regionId }; } } catch (e) {
1
diff --git a/components/mapbox/ban-map/popups.js b/components/mapbox/ban-map/popups.js @@ -15,9 +15,14 @@ function popupNumero({numero, suffixe, lieuDitComplementNom, nomVoie, nomCommune <b>{numero}{suffixe} {nomVoie} {lieuDitComplementNom ? `(${lieuDitComplementNom})` : ''}</b> <Tag type='numero' /> </div> - <div>{nomCommune} {codeCommune}</div> - <div>Nom : <span style={{color: nom.color}}>{nom.name}</span></div> - <div>Position : <span style={{color: position.color}}>{position.name}</span></div> + <div className='commune'>{nomCommune} - {codeCommune}</div> + <div className='infos-container'> + <div className='separator' /> + <div className='infos'> + <div>Nom : <b style={{color: nom.color}}>{nom.name}</b></div> + <div>Position : <b style={{color: position.color}}>{position.name}</b></div> + </div> + </div> <style jsx>{` .heading { @@ -25,7 +30,29 @@ function popupNumero({numero, suffixe, lieuDitComplementNom, nomVoie, nomCommune grid-template-columns: 3fr 1fr; grid-gap: .5em; align-items: center; - margin-bottom: 1em; + } + + .commune { + font-style: italic; + color: rgba(0, 0, 0, 0.81); + margin-bottom: 2em; + } + + .infos-container { + + display: grid; + grid-template-columns: 10px 1fr; + } + + .separator { + width: 0px; + border: 1px solid rgba(32, 83, 179, 0.36); + } + + .infos { + display: grid; + align-items: center; + grid-template-rows: 1fr 1fr; } `}</style> </div>
7
diff --git a/crypto.js b/crypto.js @@ -36,8 +36,10 @@ const mintToken = async (file, {description = ''} = {}) => { tokenId = null; } if (status) { - console.log('minting', ['NFT', 'mint', address, '0x' + hash, file.name, description, quantity]); - const result = await runSidechainTransaction(mnemonic)('NFT', 'mint', address, '0x' + hash, file.name, description, quantity); + const extName = path.extname(file.name); + const fileName = file.name.slice(0, -extName.length); + console.log('minting', ['NFT', 'mint', address, '0x' + hash, fileName, extName, description, quantity]); + const result = await runSidechainTransaction(mnemonic)('NFT', 'mint', address, '0x' + hash, fileName, extName, description, quantity); status = result.status; transactionHash = result.transactionHash; tokenId = new web3['sidechain'].utils.BN(result.logs[0].topics[3].slice(2), 16).toNumber();
0
diff --git a/package.json b/package.json ], "homepage": "https://github.com/aerospike/aerospike-client-nodejs", "license": "Apache-2.0", - "main": "./build/Release/aerospike", + "main": "lib/aerospike", "engines": { "node": ">=4" },
1
diff --git a/test/tests.front.js b/test/tests.front.js @@ -7,7 +7,6 @@ mocha.setup({ }) window.expect = chai.expect -describe('math editor', () => { const $el = {} const pasteEventMock = { type: 'paste', originalEvent: { @@ -18,8 +17,9 @@ describe('math editor', () => { } } +describe('rich text editor', () => { before('wait for tools to hide', u.waitUntil(() => isOutsideViewPort($('[data-js="tools"]')))) - before('wait for tools to hide', u.waitUntil(() => $('.answer1').attr('contenteditable'))) + before('wait answer field to initialize', u.waitUntil(() => $('.answer1').attr('contenteditable'))) before(() => { $el.answer1 = $('.answer1') $el.latexField = $('[data-js="latexField"]') @@ -28,8 +28,6 @@ describe('math editor', () => { $el.tools = $('[data-js="tools"]') $el.mathEditor = $('[data-js="mathEditor"]') }) - - describe('when focusing rich text', () => { before('focus', () => $el.answer1.focus()) before('wait for tools visible', u.waitUntil(() => $el.tools.is(':visible'))) @@ -117,7 +115,6 @@ describe('math editor', () => { }) }) }) -}) function isOutsideViewPort($elem) { return $elem.length > 0 && $elem.position().top < 0
2
diff --git a/accessibility-checker-engine/src/v4/rules/Rpt_Aria_MissingFocusableChild.ts b/accessibility-checker-engine/src/v4/rules/Rpt_Aria_MissingFocusableChild.ts @@ -49,7 +49,7 @@ export let Rpt_Aria_MissingFocusableChild: Rule = { return; //skip the check if the element requires presentational children only - if (RPTUtil.containsPresentationalChildrenOnly(ruleContext)) + if (RPTUtil.containsPresentationalChildrenOnly(ruleContext) || RPTUtil.shouldBePresentationalChild(ruleContext)) return; // An ARIA list is not interactive
3
diff --git a/src/components/Player/Pages/Histograms/Histograms.jsx b/src/components/Player/Pages/Histograms/Histograms.jsx @@ -11,15 +11,17 @@ import { browserHistory } from 'react-router'; import strings from 'lang'; const Histogram = ({ routeParams, columns, playerId, error, loading }) => ( - <Container style={{ fontSize: 10 }} error={error} loading={loading}> + <div style={{ fontSize: 10 }}> <Heading title={strings.histograms_name} subtitle={strings.histograms_description} /> <ButtonGarden onClick={buttonName => browserHistory.push(`/players/${playerId}/histograms/${buttonName}${window.location.search}`)} buttonNames={histogramNames} selectedButton={routeParams.subInfo || histogramNames[0]} /> + <Container style={{ fontSize: 10 }} error={error} loading={loading}> <HistogramGraph columns={columns || []} /> </Container> + </div> ); const getData = (props) => {
1
diff --git a/devices/ikea.js b/devices/ikea.js @@ -38,7 +38,8 @@ const configureRemote = async (device, coordinatorEndpoint, logger) => { // - https://github.com/Koenkk/zigbee2mqtt/issues/7716 const endpoint = device.getEndpoint(1); const version = device.softwareBuildID.split('.').map((n) => Number(n)); - const bindTarget = version[0] >= 2 && version[1] >= 3 && version[2] >= 75 ? coordinatorEndpoint : constants.defaultBindGroup; + const bindTarget = version[0] > 2 || (version[0] == 2 && version[1] > 3) || (version[0] == 2 && version[1] == 3 && version[2] >= 75) ? + coordinatorEndpoint : constants.defaultBindGroup; await endpoint.bind('genOnOff', bindTarget); await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']); await reporting.batteryPercentageRemaining(endpoint);
7
diff --git a/src/encoded/schemas/file.json b/src/encoded/schemas/file.json { "not": { "required": ["status"] + }, + "properties": { + "no_file_available": { + "enum": [false] + } } }, { - "required": ["file_size"], + "required": ["file_size", "status"], "properties": { "status": { "enum": ["in progress", "revoked", "archived", "released"] } }, { + "required": ["status"], "properties": { "status": { "enum": ["uploading", "upload failed", "deleted", "replaced", "content error"]
0
diff --git a/source/views/controls/RichTextView.js b/source/views/controls/RichTextView.js @@ -420,7 +420,7 @@ const RichTextView = Class({ const showToolbar = this.get('showToolbar'); return new ToolbarView({ - className: 'v-Toolbar v-RichText-toolbar', + className: 'v-Toolbar v-Toolbar--preventOverlap v-RichText-toolbar', positioning: 'sticky', preventOverlap: showToolbar === TOOLBAR_AT_TOP, })
0
diff --git a/src/payment-flows/native.js b/src/payment-flows/native.js @@ -41,7 +41,7 @@ const NATIVE_DOMAIN_SANDBOX = 'https://www.paypal.com'; // Popup domain needs to be different than native domain for app switch to work on iOS const NATIVE_POPUP_DOMAIN = 'https://ic.paypal.com'; -const NATIVE_POPUP_DOMAIN_SANDBOX = 'https://ic.paypal.com'; +const NATIVE_POPUP_DOMAIN_SANDBOX = 'https://www.sandbox.paypal.com'; type NativeSocketOptions = {| sessionUID : string,
4
diff --git a/doc/includes/API.md b/doc/includes/API.md @@ -6737,30 +6737,55 @@ Type|Description ## transaction -See the section on [transaction callback](#transaction-callback) +See the section about [transactions](#passing-around-a-transaction-object) ### Methods #### start -See the section on [transaction object](#transaction-object) +```js +const trx = await transaction.start(Model.knex()); + +try { + await doStuff(trx); + await trx.commit(); +} catch (err) { + await trx.rollback(err); +} +``` + +Starts a transaction and returns a [transaction object](#transactionobject). If you use this method, you must +explicitly remember to call `trx.commit()` or `trx.rollback(err)`. ## TransactionObject -See the section on [transaction object](#transaction-object) +This is nothing more than a knex transaction object. It can be used as a knex query builder, it can be +[passed to objection queries](#passing-around-a-transaction-object) and [models can be bound to it](#binding-models-to-a-transaction) + +See the section about [transactions](#passing-around-a-transaction-object) for more info and examples. ### Instance methods #### commit -Call this method to commit the transaction. +```js +const promise = trx.commit(); +``` + +Call this method to commit the transaction. This only needs to be called if you use `transaction.start()` method. #### rollback -Call this method to rollback the transaction. +```js +const promise = trx.rollback(error); +``` + +Call this method to rollback the transaction. This only needs to be called if you use `transaction.start()` method. +You need to pass the error to the method as the only argument. +
7
diff --git a/edit.js b/edit.js @@ -2023,8 +2023,11 @@ function animate(timestamp, frame) { pe.setRigMatrix(null); } - velocity.x *= 0.7; - velocity.z *= 0.7; + const terminalVelocity = 50; + const _clampToTerminalVelocity = v => Math.min(Math.max(v, -terminalVelocity), terminalVelocity); + velocity.x = _clampToTerminalVelocity(velocity.x*0.7); + velocity.z = _clampToTerminalVelocity(velocity.z*0.7); + velocity.y = _clampToTerminalVelocity(velocity.y); /* if (session) { wristMenu.update(frame, session, renderer.xr.getReferenceSpace());
0
diff --git a/test/image/compare_pixels_test.js b/test/image/compare_pixels_test.js @@ -116,10 +116,9 @@ if(allMock || argv.filter) { var FLAKY_LIST = [ 'treemap_coffee', - 'treemap_sunburst_marker_colors', 'treemap_textposition', 'treemap_with-without_values', - 'gl3d_directions-streamtube1', + 'sunburst_with-without_values' ]; console.log('');
3
diff --git a/bin/deploy-gh-pages.sh b/bin/deploy-gh-pages.sh @@ -24,7 +24,6 @@ fi git pull --ff-only --no-stat cp -r "$ROOT/doc" "$ROOT/dist" . -cp -r "$ROOT/visualizer/" ./editor # Temporary until main repo is changed. git add doc dist editor git commit -m "Update from cdglabs/ohm@${OHM_REV}" git push origin master
1
diff --git a/.travis.yml b/.travis.yml @@ -13,6 +13,6 @@ notifications: on_failure: always before_install: - openssl aes-256-cbc -K $encrypted_32b6c04b6d48_key -iv $encrypted_32b6c04b6d48_iv - -in deploy-key.enc -out ~\.ssh/deploy-key -d + -in deploy-key.enc -out ~/.ssh/deploy-key -d after_success: - bin/deploy.sh \ No newline at end of file
1
diff --git a/src/redux/Checkout/actions.js b/src/redux/Checkout/actions.js @@ -607,22 +607,25 @@ export function updateCart(payload, cb) { const { cart } = getState().checkout + if (payload.shippingAddress) { const shippingAddress = { ...cart.shippingAddress, ...payload.shippingAddress, } + payload = { + ...payload, + shippingAddress + } + } dispatch(checkoutRequest()) httpClient - .put(cart['@id'], { - shippingAddress, - notes: payload.notes, - }) + .put(cart['@id'], payload) .then(res => { dispatch(updateCartSuccess(res)) dispatch(checkoutSuccess()) - cb() + _.isFunction(cb) && cb() }) .catch(e => dispatch(checkoutFailure(e))) }
11
diff --git a/pages/commune/[codeCommune].js b/pages/commune/[codeCommune].js @@ -30,12 +30,10 @@ function Commune({communeInfos, mairieInfos, revisions, codeCommune, currentRevi typeComposition={typeCompositionAdresses} hasMigratedBAL={hasRevision} /> + {typeCompositionAdresses !== 'assemblage' && ( <> - <BalQuality - currentRevision={currentRevision} - hasQualityAdresses={hasRevision} - /> + <BalQuality currentRevision={currentRevision} /> <Historique revisions={revisions} communeName={communeInfos.nomCommune}
2
diff --git a/src/components/TableResize.js b/src/components/TableResize.js @@ -99,7 +99,7 @@ class TableResize extends React.Component { onResizeMove = (id, e) => { const { isResize, resizeCoords } = this.state; const fixedMinWidth = 100; - const idNumber = parseInt(id); + const idNumber = parseInt(id,10); const finalCells = Object.entries(this.cellsRef); if (idNumber >= finalCells.length-1) return; if (isResize) { @@ -107,8 +107,8 @@ class TableResize extends React.Component { if (leftPos > resizeCoords[idNumber + 1].left - fixedMinWidth) leftPos = resizeCoords[idNumber + 1].left - fixedMinWidth; if ( - (idNumber === 0 && typeof resizeCoords[0] !== 'undefined') || - (idNumber === 1 && typeof resizeCoords[0] === 'undefined') + (idNumber === 0 && typeof resizeCoords[0] !== 'undefined') || //1st resizer with selectableRows enabled + (idNumber === 1 && typeof resizeCoords[0] === 'undefined') //1st resizer with selectableRows: 'none' ) { if (leftPos < fixedMinWidth) leftPos = fixedMinWidth; } else if (leftPos < resizeCoords[idNumber - 1].left + fixedMinWidth)
0
diff --git a/public/js/office.web.js b/public/js/office.web.js @@ -242,11 +242,11 @@ $(() => { }); officeIo.onParticipantStartedMeet(function (user,roomId){ - showUserInRoom(user,roomId,officeIo.getSocketIo()); + showUserInRoom(user,roomId); }); officeIo.onParticipantLeftMeet(function (user,roomId){ - showUserInRoom(user,roomId,officeIo.getSocketIo()); + showUserInRoom(user,roomId); }); officeIo.onSyncOffice(function (usersInRoom){
1
diff --git a/plugins/auth/auth_ldap.js b/plugins/auth/auth_ldap.js @@ -7,7 +7,7 @@ exports.hook_capabilities = function (next, connection) { // Don't offer AUTH capabilities by default unless session is encrypted if (connection.tls.enabled) { const methods = [ 'LOGIN' ]; - connection.capabilities.push('AUTH ' + methods.join(' ')); + connection.capabilities.push(`AUTH ${methods.join(' ')}`); connection.notes.allowed_auth_methods = methods; } next(); @@ -36,7 +36,7 @@ exports.check_plain_passwd = function (connection, user, passwd, cb) { }); client.on('error', function (err) { - connection.loginfo('auth_ldap: client error ' + err.message); + connection.loginfo(`auth_ldap: client error ${err.message}`); cb(false); }); @@ -47,7 +47,7 @@ exports.check_plain_passwd = function (connection, user, passwd, cb) { dn = dn.replace(/%u/g, user); client.bind(dn, passwd, function (err) { if (err) { - connection.loginfo("auth_ldap: (" + dn + ") " + err.message); + connection.loginfo(`auth_ldap: (${dn}) ${err.message}`); return callback(false); } else {
14
diff --git a/src/charts/Pie.js b/src/charts/Pie.js @@ -217,9 +217,8 @@ class Pie { startAngle = endAngle prevStartAngle = prevEndAngle - endAngle = (startAngle + sectorAngleArr[i]) % this.fullAngle - prevEndAngle = - (prevStartAngle + this.prevSectorAngleArr[i]) % this.fullAngle + endAngle = startAngle + sectorAngleArr[i] + prevEndAngle = prevStartAngle + this.prevSectorAngleArr[i] const angle = endAngle < startAngle
1
diff --git a/token-metadata/0x7AfB39837Fd244A651e4F0C5660B4037214D4aDF/metadata.json b/token-metadata/0x7AfB39837Fd244A651e4F0C5660B4037214D4aDF/metadata.json "symbol": "SODA", "address": "0x7AfB39837Fd244A651e4F0C5660B4037214D4aDF", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/playbacks/html5_video/html5_video.js b/src/playbacks/html5_video/html5_video.js @@ -200,7 +200,11 @@ export default class HTML5Video extends Playback { this._stopped = false this._setupSrc(this._src) this._handleBufferingEvents() - this.el.play() + let promise = this.el.play() + // For more details, see https://developers.google.com/web/updates/2016/03/play-returns-promise + if (promise && promise.catch) { + promise.catch(() => {}) + } } pause() {
9
diff --git a/articles/clients/client-settings/_settings-pt2.md b/articles/clients/client-settings/_settings-pt2.md - **Allowed Callback URLs**: Set of URLs to which Auth0 is allowed to redirect the users after they authenticate. You can specify multiple valid URLs by comma-separating them (typically to handle different environments like QA or testing). You can use the star symbol as a wildcard for subdomains (`*.google.com`). Make sure to specify the protocol, `http://` or `https://`, otherwise the callback may fail in some cases. +- **Allowed Web Origins**: List of URLs from where an authorization request, using [`web_message` as the response mode](/protocols/oauth2#how-response-mode-works), can originate from. You can specify multiple valid URLs by comma-separating them. + - **Allowed Logout URLs**: After a user logs out from Auth0 you can redirect them with the `returnTo` query parameter. The URL that you use in `returnTo` must be listed here. You can specify multiple valid URLs by comma-separating them. You can use the star symbol as a wildcard for subdomains (`*.google.com`). Notice that querystrings and hash information are not taken into account when validating these URLs. Read more about this at: [Logout](/logout). - **Allowed Origins (CORS)**: Set of URLs that will be allowed to make requests from JavaScript to Auth0 API (typically used with CORS). This prevents same-origin policy errors when using Auth0 from within a web browser. By default, all your callback URLs will be allowed. This field allows you to enter other origins if you need to. You can specify multiple valid URLs by comma-separating them. You can use the star symbol as a wildcard for subdomains (`*.google.com`). Notice that paths, querystrings and hash information are not taken into account when validating these URLs (and may, in fact, cause the match to fail).
0
diff --git a/core/openseadragon-measurement-tool.js b/core/openseadragon-measurement-tool.js close.style.border = '1px solid black'; close.style.display = 'none'; this._ruler.appendChild(close); - + this._ruler.style.zIndex = 101; // h const h_scale = document.createElement('div'); h_scale.style.position = 'absolute';
1
diff --git a/src/app/Http/Controllers/Operations/ListOperation.php b/src/app/Http/Controllers/Operations/ListOperation.php @@ -76,7 +76,7 @@ trait ListOperation $this->crud->applyUnappliedFilters(); - $startIndex = (int) request()->input('start'); + $start = (int) request()->input('start'); $length = (int) request()->input('length'); $search = request()->input('search'); @@ -86,8 +86,8 @@ trait ListOperation $this->crud->applySearchTerm($search['value']); } // start the results according to the datatables pagination - if ($startIndex) { - $this->crud->skip($startIndex); + if ($start) { + $this->crud->skip($start); } // limit the number of results according to the datatables pagination if ($length) { @@ -104,12 +104,12 @@ trait ListOperation // if show entry count is disabled we use the "simplePagination" technique to move between pages. if (! $this->crud->getOperationSetting('showEntryCount')) { $this->crud->setOperationSetting('totalEntryCount', $length); - $filteredRows = $entries->count() < $length ? 0 : $length + $startIndex + 1; + $filteredRows = $entries->count() < $length ? 0 : $length + $start + 1; } $totalRows = $this->crud->getOperationSetting('totalEntryCount'); - return $this->crud->getEntriesAsJsonForDatatables($entries, $totalRows, $filteredRows, $startIndex); + return $this->crud->getEntriesAsJsonForDatatables($entries, $totalRows, $filteredRows, $start); } /**
10
diff --git a/sirepo/pkcli/job_agent.py b/sirepo/pkcli/job_agent.py @@ -302,6 +302,7 @@ class _SbatchCmd(_Cmd): if not self.msg.get('shifterImage'): return super().job_cmd_source_bashrc() return f''' +ulimit -c 0 unset PYTHONPATH unset PYTHONSTARTUP export PYENV_ROOT=/home/vagrant/.pyenv
12
diff --git a/token-metadata/0x84294FC9710e1252d407d3D80A84bC39001bd4A8/metadata.json b/token-metadata/0x84294FC9710e1252d407d3D80A84bC39001bd4A8/metadata.json "symbol": "NUTS", "address": "0x84294FC9710e1252d407d3D80A84bC39001bd4A8", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/token-metadata/0x1DaE0680f6b8059C8945DE6A8a93009e054417b4/metadata.json b/token-metadata/0x1DaE0680f6b8059C8945DE6A8a93009e054417b4/metadata.json "symbol": "YNEF", "address": "0x1DaE0680f6b8059C8945DE6A8a93009e054417b4", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/pages/MetricDocs/Documentation/Documentation.js b/src/pages/MetricDocs/Documentation/Documentation.js @@ -11,7 +11,7 @@ import type { ComponentType } from "react"; import { APILabel, APIMetric, - APIMetricContainer, + APIMetricContainer, Deprecated, MarkdownContent, MetadataContainer } from "./Documentation.style"; @@ -88,14 +88,16 @@ const AssociatingLogs: ComponentType<*> = ({ data }) => { <DataTable sortable={ false } fields={[ - { label: "Date", value: "dt", type: "text" }, - { label: "Headline", value: "link", type: "text" }, + { label: "Date", value: "dt", type: "date" }, + { label: "Headline", value: "link", type: "text", className: "body-text" }, { label: "Type", value: "type", type: "text" }, - { label: "Applicable until", value: "expiry", type: "text" } + { label: "Applicable until", value: "expiry", type: "date" } ]} + className={ "metric-doc-table" } + parentClassName={ "doc-table-container" } data={ data.map(item => ({ - dt: <Timestamp timestamp={ item.date }/>, + dt: <Timestamp timestamp={ item.date } format={ "DD MMM YYYY" }/>, link: <Link className={ "govuk-link" } to={ `/details/whats-new/record/${item.id}` }> @@ -104,7 +106,7 @@ const AssociatingLogs: ComponentType<*> = ({ data }) => { type: <ChangeLogType type={ item.type }/>, expiry: item?.expiry - ? <Timestamp timestamp={ item.expiry }/> + ? <Timestamp timestamp={ item.expiry } format={ "DD MMM YYYY" }/> : <span style={{ color: "#797979" }}>N/A</span>, })) } @@ -238,6 +240,13 @@ const MetricDocumentation: ComponentType<*> = ({}) => { </span> </APILabel> <APIMetric>{ data.metric }</APIMetric> + { + data.deprecated + ? <Deprecated> + Deprecated on&nbsp;<Timestamp timestamp={ data.deprecated }/> + </Deprecated> + : null + } </APIMetricContainer> </header> <Container>
7
diff --git a/token-metadata/0xfc05987bd2be489ACCF0f509E44B0145d68240f7/metadata.json b/token-metadata/0xfc05987bd2be489ACCF0f509E44B0145d68240f7/metadata.json "symbol": "ESS", "address": "0xfc05987bd2be489ACCF0f509E44B0145d68240f7", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/vaadin-date-picker.html b/src/vaadin-date-picker.html @@ -258,7 +258,7 @@ This program is available under Apache License Version 2.0, available at https:/ } _onVaadinOverlayClose(e) { - if (this._openedWithFocusRing) { + if (this._openedWithFocusRing && this.hasAttribute('focused')) { this.focusElement.setAttribute('focus-ring', ''); } if (e.detail.sourceEvent && e.detail.sourceEvent.composedPath().indexOf(this) !== -1) {
12
diff --git a/aurelia-v1.1.0/src/main.js b/aurelia-v1.1.0/src/main.js @@ -3,7 +3,8 @@ Bluebird.config({ warnings: false }); export async function configure(aurelia) { aurelia.use - .standardConfiguration(); + .defaultBindingLanguage() + .defaultResources(); await aurelia.start(); aurelia.setRoot('app');
4
diff --git a/fabfile/assets.py b/fabfile/assets.py @@ -57,13 +57,15 @@ def sync(path): local_paths.append(full_path) - # Prevent case sensitivity differences between OSX and S3 from screwing us up + # Prevent case sensitivity differences between OSX and S3 + # from screwing us up if not_lowercase: - print 'The following filenames are not lowercase, please change them before running `assets.sync`:' - + print 'The following filenames are not lowercase, ' \ + 'please change them before running `assets.sync`. ' for name in not_lowercase: print ' %s' % name + print 'WARNING: This must be fixed before you can deploy.' return True bucket = _assets_get_bucket()
7
diff --git a/packages/bitcore-node/src/models/events.ts b/packages/bitcore-node/src/models/events.ts @@ -23,10 +23,7 @@ export class EventModel extends BaseModel<IEvent> { async onConnect() { await this.collection.createIndex({ type: 1, emitTime: 1 }, { background: true }); - const capped = await this.collection.isCapped(); - if (!capped) { - await this.db!.createCollection('events', { capped: true, size: 500000 }); - } + await this.collection.createIndex({ emitTime: 1 }, { background: true, expireAfterSeconds: 60 * 5 }); } public signalBlock(block: IEvent.BlockEvent) {
12
diff --git a/README.md b/README.md @@ -57,7 +57,9 @@ Built on top of [node-postgres], this library adds the following: # Support & Sponsorship -<a href='https://lisk.io' alt='LISK'>![lisk](https://user-images.githubusercontent.com/5108906/35188739-863a8e40-fe33-11e7-8ec4-f3fe13f43ca7.jpg)</a> +<a href='https://lisk.io' alt='LISK' style='outline : none;' target='_blank'> + ![lisk](https://user-images.githubusercontent.com/5108906/35188739-863a8e40-fe33-11e7-8ec4-f3fe13f43ca7.jpg) +</a> If you like what we do, and would like to see it continue, then please consider donating:
7
diff --git a/contracts/swap/test/Swap.js b/contracts/swap/test/Swap.js @@ -108,21 +108,15 @@ contract('Swap', async accounts => { }) describe('Approving...', async () => { - it('Alice approves Swap to spend 200 AST', async () => { + it('Checks approvals (Alice 250 AST and 0 DAI, Bob 0 AST and 500 DAI)', async () => { emitted( await tokenAST.approve(swapAddress, 200, { from: aliceAddress }), 'Approval' ) - }) - - it('Bob approves Swap to spend 9999 DAI', async () => { emitted( - await tokenDAI.approve(swapAddress, 9999, { from: bobAddress }), + await tokenDAI.approve(swapAddress, 1000, { from: bobAddress }), 'Approval' ) - }) - - it('Checks approvals (Alice 250 AST and 0 DAI, Bob 0 AST and 500 DAI)', async () => { ok( await allowances(aliceAddress, swapAddress, [ [tokenAST, 200], @@ -132,7 +126,7 @@ contract('Swap', async accounts => { ok( await allowances(bobAddress, swapAddress, [ [tokenAST, 0], - [tokenDAI, 500], + [tokenDAI, 1000], ]) ) }) @@ -568,13 +562,13 @@ contract('Swap', async accounts => { ) }) - it('Checks existing balances (Alice 800 AST and 50 DAI, Bob 200 AST and 950 DAI)', async () => { + it('Checks existing balances (Alice 750 AST and 60 DAI, Bob 250 AST and 940 DAI)', async () => { ok( - await balances(aliceAddress, [[tokenAST, 700], [tokenDAI, 60]]), + await balances(aliceAddress, [[tokenAST, 750], [tokenDAI, 40]]), 'Alice balances are incorrect' ) ok( - await balances(bobAddress, [[tokenAST, 250], [tokenDAI, 940]]), + await balances(bobAddress, [[tokenAST, 250], [tokenDAI, 960]]), 'Bob balances are incorrect' ) }) @@ -584,6 +578,10 @@ contract('Swap', async accounts => { const value = 1 it('Checks allowance (Alice 200 AST)', async () => { + emitted( + await tokenAST.approve(swapAddress, 200, { from: aliceAddress }), + 'Approval' + ) ok( await allowances(aliceAddress, swapAddress, [[tokenAST, 200]]), 'Alice has not approved 200 AST'
1
diff --git a/tests/test_IssuanceController.py b/tests/test_IssuanceController.py @@ -94,7 +94,6 @@ class TestIssuanceController(HavvenTestCase): cls.issuanceController = IssuanceControllerInterface(cls.issuanceControllerContract, "IssuanceController") cls.havven = PublicHavvenInterface(cls.havven_contract, "Havven") cls.nomin = PublicNominInterface(cls.nomin_contract, "Nomin") - cls.havven = HavvenInterface(cls.havven_contract, "Havven") cls.issuanceControllerEventDict = cls.event_maps['IssuanceController'] def test_constructor(self): @@ -401,7 +400,7 @@ class TestIssuanceController(HavvenTestCase): self.assertEqual(self.havven.balanceOf(self.issuanceControllerContract.address), havvensBalance) # Transfer the amount to the receiver - self.issuanceController.exchangeForHavvens(exchanger, nominsToSend) + self.issuanceController.exchangeNominsForHavvens(exchanger, nominsToSend) # self.assertEqual(self.havven.balanceOf(self.issuanceControllerContract.address), havvensBalance - ?????) self.assertEqual(self.nomin.balanceOf(exchanger), 0)
1
diff --git a/docs/API.md b/docs/API.md @@ -60,10 +60,13 @@ For example: Accessing the data for a chat report will return the data if the re - For deep links like `StartAppWhileSignedInAndOpenWorkspace`, create separate commands for each specific scenario like `StartAppWhileSignedIn` and `OpenWorkspace`, where both requests will be triggered in parallel. ## FAQ -Q: How should error messages be persisted to Onyx? -A:- The API layer Pusher onyxData should set specific error messages. + +### How should error messages be persisted to Onyx? + +- The API layer Pusher onyxData should set specific error messages. - In cases where the API does not set an error, a generic error message can be set in the API.write onyxData `failureData` block. - Previous errors should be cleared by local onyxData when a new request is made -Q: How should we remove local data from the store if the data no longer exist in the server? eg. local policy data for policies the user is no longer a member of. -A: Use Onyx.set(key, null) for each data (eg. policy) not found in the server. \ No newline at end of file +### How should we remove local data from the store if the data no longer exist in the server? eg. local policy data for policies the user is no longer a member of. + +Use Onyx.set(key, null) for each data (eg. policy) not found in the server. \ No newline at end of file
4
diff --git a/src/pages/gettingstarted/design-principles.hbs b/src/pages/gettingstarted/design-principles.hbs @@ -8,8 +8,8 @@ title: Design Principles <div class="drizzle-o-Layout-content drizzle-b-LongFormText"> <div class="drizzle-o-ContentGrouping"> <p> - Our design principles are shared guidelines that capture the essence of what great design means to our company and - advice on how to achieve it. + Our design principles capture the essence of what + good design means to our company and provide direction on how to achieve it. </p> </div> @@ -26,8 +26,10 @@ title: Design Principles Clarity </h2> <p> - Help eliminate ambiguity and enable users to see, understand and act with confidence. Keep the user focused on - their goal without distraction. + Eliminate ambiguity so that the user can see the + important elements on the page, understand what + they're supposed to do and act confidently. + Keep the user focused on their goal without distraction. </p> </div> </div> @@ -46,8 +48,12 @@ title: Design Principles Consistency </h2> <p> - Create familiarity &amp; strengthen intuition by applying the same solution to the same problem. Use consistent - language, patterns and components across the experience to make it easier for clients to get stuff done. + Create familiarity by applying the same solution to the + same problem each time. Use consistent language, + patterns and components across the experience. + This will allow the user to better predict what'll + be on the page and understand what they're supposed + to do without having to carefully examine the content and design. </p> </div> </div> @@ -66,9 +72,11 @@ title: Design Principles Beauty </h2> <p> - Every aesthetic design decision - from how we design components, to illustrations, and choices about color - - should be purposeful. Build trust and further imbue confidence with an experience that appears and interacts - beautifully. + Every aesthetic design decision - from how we design + components, to illustrations, to choices about + color - should be purposeful. Build trust and + further build confidence with an experience that + looks beautiful and functions seamlessly. </p> </div> </div> @@ -87,8 +95,9 @@ title: Design Principles Inclusive </h2> <p> - Be inclusive, legible and as readable as possible across the experience. Thoughtfully serve the needs of all - people. + Be inclusive, legible and readable across the experience. + Thoughtfully serve the needs of all people - including + those with permanent, temporary, situational or changing disabilities. </p> </div> </div> @@ -107,8 +116,10 @@ title: Design Principles Delight </h2> <p> - With all other principles accounted for, enhance the user's experience through thoughtful craftsmanship and elegant - micro interactions and transitions. + With all our principles accounted for, + enhance the user's experience through + thoughtful craftsmanship and elegant + micro-interactions and transitions. </p> </div> </div>
3
diff --git a/source/swap/contracts/Swap.sol b/source/swap/contracts/Swap.sol @@ -501,7 +501,7 @@ contract Swap is ISwap, Ownable, EIP712 { uint256 indexInGroup = nonce % 256; uint256 group = _nonceGroups[signatory][groupKey]; - // If it is already used, return cancel and revert + // Revert if nonce is already used if ((group >> indexInGroup) & 1 == 1) { revert NonceAlreadyUsed(nonce); }
3
diff --git a/lib/plugins/browsertime/analyzer.js b/lib/plugins/browsertime/analyzer.js @@ -15,7 +15,8 @@ const defaultBrowsertimeOptions = { const chromeIphoneEmulationOptions = { mobileEmulation: { - deviceName: 'iPhone 6' + deviceName: 'iPhone 6', + pixelRatio: 2.0 } };
12
diff --git a/vue.config.js b/vue.config.js @@ -15,6 +15,7 @@ module.exports = { { from: "src/components", to: "components", + ignore: ["**/*.stories.js", "**/*.spec.ts", "**/*.md"], transformPath(targePath) { return targePath.split("/").slice(-1)[0]; },
8
diff --git a/api/Methods/annotation.php b/api/Methods/annotation.php @@ -66,7 +66,7 @@ $deleteMarkups = function () use ($app){ }; // define routes -$app->get("/", function() use($app){ return "{message:'Select a function.'}";}); +$app->get("/", function() use($app){ echo "{message:'Select a function.'}";}); $app->get("/algorithms", $getAlgs); $app->get("/rois", $getRois); $app->get("/markups", $getMarkups);
1
diff --git a/tests/e2e/specs/UndoRedo.spec.js b/tests/e2e/specs/UndoRedo.spec.js @@ -351,7 +351,6 @@ describe('Undo/redo', () => { const initialNumberOfElements = 3; getGraphElements().should('have.length', initialNumberOfElements); - cy.get('[data-test=undo]').click({ force: true }); cy.get('[data-test=undo]').click({ force: true }); const numberOfElementsAfterUndo = 2;
2
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js @@ -27,7 +27,7 @@ class KeyringController extends EventEmitter { constructor (opts) { super() const initState = opts.initState || {} - this.keyringTypes = keyringTypes + this.keyringTypes = opts.keyringTypes || keyringTypes this.store = new ObservableStore(initState) this.memStore = new ObservableStore({ isUnlocked: false,
11
diff --git a/src/processMonitors/uptimeHealthcheck.js b/src/processMonitors/uptimeHealthcheck.js @@ -60,7 +60,7 @@ export default class UptimeHealthcheck extends Uptime { .catch(error => { env.logger.log({ level: 'error', - message: error + message: `UptimeHealthcheck cannot send heartbeat: ${error.message}` }); }); }
7
diff --git a/components/Discussion/graphql/enhancers/isAdmin.js b/components/Discussion/graphql/enhancers/isAdmin.js @@ -8,4 +8,4 @@ import withAuthorization from '../../../Auth/withAuthorization' * } */ -export const isAdmin = withAuthorization(['admin', 'editor'], 'isAdmin') +export const isAdmin = withAuthorization(['admin', 'moderator'], 'isAdmin')
14
diff --git a/src/pages/team.js b/src/pages/team.js @@ -15,12 +15,12 @@ import Footer from '../components/Footer' const Header = Box.extend` padding-top: 0 !important; - background-color: ${props => props.theme.colors.blue[5]}; + background-color: ${props => props.theme.colors.indigo[5]}; background-image: linear-gradient( - -16deg, - ${props => props.theme.colors.pink[4]} 0%, - ${props => props.theme.colors.pink[5]} 50%, - ${props => props.theme.colors.red[6]} 100% + -2deg, + ${props => props.theme.colors.violet[4]} 0%, + ${props => props.theme.colors.indigo[5]} 50%, + ${props => props.theme.colors.indigo[6]} 100% ); `
7
diff --git a/css/taskOverlay.css b/css/taskOverlay.css .task-tab-item { position: relative; } -.task-container button.closeTab { + +/* close tab button */ + +.task-tab-item button.closeTab { position: absolute; - width: 1.5em; - height: 1.5em; - left: -1em; - top: calc(0.55em - 1px); /* searchbar styles padding-top */ + width: 2em; + height: 2em; + left: -2.1em; + top: calc(0.16em + 1px); /* searchbar styles padding-top */ bottom :0; - display: none; - background-color: #888; - color: white; border: none; - border-radius: .75em; + border-radius: 50%; outline: none; cursor: pointer; - opacity: 0.3; + opacity: 0; + background: transparent; + transition: 0.05s; + color: currentColor; } .task-tab-item:hover button.closeTab { - display: block; + opacity: 0.5; +} +.dark-mode .task-tab-item:hover button.closeTab { + opacity: 0.7; } .task-tab-item button.closeTab:hover { opacity: 1; + background: rgba(0, 0, 0, 0.05); +} +.dark-mode .task-tab-item button.closeTab:hover { + opacity: 1; + background: rgba(0, 0, 0, 0.15); +} +.task-tab-item button.closeTab:active { + background: rgba(0, 0, 0, 0.175); +} +.dark-mode .task-tab-item button.closeTab:active { + background: rgba(0, 0, 0, 0.35); +} +.task-tab-item button.closeTab > i { + margin-left: -1px; + margin-right: 0; + padding: 0; + opacity: 1; + vertical-align: baseline; + font-size: 1em; } /* inputs */
3
diff --git a/src/tagui_header.js b/src/tagui_header.js @@ -29,7 +29,7 @@ function snap_image() {snap_image_count++; return (flow_path + '/' + 'snap' + sn // checking if selector is xpath selector function is_xpath_selector(selector) {if (selector.length == 0) return false; -if ((selector.indexOf('/') >= 0) || (selector.indexOf('(') >= 0)) return true; return false;} +if ((selector.indexOf('/') == 0) || (selector.indexOf('(') == 0)) return true; return false;} // finding best match for given locator function tx(locator) {
7
diff --git a/ccxt.js b/ccxt.js @@ -13294,10 +13294,21 @@ var poloniex = { async fetchOrderTrades (id, params = {}) { await this.loadMarkets (); + let parsedTrades = undefined; + try { let trades = await this.privatePostReturnOrderTrades (this.extend ({ 'orderNumber': id, }, params)); - return this.parseTrades (trades); + parsedTrades = this.parseTrades (trades); + } + catch (error) { + // Unfortunately, poloniex throws an error if you try to get trades where there is none instead of returning an empty array + if (error.message.indexOf('Order not found, or you are not the person who placed it.') == -1) // I don't know if the library is already capable of handling error messages + throw error; + else + parsedTrades = []; + } + return parsedTrades; }, async cancelOrder (id, params = {}) {
9
diff --git a/sandbox/airplane/airplane1.js b/sandbox/airplane/airplane1.js @@ -5,7 +5,6 @@ import { EntityCollection } from "../../src/og/entity/EntityCollection.js"; import { Globe } from "../../src/og/Globe.js"; import { XYZ } from "../../src/og/layer/XYZ.js"; import { GlobusTerrain } from "../../src/og/terrain/GlobusTerrain.js"; -import { Popup } from "../../src/og/Popup.js"; function rnd(min, max) { return Math.random() * (max - min) + min; @@ -47,18 +46,6 @@ let globus = new Globe({ terrain: new GlobusTerrain() }); -const popup = new Popup({ - planet: globus.planet, - offset: [0, -25], - visibility: false -}); -geoObjects.events.on("lclick", function (e) { - popup.hide(); - - popup.setLonLat(e.pickingObject.getLonLat()); - - popup.setVisibility(true); -}); geoObjects.addTo(globus.planet); window.globus = globus; // window.go = go;
2
diff --git a/generators/server/templates/src/main/java/package/config/LoggingConfiguration.java.ejs b/generators/server/templates/src/main/java/package/config/LoggingConfiguration.java.ejs @@ -129,8 +129,6 @@ public class LoggingConfiguration { // More documentation is available at: https://github.com/logstash/logstash-logback-encoder LogstashEncoder logstashEncoder = new LogstashEncoder(); // Set the Logstash appender config from JHipster properties - logstashEncoder.setCustomFields(customFields); - // Set the Logstash appender config from JHipster properties logstashAppender.addDestinations(new InetSocketAddress(jHipsterProperties.getLogging().getLogstash().getHost(), jHipsterProperties.getLogging().getLogstash().getPort())); ShortenedThrowableConverter throwableConverter = new ShortenedThrowableConverter();
2
diff --git a/scripts/menu/client/cl_menu.lua b/scripts/menu/client/cl_menu.lua + -- Variable that determines whether a player can even access the menu menuIsAccessible = false isMenuDebug = false @@ -94,24 +95,22 @@ function toggleMenuVisibility(visible) end -- Command to be used with the register key mapping -RegisterCommand('txadmin', function() +local function txadmin() if menuIsAccessible then toggleMenuVisibility() else sendSnackbarMessage('error', 'nui_menu.misc.menu_not_allowed', true) end -end) - --- alias -RegisterCommand('tx', function() - ExecuteCommand('txadmin') -end) +end +RegisterCommand('txadmin', txadmin) +RegisterCommand('tx', txadmin) CreateThread(function() - TriggerEvent('chat:addSuggestion', '/txadmin', 'Open the txAdmin menu', {}) - TriggerEvent('chat:addSuggestion', '/tx', 'Open the txAdmin menu', {}) - SetNuiFocus(false, false) + TriggerEvent('chat:removeSuggestion', '/txadmin') + TriggerEvent('chat:removeSuggestion', '/tx') end) +-- end commands + --[[ NUI Callbacks from the menu
1
diff --git a/src/components/app.js b/src/components/app.js @@ -36,7 +36,10 @@ function NetworkCheck(props, context) { MetaMask should be on <strong>Rinkeby</strong> Network.<br /> Currently on { web3Context.networkId == 1 ? - "Main Network" : `network ${web3Context.networkId}` + "Currently on Main Network" : + web3Context.networkId ? + `Currently on network ${web3Context.networkId}` : + "" }. </Overlay> )
9
diff --git a/src/lib/wallet/WalletClassSelector.js b/src/lib/wallet/WalletClassSelector.js import Config from '../../config/config' +import logger from '../../lib/logger/js-logger' -let GoodWallet -if (['production'].includes(Config.env) === false) { - GoodWallet = require('./GoodWalletClass').GoodWallet -} else { - GoodWallet = require('./GoodWalletClassOld').GoodWallet +const { env } = Config + +let walletModule = './GoodWalletClass' +if ('production' === env) { + walletModule += 'Old' } + +const { GoodWallet } = require(walletModule) + +logger.debug('WalletClassSelector:', { env, walletModule }) export { GoodWallet }
0
diff --git a/src/kiri-mode/laser/driver.js b/src/kiri-mode/laser/driver.js "use strict"; -(function() { - - if (!self.kiri.driver) self.kiri.driver = { }; - if (self.kiri.driver.LASER) return; - - let KIRI = self.kiri, - BASE = self.base, - UTIL = BASE.util, - POLY = BASE.polygons, - FDM = KIRI.driver.FDM, - CAM = KIRI.driver.CAM, - LASER = KIRI.driver.LASER = { +// dep: base.polygons +// dep: base.point +// dep: kiri.slice +gapp.register("kiri-mode.laser.driver", [], (root, exports) => { + +const { base, kiri } = root; +const { driver, newSlice } = kiri; +const { FDM, CAM } = driver; +const { polygons, newPoint } = base; + +const POLY = polygons; +const LASER = driver.LASER = { init, slice, prepare, exportGCode, exportSVG, exportDXF - }, - newSlice = KIRI.newSlice, - newPoint = BASE.newPoint; +}; function init(kiri, api) { api.event.on("settings.saved", (settings) => { - let UI = kiri.api.ui; - UI.knife.marker.style.display = UI.knifeOn.checked ? '' : 'none'; + let ui = kiri.api.ui; + ui.knife.marker.style.display = ui.knifeOn.checked ? '' : 'none'; }); } let points = widget.getPoints(); let indices = []; - BASE.slice(points, { + base.slice(points, { zMin: bounds.min.z, zMax: bounds.max.z, zGen(zopt) { function prepare(widgets, settings, update) { let device = settings.device, process = settings.process, - print = self.worker.print = KIRI.newPrint(settings, widgets), + print = self.worker.print = kiri.newPrint(settings, widgets), knifeOn = process.knifeOn, knifeDepth = process.outputKnifeDepth, knifePasses = process.outputKnifePasses, out.push( center.projectOnSlope(s1, knifeTipOff) ); } while (ticks-- > 0) { - out.push( center.projectOnSlope(BASE.newSlopeFromAngle(a1 + off), knifeTipOff) ); + out.push( center.projectOnSlope(base.newSlopeFromAngle(a1 + off), knifeTipOff) ); a1 += step * dir; } out.push( center.projectOnSlope(s2, knifeTipOff) ); dh = device.bedDepth / 2, sort = !process.outputLaserLayer, // sort objects by size when not using laser layer ordering - c = sort ? output.sort(KIRI.Sort) : output, - p = new KIRI.Pack(dw, dh, process.outputTileSpacing).fit(c, !sort); + c = sort ? output.sort(kiri.Sort) : output, + p = new kiri.Pack(dw, dh, process.outputTileSpacing).fit(c, !sort); // test different ratios until packed while (!p.packed) { dw *= 1.1; dh *= 1.1; - p = new KIRI.Pack(dw, dh, process.outputTileSpacing).fit(c ,!sort); + p = new kiri.Pack(dw, dh, process.outputTileSpacing).fit(c ,!sort); } if (pack) }, function(point) { z = point.z; - return UTIL.round(point.x - dx, 3) + "," + UTIL.round(my - point.y - dy, 3); + return util.round(point.x - dx, 3) + "," + util.round(my - point.y - dy, 3); }, function(layer, z, thick, layers) { if (zcolor) { return lines.join('\n'); }; -})(); +});
3
diff --git a/lib/rows.js b/lib/rows.js @@ -35,6 +35,12 @@ function Rows(client) { * @namespace rows */ +/** @ignore */ +function queryOutputTransform(headers, data) { + /*jshint validthis:true */ + return data.content; +} + /** * Executes an execution plan built by a {@link planBuilder}. A plan * enables you to query data using where, groupBy, orderBy, union, join, @@ -157,6 +163,7 @@ Rows.prototype.query = function queryRows(builtPlan, options) { operation.validStatusCodes = [200, 404]; // TODO handle builtPlan as object operation.requestBody = builtPlan.toString(); + operation.outputTransform = queryOutputTransform; return requester.startRequest(operation); }
0
diff --git a/contribs/gmf/src/controllers/abstractmobile.js b/contribs/gmf/src/controllers/abstractmobile.js @@ -169,6 +169,7 @@ gmf.AbstractMobileController = function(config, $scope, $injector) { }); this.manageResize = true; + this.resizeTransition = 500; }; ol.inherits(gmf.AbstractMobileController, gmf.AbstractController);
12
diff --git a/wallet-web-app/src/angular/controllers/guest/loading-controller.js b/wallet-web-app/src/angular/controllers/guest/loading-controller.js @@ -71,12 +71,12 @@ function GuestLoadingController($rootScope, $scope, $log, $q, $timeout, $state, WalletService.importUsingKeystoreFilePath(wmd.keystoreFilePath).then((wallet) => { $rootScope.wallet = wallet; // go to unlock state - $state.go('member.dashboard.main'); + $state.go('guest.process.unlock-keystore'); }).catch((error)=>{ console.log(">>>>>>>>", error); }); } else { - $state.go('member.dashboard.main'); + $state.go('guest.welcome'); } }).catch((error) => {
13
diff --git a/articles/connections/database/mysql.md b/articles/connections/database/mysql.md @@ -9,13 +9,13 @@ toc: true # Authenticate Users with Username and Password using a Custom Database -Applications often rely on user databases for authentication. Auth0 enables you to easily connect to these repositories and use them as identity providers while preserving user credentials and providing many additional features. You can read more about database connections and the different user store options at [Database Identity Providers](/connections/database). +Applications often rely on user databases for authentication. Auth0 enables you to connect to these repositories and use them as identity providers while preserving user credentials and providing additional features. You can read more about database connections and the different user store options at [Database Identity Providers](/connections/database). -In this tutorial, you will be guided through a series of steps to connect your custom user store to Auth0. If you are looking to manage authentication in your application, see [Next Steps](#next-steps) below. +This tutorial will guide you through a series of steps to connect your custom user store to Auth0. If you are looking to manage authentication in your application, see [Next Steps](#next-steps) below. ## 1. Create a database connection -Log into Auth0, and select the [Connections > Database](${manage_url}/#/connections/database) menu option. Click the **New Database Connection** button and provide a name for the database, or select a database you have created previously. +Log into Auth0, and select the [Connections > Database](${manage_url}/#/connections/database) menu option. Click the **New Database Connection** button and provide a name for the database, or select a database you have created. ![](/media/articles/connections/database/database-connections.png) @@ -30,7 +30,7 @@ Click **Custom Database** and turn on the **Use my own database** switch. You have to provide a login script to authenticate the user that will execute each time a user attempts to log in. Optionally, you can create scripts for sign-up, email verification, password reset and delete user functionality. ::: panel-info Note -When creating users, the `get_user` script is called before the `create` script. Be sure that you have implemented both. +When creating users, Auth0 calls the `get_user` script before the `create` script. Be sure that you have implemented both. ::: These custom scripts are *Node.js* code that run in the tenant's sandbox. Auth0 provides templates for most common databases, such as: **ASP.NET Membership Provider**, **MongoDB**, **MySQL**, **PostgreSQL**, **SQLServer**, **Windows Azure SQL Database**, and for a web service accessed by **Basic Auth**. Essentially, you can connect to any kind of database or web service with a custom script. @@ -39,7 +39,7 @@ This tutorial uses **MySQL** as an example. In the **Templates** drop-down, sele ![](/media/articles/connections/database/mysql/db-connection-login-script.png) -The following code is generated for you in the connection editor: +You will see the following sample code in the Connection editor: ```js function login (email, password, callback) { @@ -77,6 +77,8 @@ function login (email, password, callback) { This script connects to a **MySQL** database and executes a query to retrieve the first user with `email == user.email`. With the `bcrypt.compareSync` method, it then validates that the passwords match, and if successful, returns an object containing the user profile information including `id`, `nickname`, and `email`. This script assumes that you have a `users` table containing these columns. You can tweak this script in the editor to adjust it to your own requirements. +If you are using [IBM's DB2](https://www.ibm.com/analytics/us/en/technology/db2/) product, [click here](/connections/database/db2-script) for a sample login script. + ### Database Field Requirements Of course, your custom database will need to have fields in it that will provide the information to populate user profiles. In the above example, the script is checking for an `id`, `nickname`, `email`, and `password`.
0
diff --git a/src/editor/components/RefListComponent.js b/src/editor/components/RefListComponent.js @@ -230,6 +230,7 @@ export default class RefListComponent extends NodeComponent { idrefs = without(idrefs, refId) xref.setAttribute('rid', idrefs.join(' ')) }) + tx.setSelection(null) }) } // Make sure labels are regenerated
12
diff --git a/src/routes/Collection.js b/src/routes/Collection.js @@ -26,11 +26,12 @@ class Collection extends React.Component { } componentDidMount() { - require.ensure([], (require) => { - const module = require('@hackoregon/civic-housing/src/components/App').default; - this.setState({ rendered: true, module }); - // return require('@hackoregon/civic-housing/src/components/App'); - }); + // require.ensure([], (require) => { + // // const + // // const module = require('@hackoregon/civic-housing/src/components/App').default; + // this.setState({ rendered: true, module }); + // // return require('@hackoregon/civic-housing/src/components/App'); + // }); } render() {
2
diff --git a/package.json b/package.json "gl-plot2d": "^1.3.1", "gl-plot3d": "^1.5.10", "gl-pointcloud2d": "^1.0.1", - "gl-scatter3d": "git://github.com/gl-vis/gl-scatter3d.git#8915d2ec6a89b7dc76e216487e82143dbc165c6f", + "gl-scatter3d": "^1.0.13", "gl-select-box": "^1.0.2", "gl-spikes2d": "^1.0.1", "gl-streamtube3d": "^1.1.0",
4
diff --git a/src/screens/editor/children/beneficiarySelectionContent.tsx b/src/screens/editor/children/beneficiarySelectionContent.tsx @@ -65,7 +65,7 @@ const BeneficiarySelectionContent = ({handleOnSaveBeneficiaries, draftId }) => { }) } handleOnSaveBeneficiaries(beneficiaries); - _resetInputs(); + _resetInputs(false); } @@ -88,12 +88,15 @@ const BeneficiarySelectionContent = ({handleOnSaveBeneficiaries, draftId }) => { - const _onWeightInputChange = (value) => { + const _onWeightInputChange = (value:string) => { let _value = (parseInt(value, 10) || 0) * 100; + const _diff = _value - newWeight; - beneficiaries[0].weight = beneficiaries[0].weight - _diff; + const newAuthorWeight = beneficiaries[0].weight - _diff; + beneficiaries[0].weight = newAuthorWeight + setNewWeight(_value) - setIsWeightValid(_value > 0 && _value <= 10000) + setIsWeightValid(_value >= 0 && newAuthorWeight >= 0); setBeneficiaries([...beneficiaries]); }; @@ -115,12 +118,13 @@ const BeneficiarySelectionContent = ({handleOnSaveBeneficiaries, draftId }) => { _lookupAccounts(value); }; - const _resetInputs = () => { - if(newWeight){ + const _resetInputs = (adjustWeight = true) => { + if(newWeight && adjustWeight){ beneficiaries[0].weight = beneficiaries[0].weight + newWeight; setBeneficiaries([...beneficiaries]) - setNewWeight(0); } + + setNewWeight(0); setNewEditable(false); setIsWeightValid(false); setIsUsernameValid(false);
7
diff --git a/test/integration/offline.js b/test/integration/offline.js @@ -95,6 +95,53 @@ describe('Offline', () => { }); + context('with private function and noAuth option set', () => { + let offline; + const validToken = 'valid-token' + + before(done => { + offline = new OfflineBuilder(new ServerlessBuilder(), { apiKey: validToken, noAuth: true }).addFunctionConfig('fn2', { + handler: 'handler.basicAuthentication', + events: [{ + http: { + path: 'fn3', + method: 'GET', + private: true, + }, + }], + }, (event, context, cb) => { + const response = { + statusCode: 200, + body: JSON.stringify({ + message: 'Private Function Executed Correctly', + }), + }; + cb(null, response); + }).addApiKeys(['token']).toObject(); + done(); + }); + + it('should execute the function correctly if no API key is provided', done => { + offline.inject({ + method: 'GET', + url: '/fn3', + }, res => { + expect(res.statusCode).to.eq(200); + done(); + }); + }); + + it('should execute the function correctly if API key is provided', done => { + offline.inject({ + method: 'GET', + url: '/fn3', + }, res => { + expect(res.statusCode).to.eq(200); + done(); + }); + }); + }); + context('lambda integration', () => { it('should use event defined response template and headers', done => { const offline = new OfflineBuilder().addFunctionConfig('index', {
0
diff --git a/app/modules/account.js b/app/modules/account.js @@ -32,16 +32,14 @@ export function setKeys (keys: any) { } export const loginNep2 = (passphrase: string, wif: string, history: Object) => (dispatch: DispatchType) => { - if (!passphrase || !wif) { return null } - if (!validatePassphrase(passphrase)) { dispatch(sendEvent(false, 'Passphrase too short')) setTimeout(() => dispatch(clearTransactionEvent()), 5000) return null } dispatch(sendEvent(true, 'Decrypting encoded key...')) - const wrongPassphraseAction = () => { - dispatch(sendEvent(false, 'Wrong passphrase')) + const wrongPassphraseOrEncryptedKeyError = () => { + dispatch(sendEvent(false, 'Wrong passphrase or invalid encrypted key')) setTimeout(() => dispatch(clearTransactionEvent()), 5000) } setTimeout(() => { @@ -51,13 +49,14 @@ export const loginNep2 = (passphrase: string, wif: string, history: Object) => ( history.push(ROUTES.DASHBOARD) dispatch(clearTransactionEvent()) }).catch(() => { - wrongPassphraseAction() + wrongPassphraseOrEncryptedKeyError() }) } catch (e) { - wrongPassphraseAction() + wrongPassphraseOrEncryptedKeyError() } }, 500) } + export const loginWithPrivateKey = (wif: string, history: Object, route?: RouteType) => (dispatch: DispatchType) => { if (verifyPrivateKey(wif)) { dispatch(login(wif))
3
diff --git a/core/algorithm-builder/environments/nodejs/wrapper/package.json b/core/algorithm-builder/environments/nodejs/wrapper/package.json "author": "", "license": "ISC", "dependencies": { - "@hkube/nodejs-wrapper": "^2.0.45" + "@hkube/nodejs-wrapper": "^2.0.50" }, "devDependencies": {} } \ No newline at end of file
3
diff --git a/src/components/ProductDetailOptionsList/ProductDetailOptionsList.js b/src/components/ProductDetailOptionsList/ProductDetailOptionsList.js @@ -3,7 +3,6 @@ import PropTypes from "prop-types"; import Grid from "material-ui/Grid"; import { withStyles } from "material-ui/styles"; import { inject, observer } from "mobx-react"; -import { Router } from "routes"; import Badge from "components/Badge"; import { inventoryStatus } from "lib/utils"; import ProductDetailOption from "components/ProductDetailOption"; @@ -27,26 +26,17 @@ const styles = (theme) => ({ }); @withStyles(styles, { withTheme: true }) -@inject("pdpStore") +@inject("uiStore") @observer export default class OptionsList extends Component { static propTypes = { classes: PropTypes.object.isRequired, + onSelectOption: PropTypes.func, options: PropTypes.arrayOf(PropTypes.object), - pdpStore: PropTypes.object, productSlug: PropTypes.string, - theme: PropTypes.object - } - - selectOption = (option) => { - const { pdpStore } = this.props; - - pdpStore.selectedOption = option._id; - - Router.pushRoute("product", { - productSlug: this.props.productSlug, - variantId: option._id - }); + selectedOptionId: PropTypes.string, + theme: PropTypes.object, + uiStore: PropTypes.object } renderInventoryStatus(option) { @@ -63,7 +53,15 @@ export default class OptionsList extends Component { } render() { - const { classes: { root }, options, pdpStore, theme } = this.props; + const { + classes: { root }, + onSelectOption, + options, + selectedOptionId, + theme, + uiStore: { pdpSelectedOptionId } + } = this.props; + console.log("this.props.uiStore", pdpSelectedOptionId); if (!Array.isArray(options)) return null; @@ -72,8 +70,8 @@ export default class OptionsList extends Component { {options.map((option) => ( <Grid item key={option._id}> <ProductDetailOption - onClick={this.selectOption} - selectedOption={pdpStore.selectedOption} + isActive={selectedOptionId === option._id} + onClick={onSelectOption} option={option} /> {this.renderInventoryStatus(option)}
2
diff --git a/tests/e2e/config/bootstrap.js b/tests/e2e/config/bootstrap.js @@ -312,14 +312,6 @@ beforeAll( async () => { page.on( 'response', observeRestResponse ); } - page.on( 'response', ( res ) => { - if ( res.status() > 399 ) { - const req = res.request(); - // eslint-disable-next-line no-console - console.debug( res.status(), req.method(), req.url() ); - } - } ); - // There's no good way to otherwise conditionally enable this logging // since the code needs to be built into the e2e-utilities.js. if ( '1' === process.env.DEBUG_REDUX ) {
2
diff --git a/package.json b/package.json { "name": "prettier-atom", "main": "./dist/main.js", - "version": "0.44.0", + "version": "0.45.0", "description": "Atom plugin for formatting JavaScript using prettier with (optional) prettier-eslint integration", "keywords": [ "atom",
6
diff --git a/character-controller.js b/character-controller.js @@ -688,6 +688,13 @@ class StatePlayer extends PlayerBase { removeActionIndex(index) { this.getActionsState().delete(index); } + clearActions() { + const actionsState = this.getActionsState(); + const numActions = actionsState.length; + for (let i = numActions - 1; i >= 0; i--) { + this.removeActionIndex(i); + } + } setControlAction(action) { const actions = this.getActionsState(); for (let i = 0; i < actions.length; i++) { @@ -1236,6 +1243,12 @@ class StaticUninterpolatedPlayer extends PlayerBase { action, }); } + clearActions() { + const numActions = this.actions.length; + for (let i = numActions - 1; i >= 0; i--) { + this.removeActionIndex(i); + } + } updateInterpolation = UninterpolatedPlayer.prototype.updateInterpolation; } class NpcPlayer extends StaticUninterpolatedPlayer {
0
diff --git a/network.js b/network.js @@ -1909,6 +1909,8 @@ function handleJustsaying(ws, subject, body){ case 'bugreport': if (!body) return; + if (conf.ignoreBugreportRegexp && new RegExp(conf.ignoreBugreportRegexp).test(body.message)) + return console.log('ignoring bugreport'); mail.sendBugEmail(body.message, body.exception); break;
8
diff --git a/tests/e2e/plugins/site-verification-api-mock.php b/tests/e2e/plugins/site-verification-api-mock.php */ use Google\Site_Kit\Core\REST_API\REST_Routes; -use Google\Site_Kit\Plugin; register_activation_hook( __FILE__, function () { delete_transient( 'gsk_e2e_site_verified' ); @@ -19,23 +18,15 @@ register_deactivation_hook( __FILE__, function () { add_action( 'rest_api_init', function () { - $get_site_url = function ($data) { - if ( (bool) get_transient( 'gsk_e2e_site_verified' ) ) { - return Plugin::instance()->context()->get_reference_site_url(); - } - - return isset( $data['siteURL'] ) ? $data['siteURL'] : ''; - }; - register_rest_route( REST_Routes::REST_ROOT, 'modules/search-console/data/is-site-exist', array( - 'callback' => function ( WP_REST_Request $request ) use ( $get_site_url ) { + 'callback' => function ( WP_REST_Request $request ) { $data = $request->get_param( 'data' ); return array( - 'siteURL' => $get_site_url( $data ), + 'siteURL' => $data['siteURL'], 'verified' => (bool) get_transient( 'gsk_e2e_site_verified' ), ); } @@ -47,12 +38,10 @@ add_action( 'rest_api_init', function () { REST_Routes::REST_ROOT, 'modules/search-console/data/siteverification-list', array( - 'callback' => function ( WP_REST_Request $request ) use ( $get_site_url ) { - $data = $request->get_param( 'data' ); - + 'callback' => function () { return array( 'type' => 'SITE', - 'identifier' => $get_site_url( $data ), + 'identifier' => home_url( '/' ), 'verified' => (bool) get_transient( 'gsk_e2e_site_verified' ), ); }
14
diff --git a/assets/src/dashboard/app/api/useStoryApi.js b/assets/src/dashboard/app/api/useStoryApi.js @@ -117,6 +117,7 @@ const useStoryApi = (dataAdapter, { editStoryURL, wpApi }) => { const response = await dataAdapter.get(path, { parse: false, + cache: 'no-cache', }); const totalPages =
12
diff --git a/src/struct/commands/Command.js b/src/struct/commands/Command.js @@ -60,7 +60,7 @@ class Command extends AkairoModule { this.argumentRunner = new ArgumentRunner(this); this.argumentGenerator = Array.isArray(args) ? ArgumentRunner.fromArguments(args.map(arg => [arg.id, new Argument(this, arg)])) - : args; + : args.bind(this); /** * Usable only in this channel type.
1
diff --git a/activity/settings/base.py b/activity/settings/base.py @@ -124,7 +124,7 @@ SECRET_KEY = os.environ.get('SECRET_KEY') # SITE CONFIGURATION # Hosts/domain names that are valid for this site # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts -ALLOWED_HOSTS = ['127.0.0.1'] +ALLOWED_HOSTS = ['127.0.0.1', '0.0.0.0'] # END SITE CONFIGURATION
0
diff --git a/modules/Layout.js b/modules/Layout.js @@ -29,7 +29,7 @@ layoutObject has: * `undefined` - blank, can be used for padding * `"txt"` - a text label, with value `label` and `r` for text rotation. 'font' is required * `"btn"` - a button, with value `label` and callback `cb` - * `"img"` - an image where the function `src` is called to return an image to draw + * `"img"` - an image where `src` is an image, or a function which is called to return an image to draw * `"custom"` - a custom block where `render(layoutObj)` is called to render * `"h"` - Horizontal layout, `c` is an array of more `layoutObject` * `"v"` - Veritical layout, `c` is an array of more `layoutObject` @@ -160,11 +160,12 @@ function Layout(layout, options) { if (process.env.HWVERSION==2) { // Handler for touch events function touchHandler(l,e) { - if (l.type=="btn" && l.cb && e.x>=l.x && e.y>=l.y && e.x<=l.x+l.w && e.y<=l.y+l.h) - l.cb(e); + if (l.type=="btn" && l.cb && e.x>=l.x && e.y>=l.y && e.x<=l.x+l.w && e.y<=l.y+l.h) { + if (e.type==2 && l.cbl) l.cbl(e); else if (l.cb) l.cb(e); + } if (l.c) l.c.forEach(n => touchHandler(n,e)); } - Bangle.touchHandler = function(_,e){touchHandler(layout,e)}; + Bangle.touchHandler = (_,e)=>touchHandler(this._l,e); Bangle.on('touch',Bangle.touchHandler); } @@ -253,7 +254,7 @@ Layout.prototype.render = function (l) { ]; g.setColor(l.selected?g.theme.bgH:g.theme.bg2).fillPoly(poly).setColor(l.selected ? g.theme.fgH : g.theme.fg2).drawPoly(poly).setFont("6x8",2).setFontAlign(0,0,l.r).drawString(l.label,l.x+l.w/2,l.y+l.h/2); }, "img":function(l){ - g.drawImage(l.src(), l.x + (0|l.pad), l.y + (0|l.pad)); + g.drawImage("function"==typeof l.src?l.src():l.src, l.x + (0|l.pad), l.y + (0|l.pad)); }, "custom":function(l){ l.render(l); },"h":function(l) { l.c.forEach(render); }, @@ -367,7 +368,7 @@ Layout.prototype.update = function() { l._h = 32; l._w = 20 + l.label.length*12; }, "img": function(l) { - var m = g.imageMetrics(l.src()); // get width and height out of image + var m = g.imageMetrics("function"==typeof l.src?l.src():l.src); // get width and height out of image l._w = m.width; l._h = m.height; }, "": function(l) {
11
diff --git a/src/plugins/modules/_anchor.js b/src/plugins/modules/_anchor.js @@ -293,7 +293,7 @@ export default { setLinkPreview: function (context, value) { const preview = context.preview; const protocol = this.options.linkProtocol; - const reservedProtocol = /^(mailto\:|https*\:\/\/|#)/.test(value); + const reservedProtocol = /^(mailto\:|tel\:|sms\:|https*\:\/\/|#)/.test(value); const sameProtocol = !protocol ? false : this._w.RegExp('^' + value.substr(0, protocol.length)).test(protocol); context.linkValue = preview.textContent = !value ? '' : (protocol && !reservedProtocol && !sameProtocol) ? protocol + value : reservedProtocol ? value : /^www\./.test(value) ? 'http://' + value : this.context.anchor.host + (/^\//.test(value) ? '' : '/') + value;
3
diff --git a/src/pages/settings/Profile/ProfilePage.js b/src/pages/settings/Profile/ProfilePage.js @@ -213,9 +213,9 @@ class ProfilePage extends Component { </Text> <FullNameInputRow firstName={this.state.firstName} - hasFirstNameError={PersonalDetails.getMaxCharacterError(this.state.firstNameError)} + firstNameError={PersonalDetails.getMaxCharacterError(this.state.firstNameError)} lastName={this.state.lastName} - hasLastNameError={PersonalDetails.getMaxCharacterError(this.state.lastNameError)} + lastNameError={PersonalDetails.getMaxCharacterError(this.state.lastNameError)} onChangeFirstName={firstName => this.setState({firstName})} onChangeLastName={lastName => this.setState({lastName})} style={[styles.mt4, styles.mb4]}
10
diff --git a/tests/e2e/specs/plugin-reset.test.js b/tests/e2e/specs/plugin-reset.test.js @@ -28,22 +28,22 @@ describe( 'Plugin Reset', () => { it( 'displays a confirmation dialog when clicking the "Reset Site Kit" link', async() => { await expect( page ).toClick( 'button.googlesitekit-cta-link', { text: 'Reset Site Kit' } ); - await page.waitForSelector( '.mdc-dialog--open' ); + await page.waitForSelector( '.mdc-dialog--open .mdc-button' ); - await expect( page ).toMatchElement( '.mdc-dialog.mdc-dialog--open .mdc-button', { text: 'Reset' } ); + await expect( page ).toMatchElement( '.mdc-dialog--open .mdc-button', { text: 'Reset' } ); } ); it( 'dismisses the reset confirmation dialog when clicking "Cancel"', async() => { await expect( page ).toClick( 'button.googlesitekit-cta-link', { text: 'Reset Site Kit' } ); - await page.waitForSelector( '.mdc-dialog--open' ); + await page.waitForSelector( '.mdc-dialog--open button' ); - await expect( page ).toClick( '.mdc-dialog.mdc-dialog--open button', { text: 'Cancel' } ); + await expect( page ).toClick( '.mdc-dialog--open button', { text: 'Cancel' } ); } ); it( 'disconnects Site Kit by clicking the "Reset" button in the confirmation dialog', async() => { await expect( page ).toClick( 'button.googlesitekit-cta-link', { text: 'Reset Site Kit' } ); - await page.waitForSelector( '.mdc-dialog--open' ); - await expect( page ).toClick( '.mdc-dialog.mdc-dialog--open .mdc-button', { text: 'Reset' } ); + await page.waitForSelector( '.mdc-dialog--open .mdc-button' ); + await expect( page ).toClick( '.mdc-dialog--open .mdc-button', { text: 'Reset' } ); await visitAdminPage( 'admin.php', 'page=googlesitekit-dashboard' );
3
diff --git a/app/models/organization.rb b/app/models/organization.rb @@ -60,11 +60,6 @@ class Organization < Sequel::Model DEFAULT_OBS_GENERAL_QUOTA = 0 DEFAULT_MAPZEN_ROUTING_QUOTA = nil - def initialize(attrs = {}) - super - self.password_expiration_in_d ||= default_password_expiration_in_d - end - def default_password_expiration_in_d Cartodb.get_config(:passwords, 'expiration_in_d') end
2
diff --git a/package.json b/package.json "babel-preset-es2015": "^6.24.1", "bookshelf-jsdoc-theme": "^0.2.0", "chai": "^3.5.0", - "eslint": "4.17.0", + "eslint": "^4.17.0", "istanbul": "^0.4.5", "jsdoc": "^3.4.0", "knex": "^0.14.0",
11
diff --git a/lib/routes/universities/hit/today.js b/lib/routes/universities/hit/today.js @@ -36,9 +36,15 @@ module.exports = async (ctx) => { return Promise.resolve(JSON.parse(cache)); } - const response = await got.get(link); + const response = await got({ + method: 'get', + url: link, + headers: { + Referer: host, + }, + }); - if (response.request.res.connection._host === 'ids.hit.edu.cn') { + if (response.req._headers.host === 'ids.hit.edu.cn') { const single = { pubDate: new Date( link
1
diff --git a/packages/vulcan-accounts/imports/ui/components/LoginForm.jsx b/packages/vulcan-accounts/imports/ui/components/LoginForm.jsx @@ -52,7 +52,7 @@ export class AccountsLoginForm extends Tracker.Component { // Set inital state. this.state = { messages: [], - waiting: true, + waiting: false, formState: props.formState ? props.formState : (currentUser ? STATES.PROFILE : STATES.SIGN_IN), onSubmitHook: props.onSubmitHook || Accounts.ui._options.onSubmitHook, onSignedInHook: resetStoreAndThen(postLogInAndThen(props.onSignedInHook || Accounts.ui._options.onSignedInHook)),
12
diff --git a/src/components/crafts-table/index.js b/src/components/crafts-table/index.js @@ -65,7 +65,7 @@ function costItemsCell({ value }) { }; function CraftTable(props) { - const {selectedStation, freeFuel, nameFilter, levelFilter} = props; + const {selectedStation, freeFuel, nameFilter, levelFilter = 3} = props; const [crafts, setCrafts] = useState([]); const { query } = useQuery` {
12
diff --git a/src/encoded/types/experiment.py b/src/encoded/types/experiment.py @@ -542,6 +542,7 @@ class Experiment(Dataset, 'award.project', 'assembly', 'internal_status', + 'lab.title', 'audit_category' # Added for auditmatrix ], 'group_by': ['biosample_type', 'biosample_term_name'],
0
diff --git a/lang/main.json b/lang/main.json "title": "__app__ needs to use your microphone and camera." }, "suspendedoverlay": { - "title": "Your video call was interrupted, because this computer went to sleep.", - "text": "Press <i>Rejoin</i> button to connect back to your conversation.", + "title": "Your video call was interrupted because this computer went to sleep.", + "text": "Press the <i>Rejoin</i> button to reconnect.", "rejoinKeyTitle": "Rejoin" }, "toolbar": {
7
diff --git a/website/siteConfig.js b/website/siteConfig.js @@ -108,6 +108,7 @@ const siteConfig = { (md) => { extlink(md, { host: 'sdk.apify.com', // The hrefs that you DON'T want to be external + rel: 'noopener', // We want to keep referrer and follow for analytics on apify.com }); }, ],
11
diff --git a/webaverse.js b/webaverse.js @@ -354,6 +354,7 @@ export default class Webaverse extends EventTarget { } } +let diorama = null; window.addEventListener('keydown', e => { if (e.which === 219) { // [ const localPlayer = metaversefileApi.useLocalPlayer(); @@ -392,7 +393,12 @@ window.addEventListener('keydown', e => { } else if (e.which === 221) { // ] const localPlayer = metaversefileApi.useLocalPlayer(); if (localPlayer.avatar) { - dioramaManager.createDiorama(localPlayer); + if (!diorama) { + diorama = dioramaManager.createDiorama(localPlayer); + } else { + diorama.destroy(); + diorama = null; + } } } }); \ No newline at end of file
0
diff --git a/src/core/background/extension.js b/src/core/background/extension.js 'use strict'; +/** + * The extension uses `browser.runtime.sendMessage` function for communication + * between different modules using the following message types: + * + * 1) events: + * - EVENT_STATE_CHANGED: The connector state is changed + * @param {Object} state Connector state + * - EVENT_SONG_UPDATED: The current song is updated + * @param {Object} data Song instance copy + * - EVENT_READY: The connector is injected and the controller is created + * - EVENT_PING: The 'ping' event to check if connector is injected + * + * 2) requests: + * - REQUEST_GET_SONG: Get now playing song + * @return {Object} Song instance copy + * - REQUEST_CORRECT_SONG: Correct song info + * @param {Object} data Object contains corrected song info + * - REQUEST_TOGGLE_LOVE: Toggle song love status + * @param {Boolean} isLoved Flag indicates song is loved + * - REQUEST_RESET_SONG: Reset corrected song info + * - REQUEST_SKIP_SONG: Ignore (don't scrobble) current song + * - REQUEST_AUTHENTICATE: Authenticate scrobbler + * @param {String} scrobbler Scrobbler label + */ + define((require) => { const GA = require('service/ga'); const browser = require('webextension-polyfill');
5
diff --git a/metaverse_modules/land/index.js b/metaverse_modules/land/index.js @@ -11,6 +11,9 @@ export default e => { { "start_url": "https://webaverse.github.io/dual-contouring-terrain/" }, + { + "start_url": "https://webaverse.github.io/water/" + }, /* { "start_url": "https://webaverse.github.io/silk-grass/" },
0
diff --git a/src/client/js/components/Admin/SlackIntegration/SlackIntegration.jsx b/src/client/js/components/Admin/SlackIntegration/SlackIntegration.jsx @@ -46,12 +46,12 @@ const SlackIntegration = (props) => { const fetchSlackIntegrationData = useCallback(async() => { try { const response = await appContainer.apiv3.get('/slack-integration-settings'); - const { currentBotType, customBotWithoutProxySettings } = response.data.slackBotSettingParams; + const { connectionStatuses, settings } = response.data; const { slackSigningSecret, slackBotToken, slackSigningSecretEnvVars, slackBotTokenEnvVars, - } = customBotWithoutProxySettings; - console.log(customBotWithoutProxySettings); + } = settings; + console.log(connectionStatuses); setCurrentBotType(currentBotType); setSlackSigningSecret(slackSigningSecret); setSlackBotToken(slackBotToken);
9