code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/js/templates/notifications/notification.html b/js/templates/notifications/notification.html %> <% if (ob.notification.type === 'payment') { %> <div class="thumbCol flexNoShrink>"> - <%= ob.crypto.cryptoIcon({ code: 'OB_GO_BUG_1272' }) %> + <%= ob.crypto.cryptoIcon({ code: ob.notification.coinType || 'UNKNOWN_CODE' }) %> </div> <% } else { %> <div class="thumbCol disc clrBr2 clrSh1 flexNoShrink <% if (isOrderNotif) print('listingImage') %>" style="<%= ob[imageFunc](ob.notification.thumbnail || ob.notification.avatarHashes || {}) %>"></div>
4
diff --git a/packages/app/src/server/service/page.js b/packages/app/src/server/service/page.js @@ -863,6 +863,13 @@ class PageService { } const collection = mongoose.connection.collection('pages'); + const indexStatus = await Page.aggregate([{ $indexStats: {} }]); + const pathIndexStatus = indexStatus.filter(status => status.name === 'path_1')?.[0]?.spec?.unique; + + // skip index modification if path is unique + if (pathIndexStatus == null || pathIndexStatus === true) { + // drop only when true + if (pathIndexStatus) { try { // drop pages.path_1 indexes await collection.dropIndex('path_1'); @@ -872,6 +879,7 @@ class PageService { // return not to set app:isV5Compatible to true return logger.error('Failed to drop unique indexes from pages.path.', err); } + } try { // create indexes without @@ -882,6 +890,7 @@ class PageService { // return not to set app:isV5Compatible to true return logger.error('Failed to create non-unique indexes on pages.path.', err); } + } try { await this.crowi.configManager.updateConfigsInTheSameNamespace('crowi', {
7
diff --git a/extensions/projection/json-schema/schema.json b/extensions/projection/json-schema/schema.json } } } - }, - "assets": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "proj:shape":{ - "title":"Shape", - "type":"array", - "minItems":2, - "maxItems":2, - "items":{ - "type":"integer" - } - }, - "proj:transform":{ - "title":"Transform", - "type":"array", - "minItems":6, - "maxItems":9, - "items":{ - "type":"number" - } - } - } - } } } }
2
diff --git a/bl-plugins/links/plugin.php b/bl-plugins/links/plugin.php @@ -125,7 +125,9 @@ class pluginLinks extends Plugin { // HTML for sidebar $html = '<div class="plugin plugin-pages">'; + if ($this->getValue('label')) { $html .= '<h2 class="plugin-label">'.$this->getValue('label').'</h2>'; + } $html .= '<div class="plugin-content">'; $html .= '<ul>';
2
diff --git a/src/actions/general.js b/src/actions/general.js // Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import {Client4} from 'client'; +import {Client, Client4} from 'client'; import {bindClientFunc, FormattedError} from './helpers.js'; import {GeneralTypes} from 'action_types'; import {getMyChannelMembers} from './channels'; @@ -100,6 +100,8 @@ export function setServerVersion(serverVersion) { export function setStoreFromLocalData(data) { return async (dispatch, getState) => { + Client.setToken(data.token); + Client.setUrl(data.url); Client4.setToken(data.token); Client4.setUrl(data.url);
12
diff --git a/src/traces/scattergl/convert.js b/src/traces/scattergl/convert.js @@ -30,7 +30,7 @@ var DASHES = require('../../constants/gl2d_dashes'); var AXES = ['xaxis', 'yaxis']; var DESELECTDIM = 0.2; -var transparent = [0, 0, 0, 0]; +var TRANSPARENT = [0, 0, 0, 0]; function LineWithMarkers(scene, uid) { this.scene = scene; @@ -259,10 +259,14 @@ function isSymbolOpen(symbol) { return symbol.split('-open')[1] === ''; } -function fillColor(colorIn, colorOut, offsetIn, offsetOut) { - for(var j = 0; j < 4; j++) { +function fillColor(colorIn, colorOut, offsetIn, offsetOut, isDimmed) { + var dim = isDimmed ? DESELECTDIM : 1; + var j; + + for(j = 0; j < 3; j++) { colorIn[4 * offsetIn + j] = colorOut[4 * offsetOut + j]; } + colorIn[4 * offsetIn + j] = dim * colorOut[4 * offsetOut + j]; } proto.update = function(options, cdscatter) { @@ -582,7 +586,7 @@ proto.updateFancy = function(options) { var colors = convertColorScale(markerOpts, markerOpacity, traceOpacity, len); var borderWidths = convertNumber(markerOpts.line.width, len); var borderColors = convertColorScale(markerOpts.line, markerOpacity, traceOpacity, len); - var index, size, symbol, symbolSpec, isOpen, _colors, _borderColors, bw, minBorderWidth; + var index, size, symbol, symbolSpec, isOpen, isDimmed, _colors, _borderColors, bw, minBorderWidth; sizes = convertArray(markerSizeFunc, markerOpts.size, len); @@ -592,6 +596,7 @@ proto.updateFancy = function(options) { symbol = symbols[index]; symbolSpec = MARKER_SYMBOLS[symbol]; isOpen = isSymbolOpen(symbol); + isDimmed = selIds && !selIds[index]; if(symbolSpec.noBorder && !isOpen) { _colors = borderColors; @@ -615,23 +620,12 @@ proto.updateFancy = function(options) { this.scatter.options.glyphs[i] = symbolSpec.unicode; this.scatter.options.borderWidths[i] = 0.5 * ((bw > minBorderWidth) ? bw - minBorderWidth : 0); - // FIXME - - for(j = 0; j < 4; ++j) { - var color = colors[4 * index + j]; - if(selIds && !selIds[index] && j === 3) { - color *= DESELECTDIM; - } - this.scatter.options.colors[4 * i + j] = color; - this.scatter.options.borderColors[4 * i + j] = borderColors[4 * index + j]; - } - if(isOpen && !symbolSpec.noBorder && !symbolSpec.noFill) { - fillColor(this.scatter.options.colors, transparent, i, 0); + fillColor(this.scatter.options.colors, TRANSPARENT, i, 0); } else { - fillColor(this.scatter.options.colors, _colors, i, index); + fillColor(this.scatter.options.colors, _colors, i, index, isDimmed); } - fillColor(this.scatter.options.borderColors, _borderColors, i, index); + fillColor(this.scatter.options.borderColors, _borderColors, i, index, isDimmed); } // prevent scatter from resnapping points
0
diff --git a/docs/advanced/Testing.md b/docs/advanced/Testing.md @@ -208,7 +208,7 @@ test('callApi', async (assert) => { const result = await runSaga({ dispatch: (action) => dispatched.push(action), getState: () => ({ state: 'test' }), - }, callApi, url).done; + }, callApi, url).toPromise(); assert.true(myApi.calledWith(url, somethingFromState({ state: 'test' }))); assert.deepEqual(dispatched, [success({ some: 'value' })]);
3
diff --git a/karma.conf.js b/karma.conf.js @@ -24,6 +24,11 @@ module.exports = function (config) { base: 'SauceLabs', browserName: 'safari', version: 'latest' + }, + sl_ie_latest: { + base: 'SauceLabs', + browserName: 'internet explorer', + version: 'latest' } };
0
diff --git a/sections/advanced/refs.md b/sections/advanced/refs.md @@ -39,4 +39,4 @@ render( ); ``` -> Using an older version of styled-components (v3 and lower) or of React? Use the [`innerRef` prop](/docs/api#innerref-prop) instead. +> Using an older version of styled-components (below 4.0.0) or of React? Use the [`innerRef` prop](/docs/api#innerref-prop) instead.
7
diff --git a/OurUmbraco/MarketPlace/NodeListing/NodeListingProvider.cs b/OurUmbraco/MarketPlace/NodeListing/NodeListingProvider.cs @@ -137,15 +137,7 @@ namespace OurUmbraco.MarketPlace.NodeListing using (var reader = sqlHelper.ExecuteReader("SELECT SUM([points]) AS Karma FROM powersProject WHERE id = @projectId", sqlHelper.CreateParameter("@projectId", projectId))) { if (reader.Read()) - { - var karma = reader.GetInt("Karma"); - if (karma > 0) - { - return karma; - } - return 0; - } - + return reader.GetInt("Karma"); } return 0;
2
diff --git a/docs/quickstart.md b/docs/quickstart.md @@ -101,8 +101,8 @@ Again, if you're relatively new to JavaScript (or ES2015+ syntax), you may wonde If we put all of this together, we should get a very basic (boring) table. (_Styles added just to make it a little more attractive..._) ```js -import { Playground } from 'docz' -import { useTable } from '../src/hooks/useTable' +import { useTable } from 'react-table' + function App() { const data = React.useMemo( () => [
3
diff --git a/lib/shower.js b/lib/shower.js @@ -54,7 +54,7 @@ class Shower extends EventTarget { }); } - _changeMode(mode) { + _setMode(mode) { if (mode === this._mode) return; this._mode = mode; @@ -93,14 +93,14 @@ class Shower extends EventTarget { * Slide fills the maximum area. */ enterFullMode() { - this._changeMode('full'); + this._setMode('full'); } /** * Shower returns into list mode. */ exitFullMode() { - this._changeMode('list'); + this._setMode('list'); } /**
10
diff --git a/en/option/series/graph.md b/en/option/series/graph.md @@ -282,10 +282,10 @@ links: [{ }] ``` -### source(string) -[name of source node](~series-graph.data.name) on edge -### target(string) -[name of target node](~series-graph.data.name) on edge +### source(string|number) +A string representing the [name of source node](~series-graph.data.name) on edge. Can also be a number representing the node index. +### target(string|number) +A string representing the [name of target node](~series-graph.data.name) on edge. Can also be a number representing node index. ### value(number) value of edge, can be mapped to edge length in force graph.
7
diff --git a/cmd/cmd.js b/cmd/cmd.js @@ -185,7 +185,7 @@ class Cmd { serverHost: nullify(options.host), client: options.client || 'geth', locale: options.locale, - runWebserver: !options.noserver, + runWebserver: options.noserver == null ? null : !options.noserver, useDashboard: !options.nodashboard, logFile: options.logfile, logLevel: options.loglevel,
11
diff --git a/src/schema/validate.js b/src/schema/validate.js @@ -185,9 +185,9 @@ function runValidate(exception, map, schema, originalValue, options) { // validate that we only have readable or writable properties if (readWriteOnly.length > 0) { if (readWriteMode === 'write') { - exception.message('Cannot read from write only properties: ' + readWriteOnly.join(', ')); - } else if (readWriteMode === 'read') { exception.message('Cannot write to read only properties: ' + readWriteOnly.join(', ')); + } else if (readWriteMode === 'read') { + exception.message('Cannot read from write only properties: ' + readWriteOnly.join(', ')); } }
1
diff --git a/test/jasmine/tests/gl2d_plot_interact_test.js b/test/jasmine/tests/gl2d_plot_interact_test.js @@ -670,4 +670,8 @@ describe('Test gl2d plots', function() { .catch(fail) .then(done); }); + + fit('should update selected points', function(done) { + // #2298 + }); });
0
diff --git a/README.md b/README.md @@ -64,7 +64,6 @@ can run single-shot remote commands like `docker-compose exec hackweek rake db:m ## Resources * Design mockups of the Rails app are in the design directory. -* The project list for HackWeek9 is in the [Wiki](http://github.com/SUSE/hackweek/wiki). * There are some tools in the tool directory. * Data of past hackweeks is in the archive directory. * The source of the [old webpage](http://suse.github.io/hackweek/) is in the gh-pages branch.
2
diff --git a/src/basic-languages/swift/swift.ts b/src/basic-languages/swift/swift.ts @@ -57,14 +57,32 @@ export const language = <languages.IMonarchLanguage>{ ], accessmodifiers: ['public', 'private', 'fileprivate', 'internal'], keywords: [ - '__COLUMN__', - '__FILE__', - '__FUNCTION__', - '__LINE__', + '#available', + '#colorLiteral', + '#column', + '#dsohandle', + '#else', + '#elseif', + '#endif', + '#error', + '#file', + '#fileID', + '#fileLiteral', + '#filePath', + '#function', + '#if', + '#imageLiteral', + '#keyPath', + '#line', + '#selector', + '#sourceLocation', + '#warning', + 'Any', 'Protocol', 'Self', 'Type', + 'actor', 'as', 'assignment', @@ -152,9 +170,7 @@ export const language = <languages.IMonarchLanguage>{ 'weak', 'where', 'while', - 'willSet', - 'FALSE', - 'TRUE' + 'willSet' ], symbols: /[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/,
1
diff --git a/samples/python/06.using-cards/dialogs/main_dialog.py b/samples/python/06.using-cards/dialogs/main_dialog.py @@ -185,7 +185,7 @@ class MainDialog(ComponentDialog): def create_oauth_card(self) -> Attachment: card = OAuthCard( text="BotFramework OAuth Card", - connection_name="OAuth connection", + connection_name="OAuth connection", # Replace it with the name of your Azure AD connection. buttons=[ CardAction( type=ActionTypes.signin,
0
diff --git a/userscript.user.js b/userscript.user.js @@ -22325,10 +22325,13 @@ var $$IMU_EXPORT$$; // https://pbs.twimg.com/profile_images/642139282325417984/uXOHdmTV_mini.png // https://pbs.twimg.com/profile_images/1079712585186852864/l9IiWuzk_reasonably_small.jpg // https://pbs.twimg.com/profile_images/1079712585186852864/l9IiWuzk.jpg + // thanks to Liz on discord: + // https://pbs.twimg.com/profile_images/1120032409045602304/id2Moo0W_x96.png + // https://pbs.twimg.com/profile_images/1120032409045602304/id2Moo0W.png //return src.replace(/_[a-zA-Z0-9]+\.([^/_]*)$/, "\.$1"); newsrc = obj.url .replace(/[?#].*$/, "") - .replace(/_(?:bigger|normal|mini|reasonably_small|[0-9]+x[0-9]+)(\.[^/_]*)$/, "$1"); + .replace(/_(?:bigger|normal|mini|reasonably_small|[0-9]*x[0-9]+)(\.[^/_]*)$/, "$1"); if (newsrc !== obj.url) { obj.url = newsrc; return obj; @@ -95102,6 +95105,14 @@ var $$IMU_EXPORT$$; } } + if (domain === "wl-brightside.cf.tsp.li") { + // https://wl-brightside.cf.tsp.li/resize/336x177/jpg/2e6/d91/8f964f549cb9c0ad1deb6723d0.jpg + // https://wl-brightside.cf.tsp.li/compressed/2e6/d91/8f964f549cb9c0ad1deb6723d0.jpg + return src + //.replace(/\/compressed\/+/, "/") // doesn't work + .replace(/\/resize\/+[0-9]*x[0-9]*\/+(?:jpg|png)\/+/, "/compressed/"); + } +
7
diff --git a/tests/end2end/helpers/E2EGlobal.js b/tests/end2end/helpers/E2EGlobal.js @@ -40,7 +40,11 @@ export class E2EGlobal { browser.click(selector); return; } catch (e) { - if (!e.toString().includes('Other element would receive the click')) { + const message = e.toString(), + otherElementReceivesClick = message.includes('Other element would receive the click'), + notInteractable = message.includes('Element is not currently interactable and may not be manipulated'); + + if (!(otherElementReceivesClick || notInteractable)) { throw e; } }
7
diff --git a/templates/master/elasticsearch/firehose.js b/templates/master/elasticsearch/firehose.js @@ -3,6 +3,9 @@ module.exports={ "Type" : "AWS::KinesisFirehose::DeliveryStream", "Properties" : { "DeliveryStreamType" : "DirectPut", + "DeliveryStreamEncryptionConfigurationInput": { + "KeyType": "AWS_OWNED_CMK" + }, "ElasticsearchDestinationConfiguration" : { "BufferingHints" : { "IntervalInSeconds" : 60, @@ -42,6 +45,9 @@ module.exports={ "Type" : "AWS::KinesisFirehose::DeliveryStream", "Properties" : { "DeliveryStreamType" : "DirectPut", + "DeliveryStreamEncryptionConfigurationInput": { + "KeyType": "AWS_OWNED_CMK" + }, "ElasticsearchDestinationConfiguration" : { "BufferingHints" : { "IntervalInSeconds" : 60,
12
diff --git a/userscript.user.js b/userscript.user.js @@ -17426,12 +17426,8 @@ var $$IMU_EXPORT$$; var get_domain_nosub = function(domain) { var domain_nosub = domain.replace(/^.*\.([^.]*\.[^.]*)$/, "$1"); - if (domain_nosub.match(/^co\.[a-z]{2}$/) || - domain_nosub.match(/^ne\.jp$/) || // stream.ne.jp - domain_nosub.match(/^or\.jp$/) || - domain_nosub.match(/^com\.[a-z]{2}$/) || - domain_nosub.match(/^org\.[a-z]{2}$/) || - domain_nosub.match(/^net\.[a-z]{2}$/)) { + // stream.ne.jp + if (/^(?:(?:com?|org|net)\.[a-z]{2}|(?:ne|or)\.jp)$/.test(domain_nosub)) { domain_nosub = domain.replace(/^.*\.([^.]*\.[^.]*\.[^.]*)$/, "$1"); }
4
diff --git a/src/components/bubbles/index.js b/src/components/bubbles/index.js @@ -27,7 +27,7 @@ export const Bubble = (props: BubbleProps) => { return ( <TextBubble me={me} pending={pending}> - {type === 'thread' && message.body} + {message.body} </TextBubble> ); };
1
diff --git a/src/resources/basis-worker.js b/src/resources/basis-worker.js @@ -17,22 +17,6 @@ function BasisWorker() { cTFRGBA4444: 16 // rgba 4444 }; - // engine pixel format constants, reproduced here - const PIXEL_FORMAT = { - ETC1: 21, - ETC2_RGBA: 23, - DXT1: 8, - DXT5: 10, - PVRTC_4BPP_RGB_1: 26, - PVRTC_4BPP_RGBA_1: 27, - ASTC_4x4: 28, - ATC_RGB: 29, - ATC_RGBA: 30, - R8_G8_B8_A8: 7, - R5_G6_B5: 3, - R4_G4_B4_A4: 5 - }; - // map of GPU to basis format for textures without alpha const opaqueMapping = { astc: BASIS_FORMAT.cTFASTC_4x4, @@ -55,20 +39,39 @@ function BasisWorker() { none: BASIS_FORMAT.cTFRGBA4444 }; + // engine pixel format constants, reproduced here + const PIXEL_FORMAT = { + ETC1: 21, + ETC2_RGB: 22, + ETC2_RGBA: 23, + DXT1: 8, + DXT5: 10, + PVRTC_4BPP_RGB_1: 26, + PVRTC_4BPP_RGBA_1: 27, + ASTC_4x4: 28, + ATC_RGB: 29, + ATC_RGBA: 30, + R8_G8_B8_A8: 7, + R5_G6_B5: 3, + R4_G4_B4_A4: 5 + }; + // map of basis format to engine pixel format - const basisToEngineMapping = { - [BASIS_FORMAT.cTFETC1]: PIXEL_FORMAT.ETC1, - [BASIS_FORMAT.cTFETC2]: PIXEL_FORMAT.ETC2_RGBA, - [BASIS_FORMAT.cTFBC1]: PIXEL_FORMAT.DXT1, - [BASIS_FORMAT.cTFBC3]: PIXEL_FORMAT.DXT5, - [BASIS_FORMAT.cTFPVRTC1_4_RGB]: PIXEL_FORMAT.PVRTC_4BPP_RGB_1, - [BASIS_FORMAT.cTFPVRTC1_4_RGBA]: PIXEL_FORMAT.PVRTC_4BPP_RGBA_1, - [BASIS_FORMAT.cTFASTC_4x4]: PIXEL_FORMAT.ASTC_4x4, - [BASIS_FORMAT.cTFATC_RGB]: PIXEL_FORMAT.ATC_RGB, - [BASIS_FORMAT.cTFATC_RGBA_INTERPOLATED_ALPHA]: PIXEL_FORMAT.ATC_RGBA, - [BASIS_FORMAT.cTFRGBA32]: PIXEL_FORMAT.R8_G8_B8_A8, - [BASIS_FORMAT.cTFRGB565]: PIXEL_FORMAT.R5_G6_B5, - [BASIS_FORMAT.cTFRGBA4444]: PIXEL_FORMAT.R4_G4_B4_A4 + const basisToEngineMapping = (basisFormat, deviceDetails) => { + switch (basisFormat) { + case BASIS_FORMAT.cTFETC1: return deviceDetails.formats.etc1 ? PIXEL_FORMAT.ETC1 : PIXEL_FORMAT.ETC2_RGB; + case BASIS_FORMAT.cTFETC2: return PIXEL_FORMAT.ETC2_RGBA; + case BASIS_FORMAT.cTFBC1: return PIXEL_FORMAT.DXT1; + case BASIS_FORMAT.cTFBC3: return PIXEL_FORMAT.DXT5; + case BASIS_FORMAT.cTFPVRTC1_4_RGB: return PIXEL_FORMAT.PVRTC_4BPP_RGB_1; + case BASIS_FORMAT.cTFPVRTC1_4_RGBA: return PIXEL_FORMAT.PVRTC_4BPP_RGBA_1; + case BASIS_FORMAT.cTFASTC_4x4: return PIXEL_FORMAT.ASTC_4x4; + case BASIS_FORMAT.cTFATC_RGB: return PIXEL_FORMAT.ATC_RGB; + case BASIS_FORMAT.cTFATC_RGBA_INTERPOLATED_ALPHA: return PIXEL_FORMAT.ATC_RGBA; + case BASIS_FORMAT.cTFRGBA32: return PIXEL_FORMAT.R8_G8_B8_A8; + case BASIS_FORMAT.cTFRGB565: return PIXEL_FORMAT.R5_G6_B5; + case BASIS_FORMAT.cTFRGBA4444: return PIXEL_FORMAT.R4_G4_B4_A4; + } }; // unswizzle two-component gggr8888 normal data into rgba8888 @@ -135,7 +138,7 @@ function BasisWorker() { return 'etc2'; } } else { - if (deviceDetails.formats.etc1) { + if (deviceDetails.formats.etc1 || deviceDetails.formats.etc2) { return 'etc1'; } } @@ -234,7 +237,7 @@ function BasisWorker() { const compressedFormat = isCompressedFormat(basisFormat); return { - format: basisToEngineMapping[basisFormat], + format: basisToEngineMapping(basisFormat, options.deviceDetails), width: compressedFormat ? ((width + 3) & ~3) : width, height: compressedFormat ? ((height + 3) & ~3) : height, levels: levelData,
9
diff --git a/README.md b/README.md @@ -199,7 +199,7 @@ These are the available config options for making requests. Only the `url` is re // `transformRequest` allows changes to the request data before it is sent to the server // This is only applicable for request methods 'PUT', 'POST', and 'PATCH' - // The last function in the array must return a string, an ArrayBuffer, or a Stream + // The last function in the array must return a string, an ArrayBuffer, FormData, or a Stream transformRequest: [function (data) { // Do whatever you want to transform the data
3
diff --git a/src/govuk/template.njk b/src/govuk/template.njk {# image url needs to be absolute e.g. http://wwww.domain.com/.../govuk-opengraph-image.png #} <meta property="og:image" content="{{ assetUrl | default('/assets') }}/images/govuk-opengraph-image.png"> </head> - <body class="govuk-template__body {{ bodyClasses }}"> + <body class="govuk-template__body {{ bodyClasses }}" {%- for attribute, value in bodyAttributes %} {{attribute}}="{{value}}"{% endfor %}> <script>document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script> {% block bodyStart %}{% endblock %}
11
diff --git a/js/models/segmented.js b/js/models/segmented.js @@ -75,7 +75,11 @@ function fetchGene({dsID, fields, assembly}, [samples]) { var {name, host} = xenaQuery.refGene[assembly] || {}; return name ? xenaQuery.refGeneExonCase(host, name, fields) .flatMap(refGene => { - var {txStart, txEnd, chrom} = _.values(refGene)[0], + var coords = _.values(refGene)[0]; + if (!coords) { + return Rx.Observable.return(null); + } + var {txStart, txEnd, chrom} = coords, {padTxStart, padTxEnd} = exonPadding; return segmentedDataRange(dsID, samples, chrom, txStart - padTxStart, txEnd + padTxEnd) .map(req => mapSamples(samples, {req, refGene})); @@ -129,11 +133,11 @@ function defaultXZoom(pos, refGene) { } function dataToDisplay(column, vizSettings, data, sortedSamples, datasets, index) { - if (_.isEmpty(data) || _.isEmpty(data.req)) { + var pos = parsePos(column.fields[0]); + if (_.isEmpty(data) || _.isEmpty(data.req) || (!pos || _.isEmpty(data.refGene))) { return {}; } - var pos = parsePos(column.fields[0]), - refGeneObj = _.values(data.refGene)[0], + var refGeneObj = _.values(data.refGene)[0], maxXZoom = defaultXZoom(pos, refGeneObj), // exported for zoom controls {width, showIntrons = false, xzoom = maxXZoom} = column, createLayout = pos ? exonLayout.chromLayout : (showIntrons ? exonLayout.intronLayout : exonLayout.layout),
9
diff --git a/edit.js b/edit.js @@ -16,8 +16,6 @@ const presenceEndpoint = 'wss://presence.exokit.org'; const worldsEndpoint = 'https://worlds.exokit.org'; const packagesEndpoint = 'https://packages.exokit.org'; -const flowEnabled = true; - const localVector = new THREE.Vector3(); const localVector2 = new THREE.Vector3(); const localVector3 = new THREE.Vector3(); @@ -1535,32 +1533,6 @@ const _addPackage = async (p, matrix) => { p.setMatrix(matrix); } await pe.add(p); - if (flowEnabled && p.type === '[email protected]' && p.hash) { - const [res, res2] = await Promise.all([ - fetch(`${contractsHost}/${p.hash}`), - fetch(`${contractsHost}/${p.hash}/${pe.getEnv('username')}`, { - method: 'PUT', - }), - ]); - if (res.ok && res2.ok) { - const [packageResponse, userResponse] = await Promise.all([ - res.json(), - res2.json(), - ]); - if (packageResponse !== null && userResponse !== null) { - const credentials = makeCredentials(userResponse.address, userResponse.keys.privateKey); - p.context.iframe && p.context.iframe.contentWindow && p.context.iframe.contentWindow.xrpackage && - p.context.iframe.contentWindow.navigator.xr.dispatchEvent(new MessageEvent('secure', { - data: { - packageAddress: packageResponse.address, - credentials, - }, - })); - } - } else { - console.warn('contract requests failed', res, res2); - } - } }; const _startPackageDrag = (e, j) => { e.dataTransfer.setData('application/json+package', JSON.stringify(j));
2
diff --git a/Source/Scene/Light.js b/Source/Scene/Light.js import DeveloperError from "../Core/DeveloperError.js"; /** - * A light source. This type describes an interface and is not intended to be instantiated directly. + * A light source. This type describes an interface and is not intended to be instantiated directly. Together, `color` and `intensity` produce a high-dynamic-range light color. `intensity` can also be used individually to dim or brighten the light without changing the hue. * * @alias Light * @constructor @@ -22,7 +22,7 @@ Object.defineProperties(Light.prototype, { }, /** - * The intensity of the light. + * The intensity controls the strength of the light. `intensity` has a minimum value of 0.0 and no maximum value. * @memberof Light.prototype * @type {Number} */
3
diff --git a/Source/Scene/OrthographicFrustum.js b/Source/Scene/OrthographicFrustum.js @@ -78,6 +78,14 @@ define([ frustum._near = frustum.near; frustum._far = frustum.far; + var ratio = 1.0 / frustum.aspectRatio; + f.right = frustum.width * 0.5; + f.left = -f.right; + f.top = ratio * f.right; + f.bottom = -f.top; + f.near = frustum.near; + f.far = frustum.far; + } }
3
diff --git a/src/components/NavigationDesktop/NavigationItemDesktop.js b/src/components/NavigationDesktop/NavigationItemDesktop.js @@ -145,7 +145,7 @@ class NavigationItemDesktop extends Component { return ( <Fragment> - <Button className={primaryNavItem} color="inherit" onClick={this.onClick} href={`${this.linkPath(navItem)}`}> + <Button className={primaryNavItem} color="inherit" onClick={this.onClick} href={this.linkPath(navItem)}> {navItem.name} {this.hasSubNavItems && <Fragment>{this.state.isSubNavOpen ? <ChevronUpIcon /> : <ChevronDownIcon />}</Fragment>} </Button>
3
diff --git a/services/importer/spec/unit/unp_spec.rb b/services/importer/spec/unit/unp_spec.rb @@ -9,7 +9,7 @@ include CartoDB::Importer2 describe Unp do describe '#run' do it 'extracts the contents of the file' do - zipfile = zipfile_factory + zipfile = file_factory unp = Unp.new unp.run(zipfile) @@ -18,7 +18,7 @@ describe Unp do end it 'extracts the contents of a carto file (see #11954)' do - zipfile = zipfile_factory(filename: 'this_is_a_zip_file.carto') + zipfile = file_factory(filename: 'this_is_a_zip_file.carto') unp = Unp.new unp.run(zipfile) @@ -27,7 +27,7 @@ describe Unp do end it 'lets an uncompressed file pass through and store it in a tmp dir with uppercase chars' do - uncompressed_file = zipfile_factory(filename: 'duplicated_column_name.csv') + uncompressed_file = file_factory(filename: 'duplicated_column_name.csv') unp = Unp.new({ 'unp_temporal_folder' => '/tmp/IMPORTS' }) unp.run(uncompressed_file) @@ -36,7 +36,7 @@ describe Unp do end it 'extracts the contents of a GPKG file' do - zipfile = zipfile_factory(filename: 'geopackage.zip') + zipfile = file_factory(filename: 'geopackage.zip') unp = Unp.new unp.run(zipfile) @@ -47,7 +47,7 @@ describe Unp do end it 'extracts the contents of a FGDB file' do - zipfile = zipfile_factory(filename: 'filegeodatabase.zip') + zipfile = file_factory(filename: 'filegeodatabase.zip') unp = Unp.new unp.run(zipfile) @@ -58,7 +58,7 @@ describe Unp do end it 'extracts the contents of a FGDB file' do - zipfile = zipfile_factory(filename: 'filegeodatabase.gdb.zip') + zipfile = file_factory(filename: 'filegeodatabase.gdb.zip') unp = Unp.new unp.run(zipfile) @@ -69,7 +69,7 @@ describe Unp do end it 'extracts the contents of a carto file with rar in the name (see #11954)' do - zipfile = zipfile_factory(filename: 'this_is_not_a_rar_file.carto') + zipfile = file_factory(filename: 'this_is_not_a_rar_file.carto') unp = Unp.new unp.run(zipfile) @@ -78,7 +78,7 @@ describe Unp do end it 'populates a list of source files' do - zipfile = zipfile_factory + zipfile = file_factory unp = Unp.new unp.source_files.should be_empty @@ -90,7 +90,7 @@ describe Unp do unp = Unp.new unp.source_files.should be_empty - unp.run(zipfile_factory) + unp.run(file_factory) unp.source_files.length.should eq 2 end end @@ -100,7 +100,7 @@ describe Unp do unp = Unp.new unp.source_files.should be_empty - unp.without_unpacking(zipfile_factory) + unp.without_unpacking(file_factory) unp.source_files.size.should eq 1 end @@ -151,7 +151,7 @@ describe Unp do describe '#extract' do it 'generates a temporary directory' do dir = '/var/tmp/bogus' - zipfile = zipfile_factory(dir) + zipfile = file_factory(dir) unp = Unp.new.extract(zipfile) File.directory?(unp.temporary_directory).should eq true @@ -161,7 +161,7 @@ describe Unp do it 'extracts the contents of the file into the temporary directory' do dir = '/var/tmp/bogus' - zipfile = zipfile_factory(dir) + zipfile = file_factory(dir) unp = Unp.new.extract(zipfile) (Dir.entries(unp.temporary_directory).size > 2).should eq true @@ -319,7 +319,7 @@ describe Unp do end end - def zipfile_factory(dir = '/var/tmp/bogus', filename: 'bogus.zip') + def file_factory(dir = '/var/tmp/bogus', filename: 'bogus.zip') zipfile = "#{dir}/#{filename}" FileUtils.rm(zipfile) if File.exists?(zipfile)
10
diff --git a/packages/typescript-imba-plugin/src/completions.imba b/packages/typescript-imba-plugin/src/completions.imba @@ -307,6 +307,9 @@ export class SymbolCompletion < Completion type = item.kind triggers '!(,.[' + if cat == 'decorator' + triggers ' (' + if cat == 'implicitSelf' # item.insertText = item.filterText = name # name = "self.{name}" @@ -552,9 +555,15 @@ export default class Completions def decorators o = {} # should include both global (auto-import) and local decorators # just do the locals for now? + + let vars = script.doc.varsAtOffset(pos).filter do $1.name[0] == '@' add(vars,o) + # add the defaults from imba + let builtins = checker.props('imba').filter do $1.isDecorator + add(builtins,o) + let imports = checker.autoImports.getExportedDecorators! add(imports, o) self
7
diff --git a/src/encoded/tests/test_upgrade_donor.py b/src/encoded/tests/test_upgrade_donor.py @@ -107,7 +107,8 @@ def human_donor_9(root, donor_1): properties = item.properties.copy() properties.update({ 'schema_version': '9', - 'life_stage': 'postnatal' + 'life_stage': 'postnatal', + 'ethnicity': 'caucasian' }) return properties @@ -172,3 +173,4 @@ def test_upgrade_human_donor_9_10(root, upgrader, human_donor_9): value = upgrader.upgrade('human_donor', human_donor_9, current_version='9', target_version='10') assert value['schema_version'] == '10' assert value['life_stage'] == 'newborn' + assert value['ethnicity'] == 'Caucasian'
3
diff --git a/core/worker/lib/states/discovery.js b/core/worker/lib/states/discovery.js @@ -20,6 +20,7 @@ class EtcdDiscovery extends EventEmitter { const discoveryInfo = { algorithmName: options.jobConsumer.job.type, podName: options.kubernetes.pod_name, + previousTaskIds: [] }; await this._etcd.discovery.register({ data: discoveryInfo }); log.info(`registering worker discovery for id ${this._etcd.discovery._instanceId}`, { component });
0
diff --git a/packages/mjml-validator/src/rules/validChildren.js b/packages/mjml-validator/src/rules/validChildren.js import filter from 'lodash/filter' import includes from 'lodash/includes' +import keys from 'lodash/keys' import dependencies from '../dependencies' import ruleError from './ruleError' @@ -31,8 +32,14 @@ export default function validChildren(element, { components }) { return null } + if (parentDependencies.some(dep => dep instanceof RegExp && dep.test(childTagName))) { + return true + } + + const allowedDependencies = keys(dependencies).filter(key => includes(dependencies[key], childTagName)) + return ruleError( - `${childTagName} cannot be used inside ${tagName}, only inside: ${parentDependencies.join( + `${childTagName} cannot be used inside ${tagName}, only inside: ${allowedDependencies.join( ', ', )}`, child,
9
diff --git a/src/generators/output/toString.js b/src/generators/output/toString.js @@ -68,8 +68,18 @@ module.exports = async (str, options) => { } html = html - .replace(/(\..+)(\\:|\\\/)/g, group => group.replace(/\\:|\\\//g, '-')) // replace \/ and \: in class names from head - .replace(/class\s*=\s*["'][^"']*[/:][^"']*["']/g, group => group.replace(/\/|:/g, '-')) // replace special characters in class names from body + // Rewrite class names in `<head>` CSS + .replace(/(\..+)(\\:|\\\/|\\%)/g, group => { + return group + .replace(/\\:|\\\//g, '-') // replace `\/` and `\:` with `-` + .replace(/\\%/g, 'pc') // replace `%` with `pc` + }) + // Rewrite class names in `<body>` HTML + .replace(/class\s*=\s*["'][^"']*[/:][^"']*["']/g, group => { + return group + .replace(/\/|:/g, '-') // replace `\/` and `\:` with `-` + .replace(/%/g, 'pc') // replace `%` with `pc` + }) if (typeof options.afterRender === 'function') { html = await options.afterRender(html, config)
14
diff --git a/lib/assets/core/javascripts/cartodb3/deep-insights-integration/widgets-integration.js b/lib/assets/core/javascripts/cartodb3/deep-insights-integration/widgets-integration.js @@ -374,7 +374,7 @@ module.exports = { type: 'time-series', layer_id: newLayer.get('id'), source: { - id: newLayer.get('source') + id: newLayer.getSourceId() }, options: { column: attribute,
4
diff --git a/ios/RCTMGL/RCTMGLMapViewManager.m b/ios/RCTMGL/RCTMGLMapViewManager.m @@ -424,14 +424,6 @@ RCT_EXPORT_METHOD(setCamera:(nonnull NSNumber*)reactTag [self fireEvent:event withCallback:reactMapView.onUserTrackingModeChange]; } -/*- (BOOL)mapView:(MGLMapView *)mapView shouldChangeFromCamera:(MGLMapCamera *)oldCamera toCamera:(MGLMapCamera *)newCamera -{ - RCTMGLMapView *reactMapView = (RCTMGLMapView *)mapView; - reactMapView.isUserInteraction = YES; - return YES; -} - */ - - (MGLAnnotationView *)mapView:(MGLMapView *)mapView viewForAnnotation:(id<MGLAnnotation>)annotation { if ([annotation isKindOfClass:[RCTMGLPointAnnotation class]]) {
2
diff --git a/io-manager.js b/io-manager.js @@ -454,10 +454,10 @@ ioManager.bindInput = () => { weaponsManager.enter(); break; } - case 77: { // M + /* case 77: { // M menuActions.setIsOpen(!menuState.isOpen); break; - } + } */ case 74: { // J weaponsManager.inventoryHack = !weaponsManager.inventoryHack; break;
2
diff --git a/packages/fether-react/src/App/App.js b/packages/fether-react/src/App/App.js @@ -29,13 +29,6 @@ const Router = @inject('healthStore', 'onboardingStore') @observer class App extends Component { - componentDidCatch () { - if (process.env.NODE_ENV !== 'development') { - // Redirect to '/' on errors - window.location.href = '/'; - } - } - render () { return ( <Router>
2
diff --git a/src/resources/views/crud/inc/form_fields_script.blade.php b/src/resources/views/crud/inc/form_fields_script.blade.php if(this.isSubfield) { window.crud.subfieldsCallbacks[this.parent.name] ??= []; - if(!window.crud.subfieldsCallbacks[this.parent.name].some( callbacks => callbacks['fieldName'] === this.name )) { window.crud.subfieldsCallbacks[this.parent.name].push({ closure, field: this }); - } return this; }
11
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -603,6 +603,10 @@ const loadPromise = (async () => { const arrayBuffer = await res.arrayBuffer(); animations = CBOR.decode(arrayBuffer).animations .map(a => THREE.AnimationClip.parse(a)); + animations.index = {}; + for (const animation of animations) { + animations.index[animation.name] = animation; + } })(), (async () => { const srcUrl = '../animations/animations-skeleton.glb';
0
diff --git a/assets/sass/components/thank-with-google/_googlesitekit-twg-supporter-wall.scss b/assets/sass/components/thank-with-google/_googlesitekit-twg-supporter-wall.scss margin-top: 30px; } } - - .googlesitekit-twg-supporter-wall-banner { - - .googlesitekit-twg-supporter-wall-banner__description { - display: block; - } - } }
2
diff --git a/devtools/test_dashboard/index.html b/devtools/test_dashboard/index.html </div> <div id="snapshot"></div> + <!-- uncomment below for IE9/10 support --> + <!-- <script>if(typeof window.Int16Array !== 'function')document.write("<scri"+"pt src='../../dist/extras/typedarray.min.js'></scr"+"ipt>");</script> + <script>document.write("<scri"+"pt src='../../dist/extras/request_animation_frame.js'></scr"+"ipt>");</script> --> + <script type="text/javascript" src="../../dist/extras/mathjax/MathJax.js?config=TeX-AMS-MML_SVG"></script> <script id="source" type="text/javascript" src="../../build/plotly.js"></script> <script type="text/javascript" src="../../build/test_dashboard-bundle.js"></script>
0
diff --git a/lib/Client.js b/lib/Client.js @@ -446,7 +446,12 @@ class Client extends EventEmitter { } const min = Math.min(position, channel.position); const max = Math.max(position, channel.position); - channels = channels.filter((chan) => chan.type === channel.type && chan.parentID === channel.parentID && min <= chan.position && chan.position <= max && chan.id !== channelID).sort((a, b) => a.position - b.position); + channels = channels.filter((chan) => { + return chan.type === channel.type + && min <= chan.position + && chan.position <= max + && chan.id !== channelID; + }).sort((a, b) => a.position - b.position); if(position > channel.position) { channels.push(channel); } else {
8
diff --git a/Source/Scene/Cesium3DTileset.js b/Source/Scene/Cesium3DTileset.js @@ -2809,13 +2809,13 @@ Cesium3DTileset.prototype.destroy = function () { }; Cesium3DTileset.supportedExtensions = { - 3DTILES_metadata: true, - 3DTILES_implicit_tiling: true, - 3DTILES_content_gltf: true, - 3DTILES_multiple_contents: true, - 3DTILES_bounding_volume_S2: true, - 3DTILES_batch_table_hierarchy: true, - 3DTILES_draco_point_compression: true, + "3DTILES_metadata:" true, + "3DTILES_implicit_tiling:" true, + "3DTILES_content_gltf:" true, + "3DTILES_multiple_contents:" true, + "3DTILES_bounding_volume_S2:" true, + "3DTILES_batch_table_hierarchy:" true, + "3DTILES_draco_point_compression:" true, }; /**
3
diff --git a/src/js/App.js b/src/js/App.js @@ -65,6 +65,7 @@ import * as lastfmActions from './services/lastfm/actions'; import * as geniusActions from './services/genius/actions'; import * as snapcastActions from './services/snapcast/actions'; import MediaSession from './components/MediaSession'; +import ErrorBoundary from './components/ErrorBoundary'; export class App extends React.Component { constructor(props) { @@ -94,6 +95,7 @@ export class App extends React.Component { message.match(/Websocket/i) || message.match(/NotSupportedError/i) || message.match(/Non-Error promise rejection captured with keys: call, message, value/i) + || message.match(/Cannot read property 'addChunk' of undefined/i) ) ) { return null; @@ -426,7 +428,7 @@ export class App extends React.Component { <ContextMenu /> <Dragger /> <Notifications /> - {userHasInteracted && <Stream />} + {userHasInteracted && <ErrorBoundary silent><Stream /></ErrorBoundary>} {userHasInteracted && ('mediaSession' in navigator) && <MediaSession />} {debug_info && <DebugInfo />} </div>
8
diff --git a/articles/connections/index.md b/articles/connections/index.md @@ -65,7 +65,7 @@ An Identity Provider is a server that can provide identity information to other Auth0 is an identity hub that supports many identity providers using various protocols (like [OpenID Connect](/protocols/oidc), [SAML](/protocols/saml), [WS-Federation](/protocols/ws-fed), and more). -Auth0 sits between your app and the Identity Provider that authenticates your users. This adds a level of abstraction so your app is isolated from any changes to and idiosyncrasies of each provider's implementation. In addition, Auth0's [normalized user profile](/user-profile) simplifies user management. +Auth0 sits between your app and the Identity Provider that authenticates your users. This adds a level of abstraction so your app is isolated from any changes to and idiosyncrasies of each provider's implementation. The relationship between Auth0 and any of these authentication providers is referred to as a **connection**. Auth0 supports [Social](#social), [Enterprise](#enterprise), [Database](#database-and-custom-connections) and [Passwordless](#passwordless) connections.
2
diff --git a/tests/unit/queryBuilder/QueryBuilder.js b/tests/unit/queryBuilder/QueryBuilder.js @@ -83,7 +83,8 @@ describe('QueryBuilder', () => { 'removeAllListeners', 'listeners', 'listenerCount', - 'eventNames' + 'eventNames', + 'rawListeners' ]; let builder = QueryBuilder.forClass(TestModel);
8
diff --git a/package.json b/package.json }, "dependencies": { "broccoli-file-creator": "^2.1.1", - "broccoli-funnel": "^3.0.2", - "broccoli-merge-trees": "^4.2.0", + "broccoli-funnel": "^2.0.2", + "broccoli-merge-trees": "^3.0.2", "ember-auto-import": "^1.2.19", "ember-cli-babel": "^7.5.0", "ember-get-config": "^0.2.2",
13
diff --git a/packages/table-core/src/utils.ts b/packages/table-core/src/utils.ts @@ -27,9 +27,12 @@ export function noop() { // } -export function makeStateUpdater(key: keyof TableState, table: unknown) { - return (updater: Updater<any>) => { - ;(table as any).setState(<TTableState>(old: TTableState) => { +export function makeStateUpdater<K extends keyof TableState>( + key: K, + instance: unknown +) { + return (updater: Updater<TableState[K]>) => { + ;(instance as any).setState(<TTableState>(old: TTableState) => { return { ...old, [key]: functionalUpdate(updater, (old as any)[key]),
1
diff --git a/src/video/webgl/webgl_renderer.js b/src/video/webgl/webgl_renderer.js @@ -455,14 +455,14 @@ class WebGLRenderer extends Renderer { } /** - * Returns the WebGL Context object of the given Canvas + * Returns the WebGL Context object of the given canvas element * @name getContextGL * @memberof WebGLRenderer * @param {HTMLCanvasElement} canvas - * @param {boolean} [transparent=true] use false to disable transparency + * @param {boolean} [transparent=false] use true to enable transparency * @returns {WebGLRenderingContext} */ - getContextGL(canvas, transparent = true) { + getContextGL(canvas, transparent = false) { if (typeof canvas === "undefined" || canvas === null) { throw new Error( "You must pass a canvas element in order to create " +
12
diff --git a/lambda/proxy-es/lib/query.js b/lambda/proxy-es/lib/query.js @@ -113,7 +113,9 @@ async function evaluateConditionalChaining(req, res, hit, conditionalChaining) { conditionalChaining = encryptor.decrypt(conditionalChaining); console.log("Decrypted Chained document rule specified:", conditionalChaining); // provide 'SessionAttributes' to chaining rule safeEval context, consistent with Handlebars context - const context={SessionAttributes:res.session}; + const SessionAttributes = (arg) => _.get(SessionAttributes, arg, undefined); + _.assign(SessionAttributes, res.session); + const context={SessionAttributes}; // safely evaluate conditionalChaining expression.. throws an exception if there is a syntax error const next_q = safeEval(conditionalChaining, context); console.log("Chained document rule evaluated to:", next_q);
11
diff --git a/tests/e2e/config/bootstrap.js b/tests/e2e/config/bootstrap.js @@ -166,7 +166,7 @@ beforeAll( async() => { capturePageEventsForTearDown(); enablePageDialogAccept(); observeConsoleLogging(); - if ( +process.env.DEBUG_REST ) { + if ( '1' === process.env.DEBUG_REST ) { page.on( 'request', observeRestRequest ); page.on( 'response', observeRestResponse ); }
4
diff --git a/src/ApiGatewayWebSocket.js b/src/ApiGatewayWebSocket.js @@ -351,7 +351,7 @@ module.exports = class ApiGatewayWebSocket { }); } - _createWsAction(functionObj, funName, servicePath, funOptions, event) { + _createWsAction(functionObj, functionName, servicePath, funOptions, event) { let handler; // The lambda function Object.assign(process.env, this.originalEnvironment); @@ -373,20 +373,20 @@ module.exports = class ApiGatewayWebSocket { process.env, { AWS_REGION: this.service.provider.region }, this.service.provider.environment, - this.service.functions[funName].environment, + this.service.functions[functionName].environment, ); } process.env._HANDLER = functionObj.handler; handler = createHandler(funOptions, this.options); } catch (error) { - return this.log(`Error while loading ${funName}`, error); + return this.log(`Error while loading ${functionName}`, error); } const actionName = event.websocket.route; const action = { functionObj, - funName, + functionName, funOptions, handler, servicePath,
10
diff --git a/src/components/admin/edit_task.js b/src/components/admin/edit_task.js @@ -16,11 +16,17 @@ const mapDispatchToProps = { class EditTask extends Component { state = { + name: '', description: '', changesetComment: '', file: {}, } + handleNameChange = (e) => { + const name = e.target.value; + this.setState({ name }); + } + handleDescriptionChange = (e) => { const description = e.target.value; this.setState({ description }); @@ -52,12 +58,12 @@ class EditTask extends Component { getFormData = () => { const { task } = this.props; - const { description, changesetComment, file } = this.state; + const { name, description, changesetComment, file } = this.state; const formData = new window.FormData(); formData.append('idtask', task.idtask); - formData.append('name', task.value.name); + formData.append('name', name); formData.append('description', description); formData.append('changesetComment', changesetComment); formData.append('isCompleted', false); @@ -70,6 +76,7 @@ class EditTask extends Component { const { task } = this.props; this.setState({ + name: task.value.name, description: task.value.description, changesetComment: task.value.changesetComment, }); @@ -93,7 +100,7 @@ class EditTask extends Component { render() { const { task } = this.props; - const { description, changesetComment, file } = this.state; + const { name, description, changesetComment, file } = this.state; return ( <form className='dark' onSubmit={this.handleSubmit}> @@ -102,8 +109,8 @@ class EditTask extends Component { <input className='col12 block clean' type='text' - disabled='disabled' - value={task.value.name} /> + value={name} + onChange={this.handleNameChange} /> </fieldset> <fieldset className='pad2x'> <label>Description</label>
11
diff --git a/token-metadata/0x0f8c45B896784A1E408526B9300519ef8660209c/metadata.json b/token-metadata/0x0f8c45B896784A1E408526B9300519ef8660209c/metadata.json "symbol": "XMX", "address": "0x0f8c45B896784A1E408526B9300519ef8660209c", "decimals": 8, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/packages/react-server-dom-webpack/src/ReactFlightClientWebpackBundlerConfig.js b/packages/react-server-dom-webpack/src/ReactFlightClientWebpackBundlerConfig.js @@ -58,6 +58,9 @@ export function resolveModuleReference<T>( const chunkCache: Map<string, null | Promise<any>> = new Map(); const asyncModuleCache: Map<string, Thenable<any>> = new Map(); +function ignoreReject() { + // We rely on rejected promises to be handled by another listener. +} // Start preloading the modules since we might need them soon. // This function doesn't suspend. export function preloadModule<T>( @@ -72,7 +75,7 @@ export function preloadModule<T>( const thenable = __webpack_chunk_load__(chunkId); promises.push(thenable); const resolve = chunkCache.set.bind(chunkCache, chunkId, null); - thenable.then(resolve); + thenable.then(resolve, ignoreReject); chunkCache.set(chunkId, thenable); } else if (entry !== null) { promises.push(entry);
9
diff --git a/input/index.js b/input/index.js @@ -270,7 +270,6 @@ class TonicInput extends Tonic { updated () { this.setupEvents() - clearTimeout(this.timeout) setTimeout(() => { if (this.props.invalid) { @@ -278,8 +277,6 @@ class TonicInput extends Tonic { } else { this.setValid() } - - this.timeout = setTimeout(() => this.reRender(), 256) }, 32) this.state.rerendering = false
13
diff --git a/npm/ci-requirements.sh b/npm/ci-requirements.sh @@ -4,7 +4,7 @@ echo "Updating curl package required for libcurl tests" sudo apt-get update sudo apt-get install wget wget https://curl.haxx.se/download/curl-7.65.1.tar.gz -tar -xvf curl-7.52.1.tar.gz +tar -xvf curl-7.65.1.tar.gz cd curl-7* ./configure make
4
diff --git a/NotAnAnswerFlagQueueHelper.user.js b/NotAnAnswerFlagQueueHelper.user.js // @description Inserts several sort options for the NAA / VLQ / Review LQ Disputed queues // @homepage https://github.com/samliew/SO-mod-userscripts // @author @samliew -// @version 2.5.1 +// @version 2.6 // // @include */admin/dashboard?flagtype=postother* // @include */admin/dashboard?flagtype=postlowquality* } + function listenToPageUpdates() { + + // On any page update + $(document).ajaxComplete(function(event, xhr, settings) { + + // Flags dismissed or marked helpful, OR post deleted, OR answer converted to comment + if(settings.url.includes('/messages/delete-moderator-messages/') || settings.url.includes('/vote/10') || settings.url.includes('/convert-to-comment')) { + + // Remove post from mod queue + const pid = settings.url.match(/\/(\d+)\//)[0].replace(/\//g, ''); + console.log('Flags cleared: ' + pid); + $('#flagged-'+pid).remove(); + } + }); + } + + function appendStyles() { const styles = ` @@ -277,5 +294,6 @@ input.js-helpful-purge { // On page load appendStyles(); doPageLoad(); + listenToPageUpdates(); })();
2
diff --git a/src/components/docs-sidebar-nav-item.js b/src/components/docs-sidebar-nav-item.js @@ -137,7 +137,7 @@ class DocsSidebarNavItem extends React.Component { {this.showChildren() && ( <button onClick={this.onExpandCollapseClick} className="Button DocsSidebar--nav-expand-collapse-button" {...buttonProps}> <span className="DocsSidebar--nav-expand-collapse-button-content" aria-hidden="true"></span> - <span is-visually-hidden="">{expanded ? "Collapse" : "Expand"} menu</span> + <span is-visually-hidden="">{expanded ? "Collapse" : "Expand"}: {node.title}</span> </button> )}
7
diff --git a/app_web/rollup.config.js b/app_web/rollup.config.js @@ -29,7 +29,7 @@ export default { scss(), copy({ targets: [ - { src: ["index.html", "styles.css", "ui.css"], dest: "dist/"}, + { src: ["index.html"], dest: "dist/"}, { src: ["../assets/models/2.0", "!../asset/models/.git"], dest: "dist/assets/models"}, { src: ["../assets/environments/*.hdr", "!../asset/environments/.git"], dest: "dist/assets/environments"}, { src: ["../assets/images"], dest: "dist/assets"},
2
diff --git a/src/services/milestones/getApprovedKeys.js b/src/services/milestones/getApprovedKeys.js @@ -129,8 +129,7 @@ const getApprovedKeys = (milestone, data, user) => { ); } logger.info(`Marking milestone as complete. Milestone id: ${milestone._id}`); - - return ['txHash', 'status', 'mined', 'message', 'proofItems']; + return ['description', 'txHash', 'status', 'mined', 'message', 'proofItems']; } // Cancel milestone by Milestone Manager or Milestone Reviewer @@ -140,7 +139,6 @@ const getApprovedKeys = (milestone, data, user) => { 'Only the Milestone Manager or Milestone Reviewer can cancel a milestone', ); } - return ['txHash', 'status', 'mined', 'prevStatus', 'message', 'proofItems']; } @@ -152,6 +150,18 @@ const getApprovedKeys = (milestone, data, user) => { logger.info(`Editing milestone In Progress with id: ${milestone._id} by: ${user.address}`); return editMilestoneKeysOnChain; } + + // Editing a proposed milestone can be done by either manager and all usual properties can be changed since it's not on chain + if (data.status === MilestoneStatus.PROPOSED) { + if (![milestone.ownerAddress, milestone.campaign.ownerAddress].includes(user.address)) { + throw new errors.Forbidden( + 'Only the Milestone and Campaign Manager can edit proposed milestone', + ); + } + logger.info(`Editing proposed milestone with id: ${milestone._id} by: ${user.address}`); + return editMilestoneKeys; + } + break; case MilestoneStatus.NEEDS_REVIEW:
11
diff --git a/content/articles/android-excel-apachepoi-crud/index.md b/content/articles/android-excel-apachepoi-crud/index.md @@ -120,7 +120,7 @@ nameHeaderCell.cellStyle = headerCellStyle scoreHeaderCell.cellStyle = headerCellStyle ``` -![Screenshot after the formatting](shot-one.png) +![Screenshot after the formatting](/engineering-education/android-excel-apachepoi-crud/shot-one.png) _Screenshot after the formatting_ @@ -164,7 +164,7 @@ fileOut.close() We will achieve this in the end. -![Screenshot](shot-two.png) +![Screenshot](/engineering-education/android-excel-apachepoi-crud/shot-two.png) This is the full code for the method: @@ -248,7 +248,7 @@ We will create a new sheet for the test deletion. In the `createWorkbook()` meth } ``` -![Screenshot](shot-three.png) +![Screenshot](/engineering-education/android-excel-apachepoi-crud/shot-three.png) _The created sheet_ @@ -288,7 +288,7 @@ A method called `deleteSheet()` is used for the deletion task, where we will cal When we run the code and access the file, we wont see the sheet: -![Screenshot](shot-four.png) +![Screenshot](/engineering-education/android-excel-apachepoi-crud/shot-four.png) ### Deleting a row @@ -311,7 +311,7 @@ if (rowNo >= 0 && rowNo < totalNoOfRows) { } ``` -![Screenshot](shot-five.png) +![Screenshot](/engineering-education/android-excel-apachepoi-crud/shot-five.png) _Screenshot after deletion_ @@ -436,7 +436,7 @@ This is the full code: We will achieve this: -![Screenshot](shot-six.png) +![Screenshot](/engineering-education/android-excel-apachepoi-crud/shot-six.png) That is it.
10
diff --git a/core/worker/lib/states/discovery.js b/core/worker/lib/states/discovery.js @@ -10,6 +10,7 @@ class EtcdDiscovery extends EventEmitter { constructor() { super(); this._etcd = null; + this.previousTaskIds = []; } async init(options) { @@ -62,8 +63,11 @@ class EtcdDiscovery extends EventEmitter { } async updateDiscovery(options) { + if (options.taskId && !this.previousTaskIds.find(taskId => taskId === options.taskId)) { + this.previousTaskIds.push(options.taskId); + } log.info(`update worker discovery for id ${this._etcd.discovery._instanceId} with data ${JSON.stringify(options)}`, { component }); - await this._etcd.discovery.updateRegisteredData(options); + await this._etcd.discovery.updateRegisteredData({ ...options, previousTaskIds: this.previousTaskIds }); } async update(options) {
0
diff --git a/scripts/download-bin.js b/scripts/download-bin.js @@ -24,7 +24,7 @@ const download = () => { } const [sum, tarPath] = line.split(' ') checksums[tarPath] = sum - const re = /^ooniprobe_v[0-9.a-z-]+_((darwin|linux|windows)_amd64).tar.gz$/ + const re = /^ooniprobe_v[0-9.a-z-]+_((darwin|linux|windows)_amd64).(tar.gz|zip)$/ const result = tarPath.match(re) if (!result) { throw Error(`The path '${tarPath}' does not match our expectations`) @@ -42,6 +42,9 @@ const download = () => { throw Error(`Invalid checksum ${shasum} ${checksums[tarPath]}`) } console.log(`Verified ${dstDir}/${tarPath}`) + if (path.extname(tarPath) !== '.gz') { + return + } execSync(`cd ${dstDir}/${d} && tar xzf ../${tarPath}`) }) }
9
diff --git a/contracts/KyberNetwork.sol b/contracts/KyberNetwork.sol @@ -203,7 +203,6 @@ contract KyberNetwork is Withdrawable, KyberConstants { public payable returns(uint) { require(tx.gasprice <= maxGasPrice); - require (kyberWhiteList != address(0)); require (feeBurnerContract != address(0)); require( validateTradeInput( source, srcAmount ) ); @@ -311,21 +310,19 @@ contract KyberNetwork is Withdrawable, KyberConstants { else return token.balanceOf(this); } - function setContractInterfaces( KyberWhiteList _whiteList, + function setParams( KyberWhiteList _whiteList, ExpectedRateInterface _expectedRate, FeeBurnerInterface _feeBurner, - uint _maxGasPrice ) public onlyAdmin { + uint _maxGasPrice, + uint _negligibleDiff ) public onlyAdmin { kyberWhiteList = _whiteList; expectedRateContract = _expectedRate; feeBurnerContract = _feeBurner; maxGasPrice = _maxGasPrice; + negligiblePriceDiff = _negligibleDiff; } - function setNegligiblePriceDiffValue ( uint negligibleDiff ) public onlyOperator { - negligiblePriceDiff = negligibleDiff; - } - function getExpectedRate ( ERC20 source, ERC20 dest, uint srcQuantity ) public view returns ( uint bestPrice, uint slippagePrice ) { require(expectedRateContract != address(0));
12
diff --git a/token-metadata/0xecF51a98B71f0421151a1d45E033Ab8B88665221/metadata.json b/token-metadata/0xecF51a98B71f0421151a1d45E033Ab8B88665221/metadata.json "symbol": "VYA", "address": "0xecF51a98B71f0421151a1d45E033Ab8B88665221", "decimals": 8, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/public/javascripts/SVLabel/src/SVLabel/zoom/ZoomControl.js b/public/javascripts/SVLabel/src/SVLabel/zoom/ZoomControl.js @@ -190,7 +190,6 @@ function ZoomControl (canvas, mapService, tracker, uiZoomControl) { var povChange = mapService.getPovChangeStatus(); setZoom(pov.zoom + 1); - enableZoomOut(); povChange["status"] = true; canvas.clear(); canvas.render2(); @@ -212,7 +211,6 @@ function ZoomControl (canvas, mapService, tracker, uiZoomControl) { if (!status.disableZoomOut) { var povChange = mapService.getPovChangeStatus(); - setZoom(pov.zoom - 1); povChange["status"] = true; canvas.clear(); @@ -233,7 +231,6 @@ function ZoomControl (canvas, mapService, tracker, uiZoomControl) { var pov = mapService.getPov(); setZoom(pov.zoom + 1); - enableZoomOut(); povChange["status"] = true; canvas.clear(); canvas.render2(); @@ -315,12 +312,18 @@ function ZoomControl (canvas, mapService, tracker, uiZoomControl) { // Set the zoom level and change the panorama properties. var zoomLevel = undefined; zoomLevelIn = parseInt(zoomLevelIn); - if (zoomLevelIn < properties.minZoomLevel) { + if (zoomLevelIn <= properties.minZoomLevel) { zoomLevel = properties.minZoomLevel; - } else if (zoomLevelIn > properties.maxZoomLevel) { + enableZoomIn(); + disableZoomOut(); + } else if (zoomLevelIn >= properties.maxZoomLevel) { zoomLevel = properties.maxZoomLevel; + disableZoomIn(); + enableZoomOut(); } else { zoomLevel = zoomLevelIn; + enableZoomIn(); + enableZoomOut(); } mapService.setZoom(zoomLevel); var i,
1
diff --git a/website/ops.py b/website/ops.py @@ -512,9 +512,19 @@ def makeDict(dictID, template, title, blurb, email): #update dictionary info users = {email: {"canEdit": True, "canConfig": True, "canDownload": True, "canUpload": True}} dictDB = getDB(dictID) - dictDB.execute("update configs set json=? where id='users'", (json.dumps(users),)) + c = dictDB.execute("SELECT count(*) AS total FROM configs WHERE id='users'") + r = c.fetchone() + if r['total'] == 0: + dictDB.execute("INSERT INTO configs (id, json) VALUES (?, ?)", ("users", json.dumps(users))) + else: + dictDB.execute("UPDATE configs SET json=? WHERE id=?", (json.dumps(users), "users")) ident = {"title": title, "blurb": blurb} - dictDB.execute("update configs set json=? where id='ident'", (json.dumps(ident),)) + c = dictDB.execute("SELECT count(*) AS total FROM configs WHERE id='ident'") + r = c.fetchone() + if r['total'] == 0: + dictDB.execute("INSERT INTO configs (id, json) VALUES (?, ?)", ("ident", json.dumps(ident))) + else: + dictDB.execute("UPDATE configs SET json=? WHERE id=?", (json.dumps(ident), "ident")) dictDB.commit() attachDict(dictDB, dictID) return True
9
diff --git a/common/components/controllers/AboutUsController.jsx b/common/components/controllers/AboutUsController.jsx @@ -145,7 +145,7 @@ class AboutUsController extends React.PureComponent<{||}, State> { let bioId = vo.user.first_name + '-' + vo.user.last_name; return vo.isApproved && ( <div className="about-us-team-card" key={bioId}> - {this._renderAvatar(vo)} + {this._renderAvatar(vo.user)} <p className="about-us-team-card-name">{vo.user.first_name} {vo.user.last_name}</p> <p>{vo.roleTag.display_name}</p> </div> @@ -198,10 +198,10 @@ class AboutUsController extends React.PureComponent<{||}, State> { return style; } - _renderAvatar(user) { + _renderAvatar(person) { return ( - user.user_thumbnail - ? <img className="about-us-team-avatar" src={user.user_thumbnail.publicUrl} alt="Profile image"/> + person.user_thumbnail + ? <img className="about-us-team-avatar" src={person.user_thumbnail.publicUrl} alt="Profile image"/> : (<div className="about-us-team-avatar"> <Person className="PersonIcon"/> </div>)
10
diff --git a/lib/components/form-radio.vue b/lib/components/form-radio.vue <label v-for="(option, idx) in formOptions" :class="buttons ? btnLabelClasses(option, idx) : labelClasses" :key="idx" - :aria-pressed="buttons ? (option.value === this.localValue ? 'true' : 'false') : null" + :aria-pressed="buttons ? (option.value === localValue ? 'true' : 'false') : null" > <input :id="id ? (id + '__BV_radio_' + idx) : null" :class="(custom && !buttons) ? 'custom-control-input' : null"
1
diff --git a/spec/models/carto/user_migration_spec.rb b/spec/models/carto/user_migration_spec.rb @@ -365,7 +365,6 @@ describe 'UserMigration' do @map, @table, @table_visualization, @visualization = create_full_visualization(carto_user) carto_user.tables.exists?(name: @table.name).should be - user.in_database.execute("DROP TABLE #{@table.name}") # The table is still registered after the deletion carto_user.reload @@ -392,9 +391,9 @@ describe 'UserMigration' do carto_user = Carto::User.find(user.id) @map, @table, @table_visualization, @visualization = create_full_visualization(carto_user) + @table.delete user.in_database.execute("DROP TABLE #{@table.name}") - # The canonical visualization is still registered after the deletion @table_visualization.reload @table_visualization.should be
2
diff --git a/assets/js/components/PostSearcherAutoSuggest.js b/assets/js/components/PostSearcherAutoSuggest.js @@ -33,7 +33,7 @@ import { */ import { useState, useEffect, useCallback, useRef } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; -import { ENTER, ESCAPE } from '@wordpress/keycodes'; +import { END, ENTER, ESCAPE, HOME } from '@wordpress/keycodes'; /** * Internal dependencies @@ -183,17 +183,37 @@ export default function PostSearcherAutoSuggest( { } }, [ currentEntityTitle ] ); + const inputRef = useRef(); + const onKeyDown = useCallback( ( e ) => { if ( ! unifiedDashboardEnabled ) { return; } - if ( e.keyCode === ESCAPE ) { - return onClose(); - } - if ( e.keyCode === ENTER ) { + const input = inputRef.current; + + switch ( e.keyCode ) { + case ESCAPE: + return onClose(); + case ENTER: return onSelectCallback( searchTerm ); + case HOME: + if ( input?.value ) { + e.preventDefault(); + input.selectionStart = 0; + input.selectionEnd = 0; + } + break; + case END: + if ( input?.value ) { + e.preventDefault(); + input.selectionStart = input.value.length; + input.selectionEnd = input.value.length; + } + break; + default: + break; } }, [ onClose, onSelectCallback, searchTerm, unifiedDashboardEnabled ] @@ -205,6 +225,7 @@ export default function PostSearcherAutoSuggest( { onSelect={ onSelectCallback } > <ComboboxInput + ref={ inputRef } id={ id } className="autocomplete__input autocomplete__input--default" type="text"
9
diff --git a/src/components/fx/hover.js b/src/components/fx/hover.js @@ -1010,10 +1010,10 @@ function createHoverText(hoverData, opts, gd) { }; var mockLayoutOut = {}; legendSupplyDefaults(mockLayoutIn, mockLayoutOut, gd._fullData); - var legendOpts = mockLayoutOut.legend; + var mockLegend = mockLayoutOut.legend; // prepare items for the legend - legendOpts.entries = []; + mockLegend.entries = []; for(var j = 0; j < hoverData.length; j++) { var texts = getHoverLabelText(hoverData[j], true, hovermode, fullLayout, t0); var text = texts[0]; @@ -1039,14 +1039,14 @@ function createHoverText(hoverData, opts, gd) { } pt._distinct = true; - legendOpts.entries.push([pt]); + mockLegend.entries.push([pt]); } - legendOpts.entries.sort(function(a, b) { return a[0].trace.index - b[0].trace.index;}); - legendOpts.layer = container; + mockLegend.entries.sort(function(a, b) { return a[0].trace.index - b[0].trace.index;}); + mockLegend.layer = container; // Draw unified hover label - legendOpts._inHover = true; - legendDraw(gd, legendOpts); + mockLegend._inHover = true; + legendDraw(gd, mockLegend); // Position the hover var ly = Lib.mean(hoverData.map(function(c) {return (c.y0 + c.y1) / 2;}));
10
diff --git a/src/client/styles/scss/_override-bootstrap-variables.scss b/src/client/styles/scss/_override-bootstrap-variables.scss @@ -44,8 +44,9 @@ $border-radius-small: 0; // //## For each of Bootstrap's buttons, define text, background and border color. -$btn-default-bg: $btn-default-bgcolor; - +$btn-border-radius: 0px; +$btn-border-radius-lg: 0px; +$btn-border-radius-sm: 0px; //== Forms
12
diff --git a/weapons-manager.js b/weapons-manager.js @@ -749,6 +749,7 @@ const grabUseMesh = (() => { (async () => { const app = await metaversefile.load('./metaverse_modules/button/'); o.add(app); + o.app = app; })(); return o; @@ -910,6 +911,10 @@ const _updateWeapons = () => { // grabUseMesh.scale.copy(grabbedObject.scale); grabUseMesh.visible = true; + if (grabUseMesh.app) { + grabUseMesh.app.setComponent('value', weaponsManager.getUseSpecFactor(now)); + } + /* if (handSnap) { moveMesh.position.copy(grabbedObject.position); moveMesh.quaternion.copy(grabbedObject.quaternion);
12
diff --git a/src/sdk/conference/conference.js b/src/sdk/conference/conference.js mediaSubOptions.audio.format = { codec: options.audioCodec }; - if (!self.remoteStreams[options.audioStreamId]) { + if (!self.remoteStreams[mediaSubOptions.audio.from]) { safeCall(onFailure, 'Invalid audio stream ID.'); return; } - let stream = self.remoteStreams[options.audioStreamId]; + let stream = self.remoteStreams[mediaSubOptions.audio.from]; if (!stream.mediaInfo().audio) { safeCall(onFailure, 'Target stream does not have audio.'); return;
1
diff --git a/story.js b/story.js @@ -189,6 +189,7 @@ class Conversation extends EventTarget { return this.messages[this.messages.length - n] ?? null; } progress() { + if (!this.finished) { const lastMessage = this.#getMessageAgo(1); if (this.localTurn) { @@ -232,6 +233,9 @@ class Conversation extends EventTarget { this.progressChat(); } } + } else { + this.close(); + } } finish() { this.finished = true; @@ -343,6 +347,10 @@ export const listenHack = () => { _playerSay(localPlayer, comment); } })(); + } else if (e.button === 0 && currentConversation) { + if (!currentConversation.progressing) { + currentConversation.progress(); + } } }); };
0
diff --git a/src/components/table/table.js b/src/components/table/table.js @@ -306,6 +306,10 @@ class Table extends React.Component { sortedColumn: PropTypes.string // the currently sorted column } + static defaultProps = { + theme: 'primary' + } + state = { selectedCount: 0 } @@ -872,7 +876,7 @@ class Table extends React.Component { return classNames( 'carbon-table', this.props.className, - `carbon-table--${this.props.theme || 'primary'}` + `carbon-table--${this.props.theme}` ); }
4
diff --git a/generators/client/templates/angular/_package.json b/generators/client/templates/angular/_package.json "@angular/compiler": "5.1.0", "@angular/core": "5.1.0", "@angular/forms": "5.1.0", - "@angular/http": "5.1.0", "@angular/platform-browser": "5.1.0", "@angular/platform-browser-dynamic": "5.1.0", "@angular/router": "5.1.0", "core-js": "2.4.1", "font-awesome": "4.7.0", "jquery": "3.2.1", - "ng-jhipster": "0.3.6", + "ng-jhipster": "0.4.0", "ngx-cookie": "2.0.1", "ngx-infinite-scroll": "0.5.1", "ngx-webstorage": "2.0.1",
2
diff --git a/test/types/schema.test.ts b/test/types/schema.test.ts @@ -283,7 +283,7 @@ function gh11448() { age: number; } - const originSchema = new Schema<IUser>({ name: String, age: Number }); + const userSchema = new Schema<IUser>({ name: String, age: Number }); - originSchema.pick<Pick<IUser, 'age'>>(['age']); + userSchema.pick<Pick<IUser, 'age'>>(['age']); } \ No newline at end of file
10
diff --git a/src/algorithms/sorting/quick-sort/QuickSortInPlace.js b/src/algorithms/sorting/quick-sort/QuickSortInPlace.js @@ -4,7 +4,7 @@ export default class QuickSortInPlace extends Sort { /** Sorting in place avoids unnecessary use of additional memory, but modifies input array. * * This process is difficult to describe, but much clearer with a visualization: - * @see: http://www.algomation.com/algorithm/quick-sort-visualization + * @see: https://www.hackerearth.com/practice/algorithms/sorting/quick-sort/visualize/ * * @param {*[]} originalArray - Not sorted array. * @param {number} inputLowIndex
1
diff --git a/src/logging/IDBLogPersister.ts b/src/logging/IDBLogPersister.ts @@ -237,13 +237,13 @@ export class IDBLogExport { } asBlob(): BlobHandle { - const json = this.asJSON(); + const json = this.toJSON(); const buffer: Uint8Array = this._platform.encoding.utf8.encode(json); const blob: BlobHandle = this._platform.createBlob(buffer, "application/json"); return blob; } - asJSON(): string { + toJSON(): string { const log = { formatVersion: 1, appVersion: this._platform.updateService?.version,
10
diff --git a/README.md b/README.md @@ -75,26 +75,9 @@ Starting in `v1.15.0`, plotly.js ships with several _partial_ bundles (more info Starting in `v1.39.0`, plotly.js publishes _distributed_ npm packages with no dependencies. For example, run `npm install plotly.js-geo-dist` and add `import Plotly from 'plotly.js-geo-dist';` to your code to start using the plotly.js geo package. -If none of the distributed npm packages meet your needs, and you would like to manually pick which plotly.js modules to include, you'll first need to run `npm install plotly.js` and then create a *custom* bundle by using `plotly.js/lib/core`, and loading only the trace types that you need (e.g. `pie` or `choropleth`). The recommended way to do this is by creating a *bundling file*. For example, in CommonJS: +If none of the distributed npm packages meet your needs, you create custom bundle of desired trace modules e.g. `pie` and `sunburst` using +`npm run partial-bundle pie sunburst name=custom` -```javascript -// in custom-plotly.js -var Plotly = require('plotly.js/lib/core'); - -// Load in the trace types for pie, and choropleth -Plotly.register([ - require('plotly.js/lib/pie'), - require('plotly.js/lib/choropleth') -]); - -module.exports = Plotly; -``` - -Then elsewhere in your code: - -```javascript -var Plotly = require('./path/to/custom-plotly'); -``` #### Non-ascii characters
3
diff --git a/.travis.yml b/.travis.yml @@ -9,10 +9,10 @@ branches: env: SLS_IGNORE_WARNING=* # Default env stages: - - name: test - - name: integration-test + - name: Test + - name: Integration Test if: branch = master AND type = push - - name: deploy + - name: Deploy if: tag =~ ^v\d+\.\d+\.\d+$ jobs: @@ -56,7 +56,7 @@ jobs: - name: "Unit Tests - Linux - Node.js v6" node_js: 6 - - stage: integration-test + - stage: Integration Test name: "Integration Tests - Linux - Node.js v12" node_js: 12 env: @@ -69,7 +69,7 @@ jobs: - npm run integration-test-run-all - npm run integration-test-cleanup - - stage: deploy + - stage: Deploy script: skip deploy: provider: npm
7
diff --git a/pages/app/embed/EmbedWidget.js b/pages/app/embed/EmbedWidget.js @@ -17,6 +17,7 @@ import EmbedLayout from 'components/app/layout/EmbedLayout'; import VegaChart from 'components/widgets/charts/VegaChart'; import Spinner from 'components/ui/Spinner'; import ChartTheme from 'utils/widgets/theme'; +import Icon from 'components/widgets/editor/ui/Icon'; class EmbedWidget extends Page { static getInitialProps({ asPath, pathname, query, req, store, isServer }) { @@ -35,7 +36,8 @@ class EmbedWidget extends Page { constructor(props) { super(props); this.state = { - isLoading: props.isLoading + isLoading: props.isLoading, + modalOpened: false }; } @@ -43,9 +45,59 @@ class EmbedWidget extends Page { this.props.getWidget(this.props.url.query.id); } + getModal() { + const { widget, bandDescription, bandStats } = this.props; + return ( + <div className="widget-modal"> + { !widget.attributes.description && !bandDescription && isEmpty(bandStats) && + <p>No additional information is available</p> + } + + { widget.attributes.description && ( + <div> + <h4>Description</h4> + <p>{widget.attributes.description}</p> + </div> + ) } + + { bandDescription && ( + <div> + <h4>Band description</h4> + <p>{bandDescription}</p> + </div> + ) } + + { !isEmpty(bandStats) && ( + <div> + <h4>Statistical information</h4> + <div className="c-table"> + <table> + <thead> + <tr> + { Object.keys(bandStats).map(name => <th key={name}>{name}</th>) } + </tr> + </thead> + <tbody> + <tr> + { Object.keys(bandStats).map((name) => { + const number = d3.format('.4s')(bandStats[name]); + return ( + <td key={name}>{number}</td> + ); + }) } + </tr> + </tbody> + </table> + </div> + </div> + ) } + </div> + ); + } + render() { - const { widget, loading, bandDescription, bandStats } = this.props; - const { isLoading } = this.state; + const { widget, loading } = this.props; + const { isLoading, modalOpened } = this.state; if (loading) { return ( @@ -64,58 +116,38 @@ class EmbedWidget extends Page { description={`${widget.attributes.description || ''}`} > <div className="c-embed-widget"> - <div className="visualization"> <Spinner isLoading={isLoading} className="-light" /> <div className="widget-title"> + <a href={`/data/explore/${widget.attributes.dataset}`} target="_blank" rel="noopener noreferrer"> <h4>{widget.attributes.name}</h4> + </a> + <button + aria-label={`${modalOpened ? 'Close' : 'Open'} information modal`} + onClick={() => this.setState({ modalOpened: !modalOpened })} + > + <Icon name={`icon-${modalOpened ? 'cross' : 'info'}`} className="c-icon -small" /> + </button> </div> <div className="widget-content"> <VegaChart - height={300} data={widget.attributes.widgetConfig} theme={ChartTheme()} toggleLoading={l => this.setState({ isLoading: l })} reloadOnResize /> + { modalOpened && this.getModal() } </div> - <p className="widget-description"> - {widget.attributes.description} - </p> - </div> - { bandDescription && ( - <div className="band-information"> - {bandDescription} - </div> - ) } - {!isEmpty(bandStats) && ( - <div className="c-table"> - <table> - <thead> - <tr> - { Object.keys(bandStats).map(name => <th key={name}>{name}</th>) } - </tr> - </thead> - <tbody> - <tr> - { Object.keys(bandStats).map((name) => { - const number = d3.format('.4s')(bandStats[name]); - return ( - <td key={name}>{number}</td> - ); - }) } - </tr> - </tbody> - </table> - </div> - ) } - { this.isLoadedExternally() && + { this.isLoadedExternally() && ( + <div className="widget-footer"> + <a href="/" target="_blank" rel="noopener noreferrer"> <img className="embed-logo" - height={21} - width={129} src={'/static/images/logo-embed.png'} alt="Resource Watch" - /> } + /> + </a> + </div> + ) } </div> </EmbedLayout> );
7
diff --git a/stories/module-search-console-components.stories.js b/stories/module-search-console-components.stories.js @@ -2863,7 +2863,7 @@ generateReportBasedWidgetStories( { generateReportBasedWidgetStories( { moduleSlugs: [ 'search-console' ], datastore: STORE_NAME, - group: 'Search Console Module/Components/Module Page/Popular Pages Widget', + group: 'Search Console Module/Components/Module Page/Popular Keywords Widget', data: [ { clicks: 109,
10
diff --git a/guide/english/css/overflow/index.md b/guide/english/css/overflow/index.md @@ -24,25 +24,25 @@ For example, a given block-level element (`<div>`) set to 300px wide, that conta ```css .box-element { overflow: visible; } ``` -![Example Image](https://s26.postimg.org/gweu6g5yh/1-vissible.png) +![Example Image](https://i.gyazo.com/e742da4b965543d951185c6ffadb97d9.png) ### Hidden: ```css .box-element { overflow: hidden; } ``` -![Example Image](https://s26.postimg.org/l49mf77e1/2-hidden.png) +![Example Image](https://i.gyazo.com/cee767d9d8f89f4d6dd3fd7de7858fd9.png) ### Scroll: ```css .box-element { overflow: scroll; } ``` -![Example Image](https://s26.postimg.org/d8z30dxrd/3-scroll.png) +![Example Image](https://i.gyazo.com/6c41a51c5a0398fe74dbb5bd2f08a1fd.png) ### Auto: ```css .box-element { overflow: auto; } ``` -![Example Image](https://s26.postimg.org/z5q7ei0bt/4-autoank.png) +![Example Image](https://i.gyazo.com/173a13fd618d7946fceabcf35f33c458.png) ## overflow-x and overflow-y @@ -84,3 +84,4 @@ If the content overflows the Y-axis, then that content will be hidden, whilst a #### More Information: CSS-Tricks: <a href='https://css-tricks.com/almanac/properties/o/overflow/' target='_blank' rel='nofollow'>overflow</a> +W3Schools: <a href='https://www.w3schools.com/css/css_overflow.asp' target='_blank' rel='nofollow'>image source</a>
14
diff --git a/src/components/file/File.js b/src/components/file/File.js @@ -475,25 +475,25 @@ export default class FileComponent extends Field { name: fileName, size: file.size, status: 'info', - message: 'Starting upload' + message: this.t('Starting upload'), }; // Check file pattern if (this.component.filePattern && !this.validatePattern(file, this.component.filePattern)) { fileUpload.status = 'error'; - fileUpload.message = `File is the wrong type; it must be ${this.component.filePattern}`; + fileUpload.message = this.t(`File is the wrong type; it must be ${this.component.filePattern}`); } // Check file minimum size if (this.component.fileMinSize && !this.validateMinSize(file, this.component.fileMinSize)) { fileUpload.status = 'error'; - fileUpload.message = `File is too small; it must be at least ${this.component.fileMinSize}`; + fileUpload.message = this.t(`File is too small; it must be at least ${this.component.fileMinSize}`); } // Check file maximum size if (this.component.fileMaxSize && !this.validateMaxSize(file, this.component.fileMaxSize)) { fileUpload.status = 'error'; - fileUpload.message = `File is too big; it must be at most ${this.component.fileMaxSize}`; + fileUpload.message = this.t(`File is too big; it must be at most ${this.component.fileMaxSize}`); } // Get a unique name for this file to keep file collisions from occurring. @@ -501,7 +501,7 @@ export default class FileComponent extends Field { const fileService = this.fileService; if (!fileService) { fileUpload.status = 'error'; - fileUpload.message = 'File Service not provided.'; + fileUpload.message = this.t('File Service not provided.'); } this.statuses.push(fileUpload);
11
diff --git a/app/templates/webpack.config.dev_vue2.js b/app/templates/webpack.config.dev_vue2.js @@ -42,7 +42,13 @@ module.exports = { test: /\.css$/, use: [ 'vue-style-loader', - 'css-loader' + 'css-loader', + ] + }, + { + test: /\.(png|jpg|jpeg|gif)$/, + use: [ + 'file-loader', ] } ]
0
diff --git a/server/components/native/params.js b/server/components/native/params.js @@ -27,7 +27,8 @@ function getParentDomain(params : NativePopupInputParams) : string { throw new makeError(ERROR_CODE.VALIDATION_ERROR, `Expected parentDomain param to be a string`); } - if (!parentDomain.match(/\.paypal\.com$/)) { + // eslint-disable-next-line security/detect-unsafe-regex + if (!parentDomain.match(/\.paypal\.com(:\d{1,4})?$/)) { throw new makeError(ERROR_CODE.VALIDATION_ERROR, `Expected paypal parentDomain`); }
11
diff --git a/src/scripts/endscreen.js b/src/scripts/endscreen.js @@ -157,11 +157,11 @@ class Endscreen extends H5P.EventDispatcher { buildTableRow(time, title, score = this.l10n.answered) { const noLink = (this.parent.skippingPrevented()) ? ` ${ENDSCREEN_STYLE_BASE}-no-link` : ''; return $('<div/>', {class: `${ENDSCREEN_STYLE_BASE}-overview-table-row${noLink}`}) - .append($('<div/>', {class: `${ENDSCREEN_STYLE_BASE}-overview-table-row-time`, html: H5P.InteractiveVideo.humanizeTime(time)}) + .append($('<div/>', {class: `${ENDSCREEN_STYLE_BASE}-overview-table-row-time`, html: H5P.InteractiveVideo.humanizeTime(time), role: 'button'}) .click(() => { this.jump(time); })) - .append($('<div/>', {class: `${ENDSCREEN_STYLE_BASE}-overview-table-row-title`, html: title})) + .append($('<div/>', {class: `${ENDSCREEN_STYLE_BASE}-overview-table-row-title`, html: title, role: 'button'})) .click(() => { this.jump(time); })
0
diff --git a/packages/react-refresh/src/ReactFreshRuntime.js b/packages/react-refresh/src/ReactFreshRuntime.js @@ -465,6 +465,17 @@ export function injectIntoGlobalHook(globalObject: any): void { }; } + if (hook.isDisabled) { + // This isn't a real property on the hook, but it can be set to opt out + // of DevTools integration and associated warnings and logs. + // Using console['warn'] to evade Babel and ESLint + console['warn']( + 'Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). ' + + 'Fast Refresh is not compatible with this shim and will be disabled.', + ); + return; + } + // Here, we just want to get a reference to scheduleRefresh. const oldInject = hook.inject; hook.inject = function(injected) {
7
diff --git a/struts2-jquery-showcase/src/main/webapp/WEB-INF/content/index.jsp b/struts2-jquery-showcase/src/main/webapp/WEB-INF/content/index.jsp <link href="<s:url value="/yaml/core/iehacks.min.css" />" rel="stylesheet" type="text/css" /> <![endif]--> - <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> - <![endif]--> - <!-- This files are needed for AJAX Validation of XHTML Forms --> <script type="text/javascript" src="${pageContext.request.contextPath}/static/utils.js"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/static/xhtml/validation.js"></script>
2
diff --git a/source/views/controls/RichTextView.js b/source/views/controls/RichTextView.js @@ -66,6 +66,62 @@ const hiddenFloatingToolbarLayout = { transform: 'translate3d(-100vw,0,0)', }; +const URLPickerView = Class({ + + Extends: View, + + prompt: '', + placeholder: '', + confirm: '', + + value: '', + + className: 'v-UrlPicker', + + draw ( layer, Element, el ) { + return [ + el( 'h3.u-bold', [ + this.get( 'prompt' ) + ]), + this._input = new TextView({ + value: bindTwoWay( this, 'value' ), + placeholder: this.get( 'placeholder' ), + }), + el( 'p.u-alignRight', [ + new ButtonView({ + type: 'v-Button--destructive v-Button--size13', + label: loc( 'Cancel' ), + target: popOver, + method: 'hide', + }), + new ButtonView({ + type: 'v-Button--constructive v-Button--size13', + label: this.get( 'confirm' ), + target: this, + method: 'add', + }) + ]) + ]; + }, + + // --- + + autoFocus: function () { + if ( this.get( 'isInDocument' ) ) { + this._input.set( 'selection', this.get( 'value' ).length ) + .focus(); + // IE8 and Safari 6 don't fire this event for some reason. + this._input.fire( 'focus' ); + } + }.nextFrame().observes( 'isInDocument' ), + + addOnEnter: function ( event ) { + if ( lookupKey( event ) === 'Enter' ) { + this.add(); + } + }.on( 'keyup' ), +}); + const RichTextView = Class({ Extends: View, @@ -563,6 +619,15 @@ const RichTextView = Class({ target: this, method: 'insertImagesFromFiles', }), + remoteImage: new ButtonView({ + tabIndex: -1, + type: 'v-Button--iconOnly', + icon: 'icon-image', + label: loc( 'Insert Image' ), + tooltip: loc( 'Insert Image' ), + target: this, + method: 'showInsertImageOverlay', + }), left: new ButtonView({ tabIndex: -1, type: 'v-Button--iconOnly', @@ -834,51 +899,13 @@ const RichTextView = Class({ linkOverlayView: function () { const richTextView = this; - return new View({ - className: 'v-UrlPicker', - value: '', - draw ( layer, Element, el ) { - return [ - el( 'h3.u-bold', [ - loc( 'Add a link to the following URL or email:' ), - ]), - this._input = new TextView({ - value: bindTwoWay( 'value', this ), + return new URLPickerView({ + prompt: loc( 'Add a link to the following URL or email:' ), placeholder: 'e.g. www.example.com', - }), - el( 'p.u-alignRight', [ - new ButtonView({ - type: 'v-Button--destructive v-Button--size13', - label: loc( 'Cancel' ), - target: popOver, - method: 'hide', - }), - new ButtonView({ - type: 'v-Button--constructive v-Button--size13', - label: loc( 'Add Link' ), - target: this, - method: 'addLink', - }), - ]), - ]; - }, - focus: function () { - if ( this.get( 'isInDocument' ) ) { - this._input.set( 'selection', this.get( 'value' ).length ) - .focus(); - // Safari 6 doesn't fire this event for some reason. - this._input.fire( 'focus' ); - } - }.nextFrame().observes( 'isInDocument' ), - addLinkOnEnter: function ( event ) { - event.stopPropagation(); - if ( lookupKey( event ) === 'Enter' ) { - this.addLink(); - } - }.on( 'keyup' ), - addLink () { - let url = this.get( 'value' ).trim(), - email; + confirm: loc( 'Add Link' ), + add () { + var url = this.get( 'value' ).trim(); + var email; // Don't allow malicious links if ( /^(?:javascript|data):/i.test( url ) ) { return; @@ -910,6 +937,39 @@ const RichTextView = Class({ value = ''; } view.set( 'value', value ); + this.showOverlay( view, buttonView ); + }, + + insertImageOverlayView: function () { + var richTextView = this; + return new URLPickerView({ + prompt: loc( 'Insert an image from the following URL:' ), + placeholder: 'e.g. https://example.com/path/to/image.jpg', + confirm: loc( 'Insert Image' ), + add () { + var url = this.get( 'value' ).trim(); + if ( !/^https?:/i.test( url ) ) { + // Must be http/https protocol + if ( /^[a-z]:/i.test( url ) ) { + return; + } + // If none, presume http + url = 'http://' + url; + } + richTextView.insertImage( url ); + popOver.hide(); + richTextView.focus(); + }, + }); + }.property(), + + showInsertImageOverlay ( buttonView ) { + var view = this.get( 'insertImageOverlayView' ); + view.set( 'value', '' ); + this.showOverlay( view, buttonView ); + }, + + showOverlay ( view, buttonView ) { // If we're in the overflow menu, align with the "More" button. if ( buttonView.getParent( MenuView ) ) { buttonView = this.get( 'toolbarView' ).getView( 'overflow' );
0
diff --git a/renderer/components/Layout.js b/renderer/components/Layout.js @@ -31,13 +31,13 @@ const Layout = ({ children }) => { return ( - <ThemeProvider theme={theme}> <StyleSheetManager stylisPlugins={[stylisRTLPlugin]}> + <ThemeProvider theme={theme}> <GlobalStyle /> {children} <AutorunConfirmation show={showPrompt} onClose={hideAutomaticTestPrompt} /> - </StyleSheetManager> </ThemeProvider> + </StyleSheetManager> ) }
5