code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/src/algorithms/utils/jest-extensions/toBeCloseToArraySnapshot.ts b/src/algorithms/utils/jest-extensions/toBeCloseToArraySnapshot.ts @@ -41,7 +41,7 @@ function compare( return { pass, diffs } } -export default function toBeCloseToArraySnapshot(this: Context, received: number[], precision: 2) { +export default function toBeCloseToArraySnapshot(this: Context, received: number[], precision: number = 2) { const state = new State(this) const snapshot = state.getSnapshot()
12
diff --git a/test/jasmine/tests/config_test.js b/test/jasmine/tests/config_test.js @@ -231,16 +231,18 @@ describe('config argument', function() { afterEach(destroyGraphDiv); - it('should not display the edit link by default', function() { + it('should not display the edit link by default', function(done) { Plotly.plot(gd, [], {}) .then(function() { var link = document.getElementsByClassName('js-plot-link-container')[0]; expect(link).toBeUndefined(); - }); + }) + .catch(failTest) + .then(done); }); - it('should display a link when true', function() { + it('should display a link when true', function(done) { Plotly.plot(gd, [], {}, { showLink: true }) .then(function() { var link = document.getElementsByClassName('js-plot-link-container')[0]; @@ -250,7 +252,9 @@ describe('config argument', function() { var bBox = link.getBoundingClientRect(); expect(bBox.width).toBeGreaterThan(0); expect(bBox.height).toBeGreaterThan(0); - }); + }) + .catch(failTest) + .then(done); }); }); @@ -491,7 +495,7 @@ describe('config argument', function() { afterEach(destroyGraphDiv); - it('allows axis range entry by default', function() { + it('allows axis range entry by default', function(done) { Plotly.plot(gd, mockCopy.data, {}) .then(function() { var corner = document.getElementsByClassName('edrag')[0]; @@ -504,10 +508,12 @@ describe('config argument', function() { var editBox = document.getElementsByClassName('plugin-editable editable')[0]; expect(editBox).toBeDefined(); expect(editBox.getAttribute('contenteditable')).toBe('true'); - }); + }) + .catch(failTest) + .then(done); }); - it('disallows axis range entry when disabled', function() { + it('disallows axis range entry when disabled', function(done) { Plotly.plot(gd, mockCopy.data, {}, { showAxisRangeEntryBoxes: false }) .then(function() { var corner = document.getElementsByClassName('edrag')[0]; @@ -519,7 +525,9 @@ describe('config argument', function() { var editBox = document.getElementsByClassName('plugin-editable editable')[0]; expect(editBox).toBeUndefined(); - }); + }) + .catch(failTest) + .then(done); }); });
0
diff --git a/books/views.py b/books/views.py @@ -37,9 +37,12 @@ class BookCopyReturnView(APIView): class BookDetailView(APIView): def get(self, request, id=None): - book = Book.objects.get(pk=id) - serializer_class = BookDetailSerializer - return Response(serializer_class.data) + # book = Book.objects.get(pk=id) + # print BookCopy.objects.filter(book=id).order_by('-id')[:1] + book_copy = BookCopy.objects.filter(book=id).order_by('-id')[1] + print book_copy + serializer = BookCopySerializer(book_copy) + return Response(serializer.data) class UserView(APIView): def get(self, request, format=None):
0
diff --git a/app/scripts/background.js b/app/scripts/background.js @@ -57,7 +57,13 @@ async function loadStateFromPersistence () { // fetch from extension store and merge in data if (localStore.isSupported) { - const localData = await localStore.get() + let localData + try { + localData = await localStore.get() + } catch (err) { + log.error('error fetching state from local store:', err) + } + // TODO: handle possible exceptions (https://developer.chrome.com/apps/runtime#property-lastError) versionedData = Object.keys(localData).length > 0 ? localData : versionedData } @@ -113,7 +119,11 @@ function setupController (initState) { function syncDataWithExtension(state) { if (localStore.isSupported) { - localStore.set(state) // TODO: handle possible exceptions (https://developer.chrome.com/apps/runtime#property-lastError) + try { + localStore.set(state) + } catch (err) { + log.error('error setting state in local store:', err) + } } return state }
9
diff --git a/public/javascripts/Admin/src/Admin.Panorama.js b/public/javascripts/Admin/src/Admin.Panorama.js @@ -67,7 +67,7 @@ function AdminPanorama(svHolder, buttonHolder, admin) { })[0]; self.panoNotAvailableAuditSuggestion = - $("<div id='pano-not-avail-audit'>We suggest that you " + '<a href="">explore the street</a>' + " again! </div>").css({ + $('<div id="pano-not-avail-audit"><a>Explore the street</a> again to use Google\'s newer images!</div>').css({ 'font-size': '85%', 'padding-bottom': '15px' })[0];
3
diff --git a/demo/search.html b/demo/search.html @@ -92,7 +92,7 @@ var editor = CodeMirror.fromTextArea(document.getElementById("code"), { <p>Searching is enabled by including <a href="../addon/search/search.js">addon/search/search.js</a> and <a href="../addon/search/searchcursor.js">addon/search/searchcursor.js</a>. - Jump to line - including <a href="../addon/search/jumpToLine.js">addon/search/jumpToLine.js</a>.</p> + Jump to line - including <a href="../addon/search/jump-to-line.js">addon/search/jump-to-line.js</a>.</p> <p>For good-looking input dialogs, you also want to include <a href="../addon/dialog/dialog.js">addon/dialog/dialog.js</a> and <a href="../addon/dialog/dialog.css">addon/dialog/dialog.css</a>.</p>
1
diff --git a/packages/@uppy/dashboard/src/style.scss b/packages/@uppy/dashboard/src/style.scss @include reset-button; cursor: pointer; color: rgba($color-blue, 0.9); + + &:hover { + text-decoration: underline; + } } .uppy-Dashboard-browse:focus { cursor: pointer; color: $color-blue; + &:hover { + color: darken($color-blue, 10%) + } + .uppy-size--md & { font-size: 14px; } width: 24px; height: 24px; padding: 5px; + + &:hover { + color: darken($color-blue, 10%) + } } .uppy-DashboardContent-addMore svg {
0
diff --git a/datalad_service/tasks/publish.py b/datalad_service/tasks/publish.py @@ -89,12 +89,14 @@ def migrate_to_bucket(store, dataset, realm='PUBLIC'): publish_target(ds, realm.github_remote, tag) @dataset_task -def publish_snapshot(store, dataset, snapshot): +def publish_snapshot(store, dataset, snapshot, realm=None): """Publish a snapshot tag to S3, GitHub or both.""" dataset_id = dataset ds = store.get_dataset(dataset) siblings = ds.siblings() + # if realm parameter is not included, find the best target + if realm is None: # if the dataset has a public sibling, use this as the export target # otherwise, use the private as the export target public_bucket_name = DatasetRealm(DatasetRealm.PUBLIC).s3_remote @@ -103,6 +105,8 @@ def publish_snapshot(store, dataset, snapshot): realm = DatasetRealm(DatasetRealm.PUBLIC) else: realm = DatasetRealm(DatasetRealm.PRIVATE) + else: + realm = DatasetRealm[realm] s3_remote = s3_sibling(ds, siblings) publish_target(ds, realm.s3_remote, snapshot)
11
diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.js b/src/libs/Navigation/AppNavigator/AuthScreens.js @@ -136,7 +136,7 @@ class AuthScreens extends React.Component { fetchCountryCodeByRequestIP(); UnreadIndicatorUpdater.listenForReportChanges(); - if (Permissions.canUseFreePlan(this.props.betas)) { + if (Permissions.canUseFreePlan(this.props.betas) || Permissions.canUseDefaultRooms(this.props.betas)) { getPolicySummaries(); getPolicyList(); }
11
diff --git a/app/components/page-footer/template.hbs b/app/components/page-footer/template.hbs <i class="icon icon-chevron-down"></i> </dd.Trigger> <dd.Content class="text-right"> - <li {{action dd.actions.close}}> + <li {{action dd.actions.close preventDefault=false}}> <a href="{{cli.darwin}}"> {{t "pageFooter.download.mac"}} <i class="icon icon-fw icon-apple"></i> </a> </li> - <li {{action dd.actions.close}}> + <li {{action dd.actions.close preventDefault=false}}> <a href="{{cli.windows}}"> {{t "pageFooter.download.windows"}} <i class="icon icon-fw icon-windows"></i> </a> </li> - <li {{action dd.actions.close}}> + <li {{action dd.actions.close preventDefault=false}}> <a href="{{cli.linux}}"> {{t "pageFooter.download.linux"}} <i class="icon icon-fw icon-linux"></i>
11
diff --git a/lib/assets/javascripts/builder/components/privacy-dropdown/privacy-dropdown-view.js b/lib/assets/javascripts/builder/components/privacy-dropdown/privacy-dropdown-view.js @@ -94,13 +94,15 @@ module.exports = CoreView.extend({ this._showPasswordDialog(); } else { this._onToggleDialogClicked(); - this._setPrivacy(menuItem.get('val')); + this._setPrivacy(menuItem.get('val').toUpperCase()); } }, this); this.add_related_model(this._customCollection); - this.model.on('change:privacy', this._onPrivacyChange, this); + this.listenTo(this.model, 'change:privacy', function () { + this._setPrivacy(this.model.get('privacy')); + }); this.model.on('change:state', this.render, this); this.add_related_model(this.model); // explicit }, @@ -121,10 +123,6 @@ module.exports = CoreView.extend({ }); }, - _setPrivacy: function (privacy) { - this.model.set({privacy: privacy}); - }, - _setPassword: function (password) { if (password !== '') { this._privacyCollection.passwordOption().set({ @@ -138,26 +136,25 @@ module.exports = CoreView.extend({ } }, - _onPrivacyChange: function () { - var newPrivacyStatus = this.model.get('privacy').toUpperCase(); - this.model.set({state: 'loading'}); - + _setPrivacy: function (newPrivacyStatus) { if (this._shouldShowPrivacyWarning(newPrivacyStatus)) { this._checkPrivacyChange( - this._savePrivacy.bind(this), + this._savePrivacy.bind(this, newPrivacyStatus), this._discardPrivacyChange.bind(this) ); } else { - this._savePrivacy(); + this._savePrivacy(newPrivacyStatus); } }, - _savePrivacy: function () { + _savePrivacy: function (privacyStatus) { var self = this; - var privacy = this.model.get('privacy').toUpperCase(); var vis = this._visDefinitionModel; - this._privacyCollection.searchByPrivacy(privacy) + this.model.set({ privacy: privacyStatus }, { silent: true }); + this.model.set({ state: 'loading' }); + + this._privacyCollection.searchByPrivacy(privacyStatus) .saveToVis(vis, { success: function () { self.model.set({state: 'show'}); @@ -185,8 +182,8 @@ module.exports = CoreView.extend({ this.model.set('state', 'show'); }, - _shouldShowPrivacyWarning: function (privacyState) { - var isPubliclyAvailable = VisDefinitionModel.isPubliclyAvailable(privacyState); + _shouldShowPrivacyWarning: function (privacyStatus) { + var isPubliclyAvailable = VisDefinitionModel.isPubliclyAvailable(privacyStatus); if (this._visDefinitionModel.isVisualization()) { return !!this._mapcapsCollection.length && isPubliclyAvailable;
12
diff --git a/app/views/labelingGuideSurfaceProblems.scala.html b/app/views/labelingGuideSurfaceProblems.scala.html <p> A surface problem is a problem that would cause a bumpy or otherwise uncomfortable experience for someone using a wheelchair or other assistive devices. If something on a surface would make - it hard or impossible to cross, it should be labeled as a <i>Surface Problem</i>. + it hard or impossible to cross, it should be labeled as a <i>Surface Problem</i>. For surface + problems that cover a large area, you should place a <i>Surface Problem</i> label at the start + of the problem, and then continue placing labels every few feet (about 1 per panorama) until the + end of the problem. </p> <h3 class="question" id="sidewalk-cracks">How should I label sidewalk cracks?
7
diff --git a/articles/security/bulletins/2019-09-05_scopes.md b/articles/security/bulletins/2019-09-05_scopes.md @@ -15,16 +15,20 @@ useCase: ## Overview -If you use rules to assign scopes to users based on their email address there is a possibility that scopes could be compromised if your application uses multiple connections. +If you: -Auth0 requires that email addresses are unique per connection, but not per application (client). Therefore, if you are using rules to assign scopes based on email address, and if a legitimate user A (`[email protected]`) signs up via one connection, and a malicious user B signs up on a different connection using legitimate user A's email address, then malicious user B will get the same scopes as legitimate user A. This would result in two distinct users with the same email address and same scopes. +* Use rules to assign scopes to users based on their email addresses +* Your application uses multiple connections -## Am I affected? +There is a possibility that your scopes could be compromised. -You are vulnerable if: +## How This Works -* You are using rules to assign scopes to users based on email address **and** -* You are using multiple connections per application +Auth0 requires that email addresses are unique on a per-connection basis. However, there are no limitations on a per-application basis. + +Therefore, it is possible for user A to sign up for the application using one connection *and* user B to sign up for the application with the _same email address_ using a different connection. + +If your rules assign scopes to users based on email address, the second user has now been given the same scopes as the first user, despite being a different individual. ## How do I fix this?
3
diff --git a/apps/verticalface/app.js b/apps/verticalface/app.js @@ -4,28 +4,28 @@ require("Font7x11Numeric7Seg").add(Graphics); function draw() { - var daysOfWeek = ["MON", "TUE","WED","THUR","FRI","SAT","SUN"]; // work out how to display the current time var d = new Date(); var h = d.getHours(), m = d.getMinutes(), day = d.getDate(), month = (d.getMonth()+1), weekDay = d.getDay(); - var hours = h; + var daysOfWeek = ["MON", "TUE","WED","THUR","FRI","SAT","SUN"]; + + var hours = ("0"+h).substr(-2); var mins= ("0"+m).substr(-2); var date = `${daysOfWeek[weekDay]}\n\n${day}/${month}`; // Reset the state of the graphics library g.reset(); - - // draw the current time - g.setFont("7x11Numeric7Seg",8); + // draw the current time (4x size 7 segment) + g.setFont("7x11Numeric7Seg",6); g.setFontAlign(-1,0); // align right bottom - g.drawString(hours, 30, 70, true /*clear background*/); - g.drawString(mins, 30, 170, true /*clear background*/); + g.drawString(hours, 30, 80, true /*clear background*/); + g.drawString(mins, 30, 160, true /*clear background*/); // draw the date (2x size 7 segment) - g.setFont("6x8",2.5); + g.setFont("6x8",2); g.setFontAlign(-1,0); // align right bottom - g.drawString(date, 150, 110, true /*clear background*/); + g.drawString(date, 130, 110, true /*clear background*/); } // Clear the screen once, at startup
3
diff --git a/templates/blockchain-node-view.html b/templates/blockchain-node-view.html .animationFill { -webkit-animation-name: fillGray; - -webkit-animation-duration: 10s; + -webkit-animation-duration: 60s; } .animationStroke { -webkit-animation-name: strokeGray; - -webkit-animation-duration: 10s; + -webkit-animation-duration: 60s; } .link {
12
diff --git a/packages/composer-playground/package.json b/packages/composer-playground/package.json "@types/source-map": "0.5.0", "@types/uglify-js": "2.6.28", "@types/webpack": "2.1.0", + "@types/tapable": "0.2.4", "angular-2-local-storage": "1.0.0", "angular-router-loader": "0.5.0", "angular2-template-loader": "0.6.2",
1
diff --git a/src/encoded/tests/data/inserts/experiment.json b/src/encoded/tests/data/inserts/experiment.json "date_released": "2015-08-31", "accession": "ENCSR123MRN", "uuid": "e828ec88-8f74-437f-8bf7-8535ee34819e", + "experiment_classification": ["functional genomics assay"] }, { "_test": "CRISPR screen test",
0
diff --git a/Guidelines/Build process documentation.md b/Guidelines/Build process documentation.md ### Introduction To make sure all committe it seamlessly and independent from each other onto Github, we need a general-accepted build and deploy process. At the end of this file a BPMN model describing the whole process can be found. <br> +For further information regarding different docker build, pipelines, kubernetes service defintions, monitoring or scaling, please have a look at our [devOps guidelines](https://github.com/openintegrationhub/openintegrationhub/blob/DevOps-Guideline/Guidelines/serviceOperations.md). ### Requirements for mono-repo @@ -41,7 +42,7 @@ In order to be able to build each service independently from each other, the fol - Build script (js) - Deploy as Container (js) - Integration into kubernetes cluster -* Each build needs to be tagged with the service name and version number (link to dev-guide: command for tagging with name and version"-t...") +* Each docker build needs to be tagged with the service name and version number as it can be seen here: [devOps guidelines](https://github.com/openintegrationhub/openintegrationhub/blob/DevOps-Guideline/Guidelines/serviceOperations.md) ### CI/CD process with integrated backlog
1
diff --git a/js/controllers/slidecontent.js b/js/controllers/slidecontent.js @@ -102,7 +102,13 @@ export default class SlideContent { // Images if( backgroundImage ) { - backgroundContent.style.backgroundImage = 'url('+ encodeURI( backgroundImage ) +')'; + let backgroundString = '' + backgroundImage.split(',').forEach(background => { + backgroundString = backgroundString.concat( + 'url(' + encodeURI(background.trim()) + '),' + ); + }) + backgroundContent.style.backgroundImage = backgroundString.substr(0, backgroundString.length - 1); } // Videos else if ( backgroundVideo && !this.Reveal.isSpeakerNotes() ) {
11
diff --git a/src/monitors/monitorROAS.js b/src/monitors/monitorROAS.js @@ -178,7 +178,7 @@ export default class MonitorROAS extends Monitor { const expiring = this.rpki.getExpiringElements(index, vrp, vrp?.expires); for (let item of expiring) { - uniqItems[item.id] = item; + uniqItems[item.hash_id] = item; } } }
4
diff --git a/gulp-tasks/zip.js b/gulp-tasks/zip.js @@ -29,12 +29,6 @@ function generateFilename() { return `google-site-kit.v${ version }:${ branch }@${ shortSha }_${ date }.zip`; } -// eslint-disable-next-line no-console -gulp.task( 'plugin-version', () => console.log( getPluginVersion() ) ); -// eslint-disable-next-line no-console -gulp.task( 'release-filename', () => console.log( generateFilename() ) ); -// eslint-disable-next-line no-console -gulp.task( 'git-data', () => console.log( getRepoInfo() ) ); gulp.task( 'pre-zip', () => { del.sync( [ './release/google-site-kit/**' ] );
2
diff --git a/src/Esquio.UI.Api/Scenarios/Configuration/Details/DetailsConfigurationRequestHandler.cs b/src/Esquio.UI.Api/Scenarios/Configuration/Details/DetailsConfigurationRequestHandler.cs @@ -4,6 +4,7 @@ using Esquio.UI.Api.Infrastructure.Data.Entities; using Esquio.UI.Api.Infrastructure.Metrics; using Esquio.UI.Api.Shared.Models.Configuration.Details; using MediatR; +using MediatR.Pipeline; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using System; @@ -30,6 +31,11 @@ namespace Esquio.UI.Api.Scenarios.Configuration.Details public async Task<DetailsConfigurationResponse> Handle(DetailsConfigurationRequest request, CancellationToken cancellationToken) { + var defaultDeployment = await _storeDbContext + .Deployments + .Where(d => d.ByDefault && d.ProductEntity.Name == request.ProductName) + .SingleOrDefaultAsync(); + var featureEntity = await _storeDbContext .Features .Where(f => f.Name == request.FeatureName && f.ProductEntity.Name == request.ProductName)
12
diff --git a/app/classifier/tasks/drawing-task-details-editor.cjsx b/app/classifier/tasks/drawing-task-details-editor.cjsx @@ -123,7 +123,7 @@ module.exports = createReactClass when 'slider' TaskChoice = require('./slider').default when 'dropdown' - TaskChoice = require './dropdown' + TaskChoice = require('./dropdown').default @props.task.tools[@props.toolIndex].details.push TaskChoice.getDefaultTask() @props.workflow.update 'tasks' @props.workflow.save()
1
diff --git a/src/components/registration/join-flow-steps.jsx b/src/components/registration/join-flow-steps.jsx @@ -4,10 +4,10 @@ const injectIntl = require('react-intl').injectIntl; import {Formik, Form} from 'formik'; /* - * Example step + * Username step */ /* eslint-disable react/prefer-stateless-function, no-useless-constructor */ -class ExampleStep extends React.Component { +class UsernameStep extends React.Component { constructor (props) { super(props); } @@ -27,14 +27,12 @@ class ExampleStep extends React.Component { } /* eslint-enable */ -ExampleStep.propTypes = { +UsernameStep.propTypes = { }; -ExampleStep.defaultProps = { - showPassword: false, - waiting: false +UsernameStep.defaultProps = { }; -const IntlExampleStep = injectIntl(ExampleStep); +const IntlUsernameStep = injectIntl(UsernameStep); -module.exports.ExampleStep = IntlExampleStep; +module.exports.UsernameStep = IntlUsernameStep;
10
diff --git a/app/src/scripts/common/forms/parameter-types/multi.jsx b/app/src/scripts/common/forms/parameter-types/multi.jsx @@ -7,8 +7,6 @@ class MultiType extends React.Component { super(props) const initialState = { counter: 1, - opts: this.props.model.options, - defChecked: this.props.model.defaultChecked, } this.initialState = initialState this.state = initialState @@ -37,13 +35,13 @@ class MultiType extends React.Component { _deleteInput(key) { let counter = this.state.counter let newState = counter - 1 + let opts = this.props.model.options + let value = opts[key] + let checked = this.props.model.defaultChecked - // how in the heck do I do this? - // const {[key], ...newState } = this.state.opts - - delete this.state.opts[key] - if (this.state.defChecked.includes(key)) { - this.state.defChecked.splice(key, 1) + delete opts[key] + if (checked.includes(value)) { + this._remove(checked, value) } // force a new render this.setState({ counter: newState }) @@ -55,24 +53,34 @@ class MultiType extends React.Component { this.setState({ counter: newState }) } - _handleCheck(value) { - let checked = this.state.defChecked - if (!checked.includes(value)) { + _handleCheck(key) { + let value = this.props.model.options[key] + let checked = this.props.model.defaultChecked + + if (!checked.includes(value) && value != '') { checked.push(value) - } else { - checked.splice(value, 1) + } else if (checked.includes(value)) { + this._remove(checked, value) } - // can I use this, or should I switch to a lifecycle method? this.forceUpdate() } _handleArray(key, e) { - this.state.opts[key] = e.target.value + this.props.model.options[key] = e.target.value + } + + _remove(arr, word) { + let found = arr.indexOf(word) + + if (found !== -1) { + arr.splice(found, 1) + found = arr.indexOf(word) + } } // Template Methods ------------------------------------------------------------- _returnInputs() { - let opts = this.state.opts + let opts = this.props.model.options let counter = this.state.counter let type = this.props.type let options = [] @@ -82,7 +90,7 @@ class MultiType extends React.Component { let num = i + 1 key = 'option ' + num // if option# does not exist within the object - if (!this.state.opts[key]) { + if (!opts[key]) { opts[key] = '' } } @@ -93,10 +101,10 @@ class MultiType extends React.Component { <button className="admin-button" key={key + '_button'} - onClick={this._handleCheck.bind(this, opts[key])}> + onClick={this._handleCheck.bind(this, key)}> <i className={ - this.state.defChecked.includes(this.state.opts[key]) + this.props.model.defaultChecked.includes(opts[key]) ? 'fa fa-check-square-o' : 'fa fa-square-o' } @@ -110,7 +118,7 @@ class MultiType extends React.Component { <Input key={key} type="text" - value={this.state.opts[key]} + value={opts[key]} name={key} placeholder={key} onChange={this._handleArray.bind(this, key)}
1
diff --git a/src/client/js/components/RevisionComparer/RevisionComparer.jsx b/src/client/js/components/RevisionComparer/RevisionComparer.jsx @@ -76,24 +76,7 @@ const RevisionComparer = (props) => { > <i className="ti-clipboard"></i> </DropdownToggle> - <DropdownMenu - modifiers={{ - preventOverflow: { boundariesElement: null }, - setMaxHeight: { - enabled: true, - fn: (data) => { - return { - ...data, - styles: { - ...data.styles, - top: '15px', - left: '9px', - }, - }; - }, - }, - }} - > + <DropdownMenu positionFixed right modifiers={{ preventOverflow: { boundariesElement: null } }}> {/* Page path URL */} <CopyToClipboard text={pagePathUrl()}> <DropdownItem className="px-3">
12
diff --git a/tests/qunit/assets/js/util/index.js b/tests/qunit/assets/js/util/index.js @@ -418,7 +418,7 @@ valuesToTest = [ slug: 'pagespeed-insights', status: true, apikey: false, - expected: 'http://sitekit.withgoogle.com/wp-admin/admin.php?page=googlesitekit-module-pagespeed-insights&reAuth=false&slug=pagespeed-insights' + expected: 'http://sitekit.withgoogle.com/wp-admin/admin.php?page=googlesitekit-module-pagespeed-insights&reAuth=true&slug=pagespeed-insights' }, { slug: 'pagespeed-insights', @@ -430,7 +430,7 @@ valuesToTest = [ slug: 'pagespeed-insights', status: true, apikey: 'abc123', - expected: 'http://sitekit.withgoogle.com/wp-admin/admin.php?page=googlesitekit-module-pagespeed-insights&reAuth=false&slug=pagespeed-insights' + expected: 'http://sitekit.withgoogle.com/wp-admin/admin.php?page=googlesitekit-module-pagespeed-insights&reAuth=true&slug=pagespeed-insights' }, ];
3
diff --git a/lib/utility.js b/lib/utility.js @@ -157,14 +157,10 @@ simd(true); * @private */ module.exports = function (Sharp) { - [ - cache, - concurrency, - counters, - simd - ].forEach(function (f) { - Sharp[f.name] = f; - }); + Sharp.cache = cache; + Sharp.concurrency = concurrency; + Sharp.counters = counters; + Sharp.simd = simd; Sharp.format = format; Sharp.interpolators = interpolators; Sharp.versions = versions;
11
diff --git a/engine/components/network/net.io/IgeNetIoClient.js b/engine/components/network/net.io/IgeNetIoClient.js @@ -514,7 +514,6 @@ var IgeNetIoClient = { obj[entityId] = entityData; } else { - // console.log(commandName, entityData); this._networkCommands[commandName](entityData); } }
13
diff --git a/src/components/summary-list/summary-list.yaml b/src/components/summary-list/summary-list.yaml @@ -370,8 +370,8 @@ examples: text: Pneumonoultramicroscopicsilicovolcanoconiosis value: html: | - <p class="govuk-body">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi quis consequat diam. Duis efficitur justo at congue iaculis. Quisque scelerisque ornare justo nec congue. Duis egestas felis nibh, eu cursus metus rutrum eget. In dictum lectus diam, dapibus ullamcorper risus gravida a. Vestibulum tempor mattis sapien, at auctor tellus dignissim non. Praesent dictum felis nec diam tempor, vel lobortis leo ultricies.</p> - <p class="govuk-body">Suspendisse potenti. Aliquam dictum eu ipsum sed facilisis. Maecenas hendrerit est eget ultrices venenatis. Nam ex nisl, venenatis eget molestie quis, hendrerit id tellus. Morbi et posuere ex, vel interdum sapien. Mauris ac mattis turpis, interdum eleifend erat. Morbi eget efficitur lectus. Sed suscipit laoreet ipsum et iaculis. Integer ornare ipsum quis aliquet scelerisque. Proin venenatis dictum suscipit. Nunc tristique, felis quis fermentum rhoncus, tortor augue egestas ipsum, non porttitor nulla odio vitae purus. Interdum et malesuada fames ac ante ipsum primis in faucibus.</p> + <p class="govuk-body">Pneumonoultramicroscopicsilicovolcanoconiosis is a word coined by the president of the National Puzzlers' League as a synonym for the disease known as silicosis. It is the longest word in the English language published in a dictionary, the Oxford English Dictionary, which defines it as "an artificial long word said to mean a lung disease caused by inhaling very fine ash and sand dust."</p> + <p class="govuk-body">Silicosis is a form of occupational lung disease caused by inhalation of crystalline silica dust, and is marked by inflammation and scarring in the form of nodular lesions in the upper lobes of the lungs. It is a type of pneumoconiosis.</p> actions: items: - href: '#'
7
diff --git a/src/core/operations/PublicKey.js b/src/core/operations/PublicKey.js @@ -61,8 +61,6 @@ const PublicKey = { sig = cert.getSignatureValueHex(), sigStr = "", extensions = cert.getInfo().split("X509v3 Extensions:\n")[1].split("signature")[0]; - window.cert = cert; - window.r = r; // Public Key fields pkFields.push({
2
diff --git a/lib/NormalModuleFactory.js b/lib/NormalModuleFactory.js @@ -299,7 +299,6 @@ class NormalModuleFactory extends Tapable { resolveRequestArray(contextInfo, context, array, resolver, callback) { if(array.length === 0) return callback(null, []); asyncLib.map(array, (item, callback) => { - const originLoaderName = item.loader; resolver.resolve(contextInfo, context, item.loader, {}, (err, result) => { if(err && /^[^/]*$/.test(item.loader) && !/-loader$/.test(item.loader)) { return resolver.resolve(contextInfo, context, item.loader + "-loader", {}, err2 => { @@ -318,7 +317,7 @@ class NormalModuleFactory extends Tapable { options: item.options } : undefined; return callback(null, Object.assign({ - origin: originLoaderName + origin: item.loader }, item, identToLoaderRequest(result), optionsOnly)); }); }, callback);
2
diff --git a/src/draggable/list/DragZone.mjs b/src/draggable/list/DragZone.mjs @@ -50,7 +50,8 @@ class DragZone extends BaseDragZone { owner.domListeners = domListeners; store.on({ - load: me.onStoreLoad + load : me.onStoreLoad, + scope: me }); // check if the store is already loaded @@ -59,6 +60,27 @@ class DragZone extends BaseDragZone { } } + /** + * + * @param {Boolean} draggable + */ + adjustListItemCls(draggable) { + let me = this, + owner = me.owner, + store = owner.store, + vdom = owner.vdom, + listItem; + + store.items.forEach((item, index) => { + listItem = vdom.cn[index]; + listItem.cls = listItem.cls || []; + + NeoArray[draggable ? 'add' : 'remove'](listItem.cls, 'neo-draggable'); + }); + + owner.vdom = vdom; + } + /** * * @param {Object} data @@ -105,20 +127,7 @@ class DragZone extends BaseDragZone { * */ onStoreLoad() { - let me = this, - owner = me.owner, - store = owner.store, - vdom = owner.vdom, - listItem; - - store.items.forEach((item, index) => { - listItem = vdom.cn[index]; - listItem.cls = listItem.cls || []; - - NeoArray.add(listItem.cls, 'neo-draggable'); - }); - - owner.vdom = vdom; + this.adjustListItemCls(true); } }
5
diff --git a/lib/assets/javascripts/builder/components/modals/add-basemap/wms/wms-layer-model.js b/lib/assets/javascripts/builder/components/modals/add-basemap/wms/wms-layer-model.js var _ = require('underscore'); var Backbone = require('backbone'); var CustomBaselayerModel = require('builder/data/custom-baselayer-model'); +const DEFAULT_MATRIX_SET = '3857'; /** * Model for an individual WMS/WMTS layer. @@ -149,8 +150,24 @@ module.exports = Backbone.Model.extend({ _xyzURLTemplate: function () { var urlTemplate = this.get('url_template') || ''; - // Convert the proxy template variables to XYZ format, http://foo.com/bar/%%(z)s/%%(x)s/%%(y)s.png" - return urlTemplate.replace(/%%\((\w)\)s/g, '{$1}'); + const matrixSets = this.get('matrix_sets') || []; + + if (matrixSets.length === 0) { + throw new Error('The service does not support any SRS.'); + } + + let matrixSet = DEFAULT_MATRIX_SET; + + if (!matrixSets.includes(DEFAULT_MATRIX_SET)) { + matrixSet = matrixSets[0]; + } + + // Convert the proxy template variables to XYZ format: + // http://foo.com/bar/%(tile_matrix_set)s/%%(z)s/%%(x)s/%%(y)s.png" + urlTemplate = urlTemplate.replace(/%%\((\w)\)s/g, '{$1}'); + urlTemplate = urlTemplate.replace(/%\(tile_matrix_set\)s/g, matrixSet); + + return urlTemplate; }, _setCustomBaselayerModel: function (customBaselayerModel) {
14
diff --git a/js/modules/cohortbuilder/components/CohortExpressionEditorTemplate.html b/js/modules/cohortbuilder/components/CohortExpressionEditorTemplate.html </div> <div class="col-sm-8"> <div class="btn-group pull-right"> - <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">Add Initial Event <span class="caret"></span></button> + <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> Add Initial Event <span class="caret"></span></button> <ul class="dropdown-menu" data-bind="foreach:$component.primaryCriteriaOptions"> <li><a data-bind="html:$component.formatOption($data), click:action" href="#"></a></li> </ul> </td> <td> <div class="btn-group pull-right"> - <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">Add Censoring Event <span class="caret"></span></button> + <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> Add Censoring Event <span class="caret"></span></button> <ul class="dropdown-menu" data-bind="foreach:$component.censorCriteriaOptions"> <li><a data-bind="html:$component.formatOption($data), click:action" href="#"></a></li> </ul>
7
diff --git a/test/test.rb b/test/test.rb @@ -16,6 +16,12 @@ class AppTest < Test::Unit::TestCase @app = SpacexAPI end +########################################## +# Tests all endpoints for correct number +# of JSON responses with predefined +# data + predictible responses +########################################## + def test_home_response get "/" assert last_response.ok? @@ -27,7 +33,6 @@ class AppTest < Test::Unit::TestCase get "/info" assert last_response.ok? data = JSON.parse(last_response.body) - # Test out some data that is unlikely to ever change assert data.count > 0 end @@ -35,15 +40,13 @@ class AppTest < Test::Unit::TestCase get "/launches/latest" assert last_response.ok? data = JSON.parse(last_response.body) - # Test out some data that is unlikely to ever change - assert data.count > 0 + assert data.count == 1 end def test_launchpads_response get "/launchpads" assert last_response.ok? data = JSON.parse(last_response.body) - # Make sure we got at least one launchpad back assert data.count > 0 end @@ -86,7 +89,6 @@ class AppTest < Test::Unit::TestCase get "/launches" assert last_response.ok? data = JSON.parse(last_response.body) - #make sure at least 1 launch is returned assert data.count > 0 end @@ -107,8 +109,8 @@ class AppTest < Test::Unit::TestCase def test_launches_date_response get "/launches?from=2011-01-20&to=2013-05-25" assert last_response.ok? - #data = JSON.parse(last_response.body) - #assert data.count == 3 + data = JSON.parse(last_response.body) + assert data.count == 3 end def test_caps_response
3
diff --git a/_posts/en/newsletters/2021-09-22-newsletter.md b/_posts/en/newsletters/2021-09-22-newsletter.md @@ -159,7 +159,7 @@ BOLTs][bolts repo].* [lnurl pay]: https://github.com/fiatjaf/lnurl-rfc/blob/master/lnurl-pay.md [lightningaddress website]: https://lightningaddress.com/ [lightningaddress diagram]: https://github.com/andrerfneves/lightning-address/blob/master/README.md#tldr -[zbe blog]: https://blog.zebedee.io/browser-extension-for-the-zebedee-wallet/ +[zbe blog]: https://blog.zebedee.io/browser-extension/ [zebedee wallet]: https://zebedee.io/wallet [specter v1.6.0]: https://github.com/cryptoadvance/specter-desktop/releases/tag/v1.6.0 [impervious website]: https://www.impervious.ai/
1
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml @@ -24,11 +24,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + - uses: satackey/[email protected] + # Ignore the failure of a step and avoid terminating the job. + continue-on-error: true + with: + key: ingest-file-docker-cache-${GITHUB_REF}-{hash} + restore-keys: | + ingest-file-docker-cache-${GITHUB_REF}- + ingest-file-docker-cache- - name: Build docker image - env: - DOCKER_BUILDKIT: 1 run: | - docker build --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from alephdata/ingest-file:latest -t alephdata/ingest-file:${GITHUB_SHA} services/ingest-file + docker build -t alephdata/ingest-file:${GITHUB_SHA} services/ingest-file docker tag alephdata/ingest-file:${GITHUB_SHA} alephdata/ingest-file:latest - name: Push docker image (hash) run: |
4
diff --git a/sparta.go b/sparta.go @@ -1015,20 +1015,20 @@ func ensureValidSignature(lambdaName string, handlerSymbol interface{}) error { return fmt.Errorf("Failed to confirm function type: %#v", handlerSymbol) } if handlerType.Kind() != reflect.Func { - return fmt.Errorf("Lambda handler %s kind %s is not %s", + return fmt.Errorf("Lambda function (%s) is a %s type, not a %s type", lambdaName, handlerType.Kind(), reflect.Func) } argumentErr := validateArguments(handlerType) if argumentErr != nil { - return fmt.Errorf("Invalid lambda definition: %s. Error: %s", + return fmt.Errorf("Lambda function (%s) has invalid formal arguments: %s", lambdaName, argumentErr) } returnsErr := validateReturns(handlerType) if returnsErr != nil { - return fmt.Errorf("Invalid lambda returns: %s. Error: %s", + return fmt.Errorf("Lambda function (%s) has invalid returns: %s", lambdaName, returnsErr) } @@ -1051,7 +1051,7 @@ func validateSpartaPreconditions(lambdaAWSInfos []*LambdaAWSInfo, } // 0 - check for invalid signatures for _, eachLambda := range lambdaAWSInfos { - validationErr := ensureValidSignature(eachLambda.lambdaFunctionName(), + validationErr := ensureValidSignature(eachLambda.userSuppliedFunctionName, eachLambda.handlerSymbol) if validationErr != nil { errorText = append(errorText, validationErr.Error())
7
diff --git a/src/pages/index.js b/src/pages/index.js @@ -40,18 +40,17 @@ const CTA = styled(Button.withComponent(Link)).attrs(cta)` ` const StartCTA = styled(Button.withComponent(Link)).attrs({ ...cta, - inverted: true, fontSize: [4, 5], px: [4, 5] })` - background-image: ${theme.gradient('orange.5', 'red.5')}; + background-image: ${theme.gradient('green.5', 'blue.6')}; ` const CommunityCTA = styled(Button.withComponent(Link)).attrs({ ...cta, fontSize: [4, 5], px: [4, 5] })` - background-image: ${theme.gradient('orange.5', 'fuschia.5')}; + background-image: ${theme.gradient('fuschia.3', 'fuschia.5')}; ` const promoBG = css`
7
diff --git a/data/home_info.rb b/data/home_info.rb $home_info = { - description: 'JSON API for data about company info, vehicles, launch sites, and launch data.', + description: 'REST API for data about company info, vehicles, launch sites, and launch data.', project_link: 'https://github.com/jakewmeyer/SpaceX-API', - version: '1.0.4', + organization_link: 'https://github.com/r-spacex', + version: '1.1.0', author: 'Jake Meyer' }
3
diff --git a/client/src/components/layouts/LayoutPhoenix/style.scss b/client/src/components/layouts/LayoutPhoenix/style.scss @@ -208,6 +208,14 @@ $alertp: #4d1980; left: 5vw; top: 90px; } + &.viewscreen { + .card-area { + width: 100vw; + height: 100vh; + left: 0; + top: 0; + } + } .widgets { left: 180px; bottom: 10px;
1
diff --git a/node-binance-api.js b/node-binance-api.js @@ -1658,7 +1658,12 @@ let api = function Binance() { if (substring === 'BTC') return 'BTC'; else if (substring === 'ETH') return 'ETH'; else if (substring === 'BNB') return 'BNB'; + else if (substring === 'XRP') return 'XRP'; + else if (substring === 'PAX') return 'PAX'; else if (symbol.substr(-4) === 'USDT') return 'USDT'; + else if (symbol.substr(-4) === 'USDC') return 'USDC'; + else if (symbol.substr(-4) === 'USDS') return 'USDS'; + else if (symbol.substr(-4) === 'TUSD') return 'TUSD'; }, websockets: { /**
3
diff --git a/packages/vulcan-forms/lib/components/Form.jsx b/packages/vulcan-forms/lib/components/Form.jsx @@ -811,7 +811,7 @@ class SmartForm extends Component { // if there's a submit callback, run it if (this.props.submitCallback) { - data = this.props.submitCallback(data); + data = this.props.submitCallback(data) || data; } if (this.getFormType() === 'new') {
11
diff --git a/source/application/WindowController.js b/source/application/WindowController.js /*global window, document, localStorage */ import { Class } from '../core/Core.js'; +import { Obj } from '../foundation/Object.js'; +import { invokeInNextEventLoop } from '../foundation/RunLoop.js'; + import '../core/Date.js'; // For Date#format import '../core/String.js'; // For String#escapeHTML -import { Obj } from '../foundation/Object.js'; import /* { on, invokeInRunLoop } from */ '../foundation/Decorators.js'; -import { invokeAfterDelay, cancel } from '../foundation/RunLoop.js'; /** Class: O.WindowController @@ -78,8 +79,6 @@ const WindowController = Class({ this.isFocused = document.hasFocus ? document.hasFocus() : true; this._seenWCs = {}; - this._checkTimeout = null; - this._pingTimeout = null; WindowController.parent.constructor.apply(this, arguments); @@ -88,6 +87,8 @@ const WindowController = Class({ window.addEventListener('focus', this, false); window.addEventListener('blur', this, false); + invokeInNextEventLoop(this.checkMaster, this); + this.start(); }, @@ -104,23 +105,9 @@ const WindowController = Class({ start() { this.broadcast('wc:hello'); - - const check = () => { - this.checkMaster(); - this._checkTimeout = invokeAfterDelay(check, 9000); - }; - const ping = () => { - this.sendPing(); - this._pingTimeout = invokeAfterDelay(ping, 17000); - }; - this._checkTimeout = invokeAfterDelay(check, 500); - this._pingTimeout = invokeAfterDelay(ping, 17000); }, end(broadcastKey) { - cancel(this._pingTimeout); - cancel(this._checkTimeout); - this.broadcast('wc:bye', null, broadcastKey); }, @@ -167,7 +154,6 @@ const WindowController = Class({ Method (protected): O.WindowController#sendPing Sends a ping to let other windows know about the existence of this one. - Automatically called periodically. */ sendPing() { this.broadcast('wc:ping'); @@ -183,11 +169,7 @@ const WindowController = Class({ */ _hello: function (event) { this._ping(event); - if (event.wcId < this.id) { - this.checkMaster(); - } else { this.sendPing(); - } }.on('wc:hello'), /** @@ -199,7 +181,11 @@ const WindowController = Class({ event - {Event} An event object containing the window id. */ _ping: function (event) { - this._seenWCs[event.wcId] = Date.now(); + const wcId = event.wcId; + this._seenWCs[wcId] = true; + if (wcId < this.id) { + this.checkMaster(); + } }.on('wc:ping'), /** @@ -222,14 +208,10 @@ const WindowController = Class({ property based on whether this window has the lowest ordered id. */ checkMaster() { - const now = Date.now(); let isMaster = true; - const seenWCs = this._seenWCs; const ourId = this.id; - for (const id in seenWCs) { - if (seenWCs[id] + 23000 < now) { - delete seenWCs[id]; - } else if (id < ourId) { + for (const id in this._seenWCs) { + if (id < ourId) { isMaster = false; } }
2
diff --git a/src/drawNode.js b/src/drawNode.js @@ -20,6 +20,13 @@ var defaultNodeAttributes = { fontcolor: "#000000", }; +var multiFillShapes = [ + 'fivepoverhang', + 'threepoverhang', + 'noverhang', + 'assembly', +]; + function completeAttributes(attributes, defaultAttributes=defaultNodeAttributes) { for (var attribute in defaultAttributes) { if (attributes[attribute] === undefined) { @@ -116,7 +123,7 @@ function _updateNode(node, x, y, width, height, shape, nodeId, attributes, optio var bbox = svgElements.node().getBBox(); bbox.cx = bbox.x + bbox.width / 2; bbox.cy = bbox.y + bbox.height / 2; - svgElements.each(function() { + svgElements.each(function(data, index) { var svgElement = d3.select(this); if (svgElement.attr("cx")) { svgElement @@ -131,10 +138,12 @@ function _updateNode(node, x, y, width, height, shape, nodeId, attributes, optio svgElement .attr("d", translateDAttribute(d, x - bbox.cx, y - bbox.cy)); } + if (index == 0 || multiFillShapes.includes(shape)) { svgElement .attr("fill", fill) .attr("stroke", stroke) .attr("strokeWidth", strokeWidth); + } }); if (shape != 'point') {
9
diff --git a/README.md b/README.md ![Imgur](http://i.imgur.com/eL73Iit.png) -![Imgur](https://i.imgur.com/l0y1El1.jpg) +![Imgur](https://i.imgur.com/ZTCR8rg.jpg) # SpaceX Data REST API @@ -29,11 +29,11 @@ GET https://api.spacexdata.com/v2/launches/latest?pretty ```json { - "flight_number": 56, + "flight_number": 57, "launch_year": "2018", - "launch_date_unix": 1519309020, - "launch_date_utc": "2018-02-22T14:17:00Z", - "launch_date_local": "2018-02-22T06:17:00-08:00", + "launch_date_unix": 1520314380, + "launch_date_utc": "2018-03-06T05:33:00Z", + "launch_date_local": "2018-03-06T00:33:00-05:00", "rocket": { "rocket_id": "falcon9", "rocket_name": "Falcon 9", @@ -41,10 +41,10 @@ GET https://api.spacexdata.com/v2/launches/latest?pretty "first_stage": { "cores": [ { - "core_serial": "B1038", - "flight": 2, - "block": 3, - "reused": true, + "core_serial": "B1044", + "flight": 1, + "block": 4, + "reused": false, "land_success": null, "landing_type": null, "landing_vehicle": null @@ -54,57 +54,46 @@ GET https://api.spacexdata.com/v2/launches/latest?pretty "second_stage": { "payloads": [ { - "payload_id": "Paz", - "reused": false, - "customers": [ - "HisdeSAT" - ], - "payload_type": "Satellite", - "payload_mass_kg": 1350, - "payload_mass_lbs": 2976.2, - "orbit": "LEO" - }, - { - "payload_id": "Microsat-2a, -2b", + "payload_id": "Hispasat 30W-6", "reused": false, "customers": [ - "SpaceX" + "Hispasat" ], "payload_type": "Satellite", - "payload_mass_kg": 800, - "payload_mass_lbs": 1763.7, - "orbit": "LEO" + "payload_mass_kg": 6092, + "payload_mass_lbs": 13430.6, + "orbit": "GTO" } ] } }, "telemetry": { - "flight_club": "https://www.flightclub.io/result?code=PAZ1" + "flight_club": null }, "reuse": { - "core": true, + "core": false, "side_core1": false, "side_core2": false, "fairings": false, "capsule": false }, "launch_site": { - "site_id": "vafb_slc_4e", - "site_name": "VAFB SLC 4E", - "site_name_long": "Vandenberg Air Force Base Space Launch Complex 4E" + "site_id": "ccafs_slc_40", + "site_name": "CCAFS SLC 40", + "site_name_long": "Cape Canaveral Air Force Station Space Launch Complex 40" }, "launch_success": true, "links": { - "mission_patch": "https://i.imgur.com/6iUJpn4.png", - "reddit_campaign": "https://www.reddit.com/r/spacex/comments/7qnflk/paz_microsat2a_2b_launch_campaign_thread/", - "reddit_launch": "https://www.reddit.com/r/spacex/comments/7y0grt/rspacex_paz_official_launch_discussion_updates/", + "mission_patch": "https://i.imgur.com/CLrl3eg.png", + "reddit_campaign": "https://www.reddit.com/r/spacex/comments/7r5pyn/hispasat_30w6_launch_campaign_thread/", + "reddit_launch": "https://www.reddit.com/r/spacex/comments/7r5pyn/hispasat_30w6_launch_campaign_thread/", "reddit_recovery": null, - "reddit_media": "https://www.reddit.com/r/spacex/comments/7zdvop/rspacex_paz_media_thread_videos_images_gifs/", - "presskit": "http://www.spacex.com/sites/spacex/files/paz_press_kit_2.21.pdf", - "article_link": "https://spaceflightnow.com/2018/02/22/recycled-spacex-rocket-boosts-paz-radar-satellite-first-starlink-testbeds-into-orbit/", - "video_link": "https://www.youtube.com/watch?v=-p-PToD2URA" + "reddit_media": "https://www.reddit.com/r/spacex/comments/825asx/rspacex_hispasat_30w6_media_thread_videos_images/", + "presskit": "http://www.spacex.com/sites/spacex/files/hispasat30w6_presskit.pdf", + "article_link": null, + "video_link": "https://www.youtube.com/watch?v=Kpfrp-GMKKM" }, - "details": "First launch attempt on the 21st scrubbed due to upper level winds. Will also carry two SpaceX test satellites for the upcoming Starlink constellation." + "details": "Launched with landing legs and titanium grid fins. Did not attempt a landing due to 'unfavorable weather conditions in the recovery area'." } ```
3
diff --git a/userscript.user.js b/userscript.user.js @@ -87177,8 +87177,10 @@ var $$IMU_EXPORT$$; if (domain === "images.parler.com") { // https://images.parler.com/c57e1807949d4c269a5dbcf7d311f702_32 // https://images.parler.com/c57e1807949d4c269a5dbcf7d311f702 -- 512x512 + // https://images.parler.com/ca7aba70bd07480eb20e60060352550e_1200 -- 1200x400 + // https://images.parler.com/ca7aba70bd07480eb20e60060352550e -- 1800x600 // https://images.parler.com/zRnzfRm8n2fts1CnquH5XTAw4YayAjNn -- 1200x1200 (atob is garbage) - return src.replace(/^([a-z]+:\/\/[^/]+\/+[a-f0-9]{10,})_(?:32|64|128|256)(?:[?#].*)?$/, "$1"); + return src.replace(/^([a-z]+:\/\/[^/]+\/+[a-f0-9]{10,})_[0-9]+(?:[?#].*)?$/, "$1"); } if (domain_nowww === "blaqsbi.com") {
7
diff --git a/.travis.yml b/.travis.yml @@ -9,9 +9,8 @@ script: - npm run build deploy: provider: s3 - access_key_id: AKIAJ3BXGWRIMZSIHD6Q - secret_access_key: - secure: p8ZhgpK9CT9dghR3qVfeXg8XujnsvBjTmKIcHqExbJWjoVAnn/nWM1esB4FpBQyK1EWtmQuvRH6Uj+TpVEHpBac13KZCXWomUXb1n/zB6ciwqrUqGxLQ/KDs0guqpY5HkYwzw58Ey6UFo6xYRNYryzD+zth5jsUE5IaUCSjSqmHNMPcwgo6U6XPV92XkQTsqZhSrH+ko4b4fYCoey2n4ZG/ebDfXAxfy3nZtjafTuUvwBQ+wIzlaOoctZxG/EHEOB6BGKe6UlOHe03CMd8ed2UVJ2WzLVciKdHcKB8LTKPL4s5oOYDaycqj9rwSLrfEq8Rcg6FdOrpQp2cfi7fo1Boj3LjY965OpkW6yOsz7rG4MXzjqPUNhXfDkMHa6PswsfLDIDCldluyKxZvUlgYXMXKhGllXbjU+9YHWgXp3CvfZVRnw8Q95MAEXchJAFAIThALXQYEfKn27eO1HfS9NeafABom12cGfYeb2hBhBUJJeQe8shQ+fXfa/+Qx6hE/yDTOk4p5rlo2yPqhdkG+yDz/cA0ujnHiDBl3Gfc86+sPzuOPZC8z1CGiK0vhTu0Pu9/vgmybIJf5hDhfSvZzDuaHa50sRDYyU2Sa8t4nfrhIunI3az9YVjuUXM4E6GtCGCv+e9V5hhSLb3BhmpN4ltRr0JhzQ6Lk4FgvlDwlABZ8= + access_key_id: "${AWS_ACCESS_KEY_ID}" + secret_access_key: "${AWS_SECRET_ACCESS_KEY}" region: us-west-2 bucket: hacko-housing-staging skip_cleanup: true
14
diff --git a/examples/basics/u.orca b/examples/basics/u.orca ......................................... .#.UCLID.#............................... ......................................... -.Cg.U8..............Cg5U8................ +.Cg1U8..............Cg5U8................ .4.X................4.X*................. ..#*.......*.......#.#*.*.**.**.*.**.*#.. -.Cg.U8..............Cg6U8................ +.Cg2U8..............Cg6U8................ .4.X................4.X*................. ..#*.......*.......#.#*.***.***.***.**#.. -.Cg.U8..............Cg7U8................ +.Cg3U8..............Cg7U8................ .4.X................4.X*................. ..#*.......*.......#.#*.*******.******#.. -.Cg.U8..............Cg8U8................ +.Cg4U8..............Cg8U8................ .4.X................4.X*................. ..#*.......*.......#.#****************#.. .........................................
7
diff --git a/bl-kernel/boot/admin.php b/bl-kernel/boot/admin.php @@ -23,14 +23,6 @@ $layout['controller'] = $layout['view'] = $layout['slug'] = empty($explodeSlug[0 unset($explodeSlug[0]); $layout['parameters'] = implode('/', $explodeSlug); -// Disable Magic Quotes. -// Thanks, http://stackoverflow.com/questions/517008/how-to-turn-off-magic-quotes-on-shared-hosting -if ( in_array( strtolower( ini_get( 'magic_quotes_gpc' ) ), array( '1', 'on' ) ) ) { - $_POST = array_map('stripslashes', $_POST); - $_GET = array_map('stripslashes', $_GET); - $_COOKIE = array_map('stripslashes', $_COOKIE); -} - // Boot plugins rules include(PATH_RULES.'60.plugins.php');
2
diff --git a/assets/js/components/notifications/ZeroDataStateNotifications.stories.js b/assets/js/components/notifications/ZeroDataStateNotifications.stories.js @@ -189,13 +189,6 @@ ZeroDataState.args = { export default { title: 'Components/ZeroDataStateNotifications', decorators: [ - ( Story ) => ( - <div className="googlesitekit-widget"> - <div className="googlesitekit-widget__body"> - <Story /> - </div> - </div> - ), ( Story, { args } ) => { const setupRegistry = ( registry ) => { provideSiteInfo( registry );
2
diff --git a/userscript.user.js b/userscript.user.js @@ -5389,6 +5389,51 @@ var $$IMU_EXPORT$$; return possible_infos; }; + common_functions.get_twitter_video_tweet = function(el, window) { + if (el.tagName !== "VIDEO" || !el.src.match(/^blob:/)) + return null; + + var poster = el.poster; + if (!poster) + return null; + + // note that the numbers here corresponds to the media id, not the tweet id, so it can't be used + if (!/\/ext_tw_video_thumb\/+[0-9]+\/+pu\/+img\//.test(poster)) + return null; + + var href = window.location.href; + + // embedded video + var match = href.match(/\/i\/+videos\/+tweet\/+([0-9]+)(?:[?#].*)?$/); + if (match) { + return { + id: match[1] + }; + } + + var currentel = el; + while ((currentel = currentel.parentElement)) { + if (currentel.tagName === "ARTICLE") { + var our_as = currentel.querySelectorAll("a[role='link']"); + for (var i = 0; i < our_as.length; i++) { + var our_href = our_as[i].href; + if (!our_href) + continue; + + var match = our_href.match(/\/status\/+([0-9]+)(?:\/+(?:retweets|likes)|\/*)(?:[?#].*)?$/); + if (match) { + return { + id: match[1] + }; + } + } + break; + } + } + + return null; + }; + var get_domain_nosub = function(domain) { var domain_nosub = domain.replace(/^.*\.([^.]*\.[^.]*)$/, "$1"); if (domain_nosub.match(/^co\.[a-z]{2}$/) || @@ -5407,7 +5452,7 @@ var $$IMU_EXPORT$$; if (!src) return src; - if (!src.match(/^(?:https?|x-raw-image):\/\//) && !src.match(/^data:/)) + if (!src.match(/^(?:https?|x-raw-image):\/\//) && !src.match(/^(?:data|blob):/)) return src; var origsrc = src; @@ -5418,7 +5463,7 @@ var $$IMU_EXPORT$$; var domain; var port; - if (!src.match(/^(?:data|x-raw-image):/)) { + if (!src.match(/^(?:data|x-raw-image|blob):/)) { // to prevent infinite loops if (src.length >= 65535) return src; @@ -53617,6 +53662,15 @@ var $$IMU_EXPORT$$; } } + return "default"; + }, + element_ok: function(el) { + var tweet = common_functions.get_twitter_video_tweet(el, window); + // disable for now as this method needs to be implemented + if (tweet && false) { + return true; + } + return "default"; } }; @@ -59236,20 +59290,27 @@ var $$IMU_EXPORT$$; function find_source(els) { //console_log(els); - var result = _find_source(els); + var ok_els = []; + var result = _find_source(els, ok_els); if (_nir_debug_) - console_log("find_source: result =", result); + console_log("find_source: result =", result, "ok_els =", ok_els); if (!result) return result; + var ret_bad = function() { + if (ok_els.length > 0) + return ok_els[0]; + return null; + }; + if (result.el) { if (is_popup_el(result.el)) { if (_nir_debug_) console_log("find_source: result.el is popup el", result.el); - return null; + return ret_bad(); } } @@ -59257,7 +59318,7 @@ var $$IMU_EXPORT$$; if (_nir_debug_) console_log("find_source: invalid src", result); - return null; + return ret_bad(); } var thresh = parseInt(settings.mouseover_minimum_size); @@ -59270,13 +59331,13 @@ var $$IMU_EXPORT$$; if (_nir_debug_) console_log("find_source: result size is too small"); - return null; + return ret_bad(); } return result; } - function _find_source(els) { + function _find_source(els, ok_els) { // resetpopups() is already called in trigger_popup() /*if (popups_active) return;*/ @@ -59287,7 +59348,6 @@ var $$IMU_EXPORT$$; var sources = {}; //var picture_sources = {}; var links = {}; - var ok_els = []; var layers = []; var id = 0; @@ -59468,6 +59528,18 @@ var $$IMU_EXPORT$$; } function addTagElement(el, layer) { + if (helpers && helpers.element_ok) { + if (helpers.element_ok(el) === true) { + ok_els.push({ + count: 1, + src: null, + el: el, + id: id++, + is_ok_el: true + }); + } + } + if (el.tagName === "PICTURE" || el.tagName === "VIDEO") { for (var i = 0; i < el.children.length; i++) { addElement(el.children[i], layer); @@ -59578,18 +59650,6 @@ var $$IMU_EXPORT$$; } } - if (helpers && helpers.element_ok) { - if (helpers.element_ok(el) === true) { - ok_els.push({ - count: 1, - src: null, - el: el, - id: id++, - is_ok_el: true - }); - } - } - if (el.tagName === "A") { var src = el.href; links[src] = { @@ -59702,6 +59762,12 @@ var $$IMU_EXPORT$$; } for (var source in sources) { + for (var i = 0; i < ok_els.length; i++) { + if (sources[source].el === ok_els[i].el) { + ok_els[i] = sources[source]; + } + } + if (activesources.indexOf(source) < 0) delete sources[source]; }
7
diff --git a/app/models/carto/api_key.rb b/app/models/carto/api_key.rb @@ -54,7 +54,7 @@ class Carto::ApiKey < ActiveRecord::Base self.db_role = Carto::DB::Sanitize.sanitize_identifier("#{user.username}_role_#{SecureRandom.hex}") end while self.class.exists?(db_role: db_role) self.db_password = SecureRandom.hex(PASSWORD_LENGTH / 2) unless db_password - connection.run( + user_db_connection.run( "create role \"#{db_role}\" NOSUPERUSER NOCREATEDB NOINHERIT LOGIN ENCRYPTED PASSWORD '#{db_password}'" ) end @@ -68,7 +68,7 @@ class Carto::ApiKey < ActiveRecord::Base read_schemas << tp.schema unless read_schemas.include?(tp.schema) write_schemas << tp.schema unless write_schemas.include?(tp.schema) || !tp.write? unless tp.permissions.empty? - connection.run( + user_db_connection.run( "grant #{tp.permissions.join(', ')} on table \"#{tp.schema}\".\"#{tp.name}\" to \"#{db_role}\"" ) end @@ -93,8 +93,8 @@ class Carto::ApiKey < ActiveRecord::Base redis_client.hmset(redis_key, redis_hash_as_array) end - def connection - @connection ||= ::User[user.id].in_database(as: :superuser) + def user_db_connection + @user_db_connection ||= ::User[user.id].in_database(as: :superuser) end def redis_hash_as_array @@ -110,33 +110,33 @@ class Carto::ApiKey < ActiveRecord::Base def revoke_privileges affected_schemas ||= [] affected_schemas.each do |schema| - connection.run( + user_db_connection.run( "revoke all privileges on all tables in schema \"#{schema}\" from \"#{db_role}\"" ) - connection.run( + user_db_connection.run( "revoke usage on schema \"#{schema}\" from \"#{db_role}\"" ) - connection.run( + user_db_connection.run( "revoke execute on all functions in schema \"#{schema}\" from \"#{db_role}\"" ) - connection.run( + user_db_connection.run( "revoke usage, select on all sequences in schema \"#{schema}\" from \"#{db_role}\"" ) end - connection.run("revoke usage on schema \"cartodb\" from \"#{db_role}\"") - connection.run("revoke execute on all functions in schema \"cartodb\" from \"#{db_role}\"") + user_db_connection.run("revoke usage on schema \"cartodb\" from \"#{db_role}\"") + user_db_connection.run("revoke execute on all functions in schema \"cartodb\" from \"#{db_role}\"") end def grant_usage_for_cartodb - connection.run("grant usage on schema \"cartodb\" to \"#{db_role}\"") - connection.run("grant execute on all functions in schema \"cartodb\" to \"#{db_role}\"") + user_db_connection.run("grant usage on schema \"cartodb\" to \"#{db_role}\"") + user_db_connection.run("grant execute on all functions in schema \"cartodb\" to \"#{db_role}\"") end def grant_aux_write_privileges_for_schema(s) - connection.run("grant usage on schema \"#{s}\" to \"#{db_role}\"") - connection.run("grant execute on all functions in schema \"#{s}\" to \"#{db_role}\"") - connection.run("grant usage, select on all sequences in schema \"#{s}\" TO \"#{db_role}\"") - connection.run("grant select on \"#{s}\".\"raster_columns\" TO \"#{db_role}\"") - connection.run("grant select on \"#{s}\".\"raster_overviews\" TO \"#{db_role}\"") + user_db_connection.run("grant usage on schema \"#{s}\" to \"#{db_role}\"") + user_db_connection.run("grant execute on all functions in schema \"#{s}\" to \"#{db_role}\"") + user_db_connection.run("grant usage, select on all sequences in schema \"#{s}\" TO \"#{db_role}\"") + user_db_connection.run("grant select on \"#{s}\".\"raster_columns\" TO \"#{db_role}\"") + user_db_connection.run("grant select on \"#{s}\".\"raster_overviews\" TO \"#{db_role}\"") end end
10
diff --git a/test/unit/service-broker.spec.js b/test/unit/service-broker.spec.js @@ -413,9 +413,19 @@ describe("Test broker.registerAction", () => { describe("Test broker.wrapAction", () => { let broker = new ServiceBroker(); - //broker.wrapContextInvoke = jest.fn(); - it("should run middlewares & call wrapContextInvoke method", () => { + it("should not change handler if no middlewares", () => { + let origHandler = jest.fn(); + let action = { + name: "list", + handler: origHandler + }; + + broker.wrapAction(action); + expect(action.handler).toBe(origHandler); + }); + + it("should wrap middlewares", () => { let action = { name: "list", handler: jest.fn() @@ -433,14 +443,12 @@ describe("Test broker.wrapAction", () => { expect(mw2).toHaveBeenCalledTimes(1); expect(mw2).toHaveBeenCalledWith(action.handler, action); - - // expect(broker.wrapContextInvoke).toHaveBeenCalledTimes(1); - // expect(broker.wrapContextInvoke).toHaveBeenCalledWith(action, action.handler); }); }); -describe.skip("Test broker.wrapContextInvoke", () => { +/* +describe("Test broker.wrapContextInvoke", () => { describe("Test wrapping", () => { let broker = new ServiceBroker(); @@ -581,37 +589,32 @@ describe.skip("Test broker.wrapContextInvoke", () => { }); }); +*/ -describe.skip("Test broker.deregisterAction", () => { +describe("Test broker.deregisterAction", () => { let broker = new ServiceBroker(); + broker.serviceRegistry.deregister = jest.fn(() => true); + let action = { name: "list" }; - broker.registerAction(null, action); - broker.registerAction("server-2", action); + it("should call deregister of serviceRegistry without nodeID", () => { + broker.deregisterAction(null, action); - it("should contains 2 items", () => { - let item = broker.getAction("list"); - expect(item).toBeDefined(); - expect(item.list.length).toBe(2); + expect(broker.serviceRegistry.deregister).toHaveBeenCalledTimes(1); + expect(broker.serviceRegistry.deregister).toHaveBeenCalledWith(null, action); }); - it("should remove action from list by nodeID", () => { - broker.deregisterAction(action); - let item = broker.getAction("list"); - expect(item).toBeDefined(); - expect(item.list.length).toBe(1); - expect(item.get().nodeID).toBe("server-2"); - }); + it("should call deregister of serviceRegistry with nodeID", () => { + broker.serviceRegistry.deregister.mockClear(); + + broker.deregisterAction("server-2", action); - it("should remove last item from list", () => { - broker.deregisterAction(action, "server-2"); - let item = broker.getAction("list"); - expect(item).toBeDefined(); - expect(item.list.length).toBe(0); + expect(broker.serviceRegistry.deregister).toHaveBeenCalledTimes(1); + expect(broker.serviceRegistry.deregister).toHaveBeenCalledWith("server-2", action); }); }); @@ -1259,35 +1262,3 @@ describe("Test broker.emitLocal", () => { }); }); -describe.skip("Test broker.getLocalActions", () => { - let broker = new ServiceBroker(); - - broker.createService({ - name: "posts", - version: 2, - actions: { - list: { - cache: true, - params: { limit: "number" }, - handler: jest.fn() - } - } - }); - - broker.loadService("./test/services/math.service.js"); - broker.registerAction("server-2", { name: "remote.action" }); - - it("should returns with local action list", () => { - let res = broker.getLocalActions(); - - expect(Object.keys(res).length).toBe(5); - - expect(res["v2.posts.list"].name).toBe("v2.posts.list"); - expect(res["v2.posts.list"].version).toBe(2); - expect(res["v2.posts.list"].cache).toBe(true); - expect(res["v2.posts.list"].params).toEqual({ limit: "number" }); - expect(res["v2.posts.list"].handler).toBeUndefined(); - expect(res["v2.posts.list"].service).toBeUndefined(); - - }); -});
3
diff --git a/pages/docs/manual/latest/polymorphic-variant.mdx b/pages/docs/manual/latest/polymorphic-variant.mdx @@ -261,7 +261,7 @@ let other = [#Green] let all = Belt.Array.concat(colors, other) ``` -As you can see in the example above, the type checker doesn't really care about the fact that `color` is not annotated as an `array<rgb>` type. +As you can see in the example above, the type checker doesn't really care about the fact that `other` is not annotated as an `array<rgb>` type. As soon as it hits the first constraint (`Belt.Array.concat`), it will try to check if the structural types of `colors` and `other` unify into one poly variant type. If there's a mismatch, you will get an error on the `Belt.Array.concat` call.
1
diff --git a/src/components/dashboard/__tests__/SendLinkSummary.js b/src/components/dashboard/__tests__/SendLinkSummary.js import React from 'react' +import renderer from 'react-test-renderer' +import GDStore from '../../../lib/undux/GDStore' // Note: test renderer must be required after react-native. -import renderer from 'react-test-renderer' -import { getWebRouterComponentWithMocks } from './__util__' +import { getWebRouterComponentWithMocks, getWebRouterComponentWithRoutes } from './__util__' +const { Container } = GDStore describe('SendLinkSummary', () => { it('renders without errors', () => { - const SendLinkSummary = getWebRouterComponentWithMocks('../SendLinkSummary') - const tree = renderer.create(<SendLinkSummary />) + const SendLinkSummary = getWebRouterComponentWithRoutes('../SendLinkSummary') + const tree = renderer.create( + <Container> + <SendLinkSummary /> + </Container> + ) expect(tree.toJSON()).toBeTruthy() })
0
diff --git a/src/viewport.js b/src/viewport.js @@ -485,10 +485,9 @@ $.Viewport.prototype = { * @function * @private * @param {OpenSeadragon.Rect} bounds - * @param {Boolean} immediately * @return {OpenSeadragon.Rect} constrained bounds. */ - _applyBoundaryConstraints: function(bounds, immediately) { + _applyBoundaryConstraints: function(bounds) { var newBounds = new $.Rect( bounds.x, bounds.y, @@ -531,6 +530,16 @@ $.Viewport.prototype = { } } + return newBounds; + }, + + /** + * @function + * @private + * @param {Boolean} [immediately=false] - whether the function that triggered this event was + * called with the "immediately" flag + */ + _raiseConstraintsEvent: function(immediately) { if (this.viewer) { /** * Raised when the viewport constraints are applied (see {@link OpenSeadragon.Viewport#applyConstraints}). @@ -539,15 +548,14 @@ $.Viewport.prototype = { * @memberof OpenSeadragon.Viewer * @type {object} * @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised this event. - * @property {Boolean} immediately + * @property {Boolean} immediately - whether the function that triggered this event was + * called with the "immediately" flag * @property {?Object} userData - Arbitrary subscriber-defined object. */ this.viewer.raiseEvent( 'constrain', { immediately: immediately }); } - - return newBounds; }, /** @@ -567,8 +575,8 @@ $.Viewport.prototype = { } var bounds = this.getBoundsNoRotate(); - var constrainedBounds = this._applyBoundaryConstraints( - bounds, immediately); + var constrainedBounds = this._applyBoundaryConstraints(bounds); + this._raiseConstraintsEvent(immediately); if (bounds.x !== constrainedBounds.x || bounds.y !== constrainedBounds.y || @@ -638,8 +646,9 @@ $.Viewport.prototype = { newBounds.y = center.y - newBounds.height / 2; } - newBounds = this._applyBoundaryConstraints(newBounds, immediately); + newBounds = this._applyBoundaryConstraints(newBounds); center = newBounds.getCenter(); + this._raiseConstraintsEvent(immediately); } if (immediately) { @@ -736,17 +745,16 @@ $.Viewport.prototype = { /** * Returns bounds taking constraints into account * Added to improve constrained panning - * @param {Boolean} immediately + * @param {Boolean} current - Pass true for the current location; defaults to false (target location). * @return {OpenSeadragon.Viewport} Chainable. */ - // Added to improve constrained panning - getConstrainedBounds: function( immediately ) { + getConstrainedBounds: function(current) { var bounds, constrainedBounds; - bounds = this.getBounds(); + bounds = this.getBounds(current); - constrainedBounds = this._applyBoundaryConstraints( bounds, immediately ); + constrainedBounds = this._applyBoundaryConstraints(bounds); return constrainedBounds; },
3
diff --git a/app/models/cluster.js b/app/models/cluster.js @@ -85,7 +85,7 @@ export default Resource.extend(Grafana, ResourceUsage, { return get(this, 'configName') === 'rancherKubernetesEngineConfig'; }), - provider: computed('configName', '[email protected]', function() { + provider: computed('configName', '[email protected]', 'driver', function() { const pools = get(this, 'nodePools') || []; const firstTemplate = get(pools, 'firstObject.nodeTemplate'); @@ -121,7 +121,7 @@ export default Resource.extend(Grafana, ResourceUsage, { } }), - displayProvider: computed('configName', '[email protected]', 'intl.locale', function() { + displayProvider: computed('configName', '[email protected]', 'intl.locale', 'driver', function() { const intl = get(this, 'intl'); const pools = get(this, 'nodePools'); const firstPool = (pools || []).objectAt(0);
3
diff --git a/app/models/carto/api_key.rb b/app/models/carto/api_key.rb @@ -12,7 +12,6 @@ module Carto class TablePermissions WRITE_PERMISSIONS = ['insert', 'update', 'delete', 'truncate'].freeze - ALLOWED_PERMISSIONS = (WRITE_PERMISSIONS + ['select', 'references', 'trigger']).freeze attr_reader :schema, :name, :permissions @@ -31,13 +30,12 @@ module Carto end def merge!(permissions) - permissions = permissions.map { |p| p.downcase if ALLOWED_PERMISSIONS.include?(p.downcase) } - @permissions += permissions.reject { |p| @permissions.include?(p) } + @permissions += permissions.map { |p| p.downcase unless @permissions.include?(p) } end def add!(permission) down_permission = permission.downcase - if [email protected]?(down_permission) && ALLOWED_PERMISSIONS.include?(down_permission) + if [email protected]?(down_permission) @permissions << down_permission end end
2
diff --git a/src/components/listgroup/ListGroupItem.js b/src/components/listgroup/ListGroupItem.js @@ -22,10 +22,11 @@ class ListGroupItem extends React.Component { } render() { - let {children, href, ...otherProps} = this.props; + let {children, ...otherProps} = this.props; + const {href, disabled} = this.props; otherProps[href ? 'preOnClick' : 'onClick'] = this.incrementClicks; return ( - <RSListGroupItem tag={href ? Link : 'li'} href={href} {...otherProps}> + <RSListGroupItem tag={href && !disabled ? Link : 'li'} {...otherProps}> {children} </RSListGroupItem> );
11
diff --git a/src/sdk/p2p/peerconnection-channel.js b/src/sdk/p2p/peerconnection-channel.js @@ -266,9 +266,7 @@ class P2PPeerConnectionChannel extends EventDispatcher { mediaStreamId); continue; } - const publishedStreams = Array.from(this._publishedStreams, x => x[ - 0]); - const targetStream = publishedStreams.find( + const targetStream = this._pendingStreams.find( element => element.mediaStream.id == mediaStreamId); const publication = new Publication( id, () => {
1
diff --git a/articles/history-of-nodejs/history-of-nodejs.md b/articles/history-of-nodejs/history-of-nodejs.md @@ -21,7 +21,7 @@ You may have probably heard of it or worked with it (or have been curious about [source](https://www.simform.com/nodejs-use-case/) ### What is Node.js? -![Nodejs logo](https://drive.google.com/uc?export=view&id=13udtjL4Xz5YICREzII6hcHiv0xM8a_ds) +![Nodejs logo](/engineering-education/history-of-nodejs/Nodejs logo.png) [source](https://www.w3schools.com/nodejs/nodejs_intro.asp) Node.js is a runtime server environment that uses JavaScript on the server side and [asynchronous programming!](https://www.w3schools.com/nodejs/nodejs_intro.asp). It is a free and open source technology that runs on various platforms (Mac OS X, Unix, Windows, etc.) @@ -46,7 +46,7 @@ In 2009, [Ryan Dahl wrote Node.js](https://en.wikipedia.org/wiki/Node.js). At fi The limited possibilities of the most popular web server at the time ["Apache HTTP Server"](https://en.wikipedia.org/wiki/Apache_HTTP_Server) in 2009 was criticized by Dahl, because it had to handle a lot of connections concurrently (up to 10,000 and more) and when there was any blocked code in the entire process or an implied multiple execution stacks in cases of simultaneous connections, it would lead to issues, and this situation had to be resolved by creating code through [sequential programming](https://en.wikipedia.org/wiki/Sequential_algorithm). On November 8th 2009 at the inaugural European [JSConf the Node.js project was first demonstrated by Dahl](https://en.wikipedia.org/wiki/Node.js). Node.js is a combination the V8 JavaScript chrome engine, a low-level I/O API and an event loop. ### The Evolution -![Nodejs image evolution](https://drive.google.com/uc?export=view&id=1e91n-R0-W4S6UOffTNTnBdqyJKNqzOXN) +![Nodejs image evolution](/engineering-education/history-of-nodejs/node img 1.png) [source](https://nodejs.dev/learn/a-brief-history-of-nodejs) As many browsers competed to offer users the best performance, JavaScript engines also became considerably better. Major browsers worked hard on finding ways to make JavaScript run quicker and offer better support for it. @@ -102,7 +102,7 @@ Web frameworks was developed by the [Nodejs open-source community](https://nodej - [GitHub](https://github.com/) (owned by Microsoft) acquired [NPM](https://www.npmjs.com/) ### Setting up Node.js -![Nodejs image setup](https://drive.google.com/uc?export=view&id=1zipo06_A5JDQiS3hfqO9TEiIjfwf5eua) +![Nodejs image setup](/engineering-education/history-of-nodejs/blogimage-nodejs.png) [source](https://www.w3schools.com/nodejs/nodejs_get_started.asp) **First of all download Node.js** @@ -134,7 +134,7 @@ Depending on your operating system, opening the command line interface on your c After opening the 'cmd' go to the folder containing the file *"myfirstfile.js"*, the command line interface window should look something like this: -`[C:\Users\YourName>](https://www.w3schools.com/nodejs/nodejs_get_started.asp)` +`[C:\Users\YourName>]` **Initiating Node.js File** Before any action can take place, the file created must be initiated by Node.js @@ -159,7 +159,7 @@ Corporate users of Node.js software include GoDaddy, Groupon, IBM, LinkedIn, Mic **Node.js use case Infographic** -![Use cases image](https://drive.google.com/uc?export=view&id=1ozdLz3cdQkas1VttuwkXX4BkY3ehoxuJ) +![Use cases image](/engineering-education/history-of-nodejs/Node.js-use-case-Inforgraphic.png) [source](https://www.simform.com/nodejs-use-case/) ### Additional Readings
10
diff --git a/token-metadata/0x0763fdCCF1aE541A5961815C0872A8c5Bc6DE4d7/metadata.json b/token-metadata/0x0763fdCCF1aE541A5961815C0872A8c5Bc6DE4d7/metadata.json "symbol": "SUKU", "address": "0x0763fdCCF1aE541A5961815C0872A8c5Bc6DE4d7", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/data.js b/data.js @@ -5778,6 +5778,6 @@ module.exports = [ tags: ["simple", "games", "entity", "component", "system"], description: "A small entity-component-system library written in JS", url: "https://github.com/Stuhl/javascript-entity-component-system", - source: "https://raw.githubusercontent.com/Stuhl/javascript-entity-component-system/master/dist/index.js" + source: "https://raw.githubusercontent.com/Stuhl/javascript-entity-component-system/master/src/index.js" } ];
0
diff --git a/src/org/ringojs/wrappers/ScriptableList.java b/src/org/ringojs/wrappers/ScriptableList.java @@ -142,7 +142,7 @@ public class ScriptableList extends NativeJavaObject { double d = ScriptRuntime.toNumber(value); long longVal = ScriptRuntime.toUint32(d); if (longVal != d) { - String msg = ScriptRuntime.getMessage0("msg.arraylength.bad"); + String msg = ScriptRuntime.getMessageById("msg.arraylength.bad"); throw ScriptRuntime.constructError("RangeError", msg); } int size = list.size();
14
diff --git a/src/scripts/content/toggl-plan.js b/src/scripts/content/toggl-plan.js 'use strict'; -togglbutton.render('.task-form:not(.toggl)', { observe: true }, elem => { - const container = $('[data-hook=actions-menu]', elem); +// Changed from teamweek to Toggl-Plan +// Version active on July 2020 +togglbutton.render('.task-form:not(.toggl)', + { observe: true }, + element => { + const container = element.querySelector('[data-hook=actions-menu]'); const getDescriptionText = () => { - const titleElement = $('[data-hook=name-input]', elem); + const titleElement = element.querySelector('[data-hook=name-editor] textarea'); return titleElement ? titleElement.textContent.trim() : ''; }; const getProjectText = () => { - const projectElement = $('[data-hook=project-select] [data-hook=input-label]', elem); - return projectElement ? projectElement.textContent.trim() : null; + const planElement = element.querySelector('[data-hook=plan-editor] [data-hook=input-value]'); + + return planElement + ? planElement.textContent.trim() + : ''; }; const link = togglbutton.createTimerLink({ - className: 'teamweek-new', + className: 'toggl-plan', buttonType: 'minimal', description: getDescriptionText, projectName: getProjectText }); + link.style.marginTop = '-1px'; + link.style.marginLeft = '16px'; + container.parentNode.insertBefore(link, container); -}); + } +);
1
diff --git a/src/lib/http.js b/src/lib/http.js @@ -20,6 +20,15 @@ const HEADERS = { let headerBuilders = []; +function parseHeaders(rawHeaders : string = '') : { [string] : string } { + let result = {}; + for (let line of rawHeaders.trim().split('\n')) { + let [ key, ...values ] = line.split(':'); + result[key.toLowerCase()] = values.join(':').trim(); + } + return result; +} + export function request({ url, method = 'get', headers = {}, json, data, body, win = window, timeout = 0 } : RequestOptionsType) : ZalgoPromise<Object> { return new ZalgoPromise((resolve, reject) => { @@ -54,21 +63,14 @@ export function request({ url, method = 'get', headers = {}, json, data, body, w xhr.addEventListener('load', function xhrLoad() : void { - let corrID; - - try { - corrID = this.getResponseHeader('paypal-debug-id'); - } catch (err) { - // pass - } - - corrID = corrID || 'unknown'; + let responseHeaders = parseHeaders(this.getAllResponseHeaders()); + let corrID = responseHeaders['paypal-debug-id'] || 'unknown'; if (!this.status) { return reject(new Error(`Request to ${ method.toLowerCase() } ${ url } failed: no response status code. Correlation id: ${ corrID }`)); } - let contentType = this.getResponseHeader('content-type'); + let contentType = responseHeaders['content-type']; let isJSON = contentType && (contentType.indexOf('application/json') === 0 || contentType.indexOf('text/json') === 0); let res = this.responseText; @@ -84,7 +86,7 @@ export function request({ url, method = 'get', headers = {}, json, data, body, w let message = `Request to ${ method.toLowerCase() } ${ url } failed with ${ this.status } error. Correlation id: ${ corrID }`; if (res) { - if (isJSON) { + if (typeof res === 'object' && res !== null) { res = JSON.stringify(res, null, 4); }
7
diff --git a/generators/generator-base-private.js b/generators/generator-base-private.js @@ -339,14 +339,14 @@ module.exports = class extends Generator { * @returns formatted api description */ formatAsApiDescription(text) { - if (!text || text === '') { + if (!text) { return text; } const rows = text.split('\n'); let description = rows[0]; for (let i = 1; i < rows.length; i++) { // discard empty rows - if (rows[i] !== '' && rows[i].trim() !== '') { + if (rows[i].trim() !== '') { // if simple text then put space between row strings if (!description.endsWith('>') && !rows[i].startsWith('<')) { description += ' '; @@ -358,7 +358,7 @@ module.exports = class extends Generator { } formatLineForJavaStringUse(text) { - if (!text || text === '') { + if (!text) { return text; } return text.replace(/"/g, '\\"');
7
diff --git a/src/components/general/settings/TabAi.jsx b/src/components/general/settings/TabAi.jsx @@ -163,7 +163,7 @@ export const TabAi = ({ active }) => { <div className={ styles.blockTitle }>MODEL</div> <div className={ styles.row }> <div className={ styles.paramName }>Provider</div> - <Switch className={ styles.switch } value={ apiType } setValue={ setApiType } values={ [ 'GOOSEAI', 'OPENAI' ] } /> + <Switch className={ styles.switch } value={ apiType } setValue={ setApiType } values={ [ 'AI21', 'GOOSEAI', 'OPENAI' ] } /> {_apiTypeNeedsApiKey(apiType) ? <input type="text" className={ styles.input } value={ apiKey ?? '' } onChange={e => setApiKey(e.target.value) } placeholder="API Key" /> :
0
diff --git a/src/sidebar.js b/src/sidebar.js @@ -143,7 +143,7 @@ export class Sidebar { _usernameElem.value = _username; clearInterval(_usernameElemWatcher); - }, 10); + }, 100); }; webContents.executeJavaScript('('.concat(injectedPrefiller, `('${username}'))`));
12
diff --git a/src/lib/components/CandidateBox.ts b/src/lib/components/CandidateBox.ts @@ -85,7 +85,7 @@ class CandidateBox { }; candidateListLIElement.className = "hg-candidate-box-list-item"; - candidateListLIElement.textContent = this.options.display?.[candidateListItem] || candidateListItem; + candidateListLIElement.innerHTML = this.options.display?.[candidateListItem] || candidateListItem; candidateListLIElement.onclick = (e = getMouseEvent()) => onItemSelected(candidateListItem, e);
11
diff --git a/articles/libraries/auth0-swift/index.md b/articles/libraries/auth0-swift/index.md @@ -190,3 +190,14 @@ Auth0 } } ``` + +## Next Steps + +Take a look at the following resources to see how the Auth0.Swift SDK can be customized for your needs: + +::: next-steps +* [Auth0.Swift Database Authentication](/libraries/auth0-swift/database-authentication) +* [Auth0.Swift Passwordless Authentication](/libraries/auth0-swift/passwordless) +* [Auth0.Swift Refresh Tokens](/libraries/auth0-swift/save-and-refresh-tokens) +* [Auth0.Swift User Management](/libraries/auth0-swift/user-management) +::: \ No newline at end of file
0
diff --git a/gameplay/avalonRoom.js b/gameplay/avalonRoom.js @@ -770,7 +770,7 @@ module.exports = function(host_, roomId_, io_){ //set game start parameters //get a random starting team leader this.teamLeader = getRandomInt(0,this.sockets.length); - this.hammer = ((this.teamLeader - 5 + this.sockets.length) % this.sockets.length); + this.hammer = ((this.teamLeader - 5 + 1 + this.sockets.length) % this.sockets.length); this.missionNum = 1; this.pickNum = 1;
1
diff --git a/src/encoded/static/scss/encoded/modules/_genome_browser.scss b/src/encoded/static/scss/encoded/modules/_genome_browser.scss bottom: 0; right: 0; left: 0; - border: 1px solid #bdbdbd; background: white; z-index: 99999; } top: 0; background: white; color: black; + margin-top: 0; } }
2
diff --git a/packages/rmw-shell/cra-template-rmw/template/continuous_deployment/bs.js b/packages/rmw-shell/cra-template-rmw/template/continuous_deployment/bs.js @@ -53,18 +53,15 @@ var desktopIE = { 'browserstack.key': process.argv[3], } -/* var iPhoneDriver = new webdriver.Builder() .usingServer('http://hub-cloud.browserstack.com/wd/hub') .withCapabilities(iPhone) .build() - var androidDriver = new webdriver.Builder() .usingServer('http://hub-cloud.browserstack.com/wd/hub') .withCapabilities(android) .build() - */ var desktopFFDriver = new webdriver.Builder() .usingServer('http://hub-cloud.browserstack.com/wd/hub') @@ -81,8 +78,8 @@ var desktopIEDriver = new webdriver.Builder() .withCapabilities(desktopIE) .build() -//test.runTest(iPhoneDriver) -//test.runTest(androidDriver) +test.runTest(iPhoneDriver) +test.runTest(androidDriver) test.runTest(desktopFFDriver) test.runTest(desktopEdgeDriver) test.runTest(desktopIEDriver)
3
diff --git a/labs/logicapps.md b/labs/logicapps.md @@ -83,7 +83,7 @@ We'll create a REST API point, using the sample payload in the code block below. 1. the HTTP request, i.e. what we are sending in, and the expected format or schema for it, followed by 2. the HTTP response sent back to confirm success -Here is our sample JSON payload for you to copy out. +Here is a sample JSON payload: ```json { @@ -111,7 +111,21 @@ The video shows the creation of the two steps in the Logic App Designer. Again, ### Request * Search for **http request** and select the trigger -* Use the sample payload to generate a JSON schema for the endpoint +* Copy the sample payload below +* Click on the 'Use sample payload to generate schema' link +* Paste the sample payload in there +* Clicking done will generate the JSON schema for the endpoint, which describes the expected format for the JSON + +```json +{ + "id": 1504522921969, + "name": "Joe Bloggs", + "email": "[email protected]", + "feedback": "Your website crashes when I add items to my Wish List. Shocking.", + "rating": 2, + "source": "webapp" +} +``` ![request](/labs/logicapps/images/httpRequest.png)
7
diff --git a/userscript.user.js b/userscript.user.js @@ -11336,7 +11336,7 @@ var $$IMU_EXPORT$$; var our_format = available_formats[i]; if (our_format.is_adaptive) { - adaptiveformat_to_dash(our_format, adaptionsets); + //adaptiveformat_to_dash(our_format, adaptionsets); } else { if (our_format.bitrate > maxbitrate) { maxbitrate = our_format.bitrate;
8
diff --git a/packages/homelessness/package.json b/packages/homelessness/package.json "express": "^4.14.1", "invariant": "^2.2.2", "isomorphic-fetch": "^2.2.1", - "leaflet": "^1.0.3", "query-string": "^4.3.3", "ramda": "^0.23.0", "react": "^16.8.4",
2
diff --git a/components/maplibre/ban-map/layers.js b/components/maplibre/ban-map/layers.js @@ -49,12 +49,14 @@ const getColors = () => { return [...array] } +const colors = getColors() + export const positionsCircleLayer = { id: 'positions', source: 'positions', type: 'circle', paint: { - 'circle-color': ['match', ['get', 'type'], ...getColors(), '#000'], + 'circle-color': ['match', ['get', 'type'], ...colors, '#000'], 'circle-stroke-color': [ 'case', ['boolean', ['feature-state', 'hover'], false], @@ -82,7 +84,7 @@ export const positionsLabelLayer = { type: 'symbol', minzoom: NUMEROS_MIN, paint: { - 'text-color': ['match', ['get', 'type'], ...getColors(), '#000'] + 'text-color': ['match', ['get', 'type'], ...colors, '#000'] }, layout: { 'text-font': ['Noto Sans Bold'],
0
diff --git a/src/lib/wallet/SoftwareWalletProvider.js b/src/lib/wallet/SoftwareWalletProvider.js @@ -91,7 +91,8 @@ class SoftwareWalletProvider { break case 'HttpProvider': - provider = this.conf.httpWeb3provider + Config.infuraKey + const infuraKey = this.conf.httpWeb3provider.indexOf('infura') !== -1 ? Config.infuraKey : '' + provider = this.conf.httpWeb3provider + infuraKey web3Provider = new Web3.providers.HttpProvider(provider) break
2
diff --git a/app/shared/reducers/balances.js b/app/shared/reducers/balances.js @@ -22,7 +22,7 @@ export default function balances(state = initialState, action) { const { connection, results } = action.payload; if (results && results.core_liquid_balance) { const account = action.payload.account.replace('.', '\\.'); - const newBalances = Object.assign({}, state[account]); + const newBalances = Object.assign({}, state[action.payload.account]); const tokenSymbol = `${connection.tokenPrecision || 4},${connection.chainSymbol}`; newBalances[connection.chainSymbol] = Asset.from(results.core_liquid_balance, tokenSymbol).value; modified = set(state, account, newBalances);
4
diff --git a/assets/js/googlesitekit/widgets/datastore/areas.js b/assets/js/googlesitekit/widgets/datastore/areas.js @@ -27,15 +27,6 @@ import invariant from 'invariant'; import { WIDGET_AREA_STYLES } from './constants'; import { sortByProperty } from '../../../util/sort-by-property'; -/** - * Store our widget components by registry, then by widget `slug`. We do this because - * we can't store React components in our data store. - * - * @private - * @since 1.9.0 - */ -export const WidgetComponents = {}; - const ASSIGN_WIDGET_AREA = 'ASSIGN_WIDGET_AREA'; const REGISTER_WIDGET_AREA = 'REGISTER_WIDGET_AREA';
2
diff --git a/N/search.d.ts b/N/search.d.ts @@ -691,7 +691,7 @@ interface CreateSearchSettingOptions<K extends SettingName> { value: SettingValueType[K] | string } -interface Setting { +export interface Setting { name: string value: ConsolidationEnum | IncludePeriodTransactionEnum }
12
diff --git a/app/core/tokenList.json b/app/core/tokenList.json }, "NNN": { "symbol": "NNN", - "companyName": "Novem Gold AG", + "companyName": "NOVEM GOLD AG", "type": "NEP5", "networks": { "1": { "name": "Novem Gold Token", - "hash": "50091057ff12863f1a43266b9786209e399c6ffc", + "hash": "1e892bd588ea4ab409b3a93d3049d6115c6727f3", "decimals": 8, "totalSupply": 1 } - } + }, + "image": "https://rawgit.com/CityOfZion/neo-tokens/master/assets/svg/nnn.svg" }, "NOS": { "symbol": "NOS",
3
diff --git a/src/templates/question.js b/src/templates/question.js @@ -171,7 +171,9 @@ const QuestionTemplate = props => { <h2>Explanation:</h2> <section dangerouslySetInnerHTML={{ - __html: explanationContent + __html: + explanationContent + + `<ul style="padding-left: 30px"><li><strong>Interested in learning more about JavaScript? Consider <a href="https://buttondown.email/typeofnan" target="_blank" rel="noopener noreferrer">signing up for the TypeOfNaN Newsletter</a> for periodic JavaScript tips!</strong></li></ul>` }} /> </React.Fragment> @@ -180,8 +182,19 @@ const QuestionTemplate = props => { {submittedAnswer !== null && ( <React.Fragment> <br /> - <Button className="ui red basic button" onClick={() => openClear(true)}>Clear My answer</Button> - <ClearAnswerModal modalIsOpen={isOpen} clearAnswer={()=>openClear(clearAnswer())} closeModal={()=>openClear(false)}/> + <Button + className="ui red basic button" + onClick={() => openClear(true)} + > + Clear My answer + </Button> + <ClearAnswerModal + modalIsOpen={isOpen} + clearAnswer={() => + openClear(clearAnswer()) + } + closeModal={() => openClear(false)} + /> </React.Fragment> )} </article>
0
diff --git a/src/js/modules/ajax.js b/src/js/modules/ajax.js @@ -164,6 +164,41 @@ Ajax.prototype._loadDataStandard = function(inPosition){ }, inPosition); }; +Ajax.prototype.serializeParams = function(data, prefix){ + var self = this, + output = [], + encoded = []; + + prefix = prefix || ""; + + if ( Array.isArray(data) ) { + + data.forEach(function(item, i){ + output = output.concat(self.serializeParams(item, prefix ? prefix + "[" + i + "]" : i)); + }); + + }else if (typeof data === "object"){ + + for (var key in data){ + output = output.concat(self.serializeParams(data[key], prefix ? prefix + "[" + key + "]" : key)); + } + + }else{ + output.push({key:prefix, val:data}); + } + + if(prefix){ + return output; + }else{ + output.forEach(function(item){ + encoded.push(encodeURIComponent(item.key) + "=" + encodeURIComponent(item.val)); + }); + + return encoded.join("&"); + } + +}; + //send ajax request Ajax.prototype.sendRequest = function(callback, silent){ var self = this, @@ -179,12 +214,7 @@ Ajax.prototype.sendRequest = function(callback, silent){ if(self.params){ if(!self.config.method || self.config.method == "get"){ - var esc = encodeURIComponent; - var query = Object.keys(self.params) - .map(k => esc(k) + '=' + esc(self.params[k])) - .join('&'); - - url += "?" + query; + url += "?" + self.serializeParams(self.params); }else{ self.config.body = JSON.stringify(self.params); }
7
diff --git a/src/util/mockVGL.js b/src/util/mockVGL.js /* eslint-disable camelcase */ /* eslint-disable underscore/prefer-constant */ +var $ = require('jquery'); var vgl = require('vgl'); var vglRenderer = require('../gl/vglRenderer'); -var _renderWindow = vgl.renderWindow; -var _supported = vglRenderer.supported; +var _renderWindow, _supported; module.exports = {}; /** * Replace vgl.renderer with a mocked version for testing in a non-webGL state. - * Use resotreVGLRenderer to unmock. + * Use restoreVGLRenderer to unmock. Call vgl.mockCounts() to get the number + * of times different webGL functions have been called. * * @param {boolean} [supported=true] If false, then the vgl renderer will * indicate that this is an unsupported browser environment. @@ -46,7 +47,7 @@ module.exports.mockVGLRenderer = function mockVGLRenderer(supported) { }; }; /* The context largely does nothing. */ - var m_context = { + var default_context = { activeTexture: noop('activeTexture'), attachShader: noop('attachShader'), bindAttribLocation: noop('bindAttribLocation'), @@ -130,17 +131,40 @@ module.exports.mockVGLRenderer = function mockVGLRenderer(supported) { viewport: noop('viewport') }; - /* Our mock has only a single renderWindow */ - var m_renderWindow = vgl.renderWindow(); - m_renderWindow._setup = function () { + _renderWindow = vgl.renderWindow; + var mockedRenderWindow = function () { + /* Temporarily put back the original definition of renderWindow so that the + * class instance will be instantiated correctly. */ + vgl.renderWindow = _renderWindow; + var m_this = new vgl.renderWindow(), + m_context; + vgl.renderWindow = mockedRenderWindow; + + m_this._setup = function () { + var i, renderers = m_this.renderers(), + wsize = m_this.windowSize(), + wpos = m_this.windowPosition(); + + m_context = $.extend({}, default_context); + + for (i = 0; i < renderers.length; i += 1) { + if ((renderers[i].width() > wsize[0]) || + renderers[i].width() === 0 || + (renderers[i].height() > wsize[1]) || + renderers[i].height() === 0) { + renderers[i].resize(wpos[0], wpos[1], wsize[0], wsize[1]); + } + } return true; }; - m_renderWindow.context = function () { + m_this.context = function () { return m_context; }; - vgl.renderWindow = function () { - return m_renderWindow; + return m_this; }; + vgl.renderWindow = mockedRenderWindow; + + _supported = vglRenderer.supported; vglRenderer.supported = function () { return !!supported; }; @@ -159,6 +183,7 @@ module.exports.restoreVGLRenderer = function () { vgl.renderWindow = _renderWindow; vglRenderer.supported = _supported; delete vgl._mocked; + // delete vgl._mockedRenderWindow; delete vgl.mockCounts; } };
11
diff --git a/appveyor.yml b/appveyor.yml @@ -15,6 +15,8 @@ before_package: echo Before package after_test: - 7z a build\html5_history_dist_%APPVEYOR_REPO_TAG_NAME%.zip %APPVEYOR_BUILD_FOLDER%\build\dist -r + - dir %APPVEYOR_BUILD_FOLDER%\build\ + - dir %APPVEYOR_BUILD_FOLDER%\build\hash-history_ - 7z a build\hash_history_dist_%APPVEYOR_REPO_TAG_NAME%.zip %APPVEYOR_BUILD_FOLDER%\build\hash-history_ -r test_script: - npm run package @@ -31,6 +33,8 @@ deploy: provider: GitHub release: $(APPVEYOR_REPO_TAG_NAME) description: "Automated release from Travis CI with added files from AppVeyor build" + auth_token: + secure: qaM65dCB1skamy4+0Hmxg2+nM8Aj9uT9Oa8I6PnFwifrNGBCWrI1FsqBf0F8a2Nv artifact: WindowsApp, html5_history_dist, hash_history_dist draft: true force_update: true
12
diff --git a/assets/src/edit-story/components/canvas/karma/multiSelectionMovable.karma.js b/assets/src/edit-story/components/canvas/karma/multiSelectionMovable.karma.js @@ -135,16 +135,8 @@ describe('Multi-selection Movable integration', () => { const storyContext = await fixture.renderHook(() => useStory()); // Let's assure we have the background element (the first element) in the selection now. - const background = safezone.firstChild; - expect(storyContext.state.selectedElementIds).toEqual([ - background.getAttribute('data-element-id'), - ]); - expect( - storyContext.state.selectedElementIds.includes(element1.id) - ).toBeFalse(); - expect( - storyContext.state.selectedElementIds.includes(element2.id) - ).toBeFalse(); + const background = storyContext.state.currentPage.elements[0]; + expect(storyContext.state.selectedElementIds).toEqual([background.id]); }); it('should de-select all elements when clicking out of the page', async () => {
7
diff --git a/token-metadata/0x55296f69f40Ea6d20E478533C15A6B08B654E758/metadata.json b/token-metadata/0x55296f69f40Ea6d20E478533C15A6B08B654E758/metadata.json "symbol": "XYO", "address": "0x55296f69f40Ea6d20E478533C15A6B08B654E758", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/Example/web3swiftExample/web3swiftExample/ViewController.swift b/Example/web3swiftExample/web3swiftExample/ViewController.swift @@ -18,6 +18,8 @@ class ViewController: UIViewController { super.viewDidLoad() let jsonString = "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[{\"name\":\"_initialAmount\",\"type\":\"uint256\"},{\"name\":\"_tokenName\",\"type\":\"string\"},{\"name\":\"_decimalUnits\",\"type\":\"uint8\"},{\"name\":\"_tokenSymbol\",\"type\":\"string\"}],\"type\":\"constructor\"},{\"payable\":false,\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},]" + // create normal keystore + let userDir = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0] let keystoreManager = KeystoreManager.managerForPath(userDir + "/keystore") var ks: EthereumKeystoreV3? @@ -31,6 +33,20 @@ class ViewController: UIViewController { guard let sender = ks?.addresses?.first else {return} print(sender) + //create BIP32 keystore + let bip32keystoreManager = KeystoreManager.managerForPath(userDir + "/bip32_keystore") + var bip32ks: BIP32Keystore? + if (bip32keystoreManager?.addresses?.count == 0) { + bip32ks = try! BIP32Keystore.init(mnemonics: "normal dune pole key case cradle unfold require tornado mercy hospital buyer", password: "BANKEXFOUNDATION", mnemonicsPassword: "", language: .english) + let keydata = try! JSONEncoder().encode(bip32ks!.keystoreParams) + FileManager.default.createFile(atPath: userDir + "/bip32_keystore"+"/key.json", contents: keydata, attributes: nil) + } else { + bip32ks = bip32keystoreManager?.walletForAddress((bip32keystoreManager?.addresses![0])!) as! BIP32Keystore + } + guard let bip32sender = bip32ks?.addresses?.first else {return} + print(bip32sender) + + // BKX TOKEN let web3Main = Web3.InfuraMainnetWeb3() let coldWalletAddress = EthereumAddress("0x6394b37Cf80A7358b38068f0CA4760ad49983a1B")
3
diff --git a/components/app/myrw/datasets/pages/my-rw-datasets/dataset-list/dataset-list-card-component.js b/components/app/myrw/datasets/pages/my-rw-datasets/dataset-list/dataset-list-card-component.js @@ -47,7 +47,6 @@ class DatasetsListCard extends PureComponent { render() { const { dataset, routes, user } = this.props; - const isOwnerOrAdmin = (dataset.userId === user.id || user.role === 'ADMIN'); const isInACollection = belongsToACollection(user, dataset); @@ -65,16 +64,11 @@ class DatasetsListCard extends PureComponent { <div className="card-container"> <header className="card-header"> {isOwnerOrAdmin && - <Link - route={routes.detail} - params={{ tab: 'datasets', id: dataset.id }} - > - <a> + <a href={`${routes.detail}/datasets/${dataset.id}`}> <Title className="-default"> {this.getDatasetName()} </Title> </a> - </Link> } {!isOwnerOrAdmin && @@ -129,6 +123,7 @@ class DatasetsListCard extends PureComponent { {isOwnerOrAdmin && <div className="actions"> <a + onKeyPress={this.handleDelete} role="button" className="c-button -secondary -compressed" tabIndex={0}
4
diff --git a/package.json b/package.json "react-advanced-img": "^1.0.0", "react-dom": "^15.3.2", "react-intl": "^2.1.5", - "react-portal-tooltip": "^1.1.5", "react-redux": "^4.4.5", "react-responsive-utils": "^1.0.2", "react-router": "^3.0.0",
2
diff --git a/token-metadata/0xAA19961b6B858D9F18a115f25aa1D98ABc1fdBA8/metadata.json b/token-metadata/0xAA19961b6B858D9F18a115f25aa1D98ABc1fdBA8/metadata.json "symbol": "LCS", "address": "0xAA19961b6B858D9F18a115f25aa1D98ABc1fdBA8", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/app/pages/project/index.cjsx b/app/pages/project/index.cjsx @@ -201,12 +201,7 @@ ProjectPageController = React.createClass linkedWorkflows[randomIndex] getWorkflow: (selectedWorkflowID) -> - query = - id: "#{selectedWorkflowID}", - project_id: @state.project.id - unless @checkUserRoles(@state.project, @props.user) - query['active'] = 'true' - apiClient.type('workflows').get(query) + apiClient.type('workflows').get({ active: true, id: "#{selectedWorkflowID}", project_id: @state.project.id }) .catch (error) => console.error error # TODO: Handle 404 once json-api-client error handling is fixed. @@ -234,7 +229,6 @@ ProjectPageController = React.createClass Promise.resolve(null) checkUserRoles: (project, user) -> - if user currentUserRoleSets = @state.projectRoles.filter((roleSet) => roleSet.links.owner.id is user.id) roles = currentUserRoleSets[0].roles
13
diff --git a/app/views/welcome/index.html.haml b/app/views/welcome/index.html.haml - content_for(:extrahead) do - unless @google_webmaster_verification.blank? - %meta{content: @google_webmaster_verification, name: "google-site-verification"} + - @google_webmaster_verification.split( ";" ).each do |verification| + %meta{content: verification.strip, name: "google-site-verification"} %meta{content: "website", property: "og:type"} %meta{content: @site.name, property: "og:title"} - if @site
11
diff --git a/articles/connections/database/migrating.md b/articles/connections/database/migrating.md @@ -8,6 +8,14 @@ At Auth0, the focus has always been not only on greenfield projects but also on Auth0 supports the automatic migration of users to Auth0 from a custom database connection. This feature adds your users to the Auth0 database one-at-a-time as each logs in and avoids asking your users to reset their passwords all at the same time. +::: panel-info Notice +The feature for migrating legacy database users to Auth0 is only available to users on the **Enterprise** plan. + +The feature to connect an existing store or database through a Javascript script that runs on Auth0's server on every authentication requires the **Developer Pro** or **Enterprise** plan. + +[Click here to learn more about Auth0 pricing plans.](https://auth0.com/pricing) +::: + You can read more about database connections and the several user store options at [Database Identity Providers](/connections/database). ## The migration process
0
diff --git a/publish/src/commands/extract-staking-balances.js b/publish/src/commands/extract-staking-balances.js @@ -106,9 +106,9 @@ async function extractStakingBalances({ network = DEFAULTS.network, deploymentPa ); // The exchange fee incurred when users are purged into sUSD - const exchangeFee = await SystemSettings.methods.exchangeFeeRate(toBytes32(synth)).call(); + const exchangeFee = await SystemSettings.methods.exchangeFeeRate(toBytes32('sUSD')).call(); - console.log(gray(`Exchange fee of ${synth} is`), yellow(web3.utils.fromWei(exchangeFee))); + console.log(gray(`Exchange fee of sUSD is`), yellow(web3.utils.fromWei(exchangeFee))); /** *********** --------------------- *********** **/
3
diff --git a/tests/service/data-util.service.spec.ts b/tests/service/data-util.service.spec.ts @@ -81,9 +81,14 @@ describe('Data Utils Service Test', () => { expect(service.toBase64).toHaveBeenCalled(); })())); - it('should skip the toBase64() when image is passed', inject([JhiDataUtils], (service: JhiDataUtils) => { + it('should not call toBase64() when image is passed and file type is not image', (done) => inject([JhiDataUtils], (service: JhiDataUtils) => { jest.spyOn(service, 'toBase64'); + const mockCallback = jest.fn(() => { + expect(mockCallback.mock.calls.length).toBe(1); + expect(service.toBase64).toHaveBeenCalledTimes(0); + done(); + }); const eventSake = { target: { @@ -91,10 +96,9 @@ describe('Data Utils Service Test', () => { } }; - service.setFileData(eventSake, null, null, true); + service.setFileData(eventSake, null, null, true, mockCallback); - expect(service.toBase64).toHaveBeenCalledTimes(0); - })); + })()); it('should execute the callback in toBase64()', (done) => inject([JhiDataUtils], (service: JhiDataUtils) => { const entity = {};
3