code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/lib/util/fonts/getTextByFontProperties.js b/lib/util/fonts/getTextByFontProperties.js @@ -206,15 +206,14 @@ function getMemoizedElementStyleResolver(fontPropRules, availableWeights) { if (Object.keys(predicatePermutation).length === 0) { return; } - var recursiveTruePredicates = Object.assign({}, truePredicates, predicatePermutation); - var recursiveFalsePredicates = Object.assign({}, falsePredicates, predicatePermutation); - if (declaration.incomingMedia.every(function (incomingMedia) { return recursiveTruePredicates[incomingMedia]; })) { + var truePredicatesForThisPermutation = Object.assign({}, truePredicates, predicatePermutation); + if (declaration.incomingMedia.every(function (incomingMedia) { return truePredicatesForThisPermutation[incomingMedia]; })) { Array.prototype.push.apply( multipliedHypotheticalValues, hypotheticalValues.map(function (hypotheticalValue) { return { value: hypotheticalValue.value, - truePredicates: recursiveTruePredicates, + truePredicates: truePredicatesForThisPermutation, falsePredicates: falsePredicates }; }) @@ -222,7 +221,7 @@ function getMemoizedElementStyleResolver(fontPropRules, availableWeights) { } Array.prototype.push.apply( multipliedHypotheticalValues, - traceProp(prop, i + 1, truePredicates, recursiveFalsePredicates) + traceProp(prop, i + 1, truePredicates, Object.assign({}, falsePredicates, predicatePermutation)) ); }); return multipliedHypotheticalValues;
10
diff --git a/commands/id.js b/commands/id.js @@ -23,9 +23,10 @@ command.execute = async (message, args, database, bot) => { let user,[name,discrim] = fullname.split('#'); if (discrim) { user = bot.users.cache.find(u => u.username === name && u.discriminator === discrim); - } - else { + if (!user) { user = bot.users.cache.find(u => u.username.toLowerCase() === name.toLowerCase() && u.discriminator === discrim); } + } else { user = bot.users.cache.find(u => u.username === name); + if (!user) {user = bot.users.cache.find(u => u.username.toLowerCase() === name.toLowerCase());} } if (!user) { response = `The user ${fullname} was not found!`;
8
diff --git a/src/encoded/schemas/award.json b/src/encoded/schemas/award.json "ENCODE2", "ENCODE2-Mouse", "ENCODE3", + "ENCODE4", "GGR", "Roadmap", "modENCODE",
0
diff --git a/js/models/LocalSettings.js b/js/models/LocalSettings.js @@ -19,7 +19,7 @@ export default class extends Model { windowControlStyle: remote.process.platform === 'darwin' ? 'mac' : 'win', showAdvancedVisualEffects: true, saveTransactionMetadata: true, - defaultTransactionFee: 'PRIORITY', + defaultTransactionFee: 'NORMAL', language: 'en-US', listingsGridViewType: 'grid', bitcoinUnit: 'BTC',
12
diff --git a/lib/node_modules/@stdlib/string/format/lib/main.js b/lib/node_modules/@stdlib/string/format/lib/main.js @@ -94,7 +94,7 @@ function format( str ) { token.padZeros = false; break; case '0': - token.padZeros = !flags.includes( '-' ); // NOTE: We use built-in `Array.prototype.includes` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies. + token.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies. break; case '#': token.alternate = true;
14
diff --git a/src/components/Text.js b/src/components/Text.js @@ -78,6 +78,8 @@ const textStyles = { }; const markdownStyles = { + // "u" - underline is listed in react-native-easy-markdown + // but doesn't exist in the markdown spec so should be rendered bold u: { fontWeight: "bold" }
0
diff --git a/test/jasmine/tests/click_test.js b/test/jasmine/tests/click_test.js @@ -3,6 +3,7 @@ var Lib = require('@src/lib'); var Drawing = require('@src/components/drawing'); var DBLCLICKDELAY = require('@src/plots/cartesian/constants').DBLCLICKDELAY; +var d3 = require('d3'); var createGraphDiv = require('../assets/create_graph_div'); var destroyGraphDiv = require('../assets/destroy_graph_div'); var mouseEvent = require('../assets/mouse_event'); @@ -809,3 +810,48 @@ describe('Test click interactions:', function() { }); }); }); + +describe('dragbox', function() { + + afterEach(destroyGraphDiv); + + it('should scale subplot and inverse scale scatter points', function(done) { + var mock = Lib.extendDeep({}, require('@mocks/bar_line.json')); + + function assertScale(node, x, y) { + var scale = Drawing.getScale(node); + expect(scale.x).toBeCloseTo(x, 1); + expect(scale.y).toBeCloseTo(y, 1); + } + + Plotly.plot(createGraphDiv(), mock).then(function() { + var node = d3.select('rect.nedrag').node(); + var pos = getRectCenter(node); + + assertScale(d3.select('.plot').node(), 1, 1); + + d3.selectAll('.point').each(function() { + assertScale(this, 1, 1); + }); + + mouseEvent('mousemove', pos[0], pos[1]); + mouseEvent('mousedown', pos[0], pos[1]); + mouseEvent('mousemove', pos[0] + 50, pos[1]); + + setTimeout(function() { + assertScale(d3.select('.plot').node(), 1.14, 1); + + d3.select('.scatterlayer').selectAll('.point').each(function() { + assertScale(this, 0.87, 1); + }); + d3.select('.barlayer').selectAll('.point').each(function() { + assertScale(this, 1, 1); + }); + + mouseEvent('mouseup', pos[0] + 50, pos[1]); + done(); + }, DBLCLICKDELAY / 4); + }); + }); + +});
0
diff --git a/packages/openneuro-app/src/scripts/uploader/uploader.jsx b/packages/openneuro-app/src/scripts/uploader/uploader.jsx @@ -189,6 +189,10 @@ export class UploadClient extends React.Component { * @returns {File[]} - New list of files with a replaced dataset_description.json */ _editName(Name) { + if (!Name) { + // Return files if no name provided + return this.state.files + } // Merge in the new name for a new dataset_description object const description = { ...this.state.description,
1
diff --git a/src/scripts/fetchStatsFromGA.js b/src/scripts/fetchStatsFromGA.js @@ -391,11 +391,13 @@ async function main() { loadScript: { default: false, description: 'whether to store upsert script in db', + type: 'boolean', }, useContentGroup: { default: true, description: 'wheter to use ga:contentGroup1 as a dimension for web stats', + type: 'boolean', }, }) .help('help').argv;
12
diff --git a/js/webcomponents/bisweb_grapherelement.js b/js/webcomponents/bisweb_grapherelement.js @@ -201,8 +201,6 @@ class GrapherModule extends HTMLElement { let footer = graphWindow.getContent().find('.modal-footer'); $(footer).empty(); - console.log('footer', footer, $(footer).find('.btn')); - let bbar = bis_webutil.createbuttonbar({ 'css' : 'width: 80%;'}); //settings button should be attached next to close button @@ -605,7 +603,6 @@ class GrapherModule extends HTMLElement { let self = this; function addItemToDropdown(key, dropdownMenu, optionalCharts) { - console.log('optional charts', optionalCharts, 'key', key); let button; if (optionalCharts.includes(key)) { button = $(`<a class='dropdown-item bisweb-optional' style='visibility: hidden' href='#'>${key}<br></a>`);
2
diff --git a/server/logger.js b/server/logger.js @@ -3,22 +3,21 @@ Meteor.startup(() => { require('winston-zulip'); const fs = require('fs'); - //remove default logger - Winston.remove(Winston.transports.Console); - - const loggerEnable = process.env.LOGGER_ENABLE || false; - console.log('here1'); - console.log(loggerEnable); if (loggerEnable) { - console.log('here2'); + + Winston.log('info', 'logger is enable'); const loggers = process.env.LOGGERS.split(',') || 'console'; + Winston.log('info', `Loggers selected : ${ process.env.LOGGERS }, if empty default is console`); if (loggers.includes('console')) { Winston.add(Winston.transports.Console, { json: true, timestamp: true, }); + } else { + //remove default logger + Winston.remove(Winston.transports.Console); } if (loggers.includes('file')) { @@ -45,15 +44,23 @@ Meteor.startup(() => { const loggerZulipTo = process.env.LOGGER_ZULIP_TO || 'logs'; const loggerZulipSubject = process.env.LOGGER_ZULIP_SUBJECT || 'wekan'; - Winston.add(Winston.transports.Zulip, { + const zulipConfig = { zulipUsername: loggerZulipUsername, zulipApikey: loggerZulipApikey, zulipRealm: loggerZulipRealm, zulipTo: loggerZulipTo, zulipSubject: loggerZulipSubject, - }); + }; + + Winston.add(Winston.transports.Zulip, zulipConfig); + + Winston.log('info', `zulipconfig ${zulipConfig}`); } + } else { + //remove default logger + Winston.remove(Winston.transports.Console); } + Winston.log('info', 'Logger is completly instanciate'); });
14
diff --git a/token-metadata/0xB62132e35a6c13ee1EE0f84dC5d40bad8d815206/metadata.json b/token-metadata/0xB62132e35a6c13ee1EE0f84dC5d40bad8d815206/metadata.json "symbol": "NEXO", "address": "0xB62132e35a6c13ee1EE0f84dC5d40bad8d815206", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/js/bootstrap-select.js b/js/bootstrap-select.js setOptionStatus: function () { var that = this, - $selectOptions = this.$element.find('option'); + selectOptions = this.$element[0].options; that.noScroll = false; if (that.selectpicker.view.visibleElements && that.selectpicker.view.visibleElements.length) { for (var i = 0; i < that.selectpicker.view.visibleElements.length; i++) { var index = that.selectpicker.current.map.originalIndex[i + that.selectpicker.view.position0], // faster than $(li).data('originalIndex') - option = $selectOptions[index]; + option = selectOptions[index]; if (option) { var liIndex = this.selectpicker.main.map.newIndex[index], if (!this.multiple) return; if (typeof status === 'undefined') status = true; - var $selectOptions = this.$element.find('option'), + var element = this.$element[0], + selectOptions = element.options, previousSelected = 0, currentSelected = 0, - prevValue = getSelectValues(this.$element[0]); + prevValue = getSelectValues(element); - this.$element[0].classList.add('bs-select-hidden'); + element.classList.add('bs-select-hidden'); - for (var i = 0; i < this.selectpicker.current.elements.length; i++) { + for (var i = 0, len = this.selectpicker.current.elements.length; i < len; i++) { var liData = this.selectpicker.current.data[i], index = this.selectpicker.current.map.originalIndex[i], // faster than $(li).data('originalIndex') - option = $selectOptions[index]; + option = selectOptions[index]; if (option && !option.disabled && liData.type !== 'divider') { if (option.selected) previousSelected++; option.selected = status; - if (option.selected) currentSelected++; + if (status) currentSelected++; } } - this.$element[0].classList.remove('bs-select-hidden'); + element.classList.remove('bs-select-hidden'); if (previousSelected === currentSelected) return;
4
diff --git a/src/context/index.js b/src/context/index.js @@ -43,7 +43,7 @@ export default async function(config) { }); const clientCredentials = await authClient.clientCredentialsGrant({ - audience: `https://${config.AUTH0_DOMAIN}/api/v2/` + audience: config.AUTH0_AUDIENCE ?? `https://${config.AUTH0_DOMAIN}/api/v2/` }); accessToken = clientCredentials.access_token; }
11
diff --git a/README.md b/README.md @@ -352,6 +352,7 @@ You are able to use environment variables to customize identity params in event | SLS_COGNITO_IDENTITY_ID | event.requestContext.identity.cognitoIdentityId | | SLS_CALLER | event.requestContext.identity.caller | | SLS_API_KEY | event.requestContext.identity.apiKey | +| SLS_API_KEY_ID | event.requestContext.identity.apiKeyId | | SLS_COGNITO_AUTHENTICATION_TYPE | event.requestContext.identity.cognitoAuthenticationType | | SLS_COGNITO_AUTHENTICATION_PROVIDER | event.requestContext.identity.cognitoAuthenticationProvider |
0
diff --git a/src/request_list.js b/src/request_list.js @@ -34,12 +34,10 @@ export const SOURCES_PERSISTENCE_KEY = 'REQUEST_LIST_SOURCES'; * the crawling can continue where it left off. The automated persisting is launched upon receiving the `persistState` * event that is periodically emitted by {@link events|Apify.events}. * - * The internal state is closely tied to the provided sources (URLs) to validate it's position in the list - * after a migration or restart. Therefore, if the sources change, the state will become corrupted and - * `RequestList` will raise an exception. This typically happens when using a live list of URLs downloaded - * from the internet as sources. Either from some service's API, or using the `requestsFromUrl` option. - * If that's your case, please use the `persistSourcesKey` option in conjunction with `persistStateKey`, - * it will persist the initial sources to the default key-value store and load them after restart, + * The internal state is closely tied to the provided sources (URLs). If the sources change on actor restart, the state will become corrupted and + * `RequestList` will raise an exception. This typically happens when the sources is a list of URLs downloaded from the web. + * In such case, use the `persistSourcesKey` option in conjunction with `persistStateKey`, + * to make the `RequestList` store the initial sources to the default key-value store and load them after restart, * which will prevent any issues that a live list of URLs might cause. * * **Example usage:** @@ -55,6 +53,9 @@ export const SOURCES_PERSISTENCE_KEY = 'REQUEST_LIST_SOURCES'; * // Note that all URLs must start with http:// or https:// * { requestsFromUrl: 'http://www.example.com/my-url-list.txt', userData: { isFromUrl: true } }, * ], + * + * // Ensure both the sources and crawling state of the request list is persisted, + * // so that on actor restart, the crawling will continue where it left off * persistStateKey: 'my-state', * persistSourcesKey: 'my-sources' * }); @@ -94,14 +95,22 @@ export const SOURCES_PERSISTENCE_KEY = 'REQUEST_LIST_SOURCES'; * ] * ``` * @param {String} [options.persistStateKey] - * Identifies the key in the default key-value store under which the `RequestList` persists its - * current state. State represents a position of the last scraped request in the list. - * If this is set then `RequestList`persists the state in regular intervals - * to key value store and loads the state from there in case it is restarted due to an error or system reboot. + * Identifies the key in the default key-value store under which `RequestList` periodically stores its + * state (i.e. which URLs were crawled and which not). + * If the actor is restarted, `RequestList` will read the state + * and continue where it left off. + * + * If `persistStateKey` is not set, `RequestList` will always start from the beginning, + * and all the source URLs will be crawled again. * @param {String} [options.persistSourcesKey] * Identifies the key in the default key-value store under which the `RequestList` persists its - * initial sources. If this is set then `RequestList`persists all of its sources - * to key value store at initialization and loads them from there in case it is restarted due to an error or system reboot. + * sources (i.e. the lists of URLs) during the {@link RequestList#initialize} call. + * This is necessary if `persistStateKey` is set and the source URLs might potentially change, + * to ensure consistency of the source URLs and state object. However, it comes with some storage and performance overheads. + * + * If `persistSourcesKey` is not set, {@link RequestList#initialize} will always fetch the sources + * from their origin, check that they are consistent with the restored state (if any) + * and throw an error if they are not. * @param {Object} [options.state] * The state object that the `RequestList` will be initialized from. * It is in the form as returned by `RequestList.getState()`, such as follows:
7
diff --git a/src/client/js/components/Admin/UserGroupDetail/UserGroupUserFormByInput.jsx b/src/client/js/components/Admin/UserGroupDetail/UserGroupUserFormByInput.jsx @@ -16,6 +16,7 @@ class UserGroupUserFormByInput extends React.Component { super(props); this.state = { + keyword: '', inputUser: '', applicableUsers: [], isLoading: false, @@ -54,7 +55,7 @@ class UserGroupUserFormByInput extends React.Component { async searhApplicableUsers() { try { - const users = await this.props.userGroupDetailContainer.fetchApplicableUsers(this.state.inputUser); + const users = await this.props.userGroupDetailContainer.fetchApplicableUsers(this.state.keyword); this.setState({ applicableUsers: users, isLoading: false }); } catch (err) { @@ -76,7 +77,7 @@ class UserGroupUserFormByInput extends React.Component { return; } - this.setState({ isLoading: true }); + this.setState({ keyword, isLoading: true }); this.searhApplicableUsersDebounce(); }
12
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/search.js b/packages/node_modules/@node-red/editor-client/src/js/ui/search.js @@ -125,6 +125,14 @@ RED.search = (function() { for (i=0;i<Math.min(results.length,25);i++) { searchResults.editableList('addItem',results[i]) } + if (results.length > 25) { + searchResults.editableList('addItem', { + more: { + results: results, + start: 25 + } + }) + } } else { searchResults.editableList('addItem',{}); } @@ -186,11 +194,30 @@ RED.search = (function() { evt.preventDefault(); } else if (evt.keyCode === 13) { // Enter + children = searchResults.children(); + if ($(children[selected]).hasClass("red-ui-search-more")) { + var object = $(children[selected]).find(".red-ui-editableList-item-content").data('data'); + if (object) { + searchResults.editableList('removeItem',object); + for (i=object.more.start;i<Math.min(results.length,object.more.start+25);i++) { + searchResults.editableList('addItem',results[i]) + } + if (results.length > object.more.start+25) { + searchResults.editableList('addItem', { + more: { + results: results, + start: object.more.start+25 + } + }) + } + } + } else { if (results.length > 0) { reveal(results[Math.max(0,selected)].node); } } } + } }); searchInput.i18n(); @@ -199,12 +226,32 @@ RED.search = (function() { addButton: false, addItem: function(container,i,object) { var node = object.node; - if (node === undefined) { - $('<div>',{class:"red-ui-search-empty"}).text(RED._('search.empty')).appendTo(container); + var div; + if (object.more) { + container.parent().addClass("red-ui-search-more") + div = $('<a>',{href:'#',class:"red-ui-search-result red-ui-search-empty"}).appendTo(container); + div.text(RED._("palette.editor.more",{count:object.more.results.length-object.more.start})); + div.on("click", function(evt) { + evt.preventDefault(); + searchResults.editableList('removeItem',object); + for (i=object.more.start;i<Math.min(results.length,object.more.start+25);i++) { + searchResults.editableList('addItem',results[i]) + } + if (results.length > object.more.start+25) { + searchResults.editableList('addItem', { + more: { + results: results, + start: object.more.start+25 + } + }) + } + }); + } else if (node === undefined) { + $('<div>',{class:"red-ui-search-empty"}).text(RED._('search.empty')).appendTo(container); } else { var def = node._def; - var div = $('<a>',{href:'#',class:"red-ui-search-result"}).appendTo(container); + div = $('<a>',{href:'#',class:"red-ui-search-result"}).appendTo(container); var nodeDiv = $('<div>',{class:"red-ui-search-result-node"}).appendTo(div); var colour = RED.utils.getNodeColor(node.type,def);
11
diff --git a/web/kiri/index.html b/web/kiri/index.html <!-- selected device and print profiles --> <div id="selected" class="control"> <span id="selected-device">???</span> - <span>&nbsp;&nbsp;|&nbsp;&nbsp;</span> + <span>&nbsp;&nbsp;:&nbsp;&nbsp;</span> <span id="selected-process">???</span> </div> <!-- all modal dialogs -->
14
diff --git a/src/createAuthScheme.js b/src/createAuthScheme.js @@ -47,6 +47,8 @@ module.exports = function createAuthScheme(authFun, authorizerOptions, funName, if (authorizerOptions.type === 'request') { event = { type: 'REQUEST', + path: request.path, + httpMethod: request.method.toUpperCase(), headers: request.headers, pathParameters: utils.nullIfEmpty(pathParams), queryStringParameters: utils.nullIfEmpty(request.query),
0
diff --git a/examples/launcher/src/components/Engine.jsx b/examples/launcher/src/components/Engine.jsx @@ -187,7 +187,7 @@ class Engine extends React.Component { const url = urlInput.value; window.postMessage({ - method: 'reload', + method: 'open', url, d: null, });
13
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md @@ -35,7 +35,7 @@ For example: <!-- This is a checklist for PR authors & reviewers. Please make sure to complete all tasks and check them off once you do, or else Expensify has the right not to merge your PR! --> -#### Contributor (PR Author) Checklist +#### PR Author Checklist - [ ] I linked the correct issue in the `### Fixed Issues` section above - [ ] I wrote clear testing steps that cover the changes made in this PR - [ ] I added steps for local testing in the `Tests` section @@ -85,7 +85,7 @@ This is a checklist for PR authors & reviewers. Please make sure to complete all <details> <summary><h4>PR Reviewer Checklist</h4> -The Contributor+ will copy/paste it into a new comment and complete it after the author checklist is completed +The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed </summary> - [ ] I have verified the author checklist is complete (all boxes are checked off).
10
diff --git a/instancing.js b/instancing.js @@ -49,84 +49,110 @@ const _getBoundingSize = boundingType => { } }; -export class FreeListSlot { - constructor(start, count, used) { - // array-relative indexing, not item-relative - // start++ implies attribute.array[start++] - this.start = start; - this.count = count; - this.used = used; - } - alloc(size) { - if (size < this.count) { - this.used = true; - const newSlot = new FreeListSlot(this.start + size, this.count - size, false); - this.count = size; - return [ - this, - newSlot, - ]; - } else if (size === this.count) { - this.used = true; - return [this]; +// get the closes power of 2 that fits the given size +const _getClosestPowerOf2 = size => { + return Math.ceil(Math.log2(size)); +}; + +// align a memory address +const _align = (addr, n) => { + const r = addr % n; + return r === 0 ? addr : addr + (n - r); +}; + +// circular index buffer +const maxSlotEntries = 4096; +class FreeListArray { + constructor(slotSize, parent) { + this.slotSize = slotSize; + this.parent = parent; + + this.startIndex = 0; + this.endIndex = 0; + this.entries = new Int32Array(maxSlotEntries); + this.allocatedEntries = 0; + } + alloc() { + if (this.allocatedEntries < maxSlotEntries) { + if (this.startIndex === this.endIndex) { + this.entries[this.endIndex] = this.parent.allocIndex(this.slotSize); + this.endIndex = (this.endIndex + 1) % maxSlotEntries; + } + const index = this.entries[this.startIndex]; + this.startIndex = (this.startIndex + 1) % maxSlotEntries; + this.allocatedEntries++; + return index; } else { - throw new Error('could not allocate from self: ' + size + ' : ' + this.count); + throw new Error('out of slots to allocate'); } } - free() { - this.used = false; - return [this]; + free(index) { + this.entries[this.endIndex] = index; + this.endIndex = (this.endIndex + 1) % maxSlotEntries; + this.allocatedEntries--; } } - export class FreeList { - constructor(size) { - this.slots = [ - new FreeListSlot(0, size, false), - ]; - } - findFirstFreeSlotIndexWithSize(size) { - for (let i = 0; i < this.slots.length; i++) { - const slot = this.slots[i]; - if (!slot.used && slot.count >= size) { - return i; - } + constructor(size, alignment = 1) { + this.freeStart = 0; + this.freeEnd = size; + this.alignment = alignment; + + this.slots = new Map(); // Map<slotSize, FreeListArray> + this.slotSizes = new Map(); // Map<index, slotSize> + } + allocIndex(slotSize) { + const allocSize = 1 << slotSize; + let newFreeStart = this.freeStart + allocSize; + newFreeStart = _align(newFreeStart, this.alignment); + if (newFreeStart <= this.freeEnd) { + const index = this.freeStart; + this.freeStart = newFreeStart; + return index; + } else { + throw new Error('out of memory to allocate to slot'); } - return -1; } alloc(size) { if (size > 0) { - const index = this.findFirstFreeSlotIndexWithSize(size); - if (index !== -1) { - const slot = this.slots[index]; - const replacementArray = slot.alloc(size); - this.slots.splice.apply(this.slots, [index, 1].concat(replacementArray)); - return replacementArray[0]; - } else { - throw new Error('out of memory'); - } + const slotSize = _getClosestPowerOf2(size); + let slot = this.slots.get(slotSize); + if (slot === undefined) { + slot = new FreeListArray(slotSize, this); + this.slots.set(slotSize, slot); + } + const index = slot.alloc(); + this.slotSizes.set(index, slotSize); + + const entry = { + start: index, + count: size, + }; + return entry; } else { - throw new Error('alloc size must be > 0'); + debugger; + return { + start: 0, + count: 0, + }; } } - free(slot) { - const index = this.slots.indexOf(slot); - if (index !== -1) { - const replacementArray = slot.free(); - this.slots.splice.apply(this.slots, [index, 1].concat(replacementArray)); - this.#mergeAdjacentSlots(); + free(entry) { + const {start: index} = entry; + if (index >= 0) { + const slotSize = this.slotSizes.get(index); + if (slotSize !== undefined) { + const slot = this.slots.get(slotSize); + if (slot !== undefined) { + slot.free(index); } else { - throw new Error('invalid free'); - } + throw new Error('invalid slot'); } - #mergeAdjacentSlots() { - for (let i = this.slots.length - 2; i >= 0; i--) { - const slot = this.slots[i]; - const nextSlot = this.slots[i + 1]; - if (!slot.used && !nextSlot.used) { - slot.count += nextSlot.count; - this.slots.splice(i + 1, 1); + } else { + throw new Error('invalid index'); } + } else { + // nothing } } }
0
diff --git a/packages/config/lib/postcss-necsst.js b/packages/config/lib/postcss-necsst.js var postcss = require('postcss'); var autoprefixer = require('autoprefixer'); var isSupported = require('caniuse-api').isSupported; +var camelize = require('camelize'); var features = [ ['css-variables', 'postcss-custom-properties'], @@ -36,11 +37,16 @@ module.exports = postcss.plugin('postcss-necsst', function (options) { if (!conditions.length || conditions.find(function (condition) { return !isSupported(condition, options.browsers); })) { - processor.use(require(feature)()); + processor.use(require(feature)( + options[camelize(feature.replace(/^postcss-/, ''))] + )); } }); processor.use( - autoprefixer(options.browsers ? { browsers: options.browsers } : {}) + autoprefixer(Object.assign( + options.browsers ? { browsers: options.browsers } : {}, + options.autoprefixer + )) ); return processor; });
7
diff --git a/articles/quickstart/spa/aurelia/01-login.md b/articles/quickstart/spa/aurelia/01-login.md @@ -32,7 +32,7 @@ ${snippet(meta.snippets.setup)} We also set the `isAuthenticated` property to false to start with, but this value will be changed later on to reflect the user's authentication status. -## 2. Set Up the Login and Logout Methods +## 3. Set Up the Login and Logout Methods The `login` and `logout` methods will be bound to button clicks in the template. @@ -50,21 +50,7 @@ ${snippet(meta.snippets.logout)} __Note:__ There are multiple ways of implementing login. The example above displays the Lock Widget. However you may implement your own login UI by changing the line `<script src="${lock_url}"></script>` to `<script src="${auth0js_url}"></script>`. -## 3. Make Secure Calls to an API - -To make secure calls to an API, attach the user's JWT as an `Authorization` header to the HTTP request. This is done in the `RequestInit` object as the second argument to the `fetch` call. - -${snippet(meta.snippets.http)} - -## 4. Configure All HTTP Calls to be Secure - -If you wish to attach the user's JWT as an `Authorization` header on all HTTP calls, you can configure the `HttpClient` to do so. - -${snippet(meta.snippets.configurehttp)} - -You can then remove the `RequestInit` object (the second argument of `fetch`) from individual HTTP calls. - -## 5. Optional: Decode the User's JWT to Check Expiry +## 4. Optional: Decode the User's JWT to Check Expiry Checking whether the user's JWT has expired is useful for conditionally showing or hiding elements and limiting access to certain routes. This can be done with the `jwt-decode` package and a simple function. First, install the package. @@ -78,7 +64,7 @@ With this method in place, we can now call it in the constructor so that the use ${snippet(meta.snippets.constructorexpiry)} -## 6. Check Whether a Route Can Be Activated +## 5. Check Whether a Route Can Be Activated Aurelia's `canActivate` method can be used to check whether a route can be navigated to. If the user's JWT has expired, we don't want them to be able to navigate to private routes.
2
diff --git a/src/discord/MemberWrapper.js b/src/discord/MemberWrapper.js import GuildConfig from '../config/GuildConfig.js'; import util from '../util.js'; -import {EmbedBuilder, RESTJSONErrorCodes} from 'discord.js'; +import {EmbedBuilder, Guild, RESTJSONErrorCodes} from 'discord.js'; import {formatTime, parseTime} from '../util/timeutils'; import Database from '../bot/Database.js'; +import GuildWrapper from './GuildWrapper.js'; export default class MemberWrapper { @@ -28,11 +29,11 @@ export default class MemberWrapper { /** * @param {User} user - * @param {GuildWrapper} guild + * @param {GuildWrapper|import('discord.js').Guild} guild */ constructor(user, guild) { this.user = user; - this.guild = guild; + this.guild = guild instanceof Guild ? new GuildWrapper(guild) : guild; } /**
11
diff --git a/rss/translator/Article.js b/rss/translator/Article.js @@ -43,7 +43,7 @@ function escapeRegExp (str) { } function regexReplace (string, searchOptions, replacement) { - const flags = searchOptions.flags ? searchOptions.flags : 'gi' + const flags = searchOptions.flags try { const matchIndex = searchOptions.match !== undefined ? parseInt(searchOptions.match, 10) : undefined const groupNum = searchOptions.group !== undefined ? parseInt(searchOptions.group, 10) : undefined @@ -313,7 +313,7 @@ module.exports = function Article (rawArticle, guildRss, rssName) { } // Regex-defined custom placeholders - const validRegexPlaceholder = ['title', 'description', 'summary'] + const validRegexPlaceholder = ['title', 'description', 'summary', 'author'] const regexPlaceholders = {} // Each key is a validRegexPlaceholder, and their values are an object of named placeholders with the modified content for (var b in validRegexPlaceholder) { const type = validRegexPlaceholder[b]
11
diff --git a/src/diagrams/git/gitGraphRenderer.js b/src/diagrams/git/gitGraphRenderer.js @@ -15,7 +15,7 @@ const commitType = { CHERRY_PICK: 4, }; -const THEME_SIZE = 8; +const THEME_COLOR_LIMIT = 8; let branchPos = {}; let commitPos = {}; @@ -122,7 +122,7 @@ const drawCommits = (svg, commits, modifyGraph) => { 'commit ' + commit.id + ' commit-highlight' + - (branchPos[commit.branch].index % THEME_SIZE) + + (branchPos[commit.branch].index % THEME_COLOR_LIMIT) + ' ' + typeClass + '-outer' @@ -138,7 +138,7 @@ const drawCommits = (svg, commits, modifyGraph) => { 'commit ' + commit.id + ' commit' + - (branchPos[commit.branch].index % THEME_SIZE) + + (branchPos[commit.branch].index % THEME_COLOR_LIMIT) + ' ' + typeClass + '-inner' @@ -187,7 +187,7 @@ const drawCommits = (svg, commits, modifyGraph) => { circle.attr('r', commit.type === commitType.MERGE ? 9 : 10); circle.attr( 'class', - 'commit ' + commit.id + ' commit' + (branchPos[commit.branch].index % THEME_SIZE) + 'commit ' + commit.id + ' commit' + (branchPos[commit.branch].index % THEME_COLOR_LIMIT) ); if (commit.type === commitType.MERGE) { const circle2 = gBullets.append('circle'); @@ -201,7 +201,7 @@ const drawCommits = (svg, commits, modifyGraph) => { ' ' + commit.id + ' commit' + - (branchPos[commit.branch].index % THEME_SIZE) + (branchPos[commit.branch].index % THEME_COLOR_LIMIT) ); } if (commit.type === commitType.REVERSE) { @@ -215,7 +215,7 @@ const drawCommits = (svg, commits, modifyGraph) => { ' ' + commit.id + ' commit' + - (branchPos[commit.branch].index % THEME_SIZE) + (branchPos[commit.branch].index % THEME_COLOR_LIMIT) ); } } @@ -445,7 +445,7 @@ const drawArrow = (svg, commit1, commit2, allCommits) => { const arrow = svg .append('path') .attr('d', lineDef) - .attr('class', 'arrow arrow' + (colorClassNum % THEME_SIZE)); + .attr('class', 'arrow arrow' + (colorClassNum % THEME_COLOR_LIMIT)); }; const drawArrows = (svg, commits) => { @@ -475,7 +475,7 @@ const drawBranches = (svg, branches) => { const gitGraphConfig = getConfig().gitGraph; const g = svg.append('g'); branches.forEach((branch, index) => { - let adjustIndexForTheme = index % THEME_SIZE; + let adjustIndexForTheme = index % THEME_COLOR_LIMIT; const pos = branchPos[branch.name].pos; const line = g.append('line');
10
diff --git a/__tests__/components/__snapshots__/NetworkSwitch.test.js.snap b/__tests__/components/__snapshots__/NetworkSwitch.test.js.snap @@ -24,6 +24,7 @@ exports[`NetworkSwitch renders without crashing 1`] = ` id="network" > <SelectInput + activeStyles="networkSwitchActive" customChangeEvent={true} getItemValue={[Function]} getSearchResults={[Function]} @@ -41,6 +42,8 @@ exports[`NetworkSwitch renders without crashing 1`] = ` readOnly={true} renderAfter={[Function]} renderItem={[Function]} + textInputClassName="networkSwitchTextInput" + textInputContainerClassName="networkSwitchTextInputContainer" value="MainNet" > <clickOutside(Dropdown) @@ -62,11 +65,13 @@ exports[`NetworkSwitch renders without crashing 1`] = ` className="anchor" > <TextInput - className="input " + activeStyles="networkSwitchActive" + className="input networkSwitchTextInputContainer" onChange={[Function]} onFocus={[Function]} readOnly={true} renderAfter={[Function]} + textInputClassName="networkSwitchTextInput" type="text" value="MainNet" > @@ -74,10 +79,10 @@ exports[`NetworkSwitch renders without crashing 1`] = ` className="textInputContainer" > <div - className="textInput input " + className="textInput input networkSwitchTextInputContainer" > <input - className="input " + className="input networkSwitchTextInput" onBlur={[Function]} onChange={[Function]} onFocus={[Function]}
3
diff --git a/apps/realworld/views/user/SignUpComponent.mjs b/apps/realworld/views/user/SignUpComponent.mjs @@ -120,7 +120,7 @@ class SignUpComponent extends Component { Object.entries(value || {}).forEach(([key, value]) => { list.cn.push({ tag : 'li', - html: key + ' ' + value[0] // max showing 1 error per field (use value.join(', ') otherwise + html: key + ' ' + value.join(' and ') }); });
7
diff --git a/src/main/resources/public/js/src/newWidgets/widgets/testCasesGrowthTrendChart/TestCasesGrowthTrendChartView.js b/src/main/resources/public/js/src/newWidgets/widgets/testCasesGrowthTrendChart/TestCasesGrowthTrendChartView.js @@ -80,10 +80,10 @@ define(function (require) { _.each(data, function (item) { if (+item.values.delta < 0) { isPositive.push(false); - offsets.push(+item.values.statistics$executionCounter$total); + offsets.push(+item.values.statistics$executions$total); } else { isPositive.push(true); - offsets.push(item.values.statistics$executionCounter$total - item.values.delta); + offsets.push(+item.values.statistics$executions$total - +item.values.delta); } bars.push(Math.abs(+item.values.delta)); if (self.isTimeLine) { @@ -102,7 +102,7 @@ define(function (require) { data: { columns: [offsets, bars], type: 'bar', - order: 'DESC', + order: null, onclick: function (d, element) { if (d.id === 'bar') { if (self.isTimeLine) {
1
diff --git a/assets/js/components/setup/SetupUsingProxyViewOnly.js b/assets/js/components/setup/SetupUsingProxyViewOnly.js * WordPress dependencies */ import { __ } from '@wordpress/i18n'; -import { useCallback, Fragment } from '@wordpress/element'; +import { + useCallback, + createInterpolateElement, + Fragment, +} from '@wordpress/element'; /** * Internal dependencies @@ -30,6 +34,7 @@ import OptIn from '../OptIn'; import Header from '../Header'; import Button from '../Button'; import Layout from '../layout/Layout'; +import Link from '../Link'; import HelpMenu from '../help/HelpMenu'; import SideKickSVG from '../../../svg/graphics/view-only-setup-sidekick.svg'; import { SHARED_DASHBOARD_SPLASH_ITEM_KEY } from './constants'; @@ -102,7 +107,26 @@ export default function SetupUsingProxyViewOnly() { 'google-site-kit' ) } </h1> - + <p className="googlesitekit-setup__description"> + { createInterpolateElement( + __( + "An administrator has granted you access to view this site's Dashboard to view stats from all shared Google services. <a>Learn more</a>", + 'google-site-kit' + ), + { + a: ( + <Link + aria-label={ __( + 'Learn more about dashboard sharing', + 'google-site-kit' + ) } + href="https://sitekit.withgoogle.com/documentation/using-site-kit/dashboard-sharing/" + external + /> + ), + } + ) } + </p> <p className="googlesitekit-setup__description"> { __( 'Get insights about how people find and use your site, how to improve and monetize your content, directly in your WordPress dashboard',
7
diff --git a/lib/node_modules/@stdlib/math/base/special/sqrt1pm1/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/sqrt1pm1/docs/repl.txt {{alias}}( x ) - Computes the principal square root of one plus `x` and subtract one. + Computes the principal square root of `1+x` minus one. - This function is more accurate than a call to `{{alias:@stdlib/math/base/special/sqrt}}( 1 + x) - 1` for small `x`. + This function is more accurate than the obvious approach for small `x`. Parameters ---------- Returns ------- y: number - Square root of 1+x minus one. + Square root of `1+x` minus one. Examples -------- - > var v = {{alias}}( 3.0 ) + > var y = {{alias}}( 3.0 ) 1.0 - > v = {{alias}}( 0.5 ) + > y = {{alias}}( 0.5 ) ~0.225 - > v = {{alias}}( 0.02 ) + > y = {{alias}}( 0.02 ) ~0.01 - > v = {{alias}}( -0.5 ) + > y = {{alias}}( -0.5 ) ~-0.292 - > v = {{alias}}( -1.1 ) + > y = {{alias}}( -1.1 ) NaN - > v = {{alias}}( NaN ) + > y = {{alias}}( NaN ) NaN See Also
10
diff --git a/generators/server/templates/src/main/resources/config/application-dev.yml.ejs b/generators/server/templates/src/main/resources/config/application-dev.yml.ejs @@ -157,28 +157,6 @@ spring: database-platform: io.github.jhipster.domain.util.FixedH2Dialect <%_ } _%> show-sql: true - properties: - hibernate.id.new_generator_mappings: true - hibernate.connection.provider_disables_autocommit: true - hibernate.cache.use_second_level_cache: <% if (enableHibernateCache) { %>true<% } else { %>false<% } %> - hibernate.cache.use_query_cache: false - hibernate.generate_statistics: false - <%_ if (enableHibernateCache) { _%> - <%_ if (cacheProvider === 'hazelcast') { _%> - hibernate.cache.region.factory_class: com.hazelcast.hibernate.HazelcastCacheRegionFactory - hibernate.cache.hazelcast.instance_name: <%= baseName %> - <%_ } else if (cacheProvider === 'infinispan') { _%> - hibernate.cache.infinispan.statistics: false - hibernate.cache.use_minimal_puts: true - hibernate.cache.infinispan.entity.expiration.lifespan: 3600000 - hibernate.cache.infinispan.entity.memory.size: 1000 - hibernate.cache.infinispan.jgroups_cfg: default-configs/default-jgroups-tcp.xml - <%_ } _%> - <%_ if (cacheProvider === 'hazelcast') { _%> - hibernate.cache.use_minimal_puts: true - hibernate.cache.hazelcast.use_lite_member: true - <%_ } _%> - <%_ } _%> <%_ } _%> <%_ if (databaseType === 'mongodb' || databaseType === 'cassandra' || searchEngine === 'elasticsearch') { _%> data:
2
diff --git a/assets/js/modules/analytics/components/setup/SetupFormGA4.js b/assets/js/modules/analytics/components/setup/SetupFormGA4.js @@ -34,7 +34,7 @@ import Data from 'googlesitekit-data'; import { CORE_FORMS } from '../../../../googlesitekit/datastore/forms/constants'; import { STORE_NAME, PROPERTY_CREATE, FORM_SETUP } from '../../datastore/constants'; import StoreErrorNotices from '../../../../components/StoreErrorNotices'; -import PropertySelect from '../../../analytics-4/components/common/PropertySelect'; +import GA4PropertySelect from '../../../analytics-4/components/common/PropertySelect'; import AccountSelect from '../common/AccountSelect'; import GA4PropertyNotice from '../common/GA4PropertyNotice'; const { useSelect, useDispatch } = Data; @@ -62,7 +62,7 @@ export default function SetupFormGA4() { <div className="googlesitekit-setup-module__inputs"> <AccountSelect /> - <PropertySelect /> + <GA4PropertySelect /> </div> <GA4PropertyNotice
10
diff --git a/src/components/AttachmentPicker/index.native.js b/src/components/AttachmentPicker/index.native.js -import React, {createRef} from 'react'; import PropTypes from 'prop-types'; import AttachmentPickerNative from '../../libs/AttachmentPickerNative'; @@ -6,22 +5,13 @@ const propTypes = { children: PropTypes.func.isRequired, }; -class AttachmentPicker extends React.Component { - constructor(props) { - super(props); - this.onChangeCallback = createRef(); - } - - render() { - return this.props.children({ +const AttachmentPicker = ({children}) => children({ show: (callback) => { AttachmentPickerNative.show((response) => { callback(AttachmentPickerNative.getDataForUpload(response)); }); }, }); - } -} AttachmentPicker.propTypes = propTypes; export default AttachmentPicker;
4
diff --git a/src/plots/cartesian/layout_attributes.js b/src/plots/cartesian/layout_attributes.js @@ -287,14 +287,14 @@ module.exports = { 'Determines a pattern on the time line that generates breaks.', 'If *day of week* - Sunday-based weekday as a decimal number [0, 6].', 'If *time of day* - hour (24-hour clock) as a decimal number [0, 23].', - 'These are the same directive as in `tickformat`, see', - 'https://github.com/d3/d3-time-format#locale_format', + '*day of week* and *time of day* are similar to *%w* and *%H* directives', + 'applied in `tickformat`, see https://github.com/d3/d3-time-format#locale_format', 'for more info.', 'Examples:', - '- { pattern: \'day of week\', bounds: [6, 0], operation: \'[]\' }', + '- { pattern: \'day of week\', bounds: [6, 0] }', ' breaks from Saturday to Monday (i.e. skips the weekends).', - '- { pattern: \'time of day\', bounds: [17, 8] }', - ' breaks from 5pm to 8am (i.e. skips non-work hours).' + '- { pattern: \'time of day\', bounds: [16, 8] }', + ' breaks from 4pm to 8am (i.e. skips non-work hours).' ].join(' ') },
3
diff --git a/app/shared/reducers/app.js b/app/shared/reducers/app.js @@ -26,11 +26,17 @@ const contractBasedFeatures = [ const initialState = { constants: {}, download: undefined, + init: false, features: contractBasedFeatures }; export default function app(state = initialState, action) { switch (action.type) { + case types.APP_INIT: { + return Object.assign({}, state, { + init: true + }); + } case types.APP_UPDATE_DOWNLOAD_PROGRESS: { return Object.assign({}, state, { download: action.payload
12
diff --git a/devices/tuya.js b/devices/tuya.js @@ -1253,10 +1253,10 @@ module.exports = [ fromZigbee: [tuya.fz.datapoints], toZigbee: [tuya.tz.datapoints], configure: tuya.configureMagicPacket, - exposes: [e.temperature(), e.humidity(), tuya.exposes.temperatureUnit(), e.battery(), tuya.exposes.batteryState()], + exposes: [e.temperature(), e.soil_moisture(), tuya.exposes.temperatureUnit(), e.battery(), tuya.exposes.batteryState()], meta: { tuyaDatapoints: [ - [3, 'humidity', tuya.valueConverter.raw], + [3, 'soil_moisture', tuya.valueConverter.raw], [5, 'temperature', tuya.valueConverter.raw], [9, 'temperature_unit', tuya.valueConverter.temperatureUnit], [14, 'battery_state', tuya.valueConverter.batteryState],
10
diff --git a/src/components/nodes/sequenceFlow/sequenceFlow.vue b/src/components/nodes/sequenceFlow/sequenceFlow.vue @@ -129,13 +129,6 @@ export default { this.shape = new joint.shapes.standard.Link(); this.createLabel(); - this.shape.connector('rounded'); - this.shape.attr('line', { - strokeLinejoin:'round', - strokeWidth: 2, - strokeDasharray: 10000, - }); - const conditionExpression = this.node.definition.conditionExpression; if (conditionExpression) { this.label = conditionExpression.body;
2
diff --git a/core/api-server/api/graphql/schemas/pipeline-schema.js b/core/api-server/api/graphql/schemas/pipeline-schema.js @@ -3,14 +3,20 @@ const { gql } = require('apollo-server'); const pipelineTypeDefs = gql` type Cron { enabled: Boolean pattern: String } -type Triggers { cron: Cron } +type Triggers { cron: Cron ,pipelines: [String]} type ConcurrentPipelines { amount: Int rejectOnFailure: Boolean } +type Webhooks { progress:String, result:String } + +type Streaming { flows:Object, defaultFlow:String } + type Options { batchTolerance: Int ttl: Int progressVerbosityLevel: String - concurrentPipelines: ConcurrentPipelines } + concurrentPipelines: ConcurrentPipelines + activeTtl: Int +} type Metrics { tensorboard: Boolean } @@ -36,6 +42,8 @@ type Pipeline { modified: Float experimentName: String triggers: Triggers options: Options + webhooks: Webhooks + streaming: Streaming nodes: [PipelineNodes ] flowInput: FlowInput }
0
diff --git a/.storybook/config.js b/.storybook/config.js @@ -30,21 +30,11 @@ import '../assets/sass/adminbar.scss'; import '../assets/sass/admin.scss'; import './assets/sass/wp-admin.scss'; import { bootstrapFetchMocks } from './fetch-mocks'; -import { disableFeature } from '../stories/utils/features'; // TODO: Remove when legacy data API is removed. import { googlesitekit as dashboardData } from '../.storybook/data/wp-admin-admin.php-page=googlesitekit-dashboard-googlesitekit'; bootstrapFetchMocks(); -const resetFeatures = () => { - disableFeature( 'widgets.adminBar' ); - disableFeature( 'widgets.dashboard' ); - disableFeature( 'widgets.pageDashboard' ); - disableFeature( 'widgets.wpDashboard' ); - disableFeature( 'userInput' ); - disableFeature( 'storeErrorNotifications' ); - disableFeature( 'serviceSetupV2' ); -}; const resetGlobals = () => { global._googlesitekitLegacyData = cloneDeep( dashboardData ); global._googlesitekitLegacyData.admin.assetsRoot = ''; @@ -77,7 +67,6 @@ resetGlobals(); addDecorator( ( story ) => { resetGlobals(); - resetFeatures(); return story(); } );
2
diff --git a/src/components/nodes/dataObject/dataObject.vue b/src/components/nodes/dataObject/dataObject.vue <template> <crown-config - :highlighted="highlighted" - :paper="paper" + v-bind="$attrs" :graph="graph" :shape="shape" :node="node" - :nodeRegistry="nodeRegistry" - :moddle="moddle" - :collaboration="collaboration" - :process-node="processNode" - :plane-elements="planeElements" - :is-rendering="isRendering" - :dropdown-data="dropdownData" v-on="$listeners" /> </template> @@ -23,21 +15,13 @@ import hideLabelOnDrag from '@/mixins/hideLabelOnDrag'; import { shapes } from 'jointjs'; export default { + inheritAttrs: false, components: { CrownConfig, }, props: [ 'graph', 'node', - 'id', - 'highlighted', - 'nodeRegistry', - 'moddle', - 'paper', - 'collaboration', - 'processNode', - 'planeElements', - 'isRendering', ], mixins: [highlightConfig, hideLabelOnDrag], data() {
2
diff --git a/token-metadata/0xC4C2614E694cF534D407Ee49F8E44D125E4681c4/metadata.json b/token-metadata/0xC4C2614E694cF534D407Ee49F8E44D125E4681c4/metadata.json "symbol": "CHAIN", "address": "0xC4C2614E694cF534D407Ee49F8E44D125E4681c4", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/test/tests.html b/test/tests.html <link rel="stylesheet" type="text/css" href="/rich-text-editor.css"/> <script src="/jquery/dist/jquery.js"></script> <script src="/baconjs/dist/Bacon.js"></script> - <script src="/bacon.jquery/dist/bacon.jquery.js"></script> <script src="/mathquill/build/mathquill.js"></script> <link rel="icon" href="/rich-text-editor-favicon.ico" type="image/x-icon"/> <link rel="shortcut icon" href="/rich-text-editor-favicon.ico" type="image/x-icon"/>
2
diff --git a/tests/utils/TestDataUtils.js b/tests/utils/TestDataUtils.js @@ -14,7 +14,7 @@ class TestDataUtils { } case 'bitcoin': { - return this.getBitcoinAddress() + return this.getRandomBitcoinAddress() } default: @@ -35,9 +35,11 @@ class TestDataUtils { * Generate bitcoin address. * @returns {*} */ - getBitcoinAddress () { + getRandomBitcoinAddress () { const keyPair = bitcoin.ECPair.makeRandom() - const { address } = bitcoin.payments.p2pkh({ pubkey: keyPair.publicKey }) + const { address } = bitcoin.payments.p2pkh({ + pubkey: keyPair.publicKey + }) return address } }
10
diff --git a/app/shell-window/ui/navbar/bookmark-menu.js b/app/shell-window/ui/navbar/bookmark-menu.js @@ -201,8 +201,8 @@ export class BookmarkMenuNavbarBtn { this.values.tags = tagsToString(page.bookmark.tags) this.values.notes = page.bookmark.notes this.values.pinned = page.bookmark.pinned - this.values.saved = page.siteInfo.userSettings.isSaved - this.values.seeding = this.values.saved && page.siteInfo.userSettings.networked + this.values.saved = page.siteInfo && page.siteInfo.userSettings.isSaved + this.values.seeding = this.values.saved && page.siteInfo && page.siteInfo.userSettings.networked } this.updateActives()
9
diff --git a/README.md b/README.md This repository contains all Auth0 documentation content (including Quickstarts). -* If you are looking for the application that *hosts* the Docs content, see [auth0-docs](https://github.com/auth0/auth0-docs) -* If you would like to modify the Management API v2 API docs, see [api2](https://github.com/auth0/api2) +**Please review the [Contributing Guidelines](CONTRIBUTING.md) before sending a PR or opening an issue.** -Both repositories require team access. +* If you are looking for the application that *hosts* the Docs content, see [auth0-docs](https://github.com/auth0/auth0-docs). +* If you would like to modify the Management API v2 API docs, they are generated from the [api2](https://github.com/auth0/api2) repository. -**Please review the [Contributing Guidelines](CONTRIBUTING.md) before sending a PR or opening an issue.** +Both of the above repositories require team access. + +## Editing Docs Content -## Running the Docs Site +* You can edit Docs content by simply using the GitHub web editor and editing a file. This is best suited for typos and small changes. +* You can also pull down the `/docs` repo to your computer via Git and edit files in your local editor, before pushing a new branch (or a branch to your own fork of the project). You can then easily come to GitHub.com and start a PR. We will be able to review the changes in a Heroku test application prior to merging. +* Lastly, you can [run and test the docs site locally](https://github.com/auth0/auth0-docs/blob/master/README.md) (access available to Auth0 employees only). This option is best suited for repeat contributors or for complex contributions. You gain the benefit of locally testing and viewing your changed or added pages, navigation, and config, but you also gain the complexity of dealing with the local docs app, getting it set up, and keeping it updated. -You can [run and test the docs site locally](https://github.com/auth0/auth0-docs/blob/master/README.md) (access available to Auth0 employees only). You can also edit Docs content by committing changes to the `/docs` folder in the **auth0-docs** repository. +Regardless of which option you use, again, please review any relevant sections of the [Contributing Guidelines](CONTRIBUTING.md) before sending a PR. ## Issue Reporting -If you found a bug or have a feature request, please report it in this repository's [issues](https://github.com/auth0/docs/issues) section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues. +If you found a bug or inaccuracy in the documentation content, please report it in this repository's [issues](https://github.com/auth0/docs/issues) section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues. ## Author
3
diff --git a/token-metadata/0xaE697F994Fc5eBC000F8e22EbFfeE04612f98A0d/metadata.json b/token-metadata/0xaE697F994Fc5eBC000F8e22EbFfeE04612f98A0d/metadata.json "symbol": "LGCY", "address": "0xaE697F994Fc5eBC000F8e22EbFfeE04612f98A0d", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/new-client/src/plugins/documenthandler/documentWindow/TextArea.js b/new-client/src/plugins/documenthandler/documentWindow/TextArea.js @@ -41,7 +41,7 @@ class TextArea extends React.PureComponent { }; getAttributeValue = (attributes, dataAttributeToFind) => { - return attributes.getNamedItem(dataAttributeToFind).value; + return attributes.getNamedItem(dataAttributeToFind)?.value; }; renderDivider = dividerColor => {
9
diff --git a/scripts/editor/icons/readme.mdx b/scripts/editor/icons/readme.mdx # Editor icons +We createad a bunch of custom icons to make everything look better and to enhance the editing experience. +These icons are designed to be used in different places inside the Block Editor. -We are using a bunch of custom made icon to make everything look better and have a better UX. -These icons are designed to be used inside Block Editor and in different places. +## Block icons +These icons are used to easily identify a block. They can be seen in the block picker, in the block toolbar and in the options panel. -## Components Icons +To use them, find the `icon` key in the block manifest, and to its `src` key assign a value that represents the icon's name. +For example: +```json +{ + "blockName": "my-block", + ... + "icon": { + "src": "es-example" + }, +} +``` -Icons are used in the sidebar by the native core components. Generally, they are used in combination with the component label. +## UI icons +These icons are used inside the user interface of the editor, mostly besides labels in the Options panel. -## Illustration Icons +To use them, import them from eighshift-frontend-libs: +```js +import { icons } from '@eightshift/frontend-libs/scripts/editor'; +``` -Icons used in the modal helper component to provide a better understanding of what each custom functionality does like wrapper, columns, etc. +Then you can use them, for example in an `Icon` component from WP core: +```jsx +<Icon icon={icons.color} /> +``` -## BlockIcons - -Icons are used as a block icon to provide a visual reference for the editors. +## Helper illustrations +These icons are used in the modal helper component to provide a better understanding of what each custom functionality does, for example in the Wrapper, Columns, etc.
7
diff --git a/articles/libraries/lock-ios/v2/index.md b/articles/libraries/lock-ios/v2/index.md @@ -217,6 +217,34 @@ Lock You can see the complete set of behavior configuration options to alter the way Lock works for your app in the [Configuration Guide](/libraries/lock-ios/v2/configuration). ::: +## Password Manager Support + +By default, password manager support using [1Password](https://1password.com/) is enabled for database connections. 1Password support will still require the user to have the 1Password app installed for the option to be visible in the login and signup screens. You can disable 1Password support using the enabled property of the passwordManager. + +```swift +.withOptions { + $0.passwordManager.enabled = false +} +``` + +By default the `appIdentifier` will be set to the app's bundle identifier and the `displayName` will be set to the app's display name. You can customize these as follows: + +```swift +.withOptions { + $0.passwordManager.appIdentifier = "www.myapp.com" + $0.passwordManager.displayName = "My App" +} +``` + +You will need to add the following to your app's `info.plist`: + +``` +<key>LSApplicationQueriesSchemes</key> +<array> + <string>org-appextension-feature-password-management</string> +</array> +``` + ## Logging Lock provides options to easily turn on and off logging capabilities, as well as adjust other logging related settings. The example below displays logging turned on, but take a look at the [Behavior Configuration Options](/lock-ios/v2/configuration) page for more information about logs in Lock for iOS v2.
0
diff --git a/src/styles/interactive-video.css b/src/styles/interactive-video.css background: unset; border-color: #a2a2a2; color: #fefefe; - border-right: 1px dashed #a2a2a2; + border-right: 0.042em dashed #a2a2a2; -webkit-transition: background-color 0.2s; -moz-transition: background-color 0.2s; transition: background-color 0.2s;
0
diff --git a/bin/oref0-setup.sh b/bin/oref0-setup.sh @@ -328,7 +328,7 @@ if [[ -z "$DIR" || -z "$serial" ]]; then echocolor "Ok, $CGM it is." echo if [[ ${CGM,,} =~ "g4-go" ]]; then - prompt_and_validate BLE_SERIAL "If your G4 has Share, what is your G4 Share Serial Number? (i.e. SM12345678)" validate_g4share_serial + prompt_and_validate BLE_SERIAL "If your G4 has Share, what is your G4 Share Serial Number? (i.e. SM12345678)" validate_g4share_serial "" BLE_SERIAL=$REPLY echo "$BLE_SERIAL? Got it." echo
11
diff --git a/src/components/markdownEditor/styles/editorToolbarStyles.ts b/src/components/markdownEditor/styles/editorToolbarStyles.ts +import { Platform } from 'react-native'; import EStyleSheet from 'react-native-extended-stylesheet'; import { getBottomSpace } from 'react-native-iphone-x-helper'; @@ -8,6 +9,11 @@ const _dropShadow = { height: -3, }, backgroundColor: '$primaryBackgroundColor', + borderColor: '$primaryLightBackground', + borderTopWidth : Platform.select({ + android: 1, + ios: 0 + }) } export default EStyleSheet.create({
7
diff --git a/src/inner-slider.js b/src/inner-slider.js 'use strict'; import React from 'react'; +import ReactDOM from 'react-dom' import initialState from './initial-state'; import defaultProps from './default-props'; import createReactClass from 'create-react-class'; @@ -126,6 +127,7 @@ export class InnerSlider extends React.Component { this.adaptHeight(); } onWindowResized = () => { + if (!ReactDOM.findDOMNode(this.track)) return let spec = {listRef: this.list, trackRef: this.track, ...this.props, ...this.state} this.updateState(spec, true, () => { if (this.props.autoplay) this.autoPlay('update') @@ -319,6 +321,7 @@ export class InnerSlider extends React.Component { this.slideHandler(nextIndex); } + autoPlay = (playType) => { if (this.autoplayTimer) { console.warn("autoPlay is triggered more than once")
2
diff --git a/conferences/2018/android.json b/conferences/2018/android.json "country": "Korea" }, { - "name": "Mobile", + "name": "Mobile @Scale", "url": "https://atscaleconference.com/events/mobilescale-tel-aviv", "startDate": "2018-11-14", "endDate": "2018-11-14",
10
diff --git a/app/modules/claim.js b/app/modules/claim.js // @flow import { api, type Claims } from '@cityofzion/neon-js' -import { api as apiLatest } from '@cityofzion/neon-js-legacy-latest' +import { api as apiLatest, rpc } from '@cityofzion/neon-js-legacy-latest' import { api as n3Api, wallet as n3Wallet, @@ -31,7 +31,7 @@ import { getNode, getRPCEndpoint } from '../actions/nodeStorageActions' // Constants export const DISABLE_CLAIM = 'DISABLE_CLAIM' const POLL_ATTEMPTS = 30 -const POLL_FREQUENCY = 10000 +const POLL_FREQUENCY = 4000 // Actions export function disableClaim(disableClaimButton: boolean) { @@ -82,23 +82,18 @@ const updateClaimableAmount = async ({ throw new Error('Rejected by RPC server.') } - return response.result.response + return response } -const pollForUpdatedClaimableAmount = async ({ - net, - address, - claimableAmount, -}) => +const pollForUpdatedClaimableAmount = async ({ net, address, txid }) => poll( async () => { - const updatedClaimableAmount = await getClaimableAmount({ net, address }) - - if (toBigNumber(updatedClaimableAmount).eq(claimableAmount)) { - throw new Error('Waiting for updated claims took too long.') - } + // watch the sendAsset txid until it has been published + const client = new rpc.RPCClient('https://mainnet2.neo2.coz.io:443') + await client.getRawTransaction(txid) - return updatedClaimableAmount + // get the new claimable amount + return getClaimableAmount({ net, address }) }, { attempts: POLL_ATTEMPTS, frequency: POLL_FREQUENCY }, ) @@ -116,7 +111,7 @@ const getUpdatedClaimableAmount = async ({ if (toBigNumber(balance).eq(0)) { return claimableAmount } - await updateClaimableAmount({ + const { txid } = await updateClaimableAmount({ net, address, balance, @@ -124,7 +119,7 @@ const getUpdatedClaimableAmount = async ({ privateKey, signingFunction, }) - return pollForUpdatedClaimableAmount({ net, address, claimableAmount }) + return pollForUpdatedClaimableAmount({ net, address, txid }) } export const handleN3GasClaim = async ({
3
diff --git a/wwwroot/config.json b/wwwroot/config.json "text": "Disclaimer: This map must not be used for navigation or precise spatial analysis", "url": "http://google.com" }, + "enableGeojsonMvt": true, "experimentalFeatures": true, "feedbackUrl": "feedback", "globalDisclaimer": {
12
diff --git a/ios/PrideLondonApp.xcodeproj/project.pbxproj b/ios/PrideLondonApp.xcodeproj/project.pbxproj }; objectVersion = 46; objects = { + /* Begin PBXBuildFile section */ 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; remoteGlobalIDString = 3D7682761D8E76B80014119E; remoteInfo = SplashScreen; }; - D9DBCBAC204F08BB000E5CE2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 942CC624E7ED4161939675A2 /* AirMaps.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 11FA5C511C4A1296003AC2EE; - remoteInfo = AirMaps; - }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ 88788B71E6054B03A6B62D25 /* Poppins-BoldItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Poppins-BoldItalic.ttf"; path = "../assets/fonts/Poppins-BoldItalic.ttf"; sourceTree = "<group>"; }; 8C4E3E0A0D0C4E578B19C5B2 /* libz.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; 939F6855FDA045B6BECAB69F /* Roboto-MediumItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Roboto-MediumItalic.ttf"; path = "../assets/fonts/Roboto-MediumItalic.ttf"; sourceTree = "<group>"; }; - 942CC624E7ED4161939675A2 /* AirMaps.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = AirMaps.xcodeproj; path = "../node_modules/react-native-maps/lib/ios/AirMaps.xcodeproj"; sourceTree = "<group>"; }; 9A07DCBA3E154DB190496711 /* libRNReactNativeHapticFeedback.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNReactNativeHapticFeedback.a; sourceTree = "<group>"; }; AC984739B4624E9481CEE51E /* Poppins-Medium.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Poppins-Medium.ttf"; path = "../assets/fonts/Poppins-Medium.ttf"; sourceTree = "<group>"; }; ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; }; 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 686F40911AD148C6A00AD018 /* ReactNativeConfig.xcodeproj */, - 942CC624E7ED4161939675A2 /* AirMaps.xcodeproj */, F8C91E1E19B24BFD87EAF972 /* SplashScreen.xcodeproj */, 6428AA583D204A5785008825 /* Lottie.xcodeproj */, 791D0ECB203641F8BF34F4C7 /* LottieReactNative.xcodeproj */, name = Products; sourceTree = "<group>"; }; - D9DBCBA9204F08BB000E5CE2 /* Products */ = { - isa = PBXGroup; - children = ( - D9DBCBAD204F08BB000E5CE2 /* libAirMaps.a */, - ); - name = Products; - sourceTree = "<group>"; - }; EC73F4DC24074ED59F98D7C4 /* Resources */ = { isa = PBXGroup; children = ( productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; projectDirPath = ""; projectReferences = ( - { - ProductGroup = D9DBCBA9204F08BB000E5CE2 /* Products */; - ProjectRef = 942CC624E7ED4161939675A2 /* AirMaps.xcodeproj */; - }, { ProductGroup = 16ADAD8E20A073B6006CA650 /* Products */; ProjectRef = 2C3C38462ECD4655A9ABD826 /* BugsnagReactNative.xcodeproj */; remoteRef = D9D0E1382066DB7D00E28562 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - D9DBCBAD204F08BB000E5CE2 /* libAirMaps.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libAirMaps.a; - remoteRef = D9DBCBAC204F08BB000E5CE2 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */
2
diff --git a/io-manager.js b/io-manager.js @@ -278,6 +278,21 @@ ioManager.keydown = e => { if (_inputFocused() || e.repeat) { return; } + + if (e.which === 74) { + window.lol -= 0.01; + console.log(window.lol); + } else if (e.which === 75) { + window.lol += 0.01; + console.log(window.lol); + } else if (e.which === 78) { + window.lol2 += 0.01; + console.log(window.lol2); + } else if (e.which === 77) { + window.lol2 += 0.01; + console.log(window.lol2); + } + switch (e.which) { /* case 9: { // tab e.preventDefault();
0
diff --git a/src/resources/views/crud/filters/select2_ajax.blade.php b/src/resources/views/crud/filters/select2_ajax.blade.php <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ $filter->label }} <span class="caret"></span></a> <div class="dropdown-menu p-0 ajax-select"> <div class="form-group mb-0"> - <select id="filter_{{ $filter->key }}" name="filter_{{ $filter->name }}" data-filter-key="{{ $filter->key }}" class="form-control input-sm select2" data-filter-type="select2_ajax" data-filter-name="{{ $filter->name }}" placeholder="{{ $filter->placeholder }}"> + <select + id="filter_{{ $filter->key }}" + name="filter_{{ $filter->name }}" + data-filter-key="{{ $filter->key }}" + class="form-control input-sm select2" + data-filter-type="select2_ajax" + data-filter-name="{{ $filter->name }}" + placeholder="{{ $filter->placeholder }}" + data-select-key="{{ isset($filter->options['select_key']) ? $filter->options['select_key'] : 'id' }}" + data-select-attribute="{{ isset($filter->options['select_attribute']) ? $filter->options['select_attribute'] : 'name' }}" + filter-minimum-input-length="{{ isset($filter->options['minimum_input_length']) ? $filter->options['minimum_input_length'] : 2 }}" + filter-method="{{ isset($filter->options['method']) ? $filter->options['method'] : 'GET' }}" + filter-quiet-time= {{ isset($filter->options['quiet_time']) ? $filter->options['quiet_time'] : 500 }} + > @if (Request::get($filter->name)) <option value="{{ Request::get($filter->name) }}" selected="selected"> {{ Request::get($filter->name.'_text') ?? 'Previous selection' }} </option> @endif var filterName = $(this).attr('data-filter-name'); var filter_key = $(this).attr('data-filter-key'); + var selectAttribute = $(this).attr('data-select-attribute'); + var selectKey = $(this).attr('data-select-key'); $(this).select2({ theme: "bootstrap", - minimumInputLength: 2, + minimumInputLength: $(this).attr('filter-minimum-input-length'), allowClear: true, placeholder: $(this).attr('placeholder'), closeOnSelect: false, url: '{{ $filter->values }}', dataType: 'json', type: 'GET', - quietMillis: 50, - // data: function (term) { - // return { - // term: term - // }; - // }, + quietMillis: $(this).attr('filter-quiet-time'), + processResults: function (data) { + //it's a paginated result + if(Array.isArray(data.data)) { + if(data.data.length > 0) { + return { + results: $.map(data.data, function (item) { + return { + text: item[selectAttribute], + id: item[selectKey] + } + }) + }; + } + }else{ + //it's non-paginated result return { results: $.map(data, function (item, i) { return { } }) }; + } } } }).on('change', function (evt) {
11
diff --git a/lib/elastic_model/acts_as_elastic_model.rb b/lib/elastic_model/acts_as_elastic_model.rb @@ -111,36 +111,29 @@ module ActsAsElasticModel end end - def elastic_sync(options = {}) + def elastic_sync(start_id, end_id, options) + return if !start_id || !end_id || start_id >= end_id options[:batch_size] ||= defined?(self::DEFAULT_ES_BATCH_SIZE) ? self::DEFAULT_ES_BATCH_SIZE : 1000 - filter_scope = options.delete(:scope) - # this method will accept an existing scope - scope = (filter_scope && filter_scope.is_a?(ActiveRecord::Relation)) ? - filter_scope : self.all - # it also accepts an array of IDs to filter by - if filter_ids = options.delete(:ids) - filter_ids.compact! - if filter_ids.length > options[:batch_size] - # call again for each batch, then return - filter_ids.each_slice(options[:batch_size]) do |slice| - elastic_sync(options.merge(ids: slice)) - end - return - end - scope = scope.where(id: filter_ids) - end + batch_start_id = start_id + while batch_start_id <= end_id + Rails.logger.debug "[DEBUG] Processing from #{ batch_start_id }" + batch_end_id = batch_start_id + options[:batch_size] + if batch_end_id > end_id + 1 + batch_end_id = end_id + 1 + end + scope = self.where("id >= ? AND id < ?", batch_start_id, batch_end_id) if self.respond_to?(:load_for_index) scope = scope.load_for_index end - scope.find_in_batches(options) do |batch| + batch = scope.to_a prepare_for_index(batch) - Rails.logger.debug "[DEBUG] Processing from #{ batch.first.id }" results = elastic_search( sort: { id: :asc }, size: options[:batch_size], filters: [ - { terms: { id: batch.map(&:id) } } + { range: { id: { gte: batch_start_id } } }, + { range: { id: { lt: batch_end_id } } } ], source: ["id"] ).group_by{ |r| r.id.to_i } @@ -150,9 +143,44 @@ module ActsAsElasticModel Rails.logger.debug "[DEBUG] Deleting vestigial docs in ES: #{ ids_only_in_es }" elastic_delete!(where: { id: ids_only_in_es } ) end + batch_start_id = batch_end_id end end + def elastic_prune(start_id, end_id, options) + return if !start_id || !end_id || start_id >= end_id + options[:batch_size] ||= + defined?(self::DEFAULT_ES_BATCH_SIZE) ? self::DEFAULT_ES_BATCH_SIZE : 1000 + batch_start_id = start_id + while batch_start_id <= end_id + Rails.logger.debug "[DEBUG] Processing from #{ batch_start_id }" + batch_end_id = batch_start_id + options[:batch_size] + if batch_end_id > end_id + 1 + batch_end_id = end_id + 1 + end + scope = self.where("id >= ? AND id < ?", batch_start_id, batch_end_id) + batch_ids = scope.pluck(:id) + ids_only_in_es = elastic_search( + sort: { id: :asc }, + size: options[:batch_size], + filters: [ + { range: { id: { gte: batch_start_id } } }, + { range: { id: { lt: batch_end_id } } }, + { bool: { + must_not: { + terms: { id: batch_ids } + } + } } + ], + source: ["id"] + ).map(&:id) + unless ids_only_in_es.empty? + Rails.logger.debug "[DEBUG] Deleting vestigial docs in ES: #{ ids_only_in_es }" + elastic_delete!(where: { id: ids_only_in_es } ) + end + batch_start_id = batch_end_id + end + end def result_to_will_paginate_collection(result) try_and_try_again( PG::ConnectionBad, sleep_for: 20 ) do begin
7
diff --git a/src/prf.js b/src/prf.js @@ -182,8 +182,7 @@ D.db = !nodeRequire ? localStorage : (function DB() { // file-backed storage with API similar to that of localStorage const k = []; // keys const v = []; // values - const d = el.app.getPath('userData'); - const f = `${d}/prefs.json`; + const f = el.process.env.RIDE_PREFS || `${el.app.getPath('userData')}/prefs.json`; try { if (fs.existsSync(f)) { const h = JSON.parse(fs.readFileSync(f, 'utf8'));
11
diff --git a/assets/js/components/dashboard/DashboardApp.js b/assets/js/components/dashboard/DashboardApp.js @@ -27,7 +27,6 @@ import { Fragment } from '@wordpress/element'; import WidgetContextRenderer from '../../googlesitekit/widgets/components/WidgetContextRenderer'; import LegacyDashboardModule from './LegacyDashboardModule'; import DashboardHeader from './DashboardHeader'; -import DashboardFooter from './DashboardFooter'; import DashboardNotifications from './dashboard-notifications'; import Header from '../Header'; import DateRangeSelector from '../DateRangeSelector'; @@ -54,7 +53,6 @@ export default function DashboardApp() { slug="dashboard" className="googlesitekit-module-page googlesitekit-dashboard" Header={ DashboardHeader } - Footer={ DashboardFooter } /> ) } @@ -68,9 +66,6 @@ export default function DashboardApp() { <LegacyDashboardModule key={ 'googlesitekit-dashboard-module' } /> - <Cell size={ 12 }> - <DashboardFooter /> - </Cell> </Row> </Grid> </div>
2
diff --git a/ios/Podfile.lock b/ios/Podfile.lock @@ -547,15 +547,15 @@ PODS: - ReactCommon/turbomodule/core (0.70.4): - DoubleConversion - glog - - RCT-Folly (= 2021.06.28.00-v2) - - React-bridging (= 0.69.4) - - React-callinvoker (= 0.69.4) - - React-Core (= 0.69.4) - - React-cxxreact (= 0.69.4) - - React-jsi (= 0.69.4) - - React-logger (= 0.69.4) - - React-perflogger (= 0.69.4) - - RNCAsyncStorage (1.17.9): + - RCT-Folly (= 2021.07.22.00) + - React-bridging (= 0.70.4) + - React-callinvoker (= 0.70.4) + - React-Core (= 0.70.4) + - React-cxxreact (= 0.70.4) + - React-jsi (= 0.70.4) + - React-logger (= 0.70.4) + - React-perflogger (= 0.70.4) + - RNCAsyncStorage (1.17.10): - React-Core - RNCClipboard (1.5.1): - React-Core @@ -979,19 +979,19 @@ SPEC CHECKSUMS: react-native-render-html: 96c979fe7452a0a41559685d2f83b12b93edac8c react-native-safe-area-context: 9e40fb181dac02619414ba1294d6c2a807056ab9 react-native-webview: e771bc375f789ebfa02a26939a57dbc6fa897336 - React-perflogger: cb386fd44c97ec7f8199c04c12b22066b0f2e1e0 - React-RCTActionSheet: f803a85e46cf5b4066c2ac5e122447f918e9c6e5 - React-RCTAnimation: 19c80fa950ccce7f4db76a2a7f2cf79baae07fc7 - React-RCTBlob: f36ab97e2d515c36df14a1571e50056be80413d5 - React-RCTImage: 2c8f0a329a116248e82f8972ffe806e47c6d1cfa - React-RCTLinking: 670f0223075aff33be3b89714f1da4f5343fc4af - React-RCTNetwork: 09385b73f4ff1f46bd5d749540fb33f69a7e5908 - React-RCTSettings: 33b12d3ac7a1f2eba069ec7bd1b84345263b3bbe - React-RCTText: a1a3ea902403bd9ae4cf6f7960551dc1d25711b5 - React-RCTVibration: 9adb4a3cbb598d1bbd46a05256f445e4b8c70603 - React-runtimeexecutor: 61ee22a8cdf8b6bb2a7fb7b4ba2cc763e5285196 - ReactCommon: 8f67bd7e0a6afade0f20718f859dc8c2275f2e83 - RNCAsyncStorage: b2489b49e38c85e10ed45a888d13a2a4c7b32ea1 + React-perflogger: 5e41b01b35d97cc1b0ea177181eb33b5c77623b6 + React-RCTActionSheet: 48949f30b24200c82f3dd27847513be34e06a3ae + React-RCTAnimation: 96af42c97966fcd53ed9c31bee6f969c770312b6 + React-RCTBlob: 22aa326a2b34eea3299a2274ce93e102f8383ed9 + React-RCTImage: 1df0dbdb53609778f68830ccdd07ff3b40812837 + React-RCTLinking: eef4732d9102a10174115a727588d199711e376c + React-RCTNetwork: 18716f00568ec203df2192d35f4a74d1d9b00675 + React-RCTSettings: 1dc8a5e5272cea1bad2f8d9b4e6bac91b846749b + React-RCTText: 17652c6294903677fb3d754b5955ac293347782c + React-RCTVibration: 0e247407238d3bd6b29d922d7b5de0404359431b + React-runtimeexecutor: 5407e26b5aaafa9b01a08e33653255f8247e7c31 + ReactCommon: abf3605a56f98b91671d0d1327addc4ffb87af77 + RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca RNCClipboard: 41d8d918092ae8e676f18adada19104fa3e68495 RNCPicker: 0b65be85fe7954fbb2062ef079e3d1cde252d888 RNDateTimePicker: 7658208086d86d09e1627b5c34ba0cf237c60140 @@ -1003,14 +1003,14 @@ SPEC CHECKSUMS: RNGestureHandler: 920eb17f5b1e15dae6e5ed1904045f8f90e0b11e RNPermissions: dcdb7b99796bbeda6975a6e79ad519c41b251b1c RNReactNativeHapticFeedback: 1e3efeca9628ff9876ee7cdd9edec1b336913f8c - RNReanimated: 2cf7451318bb9cc430abeec8d67693f9cf4e039c + RNReanimated: 60e291d42c77752a0f6d6f358387bdf225a87c6e RNScreens: 4a1af06327774490d97342c00aee0c2bafb497b7 RNSVG: ecd661f380a07ba690c9c5929c475a44f432d674 SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 urbanairship-react-native: 7e2e9a84c541b1d04798e51f7f390a2d5806eac0 - Yoga: ff994563b2fd98c982ca58e8cd9db2cdaf4dda74 + Yoga: 1f02ef4ce4469aefc36167138441b27d988282b1 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a PODFILE CHECKSUM: 643092977a9e257478456ec4f261baefad505023
13
diff --git a/test/cases/resolving/data-uri/index.js b/test/cases/resolving/data-uri/index.js @@ -17,13 +17,13 @@ it("should import js module from base64 data-uri", function() { }); it("should require coffee module from base64 data-uri", function() { - const mod = require('coffee-loader!data:text/javascript;charset=utf-8;base64,bW9kdWxlLmV4cG9ydHMgPQogIG51bWJlcjogNDIKICBmbjogKCkgLT4gIkhlbGxvIHdvcmxkIg=='); + const mod = require('coffee-loader!Data:text/javascript;charset=utf-8;base64,bW9kdWxlLmV4cG9ydHMgPQogIG51bWJlcjogNDIKICBmbjogKCkgLT4gIkhlbGxvIHdvcmxkIg=='); expect(mod.number).toBe(42); expect(mod.fn()).toBe("Hello world"); }); it("should require json module from base64 data-uri", function() { - const mod = require('data:application/json;charset=utf-8;base64,ewogICJpdCI6ICJ3b3JrcyIsCiAgIm51bWJlciI6IDQyCn0K'); + const mod = require('DATA:application/json;charset=utf-8;base64,ewogICJpdCI6ICJ3b3JrcyIsCiAgIm51bWJlciI6IDQyCn0K'); expect(mod.it).toBe("works"); expect(mod.number).toBe(42); })
3
diff --git a/backend/lib/endpoints/feedback.js b/backend/lib/endpoints/feedback.js @@ -8,7 +8,7 @@ async function routes(app) { app.post("/", { schema: createFeedbackSchema }, async (req, reply) => { const { userId } = req.body; - let ip = "undefined"; + if (userId) { const userFeedback = await Feedback.find({ userId }); if (userFeedback[0]) { @@ -16,28 +16,14 @@ async function routes(app) { } } - if (req.ip !== null && typeof req.ip !== "undefined") { - ip = req.ip; - const feedbackFromIp = await Feedback.find({ ipAddress: ip }); - if (feedbackFromIp[0]) { - reply.conflict("Feedback already submitted with this IP address"); - } - } - - if (userId || ip !== "undefined") { return new Feedback({ ...req.body, - ipAddress: ip, + ipAddress: req.ip, }) .save() .then(() => { reply.code(201).send({ success: true }); }); - } - - return reply.internalServerError( - "Authenticated user or ip required to save feedback", - ); }); }
11
diff --git a/core/generator.js b/core/generator.js @@ -159,7 +159,7 @@ Blockly.Generator.prototype.allNestedComments = function(block) { /** * Generate code for the specified block (and attached blocks). - * The generator should be initialized before calling this function. + * The generator must be initialized before calling this function. * @param {Blockly.Block} block The block to generate code for. * @param {boolean=} opt_thisOnly True to generate code for only this statement. * @return {string|!Array} For statement blocks, the generated code.
3
diff --git a/services/datasources/lib/datasources/url/arcgis.rb b/services/datasources/lib/datasources/url/arcgis.rb @@ -452,7 +452,6 @@ module CartoDB begin body = ::JSON.parse(response.body) - success = true rescue JSON::ParserError begin # HACK: JSON spec does not cover Infinity
2
diff --git a/test/ringo/websocket_test.js b/test/ringo/websocket_test.js @@ -37,7 +37,7 @@ exports.testTextMessage = function() { }, true); if (!semaphore.tryWait(TIMEOUT)) { - assert.fail("web socket text timed out"); + assert.fail("web socket text timed out (async: " + isAsync + ")"); } assert.equal(received, message); }); @@ -60,7 +60,7 @@ exports.testBinaryMessage = function() { }, true); if (!semaphore.tryWait(TIMEOUT)) { - assert.fail("web socket binary timed out"); + assert.fail("web socket binary timed out (async: " + isAsync + ")"); } assert.isTrue(Arrays.equals(received, message)); });
7
diff --git a/webdriver-ts/package.json b/webdriver-ts/package.json "dependencies": { "axios": "^0.19.0", "cross-env": "5.2.1", - "chromedriver": "84.0.1", + "chromedriver": "76.0.1", "dot": "1.1.2", "jstat": "1.9.1", "lighthouse": "5.2.0",
13
diff --git a/articles/libraries/custom-signup.md b/articles/libraries/custom-signup.md @@ -13,7 +13,7 @@ Auth0 offers a [hosted login page](/hosted-pages/login) option that you can use ## Using Lock -Lock 10 supports [custom fields signup](/libraries/lock/v10/customization#additionalsignupfields-array-). +Lock supports [custom fields signup](/libraries/lock/customization#additionalsignupfields-array-). ![custom signup fields](/media/articles/libraries/lock/v10/signupcustom.png)
2
diff --git a/docs/core-tags.md b/docs/core-tags.md @@ -393,8 +393,8 @@ $ var personPromise = new Promise((resolve, reject) => { ``` Advanced implementation: -+ <await> tag signature - * Basic usage: <await(results from dataProvider)>...</await> ++ `<await>` tag signature + * Basic usage: `<await(results from dataProvider)>...</await>` * Optional attributes - client-reorder `boolean` - arg `expression` @@ -411,9 +411,9 @@ Advanced implementation: - scope `expression` - show-after `string` * Optional child tags - - <await-placeholder>Loading...</await-placeholder> - - <await-timeout>Request timed out</await-timeout> - - <await-error>Request errored</await-error> + - `<await-placeholder>Loading...</await-placeholder>` + - `<await-timeout>Request timed out</await-timeout>` + - `<await-error>Request errored</await-error>` ## Comments
4
diff --git a/src/resources/views/fields/upload_multiple.blade.php b/src/resources/views/fields/upload_multiple.blade.php @include('crud::inc.field_translatable_icon') {{-- Show the file name and a "Clear" button on EDIT form. --}} - @if (isset($field['value']) && count($field['value'])) + @if (isset($field['value'])) + @php + $values = json_decode($field['value'], true) ?? []; + @endphp + @if (count($values)) <div class="well well-sm file-preview-container"> - @foreach($field['value'] as $key => $file_path) + @foreach($values as $key => $file_path) <div class="file-preview"> <a target="_blank" href="{{ isset($field['disk'])?asset(\Storage::disk($field['disk'])->url($file_path)):asset($file_path) }}">{{ $file_path }}</a> <a id="{{ $field['name'] }}_{{ $key }}_clear_button" href="#" class="btn btn-default btn-xs pull-right file-clear-button" title="Clear file" data-filename="{{ $file_path }}"><i class="fa fa-remove"></i></a> </div> @endforeach </div> + @endif @endif {{-- Show the file picker on CREATE form. --}} <input name="{{ $field['name'] }}[]" type="hidden" value="">
3
diff --git a/packages/common/modules/i18n/index.native.ts b/packages/common/modules/i18n/index.native.ts @@ -11,7 +11,7 @@ const languageDetector = { async: true, // flags below detection to be async detect: async (callback: (lang: string) => string) => { const lng = await Expo.SecureStore.getItemAsync('i18nextLng'); - return callback(lng || (await (Expo as any).Localization.getCurrentLocaleAsync()).replace('_', '-')); + return callback(lng || (await (Expo as any).Localization.getLocalizationAsync()).locale.replace('_', '-')); }, init: () => {}, cacheUserLanguage: async (lng: string) => {
4
diff --git a/assets/js/modules/search-console/index.js b/assets/js/modules/search-console/index.js @@ -96,7 +96,7 @@ domReady( () => { component: DashboardPopularKeywordsWidget, width: Widgets.WIDGET_WIDTHS.HALF, priority: 1, - wrapWidget: false, + wrapWidget: true, }, [ AREA_DASHBOARD_POPULARITY,
12
diff --git a/__performance_tests__/todo.js b/__performance_tests__/todo.js @@ -160,6 +160,20 @@ describe("performance", () => { }) }) + measure("immer (proxy) - w/o autofreeze - with patch listener", () => { + setUseProxies(true) + setAutoFreeze(false) + produce( + frozenBazeState, + draft => { + for (let i = 0; i < MAX * MODIFY_FACTOR; i++) { + draft[i].done = true + } + }, + () => {} + ) + }) + measure("immer (es5) - without autofreeze", () => { setUseProxies(false) setAutoFreeze(false) @@ -179,4 +193,18 @@ describe("performance", () => { } }) }) + + measure("immer (es5) - w/o autofreeze - with patch listener", () => { + setUseProxies(false) + setAutoFreeze(false) + produce( + frozenBazeState, + draft => { + for (let i = 0; i < MAX * MODIFY_FACTOR; i++) { + draft[i].done = true + } + }, + () => {} + ) + }) })
0
diff --git a/src/cli/commands/web.start.js b/src/cli/commands/web.start.js @@ -44,10 +44,15 @@ module.exports = { } else { this.console.error(err.message, err); } + done(); }); - return server.start(args.options.sync).catch(e => { + server.on('destroy', () => done()); + server.on('stopped', () => done()); + + server.start(args.options.sync).catch(e => { this.console.error(e); + done(); }); },
14
diff --git a/source/delegate/migrations/1_initial_migration.js b/source/delegate/migrations/1_initial_migration.js @@ -7,6 +7,6 @@ module.exports = (deployer, network) => { const INDEXER_ADDRESS = '' const OWNER_ADDRESS = '' const TRADE_WALLET_ADDRESS = '' - await deployer.deploy(Delegate, SWAP_ADDRESS, INDEXER_ADDRESS, OWNER_ADDRESS, TRADE_WALLET_ADDRESS) + deployer.deploy(Delegate, SWAP_ADDRESS, INDEXER_ADDRESS, OWNER_ADDRESS, TRADE_WALLET_ADDRESS) } };
2
diff --git a/src/js/base/module/VideoDialog.js b/src/js/base/module/VideoDialog.js @@ -49,7 +49,7 @@ export default class VideoDialog { createVideoNode(url) { // video url patterns(youtube, instagram, vimeo, dailymotion, youku, mp4, ogg, webm) - const ytRegExp = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?$/; + const ytRegExp = /\/\/(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?$/; const ytRegExpForStart = /^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/; const ytMatch = url.match(ytRegExp);
11
diff --git a/physx.js b/physx.js @@ -1697,6 +1697,35 @@ const physxWorker = (() => { allocator.freeAll() } + w.createShapePhysics = (physics, buffer) => { + const allocator = new Allocator() + const buffer2 = allocator.alloc(Uint8Array, buffer.length) + buffer2.set(buffer) + + const shapeAddress = moduleInstance._createShapePhysics( + physics, + buffer2.byteOffset, + buffer2.byteLength, + 0, + ); + allocator.freeAll(); + return shapeAddress; + }; + w.createConvexShapePhysics = (physics, buffer) => { + const allocator = new Allocator() + const buffer2 = allocator.alloc(Uint8Array, buffer.length) + buffer2.set(buffer) + + const shapeAddress = moduleInstance._createConvexShapePhysics( + physics, + buffer2.byteOffset, + buffer2.byteLength, + 0, + ); + allocator.freeAll(); + return shapeAddress; + }; + w.getGeometryPhysics = (physics, id) => { const allocator = new Allocator() const positionsBuffer = allocator.alloc(Float32Array, 1024 * 1024 * 2)
0
diff --git a/token-metadata/0xf51EBf9a26DbC02B13F8B3a9110dac47a4d62D78/metadata.json b/token-metadata/0xf51EBf9a26DbC02B13F8B3a9110dac47a4d62D78/metadata.json "symbol": "APIX", "address": "0xf51EBf9a26DbC02B13F8B3a9110dac47a4d62D78", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/userscript.user.js b/userscript.user.js @@ -26437,6 +26437,12 @@ var $$IMU_EXPORT$$; // at edu.illinois.library.cantaloupe.resource.iiif.v2.ImageResource.doGet(ImageResource.java:62) // at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) + // https://gallica.bnf.fr/ark:/12148/bpt6k1510890t/f9.lowres + // https://gallica.bnf.fr/ark:/12148/bpt6k1510890t/f9.highres + newsrc = src.replace(/(\/ark:\/+[0-9]+\/+[^/]+\/+f[0-9])\.lowres(?:[?#].*)?$/, "$1.highres"); + if (newsrc !== src) + return newsrc; + // https://lakeimagesweb.artic.edu/iiif/2/08baefe5-1f78-bc4b-db7b-4f53d2edcc29/full/!800,800/0/default.jpg // https://lakeimagesweb.artic.edu/iiif/2/08baefe5-1f78-bc4b-db7b-4f53d2edcc29/full/full/0/default.jpg // http://gallica.bnf.fr/iiif/ark:/12148/btv1b6000531z/f1/0,0,1024,1024/256,256/0/native.jpg @@ -56124,6 +56130,25 @@ var $$IMU_EXPORT$$; return src.replace(/(:\/\/[^/]+\/+)_[a-zA-Z]+\/+/, "$1"); } + if (domain === "d3ts7pb9ldoin4.cloudfront.net" || + // https://star-uploads.s3-us-west-2.amazonaws.com/uploads/users/9356/tier_covers/fb980420-356b-4db8-bc72-d281515c2551-120x120_1x0_616x616.jpg + // https://star-uploads.s3-us-west-2.amazonaws.com/uploads/users/9356/tier_covers/fb980420-356b-4db8-bc72-d281515c2551.jpg + amazon_container === "star-uploads") { + // https://d3ts7pb9ldoin4.cloudfront.net/uploads/users/9356/avatars/3fd19feb-8736-4d79-9815-095eb3423a78-380x380_0x0_833x833.jpg + // https://d3ts7pb9ldoin4.cloudfront.net/uploads/users/9356/avatars/3fd19feb-8736-4d79-9815-095eb3423a78.jpg + // https://d3ts7pb9ldoin4.cloudfront.net/uploads/users/9356/tier_covers/fb980420-356b-4db8-bc72-d281515c2551-120x120_1x0_616x616.jpg + // https://d3ts7pb9ldoin4.cloudfront.net/uploads/users/9356/tier_covers/fb980420-356b-4db8-bc72-d281515c2551.jpg + return src.replace(/(\/uploads\/+users\/+[0-9]+\/+[^/]+\/+[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12})-[0-9]+x[0-9]+(?:_[0-9]+x[0-9]+){2}(\.[^/.]+)(?:[?#].*)?$/, "$1$2"); + } + + if (amazon_container === "static.e-junkie.com") { + // https://s3.amazonaws.com/static.e-junkie.com/products/thumbnails/1595015.png + // https://shopdemo.e-junkie.com/product/1595015/Demo-eBook + // https://s3.amazonaws.com/static.e-junkie.com/products/tiny-images/1595015-1.png + // https://s3.amazonaws.com/static.e-junkie.com/products/images/1595015-1.png + return src.replace(/\/products\/+[a-z]+-images\/+/, "/products/images/"); + } +
7
diff --git a/db/import-dump.sh b/db/import-dump.sh @@ -7,15 +7,13 @@ psql -v ON_ERROR_STOP=1 -U postgres -d postgres <<-EOSQL AND pid <> pg_backend_pid(); DROP DATABASE IF EXISTS "$1"; - DROP SCHEMA IF EXISTS $1; - DROP USER IF EXISTS sidewalk; + DROP SCHEMA IF EXISTS sidewalk; - CREATE USER sidewalk WITH PASSWORD 'sidewalk'; CREATE DATABASE "$1" WITH OWNER=sidewalk TEMPLATE template0; - GRANT ALL PRIVILEGES ON DATABASE $1 to sidewalk; + GRANT ALL PRIVILEGES ON DATABASE "$1" to sidewalk; ALTER USER sidewalk SUPERUSER; - GRANT ALL PRIVILEGES ON DATABASE $1 TO sidewalk; + GRANT ALL PRIVILEGES ON DATABASE "$1" TO sidewalk; CREATE SCHEMA sidewalk; GRANT ALL ON ALL TABLES IN SCHEMA sidewalk TO sidewalk; @@ -23,4 +21,4 @@ psql -v ON_ERROR_STOP=1 -U postgres -d postgres <<-EOSQL ALTER DEFAULT PRIVILEGES IN SCHEMA sidewalk GRANT ALL ON SEQUENCES TO sidewalk; EOSQL -pg_restore -U sidewalk -d sidewalk /opt/$1-dump +pg_restore -U sidewalk -d $1 /opt/$1-dump
1
diff --git a/packages/netlify-cms-widget-list/src/ListControl.js b/packages/netlify-cms-widget-list/src/ListControl.js @@ -18,10 +18,6 @@ import { getErrorMessageForTypedFieldAndValue, } from './typedListHelpers'; -function valueToString(value) { - return value ? value.join(',').replace(/,([^\s]|$)/g, ', $1') : ''; -} - const ObjectControl = NetlifyCmsWidgetObject.controlComponent; const ListItem = styled.div(); @@ -135,11 +131,26 @@ export default class ListControl extends React.Component { this.state = { listCollapsed, itemsCollapsed, - value: valueToString(value), + value: this.valueToString(value), keys, }; } + valueToString = value => { + let stringValue; + if (List.isList(value) || Array.isArray(value)) { + stringValue = value.join(','); + } else { + console.warn( + `Expected List value to be an array but received '${value}' with type of '${typeof value}'. Please check the value provided to the '${this.props.field.get( + 'name', + )}' field`, + ); + stringValue = String(value); + } + return stringValue.replace(/,([^\s]|$)/g, ', $1'); + }; + getValueType = () => { const { field } = this.props; if (field.get('fields')) { @@ -172,7 +183,7 @@ export default class ListControl extends React.Component { listValue.pop(); } - const parsedValue = valueToString(listValue); + const parsedValue = this.valueToString(listValue); this.setState({ value: parsedValue }); onChange(List(listValue.map(val => val.trim()))); }; @@ -186,7 +197,7 @@ export default class ListControl extends React.Component { .split(',') .map(el => el.trim()) .filter(el => el); - this.setState({ value: valueToString(listValue) }); + this.setState({ value: this.valueToString(listValue) }); this.props.setInactiveStyle(); };
1
diff --git a/lib/api/sql/copy-controller.js b/lib/api/sql/copy-controller.js @@ -110,6 +110,10 @@ function handleCopyTo ({ logger: mainLogger }) { pgstream .on('data', data => metrics.addSize(data.length)) + .on('error', err => { + metrics.end(null, err); + return next(err); + }) .on('end', () => { metrics.end(streamCopy.getRowCount()); res.emit('log');
9
diff --git a/unlock-protocol.com/src/components/page/OpenGraphTags.js b/unlock-protocol.com/src/components/page/OpenGraphTags.js @@ -15,6 +15,7 @@ export const OpenGraphTags = ({ title, description, image, canonicalPath }) => { if (!image) image = PAGE_DEFAULT_IMAGE if (!canonicalPath) canonicalPath = '/' + const absolutePath = `${config.urlBase || ''}${canonicalPath}` const absolutePathImage = `${config.urlBase || ''}${image}` return ( @@ -22,7 +23,7 @@ export const OpenGraphTags = ({ title, description, image, canonicalPath }) => { <meta property="og:title" content={title} /> <meta property="og:description" content={description} /> <meta property="og:type" content="website" /> - <meta property="og:url" content={canonicalPath} /> + <meta property="og:url" content={absolutePath} /> <meta property="og:image" content={absolutePathImage} /> </> )
4
diff --git a/lib/carto/tracking/formats/pubsub.rb b/lib/carto/tracking/formats/pubsub.rb @@ -54,7 +54,7 @@ module Carto properties = { vis_id: @visualization.id, privacy: @visualization.privacy, - type: @visualization.type, + vis_type: @visualization.type, object_created_at: @visualization.created_at, lifetime: lifetime_in_days_with_decimals }
10
diff --git a/articles/quickstart/native/android-vnext/00-login.md b/articles/quickstart/native/android-vnext/00-login.md @@ -47,10 +47,6 @@ implementation 'com.auth0.android:auth0:2.0.0-beta.0' } ``` -::: note -If Android Studio lints the `+` sign, or if you want to use a fixed version, check for the latest in [Maven](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22auth0%22%20g%3A%22com.auth0.android%22) or [JCenter](https://bintray.com/auth0/android/auth0). -::: - ::: panel Sync Project with Gradle Files Remember to synchronize using the Android Studio prompt or run `./gradlew clean build` from the command line. For more information about Gradle usage, check [their official documentation](http://tools.android.com/tech-docs/new-build-system/user-guide). :::
2
diff --git a/token-metadata/0x4eC2eFb9cBd374786A03261E46ffce1a67756f3B/metadata.json b/token-metadata/0x4eC2eFb9cBd374786A03261E46ffce1a67756f3B/metadata.json "symbol": "DEFL", "address": "0x4eC2eFb9cBd374786A03261E46ffce1a67756f3B", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/README.md b/README.md @@ -3,6 +3,14 @@ Pure JavaScript based WYSIWYG web editor **Demo site : <a href="http://suneditor.com" target="_blank">suneditor.com</a>** +[![NPM](https://nodei.co/npm/suneditor.png)](https://nodei.co/npm/suneditor/) + +![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg) +![GitHub release](https://img.shields.io/github/release/qubyte/rubidium.svg) +![Npm](https://img.shields.io/npm/v/npm.svg) +![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/react.svg) +![Github All Releases](https://img.shields.io/github/downloads/atom/atom/total.svg) + ```properties The Suneditor is based on pure JavaScript Suneditor is a lightweight, flexible, customizable WYSIWYG text editor for your web applications
3
diff --git a/package.json b/package.json { "name": "prettier-atom", "main": "./dist/main.js", - "version": "0.57.1", + "version": "0.57.2", "description": "Atom plugin for formatting JavaScript using prettier with (optional) prettier-eslint integration", "keywords": [ "atom",
6
diff --git a/server/processes/sensorContacts.js b/server/processes/sensorContacts.js @@ -12,6 +12,7 @@ function distance3d(coord2, coord1) { const moveSensorContactTimed = () => { let sendUpdate = false; + let targetingUpdate = false; App.systems.filter(sys => sys.type === "Sensors").forEach(sensors => { const { movement, thrusterMovement } = sensors; sensors.contacts = sensors.contacts.map(c => { @@ -82,12 +83,16 @@ const moveSensorContactTimed = () => { c.location = location; } + return c; + } + }); + sensors.contacts.forEach(c => { // Auto-target const targeting = App.systems.find( s => s.simulatorId === sensors.simulatorId && s.class === "Targeting" ); if (sensors.autoTarget) { - if (distance3d({ x: 0, y: 0, z: 0 }, newLoc) < 0.33) { + if (distance3d({ x: 0, y: 0, z: 0 }, c.position) < 0.33) { if (!targeting.classes.find(t => t.id === c.id)) { const target = { id: c.id, @@ -99,26 +104,23 @@ const moveSensorContactTimed = () => { }; targeting.addTargetClass(target); targeting.createTarget(c.id); - pubsub.publish( - "targetingUpdate", - App.systems.filter(s => s.type === "Targeting") - ); + targetingUpdate = true; } } else { if (targeting.classes.find(t => t.id === c.id)) { targeting.removeTargetClass(c.id); - pubsub.publish( - "targetingUpdate", - App.systems.filter(s => s.type === "Targeting") - ); + targetingUpdate = true; } } } - - return c; - } }); }); + if (targetingUpdate) { + pubsub.publish( + "targetingUpdate", + App.systems.filter(s => s.type === "Targeting") + ); + } if (sendUpdate) { App.systems.forEach(sys => { if (sys.type === "Sensors") {
1
diff --git a/src/components/Section.js b/src/components/Section.js @@ -24,6 +24,7 @@ const propTypes = { children: PropTypes.node, /** Customize the Section container */ + // eslint-disable-next-line react/forbid-prop-types containerStyles: PropTypes.arrayOf(PropTypes.object), };
8
diff --git a/docs/api/Selection.md b/docs/api/Selection.md @@ -6,8 +6,6 @@ section: Utils ```javascript var selection = document.selectedLayers - -selection.forEach(l => log(l.id)) ``` A utility class to represent the layers selection. Contains some methods to make interacting with a selection easier. All the properties are read-only. @@ -21,7 +19,14 @@ A utility class to represent the layers selection. Contains some methods to make ## `map`, `forEach`, and `reduce` ```javascript -selection.clear(x, y) +selection.forEach(layer => log(layer.id)) + +selection.map(layer => layer.id) + +selection.reduce((initial, layer) => { + initial += layer.name + return initial +}, '') ``` Even though a selection isn't an array, it defines `map`, `forEach` and `reduce` by just forwarding the arguments its layers. Those are just convenience methods to avoid getting the layers everytime. @@ -29,7 +34,7 @@ Even though a selection isn't an array, it defines `map`, `forEach` and `reduce` ## Clear the selection ```javascript -selection.clear(x, y) +selection.clear() ``` Clear the selection.
1
diff --git a/preview.js b/preview.js @@ -9,7 +9,7 @@ const next = ()=>{ /** Unshift the queue to generate the next preview */ const {url, ext, type, width, height, resolve, reject} = queue.shift(); generatePreview(url, ext, type, width, height, resolve, reject); -} +}; export const generatePreview = async (url, ext, type, width, height, resolve, reject) => { const previewHost = inappPreviewHost; @@ -27,7 +27,7 @@ export const generatePreview = async (url, ext, type, width, height, resolve, re // check either first param is url or hash if (!isValidURL(url)) { - url = `${storageHost}/ipfs/${url}`; + url = `${storageHost}/${url}/preview.${ext}`; } // create URL @@ -47,7 +47,7 @@ export const generatePreview = async (url, ext, type, width, height, resolve, re } }, 30 * 1000); - f = (event) => { + f = event => { if (event.data.method === 'result') { window.removeEventListener('message', f, false); let blob; @@ -80,12 +80,16 @@ function isValidURL(string) { return (res !== null); } -export const preview = async (url, ext, type, width, height) => { +export const preview = async (url, ext, type, width, height, priority=10) => { return new Promise((resolve, reject) => { + if (!['png', 'jpg', 'jpeg', 'vox', 'vrm', 'glb', 'webm', 'gif'].includes(ext)) { + return reject('Undefined Extension'); + } if (!running) { generatePreview(url, ext, type, width, height, resolve, reject); } else { - queue.push({url, ext, type, width, height, resolve, reject}); + queue.push({url, ext, type, width, height, resolve, reject, priority}); + queue.sort((a, b) => a.priority - b.priority) } }); };
0
diff --git a/resources/prosody-plugins/mod_auth_token.lua b/resources/prosody-plugins/mod_auth_token.lua @@ -95,6 +95,7 @@ local function anonymous(self, message) local result, err, msg = self.profile.anonymous(self, username, self.realm); if result == true then + self.username = username; return "success"; else
12
diff --git a/templates/workflow/level1.html b/templates/workflow/level1.html {% extends "base.html" %} {% block content %} - {% include '../shared/level1_modal_form.html' %} <script> $(document).ready(function() { $('#level1Table').DataTable(); -}) + }); </script> <div class="container"> - <div class="panel panel-default"> - <div class="panel-heading clearfix"> - <div class="pull-right"> - <button class="btn btn-info btn-sm" data-toggle="modal" data-target="#addProgramModal"> - <i class="fa fa-plus"></i> Add New {{ request.user.activity_user.organization.level_1_label }} - </button> - </div> - <h4 class="panel-title"> + <!-- Sub navigation --> + <div class="sub-navigation"> + <div class="sub-navigation-header"> + <h4 class="page-title"> {{ request.user.activity_user.organization.level_1_label }}s </h4> </div> + <div class="sub-navigation-actions"> + <!-- sample action buttons --> + <div class="btn-group" role="group" aria-label=""> + <button + class="btn btn-info btn-sm" + data-toggle="modal" + data-target="#addProgramModal" + > + <i class="fa fa-plus"></i> Add New + {{ request.user.activity_user.organization.level_1_label }} + </button> + </div> + </div> + </div> - <div class="panel-body"> - <table class="table table-striped table-condensed table-bordered" id="level1Table"> + <table + class="table table-striped table-condensed table-bordered" + id="level1Table" + > <thead> <tr> <th>Name</th> @@ -55,7 +66,8 @@ $(document).ready(function(){ <ul class="dropdown-menu"> <li> <a href="" - >{{ request.user.activity_user.organization.level_2_label }} / + >{{ request.user.activity_user.organization.level_2_label }} + / {{ request.user.activity_user.organization.level_3_label }}</a > </li> @@ -73,8 +85,5 @@ $(document).ready(function(){ </tbody> </table> </div> - </div> - -</div> {% endblock content %}
0
diff --git a/src/message/displaywindowComponent.js b/src/message/displaywindowComponent.js @@ -190,10 +190,25 @@ export class Controller { this.open = this.open === true; this.height = this.height || '240px'; this.width = this.width || '240px'; - const element = document.getElementsByClassName('ngeo-displaywindow')[0]; - const margin = parseFloat(window.getComputedStyle(element).left); - this.maxWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0) - 2 * margin; - this.maxHeigth = Math.max(document.documentElement.clientHeight, window.innerHeight || 0) - 2 * margin; + + /** + * @type {Element} + */ + this.containingElement = null; + + if (typeof this.draggableContainment === 'string') { + if (this.draggableContainment !== 'document') { + let className = String(this.draggableContainment); + if (className.startsWith('.')) { + className = className.substring(1); + } + this.containingElement = document.getElementsByClassName(className)[0]; + } else { + this.containingElement = document.documentElement; + } + } else { + this.containingElement = this.draggableContainment; + } this.draggable = this.draggable !== undefined ? this.draggable : this.desktop; this.resizable = this.resizable !== undefined ? this.resizable : this.desktop; @@ -211,6 +226,10 @@ export class Controller { this.element_.find('.ngeo-displaywindow .windowcontainer').resizable({ 'minHeight': 240, 'minWidth': 240, + resize: (event, ui) => { + this.height = `${ui.size.height}px`; + this.width = `${ui.size.width}px`; + }, }); } @@ -253,11 +272,13 @@ export class Controller { * @return {Object<string, string>} CSS style when using width/height */ get style() { + this.maxWidth = this.containingElement.clientWidth - 20; + this.maxHeight = this.containingElement.clientHeight - 20; return { height: this.height, width: this.width, 'max-width': this.maxWidth.toString() + 'px', - 'max-height': this.maxHeigth.toString() + 'px', + 'max-height': this.maxHeight.toString() + 'px', }; }
7