code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/example/index.html b/example/index.html @@ -200,7 +200,6 @@ function getUrlParam(parameter, defaultvalue){ <script id="xmpTemplate" type="text/x-template"> <div> <h2>XMP</h2> - <label class="label">XMP:</label> <json-to-ui-template v-bind:data="xmp.xmp"></json-to-ui-template> </div> </script>
2
diff --git a/src/components/EthVideo.js b/src/components/EthVideo.js @@ -4,10 +4,12 @@ import { ThemeContext } from "styled-components" import darkVideo from "../assets/ethereum-hero-dark.mp4" import lightVideo from "../assets/ethereum-hero-light.mp4" -const EthVideo = ({ className }) => { +const EthVideo = ({ className, videoSrc }) => { const themeContext = useContext(ThemeContext) const isDarkTheme = themeContext.isDark + const src = videoSrc ? videoSrc : isDarkTheme ? darkVideo : lightVideo + return ( <div className={className}> <video @@ -15,7 +17,7 @@ const EthVideo = ({ className }) => { alt={`ETH glyph video - ${isDarkTheme ? "Dark" : "Light"}`} width="100%" height="auto" - src={isDarkTheme ? darkVideo : lightVideo} + src={src} playsInline autoPlay loop
9
diff --git a/packages/create-snowpack-app/README.md b/packages/create-snowpack-app/README.md @@ -14,6 +14,7 @@ npx create-snowpack-app new-dir --template @snowpack/app-template-NAME [--use-ya - [@snowpack/app-template-preact](../@snowpack/app-template-preact) - [@snowpack/app-template-react-typescript](../@snowpack/app-template-react-typescript) - [@snowpack/app-template-react](../@snowpack/app-template-react) +- [@snowpack/app-template-svelte-typescript](../@snowpack/app-template-svelte-typescript) - [@snowpack/app-template-svelte](../@snowpack/app-template-svelte) - [@snowpack/app-template-vue](../@snowpack/app-template-vue)
0
diff --git a/token-metadata/0xB9EefC4b0d472A44be93970254Df4f4016569d27/metadata.json b/token-metadata/0xB9EefC4b0d472A44be93970254Df4f4016569d27/metadata.json "symbol": "XDB", "address": "0xB9EefC4b0d472A44be93970254Df4f4016569d27", "decimals": 7, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/package.json b/package.json "opener": "^1.4.3", "react": "^16.4.2", "react-dom": "^16.4.2", - "sendkeys-js": "0.0.3", + "sendkeys-js": "0.0.4", "ssri": "^6.0.0", "whatwg-fetch": "^2.0.4" }
3
diff --git a/core/api-server/lib/datastore/storage-factory.js b/core/api-server/lib/datastore/storage-factory.js class StorageFactory { async init(config) { const storage = config.storageAdapters[config.defaultStorage]; + this.moduleName = storage.moduleName; this.adapter = require(storage.moduleName); // eslint-disable-line await this.adapter.init(storage.connection); } @@ -8,6 +9,7 @@ class StorageFactory { async setResultsFromStorage(options) { if (options.data.result) { options.data.result = await Promise.all(options.data.result.map(a => this._getStorageItem(a))); + options.data.storageModule = this.moduleName; } }
0
diff --git a/5th Edition OGL by Roll20 Companion/script.json b/5th Edition OGL by Roll20 Companion/script.json "script": "5th Edition OGL by Roll20 Companion.js", "version": "1.4", "previousversions": ["1.0","1.1","1.2","1.3"], - "description": "Enhances the Official 5th Edition OGL by Roll20 Character Sheet. The Companion currently supports Ammo Tracking, Automatic NPC Tokens, Automatic Death Save Tracking, and Automatic Spell Slot Tracking.\r\r**API Commands:**\r**!5ehelp** - Gives a list of the script's API commands in the chat tab.\r**!5estatus** - Lists the current status of the script's features in the chat tab.\r**!ammotracking** on/off/quiet - Automatically expends linked resource when attack is made\r**!autonpctoken** on/off - Automatically generates a NPC token on the GM's screen based on the default token when an NPC's health calculation is rolled\r**!deathsavetracking** on/off/quiet - Automatically ticks off successes and failures when death saves are rolled, clearing on death, stabilization, or hp recovery\r**!spelltracking** on/off/quiet - Automatically expends spell charges as cast, factoring in higher level casting\r**!longrest** character name - If spelltracking is on, this command will reset all of the character's spell slots to unspent.\r**!npchp** character name - Rolls NPC hit point totals using their formula and updates the token bar. If no character name is provided it will roll the selected tokens.\r\r**Options:**\r**on** - Toggles the functionality on (default)\r**off** - Disables the functionality\r**quiet** - Maintains functionality while preventing results from being output to the chat.", + "description": "Enhances the Official 5th Edition OGL by Roll20 Character Sheet. The Companion currently supports Ammo Tracking, Automatic NPC Tokens, Automatic Death Save Tracking, and Automatic Spell Slot Tracking.\r\r**API Commands:**\r**!5ehelp** - Gives a list of the script's API commands in the chat tab.\r**!5estatus** - Lists the current status of the script's features in the chat tab.\r**!ammotracking** on/off/quiet - Automatically expends linked resource when attack is made.\r**!autonpctoken** on/off - Automatically generates a NPC token on the GM's screen based on the default token when an NPC's health calculation is rolled\r**!deathsavetracking** on/off/quiet - Automatically ticks off successes and failures when death saves are rolled, clearing on death, stabilization, or hp recovery\r**!spelltracking** on/off/quiet - Automatically expends spell charges as cast, factoring in higher level casting\r**!longrest** character name - If spelltracking is on, this command will reset all of the character's spell slots to unspent.\r**!npchp** character name - Rolls NPC hit point totals using their formula and updates the token bar. If no character name is provided it will roll the selected tokens.\r\r**Options:**\r**on** - Toggles the functionality on (default)\r**off** - Disables the functionality\r**quiet** - Maintains functionality while preventing results from being output to the chat.\r\r**Ammo Tracking:**\rDirections for ammo tracking can be found in the [wiki](https://wiki.roll20.net/5th_Edition_OGL_by_Roll20#Automatic_Ammunition_Tracking). You can spend more than one piece of ammunition per shot by adding a number after the name of the ammunition resource and a comma. (ex. Arrows,2 )", "authors": "Steve K.", "roll20userid": "5047", "useroptions": [],
3
diff --git a/articles/tokens/refresh-token/current/index.md b/articles/tokens/refresh-token/current/index.md @@ -75,7 +75,7 @@ The response should contain an Access Token and a Refresh Token. ```text { "access_token": "eyJz93a...k4laUWw", - "Refresh Token": "GEbRxBN...edjnXbL", + "refresh_token": "GEbRxBN...edjnXbL", "token_type": "Bearer" } ```
1
diff --git a/test/unit/specs/utils/promiseAllObject.spec.js b/test/unit/specs/utils/promiseAllObject.spec.js @@ -84,7 +84,7 @@ const expectedResult = { undefinedValue: undefined }; -fdescribe("promiseAllObject", () => { +describe("promiseAllObject", () => { it("waits for nested promises inside object", () => { const foodLibrary = createFoodLibrary(); return promiseAllObject(foodLibrary).then(resolvedFoodLibrary => {
2
diff --git a/deepfence_ui/app/scripts/components/multi-cloud-table/styles.scss b/deepfence_ui/app/scripts/components/multi-cloud-table/styles.scss .scan-status { color: $text-secondary; - display: inline-flex !important; + display: inline-block !important; @include vertical-align; text-transform: capitalize; padding: 0 20px 0 20px; - min-width: 135px; + max-width: 100%; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; &.error { border: 1px solid $color-error-outline;
1
diff --git a/lib/kuzzle/kuzzle.ts b/lib/kuzzle/kuzzle.ts @@ -82,32 +82,54 @@ Reflect.defineProperty(global, 'kuzzle', { * @extends EventEmitter */ export class Kuzzle extends KuzzleEventEmitter { - private config: JSONObject; - private _state: kuzzleStateEnum = kuzzleStateEnum.STARTING; - private log: Logger; - private rootPath: string; - private internalIndex: InternalIndexHandler; - private pluginsManager: PluginsManager; - private tokenManager: TokenManager; - private passport: PassportWrapper; - private funnel: Funnel; - private router: Router; - private statistics: Statistics; - private entryPoint: EntryPoint; - private validation: Validation; - private dumpGenerator: DumpGenerator; - private vault: vault; - private asyncStore: AsyncStore; - private version: string; - private importTypes: { + public config: JSONObject; + public _state: kuzzleStateEnum = kuzzleStateEnum.STARTING; + public log: Logger; + public rootPath: string; + // Internal index bootstrapper and accessor + public internalIndex: InternalIndexHandler; + + public pluginsManager: PluginsManager; + public tokenManager: TokenManager; + public passport: PassportWrapper; + + // The funnel dispatches messages to API controllers + public funnel: Funnel; + + // The router listens to client requests and pass them to the funnel + public router: Router; + + // Statistics core component + public statistics: Statistics; + + // Network entry point + public entryPoint: EntryPoint; + + // Validation core component + public validation: Validation; + + // Dump generator + public dumpGenerator: DumpGenerator; + + // Vault component (will be initialized after bootstrap) + public vault: vault; + + // AsyncLocalStorage wrapper + public asyncStore: AsyncStore; + + // Kuzzle version + public version: string; + + // List of differents imports types and their associated method + public importTypes: { [key: string]: (config: { toImport: ImportConfig, toSupport: SupportConfig} ) => Promise<void>; }; - private koncorde : Koncorde; - private id : string; - private secret : string; + public koncorde : Koncorde; + public id : string; + public secret : string; constructor (config: JSONObject) { super( @@ -124,41 +146,20 @@ export class Kuzzle extends KuzzleEventEmitter { this.rootPath = path.resolve(path.join(__dirname, '../..')); - // Internal index bootstrapper and accessor this.internalIndex = new InternalIndexHandler(); - this.pluginsManager = new PluginsManager(); this.tokenManager = new TokenManager(); this.passport = new PassportWrapper(); - - // The funnel dispatches messages to API controllers this.funnel = new Funnel(); - - // The router listens to client requests and pass them to the funnel this.router = new Router(); - - // Statistics core component this.statistics = new Statistics(); - - // Network entry point this.entryPoint = new EntryPoint(); - - // Validation core component this.validation = new Validation(); - - // Dump generator this.dumpGenerator = new DumpGenerator(); - - // Vault component (will be initialized after bootstrap) this.vault = null; - - // AsyncLocalStorage wrapper this.asyncStore = new AsyncStore(); - - // Kuzzle version this.version = version; - // List of differents imports types and their associated method; this.importTypes = { fixtures: this._importFixtures.bind(this), mappings: this._importMappings.bind(this),
12
diff --git a/g2.js b/g2.js @@ -155,6 +155,8 @@ function G2() { this._ignored_responses = 0; this._primed = false; this._streamDone = false; + + this.lineBuffer = []; } util.inherits(G2, events.EventEmitter); @@ -165,26 +167,28 @@ G2.prototype._createCycleContext = function() { throw new Error("Cannot create a new cycle context. One already exists."); } var st = new stream.PassThrough(); + st.setDefaultEncoding('utf8'); this._streamDone = false; st.on('data', function(chunk) { - var line = []; + if(chunk instanceof String) { + console.log("Chunk is a string") + } else if(chunk instanceof Buffer) { + console.log("Chunk is a buffer") + } else { + console.log("Chunk is ???") + } chunk = chunk.toString(); for(var i=0; i<chunk.length; i++) { ch = chunk[i]; - line.push(ch); + this.lineBuffer.push(ch); if(ch === '\n') { - var s = line.join('').trim(); - //log.debug("Q: '" + s + "'") + var s = this.lineBuffer.join('').trim(); this.gcode_queue.enqueue(s); if(this.gcode_queue.getLength() >= 10) { this._primed = true; } this.sendMore(); - var putback = chunk.slice(i++); - if(putback) { - this.context._stream.unshift(chunk.slice(i++)); - } - return; + this.lineBuffer = []; } } }.bind(this));
2
diff --git a/src/mesh/build.js b/src/mesh/build.js @@ -353,6 +353,7 @@ function ui_build() { // builds a modal dialog that updates the object and field function field_edit(title, set) { return function(ev) { + let value = ev.target.innerText; let onclick = (ev) => { let tempval = parseFloat($('tempval').value); api.modal.hide(modal.info.cancelled); @@ -360,7 +361,7 @@ function ui_build() { return; } for (let g of api.selection.groups()) { - set(g, tempval); + set(g, tempval, value); g.floor(mesh.group); defer_selection(); // update ui } @@ -372,7 +373,7 @@ function ui_build() { } }; let { tempval } = api.modal.show(title, h.div({ class: "tempedit" }, [ - h.input({ id: 'tempval', value: ev.target.innerText, size: 10, onkeydown }), + h.input({ id: 'tempval', value, size: 10, onkeydown }), h.button({ _: 'set', onclick }) ])); tempval.setSelectionRange(0, tempval.value.length); @@ -497,27 +498,27 @@ function ui_build() { defer_selection(); // update ui }; }); - span_val_X_size.onclick = field_edit('x size', (group, val) => { + span_val_X_size.onclick = field_edit('x size', (group, val, oval) => { let dim = group.bounds.dim; - let rel = val / dim.x; + let rel = val / parseFloat(oval); if (axgrp.X) { group.scale(rel, axgrp.Y ? rel : 1, axgrp.Z ? rel : 1); } else { group.scale(rel, 1, 1); } }); - span_val_Y_size.onclick = field_edit('y size', (group, val) => { + span_val_Y_size.onclick = field_edit('y size', (group, val, oval) => { let dim = group.bounds.dim; - let rel = val / dim.y; + let rel = val / parseFloat(oval); if (axgrp.Y) { group.scale(axgrp.X ? rel : 1, rel, axgrp.Z ? rel : 1); } else { group.scale(1, rel, 1); } }); - span_val_Z_size.onclick = field_edit('z size', (group, val) => { + span_val_Z_size.onclick = field_edit('z size', (group, val, oval) => { let dim = group.bounds.dim; - let rel = val / dim.z; + let rel = val / parseFloat(oval); if (axgrp.Z) { group.scale(axgrp.X ? rel : 1, axgrp.Y ? rel : 1, rel); } else {
11
diff --git a/src/Formio.js b/src/Formio.js @@ -802,7 +802,7 @@ class Formio { .then(() => getFormio().pluginGet('request', requestArgs) .then((result) => { if (isNil(result)) { - return getFormio().request(url, method, requestArgs.data, requestArgs.opts.header, requestArgs.opts); + return getFormio().request(requestArgs.url, requestArgs.method, requestArgs.data, requestArgs.opts.header, requestArgs.opts); } return result; }));
11
diff --git a/src/components/topic/snapshots/SnapshotHome.js b/src/components/topic/snapshots/SnapshotHome.js @@ -12,6 +12,7 @@ import { generateSnapshot } from '../../../actions/topicActions'; import { updateFeedback } from '../../../actions/appActions'; import ComingSoon from '../../common/ComingSoon'; import SnapshotIcon from '../../common/icons/SnapshotIcon'; +import { SOURCE_SCRAPE_STATE_QUEUED, SOURCE_SCRAPE_STATE_RUNNING } from '../../../reducers/sources/sources/selected/sourceDetails'; const localMessages = { title: { id: 'snapshot.builder.title', defaultMessage: 'Snapshot Builder' }, @@ -21,6 +22,7 @@ const localMessages = { backToTopicLink: { id: 'snapshot.builder.backToTopic.link', defaultMessage: 'back to Topic' }, summaryTitle: { id: 'snapshot.summary.title', defaultMessage: 'Summary of Your New Snapshot' }, summaryMessage: { id: 'snapshot.summary.text', defaultMessage: 'You have made some changes that you can only see if you generate a new Snapshot. Here\'s a summary of those changes:' }, + snapshotFailed: { id: 'snapshot.generate.failed', defaultMessage: 'Sorry, but we failed to start generating the snapshot' }, }; const SnapshotHome = props => ( @@ -76,11 +78,13 @@ const mapDispatchToProps = (dispatch, ownProps) => ({ handleGenerateSnapshotRequest: () => { dispatch(generateSnapshot(ownProps.params.topicId)) .then((results) => { - if (results.success === 1) { + if ((results.job_state.state === SOURCE_SCRAPE_STATE_QUEUED) || + (results.job_state.state === SOURCE_SCRAPE_STATE_RUNNING)) { dispatch(updateFeedback({ open: true, message: ownProps.intl.formatMessage(messages.snapshotGenerating) })); dispatch(push(`/topics/${ownProps.params.topicId}/summary`)); } else { - // TODO: error message! + // was completed far too quickly, or was an error + dispatch(updateFeedback({ open: true, message: ownProps.intl.formatMessage(localMessages.snapshotFailed) })); } }); },
9
diff --git a/server/game/cards/02.2-FHaG/HighKick.js b/server/game/cards/02.2-FHaG/HighKick.js @@ -4,7 +4,6 @@ class HighKick extends DrawCard { setupCardAbilities(ability) { this.reaction({ title: 'Bow and Disable a character', - //TODO--Also we have a marticipating monk character condition: () => this.game.currentConflict && this.game.currentConflict.conflictType === 'military' && this.controller.anyCardsInPlay(card => card.hasTrait('monk') && card.isParticipating()), cost: ability.costs.bow(card => card.hasTrait('monk') && this.game.currentConflict && card.isParticipating() && this.controller === card.controller), target: {
2
diff --git a/test/unit/carousel.test.js b/test/unit/carousel.test.js @@ -42,13 +42,14 @@ const setup = () => ); describe('Carousel', () => { - it('should return value of a prop', () => { + it('returns value of a prop', () => { const carousel = setup(); const autoPlayValue = carousel.instance().getProp('autoPlay'); expect(autoPlayValue).to.equal(3000); }); - it('slidesPerPage should be equal 2 if window width is greater than 500', () => { + + it('slidesPerPage is equal 2 if window width is greater than 500', () => { window.resizeTo(600, 600); const carousel = setup(); @@ -56,14 +57,16 @@ describe('Carousel', () => { const autoPlayValue = carousel.instance().getProp('slidesPerPage'); expect(autoPlayValue).to.equal(2); }); - it('slidesPerPage should be equal 1 if window width is less than 500', () => { + + it('slidesPerPage is equal 1 if window width is less than 500', () => { window.resizeTo(300, 300); const carousel = setup(); const autoPlayValue = carousel.instance().getProp('slidesPerPage'); expect(autoPlayValue).to.equal(1); }); - it('get nearest slide index', () => { + + it('gets nearest slide index', () => { const carousel = shallow( <Carousel value={1}> <div/> @@ -78,7 +81,8 @@ describe('Carousel', () => { }); expect(carousel.instance().getNearestSlideIndex()).to.equal(2); }); - it('get nearest slide index in centered carousel', () => { + + it('gets nearest slide index in centered carousel', () => { const carousel = shallow( <Carousel value={1} centered> <div/> @@ -94,7 +98,8 @@ describe('Carousel', () => { }); expect(carousel.instance().getNearestSlideIndex()).to.equal(3); }); - it('get current slide index', () => { + + it('gets current slide index', () => { const carousel = shallow( <Carousel value={2}> <div/>
7
diff --git a/spec/models/table_spec.rb b/spec/models/table_spec.rb @@ -1384,16 +1384,22 @@ describe Table do table = Table.new(user_table: UserTable[data_import.table_id]) table.should_not be_nil, "Import failure: #{data_import.log}" table.name.should match(/^twitters/) + @user.user_timeout = 1 @user.database_timeout = 1 @user.save + + begin table.update_table_geom_pg_stats - table.rows_counted.should == 7 + ensure @user.user_timeout = old_user_timeout @user.database_timeout = old_user_db_timeout @user.save end + table.rows_counted.should == 7 + end + it "should not drop a table that exists when upload fails" do delete_user_data @user table = new_table :name => 'empty_file', :user_id => @user.id
7
diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js @@ -527,9 +527,9 @@ function updateReportWithNewAction(reportID, reportAction) { return; } - // When a new message comes in, if the New marker is not already set (newMarkerSequenceNumber === 0) and, set the + // When a new message comes in, if the New marker is not already set (newMarkerSequenceNumber === 0), set the // marker above the incoming message. - if (lodashGet(allReports, reportID).newMarkerSequenceNumber === 0 && updatedReportObject.unreadActionCount > 0) { + if (lodashGet(allReports, [reportID, 'newMarkerSequenceNumber'], 0) === 0 && updatedReportObject.unreadActionCount > 0) { const oldestUnreadSeq = (updatedReportObject.maxSequenceNumber - updatedReportObject.unreadActionCount) + 1; setNewMarkerPosition(reportID, oldestUnreadSeq); }
9
diff --git a/userscript.user.js b/userscript.user.js @@ -52052,11 +52052,19 @@ var $$IMU_EXPORT$$; } } + function normalize_whitespace(str) { + // https://stackoverflow.com/a/11305926 + return str + .replace(/[\u200B-\u200D\uFEFF]/g, '') + .replace(/[\u2800]/g, ' '); + } + function strip_whitespace(str) { - if (!str || typeof str !== "string") + if (!str || typeof str !== "string") { return str; + } - return str + return normalize_whitespace(str) .replace(/^\s+/, "") .replace(/\s+$/, ""); } @@ -52097,7 +52105,7 @@ var $$IMU_EXPORT$$; function get_caption(obj, el) { if (obj && obj.extra && obj.extra.caption) { - return obj.extra.caption; + return strip_whitespace(obj.extra.caption); } if (el) { @@ -52109,7 +52117,7 @@ var $$IMU_EXPORT$$; if (caption === el.src) return null; - return caption; + return strip_whitespace(caption); } } while ((el = el.parentElement)); } @@ -52694,7 +52702,7 @@ var $$IMU_EXPORT$$; if (caption && settings.mouseover_ui_caption) { // /10 is arbitrary, but seems to work well var chars = parseInt(Math.max(10, Math.min(60, (popup_width - topbarel.clientWidth) / 10))); - var caption_regex = new RegExp("^((?:.{" + chars + "}|.{0," + chars + "}[\\r\\n]))[\\s\\S]+$"); + var caption_regex = new RegExp("^((?:.{" + chars + "}|.{0," + chars + "}[\\r\\n]))[\\s\\S]+?$"); var caption_btn = addbtn({ truncated: caption.replace(caption_regex, "$1..."),
7
diff --git a/token-metadata/0xF29992D7b589A0A6bD2de7Be29a97A6EB73EaF85/metadata.json b/token-metadata/0xF29992D7b589A0A6bD2de7Be29a97A6EB73EaF85/metadata.json "symbol": "DMST", "address": "0xF29992D7b589A0A6bD2de7Be29a97A6EB73EaF85", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/lib/plugins/aws/deploy/compile/events/apiGateway/lib/method/index.js b/lib/plugins/aws/deploy/compile/events/apiGateway/lib/method/index.js @@ -48,16 +48,19 @@ module.exports = { extraCognitoPoolClaims = _.map(claims, (claim) => { if (typeof claim === 'string' && claim.startsWith('custom:')) { const subClaim = claim.substring(7); - return `"${subClaim}": "$context.authorizer.claims['${claim}']",` + return `"${subClaim}": "$context.authorizer.claims['${claim}']"` } else { - return `"${claim}": "$context.authorizer.claims.${claim}",` + return `"${claim}": "$context.authorizer.claims.${claim}"` } }); } const requestTemplates = template.Properties.Integration.RequestTemplates; _.forEach(requestTemplates, (value, key) => { - requestTemplates[key] = - value.replace('extraCognitoPoolClaims', extraCognitoPoolClaims || ''); + let claimsString = ''; + if (extraCognitoPoolClaims && extraCognitoPoolClaims.length > 0) { + claimsString = extraCognitoPoolClaims.join(",") + ","; + } + requestTemplates[key] = value.replace('extraCognitoPoolClaims', claimsString); }); this.apiGatewayMethodLogicalIds.push(methodLogicalId);
1
diff --git a/CHANGELOG.md b/CHANGELOG.md ## 7.7.2 (unreleased) -### Breaking - -### Feature - ### Bugfix - Fix bug showing wrong data in the edit view, that occured in some cases, when one would enter the edit view of a page from another page @jackahl
6
diff --git a/packages/app/src/server/models/activity.ts b/packages/app/src/server/models/activity.ts @@ -216,7 +216,7 @@ activitySchema.post('save', async(savedActivity: ActivityDocument) => { /** - * TODO: implement removeActivity by GW-7481 + * TODO: improve removeActivity that decleard in InAppNotificationService by GW-7481 */ // because mongoose's 'remove' hook fired only when remove by a method of Document (not by a Model method)
10
diff --git a/packages/app/src/server/models/page.ts b/packages/app/src/server/models/page.ts @@ -7,7 +7,7 @@ import mongoosePaginate from 'mongoose-paginate-v2'; import uniqueValidator from 'mongoose-unique-validator'; import nodePath from 'path'; -import { getOrCreateModel, pagePathUtils, getModelSafely } from '@growi/core'; +import { getOrCreateModel, pagePathUtils } from '@growi/core'; import loggerFactory from '../../utils/logger'; import Crowi from '../crowi'; import { IPage } from '../../interfaces/page'; @@ -219,8 +219,6 @@ schema.statics.findByPathAndViewer = async function( const baseQuery = useFindOne ? this.findOne({ path }) : this.find({ path }); const queryBuilder = new PageQueryBuilder(baseQuery, includeEmpty); - const User = getModelSafely('User') || require('~/server/models/user')(); - queryBuilder.populateDataToList(User.USER_FIELDS_EXCEPT_CONFIDENTIAL); await addViewerCondition(queryBuilder, user, userGroups); return queryBuilder.query.exec();
13
diff --git a/token-metadata/0x8f3470A7388c05eE4e7AF3d01D8C722b0FF52374/metadata.json b/token-metadata/0x8f3470A7388c05eE4e7AF3d01D8C722b0FF52374/metadata.json "symbol": "VERI", "address": "0x8f3470A7388c05eE4e7AF3d01D8C722b0FF52374", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/example/src/redux/sagas/todos.js b/example/src/redux/sagas/todos.js @@ -22,11 +22,11 @@ function* syncTodosSaga() { } function* saveNewTodo() { - const uid = yield select(state => state.login.user.uid); + const user = yield select(state => state.login.user); const newTodo = yield select(state => state.todos.new); yield call(rsf.create, 'todos', { - creator: uid, + creator: user ? user.uid : null, done: false, label: newTodo, });
11
diff --git a/scenes/treehouse.scn b/scenes/treehouse.scn "position": [ -6, 0.5, - 12 + 13 ], "quaternion": [ 0, ], "start_url": "https://webaverse.github.io/pistol/" }, + { + "position": [ + -6, + 0.5, + 12 + ], + "quaternion": [ + 0, + 0, + 0, + 1 + ], + "scale": [ + 1, + 1, + 1 + ], + "start_url": "https://webaverse.github.io/bow/" + }, { "position": [ -6,
0
diff --git a/packages/insomnia-app/webpack/webpack.config.base.ts b/packages/insomnia-app/webpack/webpack.config.base.ts import 'webpack-dev-server'; import path from 'path'; -import { Configuration, DefinePlugin, optimize } from 'webpack'; +import { Configuration, DefinePlugin, NormalModuleReplacementPlugin, optimize } from 'webpack'; import pkg from '../package.json'; @@ -83,6 +83,11 @@ const configuration: Configuration = { new DefinePlugin({ 'process.env.RELEASE_DATE': JSON.stringify(new Date()), }), + // see: https://github.com/Kong/insomnia/pull/3469 for why this transform is needed + new NormalModuleReplacementPlugin( + /node_modules\/vscode-languageserver-types\/lib\/umd\/main\.js/, + '../esm/main.js', + ), ], target: 'electron-renderer', };
9
diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js @@ -44,6 +44,7 @@ angular.module('canoeApp.services') if (root.getWallet()) { $log.info('Changed password for wallet') root.getWallet().changePass(currentPw, pw) + root.enteredPassword(pw) nanoService.saveWallet(root.getWallet(), function () {}) } else { $log.error('No wallet to change password for') @@ -82,6 +83,7 @@ angular.module('canoeApp.services') root.setWallet(wallet, function (err) { if (err) return cb(err) nanoService.repair() // So we fetch truth from lattice, sync + root.enteredPassword(password) nanoService.saveWallet(root.getWallet(), cb) }) })
12
diff --git a/src/template.json b/src/template.json }, "weapon": { "templates": ["itemDescription", "physicalItem", "activatedEffect", "action", "itemUsage", "modifiers", "container"], + "attributes": { + "sturdy": true + }, "weaponType": "basicM", "weaponCategory": "uncategorized", "special": "", }, "equipment": { "templates": ["itemDescription", "physicalItem", "activatedEffect", "action", "itemUsage", "modifiers", "container"], + "attributes": { + "sturdy": true + }, "armor": { "type": "light", "eac": 0, }, "shield": { "templates": ["itemDescription", "physicalItem", "activatedEffect", "action", "itemUsage", "modifiers", "container"], + "attributes": { + "sturdy": true + }, "dex": null, "acp": null, "bonus": {
0
diff --git a/ui/component/publishForm/view.jsx b/ui/component/publishForm/view.jsx @@ -229,8 +229,10 @@ function PublishForm(props: Props) { }, [mode, updatePublishForm]); useEffect(() => { - if (activeChannelName) { + if (incognito) { updatePublishForm({ channel: undefined }); + } else if (activeChannelName) { + updatePublishForm({ channel: activeChannelName }); } }, [activeChannelName, incognito, updatePublishForm]);
12
diff --git a/app/views/flags/new.html.haml b/app/views/flags/new.html.haml #pageheader.column.span-24 %span.breadcrumbs - = link_to t(:back_to_x, x: @object.try_methods( :to_plain_s, :to_s ) ), @object, class: "back crumb" + = link_to t(:back_to_x, noun: @object.try_methods( :to_plain_s, :to_s ) ), @object, class: "back crumb" %h2 = t :new_flag_for = link_to @object.to_plain_s, @object
1
diff --git a/docker/Dockerfile b/docker/Dockerfile -FROM ruby:2.4-alpine3.7 AS elektra +FROM ruby:2.4-alpine3.10 AS elektra ENV OVERLAY=sucks3 +# alpine3.10 +# nodejs (10.16.3-r0) +# yarn (1.16.0-r0) RUN apk --no-cache add git curl tzdata nodejs postgresql-client yarn # Install gems with native extensions before running bundle install @@ -65,9 +68,7 @@ RUN update-ca-certificates \ # install gems, copy app and run rake tasks RUN bundle install --without "development integration_tests" # install js packages -RUN if [ -z ${http_proxy} ]; then \ - echo do not use proxy && yarn; \ - else echo use proxy && yarn --proxy $http_proxy --https-proxy $https_proxy; fi +RUN yarn install --production ADD . /home/app/webapp
4
diff --git a/token-metadata/0x6C8c6b02E7b2BE14d4fA6022Dfd6d75921D90E4E/metadata.json b/token-metadata/0x6C8c6b02E7b2BE14d4fA6022Dfd6d75921D90E4E/metadata.json "symbol": "CBAT", "address": "0x6C8c6b02E7b2BE14d4fA6022Dfd6d75921D90E4E", "decimals": 8, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/components/admin/data/widgets/form/component.js b/components/admin/data/widgets/form/component.js @@ -217,6 +217,9 @@ class WidgetForm extends PureComponent { toastr.success('Success', `The widget "${id}" - "${name}" has been updated correctly`); this.setState({ loading: false }); if (onSubmit) onSubmit(response); + }) + .catch((error) => { + toastr.error('Something went wrong updating the metadata', error.message); }); } else { // There is no metadata for this widget so we need to create it
7
diff --git a/src/content/en/updates/2019/02/model-viewer.md b/src/content/en/updates/2019/02/model-viewer.md @@ -2,7 +2,7 @@ project_path: /web/_project.yaml book_path: /web/updates/_book.yaml description: Adding 3D models to a website can be tricky for a variety of reasons including the hosting issues and the high bar of 3D programming. That's why we're introducing the &lt;model-viewer&gt; web component to let you use 3D models declaratively. -{# wf_updated_on: 2019-05-02 #} +{# wf_updated_on: 2020-06-15 #} {# wf_published_on: 2019-02-06 #} {# wf_tags: 3d,model-viewer #} {# wf_featured_image: /web/updates/images/2019/02/space-suit.png #} @@ -12,7 +12,7 @@ description: Adding 3D models to a website can be tricky for a variety of reason # The model-viewer web component {: .page-title} Note: We're always [updating and improving](https://github.com/GoogleWebComponents/model-viewer/releases) -`<model-viewer>`. Check out the [`<model-viewer>` homepage](https://googlewebcomponents.github.io/model-viewer/) +`<model-viewer>`. Check out the [`<model-viewer>` homepage](https://modelviewer.dev/) to explore what it can do. {% include "web/_shared/contributors/josephmedley.html" %}
1
diff --git a/src/core/config/OperationConfig.js b/src/core/config/OperationConfig.js @@ -3207,7 +3207,7 @@ const OperationConfig = { ] }, "Microsoft Script Decoder": { - description: "Decodes Microsoft Encoded Script files that have been encoded with Microsoft's custom encoding. These are often VBS (Visual Basic Script) files that are encoded and often renamed &#34;.vbe&#34; extention or JS (JScript) files renamed with &#34;.jse&#34; extention.", + description: "Decodes Microsoft Encoded Script files that have been encoded with Microsoft's custom encoding. These are often VBS (Visual Basic Script) files that are encoded and often renamed &#34;.vbe&#34; extention or JS (JScript) files renamed with &#34;.jse&#34; extention.<br><br><b>Sample</b><br><br>Encoded:<br><code>#@~^RQAAAA==-mD~sX|:/TP{~J:+dYbxL~@!F@*@!+@*@!&amp;@*eEI@#@&amp;@#@&amp;.jm.raY 214Wv:zms/obI0xEAAA==^#~@</code><br><br>Decoded:<br><code>MsgBox &#34;Hello&#34;</code>", run: MS.runDecodeScript, inputType: "string", outputType: "string",
0
diff --git a/generators/generator-base.js b/generators/generator-base.js @@ -2113,9 +2113,7 @@ module.exports = class extends PrivateBase { if (options.skipCheckLengthOfIdentifier) { this.jhipsterConfig.skipCheckLengthOfIdentifier = true; } - if (options.prettierJava !== undefined) { - this.jhipsterConfig.prettierJava = options.prettierJava; - } + if (options.skipCommitHook) { this.jhipsterConfig.skipCommitHook = true; }
2
diff --git a/src/server/routes/apiv3/slack-integration-settings.js b/src/server/routes/apiv3/slack-integration-settings.js @@ -170,9 +170,9 @@ module.exports = (crowi) => { } } else { - // const proxyServerUri = settings.proxyServerUri; + const proxyServerUri = settings.proxyServerUri; - // if (proxyServerUri != null) { + if (proxyServerUri != null) { try { const slackAppIntegrations = await SlackAppIntegration.find(); settings.slackAppIntegrations = slackAppIntegrations;
13
diff --git a/src/components/App.js b/src/components/App.js @@ -1959,8 +1959,13 @@ class App extends Component { sendGTPCommand(controller, command, callback = helper.noop) { if (controller == null) return + controller.sendCommand(command, callback) + } + + async handleCommandSent({controller, command, getResponse}) { let sign = 1 - this.attachedEngineControllers.indexOf(controller) * 2 if (sign > 1) sign = 0 + let entry = [sign, controller.engine.name, command] let maxLength = setting.get('console.max_history_count') @@ -1971,7 +1976,8 @@ class App extends Component { return {consoleLog: newLog} }) - controller.sendCommand(command, ({response}) => { + let {response} = await getResponse() + this.setState(({consoleLog}) => { let index = consoleLog.indexOf(entry) if (index === -1) return {} @@ -2022,9 +2028,6 @@ class App extends Component { this.setCurrentTreePosition(tree, index) } } catch (err) {} - - callback({response, command}) - }) } syncEngines({passPlayer = null} = {}) {
9
diff --git a/src/pages/DiseasePage/ClassicAssociationsTable.js b/src/pages/DiseasePage/ClassicAssociationsTable.js @@ -254,14 +254,16 @@ function ClassicAssociationsTable({ efoId, aggregationFilters }) { useEffect( () => { let isCurrent = true; + setLoading(true); client .query({ query: DISEASE_ASSOCIATIONS_QUERY, variables: { efoId, index: 0, - size: 50, - sortBy: 'score', + size: pageSize, + sortBy, + filter, aggregationFilters, }, }) @@ -269,12 +271,14 @@ function ClassicAssociationsTable({ efoId, aggregationFilters }) { if (isCurrent) { setRows(data.disease.associatedTargets.rows); setCount(data.disease.associatedTargets.count); + setPage(0); setInitialLoading(false); + setLoading(false); } }); return () => (isCurrent = false); }, - [efoId, aggregationFilters] + [efoId, pageSize, sortBy, filter, aggregationFilters] ); const getAllAssociations = useBatchDownloader( @@ -305,71 +309,16 @@ function ClassicAssociationsTable({ efoId, aggregationFilters }) { } function handleRowsPerPageChange(pageSize) { - setLoading(true); - client - .query({ - query: DISEASE_ASSOCIATIONS_QUERY, - variables: { - efoId, - index: 0, - size: pageSize, - sortBy, - filter, - aggregationFilters, - }, - }) - .then(({ data }) => { - setRows(data.disease.associatedTargets.rows); setPageSize(pageSize); - setPage(0); - setLoading(false); - }); } function handleSort(sortBy) { - setLoading(true); - client - .query({ - query: DISEASE_ASSOCIATIONS_QUERY, - variables: { - efoId, - index: 0, - size: pageSize, - sortBy, - filter, - aggregationFilters, - }, - }) - .then(({ data }) => { - setRows(data.disease.associatedTargets.rows); - setPage(0); setSortBy(sortBy); - setLoading(false); - }); } function handleGlobalFilterChange(newFilter) { if (newFilter !== filter) { - setLoading(true); - client - .query({ - query: DISEASE_ASSOCIATIONS_QUERY, - variables: { - efoId, - index: 0, - size: pageSize, - sortBy, - filter: newFilter, - aggregationFilters, - }, - }) - .then(({ data }) => { - setRows(data.disease.associatedTargets.rows); - setCount(data.disease.associatedTargets.count); - setPage(0); setFilter(newFilter); - setLoading(false); - }); } }
1
diff --git a/src/modules/html.js b/src/modules/html.js x: 0, y: 0, html2canvas: {}, - jsPDF: {} + jsPDF: {}, + backgroundColor: "transparent" } }; right: 0, top: 0, margin: "auto", - backgroundColor: this.opt.backgroundColor || "transparent" + backgroundColor: this.opt.backgroundColor }; // Set the overlay to hidden (could be changed in the future to provide a print preview). var source = cloneNode(
12
diff --git a/src/qrcode/qrcard.jsx b/src/qrcode/qrcard.jsx @@ -66,7 +66,7 @@ function QRCard({ <div id="instructions"> <InstructionIcon stylingClass="instruction-icon" /> <span> - To pay, open the Venmo app and <br />scan the QR code above. + To pay, scan the QR code with <br />your Venmo app </span> </div> <QRCodeElement svgString={ svgString } />
1
diff --git a/Source/Scene/Camera.js b/Source/Scene/Camera.js @@ -368,10 +368,14 @@ Camera.prototype._updateCameraChanged = function () { camera._changedHeading = currentHeading; } - var headingChanged = camera._changedHeading !== camera.heading; + var headingChanged = camera._changedHeading !== currentHeading; + var headingChangedPercentage = + (Math.abs(camera._changedHeading - currentHeading) / + ((camera._changedHeading + currentHeading) / 2)) * + 100; if (headingChanged) { - camera._changed.raiseEvent("Camera Heading Changed"); + camera._changed.raiseEvent(headingChangedPercentage); camera._changedHeading = currentHeading; }
3
diff --git a/server/views/sources/collection.py b/server/views/sources/collection.py @@ -539,14 +539,14 @@ def collection_update(collection_id): show_on_media = request.form['showOnMedia'] if 'showOnMedia' in request.form else None source_ids = [] if len(request.form['sources[]']) > 0: - source_ids = [sid for sid in request.form['sources[]'].split(',')] + source_ids = [int(sid) for sid in request.form['sources[]'].split(',')] # first update the collection updated_collection = user_mc.updateTag(collection_id, name, name, description, is_static=(static == 'true'), show_on_stories=(show_on_stories == 'true'), show_on_media=(show_on_media == 'true')) # get the sources in the collection first, then remove and add as needed - existing_source_ids = [m['media_id'] for m in collection_media_list(user_mediacloud_key(), collection_id)] + existing_source_ids = [int(m['media_id']) for m in collection_media_list(user_mediacloud_key(), collection_id)] source_ids_to_remove = list(set(existing_source_ids) - set(source_ids)) source_ids_to_add = [sid for sid in source_ids if sid not in existing_source_ids] logger.debug(existing_source_ids)
9
diff --git a/src/transforms/groupby.js b/src/transforms/groupby.js @@ -172,7 +172,7 @@ function transformOne(trace, state) { var groups = trace.transforms[transformIndex].groups; var originalPointsAccessor = pointsAccessorFunction(trace.transforms, opts); - if(!(Array.isArray(groups)) || groups.length === 0) { + if(!(Lib.isArrayOrTypedArray(groups)) || groups.length === 0) { return [trace]; }
0
diff --git a/data.js b/data.js @@ -5133,8 +5133,8 @@ module.exports = [ name: "microBench", github: "kmpatel/microBench", tags: ["performance", "benchmark"], - description: "Tiny, simple framework to bench mark you JS code in browser console", + description: "Tiny, simple framework to benchmark your JS functions in browser console", url: "https://github.com/kmpatel/microBench/releases", - source: "https://github.com/kmpatel/microBench/tree/v0.9" + source: "https://raw.githubusercontent.com/kmpatel/microBench/v0.9/ubenchmark.js" } ];
0
diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js @@ -491,9 +491,9 @@ function getOptions(reports, personalDetails, activeReportID, { const reportPersonalDetails = getPersonalDetailsForLogins(logins, personalDetails); - // Save the report in the map if this is a single participant (with the exception of PolicyExpenseChat and - // default rooms) so we can associate the reportID with the personal detail option later. - if (logins.length <= 1 && !isPolicyExpenseChat && !isDefaultRoom) { + // Save the report in the map if this is a single participant so we can associate the reportID with the + // personal detail option later. + if (logins.length <= 1) { reportMapForLogins[logins[0]] = report; } const isSearchingSomeonesPolicyExpenseChat = !report.isOwnPolicyExpenseChat && searchValue !== '';
13
diff --git a/packages/idyll-layouts/src/blog/styles.js b/packages/idyll-layouts/src/blog/styles.js @@ -92,6 +92,10 @@ input { border-radius: 17px; } +.author-view-button:focus { + outline: none; +} + .component-debug-view:hover > .author-view-button { opacity: 1; transition: opacity 600ms linear;
2
diff --git a/src/index.ts b/src/index.ts @@ -360,7 +360,14 @@ export async function cli(args: string[]) { process.exit(0); } - const pkgManifest = require(path.join(cwd, 'package.json')); + + const pkgManifestPath = path.join(cwd, 'package.json'); + + if (!fs.existsSync(pkgManifestPath)) { + return console.log(chalk.red('[Error]: Please add a package.json to your project, snowpack needs it to work')) + } + + const pkgManifest = require(pkgManifestPath); const implicitDependencies = [ ...Object.keys(pkgManifest.dependencies || {}), ...Object.keys(pkgManifest.peerDependencies || {}),
7
diff --git a/packages/frontend/src/redux/reducers/sign/index.js b/packages/frontend/src/redux/reducers/sign/index.js @@ -64,6 +64,22 @@ const sign = handleActions({ status: payload.status }; }, + [multiplyGas]: (state, { payload: { transactions: transactionsString } }) => { + let transactions = transactionsString.split(',') + .map(str => Buffer.from(str, 'base64')) + .map(buffer => utils.serialize.deserialize(transaction.SCHEMA, transaction.Transaction, buffer)); + + transactions.forEach((t) => { + t.actions.forEach((a) => { + a.functionCall.gas = a.functionCall.gas.mul(new BN(MULTIPLY_TX_GAS_BY)); + }); + }); + + return { + ...state, + transactions + }; + }, [makeAccountActive]: () => { return initialState; }
9
diff --git a/lib/waterline/utils/query/help-find.js b/lib/waterline/utils/query/help-find.js @@ -112,7 +112,7 @@ module.exports = function helpFind(WLModel, s2q, omen, done) { // Run the stage 3 query and proceed. parentAdapter.join(parentDatastoreName, parentQuery, function (err, rawResultFromAdapter) { if (err) { - err = forgeAdapterError(err, omen, 'join', parentQuery.using, orm); + err = forgeAdapterError(err, omen, 'join', WLModel.identity, orm); return proceed(err); } @@ -129,7 +129,9 @@ module.exports = function helpFind(WLModel, s2q, omen, done) { else if (!_.isArray(parentQuery.joins) || parentQuery.joins.length === 0) { parentAdapter.find(parentDatastoreName, parentQuery, function (err, rawResultFromAdapter) { if (err) { - err = forgeAdapterError(err, omen, 'find', parentQuery.using, orm); + err = forgeAdapterError(err, omen, 'find', WLModel.identity, orm); + // console.log('Working on that error, but btw heres `parentQuery`:',util.inspect(parentQuery, {depth:5})); + // console.log('\nand also s2q, just in case:',util.inspect(s2q, {depth:5})); return proceed(err); } @@ -190,7 +192,7 @@ module.exports = function helpFind(WLModel, s2q, omen, done) { var parentQueryWithoutJoins = _.omit(parentQuery, 'joins'); parentAdapter.find(parentDatastoreName, parentQueryWithoutJoins, function (err, parentResults) { if (err) { - err = forgeAdapterError(err, omen, 'find', parentQueryWithoutJoins.using, orm); + err = forgeAdapterError(err, omen, 'find', WLModel.identity, orm); return done(err); } @@ -251,14 +253,8 @@ module.exports = function helpFind(WLModel, s2q, omen, done) { // Finally, run the query on the adapter. junctionTableAdapter.find(junctionTableDatastoreName, junctionTableQuery, function(err, junctionTableResults) { if (err) { - err = forgeAdapterError(err, omen, 'find', firstJoin.childCollectionIdentity, orm); - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // TODO: change the line above back to the following: - // ``` - // err = forgeAdapterError(err, omen, 'find', junctionTableQuery.using, orm); - // ``` - // (this will be fine to do once the bug is fixed that is causing `firstJoin.child` to be built w/ different letter casing than the actual model identity) - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Note that we're careful to use the identity, not the table name! + err = forgeAdapterError(err, omen, 'find', junctionTableModel.identity, orm); return nextSetOfJoins(err); } @@ -341,7 +337,8 @@ module.exports = function helpFind(WLModel, s2q, omen, done) { // Finally, run the query on the adapter. childTableAdapter.find(childTableDatastoreName, childTableQuery, function(err, childTableResults) { if (err) { - err = forgeAdapterError(err, omen, 'find', childTableQuery.using, orm); + // Note that we're careful to use the identity, not the table name! + err = forgeAdapterError(err, omen, 'find', childTableModel.identity, orm); return nextParentPk(err); } @@ -448,7 +445,7 @@ module.exports = function helpFind(WLModel, s2q, omen, done) { // We now have another valid "stage 3" query, so let's run that and get the child table results. childTableAdapter.find(childTableDatastoreName, childTableQuery, function(err, childTableResults) { if (err) { - err = forgeAdapterError(err, omen, 'find', childTableQuery.using, orm); + err = forgeAdapterError(err, omen, 'find', childTableModel.identity, orm); return nextParentRecord(err); }
4
diff --git a/interpolants.js b/interpolants.js @@ -55,3 +55,91 @@ export class InfiniteActionInterpolant extends ScalarInterpolant { } } } + +const _makeSnapshots = (Constructor, numFrames) => { + const result = Array(numFrames); + for (let i = 0; i < numFrames; i++) { + result[i] = { + startValue: new Constructor(), + // endValue: new Constructor(), + startTime: 0, + endTime: 0, + }; + } + return result; +}; +export class VectorInterpolant { + constructor(fn, timeDelay, numFrames, Constructor, lerpFnName) { + this.fn = fn; + this.timeDelay = timeDelay; + this.numFrames = numFrames; + this.lerpFnName = lerpFnName; + + this.readTime = 0; + this.writeTime = 0; + + this.snapshots = _makeSnapshots(Constructor, numFrames); + this.snapshotWriteIndex = 0; + + this.value = new Constructor(); + } + update(timeDiff) { + this.readTime += timeDiff; + + const effectiveReadTime = this.readTime - this.timeDelay; + this.seekTo(effectiveReadTime); + } + seekTo(t) { + for (let i = -(this.numFrames - 1); i < 0; i++) { + const index = this.snapshotWriteIndex + i; + const snapshot = this.snapshots[mod(index, this.numFrames)]; + if (snapshot.startTime >= t && t < snapshot.endTime) { + const f = (t - snapshot.startTime) / (snapshot.endTime - snapshot.startTime); + const {startValue} = snapshot; + const nextSnapshot = this.snapshots[mod(index + 1, this.numFrames)]; + const {startValue: endValue} = nextSnapshot; + this.value.copy(startValue)[this.lerpFnName](endValue, f); + return; + } + } + console.warn('could not seek to time', t, JSON.parse(JSON.stringify(this.snapshots))); + } + snapshot(timeDiff) { + const value = this.fn(); + // console.log('got value', value.join(','), timeDiff); + const writeSnapshot = this.snapshots[this.snapshotWriteIndex]; + writeSnapshot.startValue.fromArray(value); + writeSnapshot.startTime = this.writeTime; + writeSnapshot.endTime = this.writeTime + timeDiff; + + this.snapshotWriteIndex = mod(this.snapshotWriteIndex + 1, this.numFrames); + this.writeTime += timeDiff; + } +} + +export class PositionInterpolant extends VectorInterpolant { + constructor(fn, timeDelay, numFrames) { + super(fn, timeDelay, numFrames, THREE.Vector3, 'lerp'); + } +} + +export class QuaternionInterpolant extends VectorInterpolant { + constructor(fn, timeDelay, numFrames) { + super(fn, timeDelay, numFrames, THREE.Quaternion, 'slerp'); + } +} + +export class FixedTimeStep { + constructor(fn, frameRate) { + this.fn = fn; + this.maxTime = 1000/frameRate; + this.timeAcc = this.maxTime; + } + update(timeDiff) { + this.timeAcc += timeDiff; + while (this.timeAcc > this.maxTime) { + this.fn(this.maxTime); + this.timeAcc -= this.maxTime; + } + } +} \ No newline at end of file
0
diff --git a/lib/manager/components/transform/FeedTransformation.js b/lib/manager/components/transform/FeedTransformation.js @@ -40,6 +40,8 @@ const transformationTypes = { } } +const TABLE_MUST_BE_DEFINED_ERROR = 'Table must be defined' + /** * Component that renders fields for one feed transformation * (e.g., ReplaceFileFromStringTransformation). @@ -49,6 +51,15 @@ export default class FeedTransformation extends Component<Props, {errors: Array< errors: [] } + componentDidUpdate (prevProps: Props) { + // Update error state if props.transformation.table changed + // and 'Table must be defined' no longer applies. + const { table } = this.props.transformation + if (table && prevProps.transformation.table !== table) { + this.setState({ errors: this.state.errors.filter(e => e !== TABLE_MUST_BE_DEFINED_ERROR) }) + } + } + _getFieldsForType = (type: string) => { const {feedSource, index, onChange, transformation} = this.props const FieldsComponent = transformationTypes[type].component @@ -66,7 +77,7 @@ export default class FeedTransformation extends Component<Props, {errors: Array< _onValidationErrors = (errors: Array<string>) => { const issues: Array<string> = [] if (!this.props.transformation.table) { - issues.push('Table must be defined') + issues.push(TABLE_MUST_BE_DEFINED_ERROR) } this.setState({ errors: issues.concat(errors) }) }
1
diff --git a/services/data-hub/src/cfm/conflict-manager.ts b/services/data-hub/src/cfm/conflict-manager.ts @@ -4,7 +4,7 @@ const cfm = new CFM(); // Set rules for address-schema cfm.setRules({ - uniqArray: ['addresses', 'contactData', 'categories'], + uniqArray: ['contactData.[]', 'addresses.[]', 'categories.[]'], copyNew: [ 'middleName', 'jobTitle',
1
diff --git a/tests/browser/nightwatch.js b/tests/browser/nightwatch.js @@ -81,7 +81,8 @@ module.exports = { // Enter input browser .useCss() - .setValue("#input-text", "Don't Panic."); + .setValue("#input-text", "Don't Panic.") + .click("#bake"); // Check output browser
0
diff --git a/README.md b/README.md @@ -41,12 +41,13 @@ The diagram below depicts a high-level view of the various modules, registries, ## Components ### SecurityToken `SecurityToken` is an implementation of the ST-20 protocol that allows the addition of different modules to control its behavior. Different modules can be attached to `SecurityToken`: -- `TransferManager` modules: These control the logic behind transfers and how they are allowed or disallowed. +- [TransferManager modules](contracts/modules/TransferManager): These control the logic behind transfers and how they are allowed or disallowed. By default, the ST (Security Token) gets a `GeneralTransferManager` module attached in order to determine if transfers should be allowed based on a whitelist approach. The `GeneralTransferManager` behaves differently depending who is trying to transfer the tokens. a) In an offering setting (investors buying tokens from the issuer) the investor's address should be present on an internal whitelist managed by the issuer within the `GeneralTransferManager`. b) In a peer to peer transfer, restrictions apply based on real-life lockups that are enforced on-chain. For example, if a particular holder has a 1-year sale restriction for the token, the transaction will fail until that year passes. -- Security Token Offering (STO) modules: A `SecurityToken` can be attached to one (and only one) STO module that will dictate the logic of how those tokens will be sold/distributed. An STO is the equivalent to the Crowdsale contracts often found present in traditional ICOs. -- Permission Manager modules: These modules manage permissions on different aspects of the issuance process. The issuer can use this module to manage permissions and designate administrators on his token. For example, the issuer might give a KYC firm permissions to add investors to the whitelist. +- [Security Token Offering (STO) modules](contracts/modules/STO): A `SecurityToken` can be attached to one (and only one) STO module that will dictate the logic of how those tokens will be sold/distributed. An STO is the equivalent to the Crowdsale contracts often found present in traditional ICOs. +- [Permission Manager modules](contracts/modules/PermissionManager): These modules manage permissions on different aspects of the issuance process. The issuer can use this module to manage permissions and designate administrators on his token. For example, the issuer might give a KYC firm permissions to add investors to the whitelist. +- [Checkpoint Modules](contracts/modules/Checkpoint): These modules allow the issuer to define checkpoints at which token balances and the total supply of a token can be consistently queried. This functionality is useful for dividend payment mechanisms and on-chain governance, both of which need to be able to determine token balances consistently as of a specified point in time. ### TickerRegistry The ticker registry manages the sign up process to the Polymath platform. Issuers can use this contract to register a token symbol (which are unique within the Polymath network). Token Symbol registrations have an expiration period (7 days by default) in which the issuer has to complete the process of deploying their SecurityToken. If they do not complete the process in time, their ticker symbol will be made available for someone else to register.
3
diff --git a/src/indexPage/index.js b/src/indexPage/index.js @@ -30,7 +30,8 @@ export const popupToken = getStorage('setPopupToken'); // eslint-disable-next-line arrow-body-style export const expirationDate = () => { - return today + oneMilliSec * oneMinute * oneMinute * oneDay * twentyOneDays; + // return today + oneMilliSec * oneMinute * oneMinute * oneDay * twentyOneDays; + return today + fiveMinutes + fiveMinutes; }; // eslint-disable-next-line arrow-body-style export const setPopupToken = () => { @@ -120,8 +121,7 @@ const renderElements = () => { if (window.location.href.indexOf('bot.html') === -1) { renderBanner(); } - } - else { + } else { if (today > bannerToken) { remove('setDueDateForBanner'); renderBanner();
12
diff --git a/tests/e2e/specs/modules/analytics/setup-with-account-no-tag.test.js b/tests/e2e/specs/modules/analytics/setup-with-account-no-tag.test.js @@ -184,9 +184,10 @@ describe( 'setting up the Analytics module with an existing account and no exist // See the selects populate await expect( page ).toMatchElement( '.mdc-select__selected-text', { text: /test account a/i } ); - // Property and profile dropdowns should select "Set up a new property/view" options because there is no property associated with the current reference URL. + // Property dropdown should select "Set up a new property" options because there is no property associated with the current reference URL. await expect( page ).toMatchElement( '.mdc-select__selected-text', { text: /set up a new property/i } ); - await expect( page ).toMatchElement( '.mdc-select__selected-text', { text: /set up a new view/i } ); + // Profile should be hidden since no property is selected. + await expect( page ).not.toMatchElement( '.googlesitekit-analytics__select-profile' ); }, );
1
diff --git a/magda-minion-framework/src/registerWebhook.ts b/magda-minion-framework/src/registerWebhook.ts @@ -15,9 +15,10 @@ export default async function registerNewWebhook( const webHookConfig = buildWebhookConfig(options); + const userId = "b1fddd6f-e230-4068-bd2c-1a21844f1598"; const newWebHook: WebHook = { id: options.id, - userId: 0, // TODO: When this matters + userId, name: options.id, active: true, url: getWebhookUrl(options),
4
diff --git a/package.json b/package.json { "name": "minimap", "main": "./lib/main", - "version": "4.29.5", + "version": "4.29.6", "private": true, "description": "A preview of the full source code.", "author": "Fangdun Cai <[email protected]>",
6
diff --git a/package.json b/package.json "think-payload": "^1.0.0", "think-pm2": "^1.0.0", "think-resource": "^1.0.0", - "think-router": "^1.0.0", + "think-router": "^1.3.1", "think-trace": "^1.0.2", "think-validator": "^1.0.2" },
3
diff --git a/src/apps.json b/src/apps.json ], "icon": "FancyBox.png", "implies": "jQuery", - "script": "jquery\\.fancybox\\.pack\\.js(?:\\?v=([\\d.]+))?$\\;version:\\1", + "script": "jquery\\.fancybox(\\.pack|\\.min)?\\.js(\\?v=([\\d.]+))?$\\;version:\\3", "website": "http://fancyapps.com/fancybox" }, "Fastly": {
7
diff --git a/karma.conf.js b/karma.conf.js @@ -6,47 +6,38 @@ module.exports = function (config) { // Check out https://saucelabs.com/platforms for all browser/OS combos var customLaunchers = { sl_chrome_49: { - base: 'SauceLabs', browserName: 'chrome', version: '49' }, sl_firefox_70: { - base: 'SauceLabs', browserName: 'firefox', version: '70' }, sl_safari_8: { - base: 'SauceLabs', browserName: 'safari', version: '8' }, sl_chrome_latest: { - base: 'SauceLabs', browserName: 'chrome', version: 'latest' }, sl_firefox_latest: { - base: 'SauceLabs', browserName: 'firefox', version: 'latest' }, sl_safari_latest: { - base: 'SauceLabs', browserName: 'safari', version: 'latest' }, sl_ie_latest: { - base: 'SauceLabs', browserName: 'internet explorer', version: 'latest' }, sl_edge_latest: { - base: 'SauceLabs', browserName: 'MicrosoftEdge', version: 'latest' }, sl_ios_latest: { - base: 'SauceLabs', browserName: 'Safari', platform: 'iOS', version: 'latest', @@ -54,6 +45,12 @@ module.exports = function (config) { } }; + // define the base configuration for each launcher + Object.keys(customLaunchers).map((key) => { + customLaunchers[key].base = 'SauceLabs'; + }); + + // use SauceLabs browsers if running with TravisCI if (process.env.TRAVIS) { reporters = ['dots', 'coverage', 'clear-screen', 'saucelabs']; browsers = Object.keys(customLaunchers);
7
diff --git a/src/index.js b/src/index.js @@ -874,8 +874,9 @@ class Offline { this.serverlessLog(message); if (stackTrace && stackTrace.length > 0) { console.log(stackTrace); - } else { - console.log(err) + } + else { + console.log(err); } /* eslint-disable no-param-reassign */
7
diff --git a/src/server/routes/apiv3/forgot-password.js b/src/server/routes/apiv3/forgot-password.js @@ -51,6 +51,11 @@ module.exports = (crowi) => { try { // need to handle passwordResetOrderData when user not found and not active by GW7060 const passwordResetOrderData = await PasswordResetOrder.createPasswordResetOrder(email); + + if (passwordResetOrderData == null || passwordResetOrderData.isRevoked) { + return res.apiv3Err('update-password-failed'); + } + const url = new URL(`/forgot-password/${passwordResetOrderData.token}`, appUrl); const oneTimeUrl = url.href; await sendPasswordResetEmail(email, oneTimeUrl, i18n);
9
diff --git a/src/enhancer.js b/src/enhancer.js @@ -258,7 +258,7 @@ function createComposedFromStatelessFunc( return ComposedComponent; } -function createComposedFromEsm(ComposedComponent: constructor) { +function createComposedFromNativeClass(ComposedComponent: constructor) { ComposedComponent = (function(OrigComponent): constructor { function NewComponent() { // Use Reflect.construct to simulate 'new' @@ -289,7 +289,7 @@ export default function enhanceWithRadium( // runtime. However, the user of Radium might be. In this case we have // to maintain forward compatibility with native es classes. if (isNativeClass(ComposedComponent)) { - ComposedComponent = createComposedFromEsm(ComposedComponent); + ComposedComponent = createComposedFromNativeClass(ComposedComponent); } // Handle stateless components
7
diff --git a/README.md b/README.md @@ -24,7 +24,7 @@ After Effects plugin for exporting animations to svg/canvas/html + js or nativel # Plugin installation ### Option 1 (Recommended): -**Download it from from AE scripts:** +**Download it from from aescripts + aeplugins:** http://aescripts.com/bodymovin/ ### Option 2:
3
diff --git a/OurUmbraco/Our/Controllers/RegisterController.cs b/OurUmbraco/Our/Controllers/RegisterController.cs @@ -30,6 +30,10 @@ namespace OurUmbraco.Our.Controllers [CaptchaValidator] public ActionResult HandleSubmit(RegisterModel model) { + var recaptcha = ModelState["ReCaptcha"]; + if (recaptcha != null && HttpContext.Request.IsLocal) + recaptcha.Errors.Clear(); + var locationInvalid = string.IsNullOrEmpty(model.Latitude) || string.IsNullOrEmpty(model.Longitude); if (!ModelState.IsValid || locationInvalid || model.AgreeTerms == false) {
11
diff --git a/packages/spark-core/components/modals.js b/packages/spark-core/components/modals.js * Modal Functionality * Hides Modals, Shows Modals, Sets up Aria * Expects: - * - modal container to have attribute `data-sprk-modal="customID"` + * - main body content container to have attribute `data-sprk-main` + * - modal container is outside of `data-sprk-main` and has `data-sprk-modal="customID"` * - 'Wait' modal type to have `data-sprk-modal-type="wait"` in addition * - 'customID' should be unique identifier for each modal * - modal mask element to have `data-sprk-modal="mask"`
3
diff --git a/src/styles/getTooltipStyles.js b/src/styles/getTooltipStyles.js @@ -36,8 +36,12 @@ export default function getTooltipStyles( tooltipWidth, tooltipHeight, ) { + // Determine if the tooltip should display below the wrapped component. const windowWidth = Dimensions.get('window').width; const shouldShowBelow = (yOffset - tooltipHeight) < GUTTER_WIDTH; + + // Determine if we need to shift the tooltip horizontally to prevent it + // from displaying too near to the edge of the screen. let horizontalShift = 0; const tooltipLeftEdge = (xOffset + (width / 2)) - (tooltipWidth / 2); const tooltipRightEdge = (xOffset + (width / 2)) + (tooltipWidth / 2); @@ -49,6 +53,7 @@ export default function getTooltipStyles( horizontalShift = (windowWidth - GUTTER_WIDTH) - tooltipRightEdge; } horizontalShift = roundToNearestMultipleOfFour(horizontalShift); + return { animationStyle: { transform: [{
7
diff --git a/packages/component-library/src/RadioButtonGroup/RadioButtonGroup.js b/packages/component-library/src/RadioButtonGroup/RadioButtonGroup.js @@ -33,7 +33,6 @@ const RadioButtonGroup = ({ onChange={onChange} value={value} row={row} - inputProps={{ "aria-labelledby": { grpLabel } }} > {labels.map(label => ( <FormControlLabel
2
diff --git a/README.md b/README.md -![Embark](https://github.com/embark-framework/embark/raw/develop/header.png) +![Embark](https://github.com/embark-framework/embark/raw/master/header.png) [![npm](https://img.shields.io/npm/dm/embark.svg)](https://npmjs.com/package/embark) [![Gitter](https://img.shields.io/gitter/room/embark-framework/Lobby.svg)](https://gitter.im/embark-framework/Lobby) -[![Build Status](https://travis-ci.org/embark-framework/embark.svg?branch=develop)](https://travis-ci.org/embark-framework/embark) -[![Build status](https://ci.appveyor.com/api/projects/status/nnq38x2hi3q11o44/branch/develop?svg=true)](https://ci.appveyor.com/project/iurimatias/embark/branch/develop) +[![Build Status](https://travis-ci.org/embark-framework/embark.svg?branch=master)](https://travis-ci.org/embark-framework/embark) +[![Build status](https://ci.appveyor.com/api/projects/status/nnq38x2hi3q11o44/branch/master?svg=true)](https://ci.appveyor.com/project/iurimatias/embark/branch/master) ![Open PRs](https://img.shields.io/github/issues-pr-raw/embark-framework/embark.svg) ![Closed PRs](https://img.shields.io/github/issues-pr-closed-raw/embark-framework/embark.svg) ![GitHub commit activity the past week, 4 weeks, year](https://img.shields.io/github/commit-activity/y/embark-framework/embark.svg)
3
diff --git a/src/traces/parcats/parcats.js b/src/traces/parcats/parcats.js @@ -399,7 +399,7 @@ function mouseoverPath(d) { // hoverinfo is a combination of 'count' and 'probability' // Mouse - var hoverX = d3.mouse(this)[0]; + var hoverX = Lib.getPositionFromD3Event()[0]; // Label var gd = d.parcatsViewModel.graphDiv; @@ -446,7 +446,7 @@ function mouseoverPath(d) { } var hovertext = hovertextParts.join('<br>'); - var mouseX = d3.mouse(gd)[0]; + var mouseX = Lib.getPositionFromD3Event()[0]; Fx.loneHover({ trace: trace, @@ -978,7 +978,7 @@ function mouseoverCategoryBand(bandViewModel) { // hoverinfo is not skip, so we at least style the bands and emit interaction events // Mouse - var mouseY = d3.mouse(this)[1]; + var mouseY = Lib.getPositionFromD3Event()[1]; if(mouseY < -1) { // Hover is above above the category rectangle (probably the dimension title text) return; @@ -1085,8 +1085,8 @@ function dragDimensionStart(d) { .each( /** @param {CategoryViewModel} catViewModel */ function(catViewModel) { - var catMouseX = d3.mouse(this)[0]; - var catMouseY = d3.mouse(this)[1]; + var catMouseX = Lib.getPositionFromD3Event()[0]; + var catMouseY = Lib.getPositionFromD3Event()[1]; if(-2 <= catMouseX && catMouseX <= catViewModel.width + 2 &&
14
diff --git a/src/NetworkEntities.js b/src/NetworkEntities.js @@ -69,7 +69,7 @@ class NetworkEntities { if (NAF.options.syncSource && source !== NAF.options.syncSource) return; var networkId = entityData.networkId; - const entityOwnerActive = NAF.connection.activeDataChannels[entityData.owner] === false; + const entityOwnerActive = NAF.connection.hasActiveDataChannel(entityData.ownerId); if (this.hasEntity(networkId)) { this.entities[networkId].components.networked.networkUpdate(entityData); } else if (entityData.isFirstSync && entityOwnerActive) {
4
diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js @@ -343,7 +343,7 @@ function splitBill(participants, currentUserLogin, amount, comment, currency, lo const {groupData, splits, onyxData} = createSplitsAndOnyxData(participants, currentUserLogin, amount, comment, currency, locale); API.write('SplitBill', { - chatReportID: groupData.chatReportID, + reportID: groupData.chatReportID, amount, splits, currency, @@ -365,7 +365,7 @@ function splitBillAndOpenReport(participants, currentUserLogin, amount, comment, const {groupData, splits, onyxData} = createSplitsAndOnyxData(participants, currentUserLogin, amount, comment, currency, locale); API.write('SplitBillAndOpenReport', { - chatReportID: groupData.chatReportID, + reportID: groupData.chatReportID, amount, splits, currency,
10
diff --git a/test/acceptance/named_maps_static_view.js b/test/acceptance/named_maps_static_view.js @@ -217,7 +217,7 @@ describe('named maps static view', function() { } getStaticMap({ bbox: '0,45,90,45' }, function(err, img) { assert.ok(!err); - assert.imageIsSimilarToFile(img, previewFixture('override-zoom'), IMAGE_TOLERANCE, done); + assert.imageIsSimilarToFile(img, previewFixture('override-bbox'), IMAGE_TOLERANCE, done); }); }); });
4
diff --git a/appjs/logicjavascript.js b/appjs/logicjavascript.js @@ -16310,9 +16310,14 @@ function cscu1find(){ function cscu2find(){ let R = parseInt(document.getElementById("cscu2").value) + if(!isNaN(R)){ var h = (4 * R) / 3; var r = (2 *Math.sqrt(2) * R) / 3; - document.getElementById("cscu1ans").innerHTML= "The radius is "+r+"and the height is "+h + document.getElementById("cscu2ans").innerHTML= "The radius is "+r+"and the height is "+h + } + else{ + document.getElementById("cscu2ans").innerHTML = "Please enter valid input" + } } function cscu3find(){
1
diff --git a/src/hooks/useSSR.js b/src/hooks/useSSR.js import { getI18n } from './context'; -let initializedOnce = false; +let initializedLanguageOnce = false; +let initializedStoreOnce = false; export function useSSR(initialI18nStore, initialLanguage) { // only set this once - if (initializedOnce) return; + if (initializedLanguageOnce && initializedStoreOnce) return; const i18n = getI18n(); // nextjs / SSR: getting data from next.js or other ssr stack - if (initialI18nStore && initialLanguage) { + if (initialI18nStore && !initializedStoreOnce) { i18n.services.resourceStore.data = initialI18nStore; + initializedStoreOnce = true; + } + if (initialLanguage && !initializedLanguageOnce) { i18n.changeLanguage(initialLanguage); - initializedOnce = true; + initializedLanguageOnce = true; } }
11
diff --git a/package.json b/package.json "redux-throttle": "0.1.1", "rimraf": "^2.6.1", "scratch-audio": "0.1.0-prerelease.20180625202813", - "scratch-blocks": "0.1.0-prerelease.1531313153", + "scratch-blocks": "0.1.0-prerelease.1531338038", "scratch-l10n": "3.0.20180703181510", "scratch-paint": "0.2.0-prerelease.20180709132225", "scratch-render": "0.1.0-prerelease.20180618173030",
4
diff --git a/tests/providerTest.js b/tests/providerTest.js @@ -22,6 +22,7 @@ describe('provider testing', () => { opts.pactBrokerUrl = 'https://jankaritech.pactflow.io' opts.publishVerificationResult = true opts.pactBrokerToken = process.env.PACTFLOW_TOKEN + opts.enablePending = true opts.consumerVersionSelectors = [ { tag: process.env.DRONE_SOURCE_BRANCH,
4
diff --git a/protocols/swap/contracts/Swap.sol b/protocols/swap/contracts/Swap.sol @@ -46,7 +46,7 @@ contract Swap is ISwap { // Mapping of signer address to a delegated signer and expiry mapping (address => mapping (address => uint256)) public signerAuthorizations; - // Mapping of signers to nonces with value _AVAILABLE (0x00) or _UNAVAILABLE (0x01) + // Mapping of signers to nonces with value AVAILABLE (0x00) or UNAVAILABLE (0x01) mapping (address => mapping (uint256 => byte)) public signerNonceStatus; // Mapping of signer addresses to an optionally set minimum valid nonce @@ -76,7 +76,7 @@ contract Swap is ISwap { require(order.expiry > block.timestamp, "ORDER_EXPIRED"); - // Ensure the nonce is _AVAILABLE (0x00). + // Ensure the nonce is AVAILABLE (0x00). require(signerNonceStatus[order.signer.wallet][order.nonce] == AVAILABLE, "ORDER_TAKEN_OR_CANCELLED"); @@ -84,7 +84,7 @@ contract Swap is ISwap { require(order.nonce >= signerMinimumNonce[order.signer.wallet], "NONCE_TOO_LOW"); - // Mark the nonce _UNAVAILABLE (0x01). + // Mark the nonce UNAVAILABLE (0x01). signerNonceStatus[order.signer.wallet][order.nonce] = UNAVAILABLE; // Validate the sender side of the trade. @@ -169,7 +169,7 @@ contract Swap is ISwap { /** * @notice Cancel one or more open orders by nonce - * @dev Cancelled nonces are marked _UNAVAILABLE (0x01) + * @dev Cancelled nonces are marked UNAVAILABLE (0x01) * @dev Emits a Cancel event * @param nonces uint256[] List of nonces to cancel */
3
diff --git a/examples/__tests__/__snapshots__/SimpleSlider.test.js.snap b/examples/__tests__/__snapshots__/SimpleSlider.test.js.snap exports[`Simple Slider Snapshots click on 3rd dot 1`] = ` "<div> <h2> Single Item</h2> - <div class=\\"slick-initialized slick-slider\\"><button type=\\"button\\" data-role=\\"none\\" class=\\"slick-arrow slick-prev\\" style=\\"display: block;\\"> Previous</button> + <div class=\\"slick-initialized slick-slider\\" dir=\\"ltr\\"><button type=\\"button\\" data-role=\\"none\\" class=\\"slick-arrow slick-prev\\" style=\\"display: block;\\"> Previous</button> <div class=\\"slick-list\\"> <div class=\\"slick-track\\" style=\\"opacity: 1;\\"> <div data-index=\\"-1\\" tabindex=\\"-1\\" class=\\"slick-slide slick-cloned\\" style=\\"width: 0px;\\"> @@ -62,7 +62,7 @@ exports[`Simple Slider Snapshots click on 3rd dot 1`] = ` exports[`Simple Slider Snapshots click on next button 1`] = ` "<div> <h2> Single Item</h2> - <div class=\\"slick-initialized slick-slider\\"><button type=\\"button\\" data-role=\\"none\\" class=\\"slick-arrow slick-prev\\" style=\\"display: block;\\"> Previous</button> + <div class=\\"slick-initialized slick-slider\\" dir=\\"ltr\\"><button type=\\"button\\" data-role=\\"none\\" class=\\"slick-arrow slick-prev\\" style=\\"display: block;\\"> Previous</button> <div class=\\"slick-list\\"> <div class=\\"slick-track\\" style=\\"opacity: 1;\\"> <div data-index=\\"-1\\" tabindex=\\"-1\\" class=\\"slick-slide slick-cloned\\" style=\\"width: 0px;\\"> @@ -121,7 +121,7 @@ exports[`Simple Slider Snapshots click on next button 1`] = ` exports[`Simple Slider Snapshots click on prev button 1`] = ` "<div> <h2> Single Item</h2> - <div class=\\"slick-initialized slick-slider\\"><button type=\\"button\\" data-role=\\"none\\" class=\\"slick-arrow slick-prev\\" style=\\"display: block;\\"> Previous</button> + <div class=\\"slick-initialized slick-slider\\" dir=\\"ltr\\"><button type=\\"button\\" data-role=\\"none\\" class=\\"slick-arrow slick-prev\\" style=\\"display: block;\\"> Previous</button> <div class=\\"slick-list\\"> <div class=\\"slick-track\\" style=\\"opacity: 1;\\"> <div data-index=\\"-1\\" tabindex=\\"-1\\" class=\\"slick-slide slick-cloned\\" style=\\"width: 0px;\\"> @@ -180,7 +180,7 @@ exports[`Simple Slider Snapshots click on prev button 1`] = ` exports[`Simple Slider Snapshots slider initial state 1`] = ` "<div> <h2> Single Item</h2> - <div class=\\"slick-initialized slick-slider\\"><button type=\\"button\\" data-role=\\"none\\" class=\\"slick-arrow slick-prev\\" style=\\"display: block;\\"> Previous</button> + <div class=\\"slick-initialized slick-slider\\" dir=\\"ltr\\"><button type=\\"button\\" data-role=\\"none\\" class=\\"slick-arrow slick-prev\\" style=\\"display: block;\\"> Previous</button> <div class=\\"slick-list\\"> <div class=\\"slick-track\\" style=\\"opacity: 1;\\"> <div data-index=\\"-1\\" tabindex=\\"-1\\" class=\\"slick-slide slick-cloned\\" style=\\"width: 0px;\\">
3
diff --git a/Source/Widgets/CesiumInspector/Cesium3DTilesInspectorViewModel.js b/Source/Widgets/CesiumInspector/Cesium3DTilesInspectorViewModel.js @@ -371,6 +371,11 @@ define([ that._style = old; that._editorError = err.toString(); } + + // set feature again so pick coloring is set + var temp = that._feature; + that._feature = undefined; + that._feature = temp; } } } @@ -437,25 +442,22 @@ define([ _feature: { default: undefined, subscribe: (function() { - var current = { - feature: undefined, - color: new Color() - }; - return function(feature) { - if (current.feature !== feature) { - if (defined(current.feature) && - defined(current.feature._batchTable) && - !current.feature._batchTable.isDestroyed()) { + var current; + var scratchColor = new Color(); + return function(feature) { + if (current !== feature) { + if (defined(current) && defined(current._batchTable) && !current._batchTable.isDestroyed()) { // Restore original color to feature that is no longer selected - current.feature.color = Color.clone(current.color, current.feature.color); - current.feature = undefined; + var frameState = that._scene.frameState; + current.color = that._style.color.evaluateColor(frameState, current, scratchColor); + current = undefined; } + // that.styleString = that.styleString; if (defined(feature)) { // Highlight new feature - current.feature = feature; - Color.clone(feature.color, current.color); - feature.color = Color.clone(that.highlightColor, feature.color); + current = feature; + feature.color = that.highlightColor; } } };
7
diff --git a/src/selection-handler.js b/src/selection-handler.js @@ -92,7 +92,6 @@ Object.assign(SelectionHandler.prototype, require('./function-bind'), require('. this.editor.mouseDown = true; this.selecting = this.startIndex !== this.endIndex; this.removeNativeSelection(); - console.log("move:on"); window.addEventListener("mousemove", this.onMouseMove); } @@ -135,7 +134,6 @@ Object.assign(SelectionHandler.prototype, require('./function-bind'), require('. }, complete: function() { - console.log("move:off"); window.removeEventListener("mousemove", this.onMouseMove); },
2
diff --git a/app/scripts/StackedBarTrack.js b/app/scripts/StackedBarTrack.js @@ -13,8 +13,6 @@ export class StackedBarTrack extends BarTrack { } initTile(tile) { - - // todo findmax and min up here too? this.renderTile(tile); } @@ -32,7 +30,7 @@ export class StackedBarTrack extends BarTrack { for(let i = 0; i < visibleAndFetched.length; i++) { const matrix = this.unFlatten(visibleAndFetched[i]); const tileMaxAndMin = this.findMaxAndMin(matrix); - //todo add mapping from tileId to maxAndMin here + (tileMaxAndMin.max > visibleMax) ? visibleMax = tileMaxAndMin.max : visibleMax; (tileMaxAndMin.min < visibleMin) ? visibleMin = tileMaxAndMin.min : visibleMin; } @@ -85,7 +83,6 @@ export class StackedBarTrack extends BarTrack { if (flattenedArray.filter((a) => a < 0).length > 0 && this.options.valueScaling === 'linear') { console.warn('Negative values present in data. Defaulting to exponential scale.'); this.options.valueScaling = 'exponential'; - // todo does anything meaningful even happen here } // matrix[0] will be [flattenedArray[0], flattenedArray[256], flattenedArray[512], etc.]
2
diff --git a/helpers/wrapper/reports/SECURITY.md b/helpers/wrapper/reports/SECURITY.md @@ -6,11 +6,11 @@ Wrapper [Source Code](https://github.com/airswap/airswap-protocols/tree/master/h ## Introduction -Wrapper is a frontend for a Swap contract to enable sending and receiving ether (ETH) for wrapped ether (WETH) trades. The Swap contract only works with tokens, so WETH is required. Wrapper is written and primarily intended for the AirSwap Instant system. If an order does not specify WETH for either party, execution is passed directly through to the Swap contract. The following contracts are compiled with solidity 0.5.12. +Wrapper is a shim over the Swap contract. The Swap contract only supports tokens (smart contracts), so for ether (ETH) to be used it must be wrapped (WETH). Wrapper determines whether to wrap and unwrap based on whether WETH is specified as the signerToken or senderToken on an order. If an order does not specify WETH for either party, execution is passed directly through to the Swap contract. Wrapper is written and primarily intended for the AirSwap Instant system. The following contracts are compiled with solidity 0.5.12. ## Structure -Wrapper includes one contract and its dependencies. +Wrapper is comprised of one contract and its dependencies. [@airswap/wrapper/contracts/Wrapper.sol](../contracts/Wrapper.sol) @ [2a83c1ff2e46e6befa45889aa556fdd31e5c71fb](https://github.com/airswap/airswap-protocols/commit/2a83c1ff2e46e6befa45889aa556fdd31e5c71fb) @@ -51,7 +51,7 @@ contracts/Wrapper.sol ### Every `swap` through a Wrapper must be transacted by the sender specified on the order. -- By inspection and testing, line 70 requires that the message sender (transaction originator) is the same as the order sender wallet. +- By inspection and testing, line 70 requires that the message sender is the same as the order sender wallet. - **This invariant holds as-is.** ### Swap and WETH contracts used by a Wrapper are immutable and cannot be changed. @@ -104,3 +104,8 @@ Wrapper.swap(Types.Order) (Full.sol#456-506) ignores return value by external ca Wrapper.swap(Types.Order) (Full.sol#456-506) ignores return value by external calls "wethContract.transferFrom(_order.sender.wallet,address(this),_order.signer.param)" (Full.sol#497) Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#unused-return ``` + +## Notes + +- When deploying a Wrapper contract, we recommend using the [canonical WETH contracts](https://blog.0xproject.com/canonical-weth-migration-8a7ab6caca71). +- Trading ETH for WETH is neither an expected nor common use case for Swap, and is not supported by Wrapper. To convert between ETH and WETH, use the deposit and withdraw functions on the WETH contract.
3
diff --git a/vis/js/canvas.js b/vis/js/canvas.js @@ -247,7 +247,8 @@ class Canvas { chart_title = config.title; } else if (config.create_title_from_context_style === 'openaire') { let maxTitleLength = 47 // This should probably make it's way to a more global config - let compressedTitle = ( context.params.title.length > maxTitleLength ) ? context.params.title.slice(0, maxTitleLength - 3) + '...' : context.params.title + let acronymtitle = ( (context.params.acronym !== "") ? (context.params.acronym + " - " + context.params.title) : (context.params.title) ); + let compressedTitle = ( acronymtitle.length > maxTitleLength ) ? acronymtitle.slice(0, maxTitleLength - 3) + '...' : acronymtitle chart_title = `Overview of <span class="truncated-project-title">${compressedTitle}</span>\ <span class="project-id">(${context.params.project_id})</span>` } else if (config.create_title_from_context) {
14
diff --git a/includes/Core/Notifications/Notifications.php b/includes/Core/Notifications/Notifications.php @@ -202,8 +202,8 @@ class Notifications { $body = wp_remote_retrieve_body( $response ); $decoded = json_decode( $body, true ); - if ( null === $decoded ) { - throw new Exception( __( 'Failed to parse response', 'google-site-kit' ) ); + if ( json_last_error() ) { + throw new Exception( 'Error while decoding response: ' . json_last_error() ); } if ( ! empty( $decoded['error'] ) ) {
7
diff --git a/userscript.user.js b/userscript.user.js @@ -769,6 +769,7 @@ var $$IMU_EXPORT$$; is_original: false, norecurse: false, forcerecurse: false, + can_cache: true, bad: false, bad_if: [], fake: false, @@ -27173,6 +27174,74 @@ var $$IMU_EXPORT$$; .replace(/(\/potd\/entrants\/[0-9]+\/[^/]*)-[a-z]+(\.[^/.]*)$/, "$1-big$2"); } + if (host_domain_nosub === "modelmayhem.com" && options.element) { + if (!src) { + var current = options.element; + while ((current = current.parentElement)) { + if (current.tagName === "DIV" && current.id === "viewpic") { + var og_image_meta = document.querySelector("meta[property=\"og:image\"]"); + if (og_image_meta) { + return og_image_meta.getAttribute("content"); + } + + break; + } + } + } + + if (/\/images\/+nopic_worksafe-on\./.test(src) && options.do_request && options.cb) { + var parent = options.element.parentElement; + if (parent && parent.tagName === "A" && /\/portfolio\/+pic\/+[0-9]+/.test(parent.href)) { + var query_picid = function(picid, cb) { + var cache_key = "modelmayhem:" + picid; + + api_cache.fetch(cache_key, cb, function(done) { + options.do_request({ + url: "https://www.modelmayhem.com/portfolio/pic/" + picid, + method: "GET", + onload: function(resp) { + if (resp.readyState !== 4) + return; + + if (resp.status !== 200) { + console_error(cache_key, resp); + return done(null, false); + } + + var match = resp.responseText.match(/<meta\s+property="og:image"\s+content="([^"]+)"/); + if (!match) { + console_error(cache_key, "Unable to find match", resp); + return done(null, false); + } + + return done(decode_entities(match[1]), 24*60*60); + } + }); + }); + }; + + var get_picid_from_url = function(url) { + return url.replace(/.*\/portfolio\/+pic\/+([0-9]+)(?:[?#].)?$/, "$1"); + }; + + query_picid(get_picid_from_url(parent.href), function(newsrc) { + if (newsrc) { + options.cb({ + url: newsrc, + can_cache: false + }); + } else { + options.cb(null); + } + }); + + return { + waiting: true + }; + } + } + } + if (domain === "static.artbible.info") { // https://static.artbible.info/medium/lastman_kruisiging.jpg // https://static.artbible.info/large/lastman_kruisiging.jpg @@ -47827,6 +47896,10 @@ var $$IMU_EXPORT$$; // doesn't work for all: // https://img-s3.onedio.com/id-5bbd9ebdf526d1a1133f9132/rev-0/raw/s-30c00c91f2295a4c3a2047c0fb4ff312905aa11e.jpg // https://img-s2.onedio.com/id-57347c8f555365205339b2b0/rev-0/w-635/f-jpg-gif-webp-webm-mp4/s-b82ef0d1ffaa9f45602df3969ab5bbabce0e2b6f.gif + // https://img-s3.onedio.com/id-585a889e06c369b8113badfd/rev-0/w-300/h-150/f-jpg/s-f960f9e49e60b5f39b3f64eca875f88654c8f622.jpg + // https://img-3.onedio.com/img/585a889e06c369b8113badfd.jpg -- 404, jpeg, JPG, png, gif don't work, -2 and -1 don't work either + // other: + // https://srv-cdn.onedio.com/twitter/avatar/DuniaGuluzada/original return src .replace(/:\/\/[^/]*\/id-([0-9a-f]+)\/.*?(\.[^/.]*)(?:[?#].*)?$/, "://img-3.onedio.com/img/$1$2") .replace(/\/img\/+(?:[0-9]+\/+bound\/+)?[0-9]*r[0-9]\/+/, "/img/"); @@ -58400,6 +58473,12 @@ var $$IMU_EXPORT$$; } } + if (domain === "nmbimg.fastmirror.org") { + // https://nmbimg.fastmirror.org/thumb/2020-05-06/5eb2c36e37ea0.jpg + // https://nmbimg.fastmirror.org/image/2020-05-06/5eb2c36e37ea0.jpg + return src.replace(/\/thumb\/+([0-9]{4}-[0-9]{2}-[0-9]{2}\/+[0-9a-f]+\.)/, "/image/$1"); + } + @@ -60321,6 +60400,22 @@ var $$IMU_EXPORT$$; }; } + if (host_domain_nosub === "modelmayhem.com") { + return { + element_ok: function(el) { + var current = el; + while ((current = current.parentElement)) { + // https://www.modelmayhem.com/portfolio/pic/45372959 + if (current.tagName === "DIV" && current.id === "viewpic") { + return true; + } + } + + return "default"; + } + }; + } + return null; } @@ -60529,6 +60624,15 @@ var $$IMU_EXPORT$$; return; var cache_endhref = fillobj(endhref, currentobj); + + if (!cache_endhref || !cache_endhref.can_cache) { + if (_nir_debug_) { + console_log("do_cache: skipping cache because cache_endhref.can_cache == false"); + } + + return; + } + currenthref = get_currenthref(cache_endhref); if (!currenthref) return;
7
diff --git a/webpack.config.js b/webpack.config.js @@ -168,8 +168,8 @@ const popupConfig = Object.assign({}, getBaseConfig(), { const setupConfig = Object.assign({}, getBaseConfig(), { entry: { index: path.resolve(SRC_SETUP, "./index.js"), - vendor: [...REACT_PACKAGES, "dropbox", "dropbox-fs", "webdav", "buttercup"], - buttercup: ["@buttercup/ui", "@buttercup/channel-queue"] + vendor: [...REACT_PACKAGES, "dropbox", "webdav", "buttercup"], + buttercup: ["@buttercup/ui", "@buttercup/channel-queue", "@buttercup/dropbox-client"] }, output: {
2
diff --git a/public/viewjs/choreform.js b/public/viewjs/choreform.js @@ -166,11 +166,13 @@ $('.input-group-chore-period-type').on('change keyup', function(e) else if (periodType === 'daily') { $('#chore-schedule-info').text(__n(periodInterval, "This means the next execution of this chore is scheduled at the same time (based on the start date) every day", "This means the next execution of this chore is scheduled at the same time (based on the start date) every %s days")); + $("#period_days").val(1); } else if (periodType === 'weekly') { $('#chore-schedule-info').text(__n(periodInterval, "This means the next execution of this chore is scheduled every week on the selected weekdays", "This means the next execution of this chore is scheduled every %s weeks on the selected weekdays")); $("#period_config").val($(".period-type-weekly input:checkbox:checked").map(function() { return this.value; }).get().join(",")); + $("#period_days").val(1); } else if (periodType === 'monthly') { @@ -182,6 +184,7 @@ $('.input-group-chore-period-type').on('change keyup', function(e) else if (periodType === 'yearly') { $('#chore-schedule-info').text(__n(periodInterval, 'This means the next execution of this chore is scheduled every year on the same day (based on the start date)', 'This means the next execution of this chore is scheduled every %s years on the same day (based on the start date)')); + $("#period_days").val(1); } else if (periodType === 'adaptive') {
1
diff --git a/edit.js b/edit.js @@ -40,6 +40,7 @@ import {planet} from './planet.js'; import {Bot} from './bot.js'; import './atlaspack.js'; import {Sky} from './Sky.js'; +import {GuardianMesh} from './land.js'; import TinyQueue from './tinyqueue.js'; const apiHost = 'https://ipfs.exokit.org/ipfs'; @@ -1688,6 +1689,12 @@ physicsWorker = pw; skybox = new THREE.Mesh(sphere, material); scene.add(skybox); })(); +(() => { + const guardianMesh = GuardianMesh([[ + 0, 0, SUBPARCEL_SIZE, SUBPARCEL_SIZE, + ]], 0x42a5f5); + scene.add(guardianMesh); +})(); const _makeChunkMesh = (seedString, parcelSize, subparcelSize) => { const rng = alea(seedString);
0
diff --git a/example/src/examples/UserLocationChange.js b/example/src/examples/UserLocationChange.js @@ -62,12 +62,18 @@ class UserLocationChange extends React.Component { return ( <Page {...this.props}> <MapboxGL.MapView - zoomLevel={16} - showUserLocation={true} - onUserLocationUpdate={this.onUserLocationUpdate} - userTrackingMode={MapboxGL.UserTrackingModes.Follow} style={sheet.matchParent} + > + <MapboxGL.UserLocation + visible={true} + onUpdate={this.onUserLocationUpdate} + /> + <MapboxGL.Camera + zoomLevel={16} + followUserMode={'normal'} + followUserLocation /> + </MapboxGL.MapView> {this.renderLocationInfo()} </Page> );
3
diff --git a/token-metadata/0xf552b656022c218C26dAd43ad88881Fc04116F76/metadata.json b/token-metadata/0xf552b656022c218C26dAd43ad88881Fc04116F76/metadata.json "symbol": "MORK", "address": "0xf552b656022c218C26dAd43ad88881Fc04116F76", "decimals": 4, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/token-metadata/0xd4cA5c2AFf1eeFb0BeA9e9Eab16f88DB2990C183/metadata.json b/token-metadata/0xd4cA5c2AFf1eeFb0BeA9e9Eab16f88DB2990C183/metadata.json "symbol": "XRPC", "address": "0xd4cA5c2AFf1eeFb0BeA9e9Eab16f88DB2990C183", "decimals": 8, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/Views/tickets/partials/ticket_body.blade.php b/src/Views/tickets/partials/ticket_body.blade.php <div class="row"> <div class="col-md-6"> - <h4>Description</h4> + <div> + <b>Description</b> + </div> <p> {!! $ticket->html !!} </p> </div> <div class="col-md-6"> - <h4>Intervention</h4> + <div> + <b>Intervention</b> + </div> <p> {!! $ticket->intervention_html !!} </p> </div> </div>
7
diff --git a/.github/workflows/build-zips.yml b/.github/workflows/build-zips.yml -name: build-pr +name: build-zips on: push: @@ -61,7 +61,7 @@ jobs: deploy-to-wiki: runs-on: ubuntu-latest - needs: build-pr + needs: build-zips steps: - uses: actions/checkout@v2 with:
3
diff --git a/src/flagged/applyComplexClasses.js b/src/flagged/applyComplexClasses.js @@ -139,15 +139,11 @@ function mergeAdjacentRules(initialRule, rulesToInsert) { function makeExtractUtilityRules(css, config) { const utilityMap = buildUtilityMap(css) - const orderUtilityMap = _.fromPairs( - _.flatMap(_.toPairs(utilityMap), ([_utilityName, utilities]) => { - return utilities.map(utility => { - return [utility.index, utility] - }) - }) - ) - return function(utilityNames, rule) { - return _.flatMap(utilityNames, utilityName => { + + return function extractUtilityRules(utilityNames, rule) { + const combined = [] + + utilityNames.forEach(utilityName => { if (utilityMap[utilityName] === undefined) { // Look for prefixed utility in case the user has goofed const prefixedUtility = prefixSelector(config.prefix, `.${utilityName}`).slice(1) @@ -163,10 +159,11 @@ function makeExtractUtilityRules(css, config) { { word: utilityName } ) } - return utilityMap[utilityName].map(({ index }) => index) + + combined.push(...utilityMap[utilityName]) }) - .sort((a, b) => a - b) - .map(i => orderUtilityMap[i]) + + return combined.sort((a, b) => a.index - b.index) } }
2