code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/src/technologies/a.json b/src/technologies/a.json ],
"cpe": "cpe:/a:afterpay:afterpay",
"description": "Afterpay is a 'buy now, pay later' platform that makes it possible to pay off purchased goods in fortnightly instalments.",
- "dom": "#afterpay, .afterpay, [aria-label='Afterpay'], link[href*='/wp-content/plugins/afterpay-gateway-for-woocommerce/']",
+ "dom": "#afterpay, .afterpay, .AfterpayMessage, [aria-label='Afterpay'], link[href*='/wp-content/plugins/afterpay-gateway-for-woocommerce/']",
"icon": "afterpay.png",
"js": {
"Afterpay": "",
"portal\\.afterpay\\.com",
"static\\.afterpay\\.com",
"present-afterpay\\.js",
- "afterpay-products\\.min\\.js"
+ "afterpay-products\\.min\\.js",
+ "js\\.stripe\\.com/v3/fingerprinted/js/elements-afterpay-clearpay-message-.+\\.js"
],
"website": "https://www.afterpay.com/"
},
| 7 |
diff --git a/packages/laconia-test/test/LaconiaContextSpierFactory.spec.js b/packages/laconia-test/test/LaconiaContextSpierFactory.spec.js @@ -14,7 +14,7 @@ describe("LaconiaContextSpierFactory", () => {
describe("when bucket name is set", () => {
let spierFactory;
beforeEach(() => {
- lc.env.LACONIA_TEST_SPY_BUCKET_NAME = "bucket name";
+ lc.env.LACONIA_TEST_SPY_BUCKET = "bucket name";
spierFactory = new LaconiaContextSpierFactory(lc);
});
@@ -36,14 +36,14 @@ describe("LaconiaContextSpierFactory", () => {
describe("when bucket name is not set", () => {
it("should return a new instance of NullSpier when bucket name is not defined", () => {
- lc.env.LACONIA_TEST_SPY_BUCKET_NAME = undefined;
+ lc.env.LACONIA_TEST_SPY_BUCKET = undefined;
const spierFactory = new LaconiaContextSpierFactory(lc);
const spy = spierFactory.makeSpier();
expect(spy).toBeInstanceOf(NullSpier);
});
it("should return a new instance of NullSpier when bucket name is 'disabled'", () => {
- lc.env.LACONIA_TEST_SPY_BUCKET_NAME = "disabled";
+ lc.env.LACONIA_TEST_SPY_BUCKET = "disabled";
const spierFactory = new LaconiaContextSpierFactory(lc);
const spy = spierFactory.makeSpier();
expect(spy).toBeInstanceOf(NullSpier);
| 10 |
diff --git a/src/components/nodes/sequenceFlow/index.js b/src/components/nodes/sequenceFlow/index.js @@ -18,6 +18,11 @@ export default {
return moddle.create('bpmndi:BPMNEdge');
},
inspectorData(node) {
+ // If the flow's source is doesn't have condition remove it:
+ const hasCondition = ['bpmn:ExclusiveGateway', 'bpmn:InclusiveGateway'].includes(node.definition.sourceRef.$type);
+ if (!hasCondition) {
+ delete node.definition.conditionExpression;
+ }
return Object.entries(node.definition).reduce((data, [key, value]) => {
if (key === 'conditionExpression') {
data[key] = value.body;
@@ -37,6 +42,7 @@ export default {
// If the flow's source is doesn't have condition remove it:
if (!hasCondition) {
delete value.conditionExpression;
+ delete node.definition.conditionExpression;
}
// Go through each property and rebind it to our data
| 2 |
diff --git a/token-metadata/0x0E22734e078d6e399BCeE40a549DB591C4EA46cB/metadata.json b/token-metadata/0x0E22734e078d6e399BCeE40a549DB591C4EA46cB/metadata.json "symbol": "STM",
"address": "0x0E22734e078d6e399BCeE40a549DB591C4EA46cB",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/pages/profileAddressBook.js b/src/pages/profileAddressBook.js @@ -90,24 +90,11 @@ class ProfileAddressBook extends Component {
<section>
<Grid container spacing={24}>
<Grid item xs={12} md={3}>
- <AccountProfileInfo viewer={viewer} />
- <p>This is the menu placeholder</p>
- <p>This is the menu placeholder</p>
- <p>This is the menu placeholder</p>
- <p>This is the menu placeholder</p>
- <p>This is the menu placeholder</p>
+ <AccountProfileInfo viewer={account} />
+ <InPageMenu menuItems={menuItems} />
</Grid>
<Grid item xs={12} md={9}>
- <p>This is the address book placeholder </p>
- <p>This is the address book placeholder </p>
- <p>This is the address book placeholder </p>
- <p>This is the address book placeholder </p>
- <p>This is the address book placeholder </p>
- <p>This is the address book placeholder </p>
- <p>This is the address book placeholder </p>
- <p>This is the address book placeholder </p>
- <p>This is the address book placeholder </p>
- <p>This is the address book placeholder </p>
+ <AddressBook account={accountAddressBook} />
</Grid>
</Grid>
</section>
| 2 |
diff --git a/app/containers/NetworkProducers/saga.js b/app/containers/NetworkProducers/saga.js @@ -43,10 +43,12 @@ function* getProducers() {
key = data.rows.pop().owner;
}
data.rows.map(row => {
+ if (row.is_active == "1") {
producers.push({
...row,
vote_percent: (row.total_votes / total_vote) * 100,
});
+ }
});
}
yield put(fetchedProducers(producers));
| 1 |
diff --git a/spec/realtime/auth.test.js b/spec/realtime/auth.test.js @@ -424,13 +424,17 @@ define(['ably', 'shared_helper', 'async'], function(Ably, helper, async) {
*/
function authCallback_failures(realtimeOptions, expectFailure) {
return function(test) {
+ test.expect(3);
+
var realtime = helper.AblyRealtime(realtimeOptions);
realtime.connection.on(function(stateChange) {
if(stateChange.previous !== 'initialized') {
if (helper.bestTransport === 'jsonp') {
- test.expect(1);
+ // auth endpoints don't envelope, so we assume the 'least harmful' option, which is a disconnection with concomitant retry
+ test.equal(stateChange.current, 'disconnected', 'Check connection goes to the expected state');
+ // jsonp doesn't let you examine the statuscode
+ test.equal(stateChange.reason.statusCode, 401, 'Check correct cause error code');
} else {
- test.expect(3);
test.equal(stateChange.current, expectFailure ? 'failed' : 'disconnected', 'Check connection goes to the expected state');
test.equal(stateChange.reason.statusCode, expectFailure ? 403 : 401, 'Check correct cause error code');
}
| 7 |
diff --git a/docs/en-us/1.3.6/user_doc/docker-deployment.md b/docs/en-us/1.3.6/user_doc/docker-deployment.md @@ -74,7 +74,7 @@ In this way, you need to install [docker](https://docs.docker.com/engine/install
#### 2. Please login to the PostgreSQL database and create a database named `dolphinscheduler`
-#### 3. Initialize the database, import `sql/dolphinscheduler-postgre.sql` to create tables and initial data
+#### 3. Initialize the database, import `sql/dolphinscheduler_postgre.sql` to create tables and initial data
#### 4. Download the DolphinScheduler Image
| 10 |
diff --git a/src/PanelTraits/Filters.php b/src/PanelTraits/Filters.php @@ -41,7 +41,7 @@ trait Filters
* @param closure $filter_logic Query modification (filtering) logic.
* @param closure $default_logic Query modification (filtering) logic when filter is not active.
*/
- public function addFilter($options, $values = false, $filter_logic = false, $default_logic = false)
+ public function addFilter($options, $values = false, $filter_logic = false, $fallback_logic = false)
{
// if a closure was passed as "values"
if (is_callable($values)) {
@@ -74,10 +74,10 @@ trait Filters
$this->addDefaultFilterLogic( $filter->name, $filter_logic );
}
} else {
- //if the filter is not active, but default logic was supplied
- if ( is_callable( $default_logic ) ) {
+ //if the filter is not active, but fallback logic was supplied
+ if ( is_callable( $fallback_logic ) ) {
// apply the default logic
- $default_logic();
+ $fallback_logic();
}
}
}
| 10 |
diff --git a/source/themes/simple/SimplePopOver.scss b/source/themes/simple/SimplePopOver.scss // General styles
$pop-over-box-shadow: var(--rp-pop-over-box-shadow, 0 1.5px 5px 0 rgba(0, 0, 0, 0.18)) !default;
-$pop-over-font-family: var(--rp-pop-over-font-family, $theme-font-light), sans-serif !default;
+$pop-over-font-family: var(--rp-pop-over-font-family, $theme-font-regular), sans-serif !default;
$pop-over-font-size: var(--rp-pop-over-font-size, 14px) !default;
$pop-over-padding: var(--rp-bubble-padding, 6px 12px) !default;
| 12 |
diff --git a/lib/FlagDependencyExportsPlugin.js b/lib/FlagDependencyExportsPlugin.js @@ -45,9 +45,17 @@ class FlagDependencyExportsPlugin {
if(exportDeps) {
exportDeps.forEach((dep) => {
const depIdent = dep.identifier();
- const array = dependencies[depIdent] = dependencies[depIdent] || [];
- if(array.indexOf(module) < 0)
- array.push(module);
+ // if this was not yet initialized
+ // initialize it as an array containing the module and stop
+ if(!dependencies[depIdent]) {
+ dependencies[depIdent] = [module];
+ return;
+ }
+
+ // check if this module is known
+ // if not, add it to the dependencies for this identifier
+ if(dependencies[depIdent].indexOf(module) < 0)
+ dependencies[depIdent].push(module);
});
}
let changed = false;
| 7 |
diff --git a/_includes/index.css b/_includes/index.css @@ -72,7 +72,7 @@ blockquote img {
.avatar {
vertical-align: middle;
}
-li > a > .avatar {
+ul:not(.list-bare) > li > a > .avatar {
width: auto;
height: 1.111111111111em; /* 20px /18 */
vertical-align: top;
@@ -455,7 +455,8 @@ main .elv-toc + h1 .direct-link {
}
.elv-langlist-hed {
margin: 0;
- float: left;
+ display: inline;
+ vertical-align: text-top;
border: none;
font-size: 1.4em; /* 21px /15 */
}
| 1 |
diff --git a/app/classifier/drawing-tools/components/DetailsSubTaskForm/DetailsSubTaskForm.jsx b/app/classifier/drawing-tools/components/DetailsSubTaskForm/DetailsSubTaskForm.jsx @@ -11,9 +11,7 @@ import TaskTranslations from '../../../tasks/translations';
import { StyledNextButton } from '../../../components/TaskNavButtons/components/NextButton/NextButton';
export const StyledStickyModalForm = styled(StickyModalForm)`
- .modal-form-underlay {
pointer-events: none;
- }
.modal-form {
background: ${theme('mode', {
| 8 |
diff --git a/src/components/NotifyOnScrollThreshold.js b/src/components/NotifyOnScrollThreshold.js @@ -5,6 +5,10 @@ const NotifyOnScrollThreshold = React.createClass({
propTypes: {
children: React.PropTypes.func,
threshold: React.PropTypes.number
+ getDefaultProps () {
+ return {
+ threshold: 0.9
+ };
},
getInitialState () {
| 12 |
diff --git a/OurUmbraco/Our/Controllers/ProfileController.cs b/OurUmbraco/Our/Controllers/ProfileController.cs @@ -13,7 +13,10 @@ using Skybrud.Social.GitHub.Responses.Authentication;
using Skybrud.Social.GitHub.Responses.Users;
using Skybrud.Social.OAuth.Models;
using Skybrud.Social.OAuth.Responses;
+using Skybrud.Social.Twitter.Models.Account;
using Skybrud.Social.Twitter.OAuth;
+using Skybrud.Social.Twitter.Options.Account;
+using Skybrud.Social.Twitter.Responses.Account;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
@@ -163,6 +166,8 @@ namespace OurUmbraco.Our.Controllers
// Update the "github" property and save the value
mem.SetValue("github", githubUsername);
+ mem.SetValue("githubId", userResponse.Body.Id);
+ mem.SetValue("githubData", userResponse.Body.JObject.ToString());
ms.Save(mem);
// Clear the runtime cache for the member
@@ -225,8 +230,36 @@ namespace OurUmbraco.Our.Controllers
// Get the access token from the response body
TwitterOAuthAccessToken accessToken = (TwitterOAuthAccessToken) response.Body;
- // get the access token from the response
- string screenName = accessToken.ScreenName;
+ // Update the OAuth client properties
+ client.Token = accessToken.Token;
+ client.TokenSecret = accessToken.TokenSecret;
+
+ // Initialize a new service instance from the OAUth client
+ var service = Skybrud.Social.Twitter.TwitterService.CreateFromOAuthClient(client);
+
+ // Get some information about the authenticated Twitter user
+ TwitterAccount user;
+ try
+ {
+
+ // Initialize the options for the request (we don't need the status)
+ var options = new TwitterVerifyCrendetialsOptions
+ {
+ SkipStatus = true
+ };
+
+ // Make the request to the Twitter API
+ var userResponse = service.Account.VerifyCredentials(options);
+
+ // Update the "user" variable
+ user = userResponse.Body;
+
+ }
+ catch (Exception ex)
+ {
+ LogHelper.Error<ProfileController>("Unable to get user information from the Twitter API", ex);
+ return GetErrorResult("Oh noes! An error happened.");
+ }
// Get the member of the current ID (for comparision and lookup)
int memberId = Members.GetCurrentMemberId();
@@ -236,7 +269,7 @@ namespace OurUmbraco.Our.Controllers
// Initialize new search criteria for the Twitter screen name
ISearchCriteria criteria = searcher.CreateSearchCriteria();
- criteria = criteria.RawQuery($"twitter:{screenName}");
+ criteria = criteria.RawQuery($"twitter:{user.ScreenName}");
// Check if there are other members with the same Twitter screen name
foreach (var result in searcher.Search(criteria))
@@ -253,7 +286,9 @@ namespace OurUmbraco.Our.Controllers
var mem = ms.GetById(memberId);
// Update the "twitter" property and save the value
- mem.SetValue("twitter", screenName);
+ mem.SetValue("twitter", user.ScreenName);
+ mem.SetValue("twitterId", user.IdStr);
+ mem.SetValue("twitterData", user.JObject.ToString());
ms.Save(mem);
// Clear the runtime cache for the member
| 3 |
diff --git a/learn/what_is_meilisearch/philosophy.md b/learn/what_is_meilisearch/philosophy.md @@ -8,7 +8,7 @@ We always aim for a simple and intuitive experience for both developers and end-
For developers, we're proud to say that MeiliSearch requires very little configuration to get up and running. Communication to the server is done through a [RESTful API](/reference/api).
-For end-users, the search experience aims to feel simple so they can focus on the results. MeiliSearch aims to deliver an intuitive search-as-you-type experience, with a response time lower than 50 milliseconds.
+For end-users, the search experience aims to feel simple so they can focus on the results. MeiliSearch aims to deliver an intuitive search-as-you-type experience, with a sub 50 millisecond response time.
### Highly customizable
@@ -32,4 +32,4 @@ As a result, we are fully committed to the philosophy of [prefix search](https:/
MeiliSearch should **not be your main data store**. MeiliSearch should contain only the data you want your users to search through. The more data MeiliSearch contains, the less relevant it is.
-MeiliSearch queries should be sent directly from the front-end. The more proxy there is between MeiliSearch and the end-user, the less fast queries and thus search-experience will be.
+MeiliSearch queries should be sent directly from the front-end. The more proxies there are between MeiliSearch and the end-user, the slower the queries and search-experience will be.
| 1 |
diff --git a/packages/idyll-cli/src/node-config.js b/packages/idyll-cli/src/node-config.js @@ -29,6 +29,6 @@ module.exports = paths => {
require('@babel/register')({
presets: ['@babel/env', '@babel/preset-react'],
babelrc: false,
- only: isWindows ? undefined : new RegExp(`(${transformFolders.join('|')})`)
+ only: isWindows ? undefined : transformFolders.join('|')
});
};
| 3 |
diff --git a/govbox/slackintegration/models.py b/govbox/slackintegration/models.py from django.db import models
from govrules.models import CommunityIntegration
from django.contrib.auth.models import User
+from django.contrib.auth.models import Permission
# Create your models here.
@@ -43,6 +44,13 @@ class SlackUser(models.Model):
null=True)
+ def save(self, *args, **kwargs):
+ permission = Permission.objects.get(name='Can add proposal')
+ self.django_user.user_permissions.add(permission)
+
+ super(SlackUser, self).save(*args, **kwargs)
+
+
class SlackUserGroup(models.Model):
| 0 |
diff --git a/src/core/operations/ExtractEmailAddresses.mjs b/src/core/operations/ExtractEmailAddresses.mjs @@ -39,8 +39,8 @@ class ExtractEmailAddresses extends Operation {
*/
run(input, args) {
const displayTotal = args[0],
- regex = /\b\w[-.\w]*@[-\w]+(?:\.[-\w]+)*\.[A-Z]{2,4}\b/ig;
-
+ // email regex from: https://www.regular-expressions.info/email.html
+ regex = /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/ig;
return search(input, regex, null, displayTotal);
}
| 3 |
diff --git a/activities/Flip.activity/js/game.js b/activities/Flip.activity/js/game.js @@ -115,6 +115,7 @@ function Game(stage,xocolor,doc,datastore,activity,sizepalette){
console.log("12");
break;
}
+
}
this.getRandomInt = function(min, max) {
@@ -157,6 +158,9 @@ function Game(stage,xocolor,doc,datastore,activity,sizepalette){
this.palette.setUsed();
var t = this;
this.newGameTimeout = setTimeout(function(){t.newGame();},2000);
+
+ //If user win and level is updated automatically, update grid size
+ this.setGridDimension(this.startgridwidth);
}
//Save
@@ -254,7 +258,6 @@ function Game(stage,xocolor,doc,datastore,activity,sizepalette){
stage.removeAllChildren();
this.calculateDimensions();
this.initDots();
- //console.log(this.dots);
this.stack = [];
for (var i = 0; i<14; i++){
this.flipRandomDot();
@@ -267,12 +270,22 @@ function Game(stage,xocolor,doc,datastore,activity,sizepalette){
this.setSize = function(size){
this.startgridwidth = size;
this.startgridheight = size;
+
+ //When level is manually set by user, update grid size.
+ this.setGridDimension(size);
+
this.newGame();
this.level = size;
}
+ //The grid is shrunk as the amount of dots becomes too many for the
+ //canvas to handle
+ this.setGridDimension = function(size){
+ this.gridwidth = size * 1.5;
+ this.gridheight = size * 1.5;
+ }
+
this.init = function(){
- //console.log("init");
//console.log(activity.getDatastoreObject());
this.palette = new sizepalette.SizePalette(this,doc.getElementById('size-button'),undefined);
activity.getDatastoreObject().getMetadata(this.init_canaccessdatastore.bind(this));
| 12 |
diff --git a/src/js/tools/drawing/Rectangle.js b/src/js/tools/drawing/Rectangle.js * @override
*/
ns.Rectangle.prototype.draw = function (col, row, color, targetFrame, penSize) {
- var rectanglePixels = pskl.PixelUtils.getBoundRectanglePixels(this.startCol, this.startRow, col, row);
+ var rectangle = pskl.PixelUtils.getOrderedRectangleCoordinates(this.startCol, this.startRow, col, row);
- pskl.PixelUtils.resizePixels(rectanglePixels, penSize).forEach(function (point) {
- targetFrame.setPixel(point[0], point[1], color);
- });
+ for (var x = rectangle.x0; x <= rectangle.x1; x++) {
+ for (var y = rectangle.y0; y <= rectangle.y1; y++) {
+ if (
+ x > rectangle.x1 - penSize ||
+ x < rectangle.x0 + penSize ||
+ y > rectangle.y1 - penSize ||
+ y < rectangle.y0 + penSize
+ ) {
+ targetFrame.setPixel(x, y, color);
+ }
+ }
+ }
};
})();
| 7 |
diff --git a/Makefile b/Makefile @@ -144,7 +144,7 @@ src/_agent.js: src/agent/index.js src/agent/plugin.js node_modules
npm run build
node_modules: package.json
- npm install
+ ((test packages.json -nt packages-lock.json) || (test -d node_modules && false || true)) && npm i || true
R2A_ROOT=$(shell pwd)/radare2-android-libs
| 7 |
diff --git a/configurations/default/env.yml.tmp b/configurations/default/env.yml.tmp @@ -7,6 +7,6 @@ MAPBOX_ATTRIBUTION: <a href="https://www.mapbox.com/about/maps/" target="_blank"
SLACK_CHANNEL: optional-slack-channel
SLACK_WEBHOOK: optional-slack-webhook
GRAPH_HOPPER_KEY: your-graph-hopper-key
-GRAPH_HOPPER_URL: https://graphhopper.com/api/1/
+# GRAPH_HOPPER_URL: http://localhost:8989/api/
GOOGLE_ANALYTICS_TRACKING_ID: optional-ga-key
# GRAPH_HOPPER_POINT_LIMIT: 10 # Defaults to 30
| 3 |
diff --git a/Source/Core/sampleTerrain.js b/Source/Core/sampleTerrain.js @@ -49,8 +49,8 @@ function sampleTerrain(terrainProvider, level, positions) {
}
/**
- * @param {Array.<*>} tileRequests The mutated list of requests, the first one will be attempted
- * @param {Array.<Promise<*>>} results The list to put the result promises into
+ * @param {Array.<Object>} tileRequests The mutated list of requests, the first one will be attempted
+ * @param {Array.<Promise<void>>} results The list to put the result promises into
* @returns {boolean} true if the request was made, and we are okay to attempt the next item immediately,
* or false if we were throttled and should wait awhile before retrying.
*
@@ -84,6 +84,7 @@ function attemptConsumeNextQueueItem(tileRequests, results) {
/**
* Wrap window.setTimeout in a Promise
+ * @param {number} ms
* @private
*/
function delay(ms) {
@@ -95,9 +96,9 @@ function delay(ms) {
/**
* Recursively consumes all the tileRequests until the list has been emptied
* and a Promise of each result has been put into the results list
- * @param {Array.<*>} tileRequests The list of requests desired to be made
- * @param {Array.<Promise<*>>} results The list to put all the result promises into
- * @returns {Promise<undefined>} A promise which resolves once all requests have been started
+ * @param {Array.<Object>} tileRequests The list of requests desired to be made
+ * @param {Array.<Promise<void>>} results The list to put all the result promises into
+ * @returns {Promise<void>} A promise which resolves once all requests have been started
*
* @private
*/
@@ -252,4 +253,5 @@ function createMarkFailedFunction(tileRequest) {
}
};
}
+
export default sampleTerrain;
| 3 |
diff --git a/includes/Modules/Site_Verification.php b/includes/Modules/Site_Verification.php @@ -396,16 +396,6 @@ final class Site_Verification extends Module implements Module_With_Scopes {
* @param string $verification_type Verification method type.
*/
private function handle_verification_token( $verification_token, $verification_type ) {
- $verification_type = $verification_type ?: self::VERIFICATION_TYPE_META;
-
- if ( empty( $verification_token ) ) {
- return;
- }
-
- if ( ! current_user_can( Permissions::SETUP ) ) {
- wp_die( esc_html__( 'You don\'t have permissions to set up Site Kit.', 'google-site-kit' ), 403 );
- }
-
switch ( $verification_type ) {
case self::VERIFICATION_TYPE_FILE:
$this->authentication->verification_file()->set( $verification_token );
| 2 |
diff --git a/src/pages/using-spark/guides/alt-text.mdx b/src/pages/using-spark/guides/alt-text.mdx @@ -8,7 +8,7 @@ import { SprkDivider, SprkIcon } from '@sparkdesignsystem/spark-react';
Alternative Text
</h1>
-UX Writers, designers and developers can use this **Alternative Text Guide** as an instruction to writing style, usage, text for copy, documentation, reference information, and copy inside Rocket Products.
+UX Writers, designers and developers can use this **Alternative Text Guide** as an instruction to writing style, usage, text for copy, documentation, reference information, and copy inside Rocket digital experiences.
<SprkDivider element="span" additionalClasses="sprk-u-mvl" />
| 3 |
diff --git a/src/article/converter/r2t/jats2internal.js b/src/article/converter/r2t/jats2internal.js @@ -348,7 +348,7 @@ function _populateAbstract (doc, jats, jatsImporter) {
let abstractEls = jats.findAll('article > front > article-meta > abstract')
let mainAbstractImported = false
abstractEls.forEach(abstractEl => {
- const titleEl = abstractEl.find('title')
+ const titleEl = findChild(abstractEl, 'title')
if (titleEl) {
abstractEl.removeChild(titleEl)
}
| 4 |
diff --git a/core/field_bound_variable.js b/core/field_bound_variable.js @@ -168,7 +168,6 @@ Blockly.FieldBoundVariable.prototype.init = function() {
// If the variable is for a value, and the block is movable, this field can
// have a potential block. Draw a block shape around the group SVG.
if (this.forValue_ && this.sourceBlock_.isMovable()) {
- this.hasPotentialBlock = true;
this.blockShapedPath_ = Blockly.utils.createSvgElement('path',
{
'class': 'blocklyFieldBoundValue',
@@ -202,6 +201,7 @@ Blockly.FieldBoundVariable.prototype.initModel = function() {
this.initDefaultVariableName_();
if (this.forValue_) {
+ this.hasPotentialBlock = true;
goog.asserts.assert(this.defaultScopeInputName_,
'The name of input representing the value\'s scope is not ' +
'initialized.');
| 12 |
diff --git a/src/components/accounts/two_factor/TwoFactorVerifyModal.js b/src/components/accounts/two_factor/TwoFactorVerifyModal.js @@ -42,8 +42,9 @@ const TwoFactorVerifyModal = ({ open, onClose }) => {
}, []);
const handleVerifyCode = async () => {
- await dispatch(verifyTwoFactor(null, code))
- if (onClose) {
+ const { error } = await dispatch(verifyTwoFactor(null, code))
+
+ if (!error && onClose) {
onClose(true)
}
}
| 9 |
diff --git a/server/googleActions.js b/server/googleActions.js @@ -359,7 +359,8 @@ GoogleActions = {
await drive.files.update({
fileId : brew.googleId,
- resource : { properties : { views : brew.views + 1,
+ resource : { modifiedTime : brew.updatedAt,
+ properties : { views : brew.views + 1,
lastViewed : new Date() } }
})
.catch((err)=>{
| 12 |
diff --git a/examples/loadtest/client.js b/examples/loadtest/client.js @@ -22,10 +22,11 @@ let broker = new ServiceBroker({
logLevel: "warn",
//metrics: true,
requestTimeout: 10000,
+ retryCount: 3,
});
console.log("Client started. nodeID:", broker.nodeID, " TRANSPORTER:", transporter, " PID:", process.pid);
-
+/*
function work() {
let payload = { a: random(0, 100), b: random(0, 100) };
const p = broker.call("math.add", payload)
@@ -40,12 +41,12 @@ function work() {
p.then(() => setImmediate(work));
}
-
+*/
let counter = 0;
let errorCount = 0;
const flood = process.env.FLOOD || 0;
-/*
+
function work() {
const startTime = process.hrtime();
let payload = { c: ++counter };
@@ -66,11 +67,11 @@ function work() {
// Overload
if (flood > 0 && broker.transit.pendingRequests.size < flood)
- setImmediate(work2);
+ setImmediate(work);
else
- p.then(() => setImmediate(work2));
+ p.then(() => setImmediate(work));
}
-*/
+
broker._callCount = 0;
function color(text, pad, value, green, red) {
| 12 |
diff --git a/server/src/resolvers/teams.js b/server/src/resolvers/teams.js @@ -47,7 +47,7 @@ export const TeamsMutations = {
export const TeamsSubscriptions = {
teamsUpdate: {
- resolve(rootValue, { simulatorId, type }) {
+ resolve(rootValue, { simulatorId, type, cleared }) {
// Get the simulator
let returnVal = rootValue;
if (type) {
@@ -56,7 +56,8 @@ export const TeamsSubscriptions = {
if (simulatorId) {
returnVal = returnVal.filter(t => t.simulatorId === simulatorId);
}
- return returnVal;
+ if (cleared) return returnVal;
+ return returnVal.filter(c => !c.cleared);
},
subscribe: withFilter(
() => pubsub.asyncIterator("teamsUpdate"),
| 1 |
diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js @@ -1433,6 +1433,56 @@ describe('Test axes', function() {
});
});
+ describe('autorange relayout', function() {
+ var gd;
+
+ beforeEach(function() {
+ gd = createGraphDiv();
+ });
+
+ afterEach(destroyGraphDiv);
+
+ it('can relayout autorange', function(done) {
+ Plotly.newPlot(gd, {
+ data: [{
+ x: [0, 1],
+ y: [0, 1]
+ }],
+ layout: {
+ width: 400,
+ height: 400,
+ margin: {
+ t: 40,
+ b: 40,
+ l: 40,
+ r: 40
+ },
+ xaxis: {
+ autorange: false,
+ },
+ yaxis: {
+ autorange: true,
+ }
+ }
+ }).then(function() {
+ expect(gd._fullLayout.xaxis.range).toEqual([-1, 6]);
+ expect(gd._fullLayout.yaxis.range).toBeCloseToArray([-0.07, 1.07]);
+
+ Plotly.relayout(gd, 'yaxis.autorange', false);
+ }).then(function() {
+ expect(gd._fullLayout.yaxis.autorange).toBe(false);
+ expect(gd._fullLayout.yaxis.range).toBeCloseToArray([-0.07, 1.07]);
+
+ Plotly.relayout(gd, 'xaxis.autorange', true);
+ }).then(function() {
+ expect(gd._fullLayout.xaxis.autorange).toBe(true);
+ expect(gd._fullLayout.xaxis.range).toBeCloseToArray([-0.07, 1.07]);
+ })
+ .catch(failTest)
+ .then(done);
+ });
+ });
+
describe('constraints relayout', function() {
var gd;
| 0 |
diff --git a/src/data/item-grids.json b/src/data/item-grids.json "row": 0,
"col": 0,
"width": 1,
- "height": 3
+ "height": 2
},
{
"row": 0,
"col": 1,
"width": 1,
- "height": 3
+ "height": 2
},
{
"row": 0,
"col": 2,
"width": 1,
- "height": 3
+ "height": 2
},
{
"row": 0,
"col": 3,
"width": 1,
- "height": 3
+ "height": 2
},
{
- "row": 3,
+ "row": 2,
"col": 0,
"width": 1,
"height": 2
},
{
- "row": 3,
+ "row": 2,
"col": 1,
- "width": 2,
+ "width": 1,
"height": 2
},
{
- "row": 3,
+ "row": 2,
+ "col": 2,
+ "width": 1,
+ "height": 2
+ },
+ {
+ "row": 2,
"col": 3,
"width": 1,
"height": 2
+ },
+ {
+ "row": 4,
+ "col": 1,
+ "width": 2,
+ "height": 1
}
],
"5d5d646386f7742797261fd9": [
"width": 1,
"height": 2
}
+ ],
+ "5c0e722886f7740458316a57": [
+ {
+ "row": 0,
+ "col": 0,
+ "width": 1,
+ "height": 2
+ },
+ {
+ "row": 0,
+ "col": 1,
+ "width": 1,
+ "height": 2
+ },
+ {
+ "row": 0,
+ "col": 2,
+ "width": 1,
+ "height": 2
+ },
+ {
+ "row": 0,
+ "col": 3,
+ "width": 1,
+ "height": 2
+ },
+ {
+ "row": 2,
+ "col": 0,
+ "width": 2,
+ "height": 2
+ },
+ {
+ "row": 2,
+ "col": 2,
+ "width": 2,
+ "height": 2
+ },
+ {
+ "row": 4,
+ "col": 0,
+ "width": 1,
+ "height": 1
+ },
+ {
+ "row": 4,
+ "col": 1,
+ "width": 1,
+ "height": 1
+ },
+ {
+ "row": 4,
+ "col": 2,
+ "width": 1,
+ "height": 1
+ },
+ {
+ "row": 4,
+ "col": 3,
+ "width": 1,
+ "height": 1
+ }
]
}
\ No newline at end of file
| 1 |
diff --git a/contracts/connectors/loantoken/LoanTokenSettingsLowerAdmin.sol b/contracts/connectors/loantoken/LoanTokenSettingsLowerAdmin.sol @@ -158,7 +158,7 @@ contract LoanTokenSettingsLowerAdmin is AdvancedToken {
function setTransactionLimits(
address[] memory addresses,
uint256[] memory limits)
- public onlyOwner
+ public onlyAdmin
{
require(addresses.length == limits.length, "mismatched array lengths");
for(uint i = 0; i < addresses.length; i++){
| 11 |
diff --git a/universe.js b/universe.js @@ -61,7 +61,11 @@ const universeSpecs = {
{
position: [0, 0, -1],
start_url: 'https://avaer.github.io/mirror/index.js',
- }
+ },
+ {
+ position: [-10, 0, -10],
+ start_url: 'https://avaer.github.io/shield/index.js',
+ },
],
userObject: {
position: [0, 0, 0],
| 0 |
diff --git a/token-metadata/0x3F09400313e83d53366147e3ea0e4e2279D80850/metadata.json b/token-metadata/0x3F09400313e83d53366147e3ea0e4e2279D80850/metadata.json "symbol": "KSEED",
"address": "0x3F09400313e83d53366147e3ea0e4e2279D80850",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/components/play-mode/quests/Quests.jsx b/src/components/play-mode/quests/Quests.jsx @@ -159,6 +159,7 @@ export const Quests = () => {
const quest = {
name: 'Blob destruction',
description: 'Destroy all blobs in the area',
+ condition: 'clearMobs',
drops: [
{
name: 'Silk',
| 0 |
diff --git a/Source/Core/BoxGeometry.js b/Source/Core/BoxGeometry.js define([
'./BoundingSphere',
'./Cartesian3',
+ './Check',
'./ComponentDatatype',
'./defaultValue',
'./defined',
- './DeveloperError',
'./Geometry',
'./GeometryAttribute',
'./GeometryAttributes',
@@ -14,10 +14,10 @@ define([
], function(
BoundingSphere,
Cartesian3,
+ Check,
ComponentDatatype,
defaultValue,
defined,
- DeveloperError,
Geometry,
GeometryAttribute,
GeometryAttributes,
@@ -59,12 +59,8 @@ define([
var max = options.maximum;
//>>includeStart('debug', pragmas.debug);
- if (!defined(min)) {
- throw new DeveloperError('options.minimum is required.');
- }
- if (!defined(max)) {
- throw new DeveloperError('options.maximum is required');
- }
+ Check.typeOf.object('min', min);
+ Check.typeOf.object('max', max);
//>>includeEnd('debug');
var vertexFormat = defaultValue(options.vertexFormat, VertexFormat.DEFAULT);
@@ -100,12 +96,10 @@ define([
var dimensions = options.dimensions;
//>>includeStart('debug', pragmas.debug);
- if (!defined(dimensions)) {
- throw new DeveloperError('options.dimensions is required.');
- }
- if (dimensions.x < 0 || dimensions.y < 0 || dimensions.z < 0) {
- throw new DeveloperError('All dimensions components must be greater than or equal to zero.');
- }
+ Check.typeOf.object('dimensions', dimensions);
+ Check.typeOf.number.greaterThanOrEquals('dimensions.x', dimensions.x, 0);
+ Check.typeOf.number.greaterThanOrEquals('dimensions.y', dimensions.y, 0);
+ Check.typeOf.number.greaterThanOrEquals('dimensions.z', dimensions.z, 0);
//>>includeEnd('debug');
var corner = Cartesian3.multiplyByScalar(dimensions, 0.5, new Cartesian3());
@@ -139,9 +133,7 @@ define([
*/
BoxGeometry.fromAxisAlignedBoundingBox = function (boundingBox) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(boundingBox)) {
- throw new DeveloperError('boundingBox is required.');
- }
+ Check.typeOf.object('boundingBox', boundingBox);
//>>includeEnd('debug');
return new BoxGeometry({
@@ -167,12 +159,8 @@ define([
*/
BoxGeometry.pack = function(value, array, startingIndex) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(value)) {
- throw new DeveloperError('value is required');
- }
- if (!defined(array)) {
- throw new DeveloperError('array is required');
- }
+ Check.typeOf.object('value', value);
+ Check.defined('array', array);
//>>includeEnd('debug');
startingIndex = defaultValue(startingIndex, 0);
@@ -203,9 +191,7 @@ define([
*/
BoxGeometry.unpack = function(array, startingIndex, result) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(array)) {
- throw new DeveloperError('array is required');
- }
+ Check.defined('array', array);
//>>includeEnd('debug');
startingIndex = defaultValue(startingIndex, 0);
| 14 |
diff --git a/src/editor/EditorPackage.js b/src/editor/EditorPackage.js @@ -213,10 +213,11 @@ export default {
config.addKeyboardShortcut('shift+tab', { command: 'decrease-heading-level' })
config.addKeyboardShortcut('tab', { command: 'increase-heading-level' })
- config.addLabel('insert-xref-bibr', 'Citation')
- config.addLabel('insert-xref-fig', 'Figure Reference')
- config.addLabel('insert-xref-table', 'Table Reference')
- config.addLabel('insert-xref-fn', 'Footnote Reference')
+ config.addLabel('cite', 'Cite')
+ config.addLabel('insert-xref-bibr', 'Reference')
+ config.addLabel('insert-xref-fig', 'Figure')
+ config.addLabel('insert-xref-table', 'Table')
+ config.addLabel('insert-xref-fn', 'Footnote')
config.addLabel('insert-disp-quote', 'Blockquote')
config.addLabel('manuscript-start', 'Article starts here')
@@ -236,6 +237,8 @@ export default {
config.addLabel('insert-table', 'Table')
config.addIcon('insert-table', { 'fontawesome': 'fa-table' })
+ config.addIcon('insert-disp-quote', { 'fontawesome': 'fa-quote-right' })
+
// Annotation tools
config.addAnnotationTool({
name: 'bold',
@@ -365,14 +368,14 @@ export default {
type: 'tool-group',
showDisabled: true,
style: 'minimal',
- commandGroups: ['insert-figure', 'insert-table']
+ commandGroups: ['insert-figure', 'insert-table', 'insert-block-element']
},
{
- name: 'insert',
+ name: 'cite',
type: 'tool-dropdown',
showDisabled: true,
style: 'descriptive',
- commandGroups: ['insert-xref', 'insert-block-element']
+ commandGroups: ['insert-xref']
}
])
| 7 |
diff --git a/generators/server/files.js b/generators/server/files.js @@ -629,8 +629,13 @@ const serverFiles = {
serverMicroservice: [
{
condition: generator =>
- (generator.applicationType === 'microservice' || generator.applicationType === 'gateway') &&
- generator.authenticationType === 'uaa',
+ (
+ generator.applicationType === 'microservice' ||
+ (
+ generator.applicationType === 'gateway' &&
+ (generator.authenticationType === 'uaa' || generator.authenticationType === 'oauth2')
+ )
+ ) && generator.authenticationType === 'uaa',
path: SERVER_MAIN_SRC_DIR,
templates: [
{
@@ -736,10 +741,6 @@ const serverFiles = {
file: 'package/config/FeignConfiguration.java',
renameTo: generator => `${generator.javaDir}config/FeignConfiguration.java`
},
- {
- file: 'package/config/PageableSpringEncoder.java',
- renameTo: generator => `${generator.javaDir}config/PageableSpringEncoder.java`
- },
{
file: 'package/client/AuthorizedFeignClient.java',
renameTo: generator => `${generator.javaDir}client/AuthorizedFeignClient.java`
| 2 |
diff --git a/stories/notices.stories.js b/stories/notices.stories.js */
import { storiesOf } from '@storybook/react';
-/**
- * WordPress dependencies
- */
-import { __ } from '@wordpress/i18n';
-
/**
* Internal dependencies
*/
@@ -39,7 +34,7 @@ const LearnMore = () => (
external
inherit
>
- { __( 'Learn more here.', 'google-site-kit' ) }
+ Learn more here
</Link>
);
| 2 |
diff --git a/mephisto/core/task_launcher.py b/mephisto/core/task_launcher.py @@ -32,8 +32,8 @@ import types
logger = get_logger(name=__name__, verbose=True, level="debug")
-UNIT_GENERATOR_WAIT_SECONDS = 1
-ASSIGNMENT_GENERATOR_WAIT_SECONDS = 0.05
+UNIT_GENERATOR_WAIT_SECONDS = 10
+ASSIGNMENT_GENERATOR_WAIT_SECONDS = 0.5
class GeneratorType(enum.Enum):
| 5 |
diff --git a/src/index.js b/src/index.js @@ -77,6 +77,11 @@ function Index() {
};
const _handleLogOut = () => {
+ // Set the local react states so that rogue requests aren't made
+ // after log out but before we re-render.
+ setUser(null);
+ setIsAdmin(false);
+ setLogin(false);
const auth = Config.auth;
auth.logout("github").then(() => {
// Remove the local onegraph-auth storage
@@ -85,9 +90,6 @@ function Index() {
localStorage.removeItem("adminBar");
// Remove the local logged in status storage
localStorage.removeItem("isLoggedIn");
- setUser(null);
- setIsAdmin(false);
- setLogin(false);
});
};
| 12 |
diff --git a/src/Engines/Custom.js b/src/Engines/Custom.js @@ -33,12 +33,12 @@ class CustomEngine extends TemplateEngine {
async compile(str, inputPath) {
if (this.needsInit && !this.initFinished) {
- await this.entry.init();
+ await this.entry.init.bind({ config: this.config })();
this.initFinished = true;
}
// TODO generalize this (look at JavaScript.js)
- return this.entry.compile(str, inputPath);
+ return this.entry.compile.bind({ config: this.config })(str, inputPath);
}
get defaultTemplateFileExtension() {
| 11 |
diff --git a/src/post/Write/Drafts.js b/src/post/Write/Drafts.js @@ -26,12 +26,10 @@ let DraftRow = (props) => {
DraftRow = connect(() => ({}), { deleteDraft })(DraftRow);
const DraftList = ({ editor: { draftPosts } }) =>
- (
<div className="main-panel">
<Header />
- <div className="my-3">
+ <div className="my-3 container container-small">
<h1 className="text-xs-center">Drafts</h1>
- <div className="container">
{ _.size(draftPosts) === 0 &&
<h3 className="text-xs-center">
You don't have any draft saved.
@@ -41,8 +39,6 @@ const DraftList = ({ editor: { draftPosts } }) =>
<DraftRow key={key} data={draft.postData} id={key} />)
}
</div>
- </div>
- </div>
- );
+ </div>;
export default connect(state => ({ editor: state.editor }))(DraftList);
| 7 |
diff --git a/lib/test.js b/lib/test.js @@ -594,7 +594,7 @@ class Test {
if (this.metadata.callback) {
if (returnedObservable || returnedPromise) {
const asyncType = returnedObservable ? 'observables' : 'promises';
- this.saveFirstError(new Error(`Do not return ${asyncType} from tests declared via \`test.cb(...)\`, if you want to return a promise simply declare the test via \`test(...)\``));
+ this.saveFirstError(new Error(`Do not return ${asyncType} from tests declared via \`test.cb(...)\`. Use \`test.cb(...)\` for legacy callback APIs. When using promises, observables or async functions, use \`test(...)\`.`));
return this.finishPromised();
}
| 7 |
diff --git a/aleph/logic/entities.py b/aleph/logic/entities.py @@ -129,7 +129,7 @@ def entity_references(entity, authz):
res = es.msearch(index=entities_index(), body=queries)
for prop, resp in zip(properties, res.get('responses', [])):
total = resp.get('hits', {}).get('total')
- if total > 0:
+ if total is not None and total > 0:
yield (prop, total)
@@ -174,5 +174,5 @@ def entity_tags(entity, authz):
res = es.msearch(index=entities_index(), body=queries)
for (field, value), resp in zip(pivots, res.get('responses', [])):
total = resp.get('hits', {}).get('total')
- if total > 0:
+ if total is not None and total > 0:
yield (field, value, total)
| 9 |
diff --git a/_CodingChallenges/012-lorenzattractor.md b/_CodingChallenges/012-lorenzattractor.md @@ -38,7 +38,7 @@ contributions:
author:
name: "Juan Carlos Ponce Campuzano"
url: "https://jcponce.github.io/"
- url: "https://editor.p5js.org/jcponce/present/JH7nMvdIC"
- source: "https://editor.p5js.org/jcponce/sketches/JH7nMvdIC"
+ url: "https://editor.p5js.org/jcponce/present/WUmXSTPvr"
+ source: "https://editor.p5js.org/jcponce/sketches/WUmXSTPvr"
---
In this coding challenge, I show you how to visualization the Lorenz Attractor in Processing (Java).
| 1 |
diff --git a/addon/components/base/bs-dropdown.js b/addon/components/base/bs-dropdown.js @@ -147,7 +147,7 @@ import layout from 'ember-bootstrap/templates/components/bs-dropdown';
@extends Ember.Component
@public
*/
-export default Component.extend({
+let component = Component.extend({
layout,
classNameBindings: ['containerClass'],
@@ -208,14 +208,6 @@ export default Component.extend({
}
}),
- /**
- * @property menuElement
- * @private
- */
- menuElement: computed(function() {
- return document.getElementById(`${this.get('elementId')}__menu`);
- }).volatile(),
-
/**
* @property toggleElement
* @private
@@ -330,3 +322,20 @@ export default Component.extend({
*/
menuComponent: 'bs-dropdown/menu'
});
+
+Object.defineProperties(component.prototype, {
+
+ /**
+ * The DOM element of the `.dropdown-menu` element
+ * @type object
+ * @readonly
+ * @private
+ */
+ menuElement: {
+ get() {
+ return document.getElementById(`${this.get('elementId')}__menu`);
+ }
+ }
+});
+
+export default component;
| 14 |
diff --git a/README.md b/README.md 
-
+
# SpaceX Data REST API
@@ -30,52 +30,52 @@ GET https://api.spacexdata.com/v1/launches/latest
```json
{
- "flight_number": 45,
+ "flight_number": 46,
"launch_year": "2017",
- "launch_date_utc": "2017-08-14T16:31:00Z",
- "launch_date_local": "2017-08-14T12:31:00-04:00",
+ "launch_date_utc": "2017-08-24T18:50:00Z",
+ "launch_date_local": "2017-08-24T11:50:00-07:00",
"rocket": {
"rocket_id": "falcon9",
"rocket_name": "Falcon 9",
"rocket_type": "FT"
},
"telemetry": {
- "flight_club": "https://www.flightclub.io/results/?id=c277137b-55ca-42c4-b7de-555394cbcf50&code=CR12"
+ "flight_club": "https://www.flightclub.io/results/?id=a0f660e3-45e6-4aa5-8460-fa641fe9c227&code=FRM5"
},
- "core_serial": "B1039",
- "cap_serial": "C113",
+ "core_serial": "B1038",
+ "cap_serial": null,
"launch_site": {
- "site_id": "ksc_lc_39a",
- "site_name": "KSC LC 39A"
+ "site_id": "vafb_slc_4e",
+ "site_name": "VAFB SLC 4E"
},
"payloads": [
{
- "payload_id": "SpaceX CRS-12",
+ "payload_id": "FormoSat-5",
"customers": [
- "NASA (CRS)"
+ "NSPO (Taiwan)"
],
- "payload_type": "Dragon 1.1",
- "payload_mass_kg": 3310,
- "payload_mass_lbs": 7298,
- "orbit": "ISS"
+ "payload_type": "Satelite",
+ "payload_mass_kg": 475,
+ "payload_mass_lbs": 1047,
+ "orbit": "SSO"
}
],
"launch_success": true,
"reused": false,
"land_success": true,
- "landing_type": "RTLS",
- "landing_vehicle": "LZ-1",
+ "landing_type": "ASDS",
+ "landing_vehicle": "JRTI",
"links": {
- "mission_patch": "http://spacexpatchlist.space/images/thumbs/spacex_f9_039_crs_12.png",
- "reddit_campaign": "https://www.reddit.com/r/spacex/comments/6mrga2/crs12_launch_campaign_thread/",
- "reddit_launch": "https://www.reddit.com/r/spacex/comments/6tfcio/welcome_to_the_rspacex_crs12_official_launch/",
+ "mission_patch": "http://i.imgur.com/xjtPB9z.png",
+ "reddit_campaign": "https://www.reddit.com/r/spacex/comments/6o98st",
+ "reddit_launch": "https://www.reddit.com/r/spacex/comments/6vihsl/welcome_to_the_rspacex_formosat5_official_launch/",
"reddit_recovery": null,
- "reddit_media": "https://www.reddit.com/r/spacex/comments/6th2nf/rspacex_crs12_media_thread_videos_images_gifs/",
- "presskit": "http://www.spacex.com/sites/spacex/files/crs12presskit.pdf",
- "article_link": "https://spaceflightnow.com/2017/08/17/photos-falcon-9-rocket-soars-into-space-lands-back-at-cape-canaveral/",
- "video_link": "https://www.youtube.com/watch?v=vLxWsYx8dbo"
+ "reddit_media": "https://www.reddit.com/r/spacex/comments/6vhwi1/rspacex_formosat5_media_thread_videos_images_gifs/",
+ "presskit": "http://www.spacex.com/sites/spacex/files/formosat5presskit.pdf",
+ "article_link": "https://en.wikipedia.org/wiki/FORMOSAT-5",
+ "video_link": "https://www.youtube.com/watch?v=J4u3ZN2g_MI"
},
- "details": "Dragon is expected to carry 2,349 kg (5,179 lb) of pressurized mass and 961 kg (2,119 lb) unpressurized. The external payload manifested for this flight is the CREAM cosmic-ray detector. First flight of the Falcon 9 Block 4 upgrade. Last flight of a newly-built Dragon capsule; further missions will use refurbished spacecraft."
+ "details": "Formosat-5 is an Earth observation satellite of the Taiwanese space agency. The SHERPA space tug by Spaceflight Industries was removed from the cargo manifest of this mission. The satellite has a mass of only 475 kg."
}
```
| 3 |
diff --git a/src/components/views/Sensors/index.js b/src/components/views/Sensors/index.js @@ -8,7 +8,7 @@ import Grid from "./GridDom";
import Measure from "react-measure";
import DamageOverlay from "../helpers/DamageOverlay";
import SensorScans from "./SensorScans";
-
+import { Asset } from "../../../helpers/assets";
const SENSOR_SUB = gql`
subscription SensorsChanged($simulatorId: ID) {
sensorsUpdate(simulatorId: $simulatorId, domain: "external") {
@@ -285,6 +285,9 @@ class Sensors extends Component {
<Col className="col-sm-3 data">
<Row>
<Col className="col-sm-12 contactPictureContainer">
+ {hoverContact.picture
+ ? <Asset asset={hoverContact.picture}>
+ {({ src }) =>
<div
className="card contactPicture"
style={{
@@ -292,9 +295,20 @@ class Sensors extends Component {
backgroundPosition: "center",
backgroundRepeat: "no-repeat",
backgroundColor: "black",
- backgroundImage: `url('${hoverContact.pictureUrl}')`
+ backgroundImage: `url('${src}')`
}}
- />
+ />}
+ </Asset>
+ : <div
+ className="card contactPicture"
+ style={{
+ backgroundSize: "contain",
+ backgroundPosition: "center",
+ backgroundRepeat: "no-repeat",
+ backgroundColor: "black",
+ backgroundImage: `none`
+ }}
+ />}
</Col>
<Col className="col-sm-12 contactNameContainer">
<div className="card contactName">
| 1 |
diff --git a/character-controller.js b/character-controller.js @@ -139,6 +139,8 @@ class PlayerBase extends THREE.Object3D {
this.avatar = null;
this.eyeballTarget = new THREE.Vector3();
this.eyeballTargetEnabled = false;
+ this.voicePack = null;
+ this.voiceEndpoint = null;
}
findAction(fn) {
const actions = this.getActionsState();
@@ -210,16 +212,24 @@ class PlayerBase extends THREE.Object3D {
return false;
}
async loadVoicePack({audioUrl, indexUrl}) {
- const voicePack = await VoicePack.load({
+ this.voicePack = await VoicePack.load({
audioUrl,
indexUrl,
});
- this.characterHups.setVoice(voicePack);
+ this.updateVoice();
}
- setVoice(voiceId) {
+ setVoiceEndpoint(voiceId) {
+ if (voiceId) {
const url = `${voiceEndpoint}?voice=${encodeURIComponent(voiceId)}`;
- const voice = new VoiceEndpoint(url);
- this.characterHups.setVoice(voice);
+ this.voiceEndpoint = new VoiceEndpoint(url);
+ } else {
+ this.voiceEndpoint = null;
+ }
+ this.updateVoice();
+ }
+ updateVoice() {
+ console.log('set voice', this.voiceEndpoint || this.voicePack || null, this.voiceEndpoint, this.voicePack, null, new Error().stack);
+ this.characterHups.setVoice(this.voiceEndpoint || this.voicePack || null);
}
getCrouchFactor() {
return 1 - 0.4 * this.actionInterpolants.crouch.getNormalized();
| 0 |
diff --git a/README.md b/README.md @@ -146,22 +146,22 @@ To use `AWS.invoke` you need to set the lambda `endpoint` to the serverless endp
```js
const lambda = new AWS.Lambda({
apiVersion: '2015-03-31',
- region: 'us-east-1',
endpoint: process.env.IS_OFFLINE ? 'http://localhost:3000' : undefined,
+ region: 'us-east-1',
});
```
All your lambdas can then be invoked in a handler using
```js
-const lambdaInvokeParameters = {
+const params = {
FunctionName: 'my-service-stage-function',
InvocationType: 'Event',
LogType: 'None',
Payload: JSON.stringify({ data: 'foo' }),
};
-lambda.invoke(lambdaInvokeParameters).send();
+await lambda.invoke(params).promise();
```
## Token authorizers
| 4 |
diff --git a/apiserver/apiserver/coordinator/coordinator.py b/apiserver/apiserver/coordinator/coordinator.py @@ -425,8 +425,9 @@ def update_rankings(users):
"""
users.sort(key=lambda user: user["rank"])
# Set tau and draw_probability to more reasonable values than the defaults
- # for the open competition. tau should be set to a much lower value or
- # even 0 for finals
+ if config.COMPETITION_FINALS_PAIRING:
+ trueskill.setup(tau=0.0, draw_probability=0.001)
+ else:
trueskill.setup(tau=0.008, draw_probability=0.001)
teams = [[trueskill.Rating(mu=user["mu"], sigma=user["sigma"])]
for user in users]
| 12 |
diff --git a/core/server/api/v2/oembed.js b/core/server/api/v2/oembed.js @@ -4,9 +4,13 @@ const Promise = require('bluebird');
const cheerio = require('cheerio');
const _ = require('lodash');
const config = require('../../../shared/config');
-const i18n = require('../../../shared/i18n');
+const tpl = require('@tryghost/tpl');
const externalRequest = require('../../lib/request-external');
+const messages = {
+ unknownProvider: 'No provider found for supplied URL.'
+};
+
const findUrlWithProvider = (url) => {
let provider;
@@ -33,7 +37,7 @@ const findUrlWithProvider = (url) => {
function unknownProvider(url) {
return Promise.reject(new errors.ValidationError({
- message: i18n.t('errors.api.oembed.unknownProvider'),
+ message: tpl(messages.unknownProvider),
context: url
}));
}
| 14 |
diff --git a/packages/frontend/src/translations/en.global.json b/packages/frontend/src/translations/en.global.json "notEnabled": "2FA Not Enabled",
"notEnoughBalance": "To enable 2FA, your account requires a minimum available balance of ${amount}",
"phone": "Phone",
- "promptDesc": "We highly recommend that you set up a two-factor authentication method to increase the security of your account and assests",
+ "promptDesc": "We highly recommend that you set up a two-factor authentication method to increase the security of your account and assets",
"select": "Select Authentication Method",
"since": "since",
"subHeader": "Two factor authentication adds an extra layer of security to your account. <b>Passphrase and Ledger keys continue to allow full access to your account.</b>",
| 1 |
diff --git a/test/cache/example/start.js b/test/cache/example/start.js -({
- privateField: 100,
-
- async method() {
+async () => {
if (application.worker.id === 'W1') {
console.debug('Start example plugin');
- this.parent.cache.set({ key: 'keyName', val: this.privateField });
+ this.parent.cache.set({ key: 'keyName', val: 'value' });
const res = lib.example.cache.get({ key: 'keyName' });
console.debug({ res, cache: this.parent.cache.values });
}
- },
-});
+};
| 1 |
diff --git a/assets/sass/components/settings/_googlesitekit-settings-notice.scss b/assets/sass/components/settings/_googlesitekit-settings-notice.scss }
.mdc-floating-label {
- color: $c-text-notice-info-selected-text;
+ color: $c-text-notice-info;
}
}
.mdc-text-field__input {
- color: $c-text-notice-info-selected-text;
+ color: $c-text-notice-info;
}
.mdc-select:not(.mdc-select--disabled) {
.mdc-select__selected-text {
- color: $c-text-notice-info-selected-text;
+ color: $c-text-notice-info;
}
.mdc-select__dropdown-icon {
| 12 |
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md @@ -50,6 +50,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
* [Omar Shehata](https://github.com/OmarShehata)
* [Matt Petry](https://github.com/MattPetry)
* [Michael Squires](https://github.com/mksquires)
+ * [Sam Suhag](https://github.com/sanjeetsuhag)
* [NICTA/CSIRO's Data61](https://www.data61.csiro.au/)
* [Kevin Ring](https://github.com/kring)
* [Keith Grochow](https://github.com/kgrochow)
| 3 |
diff --git a/app/templates/components/modals/cfs-proposal-modal.hbs b/app/templates/components/modals/cfs-proposal-modal.hbs <h4 class="ui header">{{t 'Existing Sessions'}}</h4>
{{#unless isNewSpeaker}}
{{#unless isNewSession}}
+ <div class="ui list">
{{#each data.userSession as |session|}}
{{#if session.id}}
{{#link-to 'public.cfs.edit-session' session.id invokeAction=(action 'toggleView')}}
<div class="item">
+ <i class="right triangle icon"></i>
{{t 'Edit Session - '}}{{session.title}}
</div>
{{/link-to}}
{{/if}}
{{/each}}
+ </div>
{{/unless}}
{{/unless}}
{{#if isNewSession}}
<p>{{t 'No existing sessions'}}</p>
{{/if}}
+ <br>
<div>
{{#if isNewSpeaker}}
{{#link-to 'public.cfs.new-speaker' class='ui teal button' invokeAction=(action 'toggleView')}}
| 7 |
diff --git a/src/components/general/character/Character.jsx b/src/components/general/character/Character.jsx @@ -82,27 +82,6 @@ export const Character = ({ game, wearActions, dioramaCanvasRef }) => {
}, [ dioramaCanvasRef, state.openedPanel ] );
- useEffect(() => {
- (async () => {
- const offscreenEngine = new OffscreenEngine();
- // console.log('got offscreen engine 1', offscreenEngine);
- await offscreenEngine.waitForLoad();
- // console.log('got offscreen engine 2', offscreenEngine);
-
- const fn = offscreenEngine.createFunction(`\
- import * as THREE from 'three';
- `, function(a, b) {
- return [
- new THREE.Vector3().fromArray(a)
- .add(new THREE.Vector3().fromArray(b))
- .toArray(),
- [], // transfers
- ];
- });
- const result = await fn([1, 2, 3], [4, 5, 6]);
- })();
- }, [])
-
useEffect( () => {
function mousemove ( e ) {
| 2 |
diff --git a/src/data/get-asset-source.js b/src/data/get-asset-source.js @@ -10,19 +10,13 @@ export type ImageSource = {
height: number
};
-const cache: { [string]: ImageSource } = {};
-
export default (getAssetById: string => Asset) => (
fieldRef: FieldRef
): ImageSource => {
- if (!cache[fieldRef.sys.id]) {
const asset = getAssetById(fieldRef.sys.id);
- cache[fieldRef.sys.id] = {
+ return {
uri: `https:${asset.fields.file[locale].url}`,
width: asset.fields.file[locale].details.image.width,
height: asset.fields.file[locale].details.image.height
};
- }
-
- return cache[fieldRef.sys.id];
};
| 2 |
diff --git a/fabric-common/lib/ServiceEndpoint.js b/fabric-common/lib/ServiceEndpoint.js @@ -194,7 +194,6 @@ class ServiceEndpoint {
return new Promise((resolve, reject) => {
logger.debug(`${method} - promise running ${this.name} - ${this.endpoint.url}`);
- this.connected = false;
const wait_ready_timeout = this.options['grpc-wait-for-ready-timeout'];
const timeout = new Date().getTime() + wait_ready_timeout;
if (!this.service) {
@@ -206,6 +205,7 @@ class ServiceEndpoint {
err.message = err.message + ' on ' + this.toString();
}
err.connectFailed = true;
+ this.connected = false;
logger.error(err);
logger.error(`${method} - Failed to connect to remote gRPC server ${this.name} url:${this.endpoint.url} timeout:${wait_ready_timeout}`);
reject(err);
| 11 |
diff --git a/exampleSite/content/fragments/nav/docs.md b/exampleSite/content/fragments/nav/docs.md @@ -16,7 +16,7 @@ Use one instance of this fragment per page. Running more might lead to unexpecte
- .Site.Menus.main
- **Note:** Menus displayed in the nav fragment can be nested, in which case the nested menus are displayed in a dropdown.
+ **Note:** Menus displayed in the nav fragment can be nested, in which case the nested menus are displayed in a dropdown. Please see "[nesting](https://gohugo.io/content-management/menus/#nesting)" section of Menus documentation in Hugo documentation.
```
# config.toml
| 0 |
diff --git a/src/plots/cartesian/layout_attributes.js b/src/plots/cartesian/layout_attributes.js @@ -949,7 +949,19 @@ module.exports = {
},
minor: {
- tickmode: tickmode,
+ tickmode: extendFlat({}, axesAttrs.tickmode, {
+ values: ['auto', 'linear', 'array'],
+ description: [
+ 'Sets the tick mode for this axis.',
+ 'If *auto*, the number of ticks is set via `nticks`.',
+ 'If *linear*, the placement of the ticks is determined by',
+ 'a starting position `tick0` and a tick step `dtick`',
+ '(*linear* is the default value if `tick0` and `dtick` are provided).',
+ 'If *array*, the placement of the ticks is set via `tickvals`',
+ 'and the tick text is `ticktext`.',
+ '(*array* is the default value if `tickvals` is provided).'
+ ].join(' ')
+ }),
nticks: makeNticks('minor'),
tick0: tick0,
dtick: dtick,
| 2 |
diff --git a/index.js b/index.js @@ -838,7 +838,7 @@ Read more on https://git.io/JJc0W`);
_executeSubCommand(subcommand, args) {
args = args.slice();
let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.
- const sourceExt = ['.js', '.ts', '.mjs'];
+ const sourceExt = ['.js', '.ts', '.tsx', '.mjs'];
// Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command.
this._checkForMissingMandatoryOptions();
| 11 |
diff --git a/src/screens/profileEdit/screen/profileEditScreen.js b/src/screens/profileEdit/screen/profileEditScreen.js @@ -2,11 +2,11 @@ import React, { PureComponent, Fragment } from 'react';
import { StatusBar } from 'react-native';
import { injectIntl } from 'react-intl';
import get from 'lodash/get';
-import ActionSheet from 'react-native-actionsheet';
import { ProfileEditContainer } from '../../../containers';
import { AvatarHeader, ProfileEditForm } from '../../../components';
+import { OptionsModal } from '../../../components/atoms';
class ProfileEditScreen extends PureComponent {
/* Props
@@ -81,7 +81,7 @@ class ProfileEditScreen extends PureComponent {
handleOnSubmit={handleOnSubmit}
/>
- <ActionSheet
+ <OptionsModal
ref={this.galleryRef}
options={[
intl.formatMessage({
| 14 |
diff --git a/models/lib/fileStoreStrategy.js b/models/lib/fileStoreStrategy.js @@ -16,16 +16,16 @@ export default class FileStoreStrategyFactory {
* @param storagePath file storage path
* @param classFileStoreStrategyGridFs use this strategy for GridFS storage
* @param gridFsBucket use this GridFS Bucket as GridFS Storage
- * @param classFileStoreStartegyS3 use this strategy for S3 storage
+ * @param classFileStoreStrategyS3 use this strategy for S3 storage
* @param s3Bucket use this S3 Bucket as S3 Storage
*/
- constructor(classFileStoreStrategyFilesystem, storagePath, classFileStoreStrategyGridFs, gridFsBucket) {
+ constructor(classFileStoreStrategyFilesystem, storagePath, classFileStoreStrategyGridFs, gridFsBucket, classFileStoreStrategyS3, s3Bucket) {
this.classFileStoreStrategyFilesystem = classFileStoreStrategyFilesystem;
this.storagePath = storagePath;
this.classFileStoreStrategyGridFs = classFileStoreStrategyGridFs;
this.gridFsBucket = gridFsBucket;
this.classFileStoreStrategyS3 = classFileStoreStrategyS3;
- this.s3bucket = s3Bucket;
+ this.s3Bucket = s3Bucket;
}
/** returns the right FileStoreStrategy
@@ -320,6 +320,133 @@ export class FileStoreStrategyFilesystem extends FileStoreStrategy {
}
}
+
+/** Strategy to store attachments at S3 */
+export class FileStoreStrategyS3 extends FileStoreStrategy {
+
+ /** constructor
+ * @param s3Bucket use this S3 Bucket
+ * @param fileObj the current file object
+ * @param versionName the current version
+ */
+ constructor(s3Bucket, fileObj, versionName) {
+ super(fileObj, versionName);
+ this.s3Bucket = s3Bucket;
+ }
+
+ /** download the file
+ * @param http the current http request
+ * @param cacheControl cacheControl of FilesCollection
+ */
+ interceptDownload(http, cacheControl) {
+ const readStream = this.getReadStream();
+ const downloadFlag = http?.params?.query?.download;
+
+ let ret = false;
+ if (readStream) {
+ ret = true;
+ httpStreamOutput(readStream, this.fileObj.name, http, downloadFlag, cacheControl);
+ }
+
+ return ret;
+ }
+
+ /** after file remove */
+ onAfterRemove() {
+ this.unlink();
+ super.onAfterRemove();
+ }
+
+ /** returns a read stream
+ * @return the read stream
+ */
+ getReadStream() {
+ const s3Id = this.getS3ObjectId();
+ let ret;
+ if (s3Id) {
+ ret = this.s3Bucket.openDownloadStream(s3Id);
+ }
+ return ret;
+ }
+
+ /** returns a write stream
+ * @param filePath if set, use this path
+ * @return the write stream
+ */
+ getWriteStream(filePath) {
+ const fileObj = this.fileObj;
+ const versionName = this.versionName;
+ const metadata = { ...fileObj.meta, versionName, fileId: fileObj._id };
+ const ret = this.s3Bucket.openUploadStream(this.fileObj.name, {
+ contentType: fileObj.type || 'binary/octet-stream',
+ metadata,
+ });
+ return ret;
+ }
+
+ /** writing finished
+ * @param finishedData the data of the write stream finish event
+ */
+ writeStreamFinished(finishedData) {
+ const s3FileIdName = this.getS3FileIdName();
+ Attachments.update({ _id: this.fileObj._id }, { $set: { [s3FileIdName]: finishedData._id.toHexString(), } });
+ }
+
+ /** remove the file */
+ unlink() {
+ const s3Id = this.gets3ObjectId();
+ if (s3Id) {
+ this.s3Bucket.delete(s3Id, err => {
+ if (err) {
+ console.error("error on S3 bucket.delete: ", err);
+ }
+ });
+ }
+
+ const s3FileIdName = this.getS3FileIdName();
+ Attachments.update({ _id: this.fileObj._id }, { $unset: { [s3FileIdName]: 1 } });
+ }
+
+ /** return the storage name
+ * @return the storage name
+ */
+ getStorageName() {
+ return STORAGE_NAME_S3;
+ }
+
+ /** returns the GridFS Object-Id
+ * @return the GridFS Object-Id
+ */
+ getS3ObjectId() {
+ let ret;
+ const s3FileId = this.s3FileId();
+ if (s3FileId) {
+ ret = createObjectId({ s3FileId });
+ }
+ return ret;
+ }
+
+ /** returns the S3 Object-Id
+ * @return the S3 Object-Id
+ */
+ getS3FileId() {
+ const ret = (this.fileObj.versions[this.versionName].meta || {})
+ .s3FileId;
+ return ret;
+ }
+
+ /** returns the property name of s3FileId
+ * @return the property name of s3FileId
+ */
+ getS3FileIdName() {
+ const ret = `versions.${this.versionName}.meta.s3FileId`;
+ return ret;
+ }
+}
+
+
+
+
/** move the fileObj to another storage
* @param fileObj move this fileObj to another storage
* @param storageDestination the storage destination (fs or gridfs)
| 1 |
diff --git a/public/javascripts/Admin/src/Admin.Panorama.js b/public/javascripts/Admin/src/Admin.Panorama.js @@ -51,7 +51,8 @@ function AdminPanorama(svHolder, buttonHolder, admin) {
height: self.svHolder.height()
})[0];
- self.panoNotAvailable = $("<div id='pano-not-avail'>No imagery available, try another label!</div>").css({
+ self.panoNotAvailable = $("<div id='pano-not-avail'>Oops, our fault but there is no longer imagery available " +
+ "for this label.</div>").css({
width: '100%',
height: '100%',
position: 'absolute',
@@ -59,8 +60,19 @@ function AdminPanorama(svHolder, buttonHolder, admin) {
'font-size': '200%'
})[0];
+ self.panoNotAvailableDetails =
+ $("<div id='pano-not-avail-2'>We use the Google Maps API to show the sidewalk images and sometimes Google" +
+ " removes these images so we can no longer access them. Sorry about that.</div>").css({
+ width: '95%',
+ height: '100%',
+ position: 'absolute',
+ top: '90px',
+ 'font-size': '85%'
+ })[0];
+
self.svHolder.append($(self.panoCanvas));
self.svHolder.append($(self.panoNotAvailable));
+ self.svHolder.append($(self.panoNotAvailableDetails));
self.panorama = typeof google != "undefined" ? new google.maps.StreetViewPanorama(self.panoCanvas, { mode: 'html4' }) : null;
self.panorama.addListener('pano_changed', function() {
@@ -127,17 +139,20 @@ function AdminPanorama(svHolder, buttonHolder, admin) {
if (self.panorama.getStatus() === "OK") {
$(self.panoCanvas).css('visibility', 'visible');
$(self.panoNotAvailable).css('visibility', 'hidden');
+ $(self.panoNotAvailableDetails).css('visibility', 'hidden');
$(self.buttonHolder).css('visibility', 'visible');
renderLabel(self.label);
} else if (self.panorama.getStatus() === "ZERO_RESULTS") {
- $(self.panoNotAvailable).text('No imagery available, try another label!');
+ $(self.panoNotAvailable).text('Oops, our fault but there is no longer imagery available for this label.');
$(self.panoCanvas).css('visibility', 'hidden');
$(self.panoNotAvailable).css('visibility', 'visible');
+ $(self.panoNotAvailableDetails).css('visibility', 'visible');
$(self.buttonHolder).css('visibility', 'hidden');
} else if (n < 1) {
$(self.panoNotAvailable).text('We had trouble connecting to Google Street View, please try again later!');
$(self.panoCanvas).css('visibility', 'hidden');
$(self.panoNotAvailable).css('visibility', 'visible');
+ $(self.panoNotAvailable).css('visibility', 'hidden');
$(self.buttonHolder).css('visibility', 'hidden');
} else {
setTimeout(callback, 100, n - 1);
| 7 |
diff --git a/src/injected.js b/src/injected.js @@ -603,7 +603,7 @@ var comm = {
];
comm.forEach(require, function (key) {
var script = data.require[key];
- script && code.push(script);
+ script && code.push(script + ';');
});
// wrap code to make 'use strict' work
code.push('!function(){' + script.code + '\n}.call(this)');
| 1 |
diff --git a/package.json b/package.json "babel-plugin-es6-promise": "1.0.0",
"babel-plugin-transform-object-assign": "6.8.0",
"babel-plugin-transform-proto-to-assign": "6.9.0",
- "babel-plugin-yo-yoify": "arturi/babel-plugin-yo-yoify#patch-3",
+ "babel-plugin-yo-yoify": "0.3.1",
"babel-polyfill": "6.9.1",
"babel-preset-es2015": "6.13.2",
"babel-preset-es2015-loose": "7.0.0",
| 4 |
diff --git a/assets/js/googlesitekit/modules/datastore/settings.test.js b/assets/js/googlesitekit/modules/datastore/settings.test.js @@ -57,7 +57,6 @@ describe( 'core/modules module settings panel', () => {
describe( 'reducer', () => {
it( 'has the appropriate initial state', () => {
- expect( true ).toBeTruthy();
const initialState = {};
const initialStoreState = store.getState();
| 2 |
diff --git a/admin/client/App/sagas/queryParamsSagas.js b/admin/client/App/sagas/queryParamsSagas.js @@ -68,7 +68,7 @@ export function * evalQueryParams () {
const { cachedQuery } = yield select(state => state.active);
const { currentList } = yield select(state => state.lists);
- if (pathname !== `/keystone/${currentList.id}`) return;
+ if (pathname !== `${Keystone.adminPath}/${currentList.id}`) return;
if (isEqual(query, cachedQuery)) {
yield put({ type: actions.QUERY_HAS_NOT_CHANGED });
| 14 |
diff --git a/generators/client/templates/vue/package.json.ejs b/generators/client/templates/vue/package.json.ejs @@ -45,7 +45,7 @@ limitations under the License.
"vue": "2.6.10",
"vue-class-component": "7.0.2",
"vue-cookie": "1.1.4",
- "vue-i18n": "8.15.0",
+ "vue-i18n": "8.15.1",
"vue-property-decorator": "8.2.2",
"vue-router": "3.1.3",
"vue2-filters": "0.6.0",
| 3 |
diff --git a/token-metadata/0xB26631c6dda06aD89B93C71400D25692de89c068/metadata.json b/token-metadata/0xB26631c6dda06aD89B93C71400D25692de89c068/metadata.json "symbol": "MINDS",
"address": "0xB26631c6dda06aD89B93C71400D25692de89c068",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/extends/creep/movement.js b/src/extends/creep/movement.js @@ -9,7 +9,7 @@ const travelToDefaults = {
'moveToOverride': true,
'ignoreStuck': false,
'ignoreHostileCities': true,
- 'ignoreHostileReservations': true
+ 'ignoreHostileReservations': false
}
Creep.prototype.travelTo = function (pos, opts = {}) {
| 11 |
diff --git a/conf/cityparams.conf b/conf/cityparams.conf -// NOTE if you want to change the city, modify your $SIDEWALK_CITY_ID env variable, don't just modify this default.
+// You do not need to modify the city-id here. Instead, change SIDEWALK_CITY_ID in docker-compose.yml.
city-id = "washington-dc"
city-id = ${?SIDEWALK_CITY_ID}
| 3 |
diff --git a/src/store/configureStore.prod.js b/src/store/configureStore.prod.js @@ -36,7 +36,8 @@ export default function configureOfflineServiceStore(preloadedState, appReducer,
createOfflineReducer(enableBatching(offlineReducer)),
baseState,
offlineCompose(baseOfflineConfig)(
- [thunk, createActionBuffer(REHYDRATE)]
+ [thunk, createActionBuffer(REHYDRATE)],
+ []
)
);
| 1 |
diff --git a/struts2-jquery-integration-tests/pom.xml b/struts2-jquery-integration-tests/pom.xml <properties>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- plugins -->
- <jetty-maven-plugin.version>8.1.16.v20140903</jetty-maven-plugin.version>
+ <jetty-maven-plugin.version>9.4.0.v20161208</jetty-maven-plugin.version>
<maven-failsafe-plugin.version>2.19.1</maven-failsafe-plugin.version>
<!-- dependencies -->
<junit.version>4.12</junit.version>
<build>
<plugins>
<plugin>
- <groupId>org.mortbay.jetty</groupId>
+ <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
</plugin>
<pluginManagement>
<plugins>
<plugin>
- <groupId>org.mortbay.jetty</groupId>
+ <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty-maven-plugin.version}</version>
<configuration>
<stopPort>8999</stopPort>
<scanIntervalSeconds>10</scanIntervalSeconds>
</configuration>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-jsp</artifactId>
- <version>${jetty-maven-plugin.version}</version>
- </dependency>
- </dependencies>
<executions>
<execution>
<id>start-jetty</id>
| 3 |
diff --git a/CHANGELOG.md b/CHANGELOG.md ## 7.11.4 (unreleased)
-### Breaking
-
### Feature
- Allow Volto projects to customize (via webpack resolve aliases) addons. Allow addons to customize Volto and other addons. Allow Volto projects to customize Volto in a `src/customizations/volto` folder, for better organization of the customizations folder. @tiberiuichim @sneridagh
-### Bugfix
-
-### Internal
-
## 7.11.3 (2020-08-28)
### Bugfix
| 6 |
diff --git a/packages/nexrender-database-redis/src/index.js b/packages/nexrender-database-redis/src/index.js @@ -36,6 +36,11 @@ const scan = async parser => {
/* public api */
const insert = async entry => {
+ const now = new Date();
+
+ entry.updatedAt = now;
+ entry.createdAt = now;
+
await client.setAsync(`nexjob:${entry.uid}`, JSON.stringify(entry));
};
| 1 |
diff --git a/tests/e2e/specs/auth-flow-editor.test.js b/tests/e2e/specs/auth-flow-editor.test.js @@ -12,6 +12,7 @@ import {
* Internal dependencies
*/
import {
+ logoutUser,
setAuthToken,
setClientConfig,
setSearchConsoleProperty,
@@ -46,6 +47,7 @@ describe( 'the set up flow for an editor', () => {
} );
afterEach( async() => {
+ await logoutUser();
// Restore the default/admin user
// (switchToAdmin will not work as it is not aware of the current user)
| 3 |
diff --git a/articles/quickstart/spa/angular2/04-calling-an-api.md b/articles/quickstart/spa/angular2/04-calling-an-api.md @@ -33,7 +33,9 @@ auth0 = new auth0.WebAuth({
});
```
-At this point you should try logging into your application again to take note of how the `access_token` differs from before. Instead of being an opaque token, it is now a JSON Web Token which has a payload that contains your API identifier as an `audience` and any `scope`s you've requested.
+::: note
+**Checkpoint**: You should try logging into your application again to take note of how the `access_token` differs from before. Instead of being an opaque token, it is now a JSON Web Token which has a payload that contains your API identifier as an `audience` and any `scope`s you've requested.
+:::
::: note
By default, any user on any client can ask for any scope defined in the scopes configuration area. You can implement access policies to limit this behaviour via [Rules](https://auth0.com/docs/rules).
| 3 |
diff --git a/editor/js/ui/projects/projectSettings.js b/editor/js/ui/projects/projectSettings.js @@ -461,7 +461,11 @@ RED.projects.settings = (function() {
setTimeout(function() {
depsList.editableList('removeItem',entry);
refreshModuleInUseCounts();
+ if (modulesInUse.hasOwnProperty(entry.id)) {
entry.count = modulesInUse[entry.id].count;
+ } else {
+ entry.count = 0;
+ }
depsList.editableList('addItem',entry);
},500);
}
| 9 |
diff --git a/src/style/parse.js b/src/style/parse.js @@ -14,8 +14,10 @@ styfn.parse = function( name, value, propIsBypass, propIsFlat ){
}
let flatKey = ( propIsFlat === 'mapping' || propIsFlat === true || propIsFlat === false || propIsFlat == null ) ? 'dontcare' : propIsFlat;
- let argHash = [ name, value, propIsBypass, flatKey ].join( '$' );
- let propCache = self.propCache = self.propCache || {};
+ let bypassKey = propIsBypass ? 't' : 'f';
+ let valueKey = '' + value;
+ let argHash = util.hashStrings( name, valueKey, bypassKey, flatKey );
+ let propCache = self.propCache = self.propCache || [];
let ret;
if( !(ret = propCache[ argHash ]) ){
| 4 |
diff --git a/demos/generator/typed.html b/demos/generator/typed.html <div id="blocklyDiv" style="height: 700px; width: 700px;"></div>
<xml id="toolbox" style="display: none">
- <category name="Logic">
<block type="logic_boolean_typed"></block>
<block type="logic_ternary_typed"></block>
<block type="logic_compare_typed"></block>
- </category>
- <category name="Lists">
<block type="lists_create_with_typed"></block>
- </category>
- <category name="Math">
<block type="int_typed"></block>
<block type="float_typed"></block>
<block type="int_arithmetic_typed"></block>
<block type="float_arithmetic_typed"></block>
- </category>
- <category name="Pairs">
<block type="pair_create_typed"></block>
<block type="pair_first_typed"></block>
<block type="pair_second_typed"></block>
- </category>
- <category name="Functions">
<block type="lambda_typed"></block>
<block type="lambda_app_typed"></block>
<block type="match_typed"></block>
- </category>
- <category name="Variables">
<block type="let_typed"></block>
- </category>
</xml>
<script>
| 2 |
diff --git a/app/scripts/viewconfs.js b/app/scripts/viewconfs.js @@ -483,12 +483,6 @@ export const defaultViewConfig = {
"type": "heatmap",
"position": "center",
"options": {
- "colorRange": [
- "#FFFFFF",
- "#F8E71C",
- "#F5A623",
- "#D0021B"
- ],
"maxZoom": null
}
}
| 2 |
diff --git a/assets/js/modules/tagmanager/datastore/versions.test.js b/assets/js/modules/tagmanager/datastore/versions.test.js @@ -450,7 +450,6 @@ describe( 'modules/tagmanager versions', () => {
expect( console ).toHaveErrored();
expect( registry.select( STORE_NAME ).getError() ).toBeFalsy();
expect( registry.select( STORE_NAME ).getLiveContainerVersion( accountID, internalContainerID ) ).toEqual( null );
- expect( console ).toHaveErrored();
} );
} );
| 2 |
diff --git a/_examples/13_drag_outside.html b/_examples/13_drag_outside.html @@ -14,11 +14,35 @@ css: example.css
<div id="tree1" data-url="/example_data/"></div>
-<div id="targetDiv">drag here</div>
+<div id="targetDiv">drag here (see the console)</div>
<h3>javascript</h3>
{% highlight js %}
+var targetCollisionDiv = $("#targetDiv");
+
+function isOverTarget(e) {
+ return (
+ e.clientX > targetCollisionDiv.position().left &&
+ e.clientX <
+ targetCollisionDiv.position().left +
+ targetCollisionDiv.width() &&
+ e.clientY > targetCollisionDiv.position().top &&
+ e.clientY <
+ targetCollisionDiv.position().top + targetCollisionDiv.height()
+ );
+}
+
+function handleMove(node, e) {
+ if (isOverTarget(e)) {
+ console.log("the node is over the target div");
+ }
+}
+
+function handleStop(node, e) {
+ console.log("stopped over target: ", isOverTarget(e));
+}
+
$('#tree1').tree({
onDragMove: handleMove,
onDragStop: handleStop
| 7 |
diff --git a/articles/support/matrix.md b/articles/support/matrix.md title: Auth0 Product Support Matrix
description: This doc covers what features, platforms, and software configurations Auth0 supports.
toc: true
+classes: support-matrix-page
---
-<!-- markdownlint-disable -->
-<div class="support-matrix-page">
-
# Auth0 Product Support Matrix
For customers with valid [subscriptions](${manage_url}/#/account/billing/subscription), this article covers the features, platforms, and software configurations that are eligible for Auth0 support.
| 14 |
diff --git a/css/searchbar.css b/css/searchbar.css @@ -180,26 +180,3 @@ body:not(.mac) .searchbar-item .icon-image {
.searchbar-item:focus .description-block {
max-height: 6.6em;
}
-
-/* tag searches */
-
-.searchbar-item.tag {
- display: inline-block;
- width: auto;
- background-color: rgba(0, 0, 0, 0.04);
- margin: 0.75em 0.5em;
- border-radius: 3px;
- padding-right: 1em;
-}
-.searchbar-item.tag .title {
- max-width: 100%;
-}
-.searchbar-item.tag:focus {
- background: rgba(0, 0, 0, 0.08);
-}
-.dark-theme .theme-background-color .searchbar-item.tag {
- background-color: rgba(255, 255, 255, 0.08);
-}
-.dark-theme .theme-background-color .searchbar-item.tag:focus {
- background-color: rgba(255, 255, 255, 0.12);
-}
| 2 |
diff --git a/src/js/services/go.js b/src/js/services/go.js @@ -117,7 +117,10 @@ angular.module('copayApp.services').factory('go', function($window, $rootScope,
function handleUri(uri){
- if (uri.indexOf("byteball:") == -1 && uri.indexOf("obyte:") == -1) return handleFile(uri);
+ var conf = require('ocore/conf.js');
+ var bb_url = new RegExp('^'+conf.program+':', 'i');
+ var ob_url = new RegExp('^'+conf.program.replace(/byteball/i, 'obyte')+':', 'i');
+ if (!uri.match(bb_url) && !uri.match(ob_url)) return handleFile(uri);
console.log("handleUri "+uri);
| 9 |
diff --git a/token-metadata/0xf0Ee6b27b759C9893Ce4f094b49ad28fd15A23e4/metadata.json b/token-metadata/0xf0Ee6b27b759C9893Ce4f094b49ad28fd15A23e4/metadata.json "symbol": "ENG",
"address": "0xf0Ee6b27b759C9893Ce4f094b49ad28fd15A23e4",
"decimals": 8,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/assets/js/googlesitekit/widgets/components/WidgetAreaRenderer.js b/assets/js/googlesitekit/widgets/components/WidgetAreaRenderer.js /**
* External dependencies
*/
-import { renderToStaticMarkup } from 'react-dom/server';
import classnames from 'classnames';
import PropTypes from 'prop-types';
@@ -148,7 +147,9 @@ const WidgetAreaRenderer = ( { slug } ) => {
const isActiveWidget = ( widget ) =>
widgets.some( ( item ) => item.slug === widget.slug ) &&
typeof widget.component === 'function' &&
- renderToStaticMarkup( <widget.component /> );
+ widget.component.prototype.render
+ ? new widget.component().render()
+ : widget.component();
const activeWidgets = widgets.filter( isActiveWidget );
| 2 |
diff --git a/src/plugins/AwsS3/index.js b/src/plugins/AwsS3/index.js @@ -16,6 +16,8 @@ module.exports = class AwsS3 extends Plugin {
}
const defaultOptions = {
+ timeout: 30 * 1000,
+ limit: 0,
getUploadParameters: this.getUploadParameters.bind(this),
locale: defaultLocale
}
@@ -114,9 +116,11 @@ module.exports = class AwsS3 extends Plugin {
install () {
this.uppy.addPreProcessor(this.prepareUpload)
- this.uppy.use(XHRUpload, Object.assign({
+ this.uppy.use(XHRUpload, {
fieldName: 'file',
responseUrlFieldName: 'location',
+ timeout: this.opts.timeout,
+ limit: this.opts.limit,
getResponseData (xhr) {
// If no response, we've hopefully done a PUT request to the file
// in the bucket on its full URL.
@@ -142,7 +146,7 @@ module.exports = class AwsS3 extends Plugin {
const error = xhr.responseXML.querySelector('Error > Message')
return new Error(error.textContent)
}
- }, this.opts.xhrOptions || {}))
+ })
}
uninstall () {
| 0 |
diff --git a/src/modules/Formatters.js b/src/modules/Formatters.js @@ -33,10 +33,8 @@ class Formatters {
return fn(val, timestamp)
}
- setLabelFormatters() {
- let w = this.w
- const defaultFormatter = (val) => {
+ defaultGeneralFormatter (val) {
if (Array.isArray(val)) {
return val.map((v) => {
return v
@@ -45,31 +43,54 @@ class Formatters {
return val
}
}
- w.globals.xLabelFormatter = function(val) {
- return defaultFormatter(val)
+
+ defaultYFormatter(v, i) {
+ let w = this.w
+
+ if (Utils.isNumber(v)) {
+ if (w.globals.yValueDecimal !== 0) {
+ v = v.toFixed(
+ yaxe.decimalsInFloat !== undefined
+ ? yaxe.decimalsInFloat
+ : w.globals.yValueDecimal
+ )
+ } else if (w.globals.maxYArr[i] - w.globals.minYArr[i] < 10) {
+ v = v.toFixed(1)
+ } else {
+ v = v.toFixed(0)
+ }
+ }
+ return v
+ }
+
+ setLabelFormatters() {
+ let w = this.w
+
+ w.globals.xLabelFormatter = (val) => {
+ return this.defaultGeneralFormatter(val)
}
- w.globals.xaxisTooltipFormatter = function(val) {
- return defaultFormatter(val)
+ w.globals.xaxisTooltipFormatter = (val) => {
+ return this.defaultGeneralFormatter(val)
}
- w.globals.ttKeyFormatter = function(val) {
- return defaultFormatter(val)
+ w.globals.ttKeyFormatter = (val) => {
+ return this.defaultGeneralFormatter(val)
}
- w.globals.ttZFormatter = function(val) {
+ w.globals.ttZFormatter = (val) => {
return val
}
- w.globals.legendFormatter = function(val) {
- return defaultFormatter(val)
+ w.globals.legendFormatter = (val) => {
+ return this.defaultGeneralFormatter(val)
}
// formatter function will always overwrite format property
if (w.config.xaxis.labels.formatter !== undefined) {
w.globals.xLabelFormatter = w.config.xaxis.labels.formatter
} else {
- w.globals.xLabelFormatter = function(val) {
+ w.globals.xLabelFormatter = (val) => {
if (Utils.isNumber(val)) {
// numeric xaxis may have smaller range, so defaulting to 1 decimal
if (
@@ -123,32 +144,15 @@ class Formatters {
if (yaxe.labels.formatter !== undefined) {
w.globals.yLabelFormatters[i] = yaxe.labels.formatter
} else {
- w.globals.yLabelFormatters[i] = function(val) {
+ w.globals.yLabelFormatters[i] = (val) => {
if (!w.globals.xyCharts) return val
- const vf = (v) => {
- if (Utils.isNumber(v)) {
- if (w.globals.yValueDecimal !== 0) {
- v = v.toFixed(
- yaxe.decimalsInFloat !== undefined
- ? yaxe.decimalsInFloat
- : w.globals.yValueDecimal
- )
- } else if (w.globals.maxYArr[i] - w.globals.minYArr[i] < 10) {
- v = v.toFixed(1)
- } else {
- v = v.toFixed(0)
- }
- }
- return v
- }
-
if (Array.isArray(val)) {
return val.map((v) => {
- return vf(v)
+ return this.defaultYFormatter(v, i)
})
} else {
- return vf(val)
+ return this.defaultYFormatter(val, i)
}
}
}
| 7 |
diff --git a/apps.json b/apps.json "name": "Mixed Clock",
"icon": "clock-mixed.png",
"description": "A mix of analog and digital Clock",
- "tags": "miclock",
+ "tags": "clock",
"type":"clock",
"storage": [
{"name":"+miclock","url":"clock-mixed.json"},
| 3 |
diff --git a/js/bitmex.js b/js/bitmex.js @@ -233,16 +233,24 @@ module.exports = class bitmex extends Exchange {
filter['symbol'] = market['id'];
}
let request = { 'filter': filter };
- let response = await this.privateGetOrder (this.deepExtend (request, params));
+ let full_params = this.deepExtend (request, params);
+ // why the hassle? urlencode in python is kinda broken for nested dicts.
+ // E.g. self.urlencode({"filter": {"open": True}}) will return "filter={'open':+True}"
+ // Bitmex doesn't like that. Hence resorting to this hack.
+ full_params['filter'] = JSON.stringify (full_params['filter']);
+ let response = await this.privateGetOrder (full_params);
return this.parseOrders (response, market, since, limit);
}
async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) {
- return await this.fetchOrders (symbol, since, limit, this.extend ({ 'open': true }, params));
+ let filter_params = { 'filter': { 'open': true }};
+ return await this.fetchOrders (symbol, since, limit, this.extend (filter_params, params));
}
async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) {
- return await this.fetchOrders (symbol, since, limit, this.extend ({ 'open': false }, params));
+ // Bitmex barfs if you set 'open': false in the filter...
+ let orders = await this.fetchOrders (symbol, since, limit, params);
+ return this.filterBy (orders, 'status', 'closed');
}
async fetchTicker (symbol, params = {}) {
@@ -378,11 +386,11 @@ module.exports = class bitmex extends Exchange {
symbol = market['symbol'];
}
}
- let timestamp = undefined;
+ let datetime_value = undefined;
if ('timestamp' in order)
- timestamp = order['timestamp'];
+ datetime_value = order['timestamp'];
else if ('transactTime' in order)
- timestamp = order['transactTime'];
+ datetime_value = order['transactTime'];
else
throw new ExchangeError (this.id + ' malformed order: ' + this.json (order));
let price = parseFloat (order['price']);
@@ -393,11 +401,12 @@ module.exports = class bitmex extends Exchange {
if (typeof price !== 'undefined')
if (typeof filled !== 'undefined')
cost = price * filled;
+ let timestamp = this.parse8601 (datetime_value);
let result = {
'info': order,
- 'id': order['orderId'].toString (),
+ 'id': order['orderID'].toString (),
'timestamp': timestamp,
- 'datetime': this.iso8601 (timestamp),
+ 'datetime': datetime_value,
'symbol': symbol,
'type': order['ordType'].toLowerCase (),
'side': order['side'].toLowerCase (),
| 1 |
diff --git a/src/webgl.js b/src/webgl.js @@ -109,7 +109,7 @@ class gltfWebGl
}
}
- this.setSampler(gltfSampler, gltfTex.type, !generateMips);
+ this.setSampler(gltfSampler, gltfTex.type, generateMips);
if (textureInfo.generateMips && generateMips)
{
@@ -228,21 +228,21 @@ class gltfWebGl
}
//https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants
- setSampler(gltfSamplerObj, type, rectangleImage) // TEXTURE_2D
+ setSampler(gltfSamplerObj, type, generateMipmaps) // TEXTURE_2D
{
- if (rectangleImage)
+ if (generateMipmaps)
{
- WebGl.context.texParameteri(type, WebGl.context.TEXTURE_WRAP_S, WebGl.context.CLAMP_TO_EDGE);
- WebGl.context.texParameteri(type, WebGl.context.TEXTURE_WRAP_T, WebGl.context.CLAMP_TO_EDGE);
+ WebGl.context.texParameteri(type, WebGl.context.TEXTURE_WRAP_S, gltfSamplerObj.wrapS);
+ WebGl.context.texParameteri(type, WebGl.context.TEXTURE_WRAP_T, gltfSamplerObj.wrapT);
}
else
{
- WebGl.context.texParameteri(type, WebGl.context.TEXTURE_WRAP_S, gltfSamplerObj.wrapS);
- WebGl.context.texParameteri(type, WebGl.context.TEXTURE_WRAP_T, gltfSamplerObj.wrapT);
+ WebGl.context.texParameteri(type, WebGl.context.TEXTURE_WRAP_S, WebGl.context.CLAMP_TO_EDGE);
+ WebGl.context.texParameteri(type, WebGl.context.TEXTURE_WRAP_T, WebGl.context.CLAMP_TO_EDGE);
}
- // Rectangle images are not mip-mapped, so force to non-mip-mapped sampler.
- if (rectangleImage && (gltfSamplerObj.minFilter != WebGl.context.NEAREST) && (gltfSamplerObj.minFilter != WebGl.context.LINEAR))
+ // If not mip-mapped, force to non-mip-mapped sampler.
+ if (!generateMipmaps && (gltfSamplerObj.minFilter != WebGl.context.NEAREST) && (gltfSamplerObj.minFilter != WebGl.context.LINEAR))
{
if ((gltfSamplerObj.minFilter == WebGl.context.NEAREST_MIPMAP_NEAREST) || (gltfSamplerObj.minFilter == WebGl.context.NEAREST_MIPMAP_LINEAR))
{
| 14 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.