code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/src/components/playerController.js b/src/components/playerController.js @@ -138,49 +138,58 @@ module.exports = class PlayerController { * the ES6 gods might not like this.. * FIXME: To prevent retaliation from the gods, consider making the activePlayers an Map instead of an Array. * + * * @param {array} players */ async processHeartBeat(players){ - try { //Sanity check if(!Array.isArray(players)) throw new Error('expected array'); //Validate & filter players then extract ids and license let pCount = players.length; //Optimization only, although V8 is probably smart enough - let hbPlayerIDs = []; //Optimization only + let hbPlayerLicenses = []; //Optimization + duplicity checking + let hbPlayers = []; let invalids = 0; for (let i = 0; i < pCount; i++) { - const p = players[i]; + let p = Object.assign({}, players[i]); + //Basic struct if( typeof p !== 'object' || typeof p.name !== 'string' || typeof p.id !== 'number' || + typeof p.license !== 'undefined' || !Array.isArray(p.identifiers) || !p.identifiers.length ){ invalids++; - delete players[i]; continue; } //Extract license for (let j = 0; j < p.identifiers.length; j++) { - const id = p.identifiers[j]; - //s.substring(0, "test".length) == "test" - //either just extract license, or all ids + //NOTE: maybe extract all ids to object props + //TODO: filter by this.knownIdentifiers + if(p.identifiers[j].substring(0, 8) == "license:"){ + p.license = p.identifiers[j].substring(8); + break; + } } - //Check if license exists - // if(xxx){} //TODO: + //Check if license id exist and is not duplicated + if(typeof p.license !== 'string' || hbPlayerLicenses.includes(p.license)){ + invalids++; + continue; + } - //Add to ids list - hbPlayerIDs.push(p.id); + //Add to licenses list + delete p.endpoint; + hbPlayerLicenses.push(p.license); + hbPlayers.push(p); } if(GlobalData.verbose && invalids) logWarn(`HeartBeat playerlist contained ${invalids} players that were removed.`); - //TODO: this.knownIdentifiers //Processing active players list, creating the removed list, creating new active list without removed players let apCount = this.activePlayers.length; //Optimization only, although V8 is probably smart enough @@ -188,36 +197,34 @@ module.exports = class PlayerController { let activePlayerIDs = []; //Optimization only let newActivePlayers = []; for (let i = 0; i < apCount; i++) { - if(!hbPlayerIDs.includes(this.activePlayers[i].id)){ - disconnectedPlayers.push(this.activePlayers[i]); //NOTE: might require a Clone - }else{ + if(hbPlayerLicenses.includes(this.activePlayers[i].license)){ newActivePlayers.push(this.activePlayers[i]); activePlayerIDs.push(this.activePlayers[i].id); + }else{ + disconnectedPlayers.push(this.activePlayers[i]); //NOTE: might require a Clone } } //Processing the new players let newPlayers = []; - for (let hbPI = 0; hbPI < players.length; hbPI++) { - if(players[hbPI] == null) continue; - if(!activePlayerIDs.includes(players[hbPI].id)){ - newPlayers.push(players[hbPI]); // debug only - remove this line - newActivePlayers.push(players[hbPI]) //NOTE: process before adding + for (let hbPI = 0; hbPI < hbPlayers.length; hbPI++) { + if(!activePlayerIDs.includes(hbPlayers[hbPI].id)){ + newPlayers.push(hbPlayers[hbPI]); // debug only - remove this line + newActivePlayers.push(hbPlayers[hbPI]) //NOTE: process before adding } } //Replacing the active playerlist this.activePlayers = newActivePlayers; - dir({ - disconnectedPlayers: disconnectedPlayers.length, - newPlayers: newPlayers.length, - activePlayers: this.activePlayers.length - }); + // dir({ + // disconnectedPlayers: disconnectedPlayers.length, + // newPlayers: newPlayers.length, + // activePlayers: this.activePlayers.length + // }); } catch (error) { dir(error) } - }//Fim processHeartBeat() } //Fim Database()
7
diff --git a/src/lib/urlHelper.js b/src/lib/urlHelper.js @@ -23,35 +23,18 @@ export function getNewEntryUrl(collectionName, direct) { */ const uriChars = /[\w\-.~]/i; const ucsChars = /[\xA0-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFEF}\u{10000}-\u{1FFFD}\u{20000}-\u{2FFFD}\u{30000}-\u{3FFFD}\u{40000}-\u{4FFFD}\u{50000}-\u{5FFFD}\u{60000}-\u{6FFFD}\u{70000}-\u{7FFFD}\u{80000}-\u{8FFFD}\u{90000}-\u{9FFFD}\u{A0000}-\u{AFFFD}\u{B0000}-\u{BFFFD}\u{C0000}-\u{CFFFD}\u{D0000}-\u{DFFFD}\u{E1000}-\u{EFFFD}]/u; +const validIRIChar = (char) => (uriChars.test(char) || ucsChars.test(char)); // `sanitizeIRI` does not actually URI-encode the chars (that is the browser's and server's job), just removes the ones that are not allowed. -function sanitizeIRI(str, { replacement = "" } = {}) { +export function sanitizeIRI(str, { replacement = "" } = {}) { if (!isString(str)) throw "The input slug must be a string."; if (!isString(replacement)) throw "`options.replacement` must be a string."; - // This is where sanitization is actually done. - const sanitize = (input) => { - let result = ""; - // We cannot use a `map` function here because `string.split()` - // splits things like emojis into UTF-16 surrogate pairs, - // and we want to use UTF-8 (it isn't required, but is nicer). - for (const char of input) { - if (uriChars.test(char) || ucsChars.test(char)) { - result += char; - } else { - result += replacement; - } - } - return result; - } - // Check and make sure the replacement character is actually a safe char itself. - if (replacement !== "") { - const validReplacement = (sanitize(replacement) === replacement); - if (!validReplacement) throw "The replacement character(s) (options.replacement) is itself unsafe."; - } + if (!Array.from(replacement).every(validIRIChar)) throw "The replacement character(s) (options.replacement) is itself unsafe."; - // Actually do the sanitization. - return sanitize(str); + // `Array.from` must be used instead of `String.split` because + // `split` converts things like emojis into UTF-16 surrogate pairs. + return Array.from(str).map(char => (validIRIChar(char) ? char : replacement)).join(''); } export function sanitizeSlug(str, { replacement = '-' } = {}) {
2
diff --git a/src/module/config.js b/src/module/config.js @@ -395,7 +395,11 @@ SFRPG.weaponPropertiesTooltips = { "double": "SFRPG.WeaponPropertiesDoubleTooltip", "shatter": "SFRPG.WeaponPropertiesShatterTooltip", "drainCharge": "SFRPG.WeaponPropertiesDrainChargeTooltip", - "echo": "SFRPG.WeaponPropertiesEchoTooltip" + "echo": "SFRPG.WeaponPropertiesEchoTooltip", + "entangle": "SFRPG.WeaponPropertiesEntangleTooltip", + "explode": "SFRPG.WeaponPropertiesExplodeTooltip", + "extinguish": "SFRPG.WeaponPropertiesExtinguishTooltip" + }; SFRPG.spellAreaShapes = {
0
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -248,7 +248,7 @@ jobs: # Create a release sentry-cli releases new -p haven-grc $VERSION # Associate commits with the release - sentry-cli releases set-commits --auto $VERSION + sentry-cli releases set-commits --auto $VERSION || true oc set image deployment/havenapi havenapi=havengrc-docker.jfrog.io/kindlyops/havenapi:$CIRCLE_SHA1 oc set image deployment/havenweb havenweb=havengrc-docker.jfrog.io/kindlyops/havenweb:$CIRCLE_SHA1 oc set image deployment/keycloak keycloak=havengrc-docker.jfrog.io/kindlyops/keycloak:$CIRCLE_SHA1
8
diff --git a/angular/projects/spark-angular/src/lib/directives/inputs/sprk-field-error/sprk-field-error.directive.spec.ts b/angular/projects/spark-angular/src/lib/directives/inputs/sprk-field-error/sprk-field-error.directive.spec.ts @@ -4,9 +4,7 @@ import { SprkFieldErrorDirective } from './sprk-field-error.directive'; @Component({ selector: 'sprk-test', - template: ` - <span sprkFieldError>Error Message</span> - ` + template: ` <span sprkFieldError>Error Message</span> `, }) class TestComponent {} @@ -17,7 +15,7 @@ describe('Spark Field Error Directive', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [SprkFieldErrorDirective, TestComponent] + declarations: [SprkFieldErrorDirective, TestComponent], }).compileComponents(); fixture = TestBed.createComponent(TestComponent); @@ -29,4 +27,10 @@ describe('Spark Field Error Directive', () => { it('should create itself', () => { expect(component).toBeTruthy(); }); + + it('should add the correct classes to the applied element', () => { + expect(spanElement.classList.contains('sprk-b-ErrorContainer')).toEqual( + true, + ); + }); });
7
diff --git a/src/actions/navigation.js b/src/actions/navigation.js @@ -25,8 +25,6 @@ export const navigate = (dispatch: Dispatch<NavigationAction>) => ( const prevScreen = getCurrentRouteName(prevState); if (typeof currentScreen === "string" && prevScreen !== currentScreen) { - // the line below uses the Google Analytics tracker - // change the tracker here to use other Mobile analytics SDK. dispatch({ type: "NAVIGATION", route: currentScreen }); } };
2
diff --git a/scripts/update-prices.js b/scripts/update-prices.js @@ -89,8 +89,8 @@ const getGrid = (item) => { for(const grid of item._props.Grids){ gridData.totalSize = gridData.totalSize + grid._props.cellsH * grid._props.cellsV; gridData.pockets.push({ - height: grid._props.cellsH, - width: grid._props.cellsV + height: grid._props.cellsV, + width: grid._props.cellsH, }); }
12
diff --git a/src/firestore.test.js b/src/firestore.test.js import { call } from 'redux-saga/effects' -import dbModule from './firestore' +import firestoreModule from './firestore' describe('firestore', () => { let doc, collection, context @@ -32,7 +32,7 @@ describe('firestore', () => { } const response = [result, result] - const iterator = dbModule.getCollection.call(context, collectionRef) + const iterator = firestoreModule.getCollection.call(context, collectionRef) expect(iterator.next().value) .toEqual(call([collection, collection.get])) @@ -56,7 +56,7 @@ describe('firestore', () => { data: jest.fn(() => val), id: 0 } - const iterator = dbModule.getDocument.call(context, collectionRef, docRef) + const iterator = firestoreModule.getDocument.call(context, collectionRef, docRef) expect(iterator.next().value) .toEqual(call([doc, doc.get]))
10
diff --git a/templates/examples/extensions/js_lambda_hooks/KendraFallback/test/run_test.js b/templates/examples/extensions/js_lambda_hooks/KendraFallback/test/run_test.js @@ -41,11 +41,11 @@ describe('#test_kendra_highlights()', () => { // tests that in markdown format, only the top answer phrase is returned with the link from where it is extracted assert.equal(resp.res.session.appContext.altMessages.markdown, - "*Answer from Amazon Kendra.* \n \n\n**Sun** \n\n #### Possible Links\n\n [https://s3.us-east-1.amazonaws.com/explore-kendra-solar/Sun_Lithograph.pdf](https://s3.us-east-1.amazonaws.com/explore-kendra-solar/Sun_Lithograph.pdf)"); + "*Amazon Kendra suggested answer.* \n \n\n**Sun** \n\n #### Source Link\n\n [https://s3.us-east-1.amazonaws.com/explore-kendra-solar/Sun_Lithograph.pdf](https://s3.us-east-1.amazonaws.com/explore-kendra-solar/Sun_Lithograph.pdf)"); // tests that in SSML format, only the top answer phrase is returned assert.equal(resp.res.session.appContext.altMessages.ssml, - "<speak> Answer from Amazon Kendra. Sun </speak>"); + "<speak> Amazon Kendra suggested answer. Sun </speak>"); }); it('test_doc_query', async function() { let resp = await test_doc_query();
3
diff --git a/src/encoded/static/components/award.js b/src/encoded/static/components/award.js @@ -18,6 +18,8 @@ const typeSpecificColorList = labColors.colorList(); const statusColorList = labColors.colorList(); + + // Draw the total chart count in the middle of the donut. function drawDonutCenter(chart) { const width = chart.chart.width; @@ -538,6 +540,77 @@ const ChartRenderer = (props) => { </div> ); }; +// Version 1 of creating a new panel +class NewPanel extends React.Component{ + constructor(){ + super() + } + render(){ + const{ handleClick, selectedOrganisms} = this.props; + return( + <div> + <div className="organism-selector" ref="tabdisplay"> + <OrganismSelector organism="Human" selected={selectedOrganisms.indexOf('HUMAN') !== -1} organismButtonClick={handleClick} /> + <OrganismSelector organism="Mouse" selected={selectedOrganisms.indexOf('MOUSE') !== -1} organismButtonClick={handleClick} /> + <OrganismSelector organism="Worm" selected={selectedOrganisms.indexOf('WORM') !== -1} organismButtonClick={handleClick} /> + <OrganismSelector organism="Fly" selected={selectedOrganisms.indexOf('FLY') !== -1} organismButtonClick={handleClick} /> + </div> + </div> + ); + }; +} + + +NewPanel.propTypes = { + organisms: PropTypes.array, // Array of currently selected tabs + handleTabClick: PropTypes.func, // Function to call when a tab is clicked +}; + + + +class OrganismSelector extends React.Component{ + constructor(){ + super(); + this.buttonClick = this.buttonClick.bind(this); + } + + buttonClick(){ + // const { organism, organismButtonClick } = this.props; + this.props.organismButtonClick(this.props.organism) + } + render(){ + const { organism, selected, handleClick } = this.props; + return( + <button onClick={this.buttonClick} className={selected===true ? 'organism-selector--selected' : 'organism-selector__tab'}> + {organism} </button> + ); + }; +}; + +OrganismSelector.propTypes = { + organism: PropTypes.string, // Organism this selector represents + selected: PropTypes.bool, // `true` if selector is selected + handleClick: PropTypes.func, // Function to call to handle a selector click +}; + + + + + +// Version 2 of creating a new panel +// const MiddlePanel = (props) => { +// const {award} = props; +// return( +// <Panel> +// <PanelHeading> +// <h4>Middle Panel</h4> +// </PanelHeading> +// <PanelBody> +// <h5> Text text text </h5> +// </PanelBody> +// </Panel> +// ); +// }; ChartRenderer.propTypes = { award: PropTypes.object.isRequired, // Award being displayed @@ -577,10 +650,29 @@ AwardCharts.propTypes = { }; -const Award = (props) => { - const { context } = props; - const statuses = [{ status: context.status, title: 'Status' }]; +class Award extends React.Component{ + + constructor(){ + super(); + this.state={ + selectedOrganisms:[], //create empty array of selected organism tabs + }; + } + handleClick(organism){ + console.log(organism) + } + render(){ + const {context} =this.props; + const statuses = [{status:context.status, title:'Status'}]; + const organismSpec = 'COMPPRED' ? 'organism.scientific_name=' : 'replicates.library.biosample.donor.organism.scientific_name='; + const queryStrings = { + HUMAN: `${organismSpec}Homo+sapiens`, // human + MOUSE: `${organismSpec}Mus+musculus`, // mouse + WORM: `${organismSpec}Caenorhabditis+elegans`, // worm + FLY: `${organismSpec}Drosophila+melanogaster&${organismSpec}Drosophila+pseudoobscura&${organismSpec}Drosophila+simulans&${organismSpec}Drosophila+mojavensis&${organismSpec}Drosophila+ananassae&${organismSpec}Drosophila+virilis&${organismSpec}Drosophila+yakuba`, + }; + const organismButtonClick = {this:organismButtonClick}; return( <div className={globals.itemClass(context, 'view-item')}> <header className="row"> @@ -594,8 +686,11 @@ const Award = (props) => { </div> </header> + {/*Call creation of panels*/} <AwardCharts award={context} /> + <NewPanel handleClick={this.handleClick} selectedOrganisms={this.state.selectedOrganisms}/> + {/*^alternatively NewPanel or MiddlePanel, depending on whichever version is used*/} <Panel> <PanelHeading> <h4>Description</h4> @@ -618,8 +713,10 @@ const Award = (props) => { </Panel> </div> ); + } }; + Award.propTypes = { context: PropTypes.object.isRequired, // Award object being rendered };
0
diff --git a/src/lib/gundb/UserStorageClass.js b/src/lib/gundb/UserStorageClass.js @@ -138,7 +138,8 @@ export const welcomeMessage = { from: '0x0000000000000000000000000000000000000000', }, reason: - 'GoodDollar is a digital coin with built-in\nbasic income. Start collecting your income by claiming GoodDollars every day.', + 'GoodDollar is a digital coin with built-in\nbasic income. Start collecting your income by claiming GoodDollars every day.\ + \nAlpha tokens have no real value and will be deleted at the end of this trial.', endpoint: { fullName: 'Welcome to GoodDollar', },
0
diff --git a/gulpfile.js b/gulpfile.js @@ -242,11 +242,10 @@ gulp.task('inject', function () { }); var pkg = require('./package.json'); -var nextVersion; -var ghToken; +var nextVersion = pkg.version; +var ghToken = gutil.env.token; gulp.task('release:init', function (cb) { - ghToken = gutil.env.token; if (!ghToken) { return cb(new Error('--token is required (github personal access token')); } @@ -254,8 +253,6 @@ gulp.task('release:init', function (cb) { return cb(new Error('--token length must be 40, not ' + ghToken.length)); } - nextVersion = pkg.version; - if (gutil.env.skipnewtag) { return cb(); }
11
diff --git a/lib/plugins/aws/provider/awsProvider.js b/lib/plugins/aws/provider/awsProvider.js @@ -151,12 +151,13 @@ class AwsProvider { that.serverless.cli.log("'Too many requests' received, sleeping 5 seconds"); setTimeout(doCall, 5000); } else { - if (err.message === 'The security token included in the request is invalid') { + if (err.message.match(/.+security token.+is invalid/)) { const errorMessage = [ 'The AWS security token included in the request is invalid.', - ' Please check your ~./aws/credentials file and verify your keys are correct.', + ' Please re-authenticate if you\'re using MFA', + ' check your ~./aws/credentials file and verify your keys are correct.', ' More information on setting up credentials', - ` can be found here: ${chalk.green('https://git.io/vXsdd')}.`, + ` can be found here: ${chalk.green('https://goo.gl/esQf6D')}.`, ].join(''); err.message = errorMessage; }
1
diff --git a/composer.json b/composer.json } ], "require": { - "backpack/base": "dev-v4 as 1.1.99", + "backpack/base": "v4.x-dev as 1.1.99", "doctrine/dbal": "^2.5", "venturecraft/revisionable": "1.*", "intervention/image": "^2.3",
3
diff --git a/README.md b/README.md @@ -147,12 +147,6 @@ Start your local server: make docker-dev ``` -If you'd like to run the Celery worker for async features such as mail sending, start it too: - -```shell - docker-compose up -d celery -``` - Now just go to [http://localhost:8000](http://localhost:8000) in your browser :) For simulating a Heroku like environment (recommended to make build first):
2
diff --git a/source/guides/references/configuration.md b/source/guides/references/configuration.md @@ -18,12 +18,10 @@ Option | Default | Description ----- | ---- | ---- `baseUrl` | `null` | URL used as prefix for {% url `cy.visit()` visit %} or {% url `cy.request()` request %} command's URL `env` | `{}` | Any values to be set as {% url 'environment variables' environment-variables %} -`ignoreTestFiles` | `*.hot-update.js` | A String or Array of glob patterns used to ignore test files that would otherwise be shown in your list of tests. Cypress uses `minimatch` with the options: `{dot: true, matchBase: true}`. We suggest using {% url "http://globtester.com" http://globtester.com %} to test what files would match. `numTestsKeptInMemory` | `50` | The number of tests for which snapshots and command data are kept in memory. Reduce this number if you are experiencing high memory consumption in your browser during a test run. `port` | `null` | Port used to host Cypress. Normally this is a randomly generated port `reporter` | `spec` | The {% url 'reporter' reporters %} used during `cypress run` `reporterOptions` | `null` | The {% url 'reporter options' reporters#Reporter-Options %} used. Supported options depend on the reporter. -`testFiles` | `**/*.*` | A String glob pattern of the test files to load `watchForFileChanges` | `true` | Whether Cypress will watch and restart tests on test file changes ## Timeouts @@ -47,10 +45,12 @@ Option | Default | Description ----- | ---- | ---- `fileServerFolder` | root project folder |Path to folder where application files will attempt to be served from `fixturesFolder` | `cypress/fixtures` | Path to folder containing fixture files (Pass `false` to disable) +`ignoreTestFiles` | `*.hot-update.js` | A String or Array of glob patterns used to ignore test files that would otherwise be shown in your list of tests. Cypress uses `minimatch` with the options: `{dot: true, matchBase: true}`. We suggest using {% url "http://globtester.com" http://globtester.com %} to test what files would match. `integrationFolder` | `cypress/integration` | Path to folder containing integration test files `pluginsFile` | `cypress/plugins/index.js` | Path to plugins file. (Pass `false` to disable) `screenshotsFolder` | `cypress/screenshots` | Path to folder where screenshots will be saved from {% url `cy.screenshot()` screenshot %} command or after a test fails during `cypress run` `supportFile` | `cypress/support/index.js` | Path to file to load before test files load. This file is compiled and bundled. (Pass `false` to disable) +`testFiles` | `**/*.*` | A String glob pattern of the test files to load `videosFolder` | `cypress/videos` | Path to folder where videos will be saved during `cypress run` ## Screenshots
5
diff --git a/update-db.js b/update-db.js @@ -47,7 +47,7 @@ function getCurrentVersion (lock) { return dependencies['caniuse-lite'].version } } else if (lock.mode === 'yarn') { - match = /caniuse-lite@[^:]+:\n\s+version\s+"([^"]+)"/.exec(lock.content) + match = /caniuse-lite@[^:]+:\r?\n\s+version\s+"([^"]+)"/.exec(lock.content) if (match[1]) return match[1] } return null
11
diff --git a/build/webpack.dist.conf.js b/build/webpack.dist.conf.js @@ -18,7 +18,9 @@ let webpackConfig = merge(baseWebpackConfig, { }, output: { path: config.dist.assetsRoot, - filename: 'uiv.min.js' + filename: 'uiv.min.js', + library: 'uiv', + libraryTarget: 'umd' }, module: { rules: utils.styleLoaders({
3
diff --git a/apps/health/boot.js b/apps/health/boot.js @@ -105,12 +105,13 @@ function handleStepGoalNotification() { if (!settings.stepGoalNotificationDate || settings.stepGoalNotificationDate < now) { // notification not yet shown today? Bangle.buzz(200, 0.5); if (process.env.BOARD == "BANGLEJS2") { + const widgetOffset = 24; var medal = atob("MDCBAAAAAAAAAAAAAAAAAAA/+D/4AAB//H/8AAB//H/8AAB//v/4AAA8H/B4AAA+H/D4AAAeD+DwAAAfD+HwAAAPB8HgAAAPh8PgAAAHg8PAAAAHw8PAAAADw+eAAAAD4eeAAAAB4f+AAAAB8P8AAAAA//8AAAAA//4AAAAA//8AAAAB//+AAAAD+B/AAAAH4AfgAAAPgAHwAAAPAADwAAAfAAD4AAAeAAB4AAA+AAB8AAA8AAA8AAA8AAA8AAA8AAA8AAA8AAA8AAA8AAA8AAA8AAA8AAA+AAB4AAAeAAB4AAAfAAD4AAAPAADwAAAPgAHwAAAH4AfgAAAD+B/AAAAB//+AAAAA//8AAAAAP/wAAAAAD+AAAAAAAAAAAAAAAAAAAA=="); var ovr = Graphics.createArrayBuffer(g.getWidth(),g.getHeight(),1,{msb:true}); - ovr.drawImage(medal, 10, 10); + ovr.drawImage(medal, 10, widgetOffset + 10); ovr.setFont("Vector:18").setFontAlign(0, 0, 0); - ovr.drawString(/*LANG*/settings.stepGoal + " steps", g.getWidth() / 2 + 24 , 10 + 24); - ovr.drawString(/*LANG*/"Step goal reached!", g.getWidth() / 2, g.getHeight() / 2); + ovr.drawString(/*LANG*/settings.stepGoal + " steps", g.getWidth() / 2 + 24 , widgetOffset + 10 + 24); + ovr.drawString(/*LANG*/"Step goal reached!", g.getWidth() / 2, widgetOffset + g.getHeight() / 2); Bangle.setLCDOverlay(ovr,0,0); setWatch(function() { Bangle.setLCDOverlay();
7
diff --git a/Source/Scene/TileBoundingS2Cell.js b/Source/Scene/TileBoundingS2Cell.js @@ -15,11 +15,9 @@ import GeometryInstance from "../Core/GeometryInstance.js"; import Matrix4 from "../Core/Matrix4.js"; import PerInstanceColorAppearance from "./PerInstanceColorAppearance.js"; import Primitive from "./Primitive.js"; -import OrientedBoundingBox from "../Core/OrientedBoundingBox.js"; import S2Cell from "../Core/S2Cell.js"; var centerCartographicScratch = new Cartographic(); -var scratchCartographic = new Cartographic(); /** * A tile bounding volume specified as an S2 cell token with minimum and maximum heights. * The bounding volume is a k DOP. A k-DOP is the Boolean intersection of extents along k directions. @@ -96,26 +94,7 @@ function TileBoundingS2Cell(options) { center ); - var points = new Array(7); - - // Add center of cell. - points[0] = center; - scratchCartographic = Cartographic.fromCartesian(points[0]); - scratchCartographic.height = this.maximumHeight; - points[0] = Cartographic.toCartesian(scratchCartographic); - scratchCartographic.height = this.minimumHeight; - points[1] = Cartographic.toCartesian(scratchCartographic); - for (i = 0; i <= 3; i++) { - scratchCartographic = Cartographic.fromCartesian(this.s2Cell.getVertex(i)); - scratchCartographic.height = this.maximumHeight; - points[2 + i] = Cartographic.toCartesian(scratchCartographic); - scratchCartographic.height = this.minimumHeight; - points[2 + i + 1] = Cartographic.toCartesian(scratchCartographic); - } - this._orientedBoundingBox = OrientedBoundingBox.fromPoints(points); - this._boundingSphere = BoundingSphere.fromOrientedBoundingBox( - this._orientedBoundingBox - ); + this._boundingSphere = BoundingSphere.fromPoints(vertices); } var centerGeodeticNormalScratch = new Cartesian3(); @@ -500,7 +479,7 @@ TileBoundingS2Cell.prototype.distanceToCamera = function (frameState) { ), vertices, this._boundingPlanes[0], - edgeNormals[0], + this._edgeNormals[0], 1 ); return Cartesian3.distance(facePoint, point);
1
diff --git a/src/Esquio.UI/ClientApp/src/app/products/flags/FlagsForm.vue b/src/Esquio.UI/ClientApp/src/app/products/flags/FlagsForm.vue <template> <section class="flags_form container u-container-medium"> <div class="row"> - <h1>{{$t('flags.detail')}}</h1> + <h1 class="col col-auto pl-0">{{$t('flags.detail')}}</h1> + <div class="flags_form-switch col col-auto pl-0"> <custom-switch v-model="form.enabled"/> </div> + </div> <form class="row"> <input-text class="flags_form-group form-group col-md-5" @@ -84,13 +86,14 @@ export default class extends Vue { public async getFlag(): Promise<void> { try { - const { name, description, id } = await this.flagsService.detail( + const { name, description, id, enabled } = await this.flagsService.detail( Number(this.id) ); this.form.name = name; this.form.description = description; this.form.id = id; + this.form.enabled = enabled; } catch (e) { this.$toasted.global.error({ message: this.$t('flags.errors.detail') @@ -169,5 +172,9 @@ export default class extends Vue { pointer-events: none; } } + + &-switch { + transform: translateY(.5rem); + } } </style>
7
diff --git a/src/shaders/metallic-roughness.frag b/src/shaders/metallic-roughness.frag @@ -83,15 +83,11 @@ struct MaterialInfo float perceptualRoughness; // roughness value, as authored by the model creator (input to shader) vec3 reflectance0; // full reflectance color (normal incidence angle) - float metalness; // metallic value at the surface - vec3 reflectance90; // reflectance color at grazing angle - float alphaRoughness; // roughness mapped to a more linear change in the roughness (proposed by [2]) vec3 diffuseColor; // color contribution from diffuse lighting + vec3 reflectance90; // reflectance color at grazing angle vec3 specularColor; // color contribution from specular lighting - - float padding; }; // Calculation of the lighting contribution from an optional Image Based Light source. @@ -359,12 +355,10 @@ void main() MaterialInfo materialInfo = MaterialInfo( perceptualRoughness, specularEnvironmentR0, - metallic, - specularEnvironmentR90, alphaRoughness, diffuseColor, - specularColor, - 0.0 + specularEnvironmentR90, + specularColor ); // LIGHTING
2
diff --git a/articles/api/authentication/_multifactor-authentication.md b/articles/api/authentication/_multifactor-authentication.md @@ -106,7 +106,6 @@ If OTP is supported by the user and you don't want to request a different factor | `client_id` <br/><span class="label label-danger">Required</span> | Your application's Client ID. | | `client_secret` | Your application's Client Secret. **Required** when the **Token Endpoint Authentication Method** field at your [Application Settings](${manage_url}/#/applications) is `Post` or `Basic`. | | `challenge_type` | A whitespace-separated list of the challenges types accepted by your application. Accepted challenge types are `oob` or `otp`. Excluding this parameter means that your client application accepts all supported challenge types. | -| `oob_channel` | The channel to use for OOB. Can only be provided when `challenge_type` is `oob`. Accepted values are `sms`, `voice`, or `auth0`. Excluding this parameter means that your client application will accept **all** supported OOB channels. | | `authenticator_id` | The ID of the authenticator to challenge. You can get the ID by querying the list of available authenticators for the user as explained on [List authenticators](#list-authenticators) below. | ### Remarks
2
diff --git a/assets/js/modules/thank-with-google/datastore/publications.test.js b/assets/js/modules/thank-with-google/datastore/publications.test.js @@ -394,24 +394,9 @@ describe( 'modules/thank-with-google publications', () => { } ); it( 'returns a publisher center URL for an existing publication', () => { - registry - .dispatch( MODULES_THANK_WITH_GOOGLE ) - .receiveGetPublications( - publicationWithOnboardingCompleteState - ); - - registry - .dispatch( MODULES_THANK_WITH_GOOGLE ) - .setPublicationID( 'test-publication-a' ); - - const publication = registry - .select( MODULES_THANK_WITH_GOOGLE ) - .getCurrentPublication(); - const publicationURL = registry .select( MODULES_THANK_WITH_GOOGLE ) - // eslint-disable-next-line sitekit/acronym-case - .getServicePublicationURL( publication.publicationId ); + .getServicePublicationURL( 'test-publication-a' ); expect( publicationURL ).toEqual( 'https://publishercenter.google.com/publications/test-publication-a/overview'
2
diff --git a/index.html b/index.html <p style="font-family:mathfont" id="lnans"></p><br> </div> -<div class="collapse" id="adams"> - <h1 style="color: white;font-family:mathfont">Adam Number Checker</h2><p>&nbsp;</p> - <input style="color: white; font-family:mathfont" type="text"id="adam1" placeholder="Enter the input number" class="form__field"><p>&nbsp;</p> - <button class="btn btn-dark" onclick="adamfind()">Check</button><p>&nbsp;</p> - <p style="font-family:mathfont" id="adamans"></p><br> +<div class="collapse" id="adams" style="text-align: center;"> + <div class="container"> + <h1 style="color: white;font-family:mathfont;text-align: center;">Adam Number Checker</h2> + <br> + <p>Adam number is a number when reversed, the square of the number and the square of the reversed number should be numbers which are reverse of each other.</p> + <br> + <form action=""> + <div class="form-group"> + <input style="color: white; font-family:mathfont" type="number" id="adam1" placeholder="Enter the input number" class="form__field"> </div> + <div class="form-group"> + <button type="button" class="btn btn-light" onclick="adamfind()">Check</button> + <button type="button" class="btn btn-light" onclick="this.form.reset();"> + Reset + </button> + </div> + </form> + <br> + <div class="form-group text-center"> + <p class="stopwrap" style="color:white;" id="adamans""></p> + </div> + </div> +</div> + <div class="collapse" id="kaps"> <h1 style="color: white;font-family:mathfont">Kaprekarumber</h2><p>&nbsp;</p> <input style="color: white; font-family:mathfont" type="text"id="kap1" placeholder="Enter the input number" class="form__field"><p>&nbsp;</p>
7
diff --git a/contracts/libraries/TokenLib.sol b/contracts/libraries/TokenLib.sol pragma solidity ^0.4.24; import "../modules/PermissionManager/IPermissionManager.sol"; -import "./KindMath.sol"; +import "openzeppelin-solidity/contracts/math/SafeMath.sol"; library TokenLib { - using KindMath for uint256; + using SafeMath for uint256; // Struct for module data struct ModuleData {
14
diff --git a/token-metadata/0x05D412CE18F24040bB3Fa45CF2C69e506586D8e8/metadata.json b/token-metadata/0x05D412CE18F24040bB3Fa45CF2C69e506586D8e8/metadata.json "symbol": "MFTU", "address": "0x05D412CE18F24040bB3Fa45CF2C69e506586D8e8", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/lib/node_modules/@stdlib/ndarray/ctor/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/ndarray/ctor/benchmark/c/benchmark.c @@ -601,14 +601,14 @@ double benchmark12() { for ( i = 0; i < ITERATIONS; i++ ) { sub[ 0 ] = (int64_t)( rand_double()*6.0 ); v = stdlib_ndarray_get_ptr( arr, sub ); - if ( v == NULL ) { + if ( v == NULL || *(uint8_t *)v != buffer[ sub[0] ] ) { printf( "unexpected result\n" ); break; } } elapsed = tic() - t; - if ( v == NULL || *(uint8_t *)v > 7 ) { + if ( v == NULL || *(uint8_t *)v != buffer[ sub[0] ] ) { printf( "unexpected result\n" ); } free( arr );
4
diff --git a/OpenRobertaParent/pom.xml b/OpenRobertaParent/pom.xml <inceptionYear>2014</inceptionYear> <properties> <!-- the server version history is a comma separated list of all versions BEFORE the actual version. New to old (e.g. 2.1.0,2.0.0,1.9.9,1.9.7) --> - <openRobertaServer.history>2.5.5,2.5.4,2.5.3,2.5.2,2.5.1,2.5.0,2.4.1,2.4.0,2.3.4,2.3.3,2.3.2,2.3.1,2.3.0,2.2.7,2.2.6,2.2.5,2.2.4,2.2.3,2.2.2,2.2.1,2.2.0,2.1.0</openRobertaServer.history> + <openRobertaServer.history>2.6.0,2.5.5,2.5.4,2.5.3,2.5.2,2.5.1,2.5.0,2.4.1,2.4.0,2.3.4,2.3.3,2.3.2,2.3.1,2.3.0,2.2.7,2.2.6,2.2.5,2.2.4,2.2.3,2.2.2,2.2.1,2.2.0,2.1.0</openRobertaServer.history> <!-- UNUSED functionality - the server SHOULD be compatible between(including) the following two versions of software deployed on the ROBOT --> <validversionrange.From>1.4.0</validversionrange.From>
6
diff --git a/articles/quickstart/spa/_includes/_token_renewal_server_setup.md b/articles/quickstart/spa/_includes/_token_renewal_server_setup.md @@ -52,5 +52,5 @@ console.log('Listening on http://localhost:${serverPort}'); </html> ``` ::: note -Add `http://localhost:${serverPort}/silent` to the **Callback URLs** section in your application's client settings. +Add `http://localhost:${serverPort}/silent` to the **Allowed Callback URLs** section in your [client's settings](${manage_url}/#/clients/${account.clientId}/settings). :::
0
diff --git a/src/og/Popup.js b/src/og/Popup.js @@ -5,7 +5,7 @@ import { Vec3 } from './math/Vec3.js'; import { getHTML, parseHTML, createLonLat } from './utils/shared.js'; const TEMPLATE = - `<div class="og-popup"> + `<div class="og-popup {className}"> <div class="og-popup-content-wrapper"> <div class="og-popup-content"></div> </div> @@ -26,11 +26,13 @@ class Popup { this.events = new Events(["open", "close"]); + this._template = getHTML(TEMPLATE, { className: options.className }); + this.el = null; this._title = options.title || ""; - this._content = options.content || ""; + this._content = options.content || null; this._contentEl = null; @@ -60,8 +62,8 @@ class Popup { this.__counter__ = n; } - _renderTemplate(params) { - return parseHTML(getHTML(TEMPLATE, params || {}))[0]; + _renderTemplate() { + return parseHTML(this._template)[0]; } _updatePosition() { @@ -180,14 +182,20 @@ class Popup { return this; } - setContent(html) { - this._content = html; - this._contentEl.innerHTML = html; + setContent(content) { + this.clear(); + this._content = content; + if (typeof content === 'string') { + this._contentEl.innerHTML = content; + } else { + this._contentEl.appendChild(content) + } return this; } clear() { - this.setContent(""); + this._content = null; + this._contentEl.innerHTML = ""; } }
0
diff --git a/.github/Contributing.md b/.github/Contributing.md @@ -3,7 +3,7 @@ This guide will tell you how you can and should contribute to JokeAPI. Not following it might cause me to reject your changes but at the very least we will both lose time. So please read this guide before contributing. Thanks :) -## Menu: +## Table of Contents: - [Submitting or editing jokes](#submitting-or-editing-jokes) - [Contributing to JokeAPI's code](#submitting-code) - [Submitting a translation](#submitting-translations)
10
diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js @@ -4376,6 +4376,33 @@ describe('Test axes', function() { }) .then(done, done.fail); }); + it('should respect axis title placement on relayout', function(done) { + + function getPos(gd, sel) { + return d3Select(gd).select(sel).node().getBoundingClientRect() + } + + function assert_layout() { + var title_top = getPos(gd, '.xtitle').top; + var tick_bottom = getPos(gd, '.xtick').bottom; + expect(title_top).toBeLessThan(tick_bottom); + } + // TODO: This is failing now. + // Is it maybe because there's overlap in these elements because of some padding? + // I'm also not sure that I've accessed the correct properties + var fig = require('@mocks/z-automargin-zoom.json'); + Plotly.newPlot(gd, fig) + .then(function() { + assert_layout(); + }) + .then(function() { + return Plotly.relayout(gd, {'xaxis.range': [6, 14]}); + }) + .then(function() { + assert_layout(); + }) + .then(done, done.fail); + }); }); describe('zeroline visibility logic', function() {
0
diff --git a/articles/custom-domains/index.md b/articles/custom-domains/index.md @@ -18,7 +18,7 @@ You'll need to register and own the domain name to which you're mapping your Aut Currently, the following Auth0 features and flows support use of custom domains: * OAuth 2.0/OIDC-Compliant Flows (all of which make calls to the [`/authorize` endpoint](/api/authentication#authorize-client)) -* Guardian +* Guardian (Version 1.3.3 or later) * Emails -- the links included in the emails will use your custom domain ## How to Configure Custom Domains
0
diff --git a/generate.js b/generate.js @@ -666,6 +666,9 @@ function preprocess() { } else if (file == "index.html") { var filename = "./_site/index.html"; } else if(file == "search.html") { + if (!fs.existsSync("./_site/" + file.replace('.html', ''))) { + fs.mkdirSync("./_site/" + file.replace('.html', '')); + } var filename = "./_site/" + file.replace('.html', '') + "/index.html"; let trustedtable = ""; legiturls.sort(function(a, b) {
1
diff --git a/src/components/EditorWidgets/Markdown/MarkdownControl/VisualEditor/keys.js b/src/components/EditorWidgets/Markdown/MarkdownControl/VisualEditor/keys.js import { Block, Text } from 'slate'; -import { isHotkey } from 'is-hotkey'; +import isHotkey from 'is-hotkey'; export default onKeyDown; @@ -38,19 +38,17 @@ function onKeyDown(event, change) { .collapseToStartOf(newBlock); } - if (isHotkey(`mod+${event.key}`, event)) { - const marks = { - b: 'bold', - i: 'italic', - s: 'strikethrough', - '`': 'code', - }; + const marks = [ + [ 'b', 'bold' ], + [ 'i', 'italic' ], + [ 's', 'strikethrough' ], + [ '`', 'code' ], + ]; - const mark = marks[event.key]; + const [ markKey, markName ] = marks.find(([ key ]) => isHotkey(`mod+${key}`, event)) || []; - if (mark) { + if (markName) { event.preventDefault(); - return change.toggleMark(mark); - } + return change.toggleMark(markName); } };
3
diff --git a/src/runtime-semantics/EvaluateBody.mjs b/src/runtime-semantics/EvaluateBody.mjs @@ -319,7 +319,7 @@ export function* EvaluateBody_FunctionBody(FunctionStatementList, functionObject // GeneratorBody : FunctionBody export function* EvaluateBody_GeneratorBody(GeneratorBody, functionObject, argumentsList) { Q(yield* FunctionDeclarationInstantiation(functionObject, argumentsList)); - const G = Q(OrdinaryCreateFromConstructor(functionObject, new Value('%GeneratorPrototype%'), ['GeneratorState', 'GeneratorContext'])); + const G = Q(OrdinaryCreateFromConstructor(functionObject, '%GeneratorPrototype%', ['GeneratorState', 'GeneratorContext'])); GeneratorStart(G, GeneratorBody); return new ReturnCompletion(G); }
1
diff --git a/extensions/txAdminClient/resource/sv_logger.js b/extensions/txAdminClient/resource/sv_logger.js @@ -4,6 +4,7 @@ const utils = require('./utils.js') //Helpers const log = (x)=>{console.log(x)} const dir = (x)=>{console.dir(x)} +const isUndefined = (x) => { return (typeof x === 'undefined') }; const logError = (err) => { console.log(`[txAdminClient] Error: ${err.message}`); try { @@ -117,6 +118,20 @@ on('playerDropped', (reason) => { }) on('explosionEvent', (source, ev) => { + //Helper function + const isInvalid = (prop, invValue) => { + return (typeof prop == 'undefined' || prop === invValue); + } + //Filtering out bad event calls + if( + isInvalid(ev.damageScale, 0) || + isInvalid(ev.cameraShake, 0) || + isInvalid(ev.isInvisible, true) || + isInvalid(ev.isAudible, false) + ){ + return; + } + //Adding logging data try { logger.r(source, 'explosionEvent', ev); } catch (error) {
8
diff --git a/src/components/molecules/CardLexicon/index.js b/src/components/molecules/CardLexicon/index.js -import { Flex, Heading, Icon, Link, Text } from 'components/atoms' -import { withPrefix } from 'gatsby' +import { Flex, Heading, Icon, Link, Text, Image } from 'components/atoms' import PropTypes from 'prop-types' import React from 'react' import styles from './styles.module.scss' @@ -44,7 +43,7 @@ const CardLexicon = ({ > {image ? ( <Flex className={styles.image} align="center" justify="center"> - <img src={withPrefix(`${imageUrl}`)} /> + <Image src={imageUrl} /> </Flex> ) : ( <Flex
14
diff --git a/docs/rules/no-v-for-template-key.md b/docs/rules/no-v-for-template-key.md @@ -18,8 +18,8 @@ This rule reports the `<template v-for>` elements which have `key` attribute. In Vue.js 2.x, disallows `key` attribute on `<template>` elements. ::: warning Note -Do not use with the [vue/no-v-for-template-key-on-child] rule for Vue.js 3.x. -This rule conflicts with the [vue/no-v-for-template-key-on-child] rule. +This rule is targeted at Vue.js 2.x. +If you are using Vue.js 3.x, enable the [vue/no-v-for-template-key-on-child] rule instead. Don't enable both rules together; they are conflicting. ::: <eslint-code-block :rules="{'vue/no-v-for-template-key': ['error']}">
7
diff --git a/config/initializers/01_app_config.rb b/config/initializers/01_app_config.rb @@ -2,7 +2,7 @@ require_dependency 'carto/configuration' module Cartodb def self.get_config(*config_chain) - current = config + current = Cartodb.config config_chain.each { |config_param| current = current[config_param] if current.nil?
13
diff --git a/app/helpers/account_type_helper.rb b/app/helpers/account_type_helper.rb @@ -42,11 +42,9 @@ module AccountTypeHelper 'BASIC LUMP-SUM ACADEMIC' => 'Professional Non-Profit', 'BASIC LUMP-SUM NON-PROFIT' => 'Professional Non-Profit', 'Enterprise Builder - Annual' => 'Enterprise', - 'Enterprise Builder - On-premises - Annual' => 'Enterprise', 'Cloud Engine & Enterprise Builder - Annual' => 'Enterprise', 'Internal use engine - Cloud - Annual' => 'Enterprise Engine', 'Internal use engine - On-premises - Annual' => 'Enterprise Engine', - 'Internal use engine - On-premises Lite - Annual' => 'Enterprise Engine', 'OEM engine - Cloud - Annual' => 'Enterprise', 'OEM engine - On-premises - Annual' => 'Enterprise', 'PARTNERS' => 'Partner',
2
diff --git a/lib/CT_Modeler.js b/lib/CT_Modeler.js +"use strict"; /////// CHALKTALK MODELER FOR HTML5 /////////////////////////////////////////////////////////////// -if (! window.CT) CT = { }; +if (! window.CT) window.CT = { }; CT.REVISION = "0"; CT.def = function(a, b) { return a !== undefined ? a : b !== undefined ? b : 0; } @@ -400,9 +401,9 @@ CT.Shape.prototype = { }, _drawArrays : function(len) { var eye, fl, gl, matrix, stereo; - fl = this.getScene().getFL(); - iod = this.getScene().getIOD(); - gl = this._gl; + var fl = this.getScene().getFL(); + var iod = this.getScene().getIOD(); + var gl = this._gl; var drawMode = this instanceof CT.ShapePolyhedron ? gl.TRIANGLES : gl.TRIANGLE_STRIP; stereo = this.getScene().getStereo(); gl.uniform1f(this._address('uAspect'), gl.canvas.width / gl.canvas.height);
12
diff --git a/lib/assets/javascripts/new-dashboard/components/Onboarding/OnboardingButton.vue b/lib/assets/javascripts/new-dashboard/components/Onboarding/OnboardingButton.vue @@ -20,13 +20,3 @@ export default { } }; </script> -<style scoped lang="scss"> -@import 'new-dashboard/styles/variables'; - -.button { - &.button--ghost { - margin-right: 36px; - padding: 0; - } -} -</style>
2
diff --git a/converters/toZigbee.js b/converters/toZigbee.js @@ -200,16 +200,19 @@ const converters = { const brightnessValue = message.hasOwnProperty('brightness') ? message.brightness : message.brightness_percent; const hasState = message.hasOwnProperty('state'); + const hasTrasition = message.hasOwnProperty('transition'); const state = hasState ? message.state.toLowerCase() : null; - if (hasState && (state === 'off' || !hasBrightness)) { + if (hasState && (state === 'off' || !hasBrightness) && !hasTrasition) { return converters.on_off.convert('state', state, message, 'set', postfix); } else if (!hasState && hasBrightness && Number(brightnessValue) === 0) { return converters.on_off.convert('state', 'off', message, 'set', postfix); } else { let brightness = 0; - if (message.hasOwnProperty('brightness')) { + if (hasState && !hasBrightness && state == 'on') { + brightness = 255; + } else if (message.hasOwnProperty('brightness')) { brightness = message.brightness; } else if (message.hasOwnProperty('brightness_percent')) { brightness = Math.round(Number(message.brightness_percent) * 2.55).toString();
11
diff --git a/packages/mermaid/src/diagrams/c4/svgDraw.js b/packages/mermaid/src/diagrams/c4/svgDraw.js @@ -234,7 +234,7 @@ export const drawC4Shape = function (elem, c4Shape, conf) { const c4ShapeElem = elem.append('g'); c4ShapeElem.attr('class', 'person-man'); - // <rect fill="#08427B" height="119.2188" rx="2.5" ry="2.5" style="stroke:#073B6F;stroke-width:0.5;" width="110" x="120" y="7"/> + // <rect fill="#08427B" height="119.2188" rx="2.5" ry="2.5" stroke="#073B6F" stroke-width=0.5" width="110" x="120" y="7"/> // draw rect of c4Shape const rect = getNoteRect(); switch (c4Shape.typeC4Shape.text) { @@ -251,9 +251,10 @@ export const drawC4Shape = function (elem, c4Shape, conf) { rect.fill = fillColor; rect.width = c4Shape.width; rect.height = c4Shape.height; - rect.style = 'stroke:' + strokeColor + ';stroke-width:0.5;'; + rect.stroke = strokeColor; rect.rx = 2.5; rect.ry = 2.5; + rect.attrs = { 'stroke-width': 0.5 }; drawRect(c4ShapeElem, rect); break; case 'system_db':
1
diff --git a/packages/insomnia-app/app/ui/components/modals/space-settings-modal.tsx b/packages/insomnia-app/app/ui/components/modals/space-settings-modal.tsx @@ -68,7 +68,7 @@ class SpaceSettingsModal extends PureComponent<Props> { {isRemote && ( <> <HelpTooltip className="space-left"> - To rename a ${strings.remoteSpace.singular.toLowerCase()} ${strings.space.singular.toLowerCase()} please visit <a href="https://app.insomnia.rest/app/teams">the insomnia website.</a> + To rename a {strings.remoteSpace.singular.toLowerCase()} {strings.space.singular.toLowerCase()} please visit <a href="https://app.insomnia.rest/app/teams">the insomnia website.</a> </HelpTooltip> <input disabled readOnly defaultValue={space.name} /> </>
2
diff --git a/src/components/source/mediaSource/SourceDetailsContainer.js b/src/components/source/mediaSource/SourceDetailsContainer.js @@ -100,7 +100,7 @@ class SourceDetailsContainer extends React.Component { if (metadata.length > 0) { metadataContent = ( <ul>{ metadata.map(item => - <li key={`metadata-${item.label}`}> + <li key={`metadata-${item.tag_sets_id}`}> <FormattedMessage {...localMessages.metadataDescription} values={{ label: item.description ? item.description : item.label }} /> </li> )}
4
diff --git a/package.json b/package.json "lodash.throttle": "4.1.1", "namespace-emitter": "1.0.0", "on-load": "3.2.0", - "prettier-bytes": "1.0.3", + "prettier-bytes": "1.0.4", "socket.io-client": "2.0.1", "tus-js-client": "1.4.3", "url-parse": "1.1.9",
3
diff --git a/token-metadata/0x051aAB38D46f6ebB551752831C7280b2b42164Db/metadata.json b/token-metadata/0x051aAB38D46f6ebB551752831C7280b2b42164Db/metadata.json "symbol": "FCN", "address": "0x051aAB38D46f6ebB551752831C7280b2b42164Db", "decimals": 8, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/plugins/submenu/template.js b/src/plugins/submenu/template.js @@ -12,7 +12,9 @@ export default { display: 'submenu', add: function (core, targetElement) { const context = core.context; - context.template = {}; + context.template = { + selectedIndex: -1 + }; /** set submenu */ let templateDiv = this.setSubmenu(core); @@ -55,7 +57,8 @@ export default { e.preventDefault(); e.stopPropagation(); - const temp = this.options.templates[e.target.getAttribute('data-value')]; + this.context.template.selectedIndex = e.target.getAttribute('data-value') * 1; + const temp = this.options.templates[this.context.template.selectedIndex]; if (temp.html) { this.setContents(temp.html);
3
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/assetview/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/assetview/template.vue }, deleteAsset() { $perAdminApp.stateAction('deleteAsset', this.asset.path) - $perAdminApp.getNodeFromView('/state/tools').asset = null }, moveAsset() { let path = this.asset.path
12
diff --git a/examples/wind/package.json b/examples/wind/package.json "babel-polyfill": "^6.16.0", "d3-request": "^1.0.3", "d3-voronoi": "^1.1.1", - "deck.gl": "4.0.6", - "luma.gl": "4.0.0-beta.1", + "deck.gl": ">=4.1.0-beta.6", + "luma.gl": ">=4.0.0-beta.6", "react": "^15.4.1", "react-autobind": "^1.0.6", "react-dom": "^15.4.1", - "react-map-gl": "^1.7.2", + "react-map-gl": "^3.0.0-beta.3", "tween.js": "^16.6.0" }, "devDependencies": {
3
diff --git a/tests/importer_test.py b/tests/importer_test.py @@ -41,7 +41,7 @@ def _do(file_ext, parse): import re fc = srunit.flask_client() - for suffix in '', ' (2)', ' (3)': + for suffix in '', ' 2', ' 3': for f in pkio.sorted_glob(pkunit.data_dir().join('*.' + file_ext)): json, stream = parse(f) sim_type = re.search(r'^([a-z]+)_', f.basename).group(1)
1
diff --git a/docker/README.md b/docker/README.md @@ -21,6 +21,15 @@ After building local image, run node.js-examples inside container: docker run -ti --rm orbit-db npm run examples:node ``` +## Why would you want to run OrbitDB in container? + +Containers are nice because as software execution environments they are: +- Reproducible, which helps testing and development because you can revert container to original state by destroying it and creating it again, +- Isolated, which guarantees that external factors like npm versions, operating system version, or other installed software like native compilers do not affect the execution. + +They also make implementing virtualized networks for testing and benchmarking easier, which may help projects that use OrbitDB. + ## Tested versions -- Docker 1.13.1 (Fedora Linux 27) +- Docker 1.13.1 (Linux 4.17.5-100.fc27.x86_64) +- Docker 18.06.1-ce (Linux 4.17.5-100.fc27.x86_64)
7
diff --git a/js/drawHeatmap.js b/js/drawHeatmap.js @@ -84,12 +84,13 @@ function tallyDomains(d, start, end, domains, acc = _.times(domains.length + 1, return tallyDomains(d, start, end, domains, acc, i + 1); } +var gray = colorHelper.rgb(colorHelper.greyHEX); var regionColorMethods = { // For ordinal scales, subsample by picking a random data point. // Doing slice here to simplify the random selection. We don't have // many subcolumns with ordinal data, so this shouldn't be a performance problem. - 'ordinal': (scale, d, start, end) => _.Let((s = d.slice(start, end)) => - colorHelper.rgb(scale(s[Math.floor(s.length * Math.random())]))), + 'ordinal': (scale, d, start, end) => _.Let((s = d.slice(start, end).filter(x => x)) => + s.length ? colorHelper.rgb(scale(s[Math.floor(s.length * Math.random())])) : gray), // For float scales, compute per-domain average values, and do a weighed mix of the colors. 'default': (scale, d, start, end) => { var domainGroups = tallyDomains(d, start, end, scale.domain()),
9
diff --git a/src/os/annotation/abstractannotationctrl.js b/src/os/annotation/abstractannotationctrl.js @@ -54,10 +54,10 @@ os.annotation.UI_TEMPLATE = '<button class="btn btn-success mr-1" title="Save the name" ' + 'ng-click="ctrl.saveAnnotation()" ' + 'ng-disabled="!ctrl.name">' + - '<i class="fa fa-check"/> OK' + + '<i class="fa fa-check"></i> OK' + '</button>' + '<button class="btn btn-secondary" title="Cancel editing the text box" ng-click="ctrl.cancelEdit()">' + - '<i class="fa fa-ban"/> Cancel' + + '<i class="fa fa-ban"></i> Cancel' + '</button>' + '</div>' + '</div>' + @@ -70,10 +70,10 @@ os.annotation.UI_TEMPLATE = '</tuieditor>' + '<div class="text-right mt-1" ng-if="ctrl.editingDescription">' + '<button class="btn btn-success mr-1" title="Save the text box" ng-click="ctrl.saveAnnotation()">' + - '<i class="fa fa-check"/> OK' + + '<i class="fa fa-check"></i> OK' + '</button>' + '<button class="btn btn-secondary" title="Cancel editing the text box" ng-click="ctrl.cancelEdit()">' + - '<i class="fa fa-ban"/> Cancel' + + '<i class="fa fa-ban"></i> Cancel' + '</button>' + '</div>' + '</div>' +
1
diff --git a/client/GameBoard.jsx b/client/GameBoard.jsx @@ -387,9 +387,6 @@ export class InnerGameBoard extends React.Component { <div className='player-info'> <PlayerStats fate={otherPlayer ? otherPlayer.fate : 0} honor={otherPlayer ? otherPlayer.totalHonor : 0} user={otherPlayer ? otherPlayer.user : null} /> <div className='deck-info'> - <div className='deck-type'> - <CardCollection className='stronghold province' source='stronghold province' cards={[]} topCard={otherPlayer ? otherPlayer.stronghold : undefined} onMouseOver={this.onMouseOver} onMouseOut={this.onMouseOut} disablePopup /> - </div> { otherPlayer ? <div className={'first-player-indicator ' + (!thisPlayer.firstPlayer ? '' : 'hidden')}>First player</div> : ''} </div> </div> @@ -418,9 +415,6 @@ export class InnerGameBoard extends React.Component { honor={thisPlayer.totalHonor} isMe={!this.state.spectating} user={thisPlayer.user} /> <div className='deck-info'> <div className={'first-player-indicator ' + (thisPlayer.firstPlayer ? '' : 'hidden')}>First player</div> - <div className='deck-type'> - <CardCollection className='stronghold province' source='stronghold province' cards={[]} topCard={thisPlayer.stronghold} onMouseOver={this.onMouseOver} onMouseOut={this.onMouseOut} disablePopup onCardClick={this.onFactionCardClick} /> - </div> </div> </div> </div>
2
diff --git a/libs/components/forms/src/app/public/modules/input-box/input-box.component.scss b/libs/components/forms/src/app/public/modules/input-box/input-box.component.scss @@ -62,34 +62,7 @@ sky-input-box { } } -@mixin sky-input-box-modern-border($mode: "light") { - @if $mode == "dark" { - box-shadow: inset 0 0 0 1px $sky-theme-modern-color-gray-70; - } @else { - box-shadow: inset 0 0 0 1px $sky-theme-modern-border-color-neutral-medium; - } -} - -@mixin sky-input-box-modern-border-hover() { - box-shadow: inset 0 0 0 1px $sky-theme-modern-background-color-primary-dark; -} - -@mixin sky-input-box-modern-border-active() { - box-shadow: inset 0 0 0 2px $sky-theme-modern-background-color-primary-dark; -} - -@mixin sky-input-box-modern-border-focus() { - box-shadow: inset 0 0 0 2px $sky-theme-modern-background-color-primary-dark, - $sky-theme-modern-elevation-1-shadow-size - $sky-theme-modern-elevation-1-shadow-color; -} - -@mixin sky-input-box-modern-border-invalid() { - box-shadow: inset 0 0 0 2px $sky-highlight-color-danger; -} - .sky-theme-modern { - /* Styles applied to both enabled and disabled input boxes */ .sky-input-box { .sky-input-box-group { @@ -181,7 +154,7 @@ sky-input-box { .sky-input-box-group-form-control-invalid { .sky-form-group { - @include sky-input-box-modern-border-invalid; + @include sky-theme-modern-border-invalid; color: $sky-background-color-danger-dark; } } @@ -196,14 +169,14 @@ sky-input-box { z-index: 1; .sky-form-group { - @include sky-input-box-modern-border-focus; + @include sky-theme-modern-border-focus; color: $sky-theme-modern-text-color-action-primary; } } .sky-form-group { background-color: $sky-color-white; - @include sky-input-box-modern-border; + @include sky-theme-modern-border; color: $sky-theme-modern-font-data-label-color; flex-wrap: nowrap; margin-bottom: 0; @@ -304,7 +277,7 @@ sky-input-box { z-index: 1; .sky-form-group { - @include sky-input-box-modern-border-hover; + @include sky-theme-modern-border-hover; } } } @@ -312,23 +285,23 @@ sky-input-box { .sky-input-group-btn { .sky-btn { border: none; - @include sky-input-box-modern-border; + @include sky-theme-modern-border; &:hover { - @include sky-input-box-modern-border-hover; + @include sky-theme-modern-border-hover; z-index: 1; } &:active, &:focus { - @include sky-input-box-modern-border-active; + @include sky-theme-modern-border-active; color: $sky-text-color-default; z-index: 2; } &:focus:not(:active) { outline: none; - @include sky-input-box-modern-border-focus; + @include sky-theme-modern-border-focus; } } } @@ -336,13 +309,13 @@ sky-input-box { .sky-input-box-group-form-control:active, .sky-input-box-group-form-control-focus { .sky-form-group { - @include sky-input-box-modern-border-active; + @include sky-theme-modern-border-active; } } .sky-input-box-group-form-control-invalid { .sky-form-group { - @include sky-input-box-modern-border-invalid; + @include sky-theme-modern-border-invalid; color: $sky-background-color-danger-dark; } @@ -363,7 +336,7 @@ sky-input-box { z-index: 1; .sky-form-group { - @include sky-input-box-modern-border-focus; + @include sky-theme-modern-border-focus; color: $sky-theme-modern-text-color-action-primary; } } @@ -391,7 +364,7 @@ sky-input-box { .sky-input-group-btn .sky-btn { background-color: $sky-theme-modern-color-gray-07; border: none; - @include sky-input-box-modern-border; + @include sky-theme-modern-border; opacity: 1; } } @@ -400,7 +373,7 @@ sky-input-box { .sky-input-box { .sky-form-group { background-color: transparent; - @include sky-input-box-modern-border("dark"); + @include sky-theme-modern-border($sky-theme-modern-color-gray-70); color: $sky-theme-modern-mode-dark-font-deemphasized-color; .sky-form-control, @@ -419,13 +392,13 @@ sky-input-box { .sky-input-box-group-form-control-invalid { .sky-form-group { - @include sky-input-box-modern-border-invalid; + @include sky-theme-modern-border-invalid; color: $sky-background-color-danger-dark; } } .sky-input-group-btn .sky-btn { - @include sky-input-box-modern-border("dark"); + @include sky-theme-modern-border($sky-theme-modern-color-gray-70); color: $sky-theme-modern-mode-dark-font-deemphasized-color; &.sky-btn-default {
4
diff --git a/src/functions.js b/src/functions.js @@ -609,14 +609,18 @@ var _ = Mavo.Functions = { between: $.extend((haystack, from, to, tight) => { [haystack, from, to] = [str(haystack), str(from), str(to)]; - var i1 = from? haystack[tight? "lastIndexOf" : "indexOf"](from) : -1; - var i2 = haystack[tight? "indexOf" : "lastIndexOf"](to); + let fromIndex = from? haystack[tight? "lastIndexOf" : "indexOf"](from) : 0; + let toIndex = to? haystack[tight? "indexOf" : "lastIndexOf"](to) : haystack.length; - if (from && i1 === -1 || i2 === -1) { + if (fromIndex === -1 || toIndex === -1) { return ""; } - return haystack.slice(i1 + 1, i2 === -1 || !to? haystack.length : i2); + if (tight && toIndex <= fromIndex){ + return haystack.slice(toIndex + to.length, fromIndex); + } + + return haystack.slice(fromIndex + from.length, toIndex); }, { multiValued: true }),
1
diff --git a/bin/run-bench.js b/bin/run-bench.js @@ -21,7 +21,7 @@ const opts = Object.create(null) process.argv.slice(2).forEach(function forEachFileArg(file) { if (/^--/.test(file)) { - opts[file.substr(2)] = true + opts[file.substring(2)] = true } else if (/[*]/.test(file)) { globs.push(path.join(benchpath, file)) } else if (/\.bench\.js$/.test(file)) { @@ -79,9 +79,7 @@ run() function run() { const printer = opts.json ? new JSONPrinter() : new ConsolePrinter() - a.series( - [ - function resolveGlobs(cb) { + const resolveGlobs = (cb) => { if (!globs.length) { cb() } @@ -101,12 +99,9 @@ function run() { }) cb() }) - }, - function runBenchmarks(cb) { - tests.sort() - a.eachSeries( - tests, - function spawnEachFile(file, spawnCb) { + } + + const spawnEachFile = (file, spawnCb) => { const test = path.relative(benchpath, file) const args = [file] @@ -123,8 +118,9 @@ function run() { } spawnCb() }) - }, - function afterSpawnEachFile(err) { + } + + const afterSpawnEachFile = (err, cb) => { if (err) { console.error('Spawning failed:', err) process.exitCode = -2 @@ -132,11 +128,17 @@ function run() { } cb() } + + const runBenchmarks = (cb) => { + tests.sort() + a.eachSeries( + tests, + (file, spawnCb) => spawnEachFile(file, spawnCb), + (err) => afterSpawnEachFile(err, cb) ) } - ], - () => { + + a.series([(cb) => resolveGlobs(cb), (cb) => runBenchmarks(cb)], () => { printer.finish() - } - ) + }) }
14
diff --git a/.travis.yml b/.travis.yml @@ -37,7 +37,7 @@ jobs: script: - cp ./cli/defaults/* ./site/config/ - | - echo \'{ "sessionKey": "session", "masterPassword": false }\' > ./site/private/authConfig.json + echo '{ "sessionKey": "session", "masterPassword": false }' > ./site/private/authConfig.json # - npm run fix - npm run build - npm start &
1
diff --git a/src/components/comments/container/commentsContainer.js b/src/components/comments/container/commentsContainer.js @@ -52,7 +52,7 @@ const CommentsContainer = ({ const cachedComments = useAppSelector((state) => state.cache.comments); const [lcomments, setLComments] = useState([]); - const [replies, setReplies] = useState(comments); + const [propComments, setPropComments] = useState(comments); const [selectedPermlink, setSelectedPermlink] = useState(''); useEffect(() => { @@ -65,6 +65,8 @@ const CommentsContainer = ({ setLComments(shortedComments); }, [commentCount, selectedFilter]); + + useEffect(() => { const postPath = `${author || ''}/${permlink || ''}`; //this conditional makes sure on targetted already fetched post is updated @@ -162,7 +164,7 @@ const CommentsContainer = ({ const _getComments = async () => { if (isOwnProfile) { fetchPost(); - } else if (author && permlink && !replies) { + } else if (author && permlink && !propComments) { await getComments(author, permlink, name) .then((__comments) => { //TODO: favourable place for merging comment cache @@ -181,7 +183,7 @@ const CommentsContainer = ({ }; const _handleCachedComment = (passedComments = null) => { - const _comments = passedComments || replies || lcomments; + const _comments = passedComments || propComments || lcomments; const postPath = `${author || ''}/${permlink || ''}`; if (cachedComments.has(postPath)) { @@ -215,8 +217,8 @@ const CommentsContainer = ({ console.log('updated comments with cached comment'); if (passedComments) { return newComments; - } else if (replies) { - setReplies(newComments); + } else if (propComments) { + setPropComments(newComments); } else { setLComments(newComments); } @@ -278,8 +280,8 @@ const CommentsContainer = ({ filteredComments = lcomments.filter(_applyFilter); setLComments(filteredComments); } else { - filteredComments = replies.filter(_applyFilter); - setReplies(filteredComments); + filteredComments = propComments.filter(_applyFilter); + setPropComments(filteredComments); } // remove cached entry based on parent @@ -331,7 +333,7 @@ const CommentsContainer = ({ mainAuthor={mainAuthor} commentNumber={commentNumber || 1} commentCount={commentCount} - comments={lcomments.length > 0 ? lcomments : replies} + comments={lcomments.length > 0 ? lcomments : propComments} currentAccountUsername={currentAccount.name} handleOnEditPress={_handleOnEditPress} handleOnReplyPress={_handleOnReplyPress}
10
diff --git a/src/microcosm.js b/src/microcosm.js @@ -125,11 +125,11 @@ inherit(Microcosm, Emitter, { }, on (type, callback, scope) { - let [event, meta] = type.split(':', 2) + let [event, meta=''] = type.split(':', 2) switch (event) { case 'change': - this.changes.on(meta || '', callback, scope) + this.changes.on(meta, callback, scope) break; default: Emitter.prototype.on.apply(this, arguments) @@ -139,7 +139,7 @@ inherit(Microcosm, Emitter, { }, off (type, callback, scope) { - let [event, meta] = type.split(':', 2) + let [event, meta=''] = type.split(':', 2) switch (event) { case 'change':
9
diff --git a/src/technologies.json b/src/technologies.json "icon": "afterpay.png", "js": { "Afterpay": "", - "afterpay_product": "" + "afterpay_product": "", + "AfterpayAttractWidget": "" }, "saas": true, "scripts": [ "portal\\.afterpay\\.com", - "static\\.afterpay\\.com" + "static\\.afterpay\\.com", + "present-afterpay\\.js" ], "website": "https://www.afterpay.com/" }, "description": "TrackJS is an error monitoring agent for production web sites and applications.", "icon": "TrackJs.svg", "js": { - "TrackJs": "" + "TrackJs": "", + "trackJs": "" }, + "scripts": "cdn\\.trackjs\\.com", "website": "http://trackjs.com" }, "Tradedoubler": {
7
diff --git a/src/lib/project-loader-hoc.jsx b/src/lib/project-loader-hoc.jsx import React from 'react'; +import PropTypes from 'prop-types'; import analytics from './analytics'; import log from './log'; import storage from './storage'; /* Higher Order Component to provide behavior for loading projects by id from - * the window's hash (#this part in the url) + * the window's hash (#this part in the url) or by projectId prop passed in from + * the parent (i.e. scratch-www) * @param {React.Component} WrappedComponent component to receive projectData prop * @returns {React.Component} component with project loading behavior */ @@ -45,7 +47,7 @@ const ProjectLoaderHOC = function (WrappedComponent) { return window.location.hash.substring(1); } updateProject () { - let projectId = this.fetchProjectId(); + let projectId = this.props.projectId || this.fetchProjectId(); if (projectId !== this.state.projectId) { if (projectId.length < 1) projectId = 0; this.setState({projectId: projectId}); @@ -61,21 +63,27 @@ const ProjectLoaderHOC = function (WrappedComponent) { } } render () { + const { + projectId, // eslint-disable-line no-unused-vars + ...componentProps + } = this.props; if (!this.state.projectData) return null; return ( <WrappedComponent fetchingProject={this.state.fetchingProject} projectData={this.state.projectData} - {...this.props} + {...componentProps} /> ); } } + ProjectLoaderComponent.propTypes = { + projectId: PropTypes.string + }; return ProjectLoaderComponent; }; - export { ProjectLoaderHOC as default };
9
diff --git a/templates/workflow/contact_form.html b/templates/workflow/contact_form.html <div class="form-group"> <label for="address">Address</label> - <input - type="text" + <textarea id="address" name="address" class="form-control" placeholder="Address" - /> + ></textarea> </div> </div> <div class="modal-footer"> class="btn hikaya-btn-cancel" data-dismiss="modal" > - <i class="fa fa-close"></i> Close + Close </button> <button type="button" class="btn btn-success" id="saveContact"> - <i class="fa fa-save"></i> Save + Save </button> </div> </div>
3
diff --git a/components/evenement/event.js b/components/evenement/event.js @@ -46,9 +46,9 @@ function Event({event, background, isPassed, id, activeEvent, handleOpen}) { <div className='display-info-container'> <button type='button' onClick={() => handleOpen(id)} className='button-container'> {activeEvent === id ? ( - <p>Masquer les informations</p> + <div>Masquer les informations</div> ) : ( - <p>Afficher les informations</p> + <div>Afficher les informations</div> )} <div className='chevron'> {activeEvent === id ? ( @@ -200,10 +200,6 @@ function Event({event, background, isPassed, id, activeEvent, handleOpen}) { display: none; } - p { - font-size: 11px; - } - .instructions { font-weight: bold; font-size: 12px;
7
diff --git a/src/assets/css/suneditor-contents.css b/src/assets/css/suneditor-contents.css border-spacing: 0; border-collapse: collapse; } + +/* RTL - table */ +.sun-editor-editable.se-rtl table { + margin: 0 0 10px auto; +} + .sun-editor-editable table thead { border-bottom: 2px solid #333; }
3
diff --git a/.travis.yml b/.travis.yml @@ -8,6 +8,7 @@ env: global: - REACT_ENV=development - REACT_APP_LOG_LEVEL=debug + - BUNDLESIZE_GITHUB_TOKEN=63f6d1717c6652d63234cf9629977b08f4bac3fd # - REACT_APP_NETWORK_ID=4447 - MNEMONIC="choice congress hobby buddy dutch busy army eager empty solution start grunt" - CI=false
0
diff --git a/README.md b/README.md ![Imgur](http://i.imgur.com/eL73Iit.png) -![Imgur](http://i.imgur.com/neCK8dp.jpg) +![Imgur](https://i.imgur.com/x8fRykW.jpg) # SpaceX Data REST API @@ -30,52 +30,52 @@ GET https://api.spacexdata.com/v1/launches/latest ```json { - "flight_number": 46, + "flight_number": 47, "launch_year": "2017", - "launch_date_utc": "2017-08-24T18:50:00Z", - "launch_date_local": "2017-08-24T11:50:00-07:00", + "launch_date_utc": "2017-09-07T13:50:00Z", + "launch_date_local": "2017-09-07T09:50:00-04:00", "rocket": { "rocket_id": "falcon9", "rocket_name": "Falcon 9", "rocket_type": "FT" }, "telemetry": { - "flight_club": "https://www.flightclub.io/results/?id=a0f660e3-45e6-4aa5-8460-fa641fe9c227&code=FRM5" + "flight_club": "https://www.flightclub.io/results/?id=5f90f4b8-3e5f-41ef-aa1a-4551254b2589&code=OTV5" }, - "core_serial": "B1038", + "core_serial": "B1040", "cap_serial": null, "launch_site": { - "site_id": "vafb_slc_4e", - "site_name": "VAFB SLC 4E" + "site_id": "ksc_lc_39a", + "site_name": "KSC LC 39A" }, "payloads": [ { - "payload_id": "FormoSat-5", + "payload_id": "X-37B OTV-5", "customers": [ - "NSPO (Taiwan)" + "USAF" ], "payload_type": "Satelite", - "payload_mass_kg": 475, - "payload_mass_lbs": 1047, - "orbit": "SSO" + "payload_mass_kg": 4990, + "payload_mass_lbs": 11001, + "orbit": "LEO" } ], "launch_success": true, "reused": false, "land_success": true, - "landing_type": "ASDS", - "landing_vehicle": "JRTI", + "landing_type": "RTLS", + "landing_vehicle": "LZ-1", "links": { - "mission_patch": "http://i.imgur.com/xjtPB9z.png", - "reddit_campaign": "https://www.reddit.com/r/spacex/comments/6o98st", - "reddit_launch": "https://www.reddit.com/r/spacex/comments/6vihsl/welcome_to_the_rspacex_formosat5_official_launch/", - "reddit_recovery": "https://www.reddit.com/r/spacex/comments/6wk653/b1038_recovery_thread/", - "reddit_media": "https://www.reddit.com/r/spacex/comments/6vhwi1/rspacex_formosat5_media_thread_videos_images_gifs/", - "presskit": "http://www.spacex.com/sites/spacex/files/formosat5presskit.pdf", - "article_link": "https://en.wikipedia.org/wiki/FORMOSAT-5", - "video_link": "https://www.youtube.com/watch?v=J4u3ZN2g_MI" + "mission_patch": "https://i.imgur.com/574MjdD.png", + "reddit_campaign": "https://www.reddit.com/r/spacex/comments/6u6q1t/x37b_otv5_launch_campaign_thread/", + "reddit_launch": "https://www.reddit.com/r/spacex/comments/6ygmf1/rspacex_x37b_otv5_official_launch_discussion/", + "reddit_recovery": null, + "reddit_media": "https://www.reddit.com/r/spacex/comments/6yih4g/rspacex_x37b_otv5_media_thread_videos_images_gifs/", + "presskit": "http://forum.nasaspaceflight.com/index.php?action=dlattach;topic=43585.0;attach=1446501;sess=0", + "article_link": "https://en.wikipedia.org/wiki/Boeing_X-37", + "video_link": "https://www.youtube.com/watch?v=9M6Zvi-fFv4" }, - "details": "Formosat-5 is an Earth observation satellite of the Taiwanese space agency. The SHERPA space tug by Spaceflight Industries was removed from the cargo manifest of this mission. The satellite has a mass of only 475 kg." + "details": "Notable because Boeing is the primary contractor of the X-37B, which has until now been launched by ULA, a SpaceX competitor and Boeing partnership. Second flight of the Falcon 9 Block 4 upgrade." } ```
3
diff --git a/README.md b/README.md <h3 align="center">Open Source REST API for rocket, core, capsule, pad, and launch data</h3> <h1 align="center"> -<a href="https://docs.spacexdata.com">Docs</a> - <a href="https://github.com/r-spacex/SpaceX-API/blob/master/docs/clients.md">Clients</a> - <a href="https://github.com/r-spacex/SpaceX-API/blob/master/docs/apps.md">Apps</a> - <a href="https://status.spacexdata.com">Status</a> - <a href="https://backups.jakemeyer.ml">Database</a> +<a href="https://docs.spacexdata.com">Docs</a> - <a href="https://github.com/r-spacex/SpaceX-API/blob/master/docs/clients.md">Clients</a> - <a href="https://github.com/r-spacex/SpaceX-API/blob/master/docs/apps.md">Apps</a> - <a href="https://status.spacexdata.com">Status</a> - <a href="https://backups.jakemeyer.sh">Database</a> <br/> <br/> <a href="https://app.getpostman.com/run-collection/3aeac01a548a87943749"><img src="https://run.pstmn.io/button.svg"></a> @@ -172,6 +172,8 @@ curl -s https://api.spacexdata.com/v3/launches/latest | jq "crew": null } ``` +## Sponsors +[![Studio 3T](https://imgur.com/ZuHz5Fk.png)](https://studio3t.com/) ## Contributions See the [contribution](https://github.com/r-spacex/SpaceX-API/blob/master/CONTRIBUTING.md) guide for detailed steps @@ -186,7 +188,7 @@ Local development info can be found [here](https://github.com/r-spacex/SpaceX-AP * Using [Jest](https://facebook.github.io/jest/) and [Supertest](https://github.com/visionmedia/supertest) for tests * Using [Circle CI](https://circleci.com/) for continuous integration / deployments * All data stored in a [MongoDB Atlas](https://www.mongodb.com/cloud/atlas) 3 node replica set cluster -* Nightly mongodump database backups [here](https://backups.jakemeyer.ml) +* Nightly mongodump database backups [here](https://backups.jakemeyer.sh) ## FAQ's * If you have any questions or corrections, please open an issue and we'll get it merged ASAP
1
diff --git a/core/content/connector.js b/core/content/connector.js @@ -391,7 +391,7 @@ var BaseConnector = window.BaseConnector || function () { album: null, uniqueID: null, duration: null, - currentTime: 0, + currentTime: null, isPlaying: true, trackArt: null };
12
diff --git a/public/javascripts/Admin/src/Admin.js b/public/javascripts/Admin/src/Admin.js @@ -595,6 +595,7 @@ function Admin (_, $, c3, turf) { } } } + } function toggleAuditedStreetLayer() { if (document.getElementById('auditedstreet').checked) { @@ -606,9 +607,13 @@ function Admin (_, $, c3, turf) { // A helper method to make an histogram of an array. function makeAHistogramArray(arrayOfNumbers, numberOfBins) { - arrayOfNumbers.sort(function (a, b) { return a - b; }); + arrayOfNumbers.sort(function (a, b) { + return a - b; + }); var stepSize = arrayOfNumbers[arrayOfNumbers.length - 1] / numberOfBins; - var dividedArray = arrayOfNumbers.map(function (x) { return x / stepSize; }); + var dividedArray = arrayOfNumbers.map(function (x) { + return x / stepSize; + }); var histogram = Array.apply(null, Array(numberOfBins)).map(Number.prototype.valueOf, 0); for (var i = 0; i < dividedArray.length; i++) { var binIndex = Math.floor(dividedArray[i] - 0.0000001); @@ -639,7 +644,9 @@ function Admin (_, $, c3, turf) { initializeAuditedStreets(map); initializeSubmittedLabels(map); initializeAdminGSVLabelView(); - setTimeout(function(){ map.invalidateSize(false); }, 1); + setTimeout(function () { + map.invalidateSize(false); + }, 1); self.mapLoaded = true; } else if (e.target.id == "analytics" && self.graphsLoaded == false) { @@ -651,7 +658,9 @@ function Admin (_, $, c3, turf) { // Group the audit task interaction records by audit_task_id, then go through each group and compute // the duration between the first time stamp and the last time stamp. - var grouped = _.groupBy(data, function (x) { return x.audit_task_id; }); + var grouped = _.groupBy(data, function (x) { + return x.audit_task_id; + }); var completionDurationArray = []; var record1; var record2; @@ -663,20 +672,28 @@ function Admin (_, $, c3, turf) { duration = (record2.timestamp - record1.timestamp) / 1000; // Duration in seconds completionDurationArray.push(duration); } - completionDurationArray.sort(function (a, b) { return a - b; }); + completionDurationArray.sort(function (a, b) { + return a - b; + }); // Bounce rate - var zeros = _.countBy(completionDurationArray, function (x) { return x == 0; }); + var zeros = _.countBy(completionDurationArray, function (x) { + return x == 0; + }); var bounceRate = zeros['true'] / (zeros['true'] + zeros['false']); // Histogram of duration - completionDurationArray = completionDurationArray.filter(function (x) { return x != 0; }); // Remove zeros + completionDurationArray = completionDurationArray.filter(function (x) { + return x != 0; + }); // Remove zeros var numberOfBins = 10; var histogram = makeAHistogramArray(completionDurationArray, numberOfBins); // console.log(histogram); var counts = histogram.histogram; counts.unshift("Count"); - var bins = histogram.histogram.map(function (x, i) { return (i * histogram.stepSize).toFixed(1) + " - " + ((i + 1) * histogram.stepSize).toFixed(1); }); + var bins = histogram.histogram.map(function (x, i) { + return (i * histogram.stepSize).toFixed(1) + " - " + ((i + 1) * histogram.stepSize).toFixed(1); + }); $("#onboarding-bounce-rate").html((bounceRate * 100).toFixed(1) + "%"); @@ -737,11 +754,19 @@ function Admin (_, $, c3, turf) { } missions[printedMissionName].count += 1; } - var arrayOfMissions = Object.keys(missions).map(function (key) { return missions[key]; }); + var arrayOfMissions = Object.keys(missions).map(function (key) { + return missions[key]; + }); arrayOfMissions.sort(function (a, b) { - if (a.count < b.count) { return 1; } - else if (a.count > b.count) { return -1; } - else { return 0; } + if (a.count < b.count) { + return 1; + } + else if (a.count > b.count) { + return -1; + } + else { + return 0; + } }); var missionCountArray = ["Mission Counts"]; @@ -844,8 +869,12 @@ function Admin (_, $, c3, turf) { }); $.getJSON("/contribution/auditCounts/all", function (data) { - var dates = ['Date'].concat(data[0].map(function (x) { return x.date; })), - counts = ['Audit Count'].concat(data[0].map(function (x) { return x.count; })); + var dates = ['Date'].concat(data[0].map(function (x) { + return x.date; + })), + counts = ['Audit Count'].concat(data[0].map(function (x) { + return x.count; + })); var chart = c3.generate({ bindto: "#audit-count-chart", data: { @@ -871,8 +900,12 @@ function Admin (_, $, c3, turf) { }); $.getJSON("/userapi/labelCounts/all", function (data) { - var dates = ['Date'].concat(data[0].map(function (x) { return x.date; })), - counts = ['Label Count'].concat(data[0].map(function (x) { return x.count; })); + var dates = ['Date'].concat(data[0].map(function (x) { + return x.date; + })), + counts = ['Label Count'].concat(data[0].map(function (x) { + return x.count; + })); var chart = c3.generate({ bindto: "#label-count-chart", data: {
1
diff --git a/promise.js b/promise.js @@ -284,7 +284,7 @@ PromisePreparedStatementInfo.prototype.close = function() { ]); (function(functionsToWrap) { - for (const i = 0; functionsToWrap && i < functionsToWrap.length; i++) { + for (var i = 0; functionsToWrap && i < functionsToWrap.length; i++) { const func = functionsToWrap[i]; if (
1
diff --git a/now.json b/now.json "COMPOSE_PASSWORD": "@compose-password", "COMPOSE_URL": "@compose-url", "COMPOSE_PORT": "@compose-port", - "OPTICS_API_KEY": "@optics-api-key" + "OPTICS_API_KEY": "@optics-api-key", + "STRIPE_TOKEN": "@stripe-token" } }
12
diff --git a/src/encoded/loadxl.py b/src/encoded/loadxl.py @@ -598,7 +598,7 @@ PHASE1_PIPELINES = { remove_keys('related_datasets'), ], 'file': [ - remove_keys('paired_end', 'derived_from', 'controlled_by', 'paired_with') + remove_keys('derived_from', 'controlled_by') ], 'analysis_step': [ remove_keys('parents') @@ -666,7 +666,7 @@ PHASE2_PIPELINES = { skip_rows_missing_all_keys('datasets'), ], 'file': [ - skip_rows_missing_all_keys('paired_end', 'derived_from', 'controlled_by', 'paired_with') + skip_rows_missing_all_keys('derived_from', 'controlled_by') ], 'analysis_step': [ skip_rows_missing_all_keys('parents')
2
diff --git a/packages/slackbot-proxy/src/services/RegisterService.ts b/packages/slackbot-proxy/src/services/RegisterService.ts @@ -63,6 +63,8 @@ export class RegisterService implements GrowiCommandProcessor { }; if (isUrl(growiUrl) == null) { + const invalidErrorMsg = 'Please enter a valid URL'; + await client.chat.postEphemeral({ channel, user: payload.user.id, @@ -70,10 +72,10 @@ export class RegisterService implements GrowiCommandProcessor { // refer to https://api.slack.com/methods/chat.postEphemeral#text_usage text: 'Invalid URL', blocks: [ - generateMarkdownSectionBlock('Please enter a valid URL'), + generateMarkdownSectionBlock(invalidErrorMsg), ], }); - return { errors: 'Please enter a valid URL' }; + return { errors: invalidErrorMsg }; } orderRepository.save({
7
diff --git a/lib/index.js b/lib/index.js 'use strict'; const Sharp = require('./constructor'); -[ - 'input', - 'resize', - 'composite', - 'operation', - 'colour', - 'channel', - 'output', - 'utility' -].forEach(function (decorator) { - require('./' + decorator)(Sharp); -}); +require('./input')(Sharp); +require('./resize')(Sharp); +require('./composite')(Sharp); +require('./operation')(Sharp); +require('./colour')(Sharp); +require('./channel')(Sharp); +require('./output')(Sharp); +require('./utility')(Sharp); module.exports = Sharp;
2
diff --git a/lib/carto/visualization_invalidation_service.rb b/lib/carto/visualization_invalidation_service.rb @@ -2,7 +2,7 @@ module Carto class VisualizationInvalidationService def initialize(visualization) @visualization = visualization - @invalidate_affected_maps = false + @invalidate_affected_visualizations = false end def invalidate @@ -12,7 +12,7 @@ module Carto end def with_invalidation_of_affected_visualizations - @invalidate_affected_maps = true + @invalidate_affected_visualizations = true self end
4
diff --git a/includes/Modules/AdSense.php b/includes/Modules/AdSense.php @@ -273,7 +273,7 @@ final class AdSense extends Module $this->get_tag_block_on_consent_attribute() // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ); printf( - '<script>(adsbygoogle = window.adsbygoogle || []).push(JSON.parse(%s));</script>', + '<script>(adsbygoogle = window.adsbygoogle || []).push(%s);</script>', wp_json_encode( array( 'google_ad_client' => $client_id,
2
diff --git a/docs/_api-mocking/mock_matcher.md b/docs/_api-mocking/mock_matcher.md @@ -3,6 +3,9 @@ title: "matcher" position: 1.1 description: |- Criteria for deciding which requests to mock. + + Note that if you use matchers that target anything other than the url string, you may also need to add a `name` to your matcher object so that a) you can add multiple mocks on the same url that differ only in other properties (e.g. query strings or headers) b) if you [inspect](#api-inspectionfundamentals) the result of the fetch calls, retrieving the correct results will be easier. + {: .warning} types: - String - RegExp
7
diff --git a/views/index.hbs b/views/index.hbs <div class="mb-4"> <h3 class="alt-h2 lh-condensed mb-3">Turn conversations into next steps</h3> <p class="preview-subscribe"> - Start work on GitHub, right from your Slack channels with slash commands like <span class="alt-mono-font bg-gray f5">/example</span>. With slash commands, you can: + Start work on GitHub, right from your Slack channels with <span class="alt-mono-font bg-gray f5">/github</span> slash commands. With slash commands, you can: </p> <ul class="ml-3"> <li>Close and reopen existing issues and pull requests</li>
14
diff --git a/assets/js/modules/analytics-4/components/dashboard/ActivationBanner/SetupBanner.js b/assets/js/modules/analytics-4/components/dashboard/ActivationBanner/SetupBanner.js /** * WordPress dependencies */ +import { useCallback, useState } from '@wordpress/element'; import { __, sprintf } from '@wordpress/i18n'; /** @@ -27,10 +28,13 @@ import { __, sprintf } from '@wordpress/i18n'; import Data from 'googlesitekit-data'; import BannerNotification from '../../../../../components/notifications/BannerNotification'; import { Grid, Row, Cell } from '../../../../../material-components'; +import ErrorNotice from '../../../../../components/ErrorNotice'; import { MODULES_ANALYTICS_4 } from '../../../datastore/constants'; -const { useSelect } = Data; +const { useDispatch, useSelect } = Data; export default function SetupBanner( { onCTAClick } ) { + const [ errorNotice, setErrorNotice ] = useState( null ); + const ga4MeasurementID = useSelect( ( select ) => select( MODULES_ANALYTICS_4 ).getMeasurementID() ); @@ -38,6 +42,21 @@ export default function SetupBanner( { onCTAClick } ) { select( MODULES_ANALYTICS_4 ).getExistingTag() ); + const { submitChanges } = useDispatch( MODULES_ANALYTICS_4 ); + + const handleSubmitChanges = useCallback( async () => { + if ( ! ga4MeasurementID ) { + const { error } = await submitChanges(); + + if ( error ) { + setErrorNotice( error ); + return; + } + } + + onCTAClick(); + }, [ ga4MeasurementID, onCTAClick, submitChanges ] ); + let title; let ctaLabel; let footer; @@ -87,11 +106,12 @@ export default function SetupBanner( { onCTAClick } ) { className="googlesitekit-ga4-setup-banner" title={ title } ctaLabel={ ctaLabel } - ctaLink={ onCTAClick ? '#' : null } - onCTAClick={ onCTAClick } + onCTAClick={ handleSubmitChanges } footer={ <p>{ footer }</p> } dismiss={ __( 'Cancel', 'google-site-kit' ) } - /> + > + { errorNotice && <ErrorNotice error={ errorNotice } /> } + </BannerNotification> </Cell> </Row> </Grid>
12
diff --git a/packagescripts/linux/packageLinux.sh b/packagescripts/linux/packageLinux.sh @@ -135,6 +135,9 @@ EOFprerm createDEB() { + # https://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics#s-pkgname + PACKAGENAME="ride-${BASE_VERSION}_${RIDEVERSION}-1_${DEBCPUTYPE}.deb" + # Dependencies tested with Debian 8 and Ubuntu 14.04. fpm \ -f \ @@ -154,22 +157,25 @@ createDEB() { --category "devel" \ --after-install $postinst \ --before-remove $prerm \ - -p "ship/ride-${RIDEVERSION}_linux.${PACKAGECPUTYPE}.deb" \ + -p "ship/${PACKAGENAME}" \ -n "ride-${BASE_VERSION}" \ -v ${RIDEVERSION} \ - -a "${PACKAGECPUTYPE}" \ + -a "${DEBCPUTYPE}" \ --epoch 0 \ --description "Remote IDE for Dyalog APL" \ --deb-priority optional \ --deb-no-default-config-files \ opt usr - command -v lintian > /dev/null && lintian --include-dir packagescripts/linux/lintian --profile ride "ship/ride-${RIDEVERSION}_linux.${PACKAGECPUTYPE}.deb" || true + command -v lintian > /dev/null && lintian --include-dir packagescripts/linux/lintian --profile ride "ship/${PACKAGENAME}" || true } createRPM() { + # http://ftp.rpm.org/max-rpm/ch-rpm-file-format.html + PACKAGENAME="ride-${BASE_VERSION}-${RIDEVERSION}-1.${RPMCPUTYPE}.rpm" + # Dependencies tested with Fedora 25, Centos 7 and openSUSE 13.2. # (NB Electron 2 needs libnss3.so >= 3.26. All these distributions have # it available, but using different package names: "mozilla-nss" for @@ -192,15 +198,15 @@ createRPM() { --category "devel" \ --after-install $postinst \ --before-remove $prerm \ - -p "ship/ride-${RIDEVERSION}_linux.${PACKAGECPUTYPE}.rpm" \ + -p "ship/${PACKAGENAME}" \ -n "ride-${BASE_VERSION}" \ -v ${RIDEVERSION} \ - -a "${PACKAGECPUTYPE}" \ + -a "${RPMCPUTYPE}" \ --epoch 0 \ --description "Remote IDE for Dyalog APL" \ opt usr - command -v rpmlint > /dev/null && rpmlint -f packagescripts/linux/rpmlint/config "ship/ride-${RIDEVERSION}_linux.${PACKAGECPUTYPE}.rpm" || true + command -v rpmlint > /dev/null && rpmlint -f packagescripts/linux/rpmlint/config "ship/${PACKAGENAME}" || true } @@ -217,9 +223,11 @@ for CPUTYPE in x64 armv7l ; do RIDEDIR="_/${BUILDNAME}/${APP_NAME}-linux-${CPUTYPE}" if [ "${CPUTYPE}" = "x64" ] ; then - PACKAGECPUTYPE="amd64" + DEBCPUTYPE="amd64" + RPMCPUTYPE="x86_64" elif [ "${CPUTYPE}" = "armv7l" ] ; then - PACKAGECPUTYPE="armhf" + DEBCPUTYPE="armhf" + RPMCPUTYPE="armhf" fi checkEnvironment
4
diff --git a/packages/housing/package.json b/packages/housing/package.json "postbump": "editme -w" }, "dependencies": { - "@hackoregon/civic-logger": "^1.0.0-alpha.e7d4647a", "@hackoregon/civic-server": "^0.0.10", "@hackoregon/component-library": "^0.2.5", "@hackoregon/webpacker": "^0.1.7",
13
diff --git a/src/components/workshops/Carousel.js b/src/components/workshops/Carousel.js @@ -115,7 +115,6 @@ class CarouselSubmissionForm extends Component { console.log('Clicking Submit Button') const { workshopSlug, userEmail, submissionData } = this.props const { liveUrl, codeUrl } = submissionData - const authToken = storage.get('authToken') api .post(`v1/workshops/${workshopSlug}/projects`, { @@ -126,7 +125,6 @@ class CarouselSubmissionForm extends Component { // screenshot_id: screenshotId }), headers: { 'Content-Type': 'application/json' }, - authToken, }) .then(resp => location.reload()) @@ -147,11 +145,9 @@ class CarouselSubmissionForm extends Component { } render() { - const { workshopSlug, userEmail, submissionData } = this.props + const { workshopSlug, submissionData, authed, authData } = this.props const { liveUrl, codeUrl } = submissionData - const authed = !isEmpty(userEmail) - const onClickSubmitButton = this.onClickSubmitButton.bind(this) const onChangeLiveURL = this.onChangeLiveURL.bind(this) const onChangeCodeURL = this.onChangeCodeURL.bind(this) @@ -226,6 +222,8 @@ class Carousel extends Component { liveUrl: '', codeUrl: '', }, + authed: false, + authData: {}, userEmail: '', liveFrameStatus: 'empty', liveFrameImage: null, @@ -268,6 +266,25 @@ class Carousel extends Component { }) } + componentDidMount() { + const self = this + api + .get(`v1/users/current`) + .then(response => { + console.log( + 'User is authorized! Auth data: ' + JSON.stringify(response) + ) + self.setState({ + authed: true, + authData: response, + }) + }) + .catch(error => { + console.log('User is not authorized! Error: ' + error.toString()) + self.setState({ authed: false, authData: {} }) + }) + } + setLiveFrameStatus(liveFrameStatus) { this.setState({ liveFrameStatus }) } @@ -285,6 +302,8 @@ class Carousel extends Component { projects, submissionData, userEmail, + authed, + authData, liveFrameStatus, liveFrameImage, } = this.state @@ -292,6 +311,7 @@ class Carousel extends Component { const setSubmissionData = this.setSubmissionData.bind(this) const submissionProject = { + user: authData, live_url: submissionData.liveUrl, code_url: submissionData.codeUrl, screenshot: {}, @@ -381,6 +401,8 @@ class Carousel extends Component { </Flex> </Flex> <CarouselSubmissionForm + authed={authed} + authData={authData} userEmail={userEmail} workshopSlug={slug} submissionData={submissionData}
1
diff --git a/healthcheck.js b/healthcheck.js 'use strict' require('dotenv').config() -const http = require('http') +const fetch = require('node-fetch') const signale = require('./src/utils/signale') const checkMongoDB = require('./src/utils/connect') @@ -16,36 +16,26 @@ if (dbUrl == null) { process.exit(1) } -const checkHTTP = (url) => { - return new Promise((resolve, reject) => { - const req = http.request(url, (res) => { - if (res.statusCode < 200 || res.statusCode >= 300) { - return reject(new Error(`Status Code: ${ res.statusCode }`)) - } else { - return resolve(`Conntected to ${ url }`) +const checkHTTP = async (url) => { + return await fetch(url) + .then((res) => { + if (res.status < 200 || res.status >= 300) { + new Error(`Status Code: ${ res.status }`) } - }) - req.on('error', reject) - req.end() + + return res.text() // read the body so it can be garbage collected }) } -const checkAPI = (url) => { - return new Promise((resolve, reject) => { - const req = http.request(url, (res) => { - const data = [] - - res.on('data', (chunk) => { - data.push(chunk) - }) +const checkAPI = async (url) => { + return await fetch(url) + .then((res) => res.json()) + .then(({ status }) => { + if (status !== 'pass') { + throw Error('Apollo server is unhealthy') + } - res.on('end', () => { - const { status } = JSON.parse(Buffer.concat(data).toString()) - return status === 'pass' ? resolve('Apollo server OK') : reject('Apollo server unhealthy') - }) - }) - req.on('error', reject) - req.end() + return 'Apollo server OK' }) }
14
diff --git a/src/web/OutputWaiter.mjs b/src/web/OutputWaiter.mjs @@ -435,7 +435,12 @@ class OutputWaiter { * Saves all outputs to a single archvie file */ saveAllClick() { + const downloadButton = document.getElementById("save-all-to-file"); + if (downloadButton.firstElementChild.innerHTML === "archive") { this.downloadAllFiles(); + } else if (window.confirm("Cancel zipping of outputs?")) { + this.terminateZipWorker(); + } } @@ -448,6 +453,7 @@ class OutputWaiter { const inputNums = Object.keys(this.outputs); for (let i = 0; i < inputNums.length; i++) { const iNum = inputNums[i]; + log.error(this.outputs[iNum]); if (this.outputs[iNum].status !== "baked" || this.outputs[iNum].bakeId !== this.manager.worker.bakeId) { if (window.confirm("Not all outputs have been baked yet. Continue downloading outputs?")) { @@ -458,7 +464,7 @@ class OutputWaiter { } } - const fileName = window.prompt("Please enter a filename: ", "download.zip"); + let fileName = window.prompt("Please enter a filename: ", "download.zip"); if (fileName === null || fileName === "") { // Don't zip the files if there isn't a filename @@ -466,6 +472,10 @@ class OutputWaiter { return; } + if (!fileName.match(/.zip$/)) { + fileName += ".zip"; + } + let fileExt = window.prompt("Please enter a file extension for the files: ", ".txt"); if (fileExt === null) { @@ -479,9 +489,9 @@ class OutputWaiter { const downloadButton = document.getElementById("save-all-to-file"); - downloadButton.disabled = true; downloadButton.classList.add("spin"); - $("[data-toggle='tooltip']").tooltip("hide"); + downloadButton.title = `Downloading ${inputNums.length} files...`; + downloadButton.setAttribute("data-original-title", `Downloading ${inputNums.length} files...`); downloadButton.firstElementChild.innerHTML = "autorenew"; @@ -506,6 +516,15 @@ class OutputWaiter { this.zipWorker.terminate(); this.zipWorker = null; + + const downloadButton = document.getElementById("save-all-to-file"); + + downloadButton.classList.remove("spin"); + downloadButton.title = "Save all outputs to a zip file"; + downloadButton.setAttribute("data-original-title", "Save all outputs to a zip file"); + + downloadButton.firstElementChild.innerHTML = "archive"; + } @@ -529,13 +548,6 @@ class OutputWaiter { FileSaver.saveAs(file, r.filename, false); this.terminateZipWorker(); - - const downloadButton = document.getElementById("save-all-to-file"); - - downloadButton.disabled = false; - downloadButton.classList.remove("spin"); - - downloadButton.firstElementChild.innerHTML = "archive"; }
0
diff --git a/docs/deep/openapi.yml b/docs/deep/openapi.yml @@ -118,13 +118,18 @@ paths: description: the domain of the host tribe server. type: string type: object - /tribes: get: tags: - tribes summary: Add a new channel for tribe in tribe server description: Create new tribe text channel. + parameters: + - description: The tribe ID. + in: path + name: tribe_uuid + required: true + type: string operationId: createChannel responses: '200': @@ -159,17 +164,3 @@ paths: required: true schema: type: string - requestBody: - content: - application/json: - schema: - properties: - tribe_uuid: - description: The id of the tribe to add channel to. - type: string - host: - description: the domain of the host tribe server. - type: string - name: - type: string - type: object
0
diff --git a/src/payment-flows/honey.js b/src/payment-flows/honey.js @@ -74,7 +74,7 @@ function initHoney() : PaymentFlowInstance { } export const honey : PaymentFlow = { - name: 'card_fields', + name: 'honey', setup: setupHoney, isEligible: isHoneyEligible, isPaymentEligible: isHoneyPaymentEligible,
12
diff --git a/README.md b/README.md @@ -42,7 +42,7 @@ Waiting... 3. Head on over to your browser and navigate to `127.0.0.1:9000`. This should display the Project Sidewalk webpage. Note that the first time compilation takes time. ### Additional Tools -1. Importing SQL dump: The Postgres database schema has already been set up in the db docker container. To import production db dump, get the dump as per [instructions](https://github.com/ProjectSidewalk/Instructions), rename the file `dump`, place it in the `db` folder, and run `make import-dump` from the base folder. +1. Importing SQL dump: The Postgres database schema has already been set up in the db docker container. To import production db dump, get the dump as per [instructions](https://github.com/ProjectSidewalk/Instructions), rename the file `dump`, place it in the `db` folder, and run `make import-dump` from the base folder. Note: Restart the server once the dump is complete. 2. SSH into containers: To ssh into the containers, run `make ssh target=[web|db]`. Note that `[web|db]` is not a literal syntax, it specifies which container you would want to ssh into. For example, you can do `make ssh target=web`.
3
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -59,14 +59,12 @@ jobs: path: ./coverage/lcov.info docs: docker: - - image: circleci/node:8 + - image: maxsam4/solidity-kit:0.4.24 steps: - checkout - restore_cache: key: dependency-cache-{{ checksum "package.json" }} - run: yarn install - - run: sudo apt install libz3-dev - - run: sudo npm i truffle -g - run: node --version - run: truffle version - run: npm run docs
3
diff --git a/src/domain/session/room/CallViewModel.ts b/src/domain/session/room/CallViewModel.ts @@ -67,14 +67,6 @@ export class CallViewModel extends ViewModel<Options> { } } - get isCameraMuted(): boolean { - return this.call.muteSettings.camera; - } - - get isMicrophoneMuted(): boolean { - return this.call.muteSettings.microphone; - } - async toggleVideo() { this.call.setMuted(this.call.muteSettings.toggleCamera()); } @@ -95,11 +87,11 @@ class OwnMemberViewModel extends ViewModel<OwnMemberOptions> implements IStreamV } get isCameraMuted(): boolean { - return this.call.muteSettings.camera ?? !!getStreamVideoTrack(this.stream); + return isMuted(this.call.muteSettings.camera, !!getStreamVideoTrack(this.stream)); } get isMicrophoneMuted(): boolean { - return this.call.muteSettings.microphone ?? !!getStreamAudioTrack(this.stream); + return isMuted(this.call.muteSettings.microphone, !!getStreamAudioTrack(this.stream)); } get avatarLetter(): string { @@ -135,11 +127,11 @@ export class CallMemberViewModel extends ViewModel<MemberOptions> implements ISt } get isCameraMuted(): boolean { - return this.member.remoteMuteSettings?.camera ?? !getStreamVideoTrack(this.stream); + return isMuted(this.member.remoteMuteSettings?.camera, !!getStreamVideoTrack(this.stream)); } get isMicrophoneMuted(): boolean { - return this.member.remoteMuteSettings?.microphone ?? !getStreamAudioTrack(this.stream); + return isMuted(this.member.remoteMuteSettings?.microphone, !!getStreamAudioTrack(this.stream)); } get avatarLetter(): string { @@ -178,3 +170,11 @@ export interface IStreamViewModel extends AvatarSource, ViewModel { get isCameraMuted(): boolean; get isMicrophoneMuted(): boolean; } + +function isMuted(muted: boolean | undefined, hasTrack: boolean) { + if (muted) { + return true; + } else { + return !hasTrack; + } +}
1
diff --git a/docs/installation.md b/docs/installation.md @@ -34,6 +34,8 @@ For Windows platforms, this script requires **TLS 1.2 or newer** enabled. ## 3. Bare-Metal Installation +*Note: Currently, table detection requires Python 3.7 and below, as a vital dependency, `camelot-py` has not been ported yet to Python 3.8.* + If the automatic install script is not available for your platform, you can always do a manual installation following this steps: ### 3.1. Installing Dependencies under Linux @@ -53,8 +55,7 @@ Under **Arch** Linux : ```sh pacman -S nodejs npm qpdf imagemagick pdfminer tesseract python-pip -pip install camelot-py[cv] -pip install numpy pillow scikit-image PyPDF2 +pip install camelot-py[cv] pdfminer.six numpy pillow scikit-image PyPDF2 ``` ### 3.2. Installing Dependencies under MacOS
3
diff --git a/app/components/Wallet/PasswordConfirm.jsx b/app/components/Wallet/PasswordConfirm.jsx @@ -3,6 +3,10 @@ import Translate from "react-translate-component"; import Immutable from "immutable"; import cname from "classnames"; import PropTypes from "prop-types"; +import counterpart from "counterpart"; +import {Form} from "bitshares-ui-style-guide"; + +const FormItem = Form.Item; export default class PasswordConfirm extends Component { static propTypes = { @@ -64,12 +68,11 @@ export default class PasswordConfirm extends Component { return ( <div className={cname({"has-error": errors.size})}> - <Translate - component="label" - content={ + <FormItem + label={counterpart.translate( newPassword ? "wallet.new_password" : "wallet.password" - } - /> + )} + > <section> <input type="password" @@ -81,13 +84,13 @@ export default class PasswordConfirm extends Component { tabIndex={tabIndex++} /> </section> + </FormItem> - <Translate - component="label" - content={ + <FormItem + label={counterpart.translate( newPassword ? "wallet.new_confirm" : "wallet.confirm" - } - /> + )} + > <section> <input type="password" @@ -98,6 +101,7 @@ export default class PasswordConfirm extends Component { tabIndex={tabIndex++} /> </section> + </FormItem> <div style={{paddingBottom: 10}}> {errors.get("password_match") ||
14
diff --git a/detox/ios/Detox/GREYIdlingResourcePrettyPrint.m b/detox/ios/Detox/GREYIdlingResourcePrettyPrint.m @@ -188,7 +188,7 @@ NSDictionary* _prettyPrintJSTimerObservationIdlingResource(WXJSTimerObservationI { NSMutableDictionary* rv = [NSMutableDictionary new]; rv[@"javascriptTimerIDs"] = [jsTimer valueForKeyPath:@"observations.objectEnumerator.allObjects.@unionOfObjects.observedTimers"]; - rv[@"prettyPrint"] = [NSString stringWithFormat:@"Javascript Timers Ids: %@", rv[@"javascriptTimerIDs"]]; + rv[@"prettyPrint"] = [NSString stringWithFormat:@"Javascript Timers Ids: %@", [rv[@"javascriptTimerIDs"] componentsJoinedByString:@", "]]; return rv; }
7
diff --git a/installer/installer.sh b/installer/installer.sh @@ -198,6 +198,9 @@ install_mysql() { text_color $GREEN "OK" fi perform_step sed -i 's|max_binlog_size|#max_binlog_size|' /etc/mysql/mysql.conf.d/mysqld.cnf "Setting max log size" + perform_step sed -i '/disable_log_bin/a wait_timeout = 31536000' /etc/mysql/mysql.conf.d/mysqld.cnf "Setting wait timeout" + perform_step sed -i 'sed -i '/disable_log_bin/a interactive_timeout = 31536000' /etc/mysql/mysql.conf.d/mysqld.cnf "Setting interactive timeout" + echo "disable_log_bin" >> /etc/mysql/mysql.conf.d/mysqld.cnf systemctl restart mysql }
3
diff --git a/source/dialog/components/SearchPage.js b/source/dialog/components/SearchPage.js @@ -15,7 +15,7 @@ class SearchPage extends PureComponent { onUnlockAllArchives: PropTypes.func.isRequired }; - componentWillMount() { + componentDidMount() { this.props.onPrepareFirstResults(); }
10
diff --git a/examples/example-plugin-headermenu.html b/examples/example-plugin-headermenu.html }; } + // keep a copy of all column for the array of visible columns + var visibleColumns = columns; var options = { enableColumnReorder: false, headerMenuPlugin.onCommand.subscribe(function(e, args) { if(args.command === "hide") { var columnIndex = grid.getColumnIndex(args.column.id); - var visibleColumns = removeColumnByIndex(columns, columnIndex); + visibleColumns = removeColumnByIndex(visibleColumns, columnIndex); grid.setColumns(visibleColumns); }else if(args.command === "sort-asc" || args.command === "sort-desc") { // get previously sorted columns
1