code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/core/workspace_svg.js b/core/workspace_svg.js @@ -880,7 +880,7 @@ Blockly.WorkspaceSvg.prototype.createDom = function(opt_backgroundClass) {
// This no-op works around https://bugs.webkit.org/show_bug.cgi?id=226683,
// which otherwise prevents zoom/scroll events from being observed in
// Safari. Once that bug is fixed it should be removed.
- document.body.addEventListener('wheel', function(e) {});
+ document.body.addEventListener('wheel', function() {});
Blockly.browserEvents.conditionalBind(
this.svgGroup_, 'wheel', this, this.onMouseWheel_);
}
| 2 |
diff --git a/src/useCamera.tsx b/src/useCamera.tsx @@ -2,13 +2,13 @@ import { Raycaster, Camera, Intersection } from 'three'
import React, { useState } from 'react'
import { useThree, applyProps } from 'react-three-fiber'
-export function useCamera(camera: Camera, props?: Partial<Raycaster>) {
+export function useCamera(camera: Camera | React.MutableRefObject<Camera>, props?: Partial<Raycaster>) {
const { mouse } = useThree()
const [raycast] = useState(() => {
let raycaster = new Raycaster()
if (props) applyProps(raycaster, props, {})
return function (_: Raycaster, intersects: Intersection[]): void {
- raycaster.setFromCamera(mouse, camera)
+ raycaster.setFromCamera(mouse, camera instanceof Camera ? camera : camera.current)
const rc = this.constructor.prototype.raycast.bind(this)
if (rc) rc(raycaster, intersects)
}
| 11 |
diff --git a/packages/@uppy/dashboard/src/style.scss b/packages/@uppy/dashboard/src/style.scss }
}
- .uppy-DashboardTab-btn svg,
- .uppy-DashboardTab-btn svg * {
+ .uppy-DashboardTab-btn svg {
max-width: 100%;
max-height: 100%;
display: inline-block;
vertical-align: text-top;
overflow: hidden;
- transition: transform 0.2s;
- will-change: transform;
+ transition: transform ease-in-out 0.2s;
}
.uppy-DashboardTab-btn:hover svg {
| 7 |
diff --git a/src/routes.json b/src/routes.json },
{
"name": "conference-index",
- "pattern": "^/conference/?$",
+ "pattern": "^/conference/?(\\?.*)?$",
"routeAlias": "/conference(?!/201[4-5])",
"view": "conference/2018/index/index",
"title": "Scratch Conference",
| 8 |
diff --git a/src/selection-handler.js b/src/selection-handler.js @@ -50,7 +50,6 @@ Object.assign(SelectionHandler.prototype, require('./function-bind'), require('.
window.addEventListener("keydown", (e) => {
e = e || window.event;
var ctrlKey = e.ctrlKey || e.metaKey;
- var shiftKey = e.shiftKey;
var key = e.key;
if (ctrlKey) {
@@ -65,15 +64,20 @@ Object.assign(SelectionHandler.prototype, require('./function-bind'), require('.
} else if (this.options.selectionDelete && key === "x") {
this.mediator.trigger("selection:delete");
}
- } else if (shiftKey && this.selecting) {
-
- if (["Down", "ArrowDown"].indexOf(key) > -1) {
+ } else if (this.selecting && ["Down", "ArrowDown"].indexOf(key) > -1) {
e.preventDefault();
- this.update(this.endIndex + 1, { focus: true });
- } else if (["Up", "ArrowUp"].indexOf(key) > -1) {
+ if (e.shiftKey && e.altKey) this.expandToEnd();
+ else if (e.shiftKey) this.expand(1);
+ else if (e.altKey) this.startAtEnd();
+ else this.move(1);
+ this.focusAtEnd();
+ } else if (this.selecting && ["Up", "ArrowUp"].indexOf(key) > -1) {
e.preventDefault();
- this.update(this.endIndex - 1, { focus: true });
- }
+ if (e.shiftKey && e.altKey) this.expandToStart();
+ else if (e.shiftKey) this.expand(-1);
+ else if (e.altKey) this.start(0);
+ else this.move(-1);
+ this.focusAtEnd();
}
}, false);
@@ -103,18 +107,37 @@ Object.assign(SelectionHandler.prototype, require('./function-bind'), require('.
}
},
- onMouseMove: function() {},
+ startAtEnd: function() {
+ this.start(this.editor.getBlocks().length - 1);
+ },
- update: function(index, options = {}) {
- options = Object.assign({ focus: false }, options);
+ move: function(index) {
+ this.start(this.endIndex + index);
+ },
+
+ onMouseMove: function() {},
+ update: function(index) {
this.endIndex = index;
this.selecting = this.startIndex !== this.endIndex;
this.mediator.trigger("selection:render");
- if (options.focus) {
+ },
+
+ expand(index) {
+ this.update(this.endIndex + index);
+ },
+
+ expandToStart() {
+ this.update(0);
+ },
+
+ expandToEnd() {
+ this.update(this.editor.getBlocks().length - 1);
+ },
+
+ focusAtEnd() {
const block = this.editor.getBlocks()[this.endIndex];
block.el.scrollIntoView({ behavior: "smooth" });
- }
},
complete: function() {
| 7 |
diff --git a/packages/native/examples/singledropdownlist/src/App.js b/packages/native/examples/singledropdownlist/src/App.js @@ -57,7 +57,7 @@ const RootDrawer = DrawerNavigator({
),
},
withCustomStyles: {
- navigationOptions: navigationOptionsBuilder('With custom styles', 'ios-flask'),
+ navigationOptions: navigationOptionsBuilder('With custom styles'),
screen: ({ navigation }) => ( // eslint-disable-line
<SingleDropdownList
// title="Series List"
@@ -73,6 +73,9 @@ const RootDrawer = DrawerNavigator({
title: {
color: 'purple',
},
+ label: {
+ color: 'purple',
+ },
}}
navigation={navigation}
/>
@@ -126,6 +129,9 @@ const RootDrawer = DrawerNavigator({
title: {
color: 'purple',
},
+ label: {
+ color: 'purple',
+ },
}}
navigation={navigation}
/>
| 3 |
diff --git a/mob-manager.js b/mob-manager.js @@ -625,38 +625,6 @@ class MobBatchedMesh extends InstancedBatchedMesh {
shader.vertexShader = shader.vertexShader.replace(`#include <skinning_pars_vertex>`, `\
#ifdef USE_SKINNING
-vec4 mat2quat( mat3 m ) {
- vec4 q;
- float tr = m[0][0] + m[1][1] + m[2][2];
-
- if (tr > 0.0) {
- float S = sqrt(tr + 1.0) * 2.0; // S=4*qw
- q.w = 0.25 * S;
- q.x = (m[2][1] - m[1][2]) / S;
- q.y = (m[0][2] - m[2][0]) / S;
- q.z = (m[1][0] - m[0][1]) / S;
- } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {
- float S = sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]) * 2.0; // S=4*qx
- q.w = (m[2][1] - m[1][2]) / S;
- q.x = 0.25 * S;
- q.y = (m[0][1] + m[1][0]) / S;
- q.z = (m[0][2] + m[2][0]) / S;
- } else if (m[1][1] > m[2][2]) {
- float S = sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]) * 2.0; // S=4*qy
- q.w = (m[0][2] - m[2][0]) / S;
- q.x = (m[0][1] + m[1][0]) / S;
- q.y = 0.25 * S;
- q.z = (m[1][2] + m[2][1]) / S;
- } else {
- float S = sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]) * 2.0; // S=4*qz
- q.w = (m[1][0] - m[0][1]) / S;
- q.x = (m[0][2] + m[2][0]) / S;
- q.y = (m[1][2] + m[2][1]) / S;
- q.z = 0.25 * S;
- }
-
- return q;
-}
mat4 quat2mat( vec4 q ) {
mat4 m;
m[0][0] = 1.0 - 2.0*(q.y*q.y + q.z*q.z);
@@ -681,9 +649,6 @@ mat4 quat2mat( vec4 q ) {
}
#define QUATERNION_IDENTITY vec4(0, 0, 0, 1)
-#ifndef PI
-#define PI 3.1415926
-#endif
vec4 q_slerp(vec4 a, vec4 b, float t) {
// if either input is zero, return the other.
if (length(a) == 0.0) {
| 2 |
diff --git a/react/src/base/inputs/SprkRevealInput/SprkRevealInput.js b/react/src/base/inputs/SprkRevealInput/SprkRevealInput.js @@ -3,6 +3,9 @@ import PropTypes from 'prop-types';
import uniqueId from 'lodash/uniqueId';
import SprkTextInput from '../SprkTextInput/SprkTextInput';
+/**
+ * TODO: Remove this component as part of Issue 3780.
+ */
class SprkRevealInput extends Component {
constructor(props) {
super(props);
@@ -14,7 +17,7 @@ class SprkRevealInput extends Component {
}
toggleReveal() {
- this.setState(prevState => ({
+ this.setState((prevState) => ({
isRevealed: !prevState.isRevealed,
}));
}
@@ -50,11 +53,13 @@ class SprkRevealInput extends Component {
SprkRevealInput.propTypes = {
/**
- * A space-separated string of classes to add to the outermost container of the component.
+ * A space-separated string of classes to add to
+ * the outermost container of the component.
*/
additionalClasses: PropTypes.string,
/**
- * Assigned to the `data-analytics` attribute serving as a unique selector for outside libraries to capture data.
+ * Assigned to the `data-analytics` attribute serving
+ * as a unique selector for outside libraries to capture data.
*/
analyticsString: PropTypes.string,
/**
@@ -75,7 +80,8 @@ SprkRevealInput.propTypes = {
*/
hiddenLabel: PropTypes.bool,
/**
- * Assigned to the `data-id` attribute serving as a unique selector for automated tools.
+ * Assigned to the `data-id` attribute serving as a
+ * unique selector for automated tools.
*/
idString: PropTypes.string,
/**
@@ -107,7 +113,7 @@ SprkRevealInput.propTypes = {
SprkRevealInput.defaultProps = {
additionalClasses: '',
analyticsString: '',
- formatter: value => value,
+ formatter: (value) => value,
helperText: '',
hiddenLabel: false,
idString: '',
| 3 |
diff --git a/Example/components/TabIcon.js b/Example/components/TabIcon.js @@ -10,13 +10,13 @@ const propTypes = {
title: PropTypes.string,
};
-const TabIcon = (props) => (
- <Text
- style={{ color: props.selected ? 'red' : 'black' }}
- >
+const TabIcon = (props) => {
+ return <Text
+ style={{color: props.focused ? 'red' : 'black'}}
+ >TAB
{props.title}
</Text>
-);
+};
TabIcon.propTypes = propTypes;
| 4 |
diff --git a/src/commands/utility/ServerInfoCommand.js b/src/commands/utility/ServerInfoCommand.js @@ -26,7 +26,7 @@ class ServerInfoCommand extends Command{
statistics += `**Verified:** ${guild.verified ? 'Yes' : 'No'} \n`;
statistics += `**Partnered:** ${guild.partnered ? 'Yes' : 'No'} \n`;
- const features = guild.features.map(feature => util.toTitleCase(feature));
+ const features = guild.features.map(feature => util.toTitleCase(feature.replace(/[-_]/g, ' ')));
const embed = new Discord.MessageEmbed()
.setTitle(`Info of ${guild.name}`)
| 14 |
diff --git a/src/technologies/e.json b/src/technologies/e.json "elqCurESite": "",
"elqLoad": "",
"elqSiteID": "",
- "elq_global": ""
+ "elq_global": "",
+ "eloqContactData": "",
+ "eloquaActionSettings": "",
+ "elqCookieValue": "",
+ "_elq": "",
+ "_elqQ": ""
+ },
+ "cookies": {
+ "ELOQUA": ""
},
"scripts": "elqCfg\\.js",
"website": "http://eloqua.com"
| 7 |
diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml @@ -42,6 +42,9 @@ services:
- /srv/crn-server/node_modules:exec
worker:
+ build:
+ context: .
+ dockerfile: server/Dockerfile
command: sh -c "yarn install && node /srv/crn-server/worker.js"
volumes:
- ../openneuro/server:/srv/crn-server
| 1 |
diff --git a/src/middleware/packages/activitypub/services/outbox.js b/src/middleware/packages/activitypub/services/outbox.js @@ -29,7 +29,7 @@ const OutboxService = {
activity = {
'@context': 'https://www.w3.org/ns/activitystreams',
- type: 'Create',
+ '@type': 'Create',
to: activity.to,
actor: activity.attributedTo,
object: object
| 1 |
diff --git a/README.md b/README.md @@ -46,7 +46,7 @@ That's it!
## Documentation
-You can find the current noblox.js wiki with all API documentation [here](https://github.com/suufi/noblox.js/wiki).
+You can find the current noblox.js wiki with all API documentation [here](https://github.com/sentanos/roblox-js/wiki). A majority of the new features that can be found in noblox.js are not in roblox-js. There will be new documentation coming in with v5.0.0.
## Credits
| 1 |
diff --git a/assets/js/modules/analytics/setup.js b/assets/js/modules/analytics/setup.js @@ -58,7 +58,6 @@ class AnalyticsSetup extends Component {
profileID,
propertyID,
useSnippet,
- ampClientIDOptIn,
trackingDisabled,
} = global.googlesitekit.modules.analytics.settings;
@@ -79,7 +78,6 @@ class AnalyticsSetup extends Component {
selectedProperty: propertyID,
selectedProfile: profileID,
selectedinternalWebProperty: internalWebPropertyID,
- ampClientIDOptIn,
existingTag: false,
trackingDisabled: trackingDisabled || [],
};
@@ -168,7 +166,6 @@ class AnalyticsSetup extends Component {
selectedProfile: 'profileID',
selectedinternalWebProperty: 'internalWebPropertyID',
useSnippet: 'useSnippet',
- ampClientIDOptIn: 'ampClientIDOptIn',
trackingDisabled: 'trackingDisabled',
};
@@ -490,7 +487,6 @@ class AnalyticsSetup extends Component {
accounts,
properties,
profiles,
- ampClientIDOptIn,
trackingDisabled,
} = this.state;
@@ -522,7 +518,6 @@ class AnalyticsSetup extends Component {
propertyID,
internalWebPropertyID,
useSnippet: useSnippet || false,
- ampClientIDOptIn: ampClientIDOptIn || false,
trackingDisabled,
};
@@ -623,7 +618,6 @@ class AnalyticsSetup extends Component {
anonymizeIP,
useSnippet,
isSaving,
- ampClientIDOptIn,
existingTag,
} = this.state;
@@ -632,7 +626,7 @@ class AnalyticsSetup extends Component {
onSettingsPage,
} = this.props;
const disabled = ! isEditing;
- const { ampEnabled, ampMode } = global.googlesitekit.admin;
+ const { ampMode } = global.googlesitekit.admin;
const useSnippetSettings = global.googlesitekit.modules.analytics.settings.useSnippet;
return (
@@ -684,24 +678,7 @@ class AnalyticsSetup extends Component {
</Radio>
</Fragment>
}
- { useSnippet && ampEnabled &&
- <div className="googlesitekit-setup-module__input">
- <Switch
- id="ampClientIDOptIn"
- label={ __( 'Opt in AMP Client ID', 'google-site-kit' ) }
- onClick={ this.switchStatus( 'ampClientIDOptIn' ) }
- checked={ ampClientIDOptIn }
- hideLabel={ false }
- />
- <p>
- { ampClientIDOptIn ?
- __( 'Sessions will be combined across AMP/non-AMP pages.', 'google-site-kit' ) + ' ' :
- __( 'Sessions will be tracked separately between AMP/non-AMP pages.', 'google-site-kit' ) + ' '
- }
- <Link href="https://support.google.com/analytics/answer/7486764" external inherit>{ __( 'Learn more', 'google-site-kit' ) }</Link>
- </p>
- </div>
- }
+
{ onSettingsPage && useSnippet && ampMode !== 'primary' && (
<div className="googlesitekit-setup-module__input">
<Switch
| 2 |
diff --git a/composer.json b/composer.json "@composer --working-dir=php-scoper config prefer-stable true",
"@composer --working-dir=php-scoper require humbug/php-scoper"
],
- "lint": "vendor/bin/phpcs",
- "lint-fix": "vendor/bin/phpcbf",
+ "lint": "phpcs",
+ "lint-fix": "phpcbf",
"test": "phpunit"
}
}
| 2 |
diff --git a/articles/libraries/auth0js/v8/index.md b/articles/libraries/auth0js/v8/index.md @@ -129,6 +129,8 @@ Hosted login with popup:
```js
webAuth.popup.authorize({
//Any additional options can go here
+}, function(err, authResult) {
+ //do something
});
```
@@ -137,6 +139,8 @@ And for social login with popup using `authorize`:
```js
webAuth.popup.authorize({
connection: 'twitter'
+}, function(err, authResult) {
+ //do something
});
```
| 0 |
diff --git a/release.py b/release.py @@ -20,6 +20,9 @@ CHANGELOG_END_RE = re.compile(r'^\#\# \[.*\] - \d{4}-\d{2}-\d{2}')
# if we come across a section header between two release section headers
# then we probably have an improperly formatted changelog
CHANGELOG_ERROR_RE = re.compile(r'^\#\# ')
+NO_CHANGE = ('No change since the last release. This release is simply a placeholder'
+ ' so that LBRY and LBRY App track the same version')
+
def main():
@@ -88,8 +91,10 @@ def main():
current_tag = base.git.describe()
github_repo.create_git_release(current_tag, current_tag, release_msg, draft=True)
+ lbrynet_daemon_release_msg = changelogs.get('lbry', NO_CHANGE)
auth.get_repo('lbryio/lbrynet-daemon').create_git_release(
- current_tag, current_tag, changelogs['lbry'], draft=True)
+ current_tag, current_tag, lbrynet_daemon_release_msg, draft=True)
+
for repo in repos:
repo.git.push(follow_tags=True)
base.git.push(follow_tags=True, recurse_submodules='check')
| 9 |
diff --git a/ui/component/viewers/videoViewer/internal/plugins/videojs-hls-quality-selector/plugin.js b/ui/component/viewers/videoViewer/internal/plugins/videojs-hls-quality-selector/plugin.js @@ -50,8 +50,8 @@ class HlsQualitySelectorPlugin {
}
updatePlugin() {
- // If there is the HLS tech
- if (this.getHls()) {
+ // If there is the VHS tech
+ if (this.getVhs()) {
// Show quality selector
this._qualityButton.show();
} else {
@@ -61,11 +61,21 @@ class HlsQualitySelectorPlugin {
}
/**
- * Returns HLS Plugin
+ * Deprecated, returns VHS plugin
*
- * @return {*} - videojs-hls-contrib plugin.
+ * @return {*} - videojs-http-streaming plugin.
*/
getHls() {
+ console.warn('hls-quality-selector: WARN: Using getHls options is deprecated. Use getVhs instead.')
+ return this.getVhs();
+ }
+
+ /**
+ * Returns VHS Plugin
+ *
+ * @return {*} - videojs-http-streaming plugin.
+ */
+ getVhs() {
return this.player.tech({ IWillNotUseThisInPlugins: true }).vhs;
}
| 10 |
diff --git a/test/spec/geo/shared-tests-for-torque-layer.js b/test/spec/geo/shared-tests-for-torque-layer.js @@ -145,8 +145,8 @@ module.exports = function () {
});
it('should set the new cartoCSS on the torque layer', function () {
- this.view.model.set('cartocss', 'some shiny new cartocss');
- expect(this.nativeTorqueLayer.setCartoCSS).toHaveBeenCalledWith('some shiny new cartocss');
+ this.view.model.set('cartocss', '#layer { marker-fill: whatever; }');
+ expect(this.nativeTorqueLayer.setCartoCSS).toHaveBeenCalledWith('#layer { marker-fill: whatever; }');
});
});
| 1 |
diff --git a/articles/topics/extensibility.md b/articles/topics/extensibility.md @@ -31,8 +31,9 @@ Use Rules to:
[Hooks](/hooks) allow you to customize the behavior of Auth0 using Node.js code that is executed against extensibility points (which are comparable to webhooks that come with a server). Hooks allow you modularity when configuring your Auth0 implementation, and extend the functionality of base Auth0 features.
Use Hooks to:
+
- [Change the scopes and add custom claims to the tokens issued during user authentication](/hooks/concepts/credentials-exchange-extensibility-point)
-- [Prevent user registration or add custom metadata to a new user](/hooks/concepts/pre-user-registration-extensibility-point)
+- [Add custom metadata to a new user](/hooks/concepts/pre-user-registration-extensibility-point)
- [Implement custom actions that execute asynchronously after a new user registers in your app](/hooks/concepts/post-user-registration-extensibility-point)
## Extensions
| 2 |
diff --git a/src/components/Root.js b/src/components/Root.js import React, { PropTypes } from 'react';
import { Provider } from 'react-redux';
import { Router } from 'react-router';
-import DevTools from './DevTools';
+// import DevTools from './DevTools';
const Root = ({ store, routes, history }) => (
<Provider store={store}>
<div>
<Router routes={routes} history={history} />
- <DevTools />
</div>
</Provider>
);
| 2 |
diff --git a/src/middleware/packages/webacl/middlewares/webacl.js b/src/middleware/packages/webacl/middlewares/webacl.js @@ -15,7 +15,7 @@ const actionsToVerify = {
// Resources
'ldp.resource.get': { minimumRight: 'read', verifyOn: 'resource' },
'ldp.resource.patch': { minimumRight: 'append', verifyOn: 'resource' },
- 'ldp.resource.put': { minimumRight: 'write', verifyOn: 'resource' },
+ 'ldp.resource.put': { minimumRight: 'append', verifyOn: 'resource' },
'ldp.resource.delete': { minimumRight: 'write', verifyOn: 'resource' },
// Container
'ldp.resource.post': { minimumRight: 'append', verifyOn: 'container' }
| 12 |
diff --git a/scripts/tosdr.js b/scripts/tosdr.js @@ -97,7 +97,9 @@ function addPoint(points, type, pointCase, score) {
points['all'][type].push(pointCase)
// is this a point we care about
- if (topics[type].indexOf(pointCase) !== -1){
+ if (topics[type].indexOf(pointCase) !== -1 &&
+ // avoid adding duplicate points
+ points['match'][type].indexOf(pointCase) === -1){
points['match'][type].push(pointCase)
if (type === 'bad') {
| 2 |
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/explorer/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/explorer/template.vue <template>
-<div class="explorer">
+<div class="explorer"
+ v-on:drag.prevent ="stopPropagation"
+ v-on:dragstart.prevent ="stopPropagation"
+ v-on:dragover.prevent ="setDragState"
+ v-on:dragenter.prevent ="setDragState"
+ v-on:dragleave.prevent ="unSetDragState"
+ v-on:dragend.prevent ="unSetDragState"
+ v-on:drop.prevent ="onDropFile">
+
+ <nav class="nav-explorer">
+ <div class="nav-wrapper">
+ <div class="nav-breadcrumbs">
<template v-for="segment in pathSegments">
<admin-components-action
v-bind:model="{
target: { path: segment.path },
title: segment.name,
- command: 'selectPath',
- classes: 'btn waves-effect waves-light blue-grey darken-3'
+ command: 'selectPath'
}">
</admin-components-action>
</template>
+ </div>
+ <div class="nav-actions">
+ <template v-for="child in model.children[0].children">
+ <component v-bind:is="child.component" v-bind:model="child"></component>
+ </template>
+ </div>
+ </div>
+ </nav>
+
<div class="explorer-layout">
<div v-if="pt" class="explorer-main">
<ul v-if="pt" class="collection">
<component v-bind:is="model.children[1].component" v-bind:model="model.children[1]"></component>
</div>
</div>
- <template v-for="child in model.children[0].children">
- <component v-bind:is="child.component" v-bind:model="child"></component>
- </template>
</div>
</template>
<script>
export default {
props: ['model'],
+ data(){
+ return{
+ isDragging: false,
+ uploadProgress: 0
+ }
+ },
computed: {
path: function() {
var dataFrom = this.model.dataFrom
}
},
methods: {
+ /* file upload */
+ setDragState(ev){
+ ev.stopPropagation()
+ this.isDragging = true
+ },
+ unSetDragState(ev){
+ ev.stopPropagation()
+ this.isDragging = false
+ },
+ stopPropagation(ev){
+ ev.stopPropagation()
+ },
+ uploadFile(files) {
+ $perAdminApp.stateAction('uploadFiles', {
+ path: $perAdminApp.getView().state.tools.assets,
+ files: files,
+ cb: this.setUploadProgress
+ })
+ },
+ setUploadProgress(percentCompleted){
+ this.uploadProgress = percentCompleted
+ if(percentCompleted === 100){
+ $perAdminApp.notifyUser(
+ 'Success',
+ 'File uploaded successfully.',
+ () => { this.uploadProgress = 0 }
+ )
+ }
+ },
+ onDropFile(ev){
+ console.log('onDropFile')
+ ev.stopPropagation()
+ this.isDragging = false
+ this.uploadFile(ev.dataTransfer.files)
+ },
+
+
isSelected: function(child) {
if(this.model.selectionFrom && child) {
return path + '.json'
},
nodeTypeToIcon: function(nodeType) {
-
- if(nodeType === 'per:Page') return 'insert_drive_file'
- if(nodeType === 'per:Object') return 'layers'
- if(nodeType === 'nt:file') return 'insert_drive_file'
- if(nodeType === 'per:Asset') return 'insert_drive_file'
- if(nodeType === 'sling:Folder') return 'folder'
- if(nodeType === 'sling:OrderedFolder') return 'folder'
+ switch(nodeType){
+ case 'per:Page':
+ return 'insert_drive_file'
+ case 'per:Object':
+ return 'layers'
+ case 'nt:file':
+ return 'insert_drive_file'
+ case 'per:Asset':
+ return 'insert_drive_file'
+ case 'sling:Folder':
+ return 'folder'
+ case 'sling:OrderedFolder':
+ return 'folder'
+ default:
return 'unknown'
+ }
},
checkIfAllowed: function(resourceType) {
return ['per:Asset', 'nt:file', 'sling:Folder', 'sling:OrderedFolder', 'per:Page', 'sling:OrderedFolder', 'per:Object'].indexOf(resourceType) >= 0
| 11 |
diff --git a/docs/configuration-file.md b/docs/configuration-file.md @@ -48,7 +48,7 @@ The cleaner array may appear unconventionnal but is really easy to use. Every it
// The thrid module to run with some special options
[
"module-name-3",
- { "option-1": 100, "option-2": true }
+ { "option-1": { value: 50, min: 0, max: 100 }, "option-2": { value: true } }
],
],
// Output options (See section 4.)
@@ -90,8 +90,8 @@ Module can be called in the full form:
[
"module",
{
- "option-1": 100,
- "option-2": true
+ "option-1": { "value": 100 },
+ "option-2": { "value": true }
}
],
```
@@ -140,7 +140,7 @@ The `includeMarginals: boolean` parameter allows to chose whether the output wil
{
"version": 0.5,
"extractor": {
- "pdf": "pdfminer",
+ "pdf": "pdf2json",
"img": "tesseract",
"language": ["eng", "fra"]
},
@@ -148,28 +148,36 @@ The `includeMarginals: boolean` parameter allows to chose whether the output wil
"out-of-page-removal",
"whitespace-removal",
"redundancy-detection",
- ["table-detection", { "pages": "all", "flavor": "lattice" }],
- ["header-footer-detection", { "maxMarginPercentage": 15 }],
- ["reading-order-detection", { "minColumnWidthInPagePercent": 15 }],
+ "table-detection",
+ ["header-footer-detection", { "maxMarginPercentage": { "value": 15 } }],
+ ["reading-order-detection", { "minColumnWidthInPagePercent": { "value": 15 } }],
"link-detection",
- ["words-to-line", { "maximumSpaceBetweenWords": 100 }],
+ ["words-to-line", { "maximumSpaceBetweenWords": { "value": 100 } }],
"lines-to-paragraph",
- ["page-number-detection", { "maxMarginPercentage": 15 }],
+ ["page-number-detection", { "maxMarginPercentage": { "value": 15 } }],
"heading-detection",
"hierarchy-detection",
- ["regex-matcher", {
- "queries": [
+ [
+ "regex-matcher",
+ {
+ "queries": {
+ "value": [
{
"label": "Car",
"regex": "([A-Z]{2}\\-[\\d]{3}\\-[A-Z]{2})"
- }, {
+ },
+ {
"label": "Age",
"regex": "(\\d+)[ -]*(ans|jarige)"
- }, {
+ },
+ {
"label": "Percent",
"regex": "([\\-]?(\\d)+[\\.\\,]*(\\d)*)[ ]*(%|per|percent|pourcent|procent)"
- }]
- }]
+ }
+ ]
+ }
+ }
+ ]
],
"output": {
"granularity": "word",
| 3 |
diff --git a/app/middlewares/log.js b/app/middlewares/log.js const { stringifyForLogs } = require('../utils/logs');
+const MAX_SQL_LENGTH = (global.settings.logQueries && global.settings.maxQueriesLogLength) || 1024;
const TYPES = {
QUERY: 'query',
JOB: 'job'
@@ -9,15 +10,13 @@ const TYPES = {
module.exports = function log(sqlType = TYPES.QUERY) {
return function logMiddleware(req, res, next) {
- const MAX_SQL_LENGTH = (global.settings.logQueries && global.settings.maxQueriesLogLength) || 1024;
-
const logObj = {
request: {
- sql: prepareSQL(res.locals.sql, sqlType, MAX_SQL_LENGTH)
+ sql: prepareSQL(res.locals.sql, sqlType)
}
};
- res.set('X-SQLAPI-Log', stringifyForLogs(logObj, MAX_SQL_LENGTH));
+ res.set('X-SQLAPI-Log', stringifyForLogs(logObj));
return next();
};
@@ -25,28 +24,69 @@ module.exports = function log(sqlType = TYPES.QUERY) {
module.exports.TYPES = TYPES;
-function prepareSQL(sql, sqlType, MAX_SQL_LENGTH) {
+function prepareSQL(sql, sqlType) {
if (!sql || !global.settings.logQueries) {
return null;
}
+
if (typeof sql === 'string') {
return {
type: sqlType,
- sql: sql.substring(0, MAX_SQL_LENGTH)
+ sql: ensureMaxQueryLength(sql)
};
}
if (Array.isArray(sql)) {
return {
type: sqlType,
- sql: sql.map(q => q.substring(0, MAX_SQL_LENGTH))
+ sql: sql.map(q => ensureMaxQueryLength(q))
};
}
- // other cases from Batch API
+ if (sql.query && Array.isArray(sql.query)) {
return {
type: sqlType,
- sql: sql
+ sql: prepareBatchFallbackQuery(sql)
};
}
+}
+
+/**
+ * Process a Batch API fallback query controlling the queries length
+ * We need to create a new object avoiding original modifications
+ *
+ * @param {Object} sql
+ */
+function prepareBatchFallbackQuery(sql) {
+ const fallbackQuery = {};
+ if (sql.onsuccess) {
+ fallbackQuery.onsuccess = ensureMaxQueryLength(sql.onsuccess);
+ }
+
+ if (sql.onerror) {
+ fallbackQuery.onerror = ensureMaxQueryLength(sql.onerror);
+ }
+
+ fallbackQuery.query = sql.query.map(query => {
+ const subquery = {
+ query: ensureMaxQueryLength(query.query)
+ }
+
+ if (query.onsuccess) {
+ subquery.onsuccess = ensureMaxQueryLength(query.onsuccess);
+ }
+
+ if (query.onerror) {
+ subquery.onerror = ensureMaxQueryLength(query.onerror);
+ }
+
+ return subquery;
+ });
+
+ return fallbackQuery;
+}
+
+function ensureMaxQueryLength(sql) {
+ return sql.substring(0, MAX_SQL_LENGTH);
+}
| 7 |
diff --git a/db/migrate/20180109232530_add_user_observation_index_to_identifications.rb b/db/migrate/20180109232530_add_user_observation_index_to_identifications.rb @@ -28,7 +28,7 @@ class AddUserObservationIndexToIdentifications < ActiveRecord::Migration
ids_to_update = idents.sort_by(&:id)[1..-2].map(&:id)
Identification.where( id: ids_to_update ).update_all( current: false )
Identification.elastic_index!( ids: idents.map(&:id) )
- Observation.elastic_index!( id: row["observation_id"].to_i )
+ Observation.elastic_index!( ids: [row["observation_id"].to_i] )
end
end
add_index :identifications, [ :user_id, :observation_id ], where: "current", unique: true
| 1 |
diff --git a/src/Widgets/FormContainerWidget/FormContainerWidgetEditingConfig.js b/src/Widgets/FormContainerWidget/FormContainerWidgetEditingConfig.js @@ -17,7 +17,7 @@ Scrivito.provideEditingConfig("FormContainerWidget", {
title: "Message shown while the form is being submitted",
},
submittedMessage: {
- title: "Message shown after the form was submitted",
+ title: "Message shown after the form was successfully submitted",
},
failedMessage: {
title: "Message shown if form submission failed",
| 7 |
diff --git a/Source/Scene/ImageryLayerCollection.js b/Source/Scene/ImageryLayerCollection.js @@ -326,12 +326,12 @@ ImageryLayerCollection.prototype.lowerToBottom = function (layer) {
var applicableRectangleScratch = new Rectangle();
/**
- * Helper function for `pickImageryLayers` and `pickImageryLayerFeatures`. Returns an array containing
- * pickedTile, imageryTiles, and the pickedLocation.
+ * Helper function for `pickImageryLayers` and `pickImageryLayerFeatures`.
*
* @param {Ray} ray The ray to test for intersection.
* @param {Scene} scene The scene.
- * @return {[QuadtreeTile,TileImagery[],Cartographic]|undefined}
+ * @return {[QuadtreeTile,TileImagery[],Cartographic]|undefined} Returns an array containing
+ * pickedTile, imageryTiles, and the pickedLocation.
*
* @private
*
@@ -371,7 +371,6 @@ ImageryLayerCollection.prototype.pickImageryLayersHelper = function (
// Pick against all attached imagery tiles containing the pickedLocation.
var imageryTiles = pickedTile.data.imagery;
- //need pickedTile, imageryTiles, pickedLocation
return [pickedTile, imageryTiles, pickedLocation];
};
@@ -401,10 +400,6 @@ ImageryLayerCollection.prototype.pickImageryLayers = function (ray, scene) {
pickedTile = locationData[0];
imageryTiles = locationData[1];
pickedLocation = locationData[2];
- console.log(pickedTile.constructor.name);
- console.log(imageryTiles.constructor.name);
- console.log(imageryTiles[0].constructor.name);
- console.log(pickedLocation.constructor.name);
var imageryLayers = [];
for (var i = imageryTiles.length - 1; i >= 0; --i) {
| 3 |
diff --git a/Source/DataSources/KmlTour.js b/Source/DataSources/KmlTour.js import defined from "../Core/defined.js";
import Event from "../Core/Event.js";
/**
+ * Describes a KmlTour, which uses KmlTourFlyTo, KmlTourWait, and KmlTourSoundCues to
+ * guide the camera to a specified destinations on given time intervals.
+ *
* @alias KmlTour
* @constructor
*
* @param {String} name name parsed from KML
* @param {String} id id parsed from KML
- * @param {Array} playlist array with KMLTourFlyTos, KMLTourWaits and KMLTourSoundCues
+ * @param {Array} playlist array with KmlTourFlyTos, KmlTourWaits and KmlTourSoundCues
+ *
+ * @see KmlTourFlyTo
+ * @see KmlTourWait
+ *
+ * @demo {@link https://sandcastle.cesium.com/?src=KML%20Tours.html KML Tours}
*/
function KmlTour(name, id) {
/**
| 3 |
diff --git a/articles/custom-domains/self-managed-certificates.md b/articles/custom-domains/self-managed-certificates.md @@ -12,10 +12,6 @@ Choose this option if:
* You want to have more control of your certificates (such as choosing your own CA or certificate expiration)
* You want to enable additional monitoring over your API calls to Auth0
-::: warning
-Custom Domains is a beta feature available only for public-cloud tenants [with their environment tag set as **Development**](/dev-lifecycle/setting-up-env).
-:::
-
## Prerequisites
You'll need to register and own the domain name to which you're mapping your Auth0 domain.
| 2 |
diff --git a/src/index.js b/src/index.js @@ -59,7 +59,8 @@ if (t && (!existingUser || !existingUser.currentUser)) {
consolidateStreamedStyles();
const store = initStore(window.__SERVER_STATE__ || initialState);
-const renderMethod = window.__SERVER_STATE__
+// eslint-disable-next-line
+const renderMethod = !!window.__SERVER_STATE__
? // $FlowIssue
ReactDOM.hydrate
: ReactDOM.render;
| 8 |
diff --git a/node-red-contrib-sarah/win-speak/node-speak.js b/node-red-contrib-sarah/win-speak/node-speak.js @@ -16,7 +16,7 @@ module.exports = function(RED) {
}
const input = (node, data, config) => {
- let tts = helper.getByString(data, config.input || 'payload', undefined);
+ let tts = helper.getByString(data, config.input || 'payload', config.input);
if (!tts) return;
let path = __dirname+'/bin/speak.exe';
| 9 |
diff --git a/lib/node_modules/@stdlib/plot/sparklines/base/ctor/docs/repl.txt b/lib/node_modules/@stdlib/plot/sparklines/base/ctor/docs/repl.txt Examples
--------
- > var sparkline = {{alias}}()
+ > var sparkline = new {{alias}}()
<Sparkline>
// Provide sparkline data at instantiation:
> var data = [ 1, 2, 3 ];
- > sparkline = {{alias}}( data )
+ > sparkline = new {{alias}}( data )
<Sparkline>
See Also
| 4 |
diff --git a/node-binance-api.js b/node-binance-api.js @@ -112,7 +112,7 @@ module.exports = function() {
quantity: quantity
};
if ( typeof flags.type !== "undefined" ) opt.type = flags.type;
- if ( opt.type == "LIMIT" ) {
+ if ( opt.type.includes("LIMIT") ) {
opt.price = price;
opt.timeInForce = "GTC";
}
| 12 |
diff --git a/apps/verticalface/app.js b/apps/verticalface/app.js @@ -113,14 +113,20 @@ Bangle.on('lcdPower',on=>{
// Show launcher when middle button pressed
setWatch(Bangle.showLauncher, BTN2, { repeat: false, edge: "falling" });
-//HRM Controller.
Bangle.on('touch', function(button) {
if(button == 1 || button == 2){
+ Bangle.showLauncher();
+ }
+});
+
+//HRM Controller.
+setWatch(function(){
if(!HRMstate){
console.log("Toggled HRM");
//Turn on.
Bangle.buzz();
Bangle.setHRMPower(1);
+ currentHRM = "CALC";
HRMstate = true;
} else if(HRMstate){
console.log("Toggled HRM");
@@ -131,8 +137,7 @@ Bangle.on('touch', function(button) {
currentHRM = [];
}
drawBPM(HRMstate);
- }
-});
+}, BTN1, { repeat: true, edge: "falling" });
Bangle.on('HRM', function(hrm) {
if(hrm.confidence > 90){
@@ -143,6 +148,7 @@ Bangle.on('HRM', function(hrm) {
}
});
+
//Bangle.on('step', function(up) {
// console.log("Step");
//});
| 12 |
diff --git a/src/article/ArticleSerializer.js b/src/article/ArticleSerializer.js import { prettyPrintXML, platform } from 'substance'
+import { DEFAULT_JATS_SCHEMA_ID } from './ArticleConstants'
export default class ArticleSerializer {
export (doc, config) {
let articleConfig = config.getConfiguration('article')
- // TODO: depending on the article type we should use a specifc exporter
- let exporter = articleConfig.createExporter('jats')
+ // EXPERIMENTAL: I am not sure yet, if this is the right way to use
+ // exportes and transformers.
+ // During import we store the original docType on the document instance
+ // Now we use this to create the corresponding exporter
+ let docType = doc.docType || DEFAULT_JATS_SCHEMA_ID
+
+ let exporter = articleConfig.createExporter(docType, doc)
+ if (!exporter) {
+ console.error(`No exporter registered for "${docType}". Falling back to default JATS importer, but with unpredictable result.`)
+ // Falling back to default importer
+ exporter = articleConfig.createExporter('jats', doc)
+ }
let res = exporter.export(doc)
let jats = res.jats
- // TODO: and depending on the article type we should use a specific transformation
- let transformation = articleConfig.getTransformation('jats')
+ let transformation = articleConfig.getTransformation(docType)
+ if (transformation) {
transformation.export(jats)
+ }
+ let xmlStr = prettyPrintXML(jats)
// for the purpose of debugging
if (platform.inBrowser) {
- console.info('saving jats', jats.getNativeElement())
+ console.info('saving jats', { el: jats.getNativeElement(), xml: xmlStr })
}
- return prettyPrintXML(jats)
+ return xmlStr
}
}
| 4 |
diff --git a/server/common/annotations/annotations.py b/server/common/annotations/annotations.py @@ -33,10 +33,10 @@ class Annotations(metaclass=ABCMeta):
raise OntologyLoadFailure("Unable to find OBO ontology path") from e
except SyntaxError as e:
- raise OntologyLoadFailure("Syntax error loading OBO ontology") from e
+ raise OntologyLoadFailure(f"{path}:{e.lineno}:{e.offset} OBO syntax error, unable to read ontology") from e
except Exception as e:
- raise OntologyLoadFailure("Error loading OBO file") from e
+ raise OntologyLoadFailure(f"{path}:Error loading OBO file") from e
def get_schema(self, data_adaptor):
schema = []
| 7 |
diff --git a/lib/storage.js b/lib/storage.js @@ -25,7 +25,8 @@ function get(id) {
}
function set(id, metaData) {
- redisClient.set(id, JSON.stringify(metaData), redis.print);
+ // set expiry to 30min (30 * 60 = 1800)
+ redisClient.set(id, JSON.stringify(metaData), 'EX', 1800, redis.print);
}
module.exports = {
| 12 |
diff --git a/source/datastore/store/Store.js b/source/datastore/store/Store.js @@ -2428,11 +2428,22 @@ const Store = Class({
{O.Store} Returns self.
*/
sourceDidCommitDestroy ( storeKeys ) {
- let l = storeKeys.length,
- storeKey, status;
+ const { _skToType, _typeToSKToId } = this;
+ let l = storeKeys.length;
+ let storeKey, status;
while ( l-- ) {
storeKey = storeKeys[l];
status = this.getStatus( storeKey );
+
+ // Id is no longer valid: remove it. If the record is undestroyed,
+ // it will keep the same store key but will need to be referenced
+ // by creation id until the server gives it a new id
+ const typeId = guid( _skToType[ storeKey ] );
+ const id = this.getIdFromStoreKey( storeKey );
+ const accountId = this.getAccountIdFromStoreKey( storeKey );
+ delete _typeToSKToId[ typeId ][ storeKey ];
+ delete this.getAccount( accountId ).typeToIdToSK[ typeId ][ id ];
+
// If the record has been undestroyed while being committed
// it will no longer be in the destroyed state, but instead be
// READY|NEW|COMMITTING.
| 2 |
diff --git a/src/js/locale/en.yaml b/src/js/locale/en.yaml @@ -13,7 +13,7 @@ errors:
no_service_worker: Service worker not supported
required: Required
unknown_error: Unknown error
- need_to_be_online: You need to be online load this resource
+ need_to_be_online: You need to be online to load this resource
nothing_selected: Nothing selected
cannot_reorder:
title: Cannot reorder items
@@ -139,7 +139,7 @@ services:
title: Snapcast
genius:
title: Genius
- switch_lyrics_result: Switch to another lyrics seach result
+ switch_lyrics_result: Switch to another lyrics search result
want_lyrics: 'Want track lyrics? Authorize Genius in '
google:
title: Google
@@ -556,7 +556,7 @@ modal:
interface_description: Theme, sorting, filters, etc
import:
title: Configuration shared
- subtitle: 'Another user has shared their configuration with you. This includes:'
+ subtitle: 'Another user has shared his configuration with you. This includes:'
do_you_want_to_import: Do you want to import this?
import_now: Import now
successful: Import successful
| 1 |
diff --git a/app/src/renderer/components/staking/UndelegationModal.vue b/app/src/renderer/components/staking/UndelegationModal.vue </p>
<tm-form-msg
v-if="maximum === 0"
- :msg="`don't have any delegation to this validator`"
+ :msg="`don't have any ${denom}s delegated to this validator`"
name="You"
type="custom"
/>
| 3 |
diff --git a/sirepo/package_data/static/css/sirepo.css b/sirepo/package_data/static/css/sirepo.css @@ -1011,3 +1011,10 @@ li.sr-model-list-item > a {
font-size: 1em;
white-space: nowrap;
}
+label .katex {
+ font-weight: 700;
+}
+.tooltip .katex {
+ font-size: 16px;
+ font-weight: normal;
+}
| 7 |
diff --git a/extensions/single-file-stac/README.md b/extensions/single-file-stac/README.md An extension to provide a set of Collections and Items within a single file catalog. The single file is a STAC catalog that contains everything that would normally be in a linked set of STAC files. This format is useful to save a portion of a catalog, or when creating a small catalog from derived data that should remain portable. It is most useful for saving the results of a search from a STAC API, as the Items, Collections, and optionally the search parameters are all saved within the single file. Hierarchical links have no meaning in a single file STAC, and so, if present, should be removed when creating a single file catalog.
-The Items in the single file catalog should not be merged with the Collection properties (i.e., common properties). The Collections are all included in the file as well, so there is no need to duplicate the common properties for every Item in the catalog.
-
- [Example](examples/example-search.json)
- [JSON Schema](json-schema/schema.json)
| 2 |
diff --git a/source/setup/components/VaultPage.js b/source/setup/components/VaultPage.js import React, { PureComponent, Fragment } from "react";
import PropTypes from "prop-types";
-import { Button, Intent, FormGroup, InputGroup, Navbar, Alignment } from "@blueprintjs/core";
+import { Button, Classes, Intent, FormGroup, InputGroup, Navbar, Alignment } from "@blueprintjs/core";
import styled from "styled-components";
import Dialog from "./Dialog.js";
import { closeCurrentTab } from "../../shared/library/extension.js";
@@ -127,17 +127,7 @@ class VaultPage extends PureComponent {
<Navbar.Group align={Alignment.LEFT}>
<Navbar.Heading>{this.props.archiveTitle}</Navbar.Heading>
<Navbar.Divider />
- <Choose>
- <When condition={this.props.state === "locked"}>
- <Button
- className="bp4-minimal"
- onClick={event => this.handleUnlockArchive(event)}
- disabled={disableForm}
- >
- Unlock
- </Button>
- </When>
- <Otherwise>
+ <If condition={this.props.state === "unlocked"}>
<Button
className="bp4-minimal"
icon="lock"
@@ -154,8 +144,7 @@ class VaultPage extends PureComponent {
>
Change Password
</Button>
- </Otherwise>
- </Choose>
+ </If>
</Navbar.Group>
<Navbar.Group align={Alignment.RIGHT}>
<Button
@@ -179,8 +168,18 @@ class VaultPage extends PureComponent {
<VaultEditor attachments={this.props.attachments} sourceID={this.props.sourceID} />
</If>
<If condition={this.props.state === "locked"}>
+ <div className={Classes.DIALOG_CONTAINER}>
+ <div className={Classes.DIALOG}>
+ <div className={Classes.DIALOG_HEADER}>
+ <h5 className={Classes.HEADING}>Unlock</h5>
+ </div>
+ <div className={Classes.DIALOG_BODY}>
<form onSubmit={event => this.handleUnlockArchive(event)}>
- <FormGroup disabled={disableForm} label="Master Password" labelFor="master-password">
+ <FormGroup
+ disabled={disableForm}
+ label="Master Password"
+ labelFor="master-password"
+ >
<InputGroup
id="master-password"
type="password"
@@ -194,6 +193,28 @@ class VaultPage extends PureComponent {
/>
</FormGroup>
</form>
+ </div>
+ <div className={Classes.DIALOG_FOOTER}>
+ <div className={Classes.DIALOG_FOOTER_ACTIONS}>
+ <Button
+ className="bp4-minimal"
+ onClick={event => this.handleUnlockArchive(event)}
+ disabled={disableForm}
+ intent={Intent.PRIMARY}
+ >
+ Unlock
+ </Button>
+ <Button
+ className="bp4-minimal"
+ onClick={event => this.handleCloseTab(event)}
+ disabled={disableForm}
+ >
+ Cancel
+ </Button>
+ </div>
+ </div>
+ </div>
+ </div>
</If>
</VaultContainer>
<If condition={this.state.changingMasterPassword}>
| 7 |
diff --git a/src/apps.json b/src/apps.json "Modernizr._version": "(.*)\\;version:\\1"
},
"script": [
- "modernizr(?:-([\\d.]*[\\d]))?.*\\.js\\;version:\\1",
- "/([\\d.]+)/modernizr(?:\\.min)?\\.js\\;version:\\1"
+ "([\\d.]+)?/modernizr(?:.([\\d.]+))?.*\\.js\\;version:\\1?\\1:\\2"
],
"website": "https://modernizr.com"
},
| 7 |
diff --git a/README.md b/README.md [](https://circleci.com/gh/radiantearth/stac-spec)
-**Mar 2, 2020** - The API portion of STAC has been split off into a [new repository - stac-api-spec](https://github.com/radiantearth/stac-api-spec) and will start being versioned and released separately than the core STAC spec. This is a work in progress, to advance us to 1.0-beta releases. Links and references between STAC and the STAC API may be incorrect, and the testing requirement to merge is temporarily disabled so we can collaboratively get it working.
-
## About
The SpatioTemporal Asset Catalog (STAC) specification aims to standardize the way geospatial assets are exposed online and queried.
@@ -48,9 +46,9 @@ the specification takes place in the [issue tracker](https://github.com/radiante
This repository contains the core specifications plus examples and validation schemas and tools. Also included are a
few documents that provide more context and plans for the evolution of the specification. Each spec folder contains a
-README explaining the layout of the folder, the main specification document, examples, validating schemas and OpenAPI
-documents (if relevant). And there is one more specification in the STAC 'family', which is
-the [STAC API specification](https://github.com/radiantearth/stac-api-spec/), which now lives in its own repository. It
+README explaining the layout of the folder, the main specification document, examples, and validating schemas. And
+there is one more specification in the STAC 'family', which is
+the [STAC API specification](https://github.com/radiantearth/stac-api-spec/), now living in its own repository. It
provides API endpoints, based on the [OGC API - Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) standard,
that enable clients to search for `item`s that match their filtering criteria. The four specifications are meant to be used
together, but are designed so each piece is small, self-contained and reusable in other contexts.
| 2 |
diff --git a/src/architecture/network.js b/src/architecture/network.js @@ -462,7 +462,24 @@ Network.prototype = {
}
return candidates.length ? candidates : false
- case mutation.SWAP_NODES: return ((method.mutateOutput && (this.nodes.length - 1) - this.input < 2) || (!method.mutateOutput && (this.nodes.length - 1) - this.input - this.output < 2)) ? false : []
+ case mutation.SWAP_NODES:
+ if(method.mutateOutput) {
+ if((this.nodes.length - 1) - this.input < 2) return false;
+
+ // Filter out input & output nodes
+ candidates = _.filter(this.nodes, function(node, index) { return(node.type !== 'input' && node.type !== 'output') })
+
+ // Check if less than two possible nodes
+ return (candidates.length < 2) ? false : candidates
+ } else {
+ if((this.nodes.length - 1) - this.input - this.output < 2) return false;
+
+ // Filter out input nodes
+ candidates = _.filter(this.nodes, function(node, index) { return(node.type !== 'input') })
+
+ // Break out early if less than two possible nodes
+ return (candidates.length < 2) ? false : candidates
+ }
}
},
@@ -611,47 +628,16 @@ Network.prototype = {
break;
}
case mutation.SWAP_NODES: {
- if(this.possible(method)) {
- let possible, node1, node2;
- if(method.mutateOutput) {
- // Filter out input nodes
- possible = _.filter(this.nodes, function(node, index) { return(node.type !== 'input') })
-
- // Break out early if less than two possible nodes
- if(possible.length < 2) {
- if(config.warnings) console.warn("Less than 2 availables nodes, SWAP_NODES mutation failed!")
- return false;
- break;
- }
-
- // Return a random node out of the filtered collection
- node1 = _.sample(possible)
-
- // Filter out node1 from collection | impure function... should clean that node1
- let possible2 = _.filter(possible, function(node, index) { return (node !== node1) })
-
- // Return a random node out of the filtered collection which excludes node1
- node2 = _.sample(possible2)
- } else {
- // Filter out input & output nodes
- possible = _.filter(this.nodes, function(node, index) { return(node.type !== 'input' && node.type !== 'output') })
-
- // Break out early if less than two possible nodes
- if(possible.length < 2) {
- if(config.warnings) console.warn("Less than 2 availables nodes, SWAP_NODES mutation failed!")
- return false;
- break;
- }
-
+ const possible = this.possible(method)
+ if(possible) {
// Return a random node out of the filtered collection
- node1 = _.sample(possible)
+ const node1 = _.sample(possible)
- // Filter out node1 from collection | impure function... should clean that node1
- let possible2 = _.filter(possible, function(node, index) { return (node !== node1) })
+ // Filter out node1 from collection
+ const possible2 = _.filter(possible, function(node, index) { return (node !== node1) })
// Return a random node out of the filtered collection which excludes node1
- node2 = _.sample(possible2)
- }
+ const node2 = _.sample(possible2)
const biasTemp = node1.bias;
const squashTemp = node1.squash;
| 5 |
diff --git a/articles/support/index.md b/articles/support/index.md @@ -127,3 +127,17 @@ Ticket response times will vary based on your support plan (shown below). Note
</tr>
</tbody>
</table>
+
+### Support Hours
+
+Auth0's Business Hours are as follows:
+
+**Standard Business Hours**
+Monday, 7am - Friday, 6pm Pacific Time | 24/5 coverage during this period
+
+**Critical Support Hours**
+Standard Support: 24/5 | Enterprise and Preferred Support: 24/7/265
+
+Every effort will be made to respond sooner than the times listed above. However, some types of problems such as development issues that require us to install software to duplicate a problem, may take time due to the research and work required. Response times may also be delayed during periods of heavy ticket volume.
+
+If you have specific support requirements or are interested in the __Enterprise Support__ or __Preferred Support__ option, please [contact sales](https://auth0.com/?contact=true).
| 0 |
diff --git a/docs/src/pages/discover-more/showcase.md b/docs/src/pages/discover-more/showcase.md @@ -13,3 +13,7 @@ Want to add your app? Found an app that no longer works or no longer uses Materi
### 2. Mantic Transparence
An Open Data tool showing financial and demographic data for all the towns in France (in french)
https://app.mantic.fr/
+
+### 3. Venuemob
+ A platform for individuals and businesses to find and book the perfect venue for any event
+ https://venuemob.com.au/
| 0 |
diff --git a/src/pages/signin/ChangeExpensifyLoginLink.js b/src/pages/signin/ChangeExpensifyLoginLink.js @@ -3,7 +3,6 @@ import {TouchableOpacity, View} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import PropTypes from 'prop-types';
import Str from 'expensify-common/lib/str';
-import lodashGet from 'lodash/get';
import Text from '../../components/Text';
import styles from '../../styles/styles';
import themeColors from '../../styles/themes/default';
@@ -28,16 +27,14 @@ const defaultProps = {
},
};
-const ChangeExpensifyLoginLink = (props) => {
- const login = lodashGet(props.credentials, 'login', '');
- return (
+const ChangeExpensifyLoginLink = props => (
<View style={[styles.changeExpensifyLoginLinkContainer, styles.mt3]}>
<Text>
{props.translate('common.not')}
- {Str.isSMSLogin(login)
- ? props.toLocalPhone(Str.removeSMSDomain(login))
- : Str.removeSMSDomain(login)}
+ {Str.isSMSLogin(props.credentials.login)
+ ? props.toLocalPhone(Str.removeSMSDomain(props.credentials.login))
+ : Str.removeSMSDomain(props.credentials.login)}
{'? '}
</Text>
<TouchableOpacity
@@ -52,7 +49,6 @@ const ChangeExpensifyLoginLink = (props) => {
</TouchableOpacity>
</View>
);
-};
ChangeExpensifyLoginLink.propTypes = propTypes;
ChangeExpensifyLoginLink.defaultProps = defaultProps;
| 13 |
diff --git a/app/controllers/mock.php b/app/controllers/mock.php @@ -353,10 +353,12 @@ App::get('/v1/mock/tests/general/set-cookie')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->inject('response')
- ->action(function ($response) {
+ ->inject('request')
+ ->action(function ($response, $request) {
/** @var Appwrite\Utopia\Response $response */
+ /** @var Appwrite\Utopia\Request $request */
- $response->addCookie('cookieName', 'cookieValue', \time() + 31536000, '/', 'localhost', true, true);
+ $response->addCookie('cookieName', 'cookieValue', \time() + 31536000, '/', $request->getHostname(), true, true);
});
App::get('/v1/mock/tests/general/get-cookie')
| 12 |
diff --git a/lib/draw2D.js b/lib/draw2D.js +"use strict";
// 2D GRAPHICS PRIMITIVES.
var align = viewForwardMat.transform([alignX, alignY, 0, 0]);
- lines = ('' + message).split('\n');
+ var lines = ('' + message).split('\n');
for (i = 0 ; i < lines.length ; i++) {
- di = 1.6 * (i + .5 - lines.length / 2);
+ var di = 1.6 * (i + .5 - lines.length / 2);
p[0] = x - align[0] * textWidth(lines[i]);
p[1] = y + (1.2 - align[1] + di) * th * .65;
| 12 |
diff --git a/package.json b/package.json {
"name": "prettier-atom",
"main": "./dist/main.js",
- "version": "0.37.0",
+ "version": "0.38.0",
"description": "Atom plugin for formatting JavaScript using prettier with (optional) prettier-eslint integration",
"keywords": [
"atom",
| 6 |
diff --git a/metaverse_modules/mesh-lod-item/index.js b/metaverse_modules/mesh-lod-item/index.js import * as THREE from 'three';
import metaversefile from 'metaversefile';
-const {useApp, useFrame, useScene, usePhysics, useWear, useMeshLodder} = metaversefile;
+const {useApp, useFrame, usePhysics, useWear, useMeshLodder, useCleanup, useDefaultModules, addTrackedApp} = metaversefile;
-// const zeroVector = new THREE.Vector3(0, 0, 0);
+const localVector = new THREE.Vector3();
+const localVector2 = new THREE.Vector3();
+const localQuaternion = new THREE.Quaternion();
const localMatrix = new THREE.Matrix4();
+const r = () => (-0.5+Math.random())*2;
+
const _copyTransform = (dst, src) => {
dst.position.copy(src.position);
dst.quaternion.copy(src.quaternion);
@@ -15,7 +19,9 @@ const _copyTransform = (dst, src) => {
export default () => {
const app = useApp();
+ const physicsManager = usePhysics();
const meshLodManager = useMeshLodder();
+ const {moduleUrls} = useDefaultModules();
app.name = 'mesh-lod-item';
@@ -78,6 +84,42 @@ export default () => {
wearing = e.wear;
});
+ app.addEventListener('die', async () => {
+ const numSilks = Math.floor(1 + Math.random() * 6);
+ const promises = [];
+ for (let i = 0; i < numSilks; i++) {
+ const components = [
+ {
+ key: 'drop',
+ value: {
+ velocity: new THREE.Vector3(r(), 1+Math.random(), r())
+ .normalize()
+ .multiplyScalar(5)
+ .toArray(),
+ angularVelocity: new THREE.Vector3(0, 0.001, 0)
+ .toArray(),
+ },
+ },
+ ];
+
+ const p = addTrackedApp(
+ moduleUrls.silk,
+ localVector.setFromMatrixPosition(itemMesh.matrixWorld),
+ localQuaternion.identity(),
+ localVector2.set(1, 1, 1),
+ components
+ );
+ promises.push(p);
+ }
+ await Promise.all(promises);
+ });
+
+ useCleanup(() => {
+ for (const physicsObject of physicsObjects) {
+ physicsManager.removeGeometry(physicsObject);
+ }
+ });
+
app.getPhysicsObjects = () => physicsObjects;
return app;
| 0 |
diff --git a/content/articles/how-to-implement-caching-in-adonisjs-5/index.md b/content/articles/how-to-implement-caching-in-adonisjs-5/index.md @@ -134,9 +134,9 @@ export default class ForumsController {
}
// Reading a Single Forum by ID
- public async update({ auth, request, params}: HttpContextContract){
+ public async update({request, params}: HttpContextContract){
try {
- const ticket = await Cache.remember('forum_id_' + params.id, 60, async function () {
+ const forum = await Cache.remember('forum_id_' + params.id, 60, async function () {
// This code is only executed if there was a MISS
return await Forum.find(params.id);
})
@@ -149,12 +149,13 @@ export default class ForumsController {
await forum.preload('posts')
return forum
}
+ }
+
} catch (error) {
console.log(error)
}
}
}
-}
```
The read operations are shown mainly in the `index()` method for retrieving all forums and a single forum by ID.
@@ -174,10 +175,10 @@ public async update({ request, params }: HttpContextContract) {
return await Forum.find(params.id)
})
- if (forum && await ticket.save()) {
+ if (forum && await forum.save()) {
// If updates successfully in database, then updates the Cache Server.
- await Cache.update('forum_id_' + params.id, ticket, 60)
+ await Cache.update('forum_id_' + params.id, forum, 60)
forum.title = request.input('title');
forum.description = request.input('description');
@@ -190,7 +191,7 @@ public async update({ request, params }: HttpContextContract) {
}
}
-public async store({ auth, request, response}: HttpContextContract)
+public async store({ auth, request}: HttpContextContract)
{
const user = await auth.authenticate();
const forum = new Forum();
@@ -198,8 +199,8 @@ public async store({ auth, request, response}: HttpContextContract)
forum.description = request.input('description');
await user.related('forums').save(forum)
- // Stores a new Ticket to Cache
- await Cache.set('ticket_id_' + ticket.id, ticket, 60)
+ // Stores a new forum to Cache
+ await Cache.set('forum_id_' + forum.id, forum, 60)
return forum
}
```
@@ -211,7 +212,7 @@ Now that we have implemented our caching system in our project, let's run some t
We will compare both the previous API without caching and with caching to see the difference in seconds.
-First, we have the result of the performance without implementing our cache system. However, the result is pretty fast, though, comparing the payload, which is minimal, about two ticket collections.
+First, we have the result of the performance without implementing our cache system. However, the result is pretty fast, though, comparing the payload, which is minimal, about two forum collections.
So we have a **643ms response time** on our API request.
| 1 |
diff --git a/docker-compose-web.yml b/docker-compose-web.yml version: "3"
networks:
- origin-develop:
+ origin-website-develop:
volumes:
pg_data:
@@ -19,7 +19,7 @@ services:
- POSTGRES_PASSWORD=origin
- POSTGRES_DB=origin_website
networks:
- - origin-develop
+ - origin-website-develop
redis:
container_name: redis
@@ -28,7 +28,7 @@ services:
sysctls:
- net.core.somaxconn=4096
networks:
- - origin-develop
+ - origin-website-develop
origin-website:
container_name: origin-website
@@ -49,7 +49,7 @@ services:
- FLASK_APP=/app/main.py
command: "python /app/main.py"
networks:
- - origin-develop
+ - origin-website-develop
origin-website-celery:
container_name: origin-website-celery
@@ -67,4 +67,4 @@ services:
command: "watchmedo auto-restart -d . -p '*.py' -i '*.pyc' --recursive --
celery -A util.tasks worker --loglevel=INFO"
networks:
- - origin-develop
+ - origin-website-develop
| 4 |
diff --git a/js/okex3.js b/js/okex3.js @@ -687,7 +687,7 @@ module.exports = class okex3 extends Exchange {
'rate': 'public',
'{instrument_id}/constituents': 'public',
},
- 'warnOnFetchCurrenciesWithoutAuthorization': true,
+ 'warnOnFetchCurrenciesWithoutAuthorization': false,
},
'commonCurrencies': {
// OKEX refers to ERC20 version of Aeternity (AEToken)
| 12 |
diff --git a/src/plot_api/plot_schema.js b/src/plot_api/plot_schema.js @@ -221,17 +221,6 @@ exports.findArrayAttributes = function(trace) {
}
}
- // Look into the fullInput module attributes for array attributes
- // to make sure that 'custom' array attributes are detected.
- //
- // At the moment, we need this block to make sure that
- // ohlc and candlestick 'open', 'high', 'low', 'close' can be
- // used with filter and groupby transforms.
- if(trace._fullInput && trace._fullInput._module && trace._fullInput._module.attributes) {
- exports.crawl(trace._fullInput._module.attributes, callback);
- arrayAttributes = Lib.filterUnique(arrayAttributes);
- }
-
return arrayAttributes;
};
| 2 |
diff --git a/src/plot_api/plot_schema.js b/src/plot_api/plot_schema.js @@ -252,12 +252,11 @@ exports.findArrayAttributes = function(trace) {
exports.getTraceValObject = function(trace, parts) {
var head = parts[0];
var i = 1; // index to start recursing from
- var transforms = trace.transforms;
- if(!Array.isArray(transforms) || !transforms.length) transforms = false;
var moduleAttrs, valObject;
if(head === 'transforms') {
- if(!transforms) return false;
+ var transforms = trace.transforms;
+ if(!Array.isArray(transforms) || !transforms.length) return false;
var tNum = parts[1];
if(!isIndex(tNum) || tNum >= transforms.length) {
return false;
@@ -287,22 +286,8 @@ exports.getTraceValObject = function(trace, parts) {
}
}
- // next look in the global attributes
+ // finally look in the global attributes
if(!valObject) valObject = baseAttributes[head];
-
- // finally check if we have a transform matching the original trace type
- if(!valObject && transforms) {
- var inputType = trace._input.type;
- if(inputType && inputType !== trace.type) {
- for(var j = 0; j < transforms.length; j++) {
- if(transforms[j].type === inputType) {
- moduleAttrs = ((Registry.modules[inputType] || {})._module || {}).attributes;
- valObject = moduleAttrs && moduleAttrs[head];
- if(valObject) break;
- }
- }
- }
- }
}
return recurseIntoValObject(valObject, parts, i);
| 2 |
diff --git a/snippets/navigationview-action-placementpriority.js b/snippets/navigationview-action-placementpriority.js @@ -13,4 +13,4 @@ var createAction = function(title, imageName, placementPriority) {
createAction('Search', 'search.png', 'high');
createAction('Share', 'share.png', 'low');
-createAction('Settings', 'settings.png', 'low');
+createAction('Settings', 'settings.png', 'normal');
| 7 |
diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js @@ -278,36 +278,6 @@ function invite(logins, welcomeNote, policyID) {
});
}
-/**
- * Uploads the avatar image to S3 bucket and updates the policy with new avatarURL
- *
- * @param {String} policyID
- * @param {Object} file
- */
-function uploadAvatar(policyID, file) {
- return API.User_UploadAvatar({file})
- .then((response) => {
- if (response.jsonCode !== 200) {
- // Show the user feedback
- const errorMessage = translateLocal('workspace.editor.avatarUploadFailureMessage');
- Growl.error(errorMessage, 5000);
- return;
- }
-
- return response.s3url;
- })
- .then((avatarURL) => {
- // Update the policy with the new avatarURL as soon as we get it
- Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, {avatarURL, isAvatarUploading: false});
- update(policyID, {avatarURL});
- })
- .catch(() => {
- Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, {isAvatarUploading: false});
- const errorMessage = translateLocal('workspace.editor.avatarUploadFailureMessage');
- Growl.error(errorMessage, 5000);
- })
-}
-
/**
* Sets the name of the policy
*
@@ -338,6 +308,36 @@ function update(policyID, values, shouldGrowl = false) {
});
}
+/**
+ * Uploads the avatar image to S3 bucket and updates the policy with new avatarURL
+ *
+ * @param {String} policyID
+ * @param {Object} file
+ */
+function uploadAvatar(policyID, file) {
+ return API.User_UploadAvatar({file})
+ .then((response) => {
+ if (response.jsonCode !== 200) {
+ // Show the user feedback
+ const errorMessage = translateLocal('workspace.editor.avatarUploadFailureMessage');
+ Growl.error(errorMessage, 5000);
+ return;
+ }
+
+ return response.s3url;
+ })
+ .then((avatarURL) => {
+ // Update the policy with the new avatarURL as soon as we get it
+ Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, {avatarURL, isAvatarUploading: false});
+ update(policyID, {avatarURL});
+ })
+ .catch(() => {
+ Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, {isAvatarUploading: false});
+ const errorMessage = translateLocal('workspace.editor.avatarUploadFailureMessage');
+ Growl.error(errorMessage, 5000);
+ });
+}
+
/**
* Sets local values for the policy
* @param {String} policyID
| 5 |
diff --git a/src/components/topic/snapshots/foci/builder/keywordSearch/EditKeywordSearchContainer.js b/src/components/topic/snapshots/foci/builder/keywordSearch/EditKeywordSearchContainer.js @@ -30,8 +30,24 @@ class EditKeywordSearchContainer extends React.Component {
this.state = { keywords: null };
}
+ updateKeywords = () => {
+ const { currentKeywords } = this.props;
+ this.setState({ keywords: currentKeywords });
+ }
+
+ handleKeyDown = (event) => {
+ switch (event.key) {
+ case 'Enter':
+ this.updateKeywords();
+ event.preventDefault();
+ break;
+ default:
+ break;
+ }
+ }
+
render() {
- const { topicId, renderTextField, currentKeywords, currentFocalTechnique, handleSubmit, onPreviousStep, finishStep } = this.props;
+ const { topicId, renderTextField, currentFocalTechnique, handleSubmit, onPreviousStep, finishStep } = this.props;
const { formatMessage } = this.props.intl;
let previewContent = null;
let nextButtonDisabled = true;
@@ -61,6 +77,7 @@ class EditKeywordSearchContainer extends React.Component {
component={renderTextField}
floatingLabelText={messages.searchByKeywords}
fullWidth
+ onKeyDown={this.handleKeyDown}
/>
</Col>
<Col lg={2} xs={12}>
@@ -68,7 +85,7 @@ class EditKeywordSearchContainer extends React.Component {
id="keyword-search-preview-button"
label={formatMessage(messages.search)}
style={{ marginTop: 33 }}
- onClick={() => this.setState({ keywords: currentKeywords })}
+ onClick={this.updateKeywords}
/>
</Col>
</Row>
| 11 |
diff --git a/src/transformers/index.js b/src/transformers/index.js @@ -16,11 +16,11 @@ const applyExtraAttributes = require('./extra-attributes')
const removeInlineBgColor = require('./remove-inline-bgcolor')
exports.process = async (html, config) => {
+ html = await safeClassNames(html, config)
html = await transformContents(html, config)
html = await markdown(html, config)
html = await preventWidows(html, config)
html = await inline(html, config)
- html = await safeClassNames(html, config)
html = await removeUnusedCSS(html, config)
html = await removeInlineSizes(html, config)
html = await removeInlineBgColor(html, config)
| 13 |
diff --git a/apps/circlesclock/app.js b/apps/circlesclock/app.js @@ -102,7 +102,8 @@ function drawHeartRate() {
g.fillCircle(w2, h3, radiusOuter);
if (hrtValue != undefined && hrtValue > 0) {
- const percent = hrtValue / settings.maxHR;
+ const minHR = 40;
+ const percent = (hrtValue - minHR) / (settings.maxHR - minHR);
drawGauge(w2, h3, percent, colorRed);
}
@@ -166,6 +167,7 @@ function drawGauge(cx, cy, percent, color) {
var i = 0;
var r = radiusInner + 3;
+ if (percent <= 0) return;
if (percent > 1) percent = 1;
var startrot = -offset;
| 7 |
diff --git a/src/plots/polar/polar.js b/src/plots/polar/polar.js @@ -452,6 +452,7 @@ proto.updateAngularAxis = function(fullLayout, polarLayout) {
proto.updateFx = function(fullLayout, polarLayout) {
if(!this.gd._context.staticPlot) {
this.updateMainDrag(fullLayout, polarLayout);
+ this.updateRadialDrag(fullLayout, polarLayout);
}
};
@@ -630,6 +631,58 @@ proto.updateMainDrag = function(fullLayout) {
dragElement.init(dragOpts);
};
+proto.updateRadialDrag = function(fullLayout, polarLayout) {
+ var _this = this;
+ var gd = _this.gd;
+ var layers = _this.layers;
+ var radius = _this.radius;
+ var cx = _this.cx;
+ var cy = _this.cy;
+ var angle0 = deg2rad(polarLayout.radialaxis.position);
+ var bl = 50;
+ var bl2 = bl / 2;
+ var radialDrag = dragBox.makeDragger(layers, 'radialdrag', 'move', -bl2, -bl2, bl, bl);
+ var radialDrag3 = d3.select(radialDrag);
+ var dragOpts = {element: radialDrag, gd: gd};
+
+ radialDrag3.attr('transform', strTranslate(
+ cx + (radius + bl2) * Math.cos(angle0),
+ cy - (radius + bl2) * Math.sin(angle0)
+ ));
+
+ var x0, y0, angle1;
+
+ function rotatePrep(evt, startX, startY) {
+ x0 = startX;
+ y0 = startY;
+ }
+
+ function rotateMove(dx, dy) {
+ var x1 = x0 + dx;
+ var y1 = y0 + dy;
+ var ax = x1 - cx - bl;
+ var ay = cy - y1 + bl;
+
+ angle1 = rad2deg(Math.atan2(ay, ax));
+
+ var transform = strTranslate(cx, cy) + strRotate(-angle1);
+ layers.radialaxis.attr('transform', transform);
+ layers.radialline.attr('transform', transform);
+ }
+
+ function rotateDone() {
+ Plotly.relayout(gd, _this.id + '.radialaxis.position', angle1);
+ }
+
+ dragOpts.prepFn = function(evt, startX, startY) {
+ rotatePrep(evt, startX, startY);
+ dragOpts.moveFn = rotateMove;
+ dragOpts.doneFn = rotateDone;
+ };
+
+ dragElement.init(dragOpts);
+};
+
proto.isPtWithinSector = function() {
var sector = this.sector;
| 0 |
diff --git a/test/specs/helpers.color.tests.js b/test/specs/helpers.color.tests.js @@ -11,6 +11,14 @@ describe('Color helper', function() {
});
describe('Background hover color helper', function() {
+ it('should return a modified version of color when called with a color', function() {
+ var originalColorRGB = 'rgb(70, 191, 189)';
+
+ expect(getHoverColor('#46BFBD')).not.toEqual(originalColorRGB);
+ });
+});
+
+describe('color and getHoverColor helpers', function() {
it('should return a CanvasPattern when called with a CanvasPattern', function(done) {
var dots = new Image();
dots.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAAD1BMVEUAAAD///////////////+PQt5oAAAABXRSTlMAHlFhZsfk/BEAAAAqSURBVHgBY2BgZGJmYmSAAUYWEIDzmcBcJhiXGcxlRpPFrhdmMiqgvX0AcGIBEUAo6UAAAAAASUVORK5CYII=';
@@ -20,10 +28,10 @@ describe('Background hover color helper', function() {
var patternContext = patternCanvas.getContext('2d');
var pattern = patternContext.createPattern(dots, 'repeat');
patternContext.fillStyle = pattern;
+ var chartPattern = chartContext.createPattern(patternCanvas, 'repeat');
- var backgroundColor = getHoverColor(chartContext.createPattern(patternCanvas, 'repeat'));
-
- expect(backgroundColor instanceof CanvasPattern).toBe(true);
+ expect(color(chartPattern) instanceof CanvasPattern).toBe(true);
+ expect(getHoverColor(chartPattern) instanceof CanvasPattern).toBe(true);
done();
};
@@ -33,12 +41,7 @@ describe('Background hover color helper', function() {
var context = document.createElement('canvas').getContext('2d');
var gradient = context.createLinearGradient(0, 1, 2, 3);
+ expect(color(gradient) instanceof CanvasGradient).toBe(true);
expect(getHoverColor(gradient) instanceof CanvasGradient).toBe(true);
});
-
- it('should return a modified version of color when called with a color', function() {
- var originalColorRGB = 'rgb(70, 191, 189)';
-
- expect(getHoverColor('#46BFBD')).not.toEqual(originalColorRGB);
- });
});
| 7 |
diff --git a/README.md b/README.md * [iOS](#ios)
* [Android](#android)
* [Contributing](#contributing)
+ * [Architecture Decision Records](#architecture-decision-records)
* [Links](#links)
<!-- tocstop -->
@@ -61,6 +62,17 @@ Merging a Pull Request to the master branch will trigger a build number increase
Submit your Pull Request from a repo fork and one of the core dev team will review and merge it.
+### Architecture Decision Records
+
+We will keep a collection of records for "architecturally significant" decisions: those that affect the structure, non-functional characteristics, dependencies, interfaces, or construction techniques.
+
+When making such changes please include a new ADR in your PR for future prosperity.
+
+* Install `adr-tools`: https://github.com/npryce/adr-tools
+* To create a new record: `adr new Implement as Unix shell scripts`
+
+To find out more about ADRs have a read of this article: http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions
+
## Links
* [CI Pipeline](https://circleci.com/gh/redbadger/workflows/pride-london-app): View and debug builds
| 0 |
diff --git a/token-metadata/0x70eFDc485a10210B056eF8e0A32993Bc6529995E/metadata.json b/token-metadata/0x70eFDc485a10210B056eF8e0A32993Bc6529995E/metadata.json "symbol": "BLZN",
"address": "0x70eFDc485a10210B056eF8e0A32993Bc6529995E",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/core/diagnosis_manager.js b/core/diagnosis_manager.js @@ -43,6 +43,8 @@ Blockly.DiagnosisManager.OFFSET_X = 20;
Blockly.DiagnosisManager.OFFSET_Y = 20;
+Blockly.DiagnosisManager.WIDTH = 300;
+
/**
* Create the div to show error message.
*/
@@ -52,6 +54,7 @@ Blockly.DiagnosisManager.prototype.createDom_ = function() {
}
this.dialog_ =
goog.dom.createDom(goog.dom.TagName.DIV, 'blocklyDiagnosisDialog');
+ this.dialog_.style.width = Blockly.DiagnosisManager.WIDTH + 'px';
document.body.appendChild(this.dialog_);
};
| 1 |
diff --git a/packages/collapsible/test/lion-collapsible.test.js b/packages/collapsible/test/lion-collapsible.test.js @@ -101,15 +101,6 @@ describe('<lion-collapsible>', () => {
expect(isCollapsibleOpen).to.equal(false);
});
- it('opens a invoker on click even if moved once', async () => {
- const collapsible = await fixture(defaultCollapsible);
- collapsible.remove();
- const invoker = collapsible.querySelector('[slot=invoker]');
- invoker?.dispatchEvent(new Event('click'));
- expect(collapsible.opened).to.equal(true);
- });
- });
-
describe('Accessibility', () => {
it('[collapsed] is a11y AXE accessible', async () => {
const collapsible = await fixture(defaultCollapsible);
| 2 |
diff --git a/explore/explore.go b/explore/explore.go @@ -83,7 +83,6 @@ func NewLambdaRequest(lambdaName string, eventData interface{}, testingURL strin
context := map[string]interface{}{
"AWSRequestID": "12341234-1234-1234-1234-123412341234",
- "InvokeID": fmt.Sprintf("%d-12341234-1234-1234-1234-123412341234", nowTime.Unix()),
"LogGroupName": "/aws/lambda/SpartaApplicationMockLogGroup-9ZX7FITHEAG8",
"LogStreamName": fmt.Sprintf("%d/%d/%d/[$LATEST]%d", nowTime.Year(), nowTime.Month(), nowTime.Day(), nowTime.Unix()),
"FunctionName": "SpartaFunction",
| 2 |
diff --git a/pages/Mixins.md b/pages/Mixins.md @@ -106,7 +106,7 @@ class SmartObject {
interface SmartObject extends Disposable, Activatable {}
```
-The first thing you may notice in the above is that instead of trying to extend `Disposable` and `Activatable` in `SmartObject` class, we extend them in `SmartObject` interface. `SmartObject` interface will be mixed into the `SmartObject` class due to [declaration merging](./Declaration Merging.md).
+The first thing you may notice in the above is that instead of trying to extend `Disposable` and `Activatable` in `SmartObject` class, we extend them in `SmartObject` interface. `SmartObject` interface will be mixed into the `SmartObject` class due to the [declaration merging](./Declaration%20Merging.md).
This treats the classes as interfaces, and only mixes the types behind Disposable and Activatable into the SmartObject type rather than the implementation. This means that we'll have to provide the implementation in class.
Except, that's exactly what we want to avoid by using mixins.
| 1 |
diff --git a/html/components/card.stories.js b/html/components/card.stories.js @@ -154,7 +154,7 @@ export const teaser = () =>
</p>
<div class="sprk-o-Stack__item">
- <a href="#nogo" class="sprk-c-Button">
+ <a href="#nogo" class="sprk-c-Button sprk-c-Button--secondary">
Learn More
</a>
</div>
@@ -205,7 +205,7 @@ export const teaserWithDifferentElementOrder = () =>
</p>
<div class="sprk-o-Stack__item">
- <a href="#nogo" class="sprk-c-Button">
+ <a href="#nogo" class="sprk-c-Button sprk-c-Button--secondary">
Learn More
</a>
</div>
@@ -577,7 +577,7 @@ export const fourUpCards = () =>
</p>
<div class="sprk-o-Stack__item">
- <a href="#nogo" class="sprk-c-Button">
+ <a href="#nogo" class="sprk-c-Button sprk-c-Button--secondary">
Button
</a>
</div>
@@ -610,7 +610,7 @@ export const fourUpCards = () =>
</p>
<div class="sprk-o-Stack__item">
- <a href="#nogo" class="sprk-c-Button">
+ <a href="#nogo" class="sprk-c-Button sprk-c-Button--secondary">
Button
</a>
</div>
@@ -644,7 +644,7 @@ export const fourUpCards = () =>
</p>
<div class="sprk-o-Stack__item">
- <a href="#nogo" class="sprk-c-Button">
+ <a href="#nogo" class="sprk-c-Button sprk-c-Button--secondary">
Button
</a>
</div>
@@ -678,7 +678,7 @@ export const fourUpCards = () =>
</p>
<div class="sprk-o-Stack__item">
- <a href="#nogo" class="sprk-c-Button">
+ <a href="#nogo" class="sprk-c-Button sprk-c-Button--secondary">
Button
</a>
</div>
| 3 |
diff --git a/src/ui/InfoWindow.js b/src/ui/InfoWindow.js @@ -152,11 +152,21 @@ class InfoWindow extends UIComponent {
if (this.options['title']) {
content += '<h2>' + this.options['title'] + '</h2>';
}
- const onClose = '"this.parentNode.style.display=\'none\';return false;"';
- content += '<a href="javascript:void(0);" onclick=' + onClose +
- ' ontouchend=' + onClose +
- ' class="maptalks-close"></a><div class="maptalks-msgContent">' + this.options['content'] + '</div>';
+ content += '<a href="javascript:void(0);" class="maptalks-close"></a><div class="maptalks-msgContent"></div>';
dom.innerHTML = content;
+ const closeBtn = dom.querySelector('.maptalks-close');
+ closeBtn.addEventListener('click', ()=>{
+ super.hide();
+ })
+ closeBtn.addEventListener('touchend', ()=>{
+ super.hide();
+ })
+ const msgContent = dom.querySelector('.maptalks-msgContent');
+ if (isString(this.options['content'])) {
+ msgContent.innerHTML = this.options['content'];
+ } else {
+ msgContent.appendChild(this.options['content']);
+ }
return dom;
}
| 3 |
diff --git a/src/kit/ui/ToolGroup.js b/src/kit/ui/ToolGroup.js @@ -141,6 +141,7 @@ export default class ToolGroup extends Component {
case 'switcher': {
return this._deriveGroupState(item, commandStates)
}
+ case 'custom':
case 'separator':
case 'spacer': {
return { item }
| 11 |
diff --git a/src/pages/eth2/staking-address.js b/src/pages/eth2/staking-address.js @@ -74,14 +74,11 @@ const StyledButton = styled(ButtonLink)`
margin-bottom: 3rem;
`
-const DumbTag = styled.div`
+const CardTag = styled.div`
display: flex;
align-items: center;
justify-content: center;
- padding: 8px 8px;
- width: 100%;
- margin-bottom: 0.5rem;
- margin-right: 0.5rem;
+ padding: 0.5rem;
background: ${(props) => props.theme.colors.primary};
border-bottom: 1px solid ${(props) => props.theme.colors.border};
color: ${(props) => props.theme.colors.buttonColor};
@@ -95,7 +92,6 @@ const AddressCard = styled.div`
border: 1px solid ${(props) => props.theme.colors.border};
border-radius: 4px;
box-shadow: ${(props) => props.theme.colors.tableBoxShadow};
- padding-bottom: 2rem;
margin-bottom: 2rem;
max-width: 560px;
@@ -129,14 +125,12 @@ const CopyButton = styled(ButtonSecondary)`
const CardContainer = styled.div`
margin: 2rem;
- margin-bottom: 0rem;
`
const Row = styled.div`
display: flex;
justify-content: space-between;
align-items: flex-start;
- margin-top: 2rem;
margin-bottom: 2rem;
@media (max-width: ${(props) => props.theme.breakpoints.m}) {
flex-direction: column;
@@ -154,13 +148,12 @@ const CardTitle = styled.h2`
margin-bottom: 1rem;
`
-const Caption = styled.p`
+const Caption = styled.div`
color: ${(props) => props.theme.colors.text200};
font-weight: 400;
font-size: 14px;
- margin-bottom: 2rem;
@media (max-width: ${(props) => props.theme.breakpoints.m}) {
- margin-bottom: 0rem;
+ margin-bottom: 2rem;
}
`
@@ -177,58 +170,15 @@ const Blockie = styled.img`
border-radius: 4px;
height: 4rem;
width: 4rem;
- @media (max-width: ${(props) => props.theme.breakpoints.m}) {
- display: none;
- }
`
const TextToSpeech = styled.div`
display: flex;
- margin: 0rem;
- @media (max-width: ${(props) => props.theme.breakpoints.m}) {
- display: none;
- }
-`
-
-const MobileBlockie = styled.img`
- border-radius: 4px;
- height: 4rem;
- width: 4rem;
- @media (max-width: ${(props) => props.theme.breakpoints.m}) {
- margin-right: 1rem;
- }
-`
-
-const MobileTextToSpeech = styled.div`
- display: flex;
- margin: 0rem;
- @media (max-width: ${(props) => props.theme.breakpoints.m}) {
- margin: 2rem 0rem;
- flex-wrap: wrap;
- }
+ margin-bottom: 2rem;
`
const StyledFakeLink = styled(FakeLink)`
margin-right: 0.5rem;
- &:hover {
- cursor: ${(props) => (props.isActive ? `progress` : `cursor`)} !important;
- }
-`
-
-const BlockieRow = styled.div`
- display: none;
- @media (max-width: ${(props) => props.theme.breakpoints.m}) {
- display: flex;
- align-items: center;
- margin-top: -0.5rem;
- }
- @media (max-width: ${(props) => props.theme.breakpoints.s}) {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- margin-top: 0.5rem;
- margin-bottom: -1rem;
- }
`
// TODO update
@@ -285,13 +235,25 @@ const StakingAddressPage = ({ data, location }) => {
return () => {
speech.removeEventListener("start", onStartCallback)
speech.removeEventListener("end", onEndCallback)
+ window.speechSynthesis.cancel()
}
}, [])
const handleTextToSpeech = () => {
+ if (!window.speechSynthesis) {
+ console.error(
+ "Browser doesn't support the 'SpeechSynthesis' text-to-speech API"
+ )
+ return
+ }
+ if (state.isSpeechActive) {
+ window.speechSynthesis.cancel()
+ } else {
window.speechSynthesis.speak(state.textToSpeechRequest)
}
+ }
+ // TODO update URLs
const addressSources = [
{
title: "ConsenSys",
@@ -316,7 +278,7 @@ const StakingAddressPage = ({ data, location }) => {
state.userWillCheckOtherSources
const textToSpeechText = state.isSpeechActive
- ? "Reading address aloud"
+ ? "Stop reading"
: "Read address aloud"
const textToSpeechEmoji = state.isSpeechActive
? ":speaker_high_volume:"
@@ -352,7 +314,7 @@ const StakingAddressPage = ({ data, location }) => {
</LeftColumn>
<RightColumn>
<AddressCard>
- <DumbTag>Check staking address</DumbTag>
+ <CardTag>Check staking address</CardTag>
<CardContainer>
{!state.showAddress && (
<>
@@ -414,34 +376,17 @@ const StakingAddressPage = ({ data, location }) => {
<Caption>
We've added spaces to make the address easier to read
</Caption>
- {state.browserHasTextToSpeechSupport && (
- <TextToSpeech>
- <StyledFakeLink
- isActive={state.isSpeechActive}
- onClick={handleTextToSpeech}
- >
- {textToSpeechText}
- </StyledFakeLink>{" "}
- <Twemoji svg text={textToSpeechEmoji} />
- </TextToSpeech>
- )}
</TitleText>
<Blockie src={blockieSrc} />
</Row>
- <BlockieRow>
- <MobileBlockie src={blockieSrc} />
{state.browserHasTextToSpeechSupport && (
- <MobileTextToSpeech>
- <StyledFakeLink
- isActive={state.isSpeechActive}
- onClick={handleTextToSpeech}
- >
+ <TextToSpeech>
+ <StyledFakeLink onClick={handleTextToSpeech}>
{textToSpeechText}
</StyledFakeLink>{" "}
<Twemoji svg text={textToSpeechEmoji} />
- </MobileTextToSpeech>
+ </TextToSpeech>
)}
- </BlockieRow>
<Tooltip content="Check each character carefully.">
<Address>{CHUNKED_ADDRESS}</Address>
</Tooltip>
| 11 |
diff --git a/src/Header.jsx b/src/Header.jsx @@ -262,6 +262,7 @@ export default function Header({
const [roomName, setRoomName] = useState(_getCurrentRoom());
const [micOn, setMicOn] = useState(false);
const [xrSupported, setXrSupported] = useState(false);
+ const [claims, setClaims] = useState([]);
const userOpen = open === 'user';
const scenesOpen = open === 'scenes';
@@ -351,6 +352,18 @@ export default function Header({
universe.handleUrlUpdate();
_loadUrlState();
}, []);
+ useEffect(() => {
+ world.appManager.addEventListener('pickup', e => {
+ const {app} = e.data;
+ const {contentId} = app;
+ const newClaims = claims.slice();
+ newClaims.push({
+ contentId,
+ });
+ setClaims(newClaims);
+ });
+ }, []);
+
const lastEmoteKey = {
key: -1,
timestamp: 0,
| 0 |
diff --git a/source/background/messaging.js b/source/background/messaging.js @@ -3,8 +3,6 @@ import dropbox from "./dropboxToken";
import DropboxAuthenticator from "./DropboxAuthenticator";
import { hideContextMenu, showContextMenu } from "./context";
-const StorageInterface = window.Buttercup.Web.StorageInterface;
-
const RESPOND_ASYNC = true;
const RESPOND_SYNC = false;
| 2 |
diff --git a/js/bam/bamUtils.js b/js/bam/bamUtils.js @@ -447,11 +447,11 @@ var igv = (function (igv) {
var tmp = [];
var isize = alignment.fragmentLength;
var estReadLen = alignment.end - alignment.start;
- if (isize == 0) {
+ if (isize === 0) {
//isize not recorded. Need to estimate. This calculation was validated against an Illumina
// -> <- library bam.
- var estMateEnd = alignment.start < mate.start ?
- mate.start + estReadLen : mate.start - estReadLen;
+ var estMateEnd = alignment.start < mate.position ?
+ mate.position + estReadLen : mate.position - estReadLen;
isize = estMateEnd - alignment.start;
}
| 1 |
diff --git a/src/lib/utils/handleBackButton.js b/src/lib/utils/handleBackButton.js @@ -27,12 +27,6 @@ class BackButtonHandler {
}
handler = action => {
- const now = Date.now()
-
- if (now - this.lastPress <= 300) {
- return BackHandler.exitApp()
- }
- this.lastPress = Date.now()
this.defaultAction()
return true
| 13 |
diff --git a/tools/make/lib/ls/markdown.mk b/tools/make/lib/ls/markdown.mk @@ -19,6 +19,7 @@ FIND_MARKDOWN_FLAGS ?= \
-regex "$(MARKDOWN_FILTER)" \
-not -path "$(NODE_MODULES)/*" \
-not -path "$(BUILD_DIR)/*" \
+ -not -path "$(DEPS_DIR)/**/$(TMP_FOLDER)/*" \
-not -path "$(REPORTS_DIR)/*" \
-not -path "$(ROOT_DIR)/**/$(BUILD_FOLDER)/*"
| 8 |
diff --git a/plugins/spamassassin.js b/plugins/spamassassin.js @@ -54,7 +54,7 @@ exports.hook_data_post = function (next, connection) {
const start = Date.now();
socket.on('line', function (line) {
- connection.logprotocol(plugin, "Spamd C: " + line + ' state=' + state);
+ connection.logprotocol(plugin, `Spamd C: ${line} state=${state}`);
line = line.replace(/\r?\n/, '');
if (state === 'line0') {
spamd_response.line0 = line;
@@ -85,7 +85,7 @@ exports.hook_data_post = function (next, connection) {
}
let fold;
if (last_header && (fold = line.match(/^(\s+.*)/))) {
- spamd_response.headers[last_header] += "\r\n" + fold[1];
+ spamd_response.headers[last_header] += `\r\n${fold[1]}`;
return;
}
last_header = '';
@@ -145,7 +145,7 @@ exports.fixup_old_headers = function (transaction) {
case "drop":
for (key in headers) {
if (!key) continue;
- transaction.remove_header('X-Spam-' + key);
+ transaction.remove_header(`X-Spam-${key}`);
}
break;
// case 'rename':
@@ -156,7 +156,7 @@ exports.fixup_old_headers = function (transaction) {
const old_val = transaction.header.get(key);
transaction.remove_header(key);
if (old_val) {
- // plugin.logdebug(plugin, "header: " + key + ', ' + old_val);
+ // plugin.logdebug(plugin, `header: ${key}, ${old_val}`);
transaction.add_header(key.replace(/^X-/, 'X-Old-'), old_val);
}
}
@@ -175,7 +175,7 @@ exports.munge_subject = function (connection, score) {
if (subject_re.test(subj)) return; // prevent double munge
connection.transaction.remove_header('Subject');
- connection.transaction.add_header('Subject', plugin.cfg.main.subject_prefix + " " + subj);
+ connection.transaction.add_header('Subject', `${plugin.cfg.main.subject_prefix} ${subj}`);
};
exports.do_header_updates = function (connection, spamd_response) {
@@ -200,7 +200,7 @@ exports.do_header_updates = function (connection, spamd_response) {
continue;
}
if (val === '') continue;
- connection.transaction.add_header('X-Spam-' + key, val);
+ connection.transaction.add_header(`X-Spam-${key}`, val);
}
};
@@ -249,10 +249,10 @@ exports.get_spamd_headers = function (connection, username) {
// http://svn.apache.org/repos/asf/spamassassin/trunk/spamd/PROTOCOL
const headers = [
'HEADERS SPAMC/1.3',
- 'User: ' + username,
+ `User: ${username}`,
'',
- 'X-Envelope-From: ' + connection.transaction.mail_from.address(),
- 'X-Haraka-UUID: ' + connection.transaction.uuid,
+ `X-Envelope-From: ${connection.transaction.mail_from.address()}`,
+ `X-Haraka-UUID: ${connection.transaction.uuid}`,
];
if (connection.relaying) {
headers.push('X-Haraka-Relay: true');
@@ -276,12 +276,12 @@ exports.get_spamd_socket = function (next, connection, headers) {
this.is_connected = true;
// Reset timeout
this.setTimeout(results_timeout * 1000);
- socket.write(headers.join("\r\n") + "\r\n");
+ socket.write(`${headers.join("\r\n")}\r\n`);
connection.transaction.message_stream.pipe(socket);
});
socket.on('error', function (err) {
- connection.logerror(plugin, 'connection failed: ' + err);
+ connection.logerror(plugin, `connection failed: ${err}`);
// TODO: optionally DENYSOFT
// TODO: add a transaction note
return next();
@@ -320,18 +320,17 @@ exports.msg_too_big = function (connection) {
const max = plugin.cfg.main.max_size;
if (size <= max) { return false; }
- connection.loginfo(plugin, 'skipping, size ' + utils.prettySize(size) +
- ' exceeds max: ' + utils.prettySize(max));
+ connection.loginfo(plugin, `skipping, size ${utils.prettySize(size)} exceeds max: ${utils.prettySize(max)}`);
return true;
};
exports.log_results = function (connection, spamd_response) {
const plugin = this;
const cfg = plugin.cfg.main;
- connection.loginfo(plugin, "status=" + spamd_response.flag +
- ', score=' + spamd_response.score +
- ', required=' + spamd_response.reqd +
- ', reject=' + ((connection.relaying) ?
- (cfg.relay_reject_threshold || cfg.reject_threshold) : cfg.reject_threshold) +
- ', tests="' + spamd_response.tests + '"');
+ connection.loginfo(plugin, `status=${spamd_response.flag}` +
+ `, score=${spamd_response.score}` +
+ `, required=${spamd_response.reqd}` +
+ `, reject=${((connection.relaying) ? (cfg.relay_reject_threshold || cfg.reject_threshold) : cfg.reject_threshold)}` +
+ `, tests="${spamd_response.tests}"`);
};
+
| 14 |
diff --git a/.vuepress/config.js b/.vuepress/config.js @@ -72,7 +72,7 @@ module.exports = {
text: 'More Meilisearch',
items: [
{ text: 'GitHub', link: 'https://github.com/meilisearch/meilisearch' },
- { text: 'Slack', link: 'https://slack.meilisearch.com' },
+ { text: 'Discord', link: 'https://discord.gg/meilisearch' },
{ text: 'Blog', link: 'https://blog.meilisearch.com/' },
{ text: 'meilisearch.com', link: 'https://meilisearch.com' },
],
| 14 |
diff --git a/server/views/sources/collection.py b/server/views/sources/collection.py @@ -61,7 +61,10 @@ def upload_file():
k, v in line.items() if k not in ['', None] }
newline_decoded = {k: v.decode('utf-8', errors='replace').encode('ascii', errors='ignore') for
k, v in newline.items() if v not in ['', None] }
+ empties = {k: v for k, v in newline.items() if v in ['', None] }
+
if updatedSrc:
+ newline_decoded.update(empties)
updated_only.append(newline_decoded)
else:
new_sources.append(newline_decoded)
| 11 |
diff --git a/packages/sling-framework/src/v1/src/business/withRequestParams.js b/packages/sling-framework/src/v1/src/business/withRequestParams.js @@ -2,7 +2,7 @@ import { isFunction, toFlatEntries, toFlatObject } from 'sling-helpers';
const isValidEntry = ([, value]) => value != null && value !== '';
-const PARAMS_QUEUE = Symbol('PARAMS_QUEUE');
+const CHANGES_QUEUE = Symbol('CHANGES_QUEUE');
export const withRequestParams = (Base = class {}) =>
class extends Base {
@@ -24,7 +24,7 @@ export const withRequestParams = (Base = class {}) =>
constructor() {
super();
this.requestParams = {};
- this[PARAMS_QUEUE] = [];
+ this[CHANGES_QUEUE] = [];
this.constructor.requestAttrNames
.forEach((attrName) => {
@@ -53,12 +53,12 @@ export const withRequestParams = (Base = class {}) =>
if (shouldUpdate) {
const changedParamName = requestParamNames[requestAttrIndex];
const changedParam = { [changedParamName]: newValue || null };
- this[PARAMS_QUEUE].push(changedParam);
- const queueSize = this[PARAMS_QUEUE].length;
+ this[CHANGES_QUEUE].push(changedParam);
+ const queueSize = this[CHANGES_QUEUE].length;
Promise.resolve().then(() => {
- if (this[PARAMS_QUEUE].length === queueSize) {
- const allChanges = this[PARAMS_QUEUE].reduce(toFlatObject, {});
+ if (this[CHANGES_QUEUE].length === queueSize) {
+ const allChanges = this[CHANGES_QUEUE].reduce(toFlatObject, {});
this.requestParams = Object
.entries({
@@ -72,7 +72,7 @@ export const withRequestParams = (Base = class {}) =>
this.requestParamsChangedCallback(this.requestParams, allChanges);
}
- this[PARAMS_QUEUE] = [];
+ this[CHANGES_QUEUE] = [];
}
});
}
| 10 |
diff --git a/test/jasmine/tests/config_test.js b/test/jasmine/tests/config_test.js @@ -615,7 +615,7 @@ describe('config argument', function() {
.then(done);
});
- it('should still be responsive if the plot is edited', function(done) {
+ it('@flaky should still be responsive if the plot is edited', function(done) {
fillParent(1, 1);
Plotly.plot(gd, data, {}, {responsive: true})
.then(function() {return Plotly.restyle(gd, 'y[0]', data[0].y[0] + 2);})
| 0 |
diff --git a/spec/requests/admin/pages_controller_spec.rb b/spec/requests/admin/pages_controller_spec.rb @@ -59,10 +59,6 @@ describe Admin::PagesController do
get "/u/#{@org_user_name}", {}, JSON_HEADER
- uri = URI.parse(last_request.url)
- uri.host.should == "#{@org_name}.localhost.lan"
- uri.path.should == "/u/#{@org_user_name}"
-
last_response.status.should == 302
follow_redirect!
| 2 |
diff --git a/webpack.config.js b/webpack.config.js @@ -257,6 +257,9 @@ module.exports = {
].filter(Boolean),
},
resolve: {
+ alias: {
+ 'material-ui': path.join(__dirname, 'node_modules/material-ui/es/'),
+ },
mainFields: [
'browser',
'module',
| 4 |
diff --git a/src/ui/Preferences.hx b/src/ui/Preferences.hx @@ -257,9 +257,11 @@ class Preferences {
console.error("Error loading preferences: ", e);
}
// migrations:
+ if (pref != null) {
if (pref.compMatchMode == null && pref.compExactMatch != null) {
pref.compMatchMode = pref.compExactMatch ? PrefMatchMode.StartsWith : PrefMatchMode.AceSmart;
}
+ }
// default settings:
var def:PrefData = {
theme: "dark",
| 1 |
diff --git a/docs/getting-started.md b/docs/getting-started.md @@ -365,7 +365,7 @@ The React Native tools require some environment variables to be set up in order
<block class="native mac linux android" />
-Add the following lines to your `$HOME/.bash_profile` config file:
+Add the following lines to your `$HOME/.bash_profile` or `$HOME/.bashrc` config file:
<block class="native mac android" />
| 14 |
diff --git a/src/sensors/DataSearch.js b/src/sensors/DataSearch.js @@ -184,26 +184,9 @@ class DataSearch extends Component {
return null;
}
- render() {
- let styles = {};
+ renderDataSearch = () => {
if (this.state.showOverlay) {
- styles = {
- height: "100%",
- position: "absolute",
- top: 0,
- right: 0,
- bottom: 0,
- left: 0,
- backgroundColor: "white",
- zIndex: 10
- }
- }
-
- return (
- <View style={{width: "100%", ...styles}}>
- {
- this.state.showOverlay
- ? (<View>
+ return (<View>
<View style={{flexDirection: "row", justifyContent: "space-between"}}>
<TouchableHighlight onPress={this.toggleOverlay}><Text>Back</Text></TouchableHighlight>
{
@@ -217,14 +200,17 @@ class DataSearch extends Component {
onChangeText={this.setValue}
value={this.state.currentValue}
onFocus={this.setSuggestions}
+ autoFocus
style={{
borderWidth: 1,
width: "100%"
}}
/>
{this.renderSuggestions()}
- </View>)
- : (<TextInput
+ </View>);
+ }
+
+ return (<TextInput
onFocus={this.toggleOverlay}
placeholder={this.props.placeholder}
value={this.state.currentValue}
@@ -232,7 +218,38 @@ class DataSearch extends Component {
borderWidth: 1,
width: "100%"
}}
- />)
+ />);
+ }
+
+ render() {
+ let styles = {};
+ if (this.state.showOverlay) {
+ styles = {
+ height: "100%",
+ position: "absolute",
+ top: 0,
+ right: 0,
+ bottom: 0,
+ left: 0,
+ backgroundColor: "white",
+ zIndex: 10
+ }
+ }
+
+ return (
+ <View style={{width: "100%", ...styles}}>
+ {
+ this.props.autoSuggest
+ ? this.renderDataSearch()
+ : <TextInput
+ placeholder={this.props.placeholder}
+ onChangeText={this.setValue}
+ value={this.state.currentValue}
+ style={{
+ borderWidth: 1,
+ width: "100%"
+ }}
+ />
}
</View>
);
| 3 |
diff --git a/source/git-api.js b/source/git-api.js @@ -403,11 +403,30 @@ exports.registerApi = (env) => {
.finally(emitGitDirectoryChanged.bind(null, req.query.path));
});
+ const createBranchIfPossible = (branchName, path, retry) => {
+ retry = retry || 3;
+ return gitPromise(['branch', branchName], path).catch((e) => {
+ if (retry > -1) {
+ return createBranchIfPossible(`ungit-${crypto.randomBytes(4).toString('hex')}`, path, retry - 1);
+ } else {
+ throw e;
+ }
+ }).then(() => branchName);
+ }
+
app.post(`${exports.pathPrefix}/checkout`, ensureAuthenticated, ensurePathExists, (req, res) => {
const arg = !!req.body.sha1 ? ['checkout', '-b', req.body.name.trim(), req.body.sha1] : ['checkout', req.body.name.trim()];
-
- jsonResultOrFailProm(res, autoStashExecuteAndPop(arg, req.body.path))
- .then(emitGitDirectoryChanged.bind(null, req.body.path))
+ const isRemote = !!req.body.name && req.body.name.indexOf('remote/') === 0;
+
+ jsonResultOrFailProm(res, autoStashExecuteAndPop(arg, req.body.path).then(() => {
+ if (isRemote) {
+ // preferred branch name will not work as expected when remote or branch nae has '/'
+ const preferredBranchName = `${req.body.name.splice('/').slice(2).join('/')}`
+ return createBranchIfPossible(preferredBranchName, req.body.path)
+ // sucessfully create the branch, checkout and be marry
+ .then((createdName) => return gitPromise(['checkout', createdName], req.body.path));
+ }
+ })).then(emitGitDirectoryChanged.bind(null, req.body.path))
.then(emitWorkingTreeChanged.bind(null, req.body.path));
});
| 9 |
diff --git a/ui/app/containers/SayingsPage/index.js b/ui/app/containers/SayingsPage/index.js * SayingsPage
*
*/
-import { Grid } from '@material-ui/core';
+import { Grid, CircularProgress } from '@material-ui/core';
import _ from 'lodash';
import PropTypes from 'prop-types';
import qs from 'query-string';
@@ -34,6 +34,7 @@ import {
tagKeyword,
trainAgent,
untagKeyword,
+ loadAgent,
} from '../App/actions';
import {
makeSelectActions,
@@ -62,40 +63,43 @@ export class SayingsPage extends React.Component {
this.onSearchCategory = this.onSearchCategory.bind(this);
this.addSaying = this.addSaying.bind(this);
this.deleteSaying = this.deleteSaying.bind(this);
+ this.initForm = this.initForm.bind(this);
}
state = {
filter: '',
categoryFilter: '',
currentPage: 1,
- pageSize: this.props.agent.settings.sayingsPageSize,
+ pageSize: this.props.agent.id ? this.props.agent.settings.sayingsPageSize : 5,
numberOfPages: null,
userSays: qs.parse(this.props.location.search, { ignoreQueryPrefix: true }).userSays,
};
- componentWillMount() {
-
- if (this.props.agent.id) {
- this.throttledOnLoadSayings = _.throttle((filter, currentPage = this.state.currentPage, pageSize = this.state.pageSize) => {
+ initForm() {
+ const agentSayingsPageSize = this.props.agent.settings.sayingsPageSize;
+ this.throttledOnLoadSayings = _.throttle((filter, currentPage = this.state.currentPage, pageSize = agentSayingsPageSize) => {
this.props.onLoadSayings(filter, currentPage, pageSize);
}, 2000, { 'trailing': true });
const locationSearchParams = qs.parse(this.props.location.search);
const filter = locationSearchParams.filter || this.state.filter;
const currentPage = locationSearchParams.page ? _.toNumber(locationSearchParams.page) : this.state.currentPage;
- this.setState({ filter, currentPage });
+ this.setState({ filter, currentPage, pageSize: agentSayingsPageSize });
this.props.onLoadKeywords();
this.props.onLoadActions();
this.props.onLoadCategories();
- this.props.onLoadSayings(filter, currentPage, this.state.pageSize);
+ this.props.onLoadSayings(filter, currentPage, agentSayingsPageSize);
+ }
+
+ componentWillMount() {
+ if (this.props.agent.id) {
+ this.initForm();
}
else {
- // TODO: An action when there isn't an agent
- console.log('YOU HAVEN\'T SELECTED AN AGENT');
+ this.props.onLoadAgent(this.props.match.params.id);
}
-
}
componentWillUnmount() {
@@ -103,6 +107,9 @@ export class SayingsPage extends React.Component {
}
componentDidUpdate(prevProps, prevState) {
+ if (!prevProps.agent.id && this.props.agent.id){
+ this.initForm();
+ }
if (this.props.totalSayings !== prevProps.totalSayings) {
this.setState({
numberOfPages: Math.ceil(this.props.totalSayings / this.state.pageSize),
@@ -164,6 +171,7 @@ export class SayingsPage extends React.Component {
render() {
return (
+ this.props.agent.id ?
<Grid container>
<MainTab
disableSave
@@ -216,7 +224,8 @@ export class SayingsPage extends React.Component {
keywordsForm={Link}
keywordsURL={`/agent/${this.props.agent.id}/keywords`}
/>
- </Grid>
+ </Grid> :
+ <CircularProgress style={{position: 'absolute', top: '40%', left: '49%'}}/>
);
}
}
@@ -264,6 +273,9 @@ const mapStateToProps = createStructuredSelector({
function mapDispatchToProps(dispatch) {
return {
+ onLoadAgent: (id) => {
+ dispatch(loadAgent(id));
+ },
onLoadSayings: (filter, page, pageSize) => {
dispatch(loadSayings(filter, page, pageSize));
},
| 11 |
diff --git a/src/web/containers/Workspace/index.styl b/src/web/containers/Workspace/index.styl .workspace-table {
display: table;
width: 100%;
+ height: calc(100vh - $navbar-height);
}
.workspace-table-row {
display: table-row;
| 12 |
diff --git a/scalene/scalene_profiler.py b/scalene/scalene_profiler.py @@ -478,14 +478,16 @@ class Scalene:
# First, see if we have now executed a different line of code.
# If so, increment.
# TODO: assess the necessity of the following block
- # if invalidated or not (
- # fname == Filename(f.f_code.co_filename)
- # and lineno == LineNumber(f.f_lineno)
- # ):
- # with Scalene.__invalidate_mutex:
- # Scalene.__invalidate_queue.append(
- # (Filename(f.f_code.co_filename), LineNumber(f.f_lineno))
- # )
+ invalidated = Scalene.__last_profiled_invalidated
+ (fname, lineno, lasti) = Scalene.__last_profiled
+ if invalidated or not (
+ fname == Filename(f.f_code.co_filename)
+ and lineno == LineNumber(f.f_lineno)
+ ):
+ with Scalene.__invalidate_mutex:
+ Scalene.__invalidate_queue.append(
+ (Filename(f.f_code.co_filename), LineNumber(f.f_lineno))
+ )
# Scalene.update_line()
Scalene.__last_profiled_invalidated = False
Scalene.__last_profiled = (
| 14 |
diff --git a/bin/openapi.js b/bin/openapi.js @@ -172,7 +172,7 @@ OpenApiEnforcer.prototype.deserialize = function(schema, value, options) {
const result = version.serial.deserialize(exception, schema, value);
// determine how to handle deserialization data
- return errorHandler(options.throw, exception, result);
+ return util.errorHandler(options.throw, exception, result);
};
/**
@@ -275,7 +275,7 @@ OpenApiEnforcer.prototype.populate = function (schema, params, value, options) {
populate.populate(v, exception, schema, root, 'root');
// determine how to handle deserialization data
- return errorHandler(options.throw, exception, root.root);
+ return util.errorHandler(options.throw, exception, root.root);
};
/**
@@ -283,44 +283,14 @@ OpenApiEnforcer.prototype.populate = function (schema, params, value, options) {
* @param {object} schema
* @param {object} [options]
* @param {boolean} [options.skipInvalid=false]
- * @returns {*}
+ * @param {boolean} [options.throw=true]
+ * @returns {{ exception: OpenAPIException|null, value: *}|*}
*/
OpenApiEnforcer.prototype.random = function(schema, options) {
- // TODO: implement options
- options = Object.assign({}, data.defaults.populate, staticDefaults.populate, options);
-
- const version = store.get(this).version;
- const result = traverse({
- schema: schema,
- version: version,
- handler: data => {
- const schema = data.schema;
- let index;
- let schemas;
-
- switch (data.modifier) {
- case 'anyOf':
- case 'oneOf':
- schemas = data.modifier === 'anyOf' ? schema.anyOf : schema.oneOf;
- index = Math.floor(Math.random() * schemas.length);
- data.schema = schemas[index];
- data.again();
- break;
-
- case 'allOf':
- data.message('Random value generator does not work for "allOf" directive');
- break;
-
- case 'not':
- data.message('Random value generator does not work for "not" directive');
- break;
-
- default:
- data.value = random.byType(schema);
- }
- }
- });
- return result.value;
+ const result = random.util.traverse(schema,
+ store.get(this).version, options,
+ Object.assign({}, staticDefaults.random, options));
+ return util.errorHandler(options.throw, result.exception, result.value);
};
/**
@@ -361,7 +331,7 @@ OpenApiEnforcer.prototype.request = function(req, options) {
if (!path) {
exception.push('Path not found');
exception.meta = { statusCode: 404 };
- return errorHandler(options.throw, exception);
+ return util.errorHandler(options.throw, exception);
}
// validate that the path supports the method
@@ -369,7 +339,7 @@ OpenApiEnforcer.prototype.request = function(req, options) {
if (!path.schema[method]) {
exception.push('Method not allowed');
exception.meta = { statusCode: 405 };
- return errorHandler(options.throw, exception);
+ return util.errorHandler(options.throw, exception);
}
// parse and validate request input
@@ -400,7 +370,7 @@ OpenApiEnforcer.prototype.request = function(req, options) {
if (value && value.hasOwnProperty('body')) result.body = value.body;
}
- return errorHandler(options.throw, exception, result);
+ return util.errorHandler(options.throw, exception, result);
};
/**
@@ -453,7 +423,7 @@ OpenApiEnforcer.prototype.serialize = function(schema, value, options) {
const result = version.serial.serialize(exception, schema, value);
// determine how to handle serialization data
- return errorHandler(options.throw, exception, result);
+ return util.errorHandler(options.throw, exception, result);
};
/**
@@ -501,23 +471,6 @@ OpenApiEnforcer.Exception = Exception;
-function errorHandler(useThrow, exception, value) {
- const hasErrors = Exception.hasException(exception);
- if (hasErrors && useThrow) {
- const err = Error(exception);
- err.code = 'OPEN_API_EXCEPTION';
- Object.assign(err, exception.meta);
- throw err;
- } else if (useThrow) {
- return value;
- } else {
- return {
- error: hasErrors ? exception : null,
- value: hasErrors ? null : value
- };
- }
-}
-
function responseData(context, produces, responses, config) {
const version = store.get(context).version;
if (!config) config = {};
| 4 |
diff --git a/README.md b/README.md @@ -4,9 +4,13 @@ yet another Apache Sling based Application Platform (asap)
## [Composum Nodes](https://www.composum.com/home/nodes.html)
- [](https://opensource.org/licenses/MIT) - [releases](https://github.com/ist-dresden/composum/releases)
+[](https://opensource.org/licenses/MIT) - [releases](https://github.com/ist-dresden/composum/releases)
-A simple Apache Sling based Resource/JCR development tool
+A Sling based Resource/JCR development tool, usable on both Sling and AEM.
+It contains various useful adminstration and development tools for the
+Sling framework, like a full featured JCR browser incl. component rendering and asset view, ACL manipulation, Groovy
+script execution, execution of queries, and user and package management. It also integrates some tools similar to
+the Felix console, for systems that disallow access to the console (like, for instance, AEMaaCS).
Usage: just open
@@ -14,10 +18,17 @@ Usage: just open
* /bin/packages.html for the Package Manager
* /bin/users.html for the User Manager
-on your Sling instance.
+on your Sling or AEM instance.
* [Composum Nodes Homepage](https://www.composum.com/home/nodes.html)
+### How to start it
+
+* [Nodes Installation and Upgrade](https://www.composum.com/home/nodes/install.html)
+* [Composum Launch](https://github.com/ist-dresden/composum-launch) containing various methods of starting it - from
+ JARs and Docker images
+* [Composum on Docker Hub](https://hub.docker.com/u/composum)
+
### see also
#### [Composum Pages](https://github.com/ist-dresden/composum-pages)
@@ -31,3 +42,5 @@ on your Sling instance.
#### [Composum Platform](https://github.com/ist-dresden/composum-platform)
* [Composum Platform Homepage](https://www.composum.com/home.html)
+
+#### [Composum Launch](https://github.com/ist-dresden/composum-launch)
| 7 |
diff --git a/packages/spark-core/settings/_settings.scss b/packages/spark-core/settings/_settings.scss @@ -436,7 +436,7 @@ $sprk-select-font-family: $sprk-text-input-font-family !default;
$sprk-select-font-weight: $sprk-text-input-font-weight !default;
$sprk-select-line-height: $sprk-text-input-line-height !default;
$sprk-select-outline: $sprk-text-input-outline !default;
-$sprk-select-padding: 12px 45px 12px 13px !default;
+$sprk-select-padding: 14px 45px 14px 13px !default;
$sprk-select-arrow-offset-y: -37px !default;
$sprk-select-arrow-offset-x: 8px !default;
$sprk-select-arrow-stroke-width: 6px !default;
| 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.