code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/src/components/Main/PlotAgeAndParams.tsx b/src/components/Main/PlotAgeAndParams.tsx @@ -18,13 +18,14 @@ export default function AgePlot( {data, rates}: SimProps ) {
const ages = Object.keys(params.ageDistribution).map(x => x);
const agesFrac = ages.map(x => params.ageDistribution[x]);
- var probSevere = rates.map((x, i) => x.severe * agesFrac[i]);
+ var probSevere = rates.map((x, i) => x.confirmed / 100 * x.severe / 100 * agesFrac[i]);
var Z = probSevere.reduce((a,b) => a + b, 0);
probSevere = probSevere.map((x) => x / Z);
- var probDeath = rates.map((x, i) => x.fatal * agesFrac[i]);
+ var probDeath = rates.map((x, i) => x.fatal / 100 * agesFrac[i]);
+ probDeath = probDeath.map((x, i) => (x * probSevere[i]));
Z = probDeath.reduce((a,b) => a + b, 0);
- probDeath = probDeath.map((x, i) => (x * probSevere[i]) / Z);
+ probDeath = probDeath.map((x) => x / Z);
const totalDeaths = data.trajectory[data.trajectory.length-1].dead;
const totalSevere = data.trajectory[data.trajectory.length-1].discharged;
| 1 |
diff --git a/webaverse.js b/webaverse.js @@ -573,56 +573,7 @@ const _startHacks = () => {
}
}; */
window.addEventListener('keydown', e => {
- if (e.which === 219) { // [
- if (localPlayer.avatar) {
- (async () => {
- const audioUrl = '/sounds/pissbaby.mp3';
- // const audioUrl2 = '/sounds/music.mp3';
-
- const _loadAudio = u => new Promise((accept, reject) => {
- const audio = new Audio(u);
- audio.addEventListener('canplaythrough', async e => {
- accept(audio);
- }, {once: true});
- audio.addEventListener('error', e => {
- reject(e);
- });
- // audio.play();
- // audioContext.resume();
- });
-
- const audios = await Promise.all([
- _loadAudio(audioUrl),
- // _loadAudio(audioUrl2),
- ]);
- localPlayer.avatar.setAudioEnabled(true);
-
- const _createMediaStreamSource = o => {
- if (o instanceof MediaStream) {
- const audio = document.createElement('audio');
- audio.srcObject = o;
- audio.muted = true;
- }
-
- const audioContext = Avatar.getAudioContext();
- if (o instanceof MediaStream) {
- return audioContext.createMediaStreamSource(o);
- } else {
- return audioContext.createMediaElementSource(o);
- }
- };
- const mediaStreamSource = _createMediaStreamSource(audios[0]);
- mediaStreamSource.connect(localPlayer.avatar.getAudioInput());
-
- audios[0].play();
- // audios[1].play();
- audios[0].addEventListener('ended', e => {
- mediaStreamSource.disconnect();
- localPlayer.avatar.setAudioEnabled(false);
- });
- })();
- }
- } else if (e.which === 46) { // .
+ if (e.which === 46) { // .
emoteIndex = -1;
_updateEmote();
} else if (e.which === 107) { // +
| 2 |
diff --git a/articles/appliance/extensions.md b/articles/appliance/extensions.md @@ -6,7 +6,7 @@ description: Explains implementation details for Extensions specific to the Auth
# Auth0 Appliance: Extensions
-In many ways, using [Extensions](/extensions) in the Appliance requires the same configuration steps as in the Auth0 Cloud. This page covers the differences that exist.
+While using [Extensions](/extensions) in the Appliance is very similar to using Extensions in the multi-tenant installation of Auth0, there are some differences.
## Configure Extensions
@@ -14,6 +14,10 @@ Extensions make use of Webtasks. When you activate a Webtask in the Appliance, y
`webtask.<auth0applianceurl>`
+:::panel-info Enable Webtasks
+To enable Webtasks, go to the [Webtasks Settings page of the Management Dashboard](${manage_url}/#/account/webtasks).
+:::
+
In order for you to configure Extensions, you will need to add this URL to the **Allowed Origins (CORS)** section under the [Auth0 Dashboard's Client Settings page](${manage_url}/#/clients).

| 0 |
diff --git a/environment/core/Halite.cpp b/environment/core/Halite.cpp @@ -573,7 +573,21 @@ auto collision_time(
const auto disc = std::pow(b, 2) - 4 * a * c;
- if (disc == 0) {
+ if (a == 0.0) {
+ if (b == 0.0) {
+ if (c <= 0.0) {
+ // Implies r^2 >= dx^2 + dy^2 and the two are already colliding
+ return { true, 0.0 };
+ }
+ return { false, 0.0 };
+ }
+ const auto t = -c / b;
+ if (t >= 0.0) {
+ return { true, t };
+ }
+ return { false, 0.0 };
+ }
+ else if (disc == 0.0) {
// One solution
const auto t = -b / (2 * a);
return { true, t };
@@ -582,18 +596,18 @@ auto collision_time(
const auto t1 = -b + std::sqrt(disc);
const auto t2 = -b - std::sqrt(disc);
- if (t1 >= 0 && t2 >= 0) {
+ if (t1 >= 0.0 && t2 >= 0.0) {
return { true, std::min(t1, t2) };
}
- else if (t1 < 0 && t2 < 0) {
- return { false, 0 };
+ else if (t1 < 0.0 && t2 < 0.0) {
+ return { false, 0.0 };
}
else {
return { true, std::max(t1, t2) };
}
}
else {
- return { false, 0 };
+ return { false, 0.0 };
}
}
| 9 |
diff --git a/src/Output.js b/src/Output.js @@ -323,8 +323,8 @@ export class Output extends EventEmitter {
* [Manufacturer ID Numbers](https://www.midi.org/specifications-old/item/manufacturer-id-numbers)
* .
*
- * @param [data=number[]] {number[]|Uint8Array} A Uint8Array or an array of unsigned integers
- * between 0 and 127. This is the data you wish to transfer.
+ * @param {number[]|Uint8Array} [data=[]] A Uint8Array or an array of unsigned integers between 0
+ * and 127. This is the data you wish to transfer.
*
* @param {Object} [options={}]
*
@@ -341,7 +341,7 @@ export class Output extends EventEmitter {
*
* @returns {Output} Returns the `Output` object so methods can be chained.
*/
- sendSysex(manufacturer, data, options = {}) {
+ sendSysex(manufacturer, data= [], options = {}) {
manufacturer = [].concat(manufacturer);
| 11 |
diff --git a/docs/introduction/javascript-events-dom-apis.md b/docs/introduction/javascript-events-dom-apis.md @@ -70,7 +70,7 @@ Components encapsulate all of our code to be reusable, declarative, and
shareable. Though if we're just poking around at runtime, we can use our
browser's Developer Tools Console to run JavaScript on our scene.
-[contentscripts]: ./scene.md#running-content-scripts-on-the-scene
+[contentscripts]: ../core/scene.md#running-content-scripts-on-the-scene
Do **not** try to put A-Frame-related JavaScript in a raw `<script>` tag after
`<a-scene>` as we would with traditional 2D scripting. If we do, we'd have to
| 1 |
diff --git a/test/functional/specs/C14407.js b/test/functional/specs/C14407.js import { t, ClientFunction } from "testcafe";
import createNetworkLogger from "../helpers/networkLogger";
-import getResponseBody from "../helpers/networkLogger/getResponseBody";
import fixtureFactory from "../helpers/fixtureFactory";
import cookies from "../helpers/cookies";
import alloyEvent from "../helpers/alloyEvent";
import debugEnabledConfig from "../helpers/constants/debugEnabledConfig";
-import getConsentCookieName from "../helpers/getConsentCookieName";
-import createResponse from "../../../src/core/createResponse";
const networkLogger = createNetworkLogger();
@@ -25,59 +22,44 @@ const setConsentIn = ClientFunction(() => {
return window.alloy("setConsent", { general: "in" });
});
+const triggerAlloyEvent = ClientFunction(() => {
+ return new Promise(resolve => {
+ window.alloy("event", { xdm: { key: "value" } }).then(() => resolve());
+ });
+});
+
test("C14407 - Consenting to all purposes should be persisted.", async () => {
const imsOrgId = "334F60F35E1597910A495EC2@AdobeOrg";
await cookies.clear();
- // await apiCalls(imsOrgId);
+ // configure alloy with default consent set to pending
const configure = await alloyEvent("configure", {
+ configId: "9999999",
+ orgId: imsOrgId,
+ defaultConsent: { general: "pending" },
idMigrationEnabled: false,
...debugEnabledConfig
});
await configure.promise;
- // send alloy event
- const event1 = await alloyEvent({
- viewStart: true
- });
-
- // apply user consent
+ // set consent to in
await setConsentIn();
- await event1.promise;
-
- const cookieName = getConsentCookieName(imsOrgId);
+ // reload the page and reconfigure alloy after page reload
+ await t.eval(() => document.location.reload());
- const consentCheck = await cookies.get(cookieName);
-
- await t.expect(consentCheck).eql("general=in");
-
- // test konductor response
- await t.expect(networkLogger.edgeEndpointLogs.requests.length).eql(1);
- await t
- .expect(networkLogger.edgeEndpointLogs.requests[0].response.statusCode)
- .eql(200);
-
- const request = JSON.parse(
- getResponseBody(networkLogger.edgeEndpointLogs.requests[0])
- );
-
- // read state:store handles from response (i.e. 'set a cookie')
- await t.expect("handle" in request).ok();
- await t.expect(request.handle.length).gt(0);
+ const reconfigure = await alloyEvent("configure", {
+ configId: "9999999",
+ orgId: imsOrgId,
+ debugEnabled: true,
+ idMigrationEnabled: false
+ });
- const storePayloads = createResponse(request).getPayloadsByType(
- "state:store"
- );
- const cookiesToSet = storePayloads.reduce((memo, storePayload) => {
- memo[storePayload.key] = storePayload;
- return memo;
- }, {});
+ await reconfigure.promise;
- // expect that konductor cookie handle matches cookie name
- await t.expect(cookieName in cookiesToSet).ok();
+ await triggerAlloyEvent();
- await t.expect("maxAge" in cookiesToSet[cookieName]).ok();
- await t.expect(cookiesToSet[cookieName].maxAge).eql(15552000);
+ await t.eval(() => window.alloy("setConsent", { general: "in" }));
+ await t.eval(() => window.alloy("event", { data: { key: "value" } }));
});
| 3 |
diff --git a/tests/2_alerting.js b/tests/2_alerting.js @@ -35,7 +35,7 @@ var chaiSubset = require('chai-subset');
chai.use(chaiSubset);
var expect = chai.expect;
-let asyncTimeout = 2000000;
+let asyncTimeout = 20000;
global.EXTERNAL_VERSION_FOR_TEST = "0.0.1";
global.EXTERNAL_CONFIG_FILE = "tests/config.test.yml";
| 12 |
diff --git a/packages/gatsby-source-shopify/src/gatsby-node.ts b/packages/gatsby-source-shopify/src/gatsby-node.ts @@ -43,7 +43,7 @@ export function pluginOptionsSchema({
.default([])
.items(Joi.string().valid(`orders`, `collections`)),
salesChannel: Joi.string().default(
- process.env.GATSBY_SHOPIFY_SALES_CHANNEL
+ process.env.GATSBY_SHOPIFY_SALES_CHANNEL || ``
),
})
}
| 12 |
diff --git a/src/og/input/KeyboardHandler.js b/src/og/input/KeyboardHandler.js @@ -20,8 +20,8 @@ const KeyboardHandler = function () {
} else {
KeyboardHandler.prototype._instance = this;
- document.onkeydown = function (event) { _event = event; _active && _that.handleKeyDown.call(_that) };
- document.onkeyup = function (event) { _event = event; _active && _that.handleKeyUp.call(_that) };
+ document.onkeydown = function (event) { event.preventDefault(); _event = event; _active && _that.handleKeyDown.call(_that) };
+ document.onkeyup = function (event) { event.preventDefault(); _event = event; _active && _that.handleKeyUp.call(_that) };
}
var _sortByPriority = function (a, b) {
| 0 |
diff --git a/token-metadata/0x554FFc77F4251a9fB3c0E3590a6a205f8d4e067D/metadata.json b/token-metadata/0x554FFc77F4251a9fB3c0E3590a6a205f8d4e067D/metadata.json "symbol": "ZMN",
"address": "0x554FFc77F4251a9fB3c0E3590a6a205f8d4e067D",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/resources/views/crud/fields/repeatable.blade.php b/src/resources/views/crud/fields/repeatable.blade.php if (values != null) {
// set the value on field inputs, based on the JSON in the hidden input
new_field_group.find('input, select, textarea').each(function () {
- if ($(this).data('repeatable-input-name')) {
+ if ($(this).data('repeatable-input-name') && values.hasOwnProperty($(this).data('repeatable-input-name'))) {
// if the field provides a `data-value-prefix` attribute, we should respect that and add that prefix to the value.
// this is different than using prefix in fields like text, number etc. In those cases the prefix is used
| 9 |
diff --git a/generators/database-changelog-liquibase/index.js b/generators/database-changelog-liquibase/index.js @@ -233,32 +233,18 @@ module.exports = class extends BaseGenerator {
_loadColumnType(entity, field) {
const columnType = field.columnType;
- if (
- columnType === 'integer' ||
- columnType === 'bigint' ||
- columnType === 'double' ||
- columnType === 'decimal(21,2)' ||
// eslint-disable-next-line no-template-curly-in-string
- columnType === '${floatType}'
- ) {
+ if (['integer', 'bigint', 'double', 'decimal(21,2)', '${floatType}'].includes(columnType)) {
return 'numeric';
}
- if (columnType === 'date') {
- return 'date';
+ if (field.fieldIsEnum) {
+ return 'string';
}
// eslint-disable-next-line no-template-curly-in-string
- if (columnType === '${datetimeType}') {
- return 'datetime';
- }
-
- if (columnType === 'boolean') {
- return 'boolean';
- }
-
- if (field.fieldIsEnum) {
- return 'string';
+ if (['date', '${datetimeType}', 'boolean'].includes(columnType)) {
+ return columnType;
}
if (columnType === 'blob' || columnType === 'longblob') {
| 7 |
diff --git a/node-red-viseo-storage-plugin/projects/Project.js b/node-red-viseo-storage-plugin/projects/Project.js @@ -59,7 +59,7 @@ function getGitUser(user) {
function Project(path) {
this.flowPath = path;
- this.packageDir = settings.packageDir || '';
+ this.packageDir = settings.editorTheme.projects.packageDir || '';
this.path = path;
this.name = fspath.basename(path);
this.paths = {};
@@ -101,6 +101,7 @@ Project.prototype.load = function () {
project.paths.credentialsFile = getCredentialsFilename(project.paths.flowFile);
} else {
project.paths.credentialsFile = project.package['node-red'].settings.credentialsFile;
+ project.paths.credentialsFile = project.paths.credentialsFile.replace("<env>", process.env.NODE_ENV);
}
}
@@ -355,7 +356,7 @@ Project.prototype.update = function (user, data) {
}
if (data.files.hasOwnProperty('credentials') && this.package['node-red'].settings.credentialsFile !== data.files.credentials) {
this.paths.credentialsFile = data.files.credentials;
- this.package['node-red'].settings.credentialsFile = data.files.credentials;
+ this.package['node-red'].settings.credentialsFile = data.files.credentials.replace(process.env.NODE_ENV, "<env>");
// Don't know if the credSecret is invalid or not so clear the flag
delete this.credentialSecretInvalid;
@@ -876,7 +877,7 @@ function createDefaultFromZip(user, project, url) {
return when.all(promises).then(function() {
- return fs.readFile(fspath.join(projectPath, settings.packageDir, 'package.json'),"utf8").then(function(content) {
+ return fs.readFile(fspath.join(projectPath, settings.editorTheme.projects.packageDir, 'package.json'),"utf8").then(function(content) {
try {
project.package = util.parseJSON(content);
if (project.package.hasOwnProperty('node-red')) {
@@ -917,8 +918,8 @@ function createDefaultProject(user, project) {
if (defaultFileSet.hasOwnProperty(file)) {
var dir = projectPath
if(file === "package.json") {
- dir = fspath.join(dir , settings.packageDir || '')
- files.push(fspath.join(settings.packageDir || '', "package.json"))
+ dir = fspath.join(dir , settings.editorTheme.projects.packageDir || '')
+ files.push(fspath.join(settings.editorTheme.projects.packageDir || '', "package.json"))
} else {
files.push(file);
}
| 12 |
diff --git a/lib/keyboard_utils.coffee b/lib/keyboard_utils.coffee @@ -23,7 +23,6 @@ KeyboardUtils =
key = event.code
# Strip some standard prefixes.
key = key[3..] if key[...3] == "Key"
- key = key[5..] if key[...5] == "Digit"
key = key[6..] if key[...6] == "Numpad"
# Translate some special keys to event.key-like strings.
if @enUsTranslations[key]
@@ -83,6 +82,16 @@ KeyboardUtils =
"Period": [".", ">"]
"Slash": ["/", "?"]
"Space": [" ", " "]
+ "Digit1": ["1", "!"]
+ "Digit2": ["2", "@"]
+ "Digit3": ["3", "#"]
+ "Digit4": ["4", "$"]
+ "Digit5": ["5", "%"]
+ "Digit6": ["6", "^"]
+ "Digit7": ["7", "&"]
+ "Digit8": ["8", "*"]
+ "Digit9": ["9", "("]
+ "Digit0": ["0", ")"]
KeyboardUtils.init()
| 9 |
diff --git a/src/traces/funnel/plot.js b/src/traces/funnel/plot.js @@ -89,8 +89,6 @@ function plotConnectorLines(gd, plotinfo, cdModule, traceLayer) {
var isHorizontal = (trace.orientation === 'h');
- if(!plotinfo.isRangePlot) cd0.node3 = plotGroup;
-
var connectors = group.selectAll('g.line').data(Lib.identity);
connectors.enter().append('g')
| 2 |
diff --git a/tests/test_IssuanceController.py b/tests/test_IssuanceController.py @@ -31,10 +31,6 @@ class TestIssuanceController(HavvenTestCase):
@classmethod
def deployContracts(cls):
sources = [
- "contracts/Owned.sol",
- "contracts/SelfDestructible.sol",
- "contracts/Pausable.sol",
- "contracts/SafeDecimalMath.sol",
"contracts/Havven.sol",
"contracts/Nomin.sol",
"contracts/IssuanceController.sol",
| 2 |
diff --git a/templates/winter.svelte b/templates/winter.svelte </script>
<style>
+ :global(html) {
+ height: 100%;
+ }
+
+ :global(body) {
+ min-height: 100%;
+ }
+
.sidenav {
padding: 1rem 0 1rem 0.75rem;
}
}
.body-inner {
+ min-height: 100vh;
background-color: #fafafa;
}
| 12 |
diff --git a/packages/saltcorn-markup/helpers.js b/packages/saltcorn-markup/helpers.js @@ -65,14 +65,16 @@ const pagination = ({
const search_bar = (
name,
v,
- { placeHolder, has_dropdown, contents, badges, stateField } = {}
+ { placeHolder, has_dropdown, contents, badges, stateField, onClick } = {}
) => {
const rndid = Math.floor(Math.random() * 16777215).toString(16);
- const onClick = `(function(v){v ? set_state_field('${stateField}', v):unset_state_field('${stateField}');})($('input.search-bar').val())`;
+ const clickHandler = stateField
+ ? `(function(v){v ? set_state_field('${stateField}', v):unset_state_field('${stateField}');})($('input.search-bar').val())`
+ : (onClick || "");
return `<div class="input-group search-bar">
<div class="input-group-prepend">
<button class="btn btn-outline-secondary search-bar" ${
- stateField ? `onClick="${onClick}"` : ""
+ clickHandler ? `onClick="${clickHandler}"` : ""
} type="submit" id="button-search-submit">
<i class="fas fa-search"></i>
</button>
@@ -83,7 +85,11 @@ const search_bar = (
}"
}"
id="input${text_attr(name)}" name="${name}"
- ${stateField ? `onsearch="${onClick}" onChange="${onClick}"` : ""}
+ ${
+ clickHandler
+ ? `onsearch="${clickHandler}" onChange="${clickHandler}"`
+ : ""
+ }
aria-label="Search" aria-describedby="button-search-submit" ${
v ? `value="${text_attr(v)}"` : ""
}>
| 11 |
diff --git a/package.json b/package.json "lint": "eslint --ignore-path .gitignore .",
"test:unit": "jest -c test/lib/unit.config.js",
"test:e2e": "jest -c test/lib/integration.config.js --testRegex 'e2e.js' --runInBand",
- "test:current": "jest test-results.e2e.js -c test/lib/integration.config.js --testRegex 'e2e.js'",
- "test:unit:update_snapshot": "jest -c test/lib/unit.config.js --updateSnapshot",
"postinstall": "electron-builder install-app-deps",
"storybook": "start-storybook -p 6006"
},
| 2 |
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js @@ -148,6 +148,20 @@ RED.editor.codeEditor.monaco = (function() {
function init(options) {
+
+ //Handles "Uncaught (in promise) Canceled: Canceled"
+ //@see https://github.com/microsoft/monaco-editor/issues/2382
+ //This is fixed in commit microsoft/vscode@49cad9a however it is not yet present monaco-editor
+ //Remove the below addEventListener once monaco-editor V0.23.1 or greater is published
+ window.addEventListener('unhandledrejection', (evt) => {
+ if(evt && evt.reason && evt.reason.stack) {
+ if (evt.reason.name === 'Canceled' && evt.reason.stack.indexOf('vendor/monaco/dist') >= 0) {
+ evt.preventDefault();
+ evt.stopImmediatePropagation();
+ }
+ }
+ });
+
options = options || {};
window.MonacoEnvironment = window.MonacoEnvironment || {};
window.MonacoEnvironment.getWorkerUrl = function (moduleId, label) {
| 9 |
diff --git a/articles/protocols/saml/saml-apps/index.md b/articles/protocols/saml/saml-apps/index.md @@ -16,17 +16,17 @@ classes: topic-page
## SAML Configuration Tutorials
<%= include('../../../_includes/_topic-links', { links: [
- '/protocols/saml/saml-apps/cisco-webex',
- '/protocols/saml/saml-apps/datadog',
- '/protocols/saml/saml-apps/egencia',
- '/protocols/saml/saml-apps/eloqua',
- '/protocols/saml/saml-apps/freshdesk',
- '/protocols/saml/saml-apps/google-apps',
- '/protocols/saml/saml-apps/heroku',
- '/protocols/saml/saml-apps/hosted-graphite',
- '/protocols/saml/saml-apps/litmos',
- '/protocols/saml/saml-apps/pluralsight',
- '/protocols/saml/saml-apps/sprout-video',
- '/protocols/saml/saml-apps/tableau-server',
- '/protocols/saml/saml-apps/workday'
+ 'protocols/saml/saml-apps/cisco-webex',
+ 'protocols/saml/saml-apps/datadog',
+ 'protocols/saml/saml-apps/egencia',
+ 'protocols/saml/saml-apps/eloqua',
+ 'protocols/saml/saml-apps/freshdesk',
+ 'protocols/saml/saml-apps/google-apps',
+ 'protocols/saml/saml-apps/heroku',
+ 'protocols/saml/saml-apps/hosted-graphite',
+ 'protocols/saml/saml-apps/litmos',
+ 'protocols/saml/saml-apps/pluralsight',
+ 'protocols/saml/saml-apps/sprout-video',
+ 'protocols/saml/saml-apps/tableau-server',
+ 'protocols/saml/saml-apps/workday'
] }) %>
| 2 |
diff --git a/server/game/cards/02.1-TtB/BastardDaughter.js b/server/game/cards/02.1-TtB/BastardDaughter.js @@ -4,10 +4,7 @@ class BastardDaughter extends DrawCard {
setupCardAbilities() {
this.interrupt({
when: {
- onCharacterKilled: event => (
- this.controller === event.card.controller &&
- (event.card === this || event.card.name === 'The Red Viper')
- )
+ onCharacterKilled: event => event.card === this || event.card.name === 'The Red Viper'
},
handler: () => {
this.game.addMessage('{0} uses {1} to discard 1 card at random from each opponent\'s hand', this.controller, this);
| 11 |
diff --git a/nodejs/lib/util/http.ts b/nodejs/lib/util/http.ts @@ -94,14 +94,14 @@ const Http: typeof IHttp = class {
if(currentFallback) {
if(currentFallback.validUntil > Date.now()) {
/* Use stored fallback */
- Http.doUri(method, rest, uriFromHost(currentFallback.host), headers, body, params, (err?: ErrnoException | ErrorInfo | null) => {
+ Http.doUri(method, rest, uriFromHost(currentFallback.host), headers, body, params, (err?: ErrnoException | ErrorInfo | null, ...args: unknown[]) => {
if(err && shouldFallback(err as ErrnoException)) {
/* unstore the fallback and start from the top with the default sequence */
rest._currentFallback = null;
Http.do(method, rest, path, headers, body, params, callback);
return;
}
- callback(err);
+ callback(err, ...args);
});
return;
} else {
@@ -120,7 +120,7 @@ const Http: typeof IHttp = class {
const tryAHost = (candidateHosts: Array<string>, persistOnSuccess?: boolean) => {
const host = candidateHosts.shift();
- Http.doUri(method, rest, uriFromHost(host as string), headers, body, params, function(err?: ErrnoException | ErrorInfo | null) {
+ Http.doUri(method, rest, uriFromHost(host as string), headers, body, params, function(err?: ErrnoException | ErrorInfo | null, ...args: unknown[]) {
if(err && shouldFallback(err as ErrnoException) && candidateHosts.length) {
tryAHost(candidateHosts, true);
return;
@@ -132,7 +132,7 @@ const Http: typeof IHttp = class {
validUntil: Date.now() + rest.options.timeouts.fallbackRetryTimeout
};
}
- callback(err)
+ callback(err, ...args);
});
};
tryAHost(hosts);
| 1 |
diff --git a/voicer.js b/voicer.js +import Avatar from './avatars/avatars.js';
+
function weightedRandom(weights) {
var totalWeight = 0,
i, random;
@@ -20,7 +22,7 @@ function weightedRandom(weights) {
}
class Voicer {
- constructor(audios) {
+ constructor(audios, player) {
this.voices = audios.map(audio => {
return {
audio,
@@ -28,6 +30,7 @@ class Voicer {
};
});
this.nonce = 0;
+ this.player = player;
this.timeout = null;
}
@@ -47,19 +50,33 @@ class Voicer {
}
return voiceSpec.audio;
}
- start() {
+ async start() {
clearTimeout(this.timeout);
+ await this.player.avatar.setAudioEnabled(true);
+
const _recurse = async () => {
const audio = this.selectVoice();
+ // console.log('connect', audio);
+
+ const audioContext = Avatar.getAudioContext();
+ const audioBufferSourceNode = audioContext.createBufferSource();
+ audioBufferSourceNode.buffer = audio;
+ /* audioBufferSourceNode.addEventListener('ended', () => {
+ audioBufferSourceNode.disconnect();
+ }, {once: true}); */
+
+ audioBufferSourceNode.connect(this.player.avatar.getAudioInput());
+ audioBufferSourceNode.start();
+ // console.log('got audio', audio, audio.audioBuffer);
// const audio = syllableSoundFiles[Math.floor(Math.random() * syllableSoundFiles.length)];
/* if (audio.silencingInterval) {
clearInterval(audio.silencingInterval);
audio.silencingInterval = null;
} */
- audio.currentTime = 0;
+ /* audio.currentTime = 0;
audio.volume = 1;
- audio.paused && audio.play().catch(err => {});
+ audio.paused && audio.play().catch(err => {}); */
let audioTimeout = audio.duration * 1000;
audioTimeout *= 0.8 + 0.4 * Math.random();
this.timeout = setTimeout(async () => {
| 0 |
diff --git a/data.js b/data.js @@ -1139,6 +1139,14 @@ module.exports = [{
url: "http://agnostic.github.io/LocalDB.js",
source: "https://raw.githubusercontent.com/Agnostic/LocalDB.js/master/src/LocalDB.js"
},
+ {
+ name: "mess-js",
+ github: "graciano/mess",
+ tags: ["message", "toast", "toasts", "android", "dialog", "info"],
+ description: "mess - Messages Extremely Simple Script: dialog 'android toast' like messages.",
+ url: "https://github.com/graciano/mess",
+ source: "https://raw.githubusercontent.com/graciano/mess/gh-pages/src/mess.js"
+ },
{
name: "Countable",
github: "RadLikeWhoa/Countable",
| 0 |
diff --git a/layouts/_default/single.html b/layouts/_default/single.html footer fragment, the local one is rendered.
*/}}
{{ $global := .Site.GetPage "page" "global" }}
- {{ $global_fragments := $global.Resources.ByType "page" }}
+ {{ $.Scratch.Delete "global_fragments" }}
+ {{ if $global }}
+ {{ $.Scratch.Set "global_fragments" ($global.Resources.ByType "page") }}
+ {{ end }}
{{ $local_fragments := .Resources.ByType "page" }}
{{ $.Scratch.Delete "fragments" }}
{{ range $local_fragments }}
{{ $.Scratch.Add "fragments" (slice .) }}
{{ end }}
- {{ range $global_fragments }}
+ {{ if and ($.Scratch.Get "global_fragments") ($.Scratch.Get "fragments") }}
+ {{ range ($.Scratch.Get "global_fragments") }}
{{ if not (where ($.Scratch.Get "fragments") ".Name" .Name) }}
{{ $.Scratch.Add "fragments" (slice .) }}
{{ end }}
{{ end }}
+ {{ end }}
- {{ range sort ($.Scratch.Get "fragments") "Params.weight" }}
+ {{ range sort ($.Scratch.Get "fragments" | default slice) "Params.weight" }}
{{ if and (not .Params.disabled) (isset .Params "fragment") (not (eq .Params.fragment "hero")) }}
{{ partial (print "fragments/" .Params.fragment ".html") (dict "menus" $.Site.Menus "Site" $.Site "resources" $.Resources "self" .) }}
{{ end }}
| 0 |
diff --git a/src/components/Card/Card.styles.js b/src/components/Card/Card.styles.js @@ -8,6 +8,7 @@ import type { ComponentType } from 'react';
export const HalfCard: ComponentType<*> =
styled
.div`
+ display: grid;
flex: 1 1 43%;
padding: 20px 20px 0 20px;
border: 1px #f3f2f1 solid;
@@ -78,6 +79,7 @@ export const HalfCardSplitBody: ComponentType<*> =
export const FullCard: ComponentType<*> =
styled
.article`
+ display: grid;
flex: 1 0 60%;
padding: 20px 20px 0 20px;
border: 1px #f3f2f1 solid;
@@ -159,6 +161,7 @@ export const ShareRow: ComponentType<*> =
styled
.div`
display: grid;
+ align-self: end;
grid-auto-flow: column;
justify-content: start;
grid-column-gap: 1px;
| 7 |
diff --git a/js/keybindings.js b/js/keybindings.js @@ -113,20 +113,36 @@ ipc.on('goForward', function () {
} catch (e) { }
})
+function defineShortcut (keyMapName, fn) {
+ Mousetrap.bind(keyMap[keyMapName], function (e, combo) {
+ // mod+left and mod+right are also text editing shortcuts, so they should not run when an input field is focused
+ if (combo === 'mod+left' || combo === 'mod+right') {
+ getWebview(tabs.getSelected()).executeJavaScript('document.activeElement.tagName === "INPUT" || document.activeElement.tagName === "TEXTAREA"', function (isInputFocused) {
+ if (isInputFocused === false) {
+ fn(e, combo)
+ }
+ })
+ } else {
+ // other shortcuts can run immediately
+ fn(e, combo)
+ }
+ })
+}
+
settings.get('keyMap', function (keyMapSettings) {
keyMap = userKeyMap(keyMapSettings)
var Mousetrap = require('mousetrap')
window.Mousetrap = Mousetrap
- Mousetrap.bind(keyMap.addPrivateTab, addPrivateTab)
+ defineShortcut('addPrivateTab', addPrivateTab)
- Mousetrap.bind(keyMap.enterEditMode, function (e) {
+ defineShortcut('enterEditMode', function (e) {
enterEditMode(tabs.getSelected())
return false
})
- Mousetrap.bind(keyMap.closeTab, function (e) {
+ defineShortcut('closeTab', function (e) {
// prevent mod+w from closing the window
e.preventDefault()
e.stopImmediatePropagation()
@@ -136,7 +152,7 @@ settings.get('keyMap', function (keyMapSettings) {
return false
})
- Mousetrap.bind(keyMap.addToFavorites, function (e) {
+ defineShortcut('addToFavorites', function (e) {
bookmarks.handleStarClick(getTabElement(tabs.getSelected()).querySelector('.bookmarks-button'))
enterEditMode(tabs.getSelected()) // we need to show the bookmarks button, which is only visible in edit mode
})
@@ -163,11 +179,11 @@ settings.get('keyMap', function (keyMapSettings) {
})(i)
}
- Mousetrap.bind(keyMap.gotoLastTab, function (e) {
+ defineShortcut('gotoLastTab', function (e) {
switchToTab(tabs.getAtIndex(tabs.count() - 1).id)
})
- Mousetrap.bind(keyMap.gotoFirstTab, function (e) {
+ defineShortcut('gotoFirstTab', function (e) {
switchToTab(tabs.getAtIndex(0).id)
})
@@ -178,7 +194,7 @@ settings.get('keyMap', function (keyMapSettings) {
getWebview(tabs.getSelected()).focus()
})
- Mousetrap.bind(keyMap.toggleReaderView, function () {
+ defineShortcut('toggleReaderView', function () {
var tab = tabs.get(tabs.getSelected())
if (tab.isReaderView) {
@@ -190,15 +206,15 @@ settings.get('keyMap', function (keyMapSettings) {
// TODO add help docs for this
- Mousetrap.bind(keyMap.goBack, function (d) {
+ defineShortcut('goBack', function (d) {
getWebview(tabs.getSelected()).goBack()
})
- Mousetrap.bind(keyMap.goForward, function (d) {
+ defineShortcut('goForward', function (d) {
getWebview(tabs.getSelected()).goForward()
})
- Mousetrap.bind(keyMap.switchToPreviousTab, function (d) {
+ defineShortcut('switchToPreviousTab', function (d) {
var currentIndex = tabs.getIndex(tabs.getSelected())
var previousTab = tabs.getAtIndex(currentIndex - 1)
@@ -209,7 +225,7 @@ settings.get('keyMap', function (keyMapSettings) {
}
})
- Mousetrap.bind(keyMap.switchToNextTab, function (d) {
+ defineShortcut('switchToNextTab', function (d) {
var currentIndex = tabs.getIndex(tabs.getSelected())
var nextTab = tabs.getAtIndex(currentIndex + 1)
@@ -220,7 +236,7 @@ settings.get('keyMap', function (keyMapSettings) {
}
})
- Mousetrap.bind(keyMap.closeAllTabs, function (d) { // destroys all current tabs, and creates a new, empty tab. Kind of like creating a new window, except the old window disappears.
+ defineShortcut('closeAllTabs', function (d) { // destroys all current tabs, and creates a new, empty tab. Kind of like creating a new window, except the old window disappears.
var tset = tabs.get()
for (var i = 0; i < tset.length; i++) {
destroyTab(tset[i].id)
@@ -229,7 +245,7 @@ settings.get('keyMap', function (keyMapSettings) {
addTab() // create a new, blank tab
})
- Mousetrap.bind(keyMap.toggleTasks, function () {
+ defineShortcut('toggleTasks', function () {
if (taskOverlay.isShown) {
taskOverlay.hide()
} else {
@@ -239,7 +255,7 @@ settings.get('keyMap', function (keyMapSettings) {
var lastReload = 0
- Mousetrap.bind(keyMap.reload, function () {
+ defineShortcut('reload', function () {
var time = Date.now()
// pressing mod+r twice in a row reloads the whole browser
@@ -257,7 +273,7 @@ settings.get('keyMap', function (keyMapSettings) {
})
// mod+enter navigates to searchbar URL + ".com"
- Mousetrap.bind(keyMap.completeSearchbar, function () {
+ defineShortcut('completeSearchbar', function () {
if (currentSearchbarInput) { // if the searchbar is open
var value = currentSearchbarInput.value
@@ -272,7 +288,7 @@ settings.get('keyMap', function (keyMapSettings) {
}
})
- Mousetrap.bind(keyMap.showAndHideMenuBar, function () {
+ defineShortcut('showAndHideMenuBar', function () {
toggleMenuBar()
})
}) // end settings.get
| 8 |
diff --git a/extras/build/utils/index.js b/extras/build/utils/index.js @@ -118,6 +118,19 @@ const decoders = {
}
}
+function getAttributesAsStyle (el) {
+ const exceptions = ['d', 'style', 'width', 'height', 'rx', 'ry', 'r', 'x', 'y', 'x1', 'y1', 'x2', 'y2', 'cx', 'cy', 'points', 'class', 'xmlns', 'viewBox', 'id', 'name', 'transform', 'data-name']
+ let styleString = ''
+ for(let i = 0; i < el.attributes.length; ++i) {
+ const attr = el.attributes[i]
+ if (exceptions.includes(attr.nodeName) !== true) {
+ if (attr.nodeName === 'fill' && attr.nodeValue === 'currentColor') continue
+ styleString += `${attr.nodeName}:${attr.nodeValue};`
+ }
+ }
+ return styleString
+}
+
function parseDom (el, pathsDefinitions) {
const type = el.nodeName
@@ -135,7 +148,7 @@ function parseDom (el, pathsDefinitions) {
const paths = {
path: decoders[type](el),
- style: el.getAttribute('style'),
+ style: el.getAttribute('style') || getAttributesAsStyle(el),
transform: el.getAttribute('transform')
}
| 1 |
diff --git a/edit.js b/edit.js @@ -1015,6 +1015,7 @@ const [
marchingCubes: methodIndex++,
bakeGeometry: methodIndex++,
chunk: methodIndex++,
+ releaseUpdate: methodIndex++,
};
let messageIndex = 0;
const MESSAGES = {
@@ -1169,7 +1170,11 @@ const [
indicesCount,
skyLightsCount,
torchLightsCount,
- })
+ });
+ }
+ {
+ const subparcelSharedPtr = callStack.ou32[offset++];
+ w.requestReleaseUpdate(subparcelSharedPtr);
}
},
};
@@ -1820,6 +1825,13 @@ const [
}
return [landCullResults, vegetationCullResults];
};
+ w.requestReleaseUpdate = subparcelSharedPtr => new Promise((accept, reject) => {
+ callStack.allocRequest(METHODS.releaseUpdate, 1, offset => {
+ callStack.u32[offset] = subparcelSharedPtr;
+ }, offset => {
+ accept();
+ });
+ });
w.update = () => {
if (moduleInstance) {
if (currentChunkMesh) {
| 0 |
diff --git a/src/core/viewports/viewport.js b/src/core/viewports/viewport.js @@ -132,16 +132,13 @@ export default class Viewport {
this.meterOffset = modelMatrix ? modelMatrix.transformVector(position) : position;
}
+ this.viewMatrixUncentered = viewMatrix;
+
+ if (this.isGeospatial) {
// Determine camera center
- this.center = this.isGeospatial ?
- getMercatorWorldPosition({
+ this.center = getMercatorWorldPosition({
longitude, latitude, zoom: this.zoom, meterOffset: this.meterOffset
- }) :
- position;
-
- // console.log(this.scale, this.distanceScales.pixelsPerMeter);
-
- this.viewMatrixUncentered = viewMatrix;
+ });
// Make a centered version of the matrix for projection modes without an offset
this.viewMatrix = new Matrix4()
@@ -152,6 +149,10 @@ export default class Viewport {
.scale([1, -1, 1])
// And center it
.translate(new Vector3(this.center || ZERO_VECTOR).negate());
+ } else {
+ this.center = position;
+ this.viewMatrix = viewMatrix;
+ }
// Create a projection matrix if not supplied
if (projectionMatrix) {
| 2 |
diff --git a/token-metadata/0x37E808F084101F75783612407e7C3f5F92d8ee3F/metadata.json b/token-metadata/0x37E808F084101F75783612407e7C3f5F92d8ee3F/metadata.json "symbol": "RI",
"address": "0x37E808F084101F75783612407e7C3f5F92d8ee3F",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/README.md b/README.md @@ -22,18 +22,18 @@ Installation
## Prerequisites
-- Python. Kotlinlang is [Flask](http://flask.pocoo.org/)-based site, so you'll need python 3 to get it working.
-- ruby + [kramdown](http://kramdown.gettalong.org/installation.html). Python has a very poor support for markdown, so kramdown is used as markdown to html converter
+- Python 3. Kotlinlang is a [Flask](http://flask.pocoo.org/)-based site, so you'll need Python 3 to get it working.
+- Ruby + [kramdown](http://kramdown.gettalong.org/installation.html). Python has very poor support for Markdown, so kramdown is used as the Markdown-to-HTML converter.
- [nodejs](https://nodejs.org/en/) + npm to build frontend assets
## Installation
After installation of required tools run `npm i` to download all frontend dependencies and `pip install -r requirements.txt` to download backend dependencies.
-Working with site
-=================
+Working with this site
+======================
-## Run site
+## Running this site
- Use `npm run build` command to build assets. If you are going to modify js/scss files use `npm start` instead.
- To run site use `python kotlin-website.py` command
@@ -51,7 +51,7 @@ All data is stored in the \*.yml files in folder `_data`:
## Templates
Kotlinlang uses [Jinja2](http://jinja.pocoo.org/docs/dev/) templates that can be found in templates folder.
-Note, that before converting to html all markdown files are processed as jinja templates. This allows you to use all jinja power inside markdown (for example, build urls with url_for function)
+Note that all Markdown files are processed as Jinja templates before being converted to HTML. This allows you to use all Jinja power inside Markdown (for example, build urls with url_for function).
## Page metadata
@@ -66,12 +66,12 @@ The Kotlin grammar reference (grammar.xml) is generated by the [Kotlin grammar g
### Markup
-Kramdown with some additions (like GitHub fenced code blocks) is used as markdown parser.
-See the complete syntax reference at [Kramdown site](http://kramdown.gettalong.org/syntax.html).
+kramdown with some additions (like GitHub fenced code blocks) is used as Markdown parser.
+See the complete syntax reference at the [kramdown site](http://kramdown.gettalong.org/syntax.html).
### Specifying page element attributes
-With Kramdown you can assign HTML attributes to page elements via `{:%param%}`. E.g.:
+With kramdown you can assign HTML attributes to page elements via `{:%param%}`. E.g.:
- `*important text*{:.important}` - produces `<em class="important">important text</em>`
- `*important text*{:#id}` - produces `<em id="id">important text</em>`
| 7 |
diff --git a/src/components/colorbar/draw.js b/src/components/colorbar/draw.js @@ -224,15 +224,15 @@ function drawColorBar(g, opts, gd) {
var uFrac = optsX - thickFrac * ({center: 0.5, right: 1}[xanchor] || 0);
// y positioning we can do correctly from the start
- var yBottomFrac = optsY + lenFrac * (({top: -0.5, bottom: 0.5}[yanchor] || 0) - 0.5);
- var yBottomPx = Math.round(gs.h * (1 - yBottomFrac));
- var yTopPx = yBottomPx - lenPx;
+ var vFrac = optsY + lenFrac * (({top: -0.5, bottom: 0.5}[yanchor] || 0) - 0.5);
+ var vPx = Math.round(gs.h * (1 - vFrac));
+ var yTopPx = vPx - lenPx;
// stash a few things for makeEditable
opts._lenFrac = lenFrac;
opts._thickFrac = thickFrac;
opts._uFrac = uFrac;
- opts._yBottomFrac = yBottomFrac;
+ opts._vFrac = vFrac;
// stash mocked axis for contour label formatting
var ax = opts._axis = mockColorBarAxis(gd, opts, zrange);
@@ -244,7 +244,7 @@ function drawColorBar(g, opts, gd) {
if(['top', 'bottom'].indexOf(titleSide) !== -1) {
ax.title.side = titleSide;
ax.titlex = optsX + xpadFrac;
- ax.titley = yBottomFrac + (title.side === 'top' ? lenFrac - ypadFrac : ypadFrac);
+ ax.titley = vFrac + (title.side === 'top' ? lenFrac - ypadFrac : ypadFrac);
}
if(line.color && opts.tickmode === 'auto') {
@@ -252,7 +252,7 @@ function drawColorBar(g, opts, gd) {
ax.tick0 = levelsIn.start;
var dtick = levelsIn.size;
// expand if too many contours, so we don't get too many ticks
- var autoNtick = Lib.constrain((yBottomPx - yTopPx) / 50, 4, 15) + 1;
+ var autoNtick = Lib.constrain((vPx - yTopPx) / 50, 4, 15) + 1;
var dtFactor = (zrange[1] - zrange[0]) / ((opts.nticks || autoNtick) * dtick);
if(dtFactor > 1) {
var dtexp = Math.pow(10, Math.floor(Math.log(dtFactor) / Math.LN10));
@@ -270,8 +270,8 @@ function drawColorBar(g, opts, gd) {
// set domain after init, because we may want to
// allow it outside [0,1]
ax.domain = [
- yBottomFrac + ypadFrac,
- yBottomFrac + lenFrac - ypadFrac
+ vFrac + ypadFrac,
+ vFrac + lenFrac - ypadFrac
];
ax.setScale();
@@ -317,10 +317,10 @@ function drawColorBar(g, opts, gd) {
var y;
if(titleSide === 'top') {
- y = (1 - (yBottomFrac + lenFrac - ypadFrac)) * gs.h +
+ y = (1 - (vFrac + lenFrac - ypadFrac)) * gs.h +
gs.t + 3 + fontSize * 0.75;
} else {
- y = (1 - (yBottomFrac + ypadFrac)) * gs.h +
+ y = (1 - (vFrac + ypadFrac)) * gs.h +
gs.t - 3 - fontSize * 0.25;
}
drawTitle(ax._id + 'title', {
@@ -512,7 +512,7 @@ function drawColorBar(g, opts, gd) {
}
var outerwidth = 2 * xpad + innerWidth + borderwidth + outlinewidth / 2;
- var outerheight = yBottomPx - yTopPx;
+ var outerheight = vPx - yTopPx;
g.select('.' + cn.cbbg).attr({
x: u - xpad - (borderwidth + outlinewidth) / 2,
@@ -598,7 +598,7 @@ function makeEditable(g, opts, gd) {
xf = dragElement.align(opts._uFrac + (dx / gs.w), opts._thickFrac,
0, 1, opts.xanchor);
- yf = dragElement.align(opts._yBottomFrac - (dy / gs.h), opts._lenFrac,
+ yf = dragElement.align(opts._vFrac - (dy / gs.h), opts._lenFrac,
0, 1, opts.yanchor);
var csr = dragElement.getCursor(xf, yf, opts.xanchor, opts.yanchor);
| 10 |
diff --git a/app/src/components/MeetingDrawer/Chat/List/List.js b/app/src/components/MeetingDrawer/Chat/List/List.js @@ -19,7 +19,24 @@ const styles = (theme) =>
alignItems : 'center',
overflowY : 'auto',
padding : theme.spacing(1)
+ },
+ '@global' : {
+ '*' : {
+ 'scrollbar-width' : 'thin'
+ },
+ '*::-webkit-scrollbar' : {
+ width : '5px'
+ },
+ '*::-webkit-scrollbar-track' : {
+ background : 'white'
+
+ },
+ '*::-webkit-scrollbar-thumb' : {
+ backgroundColor : '#999999'
+ }
+
}
+
});
class MessageList extends React.Component
| 7 |
diff --git a/src/components/nodes/task/setupCompensationMarker.js b/src/components/nodes/task/setupCompensationMarker.js @@ -3,5 +3,7 @@ import compensationIcon from '@/assets/compensation.svg';
export default function setupCompensationMarker(nodeDefinition, markers, $set) {
if (nodeDefinition.isForCompensation) {
$set(markers.bottomCenter, 'compensation', compensationIcon);
+ } else {
+ $set(markers.bottomCenter, 'compensation', null);
}
}
| 2 |
diff --git a/generators/ci-cd/templates/_.gitlab-ci.yml b/generators/ci-cd/templates/_.gitlab-ci.yml @@ -59,7 +59,7 @@ gradle-build:
stage: build
script:
- ./gradlew compileJava -x test -PnodeInstall --no-daemon
-gradle-check:
+gradle-test:
stage: test
script:
- ./gradlew test -PnodeInstall --no-daemon
| 4 |
diff --git a/sirepo/package_data/static/js/radia.js b/sirepo/package_data/static/js/radia.js @@ -1261,7 +1261,7 @@ SIREPO.app.directive('dmpImportDialog', function(appState, fileManager, fileUplo
let a = inputFile.name.split('.');
let t = `${a[a.length - 1]}`;
if (RADIA_IMPORT_FORMATS.indexOf(`.${t}`) >= 0) {
- data = newSimFromRadia(inputFile);
+ data = newSimFromImport(inputFile);
}
importFile(inputFile, t, data);
};
@@ -1274,7 +1274,7 @@ SIREPO.app.directive('dmpImportDialog', function(appState, fileManager, fileUplo
requestSender.localRedirectHome(simId);
}
- function newSimFromRadia(inputFile) {
+ function newSimFromImport(inputFile) {
let model = appState.setModelDefaults(appState.models.simulation, 'simulation');
model.name = inputFile.name.substring(0, inputFile.name.indexOf('.'));
model.folder = fileManager.getActiveFolderPath();
| 10 |
diff --git a/app/models/carto/visualization.rb b/app/models/carto/visualization.rb @@ -519,7 +519,6 @@ class Carto::Visualization < ActiveRecord::Base
# deal with all the different the cases internally.
# See https://github.com/CartoDB/cartodb/pull/9678
def non_mapcapped
- return self if id.blank?
persisted? ? self : Carto::Visualization.find(id)
end
| 2 |
diff --git a/src/electron.js b/src/electron.js @@ -1401,7 +1401,7 @@ function checkForUpdates() {
}
-function getLatestUpdate(version) {
+getLatestUpdate = async (version) => {
try {
console.log("Downloading update from: " + version.downloadURL)
const fs = require('fs');
@@ -1416,32 +1416,36 @@ function getLatestUpdate(version) {
}
}
- fetch(version.downloadURL)
- .then(res => {
+ const update = await fetch(version.downloadURL)
+ await new Promise((resolve, reject) => {
console.log("Downloaded!")
- try {
const dest = fs.createWriteStream(updatePath);
- dest.on('finish', function () {
+ update.body.pipe(dest);
+ update.body.on('error', (err) => {
+ reject(err)
+ })
+ update.body.on('finish', function () {
console.log("Saved! Running...")
setTimeout(() => {
runUpdate(version.filesize)
}, 1250)
+ resolve(true)
});
- res.body.pipe(dest);
- } catch (e) {
- console.log("Couldn't write update file")
- }
- });
+ })
+
} catch (e) {
- console.log(e)
+ console.log("Couldn't download update!", e)
+ latestVersion.show = true
+ sendToAllWindows('latest-version', latestVersion)
}
}
function runUpdate(expectedSize = false) {
+ try {
if(!fs.existsSync(updatePath)) {
console.log("Update file doesn't exist!")
- latestVersion.show = false
+ latestVersion.show = true
sendToAllWindows('latest-version', latestVersion)
return false;
}
@@ -1450,7 +1454,7 @@ function runUpdate(expectedSize = false) {
console.log("Update is wrong file size!")
try {
fs.unlink(updatePath)
- latestVersion.show = false
+ latestVersion.show = true
sendToAllWindows('latest-version', latestVersion)
} catch (e) {
console.log("Couldn't delete update file")
@@ -1458,7 +1462,6 @@ function runUpdate(expectedSize = false) {
return false;
}
- try {
const { spawn } = require('child_process');
let process = spawn(updatePath, {
detached: true,
| 7 |
diff --git a/util.js b/util.js @@ -1019,6 +1019,37 @@ export const loadImage = u => new Promise((resolve, reject) => {
img.crossOrigin = 'Anonymous';
img.src = u;
});
+export const drawImageContain = (ctx, img) => {
+ const imgWidth = img.width;
+ const imgHeight = img.height;
+ const canvasWidth = ctx.canvas.width;
+ const canvasHeight = ctx.canvas.height;
+ const imgAspect = imgWidth / imgHeight;
+ const canvasAspect = canvasWidth / canvasHeight;
+ let x, y, width, height;
+ if (imgAspect > canvasAspect) {
+ // image is wider than canvas
+ width = canvasWidth;
+ height = width / imgAspect;
+ x = 0;
+ y = (canvasHeight - height) / 2;
+ } else {
+ // image is taller than canvas
+ height = canvasHeight;
+ width = height * imgAspect;
+ x = (canvasWidth - width) / 2;
+ y = 0;
+ }
+ ctx.drawImage(img, x, y, width, height);
+};
+export const imageToCanvas = (img, w, h) => {
+ const canvas = document.createElement('canvas');
+ canvas.width = w;
+ canvas.height = h;
+ const ctx = canvas.getContext('2d');
+ drawImageContain(ctx, img);
+ return canvas;
+};
export const isTransferable = o => {
const ctor = o?.constructor;
| 0 |
diff --git a/stories/module-pagespeed-insights-settings.stories.js b/stories/module-pagespeed-insights-settings.stories.js @@ -32,8 +32,6 @@ import { removeAllFilters, addFilter } from '@wordpress/hooks';
import SettingsModule from '../assets/js/components/settings/settings-module';
import { SettingsMain as PageSpeedInsightsSettings } from '../assets/js/modules/pagespeed-insights/settings';
import { fillFilterWithComponent } from '../assets/js/util';
-
-import { STORE_NAME } from '../assets/js/modules/pagespeed-insights/datastore';
import { WithTestRegistry } from '../tests/js/utils';
function filterPageSpeedInsightsSettings() {
@@ -103,21 +101,11 @@ storiesOf( 'PageSpeed Insights Module/Settings', module )
.add( 'View, closed', () => {
filterPageSpeedInsightsSettings();
- const setupRegistry = ( { dispatch } ) => {
- dispatch( STORE_NAME ).receiveSettings( {} );
- };
-
- return <Settings isOpen={ false } module={ completeModuleData } callback={ setupRegistry } />;
+ return <Settings isOpen={ false } module={ completeModuleData } />;
} )
.add( 'View, open with all settings', () => {
filterPageSpeedInsightsSettings();
- const setupRegistry = ( { dispatch } ) => {
- dispatch( STORE_NAME ).receiveSettings( {
- propertyID: 'http://example.com/',
- } );
- };
-
- return <Settings module={ completeModuleData } callback={ setupRegistry } />;
+ return <Settings module={ completeModuleData } />;
} )
;
| 2 |
diff --git a/shows/250 - scott teaches wes.md b/shows/250 - scott teaches wes.md @@ -26,8 +26,8 @@ Build modern JAMStack websites in minutes. Stackbit lets you combine any theme,
07:57 - Svelte 101
* .svelte files
-* Files can include <script>, <style>, and straight-up CSS
-* Variables are used in templates via {var} - <img {src} /> even works
+* Files can include `<script>`, `<style>`, and straight-up CSS
+* Variables are used in templates via {var} - `<img {src} />` even works
* Import component and use just like React and Vue
10:49 - Stylin'
| 3 |
diff --git a/package.json b/package.json {
"name": "prettier-atom",
"main": "./dist/main.js",
- "version": "0.60.0",
+ "version": "0.60.1",
"description": "Atom plugin for formatting JavaScript using prettier with (optional) prettier-eslint integration",
"keywords": [
"atom",
| 6 |
diff --git a/light.js b/light.js @@ -467,6 +467,8 @@ function prepareLinkProofs(arrUnits, callbacks){
return callbacks.ifError("no units array");
if (arrUnits.length === 1)
return callbacks.ifError("chain of one element");
+ mutex.lock(['prepareLinkProofs'], function(unlock){
+ var start_ts = Date.now();
var arrChain = [];
async.forEachOfSeries(
arrUnits,
@@ -476,11 +478,12 @@ function prepareLinkProofs(arrUnits, callbacks){
createLinkProof(arrUnits[i-1], arrUnits[i], arrChain, cb);
},
function(err){
- if (err)
- return callbacks.ifError(err);
- callbacks.ifOk(arrChain);
+ console.log("prepareLinkProofs for units "+arrUnits.join(', ')+" took "+(Date.now()-start_ts)+'ms, err='+err);
+ err ? callbacks.ifError(err) : callbacks.ifOk(arrChain);
+ unlock();
}
);
+ });
}
// adds later unit
| 6 |
diff --git a/src/components/bio.js b/src/components/bio.js @@ -12,7 +12,11 @@ const Bio = () => {
>
<p>
Learn JavaScript fundamentals through fun and
- challenging quizzes!
+ challenging quizzes!{' '}
+ <a href="https://github.com/nas5w/typeofnan-javascript-quizzes">
+ Star this repo on Github
+ </a>{' '}
+ to follow along as new questions are added!
</p>
</div>
);
| 0 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -116,6 +116,8 @@ What we need to do to release Uppy 1.0
- [ ] tus: add `filename` and `filetype`, so that tus servers knows what headers to set https://github.com/tus/tus-js-client/commit/ebc5189eac35956c9f975ead26de90c896dbe360
- [ ] core: look into utilizing https://github.com/que-etc/resize-observer-polyfill for responsive components. See also https://github.com/transloadit/uppy/issues/750
- [x] statusbar: add some spacing between text elements (#760 / @goto-bus-stop)
+- [ ] core: use Browserslist config to share between PostCSS, Autoprefixer and Babel https://github.com/browserslist/browserslist, https://github.com/amilajack/eslint-plugin-compat (@arturi)
+- [ ] core: utilize https://github.com/jonathantneal/postcss-preset-env, maybe https://github.com/jonathantneal/postcss-normalize (@arturi)
- [ ] docs: improve on React docs https://uppy.io/docs/react/, add small example for each component maybe? Dashboard, DragDrop, ProgressBar? No need to make separate pages for all of them, just headings on the same page. Right now docs are confusing, because they focus on DashboardModal. Also problems with syntax highlight on https://uppy.io/docs/react/dashboard-modal/.
- [ ] docs: add note in docs or solve the .run() issue, see #756
- [x] core: add `uppy.getFiles()` method (@goto-bus-stop / #770)
| 0 |
diff --git a/src/libs/NetworkConnection.js b/src/libs/NetworkConnection.js @@ -13,6 +13,7 @@ import CONST from '../CONST';
let unsubscribeFromNetInfo;
let unsubscribeFromAppState;
let isOffline = false;
+let hasPendingNetworkCheck = true;
// Holds all of the callbacks that need to be triggered when the network reconnects
const reconnectionCallbacks = [];
@@ -66,6 +67,9 @@ function subscribeToNetInfo() {
unsubscribeFromNetInfo = NetInfo.addEventListener((state) => {
Log.info('[NetworkConnection] NetInfo state change', false, state);
setOfflineStatus(state.isInternetReachable === false);
+
+ // When internet state is indeterminate a check is already running. Set the flag to prevent duplicate checks
+ hasPendingNetworkCheck = state.isInternetReachable === null;
});
}
@@ -103,15 +107,18 @@ function onReconnect(callback) {
reconnectionCallbacks.push(callback);
}
-NetowrkLib.registerConnectionCheckCallback(_.throttle(() => {
- if (!unsubscribeFromNetInfo) {
+function recheckNetworkConnection() {
+ if (hasPendingNetworkCheck) {
return;
}
Log.info('[NetworkConnection] recheck NetInfo');
+ hasPendingNetworkCheck = true;
unsubscribeFromNetInfo();
subscribeToNetInfo();
-}), 10 * 1000);
+}
+
+NetowrkLib.registerConnectionCheckCallback(recheckNetworkConnection);
export default {
setOfflineStatus,
| 14 |
diff --git a/tests/app-launcher/app-launcher.test.jsx b/tests/app-launcher/app-launcher.test.jsx @@ -158,29 +158,29 @@ describe('SLDS APP LAUNCHER *******************************************', () =>
it('renders all App Launcher dots', () => {
expect(handles.appLauncherIcon.find('.slds-icon-waffle').containsAllMatchingElements([
- <div className="slds-r1" />,
- <div className="slds-r2" />,
- <div className="slds-r3" />,
- <div className="slds-r4" />,
- <div className="slds-r5" />,
- <div className="slds-r6" />,
- <div className="slds-r7" />,
- <div className="slds-r8" />,
- <div className="slds-r9" />
+ <span className="slds-r1" />,
+ <span className="slds-r2" />,
+ <span className="slds-r3" />,
+ <span className="slds-r4" />,
+ <span className="slds-r5" />,
+ <span className="slds-r6" />,
+ <span className="slds-r7" />,
+ <span className="slds-r8" />,
+ <span className="slds-r9" />
])).to.equal(true);
});
it('App Launcher Icon link has proper classes', () => {
- expect(handles.appLauncherIcon.find('a').node.className).to.include('slds-icon-waffle_container slds-context-bar__button');
+ expect(handles.appLauncherIcon.find('button').node.className).to.include('slds-icon-waffle_container slds-context-bar__button');
});
it('clicking App Launcher Icon fires callback', () => {
- Simulate.click(handles.appLauncherIcon.find('a').node);
+ Simulate.click(handles.appLauncherIcon.find('button').node);
expect(triggerOnClick.calledOnce).to.be.true; // eslint-disable-line no-unused-expressions
});
it('App Launcher Icon callback receives original event as arg', () => {
- Simulate.click(handles.appLauncherIcon.find('a').node);
+ Simulate.click(handles.appLauncherIcon.find('button').node);
expect(triggerOnClick.args.length).to.equal(1);
});
| 1 |
diff --git a/src/components/Deployments.jsx b/src/components/Deployments.jsx @@ -46,18 +46,7 @@ export default function Deployments({ data, location }) {
setLoading(false)
}, [])
- const getAquariusVersion = async (url) => {
- if (!url) return
- try {
- const data = await fetch(url)
- const { version } = await data.json()
- return version
- } catch {
- return '-'
- }
- }
-
- const getProviderVersion = async (url) => {
+ const getVersion = async (url) => {
if (!url) return
try {
const data = await fetch(url)
@@ -72,8 +61,8 @@ export default function Deployments({ data, location }) {
const objs = []
for (const key of Object.keys(networks)) {
- const aquariusVerison = await getAquariusVersion(networks[key].aquarius)
- const providerVerison = await getProviderVersion(networks[key].provider)
+ const aquariusVerison = await getVersion(networks[key].aquarius)
+ const providerVerison = await getVersion(networks[key].provider)
objs.push(
<tr key={key}>
<td>{key}</td>
@@ -85,7 +74,6 @@ export default function Deployments({ data, location }) {
return (
<div>
- {' '}
<table>
<thead>
<tr>
| 7 |
diff --git a/lib/shared/addon/components/cluster-driver/driver-googlegke/template.hbs b/lib/shared/addon/components/cluster-driver/driver-googlegke/template.hbs <div class="form-control-static">
<label class="hand">
{{radio-button
- selection=config.noStackdriverLogging
- value=false
+ selection=config.enableStackdriverLogging
+ value=true
disabled=editing
}} {{t 'generic.enabled'}}
</label>
<label class="mr-20 hand">
{{radio-button
- selection=config.noStackdriverLogging
- value=true
+ selection=config.enableStackdriverLogging
+ value=false
disabled=editing
}} {{t 'generic.disabled'}}
</label>
<div class="form-control-static">
<label class="hand">
{{radio-button
- selection=config.noStackdriverMonitoring
- value=false
+ selection=config.enableStackdriverMonitoring
+ value=true
disabled=editing
}} {{t 'generic.enabled'}}
</label>
<label class="mr-20 hand">
{{radio-button
- selection=config.noStackdriverMonitoring
- value=true
+ selection=config.enableStackdriverMonitoring
+ value=false
disabled=editing
}} {{t 'generic.disabled'}}
</label>
<div class="form-control-static">
<label class="hand">
{{radio-button
- selection=config.disableHttpLoadBalancing
- value=false
+ selection=config.enableHttpLoadBalancing
+ value=true
disabled=editing
}} {{t 'generic.enabled'}}
</label>
<label class="mr-20 hand">
{{radio-button
- selection=config.disableHttpLoadBalancing
- value=true
+ selection=config.enableHttpLoadBalancing
+ value=false
disabled=editing
}} {{t 'generic.disabled'}}
</label>
| 10 |
diff --git a/src/components/profile/ProfileDataTable.js b/src/components/profile/ProfileDataTable.js @@ -32,17 +32,17 @@ const ProfileDataTable = ({
const phoneMeta = showCustomFlag && profile.mobile && parsePhoneNumberFromString(profile.mobile)
const countryFlagUrl = useCountryFlagUrl(phoneMeta && phoneMeta.country)
- const verifyEmail = () => {
+ const verifyEmail = useCallback(() => {
if (profile.email !== storedProfile.email) {
verifyEdit('email', profile.email)
}
- }
+ }, [verifyEdit, profile.email, storedProfile.email])
- const verifyPhone = () => {
+ const verifyPhone = useCallback(() => {
if (profile.mobile !== storedProfile.mobile) {
verifyEdit('phone', profile.mobile)
}
- }
+ }, [verifyEdit, profile.mobile, storedProfile.mobile])
const verifyEdit = useCallback(
(field, content) => {
@@ -60,7 +60,7 @@ const ProfileDataTable = ({
const onPhoneInputBlur = useCallback(() => {
setLockSubmit(false)
verifyPhone()
- }, [setLockSubmit])
+ }, [setLockSubmit, verifyPhone])
// email handlers
const onEmailFocus = useCallback(() => setLockSubmit(true), [setLockSubmit])
@@ -68,7 +68,7 @@ const ProfileDataTable = ({
const onEmailBlur = useCallback(() => {
setLockSubmit(false)
verifyEmail()
- }, [setLockSubmit])
+ }, [setLockSubmit, verifyEmail])
return (
<Section.Row alignItems="center" grow={1}>
| 0 |
diff --git a/src/server/views/widget/page_alerts.html b/src/server/views/widget/page_alerts.html {% endif %}
{% if redirectFrom or req.query.renamed or req.query.redirectFrom %}
+ <div class="alert alert-info py-3 px-4 d-flex align-items-center justify-content-between">
<span>
{% set fromPath = req.query.renamed or req.query.redirectFrom %}
{% if redirectFrom or req.query.redirectFrom %}
{% endif %}
{% if req.query.duplicated and not page.isDeleted() %}
+ <div class="alert alert-success py-3 px-4">
<span>
<strong>{{ t('Duplicated') }}: </strong> {{ t('page_page.notice.duplicated', req.sanitize(req.query.duplicated)) }}
</span>
| 14 |
diff --git a/core/server/api/canary/posts.js b/core/server/api/canary/posts.js const models = require('../../models');
-const i18n = require('../../../shared/i18n');
+const tpl = require('@tryghost/tpl');
const errors = require('@tryghost/errors');
const getPostServiceInstance = require('../../services/posts/posts-service');
const allowedIncludes = ['tags', 'authors', 'authors.roles', 'email'];
const unsafeAttrs = ['status', 'authors', 'visibility'];
+const messages = {
+ postNotFound: 'Post not found.'
+};
+
const postsService = getPostServiceInstance('canary');
module.exports = {
@@ -73,7 +77,7 @@ module.exports = {
.then((model) => {
if (!model) {
throw new errors.NotFoundError({
- message: i18n.t('errors.api.posts.postNotFound')
+ message: tpl(messages.postNotFound)
});
}
@@ -188,7 +192,7 @@ module.exports = {
.then(() => null)
.catch(models.Post.NotFoundError, () => {
return Promise.reject(new errors.NotFoundError({
- message: i18n.t('errors.api.posts.postNotFound')
+ message: tpl(messages.postNotFound)
}));
});
}
| 14 |
diff --git a/edit.js b/edit.js @@ -5336,41 +5336,21 @@ const _makeInventoryContentsMesh = () => {
return mesh;
};
const _makeInventoryBuildsMesh = () => {
- return new THREE.Object3D();
- /* 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 material = _makeDrawMaterial(localColor.setStyle('#' + colors[0]).getHex(), localColor.setStyle('#' + colors[1]).getHex(), 1);
const scaleMatrix = new THREE.Matrix4().makeScale(0.1, 0.1, 0.1);
- for (const geometry of geometries) {
- geometry.applyMatrix4(scaleMatrix);
- geometry.boundingBox = new THREE.Box3().setFromBufferAttribute(geometry.attributes.position);
-
- if (!geometry.index) {
- const indices = new Uint16Array(geometry.attributes.position.array.length/3);
- for (let i = 0; i < indices.length; i++) {
- indices[i] = i;
+ const geometries = (() => {
+ const result = Array(9);
+ for (let i = 0; i < buildMeshes.walls.length; i++) {
+ result[i*3] = buildMeshes.walls[i].geometry;
}
- geometry.setIndex(new THREE.BufferAttribute(indices, 1));
+ for (let i = 0; i < buildMeshes.platforms.length; i++) {
+ result[i*3+1] = buildMeshes.platforms[i].geometry;
}
+ for (let i = 0; i < buildMeshes.ramps.length; i++) {
+ result[i*3+2] = buildMeshes.ramps[i].geometry;
}
+ return result;
+ })();
+ const material = buildMeshes.walls[0].material;
const h = 0.1;
const arrowW = h/10;
@@ -5381,19 +5361,13 @@ const _makeInventoryBuildsMesh = () => {
const dx = i%3;
const dy = (i-dx)/3;
return geometry.clone()
- .applyMatrix4(new THREE.Matrix4().makeScale(w*2, w*2, w*2))
+ .applyMatrix4(new THREE.Matrix4().makeScale(w*2 * 0.1, w*2 * 0.1, w*2 * 0.1))
.applyMatrix4(new THREE.Matrix4().makeTranslation(-h + w/2 + dx*w, h/2 - arrowW - w/2 - dy*w, w/4));
}));
const geometry = _compileGeometry();
const mesh = new THREE.Mesh(geometry, material);
- mesh.geometries = geometries;
- mesh.setColors = selectedColors => {
- mesh.material.uniforms.color1.value.setStyle('#' + colors[selectedColors[0]]);
- mesh.material.uniforms.color1.needsUpdate = true;
- mesh.material.uniforms.color2.value.setStyle('#' + colors[selectedColors[1]]);
- mesh.material.uniforms.color2.needsUpdate = true;
- };
- return mesh; */
+ mesh.frustumCulled = false;
+ return mesh;
};
const _makeInventoryShapesMesh = () => {
const boxMesh = new THREE.BoxBufferGeometry()
| 0 |
diff --git a/src/encoded/tests/data/inserts/user.json b/src/encoded/tests/data/inserts/user.json "ENCORE"
],
"uuid": "473a72c0-6f20-4f81-9093-198e92fee470"
+ },
+ {
+ "email": "[email protected]",
+ "first_name": "Emma",
+ "groups": [
+ "admin"
+ ],
+ "job_title": "Software Developer",
+ "lab": "/labs/j-michael-cherry/",
+ "last_name": "O'Neill",
+ "schema_version": "8",
+ "status": "current",
+ "submits_for": [
+ "/labs/j-michael-cherry/"
+ ],
+ "viewing_groups": [
+ "ENCODE3",
+ "REMC",
+ "GGR",
+ "ENCODE4",
+ "community"
+ ],
+ "uuid": "af989110-67d2-4c8b-87f0-38d9d6d31868"
}
]
| 0 |
diff --git a/lib/interceptor.js b/lib/interceptor.js @@ -318,10 +318,11 @@ Interceptor.prototype.match = function match(options, body, hostNameOnly) {
// special logger for query()
if (queryIndex !== -1) {
- this.scope.logger('matching ' + matchKey + '?' + queryString + ' to ' + this._key +
- ' with query(' + stringify(this.queries) + '): ' + matches);
+ this.scope.logger('matching ' + method + ' ' + matchKey + path + '?' + queryString
+ + ' to ' + this._key + ' with query(' + stringify(this.queries) + '): ' + matches);
} else {
- this.scope.logger('matching ' + matchKey + ' to ' + this._key + ': ' + matches);
+ this.scope.logger('matching ' + method + ' ' + matchKey + path
+ + ' to ' + this._key + ': ' + matches);
}
if (matches) {
| 7 |
diff --git a/src/effects/transcripts/fetch.js b/src/effects/transcripts/fetch.js -import { get, last, find, isNumber } from 'lodash'
+import { get, last, find, isNumber, endsWith } from 'lodash'
import { compose, map, concat, orderBy, reduce } from 'lodash/fp'
import request from 'utils/request'
@@ -17,7 +17,7 @@ const isNewChunk = (current, last) => {
const differentSpeaker = current.speaker !== last.speaker
const text = last.texts.reduce((result, item) => result + ' ' + item.text, '')
- const endOfSentence = new RegExp(/.*(\.|!|\?)$/).test(text) === false
+ const endOfSentence = endsWith(text, '.') || endsWith(text, '!') || endsWith(text, '?')
return differentSpeaker || (text.length > 500 && endOfSentence)
}
@@ -87,6 +87,9 @@ export default handleActions({
request(transcriptsUrl)
.then(transformTranscript)
+ .then(data => {
+ return data
+ })
.catch(() => [])
.then(compose(dispatch, actions.initTranscripts))
},
| 1 |
diff --git a/docs/data_preparation.rst b/docs/data_preparation.rst @@ -589,8 +589,8 @@ HiGlass expects each zoom level to be stored at a location named ``resolutions/{
Multivec Files
--------------
-Multivec files store arrays of arrays organized by chromosome. To aggregate this
-data, we need an input file where chromsome is a separate dataset. Example:
+Multivec files store arrays of arrays organized by chromosome. They are currently implemented as binary HDF5 files. To aggregate this
+data, we need an input file where each chromosome is a separate dataset. Here is an example creating of how to create the base resolution of a multivec file:
.. code-block:: python
@@ -600,7 +600,7 @@ data, we need an input file where chromsome is a separate dataset. Example:
d[:] = np.random.random((10000,5))
f.close()
-This can be aggregated to multiple resolutions using `clodius aggregate multivec`:
+This base resolution can be aggregated to multiple resolutions using `clodius aggregate multivec`:
.. code-block:: bash
@@ -608,12 +608,26 @@ This can be aggregated to multiple resolutions using `clodius aggregate multivec
--chromsizes-filename ~/projects/negspy/negspy/data/hg38/chromInfo.txt \
--starting-resolution 1000 \
--row-infos-filename ~/Downloads/sampled_info.txt \
- my_file_genome_wide_hg38_v2.multivec
+ /tmp/blah.h5
The `--chromsizes-filename` option lists the chromosomes that are in the input
-file and their sizes. The `--starting-resolution` option indicates that the
+file and their sizes. The contents should be a list of tab-separated values containing chromosome name and size:
+
+.. code-block:: bash
+
+ chr1 10000
+
+The `--starting-resolution` option indicates that the
base resolution for the input data is 1000 base pairs.
+The `row-infos-filename` parameter specifies a file containing a list of names for the rows in the multivec file:
+
+.. code-block:: bash
+
+ Spleen
+ Thymus
+ Liver
+
Epilogos Data (multivec)
------------------------
| 3 |
diff --git a/src/components/LiveStrategyExecutor/LiveStrategyExecutor.container.js b/src/components/LiveStrategyExecutor/LiveStrategyExecutor.container.js @@ -5,6 +5,7 @@ import { getMarkets } from '../../redux/selectors/meta'
const mapStateToProps = (state = {}) => ({
allMarkets: getMarkets(state),
+ strategyContent: state.ui.content,
})
const mapDispatchToProps = () => ({
| 3 |
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js b/packages/node_modules/@node-red/editor-client/src/js/ui/subflow.js @@ -1381,7 +1381,8 @@ RED.subflow = (function() {
}
}
if (ui.type !== "checkbox") {
- $('<span>').css({"padding-left":"5px"}).text(labelText).appendTo(label);
+ var css = ui.icon ? {"padding-left":"5px"} : {};
+ $('<span>').css(css).text(labelText).appendTo(label);
if (ui.type === 'none') {
label.width('100%');
}
| 2 |
diff --git a/src/transactions/views/NFTTimeline.vue b/src/transactions/views/NFTTimeline.vue @@ -159,7 +159,7 @@ export default {
)
},
fromAddress() {
- return this.item.tx.from
+ return this.accountItem(this.accountId)?.addresses[0]
},
accountId() {
return this.item.nft.accountId || this.item.accountId
| 3 |
diff --git a/tests/e2e/specs/modules/pagespeed-insights/activation.test.js b/tests/e2e/specs/modules/pagespeed-insights/activation.test.js @@ -38,11 +38,27 @@ describe( 'PageSpeed Insights Activation', () => {
await resetSiteKit();
} );
- it( 'leads you to the Site Kit dashboard after activation', async () => {
+ it( 'leads you to the Site Kit dashboard after activation via CTA', async () => {
await visitAdminPage( 'admin.php', 'page=googlesitekit-dashboard' );
await Promise.all( [
page.waitForNavigation(),
- expect( page ).toClick( '.googlesitekit-cta-link', { text: 'Activate PageSpeed Insights' } ),
+ expect( page ).toClick( '.googlesitekit-cta-link', { text: /Activate PageSpeed Insights/i } ),
+ ] );
+
+ await page.waitForSelector( '.googlesitekit-publisher-win__title' );
+ await expect( page ).toMatchElement( '.googlesitekit-publisher-win__title', { text: /Congrats on completing the setup for PageSpeed Insights!/i } );
+ } );
+
+ it( 'leads you to the Site Kit dashboard after activation via the settings page', async () => {
+ await visitAdminPage( 'admin.php', 'page=googlesitekit-settings' );
+
+ await page.waitForSelector( '.mdc-tab-bar' );
+ await expect( page ).toClick( '.mdc-tab', { text: /connect more services/i } );
+ await page.waitForSelector( '.googlesitekit-settings-connect-module--pagespeed-insights' );
+
+ await Promise.all( [
+ page.waitForNavigation(),
+ expect( page ).toClick( '.googlesitekit-cta-link', { text: /Set up PageSpeed Insights/i } ),
] );
await page.waitForSelector( '.googlesitekit-publisher-win__title' );
| 3 |
diff --git a/js/monogatari.js b/js/monogatari.js @@ -2292,7 +2292,11 @@ $_ready(function () {
// The typeof check, is to see if the character actually exists, if it does not, then it is
// treated as a normal work and the narrator is used to show the dialog
if (character.length > 1 && typeof characters[character[0]] !== "undefined") {
+ if (typeof characters[character[0]].Name !== "undefined") {
$_("[data-ui='who']").html(replaceVariables(characters[character[0]].Name));
+ } else {
+ document.querySelector("[data-ui='who']").innerHTML = "";
+ }
$_("[data-character='" + character[0] + "']").addClass("focus");
$_("[data-ui='who']").style("color", characters[character[0]].Color);
@@ -2324,7 +2328,11 @@ $_ready(function () {
$_("[data-ui='face']").hide();
}
} else if (typeof characters[parts[0]] != "undefined") {
- $_("[data-ui='who']").html(replaceVariables(characters[parts[0]].Name));
+ if (typeof characters[character[0]].Name !== "undefined") {
+ $_("[data-ui='who']").html(replaceVariables(characters[character[0]].Name));
+ } else {
+ document.querySelector("[data-ui='who']").innerHTML = "";
+ }
$_("[data-character='" + parts[0] + "']").addClass("focus");
$_("[data-ui='who']").style("color", characters[parts[0]].Color);
| 11 |
diff --git a/app.rb b/app.rb @@ -103,7 +103,7 @@ get '/launches/latest' do
content_type :json
collection = client[:launch]
hash = collection.find({}, projection: {_id: 0}).sort({"flight_number": -1}).limit(1)
- JSON.pretty_generate(hash.to_a[0])
+ JSON.pretty_generate(hash.to_a)
end
##########################################
@@ -135,8 +135,6 @@ get '/launches' do
array = hash.to_a
if array.empty?
JSON.pretty_generate(error)
- elsif array.count == 1
- JSON.pretty_generate(array[0])
else
JSON.pretty_generate(array)
end
@@ -170,8 +168,6 @@ get '/launches/upcoming' do
array = hash.to_a
if array.empty?
JSON.pretty_generate(error)
- elsif array.count == 1
- JSON.pretty_generate(array[0])
else
JSON.pretty_generate(array)
end
@@ -190,8 +186,6 @@ get '/launches/cores/:core' do
array = hash.to_a
if array.empty?
JSON.pretty_generate(error)
- elsif array.count == 1
- JSON.pretty_generate(array[0])
else
JSON.pretty_generate(array)
end
@@ -206,8 +200,6 @@ get '/parts/caps/:cap' do
array = hash.to_a
if array.empty?
JSON.pretty_generate(error)
- elsif array.count == 1
- JSON.pretty_generate(array[0])
else
JSON.pretty_generate(array)
end
@@ -235,8 +227,6 @@ get '/launches/caps/:cap' do
array = hash.to_a
if array.empty?
JSON.pretty_generate(error)
- elsif array.count == 1
- JSON.pretty_generate(array[0])
else
JSON.pretty_generate(array)
end
@@ -264,8 +254,6 @@ get '/parts/cores/:core' do
array = hash.to_a
if array.empty?
JSON.pretty_generate(error)
- elsif array.count == 1
- JSON.pretty_generate(array[0])
else
JSON.pretty_generate(array)
end
| 13 |
diff --git a/src/Select.js b/src/Select.js @@ -15,23 +15,20 @@ class Select extends Component {
handleChange(event) {
const { onChange } = this.props;
- if (onChange) onChange(event);
+ let value = event.target.value;
- this.setState({ value: event.target.value });
+ if (this.props.multiple) {
+ value = this.instance.getSelectedValues();
}
- componentDidMount() {
- // const { selectOptions = {} } = this.props;
- const selectOptions = {}; // needed?
+ if (onChange) onChange(event);
- if (typeof M !== 'undefined') {
- this.instance = M.FormSelect.init(this._selectRef, selectOptions);
- }
+ this.setState({ value });
}
- componentDidUpdate(prevProps) {
- if (this.props.value !== prevProps.value) {
- M.updateTextFields();
+ componentDidMount() {
+ if (typeof M !== 'undefined') {
+ this.instance = M.FormSelect.init(this._selectRef);
}
}
@@ -51,7 +48,6 @@ class Select extends Component {
validate,
children,
multiple,
- selectedIndex,
value,
type
} = this.props;
@@ -92,10 +88,9 @@ class Select extends Component {
icon && <i className="material-icons prefix">{icon}</i>;
const renderOption = child =>
- React.cloneElement(child, { key: child.props.value })
+ React.cloneElement(child, { key: child.props.value });
- const renderOptions = () =>
- React.Children.map(children, renderOption)
+ const renderOptions = () => React.Children.map(children, renderOption);
return (
<div className={wrapperClasses}>
@@ -106,7 +101,7 @@ class Select extends Component {
this._selectRef = el;
}}
onChange={this.handleChange}
- className={cx({ validate }, inputClassName)}
+ className={cx({ validate, multiple }, inputClassName)}
{...inputProps}
>
{renderOptions()}
@@ -186,11 +181,14 @@ Select.propTypes = {
/*
* onChange callback
*/
- onChange: PropTypes.func
-};
-
-Select.defaultProps = {
- selectedIndex: 0
+ onChange: PropTypes.func,
+ /*
+ * Render a multiple dropdown,
+ * use instance.getSelectedValues()
+ * to get array of selected values
+ */
+ multiple: PropTypes.bool,
+ children: PropTypes.any
};
export default Select;
| 1 |
diff --git a/src/live_view/live_view_server.js b/src/live_view/live_view_server.js @@ -14,6 +14,9 @@ const writeFile = promisify(fs.writeFile);
const unlink = promisify(fs.unlink);
const ensureDir = promisify(fs.ensureDir);
+const LOCAL_STORAGE_DIR = process.env[ENV_VARS.LOCAL_STORAGE_DIR] || '';
+const DEFAULT_SCREENSHOT_DIR_PATH = path.resolve(LOCAL_STORAGE_DIR, 'live_view');
+
/**
* `LiveViewServer` enables serving of browser snapshots via web sockets. It includes its own client
* that provides a simple frontend to viewing the captured snapshots. A snapshot consists of three
@@ -51,8 +54,8 @@ const ensureDir = promisify(fs.ensureDir);
* via an options object with the following keys:
* @param {string} [options.screenshotDirectoryPath]
* By default, the screenshots are saved to
- * the `live_view` directory in the process' working directory. Provide a different
- * absolute path to change the settings.
+ * the `live_view` directory in the Apify local storage directory.
+ * Provide a different absolute path to change the settings.
* @param {number} [options.maxScreenshotFiles=10]
* Limits the number of screenshots stored
* by the server. This is to prevent using up too much disk space.
@@ -68,7 +71,7 @@ const ensureDir = promisify(fs.ensureDir);
class LiveViewServer {
constructor(options = {}) {
const {
- screenshotDirectoryPath = path.resolve('live_view'),
+ screenshotDirectoryPath = DEFAULT_SCREENSHOT_DIR_PATH,
maxScreenshotFiles = 10,
snapshotTimeoutSecs = 3,
maxSnapshotFrequencySecs = 2,
| 5 |
diff --git a/bot/src/discord_commands/quiz.js b/bot/src/discord_commands/quiz.js @@ -328,8 +328,8 @@ function getTimeString(timestamp) {
function sendSaveMementos(msg, currentSaveMementos, recyclingBinMementos, extraContent) {
const prefix = msg.prefix;
const embed = {
- title: 'Available Saves',
- footer: { icon_url: constants.FOOTER_ICON_URI, text: `Load the first save with: ${prefix}quiz load 1` },
+ title: 'Loading',
+ description: `You can load a save by using this command again with the number of the save you want (listed below). For example **${prefix}quiz load 1**.`,
color: constants.EMBED_NEUTRAL_COLOR,
fields: [],
};
| 7 |
diff --git a/packages/component-library/src/Header/FullNav.js b/packages/component-library/src/Header/FullNav.js @@ -82,10 +82,6 @@ const menuButton = css`
padding: 0;
color: inherit;
cursor: pointer;
-
- :focus {
- outline: none;
- }
`;
const buttonText = css`
@@ -153,7 +149,7 @@ const FullNav = props => {
return (
<div css={contentWrapper(props)}>
<Link to="/">
- <Logo css={logoStyle} type="squareLogo" />
+ <Logo alt="CIVIC home page" css={logoStyle} type="squareLogo" />
</Link>
<div />
<nav css={navStyle} aria-label="Site">
| 7 |
diff --git a/app/src/scripts/upload/upload.js b/app/src/scripts/upload/upload.js @@ -156,7 +156,7 @@ export default {
metadata.authors.push({ name: author, ORCIDID: '' })
}
}
- scitran.updateProject(projectId, { metadata }, () => {
+ scitran.updateProject(projectId, { metadata }).then(() => {
let file = new File(
[JSON.stringify(description)],
'dataset_description.json',
| 1 |
diff --git a/packages/app/src/components/PageEditor.tsx b/packages/app/src/components/PageEditor.tsx @@ -85,35 +85,29 @@ const PageEditor = React.memo((props: Props): JSX.Element => {
// pageContainer, editorContainer,
// } = props;
+ const { data: pageId } = useCurrentPageId();
+ const { data: currentPagePath } = useCurrentPagePath();
+ const { data: currentPathname } = useCurrentPathname();
+ const { data: currentPage } = useSWRxCurrentPage();
+ const { data: grantData, mutate: mutateGrant } = useSelectedGrant();
+ const { data: pageTags } = usePageTagsForEditors(pageId);
+
const { data: isEditable } = useIsEditable();
const { data: editorMode } = useEditorMode();
const { data: isMobile } = useIsMobile();
const { data: isSlackEnabled } = useIsSlackEnabled();
- const { data: pageId } = useCurrentPageId();
- const { data: pageTags } = usePageTagsForEditors(pageId);
- const { data: currentPagePath } = useCurrentPagePath();
- const { data: currentPathname } = useCurrentPathname();
const { data: slackChannelsData } = useSWRxSlackChannels(currentPagePath);
- const { data: grantData, mutate: mutateGrant } = useSelectedGrant();
const { data: isTextlintEnabled } = useIsTextlintEnabled();
const { data: isIndentSizeForced } = useIsIndentSizeForced();
const { data: indentSize, mutate: mutateCurrentIndentSize } = useCurrentIndentSize();
const { mutate: mutateIsEnabledUnsavedWarning } = useIsEnabledUnsavedWarning();
const { data: isUploadableFile } = useIsUploadableFile();
const { data: isUploadableImage } = useIsUploadableImage();
- const { data: currentPage } = useSWRxCurrentPage();
const { data: rendererOptions } = usePreviewOptions();
const [markdown, setMarkdown] = useState<string>('');
-
- useEffect(() => {
- if (currentPage != null) {
- setMarkdown(currentPage.revision?.body);
- }
- }, [currentPage, currentPage?.revision?.body]);
-
const slackChannels = useMemo(() => (slackChannelsData ? slackChannelsData.toString() : ''), []);
@@ -456,13 +450,14 @@ const PageEditor = React.memo((props: Props): JSX.Element => {
const isUploadable = isUploadableImage || isUploadableFile;
+ const initialValue = currentPage?.revision?.body;
return (
<div className="d-flex flex-wrap">
<div className="page-editor-editor-container flex-grow-1 flex-basis-0 mw-0">
<Editor
ref={editorRef}
- value={markdown}
+ value={initialValue}
isUploadable={isUploadable}
isUploadableFile={isUploadableFile}
isTextlintEnabled={isTextlintEnabled}
| 7 |
diff --git a/404.html b/404.html @@ -5,10 +5,10 @@ layout: default
<div class="ui two column centered grid xo margin top bottom fivefold">
<div class="center aligned column">
- <img class="ui centered medium image xo padding top bottom" src="/assets/img/diybio-octocat.png"></a>
+ <img class="ui centered medium image xo padding top bottom" src="/assets/gifs/sad-cat.gif"></a>
<h1 class="ui centered header">page not found</h1>
<a href="https://github.com/DIYbiosphere/sphere/issues/new" target="_blank">
- <button class="ui secondary small basic button">Report broken link</button>
+ <button class="ui secondary small basic button"><i class="far fa-bug"></i> Report broken link</button>
</a>
</div>
</div>
| 0 |
diff --git a/app/features/flex.js b/app/features/flex.js @@ -35,7 +35,10 @@ export function Flex({selection}) {
let selectedNodes = selection()
, keys = handler.key.split('+')
- changeDirection(selectedNodes, keys.includes('left') ? 'row' : 'column')
+ if (keys.includes('left') || keys.includes('right'))
+ changeDirection(selectedNodes, 'row')
+ else
+ changeDirection(selectedNodes, 'column')
})
return () => {
| 7 |
diff --git a/articles/email/providers.md b/articles/email/providers.md @@ -129,10 +129,11 @@ The [Email Activity](https://sendgrid.com/logs/index) page in SendGrid will now
## Configure a Custom SMTP Server for Sending Email
-You can use your own SMTP server to send email. There are two requirements for the SMTP server:
+You can use your own SMTP server to send email. There are three requirements for the SMTP server:
* It must support LOGIN [authentication](https://en.wikipedia.org/wiki/SMTP_Authentication).
* It must support [TLS](https://en.wikipedia.org/wiki/STARTTLS) 1.0 or higher.
+* It must use a certificate signed by a public certificate authority (CA).
To be able to use your own SMTP server:
| 0 |
diff --git a/templates/osaka/index.html b/templates/osaka/index.html name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0"
/>
+ <style>
+ body {
+ height: 100%;
+ min-height: 100%;
+ }
+ </style>
</head>
<body>
<div id="root"></div>
| 12 |
diff --git a/generators/server/templates/pom.xml.ejs b/generators/server/templates/pom.xml.ejs <goals>
<goal>yarn</goal>
</goals>
- <configuration>
- <arguments>install</arguments>
- </configuration>
</execution>
<%_ } else if (clientPackageManager === 'npm') { _%>
<execution>
<goals>
<goal>npm</goal>
</goals>
- <configuration>
- <arguments>install</arguments>
- </configuration>
</execution>
<%_ } _%>
<execution>
| 2 |
diff --git a/docs/src/pages/vue-components/table.md b/docs/src/pages/vue-components/table.md @@ -99,7 +99,7 @@ columns: [ // array of Objects
<doc-example title="Dense" file="QTable/Dense" />
::: tip
-You can use the `dense` prop along with `$q.screen` to create a responsive behavior. Example: `:dense="$q.screen.lt.md`. More info: [Screen Plugin](/options/screen-plugin).
+You can use the `dense` prop along with `$q.screen` to create a responsive behavior. Example: `:dense="$q.screen.lt.md"`. More info: [Screen Plugin](/options/screen-plugin).
:::
### Sticky header/column
| 1 |
diff --git a/public/javascripts/LabelMap.js b/public/javascripts/LabelMap.js @@ -112,8 +112,6 @@ function LabelMap(_, $, map, params) {
});
}
-
-
/**
* This function queries the streets that the user audited and visualize them as segments on the map.
*/
@@ -298,7 +296,7 @@ function LabelMap(_, $, map, params) {
}
}
-
+ if(params.choroplethType === 'labelMap') {
initializeNeighborhoodPolygons(map);
initializeAuditedStreets(map);
initializeSubmittedLabels(map);
@@ -306,9 +304,17 @@ function LabelMap(_, $, map, params) {
setTimeout(function () {
map.invalidateSize(false);
}, 1);
+ // Must return these methods for the Admin page to use
+ } else {
+ self.initializeNeighborhoodPolygons = initializeNeighborhoodPolygons;
+ self.initializeAuditedStreets = initializeAuditedStreets;
+ self.initializeSubmittedLabels = initializeSubmittedLabels;
+ self.initializeAdminGSVLabelView = initializeAdminGSVLabelView;
+ }
function initializeAdminGSVLabelView() {
- self.adminGSVLabelView = AdminGSVLabelView(false);
+ var temp = params.choroplethType === 'adminMap';
+ self.adminGSVLabelView = AdminGSVLabelView(temp);
}
// Functionality for the legend's minimize button.
@@ -317,7 +323,6 @@ function LabelMap(_, $, map, params) {
$(this).text(function(_, value) { return value === '-' ? '+' : '-'});
});
-
self.clearMap = clearMap;
self.redrawLabels = redrawLabels;
self.clearAuditedStreetLayer = clearAuditedStreetLayer;
| 3 |
diff --git a/source/shaders/ibl_filtering.frag b/source/shaders/ibl_filtering.frag @@ -179,16 +179,27 @@ float D_Charlie(float sheenRoughness, float NdotH)
return (2.0 + invR) * pow(sin2h, invR * 0.5) / (2.0 * MATH_PI);
}
-float PDF(vec3 H, vec3 N, float roughness)
+// GGX microfacet distribution
+// https://www.cs.cornell.edu/~srm/publications/EGSR07-btdf.html
+// This implementation is based on https://bruop.github.io/ibl/,
+// https://www.tobias-franke.eu/log/2014/03/30/notes_on_importance_sampling.html
+// and https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch20.html
+MicrofacetDistributionSample Charlie(vec2 xi, float roughness)
{
- float NdotH = saturate(dot(N, H));
+ MicrofacetDistributionSample charlie;
- if(u_distribution == cCharlie)
- {
- return D_Charlie(roughness * roughness, NdotH) / 4.0 + 0.001;
- }
+ float alpha = roughness * roughness;
+ charlie.sinTheta = pow(xi.y, alpha / (2.0*alpha + 1.0));
+ charlie.cosTheta = sqrt(1.0 - charlie.sinTheta * charlie.sinTheta);
+ charlie.phi = 2.0 * MATH_PI * xi.x;
- return 0.f;
+ // evaluate Charlie pdf (for half vector)
+ charlie.pdf = D_Charlie(alpha, charlie.cosTheta);
+
+ // Apply the Jacobian to obtain a pdf that is parameterized by l
+ charlie.pdf /= 4.0;
+
+ return charlie;
}
// getImportanceSample returns an importance sample direction with pdf in the .w component
@@ -228,11 +239,11 @@ vec4 getImportanceSample(int sampleIndex, vec3 N, float roughness)
}
else if(u_distribution == cCharlie)
{
- // sheen mapping
- float alpha = roughness * roughness;
- sinTheta = pow(xi.y, alpha / (2.0*alpha + 1.0));
- cosTheta = sqrt(1.0 - sinTheta * sinTheta);
- phi = 2.0 * MATH_PI * xi.x;
+ MicrofacetDistributionSample charlie = Charlie(xi, roughness);
+ cosTheta = charlie.cosTheta;
+ sinTheta = charlie.sinTheta;
+ phi = charlie.phi;
+ pdf = charlie.pdf;
}
// transform the hemisphere sample to the normal coordinate frame
@@ -241,11 +252,6 @@ vec4 getImportanceSample(int sampleIndex, vec3 N, float roughness)
mat3 TBN = generateTBN(N);
vec3 direction = TBN * localSpaceDirection;
- if(u_distribution == cCharlie)
- {
- pdf = PDF(direction, N, roughness);
- }
-
return vec4(direction, pdf);
}
| 4 |
diff --git a/src/core/operations/GenerateRSAKeyPair.mjs b/src/core/operations/GenerateRSAKeyPair.mjs /**
* @author gchq77703 []
* @copyright Crown Copyright 2018
- ` * @license Apache-2.0
+ * @license Apache-2.0
*/
import Operation from "../Operation";
import forge from "node-forge/dist/forge.min.js";
-import PrimeWorker from "node-forge/dist/prime.worker.min.js";
/**
* Generate RSA Key Pair operation
@@ -54,13 +53,9 @@ class GenerateRSAKeyPair extends Operation {
*/
async run(input, args) {
const [keyLength, outputFormat] = args;
- let workerScript;
return new Promise((resolve, reject) => {
- if (ENVIRONMENT_IS_WORKER || window) {
- workerScript = ENVIRONMENT_IS_WORKER() ? self.URL.createObjectURL(new Blob([PrimeWorker])) : window.URL.createObjectURL(new Blob([PrimeWorker]));
- }
- forge.pki.rsa.generateKeyPair({ bits: Number(keyLength), workers: 2, workerScript}, (err, keypair) => {
+ forge.pki.rsa.generateKeyPair({ bits: Number(keyLength), workers: -1}, (err, keypair) => {
if (err) return reject(err);
let result;
| 1 |
diff --git a/app/models/audit/AuditTaskTable.scala b/app/models/audit/AuditTaskTable.scala @@ -517,14 +517,19 @@ object AuditTaskTable {
| street.x2,
| street.y2,
| street.timestamp,
- | street_count.completion_count,
+ | COALESCE(task.completion_count, 0),
| audit_task.completed
| FROM sidewalk.region
|INNER JOIN sidewalk.street_edge AS street
| ON ST_Intersects(street.geom, region.geom)
- |INNER JOIN sidewalk.street_edge_assignment_count AS street_count
- | ON street.street_edge_id = street_count.street_edge_id
- |LEFT JOIN sidewalk.audit_task
+ |LEFT JOIN (
+ | SELECT street_edge_id, COUNT(audit_task_id) AS completion_count
+ | FROM sidewalk.audit_task
+ | WHERE audit_task.completed IS TRUE
+ | GROUP BY street_edge_id
+ |) AS task
+ | ON street.street_edge_id = task.street_edge_id
+ |INNER JOIN sidewalk.audit_task
| ON street.street_edge_id = audit_task.street_edge_id
| AND audit_task.user_id = ?
|WHERE region.region_id = ?
@@ -558,19 +563,23 @@ object AuditTaskTable {
| street.x2,
| street.y2,
| street.timestamp,
- | street_count.completion_count,
+ | COALESCE(task.completion_count, 0),
| NULL as audit_task_id
| FROM sidewalk.region
|INNER JOIN sidewalk.street_edge AS street
| ON ST_Intersects(street.geom, region.geom)
- |INNER JOIN sidewalk.street_edge_assignment_count AS street_count
- | ON street.street_edge_id = street_count.street_edge_id
+ |LEFT JOIN (
+ | SELECT street_edge_id, COUNT(audit_task_id) AS completion_count
+ | FROM sidewalk.audit_task
+ | WHERE audit_task.completed IS TRUE
+ | GROUP BY street_edge_id
+ |) AS task
+ | ON street.street_edge_id = task.street_edge_id
|WHERE region.region_id = ?
| AND street.deleted IS FALSE""".stripMargin
)
val newTasks = selectTaskQuery(regionId).list
-
newTasks.map(task =>
NewTask(task.edgeId, task.geom, task.x1, task.y1, task.x2, task.y2, timestamp, task.completionCount, task.completed)
)
@@ -594,13 +603,18 @@ object AuditTaskTable {
| street.x2,
| street.y2,
| street.timestamp,
- | street_count.completion_count,
+ | COALESCE(task.completion_count, 0),
| audit_task.completed
| FROM sidewalk.region
|INNER JOIN sidewalk.street_edge AS street
| ON ST_Intersects(street.geom, region.geom)
- |INNER JOIN sidewalk.street_edge_assignment_count AS street_count
- | ON street.street_edge_id = street_count.street_edge_id
+ |LEFT JOIN (
+ | SELECT street_edge_id, COUNT(audit_task_id) AS completion_count
+ | FROM sidewalk.audit_task
+ | WHERE audit_task.completed IS TRUE
+ | GROUP BY street_edge_id
+ |) AS task
+ | ON street.street_edge_id = task.street_edge_id
|LEFT JOIN sidewalk.audit_task
| ON street.street_edge_id = audit_task.street_edge_id
| AND audit_task.user_id = ?
| 14 |
diff --git a/generators/entity-client/templates/common/src/test/javascript/cypress/integration/entity/entity.spec.ts.ejs b/generators/entity-client/templates/common/src/test/javascript/cypress/integration/entity/entity.spec.ts.ejs @@ -166,10 +166,7 @@ describe('<%= entityClass %> e2e test', () => {
<%_ } else if (fieldType === 'Boolean') { _%>
cy.get(`[data-cy="<%= fieldName %>"]`).should('not.be.checked');
- if ('<%= fieldValue %>' === 'true') {
cy.get(`[data-cy="<%= fieldName %>"]`).click().should('be.checked');
- }
-
<%_ } else if (['byte[]', 'ByteBuffer'].includes(fieldType) && fieldTypeBlobContent === 'text') { _%>
cy.get(`[data-cy="<%= fieldName %>"]`).type('<%= fieldValue %>', { force: true }).invoke('val').should('match', new RegExp('<%= fieldValue %>'));
| 1 |
diff --git a/public/javascripts/InitializeSubmittedLabels.js b/public/javascripts/InitializeSubmittedLabels.js function InitializeSubmittedLabels(map, self, url, params) {
$.getJSON(url, function (data) {
- var auditedStreetColor = params.choroplethType === 'labelMap' ? 'black' : 'rgba(128, 128, 128, 1.0)';
+ var auditedStreetColor = params.choroplethType === 'labelMap' ? '#000' : 'rgba(128, 128, 128, 1.0)';
// Count a number of each label type
var labelCounter = {
"CurbRamp": 0,
@@ -9,7 +9,6 @@ function InitializeSubmittedLabels(map, self, url, params) {
"SurfaceProblem": 0,
"NoSidewalk": 0
};
-
for (var i = data.features.length - 1; i >= 0; i--) {
labelCounter[data.features[i].properties.label_type] += 1;
}
@@ -29,13 +28,12 @@ function InitializeSubmittedLabels(map, self, url, params) {
if (params.choroplethType === 'userDash') {
handleInitilizationComplete(map);
}
- } else { // label map
+ } else { // When loading label map.
document.getElementById("map-legend-other").innerHTML = "<svg width='20' height='20'><circle r='6' cx='10' cy='10' fill='" + colorMapping['Other'].fillStyle + "' stroke='" + colorMapping['Other'].strokeStyle + "'></svg>";
document.getElementById("map-legend-occlusion").innerHTML = "<svg width='20' height='20'><circle r='6' cx='10' cy='10' fill='" + colorMapping['Other'].fillStyle + "' stroke='" + colorMapping['Occlusion'].strokeStyle + "'></svg>";
// Create layers for each of the 42 different label-severity combinations
for (var i = 0; i < data.features.length; i++) {
var labelType = data.features[i].properties.label_type;
-
if (data.features[i].properties.severity === 1) {
self.allLayers[labelType][1].push(data.features[i]);
} else if (data.features[i].properties.severity === 2) {
@@ -63,7 +61,7 @@ function InitializeSubmittedLabels(map, self, url, params) {
});
function onEachLabelFeature(feature, layer) {
- if (params.choroplethType === 'labelMap' || params.choroplethType === 'AdminUser') {
+ if (params.choroplethType === 'labelMap' || params.choroplethType === 'adminUser') {
layer.on('click', function () {
self.adminGSVLabelView.showLabel(feature.properties.label_id);
});
@@ -75,7 +73,7 @@ function InitializeSubmittedLabels(map, self, url, params) {
layer.setRadius(5);
}
})
- } else { // user dash
+ } else { // When on user dash.
if (feature.properties && feature.properties.type) {
layer.bindPopup(feature.properties.type);
}
@@ -95,7 +93,6 @@ function InitializeSubmittedLabels(map, self, url, params) {
};
function createLayer(data) {
- console.log("test");
return L.geoJson(data, {
pointToLayer: function (feature, latlng) {
var style = $.extend(true, {}, geojsonMarkerOptions);
| 11 |
diff --git a/lib/hooks/helpers/private/load-helpers.js b/lib/hooks/helpers/private/load-helpers.js @@ -63,6 +63,7 @@ module.exports = function loadHelpers(sails, done) {
throw flaverr({
code: 'E_FAILED_TO_BUILD_CALLABLE',
identity: helperDef.identity,
+ loadedFrom: identity,
raw: err
}, err);
}
@@ -74,7 +75,7 @@ module.exports = function loadHelpers(sails, done) {
// errors through the hook callback, which will cause Sails to halt lifting.
if (flaverr.taste('E_FAILED_TO_BUILD_CALLABLE', err)) {
return done(flaverr({
- message: 'Failed to load helper `' + err.identity +'` into a Callable! '+err.message
+ message: 'Failed to load helper `' + err.loadedFrom +'` into a Callable! '+err.message
}, err));
} else {
return done(err);
| 7 |
diff --git a/lib/plugins/output-filter/docker-log-enrichment.js b/lib/plugins/output-filter/docker-log-enrichment.js @@ -63,7 +63,7 @@ module.exports = function enrichDockerLogs (context, config, eventEmitter, data,
name: context.container_name,
image: {
name: imageName,
- version: imageVersion
+ tag: imageVersion
},
host: {
hostname: process.env.SPM_REPORTED_HOSTNAME
| 10 |
diff --git a/articles/connections/index.md b/articles/connections/index.md @@ -3,62 +3,6 @@ url: /identityproviders
description: Auth0 is an identity hub that supports the many authentication providers listed here.
---
-<style>
-.connections-container {
- display: flex;
- justify-content: space-between;
- flex-wrap: wrap;
-}
-.connections-container:after {
- content: '';
- flex: auto;
-}
-.connection {
- padding: 24px 15px;
- border: 1px solid rgba(0, 0, 0, 0.1);
- flex-basis: 23%;
- margin-bottom: 16px;
- margin-right: 2.6666666%;
- overflow: hidden;
- transition: transform 0.2s, border 0.2s;
-}
-.connection:nth-child(4n) {
- margin-right: 0;
-}
-@media (max-width: 768px) {
- .connection {
- flex-basis: 48%;
- margin-right: 4%;
- }
- .connection:nth-child(2n){
- margin-right: 0;
- }
-}
-.connection.connection-public:hover {
- border: 1px solid rgb(10, 132, 174);
- transform: scale(1.02);
-}
-.connection-content {
- text-align: center;
-}
-
-.connection-title {
- font-size: 18px;
- margin-top: 16px;
- margin-bottom: 0;
- line-height: 1.2em;
-}
-
-.connection-image-wrap {
- display: inline-block;
- vertical-align: middle;
-}
-.connection-image-wrap img {
- max-height: 60px;
- max-width: 60px;
-}
-</style>
-
# Identity Providers Supported by Auth0
An Identity Provider is a server that can provide identity information to other servers. For example, Google is an Identity Provider. If you log in to a site using your Google account, then a Google server will send your identity information to that site.
| 2 |
diff --git a/lib/windshaft/renderers/pg_mvt/factory.js b/lib/windshaft/renderers/pg_mvt/factory.js @@ -97,143 +97,9 @@ PgMvtFactory.prototype = {
_.extend(dbParams, mapConfig.getLayerDatasource(layer));
var pgSQL = sql(dbParams, this.sqlClass);
- // TODO we don't really need such params
- fetchMapConfigAttributes(pgSQL, layerObj, function (err, params) {
- if (err) {
- return callback(err);
- }
var RendererClass = formatToRenderer[format];
- callback(null, new RendererClass(layerObj, pgSQL, params, layer));
- });
+ callback(null, new RendererClass(layerObj, pgSQL, {}, layer));
}
};
-
-
-//
-// check layer and raise an exception is some error is found
-//
-// @throw Error if missing or malformed CartoCSS
-//
-function _checkLayerAttributes(layerConfig) {
- var cartoCSS = layerConfig.options.cartocss;
- if (!cartoCSS) {
- throw new Error("cartocss can't be undefined");
- }
- var checks = ['steps', 'resolution', 'column', 'countby'];
- return attrsFromCartoCSS(cartoCSS, checks);
-}
-
-// returns an array of errors if the mapconfig is not supported or contains errors
-// errors is empty is the configuration is ok
-// dbParams: host, dbname, user and pass
-// layer: optional, if is specified only a layer is checked
-function fetchMapConfigAttributes(sql, layer, callback) {
- // check attrs
- var attrs;
- try {
- attrs = _checkLayerAttributes(layer);
- } catch (e) {
- return callback(e);
- }
-
- // fetch layer attributes to check the query and so on is ok
- var layer_sql = layer.options.sql;
- fetchLayerAttributes(sql, layer_sql, attrs, function(err, layerAttrs) {
- if (err) {
- return callback(err);
- }
- callback(null, _.extend(attrs, layerAttrs));
- });
-}
-
-function fetchLayerAttributes(sql, layer_sql, attrs, callback) {
- var is_time;
-
- layer_sql = SubstitutionTokens.replace(layer_sql, {
- bbox: 'ST_MakeEnvelope(0,0,0,0)',
- scale_denominator: '0',
- pixel_width: '1',
- pixel_height: '1',
- var_zoom: '0',
- var_bbox: '[-20037508.34,-20037508.34,20037508.34,20037508.34]',
- var_x: '0',
- var_y: '0'
- });
-
- step(
-
- //
- // first step, fetch the schema to know if torque colum is time column
- //
- function fetchSqlSchema() {
- var query = format("select * from ({sql}) __torque_wrap_sql limit 0", { sql: layer_sql });
- sql(query, this);
- },
-
- //
- // second step, get time bounds to calculate step
- //
- function fetchProps(err, data) {
- if (err) {
- throw err;
- }
- if ( ! data ) {
- debug("ERROR: layer query '" + layer_sql + "' returned no data");
- throw new Error("Layer query returned no data");
- }
- if ( ! data.fields.hasOwnProperty(attrs.column) ) {
- debug("ERROR: layer query " + layer_sql + " does not include time-attribute column '" + attrs.column + "'");
- throw new Error("Layer query did not return the requested time-attribute column '" + attrs.column + "'");
- }
- is_time = data.fields[attrs.column].type === 'date';
- var column_conv = attrs.column;
- var max_tmpl, min_tmpl;
- if (is_time){
- max_tmpl = "date_part('epoch', max({column}))";
- min_tmpl = "date_part('epoch', min({column}))";
- column_conv = format("date_part('epoch', {column})", attrs);
- } else {
- max_tmpl = "max({column})";
- min_tmpl = "min({column})";
- }
-
- var max_col = format(max_tmpl, { column: attrs.column });
- var min_col = format(min_tmpl, { column: attrs.column });
- var sql_stats = " SELECT " +
- "count(*) as num_steps, " +
- "{max_col} max_date, " +
- "{min_col} min_date FROM ({sql}) __torque_wrap_sql ";
-
- var query = format(sql_stats, {
- max_col: max_col,
- min_col: min_col,
- column: column_conv,
- sql: layer_sql
- });
- sql(query, this);
- },
-
- //
- // prepare metadata needed to render the tiles
- //
- function generateMetadata(err, data) {
- if(err) {
- if ( err.message ) {
- err.message = 'TorqueRenderer: ' + err.message;
- }
- return callback(err);
- }
- data = data.rows[0];
- var step = (data.max_date - data.min_date + 1)/Math.min(attrs.steps, data.num_steps>>0);
- step = Math.abs(step) === Infinity ? 0 : step;
- callback(null, {
- start: data.min_date,
- end: data.max_date,
- step: step || 1,
- data_steps: data.num_steps >> 0,
- is_time: is_time
- });
- });
-}
| 8 |
diff --git a/public/javascripts/SVValidate/mobile/mobileValidate.css b/public/javascripts/SVValidate/mobile/mobileValidate.css .validation-button {
height: 70px;
background-color: white;
- margin-right: 2px;
- border-radius: 5px;
- border-width: 2px;
- border-color: lightgrey;
- width: 243px;
+ border-radius: 25px;
+ border-width: 3px;
+ border-color: #2C293E;
+ width: 260px;
font-size: 40px;
}
| 7 |
diff --git a/articles/appliance/cli/configure-cli.md b/articles/appliance/cli/configure-cli.md @@ -36,6 +36,37 @@ Usage: a0cli [options] <command>
-p, --port <number> Port number of appliance instance. Default port: 10121
```
+However, if you have keys defined and you've run `update-commands`, you will see an extended list of commands:
+
+```text
+Usage: a0cli [options] <command>
+
+
+ Commands:
+
+ create-key Creates private/public keys pair on current path.
+ show-key Shows public key on current path.
+ delete-key Deletes keys pair from current path.
+ update-commands Retrieve availables commands from the specified node.
+ backup <password> Creates a new backup.
+ backup-delete Deletes the current backup
+ backup-retrieve retrieves the current backup.
+ backup-status Retrieves the status of the node backup.
+ nslookup <host> Performs an nslookup to a specified <host> from the target node.
+ ping Sends a PING message to verify if the target node is up.
+ re-up <host> Updates the host entries for instances in the database cluster. Example a0-1:10.1.0.21, a0-2:10.1.0.22
+ set-as-backup [device] [force] Add the backup role to the target node.
+ test-port <host> <port> Verifies if the target ip can listen <port> on <host>.
+
+ Options:
+
+ -h, --help output usage information
+ -V, --version output the version number
+ -t, --target <ip> Host name or IP address of appliance instance.
+ -p, --port <number> Port number of appliance instance. Default port: 10121
+```
+
+
> Because the CLI sends commands to the server running on each Appliance's node, please ensure that the server is both available and can accept inbound and outbound connections to port `10121`.
## Granting Access Rights to Users
| 0 |
diff --git a/core/worker/lib/subpipeline/subpipeline.js b/core/worker/lib/subpipeline/subpipeline.js @@ -154,7 +154,8 @@ class SubPipelineHandler {
algoRunnerCommunication.send({
command: messages.outgoing.subPipelineStopped,
data: {
- subPipelineId
+ subPipelineId,
+ reason: result.reason
}
});
}
| 7 |
diff --git a/app/core/router.js b/app/core/router.js @@ -18,6 +18,7 @@ var beforeUnloads = {};
export default Backbone.Router.extend({
routes: {},
+ originalPageTitle: window.document.title,
beforeUnload: function (name, fn) {
beforeUnloads[name] = fn;
@@ -44,6 +45,17 @@ export default Backbone.Router.extend({
if (continueNav) {
Backbone.Router.prototype.navigate(fragment, options);
+ this.updateWindowTitle(fragment);
+ }
+ },
+
+ updateWindowTitle: function(fragment) {
+ if (fragment.startsWith('#/')) {
+ window.document.title = this.originalPageTitle + ' - ' + fragment.substring(2);
+ } else if (fragment.startsWith('/') || fragment.startsWith('#')) {
+ window.document.title = this.originalPageTitle + ' - ' + fragment.substring(1);
+ } else {
+ window.document.title = this.originalPageTitle + ' - ' + fragment;
}
},
| 3 |
diff --git a/runtime.js b/runtime.js @@ -7,6 +7,7 @@ import {VOXLoader} from './VOXLoader.js';
// import {GLTFExporter} from './GLTFExporter.js';
import {getExt, mergeMeshes} from './util.js';
// import {bake} from './bakeUtils.js';
+// import geometryManager from './geometry-manager.js';
import {rigManager} from './rig.js';
import {makeIconMesh, makeTextMesh} from './vr-ui.js';
import {renderer, appManager} from './app-object.js';
@@ -14,6 +15,7 @@ import wbn from './wbn.js';
// import {storageHost} from './constants.js';
const runtime = {};
+let nextPhysicsId = 0;
const textDecoder = new TextDecoder();
const gltfLoader = new GLTFLoader();
@@ -487,6 +489,57 @@ const _loadWebBundle = async file => {
return mesh;
};
+const _loadScn = async (file, opts) => {
+ let u = file.url || URL.createObjectURL(file);
+ if (/^\.\//.test(u)) {
+ u = new URL(u, location.href).href;
+ }
+
+ const res = await fetch(u);
+ const j = await res.json();
+ const {objects} = j;
+
+ const scene = new THREE.Object3D();
+ const physicsBuffers = [];
+ let physicsIds = [];
+
+ for (const object of objects) {
+ let {name, position = [0, 0, 0], quaternion = [0, 0, 0, 1], scale = [1, 1, 1], start_url, physics_url} = object;
+ start_url = new URL(start_url, u).href;
+ if (physics_url) {
+ physics_url = new URL(physics_url, u).href;
+ }
+
+ const res = await fetch(start_url);
+ const blob = await res.blob();
+ blob.name = start_url;
+ const mesh = await runtime.loadFile(blob, opts);
+ mesh.position.fromArray(position);
+ mesh.quaternion.fromArray(quaternion);
+ mesh.scale.fromArray(scale);
+ scene.add(mesh);
+
+ if (physics_url) {
+ const res = await fetch(physics_url);
+ let physicsBuffer = await res.arrayBuffer();
+ physicsBuffer = new Uint8Array(physicsBuffer);
+ physicsBuffers.push(physicsBuffer);
+ }
+ }
+ scene.run = ({geometryManager}) => {
+ physicsIds = physicsBuffers.map(physicsBuffer => {
+ const physicsId = ++nextPhysicsId;
+ geometryManager.geometryWorker.addCookedGeometryPhysics(geometryManager.physics, physicsBuffer, physicsId);
+ });
+ };
+ scene.destroy = ({geometryManager}) => {
+ for (const physicsId of physicsIds) {
+ geometryManager.geometryWorker.removeGeometryPhysics(geometryManager.physics, physicsId);
+ }
+ physicsIds.length = 0;
+ };
+ return scene;
+};
const _loadLink = async file => {
const href = await file.text();
@@ -581,7 +634,6 @@ const _loadLink = async file => {
const timeDiff = now - inRangeStart;
if (timeDiff >= 2000) {
renderer.setAnimationLoop(null);
- window.location.href = url;
window.location.href = href;
}
} else {
@@ -618,6 +670,9 @@ runtime.loadFile = async (file, opts) => {
case 'wbn': {
return await _loadWebBundle(file, opts);
}
+ case 'scn': {
+ return await _loadScn(file, opts);
+ }
case 'url': {
return await _loadLink(file, opts);
}
| 0 |
diff --git a/src/modules/auth/actions/login-with-metamask.js b/src/modules/auth/actions/login-with-metamask.js @@ -12,15 +12,32 @@ export const loginWithMetaMask = (callback = logError) => dispatch => {
dispatch(useUnlockedAccount(account));
callback(null, account);
};
+
+ if (!windowRef.ethereum || !windowRef.ethereum.isMetaMask) {
+ throw new Error("Please install MetaMask.");
+ }
+
+ windowRef.ethereum.on("accountsChanged", account => success(first(account)));
+
augur.rpc.eth.accounts((err, accounts) => {
const account = first(accounts);
if (err) return failure();
if (account) {
success(account);
} else {
+ // Handle connecting, per EIP 1102 */
windowRef.ethereum
- .enable()
- .then(resolve => success(first(resolve)), failure);
+ .send("eth_requestAccounts")
+ .then(account => success(first(account)))
+ .catch(err => {
+ if (err.code === 4001) {
+ // EIP 1193 userRejectedRequest error
+ console.log("Please connect to MetaMask.");
+ } else {
+ console.error(err);
+ }
+ failure();
+ });
}
});
};
| 4 |
diff --git a/sparta_main.go b/sparta_main.go @@ -423,10 +423,12 @@ func MainEx(serviceName string,
return validateErr
}
// Format?
+ prettyHeader := false
var formatter logrus.Formatter
switch OptionsGlobal.LogFormat {
case "text", "txt":
formatter = &logrus.TextFormatter{}
+ prettyHeader = true
case "json":
formatter = &logrus.JSONFormatter{}
}
@@ -436,8 +438,22 @@ func MainEx(serviceName string,
}
OptionsGlobal.Logger = logger
- welcomeMessage := fmt.Sprintf("Welcome to %s", serviceName)
+ welcomeMessage := fmt.Sprintf("Service: %s", serviceName)
logger.Info(headerDivider)
+
+ if prettyHeader {
+ logger.Info(fmt.Sprintf(` _______ ___ ___ _________ `))
+ logger.Info(fmt.Sprintf(` / __/ _ \/ _ | / _ \/_ __/ _ | Version : %s`, SpartaVersion))
+ logger.Info(fmt.Sprintf(` _\ \/ ___/ __ |/ , _/ / / / __ | SHA : %s`, SpartaGitHash[0:7]))
+ logger.Info(fmt.Sprintf(`/___/_/ /_/ |_/_/|_| /_/ /_/ |_| GoVersion: %s`, runtime.Version()))
+ logger.Info("")
+ logger.Info(headerDivider)
+ logger.WithFields(logrus.Fields{
+ "Option": cmd.Name(),
+ "UTC": (time.Now().UTC().Format(time.RFC3339)),
+ "LinkFlags": OptionsGlobal.LinkerFlags,
+ }).Info(welcomeMessage)
+ } else {
logger.WithFields(logrus.Fields{
"Option": cmd.Name(),
"SpartaVersion": SpartaVersion,
@@ -446,6 +462,7 @@ func MainEx(serviceName string,
"UTC": (time.Now().UTC().Format(time.RFC3339)),
"LinkFlags": OptionsGlobal.LinkerFlags,
}).Info(welcomeMessage)
+ }
logger.Info(headerDivider)
return nil
}
| 0 |
diff --git a/kamu/common_settings.py b/kamu/common_settings.py @@ -76,7 +76,6 @@ STATICFILES_DIRS = [
WEBPACK_LOADER = {
'DEFAULT': {
'BUNDLE_DIR_NAME': 'bundles/',
- 'STATS_FILE': os.path.join(BASE_DIR, 'webpack-stats.json'),
'IGNORE': []
}
}
| 2 |
diff --git a/backend/columnar.js b/backend/columnar.js @@ -734,6 +734,7 @@ function encodeChange(changeObj) {
}
function decodeChangeColumns(buffer) {
+ if (buffer[8] === CHUNK_TYPE_DEFLATE) buffer = inflateChange(buffer)
const decoder = new Decoder(buffer)
const header = decodeContainerHeader(decoder, true)
const chunkDecoder = new Decoder(header.chunkData)
@@ -762,7 +763,6 @@ function decodeChangeColumns(buffer) {
* Decodes one change in binary format into its JS object representation.
*/
function decodeChange(buffer) {
- if (buffer[8] === CHUNK_TYPE_DEFLATE) buffer = inflateChange(buffer)
const change = decodeChangeColumns(buffer)
change.ops = decodeOps(decodeColumns(change.columns, change.actorIds, CHANGE_COLUMNS), false)
delete change.actorIds
| 11 |
diff --git a/test/functional/localConfig.json b/test/functional/localConfig.json "desktop": {
"testsFolder": "test/functional/specs/desktop/",
"browser": [
- "chrome"
+ "chrome", "safari"
],
"saucelabs": [
"saucelabs:[email protected]:OS X 10.10"
"testClass": "",
"testName": "",
"skipCriticalConsoleJsErrors": true,
- "quarantineMode": false,
+ "quarantineMode": true,
"selectorTimeOut": 5000,
"assertionTimeout": 5000,
"concurrency": 2
"concurrency": 10
}
}
+
\ No newline at end of file
| 13 |
diff --git a/web-stories.php b/web-stories.php * Plugin URI: https://wp.stories.google/
* Author: Google
* Author URI: https://opensource.google.com/
- * Version: 1.5.0-alpha
+ * Version: 1.5.0-rc.1
* Requires at least: 5.3
* Requires PHP: 5.6
* Text Domain: web-stories
@@ -40,7 +40,7 @@ if ( ! defined( 'ABSPATH' ) ) {
exit;
}
-define( 'WEBSTORIES_VERSION', '1.5.0-alpha' );
+define( 'WEBSTORIES_VERSION', '1.5.0-rc.1' );
define( 'WEBSTORIES_DB_VERSION', '3.0.6' );
define( 'WEBSTORIES_AMP_VERSION', '2.1.0-alpha' ); // Version of the AMP library included in the plugin.
define( 'WEBSTORIES_PLUGIN_FILE', __FILE__ );
| 6 |
diff --git a/assets/src/edit-story/components/panels/link/index.js b/assets/src/edit-story/components/panels/link/index.js @@ -30,7 +30,7 @@ import { __ } from '@wordpress/i18n';
* Internal dependencies
*/
import { useDebouncedCallback } from 'use-debounce';
-import { Media, Row, Button, LinkInput } from '../../form';
+import { Media, Row, Button, LinkInput, MULTIPLE_VALUE } from '../../form';
import { createLink } from '../../elementLink';
import { useAPI } from '../../../app/api';
import { isValidUrl, toAbsoluteUrl, withProtocol } from '../../../utils/url';
@@ -85,7 +85,6 @@ function LinkPanel({ selectedElements, pushUpdateForObject }) {
}));
const { getElementsInAttachmentArea } = useElementsWithLinks();
- console.log(getElementsInAttachmentArea(selectedElements));
const hasElementsInAttachmentArea =
getElementsInAttachmentArea(selectedElements).length > 0;
@@ -139,6 +138,10 @@ function LinkPanel({ selectedElements, pushUpdateForObject }) {
clearEditing();
if (properties.url) {
+ // Don't submit any changes in case of multiple value.
+ if (MULTIPLE_VALUE === properties.url) {
+ return false;
+ }
const urlWithProtocol = withProtocol(properties.url);
const valid = isValidUrl(urlWithProtocol);
setIsInvalidUrl(!valid);
@@ -183,7 +186,11 @@ function LinkPanel({ selectedElements, pushUpdateForObject }) {
setDisplayLinkGuidelines(false);
}}
onFocus={() => {
- if (hasElementsInAttachmentArea && !hasLinkSet) {
+ // Display the guidelines if there's no link / if it's multiple value.
+ if (
+ hasElementsInAttachmentArea &&
+ (!hasLinkSet || link.url === MULTIPLE_VALUE)
+ ) {
setDisplayLinkGuidelines(true);
}
}}
| 9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.