code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/app/controllers/carto/oauth_provider_controller.rb b/app/controllers/carto/oauth_provider_controller.rb @@ -21,6 +21,7 @@ module Carto before_action :load_oauth_app_user, only: [:consent, :authorize] before_action :validate_grant_type, :load_authorization, :verify_client_secret, only: [:token] + rescue_from StandardError, with: :rescue_generic_errors rescue_from OauthProvider::Errors::BaseError, with: :rescue_oauth_errors def consent @@ -86,6 +87,11 @@ module Carto end end + def rescue_generic_errors(exception) + CartoDB::Logger.error(exception: exception) + rescue_oauth_errors(OauthProvider::Errors::ServerError.new) + end + def validate_response_type @response_type = params[:response_type] unless SUPPORTED_RESPONSE_TYPES.include?(@response_type)
9
diff --git a/assets/js/modules/pagespeed-insights/dashboard/dashboard-widget-homepage-speed-column.js b/assets/js/modules/pagespeed-insights/dashboard/dashboard-widget-homepage-speed-column.js @@ -115,9 +115,10 @@ export const PageSpeedInsightsDashboardWidgetHomepageSpeedMobile = withData( { type: TYPE_MODULES, identifier: 'pagespeed-insights', - datapoint: 'site-pagespeed-mobile', + datapoint: 'pagespeed', data: { url: googlesitekit.permaLink, + strategy: 'mobile', }, priority: 10, maxAge: getTimeInSeconds( 'day' ), @@ -136,9 +137,10 @@ export const PageSpeedInsightsDashboardWidgetHomepageSpeedDesktop = withData( { type: TYPE_MODULES, identifier: 'pagespeed-insights', - datapoint: 'site-pagespeed-desktop', + datapoint: 'pagespeed', data: { url: googlesitekit.permaLink, + strategy: 'desktop', }, priority: 10, maxAge: getTimeInSeconds( 'day' ),
3
diff --git a/index.d.ts b/index.d.ts @@ -20,7 +20,7 @@ declare namespace Moleculer { trace(...args: any[]): void; } - type ActionHandler = (ctx: Context) => bluebird.Promise<any>; + type ActionHandler = ((ctx: Context) => bluebird.Promise<any>) & ThisType<Service>; type ActionParamSchema = { [key: string]: any }; type ActionParamTypes = "boolean" | "number" | "string" | "object" | "array" | ActionParamSchema; type ActionParams = { [key: string]: ActionParamTypes }; @@ -78,15 +78,9 @@ declare namespace Moleculer { type ServiceEventHandler = (payload: any, sender: any, eventName: string) => void; type ServiceLocalEventHandler = (node: GenericObject) => void; - type ServiceEvents = { [key: string]: ServiceEventHandler | ServiceLocalEventHandler }; + type ServiceEvents = { [key: string]: ServiceEventHandler | ServiceLocalEventHandler } & ThisType<Service>; - interface RouteSchema { - path?: string; - mappingPolicy?: string; - whitelist?: string[]; - bodyParsers?: any; - aliases?: { [alias: string]: string }; - } + type ServiceMethods = { [key: string]: (...args: any[]) => any } & ThisType<Service>; interface ServiceSchema { name: string; @@ -95,7 +89,7 @@ declare namespace Moleculer { metadata?: GenericObject; actions?: Actions; mixins?: Array<ServiceSchema>; - methods?: { [key: string]: Function }; + methods?: ServiceMethods; events?: ServiceEvents; created?: () => void; @@ -117,7 +111,7 @@ declare namespace Moleculer { logger: LoggerInstance; actions?: Actions; mixins?: Array<ServiceSchema>; - methods?: { [key: string]: Function }; + methods?: ServiceMethods; Promise: bluebird.Promise<any>; waitForServices(serviceNames: string | Array<string>, timeout?: number, interval?: number): bluebird.Promise<void>; @@ -539,8 +533,8 @@ declare namespace Moleculer { } namespace Transporters { - type MessageHandler = (cmd: string, msg: any) => bluebird.Promise<void>; - type AfterConnectHandler = (wasReconnect: boolean) => bluebird.Promise<void>; + type MessageHandler = ((cmd: string, msg: any) => bluebird.Promise<void>) & ThisType<BaseTransporter>; + type AfterConnectHandler = ((wasReconnect: boolean) => bluebird.Promise<void>) & ThisType<BaseTransporter>; class BaseTransporter { constructor(opts?: GenericObject);
12
diff --git a/bin/definition-validators/request-body.js b/bin/definition-validators/request-body.js module.exports = RequestBody; +const allowedMethods = ['post', 'put', 'options', 'head', 'patch']; + function RequestBody() { const MediaType = require('./media-type'); Object.assign(this, { + allowed: ({ major, parent }) => major === 3 && (!parent || allowedMethods.includes(parent.key)), type: 'object', properties: { description: {
11
diff --git a/docs/README.md b/docs/README.md @@ -38,16 +38,15 @@ in your bundle or reference them from `static/` via `index.html`. ## Nuxt.js You can use official [Nuxt.js](https://nuxtjs.org) module to add BootstrapVue support. ([module docs](https://github.com/nuxt-community/modules/tree/master/packages/bootstrap-vue)) -- Add `@nuxtjs/bootstrap-vue` dependency using yarn or npm to your project: -- Add `@nuxtjs/bootstrap-vue` to modules section of **nuxt.config.js** +- Add `bootstrap-vue/nuxt` to modules section of **nuxt.config.js** ```js { modules: [ - '@nuxtjs/bootstrap-vue', + 'bootstrap-vue/nuxt', // Or if you have custom bootstrap CSS... - ['@nuxtjs/bootstrap-vue', { css: false }], + ['bootstrap-vue/nuxt', { css: false }], ] } ```
3
diff --git a/src/components/MapTable/Map.js b/src/components/MapTable/Map.js @@ -244,7 +244,7 @@ export class Map extends Component<MapProps, {}> { { animate: false } ); } catch (e) { - console.warn(`No ${parsedHash.category} with code ${parsedHash.area}.`) + console.warn(`No "${parsedHash.category}" with code "#${parsedHash.area}".`) } }
7
diff --git a/src/components/KpiReact/index.js b/src/components/KpiReact/index.js @@ -104,7 +104,7 @@ const KpiContainer = ({ data }) => { }, [data, language, t]); return ( - <section id="kpi"> + <> {setDrawData.length > 0 && drawData.map((chart) => ( <Kpi @@ -118,7 +118,7 @@ const KpiContainer = ({ data }) => { caption={chart.caption} /> ))} - </section> + </> ); };
14
diff --git a/translations/en-us.yaml b/translations/en-us.yaml @@ -7053,8 +7053,8 @@ action: backupEtcd: Backup Now backupEtcdMessage: success: - title: Backup successful - message: "{ clusterId } has been backed up to { backupType } provider" + title: Backup initiated + message: "A { backupType } backup has been started for { clusterId }" clone: Clone console: Open Console convertToService: Convert to Service
3
diff --git a/userscript.user.js b/userscript.user.js @@ -21994,7 +21994,8 @@ var $$IMU_EXPORT$$; if (domain === "s.smutty.com") { // https://s.smutty.com/media_smutty_2/d/i/r/t/m/dirtyukguy-8qxdg-6b9be5.jpg // https://s.smutty.com/media_smutty_2/d/i/r/t/p/dirtyukguy-8qxdg-6b9be5.jpg - return src.replace(/\/m\/([^/]*)$/, "/p/$1"); + // https://s.smutty.com/media_smutty_2/d/i/r/t/b/dirtyukguy-8qxdg-6b9be5.jpg -- 2516x4200 + return src.replace(/\/[a-z]\/+([^/]*)(?:[?#].*)?$/, "/b/$1"); } if (domain_nowww === "welovesexyfeet.com" ||
7
diff --git a/.github/workflows/windows_test_npm_install.yml b/.github/workflows/windows_test_npm_install.yml @@ -225,16 +225,16 @@ jobs: # Run the build task: - name: 'Run build task' run: | - chmod +x $GITHUB_WORKSPACE/tools/ci/github/script - "$GITHUB_WORKSPACE/tools/ci/github/script" ${{ matrix.BUILD_TASK }} || "$GITHUB_WORKSPACE/tools/ci/github/script" ${{ matrix.BUILD_TASK }} + chmod +x ./tools/ci/github/script + "./tools/ci/github/script" ${{ matrix.BUILD_TASK }} || "./tools/ci/github/script" ${{ matrix.BUILD_TASK }} timeout-minutes: 360 # View the log file if the previous step fails: - name: 'View log file' if: failure() run: | - chmod +x $GITHUB_WORKSPACE/tools/ci/github/on_failure - "$GITHUB_WORKSPACE/tools/ci/github/on_failure" + chmod +x ./tools/ci/github/on_failure + "./tools/ci/github/on_failure" timeout-minutes: 5 # Upload the log file:
4
diff --git a/etc/test-config.js b/etc/test-config.js @@ -104,7 +104,6 @@ testConnection: { user: testUser, password: testPassword, authType: restAuthType, - rejectUnauthorized: false, - ssl: true + rejectUnauthorized: false } };
2
diff --git a/packages/siimple-css/scss/base.scss b/packages/siimple-css/scss/base.scss //Default html style html { - font-family: $siimple-default-text-font; - font-weight: $siimple-default-text-weight; - font-size: $siimple-default-text-size; - color: $siimple-default-text-color; + font-family: $siimple-default-font-family; + font-weight: $siimple-default-font-weight; + font-size: $siimple-default-font-size; + color: $siimple-default-color; font-smooth: antialiased; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
1
diff --git a/src/components/timeseries.js b/src/components/timeseries.js @@ -24,15 +24,6 @@ function TimeSeries(props) { return ( <div className=""> - <ChartContainer timeRange={series1.timerange()} width={800}> - <ChartRow height="200"> - <YAxis id="axis1" label="AUD" min={0.5} max={1.5} width="60" type="linear" format="$,.2f"/> - <Charts> - <LineChart axis="axis1" series={series1}/> - </Charts> - <YAxis id="axis2" label="Euro" min={0.5} max={1.5} width="80" type="linear" format="$,.2f"/> - </ChartRow> - </ChartContainer> </div> ); }
1
diff --git a/src/generators/output/toDisk.js b/src/generators/output/toDisk.js @@ -23,13 +23,13 @@ module.exports = async (env, spinner) => { await fs.copy(globalConfig.build.assets.source, `${outputDir}/${globalConfig.build.assets.destination}`) } - let filetypes = globalConfig.build.templates.filetypes + let filetypes = globalConfig.build.templates.filetypes || 'html|njk|nunjucks' if (Array.isArray(filetypes)) { filetypes = filetypes.join('|') } - const templates = await glob(`${outputDir}/**/*.+(${filetypes || 'html|njk|nunjucks'})`) + const templates = await glob(`${outputDir}/**/*.+(${filetypes})`) if (templates.length < 1) { throw RangeError(`No "${filetypes}" templates found in \`${globalConfig.build.templates.source}\`. If the path is correct, please check your \`build.templates.filetypes\` config setting.`)
0
diff --git a/local_modules/MMAppUICommonComponents/navigationBarButtons.web.js b/local_modules/MMAppUICommonComponents/navigationBarButtons.web.js @@ -204,14 +204,7 @@ function New_RightSide_ValueDisplayLabelButtonView(context) layer.style.width = "auto" layer.style.height = "auto" layer.style.textDecoration = "none" - - - - layer.style.fontSize = "10px" // design is 11 but chrome renders too big, simulating - layer.style.letterSpacing = "0.5px" - layer.style.fontWeight = "500" - layer.style.fontFamily = context.themeController.FontFamily_monospaceRegular() - + context.themeController.StyleLayer_FontAsSmallRegularMonospace(layer) layer.style.color = "#9E9C9E" layer.style.lineHeight = "200%" // % extra to get + aligned properly layer.style.textAlign = "center"
14
diff --git a/lib/assets/core/test/spec/cartodb3/editor/layers/layer-content-view/analyses/analysis-forms-collection.spec.js b/lib/assets/core/test/spec/cartodb3/editor/layers/layer-content-view/analyses/analysis-forms-collection.spec.js @@ -4,6 +4,7 @@ var LayerDefinitionModel = require('../../../../../../../javascripts/cartodb3/da var AnalysisSourceOptionsModel = require('../../../../../../../javascripts/cartodb3/editor/layers/layer-content-views/analyses/analysis-source-options-model'); var AnalysisFormsCollection = require('../../../../../../../javascripts/cartodb3/editor/layers/layer-content-views/analyses/analysis-forms-collection'); var UserActions = require('../../../../../../../javascripts/cartodb3/data/user-actions'); +var AnalysesService = require('../../../../../../../javascripts/cartodb3/editor/layers/layer-content-views/analyses/analyses-service'); describe('cartodb3/editor/layers/layer-content-view/analyses/analysis-forms-collection', function () { beforeEach(function () { @@ -95,6 +96,8 @@ describe('cartodb3/editor/layers/layer-content-view/analyses/analysis-forms-coll describe('.addHead', function () { beforeEach(function () { spyOn(this.collection, 'remove').and.callThrough(); + spyOn(AnalysesService, 'saveNotAppliedAnalysis'); + this.res = this.collection.addHead({id: 'a3'}); // unknown }); @@ -110,6 +113,10 @@ describe('cartodb3/editor/layers/layer-content-view/analyses/analysis-forms-coll it('should prepend new form model', function () { expect(this.collection.first().id).toEqual('a3'); }); + + it('should call AnalysesService.saveNotAppliedAnalysis with the new form model', function () { + expect(AnalysesService.saveNotAppliedAnalysis).toHaveBeenCalledWith({id: 'a3'}); + }); }); describe('.deleteNode', function () {
7
diff --git a/src/parsers/GmlSeeker.hx b/src/parsers/GmlSeeker.hx @@ -567,7 +567,7 @@ class GmlSeeker { // if (!out.kindMap.exists(name)) out.kindList.push(name); out.kindMap[name] = "namespace"; - out.docs[name] = hintDoc; + if (hintDoc != null) out.docs[name] = hintDoc; } } function addInstVar(s:String):Void {
1
diff --git a/jekyll/api/enforcer-result.md b/jekyll/api/enforcer-result.md @@ -8,18 +8,54 @@ toc: false To learn how to read an EnforcerRead object [check out the guide](../guide/enforcer-result). -## Create an EnforcerResult Instance +## EnforcerResult -It's possible to create your own EnforcerResult instance, but you'll also want to read up about the [EnforcerException object](./enforcer-exception.md). +`EnforcerResult ( value [, error [, warning ] ] ) : Promise < OpenAPI | Swagger >` + +Create an EnforcerResult instance. + +**Parameters:** + +| Parameter | Description | Type | Default | +| --------- | ----------- | ---- | ------- | +| **value** | The success value for the EnforcerResult instance. | any | | +| error | An [EnforcerException](./enforcer-exception) instance that may or may not have any exceptions. If an exception (message) does exist for this object then the EnforcerResult value will be `undefined`. | [EnforcerException](./enforcer-exception) | undefined | +| warning | An [EnforcerException](./enforcer-exception) instance that may or may not have any exceptions. | [EnforcerException](./enforcer-exception) | undefined | + +**Returns** an EnforcerResult instance. + +<details><summary bold>Example without Error</summary> +<div> ```js const { Exception, Result } = require('openapi-enforcer') const error = new Exception('Exception header') const warning = new Exception('Exception header') -const value = 'Hello' -const [ val, err, warn ] = new Result(value, error, warning) +const [ val, err, warn ] = new Result('Hello', error, warning) console.log(err) // undefined console.log(val) // 'Hello' console.log(warning) // undefined ``` + +</div> +</details> + +<details><summary bold>Example with Error</summary> +<div> + +```js +const { Exception, Result } = require('openapi-enforcer') +const error = new Exception('Exception header') +error.message('An error') +const warning = new Exception('Exception header') + +const [ val, err, warn ] = new Result('Hello', error, warning) +console.log(err) // Exception header + // An error +console.log(val) // undefined because the EnforcerException had a message +console.log(warning) // undefined +``` + +</div> +</details>
3
diff --git a/token-metadata/0x7c9D8Fb3bDe3D9Ea6e89170618C2dC3d16695D36/metadata.json b/token-metadata/0x7c9D8Fb3bDe3D9Ea6e89170618C2dC3d16695D36/metadata.json "symbol": "WRC", "address": "0x7c9D8Fb3bDe3D9Ea6e89170618C2dC3d16695D36", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/scss/grid/_grid.scss b/scss/grid/_grid.scss @@ -16,6 +16,7 @@ $siimple-grid-row-margin: 0px; //Gird colum variables $siimple-grid-column-margin: 10px; +$siimple-grid-column-padding: 12px; $siimple-grid-column-sizes: $siimple-default-grid; //Grid class @@ -62,6 +63,7 @@ $siimple-grid-column-sizes: $siimple-default-grid; @each $grid-breakpoint, $grid-screen in $siimple-default-breakpoint { @media (max-width: $grid-screen) { @each $grid-name, $grid-width in $siimple-grid-column-sizes { + &-col--#{$grid-breakpoint}-#{$grid-name}, &-col-#{$grid-breakpoint}--#{$grid-name} { width: #{$grid-width}; //width: calc(#{$grid-width} - 2 * #{$siimple-grid-column-margin});
1
diff --git a/app/models/table.rb b/app/models/table.rb @@ -515,78 +515,6 @@ class Table !get_table_id.nil? end - # adds the column if not exists or cast it to timestamp field - def normalize_timestamp(database, column) - schema = self.schema(reload: true) - - if schema.nil? || !schema.flatten.include?(column) - database.run(%Q{ - ALTER TABLE #{qualified_table_name} - ADD COLUMN #{column} timestamptz - DEFAULT NOW() - }) - end - - if schema.present? - column_type = Hash[schema][column] - # if column already exists, cast to timestamp value and set default - if column_type == 'string' && schema.flatten.include?(column) - success = ms_to_timestamp(database, qualified_table_name, column) - string_to_timestamp(database, qualified_table_name, column) unless success - - database.run(%Q{ - ALTER TABLE #{qualified_table_name} - ALTER COLUMN #{column} - SET DEFAULT now() - }) - elsif column_type == DATATYPE_DATE || column_type == 'timestamptz' - database.run(%Q{ - ALTER TABLE #{qualified_table_name} - ALTER COLUMN #{column} - SET DEFAULT now() - }) - end - end - end #normalize_timestamp_field - - # @param table String Must come fully qualified from above - def ms_to_timestamp(database, table, column) - database.run(%Q{ - ALTER TABLE "#{table}" - ALTER COLUMN #{column} - TYPE timestamptz - USING to_timestamp(#{column}::float / 1000) - }) - true - rescue - false - end #normalize_ms_to_timestamp - - # @param table String Must come fully qualified from above - def string_to_timestamp(database, table, column) - database.run(%Q{ - ALTER TABLE "#{table}" - ALTER COLUMN #{column} - TYPE timestamptz - USING to_timestamp(#{column}, 'YYYY-MM-DD HH24:MI:SS.MS.US') - }) - true - rescue - false - end #string_to_timestamp - - def make_geom_valid - begin - owner.db_service.in_database_direct_connection({statement_timeout: STATEMENT_TIMEOUT}) do |user_direct_conn| - user_direct_conn.run(%Q{ - UPDATE #{qualified_table_name} SET the_geom = ST_MakeValid(the_geom); - }) - end - rescue => e - CartoDB::StdoutLogger.info 'Table#make_geom_valid error', "table #{qualified_table_name} make valid failed: #{e.inspect}" - end - end - def name=(value) value = value.downcase if value return if value == @user_table.name || value.blank? @@ -615,14 +543,6 @@ class Table owner.in_database.from(sequel_qualified_table_name) end - def rows_estimated_query(query) - owner.in_database do |user_database| - rows = user_database["EXPLAIN #{query}"].all - est = Integer( rows[0].to_s.match( /rows=(\d+)/ ).values_at( 1 )[0] ) - return est - end - end - def rows_estimated(user=nil) user ||= self.owner user.in_database["SELECT reltuples::integer FROM pg_class WHERE oid = '#{self.name}'::regclass"].first[:reltuples]
2
diff --git a/package.json b/package.json "dependencies": { "backbone": "1.2.3", "cartocolor": "4.0.0", - "cartodb.js": "CartoDB/cartodb.js#v4", + "cartodb.js": "CartoDB/cartodb.js#c12324-time-series-aggregations", "d3": "3.5.17", "d3-interpolate": "1.1.2", "jquery": "2.1.4",
4
diff --git a/checkfiles/checkfiles.py b/checkfiles/checkfiles.py @@ -972,7 +972,7 @@ def run(out, err, url, username, password, encValData, mirror, search_query, fil except multiprocessing.NotImplmentedError: nprocesses = 1 - version = '1.13' + version = '1.14' out.write("STARTING Checkfiles version %s (%s): with %d processes %s at %s\n" % (version, search_query, nprocesses, dr, datetime.datetime.now()))
3
diff --git a/src/victory-util/collection.js b/src/victory-util/collection.js @@ -88,22 +88,8 @@ export default { * @returns {Boolean} Whether all item comparisons are equal */ allSetsEqual(itemSets) { - return this.all(itemSets, (comparisonSet) => { + return itemSets.every((comparisonSet) => { return isEqual(comparisonSet[0], comparisonSet[1]); }); }, - - all(array, assertionFn) { - const length = array.length; - let assertionPassed; - - for (let i = 0; i < length; i++) { - assertionPassed = assertionFn(array[i]); - if (assertionPassed === false) { - return false; - } - } - - return true; - } };
4
diff --git a/packages/express-openapi/README.md b/packages/express-openapi/README.md @@ -87,7 +87,7 @@ https://github.com/kogosoftwarellc/open-api/tree/master/packages/express-openapi * [Using with TypeScript](#using-with-typescript) * [Prerequisites](#prerequisites) * [TypeScript Example](#typescript-example) -* [Supported Versions of Node](#supported-version-of-node) +* [Supported Versions of Node](#supported-versions-of-node) * [License](#license) ## What is OpenAPI?
1
diff --git a/package.json b/package.json "scripts": { "copy-file": "cp dist/CookieMonster.js CookieMonster.js", "eslint-src": "eslint src", - "build": "run-s eslint-src pack-prod remove-comment copy-file", + "build": "run-s eslint-src pack-prod remove-comment copy-file test", "build-test": "run-s pack-dev", "pack-prod": "webpack --env production", "pack-dev": "webpack",
0
diff --git a/test/unit/features/component/component-scoped-slot.spec.js b/test/unit/features/component/component-scoped-slot.spec.js @@ -392,6 +392,9 @@ describe('Component scoped slot', () => { <template v-for="n in names" :slot="n" scope="props"> <span>{{ props.msg }}</span> </template> + <template slot="abc" scope="props"> + <span>{{ props.msg }}</span> + </template> </test> `, components: { @@ -401,16 +404,17 @@ describe('Component scoped slot', () => { <div> <slot name="foo" :msg="msg + ' foo'"></slot> <slot name="bar" :msg="msg + ' bar'"></slot> + <slot name="abc" :msg="msg + ' abc'"></slot> </div> ` } } }).$mount() - expect(vm.$el.innerHTML).toBe('<span>hello foo</span> <span>hello bar</span>') + expect(vm.$el.innerHTML).toBe('<span>hello foo</span> <span>hello bar</span> <span>hello abc</span>') vm.$refs.test.msg = 'world' waitForUpdate(() => { - expect(vm.$el.innerHTML).toBe('<span>world foo</span> <span>world bar</span>') + expect(vm.$el.innerHTML).toBe('<span>world foo</span> <span>world bar</span> <span>world abc</span>') }).then(done) }) })
7
diff --git a/app/scripts/controllers/tabsCtrl.js b/app/scripts/controllers/tabsCtrl.js @@ -234,6 +234,7 @@ var tabsCtrl = function($scope, globalService, $translate, $sce) { $scope.setErrorMsgLanguage = function() { for (var i = 0; i < globalFuncs.errorMsgs.length; i++) $scope.setLanguageVal('ERROR_' + i, 'errorMsgs', i); for (var i = 0; i < globalFuncs.successMsgs.length; i++) $scope.setLanguageVal('SUCCESS_' + (i + 1), 'successMsgs', i); + for (var i = 0; i < globalFuncs.phishingWarning.length; i++) $scope.setLanguageVal('PHISHING_Warning_' + (i + 1), 'phishingWarning', i); } $scope.setGethErrMsgLanguage = function() {
12
diff --git a/src/lib/libraries/extensions/index.jsx b/src/lib/libraries/extensions/index.jsx @@ -22,15 +22,18 @@ import makeymakeyInsetIconURL from './makeymakey/makeymakey-small.svg'; import microbitIconURL from './microbit/microbit.png'; import microbitInsetIconURL from './microbit/microbit-small.svg'; import microbitPeripheralImage from './microbit/microbit-illustration.svg'; +import microbitSmallPeripheralImage from './microbit/microbit-small.svg'; import ev3IconURL from './ev3/ev3.png'; import ev3InsetIconURL from './ev3/ev3-small.svg'; import ev3PeripheralImage from './ev3/ev3-hub-illustration.svg'; +import ev3SmallPeripheralImage from './ev3/ev3-small.svg'; import wedo2IconURL from './wedo2/wedo.png'; import wedo2InsetIconURL from './wedo2/wedo-small.svg'; import wedo2PeripheralImage from './wedo2/wedo-illustration.svg'; -import wedo2ButtonImage from './wedo2/wedo-button-illustration.svg'; +import wedo2SmallPeripheralImage from './wedo2/wedo-small.svg'; +import wedo2PeripheralButtonImage from './wedo2/wedo-button-illustration.svg'; import boostIconURL from './boost/boost.png'; import boostInsetIconURL from './boost/boost-small.svg'; @@ -175,7 +178,7 @@ export default [ launchPeripheralConnectionFlow: true, useAutoScan: false, peripheralImage: microbitPeripheralImage, - smallPeripheralImage: microbitInsetIconURL, + smallPeripheralImage: microbitSmallPeripheralImage, connectingMessage: ( <FormattedMessage defaultMessage="Connecting" @@ -205,7 +208,7 @@ export default [ launchPeripheralConnectionFlow: true, useAutoScan: false, peripheralImage: ev3PeripheralImage, - smallPeripheralImage: ev3InsetIconURL, + smallPeripheralImage: ev3SmallPeripheralImage, connectingMessage: ( <FormattedMessage defaultMessage="Connecting. Make sure the pin on your EV3 is set to 1234." @@ -235,8 +238,8 @@ export default [ launchPeripheralConnectionFlow: true, useAutoScan: true, peripheralImage: wedo2PeripheralImage, - smallPeripheralImage: wedo2InsetIconURL, - peripheralButtonImage: wedo2ButtonImage, + smallPeripheralImage: wedo2SmallPeripheralImage, + peripheralButtonImage: wedo2PeripheralButtonImage, connectingMessage: ( <FormattedMessage defaultMessage="Connecting"
10
diff --git a/lambda/schema/qna.js b/lambda/schema/qna.js @@ -51,7 +51,7 @@ module.exports={ rp:{ type:"string", title:"Alexa Reprompt", - description:"Enter the Alexa reprompt to returned if the user does not respond. (SSML autodetection)", + description:"Enter the Alexa reprompt to returned if the user does not respond. (SSML autodetection with &lt;speak&gt;&lt;/speak&gt;)", maxLength:8000, propertyOrder: 4 },
3
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -165,7 +165,7 @@ jobs: command: | cd tools ### ADD FOLDERS HERE TO PROCESS ### - for file in order-utils test-utils + for file in clients constants utils order-utils test-utils do cd $file NPM_NAME=$(node -p "require('./package.json').name") @@ -175,12 +175,16 @@ jobs: ### Check if the local version is beta, otherwise publish normally if [[ $LOCAL_VERSION == *"beta"* ]]; then if [[ $LOCAL_VERSION != $NPM_BETA_VERSION ]]; then + echo "Compiling..." + yarn compile echo "Publishing package to NPM with 'beta' tag..." npm publish --tag beta npm access public $NPM_NAME fi else if [[ $LOCAL_VERSION != $NPM_VERSION ]]; then + echo "Compiling..." + yarn compile echo "Publishing package to NPM with 'latest' tag..." npm publish npm access public $NPM_NAME @@ -203,7 +207,7 @@ jobs: ### Check if the local version is beta, otherwise publish normally if [[ $LOCAL_VERSION == *"beta"* ]]; then if [[ $LOCAL_VERSION != $NPM_BETA_VERSION ]]; then - echo "Generating build..." + echo "Compiling..." yarn compile ### This is where we deploy the package to NPM echo "Publishing package to NPM with 'beta' tag..." @@ -212,7 +216,7 @@ jobs: fi else if [[ $LOCAL_VERSION != $NPM_VERSION ]]; then - echo "Generating build..." + echo "Compiling..." yarn compile ### This is where we deploy the package to NPM echo "Publishing package to NPM with 'latest' tag..."
3
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.9.4 +// @version 2.9.5 // // @include */admin/dashboard?flagtype=postother* // @include */admin/dashboard?flagtype=postlowquality* return false; }); + // Remove old "deemed invalid by" flags as they mess up sorting by flagger rank + $('.mod-message .flag-row.js-cleared').filter((i, el) => el.innerText.includes('deemed invalid by')).remove(); + const actionBtns = $('<div id="actionBtns"></div>').prependTo('.flag-container');
2
diff --git a/src/plots/geo/constants.js b/src/plots/geo/constants.js // projection names to d3 function name exports.projNames = { - // d3.geo.projection 'equirectangular': 'equirectangular', 'mercator': 'mercator', 'orthographic': 'orthographic', @@ -32,7 +31,107 @@ exports.projNames = { 'albers usa': 'albersUsa', 'winkel tripel': 'winkel3', 'aitoff': 'aitoff', - 'sinusoidal': 'sinusoidal' + 'sinusoidal': 'sinusoidal', +/* + // potential projections that could be added to the API + + 'airy': 'airy', + // 'albers': 'albers', + 'armadillo': 'armadillo', + 'august': 'august', + 'baker': 'baker', + 'berghaus': 'berghaus', + 'bertin1953': 'bertin1953', + 'boggs': 'boggs', + 'bonne': 'bonne', + 'bottomley': 'bottomley', + 'bromley': 'bromley', + // 'chamberlin': 'chamberlin', + 'chamberlin africa': 'chamberlinAfrica', + 'collignon': 'collignon', + 'craig': 'craig', + 'craster': 'craster', + 'cylindrical equal area': 'cylindricalEqualArea', + 'cylindrical stereographic': 'cylindricalStereographic', + 'eckert1': 'eckert1', + 'eckert2': 'eckert2', + 'eckert3': 'eckert3', + 'eckert5': 'eckert5', + 'eckert6': 'eckert6', + 'eisenlohr': 'eisenlohr', + 'fahey': 'fahey', + 'foucaut': 'foucaut', + 'foucaut sinusoidal': 'foucautSinusoidal', + 'gilbert': 'gilbert', + 'gingery': 'gingery', + 'ginzburg4': 'ginzburg4', + 'ginzburg5': 'ginzburg5', + 'ginzburg6': 'ginzburg6', + 'ginzburg8': 'ginzburg8', + 'ginzburg9': 'ginzburg9', + 'gringorten': 'gringorten', + 'guyou': 'guyou', + 'hammer retroazimuthal': 'hammerRetroazimuthal', + 'healpix': 'healpix', + 'hill': 'hill', + 'homolosine': 'homolosine', + 'hufnagel': 'hufnagel', + 'hyperelliptical': 'hyperelliptical', + 'lagrange': 'lagrange', + 'larrivee': 'larrivee', + 'laskowski': 'laskowski', + 'littrow': 'littrow', + 'loximuthal': 'loximuthal', + // 'modified stereographic': 'modifiedStereographic', + 'modified stereographic alaska': 'modifiedStereographicAlaska', + 'modified stereographic gs48': 'modifiedStereographicGs48', + 'modified stereographic gs50': 'modifiedStereographicGs50', + 'modified stereographic miller': 'modifiedStereographicMiller', + 'modified stereographic lee': 'modifiedStereographicLee', + 'mt flat polar parabolic': 'mtFlatPolarParabolic', + 'mt flat polar quartic': 'mtFlatPolarQuartic', + 'mt flat polar sinusoidal': 'mtFlatPolarSinusoidal', + 'natural earth1': 'naturalEarth1', + 'natural earth2': 'naturalEarth2', + 'nell hammer': 'nellHammer', + 'nicolosi': 'nicolosi', + 'patterson': 'patterson', + 'polyconic': 'polyconic', + 'rectangular polyconic': 'rectangularPolyconic', + 'satellite': 'satellite', + 'sinu mollweide': 'sinuMollweide', + 'times': 'times', + // 'two point azimuthal': 'twoPointAzimuthal', + // 'two point azimuthalUsa': 'twoPointAzimuthalUsa', + // 'two point equidistant': 'twoPointEquidistant', + // 'two point equidistantUsa': 'twoPointEquidistantUsa', + 'van der grinten': 'vanDerGrinten', + 'van der grinten2': 'vanDerGrinten2', + 'van der grinten3': 'vanDerGrinten3', + 'van der grinten4': 'vanDerGrinten4', + // 'wagner': 'wagner', + 'wagner4': 'wagner4', + 'wagner6': 'wagner6', + // 'wagner7': 'wagner7', + 'wiechel': 'wiechel', + 'winkel3': 'winkel3', + + // 'interrupt': 'interrupt', + 'interrupted homolosine': 'interruptedHomolosine', + 'interrupted sinusoidal': 'interruptedSinusoidal', + 'interrupted boggs': 'interruptedBoggs', + 'interrupted sinu mollweide': 'interruptedSinuMollweide', + 'interrupted mollweide': 'interruptedMollweide', + 'interrupted mollweide hemispheres': 'interruptedMollweideHemispheres', + 'interrupted quartic authalic': 'interruptedQuarticAuthalic', + + 'polyhedral butterfly': 'polyhedralButterfly', + 'polyhedral collignon': 'polyhedralCollignon', + 'polyhedral waterman': 'polyhedralWaterman', + + 'gringorten quincuncial': 'gringortenQuincuncial', + 'peirce quincuncial': 'peirceQuincuncial', +*/ }; // name of the axes
0
diff --git a/app/classifier/tasks/combo/markings-renderer.jsx b/app/classifier/tasks/combo/markings-renderer.jsx @@ -21,6 +21,9 @@ export default function MarkingsRenderer(props) { } }); + function onChange(annotation) { + props.onChange(Object.assign({}, props.annotation, { value: currentComboAnnotations })); + } return ( <g className="combo-task-persist-inside-subject-container"> @@ -31,9 +34,7 @@ export default function MarkingsRenderer(props) { if (TaskComponent.PersistInsideSubject) { // when a combo annotation changes make sure the combo annotation updated correctly with only the // curreny combo task's annotatons. This is a hack to make drawing tasks work in a combo task. - function fauxChange(annotation) { - props.onChange(Object.assign({}, props.annotation, { value: currentComboAnnotations })); - } + let { annotation } = props; if (annotation && annotation.task && @@ -51,7 +52,7 @@ export default function MarkingsRenderer(props) { <TaskComponent.PersistInsideSubject key={taskType} {...props} - onChange={fauxChange} + onChange={onChange} annotations={allComboAnnotations} annotation={annotation} tasks={props.workflow.tasks}
10
diff --git a/articles/libraries/lock-ios/v2/customization.md b/articles/libraries/lock-ios/v2/customization.md @@ -33,7 +33,7 @@ Blur effect style used. It can be any value defined in `UIBlurEffectStyle`. ```swift .withStyle { - $0.headerBlur = UIBlurEffectStyle.light + $0.headerBlur = .extraLight } ```
3
diff --git a/src/utils/staking.js b/src/utils/staking.js @@ -90,9 +90,8 @@ export class Staking { const { lockupId: _lockupId } = await this.getLockup() lockupId = _lockupId } catch(e) { - console.warn('No lockup account, not loading lockup account state for account', accountId) - if (e.message.indexOf('does not exist while viewing') === -1) { - throw(e) + if (!/No contract for account/.test(e.message)) { + throw e } } return { accountId, lockupId }
3
diff --git a/packages/rmw-shell/cra-template-rmw/template/package.json b/packages/rmw-shell/cra-template-rmw/template/package.json "mui-rff": "^2.5.6", "notistack": "^1.0.1", "nwb": "^0.25.2", + "rmw-shell": "^8.0.0", "raw-loader": "^4.0.2", "react": "^17.0.1", "react-chartjs-2": "^2.10.0", "not op_mini all" ], "devDependencies": { - "rmw-shell": "^8.0.0", "selenium-webdriver": "^4.0.0-alpha.5" } }
3
diff --git a/assets/js/components/wp-dashboard/WPDashboardIdeaHub.stories.js b/assets/js/components/wp-dashboard/WPDashboardIdeaHub.stories.js @@ -44,7 +44,7 @@ const Template = ( { setupRegistry, ...args } ) => ( ); export const Ready = Template.bind( {} ); -Ready.storyName = 'Ready'; +Ready.storyName = 'Idea Hub notice'; Ready.args = { setupRegistry: ( registry ) => { provideSiteInfo( registry, { adminURL: 'http://www.example.com' } ); @@ -55,6 +55,9 @@ Ready.args = { } ] ); }, }; +Ready.parameters = { + features: [ 'ideaHubModule' ], +}; export default { title: 'Views/WPDashboardApp', @@ -64,7 +67,4 @@ export default { return <Story />; }, ], - parameters: { - features: [ 'ideaHubModule' ], - }, };
10
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -6,11 +6,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). This project mirrors major Elm versions. So version 0.18.\* of this project will be compatible with Elm 0.18.\*. +## 0.19.1-revision3 - 2021-01-10 + +### Fixed + +- Pointing to specific test files sometimes failed (see issue [#391](https://github.com/rtfeldman/node-test-runner/issues/391) and fix [#404](https://github.com/rtfeldman/node-test-runner/pull/404)). + ## 0.19.1-revision2 - 2019-10-22 ### Performance -- Update elmi-to-json and use `--for-elm-test` to optimise collection of tests (#396) +- Update elmi-to-json and use `--for-elm-test` to optimise collection of tests (#396). ## 0.19.1 - 2019-12-04
3
diff --git a/Apps/Sandcastle/gallery/development/Polygon Texture Coordinates.html b/Apps/Sandcastle/gallery/development/Polygon Texture Coordinates.html const viewer = new Cesium.Viewer("cesiumContainer"); const scene = viewer.scene; - // Example 1: Draw a small textured polygon on the globe surface. + // Example 1: Small textured polygon. let positions = Cesium.Cartesian3.fromDegreesArray([ -117.4, 37.4, }), }); - // Example 2: Draw a small textured polygon with holes on the globe surface. + // Example 2: Small textured polygon with holes. let polygonHierarchy = { positions: Cesium.Cartesian3.fromDegreesArray([ -116.5, }), }); - // Example 3: Draw a large textured polygon with perPositionHeights. + // Example 3: Large (subdivided) textured polygon with perPositionHeights. polygonHierarchy = { positions: Cesium.Cartesian3.fromDegreesArrayHeights([ -115, }), }); - // Example 4: Draw a large textured polygon on the globe surface (breaks). + // Example 4: Large (subdivided) textured polygon. positions = Cesium.Cartesian3.fromDegreesArray([ -112, 38, }), }); - // Example 5 Draw an extruded polygon (breaks) + // Example 5: Textured extruded polygon. positions = Cesium.Cartesian3.fromDegreesArray([ -109.4, 37.4, }), }); - // Example 6: Draw a textured extruded polygon with perPositionHeights (breaks). + // Example 6: Textured extruded polygon with perPositionHeights. positions = Cesium.Cartesian3.fromDegreesArrayHeights([ -108.4, 37.4, }) ); - // Ground primitive: doesn't work. + // Example 7: Ground primitive - custom texture coordinates are not expected to work, but the polygon should render. positions = Cesium.Cartesian3.fromDegreesArray([ -105,
3
diff --git a/test/v1/examples.test.js b/test/v1/examples.test.js @@ -120,10 +120,10 @@ describe('examples', function() { it('should be able to configure maximum transaction retry time', function () { var neo4j = neo4jv1; - // tag::configuration[] + // tag::configuration-transaction-retry-time[] var maxRetryTimeMs = 45 * 1000; // 45 seconds var driver = neo4j.driver('bolt://localhost:7687', neo4j.auth.basic('neo4j', 'neo4j'), {maxTransactionRetryTime: maxRetryTimeMs}); - //end::configuration[] + //end::configuration-transaction-retry-time[] var session = driver.session(); expect(session._transactionExecutor._maxRetryTimeMs).toBe(maxRetryTimeMs);
10
diff --git a/scripts/tosdr.js b/scripts/tosdr.js @@ -62,6 +62,12 @@ function getSitePoints (sites) { let servicesUrl = `${githubRepo}/services/${site}.json` request.get(servicesUrl, (err, res, body) => { let data = JSON.parse(body) + // some sites lack the 'url' field, but have + // multiple items in the 'urls' field. + if (!data.url && relatedUrls) { + data.url = relatedUrls.shift() + } + if (data.url) { let parsedUrl = tldjs.parse(data.url) processed[parsedUrl.domain] = points
11
diff --git a/project/src/system/Locale.mm b/project/src/system/Locale.mm @@ -16,7 +16,10 @@ namespace lime { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; #endif - NSString* locale = [[NSLocale currentLocale] localeIdentifier]; + NSString* localeLanguage = [[NSLocale preferredLanguages] firstObject]; + NSString* localeRegion = [[NSLocale currentLocale] countryCode]; + NSString* locale = [[localeLanguage stringByAppendingString:@"_"] stringByAppendingString:localeRegion]; + std::string* result = 0; if (locale) {
7
diff --git a/tests/schema/main.spec.js b/tests/schema/main.spec.js @@ -67,6 +67,12 @@ function seed() { } return Promise.all(tasks).catch(e => { + if (test.online) { + console.log('---> failed due connectivity issues?'); + console.log(e.message); + return + } + // FIXME: find a way to debug this console.log('---> Used seeds:', seeds.slice(-10).join(', ') || test.seed); throw e;
8
diff --git a/src/extensions/scratch3_microbit/index.js b/src/extensions/scratch3_microbit/index.js @@ -527,7 +527,7 @@ class Scratch3MicroBitBlocks { */ displayText (args) { const text = String(args.TEXT).substring(0, 19); - this._device.displayText(text); + if (text.length > 0) this._device.displayText(text); return Promise.resolve(); }
8
diff --git a/contracts/FeePool.sol b/contracts/FeePool.sol @@ -765,9 +765,6 @@ contract FeePool is Proxyable, SelfDestructible, LimitedSetup { // If they don't have any debt ownership and they haven't minted, they don't have any fees if (debtEntryIndex == 0 && userOwnershipPercentage == 0) return; - // If there are no XDR synths, then they don't have any fees - if (synthetix.totalIssuedSynths("XDR") == 0) return; - // The [0] fee period is not yet ready to claim, but it is a fee period that they can have // fees owing for, so we need to report on it anyway. uint feesFromPeriod;
2
diff --git a/src/Header.jsx b/src/Header.jsx @@ -425,26 +425,6 @@ export default function Header({ } }, [selectedApp, panelsRef.current]); - const lastEmoteKey = { - key: -1, - timestamp: 0, - }; - const _emoteKey = key => { - const timestamp = performance.now(); - if ((timestamp - lastEmoteKey.timestamp) < 1000) { - const key1 = lastEmoteKey.key; - const key2 = key; - const index = (key1 * 10) + key2; - game.addLocalEmote(index); - - lastEmoteKey.key = -1; - lastEmoteKey.timestamp = 0; - } else { - lastEmoteKey.key = key; - lastEmoteKey.timestamp = timestamp; - } - }; - const _handleNonInputKey = e => { switch (e.which) { case 13: { // enter @@ -486,12 +466,6 @@ export default function Header({ return true; } } - const match = e.code.match(/^Numpad([0-9])$/); - if (match) { - const key = parseInt(match[1], 10); - _emoteKey(key); - return true; - } return false; }; const _handleAnytimeKey = e => {
5
diff --git a/package.json b/package.json "pkg": { "scripts": [ "typeDefs/**/*", - "crew/**/*" + "crew/**/*", + ".env" ], "assets": [ "assets/**/*", }, "eslintConfig": { "extends": "react-app", - "plugins": ["react-hooks"], + "plugins": [ + "react-hooks" + ], "rules": { "jsx-a11y/href-no-hash": "off", "react-hooks/rules-of-hooks": "error" [ "@semantic-release/exec", { - "prepareCmd": "npm run bump ${nextRelease.version} && npm run deploy" + "prepareCmd": "npm run bump ${nextRelease.version} && env && npm run deploy && cat ./build/.env" } ], [
1
diff --git a/token-metadata/0xd55BD2C12B30075b325Bc35aEf0B46363B3818f8/metadata.json b/token-metadata/0xd55BD2C12B30075b325Bc35aEf0B46363B3818f8/metadata.json "symbol": "ZOMBIE", "address": "0xd55BD2C12B30075b325Bc35aEf0B46363B3818f8", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/dom_components/view/ComponentTextView.js b/src/dom_components/view/ComponentTextView.js @@ -72,14 +72,15 @@ module.exports = ComponentView.extend({ model.set('content', content); } else { const clean = model => { + const selectable = !model.is('text'); model.set({ editable: 0, highlightable: 0, removable: 0, draggable: 0, copyable: 0, - selectable: 0, - hoverable: 0, + selectable: selectable, + hoverable: selectable, toolbar: '' }); model.get('components').each(model => clean(model));
7
diff --git a/samples/python/06.using-cards/dialogs/main_dialog.py b/samples/python/06.using-cards/dialogs/main_dialog.py @@ -16,6 +16,7 @@ from botbuilder.schema import ( AnimationCard, AudioCard, HeroCard, + OAuthCard, VideoCard, ReceiptCard, SigninCard, @@ -92,6 +93,8 @@ class MainDialog(ComponentDialog): reply.attachments.append(self.create_audio_card()) elif found_choice == "Hero Card": reply.attachments.append(self.create_hero_card()) + elif found_choice == "OAuth Card": + reply.attachments.append(self.create_oauth_card()) elif found_choice == "Receipt Card": reply.attachments.append(self.create_receipt_card()) elif found_choice == "Signin Card": @@ -106,6 +109,7 @@ class MainDialog(ComponentDialog): reply.attachments.append(self.create_animation_card()) reply.attachments.append(self.create_audio_card()) reply.attachments.append(self.create_hero_card()) + reply.attachments.append(self.create_oauth_card()) reply.attachments.append(self.create_receipt_card()) reply.attachments.append(self.create_signin_card()) reply.attachments.append(self.create_thumbnail_card()) @@ -178,6 +182,20 @@ class MainDialog(ComponentDialog): ) return CardFactory.hero_card(card) + def create_oauth_card(self) -> Attachment: + card = OAuthCard( + text="BotFramework OAuth Card", + connection_name="test.com", + buttons=[ + CardAction( + type=ActionTypes.signin, + title="Sign in", + value="https://example.org/signin", + ) + ], + ) + return CardFactory.oauth_card(card) + def create_video_card(self) -> Attachment: card = VideoCard( title="Big Buck Bunny", @@ -284,6 +302,7 @@ class MainDialog(ComponentDialog): Choice(value="Animation Card", synonyms=["animation"]), Choice(value="Audio Card", synonyms=["audio"]), Choice(value="Hero Card", synonyms=["hero"]), + Choice(value="OAuth Card", synonyms=["auth"]), Choice(value="Receipt Card", synonyms=["receipt"]), Choice(value="Signin Card", synonyms=["signin"]), Choice(value="Thumbnail Card", synonyms=["thumbnail", "thumb"]),
0
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -31,7 +31,7 @@ $ cd packages/app The command takes one argument, the **name** of your new preset: ```bash -$ npm run create-script "My Awesome Preset" +$ npm run create-preset "My Awesome Preset" ``` This will generate a file in `PRESETS_DIR` and `PREVIEWS_DIR`:
4
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md ## Getting Started - Fork the repository on GitHub. -- Read the [Blog writing guideline](GUIDELINES.md) for writing and publishing your blog. +- Read the [blog post writing guideline](GUIDELINES.md) for writing and publishing your blog. - If you find any bug/typo/fix in our existing blog posts, please create a pull request as mentioned in Contribution Flow. ## Contribution Flow @@ -39,7 +39,7 @@ Thanks for your contributions! - The topic must relate to technology/programming/coding. - Post must not be published elsewhere. - The author gets only these link(s) in bio, GitHub, StackOverflow, LinkedIn. -- The post should adhere to our [Blog writing guideline](GUIDELINES.md) +- The post should adhere to our [blog post writing guideline](GUIDELINES.md) Please note we have a code of conduct, please follow it in all your interactions with the project.
7
diff --git a/priv/public/ui/app/mn_admin/mn_admin.html b/priv/public/ui/app/mn_admin/mn_admin.html <a href="classic-index.html" target="_self"> Classic UI </a> - <a href="http://docs.couchbase.com/4.5" target="cbdocs"> + <a href="https://developer.couchbase.com/documentation-archive" target="_blank"> Documentation </a> <a href="{{adminCtl.poolDefault.isEnterprise ? 'http://support.couchbase.com' : 'http://www.couchbase.com/communities/'}}" target="cbforums">
14
diff --git a/src/core/operations/GenerateAllHashes.mjs b/src/core/operations/GenerateAllHashes.mjs @@ -31,6 +31,8 @@ import CRC16Checksum from "./CRC16Checksum"; import CRC32Checksum from "./CRC32Checksum"; import BLAKE2b from "./BLAKE2b"; import BLAKE2s from "./BLAKE2s"; +import Streebog from "./Streebog"; +import GOSTHash from "./GOSTHash"; /** * Generate all hashes operation @@ -97,6 +99,9 @@ class GenerateAllHashes extends Operation { "\nBLAKE2s-128: " + (new BLAKE2s).run(arrayBuffer, ["128", "Hex", {string: "", option: "UTF8"}]) + "\nBLAKE2s-160: " + (new BLAKE2s).run(arrayBuffer, ["160", "Hex", {string: "", option: "UTF8"}]) + "\nBLAKE2s-256: " + (new BLAKE2s).run(arrayBuffer, ["256", "Hex", {string: "", option: "UTF8"}]) + + "\nStreebog-256: " + (new Streebog).run(arrayBuffer, ["256"]) + + "\nStreebog-512: " + (new Streebog).run(arrayBuffer, ["512"]) + + "\nGOST: " + (new GOSTHash).run(arrayBuffer, ["D-A"]) + "\nSSDEEP: " + (new SSDEEP()).run(str) + "\nCTPH: " + (new CTPH()).run(str) + "\n\nChecksums:" +
0
diff --git a/packages/openneuro-app/src/scripts/common/forms/warn-button.jsx b/packages/openneuro-app/src/scripts/common/forms/warn-button.jsx @@ -119,7 +119,7 @@ class WarnButton extends React.Component { toast.error( <ToastContent title={validation.type} - message={validation.message} + body={validation.message} />, { autoClose: validation.timeout ? validation.timeout : 5000 }, ) @@ -155,7 +155,7 @@ class WarnButton extends React.Component { this.setState({ loading: true }) action(e => { if (e && e.error) { - toast.error(<ToastContent title="Error" message={e.error} />) + toast.error(<ToastContent title="Error" body={e.error} />) } if (this._mounted) { this.setState({
1
diff --git a/includes/Core/REST_API/REST_Routes.php b/includes/Core/REST_API/REST_Routes.php @@ -93,6 +93,33 @@ final class REST_Routes { $this->register_routes( $server ); } ); + + add_filter( + 'do_parse_request', + function( $do_parse_request, $wp ) { + add_filter( + 'query_vars', + function( $vars ) use ( $wp ) { + // Unsets standard public query vars to escape conflicts between WorPress core + // and Google Site Kit APIs which happen when WordPress incorrectly parses request + // arguments. + $namespace = rest_get_url_prefix() . '/' . self::REST_ROOT; + if ( substr( $wp->request, 0, strlen( $namespace ) ) === $namespace ) { + // List of variable names to remove from public query variables list. + $unset_vars = array( 'orderby' ); + foreach ( $unset_vars as $unset_var ) { + unset( $vars[ array_search( $unset_var, $vars ) ] ); + } + } + + return $vars; + } + ); + return $do_parse_request; + }, + 10, + 2 + ); } /**
2
diff --git a/articles/connections/social/apple.md b/articles/connections/social/apple.md @@ -30,10 +30,6 @@ Before you add support for SIWA to your app, you'll need: * An [Apple Developer](https://developer.apple.com/programs/) account, which is a paid account with Apple. (There is no free trial available unless you are part of their [iOS Developer University Program](https://developer.apple.com/support/compare-memberships/).). -* A domain to point to and an internet-accessible server where you will run the app that responds on behalf of this domain. You will also need to configure this server with a TLS certificate. Apple won't accept unsecured HTTP connections. - -* (Optional) Domain validation is only required for sending emails to private Apple addresses in native and web apps. To use the Apple Email Relay Service, configure your domain with Sender Policy Framework (SPF) DNS TXT records. - ## How it works Once you have registered your application with Apple and configured your application connection settings in Auth0 to use the IDs and keys obtained from Apple, your users can sign in to your applications using their Apple IDs and passwords.
2
diff --git a/docs/features/gatsby-specs.csv b/docs/features/gatsby-specs.csv @@ -66,5 +66,5 @@ Ecosystem,Ecosystem,Component ecosystem,3,0,3,0,"React has several sets of out-o ,,Hosted option,2,2,3,3,Gatsby and other static site generators can be plugged into static hosts such as Netlify or surge.sh. Wordpress and Squarespace both come with built-in hosting. ,,Theme ecosystem,2,2,3,3,"Gatsby offers various themes through Typography.js, and Jekyll has themes built on it as well. Wordpress and Squarespace offer support for multiple themes through theme selectors out of the box." Design,Faster design iterations,Programmatic Design,2,0,0,0,"Gatsby offers support for programmatic design by being built on <a href=""https://kyleamathews.github.io/typography.js/"">Typography.js</a>." -,,Design systems,2,0,0,0,"Gatsby offers native support for design systems through react-sketch, a tool allowing you to export your production React components into Sketch. Other frameworks aren't plugged into the React ecosystem." -,,Component library,2,0,0,0,"Gatsby offers native support for component libraries through react-sketch, a tool allowing you to export your production React components into Sketch. Other frameworks aren't plugged into the React ecosystem." +,,Design systems,2,0,0,0,"Gatsby offers native support for design systems through react-sketchapp, a tool allowing you to export your production React components into Sketch. Other frameworks aren't plugged into the React ecosystem." +,,Component library,2,0,0,0,"Gatsby offers native support for component libraries through react-sketchapp, a tool allowing you to export your production React components into Sketch. Other frameworks aren't plugged into the React ecosystem."
14
diff --git a/projects/ngx-extended-pdf-viewer/src/lib/theme/common/viewer-with-images.scss b/projects/ngx-extended-pdf-viewer/src/lib/theme/common/viewer-with-images.scss * limitations under the License. */ - ngx-extended-pdf-viewer { + * { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + } + .textLayer { position: absolute; left: 0;
7
diff --git a/packages/idyll-components/src/button.js b/packages/idyll-components/src/button.js @@ -2,8 +2,9 @@ import React from 'react'; class Button extends React.PureComponent { render() { + const { onClick, updateProps, ...props } = this.props; return ( - <button {...props} onClick={this.props.onClick.bind(this)}> + <button {...props} onClick={onClick.bind(this)}> {this.props.children} </button> );
1
diff --git a/source/pool/contracts/Pool.sol b/source/pool/contracts/Pool.sol @@ -18,7 +18,7 @@ pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/access/Ownable.sol"; -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/cryptography/MerkleProof.sol"; @@ -92,7 +92,7 @@ contract Pool is Ownable { * @param claims Claim[] * @param token address */ - function withdraw(Claim[] calldata claims, address token) external { + function withdraw(Claim[] memory claims, address token) external { require(claims.length > 0, "CLAIMS_MUST_BE_PROVIDED"); uint256 totalScore = 0; bytes32[] memory rootList = new bytes32[](claims.length);
9
diff --git a/OurUmbraco/Documentation/DocumentationUpdater.cs b/OurUmbraco/Documentation/DocumentationUpdater.cs @@ -86,7 +86,7 @@ namespace OurUmbraco.Documentation HasChildren = dir.GetDirectories().Any() }; - foreach (var child in dir.GetDirectories().Where(x => x.Name != "images" && x.Name != ".git" && x.Name != ".github")) + foreach (var child in dir.GetDirectories().Where(x => x.Name != "images" && x.Name != ".git" && x.Name != ".github" && x.Name != "Old-Courier-versions")) list.Add(GetFolderStructure(child, rootPath, level + 1)); siteMapItem.Directories = list.OrderBy(x => x.Sort).ToList();
8
diff --git a/components/base-adresse-nationale/commune/index.js b/components/base-adresse-nationale/commune/index.js @@ -14,7 +14,7 @@ function Commune({nomCommune, codeCommune, region, departement, nbNumerosCertifi const [activeTab, setActiveTab] = useState('VOIES') const certificationPercentage = useMemo(() => { const percentage = (nbNumerosCertifies * 100) / nbNumeros - const roundedPercentage = Math.round(percentage * 10) / 10 + const roundedPercentage = Math.floor(percentage * 10) / 10 return roundedPercentage ? String(roundedPercentage).replace('.', ',') : roundedPercentage }, [nbNumerosCertifies, nbNumeros])
14
diff --git a/src/encoded/types/dataset.py b/src/encoded/types/dataset.py @@ -120,7 +120,7 @@ class Dataset(Item): paths_filtered_by_status(request, properties.get('derived_from', [])) ) outside_files = list(derived_from.difference(original_files)) - if status in ('release ready', 'released'): + if status in ('released'): return paths_filtered_by_status( request, outside_files, include=('released',), @@ -140,7 +140,7 @@ class Dataset(Item): }, }) def files(self, request, original_files, status): - if status in ('release ready', 'released', 'archived'): + if status in ('released', 'archived'): return paths_filtered_by_status( request, original_files, include=('released', 'archived'), @@ -213,7 +213,7 @@ class FileSet(Dataset): paths_filtered_by_status(request, properties.get('derived_from', [])) ) outside_files = list(derived_from.difference(files)) - if status in ('release ready', 'released'): + if status in ('released'): return paths_filtered_by_status( request, outside_files, include=('released',), @@ -233,7 +233,7 @@ class FileSet(Dataset): }, }) def files(self, request, original_files, related_files, status): - if status in ('release ready', 'released'): + if status in ('released'): return paths_filtered_by_status( request, chain(original_files, related_files), include=('released',),
2
diff --git a/src/components/appNavigation/AppNavigation.js b/src/components/appNavigation/AppNavigation.js // @flow import { createSwitchNavigator } from '@react-navigation/core' -import { Icon } from 'react-native-elements' +import { Icon, normalize } from 'react-native-elements' import React from 'react' import type { Store } from 'undux' @@ -58,10 +58,14 @@ const routes = { screen: Dashboard, icon: burgerIcon, displayText: false, - iconStyle: { width: 20, maxHeight: 20, marginTop: 20 }, + iconStyle: { + width: normalize(20), + maxHeight: normalize(20), + marginTop: normalize(20) + }, buttonStyle: { marginLeft: 'auto', - marginRight: 30 + marginRight: normalize(30) } } }
0
diff --git a/server/game/cards/02.3-ItFC/HirumaSkirmisher.js b/server/game/cards/02.3-ItFC/HirumaSkirmisher.js @@ -10,7 +10,6 @@ class HirumaSkirmisher extends DrawCard { handler: context => { this.game.addMessage('{0} uses {1}\'s ability to give {1} covert until the end of the phase', this.controller, this); this.untilEndOfPhase(ability => ({ - match: context.target, effect: ability.effects.addKeyword('covert') })); }
3
diff --git a/src/content/community/index.md b/src/content/community/index.md @@ -33,6 +33,7 @@ Hundreds of thousands of Ethereum enthusiasts gather in these online forums to s - [Ethereum Cat Herders](https://discord.gg/tzYmDmF) - _community oriented around offering project management support to Ethereum development_ - [Ethereum Hackers](https://ethglobal.co/discord) - _Discord chat run by [ETHGlobal](https://www.ethglobal.co/): an online community for Ethereum hackers all over the world_ - [CryptoDevs Discord](https://discord.gg/5W5tVb3) - _Ethereum development focused Discord community_ + - [EthStaker Discord](https://discord.io/ethstaker) - _Support for the [Beacon Chain](/eth2/beacon-chain/) staking community_ - [ethereum.org Website Team](https://discord.gg/CetY6Y4) - _Stop by and chat ethereum.org web design with the team and folks from the community_ - Twitter - The Ethereum community is very active on Twitter - not sure where to start?
4
diff --git a/test/unit/specs/components/Identity/createComponent.spec.js b/test/unit/specs/components/Identity/createComponent.spec.js @@ -211,7 +211,6 @@ describe("Identity::createComponent", () => { url: "myurl" }); withConsentDeferred.reject(new Error("My consent error.")); - getIdentityDeferred.reject(new Error("My getIdentity error.")); return expectAsync(commandPromise) .toBeResolvedTo({ url: "myurl" }) .then(() => {
2
diff --git a/js/models/denseMatrix.js b/js/models/denseMatrix.js @@ -237,10 +237,11 @@ function indexGeneResponse(samples, genes, data) { } function indexFieldResponse(fields, resp) { - var [{name, position}, data] = resp, - posMap = _.object(name, position); + var [namePos, data] = resp; return { - position: fields.map(f => posMap[f]), + position: namePos && + _.Let(({name, position} = namePos, posMap = _.object(name, position)) => + fields.map(f => posMap[f])), ...meanNanResponse(fields, data) }; }
9
diff --git a/angular/projects/spark-angular/src/lib/components/sprk-flag/sprk-flag.component.ts b/angular/projects/spark-angular/src/lib/components/sprk-flag/sprk-flag.component.ts @@ -48,7 +48,8 @@ export class SprkFlagComponent { isReversed = false; /** - * The Flag component will use this + * The Flag component will use this to stack + * the element at the `$sprk-flag-stacked-breakpoint` */ @Input() isStacked = false;
3
diff --git a/readme.md b/readme.md @@ -306,6 +306,58 @@ In such cases Immer will fallback to an ES5 compatible implementation which work Read the (second part of the) [introduction blog](https://medium.com/@mweststrate/introducing-immer-immutability-the-easy-way-9d73d8f71cb3). +## Example patterns. + +_For those who have to go back to thinking in object updates :-)_ + +```javscript +import produce from "immer"; + +// object mutations +const todosObj = { + id1: { done: false, body: "Take out the trash" }, + id2: { done: false, body: "Check Email" } +}; + +// add +const addedTodosObj = produce(todosObj, draft => { + draft["id3"] = { done: false, body: "Buy bananas" }; +}); + +// delete +const deletedTodosObj = produce(todosObj, draft => { + delete draft["id1"]; +}); + +// update +const updatedTodosObj = produce(todosObj, draft => { + draft["id1"].done = true; +}); + +// array mutations +const todosArray = [ + { id: "id1", done: false, body: "Take out the trash" }, + { id: "id2", done: false, body: "Check Email" } +]; + +// add +const addedTodosArray = produce(todosArray, draft => { + draft.push({ id: "id3", done: false, body: "Buy bananas" }); +}); + +// delete +const deletedTodosArray = produce(todosArray, draft => { + draft.splice(draft.findIndex(todo => todo.id === "id1"), 1); + // or (slower): + // return draft.filter(todo => todo.id !== "id1") +}); + +// update +const updatedTodosArray = produce(todosArray, draft => { + draft[draft.findIndex(todo => todo.id === "id1")].done = true; +}); +``` + ## Performance Here is a [simple benchmark](__performance_tests__/todo.js) on the performance of Immer.
0
diff --git a/app/models/user.rb b/app/models/user.rb @@ -51,12 +51,6 @@ class User < Sequel::Model 'instagram' => 'http://instagram.com/accounts/manage_access/' }.freeze - INDUSTRIES = ['Academic and Education', 'Architecture and Engineering', 'Banking and Finance', - 'Business Intelligence and Analytics', 'Utilities and Communications', 'GIS and Mapping', - 'Government', 'Health', 'Marketing and Advertising', 'Media, Entertainment and Publishing', - 'Natural Resources', 'Non-Profits', 'Real Estate', 'Software and Technology', - 'Transportation and Logistics'].freeze - JOB_ROLES = ['Founder / Executive', 'Developer', 'Student', 'VP / Director', 'Manager / Lead', 'Personal / Non-professional', 'Media', 'Individual Contributor'].freeze @@ -188,7 +182,6 @@ class User < Sequel::Model errors.add(:org_admin, "cannot be set for non-organization user") end - validates_includes INDUSTRIES, :industry if industry.present? validates_includes JOB_ROLES + DEPRECATED_JOB_ROLES, :job_role if job_role.present? errors.add(:geocoding_quota, "cannot be nil") if geocoding_quota.nil?
2
diff --git a/frontend/src/app/utils/ui-utils.js b/frontend/src/app/utils/ui-utils.js @@ -244,14 +244,7 @@ export function getPoolCapacityBarValues(pool) { } export function countNodesByState(modeCoutners) { - const counters = { - all: 0, - healthy: 0, - offline: 0, - hasIssues: 0 - }; - - return Object.entires(modeCoutners.reduce()).reduce( + return Object.entries(modeCoutners).reduce( (counters, [key, value]) => { counters.all += value; if (key === 'OPTIMAL') { @@ -261,8 +254,9 @@ export function countNodesByState(modeCoutners) { } else { counters.hasIssues += value; } + return counters; }, - counters + { all: 0, healthy: 0, offline: 0, hasIssues: 0 } ); }
1
diff --git a/docs/guides/session_management.md b/docs/guides/session_management.md @@ -55,12 +55,12 @@ const crawler = new Apify.PuppeteerCrawler({ useApifyProxy: true, // Activates the Session pool. useSessionPool: true, - // Overrides default Session pool configuration + // Overrides default Session pool configuration. sessionPoolOptions: { maxPoolSize: 100 }, // Set to true if you want the crawler to save cookies per session, - // and set the cookie header to request automatically.. + // and set the cookie header to request automatically... persistCookiesPerSession: true, handlePageFunction: async ({request, $, session}) => { const title = $("title"); @@ -80,15 +80,82 @@ const crawler = new Apify.PuppeteerCrawler({ **Example usage in [`BasicCrawler`](../api/basiccrawler)** ```javascript -Finish API first + const crawler = new Apify.BasicCrawler({ + requestQueue, + useSessionPool: true, + sessionPoolOptions: { + maxPoolSize: 100 + }, + handleRequestFunction: async ({request, session}) => { + // To use the proxy IP session rotation logic you must turn the proxy usage on. + const proxyUrl = Apify.getApifyProxyUrl({session}); + const requestOptions = { + url: request.url, + proxyUrl, + throwHttpErrors: false, + headers: { + // If you want to use the cookieJar. + // This way you get the Cookie headers string from session. + Cookie: session.getCookieString(), + } + }; + let response; + + try { + response = await Apify.utils.requestAsBrowser(requestOptions); + } catch (e) { + if (e === "SomeNetworkError") { + // If network error happens like timeout, socket hangup etc... + // There is usually a chance that it was just bad luck and the proxy works. + // No need to throw it away. + session.markBad(); + } + throw e; + } + + // Automatically retires the session based on response HTTP status code. + session.retireOnBlockedStatusCodes(response.statusCode); + + if (response.body.blocked) { + // You are sure it is blocking. + // This will trow away the session. + session.retire(); + + } + + // Everything is ok you can get the data. + // No need to call session.markGood -> BasicCrawler calls it for you. + + // If you want to use the CookieJar in session you need. + session.setCookiesFromResponse(response); + + } + }); ``` **Example solo usage** ```javascript -Finish API first -``` +Apify.main(async () => { + const sessionPoolOptions = { + maxPoolSize: 100 + }; + const sessionPool = await Apify.openSessionPool(sessionPoolOptions); + + // Get session + const session = sessionPool.getSession(); + + // Increase the errorScore. + session.markBad(); + + // Throw away the session + session.retire(); + + // Lower the errorScore and marks the session good. + session.markGood(); +}); +``` These are the basics of configuring the SessionPool. Please, bear in mind that the Session pool needs some time to find the working IPs and build up the pool, so you will be probably seeing a lot of errors until it gets stabilized.
7
diff --git a/api/models/usersChannels.js b/api/models/usersChannels.js @@ -171,9 +171,9 @@ const unblockMemberInChannel = (channelId: string, userId: string): Promise<?DBC .run() .then(result => { if (result && result.changes && result.changes.length > 0) { - return db.table('channels').get(channelId); + return db.table('channels').get(channelId).run(); } else { - return; + return null; } }); }; @@ -245,7 +245,7 @@ const createOrUpdatePendingUserInChannel = (channelId: string, userId: string): } }) .then(() => { - return db.table('channels').get(channelId); + return db.table('channels').get(channelId).run(); }); }; @@ -265,7 +265,10 @@ const removePendingUsersInChannel = (channelId: string): Promise<DBChannel> => { .run() .then(result => { const join = result.changes[0].new_val; - return db.table('channels').get(join.channelId); + return db + .table('channels') + .get(join.channelId) + .run(); }); }; @@ -326,7 +329,7 @@ const approvePendingUserInChannel = async (channelId: string, userId: string): P ) .run() .then(() => { - return db.table('channels').get(channelId); + return db.table('channels').get(channelId).run(); }); };
1
diff --git a/articles/tutorials/generic-oauth2-connection-examples.md b/articles/tutorials/generic-oauth2-connection-examples.md @@ -73,19 +73,24 @@ After the call completes successfully, you will be able to login using these new * Copy `Client ID` and `Client Secret` to config file below -``` +```har { - "name": "imgur", - "strategy": "oauth2", - "options": { - "client_id": "YOUR-IMGUR-CLIENT-ID", - "client_secret": "YOUR-IMGUR-CLIENT-SECRET", - "authorizationURL": "https://api.imgur.com/oauth2/authorize", - "tokenURL": "https://api.imgur.com/oauth2/token", - "scripts": { - "fetchUserProfile": "function(accessToken, ctx, cb) { request.get('https://api.imgur.com/3/account/me', { headers: { 'Authorization': 'Bearer ' + accessToken } }, function(e, r, b) { if (e) return cb(e); if (r.statusCode !== 200 ) return cb(new Error('StatusCode: ' + r.statusCode)); var profile = JSON.parse(b).data; profile.user_id = profile.id; cb(null, profile); });}" - } - } + "method": "POST", + "url": "https://YOURACCOUNT.auth0.com/api/v2/connections", + "httpVersion": "HTTP/1.1", + "cookies": [], + "headers": [{ + "name": "Authorization", + "value": "Bearer ABCD" + }], + "queryString": [], + "postData": { + "mimeType": "application/json", + "text": "{ \"name\": \"imgur\", \"strategy\": \"oauth2\", \"options\": { \"client_id\", \"YOUR-IMGUR-CLIENT-ID\", \"client_secret\": \"YOUR-IMGUR-CLIENT-SECRET\", \"authorizationURL\": \"https://api.imgur.com/oauth2/authorize\", \"tokenURL\": \"https://api.imgur.com/oauth2/token\", \"scripts\": { \"fetchUserProfile\": \"function(accessToken, ctx, cb) { request.get('https://api.imgur.com/3/account/me', { headers: { 'Authorization': 'Bearer ' + accessToken } }, function(e, r, b) { if (e) return cb(e); if (r.statusCode !== 200 ) return cb(new Error('StatusCode: ' + r.statusCode)); var profile = JSON.parse(b).data; profile.user_id = profile.id; cb(null, profile); });}" + }, + "headersSize": -1, + "bodySize": -1, + "comment": "" } ```
0
diff --git a/src/Test/Reporter/JUnit.elm b/src/Test/Reporter/JUnit.elm @@ -43,7 +43,8 @@ encodeTest { labels, duration } expectation = in Encode.object ( - [ ( "@name", Encode.string <| String.join " " (List.reverse labels) ) + [ ( "@classname", Encode.string classname ) + , ( "@name", Encode.string name ) , ( "@time", encodeTime duration ) ] ++ (encodeTestcaseFailure expectation) )
4
diff --git a/docs/_sass/main.scss b/docs/_sass/main.scss } &-item { background-color: rgba(siimple-default-color("light"), 0.3); - &:hover { + &:not(.sd-menu--selected):hover { background-color: $siimple-default-white !important; } }
1
diff --git a/packages/component-library/stories/CivicCard.story.js b/packages/component-library/stories/CivicCard.story.js import React, { Fragment } from "react"; // eslint-disable-next-line import/no-extraneous-dependencies import { storiesOf } from "@storybook/react"; -import { CivicCard, LineChart, Collapsable, CivicCardLayoutFull } from "../src"; +import { + CivicCard, + LineChart, + Collapsable, + CivicCardLayoutClassic +} from "../src"; import { civicFormat } from "../src/utils"; const demoData = [ @@ -317,7 +322,7 @@ const demoCardMeta = (/* data */) => ({ export default () => storiesOf("Component Lib|Story Cards/CIVIC Story Card", module) - .add("Default layout", () => ( + .add("Default layout (full)", () => ( <CivicCard cardMeta={demoCardMeta} data={demoData} isLoading={false} /> )) .add("Full layout", () => ( @@ -325,6 +330,6 @@ export default () => cardMeta={demoCardMeta} data={demoData} isLoading={false} - Layout={CivicCardLayoutFull} + Layout={CivicCardLayoutClassic} /> ));
3
diff --git a/example/ionExample.js b/example/ionExample.js @@ -114,7 +114,6 @@ function setupTiles() { // We use unpkg here but in practice should be provided by the application. const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath( 'https://unpkg.com/[email protected]/examples/js/libs/draco/gltf/' ); - dracoLoader.setDecoderConfig( { type: "js" } ); const loader = new GLTFLoader( tiles.manager ); loader.setDRACOLoader( dracoLoader ); @@ -132,9 +131,17 @@ function setupTiles() { } +function isInt( input ) { + + return ( typeof input === 'string' ) ? ! isNaN( input ) && ! isNaN( parseFloat( input, 10 ) ) && Number.isInteger( parseFloat( input, 10 ) ) : Number.isInteger( input ); + +} + function reinstantiateTiles() { - const url = hashUrl || '../data/tileset.json'; + let url = hashUrl || '../data/tileset.json'; + + url = isInt( hashUrl ) ? hashUrl : url; if ( tiles ) {
4
diff --git a/test/units/architecture/group.test.js b/test/units/architecture/group.test.js @@ -51,23 +51,22 @@ describe("Group", function() { // returns {main_group, other_group} function createRandomGroups() { - // this function originated in group.clear(), that explains the names - const cleared_node = new Node(); - cleared_node.id = 0; - const group_to_clear = new Group(10); + // create the most random group to be returned + const main_group = new Group(10); // change the group a bit + // this other group is used to apply functions to main group const other_group = new Group(5); - group_to_clear.connect(other_group); - other_group.connect(group_to_clear); + main_group.connect(other_group); + other_group.connect(main_group); - const random_array = Array(group_to_clear.nodes.length).fill(0).map(() => Math.random()); + const random_array = Array(main_group.nodes.length).fill(0).map(() => Math.random()); - group_to_clear.activate(random_array); - group_to_clear.propagate(random_array); + main_group.activate(random_array); + main_group.propagate(random_array); - return { main_group: group_to_clear, other_group } + return { main_group, other_group } } describe("new Group()", function() {
7
diff --git a/php/base/ArrayCache.php b/php/base/ArrayCache.php @@ -17,7 +17,7 @@ class ArrayCache implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, } public function getIterator() { - return $this->deque->getIterator(); + return $this->deque; } public function JsonSerialize () {
1
diff --git a/extensions/azure-devops/set-toggle-parameter/set-toggle-parameterV1/task.json b/extensions/azure-devops/set-toggle-parameter/set-toggle-parameterV1/task.json { "id": "83BAA888-44E5-4B12-A2BD-0B7B16A37201", - "name": "esquio-set-toggle-parameter", + "name": "set-toggle-parameter", "friendlyName": "Set toggle parameter with Esquio", "description": "Use this task to set the value for a toggle parameter with Esquio", "helpMarkDown": "",
10
diff --git a/src/plots/cartesian/dragbox.js b/src/plots/cartesian/dragbox.js @@ -601,8 +601,8 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) { else if(yActive === 's') dy = dz(yaxes, 0, -dy); else if(!yActive) dy = 0; - var x0 = (xActive === 'w') ? dx : 0; - var y0 = (yActive === 'n') ? dy : 0; + var xStart = (xActive === 'w') ? dx : 0; + var yStart = (yActive === 'n') ? dy : 0; if(links.isSubplotConstrained) { var i; @@ -614,7 +614,7 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) { scaleZoom(xaxes[i], 1 - dy / ph); } dx = dy * pw / ph; - x0 = dx / 2; + xStart = dx / 2; } if(!yActive && xActive.length === 1) { for(i = 0; i < yaxes.length; i++) { @@ -622,13 +622,13 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) { scaleZoom(yaxes[i], 1 - dx / pw); } dy = dx * ph / pw; - y0 = dy / 2; + yStart = dy / 2; } } updateMatchedAxRange('x'); updateMatchedAxRange('y'); - updateSubplots([x0, y0, pw - dx, ph - dy]); + updateSubplots([xStart, yStart, pw - dx, ph - dy]); ticksAndAnnotations(); }
10
diff --git a/src/components/_classes/component/Component.js b/src/components/_classes/component/Component.js @@ -157,7 +157,9 @@ export default class Component extends Element { /** * If this component should implement a strict date validation if the Calendar widget is implemented. */ - strictDateValidation: false + strictDateValidation: false, + multiple: false, + unique: false }, /**
12
diff --git a/docs/example-react-redux.md b/docs/example-react-redux.md @@ -103,13 +103,13 @@ import { initialState, reducer } from './reducer.js' import Counter from './counter.js' test('can render with redux with defaults', () => { - renderWithRedux(<Counter />) + render(<Counter />) fireEvent.click(screen.getByText('+')) expect(screen.getByTestId('count-value')).toHaveTextContent('1') }) test('can render with redux with custom initial state', () => { - renderWithRedux(<Counter />, { + render(<Counter />, { initialState: { count: 3 }, }) fireEvent.click(screen.getByText('-')) @@ -119,7 +119,7 @@ test('can render with redux with custom initial state', () => { test('can render with redux with custom store', () => { // this is a silly store that can never be changed const store = createStore(() => ({ count: 1000 })) - renderWithRedux(<Counter />, { + render(<Counter />, { store, }) fireEvent.click(screen.getByText('+'))
4
diff --git a/src/govuk/components/select/_index.scss b/src/govuk/components/select/_index.scss // This min-width was chosen because: // - it makes the Select noticeably wider than it is taller (which is what users expect) - // - 23ex matches the 'length-10' variant of the input component + // - 11.5em matches the 'length-10' variant of the input component // - it fits comfortably on screens as narrow as 240px wide - min-width: 23ex; + max-width: 11.5em; max-width: 100%; height: 40px; @if $govuk-typography-use-rem {
14
diff --git a/docs/proxy-tutorial.md b/docs/proxy-tutorial.md # Introduction In this tutorial we will create a simple paywalled server that will serve some -static files as well as dynamically generated responses, payable with the -Raiden Network Token. You can find example code for this tutorial in +static files as well as dynamically generated responses, payable with a +custom token. You can find example code for this tutorial in `raiden_mps/examples/echo_server.py`. # Requirements
10
diff --git a/lib/assets/core/test/spec/cartodb3/editor/editor-pane.spec.js b/lib/assets/core/test/spec/cartodb3/editor/editor-pane.spec.js @@ -210,7 +210,7 @@ describe('editor/editor-view', function () { }); it('should have two subviews', function () { - expect(_.size(this.view._subviews)).toBe(2); + expect(_.size(this.view._subviews)).toBe(3); }); describe('._onLayerCollectionAdd', function () {
3
diff --git a/Specs/Scene/SchemaCacheResourceSpec.js b/Specs/Scene/SchemaCacheResourceSpec.js import { + CacheResourceState, Resource, ResourceCacheKey, SchemaCacheResource, @@ -94,6 +95,8 @@ describe("Scene/SchemaCacheResource", function () { }); cacheResource.load(); + expect(cacheResource.cacheKey).toBe(cacheKey); + return cacheResource.promise.then(function (cacheResource) { var schema = cacheResource.schema; expect(schema).toBeDefined(); @@ -115,6 +118,8 @@ describe("Scene/SchemaCacheResource", function () { cacheKey: cacheKey, }); + expect(cacheResource.cacheKey).toBe(cacheKey); + var fetchJson = spyOn(Resource.prototype, "fetchJson").and.returnValue( when.resolve(schemaJson) ); @@ -157,4 +162,26 @@ describe("Scene/SchemaCacheResource", function () { expect(cacheResource.schema).not.toBeDefined(); }); }); + + it("handles unload before load finishes", function () { + var cacheKey = ResourceCacheKey.getSchemaCacheKey({ + resource: resource, + }); + var cacheResource = new SchemaCacheResource({ + resource: resource, + cacheKey: cacheKey, + }); + + expect(cacheResource.schema).not.toBeDefined(); + + var deferred = when.defer(); + spyOn(Resource.prototype, "fetchJson").and.returnValue(deferred); + + cacheResource.load(); + cacheResource.unload(); + deferred.resolve(schemaJson); + + expect(cacheResource.schema).not.toBeDefined(); + expect(cacheResource._state).toBe(CacheResourceState.UNLOADED); + }); });
7
diff --git a/lib/determine-basal/determine-basal.js b/lib/determine-basal/determine-basal.js @@ -185,8 +185,8 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ return rT; } - // min_bg of 90 -> threshold of 70, 110 -> 80, and 130 -> 90 - var threshold = min_bg - 0.5*(min_bg-50); + // min_bg of 90 -> threshold of 65, 100 -> 70 110 -> 75, and 130 -> 85 + var threshold = min_bg - 0.5*(min_bg-40); //console.error(reservoir_data); var deliverAt = new Date();
11
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -33,33 +33,88 @@ import { import {scene, getRenderer} from '../renderer.js'; const bgVertexShader = `\ - varying vec2 vUv; + varying vec2 tex_coords; void main() { - vUv = uv; - gl_Position = vec4(position, 1.); + tex_coords = uv; + gl_Position = vec4(position.xy, 1., 1.); } `; const bgFragmentShader = `\ - varying vec2 vUv; + varying vec4 v_colour; + varying vec2 tex_coords; + + uniform sampler2D t0; + uniform float outline_thickness; + uniform vec3 outline_colour; + uniform float outline_threshold; + + #define pixel gl_FragColor + #define PI 3.1415926535897932384626433832795 void main() { - gl_FragColor = vec4(vUv, 0., 1.); + // if (pixel.a <= outline_threshold) { + // ivec2 sizeInt = textureSize(t0, 0); + // vec2 size = vec2(sizeInt.x, sizeInt.y); + + // float uv_x = tex_coords.x * size.x; + // float uv_y = tex_coords.y * size.y; + + float sum = 0.0; + int passes = 64; + float passesFloat = float(passes); + float angleStep = 2.0 * PI / passesFloat; + for (int i = 0; i < passes; ++i) { + float n = float(i); + float angle = angleStep * n; + + vec2 uv = tex_coords + vec2(cos(angle), sin(angle)) * outline_thickness; + sum += texture(t0, uv).a; // / passesFloat; } + + if (sum > 0.) { + pixel = vec4(outline_colour, 1); + } else { + pixel = texture(t0, tex_coords); + } + // } + } + + /* void main() { + gl_FragColor = vec4(vUv, 0., 1.); + } */ `; const bgMesh1 = (() => { const quad = new THREE.Mesh( new THREE.PlaneGeometry(2, 2), new THREE.ShaderMaterial({ + uniforms: { + t0: { + value: null, + needsUpdate: false, + }, + outline_thickness: { + value: 0.02, + needsUpdate: true, + }, + outline_colour: { + value: new THREE.Color(0, 0, 1), + needsUpdate: true, + }, + outline_threshold: { + value: .5, + needsUpdate: true, + }, + }, vertexShader: bgVertexShader, fragmentShader: bgFragmentShader, depthWrite: false, depthTest: false, }) ); - quad.material.onBeforeCompile = shader => { + /* quad.material.onBeforeCompile = shader => { console.log('got full screen shader', shader); - }; + }; */ quad.frustumCulled = false; return quad; })(); @@ -116,6 +171,7 @@ const outlineMaterial = (() => { const mmdCanvases = []; const mmdCanvasContexts = []; +const avatarRenderTargets = []; const animationFileNames = `\ 'Running' by CorruptedDestiny/2.vpd 'Running' by CorruptedDestiny/3.vpd @@ -2952,14 +3008,15 @@ class Avatar { // push old state const oldParent = this.model.parent; + const oldRenderTarget = renderer.getRenderTarget(); const oldViewport = renderer.getViewport(new THREE.Vector4()); const oldWorldLightParent = world.lights.parent; // setup + const sideAvatarScene = new THREE.Scene(); + sideAvatarScene.overrideMaterial = outlineMaterial; + const sideScene = new THREE.Scene(); - sideScene.overrideMaterial = outlineMaterial; - sideScene.add(this.model); - sideScene.add(world.lights); sideScene.add(bgMesh1); const sideCamera = new THREE.PerspectiveCamera(); @@ -2993,7 +3050,31 @@ class Avatar { document.body.appendChild(mmdCanvas); } + let avatarRenderTarget = avatarRenderTargets[i]; + if (!avatarRenderTarget) { + const pixelRatio = renderer.getPixelRatio(); + avatarRenderTarget = new THREE.WebGLRenderTarget(sideSize * pixelRatio, sideSize * pixelRatio, { + minFilter: THREE.LinearFilter, + magFilter: THREE.LinearFilter, + format: THREE.RGBAFormat, + }); + avatarRenderTargets[i] = avatarRenderTarget; + } + // set up side avatar scene + sideAvatarScene.add(this.model); + sideAvatarScene.add(world.lights); + // render side avatar scene + renderer.setRenderTarget(avatarRenderTarget); + renderer.clear(); + renderer.render(sideAvatarScene, sideCamera); + // set up side scene + sideScene.add(this.model); + sideScene.add(world.lights); + bgMesh1.material.uniforms.t0.value = avatarRenderTarget.texture; + bgMesh1.material.uniforms.t0.needsUpdate = true; + // render side scene + renderer.setRenderTarget(oldRenderTarget); renderer.setViewport(0, 0, sideSize, sideSize); renderer.clear(); renderer.render(sideScene, sideCamera); @@ -3013,6 +3094,7 @@ class Avatar { } else { world.lights.parent.remove(world.lights); } + // renderer.setRenderTarget(oldRenderTarget); renderer.setViewport(oldViewport); }
0
diff --git a/coral-component-dialog/src/scripts/Dialog.js b/coral-component-dialog/src/scripts/Dialog.js @@ -692,6 +692,7 @@ const Dialog = Decorator(class extends BaseOverlay(BaseComponent(HTMLElement)) { super.render(); this.classList.add(`${CLASSNAME}-wrapper`); + this.setAttribute("aria-modal", "dialog"); // Default reflected attributes if (!this._variant) {
1
diff --git a/generators/client/templates/angular/src/main/webapp/app/login/login.component.ts.ejs b/generators/client/templates/angular/src/main/webapp/app/login/login.component.ts.ejs @@ -76,7 +76,7 @@ export class LoginComponent implements OnInit, AfterViewInit, OnDestroy { } }, () => { - (this.authenticationError = true); + this.authenticationError = true; } ); }
2
diff --git a/assets/js/components/sparkline.js b/assets/js/components/sparkline.js @@ -71,7 +71,7 @@ class Sparkline extends Component { }, axes: [], colors: [ - 0 <= parseFloat( change ) ? positiveColor : negativeColor, + 0 <= ( parseFloat( change ) || 0 ) ? positiveColor : negativeColor, ], }; @@ -92,7 +92,7 @@ class Sparkline extends Component { } Sparkline.propTypes = { - instanceId: PropTypes.string.isRequired, + instanceId: PropTypes.number.isRequired, invertChangeColor: PropTypes.bool, loadSmall: PropTypes.bool, loadCompressed: PropTypes.bool,
4
diff --git a/package.json b/package.json "dependencies": { "better-simple-slideshow": "linkeddata/better-simple-slideshow#gh-pages", "mime-types": "^2.1.13", - "solid-ui": "<=0.8.0" + "solid-ui": ">=0.8.0" }, "devDependencies": { "babel-cli": "^6.24.1",
11
diff --git a/source/background/library/contextMenu.js b/source/background/library/contextMenu.js import { createNewTab, getCurrentTab, getExtensionURL, sendTabMessage } from "../../shared/library/extension.js"; import { getBrowser } from "../../shared/library/browser.js"; import { lastPassword } from "./lastGeneratedPassword.js"; +import { getFacades } from "./archives.js"; const CONTEXT_SHARED_ALL = { contexts: ["all"] @@ -11,7 +12,23 @@ const CONTEXT_SHARED_EDITABLE = { let __menu = null; -export function updateContextMenu() { +async function buildEntryExplorerMenu(parentMenu) { + const facades = await getFacades(); + if (facades.length === 0) { + chrome.contextMenus.create({ + title: "No vaults available", + parentId: parentMenu, + enabled: false, + ...CONTEXT_SHARED_EDITABLE + }); + return; + } + facades.forEach(archiveFacade => { + console.log(archiveFacade); + }); +} + +async function performUpdate() { // ** // ** Init // ** @@ -103,4 +120,14 @@ export function updateContextMenu() { }, ...CONTEXT_SHARED_EDITABLE }); + const enterLoginMenu = chrome.contextMenus.create({ + title: "Enter login details", + parentId: __menu, + ...CONTEXT_SHARED_EDITABLE + }); + buildEntryExplorerMenu(enterLoginMenu); +} + +export function updateContextMenu() { + performUpdate(); }
6
diff --git a/articles/compliance/gdpr/features-aiding-compliance/user-consent/track-consent-with-lock.md b/articles/compliance/gdpr/features-aiding-compliance/user-consent/track-consent-with-lock.md @@ -22,9 +22,9 @@ We will capture consent information, under various scenarios, and save this at t ``` We will see three different implementations for this: -- one that displays a flag and works for database connections -- one that displays a flag and works for social connections - one that displays links to other pages where the Terms & Conditions and/or privacy policy information can be reviewed +- one that adds custom fields at the signup widget and works for database connections +- one that redirects to another page where the user can provide consent, and works for social connections All implementations will have the same final result, a `consentGiven` property saved at the user's metadata.
3
diff --git a/test/specs/helpers.dom.tests.js b/test/specs/helpers.dom.tests.js @@ -317,10 +317,9 @@ describe('DOM helpers tests', function() { }; const rect = chart.canvas.getBoundingClientRect(); - expect(helpers.getRelativePosition(event, chart)).toEqual({ - x: Math.round(event.clientX - rect.x), - y: Math.round(event.clientY - rect.y) - }); + const pos = helpers.getRelativePosition(event, chart); + expect(Math.abs(pos.x - Math.round(event.clientX - rect.x))).toBeLessThanOrEqual(1); + expect(Math.abs(pos.y - Math.round(event.clientY - rect.y))).toBeLessThanOrEqual(1); const chart2 = window.acquireChart({}, { canvas: { @@ -330,10 +329,9 @@ describe('DOM helpers tests', function() { } }); const rect2 = chart2.canvas.getBoundingClientRect(); - expect(helpers.getRelativePosition(event, chart2)).toEqual({ - x: Math.round((event.clientX - rect2.x - 10) / 180 * 200), - y: Math.round((event.clientY - rect2.y - 10) / 180 * 200) - }); + const pos2 = helpers.getRelativePosition(event, chart2); + expect(Math.abs(pos2.x - Math.round((event.clientX - rect2.x - 10) / 180 * 200))).toBeLessThanOrEqual(1); + expect(Math.abs(pos2.y - Math.round((event.clientY - rect2.y - 10) / 180 * 200))).toBeLessThanOrEqual(1); const chart3 = window.acquireChart({}, { canvas: { @@ -343,10 +341,9 @@ describe('DOM helpers tests', function() { } }); const rect3 = chart3.canvas.getBoundingClientRect(); - expect(helpers.getRelativePosition(event, chart3)).toEqual({ - x: Math.round((event.clientX - rect3.x - 10) / 360 * 400), - y: Math.round((event.clientY - rect3.y - 10) / 360 * 400) - }); + const pos3 = helpers.getRelativePosition(event, chart3); + expect(Math.abs(pos3.x - Math.round((event.clientX - rect3.x - 10) / 360 * 400))).toBeLessThanOrEqual(1); + expect(Math.abs(pos3.y - Math.round((event.clientY - rect3.y - 10) / 360 * 400))).toBeLessThanOrEqual(1); }); }); });
11