code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb b/src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb @@ -1232,10 +1232,11 @@ class VirtualMachine < VCenterDriver::Template
unmanaged_nics.each do |unic|
vnic = select.call(unic['BRIDGE'])
- if unic['MODEL'] && !unic['MODEL'].empty? && !unic['MODEL'].nil?
vcenter_nic_class = vnic.class
- opennebula_nic_class = nic_model_class(unic['MODEL'])
- if vcenter_nic_class != opennebula_nic_class
+ new_model = unic['MODEL'] && !unic['MODEL'].empty? && !unic['MODEL'].nil?
+ opennebula_nic_class = nic_model_class(unic['MODEL']) if new_model
+
+ if new_model && opennebula_nic_class != vcenter_nic_class
# delete actual nic and update the new one.
device_change << { :device => vnic, :operation => :remove }
device_change << calculate_add_nic_spec(unic)
@@ -1243,10 +1244,6 @@ class VirtualMachine < VCenterDriver::Template
vnic.macAddress = unic['MAC']
device_change << { :device => vnic, :operation => :edit }
end
- else
- vnic.macAddress = unic['MAC']
- device_change << { :device => vnic, :operation => :edit }
- end
end
end
rescue Exception => e
| 7 |
diff --git a/admin-base/materialize/custom/_explorer.scss b/admin-base/materialize/custom/_explorer.scss .toggle-fullscreen {
position: absolute;
right: 0;
- top: 0;
+ top: 1.25rem;
border: 0;
background: none;
padding: 0;
.material-icons {
- font-size: 30px;
- color: color("blue-grey", "base");
+ font-size: 34px;
+ color: color("blue-grey", "darken-2");
transition: color .1s ease-in-out;
}
&:hover,
&:focus,
&:active {
.material-icons {
- color: color("blue-grey", "darken-2");
+ color: color("blue-grey", "base");
}
}
}
left: 0;
bottom: 0;
width: 100%;
- padding: 0.75rem;
+ padding: 0 0.75rem;
background-color: color("blue-grey", "lighten-5");
overflow: auto;
+ .toggle-fullscreen {
+ right: 0.75rem;
+ }
}
&.narrow {
| 7 |
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml @@ -50,11 +50,14 @@ jobs:
test-try:
name: Scenario Tests
runs-on: ubuntu-latest
+ continue-on-error: ${{ matrix.allow-failure || false }}
needs:
- test
strategy:
fail-fast: false
matrix:
+ allow-failure:
+ - false
scenario:
- ember-lts-3.16
- ember-release
@@ -71,7 +74,9 @@ jobs:
command: ember test --launch Firefox
- scenario: node-tests
- scenario: embroider-safe
+ allow-failure: true
- scenario: embroider-optimized
+ allow-failure: true
steps:
- name: Checkout code
uses: actions/checkout@v2
| 11 |
diff --git a/policykit/integrations/slack/views.py b/policykit/integrations/slack/views.py @@ -156,6 +156,9 @@ def oauth(request):
response = redirect('/login?success=true')
return response
+def is_policykit_bot_action(community, event):
+ return event.get('user') == community.bot_id
+
def is_policykit_action(integration, test_a, test_b, api_name):
current_time_minus = datetime.datetime.now() - datetime.timedelta(seconds=2)
logs = LogAPICall.objects.filter(proposal_time__gte=current_time_minus,
@@ -169,26 +172,8 @@ def is_policykit_action(integration, test_a, test_b, api_name):
return False
-@csrf_exempt
-def action(request):
- json_data = json.loads(request.body)
- logger.info('RECEIVED ACTION')
- logger.info(json_data)
- action_type = json_data.get('type')
-
- if action_type == "url_verification":
- challenge = json_data.get('challenge')
- return HttpResponse(challenge)
-
- elif action_type == "event_callback":
- event = json_data.get('event')
- team_id = json_data.get('team_id')
- community = SlackCommunity.objects.get(team_id=team_id)
- admin_user = SlackUser.objects.filter(is_community_admin=True)[0]
-
+def maybe_create_new_api_action(community, event):
new_api_action = None
- policy_kit_action = False
-
if event.get('type') == "channel_rename":
if not is_policykit_action(community, event['channel']['name'], 'name', SlackRenameConversation.ACTION):
new_api_action = SlackRenameConversation()
@@ -229,7 +214,6 @@ def action(request):
new_api_action.users = event.get('user')
new_api_action.channel = event['channel']
-
elif event.get('type') == 'pin_added':
if not is_policykit_action(community, event['channel_id'], 'channel', SlackPinMessage.ACTION):
new_api_action = SlackPinMessage()
@@ -241,8 +225,32 @@ def action(request):
new_api_action.channel = event['channel_id']
new_api_action.timestamp = event['item']['message']['ts']
+ return new_api_action
+
+@csrf_exempt
+def action(request):
+ json_data = json.loads(request.body)
+ logger.info('RECEIVED ACTION')
+ logger.info(json_data)
+ action_type = json_data.get('type')
+
+ if action_type == "url_verification":
+ challenge = json_data.get('challenge')
+ return HttpResponse(challenge)
+
+ elif action_type == "event_callback":
+ event = json_data.get('event')
+ team_id = json_data.get('team_id')
+ community = SlackCommunity.objects.get(team_id=team_id)
+ admin_user = SlackUser.objects.filter(is_community_admin=True)[0]
+
+ new_api_action = None
+ if not is_policykit_bot_action(community, event):
+ new_api_action = maybe_create_new_api_action(community, event)
+
+ if new_api_action is not None:
if new_api_action.initiator.has_perm('slack.add_' + new_api_action.action_codename):
- if new_api_action and not policy_kit_action:
+ if new_api_action:
#if they have execute permission, skip all policies
if new_api_action.initiator.has_perm('slack.can_execute_' + new_api_action.action_codename):
new_api_action.execute()
@@ -261,6 +269,8 @@ def action(request):
p = Proposal.objects.create(status=Proposal.FAILED,
author=new_api_action.initiator)
new_api_action.proposal = p
+ else:
+ logger.info(f"No PlatformAction created for event '{event.get('type')}'")
if event.get('type') == 'reaction_added':
ts = event['item']['ts']
| 8 |
diff --git a/Bundle/PageBundle/Helper/PageHelper.php b/Bundle/PageBundle/Helper/PageHelper.php @@ -210,7 +210,7 @@ class PageHelper
if ($result instanceof Redirection) {
return new RedirectResponse($this->container->get('victoire_widget.twig.link_extension')->victoireLinkUrl(
$result->getLink()->getParameters()
- ));
+ ), Response::HTTP_MOVED_PERMANENTLY);
} elseif ($result->getRedirection()) {
return new RedirectResponse($this->container->get('victoire_widget.twig.link_extension')->victoireLinkUrl(
$result->getRedirection()->getLink()->getParameters()
| 12 |
diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts @@ -63,10 +63,10 @@ export interface MiddlewareData {
}>;
};
hide?: {
- referenceHidden: boolean;
- escaped: boolean;
- referenceHiddenOffsets: SideObject;
- escapedOffsets: SideObject;
+ referenceHidden?: boolean;
+ escaped?: boolean;
+ referenceHiddenOffsets?: SideObject;
+ escapedOffsets?: SideObject;
};
offset?: Coords;
shift?: Coords;
| 1 |
diff --git a/src/parsers/GmlSeeker.hx b/src/parsers/GmlSeeker.hx @@ -50,7 +50,7 @@ class GmlSeeker {
private static var jsDoc_full = new RegExp("^///\\s*" // start
+ "(?:@desc(?:ription)?\\s+)?" // opt: "@desc "
- + "\\w+(\\(.+)");
+ + "\\w*[ \t]*(\\(.+)");
private static var jsDoc_param = new RegExp("^///\\s*@(?:arg|param|argument)"
+ "\\s+(\\S+(?:\\s+=.+)?)");
private static var gmlDoc_full = new RegExp("^\\s*\\w*\\s*\\(.*\\)");
| 11 |
diff --git a/articles/quickstart/spa/angular-beta/_includes/_centralized_login.md b/articles/quickstart/spa/angular-beta/_includes/_centralized_login.md <!-- markdownlint-disable MD041 MD034 MD002 -->
-<%= include('../../_includes/_login_preamble', { library: 'Angular 7+', embeddedLoginLink: 'https://github.com/auth0-samples/auth0-spa-js-angular-samples/tree/master/01-Login'}) %>
+<%= include('../../_includes/_login_preamble', { library: 'Angular 7+' }) %>
This tutorial will guide you in modifying an Angular application to support login using Auth0, that demonstrates how users can log in, log out, and how to view their profile information. It will also show you how to protect routes from unauthenticated users.
| 2 |
diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml @@ -45,3 +45,4 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.get_asset.outputs.asset_path }}
asset_name: $(basename ${{ steps.name_asset.outputs.asset_path }})
+ asset_content_type: application/gzip
| 12 |
diff --git a/src/components/stripeCardForm/form.js b/src/components/stripeCardForm/form.js @@ -38,7 +38,10 @@ class Form extends React.Component<Props, State> {
this.setState({ isLoading: true });
const communityId = this.props.community.id;
- const { id: sourceId } = await this.createSource();
+ const source = await this.createSource();
+
+ if (!source) return this.setState({ isLoading: false });
+ const { id: sourceId } = source;
const input = {
communityId,
| 9 |
diff --git a/src/1_utils.js b/src/1_utils.js @@ -952,11 +952,11 @@ utils.removePropertiesFromObject = function(objectToModify, keysToRemove) {
}
};
-utils.getPropertyValueByNameFromObject = function(object, name) {
- if (object && typeof object === "object") {
- for (var key in object) {
- if (object.hasOwnProperty(key) && key===name) {
- return object[key];
+utils.getPropertyValueByNameFromObj = function(objectToSearch, name) {
+ if (objectToSearch && typeof objectToSearch === "object") {
+ for (var key in objectToSearch) {
+ if (objectToSearch.hasOwnProperty(key) && key===name) {
+ return objectToSearch[key];
}
}
}
| 10 |
diff --git a/test/unit/specs/root.spec.js b/test/unit/specs/root.spec.js -const { join } = require(`path`)
-const { homedir } = require(`os`)
+const { join, resolve } = require(`path`)
const mockFsExtra = require(`../helpers/fs-mock`).default
describe(`Root UI Directory`, () => {
@@ -24,7 +23,10 @@ describe(`Root UI Directory`, () => {
it(`should create the correct path`, () => {
let root = require(`../../../app/src/root.js`)
- expect(root).toBe(join(homedir(), `.cosmos-voyager-dev/gaia-6002`))
+ const appDir = resolve(`${__dirname}/../../../`)
+ expect(root).toBe(
+ join(`${appDir}/builds/testnets/gaia-6002/cosmos-voyager-dev`)
+ )
})
it(`should use COSMOS_HOME as default`, () => {
| 3 |
diff --git a/world.js b/world.js @@ -505,6 +505,19 @@ world.getWorldJson = async q => {
return spec;
};
+world.getObjectFromPhysicsId = physicsId => {
+ const objects = world.getObjects().concat(world.getStaticObjects());
+ for (const object of objects) {
+ if (object.getPhysicsIds) {
+ const physicsIds = object.getPhysicsIds();
+ if (physicsIds.includes(physicsId)) {
+ return object;
+ }
+ }
+ }
+ return null;
+};
+
let animationMediaStream = null
let networkMediaStream = null;
const _latchMediaStream = async () => {
| 0 |
diff --git a/token-metadata/0x6f259637dcD74C767781E37Bc6133cd6A68aa161/metadata.json b/token-metadata/0x6f259637dcD74C767781E37Bc6133cd6A68aa161/metadata.json "symbol": "HT",
"address": "0x6f259637dcD74C767781E37Bc6133cd6A68aa161",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/test/utils/custom-asymmetric-matchers.js b/test/utils/custom-asymmetric-matchers.js /**
* We make ourselves compatible with AsymmetricMatcher class used by Jest
- * @see https://github.com/facebook/jest/blob/master/packages/expect/src/asymmetric_matchers.js
+ * @see https://github.com/facebook/jest/blob/master/packages/expect/src/asymmetricMatchers.ts
*
* Perhaps we can simplify that a bit and write only Jasmine-compatible matchers.
* @see https://jasmine.github.io/2.4/introduction.html#section-Custom_asymmetric_equality_tester
| 3 |
diff --git a/content/questions/merge-two-arrays/index.md b/content/questions/merge-two-arrays/index.md @@ -27,8 +27,6 @@ console.log([...a, ...b]);
console.log(a + b);
```
-
-
<!-- explanation -->
-Option C in this case is the right choice, because the arithmetic operator `+` only works for numeric values and not arrays.
+Option C does not properly merge the arrays, because the arithmetic operator `+` only sensibly applies to strings and numbers. Any side of a `+` which refers to something other than a string or number will be converted into a string first, so this would result in the string `'1,2,3'` being concatenated with the string `'4,5,6'`, or `'1,2,34,5,6'`.
| 2 |
diff --git a/assets/js/modules/adsense/components/common/UseSnippetSwitch.js b/assets/js/modules/adsense/components/common/UseSnippetSwitch.js * External dependencies
*/
import PropTypes from 'prop-types';
+import { useUpdateEffect } from 'react-use';
/**
* WordPress dependencies
@@ -62,17 +63,14 @@ export default function UseSnippetSwitch( props ) {
const { setUseSnippet, saveSettings } = useDispatch( MODULES_ADSENSE );
const onChange = useCallback( async () => {
setUseSnippet( ! useSnippet );
- trackEvent( eventCategory, useSnippet ? 'enable_tag' : 'disable_tag' );
if ( saveOnChange ) {
await saveSettings();
}
- }, [
- eventCategory,
- useSnippet,
- saveOnChange,
- setUseSnippet,
- saveSettings,
- ] );
+ }, [ useSnippet, saveOnChange, setUseSnippet, saveSettings ] );
+
+ useUpdateEffect( () => {
+ trackEvent( eventCategory, useSnippet ? 'enable_tag' : 'disable_tag' );
+ }, [ eventCategory, useSnippet ] );
if ( undefined === useSnippet ) {
return null;
| 4 |
diff --git a/frameworks/non-keyed/incr_dom/src/Util.re b/frameworks/non-keyed/incr_dom/src/Util.re open! Core_kernel;
-let random = max => Random.int(max);
-
let adjectives = [|
"pretty",
"large",
@@ -84,17 +82,17 @@ let makeBy = (count_, maker) => {
};
let build_data_impl = () => {
- let state = ref(1);
+ let state = ref(0);
let impl = count => {
let makeitem = n => {
id: n + state^,
label:
- adjectives[random(Array.length(adjectives))]
+ Array.random_element_exn(adjectives)
++ " "
- ++ colours[random(Array.length(colours))]
+ ++ Array.random_element_exn(colours)
++ " "
- ++ names[random(Array.length(names))],
+ ++ Array.random_element_exn(names),
};
let generated = makeBy(count, makeitem);
| 4 |
diff --git a/src/nls/root/strings.js b/src/nls/root/strings.js @@ -812,5 +812,5 @@ define({
"DESCRIPTION_RECENT_FILES_NAV" : "Enable/disable navigation in recent files",
"DESCRIPTION_LIVEDEV_WEBSOCKET_PORT" : "Port on which WebSocket Server runs for Live Preview",
"DESCRIPTION_LIVE_DEV_HIGHLIGHT_SETTINGS" : "Live Preview Highlight settings",
- "DESCRIPTION_LIVEDEV_ENABLE_REVERSE_INSPECT" : "false to disable live preview reverse inpsect"
+ "DESCRIPTION_LIVEDEV_ENABLE_REVERSE_INSPECT" : "false to disable live preview reverse inspect"
});
| 1 |
diff --git a/test/unit/specs/components/common/TmSessionWelcome.spec.js b/test/unit/specs/components/common/TmSessionWelcome.spec.js @@ -92,7 +92,10 @@ describe(`TmSessionWelcome`, () => {
}
TmSessionWelcome.methods.back.call(self)
expect($store.commit).toHaveBeenCalledWith(`pauseHistory`, true)
- expect(self.$router.push).toHaveBeenCalled()
+ expect(self.$router.push).toHaveBeenCalledWith(
+ `/`,
+ expect.any(Function)
+ )
})
it(`doesn't go back if there's no last Page`, () => {
| 3 |
diff --git a/docs/api-reference/core/layer.md b/docs/api-reference/core/layer.md @@ -550,14 +550,13 @@ deck.gl will already have created the `state` object at this time, and added the
Called during each rendering cycle when layer [properties](/docs/api-reference/core/layer.md#constructor) or [context](/docs/api-reference/core/layer.md#context) has been updated and before layers are drawn.
-`shouldUpdateState({props, oldProps, context, oldContext, changeFlags})`
+`shouldUpdateState({props, oldProps, context, changeFlags})`
Parameters:
* `props` (Object) - Layer properties from the current rendering cycle.
* `oldProps` (Object) - Layer properties from the previous rendering cycle.
* `context` (Object) - Layer context from the current rendering cycle.
-* `oldContext` (Object) - Layer context from the previous rendering cycle.
* `changeFlags`:
- an object that contains the following boolean flags:
- `dataChanged`, `propsChanged`, `viewportChanged`, `somethingChanged`, `propsOrDataChanged`, `stateChanged`, `updateTriggersChanged`, `viewportChanged`
@@ -576,14 +575,13 @@ Remarks:
Called when a layer needs to be updated.
-`updateState({props, oldProps, context, oldContext, changeFlags})`
+`updateState({props, oldProps, context, changeFlags})`
Parameters:
* `props` (Object) - Layer properties from the current rendering cycle.
* `oldProps` (Object) - Layer properties from the previous rendering cycle.
* `context` (Object) - Layer context from the current rendering cycle.
-* `oldContext` (Object) - Layer context from the previous rendering cycle.
* `changeFlags`:
- an object that contains the following boolean flags:
- `dataChanged`, `propsChanged`, `viewportChanged`, `somethingChanged`, `propsOrDataChanged`, `stateChanged`, `updateTriggersChanged`, `viewportChanged`
| 2 |
diff --git a/app/src/renderer/components/governance/TabParameters.vue b/app/src/renderer/components/governance/TabParameters.vue </div>
<div class="column">
<dl class="info_dl">
- <dt v-tooltip.top="depositTooltips.max_deposit_period">
+ <dt>
Maximum Deposit Period
<i
v-tooltip.top="depositTooltips.max_deposit_period"
| 1 |
diff --git a/Specs/Scene/ImageryLayerCollectionSpec.js b/Specs/Scene/ImageryLayerCollectionSpec.js @@ -382,24 +382,6 @@ describe(
});
});
- it("pickImageryLayers returns undefined if no tiles are picked", function () {
- return updateUntilDone(globe, scene).then(function () {
- var ellipsoid = Ellipsoid.WGS84;
- for (var i = 0; i < globe._surface._tilesToRender.length; i++) {
- globe._surface._tilesToRender[i]._rectangle = new Rectangle();
- }
- camera.lookAt(
- new Cartesian3(ellipsoid.maximumRadius, 1.0, 1.0),
- new Cartesian3(1.0, 1.0, 100.0)
- );
- camera.lookAtTransform(Matrix4.IDENTITY);
- var ray = new Ray(camera.position, camera.direction);
- var imagery = scene.imageryLayers.pickImageryLayers(ray, scene);
-
- expect(imagery).toBeUndefined();
- });
- });
-
it("pickImageryLayers skips imagery layers that don't overlap the picked location", function () {
var provider = {
ready: true,
@@ -503,6 +485,24 @@ describe(
expect(imagery[1]).toBe(currentLayer1);
});
});
+
+ it("pickImageryLayers returns undefined if no tiles are picked", function () {
+ return updateUntilDone(globe, scene).then(function () {
+ var ellipsoid = Ellipsoid.WGS84;
+ for (var i = 0; i < globe._surface._tilesToRender.length; i++) {
+ globe._surface._tilesToRender[i]._rectangle = new Rectangle();
+ }
+ camera.lookAt(
+ new Cartesian3(ellipsoid.maximumRadius, 1.0, 1.0),
+ new Cartesian3(1.0, 1.0, 100.0)
+ );
+ camera.lookAtTransform(Matrix4.IDENTITY);
+ var ray = new Ray(camera.position, camera.direction);
+ var imagery = scene.imageryLayers.pickImageryLayers(ray, scene);
+
+ expect(imagery).toBeUndefined();
+ });
+ });
});
describe("pickImageryLayerFeatures", function () {
| 3 |
diff --git a/src/components/taglib/preserve-tag-browser.js b/src/components/taglib/preserve-tag-browser.js @@ -10,8 +10,7 @@ module.exports = function render(input, out) {
// If so, then reuse the existing DOM node instead of re-rendering
// the children. We have to put a placeholder node that will get
// replaced out if we find that the DOM node has already been rendered
- var condition = input['if'];
- if (condition !== false) {
+ if (!('if' in input) || input['if']) {
var existingEl = getElementById(out.___document, id);
if (existingEl) {
var bodyOnly = input.bodyOnly === true;
| 7 |
diff --git a/packages/@uppy/core/types/index.d.ts b/packages/@uppy/core/types/index.d.ts @@ -7,6 +7,8 @@ export interface UppyFile {
meta: {
name: string;
type?: string;
+ [key: string]: any;
+ [key: number]: any;
};
name: string;
preview?: string;
@@ -38,6 +40,9 @@ export interface PluginOptions {
}
export class Plugin {
+ id: string;
+ uppy: Uppy;
+ type: string;
constructor(uppy: Uppy, opts?: PluginOptions);
getPluginState(): object;
setPluginState(update: any): object;
@@ -56,21 +61,25 @@ export interface Store {
subscribe(listener: any): () => void;
}
+interface LocaleObject {
+ [key: string]: string | LocaleObject;
+}
export interface UppyOptions {
id: string;
autoProceed: boolean;
debug: boolean;
+ showLinkToFileUploadResult: boolean;
restrictions: {
- maxFileSize: number | null,
- maxNumberOfFiles: number | null,
- minNumberOfFiles: number | null,
- allowedFileTypes: string[] | null
+ maxFileSize: number | null;
+ maxNumberOfFiles: number | null;
+ minNumberOfFiles: number | null;
+ allowedFileTypes: string[] | null;
};
target: string | Plugin;
meta: any;
- // onBeforeFileAdded: (currentFile, files) => currentFile,
- // onBeforeUpload: (files) => files,
- locale: any;
+ onBeforeFileAdded: (currentFile: UppyFile, files: {[key: string]: UppyFile}) => UppyFile | false | undefined;
+ onBeforeUpload: (files: {[key: string]: UppyFile}) => {[key: string]: UppyFile} | false;
+ locale: LocaleObject;
store: Store;
}
@@ -117,7 +126,7 @@ export class Uppy {
iteratePlugins(callback: (plugin: Plugin) => void): void;
removePlugin(instance: Plugin): void;
close(): void;
- info(message: string | { message: string; details: string; }, type?: LogLevel, duration?: number): void;
+ info(message: string | {message: string; details: string}, type?: LogLevel, duration?: number): void;
hideInfo(): void;
log(msg: string, type?: LogLevel): void;
run(): Uppy;
| 1 |
diff --git a/articles/connections/database/migrating.md b/articles/connections/database/migrating.md @@ -59,7 +59,7 @@ You can enable these validations for a connection using the [Update a connection
"queryString": [],
"postData": {
"mimeType": "application/json",
- "text": "{ \"options\": { \"strategy_version\": 2 } }"
+ "text": "{ \"options\": { \"strategy_version\": 2, \"nextOptionParam\": \"...\" } }"
},
"headersSize": -1,
"bodySize": -1,
@@ -68,7 +68,7 @@ You can enable these validations for a connection using the [Update a connection
```
- You should replace `{connection-id}` with the Id of the custom database connection you want to update. If you don't know it, you can use the [Get all connections endpoint](/api/management/v2#!/Connections/get_connections) to find it.
-- The parameter that enables the validations is the `"strategy_version": 2`. However, when you update `options`, the whole object is overridden, so all the parameters should be present. You can use the [Get a connection endpoint](/api/management/v2#!/Connections/get_connections_by_id) to get the whole object.
+- The parameter that enables the validations is the `"strategy_version": 2`. However, when you update `options`, the whole object is overridden, so all the parameters should be present. You can use the [Get a connection endpoint](/api/management/v2#!/Connections/get_connections_by_id) to get the whole object. Replace the `"nextOptionParam": "..."` placeholder with the list of parameters you get.
- To access any Management APIv2 endpoint you need an Access Token (which you should set at the `{access-token}` placeholder of the `Authorization` header). For information on how to get one refer to [The Auth0 Management APIv2 Token](/api/management/v2/tokens).
## Enable Automatic Migration
| 0 |
diff --git a/app/containers/ColumnBookmark/saga.js b/app/containers/ColumnBookmark/saga.js @@ -6,6 +6,7 @@ import { getToken } from 'containers/LoginModal/saga'
import { getRequest, fetchAuth } from 'services/api'
import * as Actions from './constants'
import * as actions from './actions'
+import type { Action } from './actionTypes'
import type { ColumnId } from './reducer'
import { makeSelectColumn, makeSelectIds } from './selectors'
import { put, select, call, takeEvery } from 'redux-saga/effects'
@@ -19,11 +20,9 @@ function* addBookmarkColumn({ id }: { id: ColumnId }) {
yield put(addColumn(`bookmark-${id}`, { columnId: id, type: 'BOOKMARK' }))
}
-type Props = { id: ColumnId }
-
-function* fetchBookmark(props: Props) {
- const { id } = props
- const { illustIds } = yield select(makeSelectColumn(), props)
+function* fetchBookmark(action: Action) {
+ const { id } = action
+ const { illustIds } = yield select(makeSelectColumn(), action)
try {
const info = yield select(makeSelectInfo())
@@ -47,9 +46,9 @@ function* fetchBookmark(props: Props) {
}
}
-function* fetchNextBookmark(props: Props) {
- const { id } = props
- const { illustIds, nextUrl } = yield select(makeSelectColumn(), props)
+function* fetchNextBookmark(action: Action) {
+ const { id } = action
+ const { illustIds, nextUrl } = yield select(makeSelectColumn(), action)
try {
if (!nextUrl) {
| 10 |
diff --git a/js/webcomponents/bisweb_filetreepanel.js b/js/webcomponents/bisweb_filetreepanel.js @@ -212,11 +212,11 @@ class FileTreePanel extends HTMLElement {
}
let listElement = this.panel.getWidget();
- listElement.empty();
+ listElement.find('.file-container').remove();
let listContainer = $(`<div class='file-container'></div>`);
listContainer.css({ 'color' : 'rgb(12, 227, 172)' });
- listElement.append(listContainer);
+ listElement.prepend(listContainer);
console.log('fileTree', fileTree[0].children);
console.log('list container', listContainer);
@@ -249,7 +249,6 @@ class FileTreePanel extends HTMLElement {
//Searches for the directory that should contain a file given the file's path, e.g. 'a/b/c' should be contained in folders a and b.
//Returns the children
function findParentAtTreeLevel(name, entries) {
- console.log('entries', entries);
for (let entry of entries) {
if (entry.text === name) {
return entry.children;
| 1 |
diff --git a/content/questions/object-clone-stringify/index.md b/content/questions/object-clone-stringify/index.md @@ -10,7 +10,6 @@ answers:
- 'true true true false'
- 'true true false true // correct'
- 'false false false false'
-
---
Consider objects `a` and `b` below. What gets logged?
@@ -33,4 +32,4 @@ console.log(
<!-- explanation -->
-Setting `b = JSON.parse(JSON.stringify(a))` will perform a deep copy of object `a`. All primitive Javascript types (Boolean, String, and Number) will be copied correctly. However, non-valid JSON values (Date, undefined, Function, and other non-primitives) will not be copied correctly. In this instance, `JSON.stringify` will convert the Date object into an ISO string and it will remain a string when the stringified JSON is re-parsed. Since the two fields are different data types (Date object vs. string), the equality will yield false. See [MDN Description](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#Description) for a more detailed explanation.
+Setting `b = JSON.parse(JSON.stringify(a))` will perform a deep copy of object `a`. All primitive JavaScript types (Boolean, String, and Number) will be copied correctly, as will plain objects and arrays. However, non-valid JSON values (undefined, Date, Function, and other class instances) will not be copied correctly. In this instance, `JSON.stringify` will convert the Date object into an ISO string and it will remain a string when the stringified JSON is re-parsed. Since the two fields are not the same type (one is a string, the other is a Date object), the `===` will evaluate to `false`. See [MDN Description](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#Description) for a more detailed explanation.
| 2 |
diff --git a/packages/core/src/internal/proc.js b/packages/core/src/internal/proc.js @@ -203,7 +203,7 @@ export default function proc(
to track the main flow (besides other forked tasks)
**/
const task = newTask(parentEffectId, meta, iterator, cont)
- const mainTask = { meta, cancel: cancelMain, isRunning: true }
+ const mainTask = { meta, cancel: cancelMain, _isRunning: true, _isCancelled: false }
const taskQueue = forkQueue(
mainTask,
@@ -217,8 +217,8 @@ export default function proc(
cancellation of the main task. We'll simply resume the Generator with a Cancel
**/
function cancelMain() {
- if (mainTask.isRunning && !mainTask.isCancelled) {
- mainTask.isCancelled = true
+ if (mainTask._isRunning && !mainTask._isCancelled) {
+ mainTask._isCancelled = true
next(TASK_CANCEL)
}
}
@@ -265,7 +265,7 @@ export default function proc(
**/
function next(arg, isErr) {
// Preventive measure. If we end up here, then there is really something wrong
- if (!mainTask.isRunning) {
+ if (!mainTask._isRunning) {
throw new Error('Trying to resume an already finished generator')
}
@@ -281,7 +281,7 @@ export default function proc(
- By cancelling the parent task manually
- By joining a Cancelled task
**/
- mainTask.isCancelled = true
+ mainTask._isCancelled = true
/**
Cancels the current effect; this will propagate the cancellation down to any called tasks
**/
@@ -304,14 +304,14 @@ export default function proc(
/**
This Generator has ended, terminate the main task and notify the fork queue
**/
- mainTask.isRunning = false
+ mainTask._isRunning = false
mainTask.cont(result.value)
}
} catch (error) {
- if (mainTask.isCancelled) {
+ if (mainTask._isCancelled) {
logError(error)
}
- mainTask.isRunning = false
+ mainTask._isRunning = false
mainTask.cont(error, true)
}
}
@@ -721,7 +721,7 @@ export default function proc(
}
function runCancelledEffect(data, cb) {
- cb(!!mainTask.isCancelled)
+ cb(Boolean(mainTask._isCancelled))
}
function runFlushEffect(channel, cb) {
| 10 |
diff --git a/src/assets/styles/_common.scss b/src/assets/styles/_common.scss @@ -61,7 +61,7 @@ $vzb-stroke-opacity: 0.7;
// ----------------------------------------------------------------------------
$vzb-loader-speed: 0.6s;
$vzb-loader-thickness: 4px;
-$vzb-loader-size: 30px;
+$vzb-loader-size: 150px;
$vzb-loader-bgcolor: $vzb-color-white;
// ----------------------------------------------------------------------------
// Common styles
@@ -94,11 +94,7 @@ $vzb-loader-bgcolor: $vzb-color-white;
animation-name: rotate-forever;
animation-iteration-count: infinite;
animation-duration: $vzb-loader-speed;
- border: $vzb-loader-thickness solid rgba($vzb-color-primary, 0.1);
- border-radius: 100%;
- border-top: $vzb-loader-thickness solid rgba($vzb-color-primary, 0.6);
- content: ' ';
- display: inline-block;
+ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 338 338"><g id="fidget-spinner--element"><path class="bearing" fill="#607889" d="M161.6 84.2c2.3.5 4.7.9 7.1.9 2.4 0 4.8-.3 7.2-.9 3.2-.7 6.2-1.9 9-3.5 7.5-4.3 12.8-11.3 15.1-19.7 2.2-8.4 1.1-17.1-3.3-24.6-5.8-10-16.5-16.2-28.1-16.2-5.7 0-11.3 1.5-16.2 4.4-15.5 9-20.7 28.8-11.8 44.3 4.6 7.8 12.3 13.3 21 15.3zm-2-47.2c2.8-1.6 5.9-2.4 9.1-2.4 6.4 0 12.4 3.5 15.7 9 2.4 4.2 3.1 9.1 1.8 13.7-1.2 4.7-4.2 8.6-8.4 11-.6.4-1.2.7-1.9.9-2.3 1-4.7 1.5-7.2 1.5s-4.9-.5-7.2-1.5c-3.5-1.5-6.5-4.1-8.5-7.5-5-8.6-2-19.7 6.6-24.7z"/><path class="bearing" fill="#607889" d="M96.3 211.1c-1.2-2.1-2.7-4-4.3-5.8-6.1-6.5-14.6-10.4-23.7-10.4-5.7 0-11.3 1.5-16.2 4.4-7.5 4.3-12.8 11.3-15.1 19.7-2.2 8.4-1.1 17.1 3.3 24.6 5.8 10 16.5 16.2 28.1 16.2 5.7 0 11.3-1.5 16.2-4.4 7.5-4.3 12.8-11.3 15.1-19.7 1.6-6 1.4-12.2-.4-18-.9-2.3-1.8-4.5-3-6.6zM85.7 232c-1.2 4.7-4.2 8.6-8.4 11-2.8 1.6-5.9 2.4-9.1 2.4-6.4 0-12.4-3.5-15.7-9-2.4-4.2-3.1-9-1.8-13.7 1.2-4.7 4.2-8.6 8.4-11 2.8-1.6 5.9-2.4 9.1-2.4 3.9 0 7.7 1.3 10.8 3.6 2 1.4 3.6 3.3 4.9 5.4 1.3 2.2 2 4.5 2.3 6.9.2 2.3.1 4.6-.5 6.8z"/><path class="bearing" fill="#607889" d="M269.8 194.6c-5.7 0-11.3 1.5-16.2 4.4-2.9 1.7-5.4 3.7-7.6 6.1-3.3 3.5-5.7 7.8-7.1 12.4-.1.4-.3.8-.4 1.2-2.2 8.4-1.1 17.1 3.3 24.6 5.8 10 16.5 16.1 28.1 16.1 5.7 0 11.3-1.5 16.2-4.4 7.5-4.3 12.8-11.3 15.1-19.7 2.2-8.4 1.1-17.1-3.3-24.6-5.8-10-16.6-16.1-28.1-16.1zm17.5 37c-1.2 4.7-4.2 8.6-8.4 11-2.8 1.6-5.9 2.4-9.1 2.4-6.4 0-12.4-3.5-15.7-9-2-3.4-2.7-7.3-2.3-11.1.1-.9.2-1.8.4-2.6 1.1-4 3.5-7.4 6.7-9.8.6-.4 1.1-.9 1.7-1.2 2.8-1.6 5.9-2.4 9.1-2.4 6.4 0 12.4 3.5 15.7 9 2.5 4.2 3.1 9.1 1.9 13.7z"/><path class="bearing middle-bearing" fill="#607889" d="M203.2 178.1c2.4-9.2 1.2-18.7-3.6-26.9-5.3-9.1-14.3-15.3-24.8-17.1-2.3-.4-4.2-.6-5.9-.6-1.7 0-3.7.2-6 .6-4.3.7-8.3 2.2-11.8 4.2-15 8.7-21.5 26.8-15.4 43.1.8 2.1 1.6 3.8 2.5 5.4.9 1.5 2 3.1 3.5 4.9 6.8 8.2 16.8 12.8 27.3 12.8 6.2 0 12.4-1.7 17.8-4.8 3.6-2.1 6.8-4.8 9.6-8.1 2.6-3.1 4.6-6.6 5.9-10.3.3-1.1.6-2.1.9-3.2z"/><path fill="#4b98aa" d="M312.4 202.3c-6.7-11.6-17.9-19.8-30.7-23-.5-.1-47-10.3-63.5-38.8-16.6-28.6-2.3-74-2.2-74.4.1-.2.2-.5.2-.7 3.4-12.7 1.6-26-5-37.4-8.8-15.1-25.1-24.5-42.6-24.5-8.6 0-17.2 2.3-24.7 6.7-20.8 12-29.4 37-21.7 58.9 2.8 10.2 11.5 47-2.7 71.7-16.5 28.6-62.9 38.9-63.4 39v.1c-4.4 1.1-8.6 2.8-12.6 5.1-11.4 6.4-19.5 17-22.9 29.7-3.4 12.7-1.6 26 5 37.3 8.8 15.1 25.1 24.5 42.6 24.5 8.6 0 17.2-2.3 24.7-6.7 5.3-3.1 9.8-7 13.5-11.6 8.7-8.6 35.2-32.4 62.5-32.4 33 0 65.1 35.1 65.5 35.5l.2-.2c9.2 9.4 21.9 14.9 35.3 14.9 8.6 0 17.2-2.3 24.7-6.7 23.4-13.3 31.4-43.5 17.8-67zM151.2 22.4c5.3-3.1 11.4-4.7 17.5-4.7 12.4 0 24 6.7 30.2 17.4 4.7 8.1 5.9 17.5 3.5 26.5-2.4 9-8.2 16.6-16.2 21.2-3.2 1.9-6.7 3.1-10.3 3.9-2.4.5-4.8.8-7.2.8s-4.8-.3-7.1-.8c-9.6-2-18.1-8-23.1-16.6-1-1.8-1.9-3.7-2.6-5.5-.4-1-.6-1.9-.9-2.9-4-14.9 2.2-31.2 16.2-39.3zM102 236.3c-1.2 4.5-3.2 8.6-5.9 12.2-.9 1.2-2 2.4-3.1 3.5-2.1 2.1-4.5 4-7.2 5.6-5.3 3.1-11.4 4.7-17.5 4.7-12.4 0-24-6.7-30.2-17.4-4.7-8.1-5.9-17.5-3.5-26.5 2.4-9 8.2-16.6 16.2-21.2 5.3-3.1 11.4-4.7 17.5-4.7 10 0 19.4 4.4 25.9 11.6 1.6 1.8 3.1 3.7 4.3 5.8 1.2 2.1 2.2 4.3 2.9 6.6 2.1 6.3 2.3 13.2.6 19.8zm66.9-24.6c-12.8 0-24.7-5.8-32.8-15.4-1.5-1.8-3-3.8-4.2-5.8-1.2-2.1-2.2-4.3-3-6.5-7.1-19.1.3-41.2 18.5-51.8 4.4-2.5 9.2-4.2 14.2-5.1 2.4-.4 4.8-.7 7.2-.7 2.4 0 4.8.3 7.1.7 12.4 2.1 23.4 9.6 29.8 20.6 5.7 9.9 7.3 21.4 4.3 32.4-.3 1.3-.8 2.5-1.2 3.8-1.7 4.6-4.1 8.7-7.2 12.4-3.2 3.8-7 7.2-11.5 9.8-6.3 3.6-13.7 5.6-21.2 5.6zm118.4 45.5c-5.3 3.1-11.4 4.7-17.5 4.7-12.4 0-24-6.7-30.2-17.4-4.7-8.1-5.9-17.5-3.5-26.5l.6-1.8c1.5-4.6 3.9-8.9 7.1-12.4 2.4-2.7 5.3-5.1 8.5-7 5.3-3.1 11.4-4.7 17.5-4.7 12.4 0 24 6.7 30.2 17.4 9.7 16.6 4 38-12.7 47.7z"/></g></svg>');
margin: -1 * $vzb-loader-size / 2;
z-index: 9999;
}
| 14 |
diff --git a/packages/node_modules/@node-red/registry/lib/localfilesystem.js b/packages/node_modules/@node-red/registry/lib/localfilesystem.js @@ -472,7 +472,7 @@ function getPackageList() {
try {
var userPackage = path.join(settings.userDir,"package.json");
var pkg = JSON.parse(fs.readFileSync(userPackage,"utf-8"));
- return pkg.dependencies;
+ return pkg.dependencies || {};
} catch(err) {
log.error(err);
}
| 9 |
diff --git a/src/components/Card/Card.js b/src/components/Card/Card.js @@ -26,7 +26,7 @@ import {
} from './Card.styles';
import numeral from 'numeral'
import ReactTooltip from "react-tooltip";
-import { colours, fieldToStructure, strFormat, analytics } from "common/utils";
+import { colours, fieldToStructure, analytics, strFormat } from "common/utils";
import useApi from "hooks/useApi";
import moment from "moment";
import {
@@ -128,20 +128,21 @@ const ValueItem: ComponentType<ValueItemType> = ({ label, value, params, tooltip
defaultResponse: null
}),
data = useApi(getApiArgs(value)),
- modalReplacements = {
+ replacements = {
kwargs: {
...(data?.[0] ?? {}),
date: moment(data?.[0]?.date ?? null).format("dddd, D MMMM YYYY")
}
- };
+ },
+ formattedTooltip = strFormat(tooltip, replacements);
return <NumericData>
{ label && <DataLabel>{ label }</DataLabel> }
<Number>
- <ModalTooltip data-tip={ tooltip }
+ <ModalTooltip data-tip={ formattedTooltip }
data-for={ tipId }
markdownPath={ value }
- replacements={ modalReplacements }>
+ replacements={ replacements }>
{
data !== null
? (data?.length ?? 0) > 0
@@ -150,7 +151,7 @@ const ValueItem: ComponentType<ValueItemType> = ({ label, value, params, tooltip
: <Loading/>
}{ (data && sign) ? sign : null }
<p className={ "govuk-visually-hidden" }>
- Abstract information on { label }: { tooltip }<br/>
+ Abstract information on { label }: { formattedTooltip }<br/>
Click for additional details.
</p>
</ModalTooltip>
| 14 |
diff --git a/.travis.yml b/.travis.yml @@ -16,6 +16,6 @@ matrix:
- node_js: "10"
script:
- ./node_modules/.bin/grunt no-coverage
- - node_js: "8"
- script:
- - ./node_modules/.bin/grunt no-coverage
+ #- node_js: "8"
+ # script:
+ # - ./node_modules/.bin/grunt no-coverage
| 2 |
diff --git a/src/scripts/interaction.js b/src/scripts/interaction.js @@ -239,7 +239,12 @@ function Interaction(parameters, player, previousState) {
height: 'initial'
});
self.trigger('display', $interaction);
- setTimeout(() => $interaction.removeClass('h5p-hidden'), 0);
+ setTimeout(() => {
+ if ($interaction) {
+ // Transition in
+ $interaction.removeClass('h5p-hidden');
+ }
+ }, 0);
return $interaction;
};
| 0 |
diff --git a/scss/form/_radio.scss b/scss/form/_radio.scss // Website: https://www.siimple.xyz
//
@import "../_variables.scss";
+@import "../_functions.scss";
//Radio variables
$siimple-radio-width: 18px;
@@ -19,12 +20,12 @@ $siimple-radio-border: 3px;
$siimple-radio-circle: 6px;
//Radio inactive variables
-$siimple-radio-inactive-border-color: $siimple-grey;
-$siimple-radio-inactive-background-color: $siimple-grey;
+$siimple-radio-inactive-border-color: siimple-default-color("light");
+$siimple-radio-inactive-background-color: siimple-default-color("light");
//Radio active variables
-$siimple-radio-active-background-color: $siimple-green;
-$siimple-radio-active-border-color: $siimple-green;
+$siimple-radio-active-background-color: siimple-default-color("green");
+$siimple-radio-active-border-color: siimple-default-color("green");
//Radio class
.siimple-radio {
@@ -55,7 +56,7 @@ $siimple-radio-active-border-color: $siimple-green;
//Radio inner circle
& > label:after {
position: absolute;
- display: block;;
+ display: block;
content: "";
width: $siimple-radio-circle;
height: $siimple-radio-circle;
@@ -83,3 +84,5 @@ $siimple-radio-active-border-color: $siimple-green;
}
}
+
+
| 1 |
diff --git a/src/core/operations/DNSOverHTTPS.mjs b/src/core/operations/DNSOverHTTPS.mjs * @copyright Crown Copyright 2019
* @license Apache-2.0
*/
-import jpath from "jsonpath";
import Operation from "../Operation";
import OperationError from "../errors/OperationError";
@@ -19,7 +18,7 @@ class HTTPSOverDNS extends Operation {
super();
this.name = "DNS over HTTPS";
- this.module = "Code";
+ this.module = "Default";
this.description = ["Takes a single domain name and performs a DNS lookup using DNS over HTTPS.",
"<br><br>",
"By default, <a href='https://developers.cloudflare.com/1.1.1.1/dns-over-https/'>Cloudflare</a> and <a href='https://developers.google.com/speed/public-dns/docs/dns-over-https'>Google</a> DNS over HTTPS services are supported.",
@@ -93,7 +92,7 @@ class HTTPSOverDNS extends Operation {
})
.then(data => {
if (justAnswer) {
- return jpath.query(data, "$.Answer[*].data");
+ return this.extractData(data.Answer);
}
return data;
@@ -104,6 +103,25 @@ class HTTPSOverDNS extends Operation {
}
+
+ /**
+ * Construct an array of just data from a DNS Answer section
+ * @private
+ * @param {JSON} data
+ * @returns {JSON}
+ */
+ extractData(data) {
+ if (typeof(data) == "undefined"){
+ return [];
+ } else {
+ const dataValues = [];
+ data.forEach(element => {
+ dataValues.push(element.data);
+ });
+ return dataValues;
+
+ }
+ }
}
export default HTTPSOverDNS;
| 2 |
diff --git a/hardhat/tasks/task-node.js b/hardhat/tasks/task-node.js @@ -23,10 +23,10 @@ task('node', 'Run a node')
const networkHostReplace = (taskArguments.useOvm ? 'optimism-' : '') + network;
if (network === 'mainnet' && !useOvm) {
- taskArguments.fork = process.env.PROVIDER_URL_MAINNET.replace(
- 'network',
- networkHostReplace
- );
+ taskArguments.fork = process.env.PROVIDER_URL_MAINNET;
+ } else {
+ taskArguments.fork =
+ taskArguments.fork || process.env.PROVIDER_URL.replace('network', networkHostReplace);
}
console.log(yellow(`Forking ${network}...`));
| 3 |
diff --git a/src/parser/statement.js b/src/parser/statement.js @@ -255,9 +255,9 @@ module.exports = {
return result(args);
case this.tok.T_INLINE_HTML:
- var result = this.node('inline')(this.text());
+ var result = this.node('inline'), value = this.text();
this.next();
- return result;
+ return result(value);
case this.tok.T_UNSET:
var result = this.node('unset');
| 1 |
diff --git a/extensions/projection/README.md b/extensions/projection/README.md @@ -40,7 +40,9 @@ The `proj` prefix is short for "projection", and is not a reference to the PROJ/
| proj:shape | \[integer] | Number of pixels in Y and X directions for the default grid |
| proj:transform | \[number] | The affine transformation coefficients for the default grid |
-### proj:epsg
+### Additional Field Information
+
+#### proj:epsg
A Coordinate Reference System (CRS) is the data reference system (sometimes called a
'projection') used by the asset data, and can usually be referenced using an [EPSG code](https://en.wikipedia.org/wiki/EPSG_Geodetic_Parameter_Dataset).
@@ -48,7 +50,7 @@ If the asset data does not have a CRS, such as in the case of non-rectified imag
Points, `proj:epsg` should be set to null. It should also be set to null if a CRS exists, but for which
there is no valid EPSG code. A great tool to help find EPSG codes is [epsg.io](http://epsg.io/).
-### proj:wkt2
+#### proj:wkt2
A Coordinate Reference System (CRS) is the data reference system (sometimes called a
'projection') used by the asset data. This value is a [WKT2](http://docs.opengeospatial.org/is/12-063r5/12-063r5.html) string.
@@ -56,7 +58,7 @@ If the data does not have a CRS, such as in the case of non-rectified imagery wi
Points, proj:wkt2 should be set to null. It should also be set to null if a CRS exists, but for which
a WKT2 string does not exist.
-### proj:projjson
+#### proj:projjson
A Coordinate Reference System (CRS) is the data reference system (sometimes called a
'projection') used by the asset data. This value is a [PROJJSON](https://proj.org/specifications/projjson.html) object.
@@ -64,7 +66,7 @@ If the data does not have a CRS, such as in the case of non-rectified imagery wi
Points, proj:projjson should be set to null. It should also be set to null if a CRS exists, but for which
a PROJJSON string does not exist. The schema for this object can be found [here](https://proj.org/schemas/v0.2/projjson.schema.json).
-### proj:geometry
+#### proj:geometry
A Polygon object representing the footprint of this item, formatted according the Polygon
object format specified in [RFC 7946, sections 3.1.6](https://tools.ietf.org/html/rfc7946), except not necessarily
@@ -72,19 +74,20 @@ in EPSG:4326 as required by RFC7946. Specified based on the `proj:epsg`, `proj:
Ideally, this will be represented by a Polygon with five coordinates, as the item in the asset data CRS should be
a square aligned to the original CRS grid.
-### proj:bbox
+#### proj:bbox
Bounding box of the assets represented by this item in the asset data CRS. Specified as 4 or 6
coordinates based on the CRS defined in the `proj:epsg`, `proj:projjson` or `proj:wkt2` fields. First two numbers are coordinates
of the lower left corner, followed by coordinates of upper right corner, , e.g., \[west, south, east, north],
\[xmin, ymin, xmax, ymax], \[left, down, right, up], or \[west, south, lowest, east, north, highest]. The length of the array must be 2\*n where n is the number of dimensions. The array contains all axes of the southwesterly most extent followed by all axes of the northeasterly most extent specified in Longitude/Latitude or Longitude/Latitude/Elevation based on [WGS 84](http://www.opengis.net/def/crs/OGC/1.3/CRS84). When using 3D geometries, the elevation of the southwesterly most extent is the minimum elevation in meters and the elevation of the northeasterly most extent is the maximum in meters.
-### proj:centroid
+#### proj:centroid
-Coordinates representing the centroid of the item in the asset data CRS. Coordinates are
-defined in latitude and longitude, even if the data coordinate system does not use lat/long.
+Coordinates representing the centroid of the item in the asset data CRS. Coordinates are defined in latitude and longitude, even if
+the data coordinate system does not use lat/long. This is useful as the projection from the native CRS into GeoJSON (lat/long) can
+warp the position, so this gives the centroid based on the unwarped data.
-### proj:shape
+#### proj:shape
An array of integers that represents the number of pixels in the most common pixel grid used by the Item Asset objects.
The number of pixels should be specified in Y, X order. If the shape is defined in Item Properties, it is used as
@@ -92,7 +95,7 @@ the default shape for all assets that don't have an overriding shape. This can b
[`gdalinfo`](https://gdal.org/programs/gdalinfo.html) (the 'size' result) or [`rio info`](https://rasterio.readthedocs.io/en/latest/cli.html#info)
(the 'shape' field) on the command line.
-### proj:transform
+#### proj:transform
Linear mapping from pixel coordinate space (Pixel, Line) to projection coordinate space (Xp, Yp). It is
a `3x3` matrix stored as a flat array of 9 elements in row major order. Since the last row is always `0,0,1` it can be omitted,
| 0 |
diff --git a/lib/socket.js b/lib/socket.js @@ -632,7 +632,7 @@ function IOSocket(server, settings, adapter, objects, store) {
socket.on('getObjectView', function (design, search, params, callback) {
if (updateSession(socket) && checkPermissions(socket, 'getObjectView', callback, search)) {
- adapter.objects.getObjectView(design, search, params, {user: this._acl.user}, callback);
+ adapter.getObjectView(design, search, params, {user: this._acl.user}, callback);
}
});
@@ -659,7 +659,7 @@ function IOSocket(server, settings, adapter, objects, store) {
return adapter.log.warn('[getHostByIp] Invalid callback')
}
if (updateSession(socket) && checkPermissions(socket, 'getHostByIp', ip)) {
- adapter.objects.getObjectView('system', 'host', {}, {user: this._acl.user}, (err, data) => {
+ adapter.getObjectView('system', 'host', {}, {user: this._acl.user}, (err, data) => {
if (data.rows.length) {
for (let i = 0; i < data.rows.length; i++) {
const obj = data.rows[i].value;
| 14 |
diff --git a/src/components/SaveEventButton.test.js b/src/components/SaveEventButton.test.js @@ -5,14 +5,12 @@ import ReactNativeHapticFeedback from "react-native-haptic-feedback";
import { shallow } from "enzyme";
import SaveEventButton from "./SaveEventButton";
-jest.mock("react-native-haptic-feedback", () => {
- const value = jest.fn();
- value.trigger = jest.fn();
- return value;
-});
+jest.mock("react-native-haptic-feedback", () => ({
+ trigger: jest.fn()
+}));
beforeEach(() => {
- ReactNativeHapticFeedback.mockClear();
+ ReactNativeHapticFeedback.trigger.mockClear();
});
it("renders correctly", () => {
| 1 |
diff --git a/.codeclimate.yml b/.codeclimate.yml @@ -22,14 +22,9 @@ engines:
ratings:
paths:
- Gemfile.lock
- - "**.js"
+ - "src/**.js"
- "**.css"
- "**.md"
- "bin/mb"
- "build"
- "scripts/**/*"
-exclude_paths:
-- test/
-- functionalTest/
-- performanceTest/
-
| 8 |
diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js @@ -649,7 +649,7 @@ function buildOptimisticIOUReport(ownerEmail, recipientEmail, total, chatReportI
ownerEmail,
reportID: ReportUtils.generateReportID(),
state: CONST.STATE.SUBMITTED,
- stateNum: CONST.STATUS.SUBMITTED,
+ stateNum: 1,
total,
};
}
| 14 |
diff --git a/devices.js b/devices.js @@ -17105,9 +17105,9 @@ const devices = [
vendor: 'Lidl',
description: 'Livarno Lux smart LED light strip 2.5m',
...preset.light_onoff_brightness_colortemp_color({disableColorTempStartup: true}),
- meta: {applyRedFix: true, configureKey: 1},
+ meta: {applyRedFix: true, enhancedHue: false, configureKey: 2},
configure: async (device, coordinatorEndpoint, logger) => {
- device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 31});
+ device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
},
},
{
@@ -17125,9 +17125,9 @@ const devices = [
vendor: 'Lidl',
description: 'Livarno Lux E14 candle RGB',
...preset.light_onoff_brightness_colortemp_color({disableColorTempStartup: true}),
- meta: {applyRedFix: true, configureKey: 1},
+ meta: {applyRedFix: true, enhancedHue: false, configureKey: 2},
configure: async (device, coordinatorEndpoint, logger) => {
- device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 31});
+ device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
},
},
{
@@ -17136,9 +17136,9 @@ const devices = [
vendor: 'Lidl',
description: 'Livarno Lux GU10 spot RGB',
...preset.light_onoff_brightness_colortemp_color({disableColorTempStartup: true}),
- meta: {applyRedFix: true, configureKey: 1},
+ meta: {applyRedFix: true, enhancedHue: false, configureKey: 2},
configure: async (device, coordinatorEndpoint, logger) => {
- device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 31});
+ device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
},
},
{
@@ -17202,9 +17202,9 @@ const devices = [
vendor: 'Lidl',
description: 'Livarno Lux mood light RGB+CCT',
...preset.light_onoff_brightness_colortemp_color({disableColorTempStartup: true}),
- meta: {applyRedFix: true, configureKey: 1},
+ meta: {applyRedFix: true, enhancedHue: false, configureKey: 2},
configure: async (device, coordinatorEndpoint, logger) => {
- device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 31});
+ device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
},
},
{
@@ -17213,9 +17213,9 @@ const devices = [
vendor: 'Lidl',
description: 'Livarno Lux light bar RGB+CCT (black/white)',
...preset.light_onoff_brightness_colortemp_color({disableColorTempStartup: true}),
- meta: {applyRedFix: true, configureKey: 1},
+ meta: {applyRedFix: true, enhancedHue: false, configureKey: 2},
configure: async (device, coordinatorEndpoint, logger) => {
- device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 31});
+ device.getEndpoint(1).saveClusterAttributeKeyValue('lightingColorCtrl', {colorCapabilities: 29});
},
},
| 12 |
diff --git a/src/content/en/ilt/pwa/lab-integrating-analytics.md b/src/content/en/ilt/pwa/lab-integrating-analytics.md @@ -367,7 +367,7 @@ gtag('event', 'unsubscribe', {
});
```
-Save the script and refresh the app. Now test the __Subscribe__ and __Unsubscribe__ buttons. Confirm that you see the custom events in the the Google Analytics dashboard.
+Save the script and refresh the app. Now test the __Subscribe__ and __Unsubscribe__ buttons. Confirm that you see the custom events in the Google Analytics dashboard.
__Optional__: Add analytics hits for the `catch` blocks of the `subscribe` and `unsubscribe` functions. In other words, add analytics code to record when users have errors subscribing or unsubscribing. Make sure the event's `action` (the second argument to `gtag`) is distinct, for example `subscribe-err`). Then manually block notifications in the app by clicking the icon next to the URL and revoking permission for notifications. Refresh the page and test subscribing, you should see an event fired for the subscription error in the Google Analytics dashboard. Remember to restore notification permissions when you are done.
@@ -573,7 +573,7 @@ Note: Testing the Measurement Protocol can be difficult because it does not retu
#### Explanation
-We start by using [ImportScripts](https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/importScripts) to import the `analytics-helper.js` file with our `sendAnalyticsEvent` helper function. This function is used send custom events at appropriate places (such as when push events are received, or notifications are interacted with). The `eventAction` and `eventCategory` that we want to associate with the event are passed in as parameters.
+We start by using [ImportScripts](https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/importScripts) to import the `analytics-helper.js` file with our `sendAnalyticsEvent` helper function. This function is used to send custom events at appropriate places (such as when push events are received, or notifications are interacted with). The `eventAction` and `eventCategory` that we want to associate with the event are passed in as parameters.
Note: [`event.waitUntil`](https://developer.mozilla.org/en-US/docs/Web/API/ExtendableEvent/waitUntil) extends the life of an event until the asynchronous actions inside of it have completed. This ensures that the service worker will not be terminated preemptively while waiting for an asynchronous action to complete.
| 1 |
diff --git a/packages/vulcan-users/lib/server/on_create_user.js b/packages/vulcan-users/lib/server/on_create_user.js @@ -8,7 +8,7 @@ function onCreateUserCallback (options, user) {
delete options.password; // we don't need to store the password digest
delete options.username; // username is already in user object
- options = runCallbacks(`users.new.pre_validate`, options);
+ options = runCallbacks(`users.new.validate.before`, options);
// validate options since they can't be trusted
Users.simpleSchema().validate(options);
| 10 |
diff --git a/src/core/index.js b/src/core/index.js @@ -38,16 +38,7 @@ const instanceNamespaces = window.__alloyNS;
const createNamespacedStorage = storageFactory(window);
-let console;
-
-// #if _REACTOR
-// When running within the Reactor extension, we want logging to be
-// toggled when Reactor logging is toggled. The easiest way to do
-// this is to pipe our log messages through the Reactor logger.
-console = turbine.logger;
-// #else
-({ console } = window);
-// #endif
+const { console } = window;
const coreConfigValidators = createCoreConfigs();
const apexDomain = getApexDomain(window, cookieJar);
| 2 |
diff --git a/lib/util.js b/lib/util.js @@ -602,11 +602,15 @@ module.exports = {
responseBody: ''
};
}
+ let headers = Object.keys(contentObj);
- if (Object.keys(contentObj)) {
- if (this.getHeaderFamily(Object.keys(contentObj)[0])) {
- cTypeHeader = Object.keys(contentObj)[0];
+ for (let i = 0; i < headers.length; i++) {
+ if (this.getHeaderFamily(headers[i])) {
+ cTypeHeader = headers[i];
hasComputedType = true;
+ if (headers[i].includes('json')) {
+ break;
+ }
}
}
| 9 |
diff --git a/bin/oref0-ns-loop.sh b/bin/oref0-ns-loop.sh @@ -148,6 +148,8 @@ function upload {
function upload_ns_status {
#echo Uploading devicestatus
grep -q iob monitor/iob.json || die "IOB not found"
+ # set the timestamp on enact/suggested.json to match the deliverAt time
+ touch -d $(cat enact/suggested.json | jq .deliverAt | sed 's/"//g') enact/suggested.json
if ! find enact/ -mmin -5 -size +5c | grep -q suggested.json; then
echo -n "No recent suggested.json found; last updated "
ls -la enact/suggested.json | awk '{print $6,$7,$8}'
| 12 |
diff --git a/pages/status.js b/pages/status.js @@ -220,7 +220,11 @@ const PrimaryCTA = ({
params: { package: 'ABO' }
}
text = 'Mitglied werden'
- } else if (questionnaire.userIsEligible && !questionnaire.userHasSubmitted) {
+ } else if (
+ questionnaire &&
+ questionnaire.userIsEligible &&
+ !questionnaire.userHasSubmitted
+ ) {
target = {
route: 'questionnaire',
params: { slug: QSLUG }
| 9 |
diff --git a/ui/component/common/icon-custom.jsx b/ui/component/common/icon-custom.jsx @@ -44,7 +44,15 @@ const buildIcon = (iconStrokes: React$Node, customSvgValues = {}) =>
export const icons = {
// The LBRY icon is different from the base icon set so don't use buildIcon()
[ICONS.LBRY]: (props: IconProps) => (
- <svg stroke="currentColor" fill="currentColor" x="0px" y="0px" viewBox="0 0 322 254" className="icon lbry-icon">
+ <svg
+ {...props}
+ stroke="currentColor"
+ fill="currentColor"
+ x="0px"
+ y="0px"
+ viewBox="0 0 322 254"
+ className="icon lbry-icon"
+ >
<path d="M296,85.9V100l-138.8,85.3L52.6,134l0.2-7.9l104,51.2L289,96.1v-5.8L164.2,30.1L25,116.2v38.5l131.8,65.2 l137.6-84.4l3.9,6l-141.1,86.4L18.1,159.1v-46.8l145.8-90.2C163.9,22.1,296,85.9,296,85.9z" />
<path d="M294.3,150.9l2-12.6l-12.2-2.1l0.8-4.9l17.1,2.9l-2.8,17.5L294.3,150.9L294.3,150.9z" />
</svg>
| 11 |
diff --git a/app/views/admin/shared/_trial_notification.html.erb b/app/views/admin/shared/_trial_notification.html.erb <div class="CDB-Text FlashMessage FlashMessage--main">
<div class="u-inner">
<div class="FlashMessage FlashMessage-info FlashMessage--main u-flex u-justifySpace u-alignCenter">
- <p class="u-flex">You're currently under your 30-day Trial Period. Add your billing info to keep using our platform.</p>
+ <p>You're currently under your 30-day Trial Period. Add your billing info to keep using our platform.</p>
<p class="u-flex">
<a href="<%= current_user.update_payment_url(request.protocol) %>" class="CDB-Button CDB-Button--secondary CDB-Button--secondary--background CDB-Button--big">
<span class="CDB-Button-Text CDB-Text is-semibold CDB-Size-medium u-upperCase">Add payment method</span>
| 2 |
diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml @@ -10,7 +10,7 @@ on:
branches: [ master ]
jobs:
- ci:test-unit:
+ test-unit:
runs-on: ubuntu-latest
strategy:
matrix:
@@ -28,7 +28,7 @@ jobs:
- run: npm run build
- run: npm run build:dev
- run: npm run ci:test-unit
- ci:test-e2e-layouts:
+ test-e2e-layouts:
runs-on: ubuntu-latest
strategy:
matrix:
@@ -49,7 +49,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
- needs: [ci:test-unit, ci:test-e2e-layouts]
+ needs: [test-unit, test-e2e-layouts]
strategy:
matrix:
node-version: [14.16.1]
| 2 |
diff --git a/test_environment.js b/test_environment.js @@ -2,6 +2,7 @@ const NodeEnvironment = require('jest-environment-node');
const nearlib = require('nearlib');
const fs = require('fs');
+const INITIAL_BALANCE = '100000000000';
const testAccountName = 'test.near';
class LocalTestEnvironment extends NodeEnvironment {
@@ -30,7 +31,7 @@ class LocalTestEnvironment extends NodeEnvironment {
const randomKey = await nearlib.KeyPair.fromRandom('ed25519');
const data = [...fs.readFileSync('./out/main.wasm')];
await config.deps.keyStore.setKey(config.networkId, config.contractName, randomKey);
- await masterAccount.createAndDeployContract(config.contractName, randomKey.getPublicKey(), data, 1000000);
+ await masterAccount.createAndDeployContract(config.contractName, randomKey.getPublicKey(), data, INITIAL_BALANCE);
await super.setup();
}
| 4 |
diff --git a/desktop/sources/scripts/cursor.js b/desktop/sources/scripts/cursor.js @@ -15,18 +15,10 @@ export default function Cursor (terminal) {
this.mode = 0
- this.updateBox = function() {
- this.minX = min(this.x, this.x + this.w);
- this.maxX = max(this.x, this.x + this.w);
- this.minY = min(this.y, this.y + this.h);
- this.maxY = max(this.y, this.y + this.h);
- };
-
this.move = function (x, y) {
if (isNaN(x) || isNaN(y)) { return }
this.x = clamp(this.x + parseInt(x), 0, terminal.orca.w - 1)
this.y = clamp(this.y - parseInt(y), 0, terminal.orca.h - 1)
- this.updateBox();
terminal.update()
}
@@ -35,7 +27,6 @@ export default function Cursor (terminal) {
this.x = clamp(parseInt(x), 0, terminal.orca.w - 1)
this.y = clamp(parseInt(y), 0, terminal.orca.h - 1)
- this.updateBox();
terminal.update()
}
@@ -43,7 +34,6 @@ export default function Cursor (terminal) {
if (isNaN(x) || isNaN(y)) { return }
this.w = clamp(this.w + parseInt(x), -this.x, terminal.orca.w - this.x)
this.h = clamp(this.h - parseInt(y), -this.y, terminal.orca.h - this.y)
- this.updateBox();
terminal.update()
}
@@ -51,7 +41,6 @@ export default function Cursor (terminal) {
if (isNaN(w) || isNaN(h)) { return }
this.w = clamp(parseInt(w), -this.x, terminal.orca.w - 1)
this.h = clamp(parseInt(h), -this.y, terminal.orca.h - 1)
- this.updateBox();
terminal.update()
}
@@ -59,7 +48,6 @@ export default function Cursor (terminal) {
if (isNaN(w) || isNaN(h)) { return }
this.w = clamp(parseInt(w), -this.x, terminal.orca.w - this.x)
this.h = clamp(parseInt(h), -this.y, terminal.orca.h - this.y)
- this.updateBox();
terminal.update()
}
@@ -77,14 +65,12 @@ export default function Cursor (terminal) {
this.w = terminal.orca.w
this.h = terminal.orca.h
this.mode = 0
- this.updateBox()
terminal.update()
}
this.select = function (x = this.x, y = this.y, w = this.w, h = this.h) {
this.moveTo(x, y)
this.scaleTo(w, h)
- this.updateBox();
terminal.update()
}
@@ -96,7 +82,6 @@ export default function Cursor (terminal) {
this.move(0, 0)
this.w = 0
this.h = 0
- this.updateBox()
this.mode = 0
}
@@ -225,14 +210,19 @@ export default function Cursor (terminal) {
}
this.toRect = function() {
+ const minX = min(this.x, this.x + this.w);
+ const minY = min(this.y, this.y + this.h);
+ const maxX = max(this.x, this.x + this.w);
+ const maxY = max(this.y, this.y + this.h);
return {
- x: this.minX,
- y: this.minY,
+ x: minX,
+ y: minY,
w: this.maxX - this.minX + 1,
h: this.maxY - this.minY + 1
};
};
+
this.selected = function(x, y) {
return (
x >= this.minX &&
| 5 |
diff --git a/src/main/java/de/uniwue/web/io/FileDatabase.java b/src/main/java/de/uniwue/web/io/FileDatabase.java @@ -313,8 +313,18 @@ public class FileDatabase {
* @return File name without extensions
*/
private String removeAllExtensions(String filename) {
- while(filename.contains(".")){
- filename = FilenameUtils.getBaseName(filename);
+ if (passesSubFilter(filename)) {
+ final int extPointPos = filename.lastIndexOf(".");
+ final int subExtPointPos = filename.lastIndexOf(".", extPointPos - 1);
+ if(subExtPointPos > 0)
+ return filename.substring(0, subExtPointPos);
+ else
+ return filename.substring(0, extPointPos);
+ } else {
+ final int extensionPointer = filename.lastIndexOf(".");
+ if(extensionPointer > 0)
+ return filename.substring(0, extensionPointer);
+
}
return filename;
}
| 13 |
diff --git a/example.html b/example.html <script>
var playlist = [
{
- url: 'http://benwiley4000.github.io/react-responsive-audio-player/audio/secret_of_trash_island.mp3',
+ url: 'https://cdn.rawgit.com/benwiley4000/react-responsive-audio-player/b11f4068991d7679257909df035a300525355d5c/audio/secret_of_trash_island.mp3',
title: 'Trash Island',
album: 'React Responsive Audio Player',
artwork: [{ src: 'https://3c1703fe8d.site.internapcdn.net/newman/csz/news/800/2017/photographer.jpg' }]
},
{
- url: 'http://benwiley4000.github.io/react-responsive-audio-player/audio/marty_mcpaper_theme.mp3',
+ url: 'https://cdn.rawgit.com/benwiley4000/react-responsive-audio-player/b11f4068991d7679257909df035a300525355d5c/audio/marty_mcpaper_theme.mp3',
title: 'Marty McPaper',
album: 'React Responsive Audio Player',
artwork: [{ src: 'https://i.imgur.com/jyfPSbw.jpg' }]
},
{
- url: 'http://benwiley4000.github.io/react-responsive-audio-player/audio/in_the_hall_of_the_mountain_king.mp3',
+ url: 'https://cdn.rawgit.com/benwiley4000/react-responsive-audio-player/b11f4068991d7679257909df035a300525355d5c/audio/in_the_hall_of_the_mountain_king.mp3',
title: 'Mountain King',
album: 'React Responsive Audio Player',
artwork: [{ src: 'https://i.pinimg.com/originals/c4/c1/cc/c4c1ccd2e9ad9bc1a8acdc8d74f2f039.jpg' }]
| 4 |
diff --git a/test/configCases/module-name/different-issuers-for-same-module/test.js b/test/configCases/module-name/different-issuers-for-same-module/test.js -require("should");
it("should assign different names to the same module with different issuers ", function() {
var fs = require("fs");
var path = require("path");
var bundle = fs.readFileSync(path.join(__dirname, "main.js"), "utf-8");
- bundle.should.match(/\.\/c\.js\?\w{4}/g);
- require("./a").should.be.equal("loader-a");
- require("./b").should.be.equal("loader-b");
+ expect(bundle.match(/"\.\/c\.js\?\w{4}":/g)).toHaveLength(2);
+ expect(require("./a")).toEqual("loader-a");
+ expect(require("./b")).toEqual("loader-b");
});
| 1 |
diff --git a/spark/components/stepper/react/SprkStepper.stories.js b/spark/components/stepper/react/SprkStepper.stories.js @@ -3,13 +3,24 @@ import React from 'react';
import SprkStepper from './SprkStepper';
import SprkStepperStep from './components/SprkStepperStep/SprkStepperStep';
+import { withKnobs, boolean, text } from '@storybook/addon-knobs';
+
export default {
title: 'Components|Stepper',
- parameters: { component: SprkStepper },
+ decorators: [withKnobs],
+ parameters: {
+ info: `
+This is some info about the Stepper
+ `,
+ },
};
export const defaultStory = () => (
- <SprkStepper>
+ <SprkStepper
+ hasDarkBackground={boolean('hasDarkBackground', false)}
+ additionalClasses={text('additionalClasses', '')}
+ idString={text('idString', '')}
+ >
<SprkStepperStep title="Step One"></SprkStepperStep>
<SprkStepperStep title="Step Two"></SprkStepperStep>
<SprkStepperStep title="Step Three"></SprkStepperStep>
@@ -20,20 +31,12 @@ defaultStory.story = {
name: 'Default',
};
-export const darkBackground = () => (
- <SprkStepper hasDarkBackground>
- <SprkStepperStep title="Step One"></SprkStepperStep>
- <SprkStepperStep title="Step Two"></SprkStepperStep>
- <SprkStepperStep title="Step Three"></SprkStepperStep>
- </SprkStepper>
-);
-
-darkBackground.story = {
- name: 'Dark Background',
-};
-
export const withDescriptions = () => (
- <SprkStepper>
+ <SprkStepper
+ hasDarkBackground={boolean('hasDarkBackground', false)}
+ additionalClasses={text('additionalClasses', '')}
+ idString={text('idString', '')}
+ >
<SprkStepperStep title="Step One" isSelected>
Step 1 Lorem ipsum dolor sit amet consectetur adipisicing elit.
</SprkStepperStep>
@@ -48,28 +51,3 @@ export const withDescriptions = () => (
</SprkStepperStep>
</SprkStepper>
);
-
-withDescriptions.story = {
- name: 'With Descriptions',
-};
-
-export const darkBackgroundAndDescriptions = () => (
- <SprkStepper hasDarkBackground>
- <SprkStepperStep title="Step One">
- Step 1 Lorem ipsum dolor sit amet consectetur adipisicing elit.
- </SprkStepperStep>
- <SprkStepperStep title="Step Two" isSelected>
- Step 2 Lorem ipsum dolor sit amet consectetur adipisicing elit.
- </SprkStepperStep>
- <SprkStepperStep title="Step Three">
- Step 3 Lorem ipsum dolor sit amet consectetur adipisicing elit.
- </SprkStepperStep>
- <SprkStepperStep title="Step Four">
- Step 4 Lorem ipsum dolor sit amet consectetur adipisicing elit.
- </SprkStepperStep>
- </SprkStepper>
-);
-
-darkBackgroundAndDescriptions.story = {
- name: 'Dark Background and Descriptions',
-};
| 12 |
diff --git a/src/apps.json b/src/apps.json },
"website": "https://www.xt-commerce.com"
},
- "Yepcomm": {
- "cats": [
- 6
- ],
- "icon": "yepcomm.png",
- "meta": {
- "copyright": "Yepcomm Tecnologia",
- "author": "Yepcomm Tecnologia"
- },
- "website": "https://www.yepcomm.com.br"
- },
- "Halo": {
- "cats": [
- 1,
- 11
- ],
- "icon": "Halo.svg",
- "meta": {
- "generator": "Halo ([\\d.]+)?\\;version:\\1"
- },
- "implies": "Java",
- "website": "https://halo.run"
- },
- "Rocket": {
- "cats": [
- 1,
- 6
- ],
- "headers": {
- "x-powered-by": "^Rocket=https://rocketcms.io/"
- },
- "icon": "Rocket.svg",
- "implies": [
- "webpack",
- "Node.js",
- "MySQL",
- "Less"
- ],
- "website": "https://rocketcms.io"
- },
- "Zipkin": {
- "cats": [
- 10
- ],
- "headers": {
- "X-B3-TraceId": "",
- "X-B3-SpanId": "",
- "X-B3-ParentSpanId": "",
- "X-B3-Sampled": "",
- "X-B3-Flags": ""
- },
- "icon": "Zipkin.png",
- "website": "https://zipkin.io/"
- },
- "RX Web Server": {
- "cats": [
- 22
- ],
- "headers": {
- "X-Powered-By": "RX-WEB"
- },
- "icon": "RXWeb.svg",
- "website": "http://developers.rokitax.co.uk/projects/rxweb"
- },
- "Tencent Waterproof Wall": {
- "cats": [
- 9
- ],
- "icon": "TencentWaterproofWall.png",
- "script": "/TCaptcha\\.js",
- "website": "https://007.qq.com/"
- },
"NitroPack": {
"cats": [
23
| 1 |
diff --git a/packages/@uppy/robodog/package.json b/packages/@uppy/robodog/package.json "url": "git+https://github.com/transloadit/uppy.git"
},
"dependencies": {
- "@uppy/core": "0.29.0",
- "@uppy/dashboard": "0.29.0",
- "@uppy/dropbox": "0.29.0",
- "@uppy/form": "0.29.0",
- "@uppy/google-drive": "0.29.0",
- "@uppy/instagram": "0.29.0",
- "@uppy/status-bar": "0.29.0",
- "@uppy/transloadit": "0.29.0",
- "@uppy/url": "0.29.0",
- "@uppy/utils": "0.29.0",
- "@uppy/webcam": "0.29.0",
- "es6-promise": "^4.2.5",
- "whatwg-fetch": "^3.0.0"
+ "@uppy/core": "0.30.1",
+ "@uppy/dashboard": "0.30.1",
+ "@uppy/dropbox": "0.30.1",
+ "@uppy/form": "0.30.1",
+ "@uppy/google-drive": "0.30.1",
+ "@uppy/instagram": "0.30.1",
+ "@uppy/status-bar": "0.30.1",
+ "@uppy/transloadit": "0.30.1",
+ "@uppy/url": "0.30.1",
+ "@uppy/utils": "0.30.1",
+ "@uppy/webcam": "0.30.1",
+ "es6-promise": "4.2.5",
+ "whatwg-fetch": "3.0.0"
}
}
| 3 |
diff --git a/scripts/contractInteraction/mainnet_contracts.json b/scripts/contractInteraction/mainnet_contracts.json "OriginInvestorsClaim": "0xE0f5BF8d0C58d9c8A078DB75A9D379E6CDF3149E",
"OrigingVestingCreator": "0xea173A078bA12673a8bef6DFa47A8E8f130B4939",
"contributorNFT": "0x8ffB12De9e7602843e4792DB0bC2863e9d137d06",
- "TokenSender": "0x31Ec06eB090Af6EEbfF5cF52084e9BCc3D7d9248",
+ "SOVTokenSender": "0x31Ec06eB090Af6EEbfF5cF52084e9BCc3D7d9248",
"GenericTokenSender": "0xeA0BC5b4868E776368DfE9be8837Be5b57a75b6e",
"RBTCWrapperProxy": "0xa917BF723433d020a15629eba71f6C2a6B38e52d",
"RBTCWrapperProxyWithoutLM": "0xA3B6E18B9A4ECAE44C7355458Ae7Db8874018C22",
| 10 |
diff --git a/js/plugins/urlHandler.js b/js/plugins/urlHandler.js (function(){
function init() {
+ // Try and automatically handle the URL if we're served from somewhere we know
+ if (typeof window!=="undefined" &&
+ window.location &&
+ (window.location.origin=="https://localhost" ||
+ window.location.origin=="https://www.espruino.com")) {
+ setTimeout(function() {
+ handle(window.location.href);
+ }, 200);
+ }
}
function handleQuery(key, val) {
function handle(url) {
console.log("Handling URL "+JSON.stringify(url));
url = (url);
+ var h = url.indexOf("#");
var q = url.indexOf("?");
+ if (h>=0) {
+ var hash = (q>h) ? url.substr(h+1,q) : url.substr(h+1);
+ if (hash.substr(0,7)=="http://" ||
+ hash.substr(0,8)=="https://") {
+ handleQuery("codeurl",hash);
+ }
+ }
if (q<0) return;
var query = url.substr(q+1).split("&");
for (var i in query) {
| 11 |
diff --git a/source/jquery.flot.touch.js b/source/jquery.flot.touch.js prevTap: { x: 0, y: 0 },
currentTap: { x: 0, y: 0 },
interceptedLongTap: false,
- allowEventPropagation: false,
+ isMultipleTouch: false,
prevTapTime: null,
tapStartTime: null,
longTapTriggerId: null
updateCurrentForDoubleTap(e);
updateStateForLongTapEnd(e);
- if (!gestureState.allowEventPropagation) {
+ if (!gestureState.isMultipleTouch) {
mainEventHolder.dispatchEvent(new CustomEvent('pandrag', { detail: e }));
}
},
touchmove: function(e) {
preventEventPropagation(e);
gestureState.twoTouches = isPinchEvent(e);
- if (!gestureState.allowEventPropagation) {
+ if (!gestureState.isMultipleTouch) {
mainEventHolder.dispatchEvent(new CustomEvent('pinchdrag', { detail: e }));
}
},
}
function preventEventPropagation(e) {
- if (!gestureState.allowEventPropagation) {
+ if (!gestureState.isMultipleTouch) {
e.preventDefault();
- e.stopPropagation();
}
}
function updateOnMultipleTouches(e) {
if (e.touches.length >= 3) {
- gestureState.allowEventPropagation = true;
+ gestureState.isMultipleTouch = true;
} else {
- gestureState.allowEventPropagation = false;
+ gestureState.isMultipleTouch = false;
}
}
| 11 |
diff --git a/src/traces/sunburst/attributes.js b/src/traces/sunburst/attributes.js @@ -218,11 +218,12 @@ module.exports = {
root: {
color: {
valType: 'color',
- editType: 'style',
+ editType: 'calc',
role: 'style',
dflt: 'rgba(0,0,0,0)',
description: [
- 'sets the color of the root node for a sunburst or a treemap trace.'
+ 'sets the color of the root node for a sunburst or a treemap trace.',
+ 'this has no effect when a colorscale is used to set the markers.'
].join(' ')
},
editType: 'calc'
| 12 |
diff --git a/token-metadata/0x1A5F9352Af8aF974bFC03399e3767DF6370d82e4/metadata.json b/token-metadata/0x1A5F9352Af8aF974bFC03399e3767DF6370d82e4/metadata.json "symbol": "OWL",
"address": "0x1A5F9352Af8aF974bFC03399e3767DF6370d82e4",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/Source/Scene/ModelExperimental/CustomShader.js b/Source/Scene/ModelExperimental/CustomShader.js @@ -206,7 +206,7 @@ CustomShader.prototype.setUniform = function (uniformName, value) {
var uniform = this.uniforms[uniformName];
if (uniform.type === UniformType.SAMPLER_2D) {
// Textures are fetched asynchronously and updated in update();
- fetchTexture2D(this, uniformName, uniform.value);
+ fetchTexture2D(this, uniformName, value);
} else {
uniform.value = value;
}
| 4 |
diff --git a/Sources/web3swift/Web3/Web3+Options.swift b/Sources/web3swift/Web3/Web3+Options.swift @@ -125,7 +125,7 @@ public struct TransactionOptions {
public static func fromJSON(_ json: [String: Any]) -> TransactionOptions? {
var options = TransactionOptions()
if let gas = json["gas"] as? String, let gasBiguint = BigUInt(gas.stripHexPrefix().lowercased(), radix: 16) {
- options.gasLimit = .limited(gasBiguint)
+ options.gasLimit = .manual(gasBiguint)
} else if let gasLimit = json["gasLimit"] as? String, let gasgasLimitBiguint = BigUInt(gasLimit.stripHexPrefix().lowercased(), radix: 16) {
options.gasLimit = .limited(gasgasLimitBiguint)
} else {
| 1 |
diff --git a/src/test/functional/functional-tests.js b/src/test/functional/functional-tests.js @@ -359,6 +359,15 @@ describe('functional tests', function() {
})
})
+ step(`getObject(bucketName, objectName, cb)_bucketName:${bucketName} non-existent object`, done => {
+ client.getObject(bucketName, 'an-object-that-does-not-exist', (e, stream) => {
+ if (stream) return done(new Error("on errors the stream object should not exist"))
+ if (!e) return done(new Error("expected an error object"))
+ if (e.code !== 'NoSuchKey') return done(new Error("expected NoSuchKey error"))
+ done()
+ })
+ })
+
step(`getPartialObject(bucketName, objectName, offset, length, cb)_bucketName:${bucketName}, objectName:${_6mbObjectName}, offset:0, length:100*1024_`, done => {
var hash = crypto.createHash('md5')
var expectedHash = crypto.createHash('md5').update(_6mb.slice(0,100*1024)).digest('hex')
| 0 |
diff --git a/lib/net/http_fetch_plugin.js b/lib/net/http_fetch_plugin.js @@ -115,6 +115,18 @@ shaka.net.HttpFetchPlugin = function(uri, request) {
};
+/**
+ * Determine if Fetch API is supported in the browser. Note: this is
+ * deliberately exposed as a method to allow the client app to use the same
+ * logic as Shaka when determining support.
+ * @return {boolean}
+ * @export
+ */
+shaka.net.HttpFetchPlugin.isSupported = function() {
+ return !!(window.fetch && window.AbortController);
+};
+
+
/**
* Overridden in unit tests, but compiled out in production.
*
@@ -142,7 +154,7 @@ shaka.net.HttpFetchPlugin.AbortController_ = window.AbortController;
shaka.net.HttpFetchPlugin.Headers_ = window.Headers;
-if (window.fetch && window.AbortController) {
+if (shaka.net.HttpFetchPlugin.isSupported()) {
shaka.net.NetworkingEngine.registerScheme('http', shaka.net.HttpFetchPlugin,
shaka.net.NetworkingEngine.PluginPriority.PREFERRED);
shaka.net.NetworkingEngine.registerScheme('https', shaka.net.HttpFetchPlugin,
| 5 |
diff --git a/RobotNXT/src/main/java/de/fhg/iais/roberta/factory/NxtCompilerWorkflow.java b/RobotNXT/src/main/java/de/fhg/iais/roberta/factory/NxtCompilerWorkflow.java @@ -126,6 +126,7 @@ public class NxtCompilerWorkflow implements ICompilerWorkflow {
try {
ProcessBuilder procBuilder = new ProcessBuilder(new String[] {
nbcCompilerFileName,
+ "-q",
this.pathToCrosscompilerBaseDir + token + "/src/" + mainFile + ".nxc",
"-O=" + this.pathToCrosscompilerBaseDir + token + "/" + mainFile + ".rxe",
"-I=" + base.resolve(path).toAbsolutePath().normalize().toString()
| 12 |
diff --git a/sling/core/.parent/pom.xml b/sling/core/.parent/pom.xml </dependency>
<!-- JSON -->
+ <!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
+ <!-- gson is not usually deployed in launchpad, but exported from core. -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
- <version>2.3.1</version>
+ <version>2.8.5</version>
<scope>provided</scope>
</dependency>
| 12 |
diff --git a/components/Worlds.js b/components/Worlds.js @@ -2,7 +2,7 @@ const WorldCard = (props) => {
return `
<div class="twoD-worlds-card">
<img class="twoD-worlds-card-img" src="https://techtrends.tech/wp-content/uploads/2017/11/Blockchain-Virtual-Reality-Social-VR-Consultancy-Decentraland-Linden-Lab-Second-Life-Sansar-Bitcoin-tech-trends-MANA.png">
- <a href="${window.location.href + '?u=' + props.worldName}" target="__blank">
+ <a href="${window.location.href + '?u=' + props.worldName}">
<h2 class="twoD-worlds-card-url">${props.worldName}</h2>
</a>
</div>
| 2 |
diff --git a/src/menelaus_web_buckets.erl b/src/menelaus_web_buckets.erl @@ -286,6 +286,13 @@ build_bucket_info(Id, BucketConfig, InfoLevel, LocalAddr, MayExposeAuth,
| Suffix2]
end,
+ Suffix4 = case ns_bucket:storage_mode(BucketConfig) of
+ couchstore ->
+ [{replicaIndex, proplists:get_value(replica_index, BucketConfig, true)} | Suffix3];
+ _ ->
+ Suffix3
+ end,
+
FlushEnabled = proplists:get_value(flush_enabled, BucketConfig, false),
MaybeFlushController =
case FlushEnabled of
@@ -304,7 +311,6 @@ build_bucket_info(Id, BucketConfig, InfoLevel, LocalAddr, MayExposeAuth,
_ -> <<"">>
end},
{proxyPort, proplists:get_value(moxi_port, BucketConfig, 0)},
- {replicaIndex, proplists:get_value(replica_index, BucketConfig, true)},
{uri, BuildUUIDURI(["pools", "default", "buckets", Id])},
{streamingUri, BuildUUIDURI(["pools", "default", "bucketsStreaming", Id])},
{localRandomKeyUri, bin_concat_path(["pools", "default",
@@ -326,7 +332,7 @@ build_bucket_info(Id, BucketConfig, InfoLevel, LocalAddr, MayExposeAuth,
{nodeStatsListURI, NodeStatsListURI}]}},
{ddocs, {struct, [{uri, DDocsURI}]}},
{nodeLocator, ns_bucket:node_locator(BucketConfig)}
- | Suffix3]}.
+ | Suffix4]}.
build_bucket_capabilities(BucketConfig) ->
Caps =
@@ -1211,9 +1217,19 @@ parse_validate_replicas_number(NumReplicas) ->
end.
parse_validate_replica_index(Params, ReplicasNum, true = _IsNew) ->
+ case proplists:get_value("bucketType", Params) =:= "ephemeral" of
+ true ->
+ case proplists:is_defined("replicaIndex", Params) of
+ true ->
+ {error, replicaIndex, <<"replicaIndex not supported for ephemeral buckets">>};
+ false ->
+ ignore
+ end;
+ false ->
parse_validate_replica_index(
proplists:get_value("replicaIndex", Params,
- replicas_num_default(ReplicasNum)));
+ replicas_num_default(ReplicasNum)))
+ end;
parse_validate_replica_index(_Params, _ReplicasNum, false = _IsNew) ->
ignore.
| 8 |
diff --git a/index.d.ts b/index.d.ts @@ -75,34 +75,67 @@ export interface RouterDictionary {
}
type HTMLElementOfStringLiteral<Q extends string> =
- Q extends 'div' ? HTMLDivElement:
Q extends 'a' ? HTMLAnchorElement:
- Q extends 'span' ? HTMLSpanElement:
- Q extends 'pre' ? HTMLPreElement:
- Q extends 'p' ? HTMLParagraphElement:
- Q extends 'hr' ? HTMLHRElement:
+ Q extends 'area' ? HTMLAreaElement:
+ Q extends 'audio' ? HTMLAudioElement:
+ Q extends 'base' ? HTMLBaseElement:
+ Q extends 'body' ? HTMLBodyElement:
Q extends 'br' ? HTMLBRElement:
- Q extends 'img' ? HTMLImageElement:
- Q extends 'iframe' ? HTMLIFrameElement:
- Q extends 'ul' ? HTMLUListElement:
- Q extends 'li' ? HTMLLIElement:
- Q extends 'ol' ? HTMLOListElement:
+ Q extends 'button' ? HTMLButtonElement:
+ Q extends 'canvas' ? HTMLCanvasElement:
+ Q extends 'data' ? HTMLDataElement:
+ Q extends 'datalist' ? HTMLDataListElement:
+ Q extends 'details' ? HTMLDetailsElement:
+ Q extends 'div' ? HTMLDivElement:
+ Q extends 'dl' ? HTMLDListElement:
+ Q extends 'embed' ? HTMLEmbedElement:
+ Q extends 'fieldset' ? HTMLFieldSetElement:
Q extends 'form' ? HTMLFormElement:
+ Q extends 'hr' ? HTMLHRElement:
+ Q extends 'head' ? HTMLHeadElement:
+ Q extends 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' ? HTMLHeadingElement:
+ Q extends 'html' ? HTMLHtmlElement:
+ Q extends 'iframe' ? HTMLIFrameElement:
+ Q extends 'img' ? HTMLImageElement:
Q extends 'input' ? HTMLInputElement:
Q extends 'label' ? HTMLLabelElement:
- Q extends 'textarea' ? HTMLTextAreaElement:
- Q extends 'select' ? HTMLSelectElement:
+ Q extends 'legend' ? HTMLLegendElement:
+ Q extends 'li' ? HTMLLIElement:
+ Q extends 'link' ? HTMLLinkElement:
+ Q extends 'map' ? HTMLMapElement:
+ Q extends 'meta' ? HTMLMetaElement:
+ Q extends 'meter' ? HTMLMeterElement:
+ Q extends 'del' | 'ins' ? HTMLModElement:
+ Q extends 'object' ? HTMLObjectElement:
+ Q extends 'ol' ? HTMLOListElement:
+ Q extends 'optgroup' ? HTMLOptGroupElement:
Q extends 'option' ? HTMLOptionElement:
- Q extends 'button' ? HTMLButtonElement:
- Q extends 'h1'|'h2'|'h3'|'h4'|'h5'|'h6' ? HTMLHeadingElement:
+ Q extends 'output' ? HTMLOutputElement:
+ Q extends 'p' ? HTMLParagraphElement:
+ Q extends 'param' ? HTMLParamElement:
+ Q extends 'pre' ? HTMLPreElement:
+ Q extends 'progress' ? HTMLProgressElement:
+ Q extends 'blockquote' | 'q' ? HTMLQuoteElement:
+ Q extends 'script' ? HTMLScriptElement:
+ Q extends 'select' ? HTMLSelectElement:
+ Q extends 'slot' ? HTMLSlotElement:
+ Q extends 'source' ? HTMLSourceElement:
+ Q extends 'span' ? HTMLSpanElement:
+ Q extends 'style' ? HTMLStyleElement:
+ Q extends 'caption' ? HTMLTableCaptionElement:
+ Q extends 'th' | 'td' ? HTMLTableCellElement:
+ Q extends 'col' | 'colgroup' ? HTMLTableColElement:
Q extends 'table' ? HTMLTableElement:
Q extends 'tr' ? HTMLTableRowElement:
- Q extends 'td' ? HTMLTableCellElement:
Q extends 'thead' | 'tbody' | 'tfoot' ? HTMLTableSectionElement:
- Q extends 'th' ? HTMLTableHeaderCellElement:
- Q extends 'style' ? HTMLStyleElement:
+ Q extends 'template' ? HTMLTemplateElement:
+ Q extends 'textarea' ? HTMLTextAreaElement:
+ Q extends 'time' ? HTMLTimeElement:
+ Q extends 'title' ? HTMLTitleElement:
+ Q extends 'track' ? HTMLTrackElement:
+ Q extends 'ul' ? HTMLUListElement:
+ Q extends 'video' ? HTMLVideoElement:
Q extends 'svg' ? SVGElement:
- Q extends 'canvas' ? HTMLCanvasElement:
HTMLElement
type RedomElementOfElQuery<Q extends RedomElQuery> =
| 0 |
diff --git a/src/parser/spells/scaling.js b/src/parser/spells/scaling.js @@ -109,11 +109,12 @@ export function getSpellScaling(data) {
if (isHigherLevelDefinitions && modScaleType === "spellscale") {
const definition = mod.atHigherLevels.higherLevelDefinitions[0];
if (definition) {
+ const die = definition.dice ? definition.dice : definition.die ? definition.die : undefined;
const modScaleDamage =
- definition.dice && definition.dice.diceString // if dice string
- ? definition.dice.diceString // use dice string
- : definition.dice && definition.dice.fixedValue // else if fixed value
- ? definition.dice.fixedValue // use fixed value
+ die?.diceString // if dice string
+ ? die.diceString // use dice string
+ : die?.fixedValue // else if fixed value
+ ? die.fixedValue // use fixed value
: definition.value; // else use value
// some spells have multiple scaling damage (e.g. Wall of Ice,
@@ -128,14 +129,20 @@ export function getSpellScaling(data) {
const existingMatch = diceFormula.exec(scaleDamage);
const modMatch = diceFormula.exec(modScaleDamage);
- if (!existingMatch || modMatch[1] > existingMatch[1]) {
+ const modMatchValue = modMatch
+ ? modMatch.length > 1 ? modMatch[1] : modMatch[0]
+ : undefined;
+
+ if (!existingMatch && !modMatch) {
+ scaleDamage = modScaleDamage;
+ } else if (!existingMatch || modMatchValue > existingMatch[1]) {
scaleDamage = modScaleDamage;
}
} else {
logger.warn("No definition found for " + data.definition.name);
}
} else if (isHigherLevelDefinitions && modScaleType === "characterlevel") {
- // cantrip support, important to set to a fixed vaue if using abilities like potent spellcasting
+ // cantrip support, important to set to a fixed value if using abilities like potent spellcasting
scaleDamage = baseDamage;
}
| 9 |
diff --git a/core/inject.js b/core/inject.js @@ -35,7 +35,6 @@ const bumpObjects = goog.require('Blockly.bumpObjects');
const common = goog.require('Blockly.common');
const dom = goog.require('Blockly.utils.dom');
const userAgent = goog.require('Blockly.utils.userAgent');
-const utils = goog.require('Blockly.utils');
const {BlockDragSurfaceSvg} = goog.require('Blockly.BlockDragSurfaceSvg');
@@ -277,7 +276,7 @@ const onKeyDown = function(e) {
return;
}
- if (utils.isTargetInput(e) ||
+ if (browserEvents.isTargetInput(e) ||
(mainWorkspace.rendered && !mainWorkspace.isVisible())) {
// When focused on an HTML text input widget, don't trap any keys.
// Ignore keypresses on rendered workspaces that have been explicitly
| 2 |
diff --git a/src/geo/gmaps/gmaps-cartodb-layer-group-view.js b/src/geo/gmaps/gmaps-cartodb-layer-group-view.js @@ -311,7 +311,7 @@ _.extend(
var overlays = this.gmapsMap.overlayMapTypes.getArray();
return _.findIndex(overlays, function (overlay) {
- return overlay._id === this._id;
+ return overlay && overlay._id === this._id;
}, this);
},
| 9 |
diff --git a/js/refGeneExons.js b/js/refGeneExons.js @@ -235,11 +235,14 @@ var RefGeneAnnotation = React.createClass({
});
},
tooltip: function (ev) {
- var {layout, column: {assembly}} = this.props,
- {x, y} = util.eventOffset(ev),
- {annotationHeight, perLaneHeight, laneOffset, lanes} = this.annotationLanes;
+ var {layout, column: {assembly}} = this.props;
- var rows = [],
+ if (!layout) { // gene model not loaded
+ return;
+ }
+ var {x, y} = util.eventOffset(ev),
+ {annotationHeight, perLaneHeight, laneOffset, lanes} = this.annotationLanes,
+ rows = [],
assemblyString = encodeURIComponent(assembly),
contextPadding = Math.floor((layout.zoom.end - layout.zoom.start) / 4),
posLayout = `${layout.chromName}:${util.addCommas(layout.zoom.start)}-${util.addCommas(layout.zoom.end)}`,
| 9 |
diff --git a/src/TemplatePath.js b/src/TemplatePath.js @@ -134,18 +134,18 @@ TemplatePath.normalizeUrlPath = function (...urlPaths) {
TemplatePath.absolutePath = function (...paths) {
let i = 0;
// check all the paths before we short circuit from the first index
- for (let path of paths) {
- if (path.startsWith("/") && i > 0) {
+ for (let p of paths) {
+ if (path.isAbsolute(p) && i > 0) {
throw new Error(
- `Only the first parameter to Template.absolutePath can be an absolute path. Received: ${path} from ${paths}`
+ `Only the first parameter to Template.absolutePath can be an absolute path. Received: ${p} from ${paths}`
);
}
i++;
}
let j = 0;
- for (let path of paths) {
- if (j === 0 && path.startsWith("/")) {
+ for (let p of paths) {
+ if (j === 0 && path.isAbsolute(p)) {
return TemplatePath.join(...paths);
}
j++;
| 0 |
diff --git a/server/src/events/thrusters.js b/server/src/events/thrusters.js import App from "../app";
import { pubsub } from "../helpers/subscriptionManager.js";
-App.on("rotationUpdate", ({ id, rotation, on }) => {
+App.on("rotationUpdate", ({ id, rotation, on, cb }) => {
const sys = App.systems.find(s => s.id === id);
sys.updateRotation(rotation, on);
+ cb && cb();
});
-App.on("rotationSet", ({ id, rotation }) => {
+App.on("rotationSet", ({ id, rotation, cb }) => {
const sys = App.systems.find(s => s.id === id);
sys.setRotation(rotation);
pubsub.publish("rotationChange", sys);
+ cb && cb();
});
-App.on("directionUpdate", ({ id, direction }) => {
+App.on("directionUpdate", ({ id, direction, cb }) => {
const sys = App.systems.find(s => s.id === id);
sys.updateDirection(direction);
pubsub.publish("rotationChange", sys);
+ cb && cb();
});
-App.on("requiredRotationSet", ({ id, rotation }) => {
+App.on("requiredRotationSet", ({ id, rotation, cb }) => {
const sys = App.systems.find(s => s.id === id);
sys.updateRequired(rotation);
pubsub.publish("rotationChange", sys);
+ cb && cb();
});
-App.on("setThrusterRotationSpeed", ({ id, speed }) => {
+App.on("setThrusterRotationSpeed", ({ id, speed, cb }) => {
const sys = App.systems.find(s => s.id === id);
sys.setRotationSpeed(speed);
pubsub.publish("rotationChange", sys);
+ cb && cb();
});
-App.on("setThrusterMovementSpeed", ({ id, speed }) => {
+App.on("setThrusterMovementSpeed", ({ id, speed, cb }) => {
const sys = App.systems.find(s => s.id === id);
sys.setMovementSpeed(speed);
pubsub.publish("rotationChange", sys);
+ cb && cb();
});
| 1 |
diff --git a/src/HeaderIcon.module.css b/src/HeaderIcon.module.css +@keyframes hueRotate {
+ 0% {
+ filter: hue-rotate(0deg);
+ }
+ 25% {
+ filter: hue-rotate(90deg);
+ }
+ 50% {
+ filter: hue-rotate(180deg);
+ }
+ 75% {
+ filter: hue-rotate(270deg);
+ }
+ 100% {
+ filter: hue-rotate(360deg);
+ }
+}
+
.headerIcon {
--width: 200px;
width: 50px;
background: linear-gradient(to bottom,rgb(194, 130, 130) 20%,rgb(255, 255, 255) 40%,rgb(255, 170, 170) 60%, rgb(255, 170, 170) 100%);
}
+.headerIcon .characterIcon .limitBar.full .inner {
+ animation-name: hueRotate;
+ animation-duration: 0.5s;
+ animation-iteration-count: infinite;
+ animation-timing-function: linear;
+}
.headerIcon .buttonWrap {
display: flex;
justify-content: center;
| 0 |
diff --git a/src/widgets/widget-view.js b/src/widgets/widget-view.js @@ -52,26 +52,30 @@ module.exports = cdb.core.View.extend({
_onDataviewModelEvent: function (type, error) {
var enhancedError = errorEnhancer(error);
+
if (type.lastIndexOf('error', 0) === 0) {
return this.render(enhancedError);
}
if (type === 'sync' || type === 'change:data') {
- var dataviewModel = this.model.dataviewModel;
- var valueToCheck = dataviewModel.get('type') === 'histogram'
- ? 'totalAmount'
- : 'data';
- var data = dataviewModel.get(valueToCheck);
-
- if (!data || (_.isArray(data) && _.isEmpty(data))) {
- return this.render(errorEnhancer({ type: 'no_data_available' }));
- }
- return this.render();
+ return this._noDataAvailable()
+ ? this.render(errorEnhancer({ type: 'no_data_available' }))
+ : this.render();
}
},
_appendView: function (view) {
this.$el.append(view.render().el);
this.addView(view);
+ },
+
+ _noDataAvailable: function () {
+ var dataviewModel = this.model.dataviewModel;
+ var valueToCheck = dataviewModel.get('type') === 'histogram'
+ ? 'totalAmount'
+ : 'data';
+ var data = dataviewModel.get(valueToCheck);
+
+ return !data || (_.isArray(data) && _.isEmpty(data));
}
});
| 5 |
diff --git a/themes/5ePhb.style.less b/themes/5ePhb.style.less @@ -450,7 +450,7 @@ body {
break-before : column;
}
//Avoid breaking up
- p,blockquote,table{
+ blockquote,table{
z-index : 15;
-webkit-column-break-inside : avoid;
page-break-inside : avoid;
| 11 |
diff --git a/token-metadata/0x90f62B96a62801488b151fF3c65eaC5Fae21a962/metadata.json b/token-metadata/0x90f62B96a62801488b151fF3c65eaC5Fae21a962/metadata.json "symbol": "GEM",
"address": "0x90f62B96a62801488b151fF3c65eaC5Fae21a962",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/test/jasmine/tests/hover_label_test.js b/test/jasmine/tests/hover_label_test.js @@ -4103,6 +4103,16 @@ describe('hovermode: (x|y)unified', function() {
};
Plotly.newPlot(gd, mockCopy)
.then(function(gd) {
+ expect(gd._fullLayout.hovermode).toBe('y unified');
+ var ax = gd._fullLayout.yaxis;
+ expect(ax.showspike).toBeTrue;
+ expect(ax.spikemode).toBe('across');
+ expect(ax.spikethickness).toBe(1.5);
+ expect(ax.spikedash).toBe('dot');
+ expect(ax.spikecolor).toBe('#444');
+ expect(ax.spikesnap).toBe('hovered data');
+ expect(gd._fullLayout.xaxis.showspike).toBeFalse;
+
_hover(gd, { yval: 6 });
assertLabel({title: '6', items: ['trace 0 : 2', 'trace 1 : 5']});
| 7 |
diff --git a/db/Dockerfile b/db/Dockerfile FROM postgres:9.4
+RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
+ locale-gen
+ENV LANG en_US.UTF-8
+ENV LANGUAGE en_US:en
+ENV LC_ALL en_US.UTF-8
+
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y postgresql-9.4-pgrouting gdal-bin
| 1 |
diff --git a/config/redirects.js b/config/redirects.js @@ -2088,10 +2088,10 @@ module.exports = [
from: '/applications/application-settings/single-page-app',
to: '/applications/spa#settings'
},
- {
- from: ['/tokens/overview-access-tokens','/tokens/access-token','/tokens/access_token', '/tokens/access-tokens'],
- to: '/tokens/concepts/access-tokens'
- },
+ // {
+ // from: ['/tokens/overview-access-tokens','/tokens/access-token','/tokens/access_token', '/tokens/access-tokens'],
+ // to: '/tokens/concepts/access-tokens'
+ // },
{
from: ['/api-auth/tutorials/verify-access-token', '/tokens/guides/access-token/validate-access-token'],
to: '/tokens/guides/validate-access-tokens'
@@ -3139,7 +3139,7 @@ module.exports = [
to: '/tokens/access-tokens/refresh-tokens/use-refresh-tokens'
},
{
- from: '/tokens/concepts/access-tokens',
+ from: ['/tokens/overview-access-tokens','/tokens/access-token','/tokens/access_token', '/tokens/concepts/access-tokens'],
to: '/tokens/access-tokens'
},
{
| 2 |
diff --git a/src/encoded/schemas/generic_quality_metric.json b/src/encoded/schemas/generic_quality_metric.json "title": "MIME type",
"type": "string",
"enum": [
+ "application/gzip",
"application/pdf",
- "text/plain",
- "text/tab-separated-values",
"image/jpeg",
"image/png",
"image/tiff",
"image/gif",
- "text/html"
+ "text/html",
+ "text/plain",
+ "text/tab-separated-values"
]
},
"size": {
| 0 |
diff --git a/shared/testing/setup.js b/shared/testing/setup.js @@ -36,7 +36,7 @@ module.exports = async () => {
.then(() =>
mockDb
.table(table)
- .insert(data[table])
+ .insert(data[table], { conflict: 'replace' })
.run()
)
);
| 14 |
diff --git a/blocks/typed_blocks.js b/blocks/typed_blocks.js @@ -844,11 +844,6 @@ Blockly.Blocks['function_app_typed'] = {
*/
domToMutation: function(xmlElement) {
var newParamCount = parseInt(xmlElement.getAttribute('params'), 0);
- goog.asserts.assert(this.paramCount_ == 0,
- 'Default parameter count must be zero.');
- if (newParamCount == 0) {
- return;
- }
// Update parameter inputs depending on the type of the reference value.
this.updateInput();
if (this.paramCount_ == newParamCount) {
| 2 |
diff --git a/javascript/stimulus_reflex.js b/javascript/stimulus_reflex.js @@ -78,8 +78,8 @@ const setup = () => {
// Initializes StimulusReflex by registering the default Stimulus controller
// with the passed Stimulus application
-const initialize = application => {
- application.register('stimulus-reflex', StimulusReflexController);
+const initialize = (application, controller) => {
+ application.register('stimulus-reflex', controller || StimulusReflexController);
};
// Registers a Stimulus controller and extends it with StimulusReflex behavior
| 11 |
diff --git a/src/apps.json b/src/apps.json },
"Wix": {
"cats": [
- 1
+ 1,
+ 6,
+ 11
],
"cookies": {
"Domain": "\\.wix\\.com"
"X-Wix-Server-Artifact-Id": ""
},
"icon": "Wix.png",
+ "implies": [
+ "React"
+ ],
"js": {
- "wixData": "",
- "wixErrors": "",
- "wixEvents": ""
+ "wixBiSession": ""
+ },
+ "meta": {
+ "generator": "Wix\\.com Website Builder"
},
- "script": "static\\.wixstatic\\.com",
- "website": "http://wix.com"
+ "script": "static\\.parastorage\\.com",
+ "website": "https://www.wix.com"
},
"Wolf CMS": {
"cats": [
| 7 |
diff --git a/examples/anvil.js b/examples/anvil.js @@ -63,25 +63,23 @@ bot.on('chat', async (username, message) => {
}
})
-function tossItem (name, amount) {
+async function tossItem (name, amount) {
amount = parseInt(amount, 10)
const item = itemByName(name)
if (!item) {
bot.chat(`I have no ${name}`)
- } else if (amount) {
- bot.toss(item.type, null, amount, checkIfTossed)
} else {
- bot.tossStack(item, checkIfTossed)
- }
-
- function checkIfTossed (err) {
- if (err) {
- bot.chat(`unable to toss: ${err.message}`)
- } else if (amount) {
+ try {
+ if (amount) {
+ await bot.toss(item.type, null, amount)
bot.chat(`tossed ${amount} x ${name}`)
} else {
+ await bot.tossStack(item)
bot.chat(`tossed ${name}`)
}
+ } catch (err) {
+ bot.chat(`unable to toss: ${err.message}`)
+ }
}
}
| 2 |
diff --git a/ext/filterLists/updateEasylist.js b/ext/filterLists/updateEasylist.js @@ -41,7 +41,13 @@ makeRequest(easylistOptions, function (easylist) {
makeRequest(easyprivacyOptions, function (easyprivacy) {
var data = easylist + easyprivacy
- data = data.replace(/.*##.+\n/g, '')
+ data = data.split('\n').filter(function (line) {
+ return (
+ !line.includes('##') && // element hiding rules
+ !line.includes('#@') && // element hiding exceptions
+ !line.trim().startsWith('!') // comments
+ )
+ }).join('\n')
fs.writeFileSync(filePath, data)
})
| 2 |
diff --git a/core/extension/osd-segment-overlay.js b/core/extension/osd-segment-overlay.js const style = polygon.properties.style;
// default coordinate is 'normalized'
- let convertX = this._viewer.imagingHelper.logicalToPhysicalX;
- let convertY = this._viewer.imagingHelper.logicalToPhysicalY;
+ let convertX = this._viewer.imagingHelper.logicalToPhysicalX.bind(this._viewer.imagingHelper);
+ let convertY = this._viewer.imagingHelper.logicalToPhysicalY.bind(this._viewer.imagingHelper);
// if coordinate is 'image'
if(segment.provenance &&
segment.provenance.analysis &&
segment.provenance.analysis.coordinate &&
segment.provenance.analysis.coordinate == 'image'){
- convertX = this._viewer.imagingHelper.dataToLogicalX;
- convertY = this._viewer.imagingHelper.dataToPhysicalY;
+ convertX = this._viewer.imagingHelper.dataToPhysicalX.bind(this._viewer.imagingHelper);
+ convertY = this._viewer.imagingHelper.dataToPhysicalY.bind(this._viewer.imagingHelper);
}
this._display_ctx_.lineJoin = style.lineJoin;
this._display_ctx_.lineCap = style.lineCap;
| 1 |
diff --git a/buildtools/check-example.js b/buildtools/check-example.js @@ -37,9 +37,11 @@ page.onAlert = function(msg) {
};
page.onResourceError = function(resourceError) {
if (resourceError.url.includes('tile.openstreetmap.org')) {
- console.warn('Ignoring ressource error from openstreetmap');
+ console.warn('Ignoring ressource error from OpenStreetMap');
} else if (resourceError.url.includes('https://maps.googleapis.com/maps/api/js')) {
- console.warn('Ignoring ressource error from google');
+ console.warn('Ignoring ressource error from Google');
+ } else if (resourceError.url.includes('https://csi.gstatic.com/')) {
+ console.warn('Ignoring ressource error from Google static');
} else {
console.log('Resource error: ' + resourceError.errorCode + ', ' + resourceError.url);
exitCode = 2;
| 8 |
diff --git a/src/helpers/_focused.scss b/src/helpers/_focused.scss ///
/// Provides an outline to clearly indicate when the target element is focused.
/// Used for interactive text-based elements.
+///
+/// @access public
@mixin govuk-focused-text {
// When colours are overridden, for example when users have a dark mode,
| 12 |
diff --git a/.eslintrc.js b/.eslintrc.js @@ -32,5 +32,7 @@ module.exports = {
],
'no-console': OFF,
'global-require': OFF,
+ // Allow mixed linebreaks locally, but commit only LF.
+ 'linebreak-style': process.env.CI ? ['error', 'unix'] : OFF,
},
};
| 11 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.