code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/frontend/imports/ui/client/widgets/neworder.js b/frontend/imports/ui/client/widgets/neworder.js @@ -30,6 +30,32 @@ Template.neworder.viewmodel({ autorun() { const order = Session.get('selectedOrder'); if (order) { + /* + * If we have an existing offer with the given characteristics + * PRICE: 2.00000 + * AMOUNT: 2.00000 + * TOTAL: 2.0000 + * + * Click on the existing order and the neworder input fields + * will be populated with the same values. + * + * Proceed and create new order with given values. + * + * Don't click anywhere else and wait for the new order to appear in orderbook. + * + * Click on it or on the previous order that we created the first order from. + * The input fields will be all 0's thought the values of the properties will be popualted. + * + * Assuming this is some rendering issue (most likely from meteor) this is the solution. + * Before applying the new values, we clear old ones, forcing everything to rerender. + * */ + this.amount(''); + this.price(''); + this.total(''); + this.offerAmount(0); + this.offerPrice(0); + this.offerTotal(0); + const actionType = order.type === 'bid' ? 'buy' : 'sell'; const orderData = Offers.findOne({ _id: order.id }); if (orderData) {
1
diff --git a/tools/deployer/AirSwap/src/DelegateFactoryMapping.ts b/tools/deployer/AirSwap/src/DelegateFactoryMapping.ts -import { log } from "@graphprotocol/graph-ts" +import { BigInt, log } from "@graphprotocol/graph-ts" import { CreateDelegate } from "../generated/DelegateFactory/DelegateFactory" import { Delegate } from '../generated/templates' import { User, Indexer, SwapContract, DelegateFactory, DelegateContract } from "../generated/schema" export function handleCreateDelegate(event: CreateDelegate): void { + log.info("DELEGATE CREATED!",[]) // handle delegate factory if it doesn't exist var delegateFactory = DelegateFactory.load(event.address.toHex()) @@ -12,12 +13,37 @@ export function handleCreateDelegate(event: CreateDelegate): void { delegateFactory.save() } + // handle swap contract if it doesn't exist + var swap = SwapContract.load(event.params.swapContract.toHex()) + if (!swap) { + swap = new SwapContract(event.params.swapContract.toHex()) + swap.save() + } + + // handle indexer if it doesn't exist + var indexer = Indexer.load(event.params.indexerContract.toHex()) + if (!indexer) { + indexer = new Indexer(event.params.indexerContract.toHex()) + indexer.save() + } + + // handle user if it doesn't exist + var owner = User.load(event.params.delegateContractOwner.toHex()) + if (!owner) { + owner = new User(event.params.delegateContractOwner.toHex()) + owner.authorizedSigners = new Array<string>() + owner.authorizedSenders = new Array<string>() + owner.executedOrders = new Array<string>() + owner.cancelledNonces = new Array<BigInt>() + owner.save() + } + Delegate.create(event.params.delegateContract) var delegate = new DelegateContract(event.params.delegateContract.toHex()) delegate.factory = delegateFactory.id - delegate.swap = SwapContract.load(event.params.swapContract.toHex()).id - delegate.indexer = Indexer.load(event.params.indexerContract.toHex()).id - delegate.owner = User.load(event.params.delegateContractOwner.toHex()).id + delegate.swap = swap.id + delegate.indexer = indexer.id + delegate.owner = owner.id delegate.tradeWallet = event.params.delegateTradeWallet delegate.save() }
3
diff --git a/docs/source/_layouts/documentation.blade.php b/docs/source/_layouts/documentation.blade.php </p> </div> <div class="relative"> - <input id="docsearch" class="rounded bg-white border border-smoke py-2 pr-4 pl-10 block w-full" type="text" placeholder="Search the docs"> + <input id="docsearch" class="rounded bg-white border border-smoke py-2 pr-4 pl-10 block w-full appearance-none" type="text" placeholder="Search the docs"> <div class="pointer-events-none absolute pin-y pin-l pl-3 flex items-center"> <svg class="pointer-events-none text-slate w-4 h-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"/></svg> </div>
2
diff --git a/packages/helpers/classes/mail.js b/packages/helpers/classes/mail.js @@ -121,8 +121,9 @@ class Mail { if (typeof from === 'undefined') { return; } - if (typeof from !== 'string') { - throw new Error('String expected for `from`'); + if (typeof from !== 'string' && + !(typeof from === 'object' && typeof from.email === 'string')) { + throw new Error('String or address object expected for `from`'); } this.from = EmailAddress.create(from); } @@ -134,8 +135,9 @@ class Mail { if (typeof replyTo === 'undefined') { return; } - if (typeof replyTo !== 'string') { - throw new Error('String expected for `replyTo`'); + if (typeof replyTo !== 'string' && + !(typeof replyTo === 'object' && typeof replyTo.email === 'string')) { + throw new Error('String or address object expected for `replyTo`'); } this.replyTo = EmailAddress.create(replyTo); }
11
diff --git a/lib/importer/lib/cartodb-migrator/migrator.rb b/lib/importer/lib/cartodb-migrator/migrator.rb @@ -56,30 +56,6 @@ module CartoDB @current_name = @suggested_name end - # attempt to transform the_geom to 4326 - if column_names.include? "the_geom" - begin - if srid = @db_connection["select st_srid(the_geom::geometry) from #{@suggested_name} limit 1"].first - srid = srid[:st_srid] if srid.is_a?(Hash) - begin - if srid.to_s != "4326" - # move original geometry column around - @db_connection.run("UPDATE #{@suggested_name} SET the_geom = ST_Transform(the_geom, 4326);") - end - rescue => e - @runlog.err << "Failed to transform the_geom from #{srid} to 4326 #{@suggested_name}. #{e.inspect}" - end - end - rescue => e - # if no SRID or invalid the_geom, we need to remove it from the table - begin - @db_connection.run("ALTER TABLE #{@suggested_name} RENAME COLUMN the_geom TO invalid_the_geom") - column_names.delete("the_geom") - rescue => exception - end - end - end - @table_created = true rows_imported = @db_connection["SELECT count(*) as count from #{@suggested_name}"].first[:count]
2
diff --git a/.travis.yml b/.travis.yml @@ -40,9 +40,9 @@ matrix: - rvm: 2.1 gemfile: gemfiles/rails_4.2_sprockets_4.gemfile - rvm: 2.1 - gemfile: gemfiles/rails_5_no_sprockets_webpacker.gemfile + gemfile: gemfiles/rails_5_no_sprockets_webpacker1.gemfile - rvm: 2.1 - gemfile: gemfiles/rails_5_no_sprockets.gemfile + gemfile: gemfiles/rails_5_no_sprockets_webpacker3.gemfile - rvm: 2.1 gemfile: gemfiles/rails_5.1_sprockets_4.gemfile - rvm: jruby-9.0.1.0
8
diff --git a/client/components/main/header.styl b/client/components/main/header.styl .fa-home font-size: 26px margin-top: -2px - margin-right: 20px + margin-right: 10px + margin-left: 10px #header-new-board-icon display: none
5
diff --git a/js/blockchaincom.js b/js/blockchaincom.js @@ -421,7 +421,7 @@ module.exports = class blockchaincom extends Exchange { const datetime = this.iso8601 (timestamp); const filled = this.safeString (order, 'cumQty'); const remaining = this.safeString (order, 'leavesQty'); - const result = this.safeOrder2 ({ + const result = this.safeOrder ({ 'id': exchangeOrderId, 'clientOrderId': clientOrderId, 'datetime': datetime,
10
diff --git a/webpack.config.js b/webpack.config.js @@ -22,6 +22,18 @@ if (process.env.npm_lifecycle_event === 'release') { webpackConfig.plugins.push(new Clean(['dist'], {verbose: false})) } + +const voidModulePath = path.resolve('./src/base/void'); + +if (process.env.CLAPPR_PLAIN_HTML5_ONLY === 'yes') { + console.log('NOTE: Building only with plain HTML5 playback plugins, but will result in smaller build size'); + webpackConfig.plugins.push( + new webpack.NormalModuleReplacementPlugin(/playbacks\/flash/, voidModulePath), + new webpack.NormalModuleReplacementPlugin(/playbacks\/base_flash_playback/, voidModulePath), + new webpack.NormalModuleReplacementPlugin(/playbacks\/flashls/, voidModulePath), + new webpack.NormalModuleReplacementPlugin(/playbacks\/hls/, voidModulePath) + ); +} webpackConfig.output = { path: path.resolve(__dirname, 'dist'), filename: 'clappr.js',
14
diff --git a/client/src/components/views/Thrusters/lite.js b/client/src/components/views/Thrusters/lite.js @@ -2,9 +2,8 @@ import React, { Component } from "react"; import gql from "graphql-tag"; import { graphql, compose } from "react-apollo"; import { DraggableCore } from "react-draggable"; -import { Button, Row, Col } from "reactstrap"; +import { Row, Col } from "reactstrap"; import distance from "helpers/distance"; -import Measure from "react-measure"; import throttle from "helpers/debounce"; import SubscriptionHelper from "helpers/subscriptionHelper"; @@ -363,7 +362,6 @@ gamepadLoop(){ } render() { if (this.props.data.loading || !this.props.data.thrusters) return null; - const gamepad = navigator.getGamepads()[0]; let thruster = {}; if (this.props.data.thrusters) { thruster = this.props.data.thrusters[0]; //Only allow one thruster - no need for multiple. @@ -373,11 +371,6 @@ gamepadLoop(){ width = this.refs.dirCirc.getBoundingClientRect().width; height = this.refs.dirCirc.getBoundingClientRect().height; } - const direction = { - x: this.state.direction.left, - y: this.state.direction.top, - z: this.state.directionUp.left - }; if (!thruster) return <h1>No thruster system</h1>; return ( <div className="cardThrusters">
1
diff --git a/kamu/settings.py b/kamu/settings.py @@ -7,7 +7,6 @@ STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles') DEBUG = True ALLOWED_HOSTS = [] SECRET_KEY = '5%5*wq!wtipnzre-n!d*6@02j)en6*g1sr+!p1zv-krr$aay1=' -SECURE_SSL_REDIRECT = True DATABASES = { 'default': {
2
diff --git a/src/comments/Comments.js b/src/comments/Comments.js @@ -19,7 +19,7 @@ import './Comments.scss'; showMoreComments: commentsActions.showMoreComments, likeComment: id => commentsActions.likeComment(id), unlikeComment: id => commentsActions.likeComment(id, 0), - dislikeComment: id => commentsActions.likeComment(id, -10000), + dislikeComment: id => commentsActions.likeComment(id, -1000), openCommentingDraft: commentsActions.openCommentingDraft, }, dispatch) )
12
diff --git a/lib/less/import-manager.js b/lib/less/import-manager.js @@ -146,6 +146,7 @@ module.exports = function(environment) { } if (importOptions.isPlugin) { + context.mime = 'application/javascript'; promise = pluginLoader.loadPlugin(path, currentFileInfo.currentDirectory, context, environment, fileManager); } else {
4
diff --git a/packages/nexrender-worker/src/index.js b/packages/nexrender-worker/src/index.js @@ -24,6 +24,8 @@ const nextJob = async (client, settings) => { throw err; } else { console.error(err) + console.error("render proccess stopped with error...") + console.error("continue listening next job...") } } @@ -66,12 +68,20 @@ const start = async (host, secret, settings) => { /* send render progress to our server */ client.updateJob(job.uid, getRenderingStatus(job)) } catch (err) { + if (settings.stopOnError) { throw err; } else { console.log(`[${job.uid}] error occurred: ${err.stack}`) + console.log(`[${job.uid}] render proccess stopped with error...`) + console.log(`[${job.uid}] continue listening next job...`) + } } } + + job.onRenderError = function (undefined, err /* on render error */) { + /* set job render error to send to our server */ + job.error = [err]; } job = await render(job, settings); { @@ -82,7 +92,17 @@ const start = async (host, secret, settings) => { await client.updateJob(job.uid, getRenderingStatus(job)) } catch (err) { job.state = 'error'; - job.error = err; + + /* append existing error message with another error message */ + if( job?.error ) { + if(Array.isArray(job.error)){ + job.error = [...job.error,err?.toString?.()]; + }else{ + job.error = [job?.error?.toString?.(),err?.toString?.()]; + } + }else{ + job.error = err?.toString?.(); + } job.errorAt = new Date() await client.updateJob(job.uid, getRenderingStatus(job)).catch((err) => { @@ -90,6 +110,9 @@ const start = async (host, secret, settings) => { throw err; } else { console.log(`[${job.uid}] error occurred: ${err.stack}`) + console.log(`[${job.uid}] render proccess stopped with error...`) + console.log(`[${job.uid}] continue listening next job...`) + } }); @@ -97,6 +120,8 @@ const start = async (host, secret, settings) => { throw err; } else { console.log(`[${job.uid}] error occurred: ${err.stack}`) + console.log(`[${job.uid}] render proccess stopped with error...`) + console.log(`[${job.uid}] continue listening next job...`) } } } while (active)
1
diff --git a/modules/default/compliments/compliments.js b/modules/default/compliments/compliments.js @@ -157,10 +157,15 @@ Module.register("compliments", { getDom: function() { var complimentText = this.randomCompliment(); - var compliment = document.createTextNode(complimentText); var wrapper = document.createElement("div"); wrapper.className = this.config.classes ? this.config.classes : "thin xlarge bright"; - wrapper.innerHTML = complimentText.replace(/\n/g, '<br>'); + complimentText.split("\n").forEach(function(line, index) { + if (index > 0) { + wrapper.appendChild(document.createElement("br")); + } + wrapper.appendChild(document.createTextNode(line)); + + }); return wrapper; },
14
diff --git a/metaversefile-api.js b/metaversefile-api.js @@ -639,6 +639,32 @@ metaversefile.setApi({ throw new Error('useActivate cannot be called outside of render()'); } }, + useWear(fn) { + const app = currentAppRender; + if (app) { + app.addEventListener('wearupdate', e => { + fn(e); + }); + app.addEventListener('destroy', () => { + window.removeEventListener('wearupdate', fn); + }); + } else { + throw new Error('useWear cannot be called outside of render()'); + } + }, + useUse(fn) { + const app = currentAppRender; + if (app) { + app.addEventListener('use', e => { + fn(e); + }); + app.addEventListener('destroy', () => { + window.removeEventListener('use', fn); + }); + } else { + throw new Error('useUse cannot be called outside of render()'); + } + }, useResize(fn) { const app = currentAppRender; if (app) {
0
diff --git a/src-input/duk_api_stack.c b/src-input/duk_api_stack.c @@ -5014,6 +5014,7 @@ static const duk_uint32_t duk__bufobj_flags_lookup[] = { DUK_EXTERNAL void duk_push_buffer_object(duk_hthread *thr, duk_idx_t idx_buffer, duk_size_t byte_offset, duk_size_t byte_length, duk_uint_t flags) { duk_hbufobj *h_bufobj; duk_hbuffer *h_val; + duk_hobject *h_arraybuf; duk_uint32_t tmp; duk_uint_t classnum; duk_uint_t protobidx; @@ -5023,8 +5024,7 @@ DUK_EXTERNAL void duk_push_buffer_object(duk_hthread *thr, duk_idx_t idx_buffer, DUK_ASSERT_API_ENTRY(thr); /* The underlying types for offset/length in duk_hbufobj is - * duk_uint_t; make sure argument values fit and that - * offset + length does not wrap. + * duk_uint_t; make sure argument values fit. */ uint_offset = (duk_uint_t) byte_offset; uint_length = (duk_uint_t) byte_length; @@ -5033,11 +5033,6 @@ DUK_EXTERNAL void duk_push_buffer_object(duk_hthread *thr, duk_idx_t idx_buffer, goto range_error; } } - uint_added = uint_offset + uint_length; - if (DUK_UNLIKELY(uint_added < uint_offset)) { - goto range_error; - } - DUK_ASSERT(uint_added >= uint_offset && uint_added >= uint_length); DUK_ASSERT_DISABLE(flags >= 0); /* flags is unsigned */ lookupidx = flags; @@ -5048,7 +5043,43 @@ DUK_EXTERNAL void duk_push_buffer_object(duk_hthread *thr, duk_idx_t idx_buffer, classnum = tmp >> 24; protobidx = (tmp >> 16) & 0xff; + h_arraybuf = duk_get_hobject(thr, idx_buffer); + if (h_arraybuf != NULL && /* argument is an object */ + flags != DUK_BUFOBJ_ARRAYBUFFER && /* creating a view */ + DUK_HOBJECT_GET_CLASS_NUMBER(h_arraybuf) == DUK_HOBJECT_CLASS_ARRAYBUFFER /* argument is ArrayBuffer */) { + duk_uint_t tmp_offset; + + DUK_ASSERT_HBUFOBJ_VALID((duk_hbufobj *) h_arraybuf); + h_val = ((duk_hbufobj *) h_arraybuf)->buf; + if (DUK_UNLIKELY(h_val == NULL)) { + goto arg_error; + } + + tmp_offset = uint_offset + ((duk_hbufobj *) h_arraybuf)->offset; + if (DUK_UNLIKELY(tmp_offset < uint_offset)) { + goto range_error; + } + uint_offset = tmp_offset; + + /* Note intentional difference to new TypedArray(): we allow + * caller to create an uncovered typed array (which is memory + * safe); new TypedArray() rejects it. + */ + } else { + /* Handle unexpected object arguments here too, for nice error + * messages. + */ + h_arraybuf = NULL; h_val = duk_require_hbuffer(thr, idx_buffer); + } + + /* Wrap check for offset+length. */ + uint_added = uint_offset + uint_length; + if (DUK_UNLIKELY(uint_added < uint_offset)) { + goto range_error; + } + DUK_ASSERT(uint_added >= uint_offset && uint_added >= uint_length); + DUK_ASSERT(h_val != NULL); h_bufobj = duk_push_bufobj_raw(thr, @@ -5060,6 +5091,8 @@ DUK_EXTERNAL void duk_push_buffer_object(duk_hthread *thr, duk_idx_t idx_buffer, h_bufobj->buf = h_val; DUK_HBUFFER_INCREF(thr, h_val); + h_bufobj->buf_prop = h_arraybuf; + DUK_HOBJECT_INCREF_ALLOWNULL(thr, h_arraybuf); h_bufobj->offset = uint_offset; h_bufobj->length = uint_length; h_bufobj->shift = (tmp >> 4) & 0x0f; @@ -5071,7 +5104,7 @@ DUK_EXTERNAL void duk_push_buffer_object(duk_hthread *thr, duk_idx_t idx_buffer, * provided as .buffer property of the view. The ArrayBuffer is * referenced via duk_hbufobj->buf_prop and an inherited .buffer * accessor returns it. The ArrayBuffer is created lazily on first - * access so we don't need to do anything more here. + * access if necessary so we don't need to do anything more here. */ return;
11
diff --git a/components/doc-download.js b/components/doc-download.js @@ -4,11 +4,12 @@ import {DownloadCloud} from 'react-feather' import theme from '@/styles/theme' -function DocDownload({title, link, label, src, isReverse, version, children}) { +function DocDownload({title, subtitle, link, label, src, isReverse, version, children}) { return ( <div className='doc-container'> <div className='text-container'> {title && <h3>{title}</h3>} + {subtitle && <h4>{subtitle}</h4>} {children} </div> <div className='doc-download-container'> @@ -32,6 +33,12 @@ function DocDownload({title, link, label, src, isReverse, version, children}) { margin: 1em 0; } + h3 + h4 { + margin: -20px 0px 0 0; + font-size: small; + color: ${theme.colors.darkGrey}; + } + .text-container { flex: 2; margin: auto; @@ -76,6 +83,7 @@ DocDownload.propTypes = { link: PropTypes.string, label: PropTypes.string, title: PropTypes.string, + subtitle: PropTypes.string, src: PropTypes.string, version: PropTypes.string } @@ -86,6 +94,7 @@ DocDownload.defaultProps = { link: null, label: null, title: null, + subtitle: null, src: null, version: null }
0
diff --git a/.eslintrc.js b/.eslintrc.js @@ -22,6 +22,7 @@ module.exports = { rules: { // overwrite airbnb-base options + // we use underscores to indicate private fields in classes 'no-underscore-dangle': 'off', // import buffer explicitly 'no-restricted-globals': [
0
diff --git a/README.md b/README.md @@ -75,7 +75,7 @@ in the online resources. To run the examples, follow the instructions here: ### Generating Documentation -After installing the project dependencies (including the gulp build system), +After installing the project dependencies (including the [gulp](http://gulpjs.com/) build system), you can build the reference documentation locally from the root directory of the marklogic package:
0
diff --git a/accessibility-checker-engine/help/WCAG20_Body_FirstASkips_Native_Host_Sematics.mdx b/accessibility-checker-engine/help/WCAG20_Body_FirstASkips_Native_Host_Sematics.mdx @@ -21,7 +21,7 @@ Web pages must provide a way to skip directly to the main content ### Why is this important? -The 'skip to main' link or an element with the `"main"` role allows users to skip over content that is repeated on several pages. Bypassing repeated content such as banners and navigation menus allows people who use only a keyboard to quickly navigate to the main content. +The 'skip to main' link or an element with the `"main"` role allow users to skip over content that is repeated on several pages. Bypassing repeated content such as banners and navigation menus allows people who use only a keyboard to quickly navigate to the main content. <div id="locSnippet"></div>
2
diff --git a/api/modules/agent/controllers/import.agent.controller.js b/api/modules/agent/controllers/import.agent.controller.js @@ -305,10 +305,7 @@ module.exports = (request, reply) => { } domainResult.intents = resultIntents; - Async.waterfall([ - Async.apply(DomainTools.retrainModelTool, server, rasa, agent.language, agentResult.agentName, domainResult.domainName, domainResult.id), - Async.apply(DomainTools.retrainDomainRecognizerTool, server, redis, rasa, agent.language, agentResult.agentName, agentResult.id) - ], (errTraining) => { + DomainTools.retrainModelTool(server, rasa, agent.language, agentResult.agentName, domainResult.domainName, domainResult.id, (errTraining) => { if (errTraining){ return callbackAddDomains(errTraining); @@ -323,8 +320,15 @@ module.exports = (request, reply) => { return reply(errDomains, null); } agentResult.domains = resultDomains; + + DomainTools.retrainDomainRecognizerTool(server, redis, rasa, agent.language, agentResult.agentName, agentResult.id, (errTraining) => { + + if (errTraining){ + return reply(errTraining); + } return reply(agentResult); }); }); }); + }); };
7
diff --git a/src/components/HttpTable/index.js b/src/components/HttpTable/index.js @@ -249,6 +249,8 @@ export default class HttpTable extends PureComponent { { key: 'Upgrade', value: '$http_upgrade' }, ]; const value = { + proxy_buffer_numbers: Number(values.proxy_buffer_numbers), + proxy_buffer_size: Number(values.proxy_buffer_size), proxy_body_size: Number(values.proxy_body_size), proxy_connect_timeout: Number(values.proxy_connect_timeout), proxy_read_timeout: Number(values.proxy_read_timeout),
1
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -733,9 +733,89 @@ class AnimationMapping { } const _getLerpFn = isPosition => isPosition ? THREE.Vector3.prototype.lerp : THREE.Quaternion.prototype.slerp; +const animationBoneToModelBone = { + 'mixamorigHips': 'Hips', + 'mixamorigSpine': 'Spine', + 'mixamorigSpine1': 'Chest', + 'mixamorigSpine2': 'UpperChest', + 'mixamorigNeck': 'Neck', + 'mixamorigHead': 'Head', + 'mixamorigLeftShoulder': 'Left_shoulder', + 'mixamorigLeftArm': 'Left_arm', + 'mixamorigLeftForeArm': 'Left_elbow', + 'mixamorigLeftHand': 'Left_wrist', + 'mixamorigLeftHandMiddle1': 'Left_middleFinger1', + 'mixamorigLeftHandMiddle2': 'Left_middleFinger2', + 'mixamorigLeftHandMiddle3': 'Left_middleFinger3', + 'mixamorigLeftHandThumb1': 'Left_thumb0', + 'mixamorigLeftHandThumb2': 'Left_thumb1', + 'mixamorigLeftHandThumb3': 'Left_thumb2', + 'mixamorigLeftHandIndex1': 'Left_indexFinger1', + 'mixamorigLeftHandIndex2': 'Left_indexFinger2', + 'mixamorigLeftHandIndex3': 'Left_indexFinger3', + 'mixamorigLeftHandRing1': 'Left_ringFinger1', + 'mixamorigLeftHandRing2': 'Left_ringFinger2', + 'mixamorigLeftHandRing3': 'Left_ringFinger3', + 'mixamorigLeftHandPinky1': 'Left_littleFinger1', + 'mixamorigLeftHandPinky2': 'Left_littleFinger2', + 'mixamorigLeftHandPinky3': 'Left_littleFinger3', + 'mixamorigRightShoulder': 'Right_shoulder', + 'mixamorigRightArm': 'Right_arm', + 'mixamorigRightForeArm': 'Right_elbow', + 'mixamorigRightHand': 'Right_wrist', + 'mixamorigRightHandMiddle1': 'Right_middleFinger1', + 'mixamorigRightHandMiddle2': 'Right_middleFinger2', + 'mixamorigRightHandMiddle3': 'Right_middleFinger3', + 'mixamorigRightHandThumb1': 'Right_thumb0', + 'mixamorigRightHandThumb2': 'Right_thumb1', + 'mixamorigRightHandThumb3': 'Right_thumb2', + 'mixamorigRightHandIndex1': 'Right_indexFinger1', + 'mixamorigRightHandIndex2': 'Right_indexFinger2', + 'mixamorigRightHandIndex3': 'Right_indexFinger3', + 'mixamorigRightHandRing1': 'Right_ringFinger1', + 'mixamorigRightHandRing2': 'Right_ringFinger2', + 'mixamorigRightHandRing3': 'Right_ringFinger3', + 'mixamorigRightHandPinky1': 'Right_littleFinger1', + 'mixamorigRightHandPinky2': 'Right_littleFinger2', + 'mixamorigRightHandPinky3': 'Right_littleFinger3', + 'mixamorigRightUpLeg': 'Right_leg', + 'mixamorigRightLeg': 'Right_knee', + 'mixamorigRightFoot': 'Right_ankle', + 'mixamorigRightToeBase': 'Right_toe', + 'mixamorigLeftUpLeg': 'Left_leg', + 'mixamorigLeftLeg': 'Left_knee', + 'mixamorigLeftFoot': 'Left_ankle', + 'mixamorigLeftToeBase': 'Left_toe', + /* + Eye_L, + Eye_R, + */ +}; const _setSkeletonToAnimationFrame = (modelBones, animation, frame) => { - // console.log('set skeleton to animation frame', skeleton, animation, frame); - // XXX + for (const k in animation.interpolants) { + const interpolant = animation.interpolants[k]; + const match = k.match(/^(mixamorig.+)\.(position|quaternion)/); + if (match) { + const animationBoneName = match[1]; + const property = match[2]; + + const {sampleValues, valueSize} = interpolant; + const modelBoneName = animationBoneToModelBone[animationBoneName]; + const modelBone = modelBones[modelBoneName]; + if (!modelBone) { + console.warn('could not find model bone', modelBoneName, animationBoneName); + } + if (property === 'position') { + modelBone.position.fromArray(sampleValues, frame * valueSize); + } else if (property === 'quaternion') { + modelBone.quaternion.fromArray(sampleValues, frame * valueSize); + } else { + console.warn('unknown property', property, k); + } + } else { + console.warn('non-matching interpolant', k); + } + } }; const _setSkeletonWorld = (dstModelBones, srcModelBones) => { // XXX
0
diff --git a/scripts/build-c-client.ps1 b/scripts/build-c-client.ps1 param ( [Parameter(Mandatory=$true)][string]$NodeLibFile, [string]$Configuration = "Release", - [string]$Platform = "x64" + [string]$Platform = "x64", + [string]$CClientIni = "..\aerospike-client-c.ini", + [string]$FileHashesIni = "..\aerospike-client-c.sha256" ) # Required to unzip files @@ -11,6 +13,78 @@ Add-Type -AssemblyName System.IO.Compression.FileSystem # Utility module to invoke MSBuild tool Import-Module "..\scripts\Invoke-MsBuild.psm1" +# Parse name-value pairs, separated by "=" or another separator, from the given +# file. +function Parse-IniFile { + param( + [Parameter(Mandatory=$true)][string]$file, + [string]$sep, + [switch]$swap=$false + ) + + $ini = Get-Content $file + if ($sep) { + $ini = $ini -replace $sep, "=" + } + if ($swap) { + $ini = $ini -replace "^(\w+)=(.+)$", "`$2=`$1" + } + return ConvertFrom-StringData($ini -join "`n") +} + +# Download a file and check it's SHA256 checksum. +function Download { + param( + [string]$uri, + [string]$outfile, + [string]$hash + ) + + Write-Host "Downloading ${uri} to ${outfile}" + Invoke-WebRequest -Uri $uri -OutFile $outfile + $sha256 = (Get-FileHash $outfile -Algorithm Sha256).Hash + Write-Verbose "Validating ${outfile} checksum (expected: ${hash})" + if (! $sha256 -eq $hash) { + Write-Error "Checksum mis-match: ${outfile} - expected: ${hash}, actual: ${sha256}" + throw "Checksum mis-match: ${outfile} - expected: ${hash}, actual: ${sha256}" + } +} + +# Uncompress a zip archive. +function Unzip { + param( + [string]$zipfile, + [string]$outpath = (Resolve-Path ".\") + ) + + Write-Verbose "Expanding ${zipfile} archive to ${outpath}" + $zipfile = Resolve-Path $zipfile + New-Item -Path $outpath -ItemType "directory" -Force | out-null + [System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath) +} + +# Downloads and unpacks a zip-compressed archive from the given URL. +function Install-Package { + param( + [string]$uri, + [string]$archive, + [string]$hash, + [string]$outpath, + [switch]$createDir = $false + ) + + if (! (Test-Path $outpath)) { + if (! (Test-Path $archive)) { + Download $uri $archive $hash + } + if ($createDir) { + Unzip $archive $outpath + } else { + Unzip $archive ".\" + } + } +} + # Builds a VS project function Build-Project { param( @@ -31,6 +105,24 @@ function Build-Project { return $process.ExitCode -eq 0 } +$CClientCfg = Parse-IniFile $CClientIni +Write-Debug ($CClientCfg | Out-String) +$FileHashes = Parse-IniFile $FileHashesIni -sep " " -swap +Write-Debug ($FileHashes | Out-String) + +# C client path +Write-Host "Setting Aerospike C client source path" +$CClientSrcPath = "aerospike-client-c" + +# Install C client dependencies package +Write-Host "Installing Aerospike C client dependencies" +$CClientDepsVersion = $CClientCfg["AEROSPIKE_C_DEPS_VERSION"] +$CClientDepsSrcPath = "aerospike-client-c-dependencies.${CClientDepsVersion}" +$CClientDepsArchive = "${CClientDepsSrcPath}.zip" +$CClientDepsUrl = "https://www.nuget.org/api/v2/package/aerospike-client-c-dependencies/${CClientDepsVersion}" +$CClientDepsArchiveHash = $FileHashes[$CClientDepsArchive] +Install-Package -uri $CClientDepsUrl -archive $CClientDepsArchive -outpath $CClientDepsSrcPath -hash $CClientDepsArchiveHash -createdir + $ProjectFile = Resolve-Path (Join-Path $CClientSrcPath "vs\aerospike\aerospike.vcxproj") $NodePath = Split-Path $NodeLibFile -Parent $CClientConfiguration = "${Configuration} nodejs"
1
diff --git a/src/lib/gundb/UserStorageClass.js b/src/lib/gundb/UserStorageClass.js @@ -1932,8 +1932,19 @@ export class UserStorage { } _getProfileNode(initiatorType, initiator, address): Gun { - const getProfile = (idxSoul, idxKey) => { - logger.debug('extractProfile:', { idxSoul, idxKey }) + const getProfile = (indexName, idxKey) => { + const trustIdx = this.trust[indexName] + const trustExists = + trustIdx && + this.gun + .get(trustIdx) + .get(idxKey) + .then() + let idxSoul = `users/${indexName}` + if (trustExists) { + idxSoul = trustIdx + } + logger.debug('extractProfile:', { idxSoul, idxKey, trustExists }) // Need to verify if user deleted, otherwise gun might stuck here and feed wont be displayed (gun <0.2020) let gunProfile = this.gun @@ -1951,9 +1962,9 @@ export class UserStorage { } const searchField = initiatorType && `by${initiatorType}` - const byIndex = searchField && getProfile(this.trust[searchField] || `users/${searchField}`, initiator) + const byIndex = searchField && getProfile(searchField, initiator) - const byAddress = address && getProfile(this.trust.bywalletAddress || `users/bywalletAddress`, address) + const byAddress = address && getProfile('bywalletAddress', address) return byIndex || byAddress }
0
diff --git a/docs/src/components/DocLayout.tsx b/docs/src/components/DocLayout.tsx @@ -111,7 +111,7 @@ export default function DocLayout({ title, }: Props) { const Toc = <TableOfContents items={tableOfContents} />; - const tocHasItems = Toc.props.items?.length > 0; + const tocHasItems = tableOfContents?.length > 0; return ( <ThemeProvider theme={defaultTheme}> <BookmarkProvider page={path} location={location}>
1
diff --git a/app/models/eol_photo.rb b/app/models/eol_photo.rb @@ -108,7 +108,9 @@ class EolPhoto < Photo end def repair(options = {}) - r = EolPhoto.get_api_response( native_photo_id ) + unless r = EolPhoto.get_api_response( native_photo_id ) + return [self, { photo_missing: "photo not found #{self}" } ] + end p = EolPhoto.new_from_api_response( r ) (EolPhoto.column_names - %w(id created_at updated_at)).each do |a| send("#{a}=", p.send(a))
9
diff --git a/automod/effects.go b/automod/effects.go @@ -849,11 +849,14 @@ func (send *SendChannelMessageEffect) Apply(ctxData *TriggeredRuleData, settings } messageID, err := common.BotSession.ChannelMessageSendComplex(ctxData.CS.ID, msgSend) + if err != nil { + logger.WithError(err).Error("Failed to send message for AutomodV2") + return err + } if settingsCast.Duration > 0 { templates.MaybeScheduledDeleteMessage(ctxData.GS.ID, ctxData.CS.ID, messageID.ID, settingsCast.Duration) } - - return err + return nil } func (send *SendChannelMessageEffect) MergeDuplicates(data []interface{}) interface{} {
9
diff --git a/token-metadata/0x41eFc0253ee7Ea44400abB5F907FDbfdEbc82bec/metadata.json b/token-metadata/0x41eFc0253ee7Ea44400abB5F907FDbfdEbc82bec/metadata.json "symbol": "AAPL", "address": "0x41eFc0253ee7Ea44400abB5F907FDbfdEbc82bec", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/lib/HotModuleReplacement.runtime.js b/lib/HotModuleReplacement.runtime.js @@ -19,13 +19,13 @@ module.exports = function() { var fn = function(request) { if (me.hot.active) { if (installedModules[request]) { - if (!installedModules[request].parents.includes(moduleId)) + if (installedModules[request].parents.indexOf(moduleId)===-1) installedModules[request].parents.push(moduleId); } else { hotCurrentParents = [moduleId]; hotCurrentChildModule = request; } - if (!me.children.includes(request)) me.children.push(request); + if (me.children.indexOf(request)===-1) me.children.push(request); } else { console.warn( "[HMR] unexpected require(" + @@ -316,7 +316,7 @@ module.exports = function() { parentId: parentId }; } - if (outdatedModules.includes(parentId)) continue; + if (outdatedModules.indexOf(parentId)!==-1) continue; if (parent.hot._acceptedDependencies[moduleId]) { if (!outdatedDependencies[parentId]) outdatedDependencies[parentId] = []; @@ -343,7 +343,7 @@ module.exports = function() { function addAllToSet(a, b) { for (var i = 0; i < b.length; i++) { var item = b[i]; - if (!a.includes(item)) a.push(item); + if (a.indexOf(item)===-1) a.push(item); } } @@ -551,7 +551,7 @@ module.exports = function() { dependency = moduleOutdatedDependencies[i]; cb = module.hot._acceptedDependencies[dependency]; if (cb) { - if (callbacks.includes(cb)) continue; + if (callbacks.indexOf(cb)!==-1) continue; callbacks.push(cb); } }
13
diff --git a/README.md b/README.md ## Installation -### Swift Package +### Swift Package (Recommended) The [Swift Package Manager](https://swift.org/package-manager/ "") is a tool for automating the distribution of Swift code and is integrated into the swift compiler. Once you have your Swift package set up, adding `web3swift` as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`. @@ -109,7 +109,7 @@ Then, run the following command: $ pod install ``` -> **WARNING**: CocoaPods is a powerful tool for managing dependencies in iOS development, but it also has some limitations that need to be considered such as its limited control over dependencies, lack of transparency, complex setup and slow performance. +> **WARNING**: CocoaPods is a powerful tool for managing dependencies in iOS development, but it also has some limitations that need to be considered such as its limited control over dependencies, lack of transparency, complex setup and slow performance. We highly recommend using SPM first as using CocoaPods will delay new updates and bug fixes being delivered to you. ### Send Ether ```swift
3
diff --git a/src/transitions/Collapse.spec.js b/src/transitions/Collapse.spec.js @@ -105,10 +105,17 @@ describe('<Collapse />', () => { describe('handleEntered()', () => { let element; + let handleEnteredWrapper; + let handleEnteredInstance; + let onEnteredSpy; before(() => { + handleEnteredWrapper = shallow(<Collapse />); + onEnteredSpy = spy(); + handleEnteredWrapper.setProps({ onEntered: onEnteredSpy }); + handleEnteredInstance = handleEnteredWrapper.instance(); element = { style: { height: 666, transitionDuration: '500ms' } }; - instance.handleEntered(element); + handleEnteredInstance.handleEntered(element); }); it('should set element transition duration to 0 to fix a safari bug', () => { @@ -118,6 +125,10 @@ describe('<Collapse />', () => { it('should set height to auto', () => { assert.strictEqual(element.style.height, 'auto', 'should have auto height'); }); + + it('should have called onEntered', () => { + assert.strictEqual(onEnteredSpy.callCount, 1, 'should have called props.onEntered'); + }); }); describe('handleExit()', () => {
0
diff --git a/diorama.js b/diorama.js @@ -1587,10 +1587,10 @@ const createPlayerDiorama = (player, { const {devicePixelRatio: pixelRatio} = window; const renderer = getRenderer(); - sideCamera.position.set(0, 0, 10); + /* sideCamera.position.set(0, 0, 10); sideCamera.quaternion.identity(); sideCamera.updateMatrixWorld(); - renderer.compile(sideScene, sideCamera); + renderer.compile(sideScene, sideCamera); */ if (!canvas) { canvas = _makeCanvas(sideSize, sideSize); @@ -1604,6 +1604,8 @@ const createPlayerDiorama = (player, { width: 0, height: 0, enabled: true, + loadingTriggered: false, + loaded: false, addCanvas(canvas) { const {width, height} = canvas; this.width = Math.max(this.width, width); @@ -1630,14 +1632,40 @@ const createPlayerDiorama = (player, { lightningBackground = true; } }, + triggerLoad() { + this.loadingTriggered = true; + + const oldParent = player.avatar.model.parent; + Promise.all([ + (async () => { + sideAvatarScene.add(player.avatar.model); + await renderer.compileAsync(sideAvatarScene); + })(), + (async () => { + sideScene.add(player.avatar.model); + await renderer.compileAsync(sideScene); + })(), + ]).then(() => { + this.loaded = true; + }); + + if (oldParent) { + oldParent.add(player.avatar.model); + } else { + player.avatar.model.parent.remove(player.avatar.model); + } + }, update(timestamp, timeDiff) { - if (!this.enabled) { + const renderer = getRenderer(); + if (this.enabled && !this.loadingTriggered && player.avatar) { + this.triggerLoad(); + } + if (!this.enabled || !this.loaded) { lastDisabledTime = timestamp; return; } const timeOffset = timestamp - lastDisabledTime; - const renderer = getRenderer(); const size = renderer.getSize(localVector2D); // a Vector2 representing the largest power of two less than or equal to the current canvas size const sizePowerOfTwo = localVector2D2.set(
0
diff --git a/constants.js b/constants.js @@ -32,14 +32,36 @@ export { }; export const polygonVigilKey = `0937c004ab133135c86586b55ca212a6c9ecd224`; +// + const origin = window.location.protocol + '//' + window.location.hostname; +let _inappPreviewHost = ''; + +switch ( origin ) { + case 'https://local.webaverse.com': { + _inappPreviewHost = 'https://local.webaverse.online'; + break; + } + case 'https://dev.webaverse.com': { + _inappPreviewHost = 'https://dev.webaverse.online'; + break; + } + case 'https://staging.webaverse.com': { + _inappPreviewHost = 'https://staging.webaverse.online'; + break; + } + default: { + _inappPreviewHost = 'https://app.webaverse.online'; + } +} + +export const inappPreviewHost = _inappPreviewHost; + +// + export const storageHost = 'https://ipfs.webaverse.com'; export const previewHost = 'https://preview.exokit.org'; -export const inappPreviewHost = origin === 'https://local.webaverse.com' ? - 'https://local.webaverse.online' -: - 'https://app.webaverse.online'; export const worldsHost = 'https://worlds.exokit.org'; export const accountsHost = `https://${chainName}sidechain-accounts.webaverse.com`; export const contractsHost = 'https://contracts.webaverse.com';
3
diff --git a/lod.js b/lod.js @@ -61,10 +61,12 @@ export class LodChunkTracker { constructor(generator, { chunkWorldSize = 10, numLods = 1, + chunkHeight = 0, } = {}) { this.generator = generator; this.chunkWorldSize = chunkWorldSize; this.numLods = numLods; + this.chunkHeight = chunkHeight; this.chunks = []; this.lastUpdateCoord = new THREE.Vector2(NaN, NaN); @@ -82,10 +84,12 @@ export class LodChunkTracker { const neededChunks = []; for (let dcx = -1; dcx <= 1; dcx++) { for (let dcz = -1; dcz <= 1; dcz++) { - const chunk = new LodChunk(currentCoord.x + dcx, 0, currentCoord.y + dcz, lod); + for (let dcy = -this.chunkHeight / this.chunkWorldSize; dcy <= this.chunkHeight / this.chunkWorldSize; dcy++) { // XXX + const chunk = new LodChunk(currentCoord.x + dcx, dcy, currentCoord.y + dcz, lod); neededChunks.push(chunk); } } + } const addedChunks = []; const removedChunks = [];
0
diff --git a/src/global_logic.js b/src/global_logic.js @@ -811,11 +811,11 @@ module.exports.calcBasedOneSummon = function (summonind, prof, buff, totals) { } } - res["Djeeta"]["averageAttack"] = parseInt(average / cnt); - res["Djeeta"]["averageCriticalAttack"] = parseInt(crit_average / cnt); - res["Djeeta"]["averageTotalExpected"] = parseInt(totalExpected_average / cnt); - res["Djeeta"]["averageCyclePerTurn"] = parseInt(averageCyclePerTurn / cnt); - res["Djeeta"]["averageChainBurst"] = parseInt(averageChainBurst / cnt); + res["Djeeta"]["averageAttack"] = average / cnt; + res["Djeeta"]["averageCriticalAttack"] = crit_average / cnt; + res["Djeeta"]["averageTotalExpected"] = totalExpected_average / cnt; + res["Djeeta"]["averageCyclePerTurn"] = averageCyclePerTurn / cnt; + res["Djeeta"]["averageChainBurst"] = averageChainBurst / cnt; res["Djeeta"]["totalOugiDamage"] = totalOugiDamage; res["Djeeta"]["totalOugiDamageWithChain"] = totalOugiDamage + chainBurst;
14
diff --git a/README.md b/README.md -# rctf - RedpwnCTF's CTF Platform +# rCTF - RedpwnCTF's CTF Platform -rctf is RedpwnCTF's CTF platform. It is developed and maintained by the [redpwn](https://redpwn.net) CTF team. +rCTF is RedpwnCTF's CTF platform. It is developed and maintained by the [redpwn](https://redpwn.net) CTF team. ## Design Goals -We have designed rctf with the following attributes in mind: +We have designed rCTF with the following attributes in mind: * scalability * simplicity * "modernness" (no PHP) -## Deployment +## Installation -### Problem Data +### Automatic -To build, simply copy the exported directory from [rDeploy](https://github.com/redpwn/rdeploy) to `config.rDeployDirectory` (defaults to `.rdeploy`). +The automatic installation script works on Debian and RHEL derivative distributions. It depends on `curl`. ```bash -~ $ ls -rdeploy rctf -~ $ cd rdeploy -~/rdeploy $ python main.py build -~/rdeploy $ cp -r export ../rctf/.rdeploy +curl https://install.rctf.redpwn.net | sh ``` -## Installation +### Manual -### Environment +#### Environment You should copy the `.env.example` to `.env`. -``` -~/rctf $ cp .env.example .env +```bash +$ cp .env.example .env ``` Note that the `RCTF_TOKEN_KEY` should be a base64 encoded string of length 32 bytes. You can generate one with the following command. -``` +```bash $ openssl rand -base64 32 j9qpC+J9lrvx/F7uQ9wGKawhzfPyPb1aM+JPeLfsFX8= ``` -### Database +#### Database The application is built on a PostgreSQL database. You should add the appropriate connection string in `.env`. Then run the following command to setup the database. -``` -yarn run migrate up +```bash +$ yarn run migrate up ``` ## Development @@ -55,14 +51,14 @@ yarn run migrate up For hot reloading, use nodemon. -```javascript -yarn dev +```bash +$ yarn dev ``` There is a precommit hook that will block commits that fail to meet the style guide. To fix style errors, use standard. -``` -yarn lint --fix +```bash +$ yarn lint --fix ``` ### Frontend @@ -71,6 +67,19 @@ The frontend is built on [Preact](https://preactjs.com/) and [Cirrus](https://sp All of the frontend code is in `/client`. To automatically watch the directory for changes, use the `watch` command. +```bash +$ yarn watch ``` -yarn watch + +## Deployment + +### Problem Data + +To build, simply copy the exported directory from [rDeploy](https://github.com/redpwn/rdeploy) to `config.rDeployDirectory` (defaults to `.rdeploy`). + +```bash +$ cd rdeploy +$ python main.py build +$ cp -r export ../rctf/.rdeploy ``` +
7
diff --git a/token-metadata/0xa3d58c4E56fedCae3a7c43A725aeE9A71F0ece4e/metadata.json b/token-metadata/0xa3d58c4E56fedCae3a7c43A725aeE9A71F0ece4e/metadata.json "symbol": "MET", "address": "0xa3d58c4E56fedCae3a7c43A725aeE9A71F0ece4e", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/aura-impl/src/main/resources/aura/AuraComponentService.js b/aura-impl/src/main/resources/aura/AuraComponentService.js @@ -419,6 +419,7 @@ AuraComponentService.prototype.createInternalConfig = function (config) { "componentDef" : this.createDescriptorConfig(config["descriptor"]), "localId" : config["localId"] || config["aura:id"], "flavor" : config["flavor"], + "skipCreationPath" : config["skipCreationPath"], "attributes" : { "values" : config["attributes"], "valueProvider" : config["valueProvider"]
11
diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md @@ -106,7 +106,7 @@ This plugin also provides the following tool-specific configurations, which can ### node -If you are working on a node module, we also provide the [node configuration](lib/config/esnext.js) for you. Note that this configuration needs to be used in conjunction with one of the core configurations (either `es5` or `esnext`). If you plan to transpile your code using Babel, use the `esnext` config. If you do not plan to do so, the config you choose depends on the version of node you wish to support, and how many ESNext features are natively available in that version. You can see a detailed list of what version of node supports what new JavaScript features by visiting http://node.green. +If you are working on a node module, we also provide the [node configuration](lib/config/node.js) for you. Note that this configuration needs to be used in conjunction with one of the core configurations (either `es5` or `esnext`). If you plan to transpile your code using Babel, use the `esnext` config. If you do not plan to do so, the config you choose depends on the version of node you wish to support, and how many ESNext features are natively available in that version. You can see a detailed list of what version of node supports what new JavaScript features by visiting http://node.green. A node project that will use Babel for transpilation would need the following ESLint config:
1
diff --git a/src/inertia.js b/src/inertia.js @@ -11,6 +11,7 @@ export default { component: null, props: null, instance: null, + cached: false, }, init(component, props, resolveComponent) { @@ -22,7 +23,7 @@ export default { }, setPage(component, props, preserveScroll = false) { - Promise.resolve(this.resolveComponent(component)).then(instance => { + return Promise.resolve(this.resolveComponent(component)).then(instance => { this.isFirstPage = this.isFirstPage === null this.page.component = component this.page.props = props @@ -62,10 +63,11 @@ export default { visit(url, { replace = false, preserveScroll = false } = {}) { this.hideModal() this.showProgressBar() - this.getHttp().get(url).then(response => { + + return this.getHttp().get(url).then(response => { if (this.isInertiaResponse(response)) { this.setState(replace, response.data) - this.setPage(response.data.component, response.data.props, preserveScroll) + return this.setPage(response.data.component, response.data.props, preserveScroll) } else { this.showModal(response.data) } @@ -74,7 +76,7 @@ export default { return } else if (this.isInertiaResponse(error.response)) { this.setState(replace, error.response.data) - this.setPage(error.response.data.component, error.response.data.props, preserveScroll) + return this.setPage(error.response.data.component, error.response.data.props, preserveScroll) } else if (error.response) { this.showModal(error.response.data) } else { @@ -99,10 +101,11 @@ export default { handlePopState(event) { if (event.state) { - this.setPage(event.state.component, event.state.props, true) + this.page.cached = true + this.setPage(event.state.component, event.state.props, true).then(() => { + return this.visit(window.location.href, { replace: null, preserveScroll: true }) + }).then(() => this.page.cached = false) } - - this.visit(window.location.href, { replace: null, preserveScroll: true }) }, showProgressBar() {
1
diff --git a/articles/understanding-differential-privacy/index.md b/articles/understanding-differential-privacy/index.md @@ -58,13 +58,18 @@ Assume, we have a small database of 5000 entries with 0 or 1 as a value for each ### Differencing attacks -In continuation with the previous example, let's say we want to find if a specific person has cancer or not, so what we do is, find the sum of all the values, and then find the sum of all values after removing that person. On finding the difference between both the summations, we get the exact value of that person, thus we will know if he has cancer or not. This is one of the simplest differencing attacks, using summation. +In continuation with the previous explanation, let's say we want to check if privacy has been preserved for every individual in the database, so what we do is -Similarly, there are other types of differencing attacks using various other functions like mean(), median(), and so on. This measure of how much data is leaked through a query can be measured with **sensitivity.** +- Find the sum of all the values before removal of 1 persons' data (the original values) +- Then find the sum of all values after removing that person (a new database with 1 missing value) +- On finding the difference between both the summations, we get the exact detail of that person +Thus we will know if he has cancer or not. This shows that the privacy of that individual has been leaked. This is one of the simplest differencing attacks, using a summation query. + +Similarly, there are other types of differencing attacks using various other functions like mean(), median(), and so on. This measure of how much data is leaked through a query can be measured with **sensitivity.** In simple terms, it can be said as the largest possible difference for that one row, for any dataset. For our example, the sensitivity is 1, which means that adding or removing a single row from the dataset will change the count by at most 1. ### Implementing differential privacy -Now, we are going to implement Differential privacy for a simple database query. The database has only 1 column with boolean types. The boolean type denotes if a person possesses some private attribute or not (example, if a person has a particular disease or not). And, we are going to learn, if the database is differentially private or not. +Now, we are going to implement Differential privacy for a simple database query using a summation differencing attack. The database has only 1 column with boolean types. The boolean type denotes if a person possesses some private attribute or not (for example, if a person has a particular disease or not). And, we are going to learn, if the database is differentially private or not. #### Creating a database @@ -90,7 +95,8 @@ To demonstrate Differential privacy, we try to manually omit certain values from ```python def get_parallel_db(db, remove_index): - return torch.cat((db[0:remove_index], db[remove_index+1:])) + return torch.cat((db[0:remove_index], db[remove_index+1:])) # torch.cat() concatenates two different sequence of tensors. + # Here, we slice tensor db from (0, remove_index) and (remove_index + 1, len(db)), and then concatenate both the tensors into 1 single tensor get_parallel_db(db, 3) ```
1
diff --git a/userscript.user.js b/userscript.user.js @@ -94557,19 +94557,19 @@ var $$IMU_EXPORT$$; } // django-photologue - if (src.match(/\/media\/photologue\/photos\/cache\//)) { + if (/\/media\/+photologue\/+photos\/+cache\//.test(src)) { // http://www.thewesternstar.com/media/photologue/photos/cache/EDM113447235_large.jpg // http://www.thewesternstar.com/media/photologue/photos/EDM113447235.jpg // http://www.django-photologue.net/media/photologue/photos/cache/312960255_85e378833b_o_thumbnail.jpg // http://www.django-photologue.net/media/photologue/photos/312960255_85e378833b_o.jpg - return src.replace(/\/cache\/([^/]*)_[a-z]+(\.[^/.]*)$/, "/$1$2"); + return src.replace(/\/cache\/+([^/]*)_[a-z]+(\.[^/.]*(?:[?#].*)?)$/, "/$1$2"); } - if (src.match(/\/\.evocache\/([^/]*\.[^/]*)\/fit-[0-9]+x[0-9]+\.[^/.]*$/)) { + if (/\/\.evocache\/+([^/]*\.[^/]*)\/+fit-[0-9]+x[0-9]+\.[^/.]*(?:[?#].*)?$/.test(src)) { // http://look.onemonkey.org/.evocache/LondonBUR.png/fit-80x80.png // https://www.urbanrealm.com/blogs/media/blogs/pauls/.evocache/IMG_0494.JPG/fit-720x500.JPG?mtime=1530381418 // https://www.urbanrealm.com/blogs/media/blogs/pauls/IMG_0494.JPG - return src.replace(/\/\.evocache\/([^/]*\.[^/]*)\/[^/]*$/, "/$1"); + return src.replace(/\/\.evocache\/+([^/]*\.[^/]*)\/+[^/]*(?:[?#].*)?$/, "/$1"); } if (src.match(/:\/\/[^/]*\/yahoo_site_admin[0-9]*\/assets\/images\//)) {
7
diff --git a/lambda/lex-build/package.json b/lambda/lex-build/package.json "aws-sdk": "^2.72.0", "bluebird": "^3.5.0", "elasticsearch": "^13.0.1", - "http-aws-es": "^1.1.3" + "http-aws-es": "^1.1.3", + "lodash": "^4.17.10" }, "devDependencies": { "nodeunit": "^0.11.1"
12
diff --git a/articles/api-auth/tutorials/password-grant.md b/articles/api-auth/tutorials/password-grant.md @@ -122,3 +122,7 @@ If you wish to execute special logic unique to the Password exchange, you can lo ## Optional: Configure MFA In case you need stronger authentication, than username and password, you can configure MultiFactor Authentication (MFA) using the Resource Owner Password Grant. For details on how to implement this refer to [Multifactor Authentication and Resource Owner Password](/api-auth/tutorials/multifactor-resource-owner-password). + +## Optional: Configure Anomaly Detection + +When using this flow from server-side applications, some anomaly detection features might fail because of the particularities of this scenario. For details on how to implement this, while avoiding some common issues, refer to [Using Resource Owner Password from Server side](/api-auth/tutorials/using-resource-owner-password-from-server-side).
0
diff --git a/src/drivers/npm/driver.js b/src/drivers/npm/driver.js @@ -44,6 +44,8 @@ class Driver { this.wappalyzer.driver.log = (message, source, type) => this.log(message, source, type); this.wappalyzer.driver.displayApps = (detected, meta, context) => this.displayApps(detected, meta, context); + + process.on('uncaughtException', e => this.wappalyzer.log('Uncaught exception: ' + e.message, 'driver', 'error')); } analyze() {
9
diff --git a/test/util.js b/test/util.js @@ -62,19 +62,19 @@ export var interpertAndGuard = function (m, rec, rej, res){ if(rejected){ throw new Error(m.toString() + ' crashed after rejecting: ' + show(e)) } if(resolved){ throw new Error(m.toString() + ' crashed after resolving: ' + show(e)) } crashed = true; - rec(e); + setTimeout(rec, 20, e); }, function (e){ if(crashed){ throw new Error(m.toString() + ' rejected after crashing: ' + show(e)) } if(rejected){ throw new Error(m.toString() + ' rejected twice with: ' + show(e)) } if(resolved){ throw new Error(m.toString() + ' rejected after resolving: ' + show(e)) } rejected = true; - rej(e); + setTimeout(rej, 20, e); }, function (x){ if(crashed){ throw new Error(m.toString() + ' resolved after crashing: ' + show(x)) } if(rejected){ throw new Error(m.toString() + ' resolved twice with: ' + show(x)) } if(resolved){ throw new Error(m.toString() + ' resolved after rejecting: ' + show(x)) } resolved = true; - res(x); + setTimeout(res, 20, x); }); };
7
diff --git a/assets/js/modules/analytics-4/utils/data-mock.test.js b/assets/js/modules/analytics-4/utils/data-mock.test.js @@ -45,39 +45,6 @@ describe( 'getAnalytics4MockResponse', () => { ).toThrow( 'a valid endDate is required' ); } ); - it( 'checks if the number of rows having date_range_0 matches date_range_1', () => { - const report = getAnalytics4MockResponse( { - startDate: '2020-12-01', - endDate: '2020-12-15', - compareStartDate: '2020-11-26', - compareEndDate: '2020-11-30', - metrics: [ - { - name: 'totalUsers', - }, - { - name: 'averageSessionDuration', - }, - 'sessions', - ], - dimensions: [ 'date' ], - } ); - - const dateRangeZero = report.rows.filter( ( { dimensionValues } ) => - dimensionValues.find( - ( dimensionValue ) => dimensionValue.value === 'date_range_0' - ) - ); - - const dateRangeOne = report.rows.filter( ( { dimensionValues } ) => - dimensionValues.find( - ( dimensionValue ) => dimensionValue.value === 'date_range_1' - ) - ); - - expect( dateRangeZero ).toHaveLength( dateRangeOne.length ); - } ); - it( 'generates a valid report', () => { const report = getAnalytics4MockResponse( { startDate: '2020-12-29', @@ -121,4 +88,37 @@ describe( 'getAnalytics4MockResponse', () => { // Verify the correct number of rows for the date ranges. expect( report.rows ).toHaveLength( 10 ); } ); + + it( 'generates the same number of rows for each date range in a multi-date range report', () => { + const report = getAnalytics4MockResponse( { + startDate: '2020-12-01', + endDate: '2020-12-15', + compareStartDate: '2020-11-26', + compareEndDate: '2020-11-30', + metrics: [ + { + name: 'totalUsers', + }, + { + name: 'averageSessionDuration', + }, + 'sessions', + ], + dimensions: [ 'date' ], + } ); + + const dateRangeZero = report.rows.filter( ( { dimensionValues } ) => + dimensionValues.find( + ( dimensionValue ) => dimensionValue.value === 'date_range_0' + ) + ); + + const dateRangeOne = report.rows.filter( ( { dimensionValues } ) => + dimensionValues.find( + ( dimensionValue ) => dimensionValue.value === 'date_range_1' + ) + ); + + expect( dateRangeZero ).toHaveLength( dateRangeOne.length ); + } ); } );
5
diff --git a/build/plotcss.js b/build/plotcss.js var Lib = require('../src/lib'); var rules = { - "X,X div": "font-family:'Open Sans', verdana, arial, sans-serif;margin:0;padding:0;", + "X,X div": "direction:ltr;font-family:'Open Sans', verdana, arial, sans-serif;margin:0;padding:0;", "X input,X button": "font-family:'Open Sans', verdana, arial, sans-serif;", "X input:focus,X button:focus": "outline:none;", "X a": "text-decoration:none;",
3
diff --git a/docs/src/pages/getting-started/installation.md b/docs/src/pages/getting-started/installation.md @@ -13,7 +13,7 @@ npm install -S material-ui@next ## Roboto Font Material-UI was designed with the [Roboto](http://www.google.com/fonts/specimen/Roboto) -font in mind. So be sure to follow [those instructions](/style/typography#general). +font in mind. So be sure to follow [these instructions](/style/typography#general). ## Icon Font
1
diff --git a/Apps/Sandcastle/gallery/Terrain.html b/Apps/Sandcastle/gallery/Terrain.html @@ -37,7 +37,7 @@ var viewer = new Cesium.Viewer('cesiumContainer'); viewer.scene.globe.enableLighting = true; var cesiumTerrainProviderMeshes = new Cesium.CesiumTerrainProvider({ - url : 'https://assets.agi.com/stk-terrain/world', + url : 'https://assets.agi.com/stk-terrain/v1/tilesets/world/tiles', requestWaterMask : true, requestVertexNormals : true }); @@ -61,14 +61,14 @@ Sandcastle.addToolbarMenu([{ text : 'CesiumTerrainProvider - STK World Terrain - no effects', onselect : function() { viewer.terrainProvider = new Cesium.CesiumTerrainProvider({ - url : 'https://assets.agi.com/stk-terrain/world' + url : 'https://assets.agi.com/stk-terrain/v1/tilesets/world/tiles' }); } }, { text : 'CesiumTerrainProvider - STK World Terrain w/ Lighting', onselect : function() { viewer.terrainProvider = new Cesium.CesiumTerrainProvider({ - url : 'https://assets.agi.com/stk-terrain/world', + url : 'https://assets.agi.com/stk-terrain/v1/tilesets/world/tiles', requestVertexNormals : true }); viewer.scene.globe.enableLighting = true; @@ -77,7 +77,7 @@ Sandcastle.addToolbarMenu([{ text : 'CesiumTerrainProvider - STK World Terrain w/ Water', onselect : function() { viewer.terrainProvider = new Cesium.CesiumTerrainProvider({ - url : 'https://assets.agi.com/stk-terrain/world', + url : 'https://assets.agi.com/stk-terrain/v1/tilesets/world/tiles', requestWaterMask : true }); }
3
diff --git a/lib/shared/addon/components/cluster-driver/driver-eks/component.js b/lib/shared/addon/components/cluster-driver/driver-eks/component.js @@ -326,10 +326,10 @@ export default Component.extend(ClusterDriver, { } }), - selectedSubnets: computed('config.subnets.[]', 'primaryResource.eksStatus.generatedSubnets.[]', function() { + selectedSubnets: computed('config.subnets.[]', 'primaryResource.eksStatus.subnets.[]', function() { const { config: { subnets }, - primaryResource: { eksStatus: { generatedSubnets } = { } }, + primaryResource: { eksStatus: { subnets: generatedSubnets } = { } }, } = this; if (isEmpty(subnets)) {
3
diff --git a/ghost/admin/app/styles/layouts/dashboard.css b/ghost/admin/app/styles/layouts/dashboard.css @@ -1244,7 +1244,7 @@ Dashboard Attribution */ } .gh-all-sources .gh-dashboard-list-body { - max-height: calc(100vh - 215px); + max-height: calc(100vh - 255px); position: relative; }
1
diff --git a/token-metadata/0xF5238462E7235c7B62811567E63Dd17d12C2EAA0/metadata.json b/token-metadata/0xF5238462E7235c7B62811567E63Dd17d12C2EAA0/metadata.json "symbol": "CGT", "address": "0xF5238462E7235c7B62811567E63Dd17d12C2EAA0", "decimals": 8, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/components/Dropdown/V2/Dropdown.Item.tsx b/src/components/Dropdown/V2/Dropdown.Item.tsx @@ -256,7 +256,7 @@ export class Item extends React.PureComponent<Props> { className ) - if (type === 'group') return <Header {...this.props} /> + if (type === 'group' || type === 'header') return <Header {...this.props} /> if (type === 'divider') return <Divider /> return (
11
diff --git a/client/index.prod.jsx b/client/index.prod.jsx @@ -10,7 +10,10 @@ import ReduxToastr from 'react-redux-toastr'; import version from '../version.js'; -Raven.config('https://[email protected]/123019', { release: version}).install(); +Raven.config('https://[email protected]/123019', { + ignoreErrors: ['/recaptcha/api2'], + release: version +}).install(); const store = configureStore();
8
diff --git a/lib/assets/core/javascripts/cartodb3/editor/layers/layer-views/data-layer-view.js b/lib/assets/core/javascripts/cartodb3/editor/layers/layer-views/data-layer-view.js @@ -262,7 +262,10 @@ module.exports = CoreView.extend({ label: _t('editor.layers.options.edit'), val: 'edit-layer', action: this._onEditLayer.bind(this) - }, { + }]; + + if (this._queryGeometryHasGeom()) { + menuItems = menuItems.concat([{ label: this._isCollapsed() ? _t('editor.layers.options.expand') : _t('editor.layers.options.collapse'), val: 'collapse-expand-layer', action: this._onToggleCollapsedLayer.bind(this) @@ -276,15 +279,14 @@ module.exports = CoreView.extend({ label: _t('editor.layers.options.export'), val: 'export-data', action: this._exportLayer.bind(this) - }]; - - if (this._queryGeometryHasGeom()) { - menuItems.push({ + }, + { label: _t('editor.layers.options.center-map'), val: 'center-map', action: this._centerMap.bind(this) - }); + }]); } + if (this.model.canBeDeletedByUser()) { menuItems.push({ label: _t('editor.layers.options.delete'),
2
diff --git a/src/sensors/DataSearch.js b/src/sensors/DataSearch.js @@ -141,8 +141,7 @@ class DataSearch extends Component { setValue = (value) => { this.setState({ - currentValue: value, - suggestions: [] + currentValue: value }); if (this.props.autoSuggest) { this.updateQuery(this.internalComponent, value);
3
diff --git a/src/platforms/platform.dom.js b/src/platforms/platform.dom.js @@ -124,11 +124,11 @@ var supportsEventListenerOptions = (function() { // https://github.com/chartjs/Chart.js/issues/4287 var eventListenerOptions = supportsEventListenerOptions ? {passive: true} : false; -function addEventListener(node, type, listener) { +function addListener(node, type, listener) { node.addEventListener(type, listener, eventListenerOptions); } -function removeEventListener(node, type, listener) { +function removeListener(node, type, listener) { node.removeEventListener(type, listener, eventListenerOptions); } @@ -223,8 +223,8 @@ function createResizer(handler) { handler(); }; - addEventListener(expand, 'scroll', onScroll.bind(expand, 'expand')); - addEventListener(shrink, 'scroll', onScroll.bind(shrink, 'shrink')); + addListener(expand, 'scroll', onScroll.bind(expand, 'expand')); + addListener(shrink, 'scroll', onScroll.bind(shrink, 'shrink')); return resizer; } @@ -239,7 +239,7 @@ function watchForRender(node, handler) { }; helpers.each(ANIMATION_START_EVENTS, function(type) { - addEventListener(node, type, proxy); + addListener(node, type, proxy); }); // #4737: Chrome might skip the CSS animation when the CSS_RENDER_MONITOR class @@ -258,7 +258,7 @@ function unwatchForRender(node) { if (proxy) { helpers.each(ANIMATION_START_EVENTS, function(type) { - removeEventListener(node, type, proxy); + removeListener(node, type, proxy); }); delete expando.renderProxy; @@ -429,7 +429,7 @@ module.exports = { listener(fromNativeEvent(event, chart)); }; - addEventListener(canvas, type, proxy); + addListener(canvas, type, proxy); }, removeEventListener: function(chart, type, listener) { @@ -447,7 +447,7 @@ module.exports = { return; } - removeEventListener(canvas, type, proxy); + removeListener(canvas, type, proxy); } }; @@ -462,7 +462,7 @@ module.exports = { * @todo remove at version 3 * @private */ -helpers.addEvent = addEventListener; +helpers.addEvent = addListener; /** * Provided for backward compatibility, use EventTarget.removeEventListener instead. @@ -473,4 +473,4 @@ helpers.addEvent = addEventListener; * @todo remove at version 3 * @private */ -helpers.removeEvent = removeEventListener; +helpers.removeEvent = removeListener;
10
diff --git a/src/app/lib/file-server.js b/src/app/lib/file-server.js @@ -3,15 +3,20 @@ const express = require('express') module.exports = () => { return new Promise((resolve) => { const app = express() + const conf = { + maxAge: 1000 * 60 * 60 * 24 * 365 + } app.use( express.static( - require('path').resolve(__dirname, '../assets') + require('path').resolve(__dirname, '../assets'), + conf ) ) app.use( '/node_modules', express.static( - require('path').resolve(__dirname, '../node_modules') + require('path').resolve(__dirname, '../node_modules'), + conf ) ) const { devPort = 5571 } = process.env
7
diff --git a/lib/shared/addon/components/cluster-driver/driver-rke/component.js b/lib/shared/addon/components/cluster-driver/driver-rke/component.js @@ -525,9 +525,13 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, { out = Object.keys(out); - let patchedOut = out.map((version) => { - return `${ major(version) }.${ minor(version) }.x`; + let patchedOut = []; + + if (this.clusterTemplateCreate) { + patchedOut = out.map((version) => { + return `v${ major(version) }.${ minor(version) }.x`; }); + } return [...out, ...patchedOut]; }),
2
diff --git a/source/background/library/contextMenu.js b/source/background/library/contextMenu.js @@ -11,7 +11,8 @@ const CONTEXT_SHARED_EDITABLE = { contexts: getBrowser() === "firefox" ? ["editable", "password"] : ["editable"] }; -let __menu = null; +let __menu = null, + __buildPromise = null; async function buildEntryExplorerMenu(parentMenu, clickHandler) { const facades = await getFacades(); @@ -157,5 +158,10 @@ async function performUpdate() { } export function updateContextMenu() { - performUpdate(); + if (__buildPromise) { + return __buildPromise; + } + __buildPromise = performUpdate().finally(() => { + __buildPromise = null; + }); }
9
diff --git a/bundles/ranvier-quests/commands/quest.js b/bundles/ranvier-quests/commands/quest.js @@ -127,7 +127,7 @@ module.exports = (srcPath) => { const active = [...player.questTracker.activeQuests]; let targetQuest = parseInt(options[0], 10); targetQuest = isNaN(targetQuest) ? -1 : targetQuest - 1; - if (targetQuest < 0 || targetQuest > active.length) { + if (!active[targetQuest]) { return say(player, "Invalid quest, use 'quest log' to see your active quests."); }
1
diff --git a/src/modules/dex/directives/dexCandleChart/DexCandleChart.js b/src/modules/dex/directives/dexCandleChart/DexCandleChart.js * @private */ this.candle = user.getSetting('candle'); + this.observe('_assetIdPair', this._onChangeAssetPair); this.observe('theme', () => { this._changeTheme = true; static _remapLanguageCode(code) { switch (code) { - case 'hi_IN': + case 'hi': return 'en'; - case 'zh_CN': + case 'nl': + return 'nl_NL'; + case 'zh-Hans-CN': return 'zh'; default: return code;
13
diff --git a/lib/outline/outline.js b/lib/outline/outline.js @@ -23,28 +23,26 @@ export default class Outline extends PaneItem { etch.initialize(this) this.element.setAttribute('tabindex', -1) - this.element.classList.add('ink-workspace') } setItems (items) { this.items = items this.filterItems(this.searchEd.getText()) + etch.update(this) } filterItems (query) { if (query.length == 0) { this.filteredItems = this.items - etch.update(this) - return - } - + } else { this.filteredItems = [] let _items = fuzzaldrinPlus.filter(this.items, query, {key: 'name'}) if (_items.length > 0) { _items.sort((a, b) => b.score - a.score) this.filteredItems = _items } + } etch.update(this) } @@ -66,9 +64,9 @@ export default class Outline extends PaneItem { <div className="outline-content"> <table className="items"> { - this.filteredItems.map(({name, icon, type, onClick, isActive}) => + this.filteredItems.map(({name, icon, type, lines, onClick, isActive}) => <tr - key={`${name}`} + key={`${name}-${icon}-${type}-${lines}`} className={isActive ? 'isactive' : ''} ref={isActive ? "activeElement" : ""} onClick={onClick}
7
diff --git a/src/plots/gl2d/camera.js b/src/plots/gl2d/camera.js @@ -131,7 +131,7 @@ function createCamera(scene) { if(Math.abs(dx * dydx) > Math.abs(dy)) { result.boxEnd[1] = result.boxStart[1] + - Math.abs(dx) * dydx * (Math.sign(dy) || 1); + Math.abs(dx) * dydx * (dy >= 0 ? 1 : -1); // gl-select-box clips to the plot area bounds, // which breaks the axis constraint, so don't allow @@ -149,7 +149,7 @@ function createCamera(scene) { } else { result.boxEnd[0] = result.boxStart[0] + - Math.abs(dy) / dydx * (Math.sign(dx) || 1); + Math.abs(dy) / dydx * (dx >= 0 ? 1 : -1); if(result.boxEnd[0] < dataBox[0]) { result.boxEnd[0] = dataBox[0];
2
diff --git a/tests/phpunit/integration/Core/Storage/Data_EncryptionTest.php b/tests/phpunit/integration/Core/Storage/Data_EncryptionTest.php @@ -48,7 +48,7 @@ class Data_EncryptionTest extends TestCase { // Encrypt 'test-value' and ensure that it is decrypted successfully. $iv_len = openssl_cipher_iv_length( self::METHOD ); $iv = openssl_random_pseudo_bytes( $iv_len ); - $encrypted = openssl_encrypt( 'test-value' . 'test-salt', self::METHOD, 'test-key', 0, $iv ); + $encrypted = openssl_encrypt( 'test-value' . 'test-salt', self::METHOD, 'test-key', 0, $iv ); // phpcs:ignore Generic.Strings.UnnecessaryStringConcat.Found $encrypted_value = base64_encode( $iv . $encrypted ); $decrypted_value = $encryption->decrypt( $encrypted_value );
8
diff --git a/packages/app/src/components/Common/Dropdown/PageItemControl.tsx b/packages/app/src/components/Common/Dropdown/PageItemControl.tsx @@ -191,7 +191,7 @@ const PageItemControlDropdownMenu = React.memo((props: DropdownMenuProps): JSX.E <> { showDeviderBeforeDelete && <DropdownItem divider /> } <DropdownItem - className={`pt-2 d-flex align-items-center ${pageInfo.isDeletable ? 'text-danger' : ''}`} + className={`pt-2 grw-page-control-dropdown-item ${pageInfo.isDeletable ? 'text-danger' : ''}`} disabled={!pageInfo.isDeletable} onClick={deleteItemClickedHandler} data-testid="open-page-delete-modal-btn"
14
diff --git a/shared/data/tracker_lists/trackersWithParentCompany.json b/shared/data/tracker_lists/trackersWithParentCompany.json ] } }, + { + "rule": "ad4game\\.com[?/].*\\/images\\/", + "options": { + "types": [ + "image" + ], + "domains": [ + "kissanime.com" + ] + } + }, { "rule": "ad4game\\.com\\/js\\/", "options": { "u": "http://www.ibm.com/", "whitelist": [ { - "rule": "coremetrics\\.com.*\\/eluminate\\.js" + "rule": "coremetrics\\.com[?/].*\\/eluminate\\.js" } ] }, "rule": "pixel\\.facebook\\.com($|[?/])" }, { - "rule": "facebook\\.com.*\\/impression\\.php" + "rule": "facebook\\.com\\/.*\\/impression\\.php" }, { "rule": "graph\\.facebook\\.com\\/\\?ids=.*&callback=.*",
3
diff --git a/lib/ui/components/common/RequestOption.js b/lib/ui/components/common/RequestOption.js import React from 'react'; import styled from 'styled-components'; import Icon from 'ui/components/Icon'; +import MethodLabel from 'ui/components/styled/MethodLabel'; const Option = styled.div` padding: 5px 12px 5px 32px; @@ -14,12 +15,6 @@ const Option = styled.div` } `; -const Method = styled.span` - font-weight: 700; - width: 50px; - font-size: 10px; -`; - const Label = styled.span` white-space: nowrap; font-size: 13px; @@ -34,30 +29,12 @@ const Status = styled.span` color: ${(props) => props.children >= 400 ? '#ba3a00' : 'inherit'}; `; -const MockIndicator = styled.div` - border: 1px solid #2d7bd1; - border-radius: 4px; - width: 16px; - height: 16px; - display: flex; - justify-content: center; - align-content: center; - font-weight: bold; - font-size: 13px; - line-height: 20px; - margin-right: 4px; - - &:after { - content: 'M' - } -`; - export const RequestOption = ({ value, label, method, response, isMocked, onClick }) => ( <Option onClick={ onClick } isMocked={ isMocked }> - <Method>{ method }</Method> + <MethodLabel>{ method }</MethodLabel> <Label>{ label }</Label> - { isMocked && <MockIndicator/> } + { isMocked && <Icon src="mocked"/> } { response
14
diff --git a/assets/js/components/SettingsNotice/SettingsNotice.js b/assets/js/components/SettingsNotice/SettingsNotice.js @@ -48,7 +48,7 @@ export default function SettingsNotice( props ) { ) } > <div className="googlesitekit-settings-notice__icon"> - { Icon && <Icon width="20" height="20" /> } + <Icon width="20" height="20" /> </div> <div className="googlesitekit-settings-notice__body">
2
diff --git a/src/cli/utils.js b/src/cli/utils.js @@ -208,7 +208,7 @@ const pack = async (inputDirPath, outputFilePath, include = [], exclude = []) => throw new Error('Please provide a valid format. Either a "zip" or a "tar"') } - const patterns = ['**'] + const patterns = ['**/*'] if (!isNil(exclude)) { exclude.forEach((excludedItem) => patterns.push(`!${excludedItem}`))
4
diff --git a/src/components/drawing/index.js b/src/components/drawing/index.js @@ -412,8 +412,9 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity, var patternAttrs = {}; var fgC = tinycolor(fgcolor); - var fgRGB = Color.tinyRGB(fgC); var fgAlpha = fgC.getAlpha(); + var fgRGB = fgAlpha === 1 ? fgcolor : Color.tinyRGB(fgC); + var opacity = fgopacity * fgAlpha; switch(shape) { @@ -557,8 +558,8 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity, if(bgcolor) { var bgC = tinycolor(bgcolor); - var bgRGB = Color.tinyRGB(bgC); var bgAlpha = bgC.getAlpha(); + var bgRGB = bgAlpha === 1 ? bgcolor : Color.tinyRGB(bgC); var rects = el.selectAll('rect').data([0]); rects.exit().remove();
4
diff --git a/server/src/processes/reactor.js b/server/src/processes/reactor.js @@ -81,7 +81,9 @@ const updateReactor = () => { .filter(s => s.simulatorId === simId) .filter(s => s.power.power) .reduce((prev, sys) => { - return prev + sys.power.power; + return sys.power.powerLevels.length > 0 + ? prev + sys.power.power + : prev; }, 0); const systems = App.systems.filter( s => s.type === "Reactor" && s.simulatorId === simId @@ -89,10 +91,13 @@ const updateReactor = () => { const reactors = systems.filter(s => s.model === "reactor"); const batteries = systems.filter(s => s.model === "battery"); //Reduce the level by the amount supplied by the reactors - const level = reactors.reduce((prev, next) => { + + const reactorLevel = reactors.reduce((prev, next) => { const actualOutput = next.powerOutput * next.efficiency; - return Math.round(prev - actualOutput); - }, oldLevel); + return Math.round(prev + actualOutput); + }, 0); + + const level = oldLevel - reactorLevel; //Adjust the reactors heat reactors.forEach(reactor => { @@ -119,12 +124,14 @@ const updateReactor = () => { //If level is a negative number, charge the batteries batteries.forEach(batt => { const charge = level * (batt.batteryChargeRate / 40); - const newLevel = Math.min( 1, Math.max(0, batt.batteryChargeLevel - charge) ); - batt.setDepletion(batt.batteryChargeLevel / charge); + batt.setDepletion( + // If it is zero, set it to a really long time + charge === 0 ? 1000000000 : batt.batteryChargeLevel / charge + ); //Trigger the event if (newLevel !== batt.batteryChargeLevel) { App.handleEvent(
1
diff --git a/workflow/urls.py b/workflow/urls.py @@ -12,6 +12,7 @@ urlpatterns = [ path('objectives', objectives_list, name='objectives'), path('objectives/tree', objectives_tree, name='objectives-tree'), path('level2/add', add_level2, name='add-level2'), + path('documentation/add', add_documentation, name='add-documentation'), re_path(r'^level2/project/(?P<pk>\w+)/$', ProjectDash.as_view(), name='project_dashboard'),
0
diff --git a/packages/swagger2openapi/index.js b/packages/swagger2openapi/index.js @@ -1353,7 +1353,7 @@ function convertObj(swagger, options, callback) { openapi = Object.assign(openapi, cclone(swagger)); delete openapi.swagger; recurse(openapi, {}, function(obj, key, state){ - if (obj[key] === null) delete obj[key]; // this saves *so* much grief later + if ((obj[key] === null) && (!key.startsWith('x-'))) delete obj[key]; // this saves *so* much grief later }); if (swagger.host) {
11
diff --git a/test/integration/notifications.test.js b/test/integration/notifications.test.js @@ -198,6 +198,21 @@ describe('Integration: notifications', () => { }); }); + test('status event with no matching PR does not update a message', async () => { + await Subscription.subscribe({ + githubId: statusPayload.repository.id, + channelId: 'C001', + slackWorkspaceId: workspace.id, + installationId: installation.id, + creatorId: slackUser.id, + }); + + await probot.receive({ + event: 'status', + payload: statusPayload, + }); + }); + test('public event', async () => { await Subscription.subscribe({ githubId: publicEventPayload.repository.id,
7
diff --git a/src/components/fx/hover.js b/src/components/fx/hover.js @@ -735,8 +735,8 @@ function _hover(gd, evt, subplot, noHoverEvent) { // Top/left hover offsets relative to graph div. As long as hover content is // a sibling of the graph div, it will be positioned correctly relative to // the offset parent, whatever that may be. - var hot = gd.offsetTop + gd.clientTop; - var hol = gd.offsetLeft + gd.clientLeft; + var gTop = gd.offsetTop + gd.clientTop; + var gLeft = gd.offsetLeft + gd.clientLeft; // pull out just the data that's useful to // other people and send it to the event @@ -753,13 +753,12 @@ function _hover(gd, evt, subplot, noHoverEvent) { } var bbox = {}; + if('x0' in pt) bbox.x0 = pt.x0 + pt.xa._offset + gLeft; + if('x1' in pt) bbox.x1 = pt.x1 + pt.xa._offset + gLeft; + if('y0' in pt) bbox.y0 = pt.y0 + pt.ya._offset + gTop; + if('y1' in pt) bbox.y1 = pt.y1 + pt.ya._offset + gTop; eventData.bbox = bbox; - if('x0' in pt) bbox.x0 = hol + pt.x0 + pt.xa._offset; - if('x1' in pt) bbox.x1 = hol + pt.x1 + pt.xa._offset; - if('y0' in pt) bbox.y0 = hot + pt.y0 + pt.ya._offset; - if('y1' in pt) bbox.y1 = hot + pt.y1 + pt.ya._offset; - pt.eventData = [eventData]; newhoverdata.push(eventData); }
10
diff --git a/angular/projects/spark-angular/src/lib/directives/inputs/sprk-button/sprk-button.directive.ts b/angular/projects/spark-angular/src/lib/directives/inputs/sprk-button/sprk-button.directive.ts @@ -4,6 +4,9 @@ import { Directive, ElementRef, OnInit, Input } from '@angular/core'; selector: '[sprkButton]' }) export class SprkButtonDirective implements OnInit { + /** + * @ignore + */ constructor(public ref: ElementRef) {} /**
8
diff --git a/composer.json b/composer.json "laravel/framework": "^8.0|^7.0|^6.0", "prologue/alerts": "^0.4.1", "creativeorange/gravatar": "~1.0", - "ocramius/package-versions": "^2.0|^1.4", + "composer/package-versions-deprecated": "^1.8", "doctrine/dbal": "^2.5", "guzzlehttp/guzzle": "^7.0|^6.3" },
14
diff --git a/appengine/pond/js/visualization.js b/appengine/pond/js/visualization.js @@ -424,7 +424,7 @@ Pond.Visualization.preloadAudio_ = function() { for (var name in Pond.Visualization.SOUNDS_) { var sound = Pond.Visualization.SOUNDS_[name]; sound.volume = .01; - sound.play(); + sound.play().catch(function() {}); sound.pause(); } };
9
diff --git a/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_child_valid_ruleunit/validAriaRequiredChildrenTableHtmlEquv.html b/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_child_valid_ruleunit/validAriaRequiredChildrenTableHtmlEquv.html OpenAjax.a11y.ruleCoverage = [{ ruleId: "1152", passedXpaths: [], - failedXpaths: [/html[1]/body[1]/table[1]/tbody[1]/tr[1]] + failedXpaths: ["/html[1]/body[1]/table[1]/tbody[1]/tr[1]"] }, ]; //]]> </script>
3
diff --git a/kitty-items-go/services/kibbles.go b/kitty-items-go/services/kibbles.go @@ -2,6 +2,7 @@ package services import ( "context" + "fmt" "github.com/onflow/cadence" "github.com/onflow/flow-go-sdk" @@ -33,17 +34,20 @@ func NewKibbles(service *FlowService) *KibblesService { func (k *KibblesService) Mint(ctx context.Context, destinationAddress flow.Address, amount uint) (string, error) { sequenceNumber, err := k.flowService.GetMinterAddressSequenceNumber(ctx) if err != nil { - return "", err + return "", fmt.Errorf("error getting sequence number = %w", err) } - block, err := k.flowService.client.GetLatestBlock(ctx, true) + referenceBlock, err := k.flowService.client.GetLatestBlock(ctx, true) + if err != nil { + return "", fmt.Errorf("error getting reference block = %w", err) + } tx := flow.NewTransaction(). SetScript([]byte(mintKibblesTemplate)). AddAuthorizer(k.flowService.minterAddress). SetProposalKey(k.flowService.minterAddress, k.flowService.minterAccountKey.Index, sequenceNumber). SetPayer(k.flowService.minterAddress). - SetReferenceBlockID(block.ID). + SetReferenceBlockID(referenceBlock.ID). SetGasLimit(10000) if err := tx.AddArgument(cadence.NewAddress(destinationAddress)); err != nil {
10
diff --git a/src/components/general/character-select/CharacterSelect.jsx b/src/components/general/character-select/CharacterSelect.jsx @@ -8,6 +8,7 @@ import { MegaHup } from '../../../MegaHup.jsx'; import { LightArrow } from '../../../LightArrow.jsx'; import { world } from '../../../../world.js'; // import { NpcPlayer } from '../../../../character-controller.js'; +import * as sounds from '../../../../sounds.js'; import musicManager from '../../../../music-manager.js'; // @@ -197,6 +198,9 @@ export const CharacterSelect = () => { npcPlayerCache.set(avatarUrl, npcPlayer); } + + sounds.playSoundName('menuBeep'); + let themeSong = themeSongCache.get(npcPlayer); if (!themeSong) { themeSong = await npcPlayer.fetchThemeSong(); @@ -258,6 +262,8 @@ export const CharacterSelect = () => { if (character && npcPlayer) { setSelectCharacter(character); + sounds.playSoundName('menuBoop'); + (async () => { const localPlayer = await metaversefile.useLocalPlayer(); await localPlayer.setAvatarUrl(character.avatarUrl);
0
diff --git a/.github/workflows/develop-deb.yml b/.github/workflows/develop-deb.yml @@ -10,6 +10,8 @@ jobs: build: runs-on: ubuntu-latest + env: + CI: false strategy: matrix: @@ -20,7 +22,7 @@ jobs: with: path: edumeet - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - run: |
12
diff --git a/docs/index.md b/docs/index.md @@ -33,7 +33,7 @@ Then, the following code will be rendered as a WebGL canvas. <vgl-mesh-standard-material /> <vgl-mesh /> </vgl-scene> - <vgl-camera orbit="radius: 10; phi: 1; theta: 1;" /> + <vgl-perspective-camera orbit="radius: 10; phi: 1; theta: 1;" /> </vgl-renderer> </div> <script> @@ -61,7 +61,7 @@ Then, the following code will be rendered as a WebGL canvas. <vgl-mesh-standard-material /> <vgl-mesh /> </vgl-scene> - <vgl-camera orbit='radius: 10; phi: 1; theta: 1;' /> + <vgl-perspective-camera orbit='radius: 10; phi: 1; theta: 1;' /> </vgl-renderer> </div> <script>
4
diff --git a/src/muya/lib/contentState/pasteCtrl.js b/src/muya/lib/contentState/pasteCtrl.js @@ -228,6 +228,18 @@ const pasteCtrl = ContentState => { if (file) { return event.preventDefault() } + + if (this.selectedTableCells) { + const { start } = this.cursor + const startBlock = this.getBlock(start.key) + const { selectedTableCells: stc } = this + + // Exactly one table cell is selected. Replace the cells text via default handler. + if (startBlock && startBlock.functionType === 'cellContent' && stc.row === 1 && stc.column === 1) { + this.pasteHandler(event) + return event.preventDefault() + } + } } // Handle `normal` and `pasteAsPlainText` paste for preview mode. @@ -330,10 +342,30 @@ const pasteCtrl = ContentState => { } if (startBlock.functionType === 'cellContent') { + let isOneCellSelected = false + if (this.selectedTableCells) { + const { selectedTableCells: stc } = this + // Replace cells text when one cell is selected. + if (stc.row === 1 && stc.column === 1) { + isOneCellSelected = true + } else { + // Cancel event, multiple cells are selected. + return this.partialRender() + } + } + + const { key } = startBlock const pendingText = text.trim().replace(/\n/g, '<br/>') + let offset = pendingText.length + if (isOneCellSelected) { + // Replace text and deselect cell. + startBlock.text = pendingText + this.selectedTableCells = null + } else { + offset += start.offset startBlock.text = startBlock.text.substring(0, start.offset) + pendingText + startBlock.text.substring(end.offset) - const { key } = startBlock - const offset = start.offset + pendingText.length + } + this.cursor = { start: { key, offset }, end: { key, offset }
14
diff --git a/templates/customdashboard/customdashboard/visual_dashboard.html b/templates/customdashboard/customdashboard/visual_dashboard.html {% extends "base.html" %} {% block content %} <div class="container"> - <div class="panel panel-info"> - <div class="panel-body"> - <div style="float:left;"> - <h4> + {% block breadcrumbs %} + <ul class="breadcrumb"> + <li><a href="/">Home Dashboard</a></li> + <li><a href="/workflow/level2/0/">Projects</a></li> + <li class="active">Status</li> + </ul> + {% endblock %} + + <!-- Sub navigation --> + <div class="sub-navigation"> + <div class="sub-navigation-header"> + <h4 class="page-title"> {{ user.activity_user.organization.level_2_label }} Status {% if get_filtered_name %} for - <a href="/workflow/dashboard/{{ get_filtered_name.id }}" - >{{ get_filtered_name }} - </a> + {{ get_filtered_name }} {% endif %} </h4> + </div> + <div class="sub-navigation-actions"> + <!-- sample action buttons --> + <div class="btn-group" role="group" aria-label=""> + </div> + </div> + </div> + + + <div class="panel panel-info"> + <div class="panel-body"> + <div style="float:left;"> Number of {{ user.activity_user.organization.level_2_label }}(s): <b>{{ get_projects_count }}</b ><br /> + <!-- approved count--> <h4> <a href="/workflow/dashboard/{{ get_filtered_name.id }}/approved/"
0
diff --git a/generators/kubernetes/templates/monitoring/jhipster-prometheus-crd.yml.ejs b/generators/kubernetes/templates/monitoring/jhipster-prometheus-crd.yml.ejs @@ -67,7 +67,7 @@ rules: - apiGroups: [""] resources: - namespaces - verbs: ["list"] + verbs: ["list", "watch"] --- apiVersion: <%= KUBERNETES_CORE_API_VERSION %> kind: ServiceAccount
1
diff --git a/patch/patches/selenium.patch b/patch/patches/selenium.patch -diff --git a/selenium/webdriver/chrome/options.py b/selenium/webdriver/chrome/options.py -index 102ecb8..36e6025 100644 ---- selenium/webdriver/chrome/options.py -+++ selenium/webdriver/chrome/options.py -@@ -25,6 +25,7 @@ class Options(object): - def __init__(self): +diff --git a/selenium/webdriver/chromium/options.py b/selenium/webdriver/chromium/options.py +index 3d8f572..83220d8 100644 +--- selenium/webdriver/chromium/options.py ++++ selenium/webdriver/chromium/options.py +@@ -31,6 +31,7 @@ class ChromiumOptions(ArgOptions): + super(ChromiumOptions, self).__init__() self._binary_location = '' - self._arguments = [] -+ self._nw_arguments = [] self._extension_files = [] ++ self._nw_arguments = [] + self._extensions = [] self._experimental_options = {} + self._debugger_address = None +@@ -69,6 +70,25 @@ class ChromiumOptions(ArgOptions): + """ + self._debugger_address = value -@@ -65,6 +66,25 @@ class Options(object): - raise ValueError("argument can not be null") - - @property ++ @property + def nw_arguments(self): + """ + Returns a list of arguments needed for the browser @@ -32,15 +33,14 @@ index 102ecb8..36e6025 100644 + else: + raise ValueError("argument can not be null") + -+ @property - def extensions(self): + @property + def extensions(self) -> List[str]: """ - Returns a list of encoded extensions that will be loaded into chrome -@@ -126,6 +146,7 @@ class Options(object): - chrome_options["extensions"] = self.extensions +@@ -167,6 +187,7 @@ class ChromiumOptions(ArgOptions): + if self.binary_location: chrome_options["binary"] = self.binary_location - chrome_options["args"] = self.arguments + chrome_options["args"] = self._arguments + chrome_options["nwargs"] = self.nw_arguments - - chrome["chromeOptions"] = chrome_options + if self.debugger_address: + chrome_options["debuggerAddress"] = self.debugger_address
3
diff --git a/.travis.yml b/.travis.yml @@ -12,6 +12,6 @@ deploy: access_key_id: "${AWS_ACCESS_KEY_ID}" secret_access_key: "${AWS_SECRET_ACCESS_KEY}" region: us-west-2 - bucket: hacko-budget-staging + bucket: budget.civicpdx.org skip_cleanup: true local_dir: build
3
diff --git a/tools/subgraph/src/WrapperMapping.ts b/tools/subgraph/src/WrapperMapping.ts import { - OwnershipTransferred as OwnershipTransferredEvent, WrappedSwapFor as WrappedSwapForEvent } from "../generated/Wrapper/Wrapper" -import { OwnershipTransferred, WrappedSwapFor } from "../generated/schema" +import { WrappedSwapFor } from "../generated/schema" -export function handleOwnershipTransferred( - event: OwnershipTransferredEvent -): void { - let entity = new OwnershipTransferred( - event.transaction.hash.toHex() + "-" + event.logIndex.toString() - ) - entity.previousOwner = event.params.previousOwner - entity.newOwner = event.params.newOwner - entity.save() -} export function handleWrappedSwapFor(event: WrappedSwapForEvent): void { let completedSwapFor = new WrappedSwapFor(
2
diff --git a/guide/english/certifications/apis-and-microservices/managing-packages-with-npm/use-the-caret-character-to-use-the-latest-minor-version-of-a-dependency/index.md b/guide/english/certifications/apis-and-microservices/managing-packages-with-npm/use-the-caret-character-to-use-the-latest-minor-version-of-a-dependency/index.md @@ -3,8 +3,16 @@ title: Use the Caret-Character to Use the Latest Minor Version of a Dependency --- ## Use the Caret-Character to Use the Latest Minor Version of a Dependency -This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/apis-and-microservices/managing-packages-with-npm/use-the-caret-character-to-use-the-latest-minor-version-of-a-dependency/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>. +## Hint 1 +* the package `moment` should be in your package.json, specifically in the +dependencies property. -<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>. +## Hint 2 +* `moment` version should have a caret character within it. -<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds --> +## Solution: +```js +"dependencies": { + "moment": "^2.10.2" +} +```
4
diff --git a/app/src/components/HtmlRender.js b/app/src/components/HtmlRender.js @@ -7,6 +7,7 @@ import rangy from 'rangy'; import 'rangy/lib/rangy-classapplier'; import 'rangy/lib/rangy-highlighter'; import 'rangy/lib/rangy-selectionsaverestore'; +import 'rangy/lib/rangy-textrange'; import NoteInput from './Notes/NoteInput'; import HighlightMenu from './Notes/HighlightMenu'; @@ -42,7 +43,7 @@ class HtmlRender extends React.Component { this.highlighter = rangy.createHighlighter(); this.highlighter.addClassApplier(rangy.createClassApplier('highlight')); this.highlighter.addClassApplier(rangy.createClassApplier('highlight-note')); - + window.highlighter = this.highlighter; this.setHtml(); this.contentWrapper.current.addEventListener('mouseup', this.onMouseUp); @@ -203,15 +204,23 @@ class HtmlRender extends React.Component { const wrapper = this.contentWrapper.current; if (!wrapper) return null; - const notes = wrapper.getElementsByClassName('highlight-note'); const wrapperTop = wrapper.getBoundingClientRect().top; - return Object.values(notes).map((note, i) => { - const bound = note.getBoundingClientRect(); + return this.highlighter.highlights + .filter((h) => h.classApplier.className === 'highlight-note') + .map((h) => { + const range = rangy.createRange(); + range.selectCharacters( + this.contentWrapper.current, + h.characterRange.start, + h.characterRange.end, + ); + + const bound = range.nativeRange.getBoundingClientRect(); return ( <NoteGreenIcon className="highlight-icon" - key={i} + key={h.id} style={{ top: bound.top + bound.height / 2 - wrapperTop - 8, }}
7
diff --git a/src/renderable/renderable.js b/src/renderable/renderable.js // set the scaleFlag this.currentTransform.scale(_x, _y); - // resize the bounding box - this.getBounds().resize(this.width * _x, this.height * _y); + + // corresponding bounding box to be set + // through the width and height setters + this.width = this.width * _x; + this.height = this.height * _y; + return this; },
1
diff --git a/tests/phpunit/integration/Modules/AdSenseTest.php b/tests/phpunit/integration/Modules/AdSenseTest.php @@ -321,17 +321,11 @@ class AdSenseTest extends TestCase { 'screenID', 'settings', 'provides', - 'accountURL', - 'signupURL', - 'rootURL', ), array_keys( $info ) ); $this->assertEquals( 'adsense', $info['slug'] ); - $this->assertStringStartsWith( 'https://www.google.com/adsense/', $info['accountURL'] ); - $this->assertStringStartsWith( 'https://www.google.com/adsense/', $info['signupURL'] ); - $this->assertStringStartsWith( 'https://www.google.com/adsense/', $info['rootURL'] ); } public function test_is_connected() {
2
diff --git a/articles/support/matrix.md b/articles/support/matrix.md @@ -26,19 +26,22 @@ For community-supported items, you can seek assistance by contacting the develop Throughout this article, we will use the following terms to indicate the varying levels of support Auth0 will provide. <table class="table"> + <thead> <tr> - <th>Supported</th> - <td>***</td> + <th width="30%">Label</th> + <th width="70%">Description</th> + </tr> + <thead> + <tr> + <td><div class="label label-primary">Supported</div></td> <td>Auth0 has formally tested, will support, and provide both new features and bug fixes (if applicable) for these items.</td> </tr> <tr> - <th>Sustained</th> - <td>**</td> + <td><div class="label label-warning">Sustained</div></td> <td>Auth0 will support and may provide bug fixes (if applicable) for these items.</td> </tr> <tr> - <th>Community</th> - <td></td> + <td><div class="label label-default">Community Supported</div></td> <td>Auth0 does <i>not</i> support these items, and all assistance regarding these items will come from the general community.</td> </tr> </table>
0
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md - Please follow the issue template below for bug reports and feature requests. -- If you have a support request rather than a bug please use [stackoverflow](http://stackoverflow.com/questions/tagged/jhipster) wth the JHipster tag. +- If you have a support request rather than a bug please use [stackoverflow](http://stackoverflow.com/questions/tagged/jhipster) with the JHipster tag. - For bug reports its mandatory to paste the result of command `yo jhipster:info` run in your project root folder. -- Tickets opened without any of these informations will be **closed** without any explanation. +- Tickets opened without any of these pieces of information will be **closed** without any explanation. ##### **Overview of the issue**
1
diff --git a/src/libs/actions/PaymentMethods.js b/src/libs/actions/PaymentMethods.js @@ -111,9 +111,10 @@ function setWalletLinkedAccount(password, bankAccountID, fundID) { Growl.show(Localize.translateLocal('paymentsPage.setDefaultSuccess'), CONST.GROWL.SUCCESS, 5000); return; } - + Growl.show(Localize.translateLocal('paymentsPage.error.setDefaultFailure'), CONST.GROWL.ERROR, 5000); + }).catch((error) => { // Make sure to show user more specific errors which will help support identify the problem faster. - switch (response.message) { + switch (error.message) { case CONST.WALLET.ERROR.NO_ACCOUNT_TO_LINK: Growl.show(Localize.translateLocal('paymentsPage.error.noAccountToLink'), CONST.GROWL.ERROR, 5000); return; @@ -134,9 +135,8 @@ function setWalletLinkedAccount(password, bankAccountID, fundID) { return; default: Growl.show(Localize.translateLocal('paymentsPage.error.setDefaultFailure'), CONST.GROWL.ERROR, 5000); - return; } - }) + }); } /**
5