code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json "cartodb-deep-insights.js": {
"version": "0.0.2",
"from": "cartodb/deep-insights.js#12387-play-pause",
- "resolved": "git://github.com/cartodb/deep-insights.js.git#02fd963dbaef41f37bcf2103f4e328e37f47de00",
+ "resolved": "git://github.com/cartodb/deep-insights.js.git#7c94d388dcc1cdce4c67ea9f20d4cc872af011d3",
"dependencies": {
"node-polyglot": {
"version": "2.2.2",
| 3 |
diff --git a/articles/connections/index.md b/articles/connections/index.md @@ -61,7 +61,13 @@ description: Auth0 is an identity hub that supports the many authentication prov
# Identity Providers Supported by Auth0
-Auth0 is an identity hub that supports many authentication providers using various protocols: **OAuth2**, **WS-Federation**, and so on that Auth0 supports [Social](#social), [Enterprise](#enterprise), [Database](#database-and-custom-connections) and [Passwordless](#passwordless) connections.
+An Identity Provider is a server that can provide identity information to other servers. For example, Google is an Identity Provider. If you log in to a site using your Google account, then a Google server will send your identity information to that site.
+
+Auth0 is an identity hub that supports many identity providers using various protocols (like [OpenID Connect](/protocols/oidc), [SAML](/protocols/saml), [WS-Federation](/protocols/ws-fed), and more).
+
+Auth0 sits between your app and the Identity Provider that authenticates your users. This adds a level of abstraction so your app is isolated from any changes to and idiosyncrasies of each provider's implementation. In addition, Auth0's [normalized user profile](/user-profile) simplifies user management.
+
+The relationship between Auth0 and any of these authentication providers is referred to as a **connection**. Auth0 supports [Social](#social), [Enterprise](#enterprise), [Database](#database-and-custom-connections) and [Passwordless](#passwordless) connections.
## Social
@@ -92,6 +98,7 @@ You can create any number of custom fields and store this information as part of
For more details refer to the [Database Connections](/connections/database) documentation.
## Passwordless
+
Full documentation on Passwordless authentication can be found at the links below:
<ul>
@@ -108,15 +115,3 @@ Full documentation on Passwordless authentication can be found at the links belo
<% } %>
<% }); %>
</ul>
-
-## Additional Information
-
-Auth0 sits between your app and the identity provider that authenticates your users. Through this level of abstraction, Auth0 keeps your app isolated from any changes to and idiosyncrasies of each provider's implementation. In addition, Auth0's [normalized user profile](/user-profile) simplifies user management.
-
-::: note
-The relationship between Auth0 and any of these authentication providers is referred to as a 'connection'.
-:::
-
-Auth0 is a multi-tenant service. When you register with Auth0, you get your own namespace (${account.namespace}). Many of these identity providers require registration and you will need to provide a `return url`. This will always be:
-
-`https://${account.namespace}/login/callback`
| 3 |
diff --git a/sirepo/package_data/static/js/sirepo-plotting-vtk.js b/sirepo/package_data/static/js/sirepo-plotting-vtk.js @@ -178,7 +178,15 @@ SIREPO.app.factory('vtkPlotting', function(appState, errorService, geometry, plo
},
userMatrix: function () {
- var m = transform.matrix.flat();
+ // Array.flat() doesn't exist in MS browsers
+ // var m = transform.matrix.flat();
+ var matrix = transform.matrix;
+ var m = [];
+ for (var i = 0; i < matrix.length; i++) {
+ for (var j = 0; j < matrix[i].length; j++) {
+ m.push(matrix[i][j]);
+ }
+ }
m.splice(3, 0, 0);
m.splice(7, 0, 0);
m.push(0);
| 14 |
diff --git a/brands/shop/convenience.json b/brands/shop/convenience.json "shop": "convenience"
}
},
- "shop/convenience|Central Convenience Store": {
+ "shop/convenience|Central": {
"locationSet": {"include": ["001"]},
"tags": {
"brand": "Central Convenience Store",
"brand:wikidata": "Q97104475",
- "name": "Central Convenience Store",
+ "name": "Central",
+ "official_name": "Central Convenience Store",
"shop": "convenience"
}
},
| 10 |
diff --git a/src/page/home/sidebar/ChatSwitcherList.js b/src/page/home/sidebar/ChatSwitcherList.js @@ -35,7 +35,8 @@ const defaultProps = {
const ChatSwitcherList = ({focusedIndex, options, onSelect}) => (
<View style={[styles.chatSwitcherItemList]}>
{options.length > 0 && _.map(options, (option, i) => {
- const textStyle = i === focusedIndex
+ const optionIsFocused = i === focusedIndex;
+ const textStyle = optionIsFocused
? styles.sidebarLinkActiveText
: styles.sidebarLinkText;
return (
@@ -49,7 +50,7 @@ const ChatSwitcherList = ({focusedIndex, options, onSelect}) => (
styles.mb2,
styles.alignItemsCenter,
styles.chatSwitcherItem,
- i === focusedIndex ? styles.chatSwitcherItemFocused : null
+ optionIsFocused ? styles.chatSwitcherItemFocused : null
]}
>
<View style={[styles.chatSwitcherAvatar, styles.mr2]}>
| 4 |
diff --git a/src/apps.json b/src/apps.json "headers": {
"Set-Cookie": "_hybris"
},
- "html": "<[^>]+/(?:sys_master|hybr|_ui/(?:desktop|common/img/webicons))/",
+ "html": "<[^>]+/(?:sys_master|hybr|_ui/(?:responsive/)?(?:desktop|common(?:/images|/img)?))/",
"icon": "Hybris.png",
"implies": "Java",
"website": "https://hybris.com"
| 7 |
diff --git a/Source/DataSources/GpxDataSource.js b/Source/DataSources/GpxDataSource.js @@ -167,16 +167,12 @@ define([
return result;
}
- function getCoordinatesString(node) {
+ function readCoordinateFromNode(node) {
var longitude = queryNumericAttribute(node, 'lon');
var latitude = queryNumericAttribute(node, 'lat');
var elevation = queryNumericValue(node, 'ele', namespaces.gpx);
- var coordinatesString = longitude + ", " + latitude;
- //TODO disregard elevation for now
- //if(defined(elevation)){
- // coordinatesString = coordinatesString + ', ' + elevation;
- //}
- return coordinatesString;
+ elevation = 0; //TODO disregard elevation for now
+ return Cartesian3.fromDegrees(longitude, latitude, elevation);
}
var gpxNamespaces = [null, undefined, 'http://www.topografix.com/GPX/1/1'];
@@ -468,8 +464,7 @@ define([
}
function processWpt(dataSource, geometryNode, entityCollection, sourceUri, uriResolver) {
- var coordinatesString = getCoordinatesString(geometryNode);
- var position = readCoordinate(coordinatesString);
+ var position = readCoordinateFromNode(geometryNode);
if (!defined(position)) {
throw new DeveloperError('Position Coordinates are required.');
}
@@ -495,11 +490,9 @@ define([
//a list of wpt
var routePoints = queryNodes(geometryNode, 'rtept', namespaces.gpx);
var coordinateTuples = new Array(routePoints.length);
- var coordinate;
for (var i = 0; i < routePoints.length; i++) {
processWpt(dataSource, routePoints[i], entityCollection, sourceUri, uriResolver);
- coordinate = getCoordinatesString(routePoints[i]);
- coordinateTuples[i] = readCoordinate(coordinate);
+ coordinateTuples[i] = readCoordinateFromNode(routePoints[i]);
}
entity.polyline = createDefaultPolyline();
entity.polyline.positions = coordinateTuples;
@@ -597,8 +590,7 @@ define([
var time;
for (var i = 0; i < trackPoints.length; i++) {
- coordinate = getCoordinatesString(trackPoints[i]);
- var position = readCoordinate(coordinate);
+ var position = readCoordinateFromNode(trackPoints[i]);
if (!defined(position)) {
throw new DeveloperError('Trkpt: Position Coordinates are required.');
}
| 7 |
diff --git a/src/utils/rules-proxy.js b/src/utils/rules-proxy.js @@ -233,12 +233,12 @@ module.exports.createRewriter = function(config) {
match.to.replace(/https?:\/\/[^\/]+/, ''),
})
return handler(req, res, next)
- } else {
+ }
+
req.url = match.to
console.log(`${NETLIFYDEVLOG} Rewrote URL to `, req.url)
return next()
}
- }
return next()
}
| 2 |
diff --git a/server/interpreter.js b/server/interpreter.js @@ -3767,16 +3767,43 @@ FunctionResult.CallAgain = new FunctionResult;
var NativeFunctionOptions;
/**
- * Class for property descriptors, with commonly-used examples.
+ * Class for property descriptors, with commonly-used examples and a
+ * function to easily create new descriptors from a prototype.
* @constructor
* @param {boolean=} writable Is the property writable?
* @param {boolean=} enumerable Is the property enumerable?
* @param {boolean=} configurable Is the property configurable?
*/
var Descriptor = function(writable, enumerable, configurable) {
- this.writable = writable;
- this.enumerable = enumerable;
- this.configurable = configurable;
+ if (writable !== undefined) this.writable = writable;
+ if (enumerable !== undefined) this.enumerable = enumerable;
+ if (configurable !== undefined) this.configurable = configurable;
+};
+
+/* Type declaration for the properties that
+ * intrp.Object.prototype.defineProperty expects to see on a
+ * descriptor. We use "|undefined)", but what we really mean is "|not
+ * defined)" because unfortunately closure-compiler's type system has
+ * no way to represent the latter.
+ */
+/** @type {(Interpreter.Value|undefined)} */
+Descriptor.prototype.value;
+/** @type {boolean|undefined} */
+Descriptor.prototype.writable;
+/** @type {boolean|undefined} */
+Descriptor.prototype.enumerable;
+/** @type {boolean|undefined} */
+Descriptor.prototype.configurable;
+
+/**
+ * Returns a new descriptor with the same properties as this one, with
+ * the addition of a value: member with the given value.
+ * @param{Interpreter.Value} value Value for the new descriptor.
+ */
+Descriptor.prototype.withValue = function(value) {
+ var desc = Object.create(this);
+ desc.value = value;
+ return desc;
};
/** @const */ Descriptor.wec = new Descriptor(true, true, true);
| 7 |
diff --git a/docs/articles/documentation/test-api/a-z-index.md b/docs/articles/documentation/test-api/a-z-index.md @@ -7,11 +7,21 @@ permalink: /documentation/test-api/a-z.html
This topic lists test API members in alphabetical order.
-* [ClientFunction](obtaining-data-from-the-client/README.md#creating-client-functions)
+## ClientFunction
+
+* [ClientFunction constructor](obtaining-data-from-the-client/README.md#creating-client-functions)
* [with](obtaining-data-from-the-client/README.md#overwriting-options)
-* [DOM Node State](selecting-page-elements/dom-node-state.md)
+
+Learn more: [Obtaining Data From the Client](obtaining-data-from-the-client/README.md)
+
+## DOM Node State
+
* *[members](selecting-page-elements/dom-node-state.md#members-common-across-all-nodes)*
-* [fixture](test-code-structure.md#fixtures)
+
+Learn more: [DOM Node State](selecting-page-elements/dom-node-state.md)
+
+## fixture
+
* [after](test-code-structure.md#fixture-hooks)
* [afterEach](test-code-structure.md#initialization-and-clean-up)
* [before](test-code-structure.md#fixture-hooks)
@@ -23,18 +33,41 @@ This topic lists test API members in alphabetical order.
* [page](test-code-structure.md#specifying-the-start-webpage)
* [requestHooks](intercepting-http-requests/attaching-hooks-to-tests-and-fixtures.md)
* [skip](test-code-structure.md#skipping-tests)
-* [RequestOptions](intercepting-http-requests/requestoptions-object.md)
-* [RequestLogger](intercepting-http-requests/logging-http-requests.md)
+
+Learn more: [Fixtures](test-code-structure.md#fixtures)
+
+## RequestOptions
+
+* *[members](intercepting-http-requests/requestoptions-object.md)*
+
+## RequestLogger
+
+* [RequestLogger constructor](intercepting-http-requests/logging-http-requests.md#creating-a-logger)
* [contains](intercepting-http-requests/logging-http-requests.md#logger-methods)
* [count](intercepting-http-requests/logging-http-requests.md#logger-methods)
* [clear](intercepting-http-requests/logging-http-requests.md#logger-methods)
* [requests](intercepting-http-requests/logging-http-requests.md#logger-properties)
-* [RequestMock](intercepting-http-requests/mocking-http-requests.md)
+
+Learn more: [Logging HTTP Requests](intercepting-http-requests/logging-http-requests.md)
+
+## RequestMock
+
+* [RequestMock constructor](intercepting-http-requests/mocking-http-requests.md#creating-a-mocker)
* [onRequestTo](intercepting-http-requests/mocking-http-requests.md#the-onrequestto-method)
* [respond](intercepting-http-requests/mocking-http-requests.md#the-respond-method)
-* [Role](authentication/user-roles.md)
+
+Learn more: [Mocking HTTP Requests](intercepting-http-requests/mocking-http-requests.md)
+
+## Role
+
+* [Role constructor](authentication/user-roles.md#create-and-apply-roles)
* [anonymous](authentication/user-roles.md#anonymous-role)
-* [Selector](selecting-page-elements/selectors/creating-selectors.md)
+
+Learn more: [User Roles](authentication/user-roles.md)
+
+## Selector
+
+* [Selector constructor](selecting-page-elements/selectors/creating-selectors.md)
* [addCustomDOMProperties](selecting-page-elements/selectors/extending-selectors.md#custom-properties)
* [addCustomMethods](selecting-page-elements/selectors/extending-selectors.md#custom-methods)
* [child](selecting-page-elements/selectors/functional-style-selectors.md#child)
@@ -53,7 +86,11 @@ This topic lists test API members in alphabetical order.
* [withAttribute](selecting-page-elements/selectors/functional-style-selectors.md#withattribute)
* [withExactText](selecting-page-elements/selectors/functional-style-selectors.md#withexacttext)
* [withText](selecting-page-elements/selectors/functional-style-selectors.md#withtext)
-* [test](test-code-structure.md#tests)
+
+Learn more: [Selectors](selecting-page-elements/selectors/README.md)
+
+## test
+
* [after](test-code-structure.md#initialization-and-clean-up)
* [before](test-code-structure.md#initialization-and-clean-up)
* [clientScripts](test-code-structure.md#inject-scripts-into-tested-pages)
@@ -63,7 +100,11 @@ This topic lists test API members in alphabetical order.
* [page](test-code-structure.md#specifying-the-start-webpage)
* [requestHooks](intercepting-http-requests/attaching-hooks-to-tests-and-fixtures.md)
* [skip](test-code-structure.md#skipping-tests)
-* [Test Controller](test-code-structure.md#test-controller)
+
+Learn more: [Tests](test-code-structure.md#tests)
+
+## TestController
+
* [addRequestHooks](intercepting-http-requests/attaching-hooks-to-tests-and-fixtures.md)
* [clearUpload](actions/upload.md#clear-file-upload-input)
* [click](actions/click.md)
@@ -115,3 +156,5 @@ This topic lists test API members in alphabetical order.
* [typeText](actions/type-text.md)
* [useRole](authentication/user-roles.md)
* [wait](pausing-the-test.md)
+
+Learn more: [Test Controller](test-code-structure.md#test-controller)
| 0 |
diff --git a/src/util/index.js b/src/util/index.js @@ -121,12 +121,12 @@ export const defaults = defaults => {
};
};
-export const removeFromArray = ( arr, ele, manyCopies ) => {
- for( let i = arr.length; i >= 0; i-- ){
+export const removeFromArray = ( arr, ele, oneCopy ) => {
+ for( let i = arr.length - 1; i >= 0; i-- ){
if( arr[i] === ele ){
arr.splice( i, 1 );
- if( !manyCopies ){ break; }
+ if( oneCopy ){ break; }
}
}
};
| 1 |
diff --git a/site/access-control.xml b/site/access-control.xml @@ -244,6 +244,24 @@ loopback_users = none
<a href="rabbitmqctl.8.html#Access_Control">Access Control section</a>
of the <a href="rabbitmqctl.8.html">rabbitmqctl man page</a>.
</p>
+
+
+ <doc:subsection name="user-tags">
+ <doc:heading>User Tags and Management UI Access</doc:heading>
+
+ <p>
+ In addition to the permissions covered above, users can have tags
+ associated with them. Currently only management UI access is controlled by user tags.
+ </p>
+ <p>
+ The tags are managed using <a href="/rabbitmqctl.8.html#set_user_tags">rabbitmqctl</a>.
+ Newly created users do not have any tags set on them by default.
+ </p>
+ <p>
+ Please refer to the <a href="/management.html#permissions">management plugin guide</a> to learn
+ more about what tags are supported and how they limit management UI access.
+ </p>
+ </doc:subsection>
</doc:section>
<doc:section name="topic-authorisation">
| 7 |
diff --git a/struts2-jquery-integration-tests/pom.xml b/struts2-jquery-integration-tests/pom.xml <!-- plugins -->
<maven-failsafe-plugin.version>3.0.0-M7</maven-failsafe-plugin.version>
<!-- dependencies -->
- <selenium.version>4.2.2</selenium.version>
- <htmlunit-driver.version>3.62.0</htmlunit-driver.version>
+ <selenium.version>4.3.0</selenium.version>
+ <htmlunit-driver.version>3.63.0</htmlunit-driver.version>
<lombok.version>1.18.24</lombok.version>
<guava.version>30.0-jre</guava.version>
<phantomjsdriver.version>1.4.3</phantomjsdriver.version>
| 3 |
diff --git a/src/style/bypass.js b/src/style/bypass.js @@ -38,9 +38,11 @@ styfn.applyBypass = function( eles, name, value, updateTransitions ){
var specifiedProps = name;
updateTransitions = value;
- for( var i = 0; i < self.properties.length; i++ ){
- var prop = self.properties[ i ];
- var name = prop.name;
+ var names = Object.keys( specifiedProps );
+
+ for( var i = 0; i < names.length; i++ ){
+ var name = names[i];
+ var prop = self.properties[ name ];
var value = specifiedProps[ name ];
if( value === undefined ){ // try camel case name too
| 7 |
diff --git a/docs/communication.md b/docs/communication.md @@ -19,6 +19,10 @@ meta -->
<!-- add-attribute:class:success -->
>**TIP:** For learning and testing purposes, use the [Luigi Fiddle](https://fiddle.luigi-project.io) page where you can configure a sample Luigi application.
+## Overview
+
+The Luigi configuration file can include a section called `communication:`. In it, you can define custom messages to be exchanged between Luigi Core and Luigi Client, as well as configure additional communication options.
+
## Custom messages
Luigi Core and Luigi Client can exchange custom messages in both directions.
@@ -42,7 +46,7 @@ For Luigi Core to process custom messages, define a configuration similar to the
...
}
```
-where the `my-custom-message.update-top-nav` key is the message id, and the value is the listener function for the custom message. The listener receives the following input parameters:
+where the `my-custom-message.update-top-nav` key is the message ID, and the value is the listener function for the custom message. The listener receives the following input parameters:
- **customMessage** the [message](luigi-client-api.md#sendCustomMessage) sent by Luigi Client.
- **microfrontend** a micro frontend object as specified [here](luigi-core-api.md#getMicrofrontends).
- **navigation node** a [navigation node object](navigation-parameters-reference.md#Node-parameters).
@@ -52,3 +56,29 @@ where the `my-custom-message.update-top-nav` key is the message id, and the valu
For Luigi Core to send messages, use the [customMessages](luigi-core-api.md#customMessages) section from Core API. You can send a custom message to all rendered micro frontends, or to a specific one. For the latter, use the Core API [elements](luigi-core-api.md#elements) methods to retrieve micro frontends and select the one you want to send the custom message to.
For Luigi Client to process the message, add and remove message listeners as described [here](luigi-client-api.md#addCustomMessageListener).
+
+## Ignore events from inactive iframes
+
+In the `communication:` section of the Luigi config, you can add the `skipEventsWhenInactive` parameter in order to ignore events normally sent from Luigi Client to Luigi Core when an iframe/micro frontend is not currently selected or active.
+
+For example, you can ignore any of these events (or others, as needed):
+- [luigi.navigation.open](https://github.com/SAP/luigi/blob/master/client/src/linkManager.js#L82) - skipping this event will prevent the inactive iframe from opening
+- [luigi.navigate.ok](https://github.com/SAP/luigi/blob/master/client/src/lifecycleManager.js#L124) - skipping this event will prevent navigation
+- [luigi.ux.confirmationModal.show](https://github.com/SAP/luigi/blob/master/client/src/uxManager.js#L102) - skipping this event will prevent the showing of a [confirmation modal](luigi-client-api.md#showconfirmationmodal)
+- [luigi.ux.alert.show](https://github.com/SAP/luigi/blob/master/client/src/uxManager.js#L172) - skipping this event will prevent the showing of an [alert](luigi-client-api.md#showalert)
+
+### skipEventsWhenInactive
+- **type**: array of strings
+- **description**: a list of strings specifying the names of events which you want to ignore. When specified, the events will be ignored when an iframe is inactive.
+- **default**: undefined
+- **example**:
+
+```javascript
+{
+ ...
+ communication: {
+ skipEventsWhenInactive: ["luigi.navigation.open", "luigi.ux.alert.show"]
+ }
+ ...
+}
+```
| 7 |
diff --git a/README.md b/README.md ERP beyond your fridge
## Give it a try
-- Public demo of the latest stable version → [https://demo.grocy.info](https://demo.grocy.info)
-- Public demo of the latest pre-release version (current master branch) → [https://demo-prerelease.grocy.info](https://demo-prerelease.grocy.info)
+- Public demo of the latest stable version (`release` branch) → [https://demo.grocy.info](https://demo.grocy.info)
+- Public demo of the latest pre-release version (`master` branch) → [https://demo-prerelease.grocy.info](https://demo-prerelease.grocy.info)
## Getting in touch
There is the [r/grocy subreddit](https://www.reddit.com/r/grocy) to connect with other grocy users. If you've found something that does not work or if you have an idea for an improvement or new things which you would find useful, feel free to open an issue in the [issue tracker](https://github.com/grocy/grocy/issues) here.
@@ -21,7 +21,7 @@ A household needs to be managed. I did this so far (almost 10 years) with my fir
Just unpack the [latest release](https://releases.grocy.info/latest) on your PHP (SQLite (3.8.3 or higher) extension required, currently only tested with PHP 7.3) enabled webserver (webservers root should point to the `public` directory), copy `config-dist.php` to `data/config.php`, edit it to your needs, ensure that the `data` directory is writable and you're ready to go, (to make it writable, maybe use `chown -R www-data:www-data data/`). Default login is user `admin` with password `admin`, please change the password immediately (see user menu).
-Alternatively clone this repository and install Composer and Yarn dependencies manually.
+Alternatively clone this repository (the `release` branch always references the latest released version, or checkout the latest tagged revision) and install Composer and Yarn dependencies manually.
If you use nginx as your webserver, please include `try_files $uri /index.php$is_args$query_string;` in your location block.
| 0 |
diff --git a/src/components/Carousel.js b/src/components/Carousel.js @@ -82,6 +82,13 @@ export default class Carousel extends Component {
this.interval = null;
}
+ static getDerivedStateFromProps(props, state) {
+ if ( !state.transitionEnabled ) {
+ return {
+ infiniteTransitionFrom: props.value,
+ };
+ }
+ }
/* ========== initial handlers and positioning setup ========== */
componentDidMount() {
@@ -116,7 +123,6 @@ export default class Carousel extends Component {
if ( valueChanged ) {
this.setState({
- infiniteTransitionFrom: this.getCurrentValue(),
transitionEnabled: true,
});
}
| 9 |
diff --git a/packages/app/src/migrations/20220311011114-convert-page-delete-config.js b/packages/app/src/migrations/20220311011114-convert-page-delete-config.js @@ -16,6 +16,17 @@ module.exports = {
mongoose.connect(getMongoUri(), mongoOptions);
const Config = getModelSafely('Config') || ConfigModel;
+ const isNewConfigExists = await Config.count({
+ ns: 'crowi',
+ key: 'security:pageDeletionAuthority',
+ }) > 0;
+
+ if (isNewConfigExists) {
+ logger.info('This migration is skipped because new configs are existed.');
+ logger.info('Migration has successfully applied');
+ return;
+ }
+
const oldConfig = await Config.findOne({
ns: 'crowi',
key: 'security:pageCompleteDeletionAuthority',
| 7 |
diff --git a/app/templates/_package.json b/app/templates/_package.json "test": "gulp client.unit_test",
"build-dist": "gulp client.build:dist"
<%} else {%>
- "start": "node server/index",
+
"watch": "gulp",
+
+ <% if (server === "node") { %>
+
+ "start": "node server/index",
+
<% if (usesTypescript) { %>
"dev": "tsc && concurrently \"nodemon ./server/index --watch server\" \"gulp\"",
<% } else { %>
"dev": "concurrently \"nodemon ./server/index --watch server\" \"gulp\"",
<% } %>
+ <% } %>
+
+ <% if (server === "go") { %>
+ "start": "go run server/main.go",
+
+ <% if (usesTypescript) { %>
+ "dev": "tsc && concurrently \" npm start \" \"gulp\"",
+ <% } else { %>
+ "dev": "concurrently \"npm start\" \"gulp\"",
+ <% } %>
+ <% } %>
"build-dev": "gulp client.build:dev",
"build-dist": "gulp client.build:dist",
"test-client": "gulp client.unit_test",
+
<% if (testsSeparated) { %>
"test-server": "mocha 'tests/server/**/*_test.js' --recursive --check-leaks --reporter min --compilers js:babel-register",
"coverage-server": "istanbul cover ./node_modules/mocha/bin/_mocha -- 'tests/server/**/*_test.js' --compilers js:babel-register",
"coverage-server": "istanbul cover ./node_modules/mocha/bin/_mocha -- 'server/**/*_test.js' --compilers js:babel-register",
"coveralls-server": "istanbul cover ./node_modules/mocha/bin/_mocha -- 'server/**/*_test.js' --compilers js:babel-register --report lcovonly && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
<% } %>
+
<% } %>
},
"dependencies": {
| 0 |
diff --git a/src/encoded/tests/data/inserts/user.json b/src/encoded/tests/data/inserts/user.json "uuid": "64974e05-12df-4733-ae90-b402298b142e"
},
{
- "email": "[email protected]",
+ "email": "[email protected]",
"first_name": "Ingrid",
"groups": [
"admin",
"REMC",
"ENCORE"
],
- "uuid": "ae18435d-902b-420d-81a1-d342d49c5e60"
+ "uuid": "85c75ed3-269b-4273-b4ba-e269ee350dd6"
}
]
| 0 |
diff --git a/runtime/helpers.js b/runtime/helpers.js @@ -64,6 +64,7 @@ export function _goto(context, route) {
export function _url(context, route) {
return function url(path, params, preserveIndex) {
+ path = path || ('./')
if (!preserveIndex)
path = path.replace(/index$/, '')
| 12 |
diff --git a/core/algorithm-queue/lib/persistency/persistence.js b/core/algorithm-queue/lib/persistency/persistence.js @@ -27,7 +27,7 @@ class Persistence {
const pendingAmount = await bullQueue.getWaitingCount();
await redisStorage.put(data);
const scoreArray = data.map(d => d.calculated.score);
- const status = await this.etcd.algorithms.algorithmQueue.set({ name: this.queueName, data: scoreArray, pendingAmount });
+ const status = await this.etcd.algorithms.algorithmQueue.set({ name: this.queueName, data: scoreArray, pendingAmount, timestamp: Date.now() });
if (status) {
log.debug('queue stored successfully', { component: components.ETCD_PERSISTENT });
}
| 0 |
diff --git a/src/components/Identity/injectEnsureRequestHasIdentity.js b/src/components/Identity/injectEnsureRequestHasIdentity.js @@ -18,38 +18,72 @@ export default ({
awaitIdentityCookie,
logger
}) => {
- let identityCookiePromise;
+ let obtainedIdentityPromise;
+
+ const allowRequestToGoWithoutIdentity = payload => {
+ setDomainForInitialIdentityPayload(payload);
+ return addLegacyEcidToPayload(payload);
+ };
+
/**
- * Ensures that if no identity cookie exists, we only let one request be
- * sent without an identity until its response returns. In the meantime,
+ * Ensures that if no identity cookie exists, we only let one request at a
+ * time without an identity until its response returns. In the meantime,
* we queue all other requests, otherwise the requests could result in
- * multiple ECIDs being minted for the user. Once the response to the first
- * request returns, we can let the queued requests be sent, since they
- * will have the newly minted ECID that was returned on the first response.
+ * multiple ECIDs being minted for the user. Once we get an identity
+ * cookie, we can let the queued requests be sent all at once, since they
+ * will have the newly minted ECID.
+ *
+ * Konductor should make every effort to return an identity, but in
+ * certain scenarios it may not. For example, in cases where the
+ * request does not match what Konductor is expecting (ie 400s).
+ * In cases where Konductor does not set an identity, there should be
+ * no events recorded so we don't need to worry about multiple ECIDs
+ * being minted for each user.
+ *
+ * If we only allowed one request through without an identity, a single
+ * malformed request causes all other requests to never send.
*/
return ({ payload, onResponse }) => {
if (doesIdentityCookieExist()) {
return Promise.resolve();
}
- if (identityCookiePromise) {
- // We don't have an identity cookie, but the first request has
- // been sent to get it. We must wait for the response to the first
- // request to come back and a cookie set before we can let this
- // request go out.
+ if (obtainedIdentityPromise) {
+ // We don't have an identity cookie, but at least one request has
+ // been sent to get it. Konductor may set the identity cookie in the
+ // response. We will hold up this request until the last request
+ // requiring identity returns and awaitIdentityCookie confirms the
+ // identity was set.
logger.log("Delaying request while retrieving ECID from server.");
- return identityCookiePromise.then(() => {
- logger.log("Resuming previously delayed request.");
+ const previousObtainedIdentityPromise = obtainedIdentityPromise;
+
+ // This promise resolves when we have an identity cookie. Additional
+ // requests are chained together so that only one is sent at a time
+ // until we have the identity cookie.
+ obtainedIdentityPromise = previousObtainedIdentityPromise.catch(() => {
+ return awaitIdentityCookie(onResponse);
});
+
+ // When this returned promise resolves, the request will go out.
+ return (
+ previousObtainedIdentityPromise
+ .then(() => {
+ logger.log("Resuming previously delayed request.");
+ })
+ // If Konductor did not set the identity cookie on the previous
+ // request, then awaitIdentityCookie will reject its promise.
+ // Catch the rejection here and allow this request to go out.
+ .catch(() => {
+ return allowRequestToGoWithoutIdentity(payload);
+ })
+ );
}
// For Alloy+Konductor communication to be as robust as possible and
// to ensure we don't mint new ECIDs for requests that would otherwise
// be sent in parallel, we'll let this request go out to fetch the
- // cookie, but we'll set up a promise so that future requests can
- // know when the cookie has been set.
- identityCookiePromise = awaitIdentityCookie(onResponse);
- setDomainForInitialIdentityPayload(payload);
- return addLegacyEcidToPayload(payload);
+ // cookie
+ obtainedIdentityPromise = awaitIdentityCookie(onResponse);
+ return allowRequestToGoWithoutIdentity(payload);
};
};
| 9 |
diff --git a/src/main/webapp/org/cboard/controller/config/freeLayoutCtrl.js b/src/main/webapp/org/cboard/controller/config/freeLayoutCtrl.js @@ -28,6 +28,8 @@ cBoard.controller('freeLayoutCtrl', function($rootScope, $scope, $http, ModalUti
freeLayoutService.setHeight();
});
+ freeLayoutService.setHeight();
+
$http.get("dashboard/getDatasourceList.do").success(function (response) {
$scope.datasourceList = response;
getCategoryList();
| 12 |
diff --git a/assets/js/components/ErrorNotice.js b/assets/js/components/ErrorNotice.js /**
* External dependencies
*/
-import isPlainObject from 'lodash/isPlainObject';
import PropTypes from 'prop-types';
/**
* Internal dependencies
*/
-import Data from 'googlesitekit-data';
-import { STORE_NAME as CORE_MODULES } from '../googlesitekit/modules/datastore/constants';
-import { isPermissionScopeError, isInsufficientPermissionsError } from '../util/errors';
-import { getInsufficientPermissionsErrorDescription } from '../util/insufficient-permissions-error-description';
+import { isPermissionScopeError } from '../util/errors';
import ErrorText from '../components/error-text';
-const { useSelect } = Data;
-
-export default function ErrorNotice( { moduleSlug, shouldDisplayError, error } ) {
- const module = useSelect( ( select ) => select( CORE_MODULES ).getModule( moduleSlug ) );
+export default function ErrorNotice( { error, shouldDisplayError = () => true } ) {
// Do not display if no error, or if the error is for missing scopes.
if ( ! error || isPermissionScopeError( error ) || ! shouldDisplayError( error ) ) {
return null;
}
- let message = error.message;
- if ( isInsufficientPermissionsError( error ) && isPlainObject( module ) ) {
- message = getInsufficientPermissionsErrorDescription( message, module );
- }
-
return (
<ErrorText
- message={ message }
+ message={ error.message }
reconnectURL={ error.data?.reconnectURL }
/>
);
}
ErrorNotice.propTypes = {
- moduleSlug: PropTypes.string,
- shouldDisplayError: PropTypes.func,
error: PropTypes.shape( {
message: PropTypes.string,
} ),
-};
-
-ErrorNotice.defaultProps = {
- moduleSlug: '',
- shouldDisplayError: () => true,
+ shouldDisplayError: PropTypes.func,
};
| 2 |
diff --git a/components/data-table/private/header-cell.jsx b/components/data-table/private/header-cell.jsx @@ -133,7 +133,7 @@ const DataTableHeaderCell = createReactClass({
[`slds-is-sorted--${sortDirection}`]: sortDirection,
'slds-is-sorted--asc': isSorted && !sortDirection, // default for hover, up arrow is ascending which means A is at the top of the table, and Z is at the bottom. You have to think about row numbers abstracting, and not the visual order on the table.
})}
- focusable={sortable ? true : null}
+ focusable={sortable ? true : false}
scope="col"
style={width ? { width } : null}
>
| 1 |
diff --git a/src/com.unity.git.api/Api/Git/Tasks/GitResetTask.cs b/src/com.unity.git.api/Api/Git/Tasks/GitResetTask.cs @@ -12,16 +12,29 @@ namespace Unity.VersionControl.Git.Tasks
CancellationToken token, IOutputProcessor<string> processor = null)
: base(token, processor ?? new SimpleOutputProcessor())
{
- var mode = "";
- mode +=
- resetMode == GitResetMode.NonSpecified ? "" :
- resetMode == GitResetMode.Soft ? "--soft" :
- resetMode == GitResetMode.Keep ? "--keep" :
- resetMode == GitResetMode.Mixed ? "--mixed" :
- "--hard";
+
Name = TaskName;
- arguments = $"reset {mode} {changeset}";
+ arguments = $"reset {GetModeString(resetMode)} {changeset}";
+ }
+
+ private string GetModeString(GitResetMode resetMode)
+ {
+ switch (resetMode)
+ {
+ case GitResetMode.NonSpecified:
+ return string.Empty;
+ case GitResetMode.Soft:
+ return "--soft";
+ case GitResetMode.Keep:
+ return "--keep";
+ case GitResetMode.Mixed:
+ return "--mixed";
+ case GitResetMode.Hard:
+ return "--hard";
+ default:
+ throw new ArgumentOutOfRangeException(nameof(resetMode), resetMode, null);
+ }
}
public override string ProcessArguments { get { return arguments; } }
| 7 |
diff --git a/app/views/navbar.scala.html b/app/views/navbar.scala.html </div>
<div class="modal-body">
+ <div id="incorrect-signin-alert"></div>
<!-- Alert for signing in with wrong credentials from navbar Sign-In -->
- <div id="incorrect-login-modal-alert"></div>
+ <div class="alert alert-danger alert-error" id="incorrect-login-modal-alert" role="alert" style="display:none;">
+ <a href="#" class="close" data-hide="alert">×</a>
+ <strong>Error! </strong>Invalid credentials!
+ </div>
+
@helper.form(action = routes.CredentialsAuthController.authenticate(url.getOrElse("/")), args = 'id -> "sign-in-form") {
@text(forms.SignInForm.form("identifier"), "Email address")
<h4 class="modal-title" id="sign-up-label">Sign up</h4>
</div>
<div class="modal-body">
+ <div id="incorrect-signup-alert"></div>
+
@helper.form(action = routes.SignUpController.signUp(url.getOrElse("/")), args ='id -> "sign-up-form") {
@text(forms.SignUpForm.form("username"), "Username", icon = "person")
@text(forms.SignUpForm.form("email"), "Email", icon = "at")
}
});
- //set tooltip alerts for when users do not enter all sign in / sign up fields
- $('#username').tooltip({title:'Please enter a username.', trigger: 'manual'});
- $('#username').on({
- 'focus': function(){
- $('#username').tooltip('hide');
- }
- });
- $('#identifier').tooltip({title:'Please enter a valid email address.', trigger: 'manual'});
- $('#identifier').on({
- 'focus': function(){
- $('#identifier').tooltip('hide');
- }
- });
- $('#email').tooltip({title:'Please enter a valid email address.', trigger: 'manual'});
- $('#email').on({
- 'focus': function(){
- $('#email').tooltip('hide');
- }
- });
- $(':password').tooltip({title:'Please enter your password.', trigger: 'manual'});
- $(':password').on({
- 'focus': function(){
- $(':password').tooltip('hide');
- }
+ $("[data-hide]").on("click", function(){
+ $("." + $(this).attr("data-hide")).hide();
+ // -or-, see below
+ // $(this).closest("." + $(this).attr("data-hide")).hide();
});
});
//this means that logging in failed, alert user of failure
if(typeof data == 'string'){
- $('#incorrect-login-modal-alert').html(
- '<div class="alert alert-danger alert-error" id="incorrect-login-modal-alert">'+
- '<a href="#" class="close" data-dismiss="alert">×</a>'+
- '<strong>Error!</strong> Invalid credentials!'+
- '</div>'
- );
+ $('#incorrect-signin-alert').hide();
+ $('#incorrect-login-modal-alert').show();
return;
}
$('#sign-in-modal-container').modal('toggle');
}
+ function invalidSignInUpAlert(signIn, message){
+ $('#incorrect-login-modal-alert').hide();
+ if(signIn){
+ $('#incorrect-signin-alert').html(
+ '<div class="alert alert-danger alert-error" id="incorrect-signin-alert">'+
+ '<a href="#" class="close" data-dismiss="alert">×</a>'+
+ '<strong>Error! </strong>' + message +
+ '</div>'
+ );
+ $('#incorrect-signin-alert').show();
+ }
+ else{
+ $('#incorrect-signup-alert').html(
+ '<div class="alert alert-danger alert-error" id="incorrect-signup-alert">'+
+ '<a href="#" class="close" data-dismiss="alert">×</a>'+
+ '<strong>Error! </strong>' + message +
+ '</div>'
+ );
+ $('#incorrect-signup-alert').show();
+ }
+ }
+
// Intercept form-based sign in and use AJAX to signin so the page does not refresh.
$('#sign-in-form').submit(function () {
var formData = $('#sign-in-form :input');
//if not a valid email address, do not submit form
if(!email || !validateEmail(email)){
- $('#identifier').tooltip('show');
+ invalidSignInUpAlert(true, 'Please enter a valid email address.');
return false;
}
if(!password){
- $(':password').tooltip('show');
+ invalidSignInUpAlert(true, 'Please enter your password.');
return false;
}
var password = formData[2].value;
if(!username){
- $('#username').tooltip('show');
+ invalidSignInUpAlert(false, 'Please enter a username.');
return false;
}
//if not a valid email address, do not submit form
if(!email || !validateEmail(email)){
- $('#email').tooltip('show');
+ invalidSignInUpAlert(false, 'Please enter a valid email address.');
return false;
}
if(!password){
- $(':password').tooltip('show');
+ invalidSignInUpAlert(false, 'Please enter your password.');
return false;
}
| 14 |
diff --git a/app/assets/stylesheets/editor-3/export-image.css.scss b/app/assets/stylesheets/editor-3/export-image.css.scss @@ -7,15 +7,6 @@ $resizeHandlerSize: 8px;
z-index: 1;
}
-.ExportImageView {
- pointer-events: all;
- cursor: move;
-}
-
-.ExportImageView.is-disabled {
- pointer-events: none;
-}
-
.ExportImageView.is-top {
z-index: 1000;
}
@@ -30,11 +21,11 @@ $resizeHandlerSize: 8px;
.CanvasExport {
position: absolute;
border: 1px dashed #FFF;
+ cursor: move;
}
/* draggable and resizable plugins style overriding */
.CanvasExport.draggable {
- cursor: move;
z-index: 1000000000;
}
.CanvasExport.draggable .ExportHelper.ExportHelper--header,
| 2 |
diff --git a/packages/@uppy/drag-drop/src/index.js b/packages/@uppy/drag-drop/src/index.js @@ -142,6 +142,7 @@ module.exports = class DragDrop extends Plugin {
const restrictions = this.uppy.opts.restrictions
return (
<input
+ class="uppy-DragDrop-input"
type="file"
hidden
ref={(ref) => { this.fileInputRef = ref }}
@@ -178,8 +179,7 @@ module.exports = class DragDrop extends Plugin {
}
render (state) {
- const dragDropClass = `
- uppy-Root
+ const dragDropClass = `uppy-Root
uppy-u-reset
uppy-DragDrop-container
${this.isDragDropSupported ? 'uppy-DragDrop--isDragDropSupported' : ''}
| 0 |
diff --git a/cli/src/commands/runTests.js b/cli/src/commands/runTests.js @@ -130,6 +130,20 @@ async function getOrderedFlowBinVersions(
return false;
}
+ // Temporary fix for https://github.com/flowtype/flow-typed/issues/2422
+ if (rel.tag_name === 'v0.63.0') {
+ console.log(
+ '==========================================================================================',
+ );
+ console.log(
+ 'We are tempoarily skipping v0.63.0 due to https://github.com/flowtype/flow-typed/issues/2422',
+ );
+ console.log(
+ '==========================================================================================',
+ );
+ return false;
+ }
+
// We only test against versions since 0.15.0 because it has proper
// [ignore] fixes (which are necessary to run tests)
// Because Windows was only supported starting with version 0.30.0, we also skip version prior to that when running on windows.
@@ -478,7 +492,7 @@ async function runTestGroup(
);
}
- if (!await fs.exists(BIN_DIR)) {
+ if (!(await fs.exists(BIN_DIR))) {
await fs.mkdir(BIN_DIR);
}
| 8 |
diff --git a/lib/api/socket-handler.js b/lib/api/socket-handler.js // Watches for updates to sourceErrorCount
var express = require('express');
-var cookieParser = require('cookie-parser')
var SocketIOServer = require('socket.io');
var passportSocketIo = require('passport.socketio');
var _ = require('underscore');
@@ -103,7 +102,7 @@ SocketHandler.prototype._configureSocketIO = function() {
var io = this.io;
// Authorize sockets
io.use(passportSocketIo.authorize({
- cookieParser: cookieParser,
+ cookieParser: express.cookieParser,
key: self.auth.key,
secret: self.auth.secret,
store: self.auth.store,
| 13 |
diff --git a/app/classifier/task.jsx b/app/classifier/task.jsx @@ -46,7 +46,7 @@ class Task extends React.Component {
taskTypes: tasks,
workflow,
classification,
- onChange: (...args) => classification.update(args)
+ onChange: () => classification.update()
};
return (
| 1 |
diff --git a/src/encoded/commands/deploy.py b/src/encoded/commands/deploy.py @@ -399,6 +399,12 @@ def main():
if ec2_client is None:
sys.exit(20)
run_args = _get_run_args(main_args, instances_tag_data)
+ if main_args.dry_run_aws:
+ print('Dry Run AWS')
+ print('main_args', main_args.keys())
+ print('run_args', run_args.keys())
+ print('Dry Run AWS')
+ sys.exit(30)
# Run Cases
if main_args.check_price:
print("check_price")
@@ -510,6 +516,7 @@ def parse_args():
)
parser.add_argument('-b', '--branch', default=None, help="Git branch or tag")
parser.add_argument('-n', '--name', type=hostname, help="Instance name")
+ parser.add_argument('--dry-run-aws', action='store_true', help="Abort before ec2 requests.")
parser.add_argument('--single-data-master', action='store_true',
help="Create a single data master node.")
parser.add_argument('--check-price', action='store_true', help="Check price on spot instances")
| 0 |
diff --git a/src/css/docs/components/docs-page.css b/src/css/docs/components/docs-page.css @@ -6,7 +6,7 @@ html[is-docs-page] body {
.DocsPage {
--docs-header-height: 3.7647058824rem; /* 64 / 17 */
- --docs-sidebar-width: 19rem;
+ --docs-sidebar-width: 18.5rem;
--docs-body-sidebar-width: var(--docs-sidebar-width);
--docs-page-side-padding: 1rem;
--docs-page-width: 1440px; /* TODO */
| 7 |
diff --git a/CHANGES.md b/CHANGES.md @@ -9,6 +9,10 @@ UI:
- Fixed the issue of modifying date string in text input using backspaces to an empty string will cause text input to reset text input
- User can't input a future date to date of last modification on add dataset page
+Others:
+
+- Use a "Year" column from a CSV file to extract a temporal extent
+
## 0.0.56
General:
@@ -193,7 +197,6 @@ Others:
- Upgrade Scala dependencies versions & added scalafmt support
- Fixed doc to reflect [lerna deprecating an option](https://github.com/lerna/lerna/commit/f2c3a92fe41b6fdc5d11269f0f2c3e27761b4c85)
- Fix potential memory leak by deregistering listener when Header is unmounted
-- Use a "Year" column from a CSV file to extract a temporal extent
## 0.0.55
| 5 |
diff --git a/src/Angular.js b/src/Angular.js @@ -1696,13 +1696,8 @@ function angularInit(element, bootstrap) {
});
if (appElement) {
if (!isAutoBootstrapAllowed) {
- try {
window.console.error('AngularJS: disabling automatic bootstrap. <script> protocol indicates ' +
'an extension, document.location.href does not match.');
- } catch (e) {
- // Support: Safari 11 w/ Webdriver
- // The console.error will throw and make the test fail
- }
return;
}
config.strictDi = getNgAttribute(appElement, 'strict-di') !== null;
| 13 |
diff --git a/tests/Unit/CrudPanel/CrudPanelFieldsTest.php b/tests/Unit/CrudPanel/CrudPanelFieldsTest.php @@ -338,7 +338,8 @@ class CrudPanelFieldsTest extends BaseCrudPanelTest
// TODO: fix the before field method not preserving field keys
// TODO: in the case of the create form, this will move the 'field3' field before the 'field1' field, but for
- // the update form, it will move the 'field2' field before the 'field1' field. should it work like this?
+ // the update form, it will move the 'field2' field before the 'field1' field. fix by adding second
+ // optional $form parameter with 'both' as a default value.
$this->crudPanel->beforeField('field1');
$createKeys = array_keys($this->crudPanel->create_fields);
| 3 |
diff --git a/src/editor/EditorPackage.js b/src/editor/EditorPackage.js @@ -213,18 +213,18 @@ export default {
config.addCommand('insert-disp-quote', InsertDispQuoteCommand, {
nodeType: 'disp-quote',
- commandGroup: 'insert-block-element'
+ commandGroup: 'insert'
})
config.addCommand('insert-fig', InsertFigureCommand, {
nodeType: 'fig',
- commandGroup: 'insert-figure'
+ commandGroup: 'insert'
})
config.addCommand('insert-table', InsertTableCommand, {
nodeType: 'table-wrap',
- commandGroup: 'insert-table'
+ commandGroup: 'insert'
})
config.addCommand('insert-formula', InsertInlineFormulaCommand, {
- commandGroup: 'insert-formula'
+ commandGroup: 'insert'
})
config.addCommand('edit-formula', EditInlineNodeCommand, {
nodeType: 'inline-formula',
@@ -440,7 +440,7 @@ export default {
type: 'tool-group',
showDisabled: true,
style: 'minimal',
- commandGroups: ['insert-figure', 'insert-table', 'insert-formula', 'insert-block-element']
+ commandGroups: ['insert']
},
{
name: 'cite',
| 4 |
diff --git a/src/libs/Navigation/AppNavigator/AppNavigator.js b/src/libs/Navigation/AppNavigator/AppNavigator.js import _ from 'underscore';
import React from 'react';
import PropTypes from 'prop-types';
-import {createStackNavigator} from '@react-navigation/stack';
+import {createStackNavigator, CardStyleInterpolators} from '@react-navigation/stack';
import {createDrawerNavigator} from '@react-navigation/drawer';
import createCustomModalStackNavigator from './createCustomModalStackNavigator';
import AppWrapper from '../../../pages/home/AppWrapper';
@@ -136,6 +136,7 @@ const AppNavigator = (props) => {
options={{
headerShown: false,
cardStyle: getNavigationModalCardStyle(props.isSmallScreenWidth),
+ cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS,
}}
>
{() => (
| 4 |
diff --git a/examples/hello_ml.html b/examples/hello_ml.html const _getFingerRay = fingers => {
for (let i = 0; i < fingers.length; i++) {
const bones = fingers[i];
- const validBones = bones.filter(bone => !!bone);
- if (validBones.length >= 2) {
- const startBone = localVector.fromArray(validBones[0]);
- const endBone = localVector2.fromArray(validBones[validBones.length - 1]);
+ const localBones = bones.filter(bone => !!bone);
+ if (localBones.length >= 2) {
+ const startBone = localVector.fromArray(localBones[0]);
+ const endBone = localVector2.fromArray(localBones[localBones.length - 1]);
const direction = localVector3.copy(endBone)
.sub(startBone)
.normalize();
const _onMesh = updates => {
for (let i = 0; i < updates.length; i++) {
const update = updates[i];
- const {id, valid} = update;
- if (valid) {
+ const {id, present} = update;
+
+ if (present) {
const terrainMesh = _getTerrainMesh(id);
_loadTerrainMesh(terrainMesh, update);
} else {
};
let enabled = false;
+ let mesher = null;
const _enable = () => {
window.browser.nativeMl.RequestHand(_onHand);
- window.browser.nativeMl.RequestMesh(_onMesh);
+ mesher = window.browser.nativeMl.RequestMeshing();
+ mesher.onmesh = _onMesh;
window.browser.nativeMl.RequestPlanes(_onPlanes);
window.browser.nativeMl.RequestEye(_onEye);
eyeMesh.visible = true;
handMeshes.forEach(handMesh => {
handMesh.visible = false;
});
- window.browser.nativeMl.CancelMesh(_onMesh);
+ mesher.destroy();
+ mesher = null;
_clearTerrainMeshes();
window.browser.nativeMl.CancelPlanes(_onPlanes);
_clearPlanes();
| 4 |
diff --git a/src/partials/page-community.html b/src/partials/page-community.html <ul class="list row">
{{#each page-contents.section-contribute-listing.content.feature-list}}
<li class="list-item col col-12 col-sm-6 col-md-4">
- <span class="list-icon"><img {{> image-attributes image=image}}/></span>
+ <span class="list-icon">{{> image-component image=image}}</span>
{{> text-component this=.}}
</li>
{{/each}}
| 14 |
diff --git a/assets/js/modules/analytics/setup.js b/assets/js/modules/analytics/setup.js @@ -220,7 +220,7 @@ class AnalyticsSetup extends Component {
selectedProfile,
useSnippet,
} = this.state;
- const { isEditing, onSettingsPage } = this.props;
+ const { isEditing } = this.props;
let newState = {};
try {
@@ -341,7 +341,7 @@ class AnalyticsSetup extends Component {
await data.get( 'modules', 'analytics', 'tag-permission', { tag: existingTag }, false );
newState = Object.assign( newState, {
existingTag,
- useSnippet: ( ! existingTag && ! onSettingsPage ) ? true : useSnippet,
+ useSnippet,
} );
}
}
| 12 |
diff --git a/src/components/Workspace.jsx b/src/components/Workspace.jsx @@ -250,7 +250,7 @@ class Workspace extends React.Component {
}
return (
- <main className="environment">
+ <div className="environment">
<EditorsColumn
currentProject={currentProject}
editorsFlex={editorsFlex}
@@ -275,7 +275,7 @@ class Workspace extends React.Component {
/>
</DraggableCore>
{this._renderOutput()}
- </main>
+ </div>
);
}
@@ -284,13 +284,13 @@ class Workspace extends React.Component {
<div className="layout">
<TopBar />
<NotificationList />
- <div className="layout__columns">
+ <main className="layout__columns">
<Instructions />
{this._renderInstructionsBar()}
<div className="workspace layout__main">
{this._renderEnvironment()}
</div>
- </div>
+ </main>
</div>
);
}
| 10 |
diff --git a/src/api/v4/layer/layer.js b/src/api/v4/layer/layer.js @@ -257,7 +257,7 @@ Layer.prototype._createInternalModel = function (engine) {
}, { engine: engine });
internalModel.on('change:error', function (model, value) {
- if (_isStyleError(value)) {
+ if (value && _isStyleError(value)) {
this._style.$setError(new CartoError(value));
}
}, this);
| 1 |
diff --git a/examples/collection-only/collection.json b/examples/collection-only/collection.json }
},
"assets": {
- "thumbnail": {
- "href": "thumbnail.png",
- "title": "Preview",
- "type": "image/png",
+ "metadata_iso_19139": {
"roles": [
- "thumbnail"
- ]
+ "metadata",
+ "iso-19139"
+ ],
+ "href": "https://storage.googleapis.com/open-cogs/stac-examples/sentinel-2-iso-19139.xml",
+ "title": "ISO 19139 metadata",
+ "type": "vnd.iso.19139+xml"
}
},
"summaries": {
| 3 |
diff --git a/src/ServerlessOffline.js b/src/ServerlessOffline.js @@ -21,7 +21,6 @@ module.exports = class ServerlessOffline {
constructor(serverless, options) {
this._apiGateway = null
this._apiGatewayWebSocket = null
- this._exitCode = 0
this._options = options
this._provider = serverless.service.provider
this._serverless = serverless
@@ -221,7 +220,7 @@ module.exports = class ServerlessOffline {
await this._apiGateway.stop(SERVER_SHUTDOWN_TIMEOUT)
if (process.env.NODE_ENV !== 'test') {
- process.exit(this._exitCode)
+ process.exit(0)
}
}
| 2 |
diff --git a/samples/csharp_dotnetcore/11.qnamaker/Properties/launchSettings.json b/samples/csharp_dotnetcore/11.qnamaker/Properties/launchSettings.json {
- "$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
- "applicationUrl": "http://localhost:3978",
+ "applicationUrl": "http://localhost:3978/",
"sslPort": 0
}
},
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
- "EchoBot": {
+ "QnABot": {
"commandName": "Project",
"launchBrowser": true,
- "applicationUrl": "https://localhost:3979;http://localhost:3978",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
- }
+ },
+ "applicationUrl": "http://localhost:3978/"
}
}
}
| 3 |
diff --git a/src/App/components/Card/ParticipantHeads/index.js b/src/App/components/Card/ParticipantHeads/index.js @@ -42,8 +42,16 @@ class ParticipantHeads extends Component {
}
})}
- {sortedArr.length > 4 && // if more than four participnats, tack on a placeholder
- <HeadWrapper style={{ position: 'relative', left: '-16px' }}>
+ {sortedArr.length > 5 && // if more than four participnats, tack on a placeholder
+ <HeadWrapper
+ style={{ position: 'relative', left: '-16px' }}
+ tipText={
+ sortedArr.length - 5 > 1
+ ? `${sortedArr.length - 5} others`
+ : `${sortedArr.length - 5} other`
+ }
+ tipLocation="top-right"
+ >
<Head src={`${process.env.PUBLIC_URL}/img/head_placeholder.png`} />
</HeadWrapper>}
| 9 |
diff --git a/desktop/sources/scripts/cursor.js b/desktop/sources/scripts/cursor.js @@ -170,8 +170,8 @@ export default function Cursor (terminal) {
}
this.toggleMode = function (val) {
- this.w = 1
- this.h = 1
+ this.w = 0
+ this.h = 0
this.mode = this.mode === 0 ? val : 0
}
| 12 |
diff --git a/apps/setting/settings.js b/apps/setting/settings.js @@ -360,7 +360,7 @@ function showSetTimeMenu() {
'Date': {
value: d.getDate(),
onchange: function (v) {
- this.value = ((v+29)%30)+1;
+ this.value = ((v+30)%31)+1;
d.setDate(this.value);
}
},
| 11 |
diff --git a/assets/js/modules/tagmanager/components/setup/SetupForm.js b/assets/js/modules/tagmanager/components/setup/SetupForm.js @@ -71,7 +71,6 @@ export default function SetupForm( { finishSetup } ) {
};
// We'll use form state to persist the chosen submit choice
// in order to preserve support for auto-submit.
- // Set `inProgress` optimistically to avoid flashes of progress bar and content.
setValues( FORM_SETUP, { submitMode, inProgress: true } );
try {
| 2 |
diff --git a/assets/js/components/surveys/CurrentSurvey.test.js b/assets/js/components/surveys/CurrentSurvey.test.js @@ -158,9 +158,7 @@ describe( 'CurrentSurvey', () => {
);
// Now submit question
- fireEvent.click( getByRole( 'button', { name: 'Submit' } ), {
- target: { value: STRING_110_CHARACTERS },
- } );
+ fireEvent.click( getByRole( 'button', { name: 'Submit' } ) );
expect( fetchMock ).toHaveBeenCalledTimes( 2 );
| 2 |
diff --git a/assets/js/util/index.js b/assets/js/util/index.js @@ -358,22 +358,18 @@ export const getReAuthUrl = ( slug, status ) => {
const {
connectUrl,
adminRoot,
- apikey,
} = googlesitekit.admin;
const { needReauthenticate } = window.googlesitekit.setup;
const { screenId } = googlesitekit.modules[ slug ];
- // For PageSpeedInsights, there is no setup needed if an API key already exists.
- const reAuth = ( 'pagespeed-insights' === slug && apikey && apikey.length ) ? false : status;
-
let redirect = addQueryArgs(
adminRoot, {
// If the module has a submenu page, and is being activated, redirect back to the module page.
page: ( slug && status && screenId ) ? screenId : 'googlesitekit-dashboard',
- reAuth,
+ reAuth: status,
slug,
}
);
| 2 |
diff --git a/examples/billboardsDragging/billboardsDragging.html b/examples/billboardsDragging/billboardsDragging.html 'label': {
'text': 'Touch me',
'size': [35],
- 'outlineColor': "rgba(0,0,0,.5)"
+ 'outlineColor': "rgba(0,0,0,.5)",
+ 'outline': 0.3
}
}],
'async': false
| 0 |
diff --git a/src/core/Animation.js b/src/core/Animation.js @@ -457,10 +457,12 @@ extend(Player.prototype, /** @lends animation.Player.prototype */{
this._playStartTime = t;
elapsed = 0;
}
- if (this.playState === 'finished' || this.playState === 'paused') {
+ if (this.playState === 'finished' || this.playState === 'paused' || this.playState === 'idle') {
if (onFrame) {
if (this.playState === 'finished') {
elapsed = this.duration;
+ } else if (this.playState === 'idle') {
+ elapsed = 0;
}
const frame = this._animation(elapsed, this.duration);
frame.state.playState = this.playState;
| 1 |
diff --git a/token-metadata/0x0AbdAce70D3790235af448C88547603b945604ea/metadata.json b/token-metadata/0x0AbdAce70D3790235af448C88547603b945604ea/metadata.json "symbol": "DNT",
"address": "0x0AbdAce70D3790235af448C88547603b945604ea",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/assets/js/modules/analytics-4/components/dashboard/ActivationBanner/ReminderBanner.stories.js b/assets/js/modules/analytics-4/components/dashboard/ActivationBanner/ReminderBanner.stories.js @@ -23,7 +23,7 @@ import ReminderBanner from './ReminderBanner';
import { CORE_USER } from '../../../../../googlesitekit/datastore/user/constants';
import WithRegistrySetup from '../../../../../../../tests/js/WithRegistrySetup';
-const Template = ( args ) => <ReminderBanner { ...args } />;
+const Template = () => <ReminderBanner onSubmitSuccess={ () => {} } />;
export const InitialNotice = Template.bind( {} );
InitialNotice.storyName = 'Before 1 June 2023';
@@ -73,34 +73,6 @@ PostCutoff.decorators = [
},
];
-export const Error = Template.bind( {} );
-Error.storyName = 'Error';
-Error.args = {
- errors: {
- getProperties: {
- code: 'fetch_error',
- message: 'You are probably offline.',
- },
- },
-};
-
export default {
title: 'Modules/Analytics4/ReminderBanner',
- component: ReminderBanner,
- args: {
- onSubmitSuccess: () => {},
- },
- decorators: [
- ( Story ) => {
- const setupRegistry = ( registry ) => {
- registry.dispatch( CORE_USER ).setReferenceDate( '2023-05-31' );
- };
-
- return (
- <WithRegistrySetup func={ setupRegistry }>
- <Story />
- </WithRegistrySetup>
- );
- },
- ],
};
| 2 |
diff --git a/src/js/modules/Edit/defaults/editors.js b/src/js/modules/Edit/defaults/editors.js -import input from './downloaders/input.js';
-import textarea from './downloaders/textarea.js';
-import number from './downloaders/number.js';
-import range from './downloaders/range.js';
-import select from './downloaders/select.js';
-import autocomplete from './downloaders/autocomplete.js';
-import star from './downloaders/star.js';
-import progress from './downloaders/progress.js';
-import tickCross from './downloaders/tickCross.js';
+import input from './editors/input.js';
+import textarea from './editors/textarea.js';
+import number from './editors/number.js';
+import range from './editors/range.js';
+import select from './editors/select.js';
+import autocomplete from './editors/autocomplete.js';
+import star from './editors/star.js';
+import progress from './editors/progress.js';
+import tickCross from './editors/tickCross.js';
module.exports = {
input:input,
| 3 |
diff --git a/src/WebInterface.js b/src/WebInterface.js @@ -35,8 +35,13 @@ class WebInterface {
app.use('/api', router);
app.use(whitelist(['127.0.0.1']));
app.use((err, req, res, next) => {
- console.error(err.stack);
- res.status(500).send('Server Error');
+ if (err.name == "WhitelistIpError") {
+ util.log(`[WEB]: Forbidden request: ${req.ip}`);
+ res.status(403).send('Forbidden');
+ } else {
+ util.log(`[WEB]: Illegal request: ${req.originalUrl}`);
+ res.status(404).send('Not Found');
+ }
});
}
| 7 |
diff --git a/components/Form/Select/Select.css b/components/Form/Select/Select.css @@ -42,10 +42,11 @@ select.high {
.arrow {
position: absolute;
right: 1rem;
- color: var(--color-greyDark);
+ color: var(--color-grey);
transform: translateY(-35%) rotate(180deg);
top: 50%;
pointer-events: none;
+ font-size: 0.75em;
}
select:focus,
| 7 |
diff --git a/frontend/imports/ui/client/widgets/markets.js b/frontend/imports/ui/client/widgets/markets.js @@ -43,12 +43,12 @@ Template.markets.viewmodel({
quoteHelper: '',
baseHelper: '',
showAll: false,
- price(token) {
+ price(pair) {
const trade = Trades.findOne(
{
$or: [
- { buyWhichToken: token.base, sellWhichToken: token.quote },
- { buyWhichToken: token.quote, sellWhichToken: token.base },
+ { buyWhichToken: pair.base, sellWhichToken: pair.quote },
+ { buyWhichToken: pair.quote, sellWhichToken: pair.base },
],
},
{ sort: { timestamp: -1 } },
@@ -58,7 +58,7 @@ Template.markets.viewmodel({
return 'N/A';
}
- if (trade.buyWhichToken === this.quoteCurrency()) {
+ if (trade.buyWhichToken === pair.quote) {
return new BigNumber(trade.buyHowMuch).div(new BigNumber(trade.sellHowMuch));
}
@@ -83,7 +83,7 @@ Template.markets.viewmodel({
});
trades.forEach((trade) => {
- if (trade.buyWhichToken === this.quoteCurrency()) {
+ if (trade.buyWhichToken === pair.quote) {
vol = vol.add(new BigNumber(trade.buyHowMuch));
} else {
vol = vol.add(new BigNumber(trade.sellHowMuch));
| 1 |
diff --git a/ui/app/css/itcss/components/transaction-list.scss b/ui/app/css/itcss/components/transaction-list.scss .tx-list-pending-item-container {
cursor: pointer;
-}
-.tx-list-pending-item-container:hover {
- background: $alto;
+ &:hover {
+ background: rgba($alto, .2);
+ }
}
.tx-list-date-wrapper {
| 7 |
diff --git a/scalene/scalene_profiler.py b/scalene/scalene_profiler.py @@ -1011,9 +1011,9 @@ class Scalene:
)
# Iterate through the array to compute the new current footprint
- # and update the global __memory_footprint_samples.
- before = stats.current_footprint
- assert before >= 0
+ # and update the global __memory_footprint_samples. Since on some systems,
+ # we get free events before mallocs, force `before` to always be at least 0.
+ before = max(stats.current_footprint, 0)
prevmax = stats.max_footprint
freed_last_trigger = 0
for (index, item) in enumerate(arr):
| 14 |
diff --git a/articles/users/guides/configure-automatic-migration.md b/articles/users/guides/configure-automatic-migration.md @@ -81,7 +81,7 @@ function getByEmail (email, callback) {
}
```
-By doing this, you are changing the **Login** and **Get User** [Database Action Scripts](/connections/database/mysql#3-provide-action-scripts) to NO-OP functions, essentially making it behave as a non-custom database connection..
+By doing this, you are changing the **Login** and **Get User** [Database Action Scripts](/connections/database/mysql#3-provide-action-scripts) to NO-OP functions, essentially making it behave as a non-custom database connection.
:::panel-warning Leave Import Users to Auth0 turned on
Make sure to leave the **Import Users to Auth0** option turned on. If you turn this option off Auth0 will only use the scripts to authenticate and perform other user actions instead of using the users that were imported locally.
| 2 |
diff --git a/app/talk/inbox-conversation.cjsx b/app/talk/inbox-conversation.cjsx @@ -109,7 +109,7 @@ module.exports = React.createClass
}
</div>
}
- <SingleSubmitButton className="delete-conversation" onClick={@handleDelete}>Archive this conversation</SingleSubmitButton>
+ <SingleSubmitButton className="delete-conversation" onClick={@handleDelete}>Delete this conversation</SingleSubmitButton>
<div>{@state.messages.map (message) -> <Message data={message} key={message.id} />}</div>
<CommentBox
header={"Send a message..."}
| 10 |
diff --git a/js/wazirx.js b/js/wazirx.js 'use strict';
const Exchange = require ('./base/Exchange');
-const { ExchangeError } = require ('./base/errors');
+const { ExchangeError, BadRequest } = require ('./base/errors');
module.exports = class wazirx extends Exchange {
describe () {
@@ -45,19 +45,21 @@ module.exports = class wazirx extends Exchange {
'depth',
'trades',
'time',
- 'historicalTrades',
],
},
+ 'private': [
+ 'historicalTrades',
+ ],
},
},
},
'exceptions': {
'exact': {
- '403': 'ab',
+ '1999': BadRequest, // {"code":1999,"message":"symbol is missing, symbol does not have a valid value"} message varies depending on the error
+ '2908': BadRequest, // {"code":2098,"message":"Request out of receiving window."}
},
},
'options': {
- 'cachedMarketData': {},
},
});
}
@@ -272,7 +274,7 @@ module.exports = class wazirx extends Exchange {
// "quoteQty":"65.59",
// "time":1641386701000,
// "isBuyerMaker":false
- // },
+ // }
//
const id = this.safeString (trade, 'id');
const timestamp = this.parse8601 (this.safeString (trade, 'time'));
@@ -391,9 +393,15 @@ module.exports = class wazirx extends Exchange {
return { 'url': url, 'method': method, 'body': body, 'headers': headers };
}
- handleErrors (statusCode, statusText, url, method, responseHeaders, responseBody, response, requestHeaders, requestBody) {
- if (statusCode !== 200) {
- const feedback = this.id + ' ' + responseBody;
+ handleErrors (code, reason, url, method, headers, body, response, requestHeaders, requestBody) {
+ //
+ // {"code":2098,"message":"Request out of receiving window."}
+ //
+ const errorCode = this.safeString (response, 'code');
+ if (errorCode !== undefined) {
+ const feedback = this.id + ' ' + body;
+ this.throwExactlyMatchedException (this.exceptions['exact'], errorCode, feedback);
+ this.throwBroadlyMatchedException (this.exceptions['broad'], body, feedback);
throw new ExchangeError (feedback);
}
}
| 9 |
diff --git a/config/sidebar.yml b/config/sidebar.yml @@ -155,15 +155,6 @@ articles:
- title: "Authorization"
url: "/extensions/authorization-extension"
- children:
- - title: "Groups"
- url: "/extensions/authorization-extension#groups"
-
- - title: "Roles"
- url: "/extensions/authorization-extension#roles"
-
- - title: "Permissions"
- url: "/extensions/authorization-extension#permissions"
- title: "Multifactor Authentication"
url: "/multifactor-authentication"
@@ -184,7 +175,7 @@ articles:
url: "/multifactor-authentication/user-guide"
- title: "SMS"
- url: "/multifactor-authentication#mfa-with-sms"
+ url: "/multifactor-authentication"
- title: "Google Authenticator"
url: "/multifactor-authentication/google-authenticator"
| 2 |
diff --git a/.github/workflows/continuous-integration-storybook-percy.yml b/.github/workflows/continuous-integration-storybook-percy.yml @@ -39,7 +39,7 @@ jobs:
CI: true
- name: Percy for Storybook
- uses: percy/[email protected]
+ uses: percy/[email protected]
with:
flags: '--config=percy.config.yml'
env:
| 4 |
diff --git a/src/neat.js b/src/neat.js @@ -7,6 +7,19 @@ var config = require('./config');
// Easier variable naming
var selection = methods.selection;
+let filterGenome = function(pickGenome, adjustGenome) {
+ if(pickGenome) {
+ let pickedIndexes = _.each(this.population, function(genome, index) {
+ if(pickGenome(genome)) return index
+ });
+
+ if(adjustGenome) {
+ for(const i in pickedIndexes) this.population[i] = adjustGenome(this.population[i])
+ } else {
+ for(const i in pickedIndexes) this.population[i] = this.template
+ }
+ }
+}
/**
* Runs the NEAT algorithm on group of neural networks.
@@ -159,17 +172,7 @@ Neat.prototype = {
await this.evaluate();
}
- if(pickGenome) {
- let pickedIndexes = _.each(this.population, function(genome, index) {
- if(pickGenome(genome)) return index
- });
-
- if(adjustGenome) {
- for(const i in pickedIndexes) this.population[i] = adjustGenome(this.population[i])
- } else {
- for(const i in pickedIndexes) this.population[i] = this.template
- }
- }
+ filterGenome(pickGenome, adjustGenome);
this.sort();
@@ -200,17 +203,7 @@ Neat.prototype = {
this.population.push(...elitists);
- if(pickGenome) {
- let pickedIndexes = _.each(this.population, function(genome, index) {
- if(pickGenome(genome)) return index
- });
-
- if(adjustGenome) {
- for(const i in pickedIndexes) this.population[i] = adjustGenome(this.population[i])
- } else {
- for(const i in pickedIndexes) this.population[i] = this.template
- }
- }
+ filterGenome(pickGenome, adjustGenome);
// Reset the scores
for (i = 0; i < this.population.length; i++) {
| 5 |
diff --git a/src/hosted_agents/hosted_agents.js b/src/hosted_agents/hosted_agents.js @@ -6,9 +6,6 @@ const path = require('path');
const util = require('util');
const fs = require('fs');
const _ = require('lodash');
-const os = require('os');
-const dns = require('dns');
-const url = require('url');
const system_store = require('../server/system_services/system_store').get_instance();
const auth_server = require('../server/common_services/auth_server');
@@ -21,9 +18,6 @@ const promise_utils = require('../util/promise_utils');
const config = require('../../config');
-const ENDPOINT_DNS_CACHE_TTL = 60000;
-
-
class HostedAgents {
static instance() {
@@ -48,7 +42,6 @@ class HostedAgents {
.then(() => {
dbg.log0('Started hosted_agents');
this._monitor_stats();
- this._refresh_hosts_addresses();
});
}
dbg.log1(`What is started may never start`);
@@ -102,43 +95,6 @@ class HostedAgents {
});
}
- _refresh_hosts_addresses() {
- if (os.type() !== 'Linux') return;
- let resolved_hosts = [];
- promise_utils.pwhile(() => true, () => {
- const cloud_endpoints = _.values(this._started_agents)
- .filter(entry => Boolean(entry.pool.cloud_pool_info))
- .map(entry => {
- const endpoint_host = url.parse(entry.pool.cloud_pool_info.endpoint).host;
- if (entry.pool.cloud_pool_info.endpoint_type === 'AZURE') {
- return entry.pool.cloud_pool_info.access_keys.access_key + '.' + endpoint_host;
- } else {
- return endpoint_host;
- }
- });
- return P.map(cloud_endpoints, endpoint =>
- P.fromCallback(callback => dns.resolve4(endpoint, callback))
- .then(addresses => ({ endpoint, address: addresses[0] }))
- .catch(err => {
- dbg.warn(`failed resolving endpoint ${endpoint} with error`, err);
- return;
- }))
- .then(hosts => {
- dbg.log0(`got these addresses from dns queries:`, hosts);
- // filter out unresolved endpoints
- resolved_hosts = hosts.filter(Boolean);
- let etc_hosts_string = '127.0.0.1\t\tlocalhost localhost.localdomain localhost4 localhost4.localdomain4\n' +
- '::1\t\tlocalhost localhost.localdomain localhost6 localhost6.localdomain6\n\n#resolved cloud resources\n';
- etc_hosts_string += resolved_hosts.map(host => host.address + '\t\t' + host.endpoint).join('\n');
- const tmp_etc_hosts = '/tmp/etc_hosts' + Date.now();
- return fs.writeFileAsync(tmp_etc_hosts, etc_hosts_string)
- .then(() => fs.renameAsync(tmp_etc_hosts, '/etc/hosts'))
- .then(() => dbg.log0('/etc/hosts updated with', resolved_hosts));
- })
- .catch(err => dbg.error('got error in _refresh_hosts_addresses:', err))
- .delay(ENDPOINT_DNS_CACHE_TTL);
- });
- }
_start_pool_agent(pool) {
| 2 |
diff --git a/app_web/src/ui/sass.scss b/app_web/src/ui/sass.scss @@ -343,6 +343,11 @@ canvas
color: #f2f2f2 !important;
}
+.checkbox:hover
+{
+ color: #f2f2f2 !important;
+}
+
.input:active, .input:focus, .is-active.input, .is-active.textarea, .is-focused.input,
.is-focused.textarea, .select select.is-active, .select select.is-focused,
.select select:active, .select select:focus, .taginput .is-active.taginput-container.is-focusable,
| 12 |
diff --git a/player-avatar-binding.js b/player-avatar-binding.js @@ -50,8 +50,16 @@ export function applyPlayerModesToAvatar(player, session, rig) {
}
return null;
})();
+ {
+ const isSession = !!session;
+ const isPlayerAiming = !!aimAction && !aimAction.playerAnimation;
+ const isObjectAimable = !!aimComponent;
+ const isHandEnabled = (isSession || (isPlayerAiming && isObjectAimable));
for (let i = 0; i < 2; i++) {
- rig.setHandEnabled(i, !!session || (i === 0 && (!!aimAction && !aimAction.playerAnimation) && !!aimComponent)/* || (useTime === -1 && !!appManager.equippedObjects[i])*/);
+ const isExpectedHandIndex = i === ((aimComponent?.ikHand === 'left') ? 0 : 1);
+ const enabled = isHandEnabled && isExpectedHandIndex;
+ rig.setHandEnabled(i, enabled);
+ }
}
rig.setTopEnabled(
(!!session && (rig.inputs.leftGamepad.enabled || rig.inputs.rightGamepad.enabled))
| 0 |
diff --git a/lib/stats.js b/lib/stats.js @@ -42,9 +42,11 @@ console.log(source+": "+action+"("+object+", "+label+", "+value+")");
if (this.readyState === 4) {
if (this.status === 200) {
} else {
+ if (!this.response || this.response.indexOf("inactive") == -1) {
console.log("Error sending log");
}
}
+ }
};
req.send(JSON.stringify(body));
}
| 9 |
diff --git a/src/core/operations/NetBIOS.js b/src/core/operations/NetBIOS.js -import Utils from "../Utils.js";
-
/**
* NetBIOS operations.
*
@@ -29,14 +27,13 @@ const NetBIOS = {
offset = args[0];
if (input.length <= 16) {
+ let len = input.length;
+ input.length = 16;
+ input.fill(32, len, 16);
for (let i = 0; i < input.length; i++) {
output.push((input[i] >> 4) + offset);
output.push((input[i] & 0xf) + offset);
}
- for (let i = input.length; i < 16; i++) {
- output.push(67);
- output.push(65);
- }
}
return output;
@@ -59,7 +56,7 @@ const NetBIOS = {
output.push((((input[i] & 0xff) - offset) << 4) |
(((input[i + 1] & 0xff) - offset) & 0xf));
}
- output = Utils.strToByteArray(Utils.byteArrayToChars(output).trim());
+ output = output.filter(x => x !== 32);
}
return output;
| 2 |
diff --git a/articles/support/testing.md b/articles/support/testing.md @@ -42,3 +42,11 @@ These tools should provide activity logs that help you identify anything that is
### HAR Files
If you discover an issue that you can reproduce, you can [create a HAR file](/tutorials/troubleshooting-with-har-files) and send it to our Support team for additional assistance.
+
+## Testing Rules and Custom Database Connections
+
+If you would like to automate the testing of [Rules](/rules) or [Custom Database Connections](/connections/database/custom-db), there are a couple of NPM packages that can assist you with this.
+
+The [auth0-rules-testharness](https://www.npmjs.com/package/auth0-rules-testharness) package provides an easy way to deploy, execute, and test the output of Auth0 Rules using a real webtask sandbox environment.
+
+The [auth0-custom-db-testharness](https://www.npmjs.com/package/auth0-custom-db-testharness) package provides an easy way to deploy, execute, and test the output of Auth0 Custom DB Scripts using a real webtask sandbox environment.
\ No newline at end of file
| 0 |
diff --git a/layouts/partials/helpers/config.html b/layouts/partials/helpers/config.html {{- end -}}
{{- else if .data.file -}}
{{- if (in (slice "css" "icon" "js") .type) .data.file -}}
- {{- $page_scratch := .root.Scratch -}}
- {{- $page_scratch.Set "config_file" .data.file -}}
-
- {{/* Page specific resource */}}
- {{- if .root.Page -}}
- {{- $location := (printf "%s/%s" .root.Page.Dir .data.file) -}}
- {{- if (fileExists (printf "content/%s" $location)) -}}
- {{- $page_scratch.Set "config_file" $location -}}
- {{- end -}}
- {{- end -}}
-
- {{- $location := ($page_scratch.Get "config_file") | relLangURL -}}
+ {{- $location := .data.file | relLangURL -}}
{{- if and (eq .type "icon") (eq .head true) }}
{{ printf "<link rel='icon' href='%s'>" $location | safeHTML }}
{{- else if eq .type "css" }}
| 2 |
diff --git a/packages/yoroi-ergo-connector/example-cardano/index.js b/packages/yoroi-ergo-connector/example-cardano/index.js @@ -525,7 +525,7 @@ createTx.addEventListener('click', () => {
const txReq = {
validityIntervalStart: 42,
- includeInputs: ['18a6084155f88650acc00f47f0b84e7f0c59e2b8e3a96f7a17e57b46d880b47e0'],
+ includeInputs: [randomUtxo.utxo_id],
includeOutputs: [outputHex],
includeTargets: [
{
| 14 |
diff --git a/src/mixins/helpers.js b/src/mixins/helpers.js @@ -397,21 +397,17 @@ var helpers = {
this.slideHandler(nextIndex);
},
autoPlay: function (autoplay=false) {
- if (this.state.autoPlayTimer) {
- clearTimeout(this.state.autoPlayTimer);
+ if (this.autoplayTimer) {
+ clearTimeout(this.autoplayTimer)
}
if (autoplay || this.props.autoplay) {
- this.setState({
- autoPlayTimer: setTimeout(this.play, this.props.autoplaySpeed)
- });
+ this.autoplayTimer = setTimeout(this.play, this.props.autoplaySpeed)
}
},
pause: function () {
- if (this.state.autoPlayTimer) {
- clearTimeout(this.state.autoPlayTimer);
- this.setState({
- autoPlayTimer: null
- });
+ if (this.autoplayTimer) {
+ clearTimeout(this.autoplayTimer)
+ this.autoplayTimer = null
}
}
};
| 10 |
diff --git a/appjs/logicjavascript.js b/appjs/logicjavascript.js @@ -3907,7 +3907,7 @@ function Median() {
let median =
len % 2 === 0
? (parseInt(arr[mid]) + parseInt(arr[mid - 1])) / 2
- : arr[mid - 1];
+ : arr[mid];
document.getElementById(
"Meanresult"
).innerHTML = `After Sorting:- ${arr}</br>`;
| 1 |
diff --git a/tools/subgraph/README.md b/tools/subgraph/README.md @@ -19,7 +19,7 @@ ID: `Qma3GJn9Wucuo3AaJMQBmLXyiooiWNcwVrGUWWxTkiGtoD`
1. Run queries against the endpoint at the end of the previous step
## Deploying to hosted service
-1. Authenticate against with ` graph auth https://api.thegraph.com/deploy/ <ACCESS_TOKEN>`
+1. Authenticate with ` graph auth https://api.thegraph.com/deploy/ <ACCESS_TOKEN>`
1. In another window and within `airswap-protocols`, run `yarn test`
1. From `airswap-protocols/tools/subgraph` run `yarn prepare:mainnet && yarn codegen && yarn remove-local; yarn create-local; yarn deploy-local`
1. Wait for the hosted service to index the blockchain (this can take anywhere from minutes to hours)
| 3 |
diff --git a/_data/conferences.yml b/_data/conferences.yml - title: AAAI
hindex: 95
- year: 2020
- id: aaai20
- link: https://aaai.org/Conferences/AAAI-20/
- deadline: '2019-09-05 23:59:59'
- timezone: UTC-10
+ year: 2021
+ id: aaai21
+ link: https://aaai.org/Conferences/AAAI-21/
+ deadline: '2019-09-09 23:59:59'
+ timezone: UTC-12
date: February 7-12, 2020
- place: New York, USA
+ place: Vancouver, Canada
sub: ML
+ note: '<b>NOTE</b>: Mandatory abstract deadline on September 01, 2020'
- title: ICRA
hindex: 82
| 3 |
diff --git a/__tests__/support/OfflineBuilder.js b/__tests__/support/OfflineBuilder.js 'use strict'
-const getFunctionOptions = require('../../src/getFunctionOptions.js')
+const { join } = require('path')
const ServerlessOffline = require('../../src/ServerlessOffline.js')
const ServerlessBuilder = require('./ServerlessBuilder.js')
+const { splitHandlerPathAndName } = require('../../src/utils/index.js')
module.exports = class OfflineBuilder {
constructor(serverlessBuilder, options) {
@@ -14,11 +15,14 @@ module.exports = class OfflineBuilder {
addFunctionConfig(functionName, functionConfig, handler) {
this.serverlessBuilder.addFunction(functionName, functionConfig)
- const funOptions = getFunctionOptions(functionName, functionConfig, '.')
- const [, handlerPath] = funOptions.handlerPath.split('/')
+ const [handlerPath, handlerName] = splitHandlerPathAndName(
+ functionConfig.handler,
+ )
+
+ const _handlerPath = join('.', handlerPath)
- this.handlers[handlerPath] = {
- [funOptions.handlerName]: handler,
+ this.handlers[_handlerPath] = {
+ [handlerName]: handler,
}
return this
| 14 |
diff --git a/lime/_backend/html5/HTML5Application.hx b/lime/_backend/html5/HTML5Application.hx @@ -367,8 +367,18 @@ class HTML5Application {
case "beforeunload":
+ if (!event.defaultPrevented) {
+
parent.window.onClose.dispatch ();
+ if (parent.window.onClose.canceled) {
+
+ event.preventDefault ();
+
+ }
+
+ }
+
}
}
| 7 |
diff --git a/aura-impl/src/main/resources/aura/AuraInstance.js b/aura-impl/src/main/resources/aura/AuraInstance.js @@ -679,7 +679,7 @@ AuraInstance.prototype.finishInit = function(doNotInitializeServices) {
}
// Unless we are in IntegrationServices, dispatch location hash change.
- if (!doNotInitializeServices) {
+ if (!doNotInitializeServices && !Aura["disableHistoryService"]) {
$A.historyService.init();
}
| 11 |
diff --git a/packages/openneuro-server/graphql/resolvers/dataset.js b/packages/openneuro-server/graphql/resolvers/dataset.js @@ -32,7 +32,7 @@ export const snapshotCreationComparison = ({ created: a }, { created: b }) => {
*/
export const datasetName = obj => {
return snapshots(obj).then(results => {
- if (results) {
+ if (results && results.length) {
// Return the latest snapshot name
const sortedSnapshots = results.sort(snapshotCreationComparison)
return description(obj, {
| 1 |
diff --git a/exampleSite/content/_index/editor.md b/exampleSite/content/_index/editor.md @@ -3,4 +3,8 @@ date = "2018-07-07"
fragment = "react-portal"
weight = "1110"
background = "light"
+# TODO: Remove this controller and the js file related to it later on since it's
+# just to demo how the editor would be rendered from the theme side. I don't
+# think it's needed from the theme side to render the editor. We can use the
+# same strategy we're using for the counter to render the editor.
+++
| 0 |
diff --git a/services/importer/lib/importer/downloader.rb b/services/importer/lib/importer/downloader.rb @@ -114,7 +114,6 @@ module CartoDB
attr_reader :source_file, :etag, :last_modified, :http_response_code, :datasource
def initialize(url, http_options = {}, options = {})
- @url = url
raise UploadError if url.nil?
@http_options = http_options
| 2 |
diff --git a/tests/time.js b/tests/time.js test("curTime", 1, function() {
var startTime, lastKnownTime;
+ var framesTriggered = 0;
Crafty.e("").bind("EnterFrame", function(params) {
+ framesTriggered++;
if (!startTime) {
startTime = params.gameTime;
} else {
setTimeout(function() {
var endTime = lastKnownTime;
- ok(endTime > startTime, "EndTime " + endTime + " must be larger than StartTime " + startTime);
+
+ ok(endTime > startTime, "After " + framesTriggered + " frames triggered, EndTime " + endTime + " must be larger than StartTime " + startTime);
start();
}, 100);
stop(); // pause the QUnit so the timeout has time to complete.
| 0 |
diff --git a/src/Nottingham/wizards/en-GB/topXQ.xwd b/src/Nottingham/wizards/en-GB/topXQ.xwd </pageWizard>
<!-- TXQ PAGE=============================-->
-<topXQ menu = "Interactivity" menuItem = "Top X Question " hint = "Poses a question with multiple answers where the student can't see the answers like in a MSQ. The user can give the answers in any order." icon="icTopXQ" thumb="thumbs/topXQ.jpg" remove = "true">
+<topXQ menu = "Interactivity" menuItem = "Answer X of Y" hint = "Poses a question with multiple answers where the student can't see the answers like in a MCQ. The user can give the answers in any order." icon="icTopXQ" thumb="thumbs/topXQ.jpg" remove = "true">
<name label = "Page Title" type = "TextInput" wysiwyg = "true"/>
<align label = "Align Text" options = "Left,Right" type = "ComboBox" data = "Left,Right" defaultValue = "Left" width = "100"/>
<instruction label = "Instruction" type = "TextArea" height = "100"/>
| 10 |
diff --git a/src/utilities/borders.less b/src/utilities/borders.less &border-l-light { .border-l-light; }
&border-l-light-soft { .border-l-light-soft; }
&border-l-light-softer { .border-l-light-softer; }
- &border-brand { .border-brand; }
- &border-danger { .border-danger; }
- &border-danger-soft { .border-danger-soft; }
&border-invisible { .border-invisible; }
&rounded-sm { .rounded-sm; }
&rounded-t-sm { .rounded-t-sm; }
| 2 |
diff --git a/src/workers/generateAsync.worker.js b/src/workers/generateAsync.worker.js @@ -41,6 +41,12 @@ global.onmessage = function ( { data } ) {
options.onProgress = onProgressCallback;
+ }
+
+ if ( options.groups ) {
+
+ geometry.groups = options.groups;
+
}
const bvh = new MeshBVH( geometry, options );
| 0 |
diff --git a/components/header.js b/components/header.js @@ -12,7 +12,7 @@ const links = [
{text: 'Guides', href: '/guides'},
{text: 'API', href: '/api'},
{text: 'Outils', href: '/tools'},
- {text: 'FAQ', href: '/faq'},
+ {text: 'Documentation', href: 'https://doc.adresse.data.gouv.fr/', isExternal: true},
{text: 'Nous contacter', href: '/nous-contacter'}
]
@@ -32,7 +32,11 @@ function Header() {
<ul className='nav__links'>
{links.map(link => (
<li key={link.text}>
+ {link.isExternal ? (
+ <a href={link.href}>{link.text}</a>
+ ) : (
<Link href={link.href}><a>{link.text}</a></Link>
+ )}
</li>
))}
</ul>
| 14 |
diff --git a/test/api/auth.api.tests.js b/test/api/auth.api.tests.js @@ -56,7 +56,7 @@ describe('auth api', () => {
// Register / sign up a new user
- describe('signup', () => {
+ describe('signup with md5', () => {
it('gives access to personal /stream', async () => {
const { jar, body: signupBody } = await signupAs(TEST_USER);
assert.ifError(signupBody.error);
@@ -67,7 +67,7 @@ describe('auth api', () => {
});
});
- describe('with secure hash', () => {
+ describe('signup with secure hash', () => {
const secureUser = {
name: 'secure user',
email: '[email protected]',
| 10 |
diff --git a/netlify.toml b/netlify.toml @@ -13,10 +13,6 @@ directory = "netlify/functions/"
function = "user-preferences"
path = "/account/preferences/"
-# [[edge_functions]]
-# function = "eleventy-edge"
-# path = "/docs/*"
-
[[redirects]]
from = "/authors/:name/"
to = "/.netlify/builders/serverless"
@@ -32,7 +28,7 @@ force = true
[[redirects]]
from = "/youtube"
-to = "https://www.youtube.com/channel/UCskGTioqrMBcw8pd14_334A"
+to = "https://www.youtube.com/c/EleventyVideo"
status = 301
force = true
| 4 |
diff --git a/packages/magda-web/src/SearchFilters/DragBar.js b/packages/magda-web/src/SearchFilters/DragBar.js @@ -25,9 +25,12 @@ class DragBar extends Component {
.attr('height', Math.abs(this.props.dragBarData[0] - this.props.dragBarData[1]))
.attr('x', 0)
.attr('y', this.props.dragBarData[0] - this.props.dragBarData[1] < 0 ? this.props.dragBarData[0] : this.props.dragBarData[1])
- .style('fill', colorLight);
+ .style('fill', color);
// create two handles to listen to drag events
+ // TO DO: use fill:url(#arrow) to add icon
+ // why use fill? because you can't append svg element inside a rect, and creating extra .svg element means extra element to update position etc.
+ // using icon directly as handles gives us a handle that is too small and very difficult to use
this._handles = d3Select(g).selectAll('rect.handle')
.data(data).enter().append('rect')
.attr('class', 'handle')
| 7 |
diff --git a/dapp/src/hooks/useSwapEstimator.js b/dapp/src/hooks/useSwapEstimator.js @@ -419,7 +419,7 @@ const useSwapEstimator = ({
approveAllowanceNeeded ||
!userHasEnoughStablecoin(coinToSwap, parseFloat(inputAmountRaw))
) {
- const swapGasUsage = 520000
+ const swapGasUsage = 350000
const approveGasUsage = approveAllowanceNeeded
? gasLimitForApprovingCoin(coinToSwap)
: 0
| 12 |
diff --git a/CHANGELOG.md b/CHANGELOG.md # Changelog
+## v1.4.2 (2019-8-28)
+
+### Bug Fixes
+
+* Added support for pages that reference ES6 modules ([testcafe-hammerhead/#1725](https://github.com/DevExpress/testcafe-hammerhead/issues/1725))
+* Events are now emulated correctly if the mouse pointer does not move during scrolling ([#3564](https://github.com/DevExpress/testcafe/issues/3564))
+* Fixed a Capacitor.js compatibility issue ([testcafe-hammerhead/#2094](https://github.com/DevExpress/testcafe-hammerhead/issues/2094))
+* Fixed Node.js TLS warning suppression ([testcafe-hammerhead/PR#2109](https://github.com/DevExpress/testcafe-hammerhead/pull/2109))
+* Fixed a warning about injecting duplicated scripts ([#4116](https://github.com/DevExpress/testcafe/issues/4116))
+* Fixed a bug when information messages were printed in `stderr` ([#3873](https://github.com/DevExpress/testcafe/issues/3873))
+
## v1.4.1 (2019-8-15)
### Bug Fixes
| 0 |
diff --git a/userscript.user.js b/userscript.user.js @@ -38943,6 +38943,8 @@ var $$IMU_EXPORT$$;
domain_nowww === "staples-3p.com" ||
// https://s.shld.net/is/image/Sears/20190528_k_HP_Hero_MayWk4_01?$cq_width_300$&qlt=90,0&resMode=sharp&op_usm=0.9,0.5,0,0,&jpegSize=100&bgc=ffffff
// https://s.shld.net/is/image/Sears/20190528_k_HP_Hero_MayWk4_01?scl=1&fmt=png-alpha
+ // https://s.shld.net/is/image/Sears/dishwashercycle_hero-qm-wid-eq-1500-amp-qlt-eq-100-amp-op_usm-eq-0.9,0.5,0,0
+ // https://s.shld.net/is/image/Sears/dishwashercycle_hero?scl=1&fmt=png-alpha
domain === "s.shld.net" ||
// https://assets.ray-ban.com/is/image/RayBan/tile_ddm_eye_227x130_oval?$jpeg-full$
// https://assets.ray-ban.com/is/image/RayBan/tile_ddm_eye_227x130_oval?scl=1&fmt=png-alpha
@@ -39003,6 +39005,19 @@ var $$IMU_EXPORT$$;
return obj;
}
+ // https://s.shld.net/is/image/Sears/dishwashercycle_hero-qm-wid-eq-1500-amp-qlt-eq-100-amp-op_usm-eq-0.9,0.5,0,0
+ // https://s.shld.net/is/image/Sears/dishwashercycle_hero?wid=1500&qlt=100&op_usm=0.9,0.5,0,0
+ if (string_indexof(src, "?") < 0) {
+ var basename = url_basename(src);
+ var querystr = basename.replace(/.*?-qm-/, "?");
+ querystr = querystr
+ .replace(/-eq-/g, "=")
+ .replace(/-amp-/g, "&");
+
+ newsrc = src.replace(/^(.*\/)[^/]+$/, "$1") + basename.replace(/(.*)?-qm-.*$/, "$1") + querystr;
+ if (newsrc !== src) return newsrc;
+ }
+
var srcadd = "";
if (src.match(/\.(?:jpe?g|JPE?G)(?:\?.*)?$/))
@@ -87045,6 +87060,8 @@ var $$IMU_EXPORT$$;
// doesn't work for all:
// https://www.bergen.kommune.no/publisering/api/bilder/T537319873?scaleWidth=950
// https://www.bergen.kommune.no/publisering/api/bilder/T537319873 -- 404
+ // https://www.bergen.kommune.no/publisering/api/bilder/T537319879?scaleWidth=550
+ // https://www.bergen.kommune.no/publisering/api/bilder/T537319879
return src.replace(/(\/publisering\/+api\/+bilder\/+[^?#]+)\?scaleWidth=.*$/, "$1");
}
| 7 |
diff --git a/js/Helpers/SideSplit/MiniDraw.js b/js/Helpers/SideSplit/MiniDraw.js @@ -111,16 +111,16 @@ class annotations{
// draw using current viewer state
draw(){
- this.x1 = this.imagingHelper._viewportOrigin['x'];
- this.y1 = this.imagingHelper._viewportOrigin['y'];
- this.x2 = this.x1 + this.imagingHelper._viewportWidth;
- this.y2 = this.y1 + this.imagingHelper._viewportHeight;
+ let x1 = this.imagingHelper._viewportOrigin['x'];
+ let y1 = this.imagingHelper._viewportOrigin['y'];
+ let x2 = x1 + this.imagingHelper._viewportWidth;
+ let y2 = y1 + this.imagingHelper._viewportHeight;
var max = new OpenSeadragon.Point(this.imagingHelper.physicalToDataX(9), this.imagingHelper.physicalToDataY(9));
var origin = new OpenSeadragon.Point(this.imagingHelper.physicalToDataX(0), this.imagingHelper.physicalToDataY(0));
var footprint = (max.x - origin.x) * (max.y - origin.y);
- this.store.getAlgData(x, y, x1, y1, footprint, this.selection, function(data){
+ this.store.getAlgData(x1, y1, x2, y2, footprint, this.selection, function(data){
drawFromList(data, this.context);
});
}
| 10 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.