code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/lore-ai.js b/lore-ai.js @@ -153,6 +153,17 @@ class AICharacter extends EventTarget {
this.bio = bio;
}
}
+class AIObject extends EventTarget {
+ constructor({
+ name = defaultObjectName,
+ description = defaultObjectDescription,
+ } = {}) {
+ super();
+
+ this.name = name;
+ this.description = description;
+ }
+}
class AIScene {
constructor(localPlayer, {
setting = defaultSetting,
@@ -288,6 +299,14 @@ class AIScene {
removeCharacter(character) {
this.characters.splice(this.characters.indexOf(character), 1);
}
+ addObject(opts) {
+ const object = new AIObject(opts);
+ this.objects.push(object);
+ return object;
+ }
+ removeObject(object) {
+ this.objects.splice(this.objects.indexOf(object), 1);
+ }
async generate(dstCharacter = null) {
const prompt = _makeChatPrompt(
this.setting,
| 0 |
diff --git a/app/assets/stylesheets/editor-3/_custom-carousel.scss b/app/assets/stylesheets/editor-3/_custom-carousel.scss .Carousel {
position: relative;
}
+
.Carousel-list {
- @include display-flex();
- @include justify-content(flex-start);
+ display: flex;
+ justify-content: flex-start;
position: relative;
padding-bottom: 19px;
}
+
.Carousel-item {
- @include display-flex();
- @include align-items(center);
- @include justify-content(center);
+ display: flex;
+ align-items: center;
+ justify-content: center;
width: $baseSize * 11;
min-width: $baseSize * 11;
height: $baseSize * 7;
&:last-child {
margin-right: 0;
}
+
&:hover {
border: 2px solid $cBlueHover;
cursor: pointer;
}
+
+ &.is-selected {
+ border: 2px solid #000;
}
-.Carousel-item--small {
+
+ &--small {
width: $baseSize * 5;
min-width: $baseSize * 5;
height: $baseSize * 5;
}
-.Carousel-item.is-selected {
- border: 2px solid #000;
}
+
.Carousel-shadow {
- @include transition(opacity, 400ms);
- @include opacity(0);
+ transition: opacity, 400ms;
+ opacity: 0;
display: block;
position: absolute;
top: 0;
height: $baseSize * 7;
pointer-events: none;
z-index: 100;
+
+ &.is-visible {
+ opacity: 1;
}
-.Carousel-shadow.is-visible {
- @include opacity(1);
-}
-.Carousel-shadow--left {
+
+ &--left {
@include background-horizontal(#FFF, rgba(255, 255, 255, 0));
// Overriding default background color
background-color: rgba(255, 255, 255, 0) !important;
left: 0;
}
-.Carousel-shadow--right {
+
+ &--right {
@include background-horizontal(rgba(255, 255, 255, 0), #FFF);
right: 0;
}
+}
+
.Carousel-list.ps-container > .ps-scrollbar-x-rail {
display: block;
width: 100%;
}
+
.ps-scrollbar-x-rail:hover {
cursor: move;
cursor: -webkit-grab;
cursor: -moz-grab;
}
+
.ps-scrollbar-x-rail:active {
cursor: move;
cursor: -webkit-grabbing;
| 2 |
diff --git a/packages/react-router/docs/api/location.md b/packages/react-router/docs/api/location.md @@ -50,7 +50,7 @@ Normally you just use a string, but if you need to add some "location state" tha
// but you can use a location instead
const location = {
- pathname: '/somewhere'
+ pathname: '/somewhere',
state: { fromDashboard: true }
}
| 0 |
diff --git a/packages/cx-core/src/widgets/overlay/Dropdown.js b/packages/cx-core/src/widgets/overlay/Dropdown.js @@ -497,7 +497,7 @@ Dropdown.prototype.pad = false;
Dropdown.prototype.elementExplode = 0;
Dropdown.prototype.screenPadding = 5;
Dropdown.prototype.firstChildDefinesHeight = false;
-Dropdown.prototype.firstChildDefinesWidth = true;
+Dropdown.prototype.firstChildDefinesWidth = false;
Widget.alias('dropdown', Dropdown);
Localization.registerPrototype('cx/widgets/Dropdown', Dropdown);
@@ -507,8 +507,6 @@ function getViewportRect(padding = 0) {
left: padding,
top: padding,
right: window.innerWidth - padding,
- bottom: window.innerHeight - padding,
- // width: window.innerWidth - 2 * padding,
- // height: window.innerHeight - 2 * padding,
+ bottom: window.innerHeight - padding
}
}
\ No newline at end of file
| 1 |
diff --git a/README.md b/README.md @@ -194,10 +194,10 @@ async function main() {
// get the client
const mysql = require('mysql2');
// create the pool
- const pool = await mysql.createPool({host:'localhost', user: 'root', database: 'test'});
+ const pool = mysql.createPool({host:'localhost', user: 'root', database: 'test'});
// now get a Promise wrapped instance of that pool
const promisePool = pool.promise();
- // query database
+ // query database using promises
const [rows,fields] = await promisePool.query("SELECT 1");
```
| 1 |
diff --git a/articles/cms/wordpress/configuration.md b/articles/cms/wordpress/configuration.md @@ -51,7 +51,7 @@ https://yourdomain.com/index.php?auth0=1
```
::: warning
- Do **not** cache Callback URLs, or you might see an "Invalid state" error during login. Please see our [troubleshooting steps for this error](https://auth0.com/docs/cms/wordpress/invalid-state#cached-callback-urls) for more information.
+Do <strong>not</strong> cache Callback URLs, or you might see an "Invalid state" error during login. Please see our <a href="https://auth0.com/docs/cms/wordpress/invalid-state#cached-callback-urls" >troubleshooting steps for this error</a> for more information.
:::
5. Enter your WordPress site's home domain (where the WordPress site appears) and, if different, site domain (where wp-admin is served from) in the **Allowed Web Origins** field
| 1 |
diff --git a/core/api-server/api/rest-api/routes/v1/boards.js b/core/api-server/api/rest-api/routes/v1/boards.js @@ -62,8 +62,8 @@ const routes = (options) => {
});
router.all('/tensor/start/:taskId?', methods(['POST']), logger(), async (req, res, next) => {
const { taskId } = req.params;
- const { nodeName, pipelineName } = req.body;
- await boards.startTensorboard({ taskId, nodeName, pipelineName }, 'task');
+ const { nodeName, pipelineName, jobId } = req.body;
+ await boards.startTensorboard({ taskId, jobId, nodeName, pipelineName }, 'task');
res.json({ message: 'OK' });
next();
});
| 0 |
diff --git a/js/moto-ui.js b/js/moto-ui.js @@ -279,8 +279,29 @@ var gs_moto_ui = exports;
hidePop();
});
if (action) {
+ ip.addEventListener('keydown', function(event) {
+ let key = event.key;
+ if (
+ (key >= '0' && key <= '9') ||
+ key === '.' ||
+ key === '-' ||
+ key === 'Backspace' ||
+ key === 'ArrowLeft' ||
+ key === 'ArrowRight' ||
+ key === 'Tab' ||
+ event.metaKey ||
+ event.ctrlKey
+ ) {
+ return;
+ }
+ event.preventDefault();
+ event.stopPropagation();
+ });
ip.addEventListener('keyup', function(event) {
- if (event.keyCode === 13) action(event);
+ if (event.keyCode === 13) {
+ // action(event);
+ ip.blur();
+ }
});
ip.addEventListener('blur', function(event) {
action(event);
| 7 |
diff --git a/js/igvxhr.js b/js/igvxhr.js @@ -131,7 +131,7 @@ const igvxhr = {
async function getLoadPromise(url, options) {
- return new Promise(function (fullfill, reject) {
+ return new Promise(function (resolve, reject) {
// Various Google tansformations
if (google.isGoogleURL(url)) {
@@ -195,50 +195,35 @@ const igvxhr = {
xhr.withCredentials = true;
}
- xhr.onload = function (event) {
- // when the url points to a local file, the status is 0 but that is no error
+ xhr.onload = async function (event) {
+ // when the url points to a local file, the status is 0 but that is not an error
if (xhr.status === 0 || (xhr.status >= 200 && xhr.status <= 300)) {
if (range && xhr.status !== 206 && range.start !== 0) {
// For small files a range starting at 0 can return the whole file => 200
handleError("ERROR: range-byte header was ignored for url: " + url);
} else {
- fullfill(xhr.response);
+ resolve(xhr.response);
}
} else if ((typeof gapi !== "undefined") &&
((xhr.status === 404 || xhr.status === 401) &&
google.isGoogleURL(url)) &&
!options.retries) {
+ try {
options.retries = 1;
-
- return getGoogleAccessToken()
-
- .then(function (accessToken) {
-
+ const accessToken = await getGoogleAccessToken();
options.oauthToken = accessToken;
-
- igvxhr.load(url, options)
- .then(function (response) {
- fullfill(response);
- })
- .catch(function (error) {
- if (reject) {
- reject(error);
- } else {
- throw(error);
+ return igvxhr.load(url, options);
+ } catch (e) {
+ handleError(e);
}
- });
- });
-
} else {
-
- //
if (xhr.status === 403) {
- handleError("Access forbidden")
+ handleError("Access forbidden: url")
} else if (xhr.status === 416) {
// Tried to read off the end of the file. This shouldn't happen, but if it does return an
handleError("Unsatisfiable range");
- } else {// TODO -- better error handling
+ } else {
handleError(xhr.status);
}
}
@@ -485,12 +470,16 @@ let oauthPromise;
async function getGoogleAccessToken() {
if (oauth.google.access_token) {
- return Promise.resolve(oauth.google.access_token);
+ return oauth.google.access_token;
}
if (oauthPromise) {
return oauthPromise;
}
+ if (!(gapi && gapi.auth2)) {
+ throw new Error("The Google oAuth API is required but not loaded");
+ }
+
const authInstance = gapi.auth2.getAuthInstance();
if (!authInstance) {
Alert.presentAlert("Authorization is required, but Google oAuth has not been initalized. Contact your site administrator for assistance.")
| 7 |
diff --git a/src/components/fx/hover.js b/src/components/fx/hover.js @@ -772,12 +772,9 @@ function _hover(gd, evt, subplot, noHoverEvent) {
hoverdistance: fullLayout.hoverdistance
};
- var actualHoverData = hoverData.filter(function(d) {
- return d.hoverinfo !== 'none';
- });
- var hoverLabels = actualHoverData.length && createHoverText(actualHoverData, labelOpts, gd);
+ var hoverLabels = createHoverText(hoverData, labelOpts, gd);
- if(hoverLabels && !helpers.isUnifiedHover(hovermode)) {
+ if(!helpers.isUnifiedHover(hovermode)) {
hoverAvoidOverlaps(hoverLabels, rotateLabels ? 'xa' : 'ya', fullLayout);
alignHoverText(hoverLabels, rotateLabels, fullLayout._invScaleX, fullLayout._invScaleY);
} // TODO: tagName hack is needed to appease geo.js's hack of using evt.target=true
@@ -1025,14 +1022,11 @@ function createHoverText(hoverData, opts, gd) {
// Show a single hover label
if(helpers.isUnifiedHover(hovermode)) {
- var unifiedHoverData = hoverData.filter(function(d) {
- return d.hoverinfo !== 'none';
- });
// Delete leftover hover labels from other hovermodes
container.selectAll('g.hovertext').remove();
// Return early if nothing is hovered on
- if(unifiedHoverData.length === 0) return;
+ if(hoverData.length === 0) return;
// mock legend
var mockLayoutIn = {
@@ -1054,11 +1048,11 @@ function createHoverText(hoverData, opts, gd) {
// prepare items for the legend
mockLegend.entries = [];
- for(var j = 0; j < unifiedHoverData.length; j++) {
- var texts = getHoverLabelText(unifiedHoverData[j], true, hovermode, fullLayout, t0);
+ for(var j = 0; j < hoverData.length; j++) {
+ var texts = getHoverLabelText(hoverData[j], true, hovermode, fullLayout, t0);
var text = texts[0];
var name = texts[1];
- var pt = unifiedHoverData[j];
+ var pt = hoverData[j];
pt.name = name;
if(name !== '') {
pt.text = name + ' : ' + text;
@@ -1093,7 +1087,7 @@ function createHoverText(hoverData, opts, gd) {
var tbb = legendContainer.node().getBoundingClientRect();
var tWidth = tbb.width + 2 * HOVERTEXTPAD;
var tHeight = tbb.height + 2 * HOVERTEXTPAD;
- var winningPoint = unifiedHoverData[0];
+ var winningPoint = hoverData[0];
var avgX = (winningPoint.x0 + winningPoint.x1) / 2;
var avgY = (winningPoint.y0 + winningPoint.y1) / 2;
// When a scatter (or e.g. heatmap) point wins, it's OK for the hovelabel to occlude the bar and other points.
@@ -1108,11 +1102,11 @@ function createHoverText(hoverData, opts, gd) {
lyTop = avgY - HOVERTEXTPAD;
lyBottom = avgY + HOVERTEXTPAD;
} else {
- lyTop = Math.min.apply(null, unifiedHoverData.map(function(c) { return Math.min(c.y0, c.y1); }));
- lyBottom = Math.max.apply(null, unifiedHoverData.map(function(c) { return Math.max(c.y0, c.y1); }));
+ lyTop = Math.min.apply(null, hoverData.map(function(c) { return Math.min(c.y0, c.y1); }));
+ lyBottom = Math.max.apply(null, hoverData.map(function(c) { return Math.max(c.y0, c.y1); }));
}
} else {
- lyTop = lyBottom = Lib.mean(unifiedHoverData.map(function(c) { return (c.y0 + c.y1) / 2; })) - tHeight / 2;
+ lyTop = lyBottom = Lib.mean(hoverData.map(function(c) { return (c.y0 + c.y1) / 2; })) - tHeight / 2;
}
var lxRight, lxLeft;
@@ -1121,11 +1115,11 @@ function createHoverText(hoverData, opts, gd) {
lxRight = avgX + HOVERTEXTPAD;
lxLeft = avgX - HOVERTEXTPAD;
} else {
- lxRight = Math.max.apply(null, unifiedHoverData.map(function(c) { return Math.max(c.x0, c.x1); }));
- lxLeft = Math.min.apply(null, unifiedHoverData.map(function(c) { return Math.min(c.x0, c.x1); }));
+ lxRight = Math.max.apply(null, hoverData.map(function(c) { return Math.max(c.x0, c.x1); }));
+ lxLeft = Math.min.apply(null, hoverData.map(function(c) { return Math.min(c.x0, c.x1); }));
}
} else {
- lxRight = lxLeft = Lib.mean(unifiedHoverData.map(function(c) { return (c.x0 + c.x1) / 2; })) - tWidth / 2;
+ lxRight = lxLeft = Lib.mean(hoverData.map(function(c) { return (c.x0 + c.x1) / 2; })) - tWidth / 2;
}
var xOffset = xa._offset;
| 13 |
diff --git a/lib/global-admin/addon/components/new-multi-cluster-app/component.js b/lib/global-admin/addon/components/new-multi-cluster-app/component.js @@ -15,6 +15,7 @@ import layout from './template';
import { stringifyAnswer } from 'shared/utils/evaluate';
import { isEmpty } from '@ember/utils';
import CatalogApp from 'shared/mixins/catalog-app';
+import { all } from 'rsvp';
const OVERRIDE_HEADERS = [
{
@@ -153,14 +154,26 @@ export default Component.extend(NewOrEdit, CatalogApp, {
},
actions: {
- addTarget(targetIn = { value: '' } ) {
- const target = this.globalStore.createRecord({
+ addTarget(targetIn) {
+ if (targetIn && !get(targetIn, 'type')) {
+ const {
+ multiClusterApp, editing, projectsToAddOnUpgrade, projectsToRemoveOnUpgrade
+ } = this;
+
+ let target = null;
+ let toRemoveMatch = (projectsToRemoveOnUpgrade || []).findBy('projectId', get(targetIn, 'value'));
+
+ if (toRemoveMatch) {
+ // a project was remove then re-added
+ this.projectsToRemoveOnUpgrade.removeObject(targetIn);
+
+ target = toRemoveMatch;
+ } else {
+ target = this.globalStore.createRecord({
type: 'target',
projectId: get(targetIn, 'value'),
});
- const {
- multiClusterApp, editing, projectsToAddOnUpgrade
- } = this;
+ }
if (editing) {
projectsToAddOnUpgrade.pushObject(target);
@@ -171,14 +184,25 @@ export default Component.extend(NewOrEdit, CatalogApp, {
} else {
set(multiClusterApp, 'targets', [target]);
}
+ }
},
removeTarget(target) {
- const { editing, projectsToRemoveOnUpgrade } = this;
+ const {
+ editing, projectsToRemoveOnUpgrade, projectsToAddOnUpgrade
+ } = this;
+ let targetToAddMatch = (projectsToAddOnUpgrade || []).findBy('projectId', get(target, 'projectId'));
+
+ if (targetToAddMatch) {
+ // a project was added then removed
+ this.projectsToAddOnUpgrade.removeObject(targetToAddMatch);
+ } else {
if (editing) {
projectsToRemoveOnUpgrade.pushObject(target);
}
+ }
+
get(this, 'multiClusterApp.targets').removeObject(target);
},
@@ -641,9 +665,7 @@ export default Component.extend(NewOrEdit, CatalogApp, {
willSave() {
set(this, 'errors', null);
const ok = this.validate();
- const {
- primaryResource, projectsToAddOnUpgrade, projectsToRemoveOnUpgrade
- } = this;
+ const { primaryResource } = this;
if (!ok) {
// Validation failed
@@ -654,13 +676,7 @@ export default Component.extend(NewOrEdit, CatalogApp, {
primaryResource.set('answers', this.buildAnswerMap())
if (this.editing) {
- if (!isEmpty(projectsToAddOnUpgrade)) {
- return this.doProjectActions('addProjects', projectsToAddOnUpgrade);
- }
-
- if (!isEmpty(projectsToRemoveOnUpgrade)) {
- return this.doProjectActions('removeProjects', projectsToRemoveOnUpgrade);
- }
+ return this.doProjectActions();
} else {
return true;
}
@@ -669,16 +685,30 @@ export default Component.extend(NewOrEdit, CatalogApp, {
}
},
- doProjectActions(action, projects) {
+ doProjectActions() {
const { primaryResource } = this;
+ const { projectsToAddOnUpgrade, projectsToRemoveOnUpgrade } = this;
+ const promises = [];
- return primaryResource.doAction(action, { projects: projects.map((p) => get(p, 'projectId') ) })
+ if (projectsToAddOnUpgrade && projectsToAddOnUpgrade.length > 0) {
+ promises.push(primaryResource.doAction('addProjects', { projects: projectsToAddOnUpgrade.map((p) => get(p, 'projectId')) }));
+ }
+
+ if (projectsToRemoveOnUpgrade && projectsToRemoveOnUpgrade.length > 0) {
+ promises.push(primaryResource.doAction('removeProjects', { projects: projectsToRemoveOnUpgrade.map((p) => get(p, 'projectId')) }));
+ }
+
+ if (promises.length > 0) {
+ return all(promises)
.then(() => {
return true;
})
.catch((/* handled by growl error */) => {
return false;
});
+ } else {
+ return true;
+ }
},
doneSaving() {
| 1 |
diff --git a/src/index.html b/src/index.html <p class="dialog-text">You are sending <span class="confirmation-value">{{withdraw.confirm.amount.value}}</span>
<span class="confirmation-value">{{withdraw.confirm.amount.currency}}</span> with
<span class="confirmation-value">{{withdraw.confirm.fee.value}}</span>
- <span class="confirmation-value">{{withdraw.confirm.fee.currency}}</span> fee to the gateway address in Waves<br/>
+ <span class="confirmation-value">{{withdraw.confirm.fee.currency}}</span> fee to the Waves gateway address <br/>
<span class="confirmation-value">{{withdraw.confirm.gatewayAddress}}</span>.
</p>
- <p class="dialog-text">The gateway is responsible for transfer of crypto to address <span class="confirmation-value">{{withdraw.confirm.recipient}}</span>.</p>
- <p class="dialog-text">Please <span class="fontBold"> CONFIRM </span>to execute or <span class="fontBold"> CANCEL </span> to discard.</p>
+ <p class="dialog-text">The gateway will transfer these funds to your bitcoin address: <span class="confirmation-value">{{withdraw.confirm.recipient}}</span>.</p>
+ <p class="dialog-text">Press <span class="fontBold"> CONFIRM </span>to execute or <span class="fontBold"> CANCEL </span> to discard this operation.</p>
</div>
</div>
</div>
<div class="noDisp" ng-controller="walletDepositController as deposit">
<div id="deposit-dialog" waves-dialog ok-button-caption="CLOSE" cancel-button-visible="false">
<h2 class="sectionHeader">DEPOSIT: {{deposit.currency}}</h2>
- <p class="dialog-text">To deposit {{deposit.currency}} on your Waves account, please send the real crypto to the address below
+ <p class="dialog-text">To deposit bitcoins to your Waves account, please send BTC to the address below.
<table class="wavesTable">
<tbody>
<tr ng-repeat="r in deposit.requisites track by r.name">
<td>{{r.name}}</td>
- <td><span class="clipSpan" tooltipster tooltip-theme="tooltipster-theme1" ngclipboard data-clipboard-text="{{r.value}}" title="Copy this requisite to the clipboard." ngclipboard-success="deposit.clipboardOk()">{{r.value}}</span></td>
+ <td><span class="clipSpan" tooltipster tooltip-theme="tooltipster-theme1" ngclipboard data-clipboard-text="{{r.value}}" title="Copy bitcoin address to the clipboard." ngclipboard-success="deposit.clipboardOk()">{{r.value}}</span></td>
</tr>
</tbody>
</table>
</p>
- <p class="dialog-text">Use this address in your bitcoin client. The gateway will take care of the transfer to your Waves account. <br/>
- Please note, that the gateway may apply a fee for operations of this kind</p>
+ <p class="dialog-text">Enter this address into your bitcoin client or wallet. Once the transaction is confirmed, <br/>
+ the gateway will process the transfer of BTC to a token in your Waves account.</p>
+ <p class="dialog-text">Please note that the gateway may apply a fee for this operation.</p>
</div>
</div>
| 3 |
diff --git a/install.php b/install.php @@ -82,7 +82,9 @@ if (!defined('JSON_PRETTY_PRINT')) {
// Domain and protocol
define('DOMAIN', $_SERVER['HTTP_HOST']);
-if (!empty($_SERVER['HTTPS'])) {
+if ( !empty($_SERVER['HTTPS']) ||
+ (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ||
+ (!empty($_SERVER['HTTP_X_FORWARDED_SSL']) && ($_SERVER['HTTP_X_FORWARDED_SSL'] == 'on')) ) {
define('PROTOCOL', 'https://');
} else {
define('PROTOCOL', 'http://');
| 7 |
diff --git a/src/datepicker.jsx b/src/datepicker.jsx @@ -16,6 +16,7 @@ const WrappedCalendar = onClickOutside(Calendar)
export default class DatePicker extends React.Component {
static propTypes = {
+ allowSameDay: PropTypes.bool,
autoComplete: PropTypes.string,
autoFocus: PropTypes.bool,
calendarClassName: PropTypes.string,
@@ -80,6 +81,7 @@ export default class DatePicker extends React.Component {
static get defaultProps () {
return {
+ allowSameDay: false,
dateFormat: 'L',
dateFormatCalendar: 'MMMM YYYY',
onChange () {},
@@ -221,7 +223,7 @@ export default class DatePicker extends React.Component {
return
}
- if (!isSameDay(this.props.selected, changedDate)) {
+ if (!isSameDay(this.props.selected, changedDate) || this.props.allowSameDay) {
if (changedDate !== null) {
if (this.props.selected) {
changedDate = moment(changedDate).set({
| 11 |
diff --git a/packages/router/utils.ts b/packages/router/utils.ts @@ -440,9 +440,20 @@ function flattenRoutes<
}
/**
- * Computes all combinations of optional path segments for a given path.
+ * Computes all combinations of optional path segments for a given path,
+ * excluding combinations that are ambiguous and of lower priority.
+ *
+ * For example, `/one/:two?/three/:four?/:five?` explodes to:
+ * - `/one/three`
+ * - `/one/:two/three`
+ * - `/one/three/:four`
+ * - `/one/three/:five`
+ * - `/one/:two/three/:four`
+ * - `/one/:two/three/:five`
+ * - `/one/three/:four/:five`
+ * - `/one/:two/three/:four/:five`
*/
-let _explodeOptionalSegments = (path: string): string[] => {
+function explodeOptionalSegments(path: string): string[] {
let segments = path.split("/");
if (segments.length === 0) return [];
@@ -459,66 +470,23 @@ let _explodeOptionalSegments = (path: string): string[] => {
return isOptional ? ["", required] : [required];
}
- let restExploded = _explodeOptionalSegments(rest.join("/"));
- return restExploded.flatMap((subpath) => {
+ let restExploded = explodeOptionalSegments(rest.join("/"));
+ return restExploded
+ .flatMap((subpath) => {
// /one + / + :two/three -> /one/:two/three
- let requiredExploded = subpath === "" ? required : required + "/" + subpath;
+ let requiredExploded =
+ subpath === "" ? required : required + "/" + subpath;
// For optional segments, return the exploded path _without_ current segment first (`subpath`)
// and exploded path _with_ current segment later (`subpath`)
// This ensures that exploded paths are emitted in priority order
// `/one/three/:four` will come before `/one/three/:five`
return isOptional ? [subpath, requiredExploded] : [requiredExploded];
- });
-};
-
-/**
- * Computes all combinations of optional path segments for a given path,
- * excluding combinations that are ambiguous and of lower priority.
- *
- * For example, `/one/:two?/three/:four?/:five?` explodes to:
- * - `/one/three`
- * - `/one/:two/three`
- * - `/one/three/:four`
- * - `/one/:two/three/:four`
- * - `/one/three/:four/:five`
- * - `/one/:two/three/:four/:five`
- *
- * Note that these paths are not returned:
- * - `/one/three/:five` (because `/one/three/:four` has priority)
- * - `/one/:two/three/:five` (because `/one/:two/three/:four` has priority)
- */
-let explodeOptionalSegments = (path: string) => {
- let result: string[] = [];
- // Compute hash for dynamic path segments
- // /one/:two/three/:four -> /one/:/three/:
- let dynamicHash = (subpath: string) =>
- subpath
- .split("/")
- .map((segment) => (segment.startsWith(":") ? ":" : segment))
- .join("/");
-
- let dynamicHashes = new Set<string>();
- for (let exploded of _explodeOptionalSegments(path)) {
- let hash = dynamicHash(exploded);
-
- // `/one/three/:four` and `/one/three/:five` have the same hash: `/one/three/:`
- // so we only emit the first one of these we come across
- // _explodeOptionalSegments returns exploded paths in priority order,
- // so `/one/three/:four` will come before `/one/three/:five`
- if (dynamicHashes.has(hash)) continue;
-
- dynamicHashes.add(hash);
-
+ })
+ .map((exploded) => {
// for absolute paths, ensure `/` instead of empty segment
- if (path.startsWith("/") && exploded === "") {
- result.push("/");
- continue;
- }
-
- result.push(exploded);
+ return path.startsWith("/") && exploded === "" ? "/" : exploded;
+ });
}
- return result;
-};
function rankRouteBranches(branches: RouteBranch[]): void {
branches.sort((a, b) =>
| 2 |
diff --git a/test/apps/carto-dynamic-tile/app.js b/test/apps/carto-dynamic-tile/app.js @@ -44,6 +44,16 @@ const config = {
zipcodes: 'carto_backend_data_team.dynamic_tiling.usa_zcta5_2019',
h3: 'carto_backend_data_team.dynamic_tiling.usa_h3res8_v1',
block: 'carto_backend_data_team.dynamic_tiling.usa_block_2019'
+ },
+ postgres: {
+ points_1M: 'demo.demo_tables.points_1m',
+ points_5M: 'demo.demo_tables.points_5m',
+ points_10M: 'demo.demo_tables.points_10m',
+ censustract: 'demo.demo_tables.usa_censustract_2019',
+ blockgroup: 'demo.demo_tables.usa_blockgroup_2019',
+ zipcodes: 'demo.demo_tables.usa_zcta5_2019',
+ county: 'demo.demo_tables.usa_county_2019',
+ block: 'demo.demo_tables.usa_block_2019'
}
};
| 0 |
diff --git a/articles/rules/current/index.md b/articles/rules/current/index.md @@ -50,7 +50,7 @@ To create a Rule, or try the examples below, go to [New Rule](${manage_url}/#/ru
### Hello World
-::: note
+::: panel Namespace Identifiers
Any non-Auth0 HTTP or HTTPS URL can be used as a namespace identifier, and any number of namespaces can be used. An exception to that are `webtask.io` and `webtask.run` which are Auth0 domains and therefore cannot be used. The namespace URL does not have to point to an actual resource; it's only used as an identifier and will not be called by Auth0. For more information refer to [User profile claims and scope](/api-auth/tutorials/adoption/scope-custom-claims).
:::
| 14 |
diff --git a/package.json b/package.json "istanbul": "1.0.0-alpha.2",
"istanbul-api": "1.0.0-alpha.13",
"lolex": "^1.4.0",
- "mocha": "^6.1.4",
+ "mocha": "^2.3.4",
"mocha-junit-reporter": "1.11.1",
"node-mocks-http": "1.5.2",
"s3blaster": "scality/s3blaster#950fab1",
},
"scripts": {
"cloudserver": "S3METADATA=mongodb npm-run-all --parallel start_dataserver start_s3server",
- "ft_awssdk": "cd tests/functional/aws-node-sdk && ./node_modules/mocha/bin/mocha test/",
- "ft_awssdk_aws": "cd tests/functional/aws-node-sdk && AWS_ON_AIR=true ./node_modules/mocha/bin/mocha test/",
- "ft_awssdk_buckets": "cd tests/functional/aws-node-sdk && ./node_modules/mocha/bin/mocha test/bucket",
- "ft_awssdk_objects_misc": "cd tests/functional/aws-node-sdk && ./node_modules/mocha/bin/mocha test/legacy test/object test/service test/support",
- "ft_awssdk_versioning": "cd tests/functional/aws-node-sdk && ./node_modules/mocha/bin/mocha test/versioning/",
- "ft_awssdk_external_backends": "cd tests/functional/aws-node-sdk && ./node_modules/mocha/bin/mocha test/multipleBackend",
+ "ft_awssdk": "cd tests/functional/aws-node-sdk && mocha test/",
+ "ft_awssdk_aws": "cd tests/functional/aws-node-sdk && AWS_ON_AIR=true mocha test/",
+ "ft_awssdk_buckets": "cd tests/functional/aws-node-sdk && mocha test/bucket",
+ "ft_awssdk_objects_misc": "cd tests/functional/aws-node-sdk && mocha test/legacy test/object test/service test/support",
+ "ft_awssdk_versioning": "cd tests/functional/aws-node-sdk && mocha test/versioning/",
+ "ft_awssdk_external_backends": "cd tests/functional/aws-node-sdk && mocha test/multipleBackend",
"ft_management": "cd tests/functional/report && npm test",
"ft_node": "cd tests/functional/raw-node && npm test",
"ft_node_routes": "cd tests/functional/raw-node && npm run test-routes",
"ft_gcp": "cd tests/functional/raw-node && npm run test-gcp",
"ft_healthchecks": "cd tests/functional/healthchecks && npm test",
- "ft_s3cmd": "cd tests/functional/s3cmd && ./node_modules/mocha/bin/mocha -t 40000 *.js",
- "ft_s3curl": "cd tests/functional/s3curl && ./node_modules/mocha/bin/mocha -t 40000 *.js",
- "ft_util": "cd tests/functional/utilities && ./node_modules/mocha/bin/mocha -t 40000 *.js",
+ "ft_s3cmd": "cd tests/functional/s3cmd && mocha -t 40000 *.js",
+ "ft_s3curl": "cd tests/functional/s3curl && mocha -t 40000 *.js",
+ "ft_util": "cd tests/functional/utilities && mocha -t 40000 *.js",
"ft_test": "npm-run-all -s ft_awssdk ft_s3cmd ft_s3curl ft_node ft_healthchecks ft_management ft_util",
- "ft_search": "cd tests/functional/aws-node-sdk && ./node_modules/mocha/bin/mocha -t 90000 test/mdSearch",
- "ft_kmip": "cd tests/functional/kmip && ./node_modules/mocha/bin/mocha -t 40000 *.js",
+ "ft_search": "cd tests/functional/aws-node-sdk && mocha -t 90000 test/mdSearch",
+ "ft_kmip": "cd tests/functional/kmip && mocha -t 40000 *.js",
"install_ft_deps": "npm install [email protected] [email protected] [email protected] [email protected] [email protected]",
"lint": "eslint $(git ls-files '*.js')",
"lint_md": "mdlint $(git ls-files '*.md')",
"utapi_replay": "node lib/utapi/utapiReplay.js",
"utapi_reindex": "node lib/utapi/utapiReindex.js",
"management_agent": "node managementAgent.js",
- "test": "CI=true S3BACKEND=mem ./node_modules/mocha/bin/mocha --recursive tests/unit",
+ "test": "CI=true S3BACKEND=mem mocha --recursive tests/unit",
"test_legacy_location": "CI=true S3_LOCATION_FILE=tests/locationConfig/locationConfigLegacy.json S3BACKEND=mem mocha --recursive tests/unit",
- "multiple_backend_test": "CI=true S3BACKEND=mem S3DATA=multiple ./node_modules/mocha/bin/mocha -t 20000 --recursive tests/multipleBackend",
+ "multiple_backend_test": "CI=true S3BACKEND=mem S3DATA=multiple mocha -t 20000 --recursive tests/multipleBackend",
"unit_coverage": "CI=true mkdir -p coverage/unit/ && S3BACKEND=mem MOCHA_FILE=$CIRCLE_TEST_REPORTS/unit/unit.xml istanbul cover --dir coverage/unit _mocha -- --reporter mocha-junit-reporter --recursive tests/unit",
"unit_coverage_legacy_location": "CI=true mkdir -p coverage/unitlegacylocation/ && S3_LOCATION_FILE=tests/locationConfig/locationConfigLegacy.json S3BACKEND=mem MOCHA_FILE=$CIRCLE_TEST_REPORTS/unit/unitlegacylocation.xml istanbul cover --dir coverage/unitlegacylocation _mocha -- --reporter mocha-junit-reporter --recursive tests/unit"
}
| 13 |
diff --git a/includes/Compatibility.php b/includes/Compatibility.php @@ -61,7 +61,7 @@ class Compatibility {
*
* @var array
*/
- protected $extensions;
+ protected $extensions = [];
/**
* Array of required files.
@@ -158,7 +158,7 @@ class Compatibility {
*/
public function check_required_files() {
$required_files = $this->get_required_files();
- if ( $required_files && is_array( $required_files ) ) {
+ if ( $required_files ) {
foreach ( $required_files as $required_file ) {
if ( ! is_readable( $required_file ) ) {
$message =
@@ -339,7 +339,7 @@ class Compatibility {
* @return array
*/
public function get_extensions() {
- return $this->extensions;
+ return (array) $this->extensions;
}
/**
@@ -349,7 +349,7 @@ class Compatibility {
* @return array
*/
public function get_required_files() {
- return $this->required_files;
+ return (array) $this->required_files;
}
/**
@@ -401,7 +401,7 @@ class Compatibility {
* @param array $extensions Array of extensions.
* @return void
*/
- public function set_extensions( $extensions ) {
+ public function set_extensions( array $extensions ) {
$this->extensions = $extensions;
}
| 7 |
diff --git a/src/og/control/ruller/RullerScene.js b/src/og/control/ruller/RullerScene.js @@ -10,16 +10,32 @@ import { Vector } from '../../layer/Vector.js';
import { Entity } from '../../entity/Entity.js';
import { Ellipsoid } from '../../ellipsoid/Ellipsoid.js';
import { Object3d } from '../../Object3d.js';
-import * as utils from "../../utils/shared.js";
const OUTLINE_COUNT = 120;
+const MAX_SCALE = 0.005;
+const MIN_SCALE = 0.001;
+const MAX_SCALE_HEIGHT = 3000.0;
+const MIN_SCALE_HEIGHT = 19000000.0;
+
+function distanceFormat(v) {
+ if (v > 1000) {
+ return `${(v / 1000).toFixed(1)} km`;
+ } else if (v > 9) {
+ return `${Math.round(v)} m`;
+ } else {
+ return `${v.toFixed(1)} m`;
+ }
+}
+
class RullerScene extends RenderNode {
constructor(options = {}) {
super(options.name);
this.events = new Events(EVENT_NAMES);
+ this._ignoreTerrain = options.ignoreTerrain != undefined ? options.ignoreTerrain : true;
+
this._planet = options.planet || null;
this._startLonLat = null;
@@ -30,6 +46,8 @@ class RullerScene extends RenderNode {
this._startPos = null;
this._startClick = new Vec2();
+ this._heading = 0;
+
this._propsLabel = new Entity({
'name': 'propsLabel',
'label': {
@@ -54,9 +72,9 @@ class RullerScene extends RenderNode {
}
});
- this._trackEntity.polyline.altitude = 2;
+ this._trackEntity.polyline.altitude = 0.01;
- let obj3d = Object3d.createCylinder(1.5, 0, 5, 20, 1, true, false, 0, -3.5, 0)
+ let obj3d = Object3d.createCylinder(1.1, 0, 2.7, 20, 1, true, false, 0, 0, 0)
this._cornerEntity = [
new Entity({
@@ -93,7 +111,7 @@ class RullerScene extends RenderNode {
this._trackLayer = new Vector("track", {
entities: [this._trackEntity, this._propsLabel],
pickingEnabled: false,
- polygonOffsetUnits: 0,
+ polygonOffsetUnits: -1.0,
relativeToGround: true
});
@@ -103,6 +121,13 @@ class RullerScene extends RenderNode {
});
}
+ set ignoreTerrain(v) {
+ this._ignoreTerrain = v;
+ if (v) {
+ //...redraw line
+ }
+ }
+
bindPlanet(planet) {
this._planet = planet;
}
@@ -233,7 +258,7 @@ class RullerScene extends RenderNode {
let endPos = this._planet.ellipsoid.lonLatToCartesian(endLonLat);
let length = this._planet.ellipsoid.getGreatCircleDistance(startLonLat, endLonLat);
- let heading = Ellipsoid.getRhumbBearing(startLonLat, endLonLat);
+ this._heading = Ellipsoid.getRhumbBearing(startLonLat, endLonLat);
let path = [];
let dir = endPos.sub(startPos);
@@ -247,8 +272,11 @@ class RullerScene extends RenderNode {
path.push(endPos);
this._trackEntity.polyline.setPath3v([path]);
+
+ if (this._ignoreTerrain) {
this._propsLabel.setCartesian3v(path[Math.floor(path.length / 2)]);
- this._propsLabel.label.setText(`${Math.round(length)} m, ${Math.round(heading)} deg`);
+ this._propsLabel.label.setText(`${distanceFormat(length)}, ${Math.round(this._heading)} deg`);
+ }
}
_onMouseMove(e) {
@@ -277,11 +305,6 @@ class RullerScene extends RenderNode {
}
getScale(cart) {
- const MAX_SCALE = 0.005;
- const MIN_SCALE = 0.001;
- const MAX_SCALE_HEIGHT = 3000.0;
- const MIN_SCALE_HEIGHT = 1900000.0;
-
let r = this.renderer;
let t = 1.0 - (r.activeCamera._lonLat.height - MAX_SCALE_HEIGHT) / (MIN_SCALE_HEIGHT - MAX_SCALE_HEIGHT);
let _distanceToCamera = cart.distance(r.activeCamera.eye);
@@ -296,6 +319,16 @@ class RullerScene extends RenderNode {
this._cornerEntity[0].geoObject.setScale(this.getScale(this._cornerEntity[0].getCartesian()));
this._cornerEntity[1].geoObject.setScale(this.getScale(this._cornerEntity[1].getCartesian()));
+
+ if (!this._ignoreTerrain) {
+ let res = 0;
+ for (let i = 0, len = t.length - 1; i < len; i++) {
+ res += t[i + 1].distance(t[i]);
+ }
+
+ this._propsLabel.setCartesian3v(t[Math.floor(t.length / 2)]);
+ this._propsLabel.label.setText(`${distanceFormat(res)}, ${Math.round(this._heading)} deg`);
+ }
}
}
| 0 |
diff --git a/token-metadata/0xE277aC35F9D327A670c1A3F3eeC80a83022431e4/metadata.json b/token-metadata/0xE277aC35F9D327A670c1A3F3eeC80a83022431e4/metadata.json "symbol": "PUX",
"address": "0xE277aC35F9D327A670c1A3F3eeC80a83022431e4",
"decimals": 8,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/muncher/import.js b/src/muncher/import.js @@ -51,6 +51,23 @@ const srdCompendiumLookup = [
{ type: "monsterfeatures", name: "dnd5e.monsterfeatures" },
];
+var srdIconMapLoaded = false;
+var srdIconMap = {};
+var srdPacksLoaded = false;
+var srdPacks = {};
+
+
+export async function loadSRDPacks() {
+ if (srdPacksLoaded) return;
+ logger.debug("Loading srd packs");
+ srdPacks["dnd5e.items"] = await game.packs.get("dnd5e.items").getContent();
+ srdPacks["dnd5e.spells"] = await game.packs.get("dnd5e.spells").getContent();
+ srdPacks["dnd5e.classfeatures"] = await game.packs.get("dnd5e.classfeatures").getContent();
+ srdPacks["dnd5e.races"] = await game.packs.get("dnd5e.races").getContent();
+ srdPacks["dnd5e.monsterfeatures"] = await game.packs.get("dnd5e.monsterfeatures").getContent();
+ srdPacksLoaded = true;
+}
+
const gameFolderLookup = [
{
type: "itemSpells",
@@ -420,14 +437,13 @@ export async function getImagePath(imageUrl, type = "ddb", name = "", download =
return null;
}
-export async function getSRDIconMatch(type) {
- const compendiumLabel = srdCompendiumLookup.find((c) => c.type == type).name;
- const compendium = await game.packs.find((pack) => pack.collection === compendiumLabel);
- const index = await compendium.getIndex();
+async function getSRDIconMatch(type) {
+ if (!srdPacksLoaded) await loadSRDPacks();
+ const compendiumName = srdCompendiumLookup.find((c) => c.type == type).name;
+ console.warn(compendiumName);
+ console.log(srdPacks);
- let items = [];
- for (const i of index) {
- const item = await compendium.getEntry(i._id); // eslint-disable-line no-await-in-loop
+ const items = srdPacks[compendiumName].map((item) => {
let smallItem = {
name: item.name,
img: item.img,
@@ -435,24 +451,25 @@ export async function getSRDIconMatch(type) {
data: {},
};
if (item.data.activation) smallItem.data.activation = item.data.activation;
- items.push(smallItem);
- }
+ return smallItem;
+ });
return items;
}
export async function getSRDIconLibrary() {
+ if (srdIconMapLoaded) return srdIconMap;
const compendiumFeatureItems = await getSRDIconMatch("features");
const compendiumInventoryItems = await getSRDIconMatch("inventory");
const compendiumSpellItems = await getSRDIconMatch("spells");
const compendiumMonsterFeatures = await getSRDIconMatch("monsterfeatures");
- const srdCompendiumItems = compendiumInventoryItems.concat(
+ srdIconMap = compendiumInventoryItems.concat(
compendiumSpellItems,
compendiumFeatureItems,
compendiumMonsterFeatures,
);
- return srdCompendiumItems;
+ return srdIconMap;
}
// eslint-disable-next-line require-atomic-updates
@@ -642,14 +659,17 @@ export async function updateMagicItemImages(items) {
// if we still have items to add, add them
if (items.length > 0) {
if (ddbItemIcons) {
+ logger.debug("Magic items: adding equipment icons");
items = await getDDBEquipmentIcons(items, true);
}
if (useSRDCompendiumIcons) {
+ logger.debug("Magic items: adding srd compendium icons");
items = await copySRDIcons(items);
}
if (ddbSpellIcons) {
+ logger.debug("Magic items: adding ddb spell school icons");
items = await getDDBSpellSchoolIcons(items, true);
}
}
@@ -845,8 +865,28 @@ export async function getCompendiumItems(items, type, compendiumLabel = null, lo
export async function getSRDCompendiumItems(items, type, looseMatch = false) {
// console.error(game.packs.keys());
+ if (!srdPacksLoaded) await loadSRDPacks();
const compendiumName = srdCompendiumLookup.find((c) => c.type == type).name;
- return getCompendiumItems(items, type, compendiumName, looseMatch);
+ const compendiumItems = srdPacks[compendiumName];
+
+ const loadedItems = await compendiumItems.filter((i) =>
+ compendiumItems.some((orig) => {
+ const alternativeNames = (((orig.flags || {}).ddbimporter || {}).dndbeyond || {}).alternativeNames;
+ const extraNames = (alternativeNames) ? orig.flags.ddbimporter.dndbeyond.alternativeNames : [];
+ if (looseMatch) {
+ const looseNames = getLooseNames(orig.name, extraNames);
+ return looseNames.includes(i.name.split("(")[0].trim().toLowerCase());
+ } else {
+ return i.name === orig.name || extraNames.includes(i.name);
+ }
+ })
+ );
+ logger.debug(`loaded items: ${JSON.stringify(loadedItems)}`);
+
+ const results = await updateMatchingItems(items, loadedItems, looseMatch, monsterMatch);
+ logger.debug(`result items: ${results}`);
+
+ return results;
}
/**
| 7 |
diff --git a/src/server/models/config.js b/src/server/models/config.js @@ -192,6 +192,7 @@ module.exports = function(crowi) {
file: crowi.fileUploadService.getFileUploadEnabled(),
},
registrationWhiteList: crowi.configManager.getConfig('crowi', 'security:registrationWhiteList'),
+ showPageLimitationS: crowi.configManager.getConfig('crowi', 'customize:showPageLimitationS'),
layoutType: crowi.configManager.getConfig('crowi', 'customize:layout'),
themeType: crowi.configManager.getConfig('crowi', 'customize:theme'),
isEnabledLinebreaks: crowi.configManager.getConfig('markdown', 'markdown:isEnabledLinebreaks'),
| 12 |
diff --git a/src/components/common/TmSessionSignUp.vue b/src/components/common/TmSessionSignUp.vue <h2 class="session-title">
Create a new address
</h2>
- <div v-if="session.insecureMode">
+ <div v-if="!session.insecureMode" class="session-main">
+ <InsecureModeWarning />
+ </div>
+ <div v-else>
<div class="session-main">
<Steps
:steps="[`Create`, `Password`, `Seed`, `Success`]"
<TmBtn value="Next" type="submit" />
</div>
</div>
- <div v-else class="session-main">
- <InsecureModeWarning />
- </div>
</TmFormStruct>
</SessionFrame>
</template>
| 5 |
diff --git a/packages/app/src/services/renderer/growi-renderer.tsx b/packages/app/src/services/renderer/growi-renderer.tsx @@ -219,9 +219,6 @@ const generateCommonOptions: ReactMarkdownOptionsGenerator = (
rehypePlugins: [slug],
components: {
a: NextLink,
- h1: Header,
- h2: Header,
- h3: Header,
},
};
};
@@ -232,14 +229,17 @@ export const generateViewOptions: ReactMarkdownOptionsGenerator = (
const options = generateCommonOptions(growiRendererConfig, rendererSettings);
- const { remarkPlugins, rehypePlugins } = options;
+ const { remarkPlugins, rehypePlugins, components } = options;
// add remark plugins
- remarkPlugins?.push(footnotes);
- remarkPlugins?.push(emoji);
+ if (remarkPlugins != null) {
+ remarkPlugins.push(footnotes);
+ remarkPlugins.push(emoji);
if (rendererSettings.isEnabledLinebreaks) {
- remarkPlugins?.push(breaks);
+ remarkPlugins.push(breaks);
}
+ }
+
// add rehypePlugins
// rehypePlugins.push([toc, {
// headings: ['h1', 'h2', 'h3'],
@@ -249,6 +249,13 @@ export const generateViewOptions: ReactMarkdownOptionsGenerator = (
// behavior: 'append',
// }]);
+ // add components
+ if (components != null) {
+ components.h1 = Header;
+ components.h2 = Header;
+ components.h3 = Header;
+ }
+
// // Add configurers for viewer
// renderer.addConfigurers([
// new FooternoteConfigurer(),
| 12 |
diff --git a/setup.py b/setup.py @@ -5,7 +5,7 @@ here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.md')).read()
CHANGES = open(os.path.join(here, 'CHANGES.rst')).read()
# Edit Snovault version after the `@` here, can be a branch or tag
-SNOVAULT_DEP = "git+https://github.com/ENCODE-DCC/snovault.git@ENCM-89-support-big-image-attachments"
+SNOVAULT_DEP = "git+https://github.com/ENCODE-DCC/[email protected]"
INSTALL_REQUIRES = [
"PasteDeploy==2.1.0",
| 3 |
diff --git a/app/initializers/route-spy.js b/app/initializers/route-spy.js @@ -14,11 +14,18 @@ export function initialize() {
willTranstionNotify: function(transition) {
const router = window.ls('router');
+ let url;
+
+ if (transition.targetName && transition.to) {
+ try {
+ url = router.urlFor(transition.targetName, transition.to.params );
+ } catch (e) {}
+ }
window.top.postMessage({
action: 'before-navigation',
target: transition.targetName,
- url: router.urlFor(transition.targetName)
+ url
})
}.on('willTransition')
});
@@ -31,7 +38,7 @@ export function initialize() {
if (msg.action === 'navigate') {
const router = window.ls('router');
- // If the route being asked for is already loaded, then
+ // If the route being asked for is already loaded, send a did-transition event
if (router.currentRouteName === msg.name) {
window.top.postMessage({
action: 'did-transition',
| 1 |
diff --git a/CommentUserColours.user.js b/CommentUserColours.user.js // @description Unique colour for each user in comments to make following users in long comment threads easier
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 1.1.1
+// @version 1.1.2
//
// @include https://*stackoverflow.com/*
// @include https://*serverfault.com/*
var styles = `
<style>
-.comment-user {
+.js-usercolor {
position: relative;
--usercolor: transparent;
}
-.comment-user:after {
+.js-usercolor:after {
content: '';
position: absolute;
bottom: -1px;
| 4 |
diff --git a/base/windows/shop/BuyArtifactsMenu.js b/base/windows/shop/BuyArtifactsMenu.js @@ -426,6 +426,7 @@ export class BuyArtifactsMenu{
this.item_list = [];
this.selected_item = null;
this.old_item = null;
+ this.buy_select_pos = {page: 0, index: 0};
this.control_manager.reset();
this.parent.horizontal_menu.activate();
| 1 |
diff --git a/test-complete/nodejs-graphs-default.js b/test-complete/nodejs-graphs-default.js @@ -114,6 +114,45 @@ describe('default graph test', function(){
}, done);
});
+ it('should run combined SPARQL query', function(done){
+ this.timeout(10000);
+ var myQuery = "PREFIX foaf: <http://xmlns.com/foaf/0.1/>" +
+ "PREFIX ppl: <http://people.org/>" +
+ "SELECT *" +
+ "WHERE { ppl:person1 foaf:knows ?o }"
+ var docQuery = q.where(q.term('person5'));
+ db.graphs.sparql({
+ contentType: 'application/sparql-results+json',
+ query: myQuery,
+ docQuery: docQuery
+ }).
+ result(function(response){
+ //console.log(JSON.stringify(response, null, 2));
+ response.results.bindings.length.should.equal(4);
+ response.results.bindings[0].o.value.should.equal('http://people.org/person2');
+ done();
+ }, done);
+ });
+
+ it('should run combined SPARQL query with invalid docQuery', function(done){
+ this.timeout(10000);
+ var myQuery = "PREFIX foaf: <http://xmlns.com/foaf/0.1/>" +
+ "PREFIX ppl: <http://people.org/>" +
+ "SELECT *" +
+ "WHERE { ppl:person1 foaf:knows ?o }"
+ var docQuery = q.where(q.term('foo'));
+ db.graphs.sparql({
+ contentType: 'application/sparql-results+json',
+ query: myQuery,
+ docQuery: docQuery
+ }).
+ result(function(response){
+ //console.log(JSON.stringify(response, null, 2));
+ response.results.bindings.length.should.equal(0);
+ done();
+ }, done);
+ });
+
it('should delete the graph', function(done){
this.timeout(10000);
db.graphs.remove().
| 0 |
diff --git a/src/index.js b/src/index.js @@ -611,7 +611,7 @@ class Offline {
/* HANDLER LAZY LOADING */
- let handler; // The lambda function
+ let userHandler; // The lambda function
Object.assign(process.env, this.originalEnvironment);
try {
@@ -636,7 +636,7 @@ class Offline {
);
}
process.env._HANDLER = fun.handler;
- handler = functionHelper.createHandler(funOptions, this.options);
+ userHandler = functionHelper.createHandler(funOptions, this.options);
}
catch (err) {
return this._reply500(response, `Error while loading ${funName}`, err);
@@ -981,7 +981,7 @@ class Offline {
let x;
try {
- x = handler(event, lambdaContext, (err, result) => {
+ x = userHandler(event, lambdaContext, (err, result) => {
setTimeout(cleanup, 0);
return lambdaContext.done(err, result);
| 10 |
diff --git a/app/scripts/lib/account-tracker.js b/app/scripts/lib/account-tracker.js @@ -288,6 +288,9 @@ class AccountTracker {
return true
}).map(txOut => txOut.txid)),
]
+
+ // Validate SLP DAG
+ try {
const validSLPTx = await slpjs.bitdb.verifyTransactions(txidsToValidate)
for (const validTxid of validSLPTx) {
for (const utxo of uncachedUtxos) {
@@ -296,10 +299,22 @@ class AccountTracker {
}
}
}
- }
- // Update accountUtxoCache
+ // Update accountUtxoCache with all uncached utxos
accountUtxoCache[address] = accountUtxoCache[address].concat(uncachedUtxos)
+ } catch (validateSLPTxException) {
+ // Validation incomplete. Ignore all uncached SLP UTXOs
+ const nonSLPUtxos = uncachedUtxos.filter(txOut => {
+ if (txOut.slp === undefined) {
+ return true
+ }
+ return false
+ })
+
+ // Update accountUtxoCache with uncached non SLP Utxos
+ accountUtxoCache[address] = accountUtxoCache[address].concat(nonSLPUtxos)
+ }
+ }
// loop through UTXO set and accumulate balances for each valid token.
const bals = {
| 8 |
diff --git a/token-metadata/0xb1EC548F296270BC96B8A1b3b3C8F3f04b494215/metadata.json b/token-metadata/0xb1EC548F296270BC96B8A1b3b3C8F3f04b494215/metadata.json "symbol": "FORS",
"address": "0xb1EC548F296270BC96B8A1b3b3C8F3f04b494215",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/PenSkin.js b/src/PenSkin.js @@ -89,6 +89,7 @@ class PenSkin extends Skin {
clear () {
const ctx = this._canvas.getContext('2d');
ctx.clearRect(0, 0, this._canvas.width, this._canvas.height);
+ this._canvasDirty = true;
}
/**
| 12 |
diff --git a/src/lib/wallet/GoodWallet.js b/src/lib/wallet/GoodWallet.js @@ -348,8 +348,7 @@ export class GoodWallet {
async isCitizen(): Promise<boolean> {
const tx: boolean = await this.identityContract.methods.isVerified(this.account).call()
- log.info(`isCitizen(): ${this.account} = ${tx}`)
- return true
+ return tx
}
async canSend(amount: number): Promise<boolean> {
| 2 |
diff --git a/articles/appliance/admin/rate-limiting.md b/articles/appliance/admin/rate-limiting.md @@ -16,7 +16,7 @@ Click the checkbox next to **Enable** to enable rate limiting.

-By default, **Configuration of buckets** is empty, which means that limitd's default configuration will be used. You can, however, [customize your buckets](https://github.com/auth0/limitd#buckets).
+By default, **Configuration of buckets** is empty, which means that limitd's default configuration will be used. Your Customer Success Engineer may advise you to adjust this value if appropriate.
Click **Save** and wait for the updates to the configuration to complete.
| 2 |
diff --git a/src/components/chatInput/index.js b/src/components/chatInput/index.js @@ -32,7 +32,7 @@ type State = {
code: boolean,
isSendingMediaMessage: boolean,
mediaPreview: string,
- mediaPreviewFile: Blob,
+ mediaPreviewFile: ?Blob,
};
type Props = {
@@ -81,7 +81,7 @@ class ChatInput extends React.Component<Props, State> {
code: false,
isSendingMediaMessage: false,
mediaPreview: '',
- mediaPreviewFile: new Blob(),
+ mediaPreviewFile: null,
};
editor: any;
@@ -322,7 +322,7 @@ class ChatInput extends React.Component<Props, State> {
removeMediaPreview = () => {
this.setState({
mediaPreview: '',
- mediaPreviewFile: new Blob(),
+ mediaPreviewFile: null,
});
};
| 12 |
diff --git a/public/example.js b/public/example.js // optional default: 'airstore-image-editor' | image editor root element to boost the plugin
//ELEMENT_ID: 'airstore-image-editor',
// * required if PROCESS_WITH_CLOUDIMAGE set to false | Airstore uploaded key
- UPLOAD_KEY: '0cbe9ccc4f164bf8be26bd801d53b132',
+ //UPLOAD_KEY: '0cbe9ccc4f164bf8be26bd801d53b132',
+ UPLOAD_KEY: '7cc1f659309c480cbc8a608dc6ba5f03',
// * required if PROCESS_WITH_CLOUDIMAGE set to false | Airstore uploaded key
- UPLOAD_CONTAINER: 'example',
+ //UPLOAD_CONTAINER: 'example',
+ UPLOAD_CONTAINER: 'scaleflex-tests-v5a',
// optional | use cloudimage operations to generate final url
PROCESS_WITH_CLOUDIMAGE: true,
// * required if PROCESS_WITH_CLOUDIMAGE set to true | cloudimage token
| 4 |
diff --git a/app/stylesheets/builtin-pages/bookmarks.less b/app/stylesheets/builtin-pages/bookmarks.less .builtin-main {
max-width: ~"calc(100vw - 340px)"; // width of main sidebar + builtin-sidebar
+ height: 100%;
+ margin-bottom: 0;
+ padding-bottom: 20px;
background: #fff;
.links-list.bookmarks {
| 12 |
diff --git a/packages/idyll-components/src/svg.js b/packages/idyll-components/src/svg.js @@ -3,10 +3,11 @@ import InlineSVG from 'react-inlinesvg';
class SVG extends React.PureComponent {
render() {
+ const { hasError, updateProps, idyll, ...props } = this.props;
if (!this.props.src) {
- return <svg {...this.props} />;
+ return <svg {...props} />;
}
- return <InlineSVG {...this.props} />;
+ return <InlineSVG {...props} />;
}
}
| 2 |
diff --git a/_jekyll/layouts/series-index.html b/_jekyll/layouts/series-index.html @@ -44,16 +44,13 @@ layout: base
| where_exp: 'seriesIndex', 'seriesIndex.path != page.path'
| sort: 'series_number' %}
- {% comment %} Count the number of '/' in this page's path. {% endcomment %}
- {% comment %} This is used to only show series which are direct children to this series. {% endcomment %}
- {% assign slashCountInThisPagePath = page.path | split: '/' | size | plus: 1 %}
-
{% comment %} Show the first three videos for every series ... {% endcomment %}
{% for seriesIndexPage in seriesIndexPages %}
- {% comment %} ... but only if the series is a direct children to this series. {% endcomment %}
- {% assign slashCountInIndexPage = seriesIndexPage.path | split: '/' | size %}
- {% if slashCountInIndexPage == slashCountInThisPagePath %}
+ {% comment %} Only if the series is a direct children to this series. {% endcomment %}
+ {% comment %} ...by comparing the path of the index.md and the path of the series{% endcomment %}
+ {% assign seriesIndexPagePath = seriesIndexPage.path | remove: '/index.md' | split: '/' | pop | join: '/' | append: '/'%}
+ {% if thisSeriesPath == seriesIndexPagePath %}
{% comment %} Display title, description and videos. {% endcomment %}
<div class="series">
| 1 |
diff --git a/source/ibl_sampler.js b/source/ibl_sampler.js @@ -59,28 +59,10 @@ class iblSampler
this.gl.bindTexture( this.gl.TEXTURE_2D, texture); // as this function is asynchronus, another texture could be set in between
-
var internalFormat = this.gl.RGBA32F;
- var format = this.gl.RGB;
+ var format = this.gl.RGBA;
var type = this.gl.FLOAT;
- var data = undefined;
-
- if (image.dataFloat instanceof Float32Array)
- {
- internalFormat = this.gl.RGBA32F;
- format = this.gl.RGBA;
- type = this.gl.FLOAT;
- data = image.dataFloat;
- }
- else if (image instanceof Image)
- {
- internalFormat = this.gl.RGBA;
- format = this.gl.RGBA;
- type = this.gl.UNSIGNED_BYTE;
- data = image;
- }
-
-
+ var data = image.dataFloat;
this.gl.texImage2D(
this.gl.TEXTURE_2D,
| 2 |
diff --git a/checkfiles/checkfiles.py b/checkfiles/checkfiles.py @@ -518,8 +518,8 @@ def check_for_fastq_signature_conflicts(session,
signatures_to_check):
conflicts = []
for signature in sorted(list(signatures_to_check)):
- query = '/search/?type=File&status!=replaced&file_format=fastq&fastq_signature=' + \
- signature
+ query = '/search/?type=File&status!=replaced&file_format=fastq&' + \
+ 'datastore=database&fastq_signature=' + signature
try:
r = session.get(urljoin(url, query))
except requests.exceptions.RequestException as e: # This is the correct syntax
@@ -569,7 +569,7 @@ def check_for_contentmd5sum_conflicts(item, result, output, errors, session, url
errors['content_md5sum'] = output.decode(errors='replace').rstrip('\n')
update_content_error(errors, 'Fastq file content md5sum format error')
else:
- query = '/search/?type=File&status!=replaced&content_md5sum=' + result[
+ query = '/search/?type=File&status!=replaced&datastore=database&content_md5sum=' + result[
'content_md5sum']
try:
r = session.get(urljoin(url, query))
@@ -746,7 +746,7 @@ def remove_local_file(path_to_the_file, errors):
def fetch_files(session, url, search_query, out, include_unexpired_upload=False):
r = session.get(
- urljoin(url, '/search/?field=@id&limit=all&type=File&' + search_query))
+ urljoin(url, '/search/?field=@id&limit=all&type=File&datastore=database&' + search_query))
r.raise_for_status()
out.write("PROCESSING: %d files in query: %s\n" % (len(r.json()['@graph']), search_query))
for result in r.json()['@graph']:
@@ -820,9 +820,12 @@ def patch_file(session, url, job):
}
if data:
item_url = urljoin(url, job['@id'])
+ for key in data:
+ job['item'][key] = data['key']
+ job['item'].pop('content_error_detail')
r = session.patch(
item_url,
- data=json.dumps(data),
+ data=json.dumps(job['item']),
headers={
'If-Match': job['etag'],
'Content-Type': 'application/json',
@@ -857,7 +860,7 @@ def run(out, err, url, username, password, encValData, mirror, search_query,
except multiprocessing.NotImplmentedError:
nprocesses = 1
- version = '1.07'
+ version = '1.08'
out.write("STARTING Checkfiles version %s (%s): with %d processes %s at %s\n" %
(version, search_query, nprocesses, dr, datetime.datetime.now()))
| 0 |
diff --git a/src/init.js b/src/init.js @@ -190,13 +190,17 @@ const Console = console;
const { path } = (files[0] || {});
if (!D.ide || !path) {
// no session or no file dragged
- } else if (!D.lastSpawnedExe) {
- toastr.error('Drag and drop of workspaces works only for locally started interpreters.', 'Drop failed');
} else if (!/\.dws$/i.test(path)) {
toastr.error('RIDE supports drag and drop only for .dws files.');
} else if (files.length !== 1) {
toastr.error('RIDE does not support dropping of multiple files.');
} else {
+ if (!D.lastSpawnedExe) {
+ toastr.warning(
+ 'Drag and drop of workspaces works only for locally started interpreters.',
+ 'Load may fail',
+ );
+ }
$.confirm(
`Are you sure you want to )load ${path.replace(/^.*[\\/]/, '')}?`,
'Load workspace',
| 11 |
diff --git a/js/base/Exchange.js b/js/base/Exchange.js @@ -435,7 +435,11 @@ module.exports = class Exchange {
const params = { method, headers, body, timeout: this.timeout }
- if (url.indexOf ('http://') < 0) {
+ if (url.indexOf ('http://') === 0) {
+ params['agent'] = this.httpAgent || null;
+ } else if (url.indexOf ('https://') === 0) {
+ params['agent'] = this.httpsAgent || this.agent || null;
+ } else {
params['agent'] = this.agent || null;
}
| 11 |
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -403,15 +403,15 @@ jobs:
- run:
name: Test plotly.min.js import using requirejs
command: npm run test-requirejs
+ - run:
+ name: Test plotly bundles against es6
+ command: npm run no-es6-dist
- run:
name: Display function constructors in all bundles (only on master)
command: |
if [ $CIRCLE_BRANCH == "master" ]
then npm run no-new-func
fi
- - run:
- name: Test plotly bundles against es6
- command: npm run no-es6-dist
workflows:
version: 2
| 5 |
diff --git a/volume.js b/volume.js @@ -9,16 +9,6 @@ const localVector = new THREE.Vector3();
const localVector2 = new THREE.Vector3();
const localQuaternion = new THREE.Quaternion();
-function makePromise() {
- let accept, reject;
- const p = new Promise((a, r) => {
- accept = a;
- reject = r;
- });
- p.accept = accept;
- p.reject = reject;
- return p;
-}
const wireframeMaterial = new THREE.ShaderMaterial({
vertexShader: `\
uniform vec3 uHoverId;
@@ -232,7 +222,6 @@ export class VolumeRaycaster {
}
}
-const modulePromise = makePromise();
self.wasmModule = (moduleName, moduleFn) => {
if (moduleName === 'mc') {
self.Module = moduleFn({
@@ -245,9 +234,6 @@ self.wasmModule = (moduleName, moduleFn) => {
return path;
}
},
- onRuntimeInitialized: () => {
- modulePromise.accept();
- },
});
// console.log('got module', Module);
| 2 |
diff --git a/generators/client/templates/angular/package.json.ejs b/generators/client/templates/angular/package.json.ejs <%_ if (protractorTests) { _%>
"protractor": "5.4.4",
<%_ } _%>
- "reflect-metadata": "0.1.13",
"rimraf": "3.0.2",
"sass": "1.26.5",
"sass-loader": "8.0.2",
| 2 |
diff --git a/articles/architecture-scenarios/b2e.md b/articles/architecture-scenarios/b2e.md @@ -74,10 +74,6 @@ You can also integrate purchased applications with Auth0 for single sign-on (SSO
* Slack
* New Relic
-## Portal & identity provider-initiated flows
-
-You can configure a corporate portal with links for an identity provider-initiated flow for Applications that use the SAML protocol to integrate with Auth0. This is not supported for OIDC/OAuth applications because those protocols do not support an identity provider-initiated flow.
-
## Branding
Branding is an important part of any application. Your logo, colors and styles should be consistent in all parts of the application. You can [customize](/libraries/custom-signup) the login, signup, and error pages displayed by Auth0 so it matches your application. Add your own logo, text, and colors. There's also I18N/L10N support for global rollouts. [Emails for verification or password resets](/email/templates) are customizable too.
| 2 |
diff --git a/src/Route.js b/src/Route.js @@ -149,8 +149,8 @@ export default class Route {
responseSchema = _schema && validation && validation.responseSchema;
isNotFoundHandler = routeFunction.handler === 2;
- if (method !== 'options') {
if (
+ method !== 'options' &&
(routeFunction.then ||
routeFunction.constructor.name === 'AsyncFunction') &&
!/res\.(s?end|json)/g.test(routeFunction.toString())
@@ -178,7 +178,6 @@ export default class Route {
});
};
}
- }
middlewares = middlewares
.map((middleware) => {
| 13 |
diff --git a/packages/eslint-config-react-app/index.js b/packages/eslint-config-react-app/index.js @@ -140,8 +140,8 @@ module.exports = {
},
],
'no-multi-str': 'warn',
- 'no-native-reassign': 'warn',
- 'no-negated-in-lhs': 'warn',
+ 'no-global-assign': 'warn',
+ 'no-unsafe-negation': 'warn',
'no-new-func': 'warn',
'no-new-object': 'warn',
'no-new-symbol': 'warn',
| 3 |
diff --git a/test/tests/nodeApi/nodeApi.mjs b/test/tests/nodeApi/nodeApi.mjs @@ -187,6 +187,16 @@ TestRegister.addApiTests([
assert.strictEqual(result.toString(), "Protocol:\thttps:\nHostname:\tgoogle.com\nPath name:\t/search\nArguments:\n\tq = that's a complicated question\n");
}),
+ it("chef.bake: forgiving with operation names", () =>{
+ const result = chef.bake("https://google.com/search?q=that's a complicated question", ["urlencode", "url decode", "parseURI"]);
+ assert.strictEqual(result.toString(), "Protocol:\thttps:\nHostname:\tgoogle.com\nPath name:\t/search\nArguments:\n\tq = that's a complicated question\n");
+ }),
+
+ it("chef.bake: forgiving with operation names", () =>{
+ const result = chef.bake("hello", ["to base 64"]);
+ assert.strictEqual(result.toString(), "aGVsbG8=");
+ }),
+
it("chef.bake: if recipe is empty array, return input as dish", () => {
const result = chef.bake("some input", []);
assert.strictEqual(result.toString(), "some input");
| 0 |
diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md ---
-name: Question
+name: Question (QUESTIONS MUST BE ASKED ON STACK OVERFLOW!!! DO NOT CREATE AN ISSUE!!!)
about: Please ask questions on Stack Overflow, NOT on GitHub :)
title: ''
labels: ''
| 3 |
diff --git a/src/sass/shame.scss b/src/sass/shame.scss @@ -133,11 +133,11 @@ input[type=number] {
display: block;
overflow: hidden;
text-overflow: ellipsis;
- white-space: -moz-nowrap;
- white-space: -hp-nowrap;
- white-space: -o-nowrap;
- white-space: -nowrap;
- white-space: nowrap;
+ white-space: -moz-pre-wrap;
+ white-space: -hp-pre-wrap;
+ white-space: -o-pre-wrap;
+ white-space: pre-wrap;
+ white-space: pre-line;
word-wrap: break-word;
word-break: break-all;
margin: 0px 50px;
| 13 |
diff --git a/src/collection/dimensions/bounds.js b/src/collection/dimensions/bounds.js @@ -586,16 +586,10 @@ let boundingBoxImpl = function( ele, options ){
return bounds;
};
-let tf = function( val ){
- if( val ){
- return 't';
- } else {
- return 'f';
- }
-};
-
let getKey = function( opts ){
- let key = '';
+ let i = 0;
+ let tf = val => (val ? 1 : 0) << i++;
+ let key = 0;
key += tf( opts.incudeNodes );
key += tf( opts.includeEdges );
@@ -615,7 +609,7 @@ let cachedBoundingBoxImpl = function( ele, opts ){
bb = boundingBoxImpl( ele, opts );
if( !headless ){
- _p.bbCache = _p.bbCache || {};
+ _p.bbCache = _p.bbCache || [];
_p.bbCache[key] = bb;
}
} else {
| 4 |
diff --git a/packages/core/src/PlayerContextProvider.js b/packages/core/src/PlayerContextProvider.js @@ -194,8 +194,9 @@ export class PlayerContextProvider extends Component {
this.handleMediaEmptied = this.handleMediaEmptied.bind(this);
this.handleMediaStalled = this.handleMediaStalled.bind(this);
this.handleMediaCanplaythrough = this.handleMediaCanplaythrough.bind(this);
+ this.handleMediaCanplay = this.handleMediaCanplay.bind(this);
this.handleMediaTimeupdate = this.handleMediaTimeupdate.bind(this);
- this.handleMediaLoadedData = this.handleMediaLoadedData.bind(this);
+ this.handleMediaLoadeddata = this.handleMediaLoadeddata.bind(this);
this.handleMediaVolumechange = this.handleMediaVolumechange.bind(this);
this.handleMediaDurationchange = this.handleMediaDurationchange.bind(this);
this.handleMediaProgress = this.handleMediaProgress.bind(this);
@@ -256,9 +257,10 @@ export class PlayerContextProvider extends Component {
media.addEventListener('ended', this.handleMediaEnded);
media.addEventListener('stalled', this.handleMediaStalled);
media.addEventListener('emptied', this.handleMediaEmptied);
+ media.addEventListener('canplay', this.handleMediaCanplay);
media.addEventListener('canplaythrough', this.handleMediaCanplaythrough);
media.addEventListener('timeupdate', this.handleMediaTimeupdate);
- media.addEventListener('loadeddata', this.handleMediaLoadedData);
+ media.addEventListener('loadeddata', this.handleMediaLoadeddata);
media.addEventListener('volumechange', this.handleMediaVolumechange);
media.addEventListener('durationchange', this.handleMediaDurationchange);
media.addEventListener('progress', this.handleMediaProgress);
@@ -408,6 +410,14 @@ export class PlayerContextProvider extends Component {
this.props.onActiveTrackUpdate(newTrack, this.state.activeTrackIndex);
}
+ if (prevState.currentTime !== this.state.currentTime) {
+ const { onTimeUpdate, playlist } = this.props;
+ const { activeTrackIndex, currentTime } = this.state;
+ if (onTimeUpdate) {
+ onTimeUpdate(currentTime, playlist[activeTrackIndex], activeTrackIndex);
+ }
+ }
+
if (prevProps !== this.props && !this.media.paused) {
// update running media session based on new props
this.stealMediaSession();
@@ -449,8 +459,9 @@ export class PlayerContextProvider extends Component {
'canplaythrough',
this.handleMediaCanplaythrough
);
+ media.removeEventListener('canplay', this.handleMediaCanplay);
media.removeEventListener('timeupdate', this.handleMediaTimeupdate);
- media.removeEventListener('loadeddata', this.handleMediaLoadedData);
+ media.removeEventListener('loadeddata', this.handleMediaLoadeddata);
media.removeEventListener('volumechange', this.handleMediaVolumechange);
media.removeEventListener(
'durationchange',
@@ -681,34 +692,32 @@ export class PlayerContextProvider extends Component {
this.setState(state => (state.paused === true ? null : { paused: true }));
}
+ handleMediaCanplay() {
+ this.setState(
+ state => (state.trackLoading === false ? null : { trackLoading: false })
+ );
+ }
+
handleMediaCanplaythrough() {
this.setState(
- state =>
- state.stalled === false && state.trackLoading === false
- ? null
- : { stalled: false, trackLoading: false }
+ state => (state.stalled === false ? null : { stalled: false })
);
}
handleMediaTimeupdate() {
const { currentTime, played } = this.media;
- const { onTimeUpdate, playlist } = this.props;
- const { activeTrackIndex } = this.state;
if (this.state.trackLoading) {
// correct currentTime to preset, if applicable, during load
this.media.currentTime = this.state.currentTime;
return;
}
- if (onTimeUpdate) {
- onTimeUpdate(currentTime, playlist[activeTrackIndex], activeTrackIndex);
- }
this.setState({
currentTime,
playedRanges: getTimeRangesArray(played)
});
}
- handleMediaLoadedData() {
+ handleMediaLoadeddata() {
if (this.media.currentTime !== this.state.currentTime) {
this.media.currentTime = this.state.currentTime;
}
| 12 |
diff --git a/app/addons/documents/routes-mango.js b/app/addons/documents/routes-mango.js @@ -23,6 +23,7 @@ import SidebarActions from "./sidebar/actions";
import {MangoLayout} from './mangolayout';
const MangoIndexEditorAndQueryEditor = FauxtonAPI.RouteObject.extend({
+ selectedHeader: 'Databases',
hideApiBar: true,
hideNotificationCenter: true,
routes: {
| 0 |
diff --git a/src/UserConfig.js b/src/UserConfig.js @@ -639,10 +639,6 @@ class UserConfig {
}
addExtension(fileExtension, options = {}) {
- if (!process.env.ELEVENTY_EXPERIMENTAL) {
- return;
- }
-
this.extensionMap.add(
Object.assign(
{
| 2 |
diff --git a/src/components/select/template.njk b/src/components/select/template.njk {% from "label/macro.njk" import govukLabel %}
-{%- if params.label %}
+
{{- govukLabel({
html: params.label.html,
text: params.label.text,
errorMessage: params.errorMessage,
for: params.id
}) -}}
-{% endif -%}
<select class="govuk-c-select
{%- if params.classes %} {{ params.classes }}{% endif %}{%- if params.errorMessage %} govuk-c-select--error{% endif %}" id="{{ params.id }}" name="{{ params.name }}"{% for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
| 11 |
diff --git a/CHANGELOG.md b/CHANGELOG.md # Postman Collection SDK Changelog
+### unreleased
+* Added `Response~contentInfo` to extract mime info and filename from response.
+* Deprecated `Response~mime` and `Response~mimeInfo`
+
#### v3.0.10 (May 22, 2018)
* Revert computing filename from content-disposition header in `Response~mime`
* Updated dependencies
| 3 |
diff --git a/README.md b/README.md @@ -48,13 +48,13 @@ To run Puppeteer tests generated by spearmint, install the following in your dev
> Charlie [@charlie-maloney](https://github.com/charlie-maloney) ·
> Chloe [@HeyItsChloe](https://github.com/HeyItsChloe) ·
> Cornelius [@corneeltron](https://github.com/corneeltron) ·
-> Dave [@davefranz](https://github.com/davefranz) ·
-> Johnny [@johnny-lim](https://github.com/johnny-lim) <br />
+> Dave [@davefranz](https://github.com/davefranz) <br />
+> Johnny [@johnny-lim](https://github.com/johnny-lim) ·
> Julie [@julicious100](https://github.com/julicious100) ·
> Karen [@karenpinilla](https://github.com/karenpinilla) ·
> Linda [@lcwish](https://github.com/lcwish) ·
-> Mike [@mbcoker](https://github.com/mbcoker) ·
+> Mike [@mbcoker](https://github.com/mbcoker) <br />
> Natlyn [@natlynp](https://github.com/natlynp) ·
-> Rachel [@rachethecreator](https://github.com/rachethecreator) <br />
+> Rachel [@rachethecreator](https://github.com/rachethecreator) ·
> Sieun [@sieunjang](https://github.com/sieunjang) ·
-> Tristen [@twastell](https://github.com/twastell) ·
+> Tristen [@twastell](https://github.com/twastell)
| 3 |
diff --git a/test/jasmine/tests/scatter_test.js b/test/jasmine/tests/scatter_test.js @@ -1035,6 +1035,27 @@ describe('end-to-end scatter tests', function() {
.then(done, done.fail);
});
+ it('updates line segments on redraw when having null values', function(done) {
+ function checkSegments(exp, msg) {
+ var lineSelection = d3Select(gd).selectAll('.scatterlayer .js-line');
+ expect(lineSelection.size()).toBe(exp, msg);
+ }
+
+ Plotly.newPlot(gd, [{
+ y: [1, null, 2, 3],
+ mode: 'lines+markers'
+ }])
+ .then(function() {
+ checkSegments(2, 'inital');
+
+ return Plotly.relayout(gd, 'xaxis.range', [0, 10]);
+ })
+ .then(function() {
+ checkSegments(2, 'after redraw');
+ })
+ .then(done, done.fail);
+ });
+
it('correctly autoranges fill tonext traces across multiple subplots', function(done) {
Plotly.newPlot(gd, [
{y: [3, 4, 5], fill: 'tonexty'},
| 0 |
diff --git a/Specs/Scene/ImageryLayerCollectionSpec.js b/Specs/Scene/ImageryLayerCollectionSpec.js @@ -700,7 +700,7 @@ describe(
});
});
- it("helper continues if provider.pickFeatures is undefined", function () {
+ it("pickImageryHelper continues if provider.pickFeatures is undefined", function () {
var provider = {
ready: true,
rectangle: Rectangle.MAX_VALUE,
| 3 |
diff --git a/src/containers/gui.jsx b/src/containers/gui.jsx @@ -36,6 +36,7 @@ class GUI extends React.Component {
}
render () {
const {
+ children,
projectData, // eslint-disable-line no-unused-vars
vm,
...componentProps
@@ -46,7 +47,9 @@ class GUI extends React.Component {
vm={vm}
onTabSelect={this.handleTabSelect}
{...componentProps}
- />
+ >
+ {children}
+ </GUIComponent>
);
}
}
| 11 |
diff --git a/app/shared/containers/Welcome/Account.js b/app/shared/containers/Welcome/Account.js @@ -218,8 +218,7 @@ class WelcomeAccountContainer extends Component<Props> {
style={{ marginTop: '1em' }}
/>
</Container>
- {((stage === 1 || (stage === 2 && validate.ACCOUNT !== 'SUCCESS'))
- && settings.walletMode !== 'cold')
+ {(settings.walletMode !== 'cold')
? (
<React.Fragment>
<Divider horizontal>or</Divider>
| 11 |
diff --git a/src/server/modules/user/index.js b/src/server/modules/user/index.js @@ -22,7 +22,8 @@ export default new Feature({
if (
connectionParams &&
connectionParams.token &&
- connectionParams.token !== 'null'
+ connectionParams.token !== 'null' &&
+ connectionParams.token !== 'undefined'
) {
try {
const { user } = jwt.verify(connectionParams.token, SECRET);
| 9 |
diff --git a/src/pages/signin/SignInPageLayout/index.js b/src/pages/signin/SignInPageLayout/index.js @@ -13,11 +13,19 @@ const SignInPageLayout = props => (
<SignInPageLayoutWide
welcomeText={props.welcomeText}
isMediumScreenWidth={props.isMediumScreenWidth}
+ shouldShowWelcomeText={props.shouldShowWelcomeText}
>
{props.children}
</SignInPageLayoutWide>
)
- : <SignInPageLayoutNarrow welcomeText={props.welcomeText}>{props.children}</SignInPageLayoutNarrow>
+ : (
+ <SignInPageLayoutNarrow
+ welcomeText={props.welcomeText}
+ shouldShowWelcomeText={props.shouldShowWelcomeText}
+ >
+ {props.children}
+ </SignInPageLayoutNarrow>
+ )
);
SignInPageLayout.propTypes = propTypes;
| 9 |
diff --git a/app/src/pages/inside/stepPage/modals/linkIssueModal/linkIssueFields/linkIssueFields.scss b/app/src/pages/inside/stepPage/modals/linkIssueModal/linkIssueFields/linkIssueFields.scss .link-issue-fields {
.issue-fields-list-item {
- display: inline-block;
position: relative;
margin-bottom: 18px;
}
.remove-issue-fields-button {
position: absolute;
- right: -50px;
+ left: 450px;
top: 35px;
width: 17px;
height: 17px;
| 1 |
diff --git a/html/components/masthead.js b/html/components/masthead.js @@ -217,7 +217,8 @@ const bindUIEvents = () => {
});
});
- wideSelectorTriggerInDropdown.addEventListener('click', () => {
+ wideSelectorTriggerInDropdown.addEventListener('click', (e) => {
+ e.preventDefault();
const dropdownIsOpen = wideSelectorDropdown.classList.contains(
'sprk-c-Dropdown--open',
);
| 3 |
diff --git a/.travis.yml b/.travis.yml @@ -10,7 +10,7 @@ before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.12.3
- export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
cache:
- yarn: true
+ yarn: false
install:
- yarn install
- cd embark-ui && yarn install && cd ..
| 2 |
diff --git a/lib/sphereTracker.js b/lib/sphereTracker.js @@ -76,6 +76,7 @@ function SphereTracker(canvas) {
for (n = 0 ; n < 3 ; n++) {
xSum = ySum = count = 0;
+ var xAvg = 0, yAvg = 0;
i = 0;
for (y = 0 ; y < height ; y++)
@@ -123,8 +124,8 @@ function SphereTracker(canvas) {
g = n2g(n);
b = n2b(n);
for (a = 0 ; a < 2 * PI ; a += .03) {
- c = cos(a);
- s = sin(a);
+ var c = cos(a);
+ var s = sin(a);
for (i = radius/2 ; i < radius ; i++)
set(I(x + i * c, y + i * s), r, g, b, 255);
}
| 1 |
diff --git a/src/plugins/StatusBar/index.js b/src/plugins/StatusBar/index.js @@ -27,6 +27,7 @@ module.exports = class StatusBar extends Plugin {
paused: 'Paused',
error: 'Error',
retry: 'Retry',
+ cancel: 'Cancel',
pressToRetry: 'Press to retry',
retryUpload: 'Retry upload',
resumeUpload: 'Resume upload',
| 0 |
diff --git a/lib/node_modules/@stdlib/bench/test/test.harness.pretest.js b/lib/node_modules/@stdlib/bench/test/test.harness.pretest.js // MODULES //
+var EventEmitter = require( 'events' ).EventEmitter;
var tape = require( 'tape' );
+var proxyquire = require( 'proxyquire' );
var cos = require( '@stdlib/math/base/special/cos' );
var randu = require( '@stdlib/math/base/random/randu' );
+var inherit = require( '@stdlib/utils/inherit' );
var pretest = require( './../lib/harness/pretest.js' );
@@ -99,14 +102,43 @@ tape( 'given an asynchronous benchmark, the function runs pretests to sanity che
});
tape( 'if a benchmark calls `tic` and `toc` more than once, the pretest fails', function test( t ) {
- var opts = {
+ var pretest;
+ var opts;
+
+ // Create a mock Benchmark class:
+ function Benchmark() {
+ EventEmitter.call( this );
+ return this;
+ }
+
+ inherit( Benchmark, EventEmitter );
+
+ Benchmark.prototype.run = run;
+
+ // Proxyquire the pretest module so we can use the mock:
+ pretest = proxyquire( './../lib/harness/pretest.js', {
+ './../benchmark-class': Benchmark
+ });
+
+ opts = {
'iterations': null,
'timeout': 60000,
'skip': false
};
+ // In this test, the `benchmark` function is not actually run.
pretest( 'test', opts, benchmark, done );
+ function run() {
+ /* eslint-disable no-invalid-this */
+ /* jshint validthis: true */ // TODO: remove
+ this.emit( 'tic' );
+ this.emit( 'toc' );
+ this.emit( 'tic' );
+ this.emit( 'toc' );
+ this.emit( 'end' );
+ }
+
function benchmark( b ) {
var x;
var y;
| 4 |
diff --git a/src/components/responsive/GlobalAlert.js b/src/components/responsive/GlobalAlert.js @@ -121,7 +121,7 @@ const GlobalAlert = ({ globalAlert, clearAlert, closeIcon = true }) => {
}
};
- if (globalAlert) {
+ if (globalAlert && !(globalAlert.data.onlyError && globalAlert.success)) {
return (
<Container>
<CustomMessage icon className={globalAlert.success ? 'success' : 'error'}>
| 9 |
diff --git a/src/Objs/_defaultPageEditingConfig.js b/src/Objs/_defaultPageEditingConfig.js @@ -12,7 +12,7 @@ export const defaultPageEditingConfigAttributes = {
},
navigationBackgroundImageGradient: {
title: "Use gradient for header image?",
- description: "Only applies if a header image is selected. Default: No",
+ description: "Default: No",
values: [
{ value: "yes", title: "Yes" },
{ value: "no", title: "No" },
| 7 |
diff --git a/server/components/buttons/middleware.js b/server/components/buttons/middleware.js @@ -146,7 +146,6 @@ export function getButtonMiddleware({
<style nonce="${ cspNonce }">${ buttonStyle }</style>
<div id="buttons-container" class="buttons-container">${ buttonHTML }</div>
- <div id="card-fields-container" class="card-fields-container"></div>
${ meta.getSDKLoader({ nonce: cspNonce }) }
<script nonce="${ cspNonce }">${ client.script }</script>
| 5 |
diff --git a/assets/js/components/PostSearcher.js b/assets/js/components/PostSearcher.js @@ -44,7 +44,7 @@ function PostSearcher() {
const [ match, setMatch ] = useState( {} );
const analyticsModuleActive = useSelect( ( select ) => select( CORE_MODULES ).isModuleActive( 'analytics' ) );
- const adminURL = useSelect( ( select ) => {
+ const detailsURL = useSelect( ( select ) => {
const args = {};
if ( match && match.ID ) {
@@ -61,8 +61,8 @@ function PostSearcher() {
} );
const onClick = useCallback( () => {
- global.location.assign( adminURL );
- }, [ adminURL ] );
+ global.location.assign( detailsURL );
+ }, [ detailsURL ] );
return (
<div
| 10 |
diff --git a/README.md b/README.md @@ -28,7 +28,7 @@ Create Minecraft bots with a powerful, stable, and high level JavaScript API.
## Usage
-If you want to use a version of minecraft that is not the last version, you need to specify it in the createBot option.
+Without version specified, the version of the server will be guessed automatically, you can set a specific one using the version option.
For example `version:"1.8"`.
### Echo Example
| 3 |
diff --git a/assets/js/components/settings/SetupModule.js b/assets/js/components/settings/SetupModule.js @@ -81,8 +81,8 @@ export default function SetupModule( {
// this to rerun after modules are loaded.
// Once #1769 is resolved, we can remove the call to getModules,
// and remove the !! modules cache busting param.
- const modules = useSelect( ( select ) => select( CORE_MODULES )?.getModules() );
- const canActivateModule = useSelect( ( select ) => select( CORE_MODULES )?.canActivateModule( slug, !! modules ) );
+ const modules = useSelect( ( select ) => select( CORE_MODULES ).getModules() );
+ const canActivateModule = useSelect( ( select ) => select( CORE_MODULES ).canActivateModule( slug, !! modules ) );
return (
<div
| 2 |
diff --git a/README.md b/README.md @@ -8,7 +8,7 @@ If you would like to suggest that we deploy in your city/municipality, please em
### Setting up the development environment
-If you run into any problems during setup, check the [Docker troubleshooting wiki page](https://github.com/ProjectSidewalk/SidewalkWebpage/wiki/Docker-Troubleshooting) and the [Github issues tagged as "Dev Environment"](https://github.com/ProjectSidewalk/SidewalkWebpage/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22Dev+Environment%22+). If you don't find any answers there, then post in the "newbies" channel on Slack!
+If you run into any problems during setup, check the [Docker troubleshooting wiki page](https://github.com/ProjectSidewalk/SidewalkWebpage/wiki/Docker-Troubleshooting) and the [Github issues tagged as "Dev Environment"](https://github.com/ProjectSidewalk/SidewalkWebpage/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22Dev+Environment%22+). If you don't find any answers there, then post in the "core" or "intern" channels on Slack! We prefer posting to channels vs. DMs to Mikey to enable all of us to help each other.
<details><summary>Linux (Ubuntu)</summary>
| 3 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,39 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master
where X.Y.Z is the semver of most recent plotly.js release.
+## [1.33.0] -- 2018-01-18
+
+### Added
+- Completely rewritten `scattergl` trace type using `regl` [#2258]
+- Completely rewritten polar chart renderer accompanied by new
+ `scatterpolar` and `scatterpolargl` trace types [#2200]
+- Add the ability to draw layout images and layout shapes on subplot
+ with `scattergl` traces [#2258]
+- Add `fill` capabilities to `scattergl` traces [#2258]
+- Add `spikedistance`, `hoverdistance` and `skipsnap` for more customizable
+ spikes and hover behavior on cartesian subplots [#2247]
+- Add official Spanish translation (locale `es`) [#2249]
+- Add official French translation (locale `fr`) [#2252]
+- Add locale machinery to annotation _new text_ placeholder [#2257]
+
+### Changed
+- Old polar trace types (`scatter` with `(r,t)` coordinates,
+ `bar` with `(r,t)` coordinates and `area`) are now deprecated.
+
+### Fixed
+
+- Fix `gl2d` tick label on pan interaction regression [#2258]
+- Fix `candlestick` hover label regression (bug introduced in v1.32.0) [#2264]
+- Fix several `gl2d` axis related bugs with new regl-based `scattergl` [#2258]
+ See full list under the On-par gl2d milestone https://github.com/plotly/plotly.js/milestone/3
+- Fix several polar bugs with `scatterpolar` [#2200].
+ See full list under the On-par polar milestone https://github.com/plotly/plotly.js/milestone/2
+- Fix `scattergl` marker.colorscale handling [#2258]
+- Fix ternary relayout calls involving axis tick styles and titles [#2200]
+- Fix decimal and thousands settings in `de` locale [#2246]
+- Make scroll handler _passive_, removing those annoying console warnings [#2251]
+
+
## [1.32.0] -- 2018-01-11
### Added
| 3 |
diff --git a/README.md b/README.md @@ -229,6 +229,16 @@ help, have a look at the open issues, especially those labelled with "bug".
You can build the library with `npm install && npm run build`. This will fetch all dependencies and then compile the `dist`
files. To see the examples locally you can start a web server with `npm start` and go to `localhost:8000`.
+To test locally, run
+
+```sh
+npm run test-unit # will run only unit tests
+# or
+npm run test-local # will also run deployment tests for different module formats using the files in the dist folder
+```
+
+New reference PDFs can be created by running `npm run test-training` in the background.
+
Alternatively, you can build jsPDF using these commands in a readily configured online workspace:
[](https://gitpod.io#https://github.com/MrRio/jsPDF)
| 7 |
diff --git a/script/cibuild b/script/cibuild set -e # halt script on error
echo "Travis Branch: $TRAVIS_BRANCH"
-echo "Travis Pull Reques: $TRAVIS_PULL_REQUEST"
+echo "Travis Pull Request: $TRAVIS_PULL_REQUEST"
# Pull requests and commits to other branches shouldn't try to deploy, just build to verify
if [ "$TRAVIS_PULL_REQUEST" == "true" -o "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]; then
- echo "Skipping deploy; just doing a build."
- bundle exec jekyll build --verbose
+ echo "Travis should not deploy from pull requests. Skipping deploy; just doing a build!"
+ bundle exec jekyll build
+ exit 0
+fi
+
+if [ "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]; then
+ echo "Travis should only deploy from the SOURCE_BRANCH ($SOURCE_BRANCH), not $TRAVIS_BRANCH. Skipping deploy; just doing a build!"
+ bundle exec jekyll build
exit 0
fi
@@ -37,3 +43,5 @@ git commit -a -m "Travis: #$TRAVIS_BUILD_NUMBER"
# push to repo and prevents any sensitive data from printing on the console.
git push --force origin ${DEPLOY_BRANCH}
+
+echo "Successfully deployed from SOURCE_BRANCH $SOURCE_BRANCH to DEPLOY_BRANCH $SOURCE_BRANCH"
| 2 |
diff --git a/src/consts/const_global.js b/src/consts/const_global.js @@ -287,7 +287,7 @@ consts.SETTINGS = {
STATUS_INTERVAL: 40 * 1000,
LATENCY_CHECK: 5*1000,
MAX_ALLOWED_LATENCY: 5*1000, //miliseconds
- CONCURRENCY_BLOCK_DOWNLOAD_MINERS_NUMBER: (process.env.BROWSER? 10 : 100),
+ CONCURRENCY_BLOCK_DOWNLOAD_MINERS_NUMBER: (process.env.BROWSER? 10 : 30),
WAITLIST: {
| 13 |
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -44,6 +44,41 @@ const localEuler2 = new THREE.Euler();
const localMatrix = new THREE.Matrix4();
const localMatrix2 = new THREE.Matrix4();
+const walkSoundFileNames = `\
+walk1.wav
+walk2.wav
+walk3.wav
+walk4.wav
+walk5.wav
+walk6.wav
+walk7.wav
+walk8.wav
+walk9.wav
+walk10.wav
+walk11.wav
+walk12.wav`.split('\n');
+const runSoundFileNames = `\
+run1.wav
+run2.wav
+run3.wav
+run4.wav
+run5.wav
+run6.wav
+run7.wav
+run8.wav
+run9.wav
+run10.wav
+run11.wav
+run12.wav`.split('\n');
+const jumpSoundFileNames = `\
+jump1.wav
+jump2.wav
+jump3.wav`.split('\n');
+const landSoundFileNames = `\
+land1.wav
+land2.wav
+land3.wav`.split('\n');
+
// const y180Quaternion = new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0, 1, 0), Math.PI);
const maxIdleVelocity = 0.01;
const maxEyeTargetTime = 2000;
| 0 |
diff --git a/app/models/carto/mapcap.rb b/app/models/carto/mapcap.rb @@ -29,7 +29,7 @@ module Carto
regenerated_visualization.permission = visualization.permission
regenerated_visualization.populate_ids(lazy_ids_json)
- regenerated_visualization.readonly!
+ set_tree_as_readonly!(regenerated_visualization)
regenerated_visualization
end
@@ -55,5 +55,23 @@ module Carto
def update_named_map
Carto::NamedMaps::Api.new(regenerate_visualization).upsert
end
+
+ def set_tree_as_readonly!(entity)
+ set_entity_as_readonly(entity)
+ entity.reflections.keys.each do |dep_name|
+ dependency = entity.public_send(dep_name)
+ if dependency.is_a? Array
+ dependency.each{ |e| set_entity_as_readonly(e) }
+ else
+ set_entity_as_readonly(dependency)
+ end
+ end
+ end
+
+ def set_entity_as_readonly(entity)
+ return unless entity.public_methods.include?(:readonly!)
+ return if entity.readonly?
+ entity.readonly!
+ end
end
end
| 12 |
diff --git a/lib/pause.js b/lib/pause.js @@ -68,7 +68,18 @@ function parseInput(cmd) {
const I = container.support('I');
const fullCommand = `I.${cmd}`;
- eval(fullCommand); // eslint-disable-line no-eval
+ const result = eval(fullCommand); // eslint-disable-line no-eval
+ result.then((val) => {
+ if (cmd.startsWith('see') || cmd.startsWith('dontSee')) {
+ output.print(output.styles.success(' OK '), cmd);
+ return;
+ }
+ if (cmd.startsWith('grab')) {
+ output.print(output.styles.debug(val));
+ }
+ }).catch((err) => {
+ if (err.message) output.print(output.styles.error(' ERROR '), err.message);
+ });
history.push(fullCommand); // add command to history when successful
} catch (err) {
| 7 |
diff --git a/CHANGES.md b/CHANGES.md - Remove public sparta `Tag*` constants that were previously reserved for Discover support.
- :checkered_flag: **CHANGES**
- Change [sparta.Discover](https://godoc.org/github.com/mweagle/Sparta#Discover) to use _Environment_ data rather than CloudFormation API calls.
+ - See [SpartaDynamoDB](https://github.com/mweagle/SpartaDynamoDB) for sample usage of multiple lambda functions depending on a single, dynamically provisioned Dynamo table.
- Include **BuildID** in Lambda environment via `SPARTA_BUILD_ID` environment variable.
- :bug: **FIXED**
- Correct CLI typo
| 0 |
diff --git a/data.js b/data.js @@ -2043,6 +2043,13 @@ module.exports = [
url: "https://github.com/rgrove/lazyload",
source: "https://raw.githubusercontent.com/rgrove/lazyload/master/lazyload.js"
},
+ {
+ name: "SUL.js",
+ tags: ["dom", "lightweight", "shorthand", "ajax"],
+ description: "Small library for DOM and AJAX operations (jQuery function style).",
+ url: "https://github.com/MrOnlineCoder/sul.js",
+ source: "https://github.com/MrOnlineCoder/sul.js/blob/master/src/sul.js"
+ },
{
name: "Valentine",
tags: ["functional", "language", "data"],
| 0 |
diff --git a/site/rabbit.ent b/site/rabbit.ent @@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-<!ENTITY version-java-client "4.2.0">
+<!ENTITY version-java-client "4.2.1">
<!ENTITY version-dotnet-client "3.6.12">
<!ENTITY version-server "3.6.12">
<!ENTITY version-erlang-client "3.6.12">
| 12 |
diff --git a/core/components/molecules/table/table.story.js b/core/components/molecules/table/table.story.js @@ -73,10 +73,10 @@ storiesOf('Table').add('explicit widths', () => (
storiesOf('Table').add('cell renderer', () => (
<Example title="default">
<Table items={items}>
- <Table.Column field="image" width="50px">
+ <Table.Column field="image" width="65px">
{item => <Avatar image={item.image} size="large" />}
</Table.Column>
- <Table.Column field="name" title="Name" width="70%" />
+ <Table.Column field="name" title="Name" width="65%" />
<Table.Column field="born" title="Born" />
<Table.Column field="died" title="Died" />
</Table>
@@ -86,10 +86,10 @@ storiesOf('Table').add('cell renderer', () => (
storiesOf('Table').add('sorting', () => (
<Example title="default">
<Table items={items}>
- <Table.Column field="image" width="50px">
+ <Table.Column field="image" width="65px">
{item => <Avatar image={item.image} size="large" />}
</Table.Column>
- <Table.Column field="name" title="Name" width="70%" />
+ <Table.Column field="name" title="Name" width="65%" />
<Table.Column field="born" title="Born" sortable />
<Table.Column field="died" title="Died" sortable />
</Table>
@@ -99,10 +99,10 @@ storiesOf('Table').add('sorting', () => (
storiesOf('Table').add('initial sort props', () => (
<Example title="default">
<Table items={items} sortOn="died" sortDirection="desc">
- <Table.Column field="image" width="50px">
+ <Table.Column field="image" width="65px">
{item => <Avatar image={item.image} size="large" />}
</Table.Column>
- <Table.Column field="name" title="Name" width="70%" />
+ <Table.Column field="name" title="Name" width="65%" />
<Table.Column field="born" title="Born" sortable />
<Table.Column field="died" title="Died" sortable />
</Table>
@@ -110,6 +110,36 @@ storiesOf('Table').add('initial sort props', () => (
))
storiesOf('Table').add('stressed', () => (
+ <Example title="stressed - 4 columns with 119 characters per row">
+ <Table
+ items={[
+ {
+ data:
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vehicula massa augue, in consectetur tellus tristique ut.'
+ },
+ {
+ data:
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vehicula massa augue, in consectetur tellus tristique ut.'
+ },
+ {
+ data:
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vehicula massa augue, in consectetur tellus tristique ut.'
+ },
+ {
+ data:
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vehicula massa augue, in consectetur tellus tristique ut.'
+ }
+ ]}
+ >
+ <Table.Column field="data" title="Field 1" width="65px" />
+ <Table.Column field="data" title="Field 2" width="150px" />
+ <Table.Column field="data" title="Field 3" width="65px" />
+ <Table.Column field="data" title="Field 4" width="65px" />
+ </Table>
+ </Example>
+))
+
+storiesOf('Table').add('stressed with truncating', () => (
<Example title="stressed - 7 columns with 119 characters per row">
<Table
items={[
@@ -131,13 +161,10 @@ storiesOf('Table').add('stressed', () => (
}
]}
>
- <Table.Column field="data" title="Field 1" />
- <Table.Column field="data" title="Field 2" />
- <Table.Column field="data" title="Field 3" />
- <Table.Column field="data" title="Field 4" />
- <Table.Column field="data" title="Field 5" />
- <Table.Column field="data" title="Field 6" />
- <Table.Column field="data" title="Field 7" />
+ <Table.Column field="data" title="Field 1" width="150px" truncate />
+ <Table.Column field="data" title="Field 2" width="10%" truncate />
+ <Table.Column field="data" title="Field 3" width="20%" truncate />
+ <Table.Column field="data" title="Field 4" width="auto" truncate />
</Table>
</Example>
))
@@ -163,7 +190,7 @@ storiesOf('Table').add('with no items', () => (
</EmptyState>
}
>
- <Table.Column field="image" width="50px">
+ <Table.Column field="image" width="65px">
{item => <Avatar type="user" image={item.image} />}
</Table.Column>
<Table.Column field="name" title="Name" width="30%" />
| 7 |
diff --git a/src/client.js b/src/client.js @@ -194,7 +194,7 @@ class Client extends EventEmitter
setEncryption(sharedSecret) {
if (this.cipher != null)
- throw new Error("Set encryption twice !");
+ this.emit('error','Set encryption twice!');
this.cipher = crypto.createCipheriv('aes-128-cfb8', sharedSecret, sharedSecret);
this.cipher.on('error', (err) => this.emit('error', err));
this.framer.unpipe(this.socket);
| 14 |
diff --git a/packages/insomnia-importers/src/__tests__/fixtures.test.js b/packages/insomnia-importers/src/__tests__/fixtures.test.js @@ -8,7 +8,7 @@ const fixturesPath = path.join(__dirname, './fixtures');
const fixtures = fs.readdirSync(fixturesPath);
describe('Fixtures', () => {
- for (const name of fixtures) {
+ describe.each(fixtures)('Import %s', name => {
const dir = path.join(fixturesPath, `./${name}`);
const inputs = fs.readdirSync(dir).filter(name => !!name.match(/^(.+)-?input\.[^.]+$/));
@@ -20,7 +20,7 @@ describe('Fixtures', () => {
continue;
}
- it(`Import ${name} ${input}`, async () => {
+ it(input, async () => {
expect.assertions(5);
expect(typeof input).toBe('string');
expect(typeof output).toBe('string');
@@ -49,5 +49,5 @@ describe('Fixtures', () => {
}
});
}
- }
+ });
});
| 7 |
diff --git a/scripts/createScramCredentials.sh b/scripts/createScramCredentials.sh @@ -9,10 +9,15 @@ find_container_id() {
-q)
}
-USERNAME=${USERNAME:='testscram'}
+ZOOKEEPER_USERNAME=${ZOOKEEPER_USERNAME:='testscram'}
PASSWORD_256=${PASSWORD_256:='testtestscram=256'}
PASSWORD_512=${PASSWORD_512:='testtestscram=512'}
docker exec \
$(find_container_id) \
- bash -c "kafka-configs --zookeeper zookeeper:2181 --alter --add-config 'SCRAM-SHA-256=[iterations=8192,password=${PASSWORD_256}],SCRAM-SHA-512=[password=${PASSWORD_512}]' --entity-type users --entity-name ${USERNAME}"
+ bash -c "kafka-configs --zookeeper zookeeper:2181 --alter --add-config 'SCRAM-SHA-256=[iterations=8192,password=${PASSWORD_256}],SCRAM-SHA-512=[password=${PASSWORD_512}]' --entity-type users --entity-name ${ZOOKEEPER_USERNAME}"
+
+echo "The credentials have been setup as following"
+echo "ZOOKEEPER_USERNAME: ${ZOOKEEPER_USERNAME}"
+echo "PASSWORD_256: ${PASSWORD_256}"
+echo "PASSWORD_512: ${PASSWORD_512}"
\ No newline at end of file
| 1 |
diff --git a/docs/providers/azure/examples/hello-world/node/README.md b/docs/providers/azure/examples/hello-world/node/README.md @@ -15,11 +15,11 @@ Make sure `serverless` is installed. [See installation guide](../../../guide/ins
## 1. Create a service
-`serverless install --url https://github.com/azure/boilerplate-azurefunctions --name my-app`
+`serverless install --url https://github.com/azure/boilerplate-azurefunctions --name my-sls-app`
## 2. Install Provider Plugin
-`npm install -g serverless-azure` followed by `npm install` in the service directory.
+`npm install -g serverless-azure-functions` followed by `npm install` in the service directory.
## 3. Deploy
@@ -27,7 +27,7 @@ Make sure `serverless` is installed. [See installation guide](../../../guide/ins
## 4. Invoke deployed function
-`serverless invoke --function helloWorld` or `serverless invoke -f helloWorld`
+`serverless invoke --function httpjs --path httpQueryString.json` or `serverless invoke -f httpjs --path httpQueryString.json`
`-f` is shorthand for `--function`
@@ -35,7 +35,7 @@ In your terminal window you should see the response from azure
```bash
{
- "payload": "Hello, World!"
+ "payload": "Hello pragna"
}
```
| 1 |
diff --git a/packages/babel-plugin-redux-saga/README.md b/packages/babel-plugin-redux-saga/README.md @@ -6,47 +6,26 @@ Example of setup and demo are available [here](../../examples/error-demo)
## Example
-Source:
-
-```js
-// src/sagas/index.js
-function* saga1(){
- yield call(foo, 1, 2, 3);
-}
-
-function* saga2(){
- yield 2;
-}
+Error message without plugin
+```
+The above error occurred in task throwAnErrorSaga
+ created by errorInCallAsyncSaga
+ created by takeEvery(ACTION_ERROR_IN_CALL_ASYNC, errorInCallAsyncSaga)
+ created by rootSaga
```
-Result:
+Error message with the plugin
+```
+The above error occurred in task throwAnErrorSaga src/sagas/index.js?16
+ created by errorInCallAsyncSaga src/sagas/index.js?25
+ created by takeEvery(ACTION_ERROR_IN_CALL_ASYNC, errorInCallAsyncSaga)
+ created by rootSaga src/sagas/index.js?78
+```
-```js
-function* saga1() {
- yield Object.defineProperty(call(foo, 1, 2, 3), Symbol.for("@@redux-saga/LOCATION"), {
- value: {
- fileName: "src/sagas/index.js",
- lineNumber: 1,
- code: "call(foo, 1, 2, 3)"
- }
- })
-}
+## Install
-Object.defineProperty(saga1, Symbol.for("@@redux-saga/LOCATION"), {
- value: {
- fileName: "src/sagas/index.js",
- lineNumber: 1
- }
-})
-function* saga2() {
- yield 2;
-}
-Object.defineProperty(saga2, Symbol.for("@@redux-saga/LOCATION"), {
- value: {
- fileName: "src/sagas/index.js",
- lineNumber: 5
- }
-})
+```sh
+npm i --save-dev babel-plugin-redux-saga
```
## Usage
@@ -99,6 +78,51 @@ By default, the plugin uses Symbol internally. The plugin doesn't try to include
useSymbol: false
```
+## How it transforms my code
+
+Source:
+
+```js
+// src/sagas/index.js
+function* saga1(){
+ yield call(foo, 1, 2, 3);
+}
+
+function* saga2(){
+ yield 2;
+}
+```
+
+Result:
+
+```js
+function* saga1() {
+ yield Object.defineProperty(call(foo, 1, 2, 3), Symbol.for("@@redux-saga/LOCATION"), {
+ value: {
+ fileName: "src/sagas/index.js",
+ lineNumber: 1,
+ code: "call(foo, 1, 2, 3)"
+ }
+ })
+}
+
+Object.defineProperty(saga1, Symbol.for("@@redux-saga/LOCATION"), {
+ value: {
+ fileName: "src/sagas/index.js",
+ lineNumber: 1
+ }
+})
+function* saga2() {
+ yield 2;
+}
+Object.defineProperty(saga2, Symbol.for("@@redux-saga/LOCATION"), {
+ value: {
+ fileName: "src/sagas/index.js",
+ lineNumber: 5
+ }
+})
+```
+
## Problem solving
### My source code became ugly, I can't read it anymore
| 3 |
diff --git a/lib/glucose-get-last.js b/lib/glucose-get-last.js @@ -6,7 +6,7 @@ var getLastGlucose = function (data) {
});
var now = data[0];
- var now_date = now.date || Date.parse(now.display_time) || Date.parse(then.dateString);
+ var now_date = now.date || Date.parse(now.display_time) || Date.parse(now.dateString);
var change;
var last_deltas = [];
var short_deltas = [];
| 1 |
diff --git a/source/light-validator/contracts/LightValidator.sol b/source/light-validator/contracts/LightValidator.sol @@ -99,9 +99,10 @@ contract LightValidator {
}
}
//accounts & balances check
- uint256 senderBalance = IERC20(senderToken).balanceOf(msg.sender);
+ uint256 senderBalance = IERC20(senderToken).balanceOf(senderWallet);
uint256 signerBalance = IERC20(signerToken).balanceOf(signerWallet);
- uint256 senderAllowance = IERC20(senderToken).allowance(msg.sender, light);
+ uint256 senderAllowance =
+ IERC20(senderToken).allowance(senderWallet, light);
uint256 signerAllowance =
IERC20(signerToken).allowance(signerWallet, light);
@@ -181,7 +182,9 @@ contract LightValidator {
bytes32 s
) internal view returns (address) {
bytes32 digest =
- keccak256(abi.encodePacked("\x19\x01", light.DOMAIN_SEPARATOR(), hash));
+ keccak256(
+ abi.encodePacked("\x19\x01", Light(light).DOMAIN_SEPARATOR(), hash)
+ );
address signatory = ecrecover(digest, v, r, s);
return signatory;
}
| 3 |
diff --git a/public/resources/css/index.css b/public/resources/css/index.css @@ -1822,6 +1822,24 @@ a.additional-player-stat:hover{
filter: saturate(100%);
}
+.missing-talisman{
+ background-color: #555555;
+ transition: background-color .2s;
+}
+
+.missing-talisman .piece-icon{
+ filter: saturate(0%);
+ transition: filter .2s;
+}
+
+.missing-talisman:hover, .missing-talisman.sticky-stats{
+ background-color: #555555;
+}
+
+.missing-talisman:hover .piece-icon, .missing-talisman.sticky-stats .piece-icon{
+ filter: saturate(100%);
+}
+
#inventory_container{
display: inline-block;
background-color: rgba(0,0,0,0.3);
| 13 |
diff --git a/package.json b/package.json "jsnext:main": "es/index.js",
"scripts": {
"lint": "eslint src test",
- "test": "run-s lint test-**",
+ "test": "run-s test-**",
+ "check": "run-s lint test",
"test-src": "cross-env BABEL_ENV=cjs babel-node test/index.js | tap-spec",
"check:bundlesize": "cross-env BABEL_ENV=es ./node_modules/.bin/bundlesize",
"clean": "rimraf dist es lib",
"docs:publish": "npm run docs:clean && npm run docs:build && cp CNAME _book && cd _book && git init && git commit --allow-empty -m 'update book' && git checkout -b gh-pages && touch .nojekyll && git add . && git commit -am 'update book' && git push [email protected]:redux-saga/redux-saga gh-pages --force",
"precommit": "lint-staged && run-p build:umd:** && git add dist",
"prepare": "npm run build",
- "prepush": "npm test",
- "prerelease": "npm test && npm run prepare",
+ "prepush": "npm run check",
+ "prerelease": "npm run check && npm run prepare",
"release:patch": "npm run prerelease && npm version patch && git push --follow-tags && npm publish",
"release:minor": "npm run prerelease && npm version minor && git push --follow-tags && npm publish",
"release:major": "npm run prerelease && npm version major && git push --follow-tags && npm publish"
| 13 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.