code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/Source/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js b/Source/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js @@ -293,7 +293,7 @@ function Cesium3DTilesInspectorViewModel(scene, performanceContainer) { this.styleString = "{}"; /** - * Gets or sets the JSON for the tileset style. This property is observable. + * Gets or sets the JSON for the tileset enableDebugWireframe attribute. This property is observable. * * @type {Boolean} * @default false
3
diff --git a/articles/rules/current/management-api.md b/articles/rules/current/management-api.md @@ -41,6 +41,10 @@ function (user, context, callback) { } ``` +::: +You can checked the available library versions [here](https://auth0-extensions.github.io/canirequire/#auth0). This provides a filtered list of available libraries that can be set as required. +::: + ::: note The Access Token for the Management API which is available through `auth0.accessToken` is limited to the `read:users` and `update:users` scopes. If you require a broader range of scopes you can [request a token using Client Credentials Grant](/api/management/v2/tokens#automate-the-process). :::
3
diff --git a/test/jasmine/tests/gl2d_plot_interact_test.js b/test/jasmine/tests/gl2d_plot_interact_test.js @@ -348,7 +348,7 @@ describe('@gl Test gl2d plots', function() { .then(done); }); - it('should be able to toggle visibility', function(done) { + it('@flaky should be able to toggle visibility', function(done) { var _mock = Lib.extendDeep({}, mock); _mock.data[0].line.width = 5;
0
diff --git a/assets/default-utterances.json b/assets/default-utterances.json -["what is a chat bot", -"exit", -"quit", -"start the quiz", -"how much does it cost", -"what is a data warehouse", -"what is coronary artery disease", -"what is an electric vehicle", -"tell me about amazon alexa", -"tell me about body mass index", -"tell me about healthy eating", -"how do I know if I am a linux expert", -"should I stop smoking", -"how bad is excessive alcohol consumption", -"do I get enough sleep", -"tell me about cloud computing", -"do I get enough exercise", -"what is a good training program for windows", -"is programming bad for you", -"is bacon good for you", -"what is a stack overflow", -"should I use a document store", -"give me advice on regular training", -"what are the benfits of a cardio workout", -"should I learn javascript programming", -"is working in support good for my career", -"where can i learn python", -"how quickly will I recover from triple bypass surgery", -"how quickly will I find employment after graduating", -"how serious is a core dump", -"what is a graphics processing unit", -"what should I do when i see errors in the logfile", -"tell me about serverless computing", -"are computer viruses serious", -"what is a slam dunk", -"what is a first down", -"what is normal blood pressure", -"how many people live in Ireland", -"how do I measure my volume", -"tell me the benefits of green vegetables", -"when should I call emergency services", -"where is the nearest computer repair store", -"when should I hire a consultant", -"tell me about artificial intelligence", -"does my family history affect my risk", -"is is important to run regular backups", -"do I have an unusual appearance", -"is there a gene associated with musical ability", -"what is data science", -"how do I donate money", -"how do I volunteer time", -"tell me about the phrase life is good", -"will robots rule the world", -"hello", -"feedback", -"One", -"Two", -"Three", -"next", -"previous", -"help", -"help me", -"yes", -"no", -"thumbs up", -"thumbs down", -"a", -"b", -"c", -"d", -"e", -"f", -"g", -"A", -"B", -"C", -"D", -"E", -"F", -"G", -"1234567890" +["dummy utterance" ]
2
diff --git a/packages/jaeger-ui/src/model/ddg/transformDdgData.tsx b/packages/jaeger-ui/src/model/ddg/transformDdgData.tsx @@ -23,7 +23,7 @@ import { TDdgVisibilityIdxToPathElem, } from './types'; -const stringifyPayloadEntry = ({ service, operation }: TDdgPayloadEntry) => `${service}::${operation}`; +const stringifyPayloadEntry = ({ service, operation }: TDdgPayloadEntry) => `${service}\v${operation}`; export default function transformDdgData( payload: TDdgPayload, @@ -31,15 +31,25 @@ export default function transformDdgData( ): TDdgModel { const serviceMap: TDdgServiceMap = new Map(); const pathElemsByDistance: TDdgPathElemsByDistance = new Map(); + const pathsComparisonMap: Map<TDdgPayloadEntry[], string> = new Map(); const paths = payload .slice() - .sort((a, b) => - a - .map(stringifyPayloadEntry) - .join() - .localeCompare(b.map(stringifyPayloadEntry).join()) - ) + .sort((a, b) => { + let aCompareValue = pathsComparisonMap.get(a); + if (!aCompareValue) { + aCompareValue = a.map(stringifyPayloadEntry).join(); + pathsComparisonMap.set(a, aCompareValue); + } + let bCompareValue = pathsComparisonMap.get(b); + if (!bCompareValue) { + bCompareValue = b.map(stringifyPayloadEntry).join(); + pathsComparisonMap.set(b, bCompareValue); + } + if (aCompareValue > bCompareValue) return 1; + if (aCompareValue < bCompareValue) return -1; + return 0; + }) .map(payloadPath => { // Path with stand-in values is necessary for assigning PathElem.memberOf const path: TDdgPath = { focalIdx: -1, members: [] };
7
diff --git a/app/shared/utils/StatsFetcher.js b/app/shared/utils/StatsFetcher.js @@ -32,7 +32,7 @@ export default class StatsFetcher { } totalStakedToOthers() { - if (!this.delegations) return Decimal(0); + if (!this.delegations || this.delegations.length === 0) return Decimal(0); const cpuWeightsStakedToOthers = this.delegations.map((delegation) => Number(delegation.cpu_weight.split(' ')[0])); const netWeightsStakedToOthers = this.delegations.map((delegation) => Number(delegation.net_weight.split(' ')[0]));
9
diff --git a/articles/api-auth/which-oauth-flow-to-use.md b/articles/api-auth/which-oauth-flow-to-use.md @@ -18,7 +18,7 @@ useCase: OAuth 2.0 supports several different **grants**. By grants, we mean ways of retrieving an Access Token. Deciding which one is suited for your case depends mostly on your Application's type, but other parameters weigh in as well, like the level of trust for the Application, or the experience you want your users to have. -Follow this flow to identify the grant that best matches your case. If you need user information then please check OIDC flows, these grants will only provide access token to the application. +Follow this flow to identify the grant that best matches your case. ![Flowchart for OAuth 2.0 Grants](/media/articles/api-auth/oauth2-grants-flow.png)
2
diff --git a/src/pages/ReimbursementAccount/BankAccountManualStep.js b/src/pages/ReimbursementAccount/BankAccountManualStep.js @@ -19,6 +19,7 @@ import * as ReimbursementAccount from '../../libs/actions/ReimbursementAccount'; import exampleCheckImage from './exampleCheckImage'; import ReimbursementAccountForm from './ReimbursementAccountForm'; import * as ReimbursementAccountUtils from '../../libs/ReimbursementAccountUtils'; +import {connectBankAccountManually} from "../../libs/actions/BankAccounts"; const propTypes = { ...withLocalizePropTypes, @@ -72,15 +73,11 @@ class BankAccountManualStep extends React.Component { if (!this.validate()) { return; } - - const params = { - bankAccountID: ReimbursementAccountUtils.getDefaultStateForField(this.props, 'bankAccountID', 0), - mask: ReimbursementAccountUtils.getDefaultStateForField(this.props, 'plaidMask'), - bankName: ReimbursementAccountUtils.getDefaultStateForField(this.props, 'bankName'), - plaidAccountID: ReimbursementAccountUtils.getDefaultStateForField(this.props, 'plaidAccountID'), - ...this.state, - }; - BankAccounts.setupWithdrawalAccount(params); + BankAccounts.connectBankAccountManually( + this.state.accountNumber, + this.state.routingNumber, + ReimbursementAccountUtils.getDefaultStateForField(this.props, 'plaidMask'), + ); } /**
4
diff --git a/lib/node_modules/@stdlib/_tools/scripts/create_namespace_types.js b/lib/node_modules/@stdlib/_tools/scripts/create_namespace_types.js @@ -213,6 +213,15 @@ function main() { str = replace( str, '\n', '\n\t' ); prop = '\t' + str + '\n' + prop; } + else { + tsDoc = tsDef.match( /(\/\*\*\n[\s\S]+?\*\/)\nexport =/ ); + if ( tsDoc && tsDoc[ 1 ] ) { + str = tsDoc[ 1 ]; + str = replace( str, RE_EXAMPLE, onReplace ); + str = replace( str, '\n', '\n\t' ); + prop = '\t' + str + '\n' + prop; + } + } match = RE.exec( indexFile ); if ( match ) { prop += '\n';
9
diff --git a/components/Search/constants.js b/components/Search/constants.js @@ -5,8 +5,8 @@ export const SUPPORTED_FILTER = { 'article', 'discussion', 'editorialNewsletter', - 'format', - 'dossier' + 'dossier', + 'section' ], kind: ['meta', 'scribble'], textLength: ['short', 'medium', 'long', 'epic'],
14
diff --git a/test/test.js b/test/test.js @@ -275,7 +275,7 @@ function startRefTest(masterMode, showRefImages) { } function checkRefsTmp() { if (masterMode && fs.existsSync(refsTmpDir)) { - if (options.noPrompt) { + if (options.noPrompts) { testUtils.removeDirSync(refsTmpDir); setup(); return;
1
diff --git a/closure/goog/url/url.js b/closure/goog/url/url.js @@ -646,8 +646,9 @@ class UrlPrimitivePartsPartial { /** @const {string|undefined} */ this.password; + /** @const {string|undefined} */ - this.host; + this.hostname; /** @const {string|undefined} */ this.port;
14
diff --git a/js/plugin/Search.js b/js/plugin/Search.js @@ -9,6 +9,15 @@ BR.Search = L.Control.Geocoder.extend({ position: 'topleft' }, + initialize: function(options) { + L.Control.Geocoder.prototype.initialize.call(this, options); + L.setOptions(this, { + // i18next.t will only return 'undefined' if it is called in a static context + // (e.g. when added directly to "options:" above), so we have to call it here + placeholder: i18next.t('map.geocoder-placeholder') + }); + }, + markGeocode: function(result) { this._map.fitBounds(result.geocode.bbox, { maxZoom: 17
11
diff --git a/src/extras/console.js b/src/extras/console.js @@ -34,7 +34,7 @@ const colorizeSettings = { //================================================================ -function log(msg, context=null){ +function log(msg='', context=null){ let conCtx = getConCtx(context); let histCtx = getHistCtx(context); console.log(chalk.bold.bgBlue(`[${conCtx}]`)+' '+msg); @@ -42,7 +42,7 @@ function log(msg, context=null){ return `[INFO][${conCtx}] ${msg}`; } -function logOk(msg, context=null){ +function logOk(msg='', context=null){ let conCtx = getConCtx(context); let histCtx = getHistCtx(context); console.log(chalk.bold.bgGreen(`[${conCtx}]`)+' '+msg); @@ -50,7 +50,7 @@ function logOk(msg, context=null){ return `[OK][${conCtx}] ${msg}`; } -function logWarn(msg, context=null) { +function logWarn(msg='', context=null) { let conCtx = getConCtx(context); let histCtx = getHistCtx(context); console.log(chalk.bold.bgYellow(`[${conCtx}]`)+' '+msg); @@ -58,7 +58,7 @@ function logWarn(msg, context=null) { return `[WARN][${conCtx}] ${msg}`; } -function logError(msg, context=null) { +function logError(msg='', context=null) { let conCtx = getConCtx(context); let histCtx = getHistCtx(context); console.log(chalk.bold.bgRed(`[${conCtx}]`)+' '+msg); @@ -89,13 +89,26 @@ function dir(data){ } console.log() }else{ - let div = "=".repeat(32); - // let printData = (typeof data !== 'undefined')? JSON.stringify(data, null, 2) : 'undefined'; - let printData = chalk.keyword('orange').italic(typeof data + ': '); + let printData; if(typeof data == 'undefined'){ - printData = chalk.white('undefined'); + printData = chalk.keyword('moccasin').italic('> undefined'); - }else if(typeof data == 'string'){ + }else if(data instanceof Promise){ + printData = chalk.keyword('moccasin').italic('> Promise'); + + }else if(typeof data == 'boolean'){ + if(data){ + printData = chalk.keyword('lawngreen')('true'); + }else{ + printData = chalk.keyword('orangered')('false'); + } + + }else if(typeof data == 'object'){ + printData = colorize(data, colorizeSettings); + + }else{ + printData = chalk.keyword('orange').italic(typeof data + ': '); + if(typeof data == 'string'){ printData += `"${data}"`; }else if(typeof data == 'number'){ @@ -105,16 +118,31 @@ function dir(data){ printData += "\n"; printData += data.toString(); - }else if(typeof data == 'object'){ - printData = colorize(data, colorizeSettings); - }else{ printData = JSON.stringify(data, null, 2); } + } + const div = "=".repeat(32); console.log(chalk.cyan([div, printData, div].join("\n"))); } } +/* +NOTE: test calls: + dir(a => {return a.toUpperCase;}) + dir('sdfsdfdsf') + dir(['aaa', 124]) + dir(123) + dir(true) + dir(false) + dir({aaa: 'bbbb'}) + dir({}.uuuu) + dir(new Error('hueeee')) + dir(new Promise((resolve, reject) => { + resolve('aaaa') + })) +*/ + function getLog(){ return logHistory; }
7
diff --git a/lib/https/index.js b/lib/https/index.js @@ -346,7 +346,7 @@ function resolveWebsocket(socket, wss) { rejectUnauthorized: false, host: ip, port: port, - servername: options.hostname + servername: util.parseHost(headers.host)[0] || options.hostname }, pipeData); } catch (e) { return execCallback(e);
1
diff --git a/src/Webform.js b/src/Webform.js @@ -766,22 +766,16 @@ export default class Webform extends NestedDataComponent { console.warn(this.t('saveDraftAuthError')); return; } - const draft = this.submission; + const draft = fastCloneDeep(this.submission); draft.state = 'draft'; + if (!this.savingDraft) { this.savingDraft = true; this.formio.saveSubmission(draft).then((sub) => { - const currentSubmission = _.merge(sub, draft); - - this.emit('saveDraft', sub); - if (!draft._id) { - this.setSubmission(currentSubmission).then(() => { + // Set id to submission to avoid creating new draft submission + this.submission._id = sub._id; this.savingDraft = false; - }); - } - else { - this.savingDraft = false; - } + this.emit('saveDraft', sub); }); } }
14
diff --git a/.github/workflows/browserslist-db-update.yml b/.github/workflows/browserslist-db-update.yml @@ -7,6 +7,9 @@ on: workflow_dispatch: +env: + branch-name: update/browserslist-db + jobs: close-existing-pr: name: Close existing PR @@ -17,7 +20,7 @@ jobs: continue-on-error: true uses: fjogeleit/http-request-action@v1 with: - url: 'https://api.github.com/repos/${{ github.repository }}/git/ref/heads/update/browserslist-db' + url: 'https://api.github.com/repos/${{ github.repository }}/git/ref/heads/${{ env.branch-name }}' method: 'GET' bearerToken: ${{ secrets.GITHUB_TOKEN }} customHeaders: '{"Accept": "application/vnd.github+json"}' @@ -26,7 +29,7 @@ jobs: if: steps.check-branch.outcome == 'success' uses: fjogeleit/http-request-action@v1 with: - url: 'https://api.github.com/repos/${{ github.repository }}/git/refs/heads/update/browserslist-db' + url: 'https://api.github.com/repos/${{ github.repository }}/git/refs/heads/${{ env.branch-name }}' method: 'DELETE' bearerToken: ${{ secrets.GITHUB_TOKEN }} customHeaders: '{"Accept": "application/vnd.github+json"}' @@ -54,7 +57,7 @@ jobs: uses: c2corg/browserslist-update-action@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} - branch: update/browserslist-db + branch: ${{ env.branch-name }} commit_message: 'Update Browserslist database.' title: 'Update Browserslist Database' body: Auto-generated by [browserslist-update-action](https://github.com/c2corg/browserslist-update-action/)
4
diff --git a/src/core/evaluator.js b/src/core/evaluator.js @@ -2821,7 +2821,7 @@ class PartialEvaluator { continue; } - if (!compareWithLastPosition()) { + if (!category.isZeroWidthDiacritic && !compareWithLastPosition()) { // The glyph is not in page so just skip it. continue; }
8
diff --git a/src/mousetracker.js b/src/mousetracker.js return this; }, + /** + * Returns {Array.<OpenSeadragon.MouseTracker>} excluding the given pointer device type + * @function + * @param {String} type - The pointer device type: "mouse", "touch", "pen", etc. + * @returns {Array.<OpenSeadragon.MouseTracker>} + */ + getActivePointersListExceptType: function ( type ) { + var delegate = THIS[ this.hash ]; + + return delegate.activePointersLists.filter(function(pointersList) { + return pointersList.type !== type; + }); + }, + /** * Returns the {@link OpenSeadragon.MouseTracker.GesturePointList|GesturePointList} for the given pointer device type, * creating and caching a new {@link OpenSeadragon.MouseTracker.GesturePointList|GesturePointList} if one doesn't already exist for the type. } } return null; + }, + + /** + * @function Increment this pointer's contact count. + * It will evaluate whether this pointer type is allowed to have multiple contacts. + */ + addContact: function() { + ++this.contacts; + + if (this.contacts > 1 && (this.type === "mouse" || this.type === "pen")) { + this.contacts = 1; + } + }, + + /** + * @function Decrement this pointer's contact count. + * It will make sure the count does not go below 0. + */ + removeContact: function() { + --this.contacts; + + if (this.contacts < 0) { + this.contacts = 0; + } } }; * @private * @inner */ - function abortTouchContacts( tracker, event, pointsList ) { + function abortContacts( tracker, event, pointsList ) { var i, gPointCount = pointsList.getLength(), abortGPoints = []; } if ( abortGPoints.length > 0 ) { - // simulate touchend + // simulate touchend/mouseup updatePointersUp( tracker, event, abortGPoints, 0 ); // 0 means primary button press/release or touch contact // release pointer capture pointsList.captureCount = 1; - releasePointer( tracker, 'touch' ); - // simulate touchleave + releasePointer( tracker, pointsList.type ); + // simulate touchleave/mouseout updatePointersExit( tracker, event, abortGPoints ); } } if ( pointsList.getLength() > event.touches.length - touchCount ) { $.console.warn('Tracked touch contact count doesn\'t match event.touches.length. Removing all tracked touch pointers.'); - abortTouchContacts( tracker, event, pointsList ); + abortContacts( tracker, event, pointsList ); } for ( i = 0; i < touchCount; i++ ) { function onTouchCancel( tracker, event ) { var pointsList = tracker.getActivePointersListByType('touch'); - abortTouchContacts( tracker, event, pointsList ); + abortContacts( tracker, event, pointsList ); } } } + // Some pointers may steal control from another pointer without firing the appropriate release events + // e.g. Touching a screen while click-dragging with certain mice. + var otherPointsLists = tracker.getActivePointersListExceptType(gPoints[ 0 ].type); + for (i = 0; i < otherPointsLists.length; i++) { + //If another pointer has contact, simulate the release + abortContacts(tracker, event, otherPointsLists[i]); // No-op if no active pointer + } + // Only capture and track primary button, pen, and touch contacts if ( buttonChanged !== 0 ) { // Aux Press startTrackingPointer( pointsList, curGPoint ); } - pointsList.contacts++; + pointsList.addContact(); //$.console.log('contacts++ ', pointsList.contacts); if ( tracker.dragHandler || tracker.dragEndHandler || tracker.pinchHandler ) { } // A primary mouse button may have been released while the non-primary button was down - if (pointsList.contacts > 0 && pointsList.type === 'mouse') { + var otherPointsList = tracker.getActivePointersListByType("mouse"); // Stop tracking the mouse; see https://github.com/openseadragon/openseadragon/pull/1223 - pointsList.contacts--; - return true; - } + abortContacts(tracker, event, otherPointsList); // No-op if no active pointer + return false; } if ( wasCaptured ) { // Pointer was activated in our element but could have been removed in any element since events are captured to our element - pointsList.contacts--; + pointsList.removeContact(); //$.console.log('contacts-- ', pointsList.contacts); if ( tracker.dragHandler || tracker.dragEndHandler || tracker.pinchHandler ) {
1
diff --git a/app/scripts/MultiViewContainer.jsx b/app/scripts/MultiViewContainer.jsx @@ -1463,9 +1463,7 @@ export class MultiViewContainer extends React.Component { /> </div> {genomePositionSearchBox} - <SearchableTiledPlot > {tiledPlot} - </SearchableTiledPlot> {overlay} </div>)
2
diff --git a/examples/index.html b/examples/index.html <a href="basic-video.html">Video Streaming</a> <span>Example of using texture video with WebRTC</span> </div> + <div> + <a href="basic-multi-streams.html">Multi Streams</a> + <span>Example of using texture video with WebRTC from multiple local streams</span> + </div> <div> <a href="shooter-2.html">Shooter</a> <span>Press spacebar to shoot. Example for spawning networked entities at runtime.</span>
10
diff --git a/resource/styles/scss/_search.scss b/resource/styles/scss/_search.scss // search help .search-help { - caption { - text-align: center; - } - td { - text-align: center; - padding-right: 1em; - } .search-help, td, th { border: solid 1px gray; }
14
diff --git a/lib/contracts/deploy.js b/lib/contracts/deploy.js @@ -5,7 +5,6 @@ let utils = require('../utils/utils.js'); class Deploy { constructor(options) { this.blockchain = options.blockchain; - this.web3 = this.blockchain.web3; this.logger = options.logger; this.events = options.events; this.plugins = options.plugins;
2
diff --git a/components/Frame/Header.js b/components/Frame/Header.js @@ -148,8 +148,11 @@ const styles = { }), stickyWithFallback: css({ // auto prefix does not with multiple values :( + // - -webkit-sticky would be missing if not defined explicitly // - glamor 2.20.40 / inline-style-prefixer 3.0.8 position: ['fixed', '-webkit-sticky', 'sticky'] + // - this will produce three position statements + // { position: fixed; position: -webkit-sticky; position: sticky; } }), hr: css({ margin: 0, @@ -190,7 +193,7 @@ const isPositionStickySupported = () => { } // Workaround for WKWebView fixed 0 rendering hickup -// - iOS 11.4 +// - iOS 11.4: header is transparent and only appears after triggering a render by scrolling down enough const forceRefRedraw = ref => { if (ref) { setTimeout(() => {
7
diff --git a/src/encoded/audit/experiment.py b/src/encoded/audit/experiment.py @@ -1962,9 +1962,11 @@ def audit_experiment_replicated(value, system, excluded_types): ''' Excluding single cell isolation experiments from the replication requirement Excluding RNA-bind-and-Seq from the replication requirment + Excluding genetic modification followed by DNase-seq from the replication requirement ''' if value['assay_term_name'] in ['single cell isolation followed by RNA-seq', - 'RNA Bind-n-Seq']: + 'RNA Bind-n-Seq', + 'genetic modification followed by DNase-seq']: return ''' Excluding GTEX experiments from the replication requirement
2
diff --git a/src/file/kind/gml/KGmlMultifile.hx b/src/file/kind/gml/KGmlMultifile.hx @@ -80,14 +80,15 @@ class KGmlMultifile extends KGml { var errors = ""; for (item in next) { var itemPath = map0[item.name]; - if (itemPath != null) { var itemCode = item.code; + if (itemPath != null) { FileWrap.writeTextFileSync(itemPath, itemCode); GmlSeeker.runSync(itemPath, itemCode, item.name, KGmlScript.inst); } else if (tools.JsTools.rx(~/^\w+$/).test(item.name)) { var dir = file.multidata.tvDir; var args = TreeViewItemMenus.createImplBoth("auto", 0, dir, item.name, function(q) { q.openFile = false; + q.gmlCode = itemCode; return q; }); if (args != null) {
1
diff --git a/README-dev.md b/README-dev.md **Windows Developers**: Install Node.js globally, may also have to run Spearmint in admin mode. +// works through node version 19.4.0 +// electron-devtools-vendor must be at version 1.1 for now due to a bug +// react must be version 17 due to a dependency for mui +// fix-path ??? + 1. Fork and clone this repository. 2. Install node version 16.13: ```nvm install 16.13``` 3. Use node version 16.13: ```nvm use 16.13```
3
diff --git a/src/lib/transactionBuilder.js b/src/lib/transactionBuilder.js @@ -645,6 +645,9 @@ export default class TransactionBuilder { return callback('When contract is not payable, options.callValue and options.tokenValue must be 0'); + if (options.rawParameter && utils.isString(options.rawParameter)) { + parameters = options.rawParameter.replace(/^(0x)/, ''); + } else { var constructorParams = abi.find( (it) => { return it.type === 'constructor'; @@ -682,9 +685,6 @@ export default class TransactionBuilder { return callback(ex); } } else parameters = ''; - - if (options.rawParameter && utils.isString(options.rawParameter)) { - parameters = options.rawParameter.replace(/^(0x)/, ''); } const args = {
8
diff --git a/src/sweetalert2.js b/src/sweetalert2.js @@ -320,7 +320,7 @@ const modalDependant = (...args) => { if (params.input === 'email' && params.inputValidator === null) { params.inputValidator = (email) => { return new Promise((resolve, reject) => { - const emailRegex = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/ + const emailRegex = /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/ if (emailRegex.test(email)) { resolve() } else {
11
diff --git a/articles/quickstart/webapp/golang/01-login.md b/articles/quickstart/webapp/golang/01-login.md @@ -69,12 +69,6 @@ AUTH0_CLIENT_SECRET='${account.clientSecret}' AUTH0_CALLBACK_URL='http://localhost:3000/callback' ``` -::: note -To load the environment variables from the `.env` file, you can use -[github.com/joho/godotenv](https://github.com/joho/godotenv). -::: - - ### Configure OAuth2 and OpenID Connect packages Create a file called `auth.go` in the `platform/authenticator` folder. In this package you'll create a method to @@ -332,7 +326,7 @@ func Handler(auth *authenticator.Authenticator) gin.HandlerFunc { // Exchange an authorization code for a token. token, err := auth.Exchange(ctx.Request.Context(), ctx.Query("code")) if err != nil { - ctx.String(http.StatusUnauthorized, "Failed to convert an authorization code into a token.") + ctx.String(http.StatusUnauthorized, "Failed to exchange an authorization code for a token.") return }
2
diff --git a/src/modules/app/services/State.js b/src/modules/app/services/State.js * @returns {number} * @private */ - get _seepStep() { + get _sleepStep() { return this.__seepStep; } * @param {number} value * @private */ - set _seepStep(value) { + set _sleepStep(value) { if (value) { if (this._maxSleep) { this._addBlock(); */ _wakeUp() { this._seepStartTime = null; - this._seepStep = null; + this._sleepStep = null; if (this._timer) { clearTimeout(this._timer); this._timer = null; * @private */ _setSleepStep(step) { - if (this._seepStep === step) { + if (this._sleepStep === step) { return null; } - this._seepStep = step; + this._sleepStep = step; if (this._maxSleep) { - this._block.style.opacity = this._seepStep * (1 / this._maxSleep); + this._block.style.opacity = this._sleepStep * (1 / this._maxSleep); } - this.signals.sleep.dispatch(this._seepStep); + this.signals.sleep.dispatch(this._sleepStep); } /**
10
diff --git a/assets/js/components/settings/SettingsModules.js b/assets/js/components/settings/SettingsModules.js @@ -64,14 +64,14 @@ function SettingsModules() { const byActiveNoInternals = ( active ) => ( module ) => ! module.internal && active === module.active; - const getModulesByActive = ( active ) => + const getModulesByStatus = ( { active } = {} ) => Object.values( modulesData ) .filter( byActiveNoInternals( active ) ) .sort( ( a, b ) => a.sort - b.sort ) .map( withDependantModulesText ); - const activeModules = getModulesByActive( true ); - const inactiveModules = getModulesByActive( false ); + const activeModules = getModulesByStatus( { active: true } ); + const inactiveModules = getModulesByStatus( { active: false } ); return ( <Switch>
4
diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml @@ -213,7 +213,7 @@ jobs: runs-on: ubuntu-latest outputs: - isExpensifyEmployee: ${{ fromJSON(steps.checkActor.outputs.isTeamMember) }} + IS_EXPENSIFY_EMPLOYEE: ${{ fromJSON(steps.checkActor.outputs.isTeamMember) }} steps: - name: Check whether the actor is member of expensify-expensify team @@ -227,7 +227,7 @@ jobs: newContributorWelcomeMessage: runs-on: ubuntu-latest needs: isExpensifyEmployee - if: ${{ github.actor != 'OSBotify' && !fromJSON(needs.isExpensifyEmployee.outputs.isExpensifyEmployee) }} + if: ${{ github.actor != 'OSBotify' && !fromJSON(needs.isExpensifyEmployee.outputs.IS_EXPENSIFY_EMPLOYEE) }} steps: # Version: 2.3.4 - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
10
diff --git a/package.json b/package.json "code-lint": "eslint setup lib bin hot buildin \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\"", "type-lint": "tsc --pretty", "fix": "yarn code-lint --fix", - "pretty": "prettier --write \"**/*.{js,ts}\"", "schema-lint": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.lint.js\" --no-verbose", "benchmark": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.benchmark.js\" --runInBand", "cover": "yarn cover:init && yarn cover:all && yarn cover:report",
2
diff --git a/vr-ui.js b/vr-ui.js @@ -2603,6 +2603,26 @@ const makeCornersMesh = () => { const cornerMesh = new THREE.Mesh(cornersGeometry, blackMaterial); return cornerMesh; }; +const makeTextInput = (text, placeholder = '', font = './GeosansLight.ttf', size = 0.1, width = 1) => { + const textMesh = makeTextMesh(text, font, size); + + const underlineGeometry = new THREE.PlaneBufferGeometry(1, 0.01) + .applyMatrix4(new THREE.Matrix4().makeTranslation(0, -size/2, 0)); + const underlineMesh = new THREE.Mesh(underlineGeometry, blackMaterial); + textMesh.add(underlineMesh); + + const caretGeometry = new THREE.PlaneBufferGeometry(0.01, 0.08) + .applyMatrix4(new THREE.Matrix4().makeTranslation(-width/2 + 0.01/2, 0, 0)); + const caretMesh = new THREE.Mesh(caretGeometry, blackMaterial); + textMesh.add(caretMesh); + + textMesh.geometry.boundingBox = new THREE.Box3( + new THREE.Vector3(-width/2, -size/2, 0.01), + new THREE.Vector3(width/2, size/2, 0.01) + ); + + return textMesh; +}; export { makeCubeMesh, @@ -2625,4 +2645,5 @@ export { makeButtonMesh, makeArrowMesh, makeCornersMesh, + makeTextInput, };
0
diff --git a/protocols/peer/contracts/PeerFactory.sol b/protocols/peer/contracts/PeerFactory.sol @@ -31,10 +31,6 @@ contract PeerFactory is IPeerFactory, ILocatorWhitelist { */ function createPeer(address _swapContract, address _peerContractOwner) external { - // Ensure an owner for the peer contract is provided. - require(_peerContractOwner != address(0), - 'PEER_CONTRACT_OWNER_REQUIRED'); - // Ensure a swap contract is provided. require(_swapContract != address(0), 'SWAP_CONTRACT_REQUIRED');
2
diff --git a/src/components/App/index.js b/src/components/App/index.js import React from 'react'; import styled from 'styled-components'; import CardCollection from '../CardCollection'; -import Header from '@hackoregon/component-library/lib/Navigation/Header'; -import Footer from '@hackoregon/component-library/lib/Footer/Footer'; +// import Header from '@hackoregon/component-library/lib/Navigation/Header'; +// import Footer from '@hackoregon/component-library/lib/Footer/Footer'; const Container = styled.div` min-height: 100%; @@ -18,9 +18,7 @@ const Container = styled.div` function App(props) { return ( <Container> - <Header /> {React.Children.toArray(props.children)} - <Footer /> </Container> ); }
2
diff --git a/src/protocol/decoder.js b/src/protocol/decoder.js @@ -123,7 +123,7 @@ module.exports = class Decoder { return array } - readSignedVarInt32() { + readVarInt() { let currentByte let result = 0 let i = 0 @@ -141,7 +141,7 @@ module.exports = class Decoder { return (value >>> 1) ^ -(value & 1) } - readSignedVarInt64() { + readVarLong() { let currentByte let result = Long.fromInt(0) let i = 0
10
diff --git a/src/components/ProductDetail/ProductDetail.js b/src/components/ProductDetail/ProductDetail.js @@ -4,10 +4,6 @@ import { withStyles } from "@material-ui/core/styles"; import Grid from "@material-ui/core/Grid"; import { inject, observer } from "mobx-react"; import Helmet from "react-helmet"; -// jsonld import will need to be updated in the future to import simply from `jsonld` -// jsonld caused errors with every other import, this is the only way it works -// See this ticket: https://github.com/digitalbazaar/jsonld.js/issues/252 -import * as jsonld from "jsonld/dist/node6/lib/jsonld"; import track from "lib/tracking/track"; import Breadcrumbs from "components/Breadcrumbs"; import trackProductViewed from "lib/tracking/trackProductViewed"; @@ -184,6 +180,52 @@ class ProductDetail extends Component { return productPrice; } + renderJSONLd = () => { + const { currencyCode, product, shop } = this.props; + + const priceData = product.pricing[0]; + const images = product.media.map((image) => image.URLs.original); + + let productAvailability = "http://schema.org/InStock"; + if (product.isLowQuantity) { + productAvailability = "http://schema.org/LimitedAvailability"; + } + if (product.isBackorder && product.isSoldOut) { + productAvailability = "http://schema.org/OutOfStock"; + } + if (!product.isBackorder && product.isSoldOut) { + productAvailability = "http://schema.org/SoldOut"; + } + + // Recommended data from https://developers.google.com/search/docs/data-types/product + const productJSON = { + "@context": "http://schema.org/", + "@type": "Product", + "brand": product.vendor, + "description": product.description, + "image": images, + "name": product.title, + "sku": product.sku, + "offers": { + "@type": "Offer", + "priceCurrency": currencyCode, + "price": priceData.minPrice, + "availability": productAvailability, + "seller": { + "@type": "Organization", + "name": shop.name + } + } + } + + return ( + <script + type="application/ld_json" + dangerouslySetInnerHTML={{ _html: JSON.stringify(productJSON) }} + /> + ); + } + render() { const { classes, @@ -227,6 +269,7 @@ class ProductDetail extends Component { <Helmet> <title>{product.title}</title> <meta name="description" content={product.description} /> + {this.renderJSONLd()} </Helmet> <Grid container spacing={theme.spacing.unit * 3}> <Grid item className={classes.breadcrumbGrid} xs={12}>
2
diff --git a/newDoc/guide/query-examples.md b/newDoc/guide/query-examples.md @@ -90,6 +90,26 @@ and exists (select 1 from "animals" where "persons"."id" = "animals"."ownerId") order by "persons"."lastName" asc ``` +Objection allows a bit more modern syntax with groupings and subqueries. Where knex requires you to use an old fashioned `function` an `this`, with objection you can use arrow functions: + +```js +const nonMiddleAgedJennifers = await Person + .query() + .where(builder => builder.where('age', '<', 4).orWhere('age', '>', 60)) + .where('firstName', 'Jennifer') + .orderBy('lastName') + +console.log('The last name of the first non middle aged Jennifer is'); +console.log(nonMiddleAgedJennifers[0].lastName); +``` + +```sql +select "persons".* from "persons" +where ("age" < 40 or "age" > 60) +and "firstName" = 'Jennifer' +order by "lastName" asc +``` + ### Insert queries Insert queries are created by chaining the [insert](/api/query-builder.html#insert) method to the query. See the [insertGraph](/api/query-builder.html#/api/query-builder.html/#insertgraph) method for inserting object graphs. @@ -112,7 +132,7 @@ insert into "persons" ("firstName", "lastName") values ('Jennifer', 'Lawrence') ### Update queries -Update queries are created by chaining the [update](/api/query-builder.html#update) or [patch](/api/query-builder.html#patch) method to the query. The [patch](/api/query-builder.html#patch) and [update](/api/query-builder.html#update) methods return the number of updated rows. If you want the freshly updated model as a result you can use the helper method [patchAndFetchById](/api/query-builder.html#patchandfetchbyid) and [updateAndFetchById](/api/query-builder.html#updateandfetchbyid). On postgresql you can simply chain [`.returning('*')`](/api/query-builder.html#returning) or take a look at [this recipe] (/recipes/postgresql-quot-returning-quot-tricks) for more ideas. +Update queries are created by chaining the [update](/api/query-builder.html#update) or [patch](/api/query-builder.html#patch) method to the query. The [patch](/api/query-builder.html#patch) and [update](/api/query-builder.html#update) methods return the number of updated rows. If you want the freshly updated model as a result you can use the helper method [patchAndFetchById](/api/query-builder.html#patchandfetchbyid) and [updateAndFetchById](/api/query-builder.html#updateandfetchbyid). On postgresql you can simply chain [`.returning('*')`](/api/query-builder.html#returning) or take a look at [this recipe] (/recipes/postgresql-quot-returning-quot-tricks) for more ideas. See [update](/api/query-builder.html#update) and [patch](/api/query-builder.html#patch) API documentation for discussion about their differences. #### Examples @@ -253,7 +273,7 @@ See the [API documentation](/api/query-builder.html#unrelate) of `unrelate` meth You can fetch an arbitrary graph of relations for the results of any query by chaining the [eager](/api/query-builder.html#eager) method. [eager](/api/query-builder.html#eager) takes a [relation expression](/api/types.html#relationexpression) string as a parameter. In addition to making your life easier, eager queries avoid the "select N+1" problem and provide a great performance. -Because the eager expressions are strings (there's also an optional [object notation](#relationexpression-object-notation)) they can be easily passed for example as a query parameter of an HTTP request. However, allowing the client to pass expressions like this without any limitations is not very secure. Therefore the [QueryBuilder](/api/query-builder.html) has the [allowEager](/api/query-builder.html#alloweager) method. [allowEager](/api/query-builder.html#alloweager) can be used to limit the allowed eager expression to a certain subset. +Because the eager expressions are strings (there's also an optional [object notation](#relationexpression-object-notation)) they can be easily passed for example as a query parameter of an HTTP request. However, allowing the client to execute expressions like this without any limitations is not very secure. Therefore the [QueryBuilder](/api/query-builder.html) has the [allowEager](/api/query-builder.html#alloweager) method. [allowEager](/api/query-builder.html#alloweager) can be used to limit the allowed eager expression to a certain subset. By giving expression `[pets, children.pets]` for [allowEager](/api/query-builder.html#alloweager) the value passed to [eager](/api/query-builder.html#eager) is allowed to be one of: @@ -458,6 +478,14 @@ const people = await Person .eager('[pets, children.pets]'); ``` +There are also shortcut methods for each of the eager algoriths: + +```js +const people = await Person + .query() + .joinEager('[pets, children.pets]'); +``` + ## Graph inserts Arbitrary relation graphs can be inserted using the [insertGraph](/api/query-builder.html/#insertgraph) method. This is best explained using examples, so check them out.
7
diff --git a/lib/plugins/input/postgresql.js b/lib/plugins/input/postgresql.js @@ -30,8 +30,18 @@ InputPostgresql.prototype.queryResultCb = function (err, rows) { } } -InputPostgresql.prototype.runQuery = function () { - if (!this.connection) { +InputPostgresql.prototype.connect = function () { + // we re-connect, in case PG did close connections + // while LA was waiting in a long interval + if (this.client) { + this.client.end(function (err) { + if (err) { + consoleLogger.log('PostgreSQL input: ' + err) + } + }) + this.connection = null + this.client = null + } this.client = new pg.Client(this.config.server) this.connection = this.client.connect(function (err) { if (err) { @@ -42,6 +52,14 @@ InputPostgresql.prototype.runQuery = function () { return } } + +InputPostgresql.prototype.runQuery = function () { + // re-connect before we run queries + this.connect() + if (!this.connection) { + // connection failed + return + } if (!this.queryTime) { this.queryTime = new Date() }
7
diff --git a/lod.js b/lod.js @@ -60,9 +60,11 @@ export class LodChunk extends THREE.Vector3 { export class LodChunkTracker { constructor(generator, { chunkWorldSize = 10, + numLods = 1, } = {}) { this.generator = generator; this.chunkWorldSize = chunkWorldSize; + this.numLods = numLods; this.chunks = []; this.lastUpdateCoord = new THREE.Vector2(NaN, NaN); @@ -76,8 +78,7 @@ export class LodChunkTracker { const currentCoord = this.#getCurrentCoord(position, localVector2D); if (!currentCoord.equals(this.lastUpdateCoord)) { - // console.log('got current coord', [currentCoord.x, currentCoord.y]); - const lod = 0; + const lod = 0; // XXX support multiple lods const neededChunks = []; for (let dcx = -1; dcx <= 1; dcx++) { for (let dcz = -1; dcz <= 1; dcz++) {
0
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml @@ -23,4 +23,4 @@ jobs: uses: peaceiris/actions-gh-pages@v3 with: publish_dir: ./docs/_book - personal_token: {{ GH_PAGES_TOKEN }} + personal_token: {{ secrets.GH_PAGES_TOKEN }}
1
diff --git a/game.js b/game.js @@ -1912,9 +1912,9 @@ const gameManager = { const localPlayer = metaversefileApi.useLocalPlayer(); return localPlayer.loadVoicePack(voicePack); }, - setVoice(voiceId) { + setVoiceEndpoint(voiceId) { const localPlayer = metaversefileApi.useLocalPlayer(); - return localPlayer.setVoice(voiceId); + return localPlayer.setVoiceEndpoint(voiceId); }, update: _gameUpdate, pushAppUpdates: _pushAppUpdates,
10
diff --git a/src/core/Dish.mjs b/src/core/Dish.mjs @@ -146,7 +146,7 @@ class Dish { * Detects the MIME type of the current dish * @returns {string} */ - async detectDishType() { + detectDishType() { const data = new Uint8Array(this.value.slice(0, 2048)), types = detectFileType(data); @@ -177,7 +177,7 @@ class Dish { break; case Dish.ARRAY_BUFFER: case Dish.BYTE_ARRAY: - title = await this.detectDishType(); + title = this.detectDishType(); if (title !== null) break; // fall through if no mime type was detected default:
2
diff --git a/source/server.js b/source/server.js @@ -131,7 +131,9 @@ if (config.authentication) { store: new MemoryStore({ checkPeriod: 86400000 // prune expired entries every 24h }), - secret: 'ungit' + secret: 'ungit', + resave: true, + saveUninitialized: true })); app.use(passport.initialize()); app.use(passport.session());
12
diff --git a/edit.js b/edit.js @@ -5902,10 +5902,24 @@ function animate(timestamp, frame) { break; } case 'select': { - if (anchorSpec) { + if (meshComposer.placeMesh) { + meshComposer.trigger(); + } else if (anchorSpec) { // console.log('anchor spec', anchorSpec, anchorSpec.object.click.toString()); // const {object, anchor} = anchorSpec; - anchorSpec.object.click(anchorSpec); + // anchorSpec.object.click(anchorSpec); + let match; + if (match = anchorSpec.anchor && anchorSpec.anchor.id.match(/^icon-([0-9]+)$/)) { + const index = parseInt(match[1], 10); + const geometryKey = inventoryMesh.currentGeometryKeys[index]; + (async () => { + const geometry = await geometryWorker.requestGetGeometry(geometrySet, geometryKey); + const material = currentVegetationMesh.material[0]; + const mesh = new THREE.Mesh(geometry, material); + mesh.frustumCulled = false; + meshComposer.setPlaceMesh(mesh); + })(); + } } else if (raycastChunkSpec) { if (raycastChunkSpec.objectId !== 0) { detailsMesh.position.copy(raycastChunkSpec.point); @@ -6223,6 +6237,8 @@ function animate(timestamp, frame) { lastSelector = currentSelector; lastWeaponDown = currentWeaponDown; + meshComposer.update(); + if (selectedTool === 'firstperson') { rigManager.localRig.decapitate(); } else { @@ -6793,6 +6809,7 @@ window.addEventListener('keyup', e => { } case 70: { // F // pe.grabup('right'); + meshComposer.grab(); break; } case 16: { // shift
0
diff --git a/cypress/integration/thread_spec.js b/cypress/integration/thread_spec.js @@ -201,10 +201,7 @@ describe('Thread View', () => { expect($p).to.have.length(3); }); // the url should contain the message query param - cy.url().should( - 'eq', - `http://localhost:3000/thread/${thread.id}?m=MTQ4MzIyNTE5OTk5OQ==` - ); + cy.url().should('contain', `?m=MTQ4MzIyNTE5OTk5OQ==`); }); });
1
diff --git a/src/app.js b/src/app.js @@ -19,7 +19,7 @@ const rockets = require('./routes/v2-rockets'); const upcoming = require('./routes/v2-upcoming'); // Production read-only DB -const url = 'mongodb+srv://public:[email protected]/spacex-api'; +const url = 'mongodb+srv://public:[email protected]/spacex-api'; const app = new Koa();
3
diff --git a/src-css/mavo.scss b/src-css/mavo.scss @@ -319,7 +319,8 @@ button.mv-close { // Make sure empty properties have SOME area to focus on/hover over // This looks as close as possible to their edited state - &.mv-empty[mv-attribute="none"]:empty::before { + &.mv-empty[mv-attribute="none"]:empty::before, + &.mv-empty[mv-attribute="null"]:empty::before { content: "(" attr(aria-label) ")"; opacity: .5; cursor: text;
1
diff --git a/README.md b/README.md @@ -43,11 +43,11 @@ Full deployment documentation is available [here](https://github.com/HospitalRun sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer elasticsearch logstash - sudo logstash-plugin update --no-verify logstash-input-couchdb_changes - sudo cp logstash/pipeline/logstash.conf /usr/share/logstash/pipeline/ - sudo cp logstash/config/* /usr/share/logstash/config/ + sudo /usr/share/logstash/bin/logstash-plugin update --no-verify logstash-input-couchdb_changes + sudo cp -r logstash/pipeline /usr/share/logstash + sudo cp -r logstash/config /usr/share/logstash sudo service logstash restart - service elasticsearch restart + sudo service elasticsearch restart ``` ## Inventory Import
3
diff --git a/packages/fether-react/src/Send/TxForm/TxDetails/TxDetails.js b/packages/fether-react/src/Send/TxForm/TxDetails/TxDetails.js @@ -57,7 +57,7 @@ Missing input fields...`; <div> <div className='form_field'> <div hidden={!showDetails}> - <label htmlFor='txDetails'>Transaction Details (estimation):</label> + <label htmlFor='txDetails'>Transaction Details:</label> <textarea className='-sm-details' id='txDetails'
2
diff --git a/articles/quickstart/native/android-vnext/00-login.md b/articles/quickstart/native/android-vnext/00-login.md @@ -162,34 +162,24 @@ private fun loginWithBrowser() { .withScheme("demo") .withScope("openid profile email") // Launch the authentication passing the callback where the results will be received - .start(this, object : AuthCallback { - override fun onFailure(dialog: Dialog) { - runOnUiThread { - dialog.show() - } - } - + .start(this, object : Callback<Credentials, AuthenticationException> { // Called when there is an authentication failure override fun onFailure(exception: AuthenticationException) { - runOnUiThread { Snackbar.make( binding.root, "Failure: <%= "${exception.code}" %>", Snackbar.LENGTH_LONG ).show() } - } // Called when authentication completed successfully override fun onSuccess(credentials: Credentials) { - runOnUiThread { Snackbar.make( binding.root, "Success: <%= "${credentials.idToken}" %>", Snackbar.LENGTH_LONG ).show() } - } }) } ```
1
diff --git a/chronos/queues/digests/processReputation.js b/chronos/queues/digests/processReputation.js // @flow -const debug = require('debug')('chronos:queue:digest-process-reputation'); import { getReputationChangeInTimeframe, getTotalReputation, } from '../../models/reputationEvent'; -import type { User, Timeframe } from './types'; +import type { Timeframe } from 'chronos/types'; export const getReputationString = ({ totalReputation, @@ -37,12 +36,15 @@ export const getReputationString = ({ return reputationString; }; -export default async (user: User, timeframe: Timeframe) => { - const reputationGained = await getReputationChangeInTimeframe( - user.userId, - timeframe - ); - const totalReputation = await getTotalReputation(user.userId); +export default async (userId: string, timeframe: Timeframe) => { + const [reputationGained, totalReputation] = await Promise.all([ + getReputationChangeInTimeframe(userId, timeframe), + getTotalReputation(userId), + ]); - return getReputationString({ totalReputation, reputationGained, timeframe }); + return getReputationString({ + totalReputation: totalReputation.toLocaleString().toString(), + reputationGained: reputationGained.toLocaleString().toString(), + timeframe, + }); };
1
diff --git a/config/vars.yml b/config/vars.yml -lock_url: 'https://cdn.auth0.com/js/lock/11.3.0/lock.min.js' +lock_url: 'https://cdn.auth0.com/js/lock/11.6.1/lock.min.js' lock_urlv10: 'https://cdn.auth0.com/js/lock/10.24.3/lock.min.js' -lock_urlv11: 'https://cdn.auth0.com/js/lock/11.3.0/lock.min.js' +lock_urlv11: 'https://cdn.auth0.com/js/lock/11.6.1/lock.min.js' lock_passwordless_url: 'https://cdn.auth0.com/js/lock-passwordless-2.2.min.js' -auth0js_url: 'https://cdn.auth0.com/js/auth0/9.3.1/auth0.min.js' -auth0js_urlv9: 'https://cdn.auth0.com/js/auth0/9.3.1/auth0.min.js' +auth0js_url: 'https://cdn.auth0.com/js/auth0/9.5.1/auth0.min.js' +auth0js_urlv9: 'https://cdn.auth0.com/js/auth0/9.5.1/auth0.min.js' auth0js_urlv8: 'https://cdn.auth0.com/js/auth0/8.12.3/auth0.min.js' auth0js_urlv7: 'https://cdn.auth0.com/w2/auth0-7.6.1.min.js' auth0_community: 'https://community.auth0.com/'
3
diff --git a/includes/Core/Authentication/Profile.php b/includes/Core/Authentication/Profile.php @@ -126,14 +126,14 @@ final class Profile { $people_service = new Google_Service_PeopleService( $client ); $profile = $people_service->people->get( 'people/me', array( 'personFields' => 'emailAddresses,photos' ) ); - if ( isset( $profile['emailAddresses'][0]['value'] ) && isset( $profile['photos'][0]['url'] ) ) { - - // Success - we have the profile data from the People API. + if ( isset( $profile['emailAddresses'][0]['value'], $profile['photos'][0]['url'] ) ) { $profile_data = array( 'email' => $profile['emailAddresses'][0]['value'], 'photo' => $profile['photos'][0]['url'], - 'timestamp' => time(), + 'timestamp' => current_time( 'timestamp' ), ); + + $this->set( $profile_data ); } } catch ( \Exception $e ) { return $profile_data;
3
diff --git a/utils/entity.js b/utils/entity.js @@ -243,7 +243,8 @@ function prepareEntityForTemplates(entityWithConfig, generator) { }); entityWithConfig.generateFakeData = type => { - const fieldEntries = entityWithConfig.fields.map(field => { + const fieldsToGenerate = type === 'cypress' ? entityWithConfig.fields.filter(field => !field.id) : entityWithConfig.fields; + const fieldEntries = fieldsToGenerate.map(field => { const fieldData = field.generateFakeData(type); if (!field.nullable && fieldData === null) return undefined; return [field.fieldName, fieldData];
8
diff --git a/articles/quickstart/webapp/symfony/01-login.md b/articles/quickstart/webapp/symfony/01-login.md @@ -68,8 +68,6 @@ Add this to your `src/AppBundle/Auth0ResourceOwner.php` namespace AppBundle; -use Dotenv\Dotenv; - use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -105,17 +103,11 @@ class Auth0ResourceOwner extends GenericOAuth2ResourceOwner { parent::configureOptions($resolver); - $dotenv = new Dotenv(); - - if (!getenv('AUTH0_DOMAIN')) { - $dotenv->load(__DIR__ . '/../../.env'); - } - $resolver->setDefaults(array( 'authorization_url' => '{base_url}/authorize', 'access_token_url' => '{base_url}/oauth/token', 'infos_url' => '{base_url}/userinfo', - 'audience' => 'https://'.getenv('AUTH0_DOMAIN').'/userinfo', + 'audience' => '{base_url}/userinfo', )); $resolver->setRequired(array( @@ -129,6 +121,7 @@ class Auth0ResourceOwner extends GenericOAuth2ResourceOwner $resolver->setNormalizer('authorization_url', $normalizer); $resolver->setNormalizer('access_token_url', $normalizer); $resolver->setNormalizer('infos_url', $normalizer); + $resolver->setNormalizer('audience', $normalizer); } } ```
2
diff --git a/stories/module-analytics-setup.stories.js b/stories/module-analytics-setup.stories.js @@ -352,12 +352,36 @@ storiesOf( 'Analytics Module/Setup', module ) ], padding: 0, } ) - .add( 'No Tag, GTM property w/ access', usingGenerateGTMAnalyticsPropertyStory( { useExistingTag: false, gtmPermission: true } ) ) - .add( 'No Tag, GTM property w/o access', usingGenerateGTMAnalyticsPropertyStory( { useExistingTag: false, gtmPermission: false } ) ) - .add( 'Existing Tag w/ access, GTM property w/ access', usingGenerateGTMAnalyticsPropertyStory( { useExistingTag: true, gtmPermission: true, gaPermission: true } ) ) - .add( 'Existing Tag w/ access, GTM property w/o access', usingGenerateGTMAnalyticsPropertyStory( { useExistingTag: true, gtmPermission: false, gaPermission: true } ) ) - .add( 'Existing Tag w/o access, GTM property w/ access', usingGenerateGTMAnalyticsPropertyStory( { useExistingTag: true, gtmPermission: true, gaPermission: false } ) ) - .add( 'Existing Tag w/o access, GTM property w/o access', usingGenerateGTMAnalyticsPropertyStory( { useExistingTag: true, gtmPermission: false, gaPermission: false } ) ) + .add( + 'No Tag, GTM property w/ access', + usingGenerateGTMAnalyticsPropertyStory( { useExistingTag: false, gtmPermission: true } ), + { padding: 0 } + ) + .add( + 'No Tag, GTM property w/o access', + usingGenerateGTMAnalyticsPropertyStory( { useExistingTag: false, gtmPermission: false } ), + { padding: 0 } + ) + .add( + 'Existing Tag w/ access, GTM property w/ access', + usingGenerateGTMAnalyticsPropertyStory( { useExistingTag: true, gtmPermission: true, gaPermission: true } ), + { padding: 0 } + ) + .add( + 'Existing Tag w/ access, GTM property w/o access', + usingGenerateGTMAnalyticsPropertyStory( { useExistingTag: true, gtmPermission: false, gaPermission: true } ), + { padding: 0 } + ) + .add( + 'Existing Tag w/o access, GTM property w/ access', + usingGenerateGTMAnalyticsPropertyStory( { useExistingTag: true, gtmPermission: true, gaPermission: false } ), + { padding: 0 } + ) + .add( + 'Existing Tag w/o access, GTM property w/o access', + usingGenerateGTMAnalyticsPropertyStory( { useExistingTag: true, gtmPermission: false, gaPermission: false } ), + { padding: 0 } + ) .add( 'Nothing selected', ( args, { registry } ) => { const { accounts, properties, profiles } = fixtures.accountsPropertiesProfiles; registry.dispatch( STORE_NAME ).receiveGetSettings( {} );
2
diff --git a/native/chat/chat-thread-list.react.js b/native/chat/chat-thread-list.react.js @@ -67,6 +67,10 @@ class InnerChatThreadList extends React.PureComponent { return _sum(data.map(InnerChatThreadList.itemHeight)); } + static ListHeaderComponent(props: {}) { + return <View style={styles.header} />; + } + render() { return ( <View style={styles.container}> @@ -75,6 +79,7 @@ class InnerChatThreadList extends React.PureComponent { renderItem={this.renderItem} keyExtractor={InnerChatThreadList.keyExtractor} getItemLayout={InnerChatThreadList.getItemLayout} + ListHeaderComponent={InnerChatThreadList.ListHeaderComponent} style={styles.flatList} ref={this.flatListRef} /> @@ -95,6 +100,9 @@ const styles = StyleSheet.create({ container: { flex: 1, }, + header: { + height: 5, + }, flatList: { flex: 1, backgroundColor: '#FFFFFF',
0
diff --git a/test/jasmine/tests/splom_test.js b/test/jasmine/tests/splom_test.js @@ -995,19 +995,34 @@ describe('Test splom interactions:', function() { .then(function() { var fullData = gd._fullData; var fullLayout = gd._fullLayout; + var splomScenes = fullLayout._splomScenes; + var opts = splomScenes[fullData[1].uid].matrixOptions; expect(fullData[0].visible).toBe(false, 'trace 0 visible'); expect(fullData[1].visible).toBe(true, 'trace 1 visible'); - expect(Object.keys(fullLayout._splomScenes).length).toBe(1, '# of splom scenes'); - expect(fullLayout._splomScenes[fullData[1].uid].matrixOptions.opacity).toBe(1, 'marker opacity'); + expect(Object.keys(splomScenes).length).toBe(1, '# of splom scenes'); + + expect(opts.opacity).toBe(1, 'marker opacity'); + expect(opts.color).toEqual(new Uint8Array([255, 127, 14, 255]), 'marker color'); + expect(opts.colors).toBe(undefined, 'marker colors'); return Plotly.restyle(gd, 'marker.opacity', [undefined, [0.2, 0.3, 0.4]]); }) .then(function() { var fullData = gd._fullData; var fullLayout = gd._fullLayout; - - expect(fullLayout._splomScenes[fullData[1].uid].matrixOptions.opacity).toBe(1, 'marker opacity'); + var opts = fullLayout._splomScenes[fullData[1].uid].matrixOptions; + + // ignored by regl-splom + expect(opts.opacity).toBe(1, 'marker opacity'); + // ignored by regl-splom + expect(opts.color).toEqual(new Uint8Array([255, 127, 14, 255]), 'marker color'); + // marker.opacity applied here + expect(opts.colors).toBeCloseTo2DArray([ + [1, 0.498, 0.0549, 0.2], + [1, 0.498, 0.0549, 0.3], + [1, 0.498, 0.0549, 0.4] + ], 'marker colors'); }) .catch(failTest) .then(done);
7
diff --git a/app-object.js b/app-object.js @@ -125,10 +125,10 @@ class AppManager { this.animationLoops.splice(index, 1); } } - /* getGrab(side) { - return this.grabs[side === 'left' ? 0 : 1]; + getGrab(side) { + return this.grabbedObjects[side === 'left' ? 1 : 0]; } - grab(side, mesh) { + /* grab(side, mesh) { this.grabs[side === 'left' ? 0 : 1] = mesh; } release(side) {
0
diff --git a/src/server/views/widget/page_list.html b/src/server/views/widget/page_list.html {% endif %} <li> - <img src="{{ listPage.lastUpdateUser.imageUrlCached }}" class="picture rounded-circle"> + <img src="{{ listPage.lastUpdateUser.imageUrlCached|default('/images/icons/user.svg') }}" class="picture rounded-circle"> <a href="{{ encodeURI(listPage.path) }}" class="text-break ml-1"> {{ listPage.path | preventXss }} </a>
12
diff --git a/angular/projects/spark-angular/src/lib/interfaces/sprk-dropdown-choice.interface.ts b/angular/projects/spark-angular/src/lib/interfaces/sprk-dropdown-choice.interface.ts +import { ISprkLink } from './sprk-link.interface'; + /** * The choice object is used to * construct a selectable * choice item in the dropdown. */ -export interface ISprkDropdownChoice { - /** - * The text for the dropdown choice item. - */ - text: string; - /** - * The `href` value for the dropdown - * choice item. If omitted, - * the href will be set to `#` by the `SprkLink` - * component. - */ - href?: string; +export interface ISprkDropdownChoice extends ISprkLink { /** * If `true`, the dropdown choice item * will have active styles applied.
3
diff --git a/lib/tasks/setup.rake b/lib/tasks/setup.rake @@ -48,7 +48,7 @@ DESC end task :create_dev_user => - ["rake:db:create", "rake:db:migrate", "cartodb:db:create_publicuser"] do + ["cartodb:db:create_publicuser"] do raise "You should provide a valid e-mail" if ENV['EMAIL'].blank? raise "You should provide a valid password" if ENV['PASSWORD'].blank? raise "You should provide a valid subdomain" if ENV['SUBDOMAIN'].blank?
2
diff --git a/src/lib/relink_private.js b/src/lib/relink_private.js @@ -20,12 +20,9 @@ var isPlainObject = require('./is_plain_object'); * This prevents deepCopying massive structures like a webgl context. */ module.exports = function relinkPrivateKeys(toContainer, fromContainer) { - var keys = Object.keys(fromContainer || {}); - - for(var i = 0; i < keys.length; i++) { - var k = keys[i], - fromVal = fromContainer[k], - toVal = toContainer[k]; + for(var k in fromContainer) { + var fromVal = fromContainer[k]; + var toVal = toContainer[k]; if(toVal === fromVal) { continue;
3
diff --git a/includes/Core/Modules/Module.php b/includes/Core/Modules/Module.php @@ -580,11 +580,11 @@ abstract class Module { $number_of_days = $multiplier * ( isset( $matches[1] ) ? $matches[1] : 28 ); // Calculate the end date. For previous period requests, offset period by the number of days in the request. - $offset = $previous ? $offset + $number_of_days : $offset; - $date_end = gmdate( 'Y-m-d', strtotime( $offset . ' days ago' ) ); + $end_date_offset = $previous ? $offset + $number_of_days : $offset; + $date_end = gmdate( 'Y-m-d', strtotime( $end_date_offset . ' days ago' ) ); // Set the start date. - $start_date_offset = $offset + $number_of_days - 1; + $start_date_offset = $end_date_offset + $number_of_days - 1; $date_start = gmdate( 'Y-m-d', strtotime( $start_date_offset . ' days ago' ) ); // When weekday_align is true and request is for a previous period,
1
diff --git a/src/client/components/Comments/Comments.js b/src/client/components/Comments/Comments.js @@ -248,7 +248,7 @@ class Comments extends React.Component { /> )} {loading && <Loading />} - {parentPost.children === 0 && ( + {commentsToRender.length === 0 && ( <div className="Comments__empty"> <FormattedMessage id="empty_comments" defaultMessage="There are no comments yet." /> </div>
1
diff --git a/sources/osgShadow/shaders/shadowLinearSoft.glsl b/sources/osgShadow/shaders/shadowLinearSoft.glsl #pragma include "floatFromTex.glsl" +#pragma include "rand.glsl" // simulation of texture2Dshadow glsl call on HW // http://codeflow.org/entries/2013/feb/15/soft-shadow-mapping/ @@ -11,13 +12,11 @@ float texture2DCompare(const in sampler2D depths, } #ifdef _JITTER_OFFSET -#define INT_SCALE3_JITTER vec3(.1031, .1030, .0973) -// uniform rand -vec3 randJitter(const in vec3 p2) { - vec3 p3 = fract(p2.xyz * INT_SCALE3_JITTER); - p3 += dot(p3, p3.yzx + 19.19); - p3 = fract((p3.xxy + p3.yzz) * p3.zyx); - return p3; +// TODO could be in a random.glsl file +// https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Shaders/Private/Random.ush#L27 +float shadowInterleavedGradientNoise(const in vec2 fragCoord, const in float frameMod) { + vec3 magic = vec3(0.06711056, 0.00583715, 52.9829189); + return fract(magic.z * fract(dot(fragCoord.xy + frameMod * vec2(47.0, 17.0) * 0.695, magic.xy))); } #endif @@ -35,7 +34,7 @@ float texture2DShadowLerp( #ifdef _JITTER_OFFSET if (jitter > 0.0){ - centroidCoord += randJitter(vec3(gl_FragCoord.xy, jitter)).xy; + centroidCoord += shadowInterleavedGradientNoise(gl_FragCoord.xy, jitter).xy; } #endif
7
diff --git a/contracts/governance/Staking.sol b/contracts/governance/Staking.sol @@ -150,6 +150,7 @@ contract Staking is Ownable{ function timestampToLockDate(uint timestamp) public view returns(uint lockDate){ require(timestamp > kickoffTS, "Staking::timestampToLockDate: timestamp lies before contract creation"); //if staking timestamp does not match any of the unstaking dates, set the lockDate to the closest one before the timestamp + //e.g. passed timestamps lies 7 weeks after kickoff -> only stake for 6 weeks uint periodFromKickoff = (timestamp - kickoffTS) / twoWeeks; lockDate = periodFromKickoff * twoWeeks + kickoffTS; require(lockDate > block.timestamp, "Staking::timestampToLockDate: staking period too short"); @@ -244,8 +245,8 @@ contract Staking is Ownable{ * @return the total voting power at the given time * */ function getPriorTotalVotingPower(uint32 blockNumber, uint time) view public returns(uint96 totalVotingPower){ - //start the computation with the next unlocking date - uint start = timestampToLockDate(time + twoWeeks - 1);//todo think over + //start the computation with the exact or previous unlocking date + uint start = timestampToLockDate(time);//todo think over uint end = start + maxDuration; //max 76 iterations @@ -358,7 +359,8 @@ contract Staking is Ownable{ * @return The number of votes the account had as of the given block */ function getPriorVotes(address account, uint blockNumber, uint date) public view returns (uint96) { - uint startDate = timestampToLockDate(date + twoWeeks - 1);//todo think over + //if date is not an exact break point, start from the previous break point (alternative would be the next) + uint startDate = timestampToLockDate(date); uint96 staked = getPriorStake(account, blockNumber); uint96 weight = _computeWeightByDate(lockedUntil[account], startDate); return mul96(staked, weight, "Staking::getPriorVotes: multiplication overflow for voting power");
7
diff --git a/src/cli/commands/dev.js b/src/cli/commands/dev.js @@ -63,8 +63,12 @@ module.exports = async (config, cli) => { if (event.event === 'instance.log') { const header = `${d.toLocaleTimeString()} - ${event.instanceName} - log` cli.logHeader(header) + if (event.data.log && Array.isArray(event.data.log)) { + event.data.log.forEach((log) => { cli.log(log) }) + } else { cli.log(event.data.log) } + } // Error if (event.event === 'instance.error') {
9
diff --git a/packages/app/src/components/Admin/AdminHome/AdminHome.jsx b/packages/app/src/components/Admin/AdminHome/AdminHome.jsx -import React, { Fragment } from 'react'; +import React, { useEffect } from 'react'; import PropTypes from 'prop-types'; import { withTranslation } from 'react-i18next'; import { CopyToClipboard } from 'react-copy-to-clipboard'; @@ -10,37 +10,36 @@ import { toastError } from '~/client/util/apiNotification'; import { withUnstatedContainers } from '../../UnstatedUtils'; import AppContainer from '~/client/services/AppContainer'; import AdminHomeContainer from '~/client/services/AdminHomeContainer'; -import AdminAppContainer from '~/client/services/AdminAppContainer'; import SystemInfomationTable from './SystemInfomationTable'; import InstalledPluginTable from './InstalledPluginTable'; import EnvVarsTable from './EnvVarsTable'; const logger = loggerFactory('growi:admin'); -class AdminHome extends React.Component { +const AdminHome = (props) => { + const { t, adminHomeContainer } = props; - async componentDidMount() { - const { adminHomeContainer } = this.props; - - try { + useEffect(() => { + async function fetchAdminHomeData() { await adminHomeContainer.retrieveAdminHomeData(); } + try { + fetchAdminHomeData(); + } catch (err) { toastError(err); adminHomeContainer.setState({ retrieveError: err }); logger.error(err); } - } + }, [adminHomeContainer]); - render() { - const { t, adminHomeContainer } = this.props; const { isV5Compatible } = adminHomeContainer.state; let alertStyle = 'alert-info'; if (isV5Compatible == null) alertStyle = 'alert-warning'; return ( - <Fragment> + <> { // Alert message will be displayed in case that V5 migration has not been compleated (isV5Compatible != null && !isV5Compatible) @@ -109,11 +108,10 @@ class AdminHome extends React.Component { </div> </div> </div> - </Fragment> + </> ); - } +}; -} const AdminHomeWrapper = withUnstatedContainers(AdminHome, [AppContainer, AdminHomeContainer]);
14
diff --git a/src/utils/wallet.js b/src/utils/wallet.js @@ -597,19 +597,15 @@ class Wallet { } async validateSecurityCode(accountId, method, securityCode, isNew) { - if (isNew) { - return await sendJson('POST', ACCOUNT_HELPER_URL + '/account/validateSecurityCodeForTempAccount', { - accountId, - method, - securityCode - }); - } else { - return await this.postSignedJson('/account/validateSecurityCode', { + const body = { accountId, method, securityCode - }); } + if (isNew) { + return await sendJson('POST', ACCOUNT_HELPER_URL + '/account/validateSecurityCodeForTempAccount', body); + } + return await this.postSignedJson('/account/validateSecurityCode', body); } async getRecoveryMethods(account) {
3
diff --git a/test/e2e/display.test.js b/test/e2e/display.test.js @@ -82,7 +82,7 @@ function assertDiffThresholdMet (diff) { } else if (environmentIs(DEVICES.IOS)) { threshold = 0.25; } else if (environmentIs(BROWSERS.EDGE)) { - threshold = 0.09; + threshold = 0.05; } if (threshold) assert(diff <= threshold, `${diff} is above the threshold of ${threshold}`); else assert.strictEqual(diff, 0);
13
diff --git a/core/block_svg.js b/core/block_svg.js @@ -379,9 +379,9 @@ Blockly.BlockSvg.prototype.moveToDragSurface_ = function() { // frontmost. var mainWS = this.workspace.getMainWorkspace(); goog.asserts.assert( - Blockly.utils.is3dSupported() && !!mainWS.blockDragSurface_, + Blockly.utils.is3dSupported() && !!mainWS.getBlockDragSurface(), 'The main workspace must have a dragSurface.'); - dragSurface = mainWS.blockDragSurface_; + dragSurface = mainWS.getBlockDragSurface(); } else { dragSurface = this.workspace.blockDragSurface_; }
4
diff --git a/token-metadata/0xf1f5De69C9C8D9BE8a7B01773Cc1166D4Ec6Ede2/metadata.json b/token-metadata/0xf1f5De69C9C8D9BE8a7B01773Cc1166D4Ec6Ede2/metadata.json "symbol": "DFX", "address": "0xf1f5De69C9C8D9BE8a7B01773Cc1166D4Ec6Ede2", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/webaverse.js b/webaverse.js @@ -34,7 +34,6 @@ import transformControls from './transform-controls.js'; import * as metaverseModules from './metaverse-modules.js'; import soundManager from './sound-manager.js'; import dioramaManager from './diorama.js'; -import {crunchAvatarModel} from './avatar-cruncher.js'; import metaversefileApi from 'metaversefile'; import WebaWallet from './src/components/wallet.js'; // const leftHandOffset = new THREE.Vector3(0.2, -0.2, -0.4); @@ -618,18 +617,6 @@ const _startHacks = () => { // _ensureMikuModel(); // _updateMikuModel(); - } else if (e.which === 222) { // ' - const localPlayer = metaversefileApi.useLocalPlayer(); - if (localPlayer.avatar) { - const model = localPlayer.avatar.model; - const crunchedModel = crunchAvatarModel(model); - crunchedModel.position.set(0, 1, -2); - crunchedModel.frustumCulled = false; - scene.add(crunchedModel); - localPlayer.avatar.model.visible = false; - } else { - console.warn('player is not wearing an avatar'); - } } else { const match = e.code.match(/^Numpad([0-9])$/); if (match) {
2
diff --git a/src/pages/EnterpriseShared/index.js b/src/pages/EnterpriseShared/index.js @@ -1027,7 +1027,13 @@ export default class EnterpriseShared extends PureComponent { style={{ background: '#fff' }} onClick={e => { e.stopPropagation(); + if (isReadInstall || types !== 'marketContent') { this.installHelmApp(item, types); + } else { + this.setState({ + showCloudMarketAuth: true + }); + } }} > {globalUtil.fetchSvg('InstallApp')}
1
diff --git a/README.md b/README.md @@ -27,7 +27,8 @@ For a list of frequently asked questions please visit the [Copay FAQ](https://gi - Push notifications (only available for ios and android versions) - Customizable wallet naming and background colors - Multiple languages supported -- Available for [iOS](https://itunes.apple.com/us/app/copay/id951330296), [Android](https://play.google.com/store/apps/details?id=com.bitpay.copay&hl=en), [Windows Phone](http://www.windowsphone.com/en-us/store/app/copay-wallet/4372479b-a064-4d18-8bd3-74a3bdb81c3a), [Chrome App](https://chrome.google.com/webstore/detail/copay/cnidaodnidkbaplmghlelgikaiejfhja?hl=en), [Linux](https://github.com/bitpay/copay/releases/latest), [Windows](https://github.com/bitpay/copay/releases/latest) and [OS X](https://github.com/bitpay/copay/releases/latest) devices +- Available for [iOS](https://itunes.apple.com/us/app/copay/id951330296), [Android](https://play.google.com/store/apps/details?id=com.bitpay.copay&hl=en), [Windows Phone](https://www.microsoft.com/en-us/store/p/copay-secure-bitcoin-wallet/9nm8z2b0387b), + [Chrome App](https://chrome.google.com/webstore/detail/copay/cnidaodnidkbaplmghlelgikaiejfhja?hl=en), [Linux](https://github.com/bitpay/copay/releases/latest), [Windows](https://github.com/bitpay/copay/releases/latest) and [OS X](https://github.com/bitpay/copay/releases/latest) devices ## Testing in a Browser
3
diff --git a/Source/Renderer/modernizeShader.js b/Source/Renderer/modernizeShader.js @@ -51,12 +51,12 @@ define([ } } - function getVariablePreprocessorBranch(variablesThatWeCareAbout, splitSource) { + function getVariablePreprocessorBranch(layoutVariables, splitSource) { var variableMap = {}; - var numVariablesWeCareAbout = variablesThatWeCareAbout.length; - for (var a = 0; a < numVariablesWeCareAbout; ++a) { - var variableThatWeCareAbout = variablesThatWeCareAbout[a]; + var numLayoutVariables = layoutVariables.length; + for (var a = 0; a < numLayoutVariables; ++a) { + var variableThatWeCareAbout = layoutVariables[a]; variableMap[variableThatWeCareAbout] = [null]; } @@ -80,8 +80,8 @@ define([ } else if (hasENDIF) { stack.pop(); } else if (!/layout/g.test(line)) { - for (var varIndex = 0; varIndex < numVariablesWeCareAbout; ++varIndex) { - var varName = variablesThatWeCareAbout[varIndex]; + for (var varIndex = 0; varIndex < numLayoutVariables; ++varIndex) { + var varName = layoutVariables[varIndex]; if (line.indexOf(varName) !== -1) { if (variableMap[varName].length === 1 && variableMap[varName][0] === null) { variableMap[varName] = stack.slice();
10
diff --git a/OurUmbraco.Site/web.template.config b/OurUmbraco.Site/web.template.config </buildProviders> </compilation> <authentication mode="Forms"> - <forms name="yourAuthCookie" loginUrl="login.aspx" protection="All" path="/" slidingExpiration="true" timeout="525600" /> + <forms requireSSL="true" name="yourAuthCookie" loginUrl="login.aspx" protection="All" path="/" slidingExpiration="true" timeout="525600" /> </authentication> <authorization> <allow users="?" />
12
diff --git a/assets/js/googlesitekit/datastore/user/surveys.test.js b/assets/js/googlesitekit/datastore/user/surveys.test.js @@ -56,7 +56,7 @@ describe( 'core/user surveys', () => { } ); it( 'does not throw an error when parameters are correct', () => { - muteFetch( surveyTriggerEndpoint, [] ); + muteFetch( surveyTriggerEndpoint ); expect( () => { registry.dispatch( STORE_NAME ).triggerSurvey( 'adSenseSurvey' ); @@ -68,7 +68,7 @@ describe( 'core/user surveys', () => { } ); it( 'makes network requests to endpoints', async () => { - muteFetch( surveyTriggerEndpoint, [] ); + muteFetch( surveyTriggerEndpoint ); await registry.dispatch( STORE_NAME ).triggerSurvey( 'optimizeSurvey', { ttl: 1 } );
2
diff --git a/lib/assets/core/javascripts/cartodb3/editor/layers/edit-feature-content-views/edit-feature-header-view.js b/lib/assets/core/javascripts/cartodb3/editor/layers/edit-feature-content-views/edit-feature-header-view.js @@ -24,8 +24,8 @@ module.exports = CoreView.extend({ render: function () { this.clearSubViews(); - var featureType = this.model.getFeatureType(); var letter = this._layerDefinitionModel.get('letter'); + var featureType = this.model.getFeatureType() ? _t('editor.edit-feature.features.' + this.model.getFeatureType()) : _t('editor.edit-feature.features.geometry'); var breadcrumbLabel = this._isNew ? _t('editor.edit-feature.add-' + featureType) : _t('editor.edit-feature.edit', { featureType: featureType }); this.$el.html( @@ -36,7 +36,7 @@ module.exports = CoreView.extend({ source: this._layerDefinitionModel.getAnalysisDefinitionNodeModel().id, bgColor: layerColors.getColorForLetter(letter), letter: letter, - featureType: featureType ? _t('editor.edit-feature.features.' + featureType) : _t('editor.edit-feature.features.geometry'), + featureType: featureType, breadcrumbLabel: breadcrumbLabel }) );
12
diff --git a/src/lib/video/modal-video-manager.js b/src/lib/video/modal-video-manager.js @@ -16,17 +16,17 @@ class ModalVideoManager { } - enableVideo (onPermissionSuccess, afterFrameDraw) { + enableVideo (onPermissionSuccess, onVideoLoaded) { const thisContext = this; - this._videoProvider.enableVideo(afterFrameDraw).then(() => { + this._videoProvider.enableVideo(onVideoLoaded).then(() => { if (onPermissionSuccess) onPermissionSuccess(); const ctx = thisContext._canvas.getContext('2d'); ctx.scale(-1, 1); ctx.translate(thisContext._canvasWidth * -1, 0); - if (afterFrameDraw) { + if (onVideoLoaded) { thisContext._videoProvider.video.onloadeddata = () => { - afterFrameDraw(); + onVideoLoaded(); }; }
10
diff --git a/index.html b/index.html window.requestAnimationFrame(animate); window.addEventListener('keydown', e => { - console.log('got char', JSON.stringify(keyCode(e.keyCode)), e.shiftKey); + console.log('got char', e.keyCode, JSON.stringify(keyCode(e.keyCode)), e.shiftKey); if (e.keyCode === 8) { // backspace urlText = urlText.slice(0, -1); console.log('enter'); // XXX implement this } else if ( e.keyCode === 9 || // tab - e.keyCode === 16 // shift + e.keyCode === 16 || // shift + e.keyCode === 17 || // ctrl + e.keyCode === 18 || // alt + e.keyCode === 20 || // capslock + e.keyCode === 91 // win ) { // nothing + } else if (e.keyCode === 37) { // left + // XXX implement this + } else if (e.keyCode === 39) { // right + // XXX implement this + } else if ( + e.keyCode === 38 || // up + e.keyCode === 40 // down + ) { // up + // nothing } else { let c = keyCode(e.keyCode); if (e.shiftKey) {
9
diff --git a/tasks/transpile.js b/tasks/transpile.js @@ -71,7 +71,8 @@ module.exports = function (grunt) { } return rollup(rollupOpts).then(function (bundle) { - var result = bundle.generate(bundleOpts); + return bundle.generate(bundleOpts); + }).then(function (result) { return result.code; }); }
1
diff --git a/angular/projects/spark-angular/src/lib/components/sprk-alert/sprk-alert.stories.ts b/angular/projects/spark-angular/src/lib/components/sprk-alert/sprk-alert.stories.ts @@ -69,7 +69,7 @@ fail.story = { }, }; -export const withNoDismissButton = () => ({ +export const noDismissButton = () => ({ moduleMetadata: modules, template: ` <sprk-alert
3
diff --git a/generators/server/templates/build.gradle.ejs b/generators/server/templates/build.gradle.ejs @@ -492,9 +492,7 @@ dependencies { annotationProcessor "org.hibernate:hibernate-jpamodelgen:${hibernate_version}" annotationProcessor "org.glassfish.jaxb:jaxb-runtime:${jaxb_runtime_version}" <%_ } _%> - annotationProcessor ("org.springframework.boot:spring-boot-configuration-processor:${spring_boot_version}") { - exclude group: "com.vaadin.external.google", module: "android-json" - } + annotationProcessor "org.springframework.boot:spring-boot-configuration-processor:${spring_boot_version}" <%_ if (databaseType === 'cassandra') { _%> testImplementation ("org.cassandraunit:cassandra-unit-spring") { exclude(group: "org.slf4j") @@ -509,7 +507,6 @@ dependencies { <%_ if (cucumberTests === false) { _%> exclude group: "org.junit.vintage", module: "junit-vintage-engine" <%_ } _%> - exclude group: "com.vaadin.external.google", module: "android-json" } testImplementation "org.springframework.security:spring-security-test" testImplementation "org.springframework.boot:spring-boot-test"
2
diff --git a/test/endtoend/specs/uppy.test.js b/test/endtoend/specs/uppy.test.js @@ -33,7 +33,7 @@ describe('File upload with DragDrop + Tus, DragDrop + XHRUpload, i18n translated browser.execute(uppySelectFakeFile, 'uppyDragDrop') } browser.pause(3000) - var html = browser.getHTML('#uppyDragDrop-progress .UppyProgressBar-percentage', false) + var html = browser.getHTML('#uppyDragDrop-progress .uppy-ProgressBar-percentage', false) expect(parseInt(html)).to.be.equal(100) }) @@ -44,7 +44,7 @@ describe('File upload with DragDrop + Tus, DragDrop + XHRUpload, i18n translated browser.execute(uppySelectFakeFile, 'uppyi18n') } browser.pause(3000) - var html = browser.getHTML('#uppyi18n-progress .UppyProgressBar-percentage', false) + var html = browser.getHTML('#uppyi18n-progress .uppy-ProgressBar-percentage', false) expect(parseInt(html)).to.be.equal(100) })
3
diff --git a/layouts/partials/fragments/content.html b/layouts/partials/fragments/content.html {{- partial "helpers/text-color.html" (dict "self" $self "light" "secondary") -}} "> {{- .content | markdownify -}} - {{ partial "helpers/slot.html" (dict "root" $ "slot" "sidebar" "data" (dict "parent" $))}} + {{ partial "helpers/slot.html" (dict "root" $ "slot" "sidebar")}} </div> </div> <article class="col-md-9">
2
diff --git a/base/GoldenSun.ts b/base/GoldenSun.ts @@ -87,6 +87,7 @@ export class GoldenSun { this.game.stage.smoothed = false; this.game.camera.roundPx = true; this.game.renderer.renderSession.roundPixels = true; + this.game.stage.disableVisibilityChange = true; this.game.camera.fade(0x0, 1); } @@ -105,7 +106,6 @@ export class GoldenSun { //init audio engine this.audio = new Audio(this.game); - this.game.sound.mute = true; //init storage this.storage = new Storage(this); @@ -181,6 +181,8 @@ export class GoldenSun { this.initialize_utils_controls(); + this.game.sound.mute = true; + this.game.stage.disableVisibilityChange = false; this.assets_loaded = true; this.game.camera.resetFX(); }
12
diff --git a/articles/connections/calling-an-external-idp-api.md b/articles/connections/calling-an-external-idp-api.md @@ -12,10 +12,16 @@ Once you successfully authenticate a user with an external Identity Provider (Id You can retrieve and use this token to call the IdP's API. ::: note -This doc assumes that you have already configured the connection with the IdP of your choice. If not, refer to [Identity Providers Supported by Auth0](/identityproviders), where you can find a list of the supported IdPs. Select the one you want for detailed steps on how to configure the connection. +This article assumes that you have already configured the connection with the IdP of your choice. If not, go to [Identity Providers Supported by Auth0](/identityproviders), select the IdP you want, and follow the configuration steps. ::: -## Required Steps +The process you will follow differs, depending on whether your code runs in the backend or the frontend: + +- If your code runs in the backend then we can assume that your server is trusted to safely store secrets (as you will see, we use a secret in the backend scenario). If that's the case proceed to the [From the backend](#from-the-backend) section of this article. + +- If your code runs in the frontend (i.e. it's a SPA, native desktop, or mobile app) then your app cannot hold credentials securely and has to follow an alternate implementation. To see your options proceed to the [From the frontend](#from-the-frontend) section of this article. + +## From the backend The IdP's access token is not returned to your app as part of the authentication process. In order to get it you will have to use the Auth0 Management API to retrieve the full user's profile. The steps to follow are: @@ -146,3 +152,5 @@ Make sure that you don't expose the IdP tokens to your client-side application! ::: note For more information on how to request specific scopes for an Identity Provider `access_token`, please see [Add scopes/permissions to call Identity Provider's APIs](/tutorials/adding-scopes-for-an-external-idp). ::: + +## From the frontend
0
diff --git a/src/components/data-table/index.css b/src/components/data-table/index.css height: 69px; } +.data-table th { + padding-bottom: 10px; +} + .data-cell { - padding: 0 15px; + padding: 5px 15px; + border-top: 4px solid #1b1919; + border-bottom: 4px solid #1b1919; +} + +td.data-cell:last-child { + border-right: 4px solid #1b1919; +} + +td.data-cell:first-child { + border-left: 4px solid #1b1919; } .data-table .center-content { max-width: 64px; } -.data-table tr:hover td, +.data-table tr td, .data-table tbody tr.expanded td { background-color: #292626; }
7
diff --git a/lib/consumer/express.js b/lib/consumer/express.js @@ -46,16 +46,19 @@ module.exports = function (_config) { res.end(qs.stringify(data)) } else if (!provider.transport || provider.transport === 'querystring') { - res.redirect(`${provider.callback}?${qs.stringify(data)}`) + redirect(req, res, `${provider.callback}?${qs.stringify(data)}`) } else if (provider.transport === 'session') { session.response = data - req.session.save(() => { - res.redirect(provider.callback) - }) + redirect(req, res, provider.callback) } } + var redirect = (req, res, url) => + typeof req.session.save === 'function' + ? req.session.save(() => res.redirect(url)) + : res.redirect(url) + function connect (req, res) { var session = req.session.grant var provider = config.provider(app.config, session) @@ -66,7 +69,7 @@ module.exports = function (_config) { .then(({body}) => { session.request = body oauth1.authorize(provider, body) - .then((url) => res.redirect(url)) + .then((url) => redirect(req, res, url)) .catch(response) }) .catch(response) @@ -76,7 +79,7 @@ module.exports = function (_config) { session.state = provider.state session.nonce = provider.nonce oauth2.authorize(provider) - .then((url) => res.redirect(url)) + .then((url) => redirect(req, res, url)) .catch(response) }
7
diff --git a/app/controllers/password_resets_controller.rb b/app/controllers/password_resets_controller.rb @@ -4,6 +4,7 @@ class PasswordResetsController < ApplicationController before_action :load_organization_from_request, only: [:new, :create, :sent, :changed] before_action :load_user_and_organization, only: [:edit, :update] + after_action :set_referrer_policy def new; end @@ -80,4 +81,7 @@ class PasswordResetsController < ApplicationController "#{base_url}#{path}" end + def set_referrer_policy + headers['Referrer-Policy'] = 'origin' + end end
12
diff --git a/generators/client/templates/react/src/test/javascript/spec/app/shared/layout/header/menus/account.spec.tsx.ejs b/generators/client/templates/react/src/test/javascript/spec/app/shared/layout/header/menus/account.spec.tsx.ejs @@ -20,6 +20,9 @@ import * as React from 'react'; import { shallow } from 'enzyme'; import { expect } from 'chai'; +<%_ if (authenticationType === 'oauth2') { _%> +import { getLoginUrl } from 'app/shared/util/url-utils'; +<%_ } _%> import { NavDropdown } from 'app/shared/layout/header/header-components'; import { AccountMenu } from 'app/shared/layout/header/menus'; @@ -61,7 +64,11 @@ describe('AccountMenu', () => { it('Renders a guest AccountMenu component', () => { const dropdown = guestWrapper().find(NavDropdown); expect(dropdown).to.have.length(1); + <%_ if (authenticationType === 'oauth2') { _%> + expect(dropdown.find({ href: getLoginUrl() })).to.have.length(1); + <%_ } else { _%> expect(dropdown.find({ to: '/login' })).to.have.length(1); + <%_ } _%> expect(dropdown.find({ to: '/logout' })).to.have.length(0); });
1
diff --git a/src/parsers/GmlSeeker.hx b/src/parsers/GmlSeeker.hx @@ -247,6 +247,12 @@ class GmlSeeker { } } }; + case "$".code: { // hex literal + while (q.loopLocal) { + c = q.peek(); + if (c.isHex()) q.skip(); else break; + } + }; default: { if (c.isIdent0()) { q.skipIdent1(); @@ -261,6 +267,27 @@ class GmlSeeker { if (hasFunctionLiterals && flags.has(Define) && id == "function") return id; if (flags.has(Static) && id == "static") return id; if (flags.has(Ident)) return id; + } else if (c.isDigit()) { + if (q.peek() == "x".code) { + q.skip(); + while (q.loopLocal) { + c = q.peek(); + if (c.isHex()) q.skip(); else break; + } + } else { + var seenDot = false; + while (q.loopLocal) { + c = q.peek(); + if (c == ".".code) { + if (!seenDot) { + seenDot = true; + q.skip(); + } else break; + } else if (c.isDigit()) { + q.skip(); + } else break; + } + } } }; }
9
diff --git a/index.html b/index.html Double click on screen to fullscreen. D for debug colision. F for fps. G for grid. K for keys debug. T for battle stats. L for sliders. We have some maps in this demo, feel free to find them! -Use Q to cast Move. Use W to cast Frost. Use E to cast Growth. +Use Q to cast Move. Use W to cast Frost. Use E to cast Growth (swap djinn first). It can take a while to load. I'm not compressing the source for now. See the <a href="https://github.com/jjppof/goldensun_html5">source code</a> on github.
7
diff --git a/test/unit/helpers/console_error_throw.js b/test/unit/helpers/console_error_throw.js @@ -6,10 +6,14 @@ if (!process.env.LISTENING_TO_UNHANDLED_REJECTION) { process.env.LISTENING_TO_UNHANDLED_REJECTION = true } +const consoleError = console.error console.error = (...args) => { - throw Error(args.join(' ')) + consoleError(...args) + throw Error('There was an error printed so there is probably a bug in your code.') } +const consoleWarn = console.warn console.warn = (...args) => { - throw Error(args.join(' ')) + consoleWarn(...args) + throw Error('There was a warning printed so there is probably a bug in your code.') }
7
diff --git a/index.css b/index.css @@ -2661,3 +2661,62 @@ footer { display: block; background-color: #42a5f5; } + +.notifications { + display: flex; + position: absolute; + top: 50px; + right: 0; + flex-direction: column; +} +.notifications .notification { + display: flex; + margin: 10px; + background-color: #FFF; + /* border: 3px solid #000; */ + /* color: #ffa726; */ + /* box-shadow: 0 3px 7px #00000060; */ + opacity: 0.9; +} +.notifications .notification .icon { + display: flex; + width: 80px; + /* height: 80px; */ + margin-right: 10px; + background-color: #000; + font-size: 30px; + color: #ef5350; + justify-content: center; + align-items: center; + /* text-shadow: 0 2px #000; */ +} +.notifications .notification .wrap { + display: flex; + padding: 10px; + flex-direction: column; +} +.notifications .notification .label { + /* font-size: 20px; */ + font-weight: 600; +} +.notifications .notification .label, +.notifications .notification .text, +.notifications .notification progress +{ + margin-bottom: 5px; +} +.notifications .notification .button { + display: inline-flex; +} + +progress { + width: 100%; + height: 3px; + border-radius: 3px; +} +progress::-webkit-progress-bar { + background-color: #CCC; +} +progress::-webkit-progress-value { + background-color: #9ccc65; +} \ No newline at end of file
0