code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/edit.js b/edit.js @@ -4871,6 +4871,11 @@ const inventoryMesh = makeInventoryMesh(cubeMesh, async scrollFactor => {
inventoryMesh.inventoryContentsMesh.frustumCulled = false;
inventoryMesh.add(inventoryMesh.inventoryContentsMesh);
}
+ if (!inventoryMesh.inventoryShapesMesh) {
+ inventoryMesh.inventoryShapesMesh = _makeInventoryShapesMesh();
+ inventoryMesh.inventoryShapesMesh.frustumCulled = false;
+ inventoryMesh.add(inventoryMesh.inventoryShapesMesh);
+ }
const geometryKeys = await geometryWorker.requestGetGeometryKeys(geometrySet);
const geometryRequests = [];
@@ -4921,6 +4926,70 @@ const _makeInventoryContentsMesh = () => {
const geometry = new THREE.BufferGeometry();
const material = currentVegetationMesh.material[0];
const mesh = new THREE.Mesh(geometry, material);
+ mesh.visible = false;
+ return mesh;
+};
+const _makeInventoryShapesMesh = () => {
+ const boxMesh = new THREE.BoxBufferGeometry()
+ const coneMesh = new THREE.ConeBufferGeometry();
+ const cylinderMesh = new THREE.CylinderBufferGeometry();
+ const dodecahedronMesh = new THREE.DodecahedronBufferGeometry();
+ const icosahedronMesh = new THREE.IcosahedronBufferGeometry();
+ const octahedronMesh = new THREE.OctahedronBufferGeometry();
+ const sphereMesh = new THREE.SphereBufferGeometry();
+ const tetrahedronMesh = new THREE.TetrahedronBufferGeometry();
+ const torusMesh = new THREE.TorusBufferGeometry();
+ const geometries = [
+ boxMesh,
+ coneMesh,
+ cylinderMesh,
+ dodecahedronMesh,
+ icosahedronMesh,
+ octahedronMesh,
+ sphereMesh,
+ tetrahedronMesh,
+ torusMesh,
+ ];
+
+ const h = 0.1;
+ const arrowW = h/10;
+ const wrapInnerW = h - 2*arrowW;
+ const w = wrapInnerW/3;
+
+ const geometry = BufferGeometryUtils.mergeBufferGeometries(geometries.map((geometry, i) => {
+ const dx = i%3;
+ const dy = (i-dx)/3;
+ const g = geometry.clone()
+ .applyMatrix4(new THREE.Matrix4().makeScale(w/2, w/2, w/2))
+ .applyMatrix4(new THREE.Matrix4().makeTranslation(-h + w/2 + dx*w, h/2 - arrowW - w/2 - dy*w, w/2));
+ if (!g.index) {
+ const indices = new Uint16Array(g.attributes.position.length/3);
+ for (let i = 0; i < indices.length; i++) {
+ indices[i] = i;
+ }
+ g.setIndex(new THREE.BufferAttribute(indices, 1));
+ }
+ return g;
+ }));
+ const material = new THREE.ShaderMaterial({
+ vertexShader: `\
+ varying vec2 vUv;
+
+ void main() {
+ vUv = uv;
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
+ }
+ `,
+ fragmentShader: `\
+ varying vec2 vUv;
+
+ void main() {
+ vec3 c = mix(vec3(${new THREE.Color(0xff7043).toArray().join(', ')}), vec3(${new THREE.Color(0xef5350).toArray().join(', ')}), vUv.y);
+ gl_FragColor = vec4(c, 1.);
+ }
+ `,
+ });
+ const mesh = new THREE.Mesh(geometry, material);
return mesh;
};
| 0 |
diff --git a/_data/conferences.yml b/_data/conferences.yml id: icassp18
link: https://2018.ieeeicassp.org/
deadline: "2017-10-27 23:59:59"
- date: April 22-27, 2018
- place: Seoul, Korea
+ date: April 15-20, 2018
+ place: Calgary, Alberta, Canada
sub: SP
- name: AAMAS
| 3 |
diff --git a/token-metadata/0x986EE2B944c42D017F52Af21c4c69B84DBeA35d8/metadata.json b/token-metadata/0x986EE2B944c42D017F52Af21c4c69B84DBeA35d8/metadata.json "symbol": "BMX",
"address": "0x986EE2B944c42D017F52Af21c4c69B84DBeA35d8",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/closure/goog/soy/soy.js b/closure/goog/soy/soy.js @@ -65,7 +65,8 @@ goog.soy.TextTemplate;
* hand-written code, so that it will be easier to audit the code for cross-site
* scripting vulnerabilities.
*
- * @param {?Element} element The element whose content we are rendering into.
+ * @param {?Element|?ShadowRoot} element The element whose content we are
+ * rendering into.
* @param {!goog.soy.data.SanitizedContent} templateResult The processed
* template of kind HTML or TEXT (which will be escaped).
* @template ARG_TYPES
@@ -84,7 +85,8 @@ goog.soy.renderHtml = function(element, templateResult) {
* instead of directly setting innerHTML in your hand-written code, so that it
* will be easier to audit the code for cross-site scripting vulnerabilities.
*
- * @param {Element} element The element whose content we are rendering into.
+ * @param {?Element|?ShadowRoot} element The element whose content we are
+ * rendering into.
* @param {function(ARG_TYPES, ?goog.soy.CompatibleIj_=): *} template The Soy
* template defining the element's content.
* @param {ARG_TYPES=} opt_templateData The data for the template.
| 11 |
diff --git a/app/controllers/carto/api/tables_controller.rb b/app/controllers/carto/api/tables_controller.rb @@ -16,7 +16,7 @@ module Carto
def show
table = @user_table.service
- render_jsonp(table.public_values({ request: request }, current_user).merge(schema: table.schema(reload: true)))
+ render_jsonp(TablePresenter.new(table, current_user, self).to_poro.merge(schema: table.schema(reload: true)))
end
# Very basic controller method to simply make blank tables
@@ -35,7 +35,7 @@ module Carto
table.import_from_query = params[:from_query] if params[:from_query]
if table.valid? && table.save
- render_jsonp(table.public_values(request: request), 200, location: "/tables/#{table.id}")
+ render_jsonp(TablePresenter.new(table, current_user, self).to_poro, 200, location: "/tables/#{table.id}")
table_visualization = table.table_visualization
if table_visualization
@@ -69,12 +69,12 @@ module Carto
longitude_column = params[:longitude_column] == 'nil' ? nil : params[:longitude_column].try(:to_sym)
table.georeference_from!(latitude_column: latitude_column, longitude_column: longitude_column)
table.update_bounding_box
- render_jsonp(table.public_values(request: request).merge(warnings: warnings))
+ render_jsonp(TablePresenter.new(table, current_user, self).to_poro.merge(warnings: warnings))
return
end
if @user_table.save
- render_jsonp(table.public_values(request: request).merge(warnings: warnings))
+ render_jsonp(TablePresenter.new(table, current_user, self).to_poro.merge(warnings: warnings))
else
render_jsonp({ errors: table.errors.full_messages }, 400)
end
| 4 |
diff --git a/schemas/raw-reference.json b/schemas/raw-reference.json "pages": {
"description": "Page number(s) where the reference is inside the titled document",
"type": "string",
- "pattern": "^[0-9\\-,]+$"
+ "pattern": "^[0-9\\-,:]+$"
},
"repository": {
"description": "URL of the repository",
| 11 |
diff --git a/src/commands/codepush/deployment/list.ts b/src/commands/codepush/deployment/list.ts @@ -18,7 +18,7 @@ export default class ListCommand extends AppCommand {
const app = this.app;
let deployments: models.Deployment[];
try {
- const httpRequest = await out.progress("Getting Codepush deployments...", clientRequest<models.Deployment[]>(
+ const httpRequest = await out.progress("Getting CodePush deployments...", clientRequest<models.Deployment[]>(
(cb) => client.deployments.list(app.ownerName, app.appName, cb)));
deployments = httpRequest.result;
out.table(out.getCommandOutputTableOptions(["Name", "Key"]), deployments.map((deployment) => [deployment.name, deployment.key]));
| 1 |
diff --git a/packages/gatsby/src/cache-dir/component-renderer.js b/packages/gatsby/src/cache-dir/component-renderer.js @@ -68,6 +68,7 @@ class ComponentRenderer extends React.Component {
render() {
if (this.state.pageResources) {
return createElement(this.state.pageResources.component, {
+ key: this.props.location.pathname,
...this.props,
...this.state.pageResources.json,
})
| 12 |
diff --git a/src/UserInterface/Image/createDistanceButton.js b/src/UserInterface/Image/createDistanceButton.js @@ -99,54 +99,6 @@ function createDistanceButton(
distanceValue.setAttribute('disabled', true);
distanceEntry.appendChild(distanceValue);
- const distanceDXLabel = document.createElement('label');
- distanceDXLabel.setAttribute('class', contrastSensitiveStyle.distanceLabel);
- distanceDXLabel.setAttribute('for', `${store.id}-distanceDXValue`);
- distanceDXLabel.id = `${store.id}-distanceDXLabel`;
- distanceDXLabel.innerText = 'dX:';
- distanceEntry.appendChild(distanceDXLabel);
-
- const distanceDXValue = document.createElement('input');
- distanceDXValue.type = 'text';
- distanceDXValue.setAttribute('class', style.distanceInput);
- distanceDXValue.id = `${store.id}-distanceDXValue`;
- distanceDXValue.setAttribute('name', 'length');
- distanceDXValue.setAttribute('value', '0');
- distanceDXValue.setAttribute('disabled', true);
- distanceEntry.appendChild(distanceDXValue);
-
- const distanceDYLabel = document.createElement('label');
- distanceDYLabel.setAttribute('class', contrastSensitiveStyle.distanceLabel);
- distanceDYLabel.setAttribute('for', `${store.id}-distanceDYValue`);
- distanceDYLabel.id = `${store.id}-distanceDYLabel`;
- distanceDYLabel.innerText = 'dY:';
- distanceEntry.appendChild(distanceDYLabel);
-
- const distanceDYValue = document.createElement('input');
- distanceDYValue.type = 'text';
- distanceDYValue.setAttribute('class', style.distanceInput);
- distanceDYValue.id = `${store.id}-distanceDYValue`;
- distanceDYValue.setAttribute('name', 'length');
- distanceDYValue.setAttribute('value', '0');
- distanceDYValue.setAttribute('disabled', true);
- distanceEntry.appendChild(distanceDYValue);
-
- const distanceDZLabel = document.createElement('label');
- distanceDZLabel.setAttribute('class', contrastSensitiveStyle.distanceLabel);
- distanceDZLabel.setAttribute('for', `${store.id}-distanceDZValue`);
- distanceDZLabel.id = `${store.id}-distanceDZLabel`;
- distanceDZLabel.innerText = 'dZ:';
- distanceEntry.appendChild(distanceDZLabel);
-
- const distanceDZValue = document.createElement('input');
- distanceDZValue.type = 'text';
- distanceDZValue.setAttribute('class', style.distanceInput);
- distanceDZValue.id = `${store.id}-distanceDzValue`;
- distanceDZValue.setAttribute('name', 'length');
- distanceDZValue.setAttribute('value', '0');
- distanceDZValue.setAttribute('disabled', true);
- distanceEntry.appendChild(distanceDZValue);
-
uiContainer.appendChild(distanceEntry);
// Update the value field when distance is updated
@@ -154,15 +106,8 @@ function createDistanceButton(
() => {
let p1Position = store.imageUI.distanceP1;
let p2Position = store.imageUI.distanceP2;
- let delta = (Math.sqrt(vtkMath.distance2BetweenPoints(p1Position, p2Position)) * 1000.0).toFixed(0);
- let dX = ((p1Position[0] - p2Position[0]) * 1000.0).toFixed(0);
- let dY = ((p1Position[1] - p2Position[1]) * 1000.0).toFixed(0);
- let dZ = ((p1Position[2] - p2Position[2]) * 1000.0).toFixed(0);
-
+ let delta = Math.sqrt(vtkMath.distance2BetweenPoints(p1Position, p2Position)).toFixed(3);
distanceValue.setAttribute('value', `${delta}`);
- distanceDXValue.setAttribute('value', `${dX}`);
- distanceDYValue.setAttribute('value', `${dY}`);
- distanceDZValue.setAttribute('value', `${dZ}`);
});
}
| 2 |
diff --git a/graphql/schema.graphql b/graphql/schema.graphql @@ -5284,7 +5284,7 @@ type PullRequestReview implements Node & Comment & Deletable & Updatable & Updat
"""The body of this review rendered as plain text."""
bodyText: String!
- """A list of review comments for the checked out pull request review."""
+ """A list of review comments for the current pull request review."""
comments(
"""Returns the first _n_ elements from the list."""
first: Int
| 13 |
diff --git a/core/server/api/v2/authentication.js b/core/server/api/v2/authentication.js const api = require('./index');
const config = require('../../../shared/config');
-const i18n = require('../../../shared/i18n');
+const tpl = require('@tryghost/tpl');
const errors = require('@tryghost/errors');
const web = require('../../web');
const models = require('../../models');
const auth = require('../../services/auth');
const invitations = require('../../services/invitations');
+const messages = {
+ notTheBlogOwner: 'You are not the site owner.'
+};
+
module.exports = {
docName: 'authentication',
@@ -47,7 +51,9 @@ module.exports = {
return models.User.findOne({role: 'Owner', status: 'all'})
.then((owner) => {
if (owner.id !== frame.options.context.user) {
- throw new errors.NoPermissionError({message: i18n.t('errors.api.authentication.notTheBlogOwner')});
+ throw new errors.NoPermissionError({
+ message: tpl(messages.notTheBlogOwner)
+ });
}
});
},
| 14 |
diff --git a/react/src/components/footer/SprkFooter.js b/react/src/components/footer/SprkFooter.js @@ -208,7 +208,7 @@ SprkFooter.propTypes = {
*/
additionalClasses: PropTypes.string,
/**
- * The value supplied will be assigned
+ * Value assigned
* to the `data-id` attribute on the
* component. This is intended to be
* used as a selector for automated
@@ -216,21 +216,21 @@ SprkFooter.propTypes = {
* per page.
*/
idString: PropTypes.string,
- /** The data for the global site items. */
+ /** Object used to configure the global items section. */
globalItems: PropTypes.shape({
- /** The main heading for the global section. */
+ /** Main headline for the global section. */
heading: PropTypes.string,
- /** The global items. */
+ /** Object used to configure each item in global items section such as `mediaType`, `src`, `description` etc. */
items: PropTypes.arrayOf(
PropTypes.shape({
/** The type of media element to render. */
mediaType: PropTypes.oneOf(['image', 'svg', 'SprkIcon']),
/**
- * Assigned to `src` attribute of the image.
+ * Assigned to `src` attribute of the item's image.
*/
src: PropTypes.string,
/**
- * Assigned to `href`.
+ * Assigned to `href` of item.
*/
mediaHref: PropTypes.string,
/**
@@ -240,7 +240,7 @@ SprkFooter.propTypes = {
/**
* Expects a space separated string
* of classes to be added to the
- * media.
+ * media of the item.
*/
mediaAddClasses: PropTypes.string,
/** The description of the image */
@@ -257,7 +257,7 @@ SprkFooter.propTypes = {
}),
),
}),
- /** The data for the columns of site links. */
+ /** Constructs the columns of links in the Footer. Maximum number of columns is 3. */
linkColumns: PropTypes.arrayOf(
PropTypes.shape({
/** The main heading for the column. */
@@ -274,7 +274,7 @@ SprkFooter.propTypes = {
*/
text: PropTypes.string,
/**
- * Element to render, can be `a` or `Link`.
+ * Determines if link renders as an anchor tag, or router link.
*/
element: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
/**
@@ -288,16 +288,18 @@ SprkFooter.propTypes = {
),
}),
),
- /** The icons to use in the connect section. */
+ /** Constructs the Connect Icon Section. */
connectIcons: PropTypes.shape({
- /** The main heading for the section. */
+ /** The main headline for the section. */
heading: PropTypes.string,
- /** The icons. */
+ /** Configures the icons for the section. */
icons: PropTypes.arrayOf(
PropTypes.shape({
/** The link `href` for the icon. */
href: PropTypes.string,
- /** The name of the icon. */
+ /**
+ * Determines what icon `SprkIcon` renders
+ */
name: PropTypes.string,
/** Text used for screen readers. */
screenReaderText: PropTypes.string,
@@ -309,20 +311,24 @@ SprkFooter.propTypes = {
*/
analyticsString: PropTypes.string,
/**
- * Element to render, can be `a` or `Link`.
+ * Determines if link renders as an anchor tag, or router link.
*/
element: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
}),
),
}),
- /** The awards section data. */
+ /** Configures the Awards Section. */
awards: PropTypes.shape({
+ /** The main headline for the section. */
heading: PropTypes.string,
+ /** Configures the images in the Awards Section. */
images: PropTypes.arrayOf(
PropTypes.shape({
/** The link href for the image. */
href: PropTypes.string,
- /** Element to render, can be `a` or `Link`. */
+ /**
+ * Determines if link renders as an anchor tag, or router link.
+ */
element: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
/**
* The image `src`.
@@ -358,10 +364,10 @@ SprkFooter.propTypes = {
/** The title text rendered in the disclaimer. */
disclaimerTitle: PropTypes.string,
}),
- /** Data used for additional icons at bottom of footer. */
+ /** Configuration used for additional icons at bottom of footer. */
additionalIcons: PropTypes.arrayOf(
PropTypes.shape({
- /** The icon name. */
+ /** The icon name `SprkIcon` will use to render. */
name: PropTypes.string,
/** The icon `href`. */
href: PropTypes.string,
@@ -373,7 +379,7 @@ SprkFooter.propTypes = {
/** Text used for screen readers. */
screenReaderText: PropTypes.string,
/**
- * Element to render, can be `a` or `Link`.
+ * Determines if link renders as an anchor tag, or router link.
*/
element: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
/**
@@ -385,9 +391,12 @@ SprkFooter.propTypes = {
analyticsString: PropTypes.string,
}),
),
- /** The paragraphs, copyright info, etc. */
+ /** Configuration for the paragraphs of copyright info, etc. */
paragraphs: PropTypes.arrayOf(
PropTypes.shape({
+ /**
+ * The text to render in the paragraphs section.
+ */
text: PropTypes.string,
}),
),
| 7 |
diff --git a/src/common/quiz/pause_manager.js b/src/common/quiz/pause_manager.js @@ -32,7 +32,7 @@ function save(saveData, savingUser, quizName, gameType) {
let now = Date.now();
let fileName = savingUser + '_' + now;
let json = JSON.stringify(saveData);
- return fs.writeFileAsync(SAVE_DATA_DIR + '/' + fileName, json).then(() => {
+ return fs.writeFileAsync(path.join(SAVE_DATA_DIR, fileName), json).then(() => {
return globals.persistence.editDataForUser(savingUser, data => {
if (!data[QUIZ_SAVES_KEY]) {
data[QUIZ_SAVES_KEY] = [];
@@ -54,7 +54,7 @@ function deleteMemento(memento) {
.filter(otherMemento => otherMemento.time + otherMemento.userId !== memento.time + memento.userId);
return data;
});
- let deleteFile = fs.unlinkAsync(SAVE_DATA_DIR + '/' + memento.fileName).catch(() => {});
+ let deleteFile = fs.unlinkAsync(path.join(SAVE_DATA_DIR, memento.fileName)).catch(() => {});
return Promise.all([deleteFromDb, deleteFile]).then(() => {
logger.logSuccess(LOGGER_TITLE, 'Automatically deleted a non-compatible save.');
});
@@ -72,7 +72,7 @@ function deleteMementos(mementos) {
}
module.exports.load = function(memento) {
- return fs.readFileAsync(SAVE_DATA_DIR + '/' + memento.fileName, 'utf8').then(data => {
+ return fs.readFileAsync(path.join(SAVE_DATA_DIR, memento.fileName), 'utf8').then(data => {
let json = JSON.parse(data);
return globals.persistence.editDataForUser(memento.userId, dbData => {
let mementoIndex = getIndexOfMemento(dbData[QUIZ_SAVES_KEY], memento);
@@ -81,7 +81,7 @@ module.exports.load = function(memento) {
dbData[QUIZ_SAVES_BACKUP_KEY].push(memento);
if (dbData[QUIZ_SAVES_BACKUP_KEY].length > MAX_RESTORABLE_PER_USER) {
let mementoToDelete = dbData[QUIZ_SAVES_BACKUP_KEY].shift();
- return fs.unlinkAsync(SAVE_DATA_DIR + '/' + mementoToDelete.fileName).then(() => {
+ return fs.unlinkAsync(path.join(SAVE_DATA_DIR, mementoToDelete.fileName)).then(() => {
return dbData;
}).catch(err => {
logger.logFailure(LOGGER_TITLE, 'No file found for that save. Deleting DB entry.', err);
| 7 |
diff --git a/shared/routes/grid/components/grid/Grid.scss b/shared/routes/grid/components/grid/Grid.scss @import '~styles/config';
-@mixin text-col($text, $left: 25px, $right: 25px) {
+@mixin placeholder($text, $left: 25px, $right: 25px) {
@include responsive-font(14, 14);
content: $text;
box-shadow: 0 0 0 1px $color-placeholder;
&::after {
- @include text-col('@include container;', 10px, 10px);
+ @include placeholder('@include container;', 10px, 10px);
}
&::before {
box-shadow: 0 0 0 1px $color-placeholder;
&::after {
- @include text-col('@include make-row;', 10px, 10px);
+ @include placeholder('@include make-row;', 10px, 10px);
}
}
position: relative;
&::after {
- @include text-col('@include make-col(2);');
+ @include placeholder('@include make-col(2);');
}
}
position: relative;
&::after {
- @include text-col('@include make-col(3); @include make-offset-left(1);');
+ @include placeholder('@include make-col(3); @include make-offset-left(1);');
}
}
position: relative;
&::after {
- @include text-col('@include make-col(4); @include make-offset-left(1); @include make-offset-right(1);');
+ @include placeholder('@include make-col(4); @include make-offset-left(1); @include make-offset-right(1);');
}
}
position: relative;
&::after {
- @include text-col('@include make-col(10); @include make-offset-left(1);');
+ @include placeholder('@include make-col(10); @include make-offset-left(1);');
}
}
}
| 10 |
diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml @@ -21,11 +21,12 @@ jobs:
python "data/crawlWorldData.py"
python "data/crawlKoreaRegionalData.py"
python "data/crawlKoreaRegionalCumulativeData.py"
+ python "data/crawlWorldCumulativeData.py"
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "LiveCoronaBot"
- git add data/worldData.js data/koreaRegionalData.js data/koreaRegionalCumulativeData.js
+ git add data/worldData.js data/koreaRegionalData.js data/koreaRegionalCumulativeData.js data/worldCumulativeData.js
git commit -m "Run crawler and update data"
- name: Push changes
uses: ad-m/github-push-action@master
| 0 |
diff --git a/src/encoded/static/components/globals.js b/src/encoded/static/components/globals.js @@ -290,6 +290,7 @@ export const dbxrefPrefixMap = {
MGID: 'http://www.informatics.jax.org/external/festing/mouse/docs/',
RBPImage: 'http://rnabiology.ircm.qc.ca/RBPImage/gene.php?cells=',
RefSeq: 'https://www.ncbi.nlm.nih.gov/gene/?term=',
+ JAX: 'https://www.jax.org/strain/',
// UCSC links need assembly (&db=) and accession (&hgt_mdbVal1=) added to url
'UCSC-ENCODE-mm9': 'http://genome.ucsc.edu/cgi-bin/hgTracks?tsCurTab=advancedTab&tsGroup=Any&tsType=Any&hgt_mdbVar1=dccAccession&hgt_tSearch=search&hgt_tsDelRow=&hgt_tsAddRow=&hgt_tsPage=&tsSimple=&tsName=&tsDescr=&db=mm9&hgt_mdbVal1=',
'UCSC-ENCODE-hg19': 'http://genome.ucsc.edu/cgi-bin/hgTracks?tsCurTab=advancedTab&tsGroup=Any&tsType=Any&hgt_mdbVar1=dccAccession&hgt_tSearch=search&hgt_tsDelRow=&hgt_tsAddRow=&hgt_tsPage=&tsSimple=&tsName=&tsDescr=&db=hg19&hgt_mdbVal1=',
| 0 |
diff --git a/core/server/web/shared/middlewares/maintenance.js b/core/server/web/shared/middlewares/maintenance.js const errors = require('@tryghost/errors');
const config = require('../../../../shared/config');
-const i18n = require('../../../../shared/i18n');
+const tpl = require('@tryghost/tpl');
const urlService = require('../../../../frontend/services/url');
+const messages = {
+ maintenance: 'Site is currently undergoing maintenance, please wait a moment then retry.',
+ maintenanceUrlService: 'Site is starting up, please wait a moment then retry.'
+};
+
module.exports = function maintenance(req, res, next) {
if (config.get('maintenance').enabled) {
return next(new errors.MaintenanceError({
- message: i18n.t('errors.general.maintenance')
+ message: tpl(messages.maintenance)
}));
}
if (!urlService.hasFinished()) {
return next(new errors.MaintenanceError({
- message: i18n.t('errors.general.maintenanceUrlService')
+ message: tpl(messages.maintenanceUrlService)
}));
}
| 14 |
diff --git a/server/node/server.js b/server/node/server.js @@ -9,7 +9,7 @@ const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY);
app.use(express.static(process.env.STATIC_DIR));
// Use JSON parser for all non-webhook routes.
app.use((req, res, next) => {
- if (req.originalUrl === '/stripe-events') {
+ if (req.originalUrl === '/stripe-webhook') {
next();
} else {
bodyParser.json()(req, res, next);
| 1 |
diff --git a/protocols/swap/README.md b/protocols/swap/README.md @@ -200,7 +200,7 @@ event Invalidate(
## Signatures
-When producing [ECDSA](https://hackernoon.com/a-closer-look-at-ethereum-signatures-5784c14abecc) signatures, Ethereum wallets prefix signed data with byte `\x19` to stay out of range of valid RLP so that a signature cannot be executed as a transaction. [EIP-191](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-191.md) standardizes this prefixing to include existing `personalSign` behavior and [EIP-712](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md) implements it for structured data, which makes the data more transparent for the signer. Signatures are comprised of parameters `v`, `r`, and `s`. Read more about [Ethereum Signatures]().
+When producing [ECDSA](https://hackernoon.com/a-closer-look-at-ethereum-signatures-5784c14abecc) signatures, Ethereum wallets prefix signed data with byte `\x19` to stay out of range of valid RLP so that a signature cannot be executed as a transaction. [EIP-191](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-191.md) standardizes this prefixing to include existing `personalSign` behavior and [EIP-712](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md) implements it for structured data, which makes the data more transparent for the signer. Signatures are comprised of parameters `v`, `r`, and `s`. Read more about [Ethereum Signatures](https://hackernoon.com/a-closer-look-at-ethereum-signatures-5784c14abecc).
### Typed Data
| 3 |
diff --git a/lib/carto/metrics/usage_metrics_retriever.rb b/lib/carto/metrics/usage_metrics_retriever.rb @@ -15,7 +15,7 @@ module Carto::Metrics
def get_range(user, org, service, metric, date_from, date_to)
usage_metrics = @cls.new(user.try(:username), org.try(:name))
- if usage_metrics.responds_to? :get_date_range
+ if usage_metrics.respond_to? :get_date_range
usage_metrics.get_date_range(service, metric, date_from, date_to)
else
result = {}
| 1 |
diff --git a/README.md b/README.md @@ -35,7 +35,7 @@ Save the following code as a html file, and open in any modern browser.
</script>
```
Then, you'll see below.
-
+
## Components
- Core
- [x] **[VglObject3d](src/vgl-object3d.js)** - Corresponding to [THREE.Object3D](https://threejs.org/docs/index.html#api/core/Object3D)
| 14 |
diff --git a/test-complete/nodejs-optic-nodes.js b/test-complete/nodejs-optic-nodes.js @@ -431,4 +431,63 @@ describe('Nodejs Optic nodes json constructor test', function(){
}, done);
});
+ /*it('TEST 8 - construct xml from Triples with queryAsStream', function(done){
+ var count = 0;
+ var str = '';
+ const chunks = [];
+ const bb = op.prefixer('http://marklogic.com/baseball/players/');
+ const ageCol = op.col('age');
+ const idCol = op.col('id');
+ const nameCol = op.col('name');
+ const posCol = op.col('position');
+ const output =
+ op.fromTriples([
+ op.pattern(idCol, bb('age'), ageCol),
+ op.pattern(idCol, bb('name'), nameCol),
+ op.pattern(idCol, bb('position'), posCol)
+ ])
+ .where(
+ op.and(
+ op.le(ageCol, 25),
+ op.eq(posCol, 'Catcher')
+ )
+ )
+ .orderBy(op.desc(ageCol))
+ .select([
+ op.as('PlayerName', nameCol),
+ op.as('PlayerPosition', posCol),
+ op.as('PlayerAge', ageCol)
+ ])
+ .select([
+ 'PlayerName',
+ 'PlayerPosition',
+ 'PlayerAge',
+ op.as('xml',
+ op.xmlDocument(
+ op.xmlElement(
+ 'root',
+ op.xmlAttribute('attrA', op.col('PlayerName')),
+ [
+ op.xmlElement('elemA', null, op.col('PlayerPosition')),
+ op.xmlElement('elemACodePoints', null, op.fn.stringToCodepoints(op.col('PlayerPosition'))),
+ op.xmlElement('elemB', null, op.col('PlayerAge')),
+ op.xmlElement('elemC', null, op.math.sqrt(op.col('PlayerAge')))
+ ]
+ )
+ )
+ )
+ ])
+ db.rows.queryAsStream(output, 'chunked', { format: 'json', structure: 'object', columnTypes: 'header', complexValues: 'reference' })
+ .on('data', function(chunk) {
+ console.log(chunk.toString());
+ str = str + chunk.toString().trim().replace(/[\n\r]/g, ' ');
+ count++;
+ }).
+ on('end', function() {
+ //console.log(str);
+ console.log(count);
+ done();
+ }, done);
+ });*/
+
});
| 0 |
diff --git a/src/components/nodes/sequenceFlow/sequenceFlow.vue b/src/components/nodes/sequenceFlow/sequenceFlow.vue @@ -20,12 +20,11 @@ export default {
},
computed: {
isValidConnection() {
-
if (this.doesNotHaveTargetType() ||
this.isTargetTypeALane() ||
this.isNotSamePool() ||
- this.isIncomingInvalid(this.sourceNode) ||
- this.isOutgoingInvalid(this.targetNode)) {
+ this.isIncomingInvalid() ||
+ this.isOutgoingInvalid()) {
return false;
}
@@ -46,11 +45,11 @@ export default {
this.sourceShape.component.node.definition.get('outgoing').push(this.node.definition);
targetShape.component.node.definition.get('incoming').push(this.node.definition);
},
- isIncomingInvalid(sourceNode) {
- return this.targetConfig.validateIncoming && !this.targetConfig.validateIncoming(sourceNode);
+ isIncomingInvalid() {
+ return this.targetConfig.validateIncoming && !this.targetConfig.validateIncoming(this.sourceNode);
},
- isOutgoingInvalid(targetNode) {
- return this.sourceConfig.validateOutgoing && !this.sourceConfig.validateOutgoing(targetNode);
+ isOutgoingInvalid() {
+ return this.sourceConfig.validateOutgoing && !this.sourceConfig.validateOutgoing(this.targetNode);
},
isNotSamePool() {
const targetPool = this.target.component.node.pool;
| 2 |
diff --git a/doc/developer-center/auth-api/reference/swagger.yaml b/doc/developer-center/auth-api/reference/swagger.yaml @@ -45,8 +45,8 @@ info:
]
}
```
- - `database`: Describes to which tables and schemas and which privleges on them this API Key grants access to through `tables` and `schemas` attributes. \
- You can grant read (`select`) or write (`insert`, `update`, `delete`) permissions on tables. \
+ - `database`: Describes to which tables and schemas and which privleges on them this API Key grants access to through `tables` and `schemas` attributes.
+ You can grant read (`select`) or write (`insert`, `update`, `delete`) permissions on tables.
For the case of `schemas` once granted the `create` permission on a schema you'll be able to run SQL queries such as `CREATE TABLE AS...`, `CREATE VIEW AS...` etc. to create entities on it.
```{
{
| 2 |
diff --git a/lib/camaleon_cms/engine.rb b/lib/camaleon_cms/engine.rb @@ -35,9 +35,10 @@ module CamaleonCms
initializer :append_migrations do |app|
engine_dir = File.expand_path("../../../", __FILE__)
- app.config.i18n.load_path += Dir[File.join($camaleon_engine_dir, 'config', 'locales', '**', '*.{rb,yml}')]
+ translation_files = Dir[File.join($camaleon_engine_dir, 'config', 'locales', '**', '*.{rb,yml}')]
+ PluginRoutes.all_apps.each { |info| translation_files += Dir[File.join(info['path'], 'config', 'locales', '*.{rb,yml}')] }
app.config.i18n.enforce_available_locales = false
- PluginRoutes.all_apps.each{ |info| app.config.i18n.load_path += Dir[File.join(info["path"], "config", "locales", '*.{rb,yml}')] }
+ app.config.i18n.load_path.unshift(*translation_files)
# assets
app.config.assets.paths << Rails.root.join("app", "apps")
| 11 |
diff --git a/data.js b/data.js @@ -5692,6 +5692,14 @@ module.exports = [{
url: "https://github.com/vitaly-t/excellent",
source: "https://raw.githubusercontent.com/vitaly-t/excellent/master/src/excellent.js"
},
+ {
+ name: "gradstop",
+ github: "Siddharth11/gradstop",
+ tags: ["colors", "palette", "gradient", "hex", "rgb", "hsl"],
+ description: "JavaScript micro library to generate gradient color stops",
+ url: "https://github.com/Siddharth11/gradstop",
+ source: "https://raw.githubusercontent.com/Siddharth11/gradstop/master/gradstopUMD.js",
+ },
{
name: "Beedle",
github: "hankchizljaw/beedle",
| 0 |
diff --git a/README.md b/README.md @@ -55,7 +55,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
```html
<head>
- <script src="https://cdn.plot.ly/plotly-2.2.1.min.js"></script>
+ <script src="https://cdn.plot.ly/plotly-2.3.0.min.js"></script>
</head>
<body>
<div id="gd"></div>
@@ -72,7 +72,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
Alternatively you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag.
```html
<script type="module">
- import "https://cdn.plot.ly/plotly-2.2.1.min.js"
+ import "https://cdn.plot.ly/plotly-2.3.0.min.js"
Plotly.newPlot("gd", [{ y: [1, 2, 3] }])
</script>
```
@@ -82,7 +82,7 @@ Fastly supports Plotly.js with free CDN service. Read more at <https://www.fastl
### Un-minified versions are also available on CDN
While non-minified source files may contain characters outside UTF-8, it is recommended that you specify the `charset` when loading those bundles.
```html
-<script src="https://cdn.plot.ly/plotly-2.2.1.js" charset="utf-8"></script>
+<script src="https://cdn.plot.ly/plotly-2.3.0.js" charset="utf-8"></script>
```
> Please note that as of v2 the "plotly-latest" outputs (e.g. https://cdn.plot.ly/plotly-latest.min.js) will no longer be updated on the CDN, and will stay at the last v1 patch v1.58.5. Therefore, to use the CDN with plotly.js v2 and higher, you must specify an exact plotly.js version.
| 3 |
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -8,6 +8,7 @@ import LegsManager from './vrarmik/LegsManager.js';
// import {world} from '../world.js';
import MicrophoneWorker from './microphone-worker.js';
import skeletonString from './skeleton.js';
+import {angleDifference} from '../util.js';
import physicsManager from '../physics-manager.js';
import easing from '../easing.js';
import CBOR from '../cbor.js';
| 0 |
diff --git a/contracts/Havven.sol b/contracts/Havven.sol @@ -487,31 +487,34 @@ contract Havven is DestructibleExternStateToken {
{
uint currentBalanceSum = preIssuance.currentBalanceSum;
- uint lastAvgBal = preIssuance.lastAverageBalance;
+ uint lastAverageBalance = preIssuance.lastAverageBalance;
uint lastModified = preIssuance.lastModified;
if (lastModified < feePeriodStartTime) {
if (lastModified < lastFeePeriodStartTime) {
- /* The balance did nothing in the last fee period, so the average balance
- * in this period is their pre-transfer balance. */
- lastAvgBal = preBalance;
+ /* The balance was last updated before the previous fee period, so the average
+ * balance in this period is their pre-transfer balance. */
+ lastAverageBalance = preBalance;
} else {
- /* No overflow risk here: the failed guard implies (lastFeePeriodStartTime <= lastModified). */
- lastAvgBal = safeDiv(
- safeAdd(currentBalanceSum, safeMul(preBalance, (feePeriodStartTime - lastModified))),
- (feePeriodStartTime - lastFeePeriodStartTime)
- );
+ /* The balance was last updated during the previous fee period. */
+ /* No overflow or zero denominator problems, since lastFeePeriodStartTime < feePeriodStartTime < lastModified.
+ * implies these quantities are strictly positive. */
+ uint timeUpToRollover = feePeriodStartTime - lastModified;
+ uint lastFeePeriodDuration = feePeriodStartTime - lastFeePeriodStartTime;
+ uint lastBalanceSum = safeAdd(currentBalanceSum, safeMul(preBalance, timeUpToRollover));
+ lastAverageBalance = lastBalanceSum / lastFeePeriodDuration;
}
/* Roll over to the next fee period. */
currentBalanceSum = safeMul(preBalance, now - feePeriodStartTime);
} else {
+ /* The balance was last updated during the current fee period. */
currentBalanceSum = safeAdd(
currentBalanceSum,
safeMul(preBalance, now - lastModified)
);
}
- return IssuanceData(currentBalanceSum, lastAvgBal, now);
+ return IssuanceData(currentBalanceSum, lastAverageBalance, now);
}
/**
| 7 |
diff --git a/packages/idyll-document/src/utils/index.js b/packages/idyll-document/src/utils/index.js @@ -43,7 +43,7 @@ export const buildExpression = (acc, expr, key, context, isEventHandler) => {
var __idyllStateProxy = new Proxy({
${identifiers
.map(key => {
- return `${key}: __idyllCopy(context['${key}'])`;
+ return `${key}: context.__idyllCopy(context['${key}'])`;
})
.join(', ')}
}, {
| 1 |
diff --git a/magefile.go b/magefile.go @@ -320,7 +320,6 @@ func Publish() error {
[]string{"echo", "Checking `git` tree status"},
[]string{"git", "diff", "--exit-code"},
// TODO - migrate to Go
- []string{"./buildinfo.sh"},
[]string{"git", "commit", "-a", "-m", "Tagging Sparta commit"},
[]string{"git", "push", "origin"},
}
| 2 |
diff --git a/src/components/common/SourceOrCollectionWidget.js b/src/components/common/SourceOrCollectionWidget.js @@ -10,17 +10,22 @@ const SourceOrCollectionWidget = (props) => {
const typeClass = isCollection ? 'collection' : 'source';
const objectId = object.id || (isCollection ? object.tags_id : object.media_id);
const name = isCollection ? (object.name || object.label || object.tag) : (object.name || object.label || object.url);
+ // link the text if there is a click handler defined
+ let text = name;
+ if (onClick) {
+ text = (<a href="#" onClick={onClick}>{name}</a>);
+ }
return (
<div
className={`media-widget ${typeClass}`}
key={`media-widget${objectId}`}
>
<Col>
- <a href="#" onClick={onClick}>{name}</a>
+ {text}
{children}
</Col>
<Col>
- <DeleteButton onClick={onDelete} />
+ {onDelete && <DeleteButton onClick={onDelete} />}
</Col>
</div>
);
| 9 |
diff --git a/articles/support/matrix.md b/articles/support/matrix.md @@ -400,6 +400,31 @@ Auth0 support is limited to the most recent version of the OS listed (unless oth
</tbody>
</table>
+### Content Management Systems Plugins
+
+ <table class="table">
+ <thead>
+ <tr>
+ <th width="80%">CMS</th>
+ <th width="20%">Level of Support</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><a href="https://github.com/auth0/wp-auth0">Wordpress</a></td>
+ <td><div class="label label-primary">Supported</div></td>
+ </tr>
+ <tr>
+ <td><a href="https://github.com/auth0/auth0-drupal">Drupal</a></td>
+ <td><div class="label label-default">Community</div></td>
+ </tr>
+ <tr>
+ <td><a href="https://github.com/auth0/auth0-joomla">Joomla</a></td>
+ <td><div class="label label-default">Community</div></td>
+ </tr>
+ </tbody>
+ </table>
+
## Quickstarts and Samples
### Mobile/Native Applications
| 0 |
diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md @@ -269,7 +269,7 @@ Then add the block below to your `launch.json` file and put it inside the `.vsco
"request": "launch",
"url": "http://localhost:3000",
"webRoot": "${workspaceRoot}/src",
- "userDataDir": "${workspaceRoot}/.chrome",
+ "userDataDir": "${workspaceRoot}/.vscode/chrome",
"sourceMapPathOverrides": {
"webpack:///src/*": "${webRoot}/*"
}
| 12 |
diff --git a/src/extension/features/budget/days-of-buffering/index.js b/src/extension/features/budget/days-of-buffering/index.js -import { getEntityManager } from 'toolkit/extension/utils/ember';
+import { getEntityManager } from 'toolkit/extension/utils/ynab';
import { Feature } from 'toolkit/extension/features/feature';
import { getCurrentRouteName } from 'toolkit/extension/utils/ynab';
-import { generateReport, outflowTransactionsFilter } from './helpers';
+import { generateReport, outflowTransactionFilter } from './helpers';
import { render, shouldRender } from './render';
export class DaysOfBuffering extends Feature {
@@ -10,7 +10,7 @@ export class DaysOfBuffering extends Feature {
constructor() {
super();
this.historyLookup = parseInt(ynabToolKit.options.DaysOfBufferingHistoryLookup);
- this.transactionFilter = outflowTransactionsFilter(this.historyLookup);
+ this.transactionFilter = outflowTransactionFilter(this.historyLookup);
this.lastRenderTime = 0;
this.observe = this.invoke;
}
@@ -18,8 +18,8 @@ export class DaysOfBuffering extends Feature {
invoke() {
if (!this.shouldInvoke() || !shouldRender(this.lastRenderTime)) return;
- const transactions = this.entityManager.getAllTransactions().filter(this.transactionFilter);
- const report = generateReport(transactions, this.accountBalance);
+ const transactions = getEntityManager().getAllTransactions().filter(this.transactionFilter);
+ const report = generateReport(transactions, this.accountBalance());
this.render(report);
}
@@ -33,11 +33,7 @@ export class DaysOfBuffering extends Feature {
this.lastRenderTime = Date.now();
}
- get entityManager() {
- return getEntityManager();
- }
-
- get accountBalance() {
+ accountBalance() {
return ynab.YNABSharedLib.getBudgetViewModel_SidebarViewModel()._result.getOnBudgetAccountsBalance();
}
}
| 1 |
diff --git a/scripts/deployment/deploy_protocol.py b/scripts/deployment/deploy_protocol.py @@ -41,6 +41,9 @@ def deployProtocol(acct, tokens, mocOracleAddress, rskOracleAddress):
print("Calling replaceContract.")
sovryn.replaceContract(settings.address)
+ # Set SOV Token Address
+ sovryn.setSOVTokenAddress(tokens.sov.address)
+
print("Deploying Swaps.")
swaps = acct.deploy(SwapsImplSovrynSwap)
#do not deploy the sovryn swap mockup on mainnet
| 12 |
diff --git a/etc/jshint.conf b/etc/jshint.conf "laxbreak": true,
"browser": true,
"globalstrict": true,
- "predef": ["angular", "$", "console", "d3", "SIREPO", "saveAs", "printStackTrace", "Colorbar", "Modernizr"]
+ "predef": ["angular", "$", "console", "d3", "SIREPO", "saveAs", "printStackTrace", "Colorbar", "Detector", "Modernizr"]
}
| 8 |
diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js @@ -384,8 +384,10 @@ const splitCells = (tableRow, count, prevRow = [])=>{
return ` ${p1}`;
}
});
+ tableRow = ` ${tableRow}`;
- const cells = tableRow.split(/(?: \||(?<=\|)\|)(?=[^\|]|$)/g);
+ // Split into cells. Contents are: no pipes unless escaped. Add any ending pipes; if not don't include ending space
+ const cells = [...tableRow.matchAll(/(?:[^\|]+(?:\\\|)*)+(?:\|+(?=\|)|(?= \|))/g)].map((x)=>x[0]);
let i = 0;
// First/last cell in a row cannot be empty if it has no leading/trailing pipe
| 14 |
diff --git a/src/components/metrics/card/MetricCardViewSection/index.js b/src/components/metrics/card/MetricCardViewSection/index.js @@ -149,7 +149,7 @@ export class MetricCardViewSection extends Component {
</div>
</div>
- {(!_.isEmpty(metric.name) || inSelectedCell) &&
+ {(!_.isEmpty(metric.name) || inSelectedCell || this.hasContent()) &&
<div className='NameSection'>
<MetricName
anotherFunctionSelected={anotherFunctionSelected}
| 1 |
diff --git a/test/testnet/index.js b/test/testnet/index.js @@ -43,10 +43,11 @@ const logExchangeRates = (currencyKeys, rates, times) => {
program
.option('-n, --network <value>', 'The network to run off.', x => x.toLowerCase(), 'kovan')
+ .option('-g, --gas-price <value>', 'Gas price in GWEI', '5')
.option('-y, --yes', 'Dont prompt, just reply yes.')
- .action(async ({ network, yes }) => {
- if (!/^(kovan|rinkeby|ropsten)$/.test(network)) {
- throw Error('Unsupported testnet', network);
+ .action(async ({ network, yes, gasPrice: gasPriceInGwei }) => {
+ if (!/^(kovan|rinkeby|ropsten|mainnet)$/.test(network)) {
+ throw Error('Unsupported environment', network);
}
let esLinkPrefix;
try {
@@ -72,7 +73,7 @@ program
const web3 = new Web3(new Web3.providers.HttpProvider(providerUrl));
const gas = 4e6; // 4M
- const gasPrice = web3.utils.toWei('5', 'gwei');
+ const gasPrice = web3.utils.toWei(gasPriceInGwei, 'gwei');
const [sUSD, sETH] = ['sUSD', 'sETH'].map(toBytes32);
const owner = web3.eth.accounts.wallet.add(privateKey);
@@ -140,9 +141,7 @@ program
throw Error('DebtLedger has debt but totalIssuedSynths is 0');
}
- console.log(
- gray(`Using gas price of ${web3.utils.fromWei(gasPrice.toString(), 'gwei')} gwei.`)
- );
+ console.log(gray(`Using gas price of ${gasPriceInGwei} gwei.`));
if (!yes) {
try {
| 3 |
diff --git a/src/encoded/tests/datafixtures.py b/src/encoded/tests/datafixtures.py @@ -400,10 +400,10 @@ def treatment(testapp, organism):
item = {
'treatment_term_name': 'ethanol',
'treatment_type': 'chemical'
-
}
return testapp.post_json('/treatment', item).json['@graph'][0]
+
@pytest.fixture
def attachment():
return {'download': 'red-dot.png', 'href': RED_DOT}
| 2 |
diff --git a/node/lib/cmd/add_submodule.js b/node/lib/cmd/add_submodule.js @@ -121,7 +121,7 @@ The path ${colors.red(args.path)} already exists.`);
if (null === importArg) {
console.log(`\
Added new sub-repo ${colors.blue(args.path)}. It is currently empty. Please
-stage changes and/or make a commit before finishing with 'git meta commit';
+stage changes under sub-repo before finishing with 'git meta commit';
you will not be able to use 'git meta commit' until you do so.`);
}
});
| 1 |
diff --git a/src/track.js b/src/track.js @@ -7,34 +7,32 @@ import { lazyStartIndex, lazyEndIndex, getPreClones } from './utils/innerSliderU
// given specifications/props for a slide, fetch all the classes that need to be applied to the slide
var getSlideClasses = (spec) => {
- // if spec has currentSlideIndex, we can also apply slickCurrent class according to that (https://github.com/kenwheeler/slick/blob/master/slick/slick.js#L2300-L2302)
var slickActive, slickCenter, slickCloned;
var centerOffset, index;
- if (spec.rtl) { // if we're going right to left, index is reversed
+ if (spec.rtl) {
index = spec.slideCount - 1 - spec.index;
- } else { // index of the slide
+ } else {
index = spec.index;
}
slickCloned = (index < 0) || (index >= spec.slideCount);
if (spec.centerMode) {
centerOffset = Math.floor(spec.slidesToShow / 2);
- slickCenter = (index - spec.currentSlide) % spec.slideCount === 0; // concern: not sure if this should be correct (https://github.com/kenwheeler/slick/blob/master/slick/slick.js#L2328-L2346)
+ slickCenter = (index - spec.currentSlide) % spec.slideCount === 0;
if ((index > spec.currentSlide - centerOffset - 1) && (index <= spec.currentSlide + centerOffset)) {
slickActive = true;
}
} else {
- // concern: following can be incorrect in case where currentSlide is lastSlide in frame and rest of the slides to show have index smaller than currentSlideIndex
slickActive = (spec.currentSlide <= index) && (index < spec.currentSlide + spec.slidesToShow);
}
let slickCurrent = index === spec.currentSlide
- return classnames({
+ return {
'slick-slide': true,
'slick-active': slickActive,
'slick-center': slickCenter,
'slick-cloned': slickCloned,
'slick-current': slickCurrent // dubious in case of RTL
- });
+ }
};
var getSlideStyle = function (spec) {
@@ -87,13 +85,14 @@ var renderSlides = function (spec) {
}
var childStyle = getSlideStyle({...spec, index})
const slideClass = child.props.className || ''
-
+ let slideClasses = getSlideClasses({...spec, index})
// push a cloned element of the desired slide
slides.push(React.cloneElement(child, {
key: 'original' + getKey(child, index),
'data-index': index,
- className: classnames(getSlideClasses({...spec, index}), slideClass),
+ className: classnames(slideClasses, slideClass),
tabIndex: '-1',
+ 'aria-hidden': !slideClasses['slick-active'],
style: {outline: 'none', ...(child.props.style || {}), ...childStyle},
onClick: e => {
child.props && child.props.onClick && child.props.onClick(e)
@@ -112,11 +111,13 @@ var renderSlides = function (spec) {
if (key >= startIndex) {
child = elem
}
+ slideClasses = getSlideClasses({...spec, index: key})
preCloneSlides.push(React.cloneElement(child, {
key: 'precloned' + getKey(child, key),
'data-index': key,
tabIndex: '-1',
- className: classnames(getSlideClasses({...spec, index: key}), slideClass),
+ className: classnames(slideClasses, slideClass),
+ 'aria-hidden': !slideClasses['slick-active'],
style: {...(child.props.style || {}), ...childStyle},
onClick: e => {
child.props && child.props.onClick && child.props.onClick(e)
@@ -132,11 +133,13 @@ var renderSlides = function (spec) {
if (key < endIndex) {
child = elem
}
+ slideClasses = getSlideClasses({...spec, index: key})
postCloneSlides.push(React.cloneElement(child, {
key: 'postcloned' + getKey(child, key),
'data-index': key,
tabIndex: '-1',
- className: classnames(getSlideClasses({...spec, index: key}), slideClass),
+ className: classnames(slideClasses, slideClass),
+ 'aria-hidden': !slideClasses['slick-active'],
style: {...(child.props.style || {}), ...childStyle},
onClick: e => {
child.props && child.props.onClick && child.props.onClick(e)
| 0 |
diff --git a/src/components/play-mode/minimap/Minimap.jsx b/src/components/play-mode/minimap/Minimap.jsx @@ -7,8 +7,11 @@ import styles from './minimap.module.css';
//
let minimap = null;
-const minimapSize = 300;
-const minimapWorldSize = 50;
+const canvasSize = 180 * window.devicePixelRatio;
+const minimapSize = 2048*3;
+const minimapWorldSize = 400;
+const minimapMinZoom = 0.1;
+const minimapBaseSpeed = 30;
export const Minimap = () => {
const canvasRef = useRef();
@@ -18,7 +21,12 @@ export const Minimap = () => {
const canvas = canvasRef.current;
if (!minimap) {
- minimap = minimapManager.createMiniMap(minimapSize, minimapSize, minimapWorldSize, minimapWorldSize);
+ minimap = minimapManager.createMiniMap(
+ minimapSize, minimapSize,
+ minimapWorldSize, minimapWorldSize,
+ minimapMinZoom,
+ minimapBaseSpeed
+ );
}
minimap.resetCanvases();
minimap.addCanvas(canvas);
@@ -28,7 +36,7 @@ export const Minimap = () => {
return (
<div className={ styles.locationMenu } >
- <canvas width={minimapSize} height={minimapSize} className={ styles.map } ref={canvasRef} />
+ <canvas width={canvasSize} height={canvasSize} className={ styles.map } ref={canvasRef} />
</div>
);
| 4 |
diff --git a/htdocs/js/ui/notebook_merger/merger_view.js b/htdocs/js/ui/notebook_merger/merger_view.js @@ -324,7 +324,7 @@ RCloudNotebookMerger.view = (function(model) {
- panelBody.cssUnit('padding-top')[0] - panelBody.cssUnit('padding-bottom')[0]
- panelBody.cssUnit('margin-top')[0] - panelBody.cssUnit('margin-bottom')[0];
if (height > maxHeight) {
- height = maxHeight;
+ maxHeight = height;
}
panelContent.css('height', height + 'px');
};
| 11 |
diff --git a/src/pagination.js b/src/pagination.js @@ -66,9 +66,7 @@ export default React.createClass({
<div className='-center'>
<span className='-pageInfo'>
{this.props.pageText} {showPageJump ? (
- <form className='-pageJump'
- onSubmit={this.applyPage}
- >
+ <div className='-pageJump'>
<input
type={this.state.page === '' ? 'text' : 'number'}
onChange={e => {
@@ -81,8 +79,13 @@ export default React.createClass({
}}
value={this.state.page === '' ? '' : this.state.page + 1}
onBlur={this.applyPage}
+ onKeyPress={e => {
+ if (e.which === 13 || e.keyCode === 13) {
+ this.applyPage()
+ }
+ }}
/>
- </form>
+ </div>
) : (
<span className='-currentPage'>{page + 1}</span>
)} {this.props.ofText} <span className='-totalPages'>{pages}</span>
| 2 |
diff --git a/client/components/main/globalSearch.jade b/client/components/main/globalSearch.jade @@ -17,9 +17,9 @@ template(name="globalSearch")
else if hasResults.get
.global-search-dueat-list-wrapper
h1
- if $eq resultCount.get 0
+ if $eq resultsCount.get 0
| {{_ 'no-results' }}
- else if $eq resultCount.get 1
+ else if $eq resultsCount.get 1
| {{_ 'one-result' }}
else
| {{_ 'n-results' resultsCount.get }}
| 1 |
diff --git a/package.json b/package.json "devDependencies": {
"assert-diff": "^1.2.0",
"error-stack-parser": "^2.0.1",
- "eslint": "^5.0.0",
+ "eslint": "^4.19.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-async-await": "0.0.0",
"eslint-plugin-markdown": "^1.0.0-beta.6",
| 13 |
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -61,9 +61,6 @@ jobs:
command: |
yarn ganache > /dev/null &
cd source/swap && yarn test
- - persist_to_workspace:
- root: *working_directory
- paths: .
indexer_tests:
<<: *container_config
@@ -75,9 +72,6 @@ jobs:
command: |
yarn ganache > /dev/null &
cd source/indexer && yarn test
- - persist_to_workspace:
- root: *working_directory
- paths: .
index_tests:
<<: *container_config
@@ -89,9 +83,6 @@ jobs:
command: |
yarn ganache > /dev/null &
cd source/index && yarn test
- - persist_to_workspace:
- root: *working_directory
- paths: .
delegate_tests:
<<: *container_config
@@ -103,9 +94,6 @@ jobs:
command: |
yarn ganache > /dev/null &
cd source/delegate && yarn test
- - persist_to_workspace:
- root: *working_directory
- paths: .
delegate_factory_tests:
<<: *container_config
@@ -117,9 +105,6 @@ jobs:
command: |
yarn ganache > /dev/null &
cd source/delegate-factory && yarn test
- - persist_to_workspace:
- root: *working_directory
- paths: .
types_tests:
<<: *container_config
@@ -131,9 +116,6 @@ jobs:
command: |
yarn ganache > /dev/null &
cd source/types && yarn test
- - persist_to_workspace:
- root: *working_directory
- paths: .
wrapper_tests:
<<: *container_config
@@ -145,9 +127,6 @@ jobs:
command: |
yarn ganache > /dev/null &
cd source/wrapper && yarn test
- - persist_to_workspace:
- root: *working_directory
- paths: .
deploy:
<<: *container_config
| 2 |
diff --git a/packages/spark-core/settings/_settings.scss b/packages/spark-core/settings/_settings.scss @@ -672,6 +672,7 @@ $sprk-dropdown-active-border: 2.5px solid $sprk-green !default;
$sprk-dropdown-active-box-shadow: -1px 0 0 0 $sprk-green !default;
$sprk-dropdown-max-width: 24rem !default;
$sprk-dropdown-shadow: 0 0 40px 2px rgba(0, 0, 0, 0.1) !default;
+$sprk-dropdown-line-height: 1;
//
// Modals
@@ -704,9 +705,13 @@ $sprk-big-nav-link-font-weight: 300;
$sprk-big-nav-active-color: $sprk-black !default;
$sprk-masthead-logo-max-width: 192px !default;
$sprk-masthead-logo-min-width: 174px !default;
-$sprk-mobile-masthead-height: 113px !default;
+$sprk-mobile-masthead-height: 81px !default;
$sprk-narrow-nav-left-border: 5px solid $sprk-black !default;
-$sprk-narrow-nav-link-font-weight: normal !default;
+$sprk-narrow-nav-active-link-font-weight: 300 !default;
+$sprk-narrow-nav-link-font-weight: 300 !default;
+$sprk-narrow-nav-active-link-color: $sprk-font-weight-body-one !default;
+$sprk-narrow-nav-heading-color: $sprk-black !default;
+$sprk-narrow-nav-icon-stroke: $sprk-black !default;
//
// Spinners
| 3 |
diff --git a/packages/component-library/stories/index.js b/packages/component-library/stories/index.js @@ -15,6 +15,7 @@ import dataTable from "./DataTable.story";
import dropdownStory from "./DropdownMenu.story";
import gradientScaleStory from "./GradientScale.story";
import headerStory from "./Header.story";
+import heatMapStory from "./HeatMap.story";
import horizontalBarChartStory from "./HorizontalBarChart.story";
import iconMapStory from "./IconMap.story";
import lineChartStory from "./LineChart.story";
@@ -132,6 +133,7 @@ storiesOf("Component Lib|Maps", module)
baseMapStory();
boundaryMapStory();
civicSandboxMapStory();
+heatMapStory();
iconMapStory();
mapOverlayStory();
pathMapStory();
| 13 |
diff --git a/graveyard.json b/graveyard.json "description": "Microsoft Excel Viewer was a freeware program for viewing and printing spreadsheet documents created by Excel.",
"link": "https://en.wikipedia.org/wiki/Microsoft_Excel#Microsoft_Excel_Viewer",
"links": [
- "https://docs.microsoft.com/it-it/archive/blogs/office_sustained_engineering/end-of-support-for-the-excel-and-powerpoint-Viewers-and-the-office-compatibility-pack",
+ "https://docs.microsoft.com/en-us/archive/blogs/office_sustained_engineering/end-of-support-for-the-excel-and-powerpoint-Viewers-and-the-office-compatibility-pack",
"http://ftpmirror.your.org/pub/misc/ftp.microsoft.com/Softlib/index.txt"
],
"name": "Office Excel Viewer",
"description": "Microsoft Word Viewer was a freeware program for Microsoft Windows to display and print Microsoft Word documents.",
"link": "https://en.wikipedia.org/wiki/Microsoft_Word_Viewer",
"links": [
- "https://docs.microsoft.com/it-it/archive/blogs/office_sustained_engineering/word-viewer-to-be-retired-in-november-2017",
+ "https://docs.microsoft.com/en-us/archive/blogs/office_sustained_engineering/word-viewer-to-be-retired-in-november-2017",
"http://ftpmirror.your.org/pub/misc/ftp.microsoft.com/Softlib/index.txt"
],
"name": "Office Word Viewer",
"description": "PowerPoint Viewer was a free application to be used on computers without PowerPoint installed, to view, project, or print (but not create or edit) presentations.",
"link": "https://en.wikipedia.org/wiki/Microsoft_PowerPoint#PowerPoint_Viewer",
"links": [
- "https://docs.microsoft.com/it-it/archive/blogs/office_sustained_engineering/end-of-support-for-the-excel-and-powerpoint-Viewers-and-the-office-compatibility-pack",
+ "https://docs.microsoft.com/en-us/archive/blogs/office_sustained_engineering/end-of-support-for-the-excel-and-powerpoint-Viewers-and-the-office-compatibility-pack",
"https://en.wikipedia.org/wiki/Microsoft_Office_3.0"
],
"name": "Office PowerPoint Viewer",
"description": "Microsoft Forefront was a family of line-of-business security software designed to help protect computer networks, network servers and individual devices, which underlying technology was acquired from Sybari in 2005.",
"link": "https://en.wikipedia.org/wiki/Microsoft_Forefront",
"links": [
- "https://www.microsoft.com/it-it/download/details.aspx?id=23256"
+ "https://www.microsoft.com/en-us/download/details.aspx?id=23256"
],
"name": "Microsoft Forefront",
"type": "app"
| 14 |
diff --git a/src/libs/ActiveClientManager/index.js b/src/libs/ActiveClientManager/index.js @@ -40,9 +40,7 @@ Onyx.connect({
// Save the clients back to onyx, if they changed
if (removed) {
- ActiveClients.setActiveClients(activeClients).then(() => {
- resolveSavedSelfPromise();
- });
+ ActiveClients.setActiveClients(activeClients);
}
},
});
@@ -53,7 +51,7 @@ Onyx.connect({
function init() {
activeClients = _.without(activeClients, clientID);
activeClients.push(clientID);
- ActiveClients.setActiveClients(activeClients);
+ ActiveClients.setActiveClients(activeClients).then(resolveSavedSelfPromise);
}
/**
| 5 |
diff --git a/packages/app/config/webpack.common.js b/packages/app/config/webpack.common.js @@ -127,6 +127,7 @@ module.exports = (options) => {
// ignore
new webpack.IgnorePlugin(/^\.\/lib\/deflate\.js/, /markdown-it-plantuml/),
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
+ new webpack.IgnorePlugin(/mongoose/),
new LodashModuleReplacementPlugin({
flattening: true,
| 8 |
diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js @@ -237,11 +237,13 @@ function createOption(personalDetailList, report, {
let text;
let alternateText;
+ let icons;
if (isBusinessChatRoom) {
text = lodashGet(report, ['reportName'], '');
alternateText = (showChatPreviewLine && !forcePolicyNamePreview && lastMessageText)
? lastMessageText
: ReportUtils.getBusinessRoomSubtitle(report, policies);
+ icons = lodashGet(report, 'icons', ['']);
} else {
text = hasMultipleParticipants
? _.map(personalDetailList, ({firstName, login}) => firstName || Str.removeSMSDomain(login))
@@ -250,11 +252,12 @@ function createOption(personalDetailList, report, {
alternateText = (showChatPreviewLine && lastMessageText)
? lastMessageText
: Str.removeSMSDomain(personalDetail.login);
+ icons = lodashGet(report, 'icons', [personalDetail.avatar]);
}
return {
text,
alternateText,
- icons: lodashGet(report, 'icons', [personalDetail.avatar]),
+ icons,
tooltipText,
participantsList: personalDetailList,
@@ -384,7 +387,7 @@ function getOptions(reports, personalDetails, activeReportID, {
const logins = lodashGet(report, ['participants'], []);
// Report data can sometimes be incomplete. If we have no logins or reportID then we will skip this entry.
- if (!report || !report.reportID || _.isEmpty(logins)) {
+ if (!report || !report.reportID || (_.isEmpty(logins) && !ReportUtils.isUserCreatedPolicyRoom(report))) {
return;
}
| 11 |
diff --git a/token-metadata/0x6e36556B3ee5Aa28Def2a8EC3DAe30eC2B208739/metadata.json b/token-metadata/0x6e36556B3ee5Aa28Def2a8EC3DAe30eC2B208739/metadata.json "symbol": "BUILD",
"address": "0x6e36556B3ee5Aa28Def2a8EC3DAe30eC2B208739",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/components/layouts/LayoutGlass/index.js b/src/components/layouts/LayoutGlass/index.js import React, { Component } from "react";
import Alerts from "../../generic/Alerts";
-import ActionsMixin from "../../generic/Actions";
import TransitionGroup from "react-addons-transition-group";
import CardFrame from "./frame";
import Widgets from "../LayoutOdyssey/widgets";
@@ -36,7 +35,6 @@ class LayoutGlass extends Component {
const { touch } = this.state;
let alertClass = `alertColor${simulator.alertlevel || 5}`;
return (
- <ActionsMixin {...this.props}>
<div className={`layout-glass ${alertClass}`}>
<TransitionGroup>{renderCards(this.props)}</TransitionGroup>
@@ -65,7 +63,6 @@ class LayoutGlass extends Component {
/>
<Alerts ref="alert-widget" simulator={simulator} station={station} />
</div>
- </ActionsMixin>
);
}
}
| 2 |
diff --git a/app/views/layouts/registrations.html.haml b/app/views/layouts/registrations.html.haml )
}.reverse.join( ", " )
place_guess = obs.place_guess if place_guess.blank?
+ taxon_name = if obs.taxon
+ render( partial: "shared/taxon", locals: { taxon: obs.taxon, one_name: true } )
+ else
+ t(:unknown)
+ end
#imgcol.hidden-xs.hidden-sm{ style: "background-image: url('#{photo.large_url}');" }
.about-observation
= link_to_user obs.user, style: "background-image: url('#{obs.user.icon.url(:medium)}');", class: "usericon" do
.details
%div
- =t :taxon_observed_by_html, taxon: render( partial: "shared/taxon", locals: { taxon: obs.taxon, one_name: true } ), url: url_for( obs )
+ =t :taxon_observed_by_html, taxon: taxon_name, url: url_for( obs )
= link_to_user obs.user, class: "username" do
= obs.user.published_name
%div
| 9 |
diff --git a/token-metadata/0x9469D013805bFfB7D3DEBe5E7839237e535ec483/metadata.json b/token-metadata/0x9469D013805bFfB7D3DEBe5E7839237e535ec483/metadata.json "symbol": "RING",
"address": "0x9469D013805bFfB7D3DEBe5E7839237e535ec483",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/token-metadata/0xf18432Ef894Ef4b2a5726F933718F5A8cf9fF831/metadata.json b/token-metadata/0xf18432Ef894Ef4b2a5726F933718F5A8cf9fF831/metadata.json "symbol": "BIO",
"address": "0xf18432Ef894Ef4b2a5726F933718F5A8cf9fF831",
"decimals": 8,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/app/Http/Controllers/CrudController.php b/src/app/Http/Controllers/CrudController.php @@ -113,7 +113,7 @@ class CrudController extends BaseController
}
// insert item in the db
- $item = $this->crud->create($request->except(['save_action', '_token', '_method']));
+ $item = $this->crud->create($request->except(['save_action', '_token', '_method', 'current_tab']));
$this->data['entry'] = $this->crud->entry = $item;
// show a success message
@@ -177,7 +177,7 @@ class CrudController extends BaseController
// update the row in the db
$item = $this->crud->update($request->get($this->crud->model->getKeyName()),
- $request->except('save_action', '_token', '_method'));
+ $request->except('save_action', '_token', '_method', 'current_tab'));
$this->data['entry'] = $this->crud->entry = $item;
// show a success message
| 8 |
diff --git a/assets/js/components/events/EventsDashboard.jsx b/assets/js/components/events/EventsDashboard.jsx @@ -6,7 +6,7 @@ import groupBy from 'lodash/groupBy';
import PacketGraph from '../common/PacketGraph'
import { DEVICE_EVENTS, EVENTS_SUBSCRIPTION } from '../../graphql/events'
import { graphql } from 'react-apollo';
-import { Badge, Card, Col, Row, Typography, Table, Tag, Popover, Button } from 'antd';
+import { Badge, Card, Col, Row, Typography, Table, Tag, Popover, Button, Checkbox } from 'antd';
import { CaretDownOutlined, CaretUpOutlined, CheckOutlined, InfoOutlined, CloseOutlined } from '@ant-design/icons';
const { Text } = Typography
import { SkeletonLayout } from '../common/SkeletonLayout';
@@ -73,7 +73,9 @@ const statusBadge = (status) => {
@graphql(DEVICE_EVENTS, queryOptions)
class EventsDashboard extends Component {
state = {
- rows: []
+ rows: [],
+ expandedRowKeys: [],
+ expandAll: false,
}
componentDidUpdate(prevProps) {
@@ -95,16 +97,36 @@ class EventsDashboard extends Component {
}
addEvent = event => {
- const { rows } = this.state
+ const { rows, expandAll } = this.state
const lastEvent = rows[rows.length - 1]
if (rows.length > 100 && getDiffInSeconds(parseInt(lastEvent.reported_at)) > 300) {
rows.pop()
}
+
+ const expandedRowKeys = expandAll ? this.state.expandedRowKeys.concat(event.id) : this.state.expandedRowKeys
+
this.setState({
- rows: [event].concat(rows)
+ rows: [event].concat(rows),
+ expandedRowKeys
})
}
+ toggleExpandAll = () => {
+ if (this.state.expandAll) {
+ this.setState({ expandAll: false, expandedRowKeys: [] })
+ } else {
+ this.setState({ expandAll: true, expandedRowKeys: this.state.rows.map(r => r.id) })
+ }
+ }
+
+ onExpandRow = (expandRow, row) => {
+ if (expandRow) {
+ this.setState({ expandedRowKeys: this.state.expandedRowKeys.concat(row.id) })
+ } else {
+ this.setState({ expandAll: false, expandedRowKeys: this.state.expandedRowKeys.filter(id => id != row.id) })
+ }
+ }
+
renderExpanded = record => {
let hotspotColumns
if (record.category == 'ack' || record.category == 'down') {
@@ -208,7 +230,7 @@ class EventsDashboard extends Component {
}
render() {
- const { rows } = this.state
+ const { rows, expandedRowKeys, expandAll } = this.state
const columns = [
{
@@ -254,10 +276,20 @@ class EventsDashboard extends Component {
<div style={{padding: 20, boxSizing: 'border-box'}}>
<PacketGraph events={this.state.rows} />
</div>
- <div style={{padding: 20, width: '100%', background: '#F6F8FA', borderBottom: '1px solid #e1e4e8', borderTop: '1px solid #e1e4e8', display: 'flex', flexDirection: 'row', justifyContent: 'space-between'}}>
- <Text strong style={{display: 'block', fontSize: 17, color: 'rgba(0, 0, 0, 0.85)'}}>
+ <div style={{padding: 20, width: '100%', background: '#F6F8FA', borderBottom: '1px solid #e1e4e8', borderTop: '1px solid #e1e4e8', display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center'}}>
+ <span>
+ <Text strong style={{ fontSize: 17, color: 'rgba(0, 0, 0, 0.85)'}}>
Event Log
</Text>
+
+ <Checkbox
+ onChange={this.toggleExpandAll}
+ checked={expandAll}
+ style={{ marginLeft: 20 }}
+ >
+ Expand All
+ </Checkbox>
+ </span>
<a
href={`data:text/json;charset=utf-8,${encodeURIComponent(JSON.stringify(rows, null, 2))}`}
download="event-debug.json"
@@ -274,6 +306,8 @@ class EventsDashboard extends Component {
rowKey={record => record.id}
pagination={false}
expandedRowRender={this.renderExpanded}
+ expandedRowKeys={expandedRowKeys}
+ onExpand={this.onExpandRow}
/>
</React.Fragment>
)
| 11 |
diff --git a/src/loader/loadingscreen.js b/src/loader/loadingscreen.js import { world, viewport } from "./../game.js";
-import { createCanvas, renderer } from "./../video/video.js";
+import { renderer } from "./../video/video.js";
import * as event from "./../system/event.js";
import {nextPowerOfTwo} from "./../math/math.js";
import pool from "./../system/pooling.js";
@@ -69,13 +69,13 @@ class IconLogo extends Renderable {
constructor(x, y) {
super(x, y, 100, 85);
- this.iconCanvas = createCanvas(
+ this.iconTexture = pool.pull("CanvasTexture",
renderer.WebGLVersion > 1 ? this.width : nextPowerOfTwo(this.width),
renderer.WebGLVersion > 1 ? this.height : nextPowerOfTwo(this.height),
- false
+ true
);
- var context = renderer.getContext2d(this.iconCanvas);
+ var context = this.iconTexture.context;
context.beginPath();
context.moveTo(0.7, 48.9);
@@ -110,7 +110,17 @@ class IconLogo extends Renderable {
* @ignore
*/
draw(renderer) {
- renderer.drawImage(this.iconCanvas, renderer.getWidth() / 2, this.pos.y);
+ renderer.drawImage(this.iconTexture.canvas, renderer.getWidth() / 2, this.pos.y);
+ }
+
+ /**
+ * Destroy function
+ * @ignore
+ */
+ destroy() {
+ // call the parent destroy method
+ super.destroy(arguments);
+ pool.push(this.iconTexture);
}
};
| 4 |
diff --git a/shows/043 - Method Madness.md b/shows/043 - Method Madness.md @@ -5,7 +5,7 @@ date: 1524654511142
url: https://traffic.libsyn.com/syntax/Syntax043.mp3
---
-Wes and Scott rattle through ~20 different Object and Arra Methods that will make you a better JavaScript developer.
+Wes and Scott rattle through ~20 different Object and Array Methods that will make you a better JavaScript developer.
## Freshbooks - Sponsor
| 1 |
diff --git a/make/watch.js b/make/watch.js @@ -12,6 +12,13 @@ var chalk = require("chalk");
var chokidar = require("chokidar");
var browserSync = require("browser-sync");
+// The following files will not trigger a reload
+var exclude = [
+ "!**/.*", // hidden file, perhaps an editor lock or some such
+ "!**/*~", // backup file, created by some editors
+ "!**/#*#", // Emacs creates these for unsaved edits
+];
+
// The following files and directories will trigger a build & reload
var watchToBuild = [
"images",
@@ -22,13 +29,13 @@ var watchToBuild = [
"src",
"tests",
"tools",
-];
+].concat(exclude);
// The following directories will trigger a reload only
var watchToReload = [
"examples",
"private_examples",
-];
+].concat(exclude);
var ignored = [
"**/.*", // hidden files, e.g. lock files or similar
| 8 |
diff --git a/sirepo/server.py b/sirepo/server.py @@ -255,9 +255,7 @@ def api_getApplicationData(filename=None):
req = http_request.parse_post(template=True, filename=filename or None)
with simulation_db.tmp_dir() as d:
res = req.template.get_application_data(req.req_data, tmp_dir=d)
- if 'filename' in req:
- assert isinstance(res, pkconst.PY_PATH_LOCAL_TYPE), \
- '{}: template did not return a file'.format(res)
+ if 'filename' in req and isinstance(res, pkconst.PY_PATH_LOCAL_TYPE):
return http_reply.gen_file_as_attachment(
res,
filename=req.filename,
| 11 |
diff --git a/slick.grid.js b/slick.grid.js @@ -2614,6 +2614,21 @@ if (typeof Slick === "undefined") {
var handled = e.isImmediatePropagationStopped();
var keyCode = Slick.keyCode;
+ if (!handled) {
+ if (!e.shiftKey && !e.altKey) {
+ if (options.editable && currentEditor && currentEditor.keyCaptureList) {
+ if (currentEditor.keyCaptureList.indexOf(e.which) > -1) {
+ return;
+ }
+ }
+ if (e.which == keyCode.HOME) {
+ console.log("PRESSED HOME");
+ handled = (e.ctrlKey) ? navigateTop() : navigateRowStart();
+ } else if (e.which == keyCode.END) {
+ handled = (e.ctrlKey) ? navigateBottom() : navigateRowEnd();
+ }
+ }
+ }
if (!handled) {
if (!e.shiftKey && !e.altKey && !e.ctrlKey) {
// editor may specify an array of keys to bubble
@@ -3232,6 +3247,28 @@ if (typeof Slick === "undefined") {
scrollPage(-1);
}
+ function navigateTop() {
+ navigateToRow(0);
+ }
+
+ function navigateBottom() {
+ navigateToRow(getDataLength()-1);
+ }
+
+ function navigateToRow(row) {
+ var num_rows = getDataLength();
+ if (!num_rows) return true;
+
+ if (row < 0) row = 0;
+ else if (row >= num_rows) row = num_rows - 1;
+
+ scrollCellIntoView(row, 0, true);
+ if (options.enableCellNavigation && activeRow != null) {
+ resetActiveCell();
+ }
+ return true;
+ }
+
function getColspan(row, cell) {
var metadata = data.getItemMetadata && data.getItemMetadata(row);
if (!metadata || !metadata.columns) {
@@ -3440,6 +3477,28 @@ if (typeof Slick === "undefined") {
return pos;
}
+ function gotoRowStart(row, cell, posX) {
+ var newCell = findFirstFocusableCell(row);
+ if (newCell === null) return null;
+
+ return {
+ "row": row,
+ "cell": newCell,
+ "posX": posX
+ };
+ }
+
+ function gotoRowEnd(row, cell, posX) {
+ var newCell = findLastFocusableCell(row);
+ if (newCell === null) return null;
+
+ return {
+ "row": row,
+ "cell": newCell,
+ "posX": posX
+ };
+ }
+
function navigateRight() {
return navigate("right");
}
@@ -3464,6 +3523,14 @@ if (typeof Slick === "undefined") {
return navigate("prev");
}
+ function navigateRowStart() {
+ return navigate("home");
+ }
+
+ function navigateRowEnd() {
+ return navigate("end");
+ }
+
/**
* @param {string} dir Navigation direction.
* @return {boolean} Whether navigation resulted in a change of active cell.
@@ -3488,7 +3555,9 @@ if (typeof Slick === "undefined") {
"left": -1,
"right": 1,
"prev": -1,
- "next": 1
+ "next": 1,
+ "home": -1,
+ "end": 1
};
tabbingDirection = tabbingDirections[dir];
@@ -3498,7 +3567,9 @@ if (typeof Slick === "undefined") {
"left": gotoLeft,
"right": gotoRight,
"prev": gotoPrev,
- "next": gotoNext
+ "next": gotoNext,
+ "home": gotoRowStart,
+ "end": gotoRowEnd
};
var stepFn = stepFunctions[dir];
var pos = stepFn(activeRow, activeCell, activePosX);
@@ -3850,6 +3921,10 @@ if (typeof Slick === "undefined") {
"navigateRight": navigateRight,
"navigatePageUp": navigatePageUp,
"navigatePageDown": navigatePageDown,
+ "navigateTop": navigateTop,
+ "navigateBottom": navigateBottom,
+ "navigateRowStart": navigateRowStart,
+ "navigateRowEnd": navigateRowEnd,
"gotoCell": gotoCell,
"getTopPanel": getTopPanel,
"setTopPanelVisibility": setTopPanelVisibility,
| 9 |
diff --git a/articles/api/authentication/_introduction.md b/articles/api/authentication/_introduction.md @@ -14,31 +14,32 @@ The Authentication API is served over HTTPS. All URLs referenced in the document
## Authentication methods
-There are three ways that you can authenticate with this API:
+You have three options for authenticating with this API:
+- OAuth2 <dfn data-key="access-token">Access Token</dfn>
+- Client ID and Client Secret (confidential applications)
+- Client ID (public applications)
-- with an OAuth2 <dfn data-key="access-token">Access Token</dfn> in the `Authorization` request header field (which uses the `Bearer` authentication scheme to transmit the Access Token)
-- with your Client ID and Client Secret credentials
-- only with your Client ID
+### OAuth2 Access Token
-Each endpoint supports only one option.
+Send a valid Access Token in the `Authorization` header, using the `Bearer` authentication scheme.
-### OAuth2 token
-
-In this case, you have to send a valid Access Token in the `Authorization` header, using the `Bearer` authentication scheme. An example is the [Get User Info endpoint](#get-user-info). In this scenario, you get an Access Token when you authenticate a user, and then you can make a request to the [Get User Info endpoint](#get-user-info), using that token in the `Authorization` header, in order to retrieve the user's profile.
+An example is the [Get User Info endpoint](#get-user-info). In this scenario, you get an Access Token when you authenticate a user, and then you can make a request to the [Get User Info endpoint](#get-user-info), using that token in the `Authorization` header, in order to retrieve the user's profile.
### Client ID and Client Secret
-In this case, you have to send your Client ID and Client Secret. The method you can use to send this data is determined by the [Token Endpoint Authentication Method](https://auth0.com/docs/get-started/applications/confidential-and-public-applications/view-application-type) configured for your application.
+Send the Client ID and Client Secret. The method you can use to send this data is determined by the [Token Endpoint Authentication Method](https://auth0.com/docs/get-started/applications/confidential-and-public-applications/view-application-type) configured for your application.
-If you are using **Post**, you have to send this data in the JSON body of your request.
+If you are using **Post**, you must send this data in the JSON body of your request.
-If you are using **Basic**, you have to send this data in the `Authorization` header, using the `Basic` authentication scheme. To generate your credential value, concatenate your Client ID and Client Secret, separated by a colon (`:`), and encode it in Base64.
+If you are using **Basic**, you must send this data in the `Authorization` header, using the `Basic` authentication scheme. To generate your credential value, concatenate your Client ID and Client Secret, separated by a colon (`:`), and encode it in Base64.
An example is the [Revoke Refresh Token endpoint](#revoke-refresh-token). This option is available only for confidential applications (such as applications that are able to hold credentials in a secure way without exposing them to unauthorized parties).
### Client ID
-For public applications (such as applications that cannot hold credentials securely, like SPAs or mobile apps), we offer some endpoints that can be accessed using only the Client ID. An example is the [Implicit Grant](#implicit-grant).
+Send the Client ID. For public applications (applications that cannot hold credentials securely, such as SPAs or mobile apps), we offer some endpoints that can be accessed using only the Client ID.
+
+An example is the [Implicit Grant](#implicit-grant).
## Parameters
| 3 |
diff --git a/hyperapp.d.ts b/hyperapp.d.ts @@ -10,7 +10,7 @@ export interface VNode<Attributes = {}> {
nodeName: string
attributes?: Attributes
children: Array<VNode | string>
- key: string | number
+ key: string | number | null
}
/** A Component is a function that returns a custom VNode or View.
| 7 |
diff --git a/weapons-manager.js b/weapons-manager.js @@ -855,7 +855,7 @@ const _updateWeapons = () => {
};
_handleUseAnimation();
- crosshairEl.classList.toggle('visible', ['camera', 'firstperson', 'thirdperson'].includes(cameraManager.getMode()) && !appManager.grabbedObjects[0]);
+ crosshairEl.classList.toggle('visible', !!document.pointerLockElement && ['camera', 'firstperson', 'thirdperson'].includes(cameraManager.getMode()) && !appManager.grabbedObjects[0]);
popovers.update();
| 2 |
diff --git a/packages/node_modules/@node-red/nodes/core/storage/10-file.html b/packages/node_modules/@node-red/nodes/core/storage/10-file.html <option value="stream" data-i18n="file.output.stream"></option>
</select>
</div>
- <div class="form-row">
- <label></label>
- <input type="checkbox" id="node-input-sendError" style="width:auto">
- <label style="width:auto; margin-bottom:0; vertical-align: middle;" for="node-input-sendError" data-i18n="file.label.sendError"></label>
- </div>
<div class="form-row" id="encoding-spec">
<label for="node-input-encoding"><i class="fa fa-flag"></i> <span data-i18n="file.label.encoding"></span></label>
<select type="text" id="node-input-encoding" style="width: 250px;">
}
});
encSel.val(node.encoding);
- if (this.sendError === undefined) {
- $("#node-input-sendError").prop("checked",true);
- }
$("#node-input-format").on("change",function() {
var format = $("#node-input-format").val();
if ((format === "utf8") || (format === "lines")) {
| 2 |
diff --git a/docs/index.md b/docs/index.md @@ -41,6 +41,49 @@ program's boundaries. This has two benefits: (1) your inputs are getting validat
(2) you can now statically know for sure the shape of the incoming data. **Decoders help
solve both of these problems at once.**
+## Example
+
+Suppose, for example, you have an endpoint that will receive user data:
+
+```typescript
+import { array, iso8601, number, object, optional, string } from 'decoders';
+
+//
+// Incoming data at runtime
+//
+const externalData = {
+ id: 123,
+ name: 'Alison Roberts',
+ createdAt: '1994-01-11T12:26:37.024Z',
+ tags: ['foo', 'bar'],
+};
+
+//
+// Write the decoder (= what you expect the data to look like)
+//
+const userDecoder = object({
+ id: positiveInteger,
+ name: string,
+ createdAt: optional(iso8601),
+ tags: array(string),
+});
+
+//
+// Call .verify() on the incoming data
+//
+const user = userDecoder.verify(externalData);
+// ^^^^
+// TypeScript can automatically infer this type now:
+//
+// {
+// id: number;
+// name: string;
+// createdAt?: Date;
+// tags: string[];
+// }
+//
+```
+
## The core idea
The central concept of this library is the Decoder. A `Decoder<T>` has a validation
@@ -100,39 +143,6 @@ here you can see how four decoders can be combined to build a larger decoder:

-## Example
-
-Suppose, for example, you have a webhook endpoint that will receive user payloads:
-
-```typescript
-import { array, iso8601, number, object, optional, string } from 'decoders';
-
-// External data, for example JSON.parse()'ed from a request payload
-const externalData = {
- id: 123,
- name: 'Alison Roberts',
- createdAt: '1994-01-11T12:26:37.024Z',
- tags: ['foo', 'bar', 'qux'],
-};
-
-const userDecoder = object({
- id: number,
- name: string,
- createdAt: optional(iso8601),
- tags: array(string),
-});
-
-// NOTE: TypeScript will automatically infer this type for the `user` variable
-// interface User {
-// id: number;
-// name: string;
-// createdAt?: Date;
-// tags: string[];
-// }
-
-const user = userDecoder.verify(externalData);
-```
-
## Building your own decoders
You are encouraged to build your own decoders that serve your use case. For documentation
| 5 |
diff --git a/metro/log-collector.js b/metro/log-collector.js @@ -47,6 +47,9 @@ module.exports = function logCollector () {
// rename level => levelname to avoid type clashing in ES
accEntry.levelname = LEVELS[accEntry.level];
delete accEntry.level;
+ accEntry.errors = accEntry.error;
+ delete accEntry.error;
+
accEntry.time = entry.time;
this.push(`${JSON.stringify(accEntry)}\n`);
logs.delete(id);
| 10 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,13 @@ 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.42.5] -- 2018-11-08
+
+### Fixed
+- Fix `scattergl` / `scatterpolargl` with `mode: lines` and
+ more than 1e5 pts (bug introduced in 1.42.0) [#3228]
+
+
## [1.42.4] -- 2018-11-07
### Fixed
| 3 |
diff --git a/src/client/wallet/Transfer.js b/src/client/wallet/Transfer.js @@ -59,9 +59,13 @@ export default class Transfer extends React.Component {
static minAccountLength = 3;
static maxAccountLength = 16;
static exchangeRegex = /^(bittrex|blocktrades|poloniex|changelly|openledge|shapeshiftio)$/;
+ static CURRENCIES = {
+ STEEM: 'STEEM',
+ SBD: 'SBD',
+ };
state = {
- currency: STEEM.symbol,
+ currency: Transfer.CURRENCIES.STEEM,
oldAmount: undefined,
};
@@ -264,7 +268,8 @@ export default class Transfer extends React.Component {
return;
}
- const selectedBalance = this.state.currency === 'STEEM' ? user.balance : user.sbd_balance;
+ const selectedBalance =
+ this.state.currency === Transfer.CURRENCIES.STEEM ? user.balance : user.sbd_balance;
if (authenticated && currentValue !== 0 && currentValue > parseFloat(selectedBalance)) {
callback([
@@ -281,14 +286,15 @@ export default class Transfer extends React.Component {
const { intl, visible, authenticated, user } = this.props;
const { getFieldDecorator } = this.props.form;
- const balance = this.state.currency === STEEM.symbol ? user.balance : user.sbd_balance;
+ const balance =
+ this.state.currency === Transfer.CURRENCIES.STEEM ? user.balance : user.sbd_balance;
const currencyPrefix = getFieldDecorator('currency', {
initialValue: this.state.currency,
})(
<Radio.Group onChange={this.handleCurrencyChange} className="Transfer__amount__type">
- <Radio.Button value={STEEM.symbol}>{STEEM.symbol}</Radio.Button>
- <Radio.Button value={SBD.symbol}>{SBD.symbol}</Radio.Button>
+ <Radio.Button value={Transfer.CURRENCIES.STEEM}>{Transfer.CURRENCIES.STEEM}</Radio.Button>
+ <Radio.Button value={Transfer.CURRENCIES.SBD}>{Transfer.CURRENCIES.SBD}</Radio.Button>
</Radio.Group>,
);
| 4 |
diff --git a/src/pages/settings/Profile/ProfilePage.js b/src/pages/settings/Profile/ProfilePage.js @@ -191,20 +191,21 @@ class ProfilePage extends Component {
*/
validate(values) {
const errors = {};
- let firstNameHasInvalidCharacters = false;
- let lastNameHasInvalidCharacters = false;
-
+ const [firstNameHasInvalidCharacters, lastNameHasInvalidCharacters] = ValidationUtils.doesFailCommaRemoval(
+ [values.firstName, values.lastName],
+ );
if (firstNameHasInvalidCharacters || lastNameHasInvalidCharacters) {
+ const invalidCharactersError = '';
+ errors.firstName = firstNameHasInvalidCharacters ? invalidCharactersError : '';
+ errors.lastName = lastNameHasInvalidCharacters ? invalidCharactersError : '';
return errors;
}
+ const characterLimitError = Localize.translateLocal('personalDetails.error.characterLimit', {limit: CONST.FORM_CHARACTER_LIMIT});
const [hasFirstNameError, hasLastNameError] = ValidationUtils.doesFailCharacterLimitAfterTrim(
CONST.FORM_CHARACTER_LIMIT,
[values.firstName, values.lastName],
);
-
- const characterLimitError = Localize.translateLocal('personalDetails.error.characterLimit', {limit: CONST.FORM_CHARACTER_LIMIT});
-
errors.firstName = hasFirstNameError ? characterLimitError : '';
errors.lastName = hasLastNameError ? characterLimitError : '';
| 4 |
diff --git a/electron.js b/electron.js @@ -11,13 +11,13 @@ function createWindow() {
win = new BrowserWindow({
// Set the minimal window size
- minWidth: 480,
+ minWidth: 640,
minHeight: 360,
// Set the initial window size
- width: 800,
- height: 600,
+ width: 960,
+ height: 540,
// If resize is disabled, the resolution chooser will show in
// the settings screen.
| 12 |
diff --git a/src/components/layouts/Layout.js b/src/components/layouts/Layout.js @@ -87,11 +87,11 @@ const Layout = ({ children, initialContext, hasSideBar, location }) => {
July 14, 2021 should reference
<a
href="https://sparkdesignsystem.com/"
- className="docs-c-Banner--link sprk-u-mas"
+ className="docs-c-Banner--link sprk-u-mls"
>
- version 13 of Spark.
+ version 13 of Spark
</a>
- Questions? Please contact your Product Owner or Experience
+ . Questions? Please contact your Product Owner or Experience
Director.
</p>
</div>
| 3 |
diff --git a/README.md b/README.md @@ -47,6 +47,7 @@ Moleculer is a fast & powerful microservices framework for NodeJS (>= v6.x).
- [Logging](#logging)
- [Cachers](#cachers)
- [Transporters](#transporters)
+ - [Serializers](#serializers)
- [Metrics](#metrics)
- [Statistics](#statistics)
- [Nodes](#nodes)
@@ -192,11 +193,13 @@ All available options:
heartbeatTimeout: 30,
cacher: null,
+ serializer: null,
+ validation: true,
metrics: false,
+ metricsRate: 1,
metricsSendInterval: 5 * 1000,
statistics: false,
- validation: true,
internalActions: true
ServiceFactory: null,
@@ -209,14 +212,16 @@ All available options:
| `nodeID` | `String` | Computer name | This is the ID of node. It identifies a node in the cluster when there are many nodes. |
| `logger` | `Object` | `null` | Logger class. During development you can set to `console`. In production you can set an external logger e.g. [winston](https://github.com/winstonjs/winston) or [pino](https://github.com/pinojs/pino) |
| `logLevel` | `String` or `Object` | `info` | Level of logging (debug, info, warn, error) |
-| `transporter` | `Object` | `null` | Instance of transporter. Required if you have 2 or more nodes. Internal transporters: [NatsTransporter](#nats-transporter) |
+| `transporter` | `Transporter` | `null` | Instance of transporter. Required if you have 2 or more nodes. Internal transporters: [NatsTransporter](#nats-transporter) |
| `requestTimeout` | `Number` | `5000` | Timeout of request in milliseconds. If the request is timed out, broker will throw a `RequestTimeout` error. Disable: 0 |
| `requestRetry` | `Number` | `0` | Count of retry of request. If the request is timed out, broker will try to call again. |
-| `cacher` | `Object` | `null` | Instance of cacher. Built-in cachers: [MemoryCacher](#memory-cacher) or [RedisCacher](#redis-cacher) |
+| `cacher` | `Cacher` | `null` | Instance of cacher. Built-in cachers: [MemoryCacher](#memory-cacher) or [RedisCacher](#redis-cacher) |
+| `serializer` | `Serializer` | `JSONSerializer` | Instance of serializer. Built-in serializers: [JSON](#json-serializer), [Avro](#avro-serializer) or [MsgPack](#msgpack-serializer) |
+| `validation` | `Boolean` | `false` | Enable action [parameters validation](). |
| `metrics` | `Boolean` | `false` | Enable [metrics](#metrics) function. |
+| `metricsRate` | `Number` | `1` | Rate of metrics calls. |
| `metricsSendInterval` | `Number` | `5000` | Metrics event sends period in milliseconds |
| `statistics` | `Boolean` | `false` | Enable broker [statistics](). Measure the requests count & latencies |
-| `validation` | `Boolean` | `false` | Enable action [parameters validation](). |
| `internalActions` | `Boolean` | `true` | Register internal actions for metrics & statistics functions |
| `heartbeatInterval` | `Number` | `10` | Interval (seconds) of sending heartbeat |
| `heartbeatTimeout` | `Number` | `30` | Timeout (seconds) of heartbeat |
@@ -1126,6 +1131,59 @@ new MqttTransporter({
## Custom transporter
You can also create your custom transporter module. We recommend you that copy the source of [`NatsTransporter`](src/transporters/nats.js) and implement the `connect`, `disconnect`, `subscribe` and `publish` methods.
+# Serializers
+For transportation needs a serializer module which serialize & deserialize the transfered packets. If you don't set serializer, the default is the JSON serializer.
+
+```js
+let { ServiceBroker } = require("moleculer");
+let NatsTransporter = require("moleculer").Transporters.NATS;
+let AvroSerializer = require("moleculer").Serializers.Avro;
+
+let broker = new ServiceBroker({
+ nodeID: "server-1",
+ transporter: new NatsTransporter(),
+ serializer: new AvroSerializer()
+});
+```
+
+## JSON serializer
+This is the default serializer. Serialize the packets to JSON string and deserialize the received data to packet.
+
+```js
+let broker = new ServiceBroker({
+ nodeID: "server-1",
+ transporter: new NatsTransporter(),
+ // serializer: new JSONSerializer() // not set, because it is the default
+});
+```
+
+## Avro serializer
+This is an [Avro](https://github.com/mtth/avsc) serializer.
+
+```js
+let AvroSerializer = require("moleculer").Serializers.Avro;
+
+let broker = new ServiceBroker({
+ ...
+ serializer: new AvroSerializer()
+});
+```
+
+## MsgPack serializer
+This is an [MsgPack](https://github.com/mcollina/msgpack5) serializer.
+
+```js
+let MsgPackSerializer = require("moleculer").Serializers.MsgPack;
+
+let broker = new ServiceBroker({
+ ...
+ serializer: new MsgPackSerializer()
+});
+```
+
+## Custom serializer
+You can also create your custom serializer module. We recommend you that copy the source of [JSONSerializer](src/serializers/json.js) and implement the `serialize` and `deserialize` methods.
+
# Metrics
Moleculer has a metrics function. You can turn on in [broker options](#constructor-options) with `metrics: true` property.
If enabled, the broker emits metrics events in every `metricsSendInterval`.
| 3 |
diff --git a/src/common/blockchain/mini-blockchain/blocks/Mini-Blockchain-Block.js b/src/common/blockchain/mini-blockchain/blocks/Mini-Blockchain-Block.js @@ -129,8 +129,10 @@ class MiniBlockchainBlock extends inheritBlockchainBlock {
let number = new BigInteger(hash.toString("hex"), 16);
- //return Serialization.serializeToFixedBuffer( consts.BLOCKCHAIN.BLOCKS_POW_LENGTH, Buffer.from( number.divide( balance ).divide(this.timeStamp).toString(16) , "hex") );
- return Serialization.serializeToFixedBuffer( consts.BLOCKCHAIN.BLOCKS_POW_LENGTH, Buffer.from( number.divide( balance ).toString(16) , "hex") );
+ let hex = number.divide( balance ).toString(16);
+ if (hex.length % 2 === 1) hex = hex + "0";
+
+ return Serialization.serializeToFixedBuffer( consts.BLOCKCHAIN.BLOCKS_POW_LENGTH, Buffer.from( hex , "hex") );
} catch (exception){
console.error("Error computeHash", exception);
| 7 |
diff --git a/config/env.dev.js b/config/env.dev.js @@ -2,18 +2,20 @@ module.exports = {
NODE_ENV: 'development',
FILE_UPLOAD: 'local',
// MATHJAX: 1,
- REDIS_URL: 'redis://localhost:6379/crowi',
- ELASTICSEARCH_URI: 'http://localhost:9200/crowi',
+ // REDIS_URL: 'redis://localhost:6379/crowi',
+ // ELASTICSEARCH_URI: 'http://localhost:9200/crowi',
PLUGIN_NAMES_TOBE_LOADED: [
- 'crowi-plugin-lsx',
- 'crowi-plugin-pukiwiki-like-linker',
+ // 'crowi-plugin-lsx',
+ // 'crowi-plugin-pukiwiki-like-linker',
],
// filters for debug
DEBUG: [
// 'express:*',
- 'crowi:routes:login',
+ // 'crowi:crowi',
+ 'crowi:crowi:express-init',
+ // 'crowi:routes:login',
'crowi:routes:login-passport',
- 'crowi:service:PassportService',
+ // 'crowi:service:PassportService',
// 'crowi:*',
// 'crowi:routes:page',
// 'crowi:plugins:*',
| 13 |
diff --git a/ui/package.json b/ui/package.json },
"devDependencies": {
"@babel/plugin-proposal-decorators": "^7.6.0",
+ "@formatjs/cli": "^1.1.18",
"@svgr/webpack": "4.3.3",
"babel-eslint": "^10.0.3",
"babel-jest": "24.9.0",
],
"scripts": {
"translate": "npm run messages && npm run json2pot && npm run po2json",
- "messages": "react-intl-cra 'src/**/*.{js,jsx}' -o i18n/messages.json",
+ "messages": "formatjs extract --out-file i18n/messages.json 'src/**/*.{js,jsx}'",
"json2pot": "react-intl-po json2pot 'i18n/messages.json' -o 'i18n/messages.pot'",
"po2json": "react-intl-po po2json 'i18n/translations/*.po' -m 'i18n/messages.json' -o src/content/translations.json",
"start": "node scripts/start.js",
| 14 |
diff --git a/src/apps.json b/src/apps.json 34
],
"headers": {
- "Server": "Virtuoso\\/?(\\d{2}\\.\\d{2}\\.\\d{4})?\\;version:\\1"
+ "Server": "Virtuoso/?([0-9.]+)?\\;version:\\1"
},
"meta": {
"Copyright": "^Copyright © \\d{4} OpenLink Software",
"Keywords": "^OpenLink Virtuoso Sparql"
},
- "url": ".*/sparql\\.*",
+ "url": "/sparql",
"website": "https://virtuoso.openlinksw.com/"
},
"Visual WebGUI": {
| 7 |
diff --git a/css/livecod-custom.css b/css/livecod-custom.css @@ -143,4 +143,9 @@ div.anchor {
font-size: 0.4em;
}
-
+/**
+ * Remove excessive padding for accordion news headers
+ */
+.news-accordion > .card > .card-header {
+ padding: 0;
+}
\ No newline at end of file
| 2 |
diff --git a/articles/libraries/_includes/_default_values.md b/articles/libraries/_includes/_default_values.md Auth0.js 9 will default the value of the [scope](/scopes) parameter to `openid profile email`.
-If you don't specify that scope when initializing auth0.js, you call `getSSOData()`, and you are running your website from `http://localhost` or `http://127.0.0.1`, you will get the following error in the browser console:
+If you are running your website from `http://localhost` or `http://127.0.0.1` and you do not specify the `openid profile email` scope when initializing auth0.js, calling the `getSSOData()` method will result in the following error in the browser console.
```text
Consent required. When using `getSSOData`, the user has to be authenticated with the following scope: `openid profile email`
```
-That will not happen when you run your application in production or if you specify the required [scope](/scopes). You can read more about this scenario [here](/api-auth/user-consent#skipping-consent-for-first-party-clients).
+This will not happen when you run your application in production, or if you specify the required [scope](/scopes). You can read more about this scenario [here](/api-auth/user-consent#skipping-consent-for-first-party-clients).
| 3 |
diff --git a/src/handler-runner/ServerlessInvokeLocalRunner.js b/src/handler-runner/ServerlessInvokeLocalRunner.js @@ -40,7 +40,7 @@ module.exports = class ServerlessInvokeLocalRunner {
subprocess.stdin.end()
const newlineRegex = /\r?\n|\r/g
- const proxyResponseRegex = /{[\r\n]?\s*('|")isBase64Encoded('|")|{[\r\n]?\s*('|")statusCode('|")|{[\r\n]?\s*('|")headers('|")|{[\r\n]?\s*('|")body('|")|{[\r\n]?\s*('|")principalId('|")/
+ const proxyResponseRegex = /{[\r\n]?\s*(['"])isBase64Encoded(['"])|{[\r\n]?\s*(['"])statusCode(['"])|{[\r\n]?\s*(['"])headers(['"])|{[\r\n]?\s*(['"])body(['"])|{[\r\n]?\s*(['"])principalId(['"])/
let results = ''
let hasDetectedJson = false
@@ -60,8 +60,7 @@ module.exports = class ServerlessInvokeLocalRunner {
// the correct one because it comes from sls invoke local after the lambda code fully executes.
results = trimNewlines(str.slice(match.index))
str = str.slice(0, match.index)
- }
- if (hasDetectedJson) {
+ } else if (hasDetectedJson) {
// Assumes that all data after matching the start of the
// JSON result is the rest of the context result.
results += trimNewlines(str)
@@ -86,7 +85,7 @@ module.exports = class ServerlessInvokeLocalRunner {
// between chunks.
//
// In my specific case, I was returning images encoded in the JSON response,
- // and these newlines were occuring at regular intervals (every 65536 chars)
+ // and these newlines were occurring at regular intervals (every 65536 chars)
// and corrupting the response JSON. Not sure if this is the best way for
// a general solution, but it fixed it in my case.
//
| 1 |
diff --git a/examples/js/custom/search/custom-search-panel-1.js b/examples/js/custom/search/custom-search-panel-1.js @@ -25,6 +25,7 @@ addProducts(5);
class MySearchPanel extends React.Component {
render() {
return (
+ <div>
<div className='input-group'>
<span className='input-group-btn'>
<button
@@ -33,12 +34,8 @@ class MySearchPanel extends React.Component {
CustomButton1
</button>
{ this.props.clearBtn }
- <button
- className='btn btn-warning'
- type='button'>
- CustomButton2
- </button>
</span>
+ </div>
{ this.props.searchField }
</div>
);
| 7 |
diff --git a/src/serializers/proto/packets.proto.js b/src/serializers/proto/packets.proto.js -/* istanbul ignore next */
/*eslint-disable block-scoped-var, no-redeclare, no-control-regex, no-prototype-builtins*/
"use strict";
@@ -10,6 +9,7 @@ let $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.ut
// Exported root namespace
let $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
+/* istanbul ignore next */
$root.packets = (function() {
/**
| 8 |
diff --git a/package.json b/package.json "http-auth": "^3.1.3",
"jshint": "^2.9.4",
"mocha": "^3.4.2",
- "spectron": "^3.6.4",
+ "spectron": "3.6.x",
"stylelint": "^7.11.0",
"stylelint-config-standard": "latest",
"time-grunt": "latest"
| 12 |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -11,9 +11,11 @@ Tuesday UTC may not be incorporated due to time constraints.
The compatibility matrix section of the website is built from
[YAML](https://yaml.org/) files located in [_data/compatibility/](_data/compatibility/).
-The compatibility images (usability screenshots, logos) are located in
-[img/compatibility/](img/compatibility/) with sub-folders for each
-wallet or service. These files are free for anyone to repurpose/republish
+Each wallet also requires a markdown file in
+[en/compatibility/](en/compatibility/). The compatibility images (usability
+screenshots, logos) are located in [img/compatibility/](img/compatibility/) with
+sub-folders for each wallet or service. Make sure to optimize any images using
+`optipng -o7 <filename>`. These files are free for anyone to repurpose/republish
elsewhere.
We welcome pull requests to the compatibility matrix, including
| 0 |
diff --git a/examples/component/index.js b/examples/component/index.js import React from "react";
import ReactDOM from "react-dom";
import FormControlLabel from '@material-ui/core/FormControlLabel';
+import TextField from '@material-ui/core/TextField';
import Switch from '@material-ui/core/Switch';
import MUIDataTable from "../../src/";
import Cities from "./cities";
@@ -14,6 +15,13 @@ class Example extends React.Component {
name: "Name",
options: {
filter: false,
+ customBodyRender: (value, tableMeta, updateValue) => (
+ <FormControlLabel
+ value={value}
+ control={<TextField value={value} />}
+ onChange={event => updateValue(event.target.value)}
+ />
+ )
}
},
{
@@ -41,7 +49,12 @@ class Example extends React.Component {
name: "Age",
options: {
filter: false,
- customBodyRender: value => value
+ customBodyRender: (value, tableMeta, updateValue) => (
+ <FormControlLabel
+ control={<TextField value={value || ''} type='number' />}
+ onChange={event => updateValue(event.target.value)}
+ />
+ )
}
},
{
| 0 |
diff --git a/src/network/receive.ts b/src/network/receive.ts @@ -247,14 +247,11 @@ async function onReceive(payload: Payload, dest: string) {
},
})) as ChatMemberRecord
if (payload.type === msgtypes.message) {
- const currentTribe = (await models.Chat.findOne({
- where: { uuid: payload.chat.uuid },
- })) as ChatMemberRecord
const allMsg = (await models.Message.findAll({
limit: 1,
order: [['createdAt', 'DESC']],
where: {
- chatId: currentTribe.id,
+ chatId: chat.id,
type: { [Op.ne]: msgtypes.confirmation },
},
})) as MessageRecord[]
| 2 |
diff --git a/beeline/services/MapViewFactory.js b/beeline/services/MapViewFactory.js @@ -3,21 +3,21 @@ import _ from "lodash"
angular.module("beeline").factory("MapViewFactory", () => {
return {
- init: function($scope) {
- $scope.mapObject = this.mapObject()
+ init: function(scope) {
+ scope.mapObject = this.mapObject()
- $scope.disp = this.disp()
+ scope.disp = this.disp()
- $scope.closeWindow = function() {
- $scope.disp.popupStop = null
+ scope.closeWindow = function() {
+ scope.disp.popupStop = null
}
- $scope.applyTapBoard = function(stop) {
- $scope.disp.popupStop = stop
- $scope.$digest()
+ scope.applyTapBoard = function(stop) {
+ scope.disp.popupStop = stop
+ scope.$digest()
}
- $scope.formatStopTime = function(input) {
+ scope.formatStopTime = function(input) {
if (Array.isArray(input)) {
return formatTimeArray(input)
}
| 14 |
diff --git a/src/js/components/Form/Form.js b/src/js/components/Form/Form.js @@ -72,14 +72,23 @@ class Form extends Component {
};
onReset = event => {
- const { onReset } = this.props;
+ const { onChange, onReset } = this.props;
+ const value = {};
+ this.setState({ errors: {}, value, touched: {} }, () => {
if (onReset) {
- onReset(event);
+ event.persist(); // extract from React's synthetic event pool
+ const adjustedEvent = event;
+ adjustedEvent.value = value;
+ onReset(adjustedEvent);
+ }
+ if (onChange) {
+ onChange(value);
}
- this.setState({ errors: {}, value: {}, touched: {} });
+ });
};
update = (name, data, error) => {
+ const { onChange } = this.props;
const { errors, touched, value } = this.state;
const nextValue = { ...value };
nextValue[name] = data;
@@ -96,11 +105,18 @@ class Form extends Component {
delete nextErrors[name];
}
}
- this.setState({
+ this.setState(
+ {
value: nextValue,
errors: nextErrors,
touched: nextTouched,
- });
+ },
+ () => {
+ if (onChange) {
+ onChange(nextValue);
+ }
+ },
+ );
};
addValidation = (name, validate) => {
| 1 |
diff --git a/continuous_deployment/bs.js b/continuous_deployment/bs.js @@ -59,11 +59,12 @@ var iPhoneDriver = new webdriver.Builder()
.withCapabilities(iPhone)
.build()
- */
+
var androidDriver = new webdriver.Builder()
.usingServer('http://hub-cloud.browserstack.com/wd/hub')
.withCapabilities(android)
.build()
+ */
var desktopFFDriver = new webdriver.Builder()
.usingServer('http://hub-cloud.browserstack.com/wd/hub')
@@ -81,7 +82,7 @@ var desktopIEDriver = new webdriver.Builder()
.build()
//test.runTest(iPhoneDriver)
-test.runTest(androidDriver)
+//test.runTest(androidDriver)
test.runTest(desktopFFDriver)
test.runTest(desktopEdgeDriver)
test.runTest(desktopIEDriver)
| 2 |
diff --git a/docs/hydra/5min-tutorial.md b/docs/hydra/5min-tutorial.md @@ -6,10 +6,10 @@ title: 5 Minute Tutorial
To get started quickly, we provide a Docker Compose based example for setting up ORY Hydra, a PostgreSQL instance
and an exemplary User Login & Consent App. You need to have the latest Docker as well as Docker Compose version installed.
-<img src="../../images/docs/hydra/oauth2-flow.gif" alt="OAuth2 Flow">
+<img src="/images/docs/hydra/oauth2-flow.gif" alt="OAuth2 Flow">
Next, clone (`git clone https://github.com/ory/hydra.git`), [download](https://github.com/ory-am/hydra/archive/master.zip),
-or use `go get -d github.com/ory/hydra` - if you have Go (1.12+) installed on you system - to download the Docker Compose
+or use `go get -d github.com/ory/hydra` - if you have Go (1.12+) installed on your system - to download the Docker Compose
set up.
Finally, run `docker-compose` to start the needed containers.
@@ -47,7 +47,7 @@ $ docker-compose -f quickstart.yml \
up --build
```
-Everything should running now! Let's confirm that everything is working by creating our first OAuth 2.0 Client.
+Everything should be running now! Let's confirm that everything is working by creating our first OAuth 2.0 Client.
The following commands will use Docker wizardry. You can obviously install the ORY Hydra CLI locally and avoid using
Docker here. If you do use the CLI locally, you can omit `docker-compose -f quickstart.yml exec /hydra` completely.
@@ -140,7 +140,7 @@ see at least an access token in the response. If you granted the `offline` scope
If you granted the `openid` scope, you will get an ID Token as well.
Great! You installed hydra, connected the CLI, created a client and completed two authentication flows!
-Before you continue, clean up this set up in order to avoid conflicts with other tutorials form this guide:
+Before you continue, clean up this set up in order to avoid conflicts with other tutorials from this guide:
```
$ docker-compose kill
| 1 |
diff --git a/package.json b/package.json "scripts": {
"test": "webpack-dev-server --config webpack.test.js --devtool eval --port 8081",
"pretest:headless": "webpack --config webpack.test.js --devtool eval",
- "test:headless": "mocha-phantomjs --ssl-protocol=tlsv1 -R xunit -f test-results.xml build/index.html",
+ "test:headless": "mocha-phantomjs --local-to-remote-url-access=true --ssl-protocol=tlsv1 -R xunit -f test-results.xml build/index.html",
"lint": "eslint --no-color js/*.js js/*/*.js test/*.js",
"eslint": "eslint",
"clean": "rimraf build/*",
| 8 |
diff --git a/src/constants/parade-coordinates.js b/src/constants/parade-coordinates.js @@ -58,48 +58,27 @@ export default [
{ longitude: -0.13638, latitude: 51.50995 },
{ longitude: -0.13632, latitude: 51.50995 },
{ longitude: -0.1362, latitude: 51.50996 },
- { longitude: -0.13614, latitude: 51.50989 },
- { longitude: -0.13607, latitude: 51.5098 },
- { longitude: -0.13601, latitude: 51.50981 },
- { longitude: -0.13593, latitude: 51.50982 },
- { longitude: -0.13591, latitude: 51.50982 },
- { longitude: -0.13576, latitude: 51.50984 },
- { longitude: -0.13564, latitude: 51.50987 },
- { longitude: -0.13553, latitude: 51.50989 },
- { longitude: -0.1354, latitude: 51.50993 },
- { longitude: -0.13526, latitude: 51.50997 },
- { longitude: -0.13517, latitude: 51.50999 },
- { longitude: -0.13515, latitude: 51.51 },
- { longitude: -0.13514, latitude: 51.51 },
- { longitude: -0.13513, latitude: 51.51 },
- { longitude: -0.13512, latitude: 51.51 },
- { longitude: -0.1351, latitude: 51.50999 },
- { longitude: -0.13509, latitude: 51.50999 },
- { longitude: -0.13508, latitude: 51.50998 },
- { longitude: -0.13503, latitude: 51.50994 },
- { longitude: -0.13493, latitude: 51.50985 },
+ { longitude: -0.13607, latitude: 51.50996 },
+ { longitude: -0.13601, latitude: 51.50997 },
+ { longitude: -0.13593, latitude: 51.50998 },
+ { longitude: -0.13591, latitude: 51.50998 },
+ { longitude: -0.13576, latitude: 51.51 },
+ { longitude: -0.13564, latitude: 51.51003 },
+ { longitude: -0.13553, latitude: 51.51005 },
+ { longitude: -0.1354, latitude: 51.51007 },
+ { longitude: -0.13526, latitude: 51.51011 },
+ { longitude: -0.13517, latitude: 51.51013 },
+ { longitude: -0.13515, latitude: 51.51014 },
+ { longitude: -0.13514, latitude: 51.51014 },
+ { longitude: -0.13513, latitude: 51.51014 },
+ { longitude: -0.13512, latitude: 51.51014 },
+ { longitude: -0.1351, latitude: 51.51013 },
{ longitude: -0.13483, latitude: 51.50972 },
{ longitude: -0.13476, latitude: 51.50964 },
{ longitude: -0.13465, latitude: 51.50953 },
{ longitude: -0.13438, latitude: 51.50925 },
{ longitude: -0.13433, latitude: 51.50918 },
{ longitude: -0.13381, latitude: 51.50858 },
- { longitude: -0.1334, latitude: 51.5081 },
- { longitude: -0.1334, latitude: 51.50805 },
- { longitude: -0.13339, latitude: 51.50802 },
- { longitude: -0.13334, latitude: 51.50795 },
- { longitude: -0.13329, latitude: 51.50789 },
- { longitude: -0.13324, latitude: 51.50784 },
- { longitude: -0.13314, latitude: 51.50788 },
- { longitude: -0.13301, latitude: 51.50792 },
- { longitude: -0.13274, latitude: 51.50763 },
- { longitude: -0.13269, latitude: 51.50761 },
- { longitude: -0.13267, latitude: 51.5076 },
- { longitude: -0.13265, latitude: 51.50759 },
- { longitude: -0.13253, latitude: 51.50748 },
- { longitude: -0.13243, latitude: 51.50737 },
- { longitude: -0.13239, latitude: 51.50733 },
- { longitude: -0.13234, latitude: 51.50727 },
{ longitude: -0.13228, latitude: 51.50718 },
{ longitude: -0.13182, latitude: 51.50734 },
{ longitude: -0.131, latitude: 51.50764 },
| 2 |
diff --git a/components/Discussion/debug.js b/components/Discussion/debug.js -import mkDebug from 'debug'
+// import mkDebug from 'debug'
-export const debug = mkDebug('discussion')
+export const debug = () => {} // mkDebug('discussion')
/**
* If this is true we render helpful information into the webpage.
| 14 |
diff --git a/src/lib/reducers.test.js b/src/lib/reducers.test.js @@ -17,10 +17,6 @@ describe("goalsReducer", () => {
});
it("should error on no action type", () => {
- try {
- goalsReducer(state, {});
- } catch (e) {
- expect(e).toEqual(new Error("No Action was provided."));
- }
+ expect(goalsReducer.bind(null, state, {})).toThrow(new Error("No Action was provided."));
});
});
| 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.