code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/src/cli.js b/src/cli.js @@ -54,6 +54,11 @@ const {
}));
console.log('\n\nResults: \n');
- const report = constructReport(results);
+ const { summary, report } = constructReport(results);
+ if (summary.allGreen) {
+ process.exit(0);
+ } else {
await saveReport(report);
+ process.exit(1);
+ }
})();
| 7 |
diff --git a/server/game/player.js b/server/game/player.js @@ -71,6 +71,9 @@ class Player extends Spectator {
fate: false,
regroup: false
};
+ this.timerSettings = user.settings.timerSettings || {};
+ this.timerSettings.windowTimer = user.settings.windowTimer;
+ this.keywordSettings = user.settings.keywordSettings;
this.createAdditionalPile('out of game', { title: 'Out of Game', area: 'player row' });
| 1 |
diff --git a/src/apps.json b/src/apps.json "cats": [
19
],
- "html": "<[^>]+id='cgit'",
+ "meta": {
+ "generator": "^cgit v([\d.a-z-]+)$\\;version:\\1"
+ },
+ "html": [
+ "<[^>]+id='cgit'",
+ "generated by <a href='http://git.zx2c4.com/cgit/about/'>cgit v([\d.a-z-]+)</a>\\;version:\\1"
+ ],
"icon": "cgit.png",
"implies": "Perl",
"website": "git.zx2c4.com/cgit"
| 7 |
diff --git a/src/core/operations/BlurImage.mjs b/src/core/operations/BlurImage.mjs @@ -32,7 +32,8 @@ class BlurImage extends Operation {
{
name: "Blur Amount",
type: "number",
- value: 5
+ value: 5,
+ min: 1
},
{
name: "Blur Type",
@@ -59,6 +60,8 @@ class BlurImage extends Operation {
image.blur(blurAmount);
break;
case "Gaussian":
+ if (ENVIRONMENT_IS_WORKER())
+ self.sendStatusMessage("Gaussian blurring image. This will take a while...");
image.gaussian(blurAmount);
break;
}
| 12 |
diff --git a/src/Colors/index.js b/src/Colors/index.js @@ -14,7 +14,7 @@ let colors = {
export const initColors = colors => {
return new Promise((resolve, reject) => {
if (typeof colors === 'object') {
- this.add(colors)
+ add(colors)
resolve()
}
fetch(colors)
| 1 |
diff --git a/edit.js b/edit.js @@ -2490,16 +2490,21 @@ const geometryWorker = (() => {
value: null,
needsUpdate: true,
},
- uSelectId: {
+ uHitId: {
type: 'f',
value: -1,
needsUpdate: true,
},
- uSelectPosition: {
+ uHitPosition: {
type: 'v3',
value: new THREE.Vector3(),
needsUpdate: true,
},
+ uSelectId: {
+ type: 'f',
+ value: -1,
+ needsUpdate: true,
+ },
sunIntensity: {
type: 'f',
value: 1,
@@ -2510,8 +2515,9 @@ const geometryWorker = (() => {
precision highp float;
precision highp int;
+ uniform float uHitId;
+ uniform vec3 uHitPosition;
uniform float uSelectId;
- uniform vec3 uSelectPosition;
attribute float id;
attribute float skyLight;
attribute float torchLight;
@@ -2526,11 +2532,13 @@ const geometryWorker = (() => {
void main() {
vUv = uv;
vec3 p = position;
- if (uSelectId == id) {
- vSelectColor = vec3(${new THREE.Color(0xef5350).toArray().join(', ')});
- p += uSelectPosition;
- } else {
vSelectColor = vec3(0.);
+ if (uHitId == id) {
+ vSelectColor = vec3(${new THREE.Color(0xef5350).toArray().join(', ')});
+ p += uHitPosition;
+ }
+ if (uSelectId == id) {
+ vSelectColor = vec3(${new THREE.Color(0x4fc3f7).toArray().join(', ')});
}
// vNormal = normal;
gl_Position = projectionMatrix * modelViewMatrix * vec4(p, 1.0);
@@ -2778,11 +2786,11 @@ const geometryWorker = (() => {
hps[id] = Math.max(hps[id] - dmg, 0);
return hps[id] > 0;
}, (positionOffset) => {
- currentVegetationMesh.material[0].uniforms.uSelectPosition.value.copy(positionOffset);
- currentVegetationMesh.material[0].uniforms.uSelectPosition.needsUpdate = true;
+ currentVegetationMesh.material[0].uniforms.uHitPosition.value.copy(positionOffset);
+ currentVegetationMesh.material[0].uniforms.uHitPosition.needsUpdate = true;
}, id => {
- currentVegetationMesh.material[0].uniforms.uSelectId.value = id;
- currentVegetationMesh.material[0].uniforms.uSelectId.needsUpdate = true;
+ currentVegetationMesh.material[0].uniforms.uHitId.value = id;
+ currentVegetationMesh.material[0].uniforms.uHitId.needsUpdate = true;
}, (id, position, quaternion) => {
_addItem(position, quaternion);
@@ -5321,9 +5329,15 @@ function animate(timestamp, frame) {
case 'select': {
for (const thingMesh of meshDrawer.thingMeshes) {
thingMesh.material.uniforms.uSelectColor.value.setHex(0xFFFFFF);
- thingMesh.material.uniforms.needsUpdate = true;
+ thingMesh.material.uniforms.uSelectColor.needsUpdate = true;
}
+ currentVegetationMesh.material[0].uniforms.uSelectId.value = -1;
+ currentVegetationMesh.material[0].uniforms.uSelectId.needsUpdate = true;
+
if (raycastChunkSpec && raycastChunkSpec.objectId !== 0) {
+ currentVegetationMesh.material[0].uniforms.uSelectId.value = raycastChunkSpec.objectId;
+ currentVegetationMesh.material[0].uniforms.uSelectId.needsUpdate = true;
+
const index = meshDrawer.thingSources.findIndex(thingSource => thingSource.objectId === raycastChunkSpec.objectId);
if (index !== -1) {
const thingMesh = meshDrawer.thingMeshes[index];
| 0 |
diff --git a/articles/connections/enterprise/ws-fed.md b/articles/connections/enterprise/ws-fed.md @@ -18,7 +18,7 @@ To configure this connection, navigate to [Dashboard > Connections > Enterprise]
Click __Create New Connection__ and enter the following information:
* __Connection Name__ - A descriptive name for the connection
-* __Email Domains__ - (Optional)
+* __Email Domains__ - (Optional) A comma-separated list of valid domains. Only needed if you want to use the [Lock login widget](/libraries/lock).
Next, you must either provide the URL for your WS-Federation server in the __ADFS URL__ field or upload a Federation Metadata file.
| 0 |
diff --git a/src/runtime/meter-toast-api.js b/src/runtime/meter-toast-api.js @@ -37,8 +37,8 @@ export const DEFAULT_IFRAME_URL = '/metertoastiframe';
* - iframeUrlParams: List of extra params appended to the URL.
*
* @typedef {{
- * iframeUrl: (string|undefined),
- * iframeUrlParams: (?Object<string, string>|undefined),
+ * iframeUrl: (string),
+ * iframeUrlParams: (Object<string, string>),
* }}
*/
export let MeterToastApiParams;
@@ -46,9 +46,14 @@ export let MeterToastApiParams;
export class MeterToastApi {
/**
* @param {!./deps.DepsDef} deps
- * @param {?MeterToastApiParams=} params
+ * @param {!MeterToastApiParams=} params
+ * @param {string} params.iframeUrl
+ * @param {Object<string, string>} params.iframeUrlParams
*/
- constructor(deps, params = undefined) {
+ constructor(
+ deps,
+ {iframeUrl = DEFAULT_IFRAME_URL, iframeUrlParams = {}} = {}
+ ) {
/** @private @const {!./deps.DepsDef} */
this.deps_ = deps;
@@ -69,10 +74,7 @@ export class MeterToastApi {
this.activityIframeView_ = new ActivityIframeView(
this.win_,
this.activityPorts_,
- feUrl(
- params && params.iframeUrl ? params.iframeUrl : DEFAULT_IFRAME_URL,
- params && params.iframeUrlParams ? params.iframeUrlParams : {}
- ),
+ feUrl(iframeUrl, iframeUrlParams),
iframeArgs,
/* shouldFadeBody */ false
);
| 12 |
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/field/collection/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/field/collection/template.vue mounted(){
// console.log('this.model: ', this.model)
if(this.schema.multifield){
- $(this.$refs.collapsible).collapsible()
+ $(this.$refs.collapsible).collapsible({accordion: false})
}
},
beforeDestroy(){
const len = this.schema.fieldLabel.length
for(let i=0; i<len; i++){
let label = this.schema.fieldLabel[i]
- let childItem = this.model.children[index]
+ let childItem = this.value[index]
// console.log('child item: ', childItem)
if(childItem[label]){
return childItem[label]
this.$set(this.value, index, modelItem)
},
onSetActiveItem(index){
- if(index !== this.activeItem){
+ if(index === this.activeItem){
+ $(this.$refs.collapsible).collapsible('close', this.activeItem)
+ this.activeItem = null
+ } else {
this.$nextTick(function () {
if(this.activeItem !== null){
$(this.$refs.collapsible).collapsible('close', this.activeItem)
| 12 |
diff --git a/docs/api/bindings/createComponent.md b/docs/api/bindings/createComponent.md @@ -7,7 +7,7 @@ It automatically composes rules and passed props for nested Fela components.
## Arguments
| Argument | Type | Default | Description |
| --- | --- | --- | --- |
-| rule | *Function*<br>*Object* | | Either a [style object](../basics/Rules.md#styleobject) or rule function which satisfies the [rule](../basics/Rules.md) behavior and returns a valid [style object](../basics/Rules.md#styleobject). |
+| rule | *Function*<br>*Object* | | Either a [style object](../../basics/Rules.md#style-object) or rule function which satisfies the [rule](../../basics/Rules.md) behavior and returns a valid [style object](../../basics/Rules.md#style-object). |
| type | *string?*<br>*[Component](https://facebook.github.io/react/docs/top-level-api.html#react.component)?* | `div` | Component or HTML element which is used as the render base element.<br>**Note**: If a Component is passed, then it receives a className property. |
| passThroughProps | *Array?*<br>*Function?* | | A list of props that get passed to the underlying element.<br>Alternatively a function of `props` that returns an array of prop names. |
| 1 |
diff --git a/website/src/docs/fileinput.md b/website/src/docs/fileinput.md @@ -47,7 +47,7 @@ import '@uppy/core/dist/style.css'
import '@uppy/file-input/dist/style.css'
```
-Import general Core styles from `@uppy/core/dist/style.css` first, then add the Drag & Drop styles from `@uppy/file-input/dist/style.css`. A minified version is also available as `style.min.css` at the same path. The way to do import depends on your build system.
+Import general Core styles from `@uppy/core/dist/style.css` first, then add the File Input styles from `@uppy/file-input/dist/style.css`. A minified version is also available as `style.min.css` at the same path. The way to do import depends on your build system.
## Options
| 14 |
diff --git a/css/style.css b/css/style.css @@ -388,6 +388,10 @@ table.dataTable.display tbody tr.odd:hover,
table.dataTable.display tbody tr.even:hover {
background-color: rgba(255, 255, 0, 0.2);
}
+table.dataTable.hover tbody tr:hover.selected,
+table.dataTable.display tbody tr:hover.selected {
+ background-color: #bcc8b8;
+}
/*
* No-go areas
| 12 |
diff --git a/assets/js/components/notifications/IdeaHubModuleNotification.js b/assets/js/components/notifications/IdeaHubModuleNotification.js @@ -28,6 +28,8 @@ import { useCallback } from '@wordpress/element';
import Data from 'googlesitekit-data';
import { CORE_MODULES } from '../../googlesitekit/modules/datastore/constants';
import { CORE_USER } from '../../googlesitekit/datastore/user/constants';
+import { CORE_LOCATION } from '../../googlesitekit/datastore/location/constants';
+import { CORE_SITE } from '../../googlesitekit/datastore/site/constants';
import { MODULES_IDEA_HUB } from '../../modules/idea-hub/datastore/constants';
import Notification from '../legacy-notifications/notification';
import IdeaHubNotificationSVG from '../../../svg/idea-hub-notification.svg';
@@ -37,6 +39,9 @@ const NOTIFICATION_ID = 'idea-hub-module-notification';
const IdeaHubModuleNotification = () => {
const { dismissItem } = useDispatch( CORE_USER );
+ const { activateModule } = useDispatch( CORE_MODULES );
+ const { navigateTo } = useDispatch( CORE_LOCATION );
+ const { setInternalServerError } = useDispatch( CORE_SITE );
const isActive = useSelect( ( select ) => select( CORE_MODULES ).isModuleActive( 'idea-hub' ) );
const isItemDismissed = useSelect( ( select ) => select( CORE_USER ).isItemDismissed( NOTIFICATION_ID ) );
@@ -46,6 +51,20 @@ const IdeaHubModuleNotification = () => {
await dismissItem( NOTIFICATION_ID );
}, [ dismissItem ] );
+ const handleOnCTAClick = useCallback( async ( event ) => {
+ event.preventDefault();
+ const { error, response } = await activateModule( 'idea-hub' );
+
+ if ( ! error ) {
+ navigateTo( response.moduleReauthURL );
+ } else {
+ setInternalServerError( {
+ id: 'idea-hub-setup-error',
+ description: error.message,
+ } );
+ }
+ }, [ activateModule, navigateTo, setInternalServerError ] );
+
if ( isActive || isActive === undefined || isItemDismissed || isItemDismissed === undefined ) {
return null;
}
@@ -62,6 +81,7 @@ const IdeaHubModuleNotification = () => {
type="win-success"
dismiss={ __( 'Dismiss', 'google-site-kit' ) }
onDismiss={ handleOnDismiss }
+ onCTAClick={ handleOnCTAClick }
/>
);
};
| 4 |
diff --git a/angular/projects/spark-angular/src/lib/components/sprk-dictionary/sprk-dictionary.stories.ts b/angular/projects/spark-angular/src/lib/components/sprk-dictionary/sprk-dictionary.stories.ts @@ -62,7 +62,7 @@ export const striped = () => ({
'Work Phone': '(555) 555-5555',
'Work Extension': '55555'
}"
- idString="dictionary-1"
+ idString="dictionary-2"
></sprk-dictionary>
`
});
| 3 |
diff --git a/src/components/core/events/onResize.js b/src/components/core/events/onResize.js @@ -29,7 +29,6 @@ export default function () {
if (params.autoHeight) {
swiper.updateAutoHeight();
}
-
} else {
swiper.updateSlidesClasses();
if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
| 2 |
diff --git a/src/immer.d.ts b/src/immer.d.ts @@ -23,7 +23,7 @@ export default function<S = any, A = any, B = any>(
): (currentState: S, a: A, b: B) => S
export default function<S = any, A = any>(
recipe: (this: S, draftState: S, a: A) => void
-): (currentState: S) => S
+): (currentState: S, a: A) => S
export default function<S = any>(
recipe: (this: S, draftState: S, ...extraArgs: any[]) => void
): (currentState: S, ...extraArgs: any[]) => S
| 0 |
diff --git a/packages/@uppy/status-bar/src/style.scss b/packages/@uppy/status-bar/src/style.scss }
}
- .uppy-StatusBar-actionCircleBtn:focus {
- outline: 2px solid $blue;
- outline-offset: 0;
- }
-
// .uppy-StatusBar-actionCircleBtn:not(:last-child) {
// margin-right: 2px;
// }
| 2 |
diff --git a/new-client/src/plugins/DocumentHandler/documentWindow/TableOfContents.js b/new-client/src/plugins/DocumentHandler/documentWindow/TableOfContents.js @@ -179,6 +179,7 @@ class TableOfContents extends React.PureComponent {
className={classes.collapseContainer}
in={expanded}
id="expansion-panel-content"
+ aria-hidden={!expanded}
>
<Grid container spacing={0}>
{this.renderChapters(activeDocument)}
| 12 |
diff --git a/src/inner-slider.js b/src/inner-slider.js @@ -46,13 +46,13 @@ export var InnerSlider = createReactClass({
},
componentDidMount: function componentDidMount() {
let spec = assign({listRef: this.list, trackRef: this.track}, this.props)
- let initialState = initializedState(spec)
- assign(spec, {slideIndex: initialState.currentSlide}, initialState)
+ let initState = initializedState(spec)
+ assign(spec, {slideIndex: initState.currentSlide}, initState)
let targetLeft = getTrackLeft(spec)
assign(spec, {left: targetLeft})
let trackStyle = getTrackCSS(spec)
- initialState['trackStyle'] = trackStyle
- this.setState( initialState, () => {
+ initState['trackStyle'] = trackStyle
+ this.setState( initState, () => {
this.adaptHeight()
this.autoPlay() // it doesn't have to be here
})
| 10 |
diff --git a/8-code-editor/1-using-a-code-editor/README.md b/8-code-editor/1-using-a-code-editor/README.md @@ -23,7 +23,7 @@ In this lesson, you'll learn how to:
### Prerequisites
-Before you begin, you'll need to create an account with [GitHub](https://github.com). Navigate to [GtiHub](https://github.com/) and create an account if you haven't already.
+Before you begin, you'll need to create an account with [GitHub](https://github.com). Navigate to [GitHub](https://github.com/) and create an account if you haven't already.
### Introduction
@@ -31,7 +31,7 @@ A code editor is an essential tool for writing programs and collaborating with e
## Getting started with VSCode.dev
-[VSCode.dev](https://vscode.dev) is a code editor on the web. You don't need to install anything in order to use it, just like opening any other website. To get started with the editor, open the following link: [https://vscode.dev](https://vscode.dev). If you aren't signed in into [GtiHub](https://github.com/), follow the prompts to sign in or create a new account and then sign in.
+[VSCode.dev](https://vscode.dev) is a code editor on the web. You don't need to install anything in order to use it, just like opening any other website. To get started with the editor, open the following link: [https://vscode.dev](https://vscode.dev). If you aren't signed in into [GitHub](https://github.com/), follow the prompts to sign in or create a new account and then sign in.
Once it loads, it should look similar to this image:
| 1 |
diff --git a/packages/react-router/index.tsx b/packages/react-router/index.tsx @@ -884,7 +884,7 @@ export function matchPath(
let matchedPathname = match[1];
let values = match.slice(2);
let params = paramNames.reduce((memo, paramName, index) => {
- memo[paramName] = safelyDecodeURIComponent(values[index], paramName);
+ memo[paramName] = safelyDecodeURIComponent(values[index] || '', paramName);
return memo;
}, {} as Params);
| 14 |
diff --git a/public/viewjs/mealplan.js b/public/viewjs/mealplan.js @@ -98,7 +98,7 @@ $("#add-recipe-modal").on("shown.bs.modal", function(e)
$(document).on("click", ".remove-recipe-button", function(e)
{
- var mealPlanEntry = JSON.parse($(this).closest(".fc-h-event").attr("data-meal-plan-entry"));
+ var mealPlanEntry = JSON.parse($(this).parents(".fc-h-event:first").attr("data-meal-plan-entry"));
Grocy.Api.Delete('objects/meal_plan/' + mealPlanEntry.id.toString(), { },
function(result)
| 7 |
diff --git a/lib/cartodb/central.rb b/lib/cartodb/central.rb @@ -36,7 +36,7 @@ module Cartodb
http_client.request(
"#{@host}/#{path}",
method: method,
- body: body.to_json,
+ body: body.nil? ? nil: body.to_json,
userpwd: "#{@auth[:username]}:#{@auth[:password]}",
headers: { "Content-Type" => "application/json" },
ssl_verifypeer: Rails.env.production?,
| 1 |
diff --git a/app/src/renderer/styles/variables.styl b/app/src/renderer/styles/variables.styl :root
--mc hsl(325, 96%, 59%)
--accent hsl(229, 96%, 62%)
- --app-fg hsl(133, 33%, 16%)
- --app-bg hsl(133, 36%, 13%)
- --app-bg-alpha hsla(133, 36%, 13%, 95%)
+ --primary hsl(233, 88%, 57%)
+ --primary-bc hsl(233, 88%, 43%)
+ --app-fg hsl(233, 33%, 16%)
+ --app-bg hsl(233, 36%, 13%)
+ --app-bg-alpha hsla(233, 36%, 13%, 95%)
--bright #fff
- --txt hsl(133, 13%, 85%)
- --dim hsl(133, 13%, 60%)
- --bc hsl(133, 22%, 23%)
+ --txt hsl(233, 13%, 85%)
+ --dim hsl(233, 13%, 60%)
+ --bc hsl(233, 22%, 23%)
--bc-dim --app-fg
- --link hsl(133, 88%, 67%)
- --hover hsl(133, 88%, 73%)
- --hover-bg hsl(133, 43%, 10%)
+ --link hsl(233, 88%, 67%)
+ --hover hsl(233, 88%, 73%)
+ --hover-bg hsl(233, 43%, 10%)
--input-bg transparent
- --input-bc hsl(133, 22%, 33%)
- --input-bc-hover hsl(133, 22%, 40%)
- --primary hsl(133, 88%, 57%)
- --primary-bc hsl(133, 88%, 43%)
+ --input-bc hsl(233, 22%, 33%)
+ --input-bc-hover hsl(233, 22%, 40%)
--success hsl(120,58%,55%)
--success-bc hsl(120,58%,41%)
--warning hsl(52,73%,50%)
| 12 |
diff --git a/factory-ai-vision/EdgeSolution/modules/WebModule/ui/src/components/MainLayout/MainLayout.tsx b/factory-ai-vision/EdgeSolution/modules/WebModule/ui/src/components/MainLayout/MainLayout.tsx import React, { FC, MouseEvent } from 'react';
-import { Grid, Segment, Image, Flex, Text, MenuIcon } from '@fluentui/react-northstar';
+import { Grid, Segment, Image, Flex, Text, MenuIcon, Button } from '@fluentui/react-northstar';
import { NavLink, Link } from 'react-router-dom';
import { useSelector } from 'react-redux';
@@ -60,7 +60,9 @@ const TopNav: FC<{ disabled: boolean }> = ({ disabled }) => {
if (disabled) e.preventDefault();
}}
>
- <Text color="white">Vision on Edge</Text>
+ <Button primary styles={{ backgroundColor: 'rgb(9, 34, 27)' }}>
+ Home
+ </Button>
</NavLink>
</Flex>
<Flex
| 14 |
diff --git a/articles/hooks/extensibility-points/pre-user-registration.md b/articles/hooks/extensibility-points/pre-user-registration.md @@ -9,12 +9,7 @@ beta: true
For [Database Connections](/connections/database), the `pre-user-registration` extensibility point allows you to add custom `app_metadata` or `user_metadata` to a newly-created user.
-This allows you to implement scenarios including (but not limited to):
-
-* Enforcing a custom password policy;
-* Preventing signups for those who meet certain requirements;
-* Setting conditional `app_metadata` or `user_metadata` on users that do not yet exist;
-* Preventing (blacklisting) the use of personal email domains.
+This allows you to implement scenarios such as setting conditional `app_metadata` or `user_metadata` on users that do not yet.
## How to Implement This
@@ -148,37 +143,6 @@ Using the [test runner](https://webtask.io/docs/editor/runner), we see that the
}
```
-## Allow Signups for Users with Whitelisted Email Domains
-
-```js
-module.exports = function (user, context, cb) {
-
- // Whitelisted domains
- const whitelist = [
- 'example1.com',
- 'example2.com'
- ];
-
- const userHasAccess = whitelist.some(domain => {
- const emailSplit = user.email.split('@');
- return emailSplit[emailSplit.length - 1].toLowerCase() === domain;
- });
-
- if (!userHasAccess) {
- return cb('Email domain not allowed');
- }
-
- const response = { user };
- return cb(null, response);
-};
-```
-
-Using the [test runner](https://webtask.io/docs/editor/runner), we see that the response is as follows:
-
-```json
-{
- "message": "Email domain not allowed.",
- "statusCode": 500,
- "stack": "Error: Email domain not allowed.\n at respondWithError (/data/sandbox/node_modules/auth0-ext-compilers/lib/adapter.js:11:17)\n at buildResponse (/data/sandbox/node_modules/auth0-ext-compilers/lib/adapter.js:96:24)\n at /data/sandbox/node_modules/auth0-ext-compilers/lib/compilers/user-registration.js:31:20\n at module.exports.cb (/data/io/3713487827af469cb0b4d89ea2aed8aa/webtask.js:32:12)\n at /data/sandbox/node_modules/auth0-ext-compilers/lib/compilers/user-registration.js:30:16\n at Object.is_authorized (/data/sandbox/node_modules/auth0-ext-compilers/lib/authorization.js:13:81)\n at userRegistrationHandler (/data/sandbox/node_modules/auth0-ext-compilers/lib/compilers/user-registration.js:9:18)\n at /data/sandbox/node_modules/auth0-ext-compilers/lib/adapter.js:90:20\n at finish (/data/sandbox/node_modules/auth0-ext-compilers/node_modules/wreck/lib/index.js:369:16)\n at wrapped (/data/sandbox/node_modules/auth0-ext-compilers/node_modules/wreck/node_modules/hoek/lib/index.js:871:20)"
-}
-```
+::: note
+The Pre-Registration Hook does not currently pass error messages to any Auth0 APIs.
+:::
| 2 |
diff --git a/README.md b/README.md @@ -105,5 +105,22 @@ options={
}
```
+## FormioBuilder class
+The FormioBuilder class can be used to embed a form builder directly in your react application. Please note that you'll need to include the CSS for the form builder from formio.js as well.
+
+** For es6 import/export modules. **
+```javascript
+import React from 'react';
+import ReactDOM from 'react-dom';
+import {Formio} from 'react-formio';
+```
+
+```javascript
+ReactDOM.render(
+ <Formio form={{display: 'form'}} onChange={(schema) => console.log(schema)} />
+ , document.getElementById('builder')
+);
+```
+
## License
Released under the [MIT License](http://www.opensource.org/licenses/MIT).
| 0 |
diff --git a/lib/rules/lint-attribute-indentation.js b/lib/rules/lint-attribute-indentation.js @@ -27,7 +27,7 @@ const canApplyRule = function(node, type, config) {
}
if (start.line === end.line) {
- return (end.column - start.column) > config;
+ return (end.column - start.column) > config.maxLength;
}
return true;
@@ -266,6 +266,7 @@ module.exports = class AttributeSpacing extends Rule {
expectedLineStart = param.loc.end.line;
}
}
+
expectedLineStart++;
});
return expectedLineStart;
@@ -281,7 +282,7 @@ module.exports = class AttributeSpacing extends Rule {
fullName=fullName
}}
*/
- let expectedColumnStart = node.loc.start.column + 2; //params should be after 2 positions from component start node
+ let expectedColumnStart = node.loc.start.column + this.config.indentation; //params should be after proper positions from component start node
let expectedLineStart = node.loc.start.line + 1;
expectedLineStart = this.iterateParams(node.params, 'positional', expectedLineStart, expectedColumnStart, node);
@@ -341,19 +342,34 @@ module.exports = class AttributeSpacing extends Rule {
switch (configType) {
case 'boolean':
- return config ? 80 : false;
- case 'object':
- if (!isNaN(config['open-invocation-max-len'])) {
- return config['open-invocation-max-len'];
+ if (config) {
+ return {
+ maxLength: 80,
+ indentation: 2
+ };
+ }
+ return false;
+ case 'object': {
+ let result = {
+ maxLength: 80,
+ indentation: 2,
+ };
+ if ('open-invocation-max-len' in config) {
+ result.maxLength = config['open-invocation-max-len'];
+ }
+ if ('indentation' in config) {
+ result.indentation = config.indentation;
+ }
+ return result;
}
- break;
case 'undefined':
return false;
}
let errorMessage = createErrorMessage(this.ruleName, [
' * boolean - `true` - Enables the rule to be enforced when the opening invocation has more than 80 characters or when it spans multiple lines',
- ' * { open-invocation-max-len: n characters } - The max length of the opening invocation can be configured'
+ ' * { open-invocation-max-len: n characters, indentation: m } - n : The max length of the opening invocation can be configured',
+ ' * - m : The desired indentation of attribute'
], config);
throw new Error(errorMessage);
| 11 |
diff --git a/src/injected/content/bridge.js b/src/injected/content/bridge.js @@ -41,7 +41,7 @@ const bridge = {
if (!handle || !allow[cmd]?.[dataKey]) {
throw new ErrorSafe(`[Violentmonkey] Invalid command: "${cmd}" on ${global.location.host}`);
}
- const callbackId = data && data::getOwnProp(CALLBACK_ID);
+ const callbackId = data && getOwnProp(data, CALLBACK_ID);
if (callbackId) {
data = data.data;
}
| 1 |
diff --git a/src/selection-handler.js b/src/selection-handler.js @@ -187,8 +187,10 @@ Object.assign(SelectionHandler.prototype, require('./function-bind'), require('.
},
block: function(block) {
- var blockPosition = this.editor.getBlockPosition(block.el);
+ var blockPosition = this.editor.blockManager.getBlockPosition(block.el);
+ this.mediator.trigger("formatter:hide");
+ this.removeNativeSelection();
this.start(blockPosition);
},
| 2 |
diff --git a/packages/node_modules/@node-red/nodes/core/network/10-mqtt.html b/packages/node_modules/@node-red/nodes/core/network/10-mqtt.html default: !this.expiry ? 'none':'num',
types: [typedInputNoneOpt, 'num']
});
- $("#node-input-contentType").on('change', function (event, type, value, urg) {
- console.log(event);
- console.log("ct change",type,value, urg);
- }).typedInput({
+ $("#node-input-contentType").typedInput({
default: getDefaultContentType(this.contentType),
types: contentTypeOpts
})
| 2 |
diff --git a/src/components/Tabs.js b/src/components/Tabs.js @@ -189,8 +189,7 @@ const Tabs = React.createClass({
tabsContainer: {
borderBottom: this.props.showBottomBorder ? '1px solid ' + StyleConstants.Colors.FOG : 'none',
boxSizing: 'border-box',
- paddingBottom: 20,
- paddingLeft: 20,
+ padding: `0 0 ${StyleConstants.Spacing.LARGE}px ${StyleConstants.Spacing.LARGE}px`,
width: '100%'
}
};
| 1 |
diff --git a/docs/documentation/sitespeed.io/introduction/index.md b/docs/documentation/sitespeed.io/introduction/index.md @@ -20,9 +20,9 @@ twitterdescription: Introduction for sitespeed.io.
We think of a complete web performance tool as having three key capabilities:
- - It test web sites using real browsers, simulating real users connectivity and collect important user centric metrics like Speed Index and First Visual Render.
- - It analyse how your page is built and give feedback how you can make it faster for the end user.
- - It collect and keep data how your pages is built so you easily can track changes.
+ - It should test web sites using real browsers, simulating real users connectivity and collect important user centric metrics like Speed Index and First Visual Render.
+ - It should analyse how your page is built and give feedback how you can make it faster for the end user.
+ - It should collect and keep data on how your pages are built so you can easily track changes.
**What is sitespeed.io good for?**
| 7 |
diff --git a/token-metadata/0xAE9CBE6eBf72A51c9Fcea3830485614486318Fd4/metadata.json b/token-metadata/0xAE9CBE6eBf72A51c9Fcea3830485614486318Fd4/metadata.json "symbol": "NEWTON",
"address": "0xAE9CBE6eBf72A51c9Fcea3830485614486318Fd4",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/packages/imba/src/compiler/nodes.imba1 b/packages/imba/src/compiler/nodes.imba1 @@ -3848,11 +3848,16 @@ export class Func < Code
o.push(item.jsdoc())
if option(:inExtension) and @target
+ let kls = @context.node
let name = @context.node.@className
if name and STACK.tsc
# console.log 'inext',@context.node.@className
# o.push('@this { this & ' + name.c + ' }')
- o.push('@this { ' + name.c + ' }')
+ let thistype = name.c
+ if kls.option(:instanceOnly)
+ thistype = "typeof {thistype}"
+
+ o.push('@this { ' + thistype + ' }')
elif option(:jsdocthis)
o.push('@this { ' + option(:jsdocthis) + ' }')
| 7 |
diff --git a/src/userscript.ts b/src/userscript.ts @@ -47206,7 +47206,10 @@ var $$IMU_EXPORT$$;
// thanks to nadomodan on github: https://github.com/qsniyg/maxurl/issues/304
// https://cdn.donmai.us/preview/5e/c1/5ec172460e1f8cf0dff7219c2ba52f4c.jpg
// https://hijiribe.donmai.us/data/5ec172460e1f8cf0dff7219c2ba52f4c.png
- return src.replace(/^[a-z]+:\/\/[^/]+\/+(preview|sample)\/+(?:[0-9a-f]{2}\/+){2}([0-9a-f]{10,}\.[^/.]+)(?:[?#].*)?$/, "https://danbooru.donmai.us/data/$1/$2");
+ // thanks to NightSky on discord:
+ // https://cdn.donmai.us/sample/b1/cf/__original_drawn_by_nekodosaiun__sample-b1cf707ece29a0f0f5f0529e9c48b3a1.jpg
+ // https://cdn.donmai.us/original/b1/cf/b1cf707ece29a0f0f5f0529e9c48b3a1.jpg
+ return src.replace(/^[a-z]+:\/\/[^/]+\/+(preview|sample)\/+(?:[0-9a-f]{2}\/+){2}((?:[^/]+__sample-)?[0-9a-f]{10,}\.[^/.]+)(?:[?#].*)?$/, "https://danbooru.donmai.us/data/$1/$2");
}
if (domain_nosub === "donmai.us") {
| 7 |
diff --git a/modules/xerte/parent_templates/Nottingham/common_html5/js/loadjs.min.js b/modules/xerte/parent_templates/Nottingham/common_html5/js/loadjs.min.js -loadjs=function(){var e=function(){},n={},t={},r={};function s(e,n){if(e){var s=r[e];if(t[e]=n,s)for(;s.length;)s[0](e,n),s.splice(0,1)}}function i(n,t){n.call&&(n={success:n}),t.length?(n.error||e)(t):(n.success||e)(n)}function c(n,t,r,s){var i,o,a=document,u=r.async,f=(r.numRetries||0)+1,l=r.before||e,h=(basePath+n).replace(/[\?|#].*$/,""),p=(basePath+n).replace(/^(css|img)!/,"");s=s||0,/(^css!|\.css$)/.test(h)?((o=a.createElement("link")).rel="stylesheet",o.href=p,(i="hideFocus"in o)&&o.relList&&(i=0,o.rel="preload",o.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(h)?(o=a.createElement("img")).src=p:((o=a.createElement("script")).src=basePath+n,o.async=void 0===u||u),o.onload=o.onerror=o.onbeforeload=function(e){var a=e.type[0];if(i)try{o.sheet.cssText.length||(a="e")}catch(e){18!=e.code&&(a="e")}if("e"==a){if((s+=1)<f)return c(n,t,r,s)}else if("preload"==o.rel&&"style"==o.as)return o.rel="stylesheet";t(n,a,e.defaultPrevented)},!1!==l(n,o)&&a.head.appendChild(o)}function o(e,t,r){var o,a;if(t&&t.trim&&(o=t),a=(o?r:t)||{},o){if(o in n)throw"LoadJS";n[o]=!0}function u(n,t){!function(e,n,t){var r,s,i=(e=e.push?e:[e]).length,o=i,a=[];for(r=function(e,t,r){if("e"==t&&a.push(e),"b"==t){if(!r)return;a.push(e)}--i||n(a)},s=0;s<o;s++)c(e[s],r,t)}(e,function(e){i(a,e),n&&i({success:n,error:t},e),s(o,e)},a)}if(a.returnPromise)return new Promise(u);u()}return o.ready=function(e,n){return function(e,n){e=e.push?e:[e];var s,i,c,o=[],a=e.length,u=a;for(s=function(e,t){t.length&&o.push(e),--u||n(o)};a--;)i=e[a],(c=t[i])?s(i,c):(r[i]=r[i]||[]).push(s)}(e,function(e){i(n,e)}),o},o.done=function(e){s(e,[])},o.reset=function(){n={},t={},r={}},o.isDefined=function(e){return e in n},o.path=function(e){basePath=e.trim(),basePath+="/"!==basePath.slice(-1)?"/":""},o}();
\ No newline at end of file
+loadjs=function(){var basePath='',e=function(){},n={},t={},r={};function s(e,n){if(e){var s=r[e];if(t[e]=n,s)for(;s.length;)s[0](e,n),s.splice(0,1)}}function i(n,t){n.call&&(n={success:n}),t.length?(n.error||e)(t):(n.success||e)(n)}function c(n,t,r,s){var i,o,a=document,u=r.async,f=(r.numRetries||0)+1,l=r.before||e,h=(basePath+n).replace(/[\?|#].*$/,""),p=(basePath+n).replace(/^(css|img)!/,"");s=s||0,/(^css!|\.css$)/.test(h)?((o=a.createElement("link")).rel="stylesheet",o.href=p,(i="hideFocus"in o)&&o.relList&&(i=0,o.rel="preload",o.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(h)?(o=a.createElement("img")).src=p:((o=a.createElement("script")).src=basePath+n,o.async=void 0===u||u),o.onload=o.onerror=o.onbeforeload=function(e){var a=e.type[0];if(i)try{o.sheet.cssText.length||(a="e")}catch(e){18!=e.code&&(a="e")}if("e"==a){if((s+=1)<f)return c(n,t,r,s)}else if("preload"==o.rel&&"style"==o.as)return o.rel="stylesheet";t(n,a,e.defaultPrevented)},!1!==l(n,o)&&a.head.appendChild(o)}function o(e,t,r){var o,a;if(t&&t.trim&&(o=t),a=(o?r:t)||{},o){if(o in n)throw"LoadJS";n[o]=!0}function u(n,t){!function(e,n,t){var r,s,i=(e=e.push?e:[e]).length,o=i,a=[];for(r=function(e,t,r){if("e"==t&&a.push(e),"b"==t){if(!r)return;a.push(e)}--i||n(a)},s=0;s<o;s++)c(e[s],r,t)}(e,function(e){i(a,e),n&&i({success:n,error:t},e),s(o,e)},a)}if(a.returnPromise)return new Promise(u);u()}return o.ready=function(e,n){return function(e,n){e=e.push?e:[e];var s,i,c,o=[],a=e.length,u=a;for(s=function(e,t){t.length&&o.push(e),--u||n(o)};a--;)i=e[a],(c=t[i])?s(i,c):(r[i]=r[i]||[]).push(s)}(e,function(e){i(n,e)}),o},o.done=function(e){s(e,[])},o.reset=function(){n={},t={},r={}},o.isDefined=function(e){return e in n},o.path=function(e){basePath=e.trim(),basePath+="/"!==basePath.slice(-1)?"/":""},o}();
\ No newline at end of file
| 1 |
diff --git a/assets/js/modules/analytics/components/common/AccountSelect.js b/assets/js/modules/analytics/components/common/AccountSelect.js @@ -73,11 +73,7 @@ export default function AccountSelect() {
newAccountID === ACCOUNT_CREATE
? 'change_account_new'
: 'change_account';
- trackEvent(
- `${ viewContext }_analytics`,
- action,
- newAccountID
- );
+ trackEvent( `${ viewContext }_analytics`, action );
}
},
[ accountID, selectAccount, viewContext ]
| 2 |
diff --git a/app/components/Settings/BackupSettings.jsx b/app/components/Settings/BackupSettings.jsx @@ -3,6 +3,9 @@ import {BackupCreate} from "../Wallet/Backup";
import BackupBrainkey from "../Wallet/BackupBrainkey";
import counterpart from "counterpart";
import BackupFavorites from "./BackupFavorites";
+import {Select} from "bitshares-ui-style-guide";
+
+const Option = Select.Option;
export default class BackupSettings extends React.Component {
constructor() {
@@ -13,9 +16,9 @@ export default class BackupSettings extends React.Component {
};
}
- _changeType(e) {
+ _changeType(value) {
this.setState({
- restoreType: this.state.types.indexOf(e.target.value)
+ restoreType: this.state.types.indexOf(value)
});
}
@@ -23,9 +26,9 @@ export default class BackupSettings extends React.Component {
let {types, restoreType} = this.state;
let options = types.map(type => {
return (
- <option key={type} value={type}>
+ <Option key={type} value={type}>
{counterpart.translate(`settings.backupcreate_${type}`)}{" "}
- </option>
+ </Option>
);
});
@@ -50,13 +53,14 @@ export default class BackupSettings extends React.Component {
return (
<div>
- <select
+ <Select
onChange={this._changeType.bind(this)}
className="bts-select"
value={types[restoreType]}
+ style={{marginBottom: "16px"}}
>
{options}
- </select>
+ </Select>
{content}
</div>
| 14 |
diff --git a/packages/ember-routing/lib/system/dsl.js b/packages/ember-routing/lib/system/dsl.js @@ -6,7 +6,10 @@ import { assert, deprecate } from 'ember-metal';
@submodule ember-routing
*/
-function DSL(name, options) {
+let uuid = 0;
+
+class DSL {
+ constructor(name, options) {
this.parent = name;
this.enableLoadingSubstates = options && options.enableLoadingSubstates;
this.matches = [];
@@ -14,9 +17,6 @@ function DSL(name, options) {
this.options = options;
}
-export default DSL;
-
-DSL.prototype = {
route(name, options, callback) {
let dummyErrorRoute = `/_unused_dummy_error_path_route_${name}/:error`;
if (arguments.length === 2 && typeof options === 'function') {
@@ -30,11 +30,11 @@ DSL.prototype = {
assert(
`'${name}' cannot be used as a route name.`,
- (function() {
+ ((() => {
if (options.overrideNameAssertion === true) { return true; }
return ['array', 'basic', 'object', 'application'].indexOf(name) === -1;
- })()
+ }))()
);
if (this.enableLoadingSubstates) {
@@ -55,7 +55,7 @@ DSL.prototype = {
} else {
createRoute(this, name, options);
}
- },
+ }
push(url, name, callback, serialize) {
let parts = name.split('.');
@@ -76,7 +76,7 @@ DSL.prototype = {
if (url === '' || url === '/' || parts[parts.length - 1] === 'index') { this.explicitIndex = true; }
this.matches.push([url, name, callback]);
- },
+ }
resource(name, options, callback) {
if (arguments.length === 2 && typeof options === 'function') {
@@ -91,7 +91,7 @@ DSL.prototype = {
options.resetNamespace = true;
deprecate('this.resource() is deprecated. Use this.route(\'name\', { resetNamespace: true }, function () {}) instead.', false, { id: 'ember-routing.router-resource', until: '3.0.0' });
this.route(name, options, callback);
- },
+ }
generate() {
let dslMatches = this.matches;
@@ -107,39 +107,8 @@ DSL.prototype = {
}
};
}
-};
-
-function canNest(dsl) {
- return dsl.parent && dsl.parent !== 'application';
-}
-function getFullName(dsl, name, resetNamespace) {
- if (canNest(dsl) && resetNamespace !== true) {
- return `${dsl.parent}.${name}`;
- } else {
- return name;
- }
-}
-
-function createRoute(dsl, name, options = {}, callback) {
- let fullName = getFullName(dsl, name, options.resetNamespace);
-
- if (typeof options.path !== 'string') {
- options.path = `/${name}`;
- }
-
- dsl.push(options.path, fullName, callback, options.serialize);
-}
-
-DSL.map = callback => {
- let dsl = new DSL();
- callback.call(dsl);
- return dsl;
-};
-
-let uuid = 0;
-
-DSL.prototype.mount = function(_name, options = {}) {
+ mount(_name, options = {}) {
let engineRouteMap = this.options.resolveRouteMap(_name);
let name = _name;
@@ -210,4 +179,35 @@ DSL.prototype.mount = function(_name, options = {}) {
this.options.addRouteForEngine(fullName, routeInfo);
this.push(path, fullName, callback);
+ }
+}
+
+export default DSL;
+
+function canNest(dsl) {
+ return dsl.parent && dsl.parent !== 'application';
+}
+
+function getFullName(dsl, name, resetNamespace) {
+ if (canNest(dsl) && resetNamespace !== true) {
+ return `${dsl.parent}.${name}`;
+ } else {
+ return name;
+ }
+}
+
+function createRoute(dsl, name, options = {}, callback) {
+ let fullName = getFullName(dsl, name, options.resetNamespace);
+
+ if (typeof options.path !== 'string') {
+ options.path = `/${name}`;
+ }
+
+ dsl.push(options.path, fullName, callback, options.serialize);
+}
+
+DSL.map = callback => {
+ let dsl = new DSL();
+ callback.call(dsl);
+ return dsl;
};
| 14 |
diff --git a/token-metadata/0x3B7f247f21BF3A07088C2D3423F64233d4B069F7/metadata.json b/token-metadata/0x3B7f247f21BF3A07088C2D3423F64233d4B069F7/metadata.json "symbol": "DYNMT",
"address": "0x3B7f247f21BF3A07088C2D3423F64233d4B069F7",
"decimals": 2,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/lib/global-admin/addon/security/authentication/activedirectory/route.js b/lib/global-admin/addon/security/authentication/activedirectory/route.js @@ -10,13 +10,6 @@ export default Route.extend({
return hash({
activeDirectory: gs.find('authconfig', 'activedirectory'),
principals: gs.all('principal'),
- }).then((hash) => {
- let defaultAd = hash.activeDirectory;
- let schema = get(this, 'globalStore').getById('schema','activedirectoryconfig');
-
- schema.getLoadDefaults(defaultAd);
-
- return hash;
});
},
| 2 |
diff --git a/packages/fbt-rn-android-native/README.md b/packages/fbt-rn-android-native/README.md -# fbt-rn-android-native
+# fbt-rn-android-native [DEPRECATED]
+
+This package will not longer be maintained. It has been deprecated in favor of [react-native-fbt](https://www.npmjs.com/package/react-native-fbt), which adds support for iOS React Native applications as well.
+
+-----
Android native module to enable the usage of the [FBT translation framework](https://facebook.github.io/fbt/) in React Native apps
| 4 |
diff --git a/server/handlers/awsJobs.js b/server/handlers/awsJobs.js @@ -427,9 +427,12 @@ let handlers = {
// NOTE: disappearing from batch is not necessarily a bad thing. Batch only keeps jobs around for 24 hours after they have entered
// a failed or succeeded state
if(batchStatus.length != job.analysis.jobs.length) {
+ if (job.analysis.hasOwnProperty('batchStatus')) {
+ // Running jobs being updated may have to skip this once
batchStatus = job.analysis.batchStatus.map((statusObj) => {
return batchStatus[statusObj.job] ? batchStatus[statusObj.job] : statusObj;
});
+ }
// update status array to include ALL job statuses
statusArray = batchStatus.map((statusObj) => {
return statusObj.status;
| 1 |
diff --git a/tests/e2e/specs/modules/analytics/write-scope-requests.test.js b/tests/e2e/specs/modules/analytics/write-scope-requests.test.js @@ -117,9 +117,7 @@ describe( 'Analytics write scope requests', () => {
interceptCreatePropertyRequest = false;
interceptCreateProfileRequest = false;
- await activatePlugin( 'e2e-tests-site-verification-plugin' );
await activatePlugin( 'e2e-tests-oauth-callback-plugin' );
-
await setupSiteKit();
} );
| 2 |
diff --git a/src/graphql/mutations/__tests__/CreateMediaArticle.js b/src/graphql/mutations/__tests__/CreateMediaArticle.js @@ -3,20 +3,10 @@ import { loadFixtures, unloadFixtures } from 'util/fixtures';
import client from 'util/client';
import MockDate from 'mockdate';
import fixtures from '../__fixtures__/CreateMediaArticle';
-import { uploadFile } from '../CreateMediaArticle';
import { getReplyRequestId } from '../CreateOrUpdateReplyRequest';
-import fetch from 'node-fetch';
-import { uploadToGCS } from 'util/gcs';
-import { imageHash } from 'image-hash';
-
-jest.mock('node-fetch');
-jest.mock('util/gcs', () => ({
- __esModule: true,
- uploadToGCS: jest.fn(),
-}));
-jest.mock('image-hash', () => ({
- __esModule: true,
- imageHash: jest.fn(),
+
+jest.mock('mediaManager', () => ({
+ insert: jest.fn(),
}));
describe('creation', () => {
| 2 |
diff --git a/test/jasmine/tests/svg_text_utils_test.js b/test/jasmine/tests/svg_text_utils_test.js @@ -516,7 +516,6 @@ describe('svg+text utils', function() {
describe('sanitizeHTML', function() {
'use strict';
- describe('convertToTspans', function() {
var stringFromCodePoint;
beforeAll(function() {
@@ -623,4 +622,3 @@ describe('sanitizeHTML', function() {
expect(innerHTML).toEqual('<a href="https://example.com/?q=date%20%3E=%202018-01-01">click</a>');
});
});
-});
| 2 |
diff --git a/assets/sass/components/global/_googlesitekit-sharing-settings.scss b/assets/sass/components/global/_googlesitekit-sharing-settings.scss }
.googlesitekit-dashboard-sharing-settings__footer-notice {
+ margin: -0.625rem 0;
@media (max-width: $bp-mobileOnly ) {
padding: 16px 16px 0;
padding: 8px;
}
- @media (min-width: $bp-desktop) {
- max-width: 400px;
- }
-
&:empty {
display: none;
}
| 2 |
diff --git a/userscript.user.js b/userscript.user.js @@ -21832,7 +21832,11 @@ var $$IMU_EXPORT$$;
// https://pyxis.nymag.com/v1/imgs/92c/88f/d4a2dede7120bc943ed95943b6ac5fe212-trump.jpg
// https://pyxis.nymag.com/v1/imgs/5d3/ba9/44036335bf752271c445cd3ed12bf0c20d-02-LL-cool-J--WICLW-NEW.rhorizontal.w700.jpg
// https://pyxis.nymag.com/v1/imgs/5d3/ba9/44036335bf752271c445cd3ed12bf0c20d-02-LL-cool-J--WICLW-NEW.jpg
- return src.replace(/(\/v1\/+imgs\/+[0-9a-f]{3}\/+[0-9a-f]{3}\/+[0-9a-f]{10,}[^/.?#]*\.)(?:(?:r(?:square|horizontal|vertical)(?:-[a-z]+)?|[wh][0-9]+)\.){0,}([a-z]+)(?:[?#].*)?$/, "$1$2");
+ // https://pyxis.nymag.com/v1/imgs/8b0/b62/f1212d7c71c261c4d2582d4e9bcbc155c4-steve-underwood.2x.rhorizontal.w700.jpg
+ // https://pyxis.nymag.com/v1/imgs/8b0/b62/f1212d7c71c261c4d2582d4e9bcbc155c4-steve-underwood.jpg
+ // https://pyxis.nymag.com/v1/imgs/0ce/fd4/5fb0f096041f7bdbc2395f36c1f56ecf00-Sept30-Oct13-Testimonies.2x.rsocial.w600.jpg
+ // https://pyxis.nymag.com/v1/imgs/0ce/fd4/5fb0f096041f7bdbc2395f36c1f56ecf00-Sept30-Oct13-Testimonies.jpg
+ return src.replace(/(\/v1\/+imgs\/+[0-9a-f]{3}\/+[0-9a-f]{3}\/+[0-9a-f]{10,}[^/.?#]*\.)(?:(?:r(?:square|horizontal|vertical|social)(?:-[a-z]+)?|[wh][0-9]+|[0-9]+x)\.){0,}([a-z]+)(?:[?#].*)?$/, "$1$2");
}
if (domain === "assets.nydailynews.com" ||
| 7 |
diff --git a/lib/cartodb/models/dataview/histogram.js b/lib/cartodb/models/dataview/histogram.js @@ -399,11 +399,7 @@ Histogram.prototype.format = function(result, override) {
width = firstRow.bin_width || width;
avg = firstRow.avg_val;
nulls = firstRow.nulls_count;
- binsStart = override.hasOwnProperty('start') ?
- getBinStart(override) :
- firstRow.hasOwnProperty('timestamp') ?
- firstRow.timestamp :
- firstRow.min;
+ binsStart = populateBinStart(override, firstRow);
buckets = result.rows.map(function(row) {
return _.omit(row, 'bins_number', 'bin_width', 'nulls_count', 'avg_val');
@@ -457,6 +453,20 @@ function getTimezone(timezone) {
return '' + timezoneInHours;
}
+function populateBinStart(override, firstRow) {
+ var binStart;
+
+ if (override.hasOwnProperty('start')) {
+ binStart = getBinStart(override);
+ } else if (firstRow.hasOwnProperty('timestamp')) {
+ binStart = firstRow.timestamp;
+ } else {
+ binStart = firstRow.min;
+ }
+
+ return binStart;
+}
+
Histogram.prototype.getType = function() {
return TYPE;
};
| 7 |
diff --git a/src/ui/treeview/TreeView.hx b/src/ui/treeview/TreeView.hx @@ -326,7 +326,9 @@ using tools.PathTools;
}
}
}
+ if (children.length > 0) {
dir.treeItems.insertBefore(item, children[i]);
+ } else dir.treeItems.appendChild(item);
}
//
public static function openProject(el:Element) {
| 1 |
diff --git a/articles/libraries/lock/v10/auth0js.md b/articles/libraries/lock/v10/auth0js.md @@ -14,58 +14,64 @@ For simple uses, Lock is all that is necessary. However, while using Lock, if mo
If you included the Lock script from the Auth0 CDN, you will need to also include the auth0.js script before Lock:
-```html
-<script src="${auth0js_urlv8}"></script>
-<script src="${lock_url}"></script>
-```
-
-If you installed Lock from npm, you should include `auth0-js` in your project dependencies and import it to pin the `auth0-js` version you're using. Before instantiating the `Auth0` object, you will need to require `auth0-js`:
+<div class="code-picker">
+ <div class="languages-bar">
+ <ul>
+ <li><a href="#cdn-v8" data-toggle="tab">Using Auth0.js v8</a></li>
+ <li><a href="#cdn-v7" data-toggle="tab">Using Auth0.js v7</a></li>
+ </ul>
+ </div>
+ <div class="tab-content">
+ <div id="cdn-v8" class="tab-pane active">
+ <pre class="hljs html"><code>
+ <script src="${auth0js_urlv8}"></script>
+ <script src="${lock_url}"></script>
+ </code></pre>
+ </div>
+ <div id="cdn-v7" class="tab-pane">
+ <pre class="hljs html"><code>
+ <script src="${auth0js_url}"></script>
+ <script src="${lock_url}"></script>
+ </code></pre>
+ </div>
+ </div>
+</div>
+
+If you installed Lock from npm, you should include `auth0-js` in your project dependencies and import it to pin the particular `auth0-js` version you're using. Before instantiating the `Auth0` object, you will need to require `auth0-js`:
```js
var auth0 = require('auth0-js');
```
-### Initiating auth0.js
-
-Then, to use `auth0.js`, simply instantiate a new `Auth0` object:
-
-```js
-var auth0 = new Auth0({
- domain: "${account.namespace}",
- clientID: "${account.clientId}"
+Then, to use `auth0.js`, simply instantiate a new object:
+
+<div class="code-picker">
+ <div class="languages-bar">
+ <ul>
+ <li><a href="#instantiate-v8" data-toggle="tab">Auth0.js v8</a></li>
+ <li><a href="#instantiate-v7" data-toggle="tab">Auth0.js v7</a></li>
+ </ul>
+ </div>
+ <div class="tab-content">
+ <div id="instantiate-v8" class="tab-pane active">
+ <pre class="hljs js"><code>
+ var webAuth = new auth0.WebAuth({
+ domain: '${account.namespace}',
+ clientID: '${account.clientId}'
});
-```
-
-If you need further detail about usage, check out the [Auth0.js v8 Reference](/libraries/auth0js).
-
-## Using auth0.js v7
-
-### Including auth0.js v7
-
-If you included the Lock script from the Auth0 CDN, you will need to also include the auth0.js script before Lock:
-
-```html
-<script src="${auth0js_url}"></script>
-<script src="${lock_url}"></script>
-```
-
-If you installed Lock from npm, you must include `auth0-js` in your project dependencies and import it. Before instantiating the `Auth0` object, you will need to require `auth0-js`:
-
-```js
-var Auth0 = require('auth0-js');
-```
-
-### Initiating auth0.js v7
-
-Then, to use `auth0.js`, simply instantiate a new `Auth0` object:
-
-```js
-var client = new Auth0({
+ </code></pre>
+ </div>
+ <div id="instantiate-v7" class="tab-pane">
+ <pre class="hljs js"><code>
+ var auth0 = new Auth0({
domain: '${account.namespace}',
clientID: '${account.clientId}',
callbackURL: '{YOUR APP URL}',
responseType: 'token'
});
-```
+ </code></pre>
+ </div>
+ </div>
+</div>
-If you need further detail about usage, check out the [Auth0.js v7 Reference](/libraries/auth0js/v7).
+If you need further detail about usage, check out the [Auth0.js v8 Reference](/libraries/auth0js).
| 0 |
diff --git a/app/shared/containers/Global/Account/Dropdown.js b/app/shared/containers/Global/Account/Dropdown.js @@ -80,11 +80,26 @@ class GlobalAccountDropdown extends Component<Props> {
trigger={trigger}
>
<Dropdown.Menu key="parent">
- <Dropdown.Menu key="menu" scrolling>
+ <Dropdown.Menu key="menu" scrolling style={{ marginTop: 0 }}>
+ {(this.props.onNavigationChange)
+ ? (
+ <Dropdown.Header>
+ <Button
+ basic
+ content="Manage Wallets"
+ fluid
+ icon="users"
+ onClick={() => this.props.onNavigationChange('tools/wallets')}
+ size="small"
+ />
+ </Dropdown.Header>
+ )
+ : false
+ }
{(options.length > 0)
? options.map(w => {
const { pubkey } = w;
- const unlocked = (findIndex(auths, { pubkey }) >= 0);
+ const unlocked = (findIndex(auths.keystore, { pubkey }) >= 0);
if (w.mode === 'watch' || w.mode === 'ledger' || unlocked) {
return (
<Dropdown.Item
@@ -121,15 +136,6 @@ class GlobalAccountDropdown extends Component<Props> {
})
: false
}
- <Dropdown.Header>
- <Button
- basic
- content="Manage Accounts"
- fluid
- icon="users"
- size="small"
- />
- </Dropdown.Header>
</Dropdown.Menu>
</Dropdown.Menu>
</Dropdown>
| 11 |
diff --git a/packages/react-router-dom/__tests__/trailing-slashes-test.tsx b/packages/react-router-dom/__tests__/trailing-slashes-test.tsx @@ -126,10 +126,10 @@ describe("trailing slashes", () => {
index
element={
<>
- <Link to="../../.." />
- <Link to="../../../" />
- <Link to="../../child" />
- <Link to="../../child/" />
+ <Link to="../.." />
+ <Link to="../../" />
+ <Link to="../../parent/child" />
+ <Link to="../../parent/child/" />
</>
}
/>
@@ -277,10 +277,10 @@ describe("trailing slashes", () => {
index
element={
<>
- <Link to="../../.." />
- <Link to="../../../" />
- <Link to="../../child" />
- <Link to="../../child/" />
+ <Link to="../.." />
+ <Link to="../../" />
+ <Link to="../../parent/child" />
+ <Link to="../../parent/child/" />
</>
}
/>
| 1 |
diff --git a/tests/e2e/utils/switch-date-range.js b/tests/e2e/utils/switch-date-range.js * @param {string} toRange The new date range to select.
*/
export async function switchDateRange( fromRange, toRange ) {
- await expect( page ).toClick( '.mdc-select__selected-text', { text: new RegExp( fromRange, 'i' ) } );
- await expect( page ).toClick( '.mdc-menu-surface--open .mdc-list-item', { text: new RegExp( toRange, 'i' ) } );
+ await Promise.all( [
+ expect( page ).toClick( '.mdc-select__selected-text', { text: new RegExp( fromRange, 'i' ) } ),
+ page.waitForSelector( '.mdc-select.mdc-select--focused' ),
+ page.waitForSelector( '.mdc-menu-surface--open .mdc-list-item' ),
+ ] );
+ // Intentionally left off the '--open' suffix here as it proved problematic for stability.
+ await expect( page ).toClick( '.mdc-menu-surface .mdc-list-item', { text: new RegExp( toRange, 'i' ) } );
}
| 7 |
diff --git a/src/views/landing/sections/sockets/index.js b/src/views/landing/sections/sockets/index.js @@ -167,6 +167,19 @@ const Sockets = ({
min-height: 41px;
}
+ @media screen and (max-width: 680px) {
+ .Project__title {
+ min-height: 82px;
+ font-size: 28px;
+ }
+ }
+
+ @media screen and (max-width: 370px) {
+ .Project__title {
+ font-size: 24px;
+ }
+ }
+
.u-title {
color: #fff;
}
| 1 |
diff --git a/app/views/monsoon_openstack_auth/sessions/two_factor.haml b/app/views/monsoon_openstack_auth/sessions/two_factor.haml = inside_layout 'login' do
.container
-
-
= form_tag(check_passcode_path(after_login: params[:after_login]), class: "form-signin") do
%h2.form-signin-heading Two-Factor Verification
%p Enter your D/I/C number and SecureID passcode
= hidden_field_tag :domain_id, @domain_id
= hidden_field_tag :domain_name, @domain_name
- = render "application/flashes"
+ =# render "application/flashes"
+ - flash.each do |name, msg|
+ .alert{class: "alert-#{name}"}= msg
%label.sr-only{:for => "username"} User ID
= text_field_tag :username, @username, autofocus: "", placeholder: "User ID", required: "", class: "form-control"
| 1 |
diff --git a/Specs/Scene/CameraSpec.js b/Specs/Scene/CameraSpec.js @@ -993,6 +993,53 @@ defineSuite([
expect(camera.right).toEqual(right);
});
+ it('moves forward in 2D mode', function() {
+ var frustum = new OrthographicOffCenterFrustum();
+ frustum.near = 1.0;
+ frustum.far = 2.0;
+ frustum.left = -2.0;
+ frustum.right = 2.0;
+ frustum.top = 1.0;
+ frustum.bottom = -1.0;
+ camera.frustum = frustum;
+
+ camera.update(SceneMode.SCENE2D);
+ var oldCamera = Camera.clone(camera)
+
+ camera.moveForward(moveAmount);
+
+ // want to be at prev location bc moveBackward in 2D uses zoom2D which only adjusts frustum
+ expect(camera.position).toEqual(oldCamera.position, CesiumMath.EPSILON10);
+ expect(camera.frustum).not.toEqual(oldCamera.frustum);
+
+ expect(camera.up).toEqual(up);
+ expect(camera.direction).toEqual(dir);
+ expect(camera.right).toEqual(right);
+ });
+
+ it('moves backward in 2D mode', function() {
+ var frustum = new OrthographicOffCenterFrustum();
+ frustum.near = 1.0;
+ frustum.far = 2.0;
+ frustum.left = -2.0;
+ frustum.right = 2.0;
+ frustum.top = 1.0;
+ frustum.bottom = -1.0;
+ camera.frustum = frustum;
+
+ camera.update(SceneMode.SCENE2D);
+ var oldCamera = Camera.clone(camera)
+
+ camera.moveBackward(moveAmount);
+
+ // want to be at prev location bc moveBackward in 2D uses zoom2D which only adjusts frustum
+ expect(camera.position).toEqual(oldCamera.position, CesiumMath.EPSILON10);
+ expect(camera.frustum).not.toEqual(oldCamera.frustum);
+ expect(camera.up).toEqual(up);
+ expect(camera.direction).toEqual(dir);
+ expect(camera.right).toEqual(right);
+ });
+
it('move clamps position in 2D', function() {
var frustum = new OrthographicOffCenterFrustum();
frustum.near = 1.0;
| 3 |
diff --git a/preact.config.js b/preact.config.js @@ -4,6 +4,8 @@ const path = require('path');
export default {
webpack(config, env, helpers, options) {
config.node = { fs: 'empty' };
+ config.output = config.output || {};
+ config.output.publicPath = '/';
config.plugins = config.plugins || [];
config.plugins.push(
new WebpackBuildNotifierPlugin({
| 12 |
diff --git a/components/core/FilePreviewBubble.js b/components/core/FilePreviewBubble.js @@ -3,10 +3,8 @@ import * as Constants from "~/common/constants";
import { css, keyframes } from "@emotion/react";
import { useState } from "react";
-import SlateMediaObjectPreview from "~/components/core/SlateMediaObjectPreview";
-import SlateMediaObject from "~/components/core/SlateMediaObject";
-const fadein = keyframes`
+const fadeIn = keyframes`
0%{
opacity: 0;
}
@@ -20,28 +18,28 @@ const STYLES_FILE_PREVIEW_BUBBLE = css`
padding: 8px;
border-radius: 4px;
background-color: ${Constants.system.black};
- animation: ${fadein} 200ms ease-out 1;
+ animation: ${fadeIn} 200ms ease-out 1;
width: 200px;
position: absolute;
`;
const STYLES_FILE_PREVIEW = css`
+ display: block;
width: 100%;
height: 100%;
`;
const STYLES_BUBBLE_ANCHOR = css`
- box-sizing: border-box;
display: inline-flex;
align-item: center;
justify-content: center;
cursor: pointer;
`;
+//Jim: the parent of this element needs to be position: relative or this bubble will fly off its position
export const FilePreviewBubble = (props) => {
const [onHover, setHover] = useState(false);
- const type = props.type && props.type.startsWith("image/") && onHover;
- console.log(type);
+ const showPreview = props.type && props.type.startsWith("image/") && onHover;
return (
<React.Fragment>
@@ -52,7 +50,7 @@ export const FilePreviewBubble = (props) => {
>
{props.children}
</div>
- {type && (
+ {showPreview && (
<div css={STYLES_FILE_PREVIEW_BUBBLE}>
<img css={STYLES_FILE_PREVIEW} src={`${Constants.gateways.ipfs}/${props.url}`} />
</div>
| 1 |
diff --git a/src/pages/iou/IOUDetailsModal.js b/src/pages/iou/IOUDetailsModal.js @@ -109,9 +109,7 @@ class IOUDetailsModal extends Component {
this.props.iouReport.ownerEmail,
this.props.iouReport.managerEmail,
);
-
- // Not sure if we should navigate to the chat report here as well, but I think we should
- Navigation.navigate(ROUTES.REPORT);
+ Navigation.navigate(ROUTES.getReportRoute(this.props.route.params.chatReportID));
return;
}
| 4 |
diff --git a/articles/connector/overview.md b/articles/connector/overview.md @@ -12,7 +12,7 @@ The **AD/LDAP Connector** acts as a bridge between your **Active Directory** ser
The Connector supports authentication based on the following:
-* LDAP;
+* [LDAP](/protocols/ldap);
* [Kerberos](/connector/kerberos);
* [Client Certificates](/connector/client-certificates).
| 0 |
diff --git a/server/game/cards/08-MotC/KitsukiJusai.js b/server/game/cards/08-MotC/KitsukiJusai.js @@ -13,7 +13,7 @@ class KitsukiJusai extends DrawCard {
},
gameAction: AbilityDsl.actions.selectRing(context => ({
activePromptTitle: 'Choose an unclaimed ring to move fate to',
- ringCondition: ring => ring.isUnclaimed() && ring !== context.ring,
+ ringCondition: ring => ring.isUnclaimed(),
message: '{0} moves a fate from {1}\'s fate pool to the {2}',
messageArgs: ring => [context.player, context.player.opponent, ring],
gameAction: AbilityDsl.actions.placeFateOnRing({ origin: context.player.opponent })
| 2 |
diff --git a/api/src/api/v2.js b/api/src/api/v2.js @@ -99,8 +99,7 @@ function get_job(body) {
if (
rt.language !== 'file' &&
- files.filter(file => !file.encoding || file.encoding === 'utf8')
- .length === 0
+ !files.some(file => !file.encoding || file.encoding === 'utf8')
) {
return reject({
message: 'files must include at least one utf8 encoded file',
| 4 |
diff --git a/examples/__tests__/SimpleSlider.test.js b/examples/__tests__/SimpleSlider.test.js @@ -3,7 +3,7 @@ import React from 'react';
import {shallow, mount} from 'enzyme';
import SimpleSlider from '../SimpleSlider';
-describe('sample enzyme test', function() {
+describe('Simple Slider', function() {
it('should have 8 slides (6 actual and 2 clone slides)', function() {
const wrapper = mount(<SimpleSlider />);
expect(wrapper.find('.slick-slide').length).toEqual(8);
@@ -16,4 +16,20 @@ describe('sample enzyme test', function() {
const wrapper = mount(<SimpleSlider />);
expect(wrapper.find('.slick-slide.slick-active').length).toEqual(1);
});
+ it('should have 6 dots', function() {
+ const wrapper = mount(<SimpleSlider />);
+ expect(wrapper.find('.slick-dots').children().length).toEqual(6);
+ });
+ it('should have 1 active dot', function() {
+ const wrapper = mount(<SimpleSlider />);
+ expect(wrapper.find('.slick-dots .slick-active').length).toEqual(1);
+ });
+ it('should have a prev arrow', function () {
+ const wrapper = mount(<SimpleSlider />);
+ expect(wrapper.find('.slick-prev').length).toEqual(1);
+ });
+ it('should have a next arrow', function () {
+ const wrapper = mount(<SimpleSlider />);
+ expect(wrapper.find('.slick-next').length).toEqual(1);
+ });
});
| 0 |
diff --git a/src/layers/fp64/scatterplot-layer/scatterplot-layer-64.js b/src/layers/fp64/scatterplot-layer/scatterplot-layer-64.js @@ -148,7 +148,7 @@ export default class ScatterplotLayer64 extends Layer {
let i = 0;
for (const point of data) {
const position = getPosition(point);
- [value[i + 0], value[i + 1]] = fp64ify(position[2]);
+ [value[i + 0], value[i + 1]] = fp64ify(position[2] || 0);
i += size;
}
}
| 1 |
diff --git a/packages/node_modules/@node-red/runtime/lib/nodes/Node.js b/packages/node_modules/@node-red/runtime/lib/nodes/Node.js @@ -338,12 +338,14 @@ Node.prototype.close = function(removed) {
}
}
if (promises.length > 0) {
- return Promise.all(promises).then(function() {
+ return Promise.all(promises).then(() => {
+ this.removeAllListeners("input")
if (this._context) {
return context.delete(this._alias||this.id,this.z);
}
});
} else {
+ this.removeAllListeners("input")
if (this._context) {
return context.delete(this._alias||this.id,this.z);
}
| 2 |
diff --git a/src/lib/wallet/GoodWalletClassOld.js b/src/lib/wallet/GoodWalletClassOld.js @@ -540,8 +540,14 @@ export class GoodWallet {
return [0, hasClaim]
}
- const startRef = await this.UBIContract.methods.periodStart.call().then(_ => moment(parseInt(_) * 1000).utc())
- const curDay = await this.UBIContract.methods.currentDay.call().then(parseInt)
+ const startRef = await this.UBIContract.methods
+ .periodStart()
+ .call()
+ .then(_ => moment(parseInt(_) * 1000).utc())
+ const curDay = await this.UBIContract.methods
+ .currentDay()
+ .call()
+ .then(parseInt)
if (startRef.isBefore(moment().utc())) {
startRef.add(curDay + 1, 'days')
}
| 0 |
diff --git a/src/layouts/EnterpriseLayout.js b/src/layouts/EnterpriseLayout.js @@ -140,7 +140,14 @@ class EnterpriseLayout extends PureComponent {
},
callback: res => {
const adminer = userUtil.isCompanyAdmin(currentUser);
- if (res && res.list && res.list.length == 0 && adminer) {
+ const currentAddress = window.location.href;
+ if (
+ res &&
+ res.list &&
+ res.list.length === 0 &&
+ adminer &&
+ currentAddress.indexOf(`/enterprise/${eid}/provider/`) === -1
+ ) {
dispatch(routerRedux.push(`/enterprise/${eid}/addCluster?init=true`));
}
}
| 1 |
diff --git a/src/og/control/ruller/RullerScene.js b/src/og/control/ruller/RullerScene.js @@ -56,7 +56,7 @@ class RullerScene extends RenderNode {
this._trackEntity.polyline.altitude = 2;
- let obj3d = Object3d.createCylinder(1.5, 0, 5, 5, 1, true, false, 0, -3.5, 0)
+ let obj3d = Object3d.createCylinder(1.5, 0, 5, 20, 1, true, false, 0, -3.5, 0)
this._cornerEntity = [
new Entity({
@@ -64,7 +64,7 @@ class RullerScene extends RenderNode {
scale: 1,
instanced: true,
tag: "ruller",
- color: "green",
+ color: "rgb(0,305,0)",
vertices: obj3d.vertices,
indices: obj3d.indexes,
normals: obj3d.normals
@@ -78,7 +78,7 @@ class RullerScene extends RenderNode {
scale: 1,
instanced: true,
tag: "ruller",
- color: "red",
+ color: "rgb(455,0,0)",
vertices: obj3d.vertices,
indices: obj3d.indexes,
normals: obj3d.normals
| 7 |
diff --git a/packages/app/src/components/Common/Dropdown/PageItemControl.tsx b/packages/app/src/components/Common/Dropdown/PageItemControl.tsx @@ -66,12 +66,27 @@ const PageItemControlDropdownMenu = React.memo((props: DropdownMenuProps): JSX.E
additionalMenuItemRenderer: AdditionalMenuItems, isInstantRename, alignRight,
} = props;
+ // Change body class on change content width
+ const updateBodyClass = useCallback((isContainerFluid: boolean) => {
+ const bodyClasses = document.body.classList;
+ const isLayoutFluid = bodyClasses.contains('growi-layout-fluid');
+ const isOnSearch = bodyClasses.contains('on-search');
+
+ if (isContainerFluid && !isOnSearch && !isLayoutFluid) {
+ bodyClasses.add('growi-layout-fluid');
+ }
+ else if (isLayoutFluid) {
+ bodyClasses.remove('growi-layout-fluid');
+ }
+ }, []);
+
const switchContentWidthHandler = useCallback(async() => {
if (!isIPageInfoForOperation(pageInfo) || onClickSwitchContentWidthMenuItem == null) {
return;
}
await onClickSwitchContentWidthMenuItem(pageId, pageInfo.isContainerFluid);
- }, [onClickSwitchContentWidthMenuItem, pageId, pageInfo]);
+ updateBodyClass(!pageInfo.isContainerFluid);
+ }, [onClickSwitchContentWidthMenuItem, pageId, pageInfo, updateBodyClass]);
// eslint-disable-next-line react-hooks/rules-of-hooks
const bookmarkItemClickedHandler = useCallback(async() => {
@@ -302,18 +317,6 @@ export const PageItemControlSubstance = (props: PageItemControlSubstanceProps):
}
}, [isOpen, presetPageInfo, shouldFetch]);
- // Change body class on change content width
- const updateBodyClass = useCallback((isContainerFluid: boolean) => {
- if (isContainerFluid && !$('body').hasClass('on-search')) {
- if (!$('body').hasClass('growi-layout-fluid')) {
- $('body').addClass('growi-layout-fluid');
- }
- }
- else if ($('body').hasClass('growi-layout-fluid')) {
- $('body').removeClass('growi-layout-fluid');
- }
- }, []);
-
const switchContentWidthMenuItemHandler = useCallback(async(_pageId: string, _isContainerFluid: boolean) => {
if (onClickSwitchContentWidthMenuItem != null) {
await onClickSwitchContentWidthMenuItem(_pageId, _isContainerFluid);
@@ -322,8 +325,7 @@ export const PageItemControlSubstance = (props: PageItemControlSubstanceProps):
if (shouldFetch) {
mutatePageInfo();
}
- updateBodyClass(!_isContainerFluid);
- }, [mutatePageInfo, onClickSwitchContentWidthMenuItem, shouldFetch, updateBodyClass]);
+ }, [mutatePageInfo, onClickSwitchContentWidthMenuItem, shouldFetch]);
// mutate after handle event
const bookmarkMenuItemClickHandler = useCallback(async(_pageId: string, _newValue: boolean) => {
| 7 |
diff --git a/democracylab/models.py b/democracylab/models.py @@ -19,7 +19,7 @@ class Contributor(User):
country = models.CharField(max_length=2, blank=True)
postal_code = models.CharField(max_length=20, blank=True)
phone_primary = models.CharField(max_length=200, blank=True)
- about_me = models.CharField(max_length=100000, blank=True, null=True)
+ about_me = models.CharField(max_length=100000, blank=True)
user_technologies = TaggableManager(blank=True, through=UserTaggedTechnologies)
user_technologies.remote_field.related_name = "+"
| 13 |
diff --git a/articles/support/matrix.md b/articles/support/matrix.md @@ -319,6 +319,11 @@ Auth0 support is limited to the most recent version of the OS listed (unless oth
<td>v2</td>
<td><div class="label label-primary">Supported</div></td>
</tr>
+ <tr>
+ <td><a href="https://github.com/auth0/auth0-php">Auth0 PHP</a></td>
+ <td>v5</td>
+ <td><div class="label label-primary">Supported</div></td>
+ </tr>
</tbody>
</table>
@@ -382,6 +387,11 @@ Auth0 support is limited to the most recent version of the OS listed (unless oth
<td>v1</td>
<td><div class="label label-primary">Supported</div></td>
</tr>
+ <tr>
+ <td><a href="https://github.com/auth0/jwt-auth-bundle">JWT Auth Bundle</a></td>
+ <td>v3</td>
+ <td><div class="label label-default">Supported</div></td>
+ </tr>
<tr>
<td><a href="https://github.com/auth0/Auth0.Windows.UWP">Auth0 with UWP applications</a></td>
<td>v1</td>
| 0 |
diff --git a/contribs/gmf/src/controllers/bootstrap.js b/contribs/gmf/src/controllers/bootstrap.js @@ -34,6 +34,7 @@ function addScript(scriptUrl) {
const script = document.createElement('script');
script.src = scriptUrl;
script.crossOrigin = 'anonymous';
+ script.type = 'module';
document.body.append(script);
}
| 12 |
diff --git a/app/services/carto/user_table_index_service.rb b/app/services/carto/user_table_index_service.rb @@ -31,7 +31,6 @@ module Carto
def generate_indices
auto_indices(valid: false).each do |idx|
- CartoDB::Logger.debug(message: 'Auto index', action: 'drop invalid', table: @user_table, column: idx[:column])
@table.drop_index(idx[:column], AUTO_INDEX_PREFIX, concurrent: true)
end
@@ -41,7 +40,6 @@ module Carto
indexed_columns = valid_indices.map { |i| i[:column] }
create_index_on = columns_to_index - indexed_columns
create_index_on.each do |col|
- CartoDB::Logger.debug(message: 'Auto index', action: 'create', table: @user_table, column: col)
@table.create_index(col, AUTO_INDEX_PREFIX, concurrent: true)
end
| 2 |
diff --git a/src/docs/filters.md b/src/docs/filters.md @@ -14,7 +14,7 @@ tags:
---
# Filters
-A filter is a function which can be used within templating syntax to transform data into a more presentable format. Filters are typically designed to be chained, so that the value returned from one filter is piped into the next filter.
+A <dfn>filter</dfn> is a function which can be used within templating syntax to transform data into a more presentable format. Filters are typically designed to be chained, so that the value returned from one filter is piped into the next filter.
Various template engines can be extended with custom filters to modify content. Here are a few examples:
| 4 |
diff --git a/src/template.json b/src/template.json "size": "",
"notes": "",
"systems": {
- "powercore": "",
- "thrusters": "",
- "armor": "",
"quarters": "",
- "defense": "",
"driftEngine": "",
"bays": {
"value": [],
"value": [],
"custom": ""
},
- "sensors": "",
- "shields": ""
+ "sensors": ""
},
"modifiers": {
"value": [],
| 2 |
diff --git a/core/dropdowndiv.js b/core/dropdowndiv.js @@ -320,8 +320,6 @@ Blockly.DropDownDiv.show = function(owner, primaryX, primaryY,
* @private
*/
Blockly.DropDownDiv.getBoundsInfo_ = function() {
- // TODO (#2744): Account for toolboxes.
-
var boundPosition = Blockly.DropDownDiv.boundsElement_.getBoundingClientRect();
var boundSize = Blockly.utils.style.getSize(Blockly.DropDownDiv.boundsElement_);
| 2 |
diff --git a/nerdamer.core.js b/nerdamer.core.js @@ -8898,10 +8898,8 @@ var nerdamer = (function (imports) {
var d = _.subtract(u.clone(), v.clone());
//if it's not numeric then we don't know if we can simplify so just return
- if(!d.isConstant()) {
- b = new Symbol(1);
- }
- else {
+ if(d.isConstant()) {
+
//there will never be a case where d == 0 since this will already have
//been handled at the beginning of this function
t = new Symbol(1);
@@ -11966,3 +11964,6 @@ var nerdamer = (function (imports) {
if ((typeof module) !== 'undefined') {
module.exports = nerdamer;
};
+
+var ans = nerdamer('((n+2)*(n-1))!/(n+4)!');
+console.log(ans.toString());
\ No newline at end of file
| 1 |
diff --git a/lambda_permissions.go b/lambda_permissions.go @@ -146,54 +146,6 @@ func (perm BasePermission) export(principal *gocf.StringExpr,
// END - BasePermission
////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////
-// START - LambdaPermission
-//
-
-// LambdaPermission type that creates a Lambda::Permission entry
-// in the generated template, but does NOT automatically register the lambda
-// with the BasePermission.SourceArn. Typically used to register lambdas with
-// externally managed event producers
-type LambdaPermission struct {
- BasePermission
- // The entity for which you are granting permission to invoke the Lambda function
- Principal string
-}
-
-/*
-func (perm LambdaPermission) export(serviceName string,
- lambdaFunctionDisplayName string,
- lambdaLogicalCFResourceName string,
- template *gocf.Template,
- S3Bucket string,
- S3Key string,
- logger *logrus.Logger) (string, error) {
-
- return perm.BasePermission.export(gocf.String(perm.Principal),
- lambdaSourceArnParts,
- lambdaFunctionDisplayName,
- lambdaLogicalCFResourceName,
- template,
- S3Bucket,
- S3Key,
- logger)
-}
-*/
-/*
-func (perm LambdaPermission) descriptionInfo() ([]descriptionNode, error) {
- nodes := []descriptionNode{
- {
- Name: "Source",
- Relation: describeInfoArn(perm.SourceArn),
- },
- }
- return nodes, nil
-}
-*/
-//
-// END - LambdaPermission
-////////////////////////////////////////////////////////////////////////////////
-
////////////////////////////////////////////////////////////////////////////////
// START - S3Permission
//
| 2 |
diff --git a/diorama.js b/diorama.js @@ -22,7 +22,9 @@ const localVector3 = new THREE.Vector3();
const localVector2D = new THREE.Vector2();
const localVector2D2 = new THREE.Vector2();
const localVector4D = new THREE.Vector4();
+const localQuaternion = new THREE.Quaternion();
const localMatrix = new THREE.Matrix4();
+const localColor = new THREE.Color();
// this function maps the speed histogram to a position, integrated up to the given timestamp
const mapTime = (speedHistogram = new SpeedHistogram, time = 0) => {
@@ -717,6 +719,7 @@ const createPlayerDiorama = ({
canvas = null,
objects = [],
target = null,
+ cameraOffset = new THREE.Vector3(0.3, 0, -0.5),
lights = true,
label = null,
outline = false,
@@ -795,6 +798,9 @@ const createPlayerDiorama = ({
this.loaded = true;
});
},
+ setCameraOffset(newCameraOffset) {
+ cameraOffset.copy(newCameraOffset);
+ },
update(timestamp, timeDiff) {
if (!this.loaded || !this.enabled) {
lastDisabledTime = timestamp;
@@ -859,12 +865,19 @@ const createPlayerDiorama = ({
const _render = () => {
// set up side camera
- sideCamera.position.copy(target.position)
- .add(localVector.set(0.3, 0, -0.5).applyQuaternion(target.quaternion));
+ target.matrixWorld.decompose(localVector, localQuaternion, localVector2);
+ const targetPosition = localVector;
+ const targetQuaternion = localQuaternion;
+
+ sideCamera.position.copy(targetPosition)
+ .add(
+ localVector2.copy(cameraOffset)
+ .applyQuaternion(targetQuaternion)
+ );
sideCamera.quaternion.setFromRotationMatrix(
localMatrix.lookAt(
sideCamera.position,
- target.position,
+ targetPosition,
localVector3.set(0, 1, 0)
)
);
| 0 |
diff --git a/CHANGELOG.md b/CHANGELOG.md ## 7.3.1 (unreleased)
-### Breaking
-
-### Feature
-
### Bugfix
- Solved a browser console error in /contents view (#1695) @silviubogan
- Pagination icon fix @nileshgulia1
-### Internal
-
## 7.3.0 (2020-07-26)
### Feature
| 6 |
diff --git a/plugins/resource_management/app/controllers/resource_management/cloud_admin_controller.rb b/plugins/resource_management/app/controllers/resource_management/cloud_admin_controller.rb @@ -207,7 +207,7 @@ module ResourceManagement
# decide which table we are sorting
if @sortable_table == "domain_overcommitted"
if sort_by == "domain_overcommitted_name"
- @domain_quota_overcommitted.sort_by! { |r| [ r["domain"]["name"], r["resource"]] }
+ @domain_quota_overcommitted.sort_by! { |r| [ r["domain"]["name"].downcase, r["resource"]] }
else
sort_by = sort_by.gsub("domain_overcommitted_", "")
@domain_quota_overcommitted.sort_by! { |r| [ r[sort_by] ] }
@@ -216,7 +216,7 @@ module ResourceManagement
end
if @sortable_table == "project_overspent" || @sortable_table == "project_mismatch"
if sort_by == "project_overspent_name" || sort_by == "project_mismatch_name"
- @project_quota_overspent.sort_by! { |r| [ r["project"]["name"], r["resource"]] }
+ @project_quota_overspent.sort_by! { |r| [ r["project"]["name"].downcase, r["resource"]] }
else
sort_by = sort_by.gsub("#{@sortable_table}_", "")
@project_quota_overspent.sort_by! { |r| [ r[sort_by] ]}
| 8 |
diff --git a/src/encoded/static/components/award.js b/src/encoded/static/components/award.js @@ -440,28 +440,22 @@ const ChartRenderer = React.createClass({
if (this.searchData[chartCategory].data.length) {
// Get the array of lab data.
const labFacet = this.searchData[chartCategory].data.find(facet => facet.field === 'lab.title');
- if (labFacet) {
- this.searchData[chartCategory].labs = labFacet.terms && labFacet.terms.length ? labFacet.terms.sort((a, b) => (a.key < b.key ? -1 : (a.key > b.key ? 1 : 0))) : null;
- }
+ this.searchData[chartCategory].labs = (labFacet && labFacet.terms && labFacet.terms.length) ? labFacet.terms.sort((a, b) => (a.key < b.key ? -1 : (a.key > b.key ? 1 : 0))) : [];
// Get the array of data specific to experiments or annotations.
const categoryFacet = this.searchData[chartCategory].data.find(facet => facet.field === this.searchData[chartCategory].categoryFacet);
- if (categoryFacet) {
- this.searchData[chartCategory].categoryData = categoryFacet.terms && categoryFacet.terms.length ? categoryFacet.terms : null;
- }
+ this.searchData[chartCategory].categoryData = (categoryFacet && categoryFacet.terms && categoryFacet.terms.length) ? categoryFacet.terms : [];
// Get the array of status data.
const statusFacet = this.searchData[chartCategory].data.find(facet => facet.field === 'status');
- if (statusFacet) {
- this.searchData[chartCategory].statuses = statusFacet.terms && statusFacet.terms.length ? statusFacet.terms : null;
- }
+ this.searchData[chartCategory].statuses = (statusFacet && statusFacet.terms && statusFacet.terms.length) ? statusFacet.terms : [];
}
});
return (
<div className="award-charts">
<div className="award-chart__group-wrapper">
- <h2>Experiments</h2>
+ <h2>Assays</h2>
{experimentsConfig.labs.length ?
<div className="award-chart__group">
<LabChart
| 9 |
diff --git a/app/views/taxon_changes/_form.html.erb b/app/views/taxon_changes/_form.html.erb <%= t(:this_taxon_change_has_been_commited).html_safe %>
</div>
<% end -%>
- <% if taxon_change.new_record? -%>
+ <% unless taxon_change.committed? -%>
<fieldset class="column span-8">
<legend>
<%= t :type %>
<%= f.hidden_field :type %>
<% end %>
- <fieldset id="sourcing" class="last column span-<%= taxon_change.new_record? ? '16' : '24' %>">
+ <fieldset id="sourcing" class="last column span-<%= taxon_change.committed? ? 24 : 16 %>">
<legend>
<%= t :sourcing %>
<% helptip_for "source" do %>
| 11 |
diff --git a/src/api/v4/error.js b/src/api/v4/error.js +var UNEXPECTED_ERROR = 'unexpected error';
+
/**
* Build a cartoError from a generic error
* @constructor
@@ -18,7 +20,7 @@ function CartoError (error) {
return this;
}
- this.message = 'unexpected error';
+ this.message = UNEXPECTED_ERROR;
}
function _isWindshaftError (error) {
@@ -26,11 +28,15 @@ function _isWindshaftError (error) {
}
function _handleAjaxResponse (error) {
+ var errorMessage = '';
+
try {
var parsedError = JSON.parse(error.responseText);
- return parsedError.errors[0];
+ errorMessage = parsedError.errors[0];
} catch (exc) {
+ // Swallow parse error
}
+ return errorMessage || UNEXPECTED_ERROR;
}
module.exports = CartoError;
| 9 |
diff --git a/src/lib/decode.js b/src/lib/decode.js @@ -4,6 +4,8 @@ import { ok, error, map as mapResult } from "./result";
// Decoders give you a way to safely convert from an unknown type to a
// concrete type and recover from failure at runtime.
+// This is essentially a port of elm's JSON decoders
+// http://package.elm-lang.org/packages/elm-lang/core/latest/Json-Decode
export type Decoder<A> = mixed => Result<string, A>;
export const succeed = <A>(v: A): Decoder<A> => () => ok(v);
| 0 |
diff --git a/src/components/general/settings/TabAi.jsx b/src/components/general/settings/TabAi.jsx @@ -11,7 +11,7 @@ import styles from './settings.module.css';
//
-const ApiTypes = [ 'NONE', 'AI21', 'GOOSEAI', 'OPENAI' ];
+const ApiTypes = [ 'NONE', 'AI21', 'GOOSEAI', 'OPENAI', 'CONVAI' ];
const DefaultSettings = {
apiType: ApiTypes[0],
apiKey: '',
@@ -64,10 +64,11 @@ export const TabAi = ({ active }) => {
case 'AI21': return `https://ai.webaverse.com/ai21/v1/engines/j1-large/completions`;
case 'GOOSEAI': return `https://ai.webaverse.com/gooseai/v1/engines/gpt-neo-20b/completions`;
case 'OPENAI': return `https://api.openai.com/v1/engines/text-davinci-002/completions`;
+ case 'CONVAI': return `https://api.convai.com/webaverse`
default: return null;
}
};
- const _apiTypeNeedsApiKey = apiType => apiType === 'OPENAI';
+ const _apiTypeNeedsApiKey = apiType => apiType === 'OPENAI' || apiType === 'CONVAI';
function updateLoreEndpoint(apiType) {
const url = _getApiUrl(apiType);
| 0 |
diff --git a/packages/@uppy/xhr-upload/src/index.js b/packages/@uppy/xhr-upload/src/index.js @@ -251,7 +251,7 @@ export default class XHRUpload extends BasePlugin {
}
})
- xhr.addEventListener('load', (ev) => {
+ xhr.addEventListener('load', () => {
this.uppy.log(`[XHRUpload] ${id} finished`)
timer.done()
queuedRequest.done()
@@ -260,12 +260,12 @@ export default class XHRUpload extends BasePlugin {
this.uploaderEvents[file.id] = null
}
- if (opts.validateStatus(ev.target.status, xhr.responseText, xhr)) {
+ if (opts.validateStatus(xhr.status, xhr.responseText, xhr)) {
const body = opts.getResponseData(xhr.responseText, xhr)
const uploadURL = body[opts.responseUrlFieldName]
const uploadResp = {
- status: ev.target.status,
+ status: xhr.status,
body,
uploadURL,
}
@@ -282,7 +282,7 @@ export default class XHRUpload extends BasePlugin {
const error = buildResponseError(xhr, opts.getResponseError(xhr.responseText, xhr))
const response = {
- status: ev.target.status,
+ status: xhr.status,
body,
}
| 14 |
diff --git a/ui/app/components/account-dropdowns.js b/ui/app/components/account-dropdowns.js @@ -17,7 +17,7 @@ class AccountDropdowns extends Component {
accountSelectorActive: false,
optionsMenuActive: false,
}
- this.accountSelectorToggleClassName = 'fa-angle-down'
+ this.accountSelectorToggleClassName = 'accounts-selector'
this.optionsMenuToggleClassName = 'fa-ellipsis-h'
}
@@ -208,7 +208,7 @@ class AccountDropdowns extends Component {
[
enableAccountsSelector && h(
// 'i.fa.fa-angle-down',
- 'div.cursor-pointer.color-orange',
+ 'div.cursor-pointer.color-orange.accounts-selector',
{
style: {
// fontSize: '1.8em',
| 11 |
diff --git a/src/og/control/SimpleSkyBackground.js b/src/og/control/SimpleSkyBackground.js import { Control } from "./Control.js";
import { Program } from '../webgl/Program.js';
+import { htmlColorToRgb } from "../utils/shared.js";
/**
* Frame per second(FPS) display control.
@@ -19,6 +20,23 @@ class SimpleSkyBackground extends Control {
name: "SimpleSkyBackground",
...options
});
+
+ this._colorOne = new Float32Array([1.0, 1.0, 1.0]);
+ this._colorTwo = new Float32Array([0.0, 153.0 / 255.0, 221.0 / 255.0]);
+ }
+
+ set colorOne(htmlColor) {
+ let rgb = htmlColorToRgb(htmlColor);
+ this._colorOne[0] = rgb.x;
+ this._colorOne[1] = rgb.y;
+ this._colorOne[2] = rgb.z;
+ }
+
+ set colorTwo(htmlColor) {
+ let rgb = htmlColorToRgb(htmlColor);
+ this._colorTwo[0] = rgb.x;
+ this._colorTwo[1] = rgb.y;
+ this._colorTwo[2] = rgb.z;
}
oninit() {
@@ -51,6 +69,8 @@ class SimpleSkyBackground extends Control {
gl.uniform2fv(shu.iResolution, [h.getWidth(), h.getHeight()]);
gl.uniform1f(shu.fov, cam.getViewAngle());
gl.uniform1f(shu.earthRadius, this.planet.ellipsoid.getPolarSize() + 1);
+ gl.uniform3fv(shu.colorOne, this._colorOne);
+ gl.uniform3fv(shu.colorTwo, this._colorTwo);
gl.uniformMatrix4fv(shu.viewMatrix, false, cam._viewMatrix._m);
@@ -67,27 +87,30 @@ export function simpleSkyBackground(options) {
function simpleSkyBackgroundShader() {
return new Program("simpleSkyBackground", {
uniforms: {
- iResolution: "vec2", fov: "float", camPos: "vec3", earthRadius: "float", //projectionMatrix: "mat4",
- viewMatrix: "mat4"
+ iResolution: "vec2", fov: "float",
+ camPos: "vec3",
+ earthRadius: "float",
+ viewMatrix: "mat4",
+ colorOne: "vec3",
+ colorTwo: "vec3"
}, attributes: {
corners: "vec3"
- }, vertexShader: `attribute vec2 corners;
+ }, vertexShader:
+ `attribute vec2 corners;
varying vec2 tc;
void main(void) {
gl_Position = vec4(corners, 0.0, 1.0);
tc = corners * 0.5 + 0.5;
- }`, fragmentShader: `precision highp float;
+ }`, fragmentShader:
+ `precision highp float;
#define MAX 10e10
#define PI 3.14159265359
#define rad(x) x * PI / 180.
#define ZERO vec3(0.0)
- const vec3 START_COLOR = vec3(1.0);
- const vec3 END_COLOR = vec3(0.0, 153.0/255.0, 221.0/255.0);
-
#define RED vec4(1.0, 0.0, 0.0, 1.0)
#define GREEN vec4(0.0, 1.0, 0.0, 1.0)
@@ -97,6 +120,9 @@ function simpleSkyBackgroundShader() {
uniform float earthRadius;
uniform mat4 viewMatrix;
+ uniform vec3 colorOne;
+ uniform vec3 colorTwo;
+
varying vec2 tc;
// compute the view ray in the camera coordinate
@@ -176,7 +202,7 @@ function simpleSkyBackgroundShader() {
float maxI = sqrt(bigRadius * bigRadius + bigRadius * bigRadius);
- gl_FragColor = vec4(mix(START_COLOR, END_COLOR, Ix / maxI), 1.0);
+ gl_FragColor = vec4(mix(colorOne, colorTwo, Ix / maxI), 1.0);
}`
});
}
| 0 |
diff --git a/token-metadata/0xD7EFB00d12C2c13131FD319336Fdf952525dA2af/metadata.json b/token-metadata/0xD7EFB00d12C2c13131FD319336Fdf952525dA2af/metadata.json "symbol": "XPR",
"address": "0xD7EFB00d12C2c13131FD319336Fdf952525dA2af",
"decimals": 4,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/TemplateData.js b/src/TemplateData.js @@ -154,12 +154,12 @@ class TemplateData {
let paths = [
`${dir}/**/*.json`, // covers .11tydata.json too
`${dir}/**/*${this.config.jsDataFileSuffix}.cjs`,
- `${dir}/**/*${this.config.jsDataFileSuffix}.js`
+ `${dir}/**/*${this.config.jsDataFileSuffix}.js`,
];
if (this.hasUserDataExtensions()) {
let userPaths = this.getUserDataExtensions().map(
- extension => `${dir}/**/*.${extension}` // covers .11tydata.{extension} too
+ (extension) => `${dir}/**/*.${extension}` // covers .11tydata.{extension} too
);
paths = userPaths.concat(paths);
}
@@ -170,7 +170,7 @@ class TemplateData {
async getTemplateJavaScriptDataFileGlob() {
let dir = await this.getInputDir();
return TemplatePath.addLeadingDotSlashArray([
- `${dir}/**/*${this.config.jsDataFileSuffix}.js`
+ `${dir}/**/*${this.config.jsDataFileSuffix}.js`,
]);
}
@@ -206,7 +206,7 @@ class TemplateData {
fsBench.before();
let paths = fastglob.sync(await this.getGlobalDataGlob(), {
caseSensitiveMatch: false,
- dot: true
+ dot: true,
});
fsBench.after();
@@ -316,7 +316,7 @@ class TemplateData {
}
// Filter out files we know don't exist to avoid overhead for checking
- localDataPaths = localDataPaths.filter(path => {
+ localDataPaths = localDataPaths.filter((path) => {
return this._fsExistsCache.exists(path);
});
@@ -324,10 +324,24 @@ class TemplateData {
return localData;
}
+ let dataSource = {};
for (let path of localDataPaths) {
// clean up data for template/directory data files only.
let dataForPath = await this.getDataValue(path, null, true);
let cleanedDataForPath = TemplateData.cleanupData(dataForPath);
+
+ for (const key in cleanedDataForPath) {
+ if (dataSource.hasOwnProperty(key)) {
+ debugWarn(
+ "Warning: '%s' from '%s' is in use. Overwriting with %s",
+ key,
+ dataSource[key],
+ path
+ );
+ }
+ dataSource[key] = path;
+ }
+
TemplateData.mergeDeep(this.config, localData, cleanedDataForPath);
// debug("`combineLocalData` (iterating) for %o: %O", path, localData);
}
| 0 |
diff --git a/example/src/examples/EarthQuakes.js b/example/src/examples/EarthQuakes.js @@ -83,7 +83,7 @@ class EarthQuakes extends React.Component {
<MapboxGL.CircleLayer
id="singlePoint"
- filter={['!'[('has', 'point_count')]]}
+ filter={['!', ['has', 'point_count']]}
style={layerStyles.singlePoint}
/>
</MapboxGL.ShapeSource>
| 2 |
diff --git a/src/components/ResultCard.js b/src/components/ResultCard.js -import { Box, Heading, Icon, Link, Text, useTheme } from '@chakra-ui/core';
+import { Box, Heading, Icon, Text, useTheme } from '@chakra-ui/core';
import PropTypes from 'prop-types';
import React, { forwardRef } from 'react';
+import Link from '../components/Link';
import { zipcodeConversion } from '../utils/locationUtils';
import { toCamelCase } from '../utils/stringUtils';
import {
@@ -161,7 +162,7 @@ const ResultCard = forwardRef(
color={theme.colors['rbb-gray']}
mr={theme.spacing.xs}
/>
- <Link color={theme.colors['rbb-orange']} href="mailto:">
+ <Link variant="cta" href="mailto:">
Report or update
</Link>
</Text>
| 4 |
diff --git a/lod.js b/lod.js @@ -248,6 +248,28 @@ const constructOctreeForLeaf = (position, lod1Range, maxLod) => {
rootNodes,
lod1Nodes,
leafNodes,
+ remapNodes(nodes) {
+ for (let i = 0; i < nodes.length; i++) {
+ const node = nodes[i];
+ const hash = _octreeNodeMinHash(node.min, node.lod);
+ const otherNode = nodeMap.get(hash);
+ if (otherNode) {
+ nodes[i] = otherNode;
+ }
+ }
+ },
+ getOutrangedNodes(nodes) {
+ const remainderNodes = [];
+ for (let i = 0; i < nodes.length; i++) {
+ const node = nodes[i];
+ const hash = _octreeNodeMinHash(node.min, node.lod);
+ const otherNode = nodeMap.get(hash);
+ if (!otherNode) {
+ remainderNodes.push(node);
+ }
+ }
+ return remainderNodes;
+ },
};
};
const _makeEmptyOctree = () => {
| 0 |
diff --git a/lib/plugins/aws/provider/awsProvider.js b/lib/plugins/aws/provider/awsProvider.js @@ -471,7 +471,7 @@ class AwsProvider {
getDeploymentPrefix() {
const provider = this.serverless.service.provider;
- if (!('deploymentPrefix' in provider)) {
+ if (provider.deploymentPrefix === null || provider.deploymentPrefix === undefined) {
return 'serverless;
}
return provider.deploymentPrefix + '';
| 11 |
diff --git a/packages/example-forum/lib/modules/posts/parameters.js b/packages/example-forum/lib/modules/posts/parameters.js @@ -9,9 +9,9 @@ import moment from 'moment';
import { addCallback } from 'meteor/vulcan:core';
// Add 'after' and 'before' properties to terms which can be used to limit posts in time.
-function addTimeParameter (parameters, terms, apolloClient) {
+function PostsAddBeforeAfterParameters (parameters, terms, apolloClient) {
- // console.log('// addTimeParameter')
+ // console.log('// addBeforeAfterParameters')
if (typeof parameters.selector.postedAt === 'undefined') {
@@ -86,4 +86,4 @@ function addTimeParameter (parameters, terms, apolloClient) {
return parameters;
}
-addCallback('posts.parameters', addTimeParameter);
+addCallback('posts.parameters', PostsAddBeforeAfterParameters);
| 10 |
diff --git a/lib/react/rails/railtie.rb b/lib/react/rails/railtie.rb @@ -33,9 +33,13 @@ module React
end
# Rails checks these objects for changes:
- app.reloaders << app.config.file_watcher.new([], reload_paths) {}
+ react_reloader = app.config.file_watcher.new([], reload_paths) do
+ React::ServerRendering.reset_pool
+ end
+ app.reloaders << react_reloader
+
# Reload renderers in dev when files change
- config.to_prepare { React::ServerRendering.reset_pool }
+ config.to_prepare { react_reloader.execute_if_updated }
end
# Include the react-rails view helper lazily
| 1 |
diff --git a/src/components/level.js b/src/components/level.js import {PRIMARY_STATISTICS} from '../constants';
import {capitalize, formatNumber, getStatistic} from '../utils/commonfunctions';
+import {HeartFillIcon} from '@primer/octicons-v2-react';
import classnames from 'classnames';
import equal from 'fast-deep-equal';
import React from 'react';
@@ -22,11 +23,17 @@ function PureLevelItem({statistic, total, delta}) {
<React.Fragment>
<h5>{capitalize(t(statistic))}</h5>
<animated.h4>
- {statistic !== 'active'
- ? spring.delta.interpolate((delta) =>
- delta > 0 ? `+${formatNumber(Math.floor(delta))}` : '\u2764'
+ {statistic !== 'active' ? (
+ delta > 0 ? (
+ spring.delta.interpolate(
+ (delta) => `+${formatNumber(Math.floor(delta))}`
)
- : '\u00A0'}
+ ) : (
+ <HeartFillIcon size={9} verticalAlign={2} />
+ )
+ ) : (
+ '\u00A0'
+ )}
</animated.h4>
<animated.h1>
{spring.total.interpolate((total) => formatNumber(Math.floor(total)))}
| 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.