code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/src/lib/undux/utils/account.js b/src/lib/undux/utils/account.js @@ -66,13 +66,19 @@ const onBalanceChange = async (error: {}, event: [any], store: Store) => { } } +const status = { + started: false +} + /** * Starts listening to Transfer events to (and from) the current account */ const initTransferEvents = async (store: Store): Promise<void> => { - log.debug('checking events') - + if (!status.started) { + log.debug('checking transfer events') + status.started = true await goodWallet.balanceChanged((error, event) => onBalanceChange(error, event, store)) } +} export { initTransferEvents, updateBalance, updateEntitlement, updateAll }
0
diff --git a/services/user-mover/import_user.rb b/services/user-mover/import_user.rb @@ -98,7 +98,7 @@ module CartoDB if e.message =~ /already exists/ @logger.warn "Warning: Oauth app user role already exists" else - throw e + raise end end @@ -169,7 +169,7 @@ module CartoDB @logger.error "Error in sanity checks: #{e}" log_error(e) remove_user_mover_banner(@pack_config['user']['id']) if @options[:set_banner] - throw e + raise end if @options[:data] @@ -213,7 +213,7 @@ module CartoDB remove_user_mover_banner(@pack_config['user']['id']) ensure log_error(e) - throw e + raise end end end @@ -227,7 +227,7 @@ module CartoDB rollback_redis("user_#{@target_userid}_metadata_undo.redis") log_error(e) remove_user_mover_banner(@pack_config['user']['id']) if @options[:set_banner] - throw e + raise end end @@ -497,7 +497,7 @@ module CartoDB k.role_creation_queries.each { |q| superuser_user_pg_conn.query(q) } rescue PG::Error => e # Ignore role already exists errors - throw e unless e.message =~ /already exists/ + raise unless e.message =~ /already exists/ end end end @@ -602,19 +602,18 @@ module CartoDB # connect as superuser (postgres) @logger.info "Creating user DB #{@target_dbname}..." - if params[:from_dump] - superuser_pg_conn.query("CREATE DATABASE \"#{@target_dbname}\"") - setup_db_extensions_for_migration - else - superuser_pg_conn.query("CREATE DATABASE \"#{@target_dbname}\" WITH TEMPLATE template_postgis") - setup_db_extensions - end + params[:from_dump] ? setup_db_for_dump_load : setup_db rescue PG::Error => e @logger.error(e.message) raise e end - def setup_db_extensions + def setup_db + begin + superuser_pg_conn.query("CREATE DATABASE \"#{@target_dbname}\" WITH TEMPLATE template_postgis") + rescue PG::DuplicateDatabase + @logger.warn "Warning: Database already exists" + end superuser_user_pg_conn.query("CREATE EXTENSION IF NOT EXISTS postgis") cartodb_schema = superuser_user_pg_conn.query("SELECT nspname FROM pg_catalog.pg_namespace where nspname = 'cartodb'") superuser_user_pg_conn.query("CREATE SCHEMA cartodb") if cartodb_schema.count == 0 @@ -625,7 +624,9 @@ module CartoDB superuser_user_pg_conn.query("CREATE EXTENSION IF NOT EXISTS cartodb WITH SCHEMA cartodb CASCADE") end - def setup_db_extensions_for_migration + def setup_db_for_dump_load + superuser_pg_conn.query("CREATE DATABASE \"#{@target_dbname}\"") + destination_db_version = get_database_version_for_binaries(superuser_pg_conn).split('.').first return if destination_db_version != '12' @@ -643,7 +644,7 @@ module CartoDB update_database_retries(userid, username, db_host, db_name, retries - 1) else @logger.info "No more retries" - throw e + raise end end @@ -716,7 +717,7 @@ module CartoDB end log_error(e) remove_user_mover_banner(@pack_config['user']['id']) if @options[:set_banner] - throw e + raise end end
14
diff --git a/token-metadata/0x012ba3ae1074aE43A34A14BCA5c4eD0Af01b6e53/metadata.json b/token-metadata/0x012ba3ae1074aE43A34A14BCA5c4eD0Af01b6e53/metadata.json "symbol": "TRUMP", "address": "0x012ba3ae1074aE43A34A14BCA5c4eD0Af01b6e53", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/rig.js b/rig.js @@ -688,7 +688,7 @@ class RigManager { 'mixamorigLeftFoot.quaternion': testRig.outputs.rightFoot.quaternion, 'mixamorigLeftToeBase.quaternion': null, }; - const headTracks = { + /* const headTracks = { 'mixamorigHips.position': true, 'mixamorigHips.quaternion': true, 'mixamorigSpine.quaternion': true, @@ -736,7 +736,7 @@ class RigManager { 'mixamorigRightHandPinky1.quaternion': true, 'mixamorigRightHandPinky2.quaternion': true, 'mixamorigRightHandPinky3.quaternion': true, - }; + }; */ const _selectAnimations = v => { const selectedAnimations = animations.slice().sort((a, b) => { const targetPosition1 = animationsSelectMap[a.name]; @@ -811,9 +811,9 @@ class RigManager { testRig.setTopEnabled(cameraManager.getTool() === 'firstperson' || !!renderer.xr.getSession()); testRig.setBottomEnabled(testRig.getTopEnabled() && smoothVelocity.length() < 0.001); for (const k in mapping) { - if (headTracks[k] && testRig.getTopEnabled()) { + /* if (headTracks[k] && testRig.getTopEnabled()) { continue; - } + } */ const dst = mapping[k]; if (dst) { const t1 = (Date.now()/1000) % selectedAnimations[0].duration;
2
diff --git a/fixed-price-subscriptions/server/python/server.py b/fixed-price-subscriptions/server/python/server.py @@ -50,7 +50,6 @@ def create_customer(): return jsonify( customer=customer, - setupIntent=setup_intent ) except Exception as e: return jsonify(error=str(e)), 403 @@ -87,6 +86,7 @@ def createSubscription(): except Exception as e: return jsonify(error={'message': str(e)}), 200 + @app.route('/retry-invoice', methods=['POST']) def retrySubscription(): data = json.loads(request.data)
2
diff --git a/native-bindings.js b/native-bindings.js const path = require('path'); const bindings = require(path.join(__dirname, 'build', 'Release', 'exokit.node')); -const {nativeVr} = bindings; +const {nativeAudio, nativeVr} = bindings; const WindowWorker = require('window-worker'); const webGlToOpenGl = require('webgl-to-opengl'); @@ -24,6 +24,9 @@ bindings.nativeGl = (nativeGl => function WebGLContext() { return result; })(bindings.nativeGl); +const {PannerNode} = nativeAudio; +PannerNode.setPath(path.join(require.resolve(__dirname, 'node_modules', 'node-native-audio-deps', 'assets', 'hrtf'))); + nativeVr.EVRInitError = { None: 0, Unknown: 1,
12
diff --git a/generators/bootstrap-application-server/generator.mts b/generators/bootstrap-application-server/generator.mts @@ -30,7 +30,6 @@ const { CommonDBTypes: { LONG: TYPE_LONG }, } = FieldTypes.default; const { OAUTH2 } = AuthentitcationTypes.default; -const { CLIENT_MAIN_SRC_DIR, CLIENT_TEST_SRC_DIR } = constants; const { loadRequiredConfigIntoEntity, loadRequiredConfigDerivedProperties,
2
diff --git a/inventory.js b/inventory.js @@ -193,6 +193,12 @@ const inventoryAvatarRenderer = (() => { })(); addDefaultLights(inventoryAvatarScene); +const planeMesh = new THREE.Mesh(new THREE.CylinderBufferGeometry(1, 1, 0.1).applyMatrix4(new THREE.Matrix4().makeTranslation(0, 0, -0.1/2)), new THREE.MeshBasicMaterial({ + color: 0x333333, +})); +planeMesh.position.set(0, -0.2, -2.5); +inventoryAvatarScene.add(planeMesh); + // XXX let avatarMesh = null; (async () => {
0
diff --git a/packages/app/cypress/e2e/runs.cy.ts b/packages/app/cypress/e2e/runs.cy.ts @@ -290,6 +290,32 @@ describe('App: Runs', { viewportWidth: 1200 }, () => { expect(o.testState.cloudProjectRequestAccessWasCalled).to.eql(true) }) }) + + it('updates the button text when the request access button is clicked', () => { + cy.remoteGraphQLIntercept(async (obj, testState) => { + if (obj.operationName === 'Runs_currentProject_cloudProject_batched') { + for (const proj of obj!.result!.data!.cloudProjectsBySlugs) { + proj.__typename = 'CloudProjectUnauthorized' + proj.message = 'Cloud Project Unauthorized' + proj.hasRequestedAccess = false + testState.project = proj + } + } + + if (obj.operationName === 'RunsErrorRenderer_RequestAccess_cloudProjectRequestAccess') { + obj!.result!.data!.cloudProjectRequestAccess = { + ...testState.project, + hasRequestedAccess: true, + } + } + + return obj.result + }) + + cy.visitApp('/runs') + cy.findByText(defaultMessages.runs.errors.unauthorized.button).click() + cy.findByText(defaultMessages.runs.errors.unauthorizedRequested.button).should('exist') + }) }) context('Runs - Has requested access to unauthorized project', () => {
0
diff --git a/test/externalTests/fishing.js b/test/externalTests/fishing.js @@ -12,7 +12,6 @@ module.exports = () => (bot, done) => { grassName = 'grass_block' } - bot.test.sayEverywhere('/weather thunder') bot.test.sayEverywhere('/fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 water') bot.test.setInventorySlot(36, new Item(mcData.itemsByName.fishing_rod.id, 1, 0), (err) => { assert.ifError(err)
2
diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js @@ -113,27 +113,6 @@ function createIOUSplit(params) { }); } -/** - * Retrieve an IOU report using a transactionID, then navigate to the page. - * @param {Int} transactionID - */ -function getIOUReportDetailFromTransactionID(transactionID) { - API.Get({ - returnValueList: 'transactionList', - transactionID, - }) - .then((data) => { - const chatReportID = data.transactionList[0].reportID; - if (!chatReportID) { - return; - } - Navigation.navigate(ROUTES.getIouDetailsRoute(chatReportID)); - }) - .catch((error) => { - console.error('Error retrieving Transaction: ', error); - }); -} - /** * Settles an IOU Report */ @@ -174,20 +153,17 @@ function rejectTransaction({ /** * @param {Object} action - * @param {Object} originalMessage + * @param {Object} action.originalMessage * @param {number} action.originalMessage.IOUReportID - * @param {number} action.originalMessage.IOUTransactionID + * + * Launch the IOU Details Modal, using data from the report action */ function launchDetailsFromIOUAction(action) { - if (!action.originalMessage) { - console.error('Error launching IOUDetailModal: reportAction `originalMessage` data not provided.'); + if (!action.originalMessage || !action.originalMessage.IOUReportID) { + console.error('Error launching IOUDetailModal: reportAction `IOUReportID` not provided.'); return; } - if (action.originalMessage.IOUReportID) { Navigation.navigate(ROUTES.getIouDetailsRoute(action.originalMessage.IOUReportID)); - } else if (action.originalMessage.IOUTransactionID) { - getIOUReportDetailFromTransactionID(action.originalMessage.IOUTransactionID); - } } export {
4
diff --git a/articles/hooks/overview.md b/articles/hooks/overview.md @@ -12,7 +12,7 @@ useCase: extensibility-hooks --- # Overview -Hooks, which will eventually replace [Rules](/rules), allow you to extend the Auth0 platform with custom code. +Hooks allow you to extend the Auth0 platform with custom code. Hooks are Webtasks associated with specific extensibility points of the Auth0 platform. When using [Database Connections](/connections/database), Auth0 invokes the Hooks at runtime to execute your custom logic.
2
diff --git a/.vuepress/styles/index.styl b/.vuepress/styles/index.styl @@ -18,9 +18,8 @@ body background-color #f3f5f7 border-color #1e90ff .code-copy - position: absolute; - right: 0; - bottom: 5px; + position: sticky; + left: 0px; {$contentClass} a code color $accentColor
1
diff --git a/includes/Core/Authentication/Google_Proxy.php b/includes/Core/Authentication/Google_Proxy.php @@ -148,13 +148,6 @@ class Google_Proxy { $params['site_id'] = $creds['oauth2_client_id']; } - /** - * Filters parameters included in proxy setup URL. - * - * @since 1.27.0 - */ - $params = apply_filters( 'googlesitekit_proxy_setup_url_params', $params ); - // If no site identification information is present, we need to provide details for a new site. if ( empty( $params['site_id'] ) && empty( $params['site_code'] ) ) { $site_fields = array_map( 'rawurlencode', $this->get_site_fields() );
2
diff --git a/src/web/components/global-nav/container/sub-nav/tabs/tab/tab.js b/src/web/components/global-nav/container/sub-nav/tabs/tab/tab.js @@ -23,7 +23,7 @@ class Tab extends Core { setLabel(label) { this.el.textContent = label; - this.el.setAttr('label', label); + this.el.setAttribute("title", label); } activate() {
12
diff --git a/src/kiri-mode/fdm/prepare.js b/src/kiri-mode/fdm/prepare.js @@ -788,7 +788,6 @@ function slicePrintPath(print, slice, startPoint, offset, output, opt = {}) { thinWall = nozzleSize * (opt.thinWall || 1.75), retractDist = opt.retractOver || 2, fillMult = opt.mult || process.outputFillMult, - solidWidth = fillMult, // deprecated: process.sliceFillWidth shellMult = opt.mult || process.outputShellMult || (process.laserSliceHeight >= 0 ? 1 : 0), shellOrder = {"out-in":-1,"in-out":1}[process.sliceShellOrder] || -1, sparseMult = process.outputSparseMult, @@ -1383,7 +1382,7 @@ function slicePrintPath(print, slice, startPoint, offset, output, opt = {}) { // then output solid and sparse fill print.setType('solid fill'); - outputFills(next.fill_lines, {flow: solidWidth}); + outputFills(next.fill_lines, {flow: fillMult}); print.setType('sparse infill'); outputSparse(next.fill_sparse, sparseMult, infillSpeed);
2
diff --git a/OpenRobertaParent/OpenRobertaServer/src/test/java/de/fhg/iais/roberta/searchMsg/SearchMsgOccurrencesTest.java b/OpenRobertaParent/OpenRobertaServer/src/test/java/de/fhg/iais/roberta/searchMsg/SearchMsgOccurrencesTest.java @@ -4,12 +4,11 @@ import java.io.File; import java.util.regex.Pattern; import org.junit.Ignore; -import org.junit.Test; public class SearchMsgOccurrencesTest { private static final Pattern ALL = Pattern.compile(".+"); - @Test + @Ignore public void testMessageOccurences() throws Exception { SearchMsgKeyOccurrences smo = new SearchMsgKeyOccurrences(new File("../../../blockly/robMsg/robMessages.js"), new File("../../../blockly/msg/messages.js"));
12
diff --git a/lib/tasks/central_updates_subscriber.rake b/lib/tasks/central_updates_subscriber.rake @@ -19,12 +19,22 @@ namespace :poc do case received_message.attributes['event'].to_sym when :update_user puts 'Processing :update_user' - attributes = JSON.parse(received_message.data) - user_id = attributes.delete("remote_user_id") - if !user_id.nil? && attributes.any? - user = Carto::User.find(user_id) - user.update(attributes) - user.save! + user_param = JSON.parse(received_message.data).with_indifferent_access + user_id = user_param.delete("remote_user_id") + if user_id.present? && user_param.any? + # TODO need to progress in the synchronizable concern + # in particular, set_fields_from_central at least + user = ::User.where(id: user_id).first + + # Copied from Superadmin::UsersController#update + user.set_fields_from_central(user_param, :update) + user.update_feature_flags(user_param[:feature_flags]) + user.regenerate_api_key(user_param[:api_key]) if user_param[:api_key].present? + user.update_rate_limits(user_param[:rate_limit]) + user.update_gcloud_settings(user_param[:gcloud_settings]) + user.update_do_subscription(user_param[:do_subscription]) + user.save + received_message.acknowledge! puts "User #{user.username} updated" end
4
diff --git a/lib/repository.js b/lib/repository.js @@ -1411,7 +1411,7 @@ Repository.parseSortFromMongoQuery = function(mongoQuery) { return sort } -Repository.query = function(tasks, queryString) { +Repository.query = function(tasks, queryString = '') { let query let sort // console.log('queryString:', queryString)
12
diff --git a/packages/react-reconciler/src/ReactFiberCommitWork.js b/packages/react-reconciler/src/ReactFiberCommitWork.js @@ -1097,27 +1097,23 @@ function commitNestedUnmounts( } } -function detachFiber(current: Fiber) { - const alternate = current.alternate; +function detachFiber(fiber: Fiber) { // Cut off the return pointers to disconnect it from the tree. Ideally, we // should clear the child pointer of the parent alternate to let this // get GC:ed but we don't know which for sure which parent is the current // one so we'll settle for GC:ing the subtree of this child. This child // itself will be GC:ed when the parent updates the next time. - current.return = null; - current.child = null; - current.memoizedState = null; - current.updateQueue = null; - current.dependencies = null; - current.alternate = null; - current.firstEffect = null; - current.lastEffect = null; - current.pendingProps = null; - current.memoizedProps = null; - current.stateNode = null; - if (alternate !== null) { - detachFiber(alternate); - } + fiber.return = null; + fiber.child = null; + fiber.memoizedState = null; + fiber.updateQueue = null; + fiber.dependencies = null; + fiber.alternate = null; + fiber.firstEffect = null; + fiber.lastEffect = null; + fiber.pendingProps = null; + fiber.memoizedProps = null; + fiber.stateNode = null; } function emptyPortalContainer(current: Fiber) { @@ -1485,7 +1481,11 @@ function commitDeletion( // Detach refs and call componentWillUnmount() on the whole subtree. commitNestedUnmounts(finishedRoot, current, renderPriorityLevel); } + const alternate = current.alternate; detachFiber(current); + if (alternate !== null) { + detachFiber(alternate); + } } function commitWork(current: Fiber | null, finishedWork: Fiber): void {
7
diff --git a/src/context/directory/handlers/pages.ts b/src/context/directory/handlers/pages.ts @@ -35,7 +35,7 @@ function parse(context: DirectoryContext): ParsedPages { log.warn(`Skipping pages file ${html} as missing the corresponding '.json' file`); return []; } - if (!html && key === 'error_page') { + if (!html && ['error_page', 'login'].includes(key)) { //Error pages don't require an HTML template, it is valid to redirect errors to URL return { ...loadJSON(meta, context.mappings),
11
diff --git a/src/css/docs/components/docs-markdown.css b/src/css/docs/components/docs-markdown.css @@ -715,11 +715,12 @@ blockquote .DocsMarkdown--header-anchor-positioner { right: 0; bottom: 0; left: 0; - box-shadow: 0 0 0 1px rgba(var(--color-rgb), .15); + box-shadow: inset 0 0 0 1px rgba(var(--color-rgb), .15); pointer-events: none; } .DocsMarkdown--demo iframe { + background: #fff; height: 100%; width: 100%; }
7
diff --git a/modules/Collections/views/entry.php b/modules/Collections/views/entry.php var key = field.name+'_'+lang.code; if ($this.entry[key] === undefined) { + + if (field.options && field.options['default_'+lang.code] === null) { + return; + } + $this.entry[key] = field.options && field.options.default || null; $this.entry[key] = field.options && field.options['default_'+lang.code] || $this.entry[key]; }
11
diff --git a/templates/parent.html b/templates/parent.html padding: 0px 5px; } - .direct-link { margin-top: 22px; } + .direct-link { + margin-top: 22px; + max-width: 500px; + } .direct-link input { box-sizing: border-box; max-width: 500px; .direct-link blockquote { background-color: #f1f1f1; box-sizing: border-box; - font-style: italic; margin: 0; - max-width: 500px; padding: 10px; width: 100%; } + .direct-link blockquote p { + font-size: 14px; + } </style> </head> <body> <!-- end textarea contents --> <div class="direct-link"> - <h2><strong>Direct link</strong> (for users of the iOS app who can't see the embed)</h2> + <h2><strong>Direct link</strong> (for users who can't see the embed &mdash; iOS app, stations, API)</h2> <input value="https://{{ PRODUCTION_S3_BUCKET['bucket_name'] }}/{{ PROJECT_SLUG }}/graphics/{{ slug }}/child.html" /> - <p>Link to the graphic where contextually appropriate in the text that leads into the graphic. For example:</p> + <p>Underneath the graphic embed, in the text of the story, add a prompt with a direct link to the graphic (without this preview frame, embed code, etc.). You can copy/paste the text below directly into Seamus (new editor) and the formatting should be preserved.</p> <blockquote> - <p><a href="https://{{ PRODUCTION_S3_BUCKET['bucket_name'] }}/{{ PROJECT_SLUG }}/graphics/{{ slug }}/child.html">The unemployment rate was unchanged</a> at 4.1 percent, the Bureau of Labor Statistics said in Friday's monthly update on the nation's economic health.</p> - <p>[ HTML asset with embedded chart ]</p> + <p><em><strong><a href="https://{{ PRODUCTION_S3_BUCKET['bucket_name'] }}/{{ PROJECT_SLUG }}/graphics/{{ slug }}/child.html">Don't see the graphic above? Click here.</a></strong></em></p> </blockquote> </div>
3
diff --git a/src/encoded/schemas/biosample.json b/src/encoded/schemas/biosample.json }, "award.rfa": { "title": "RFA" + }, + "nih_institutional_certification": { + "type": "exists", + "title": "Has NIH institutional certification" } }, "columns": {
0
diff --git a/docs/index.md b/docs/index.md @@ -231,7 +231,7 @@ If you are calling Facebook's API, be sure to send an `Accept: application/json` ## Query strings - `res.query(obj)` is a method which may be used to build up a query-string. For example populating `?format=json&dest=/login` on a __POST__: + `req.query(obj)` is a method which may be used to build up a query-string. For example populating `?format=json&dest=/login` on a __POST__: request .post('/')
1
diff --git a/lib/assets/core/test/spec/cartodb3/components/form-components/editors/fill/input-color/asset-picker/asset-header-view.spec.js b/lib/assets/core/test/spec/cartodb3/components/form-components/editors/fill/input-color/asset-picker/asset-header-view.spec.js @@ -12,7 +12,7 @@ describe('components/form-components/editors/fill/input-color/assets-picker/asse this.view = new AssetHeaderView({ title: 'Title', editable: true, - assets: this.assetsCollection + assetsCollection: this.assetsCollection }); this.view.render();
4
diff --git a/articles/extensions/delegated-admin.md b/articles/extensions/delegated-admin.md @@ -7,7 +7,7 @@ toc: true The **Delegated Administration** extension allows you to expose the [Users Dashboard](${manage_url}/#/users) to a group of users, without having to provide access to them to the [dashboard](${manage_url}/#/). Instead the [Users Dashboard](${manage_url}/#/users) is exposed as an Auth0 client. Let's see how this is done. -**NOTE**: This extension is currently available only for the public cloud. It is not yet supported in the [appliance](/appliance). +**NOTE**: This extension is available on the public cloud. On the [appliance](/appliance), it is available beginning with version 10755 when User search is enabled. ## Create a Client
3
diff --git a/userscript.user.js b/userscript.user.js @@ -56214,8 +56214,24 @@ var $$IMU_EXPORT$$; return src.replace(/\/thumb_[0-9]+__([^/]*)(?:[?#]*.*)?$/, "/$1"); } - if (domain_nosub === "best-wallpaper.net" && string_indexof(src, "/wallpaper/") >= 0 && - options && options.do_request && options.cb) { + if (domain_nosub === "best-wallpaper.net") { + newsrc = website_query({ + website_regex: /^[a-z]+:\/\/[^/]+\/+([^/?#]+)_wallpapers\.html(?:[?#].*)?$/, + query_for_id: "https://best-wallpaper.net/${id}_wallpapers.html", + process: function(done, resp, cache_key) { + var match = resp.responseText.match(/<img ID="viewImg"[^>]*data-src="([^">]*)"/); + if (!match) { + console_error(cache_key, "Unable to find match for", resp); + return done(null, false); + } + + done(urljoin(src, match[1], true), 6*60*60); + } + }); + if (newsrc) return newsrc; + } + + if (domain_nosub === "best-wallpaper.net") { // https://best-wallpaper.net/Barbara-Palvin-01_wallpapers.html // https://best-wallpaper.net/wallpaper/m/1205/Barbara-Palvin-01_m.jpg // https://best-wallpaper.net/wallpaper/1920x1200/1205/Barbara-Palvin-01_1920x1200.jpg @@ -56225,29 +56241,9 @@ var $$IMU_EXPORT$$; // https://kr.best-wallpaper.net/wallpaper/1920x1080/1301/The-forest-anime-girl-sitting-on-the-green-grass-red-dress_1920x1080.jpg match = src.match(/\/wallpaper\/+[^/]+\/[0-9]+\/([^/]*)_[^-_/.]+\.[^/.]*$/); if (match) { - options.do_request({ - url: "https://best-wallpaper.net/" + match[1] + "_wallpapers.html", - method: "GET", - onload: function(resp) { - if (resp.readyState === 4) { - if (resp.status !== 200) { - console_log(result); - options.cb(null); - return; - } - - var match = resp.responseText.match(/<img ID="viewImg"[^>]*data-src="([^">]*)"/); - if (match) { - options.cb(urljoin(src, match[1], true)); - } else { - options.cb(null); - } - } - } - }); - return { - waiting: true + url: "https://best-wallpaper.net/" + match[1] + "_wallpapers.html", + is_pagelink: true }; } } @@ -56575,6 +56571,7 @@ var $$IMU_EXPORT$$; if (domain === "cdn.suwalls.com" && options && options.cb && options.do_request) { + // connection refused // https://cdn.suwalls.com/wallpapers/cars/top-view-of-a-2016-mercedes-benz-slc-300-with-open-doors-54147-400x250.jpg // https://cdn.suwalls.com/wallpapers/cars/top-view-of-a-2016-mercedes-benz-slc-300-with-open-doors-54147-3840x2160.jpg -- forces download // https://cdn.suwalls.com/_media/users_40x40/1/Lol_woW.jpg @@ -86808,7 +86805,7 @@ var $$IMU_EXPORT$$; var cond = false; array_foreach(copy_props, function(prop) { // using newhref1 instead of objified because otherwise it'll always be true? (objified is the filled object, all props are in it) - if (!(prop in newhref[0]) && (prop in important_properties) && prop_in_objified(prop, newhref1)) { + if (!(typeof newhref[0] === "object" && (prop in newhref[0])) && (prop in important_properties) && prop_in_objified(prop, newhref1)) { cond = true; return false; }
1
diff --git a/packages/test-utils/src/assert.js b/packages/test-utils/src/assert.js @@ -4,7 +4,6 @@ const truffleAssert = require('truffle-assertions') module.exports = { notEmitted: truffleAssert.eventNotEmitted, emitted: truffleAssert.eventEmitted, - notEmitted: truffleAssert.eventNotEmitted, reverted: truffleAssert.reverts, getResult: truffleAssert.createTransactionResult, passes: truffleAssert.passes,
2
diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js @@ -746,17 +746,14 @@ function generateDefaultWorkspaceName(email = '') { return defaultWorkspaceName; } - // Check if this name already exists in the policies - let count = 0; - _.forEach(allPolicies, (policy) => { - const name = lodashGet(policy, 'name', ''); - - if (name.toLowerCase().includes(defaultWorkspaceName.toLowerCase())) { - count += 1; - } - }); - - return count > 0 ? `${defaultWorkspaceName} ${count + 1}` : defaultWorkspaceName; + // find default named workspaces and increment the last number + const numberRegEx = new RegExp(`${defaultWorkspaceName} ?(\\d*)`, 'i'); + const defaultWorkspaceNumbers = _.chain(allPolicies) + .filter(policy => policy.name && numberRegEx.test(policy.name)) + .map(policy => parseInt(numberRegEx.exec(policy.name)[1] || 1, 10)) // parse the number at the end + .value(); + const lastNumber = defaultWorkspaceNumbers.sort().pop(); + return lastNumber ? `${defaultWorkspaceName} ${lastNumber + 1}` : defaultWorkspaceName; } /**
7
diff --git a/test/debug.js b/test/debug.js ] } */ +const util = require('util'); const parser = require("../src/index"); const ast = parser.parseEval(` -call(); -Foo::$var; +true; `, { parser: { debug: true } } ); -console.log(ast); \ No newline at end of file +console.log( + util.inspect(ast, false, 5, true) +); \ No newline at end of file
4
diff --git a/angular/projects/spark-angular/src/lib/components/sprk-card/sprk-card.stories.ts b/angular/projects/spark-angular/src/lib/components/sprk-card/sprk-card.stories.ts @@ -170,7 +170,7 @@ export const teaserWithCtaIcon = () => ({ ctaType="link" ctaText="Learn More" ctaHref="#nogo" - ctaAnalytics="Button: Spark" + ctaAnalytics="Link: Spark" idString="card-teaser" ctaIcon="chevron-right" >
3
diff --git a/packages/snowboard-theme-winter/winter/components/panels/PlaygroundPanel.svelte b/packages/snowboard-theme-winter/winter/components/panels/PlaygroundPanel.svelte <script> import { isEmpty } from "lodash"; + import { afterUpdate } from 'svelte'; import qs from "querystringify"; import { return param; }); - $: requestHeaders = prepareHeaders( + let requestHeaders = prepareHeaders( config.playground.environments[$env], transition.transactions[0].request.headers ); + let prev = $env; + + afterUpdate(() => { + if (prev != $env) { + prev = $env; + requestHeaders = prepareHeaders( + config.playground.environments[$env], + transition.transactions[0].request.headers + ); + } + }); + $: curl = toCurl({ environment: environment, pathTemplate: transition.pathTemplate,
11
diff --git a/ui/src/components/Toolbar/DownloadButton.jsx b/ui/src/components/Toolbar/DownloadButton.jsx @@ -63,7 +63,9 @@ class DownloadButton extends React.PureComponent { const { intl, document, dontWarnOnDownload } = this.props; const { checkboxChecked, isOpen } = this.state; - if (!document?.links?.file) { + const file = document?.links?.file || document?.links?.csv; + + if (!file) { return null; } @@ -74,7 +76,7 @@ class DownloadButton extends React.PureComponent { position={Position.BOTTOM_RIGHT} > <AnchorButton - href={document.links.file} + href={file} icon="download" download target="_blank" @@ -134,7 +136,7 @@ class DownloadButton extends React.PureComponent { </div> <div className={Classes.ALERT_FOOTER}> <AnchorButton - href={document.links.file} + href={file} icon="download" download target="_blank"
11
diff --git a/_includes/content/github-buttons.html b/_includes/content/github-buttons.html <div class="ui mini horizontal divided link list"> <!-- Display last edited date of the page --> <div class=" disabled item"> - Last edit: {% page.last_modified_at %} + Last edit: {% last_modified_at %} </div> <!-- Link to the page in the Github Repository -->
13
diff --git a/articles/android-workmanager/index.md b/articles/android-workmanager/index.md @@ -21,12 +21,15 @@ To comfortably follow through, you will need: * Basic understanding of the AndroidX Room library. * Basic information of the Kotlin programming language. -This article goes through getting started with `WorkManager` i.e. how to use it and the classes involved. The final code for this tutorial is available on [Github](https://github.com/LinusMuema/kotlin/tree/workManager). Use it as a reference to follow through the article. - Let's get to it. ### Step 1 - Setting up the project -Create an android application and give it a name of your choice. Use the `Empty Activity` template. +To get the starting code for this tutorial, clone the projec from [Github](https://github.com/LinusMuema/kotlin/tree/workManager) and open it in Android Studio. Open the terminal in the IDE and run the following commands to rollback the project. + +```bash +git checkout workManager +git checkout f1a4d683563ffe5c6eb00b3ea91353db0db2ca9a +``` After gradle build finishes, add the following dependencies in the app-level `build.gradle` file @@ -159,7 +162,7 @@ Now that we have our work completely set up. You can go ahead and follow through Once the application starts, it calls the `startWork` function which starts our work. This starts both the `oneTimeWork` and `periodicWork`. The one time work completes immediately and adds one user to the Room database. The `periodicWork` also starts by adding one user to the database and another user after 15 minutes. So after 2 hours, the `periodicWork` will have added 8 users. On the first run the application should show 2 users. One from the `oneTimeWork` and another from the `periodicWork`. ### Conclusion -With that, you have the basic information about `WorkManager`. As you can see, it is easier to schedule background tasks. You are able to run tasks like network calls even if the application closes. A good use case could be backing up data on a different network like cloud services. This can be done when some constraints are met and you have the assurance of your work being done. Go ahead and clone the [repo](https://github.com/LinusMuema/kotlin/tree/workManager) and run the application. Feel free to raise a PR or an issue with any updates. +With that, you have the basic information about `WorkManager`. As you can see, it is easier to schedule background tasks. You are able to run tasks like network calls even if the application closes. A good use case could be backing up data on a different network like cloud services. This can be done when some constraints are met and you have the assurance of your work being done. Feel free to raise a PR or an issue with any updates. --- Peer Review Contributions by: [Peter Kayere](/engineering-education/authors/peter-kayere/)
1
diff --git a/assets/js/modules/analytics/common/account-create.js b/assets/js/modules/analytics/common/account-create.js @@ -37,7 +37,7 @@ import { countries } from '../util/countries-data'; import { STORE_NAME as CORE_SITE } from '../../../googlesitekit/datastore/site/constants'; import Data from 'googlesitekit-data'; import CountrySelect from './country-select'; -import { countriesByCode } from '../util/countries-timezones'; +import { countriesByCode, countryCodesByTimezone } from '../util/countries-timezones'; const { useDispatch, useSelect } = Data; const allCountries = countries.default.country; const countriesByTimeZone = allCountries.reduce( ( map, country ) => { @@ -80,7 +80,7 @@ export default function AccountCreate() { const [ propertyName, setPropertyName ] = useState( url.hostname ); const [ profileName, setProfileName ] = useState( __( 'All website traffic', 'google-site-kit' ) ); const [ timezone, setTimezone ] = useState( tz ); - const [ countryCode, setCountryCode ] = useState( '' ); + const [ countryCode, setCountryCode ] = useState( countryCodesByTimezone[ tz ] ); const [ validationIssues, setValidationIssues ] = useState( {} ); const validationHasIssues = Object.values( validationIssues ).some( Boolean );
12
diff --git a/src/translations/translationHelper.js b/src/translations/translationHelper.js @@ -7,9 +7,11 @@ export const toObject = (body) => { const object = {}; const lines = body.split(/\n/); lines.forEach((line) => { - const message = line.split(':'); - if (message.length === 2) { - object[message[0].trim()] = message[1].trim(); + const separatorPosition = line.indexOf(':'); + const key = separatorPosition > 0 ? line.slice(0, separatorPosition) : ''; + const value = separatorPosition > 0 ? line.slice(separatorPosition + 1) : ''; + if (key && value) { + object[key.trim()] = value.trim(); } }); return object;
11
diff --git a/edit.html b/edit.html <img class="img secondary" src="https://preview.exokit.org/[https://raw.githubusercontent.com/avaer/vrm-samples/master/vroid/male.vrm]/preview.jpg"> <div class="name secondary" id=profile-label>Anomymous</div> </div> + <div class="nav icon" tab=features> + <img class="img secondary disabled" src="https://preview.exokit.org/[https://raw.githubusercontent.com/avaer/vrm-samples/master/vroid/male.vrm]/preview.jpg"> + <div class="name secondary disabled">Features</div> + </div> <div class="nav icon" tab=prefabs> <img class="img secondary disabled" src="https://preview.exokit.org/[https://raw.githubusercontent.com/avaer/vrm-samples/master/vroid/male.vrm]/preview.jpg"> <div class="name secondary disabled">Prefabs</div>
0
diff --git a/Source/Renderer/ModernizeShader.js b/Source/Renderer/ModernizeShader.js @@ -145,14 +145,14 @@ define([ throw new DeveloperError('Could not find a #define OUTPUT_DECLARATION!'); } - var variableSet = []; + var outputVariables = []; for (var i = 0; i < 10; i++) { var fragDataString = 'gl_FragData\\[' + i + '\\]'; var newOutput = 'czm_out' + i; var regex = new RegExp(fragDataString, 'g'); if (regex.test(source)) { - setAdd(newOutput, variableSet); + setAdd(newOutput, outputVariables); replaceInSourceString(fragDataString, newOutput, splitSource); splitSource.splice(outputDeclarationLine, 0, 'layout(location = ' + i + ') out vec4 ' + newOutput + ';'); outputDeclarationLine += 1; @@ -161,13 +161,13 @@ define([ var czmFragColor = 'czm_fragColor'; if (findInSource('gl_FragColor', splitSource)) { - setAdd(czmFragColor, variableSet); + setAdd(czmFragColor, outputVariables); replaceInSourceString('gl_FragColor', czmFragColor, splitSource); splitSource.splice(outputDeclarationLine, 0, 'layout(location = 0) out vec4 czm_fragColor;'); outputDeclarationLine += 1; } - var variableMap = getVariablePreprocessorBranch(variableSet, splitSource); + var variableMap = getVariablePreprocessorBranch(outputVariables, splitSource); var lineAdds = {}; for (var c = 0; c < splitSource.length; c++) { var l = splitSource[c];
10
diff --git a/assets/sass/components/global/_googlesitekit-tab-bar.scss b/assets/sass/components/global/_googlesitekit-tab-bar.scss line-height: 1; &:first-child { - border-radius: $br-md 0 0 $br-md; + border-radius: $br-sm 0 0 $br-sm; overflow: hidden; } &:last-child { - border-radius: 0 $br-md $br-md 0; + border-radius: 0 $br-sm $br-sm 0; overflow: hidden; } }
12
diff --git a/lib/waterline/utils/query/help-find.js b/lib/waterline/utils/query/help-find.js @@ -50,6 +50,9 @@ var getModel = require('../ontology/get-model'); module.exports = function helpFind(WLModel, s2q, omen, done) { + if (!_.isFunction(done)) { + throw new Error('Consistency violation: `done` (4th argument) should be a function'); + } if (!WLModel) { return done(new Error('Consistency violation: Live Waterline model should be provided as the 1st argument')); } @@ -59,9 +62,6 @@ module.exports = function helpFind(WLModel, s2q, omen, done) { if (!omen) { return done(new Error('Consistency violation: Omen should be provided as the 3rd argument')); } - if (!_.isFunction(done)) { - return done(new Error('Consistency violation: `done` (4th argument) should be a function')); - } // Set up a few, common local vars for convenience / familiarity. var orm = WLModel.waterline;
7
diff --git a/lib/index-strict.js b/lib/index-strict.js @@ -33,6 +33,9 @@ Plotly.register([ require('./scattergeo'), require('./choropleth'), + require('./scattergl'), + require('./splom'), + require('./parcoords'), require('./parcats'), @@ -53,6 +56,7 @@ Plotly.register([ require('./candlestick'), require('./scatterpolar'), + require('./scatterpolargl'), require('./barpolar') ]);
0
diff --git a/server/game/gamesteps/setup/setupprovincesprompt.js b/server/game/gamesteps/setup/setupprovincesprompt.js @@ -88,6 +88,7 @@ class SetupProvincesPrompt extends AllPlayerPrompt { return false; } + this.strongholdProvince[player.uuid].inConflict = false; this.clickedDone[player.uuid] = true; this.game.addMessage('{0} has placed their provinces', player); player.moveCard(this.strongholdProvince[player.uuid], 'stronghold province');
2
diff --git a/app/components/ui-table-server.js b/app/components/ui-table-server.js @@ -120,11 +120,13 @@ export default ModelsTable.extend({ let globalFilter = get(this, 'customGlobalFilter'); if (globalFilter) { + if (filterString) { query.filter.pushObject({ name : globalFilter, op : 'ilike', val : `%${filterString}%` }); + } } else { query.filter.removeObject({ name : globalFilter,
7
diff --git a/token-metadata/0x9fBFed658919A896B5Dc7b00456Ce22D780f9B65/metadata.json b/token-metadata/0x9fBFed658919A896B5Dc7b00456Ce22D780f9B65/metadata.json "symbol": "PLT", "address": "0x9fBFed658919A896B5Dc7b00456Ce22D780f9B65", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/base/index.js b/src/base/index.js @@ -5,8 +5,8 @@ const SiteConfig = require('./site-config') const openBrowser = require('../utils/open-browser') const API = require('../utils/api') -// Netlify CLI client id -// Lives in [email protected] +// Netlify CLI client id. Lives in [email protected] +// Todo setup client for multiple environments const CLIENT_ID = 'd6f37de6614df7ae58664cfca524744d73807a377f5ee71f1a254f78412e3750' class BaseCommand extends Command { @@ -14,19 +14,54 @@ class BaseCommand extends Command { super(...args) this.global = globalConfig this.site = new SiteConfig(process.cwd()) - this.netlify = new API(globalConfig.get('accessToken')) + const currentUser = globalConfig.get('userId') + const token = globalConfig.get(`users.${currentUser}.auth.token`) + this.netlify = new API(token) } async authenticate() { - if (this.global.get('accessToken')) { - return + const currentUser = this.global.get('userId') + const token = this.global.get(`users.${currentUser}.auth.token`) + if (token) { + return token } + this.log(`Logging into your Netlify account...`) - const client = this.netlify - const ticket = await client.createTicket({ clientId: CLIENT_ID }) + + // Create ticket for auth + const ticket = await this.netlify.createTicket({ + clientId: CLIENT_ID + }) + + // Open browser for authentication await openBrowser(`https://app.netlify.com/authorize?response_type=ticket&ticket=${ticket.id}`) - const accessToken = await client.getAccessToken(ticket) - this.global.set('accessToken', accessToken) + + const accessToken = await this.netlify.getAccessToken(ticket) + + if (accessToken) { + const accounts = await this.netlify.listAccountsForUser() + const accountInfo = accounts.find(account => account.type === 'PERSONAL') + const userID = accountInfo.owner_ids[0] + + const userData = { + id: userID, + name: accountInfo.name || accountInfo.billing_name, + email: accountInfo.billing_email, + slug: accountInfo.slug, + auth: { + token: accessToken, + github: { + user: null, + token: null + } + } + } + // Set current userId + this.global.set('userId', userID) + // Set user data + this.global.set(`users.${userID}`, userData) + + } this.log() this.log(`${chalk.greenBright('You are now logged into your Netlify account!')}`) this.log()
3
diff --git a/Dockerfile b/Dockerfile -FROM node:12 +FROM node:12 AS builder COPY . /app RUN cd /app \ && npm install \ && npm run bootstrap \ - && npm run build + && npm run build \ + && npm run manifest \ + && npm run pack-linux \ + && mkdir /doc \ + && tar -zxf packages/snowboard/dist/snowboard-*/snowboard-*-linux-x64.tar.gz -C . \ + && rm snowboard/bin/node + +FROM gcr.io/distroless/nodejs:12 + +COPY --from=builder /app/snowboard /snowboard +COPY --from=builder --chown=nonroot:nonroot /doc /doc -EXPOSE 8087 8088 WORKDIR /doc -ENTRYPOINT ["/app/packages/snowboard/bin/run"] +USER nonroot + +EXPOSE 8087 8088 + +ENTRYPOINT ["/nodejs/bin/node", "/snowboard/bin/run"] CMD ["help"]
4
diff --git a/src/ApiGateway.js b/src/ApiGateway.js @@ -308,7 +308,7 @@ module.exports = class ApiGateway { parse: true, }; - const routeConfig = { + const routeOptions = { auth: authStrategyName, cors, state, @@ -328,7 +328,7 @@ module.exports = class ApiGateway { if (routeMethod !== 'HEAD' && routeMethod !== 'GET') { // maxBytes: Increase request size from 1MB default limit to 10MB. // Cf AWS API GW payload limits. - routeConfig.payload = { + routeOptions.payload = { maxBytes: 1024 * 1024 * 10, parse: false, }; @@ -337,8 +337,8 @@ module.exports = class ApiGateway { const lambdaFunction = new LambdaFunction(funOptions, this.options); this.server.route({ - config: routeConfig, method: routeMethod, + options: routeOptions, path: fullPath, handler: async (request, h) => { // Here we go @@ -960,7 +960,7 @@ module.exports = class ApiGateway { } const routeMethod = method === 'ANY' ? '*' : method; - const routeConfig = { cors: this.options.corsConfig }; + const routeOptions = { cors: this.options.corsConfig }; // skip HEAD routes as hapi will fail with 'Method name not allowed: HEAD ...' // for more details, check https://github.com/dherault/serverless-offline/issues/204 @@ -973,13 +973,12 @@ module.exports = class ApiGateway { } if (routeMethod !== 'HEAD' && routeMethod !== 'GET') { - routeConfig.payload = { parse: false }; + routeOptions.payload = { parse: false }; } serverlessLog(`${method} ${fullPath} -> ${proxyUriInUse}`); this.server.route({ - config: routeConfig, handler: (request, h) => { const { params } = request; let resultUri = proxyUriInUse; @@ -1002,6 +1001,7 @@ module.exports = class ApiGateway { }); }, method: routeMethod, + options: routeOptions, path: fullPath, }); }); @@ -1014,7 +1014,6 @@ module.exports = class ApiGateway { } this.server.route({ - config: { cors: this.options.corsConfig }, handler: (request, h) => { const response = h.response({ currentRoute: `${request.method} - ${request.path}`, @@ -1031,6 +1030,9 @@ module.exports = class ApiGateway { return response; }, method: '*', + options: { + cors: this.options.corsConfig, + }, path: '/{p*}', }); }
10
diff --git a/grails-app/conf/application.yml b/grails-app/conf/application.yml @@ -152,7 +152,7 @@ grails: streama: regex: - movies: ^(?<Name>.*)[._ ]\(\d{4}\).* + movies: ^(?<Name>.*)?[._ \(]+\d{4}.* shows: - ^(?<Name>.+)[._ ][Ss](?<Season>\d{2})[Ee](?<Episode>\d{2,3}).* # example: "House.MD.S03E04.h264.mp4" - ^(?<Name>.+)[._ ](?<Season>\d{1,2})x(?<Episode>\d{2,3}).* # example: "House.MD.03x04.h264.mp4"
7
diff --git a/lib/plugins/analysisstorer/index.js b/lib/plugins/analysisstorer/index.js @@ -27,7 +27,9 @@ function shouldIgnoreMessage(message) { 's3.finished', 'gcs.finished', 'ftp.finished', - 'graphite.setup' + 'graphite.setup', + 'influxdb.setup', + 'grafana.setup' ].indexOf(message.type) >= 0 ); }
8
diff --git a/articles/product-lifecycle/migrations.md b/articles/product-lifecycle/migrations.md @@ -27,7 +27,7 @@ We are actively migrating customers to new behaviors for all **Deprecations** li <td><a href="/migrations/guides/management-api-v1-v2">Management API v1</a></td> <td>October 2016</td> <td> - <strong>Public Cloud</strong>: 6 July 2020<br> + <strong>Public Cloud</strong>: 13 July 2020<br> <strong>Private Cloud</strong>: November 2020 release<br> </td> <td>Management API v1 will reach its End of Life on July 6, 2020. You may be required to take action before that date to ensure no interruption to your service. A <a href="/migrations/guides/management-api-v1-v2">migration guide</a> is available to walk you through the steps required. Notifications have been and will continue to be sent to customers that need to complete this migration.<br>Useful Resources:<br>
3
diff --git a/Bundle/MediaBundle/Resources/views/Media/create.html.twig b/Bundle/MediaBundle/Resources/views/Media/create.html.twig {% form_theme form 'VictoireMediaBundle:Form:fields.html.twig' %} {{ form_start(form) }} - {{ form_row(form.name) }} - {{ form_widget(form.file) }} {{ form_rest(form) }} <div class="prop_wrp"> <div class="input_prop">
4
diff --git a/config/webpack.config.js b/config/webpack.config.js @@ -4,23 +4,23 @@ const webpack = require( "webpack" ); const webpackAssetsPath = path.join( "app", "webpack" ); const config = { - mode: "none", + mode: "production", context: path.resolve( webpackAssetsPath ), entry: { // list out the various bundles we need to make for different apps - // "observations-identify": "./observations/identify/webpack-entry", + "observations-identify": "./observations/identify/webpack-entry", "observations-uploader": "./observations/uploader/webpack-entry", - // "project-slideshow": "./project_slideshow/webpack-entry", - // "taxa-show": "./taxa/show/webpack-entry", - // "taxa-photos": "./taxa/photos/webpack-entry", + "project-slideshow": "./project_slideshow/webpack-entry", + "taxa-show": "./taxa/show/webpack-entry", + "taxa-photos": "./taxa/photos/webpack-entry", "observations-show": "./observations/show/webpack-entry", - // "observations-torque": "./observations/torque/webpack-entry", - // "computer-vision": "./computer_vision/webpack-entry", - // "search-slideshow": "./search_slideshow/webpack-entry", - // "stats-year": "./stats/year/webpack-entry", - // "projects-form": "./projects/form/webpack-entry", - // "projects-show": "./projects/show/webpack-entry", - // "observations-compare": "./observations/compare/webpack-entry" + "observations-torque": "./observations/torque/webpack-entry", + "computer-vision": "./computer_vision/webpack-entry", + "search-slideshow": "./search_slideshow/webpack-entry", + "stats-year": "./stats/year/webpack-entry", + "projects-form": "./projects/form/webpack-entry", + "projects-show": "./projects/show/webpack-entry", + "observations-compare": "./observations/compare/webpack-entry" }, output: { // each bundle will be stored in app/assets/javascripts/[name].output.js
13
diff --git a/components/Account/NewsletterSubscriptions.js b/components/Account/NewsletterSubscriptions.js @@ -39,7 +39,9 @@ const styles = { export const RESUBSCRIBE_EMAIL = gql` mutation resubscribeEmail($userId: ID!) { - resubscribeEmail(userId: $userId) + resubscribeEmail(userId: $userId) { + status + } } ` @@ -95,12 +97,19 @@ const NewsletterSubscriptions = props => ( <Mutation mutation={RESUBSCRIBE_EMAIL}> {(mutate, { loading, error, data: mutationData }) => ( <> - {!mutationData && ( + {!mutationData && status !== 'pending' && ( <P>{t('account/newsletterSubscriptions/unsubscribed')}</P> )} {!error && mutationData?.resubscribeEmail && ( <P>{t('account/newsletterSubscriptions/resubscribed')}</P> )} + {status === 'pending' && ( + <P> + {t( + 'account/newsletterSubscriptions/resubscribeEmailPending' + )} + </P> + )} <div style={{ marginTop: 10 }}> {!mutationData && ( <> @@ -118,7 +127,13 @@ const NewsletterSubscriptions = props => ( }) } > - {t('account/newsletterSubscriptions/resubscribe')} + {status !== 'pending' + ? t( + 'account/newsletterSubscriptions/resubscribe' + ) + : t( + 'account/newsletterSubscriptions/resendResubscribeEmail' + )} </Button> )} </>
9
diff --git a/token-metadata/0x5BEfBB272290dD5b8521D4a938f6c4757742c430/metadata.json b/token-metadata/0x5BEfBB272290dD5b8521D4a938f6c4757742c430/metadata.json "symbol": "XFI", "address": "0x5BEfBB272290dD5b8521D4a938f6c4757742c430", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/components/shapes/defaults.js b/src/components/shapes/defaults.js @@ -32,8 +32,10 @@ function handleShapeDefaults(shapeIn, shapeOut, fullLayout) { var visible = coerce('visible'); if(!visible) return; - var dfltType = shapeIn.path ? 'path' : 'rect'; + var path = coerce('path'); + var dfltType = path ? 'path' : 'rect'; var shapeType = coerce('type', dfltType); + if(shapeOut.type !== 'path') delete shapeOut.path; coerce('editable'); coerce('layer');
7
diff --git a/token-metadata/0x1dA01e84F3d4e6716F274c987Ae4bEE5DC3C8288/metadata.json b/token-metadata/0x1dA01e84F3d4e6716F274c987Ae4bEE5DC3C8288/metadata.json "symbol": "BID", "address": "0x1dA01e84F3d4e6716F274c987Ae4bEE5DC3C8288", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/app/classifier/tasks/shortcut/shortcut.spec.js b/app/classifier/tasks/shortcut/shortcut.spec.js @@ -52,7 +52,7 @@ describe('Shortcut functionality', function () { }); it('should show an active button with a shortcut', function () { - assert.equal(wrapper.find('label').first().hasClass('active'), true); + assert.equal(wrapper.find('label[htmlFor="shortcut-1"]').hasClass('active'), true); }); it('should remove shortcut when deselected', function () {
1
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml @@ -36,11 +36,11 @@ jobs: asset: ".deb" - name: Upload .deb to Pulp - uses: docker://kong/release-script:1.7.0 + uses: docker://kong/release-script:latest env: PULP_USERNAME: ${{ secrets.PULP_USERNAME }} PULP_PASSWORD: ${{ secrets.PULP_PASSWORD }} PULP_HOST: ${{ secrets.PULP_HOST }} with: entrypoint: python3 - args: '/usr/src/code/main.py --file ${{ steps.download.outputs.name }} --dist-name ubuntu --dist-version focal --package-type insomnia --publish' + args: '/usr/src/code/main.py release --file ${{ steps.download.outputs.name }} --dist-name ubuntu --dist-version focal --package-type insomnia --publish'
4
diff --git a/assets/js/util/cache-data.js b/assets/js/util/cache-data.js @@ -90,8 +90,7 @@ rl.question( 'Username: ', ( username ) => { html = html.replace( /"apikey":"(.*?)"/gi, '"apikey":"12345678"' ); // Account data - html = html.replace( /"email":"(.*?)","name":"(.*?)"/gi, '"email":"[email protected]","name":"Wapuu WordPress"' ); - html = html.replace( /"picture":"(.*?)"/gi, '"picture":""' ); + html = html.replace( /"email":"(.*?)","name":"(.*?)","picture":"(.*?)"/gi, '"email":"[email protected]","name":"Wapuu WordPress","picture":""' ); // Misc remaining strings. html = html.replace( /10up/gi, 'google' );
7
diff --git a/token-metadata/0xcDd0A6B15B49A9eb3Ce011CCE22FAc2ccf09ecE6/metadata.json b/token-metadata/0xcDd0A6B15B49A9eb3Ce011CCE22FAc2ccf09ecE6/metadata.json "symbol": "TARM", "address": "0xcDd0A6B15B49A9eb3Ce011CCE22FAc2ccf09ecE6", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/closure/goog/html/sanitizer/csspropertysanitizer_test.js b/closure/goog/html/sanitizer/csspropertysanitizer_test.js @@ -166,9 +166,9 @@ testSuite({ // Safari is the only browser that resolves relative URLs. assertTrue( getProcessedPropertyValue('background-image', 'url(/foo.com/a.jpg)') - .startsWith(product.SAFARI ? 'url(http://' : 'url("/foo.com')); + .startsWith(product.SAFARI ? 'url("http://' : 'url("/foo.com')); assertTrue(getProcessedPropertyValue('background-image', 'url(a.jpg)') - .startsWith(product.SAFARI ? 'url(http://' : 'url("a.jpg')); + .startsWith(product.SAFARI ? 'url("http://' : 'url("a.jpg')); }, testSanitizeProperty_basic() {
1
diff --git a/token-metadata/0x4e352cF164E64ADCBad318C3a1e222E9EBa4Ce42/metadata.json b/token-metadata/0x4e352cF164E64ADCBad318C3a1e222E9EBa4Ce42/metadata.json "symbol": "MCB", "address": "0x4e352cF164E64ADCBad318C3a1e222E9EBa4Ce42", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/docs/api/README.md b/docs/api/README.md @@ -139,7 +139,7 @@ The method returns a [Task descriptor](#task-descriptor). `saga` must be a function which returns a [Generator Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator). The middleware will then iterate over the Generator and execute all yielded Effects. -`saga` may also start other sagas using the various Effects provided by the library. The iteration process process described below is also applied to all child sagas. +`saga` may also start other sagas using the various Effects provided by the library. The iteration process described below is also applied to all child sagas. In the first iteration, the middleware invokes the `next()` method to retrieve the next Effect. The middleware then executes the yielded Effect as specified by the Effects API below. Meanwhile, the Generator will be suspended until the effect execution terminates. Upon receiving the result of the execution, the middleware calls `next(result)` on the Generator passing it the retrieved result as an argument. This process is repeated until the Generator terminates normally or by throwing some error.
2
diff --git a/src/embeds/EarthCycleEmbed.js b/src/embeds/EarthCycleEmbed.js @@ -15,7 +15,7 @@ class EarthCycleEmbed extends BaseEmbed { super(); this.color = state.isDay ? 0x00ff00 : 0x000066; - this.title = `[${platform.toUpperCase()}] Worldstate - Earth Cycle`; + this.title = 'Worldstate - Earth Cycle'; this.thumbnail = { url: 'http://vignette1.wikia.nocookie.net/warframe/images/1/1e/Earth.png', };
2
diff --git a/src/pages/EnterpriseSetting/infrastructure.js b/src/pages/EnterpriseSetting/infrastructure.js @@ -26,7 +26,7 @@ import OauthTable from './oauthTable'; objectStorageLongin: loading.effects['global/editCloudBackup'], overviewInfo: index.overviewInfo })) -export default class Infrastructure extends PureComponent { +class Infrastructure extends PureComponent { constructor(props) { super(props); const { enterprise } = this.props; @@ -53,7 +53,6 @@ export default class Infrastructure extends PureComponent { ] }; } - componentDidMount() { const { dispatch } = this.props; dispatch({ @@ -357,7 +356,6 @@ export default class Infrastructure extends PureComponent { } } = this.props; let infos = {}; - if (rainbondInfo) { const fetchLogo = rainbondUtil.fetchLogo(rainbondInfo, enterprise) || defaultLogo; @@ -711,3 +709,17 @@ export default class Infrastructure extends PureComponent { ); } } + +// eslint-disable-next-line react/no-multi-comp +@connect(({ global }) => ({ + enterprise: global.enterprise +})) +export default class Index extends PureComponent { + render() { + const { enterprise } = this.props; + if (enterprise) { + return <Infrastructure {...this.props} />; + } + return null; + } +}
1
diff --git a/404.js b/404.js @@ -130,7 +130,7 @@ const _setUrl = async u => { currentUrl = u; let match; - if (match = u.match(/^(?:\/(store))?(?:\/(users)(?:\/([0xa-f0-9]+))?)?(?:\/(items)(?:\/([0-9]+))?)?(?:\/)?$/i)) { + if (match = u.match(/^(?:\/(store))?(?:\/(users)(?:\/([0xa-f0-9]+))?)?(?:\/(items)(?:\/([0-9]+))?)?(?:\/)?(?:\/(mint))?$/i)) { // _ensureStore(); const store = !!match[1]; @@ -138,6 +138,7 @@ const _setUrl = async u => { const address = match[3]; const items = !!match[4]; const tokenId = match[5]; + const mint = match[6]; if (store) { // store _setStoreHtml(`\ @@ -391,6 +392,14 @@ const _setUrl = async u => { } _selectTabIndex(3); + } else if (mint) { + _setStoreHtml(`\ + <section class=profile> + mint + </section> + `); + + _selectTabIndex(0); } else { // home _setStoreHtml(`\ <section class=profile> @@ -414,11 +423,20 @@ const _setUrl = async u => { </a> </div> <!-- <a href="edit.html" class=big-button>Goto HomeSpace</a> --> - <button class=big-button>Mint NFT...</button> - <button class=big-button>Withdraw to mainnet...</button> + <a href="/mint" class=big-button id=mint-link>Mint NFT...</a> + <a class=big-button>Withdraw to mainnet...</a> </section> `); + const mintLinkEl = document.querySelector('#mint-link'); + mintLinkEl.addEventListener('click', e => { + e.preventDefault(); + // e.stopPropagation(); + + const href = e.target.getAttribute('href'); + _pushState(href); + }); + _selectTabIndex(0); } } else {
0
diff --git a/OurUmbraco/Community/Controllers/GitHubContributorController.cs b/OurUmbraco/Community/Controllers/GitHubContributorController.cs @@ -157,7 +157,11 @@ namespace OurUmbraco.Community.Controllers foreach (var group in filteredContributors) { - temp.Add(new GitHubGlobalContributorModel(group)); + var contributor = new GitHubGlobalContributorModel(group); + if (contributor.TotalCommits > 0) + { + temp.Add(contributor); + } } return temp;
2
diff --git a/src/js/controllers/import.js b/src/js/controllers/import.js @@ -166,7 +166,7 @@ angular.module('copayApp.controllers').controller('importController', function(next) { // restore wallet focused profile fileSystemService.readFile(dbDirPath + 'temp/' + 'focusedWalletId', function(err, data) { - if(err) return next(err); + if(err) return next(); storageService.storeFocusedWalletId(data, next); storageService.storeFocusedWalletId = function(){}; });
8
diff --git a/packages/2019-housing/src/components/HouseholdIncomeByRace/HouseholdIncomeByRaceVisualization.js b/packages/2019-housing/src/components/HouseholdIncomeByRace/HouseholdIncomeByRaceVisualization.js @@ -20,13 +20,6 @@ const HouseholdIncomeByRaceVisualization = ({ data }) => { return ( data && ( - <span> - <strong style={{ color: "crimson" }}> - Visualization TODO: - <ul> - <li>Figure out why dot colors do not match lines...</li> - </ul> - </strong> <LineChart data={data.householdIncomeByRace.value.results} dataKey="year" @@ -45,7 +38,6 @@ const HouseholdIncomeByRaceVisualization = ({ data }) => { yNumberFormatter={y => civicFormat.dollars(y)} protect /> - </span> ) ); };
2
diff --git a/renderer/components/langUtils.js b/renderer/components/langUtils.js -/* global require */ import osLocale from 'os-locale' const defaultLocale = 'en' -const defaultLocaleName = 'English' export const getMessages = (locale = null) => { let supportedMessages = { @@ -13,7 +11,7 @@ export const getMessages = (locale = null) => { supportedMessages = window.OONITranslations } - if (supportedMessages.hasOwnProperty(locale)) { + if (locale in supportedMessages) { const mergedMessages = Object.assign( {}, supportedMessages[defaultLocale], @@ -21,7 +19,7 @@ export const getMessages = (locale = null) => { ) return mergedMessages } else { - return supportedMessages + return supportedMessages[defaultLocale] } }
1
diff --git a/package.json b/package.json "name": "find-and-replace", "main": "./lib/find", "description": "Find and replace within buffers and across the project.", - "version": "0.214.0", + "version": "0.215.0", "license": "MIT", "activationCommands": { "atom-workspace": [
6
diff --git a/src/Window.js b/src/Window.js @@ -1204,7 +1204,7 @@ const _normalizeUrl = utils._makeNormalizeUrl(options.baseUrl); const _bindXrFramebuffer = () => { if (vrPresentState.glContext) { nativeWindow.setCurrentWindowContext(vrPresentState.glContext.getWindowHandle()); - vrPresentState.glContext.setDefaultFramebuffer(vrPresentState.fbo); + // vrPresentState.glContext.setDefaultFramebuffer(vrPresentState.fbo); nativeWindow.bindVrChildFbo(vrPresentState.glContext, vrPresentState.fbo, xrState.tex[0], xrState.depthTex[0]); } }; @@ -1369,6 +1369,7 @@ const _normalizeUrl = utils._makeNormalizeUrl(options.baseUrl); }; const _onmakeswapchain = context => { if (vrPresentState.glContext) { + vrPresentState.glContext.setDefaultFramebuffer(vrPresentState.glContext.framebuffer.msFbo); vrPresentState.glContext.setTopLevel(true); } @@ -1376,6 +1377,7 @@ const _normalizeUrl = utils._makeNormalizeUrl(options.baseUrl); vrPresentState.glContext = context; vrPresentState.fbo = context.createFramebuffer().id; + vrPresentState.glContext.setDefaultFramebuffer(vrPresentState.fbo); return { fbo: vrPresentState.fbo,
12
diff --git a/sounds.js b/sounds.js @@ -31,9 +31,19 @@ const waitForLoad = () => loadPromise; const getSoundFiles = () => soundFiles; const getSoundFileAudioBuffer = () => soundFileAudioBuffer; +const playSound = audioSpec => { + const {offset, duration} = audioSpec; + + const audioContext = Avatar.getAudioContext(); + const audioBufferSourceNode = audioContext.createBufferSource(); + audioBufferSourceNode.buffer = soundFileAudioBuffer; + audioBufferSourceNode.connect(audioContext.destination); + audioBufferSourceNode.start(0, offset, duration); +}; export { waitForLoad, getSoundFiles, getSoundFileAudioBuffer, + playSound, }; \ No newline at end of file
0
diff --git a/src/traces/funnel/calc.js b/src/traces/funnel/calc.js @@ -30,6 +30,9 @@ module.exports = function calc(gd, trace) { var serieslen = Math.min(pos.length, size.length); var cd = new Array(serieslen); + // Unlike other bar-like traces funnels do not support base attribute. + // bases for funnels are computed internally in a way that + // the mid-point of each bar are located on the axis line. trace._base = []; // set position and size @@ -50,7 +53,7 @@ module.exports = function calc(gd, trace) { cNext: connectToNext }; - trace._base[i] = -0.5 * size[i]; + trace._base[i] = -0.5 * cdi.s; if(trace.ids) { cdi.id = String(trace.ids[i]);
0
diff --git a/src/data/event.js b/src/data/event.js @@ -20,7 +20,8 @@ export type Event = { ticketingUrl: { [string]: string }, venueDetails: { [string]: string[] }, individualEventPicture: LocalizedFieldRef, - eventsListPicture: LocalizedFieldRef + eventsListPicture: LocalizedFieldRef, + performances: { [string]: Performance[] } }, sys: { id: string, @@ -34,6 +35,23 @@ export type Event = { } }; +export type Performance = { + fields: { + title: { [string]: string }, + startTime: { [string]: string } + }, + sys: { + id: string, + type: string, + contentType: { + sys: { + id: "performance" + } + }, + revision: number + } +}; + export type FeaturedEvents = { fields: { title: { [string]: string },
0
diff --git a/src/encoded/schemas/tale.json b/src/encoded/schemas/tale.json "descrition": "The target genome sequence recognized by the TALE domain.", "type": "string", "pattern": "^[ACTG]+$" + }, + "vector_backbone_name": { + "title": "Backbone name", + "description": "The cloning vector used to make the construct. E.g. PEGFP (delGFP-TAL2-truncNLS)", + "type": "string", + "permission": "import_items", + "pattern": "^(\\S+(\\s|\\S)*\\S+|\\S)$" } }, "facets": {
0
diff --git a/README.md b/README.md @@ -14,9 +14,6 @@ These tools have been introduced by Adobe to document Adobe's Experience Data Mo ## Installing and running ```bash -# clone XDM project -$ git clone [email protected]:adobe/xdm.git - # clone this project $ git clone [email protected]:adobe/jsonschema2md.git @@ -27,8 +24,8 @@ $ cd jsonschema2md && npm install $ node cli.js # run task -$ node cli.js -d ../xdm/schemas/external/ -# generated output for whole folder is written to ./out +$ node cli.js -d examples/schemas -o examples/docs +# generated output for whole folder is written to ./examples/docs ``` ### Installing the `jsonschema2md` Command Line Tools @@ -47,7 +44,7 @@ You can conveniently use the JSON Schema Markdown Tools from `npm`. This makes i ```json "devDependencies": { - "jsonschema2md": "^1.0.0" + "jsonschema2md": "^1.0.1" } ```
6
diff --git a/src/editor/components/ContribListComponent.js b/src/editor/components/ContribListComponent.js @@ -73,7 +73,7 @@ export default class ContribsListComponent extends NodeComponent { el.append(contentEl) el.append( $$('button').addClass('sc-button sm-style-big').append( - 'Edit ', + 'Manage ', labelProvider.getLabel(this.getPropertyName()) ).on('click', this._editContribs) )
4
diff --git a/src/library/modules/AntiAir.js b/src/library/modules/AntiAir.js @@ -686,27 +686,29 @@ AntiAir: anti-air related calculations // return: a list of sorted AACI objects order by effect desc, // as most effective AACI gets priority to be triggered. // param: AACI IDs from possibleAACIs functions - function sortedPossibleAaciList(aaciIds) { + // param: a optional callback function to customize ordering + function sortedPossibleAaciList(aaciIds, sortCallback) { var aaciList = []; + if(!!aaciIds && Array.isArray(aaciIds)) { $.each( aaciIds, function(i, apiId) { if(!!AACITable[apiId]) aaciList.push( AACITable[apiId] ); }); - aaciList = aaciList.sort(function(a, b) { + var defaultOrder = function(a, b) { // Order by fixed desc, modifier desc, icons[0] desc - var c = b.fixed - a.fixed + return b.fixed - a.fixed || b.modifier - a.modifier || b.icons[0] - a.icons[0]; - return c; - }); + }; + aaciList = aaciList.sort(sortCallback || defaultOrder); + } return aaciList; } - function sortedFleetPossibleAaciList(triggeredShipAaciList) { - var aaciList = triggeredShipAaciList.sort(function(a, b) { + function sortedFleetPossibleAaciList(triggeredShipAaciIds) { + return sortedPossibleAaciList(triggeredShipAaciIds, function(a, b) { // Order by (API) id desc return b.id - a.id; - }) || []; - return aaciList; + }); } function shipFixedShotdownRange(shipObj, fleetObj, formationModifier) { @@ -722,7 +724,13 @@ AntiAir: anti-air related calculations } function shipFixedShotdownRangeWithAACI(shipObj, fleetObj, formationModifier) { - var possibleAaciList = sortedPossibleAaciList(fleetPossibleAACIs(fleetObj)); + var possibleAaciList = sortedPossibleAaciList(fleetPossibleAACIs(fleetObj), + function(a, b){ + // Order by modifier desc, fixed desc, icons[0] desc + return b.modifier - a.modifier + || b.fixed - a.fixed + || b.icons[0] - a.icons[0]; + }); var aaciId = possibleAaciList.length > 0 ? possibleAaciList[0].id : 0; var mod = possibleAaciList.length > 0 ? possibleAaciList[0].modifier : 1; return [ shipFixedShotdown(shipObj, fleetObj, formationModifier, 1),
7
diff --git a/test/jasmine/tests/bar_test.js b/test/jasmine/tests/bar_test.js @@ -2026,9 +2026,6 @@ describe('A bar plot', function() { .then(done); }); - it('should show up narrow bars as thin bars', function(done) { - var mock = Lib.extendDeep({}, require('@mocks/bar_show_narrow.json')); - function getArea(path) { var pos = path .substr(1, path.length - 2) @@ -2044,26 +2041,29 @@ describe('A bar plot', function() { return Math.abs(dx * dy); } + it('should not show up null and zero bars as thin bars', function(done) { + var mock = Lib.extendDeep({}, require('@mocks/bar_hide_nulls.json')); + Plotly.plot(gd, mock) .then(function() { var nodes = gd.querySelectorAll('g.point > path'); expect(nodes.length).toBe(16, '# of bars'); [ - [0, true], - [1, true], + [0, false], + [1, false], [2, true], [3, true], - [4, true], - [5, true], + [4, false], + [5, false], [6, true], [7, true], - [8, true], - [9, true], + [8, false], + [9, false], [10, true], [11, true], - [12, true], - [13, true], + [12, false], + [13, false], [14, true], [15, true] ].forEach(function(e) { @@ -2077,22 +2077,21 @@ describe('A bar plot', function() { .then(done); }); - it('should not show up null and zero bars as thin bars', function(done) { - var mock = Lib.extendDeep({}, require('@mocks/bar_hide_nulls.json')); + describe('show narrow bars', function() { + ['initial zoom', 'after zoom out'].forEach(function(zoomStr) { + it(zoomStr, function(done) { + var mock = Lib.extendDeep({}, require('@mocks/bar_show_narrow.json')); - function getArea(path) { - var pos = path - .substr(1, path.length - 2) - .replace('V', ',') - .replace('H', ',') - .replace('V', ',') - .split(','); - var dx = +pos[0]; - var dy = +pos[1]; - dy -= +pos[2]; - dx -= +pos[3]; + if(zoomStr === 'after zoom out') { + mock.layout.xaxis.range = [-14.9, 17.9]; + mock.layout.xaxis2.range = [17.9, -14.9]; + mock.layout.xaxis3.range = [-3.9, 4.9]; + mock.layout.xaxis4.range = [4.9, -3.9]; - return Math.abs(dx * dy); + mock.layout.yaxis.range = [-3.9, 4.9]; + mock.layout.yaxis2.range = [4.9, -3.9]; + mock.layout.yaxis3.range = [-14.9, 17.9]; + mock.layout.yaxis4.range = [17.9, -14.9]; } Plotly.plot(gd, mock) @@ -2100,34 +2099,17 @@ describe('A bar plot', function() { var nodes = gd.querySelectorAll('g.point > path'); expect(nodes.length).toBe(16, '# of bars'); - [ - [0, false], - [1, false], - [2, true], - [3, true], - [4, false], - [5, false], - [6, true], - [7, true], - [8, false], - [9, false], - [10, true], - [11, true], - [12, false], - [13, false], - [14, true], - [15, true] - ].forEach(function(e) { - var i = e[0]; + for(var i = 0; i < 16; i++) { var d = nodes[i].getAttribute('d'); - var visible = e[1]; - expect(getArea(d) > 0).toBe(visible, 'item:' + i); - }); + expect(getArea(d) > 0).toBe(true, 'item:' + i); + } }) .catch(failTest) .then(done); }); }); + }); +}); describe('bar visibility toggling:', function() { var gd;
0
diff --git a/public/pocketsphinx.js/webapp/js/recognizer.js b/public/pocketsphinx.js/webapp/js/recognizer.js @@ -343,9 +343,34 @@ function stop() { } } -function getResult(hyp) { - const words = hyp.split(' '); - return words[words.length - 1] ?? ''; +const VOWELS = ['A', 'E', 'I', 'O', 'U']; +const _getLastWord = function(hyp, pred = () => true) { + let lastWord = ''; + let i = hyp.length - 1; + while (i >= 0) { + for (; i >= 0; i--) { + if (hyp[i] === ' ' && lastWord.length !== 0) { + break; + } + if (hyp[i] !== ' ') { + lastWord = hyp[i] + lastWord; + } + } + if (pred(lastWord)) { + break; + } else { + lastWord = ''; + } + } + return lastWord; +}; +const result = new Float32Array(VOWELS.length); +function _updateResult(hyp) { + const lastWord = _getLastWord(hyp); + const vowelIndex = VOWELS.findIndex(v => lastWord.includes(v)) ?? ''; + if (vowelIndex !== -1) { + result[vowelIndex] += 1; + } } function process(array) { @@ -369,7 +394,7 @@ function process2(array) { hyp: Utf8Decode(recognizer.getHyp()), hypseg: segToArray(segmentation), }); */ - const result = getResult(hyp); + _updateResult(hyp); post({ result, });
0
diff --git a/edit.js b/edit.js @@ -317,6 +317,10 @@ planetAuxMesh.updateMatrixWorld(); planetAuxContainer.add(planetAuxMesh); const numRemotePlanetMeshes = 10; +const remotePlanetCubeMeshes = []; +const fakeMaterial = new THREE.MeshBasicMaterial({ + color: 0x333333, +}); for (let i = 0; i < numRemotePlanetMeshes; i++) { const remotePlanetMesh = _makePlanetMesh(0.95); remotePlanetMesh.position.set(-1 + rng() * 2, -1 + rng() * 2, -1 + rng() * 2).multiplyScalar(30); @@ -326,8 +330,12 @@ for (let i = 0; i < numRemotePlanetMeshes; i++) { remotePlanetMesh.add(textMesh); planetContainer.add(remotePlanetMesh); -} + const remotePlanetCubeMesh = new THREE.Mesh(new THREE.BoxBufferGeometry(10, 10, 10), fakeMaterial); + remotePlanetCubeMesh.position.copy(remotePlanetMesh.position); + planetContainer.add(remotePlanetCubeMesh); + remotePlanetCubeMeshes.push(remotePlanetCubeMesh); +} /* const rayMesh = makeRayMesh(); scene.add(rayMesh); @@ -405,6 +413,7 @@ const _tickPlanetAnimation = factor => { const velocity = new THREE.Vector3(); const lastGrabs = [false, false]; const lastAxes = [[0, 0], [0, 0]]; +let currentTeleport = false; let lastTeleport = false; const timeFactor = 500; let lastTimestamp = performance.now(); @@ -437,7 +446,7 @@ function animate(timestamp, frame) { lastParcel = currentParcel; } - teleportMeshes[1].update(localVector, localQuaternion, lastTeleport, (position, quaternion) => { + const _teleportTo = (position, quaternion) => { switch (selectedTool) { case 'thirdperson': { pe.camera.position.add(localVector.copy(avatarCameraOffset).applyQuaternion(pe.camera.quaternion)); @@ -464,7 +473,23 @@ function animate(timestamp, frame) { } pe.camera.updateMatrixWorld(); - }); + }; + + raycaster.ray.origin.copy(localVector); + raycaster.ray.direction.set(0, 0, -1).applyQuaternion(localQuaternion); + const intersects = raycaster.intersectObjects(remotePlanetCubeMeshes); + if (intersects.length > 0) { + const [intersect] = intersects; + const {point, face: {normal}} = intersect; + teleportMeshes[1].position.copy(point); + teleportMeshes[1].quaternion.setFromUnitVectors(localVector.set(0, 1, 0), normal); + teleportMeshes[1].visible = currentTeleport; + if (!currentTeleport && lastTeleport) { + // _teleportTo(teleportMeshes[1].position, teleportMeshes[1].quaternion); + } + } else { + teleportMeshes[1].update(localVector, localQuaternion, currentTeleport, _teleportTo); + } } } @@ -540,7 +565,7 @@ function animate(timestamp, frame) { ) { _applyRotation(Math.PI * 0.2); } - lastTeleport = (axes[1] < -0.5 || axes[3] < -0.5); + currentTeleport = (axes[1] < -0.5 || axes[3] < -0.5); } lastAxes[index][0] = axes[0]; lastAxes[index][1] = axes[1]; @@ -682,6 +707,8 @@ function animate(timestamp, frame) { wireframeMaterial.uniforms.uSelectId.value.set(0, 0, 0); } + lastTeleport = currentTeleport; + renderer.render(scene, camera); // renderer.render(highlightScene, camera); } @@ -981,7 +1008,7 @@ window.addEventListener('mousedown', e => { pe.grabtriggerdown('right'); pe.grabuse('right'); } else if (e.button === 2) { - lastTeleport = true; + currentTeleport = true; } } }); @@ -989,7 +1016,7 @@ window.addEventListener('mouseup', e => { if (document.pointerLockElement) { pe.grabtriggerup('right'); } - lastTeleport = false; + currentTeleport = false; }); /* document.getElementById('world-name').addEventListener('change', e => {
0
diff --git a/packages/transformers/image/src/ImageTransformer.js b/packages/transformers/image/src/ImageTransformer.js @@ -89,7 +89,7 @@ export default (new Transformer({ true, ); - let imagePipeline = sharp(inputBuffer); + let imagePipeline = sharp(inputBuffer, {animated: true}); imagePipeline.withMetadata();
11
diff --git a/src/components/networked-share.js b/src/components/networked-share.js @@ -138,8 +138,14 @@ AFRAME.registerComponent('networked-share', { var entityData = that.el.firstUpdateData; that.networkUpdate(entityData); }; - // FIXME: this timeout-based stall should be event driven!!! - setTimeout(callback, 50); + + // wait for template to render (and monkey-patching to finish, so next tick), then callback + + if (this.templateEl) { + this.templateEl.addEventListener('templaterendered', function() { setTimeout(callback); }); + } else { + setTimeout(callback); + } }, update: function() {
14
diff --git a/src/components/feature/feature.vue b/src/components/feature/feature.vue */ let feature = new Feature(this.properties) feature.setId(this.id) + feature.setGeometry(this._geometry) return feature }, }, /** * @return {ol.geom.Geometry|undefined} - * @throws {AssertionError} */ getGeometry () { - assert.hasFeature(this) - - return this.$feature.getGeometry() + return this._geometry }, /** * @param {ol.geom.Geometry|Vue|GeoJSONGeometry|undefined} geom */ setGeometry (geom) { assert.hasView(this) - assert.hasFeature(this) if (geom instanceof Vue) { geom = geom.$geometry } else if (isPlainObject(geom)) { geom = geoJson.readGeometry(geom, this.$view.getProjection()) } - if (geom !== this.$geometry) { + if (geom !== this._geometry) { + /** + * @type {ol.geom.Geometry|undefined} + * @private + */ + this._geometry = geom + } + if (this.$feature && geom !== this.$feature.getGeometry()) { this.$feature.setGeometry(geom) } },
7
diff --git a/rss/logic/cycle.js b/rss/logic/cycle.js @@ -46,7 +46,8 @@ module.exports = function (rssList, articleList, debugFeeds, link, callback) { if (articleList[x].pubdate && articleList[x].pubdate > moment().subtract(cycleMaxAge, 'days')) newerArticles.push(articleList[x])// checkTable(articleList[x], getArticleId(articleList, articleList[x])) else { let checkDate = globalDateCheck - checkDate = typeof rssList[rssName].checkDates !== 'boolean' ? checkDate : localDateSetting + const localDateSetting = rssList[rssName].checkDates + checkDate = typeof localDateSetting !== 'boolean' ? checkDate : localDateSetting if (checkDate) { olderArticles.push(articleList[x]) // Mark as old if date checking is enabled @@ -58,7 +59,8 @@ module.exports = function (rssList, articleList, debugFeeds, link, callback) { } let checkTitle = config.feedSettings.checkTitles != null ? config.feedSettings.checkTitles : defaultConfigs.feedSettings.checkTitles.default - checkTitle = typeof rssList[rssName].checkTitles !== 'boolean' ? checkTitle : localTitleCheck + const localTitleSetting = rssList[rssName].checkTitles + checkTitle = typeof localTitleSetting !== 'boolean' ? checkTitle : localTitleSetting const allIds = [] const allTitles = [] const newerIds = []
1
diff --git a/docs/tutorials/channel-events.md b/docs/tutorials/channel-events.md -This tutorial illustrates the use of channel-based events. These events are -similar to the existing events, however are specific to a single channel. -The client handling of channel-based events has a few new options when setting -up a listener. Channel-based events are a new feature of the -Hyperledger Fabric Node.js client as of v1.1. +This tutorial illustrates the use of channel-based events. +Channel-based events are a new feature of the Hyperledger Fabric Node.js client +as of v1.1. It replaces the event hub from v1.0, with a more useful +and reliable interface for applications to receive events. For more information on getting started with Fabric check out [Building your first network](http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html). @@ -22,9 +21,19 @@ transactions or chaincode events. This allows a client application to be notified of transaction completion or arbitrary chaincode events without having to perform multiple queries or search through the blocks as they are received. -The service allows any user to receive "filtered" block events (which contain no -sensitive information, in other words). Receiving "unfiltered" block events -requires read access to the channel. The default behavior is to connect to +Applications may use block or chaincode events to provide channel data to +other applications. For example an application could listen for block events +and write transaction data to a data store for the purpose of performing +queries or other analytics against the channel's data. +For each block received, the block listener application could iterate through +the block transactions, and build a data store using the key/value writes from +each valid transaction's 'rwset' (see the {@link Block} and {@link Transaction} +Type Definitions for details of these data structures). + +The event service also allows applications to receive "filtered" block events +(which allow for receiving transaction validation status without providing +other sensitive information). Access to "filtered" and "unfiltered" events +can be configured independently in Fabric. The default behavior is to connect to receive filtered block events. To connect to receive unfiltered block events call `connect(true)` (see below).
7
diff --git a/util.js b/util.js import * as THREE from './three.module.js'; import atlaspack from './atlaspack.js'; +export function hex2Uint8Array(hex) { + return new Uint8Array(hex.match(/[\da-f]{2}/gi).map(h => parseInt(h, 16))) +} export function downloadFile(file, filename) { const blobURL = URL.createObjectURL(file); const tempLink = document.createElement('a');
0
diff --git a/src/post/Write/SideControls.js b/src/post/Write/SideControls.js // Forked from https://github.com/rajaraodv/draftjs-examples import newDebug from 'debug'; import { connect } from 'react-redux'; -import { Entity, EditorState, AtomicBlockUtils } from 'draft-js'; +import { Entity, EditorState, AtomicBlockUtils, ContentState, SelectionState } from 'draft-js'; import React, { Component } from 'react'; import './PostEditor.scss'; @@ -26,14 +26,22 @@ function getSelectedBlockNode(root) { } function addNewEntitiy(editorState, entityKey) { - const newEditorState = AtomicBlockUtils.insertAtomicBlock( + let newEditorState = AtomicBlockUtils.insertAtomicBlock( editorState, entityKey, ' ' ); + const content = newEditorState.getCurrentContent(); + const selection = content.getSelectionBefore(); + const blockMap = content.blockMap.remove(selection.anchorKey); + const newContent = ContentState.createFromBlockArray(blockMap.toArray()); + const nextKey = newContent.getBlockAfter(newContent.getSelectionAfter().anchorKey).key; + const selectionState = SelectionState.createEmpty(nextKey); + newEditorState = EditorState.push(editorState, newContent, 'insert'); + return EditorState.forceSelection( newEditorState, - editorState.getCurrentContent().getSelectionAfter() + selectionState ); }
2
diff --git a/data.js b/data.js @@ -5771,5 +5771,13 @@ module.exports = [ description: "A tiny library inspired by Redux & Vuex to help you manage state in your JavaScript apps", url: "https://github.com/hankchizljaw/beedle", source: "https://raw.githubusercontent.com/hankchizljaw/beedle/master/src/beedle.js" + }, + { + name: "JS-Entity-Component-System", + github: "Stuhl/javascript-entity-component-system", + 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" } ];
0
diff --git a/utils/pre-swap-checker/test/PreSwapChecker.js b/utils/pre-swap-checker/test/PreSwapChecker.js @@ -112,12 +112,12 @@ contract('PreSwapChecker', async accounts => { signer: { wallet: aliceAddress, token: tokenAST.address, - param: 200, + amount: 200, }, sender: { wallet: bobAddress, token: tokenDAI.address, - param: 50, + amount: 50, }, }) @@ -141,12 +141,12 @@ contract('PreSwapChecker', async accounts => { signer: { wallet: aliceAddress, token: tokenAST.address, - param: 200, + amount: 200, }, sender: { wallet: aliceAddress, token: tokenAST.address, - param: 50, + amount: 50, }, }) @@ -165,12 +165,12 @@ contract('PreSwapChecker', async accounts => { signer: { wallet: aliceAddress, token: tokenAST.address, - param: 200000, + amount: 200000, }, sender: { wallet: bobAddress, token: tokenAST.address, - param: 200000, + amount: 200000, }, }) @@ -205,12 +205,12 @@ contract('PreSwapChecker', async accounts => { signer: { wallet: aliceAddress, token: tokenAST.address, - param: 20, + amount: 20, }, sender: { wallet: bobAddress, token: tokenDAI.address, - param: 5, + amount: 5, }, expiry: (await getLatestTimestamp()) - 10, // expired time nonce: 5, // nonce below minimum threshold @@ -249,12 +249,12 @@ contract('PreSwapChecker', async accounts => { signer: { wallet: aliceAddress, token: tokenAST.address, - param: 20, + amount: 20, }, sender: { wallet: EMPTY_ADDRESS, token: tokenDAI.address, - param: 50000, + amount: 50000, }, }) @@ -294,12 +294,12 @@ contract('PreSwapChecker', async accounts => { signer: { wallet: aliceAddress, token: tokenAST.address, - param: 50, + amount: 50, }, sender: { wallet: bobAddress, token: tokenKitty.address, - param: 54320, + amount: 54320, kind: ERC721_INTERFACE_ID, }, }) @@ -321,12 +321,12 @@ contract('PreSwapChecker', async accounts => { signer: { wallet: aliceAddress, token: tokenAST.address, - param: 50, + amount: 50, }, sender: { wallet: bobAddress, token: tokenKitty.address, - param: 54321, + amount: 54321, kind: ERC721_INTERFACE_ID, }, })
3
diff --git a/src/components/validationStatus.vue b/src/components/validationStatus.vue @@ -82,11 +82,6 @@ export default { return numberOfErrors + errors.length; }, 0); }, - statusText() { - return this.hasValidationErrors - ? `${this.numberOfValidationErrors} error${this.numberOfValidationErrors === 1 ? '' : 's'} detected` - : 'No errors detected'; - }, }, }; </script>
2
diff --git a/README.md b/README.md @@ -32,6 +32,7 @@ npm install --save-dev snowpack - Vue (using JSX): [[Source]](https://gitlab.com/unclejustin/snowpack-vue) [[Live Demo]](https://snowpack-vue.netlify.com/) [By: [@unclejustin](https://gitlab.com/unclejustin)] - PWA-Starter-Kit (lit-html + Redux): [[Source]](https://github.com/Polymer/pwa-starter-kit/issues/339) - LitElement + lit-html PWA: [[Source]](https://github.com/thepassle/reddit-pwa) [[Live Demo]](https://angry-turing-4769b3.netlify.com/) +- [Heresy](https://github.com/WebReflection/heresy) and [LighterHTML](https://github.com/WebReflection/lighterhtml): [[Source]](https://github.com/AhnafCodes/SAltEnv/) - Hyperapp and JSX (using Babel): [[Source]](https://github.com/Monchi/snowpack-hyperapp) [[Live Demo]](https://snowpack-hyperapp.netlify.com/) - React PWA Starter (React + Styled components + Workbox): [[Source]](https://github.com/matthoffner/es-react-pwa) [[Live Demo]](https://es-react-pwa.netlify.com/) - Preact, JSX, Fragment, Router, CSS Grid, Typescript, Babel: [[Source]](https://github.com/crra/snowpack-doodle)
0
diff --git a/templates/formlibrary/modals/add_training_modal.html b/templates/formlibrary/modals/add_training_modal.html placeholder: 'Select {{request.user.activity_user.organization.level_1_label }}', }); + + $('#trainingName').on('input', function() { + const name = $(this); + if (name.val()) { + $('#div_training_name') + .removeClass('has-error') + .addClass('has-success'); + $('#nameHelpBlock') + .removeClass('hikaya-show') + .addClass('hikaya-hide'); + } else { + $('#div_training_name') + .removeClass('has-success') + .addClass('has-error'); + } + }); + $('#indicatorWorkflowLevel1').on('change', function() { + const type = $(this); + if (type.val()) { + $('#div_training_program') + .removeClass('has-error') + .addClass('has-success'); + $('#programHelpBlock') + .removeClass('hikaya-show') + .addClass('hikaya-hide'); + } else { + $('#div_training_program') + .removeClass('has-success') + .addClass('has-error'); + } + }); }); $(function() { obj[item.name] = item.value; }); + // validate input + if (obj.training_name == '' || obj.program == '') { + if (obj.training_name == '') { + $('#div_training_name') + .removeClass('has-success') + .addClass('has-error'); + $('#nameHelpBlock') + .removeClass('hikaya-hide') + .addClass('hikaya-show'); + } + if (obj.program == '') { + $('#div_training_program') + .removeClass('has-success') + .addClass('has-error'); + $('#programHelpBlock') + .removeClass('hikaya-hide') + .addClass('hikaya-show'); + } + toastr.error('Fill in all required fields'); + } else { + $.ajax({ url: '{% url "add_training" %}', type: 'POST', toastr.error(error, 'Failed'); }, }); + } }); }); </script> </h4> </div> <div class="modal-body"> - <div class="form-group"> - <label for="trainingName"> - {{ request.user.activity_user.organization.level_1_label }} + <div class="form-group" id="div_training_program"> + <label class="control-label" for="trainingProgram"> + {{ request.user.activity_user.organization.level_1_label }}* </label> <select class="form-control" name="program" id="program"> <option value=""></option> <option value="{{ item.id }}">{{ item.name }}</option> {% endif %} {% endfor %} </select> + <span id="programHelpBlock" class="help-block hikaya-hide" + >{{ user.activity_user.level_1_label }} is required</span + > </div> - <div class="form-group"> - <label for="trainingName">Name</label> + <div class="form-group" id="div_training_name"> + <label class="control-label" for="trainingName">Name*</label> <input type="text" id="trainingName" placeholder="Name of the training" autocomplete="off" /> + <span id="nameHelpBlock" class="help-block hikaya-hide" + >Name is required</span + > </div> <div class="row">
0
diff --git a/templates/small_site_profile_map.html b/templates/small_site_profile_map.html } var locations = [] {% for location in get_locations %} - const site = { + locations.push({ lat: +"{{location.latitude}}", lng: +"{{location.longitude}}" - } - locations.push(site) + }) {% endfor %} </script> <!--Load the API from the specified URL
3
diff --git a/wercker.yml b/wercker.yml @@ -62,6 +62,8 @@ build-prod: - script: name: npm run server:prod:ci code: | + export MONGO_URI=mongodb://$MONGO_PORT_27017_TCP_ADDR/growi + echo "export MONGO_URI=$MONGO_URI" npm run server:prod:ci after-steps:
12
diff --git a/js/options.js b/js/options.js @@ -245,23 +245,24 @@ function onMessage(message, sender, callback) { } function getPlugins(callback) { - chrome.runtime.getPackageDirectoryEntry(function(root) { - root.getDirectory("plugins", {create: false}, function(pluginsdir) { - var reader = pluginsdir.createReader(); - var entries = []; - var readEntries = function() { - reader.readEntries(function(results) { - if (results.length) { - entries = entries.concat(results.map(function(de){return de.name;})); - readEntries(); - } else { - callback(entries); + const plugins = []; + const manifest = chrome.runtime.getManifest(); + + manifest.content_scripts.forEach(script => script.js.forEach((path) => { + // Path can look like this on Firefox + // 'moz-extension://d5438889-adf3-4ed5-89b3-caacec62961b/plugins/skyrock.js' + // or like this on Chrome + // 'plugins/skyrock.js' + + const split = path.split('/'); + + if (split.includes('plugins')) { + plugins.push(split[split.length - 1]); } - }); - }; - readEntries(); - }); - }); + })); + + plugins.sort(); + callback(plugins); } function loadPlugins() {
14