code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/src/index.js b/src/index.js @@ -406,6 +406,7 @@ class Offline {
// skip HEAD routes as hapi will fail with 'Method name not allowed: HEAD ...'
// for more details, check https://github.com/dherault/serverless-offline/issues/204
if (routeMethod === 'HEAD') {
+ this.serverlessLog('HEAD method event detected. Skipping HAPI server route mapping ...');
return;
}
| 0 |
diff --git a/elements/loading-helpers/demo/index.html b/elements/loading-helpers/demo/index.html <meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>LoadingHelpers: loading-helpers Demo</title>
- <script src="../../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
- <script src="../../../node_modules/@lrnwebcomponents/deduping-fix/deduping-fix.js"></script>
- <script src="../../../node_modules/web-animations-js/web-animations-next-lite.min.js"></script>
<link rel="stylesheet" type="text/css" crossorigin="anonymous" href="../lib/loading-styles.css"/>
<style is="custom-style" include="demo-pages-shared-styles"></style>
<style>
height: 46px;
width: 854px;
}
- other-count[laser-loader]:not(:defined) {
+ other-count:not(:defined) {
width: max-content;
+ display: block;
}
</style>
</head>
<h3>Basic loading-helpers demo</h3>
<demo-snippet>
<template>
- <word-count laser-loader>will replace</word-count>
- <word-count laser-loader>will replace</word-count>
- <word-count laser-loader>will replace and will scale as it wants to</word-count>
- <word-count laser-loader popup-loader>will replace</word-count>
- <word-count laser-loader>will replace</word-count>
- <other-count laser-loader>This wont replace</other-count>
+ <word-count>will replace</word-count>
+ <word-count>will replace</word-count>
+ <word-count>will replace and will scale as it wants to</word-count>
+ <word-count popup-loader>will replace</word-count>
+ <word-count popup-loader>will replace</word-count>
+ <other-count laser-loader popup-loader>This wont replace</other-count>
+ <meme-maker></meme-maker>
</template>
</demo-snippet>
</div>
<h2 id="loading"></h2>
</body>
+ <script src="../../loading-helpers/lib/loading-styles.js"></script>
+ <script src="../../../node_modules/@lrnwebcomponents/deduping-fix/deduping-fix.js"></script>
+ <script src="../../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
+ <script src="../../../node_modules/web-animations-js/web-animations-next-lite.min.js"></script>
<script type="module" async>
import '@polymer/iron-demo-helpers/demo-pages-shared-styles.js';
import '@polymer/iron-demo-helpers/demo-snippet.js';
- import '../loading-helpers.js';
+ window.WCRegistryLoaderCSS(true);
+ setTimeout(() => {
+ import("@lrnwebcomponents/word-count/word-count.js");
+ setTimeout(() => {
+ import("@lrnwebcomponents/meme-maker/meme-maker.js");
+ }, 1000);
+ }, 1000);
+
+ // purely for the demo to visualize the tag counts as loaded vs total
window.globalElCount = 0;
window.globalElTotal = 0;
- // for the demo use case
- // load all undefined tags
setTimeout(() => {
- const undefinedElements = document.body.querySelectorAll('*[laser-loader]:not(:defined)');
+ const undefinedElements = document.body.querySelectorAll('*:not(:defined)');
// resolve their promise
const promises = [...undefinedElements].map(
el => {
- el.style.setProperty("--laserEdgeAni-width", Math.round(el.getBoundingClientRect().width) + "px");
- el.style.setProperty("--laserEdgeAni-height", Math.round(el.getBoundingClientRect().height) + "px");
customElements.whenDefined(el.localName).then((response) => {
- // this would be a way of doing loading state on ANYTHING without definition
- el.setAttribute("loaded", true);
window.globalElCount++;
document.getElementById("loading").innerHTML = window.globalElCount + "/" + window.globalElTotal + " elements loaded";
});
window.globalElTotal = undefinedElements.length;
document.getElementById("loading").innerHTML = window.globalElCount + "/" + window.globalElTotal + " elements loaded";
}, 0);
- setTimeout(() => {
- import("@lrnwebcomponents/word-count/word-count.js");
- }, 2000);
</script>
</html>
| 7 |
diff --git a/contribs/gmf/apps/mobile_alt/index.html b/contribs/gmf/apps/mobile_alt/index.html module.constant('gmfSearchGroups', []);
// Requires that the gmfSearchGroups is specified
module.constant('gmfSearchActions', []);
+ module.constant('gmfTreeManagerModeFlush', false);
module.value('ngeoWfsPermalinkOptions',
/** @type {ngeox.WfsPermalinkOptions} */ ({
url: 'https://geomapfish-demo.camptocamp.net/2.2/wsgi/mapserv_proxy',
| 12 |
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml @@ -29,14 +29,7 @@ jobs:
- uses: errata-ai/vale-action@reviewdog
with:
files: '[
- "docs/apis",
- "docs/community",
- "docs/dapps",
- "docs/nodes",
- "docs/overview",
- "docs/quickstart",
- "docs/specs",
- "docs/subnets",
+ "docs/",
"README.md",
"style-checker-notes.md",
"style-guide.md"
| 12 |
diff --git a/web/pdf_find_controller.js b/web/pdf_find_controller.js @@ -312,18 +312,17 @@ var PDFFindController = (function PDFFindControllerClosure() {
this.pageMatches = [];
this.matchCount = 0;
this.pageMatchesLength = null;
- var self = this;
- for (var i = 0; i < numPages; i++) {
+ for (let i = 0; i < numPages; i++) {
// Wipe out any previous highlighted matches.
this.updatePage(i);
// As soon as the text is extracted start finding the matches.
if (!(i in this.pendingFindMatches)) {
this.pendingFindMatches[i] = true;
- this.extractTextPromises[i].then(function(pageIdx) {
- delete self.pendingFindMatches[pageIdx];
- self.calcFindMatch(pageIdx);
+ this.extractTextPromises[i].then((pageIdx) => {
+ delete this.pendingFindMatches[pageIdx];
+ this.calcFindMatch(pageIdx);
});
}
}
| 14 |
diff --git a/README.md b/README.md @@ -229,7 +229,7 @@ e.g. after a change to the configuration.
```js
const webpack = require('webpack');
const compiler = webpack({ ... });
-const middlware = require('webpack-dev-middleware');
+const middleware = require('webpack-dev-middleware');
const instance = middleware(compiler);
app.use(instance);
@@ -261,7 +261,7 @@ valid at the time of calling, the callback is executed immediately.
```js
const webpack = require('webpack');
const compiler = webpack({ ... });
-const middlware = require('webpack-dev-middleware');
+const middleware = require('webpack-dev-middleware');
const instance = middleware(compiler);
app.use(instance);
@@ -292,7 +292,7 @@ Example Implementation:
```js
const webpack = require('webpack');
const compiler = webpack({ ... });
-const middlware = require('webpack-dev-middleware');
+const middleware = require('webpack-dev-middleware');
// This function makes server rendering of asset references consistent with different webpack chunk/entry configurations
function normalizeAssets(assets) {
| 1 |
diff --git a/src/lib/analytics/analytics.js b/src/lib/analytics/analytics.js @@ -130,6 +130,7 @@ export const initAnalytics = async () => {
Sentry: isSentryEnabled,
Amplitude: isAmplitudeEnabled,
Mautic: isMauticEnabled,
+ Google: isGoogleAnalyticsEnabled,
})
patchLogger()
| 0 |
diff --git a/src/enforcers/OpenApi.js b/src/enforcers/OpenApi.js @@ -155,8 +155,7 @@ module.exports = {
return operation.response(code, body, headers)
};
result.value.pathKey = pathKey;
- }
- if (result.error && result.error.hasException) {
+ } else {
result.error.statusCode = 400;
result.error.operation = operation;
result.error.pathKey = pathObject.pathKey
| 2 |
diff --git a/contracts/Synthetix.sol b/contracts/Synthetix.sol @@ -388,7 +388,6 @@ contract Synthetix is ExternStateToken {
* @param sourceCurrencyKey The source currency you wish to exchange from
* @param sourceAmount The amount, specified in UNIT of source currency you wish to exchange
* @param destinationCurrencyKey The destination currency you wish to obtain.
- * @param destinationAddress Deprecated. Will always send to messageSender. API backwards compatability maintained.
* @return Boolean that indicates whether the transfer succeeded or failed.
*/
function exchange(bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey)
| 2 |
diff --git a/test/benchmark/promises/shared.js b/test/benchmark/promises/shared.js @@ -51,7 +51,7 @@ var tests = [
function longThrowToEnd(Promise) {
return function runTest(agent, cb) {
- var prom = Promise.resolve()
+ var prom = Promise.reject()
for (var i = 0; i < NUM_PROMISES - 1; ++i) {
prom = prom.then(function() {})
}
@@ -71,7 +71,7 @@ var tests = [
function promiseReturningPromise(Promise) {
return function runTest(agent, cb) {
var promises = []
- for (var i = 0; i < NUM_PROMISES; ++i) {
+ for (var i = 0; i < NUM_PROMISES / 2; ++i) {
promises.push(
new Promise(function(resolve, reject) {
resolve(new Promise(function(res, rej) {
@@ -87,7 +87,7 @@ var tests = [
function thenReturningPromise(Promise) {
return function runTest(agent, cb) {
var prom = Promise.resolve()
- for (var i = 0; i < NUM_PROMISES; ++i) {
+ for (var i = 0; i < NUM_PROMISES / 2; ++i) {
var prom = prom.then(function() {
return new Promise(function(res) {
setImmediate(res)
| 4 |
diff --git a/js/ui/pages/trackers.es6.js b/js/ui/pages/trackers.es6.js @@ -67,7 +67,7 @@ Trackers.prototype = $.extend({},
model: new SiteModel({
domain: '-',
isWhitelisted: false,
- siteRating: 'B',
+ siteRating: '',
trackerCount: 0
}),
appendTo: this.$parent,
| 2 |
diff --git a/app-manager.js b/app-manager.js @@ -243,14 +243,14 @@ class AppManager extends EventTarget {
this.addApp(app);
- const _bindRender = () => {
+ /* const _bindRender = () => {
// unFrustumCull(app);
if (app.renderOrder === -Infinity) {
sceneHighPriority.add(app);
}
};
- _bindRender();
+ _bindRender(); */
this.bindTrackedApp(trackedApp, app);
| 2 |
diff --git a/src/components/ConfirmModal.js b/src/components/ConfirmModal.js @@ -61,6 +61,7 @@ const ConfirmModal = props => (
<TouchableOpacity
style={[styles.button, styles.buttonSuccess, styles.mt4]}
onPress={props.onConfirm}
+ focusable={false}
>
<Text
style={[
@@ -75,6 +76,7 @@ const ConfirmModal = props => (
<TouchableOpacity
style={[styles.button, styles.mt3]}
onPress={props.onCancel}
+ focusable={false}
>
<Text style={styles.buttonText}>
{props.cancelText}
| 12 |
diff --git a/sirepo/package_data/static/js/warpvnd.js b/sirepo/package_data/static/js/warpvnd.js @@ -384,14 +384,14 @@ SIREPO.app.controller('SourceController', function (appState, frameCache, panelS
function updateSimulationMode() {
var isNotStl = ! appState.models.simulation.conductorFile;
panelState.showField('simulationGrid', 'simulation_mode', warpvndService.allow3D() && isNotStl);
- var is3d = appState.models.simulationGrid.simulation_mode == '3d' && ranIn3d;
+ var is3d = appState.models.simulationGrid.simulation_mode == '3d';
['channel_height', 'num_y'].forEach(function(f) {
panelState.showField('simulationGrid', f, is3d);
});
panelState.showField('box', 'yLength', is3d);
panelState.showField('conductorPosition', 'yCenter', is3d);
- panelState.showField('fieldCalcAnimation', 'axes', is3d);
- panelState.showEnum(warpvndService.activeComparisonReport(), 'dimension', 'y', is3d);
+ panelState.showField('fieldCalcAnimation', 'axes', is3d && ranIn3d);
+ panelState.showEnum(warpvndService.activeComparisonReport(), 'dimension', 'y', is3d && ranIn3d);
}
self.isWaitingForSTL = false;
| 11 |
diff --git a/README.md b/README.md @@ -10,6 +10,13 @@ npm ci
```
### Compiles and hot-reloads for development
+- Create a .env.local file with this content:
+```
+ VUE_APP_LEDGER_BRIDGE_URL=https://liquality.github.io/ledger-web-bridge/dist
+ VUE_APP_AGENT_TESTNET_URL=https://liquality.io/swap-testnet-dev/agent
+ VUE_APP_AGENT_MAINNET_URL=https://liquality.io/swap/agent
+```
+- Run the local build
```
npm run dev
```
| 3 |
diff --git a/Source/Core/SphereOutlineGeometry.js b/Source/Core/SphereOutlineGeometry.js /*global define*/
define([
'./Cartesian3',
+ './Check',
'./defaultValue',
'./defined',
'./DeveloperError',
'./EllipsoidOutlineGeometry'
], function(
Cartesian3,
+ Check,
defaultValue,
defined,
DeveloperError,
@@ -68,9 +70,7 @@ define([
*/
SphereOutlineGeometry.pack = function(value, array, startingIndex) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(value)) {
- throw new DeveloperError('value is required');
- }
+ Check.typeOf.object(value, 'value');
//>>includeEnd('debug');
return EllipsoidOutlineGeometry.pack(value._ellipsoidGeometry, array, startingIndex);
| 14 |
diff --git a/includes/Modules/Analytics.php b/includes/Modules/Analytics.php @@ -964,13 +964,7 @@ final class Analytics extends Module
$dimension_filters = $data['dimensionFilters'];
$dimension_filter_instances = array();
- if ( ! empty( $dimension_filters ) && ( is_string( $dimension_filters ) || is_array( $dimension_filters ) ) ) {
- if ( is_string( $dimension_filters ) ) {
- $dimension_filters = explode( ',', $dimension_filters );
- } elseif ( is_array( $dimension_filters ) && ! wp_is_numeric_array( $dimension_filters ) ) { // If single object is passed.
- $dimension_filters = array( $dimension_filters );
- }
-
+ if ( ! empty( $dimension_filters ) && is_array( $dimension_filters ) ) {
foreach ( $request_args['dimensions'] as $dimension ) {
$dimension_name = $dimension->getName();
if ( isset( $dimension_filters[ $dimension_name ] ) ) {
| 2 |
diff --git a/packages/node_modules/@node-red/editor-client/src/js/red.js b/packages/node_modules/@node-red/editor-client/src/js/red.js @@ -418,8 +418,6 @@ var RED = (function() {
RED.notify(RED._("palette.event.nodeUpgraded", {module:msg.module,version:msg.version}),"success");
RED.nodes.registry.setModulePendingUpdated(msg.module,msg.version);
}
- // Refresh flow library to ensure any examples are updated
- RED.library.loadFlowLibrary();
});
RED.comms.subscribe("event-log/#", function(topic,payload) {
var id = topic.substring(9);
| 2 |
diff --git a/lib/shared/addon/components/cluster-driver/driver-import/template.hbs b/lib/shared/addon/components/cluster-driver/driver-import/template.hbs />
</AccordionListItem>
- <AccordionListItem
+ <!-- not removing because when we can edit the config this section will come back -->
+ <!-- <AccordionListItem
@title={{t "k3sClusterInfo.nodeInfo.title"}}
@detail={{t "k3sClusterInfo.nodeInfo.detail"}}
@expandAll={{al.expandAll}}
</div>
{{/if}}
</div>
- </AccordionListItem>
+ </AccordionListItem> -->
</AccordionList>
<TopErrors @errors={{errors}} />
| 2 |
diff --git a/app/assets/stylesheets/editor-3/public.scss b/app/assets/stylesheets/editor-3/public.scss }
.CDB-Embed-tab {
+ display: flex;
+
&:not(.is-active) {
- display: none !important;
+ display: none;
}
&.is-active {
@media (max-width: 600px) {
.CDB-Embed-content {
- flex-grow: initial;
- // 103px = header + tabs height
- height: calc(100% - 103px);
+ display: flex;
}
}
-// Override carto.js legends styles
.CDB-Embed-legends {
.CDB-Legends-canvas {
- display: block !important;
+ display: block;
position: relative;
top: 0;
left: 0;
| 2 |
diff --git a/assets/src/dashboard/icons/stories/index.js b/assets/src/dashboard/icons/stories/index.js * limitations under the License.
*/
-/**
- * Internal dependencies
- */
/**
* External dependencies
*/
import styled from 'styled-components';
-/*eslint import/namespace: ['error', { allowComputed: true }]*/
+/**
+ * Internal dependencies
+ */
+/*eslint import/namespace: [2, { allowComputed: true }]*/
import * as Icons from '..';
export default {
| 1 |
diff --git a/modules/@apostrophecms/job/index.js b/modules/@apostrophecms/job/index.js @@ -146,10 +146,10 @@ module.exports = {
for (const id of ids) {
try {
const result = await change(req, id);
- self.good(job);
+ self.success(job);
results[id] = result;
} catch (err) {
- self.bad(job);
+ self.failure(job);
}
}
good = true;
@@ -174,7 +174,7 @@ module.exports = {
// of that module.
//
// The `doTheWork` function receives `(req, reporting)` and may optionally invoke
- // `reporting.good()` and `reporting.bad()` to update the progress and error
+ // `reporting.success()` and `reporting.failure()` to update the progress and error
// counters, and `reporting.setTotal()` to indicate the total number of
// counts expected so a progress meter can be rendered. This is optional
// and an indication of progress is still displayed without it.
@@ -229,13 +229,13 @@ module.exports = {
let good = false;
try {
await doTheWork(req, {
- good (n) {
+ success (n) {
n = n || 1;
- return self.good(job, n);
+ return self.success(job, n);
},
- bad (n) {
+ failure (n) {
n = n || 1;
- return self.bad(job, n);
+ return self.failure(job, n);
},
setTotal (n) {
total = n;
@@ -323,7 +323,7 @@ module.exports = {
//
// No promise is returned as this method just updates
// the job tracking information in the background.
- good(job, n) {
+ success(job, n) {
n = n === undefined ? 1 : n;
self.db.updateOne({ _id: job._id }, {
$inc: {
@@ -344,7 +344,7 @@ module.exports = {
//
// No promise is returned as this method just updates
// the job tracking information in the background.
- bad(job, n) {
+ failure(job, n) {
n = n === undefined ? 1 : n;
self.db.updateOne({ _id: job._id }, {
$inc: {
| 10 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -9,6 +9,30 @@ To see all merged commits on the master branch that will be part of the next plo
where X.Y.Z is the semver of most recent plotly.js release.
+## [1.55.0] -- 2020-09-02
+### Added
+ - Introduce "period" `ticklabelmode` on cartesian date axes [#4993, #5055, #5060, #5065, #5088, #5089]
+ - Add new formatting options for weeks and quarters [#5026]
+ - Add `source` attribute to `image` traces for fast rendering [#5075]
+ - Add `zsmooth` attribute for discrete `heatmapgl` traces [#4953]
+ - Add horizontal and vertical markers for arrow charts [#5010]
+ - Add touch support to `rangeslider` [#5025]
+
+### Changed
+ - Improve contribution guide & readme, add code of conduct [#5068]
+ - Bump various dev-dependencies namely bubleify and glslify [#5084, #5085, #5118]
+
+### Fixed
+ - Fix updating `title` and tick labels during transition with react [#5045]
+ - Fix `table` wheel scroll for Firefox [#5051]
+ - Fix ISO-8601 short time zone format [#5015]
+ - Fix numeric periods on date axes for `bar` with `base` [#5061]
+ - Fix `bar` and `box` widths on categorical axes in "overlay" mode [#5072]
+ - Fix `symbol` numbers in string format [#5073]
+ - Fix gl2d marker sizes [#5093]
+ - Fix default latitude span in `geo` subplots [#5033]
+
+
## [1.54.7] -- 2020-07-23
### Changed
- Revert [#4904] to fix a template regression introduced in 1.54.4 [#5016]
| 3 |
diff --git a/character-controller.js b/character-controller.js @@ -1080,7 +1080,10 @@ class StaticUninterpolatedPlayer extends PlayerBase {
return this.actions;
}
getActions() {
- return this.getActionsState();
+ return this.actions;
+ }
+ getActionsArray() {
+ return this.actions;
}
getAction(type) {
return this.actions.find(action => action.type === type);
| 0 |
diff --git a/docs/source/docs/responsive-design.blade.md b/docs/source/docs/responsive-design.blade.md @@ -14,31 +14,31 @@ This is done using predefined screen sizes (media query breakpoints), each of wh
@component('_partials.responsive-code-sample')
@slot('none')
<div class="flex justify-center">
- <div class="bg-purple w-24 h-24 rounded-full"></div>
+ <div class="bg-purple text-white w-24 h-24 rounded-full text-xs font-semibold flex items-center justify-center">Tailwind</div>
</div>
@endslot
@slot('sm')
<div class="flex justify-center">
- <div class="bg-green w-24 h-24 rounded-full"></div>
+ <div class="bg-green text-white w-24 h-24 rounded-full text-xs font-semibold flex items-center justify-center">Tailwind</div>
</div>
@endslot
@slot('md')
<div class="flex justify-center">
- <div class="bg-blue w-24 h-24 rounded-full"></div>
+ <div class="bg-blue text-yellow w-24 h-24 rounded-full text-xs font-semibold flex items-center justify-center">Tailwind</div>
</div>
@endslot
@slot('lg')
<div class="flex justify-center">
- <div class="bg-red w-24 h-24 rounded-full"></div>
+ <div class="bg-red text-yellow w-24 h-24 rounded-full text-xs font-semibold flex items-center justify-center">Tailwind</div>
</div>
@endslot
@slot('xl')
<div class="flex justify-center">
- <div class="bg-orange w-24 h-24 rounded-full"></div>
+ <div class="bg-orange text-yellow w-24 h-24 rounded-full text-xs font-semibold flex items-center justify-center">Tailwind</div>
</div>
@endslot
@slot('code')
-<div class="none:bg-purple sm:bg-green md:bg-blue lg:bg-red xl:bg-orange ...">
+<div class="none:bg-purple none:text-white sm:bg-green md:bg-blue md:text-yellow lg:bg-red xl:bg-orange ...">
...
</div>
@endslot
| 7 |
diff --git a/src/core/config/OperationConfig.js b/src/core/config/OperationConfig.js @@ -892,7 +892,7 @@ const OperationConfig = {
"<br><br>",
"Supported charsets are:",
"<ul>",
- Object.keys(CharEnc.IO_FORMAT).map(e => `<li>${e}</li>`).join("<br>"),
+ Object.keys(CharEnc.IO_FORMAT).map(e => `<li>${e}</li>`).join("\n"),
"</ul>",
].join("\n"),
run: CharEnc.runEncode,
@@ -912,7 +912,7 @@ const OperationConfig = {
"<br><br>",
"Supported charsets are:",
"<ul>",
- Object.keys(CharEnc.IO_FORMAT).map(e => `<li>${e}</li>`).join("<br>"),
+ Object.keys(CharEnc.IO_FORMAT).map(e => `<li>${e}</li>`).join("\n"),
"</ul>",
].join("\n"),
run: CharEnc.runDecode,
| 7 |
diff --git a/mob-manager.js b/mob-manager.js @@ -22,6 +22,8 @@ const localMatrix = new THREE.Matrix4();
const upVector = new THREE.Vector3(0, 1, 0);
const chunkWorldSize = 30;
+const minDistance = 1;
+const hitDistance = 1.5;
const _zeroY = v => {
v.y = 0;
@@ -115,6 +117,7 @@ class Mob {
const rng = this.#getRng();
const numDrops = Math.floor(rng() * 3) + 1;
+ let lastHitTime = 0;
const _attachToApp = () => {
this.app.add(subApp);
@@ -211,9 +214,7 @@ class Mob {
}
});
- const idleAnimationClips = idleAnimation.map(name => animations.find(a => a.name === name)).filter(a => !!a);
- if (idleAnimationClips.length > 0) {
- // hacks
+ // rotation hacks
{
mesh.position.y = 0;
localEuler.setFromQuaternion(mesh.quaternion, 'YXZ');
@@ -222,6 +223,9 @@ class Mob {
mesh.quaternion.setFromEuler(localEuler);
}
+ // initialize animation
+ const idleAnimationClips = idleAnimation.map(name => animations.find(a => a.name === name)).filter(a => !!a);
+ if (idleAnimationClips.length > 0) {
const mixer = new THREE.AnimationMixer(mesh);
const idleActions = idleAnimationClips.map(idleAnimationClip => mixer.clipAction(idleAnimationClip));
for (const idleAction of idleActions) {
@@ -234,6 +238,7 @@ class Mob {
});
}
+ // set up frame loop
let animation = null;
this.updateFns.push((timestamp, timeDiff) => {
const localPlayer = getLocalPlayer();
@@ -252,22 +257,22 @@ class Mob {
// _updatePhysics();
} else {
- // const head = rigManager.localRig.model.isVrm ? rigManager.localRig.modelBones.Head : rigManager.localRig.model;
- // const position = localVector.copy(localPlayer.position)
-
+ // decompose world transform
mesh.matrixWorld.decompose(localVector2, localQuaternion, localVector3);
const meshPosition = localVector2;
const meshQuaternion = localQuaternion;
const meshScale = localVector3;
- const meshPositionY0 = _zeroY(localVector4.copy(meshPosition));
- const characterPositionY0 = _zeroY(localVector5.copy(localPlayer.position));
+ const meshPositionY0 = localVector4.copy(meshPosition);
+ const characterPositionY0 = localVector5.copy(localPlayer.position)
+ .add(localVector6.set(0, -localPlayer.avatar.height, 0));
+ const distance = meshPositionY0.distanceTo(characterPositionY0);
- const _handleAggro = () => {
- const distance = meshPositionY0
- .distanceTo(characterPositionY0);
+ _zeroY(meshPositionY0);
+ _zeroY(characterPositionY0);
+
+ const _handleAggroMovement = () => {
if (distance < aggroDistance) {
- const minDistance = 1;
if (distance > minDistance) {
const direction = characterPositionY0.sub(meshPositionY0).normalize();
const maxMoveDistance = distance - minDistance;
@@ -325,7 +330,18 @@ class Mob {
}
}
};
- _handleAggro();
+ _handleAggroMovement();
+
+ const _handleAggroHit = () => {
+ if (distance < hitDistance) {
+ const timeSinceLastHit = timestamp - lastHitTime;
+ if (timeSinceLastHit > 1000) {
+ localPlayer.characterHitter.getHit(Math.random() * 10);
+ lastHitTime = timestamp;
+ }
+ }
+ };
+ _handleAggroHit();
const _updateExtraPhysics = () => {
for (const extraPhysicsObject of extraPhysicsObjects) {
| 0 |
diff --git a/README.md b/README.md Azure Cloud Advocates at Microsoft are pleased to offer a 12-week, 24-lesson curriculum all about JavaScript, CSS, and HTML basics. Each lesson includes pre- and post-lesson quizzes, written instructions to complete the lesson, a solution, an assignment and more. Our project-based pedagogy allows you to learn while building, a proven way for new skills to 'stick'.
-> Teachers, we have [included some suggestions](for-teachers.md) on how to use this curriculum. If you would like to create your own lessons, we have also included a [lesson template](lesson-template/README.md)
+> **Teachers**, we have [included some suggestions](for-teachers.md) on how to use this curriculum. If you would like to create your own lessons, we have also included a [lesson template](lesson-template/README.md)
+
+> **Students**, to use this curriculum on your own, fork the entire repo and complete the exercises on your own, starting with a pre-lecture quiz, then reading the lecture and completing the rest of the activities. Try to create the projects by comprehending the lessons rather than copying the solution code; however that code is available in the /solutions folders in each project-oriented lesson. Another idea would be to form a study group with friends and go through the content together. For further study, we recommend [Microsoft Learn](https://docs.microsoft.com/users/jenlooper-2911/collections/jg2gax8pzd6o81?WT.mc_id=academic-4621-cxa) and by watching the videos mentioned below.
[](https://youtube.com/watch?v=R1wrdtmBSII "Promo video")
| 3 |
diff --git a/src/components/drawing/index.js b/src/components/drawing/index.js @@ -414,6 +414,7 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity,
var fgC = tinycolor(fgcolor);
var fgRGB = Color.tinyRGB(fgC);
var fgAlpha = fgC.getAlpha();
+ var opacity = fgopacity * fgAlpha;
switch(shape) {
case '/':
@@ -426,9 +427,8 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity,
patternTag = 'path';
patternAttrs = {
'd': path,
- 'opacity': fgopacity,
+ 'opacity': opacity,
'stroke': fgRGB,
- 'stroke-opacity': fgAlpha,
'stroke-width': linewidth + 'px'
};
break;
@@ -442,9 +442,8 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity,
patternTag = 'path';
patternAttrs = {
'd': path,
- 'opacity': fgopacity,
+ 'opacity': opacity,
'stroke': fgRGB,
- 'stroke-opacity': fgAlpha,
'stroke-width': linewidth + 'px'
};
break;
@@ -461,9 +460,8 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity,
patternTag = 'path';
patternAttrs = {
'd': path,
- 'opacity': fgopacity,
+ 'opacity': opacity,
'stroke': fgRGB,
- 'stroke-opacity': fgAlpha,
'stroke-width': linewidth + 'px'
};
break;
@@ -476,9 +474,8 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity,
patternTag = 'path';
patternAttrs = {
'd': path,
- 'opacity': fgopacity,
+ 'opacity': opacity,
'stroke': fgRGB,
- 'stroke-opacity': fgAlpha,
'stroke-width': linewidth + 'px'
};
break;
@@ -491,9 +488,8 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity,
patternTag = 'path';
patternAttrs = {
'd': path,
- 'opacity': fgopacity,
+ 'opacity': opacity,
'stroke': fgRGB,
- 'stroke-opacity': fgAlpha,
'stroke-width': linewidth + 'px'
};
break;
@@ -507,9 +503,8 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity,
patternTag = 'path';
patternAttrs = {
'd': path,
- 'opacity': fgopacity,
+ 'opacity': opacity,
'stroke': fgRGB,
- 'stroke-opacity': fgAlpha,
'stroke-width': linewidth + 'px'
};
break;
@@ -526,8 +521,8 @@ drawing.pattern = function(sel, calledBy, gd, patternID, shape, size, solidity,
'cx': width / 2,
'cy': height / 2,
'r': radius,
- 'opacity': fgopacity,
- 'fill': fgcolor
+ 'opacity': opacity,
+ 'fill': fgRGB
};
break;
}
| 9 |
diff --git a/test/unit/specs/core/instanceFactory.spec.js b/test/unit/specs/core/instanceFactory.spec.js @@ -14,7 +14,7 @@ import instanceFactory from "../../../../src/core/instanceFactory";
import flushPromiseChains from "../../helpers/flushPromiseChains";
describe("instanceFactory", () => {
- it("executes command successfully", () => {
+ it("successfully executes command", () => {
const executeCommand = jasmine
.createSpy()
.and.returnValue(Promise.resolve("commandresult"));
@@ -32,7 +32,7 @@ describe("instanceFactory", () => {
});
});
- it("executes command successfully", () => {
+ it("unsuccessfully execute command", () => {
const executeCommand = jasmine
.createSpy()
.and.returnValue(Promise.reject(new Error("error occurred")));
| 1 |
diff --git a/modules/xerte/xAPI/xttracking_xapi.js b/modules/xerte/xAPI/xttracking_xapi.js @@ -2591,6 +2591,10 @@ function XTGetStatements(q, one, callback) {
{
search['limit'] = 1;
}
+ else
+ {
+ search['limit'] = 1000;
+ }
var statements = [];
ADL.XAPIWrapper.getStatements(search, null,
function getmorestatements(err, res, body) {
| 7 |
diff --git a/src/encoded/static/components/genetic_modification.js b/src/encoded/static/components/genetic_modification.js @@ -53,6 +53,22 @@ IntroducedTags.propTypes = {
};
+// All possible genetic modification object modification site property names. This might need to
+// change if the genetic_modification.json schema changes.
+const modificationSitePropNames = ['modified_site_by_target_id', 'modified_site_by_coordinates', 'modified_site_by_sequence', 'modified_site_nonspecific'];
+
+
+/**
+ * Determine if a genetic modification object includes any modification site properties.
+ * @param {object} geneticModification GM object
+ * @return {boolean} True if `geneticModification` includes any modification site properties.
+ */
+const hasModificationSiteProps = (geneticModification) => {
+ const gmKeys = Object.keys(geneticModification);
+ return modificationSitePropNames.some(siteType => gmKeys.indexOf(siteType) !== -1);
+};
+
+
// Render the modification site items into a definition list.
const ModificationSiteItems = (props) => {
const { geneticModification, itemClass } = props;
@@ -101,7 +117,7 @@ const ModificationSiteItems = (props) => {
),
};
- const elements = ['modified_site_by_target_id', 'modified_site_by_coordinates', 'modified_site_by_sequence', 'modified_site_nonspecific'].map((siteType) => {
+ const elements = modificationSitePropNames.map((siteType) => {
if (geneticModification[siteType]) {
return <div key={siteType}>{renderers[siteType](geneticModification)}</div>;
}
@@ -129,8 +145,9 @@ ModificationSiteItems.defaultProps = {
// render into the GM summary panel as its own section;
const ModificationSite = (props) => {
const { geneticModification } = props;
- const itemClass = globals.itemClass(geneticModification, 'view-detail key-value');
+ if (hasModificationSiteProps(geneticModification)) {
+ const itemClass = globals.itemClass(geneticModification, 'view-detail key-value');
return (
<div>
<hr />
@@ -138,6 +155,8 @@ const ModificationSite = (props) => {
<ModificationSiteItems geneticModification={geneticModification} itemClass={itemClass} />
</div>
);
+ }
+ return null;
};
ModificationSite.propTypes = {
@@ -561,6 +580,13 @@ class GeneticModificationComponent extends React.Component {
</div>
: null}
+ {context.introduced_elements ?
+ <div data-test="introduced-elements">
+ <dt>Introduced elements</dt>
+ <dd>{context.introduced_elements}</dd>
+ </div>
+ : null}
+
{context.zygosity ?
<div data-test="zygosity">
<dt>Zygosity</dt>
@@ -693,7 +719,7 @@ GeneticModificationSummary.columns = {
method: { title: 'Method' },
site: {
title: 'Site',
- display: item => <ModificationSiteItems geneticModification={item} itemClass={'gm-table-modification-site'} />,
+ display: item => (hasModificationSiteProps(item) ? <ModificationSiteItems geneticModification={item} itemClass={'gm-table-modification-site'} /> : null),
},
};
| 0 |
diff --git a/.github/scripts/createCloudfrontDistribution.sh b/.github/scripts/createCloudfrontDistribution.sh #!/bin/bash
set -e
-if [[ $(aws s3 ls s3://ad-hoc-expensify-cash/web/$1 | head) ]]; then
+if [[ $(aws cloudfront list-distributions --query "DistributionList.Items[?Origins.Items[?OriginPath=='/web/$1']].DomainName" --output text | head) ]]; then
+ echo "Distribution for PR #$1 already exists!"
exit 0;
else
echo $(aws cloudfront create-distribution --origin-domain-name ad-hoc-expensify-cash.s3.us-east-1.amazonaws.com --default-root-object index.html) >> cloudfront.config.json
| 7 |
diff --git a/src/lib/hooks/useSideMenu.js b/src/lib/hooks/useSideMenu.js @@ -73,7 +73,7 @@ export default (props = {}) => {
},
{
icon: 'add',
- name: 'Add App Icon',
+ name: 'Add App To Home',
hidden: !installPrompt && !isMobileSafari,
action: () => {
store.set('addWebApp')({ showAddWebAppDialog: true })
| 0 |
diff --git a/source/components/Autocomplete.js b/source/components/Autocomplete.js @@ -206,9 +206,7 @@ class Autocomplete extends Component<Props, State> {
// returns an object containing props, theme, and method handlers
// associated with rendering this.state.selectedOptions, the user can call
// this in the body of the renderSelections function
- getSelectionProps = ({
- removeSelection
- }: { removeSelection: Function } = {}) => {
+ getSelectionProps = ({ removeSelection } = {}) => {
const { themeId } = this.props;
const { inputValue, isOpen, selectedOptions, composedTheme } = this.state;
return {
| 12 |
diff --git a/api/data_access_api.py b/api/data_access_api.py @@ -266,7 +266,7 @@ def determine_file_name(chunk):
elif chunk["data_type"] == SURVEY_TIMINGS:
# add the survey_id from the database entry.
- return "%s/%s/%s/%s.%s" % (chunk["participant__patient_id"], chunk["data_type"], chunk["survey_id"],
+ return "%s/%s/%s/%s.%s" % (chunk["participant__patient_id"], chunk["data_type"], chunk["survey__object_id"],
str(chunk["time_bin"]).replace(":", "_"), extension)
elif chunk["data_type"] == VOICE_RECORDING:
@@ -355,7 +355,7 @@ def handle_database_query(study_id, query, registry=None):
Runs the database query and returns a QuerySet.
"""
chunk_fields = ["pk", "participant_id", "data_type", "chunk_path", "time_bin", "chunk_hash",
- "participant__patient_id", "study_id", "survey_id"]
+ "participant__patient_id", "study_id", "survey_id", "survey__object_id"]
chunks = ChunkRegistry.get_chunks_time_range(study_id, **query)
| 14 |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -21,7 +21,7 @@ Please update the tests to reflect your code changes. Pull requests will not be
### Documentation
-Please update the docs accordingly so that there are no discrepencies between the API and the documentation.
+Please update the [docs](README.md) accordingly so that there are no discrepancies between the API and the documentation.
### Developing
| 3 |
diff --git a/activities/Paint.activity/js/buttons/insertimage-button.js b/activities/Paint.activity/js/buttons/insertimage-button.js @@ -52,7 +52,7 @@ define(['sugar-web/graphics/journalchooser','sugar-web/datastore'], function(cho
}
}
});
- }, {mimetype: 'image/png'});
+ }, {mimetype: 'image/png'}, {mimetype: 'image/jpeg'});
}
var insertImageButton = {
| 11 |
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md -The following is a description of the our approach to the project.
-
Cookie Monster is written to modify Cookie Clicker as little as possible. This means the data is copied to simulate instead of actually modifying the current values and reverting later. The benefit is that CM should never mess up any data. The downside is that there is an extra overhead to copy and store the copied data.
-Here is a description of what should be stored in each of the source JS. Make edits to the source file first and then use the combine file to compile the final file:
+The following is a short description of the various `src` directories and their contents:
JS | Description
-- | -
@@ -10,13 +8,11 @@ Cache | Functions related to creating and storing data cache
Config | Functions related to manipulating CM configuration
Data | Hard coded values
Disp | Functions related to displaying CM's UI
-Footer | The footer of CM's JS (not modified often or ever)
-Header | The header of CM's JS (not modified often or ever)
+InitSaveLoad | Functions related to registering the CM object with the Game's Modding API
Main | Functions related to the main loop and initializing CM
Sim | Functions related to simulate something
These are some additional guidelines:
- Try to use DOM as much as possible instead of using string manipulation to modify HTML.
- Please be descriptive of your commits. If the commit is related to an issue or PR, please add the issue/PR number to the commit message.
-- Try to follow the formatting and annotation as specified by JSCode
- PR's should target the `dev` branch
| 3 |
diff --git a/apps/circlesclock/app.js b/apps/circlesclock/app.js @@ -49,6 +49,7 @@ loadSettings();
const showWidgets = settings.showWidgets || false;
let hrtValue;
+let now = Math.round(new Date().getTime() / 1000);
// layout values:
const colorFg = g.theme.dark ? '#fff' : '#000';
@@ -98,6 +99,7 @@ function draw() {
g.setFontAlign(0, -1);
g.setColor(colorFg);
g.drawString(locale.time(new Date(), 1), w / 2, h1 + 8);
+ now = Math.round(new Date().getTime() / 1000);
// date & dow
g.setFont("Vector:21");
@@ -316,26 +318,34 @@ function drawSunProgress(w) {
let icon = powerIcon;
let color = colorFg;
- if (percent < 1) { // it is before sunset
+ if (isDay()) {
+ // day
color = colorFg;
- icon = sunSetUp;
+ icon = sunSetDown;
} else {
+ // night
color = colorGrey;
- icon = sunSetDown;
+ icon = sunSetUp;
}
+ g.setColor(color);
let text = "?";
const times = getSunData();
if (times != undefined) {
const sunRise = Math.round(times.sunrise.getTime() / 1000);
const sunSet = Math.round(times.sunset.getTime() / 1000);
- const now = Math.round(new Date().getTime() / 1000);
- if (now > sunRise && now < sunSet) {
- text = formatSeconds(sunSet - now);
- } else {
- // approx sunrise tomorrow:
+ if (!isDay()) {
+ // night
+ if (now > sunRise) {
+ // after sunRise
const upcomingSunRise = sunRise + 60 * 60 * 24;
text = formatSeconds(upcomingSunRise - now);
+ } else {
+ text = formatSeconds(sunRise - now);
+ }
+ } else {
+ // day, approx sunrise tomorrow:
+ text = formatSeconds(sunSet - now);
}
}
@@ -401,7 +411,6 @@ function isDay() {
if (times == undefined) return true;
const sunRise = Math.round(times.sunrise.getTime() / 1000);
const sunSet = Math.round(times.sunset.getTime() / 1000);
- const now = Math.round(new Date().getTime() / 1000);
return (now > sunRise && now < sunSet);
}
@@ -411,9 +420,9 @@ function formatSeconds(s) {
return Math.round(s / (60 * 60)) + "h";
}
if (s > 60) { // minutes
- return Math.round(s / (60)) + "m";
+ return Math.round(s / 60) + "m";
}
- return s + "s";
+ return "<1m";
}
/*
@@ -442,15 +451,19 @@ function getSunProgress() {
if (times == undefined) return 0;
const sunRise = Math.round(times.sunrise.getTime() / 1000);
const sunSet = Math.round(times.sunset.getTime() / 1000);
- const now = Math.round(new Date().getTime() / 1000);
- if (now > sunRise && now < sunSet) {
+ if (isDay()) {
// during day, progress until sunSet
- return (now - sunRise) / (sunSet - sunRise);
+ return (now - sunSet) / (sunSet - sunRise);
} else {
- // during night, progress until approx sunrise tomorrow:
+ // during night, progress until sunrise:
+ if (now > sunRise) {
+ // after sunRise
const upcomingSunRise = sunRise + 60 * 60 * 24;
- return ((upcomingSunRise - now) / (upcomingSunRise - sunSet));
+ return (upcomingSunRise - now) / (upcomingSunRise - sunSet);
+ } else {
+ return (sunRise - now) / (sunRise - sunSet);
+ }
}
}
| 7 |
diff --git a/generators/server/templates/src/main/resources/config/liquibase/changelog/initial_schema.xml.ejs b/generators/server/templates/src/main/resources/config/liquibase/changelog/initial_schema.xml.ejs </<% if (prodDatabaseType === 'mssql') { %>ext:<% } %>loadData>
<%_ } _%>
<%_ } _%>
- <createTable tableName="<%= jhiTablePrefix %>_persistent_audit_event">
- <column name="event_id" type="bigint" <% if (isAutoIncrementDB) { _%> autoIncrement="${autoIncrement}" <%_ } _%>>
- <constraints primaryKey="true" nullable="false"/>
- </column>
- <column name="principal" type="varchar(50)">
- <constraints nullable="false" />
- </column>
- <column name="event_date" type="timestamp"/>
- <column name="event_type" type="varchar(255)"/>
- </createTable>
-
- <createTable tableName="<%= jhiTablePrefix %>_persistent_audit_evt_data">
- <column name="event_id" type="bigint">
- <constraints nullable="false"/>
- </column>
- <column name="name" type="varchar(150)">
- <constraints nullable="false"/>
- </column>
- <column name="value" type="varchar(255)"/>
- </createTable>
- <addPrimaryKey columnNames="event_id, name" tableName="<%= jhiTablePrefix %>_persistent_audit_evt_data"/>
-
- <createIndex indexName="idx_persistent_audit_event"
- tableName="<%= jhiTablePrefix %>_persistent_audit_event"
- unique="false">
- <column name="principal" type="varchar(50)"/>
- <column name="event_date" type="timestamp"/>
- </createIndex>
-
- <createIndex indexName="idx_persistent_audit_evt_data"
- tableName="<%= jhiTablePrefix %>_persistent_audit_evt_data"
- unique="false">
- <column name="event_id" type="bigint"/>
- </createIndex>
-
- <addForeignKeyConstraint baseColumnNames="event_id"
- baseTableName="<%= jhiTablePrefix %>_persistent_audit_evt_data"
- constraintName="fk_evt_pers_audit_evt_data"
- referencedColumnNames="event_id"
- referencedTableName="<%= jhiTablePrefix %>_persistent_audit_event"/>
</changeSet>
<changeSet author="jhipster" id="00000000000002" context="test">
| 2 |
diff --git a/articles/api/authentication/_userinfo.md b/articles/api/authentication/_userinfo.md @@ -81,6 +81,7 @@ This endpoint will work only if `openid` was granted as a scope for the `access_
- The sample auth0.js script uses the library version 8. If you are using auth0.js version 7, please see this [reference guide](/libraries/auth0js/v7).
- The auth0.js `parseHash` method, requires that your tokens are signed with `RS256`, rather than `HS256`. For more information about this, check the [Auth0.js v8 Migration Guide](/libraries/auth0js/migration-guide#the-parsehash-method).
+- If you want this endpoint to return `user_metadata` or other custom information, you can use [rules](/rules#api-authorization-add-claims-to-access-tokens). For more information refer to [User profile claims and scope](/api-auth/tutorials/adoption/scope-custom-claims).
- This endpoint will return three HTTP Response Headers, that provide relevant data on its rate limits:
- `X-RateLimit-Limit`: Number of requests allowed per minute.
- `X-RateLimit-Remaining`: Number of requests available. Each new request reduces this number by 1. For each minute that passes, requests are added back, so this number increases by 1 each time.
| 0 |
diff --git a/test/www/jxcore/bv_tests/testThaliMobile.js b/test/www/jxcore/bv_tests/testThaliMobile.js @@ -1087,6 +1087,9 @@ test('networkChanged - fires peerAvailabilityChanged event for native peers ' +
ThaliMobile.start(express.Router()).then(function () {
// Add initial peers
emitNativePeerAvailability(testPeers.nativePeer);
+ }).catch(function (err) {
+ t.fail('ThaliMobile couldn\'t be started!');
+ end();
});
}
);
| 0 |
diff --git a/.storybook/preview-head.html b/.storybook/preview-head.html -<style>
- :root {
- --preview-margin: 50px;
- }
-
- .googlesitekit-plugin-preview {
- padding: var(--preview-margin);
- }
-
- .-googlesitekit-plugin-preview {
- margin: calc(0px - var(--preview-margin));
- }
-</style>
<script src="https://unpkg.com/imagesloaded@4/imagesloaded.pkgd.min.js"></script>
<script>
WebFontConfig = {
| 2 |
diff --git a/src/node/lists/waitlist/Nodes-Waitlist-Connecting.js b/src/node/lists/waitlist/Nodes-Waitlist-Connecting.js @@ -26,10 +26,11 @@ class NodesWaitlistConnecting {
//mobiles usually use mobile internet are they mostly block non 80 blocks
- this._connectedOnlyTo80 = false;
+ this._connectedOnlyToSafeNetwork = false;
+
if (VersionCheckerHelper.detectMobile())
- this._connectedOnlyTo80 = true;
+ this._connectedOnlyToSafeNetwork = true;
this.connectingMaximum = {
maximum_fallbacks: 0,
@@ -75,7 +76,9 @@ class NodesWaitlistConnecting {
let pos = Math.floor ( Math.random() * NodesWaitlist.waitListFullNodes.length );
- if (this._connectedOnlyTo80 && NodesWaitlist.waitListFullNodes[pos].sckAddresses[0].port !== "80") continue;
+ //allow only 80 and 443
+ if (this._connectedOnlyToSafeNetwork )
+ if (NodesWaitlist.waitListFullNodes[pos].sckAddresses[0].port != 80 && NodesWaitlist.waitListFullNodes[pos].sckAddresses[0].port != 443 )continue;
this._tryToConnectNextNode(NodesWaitlist.waitListFullNodes[pos]);
| 11 |
diff --git a/src/community/index.md b/src/community/index.md @@ -99,7 +99,7 @@ directly!
## Slack
-[Sign up to the A-Frame Slack](https://aframe.io/slack-invite/) to hang
+[Sign up to the A-Frame Slack](https://join.slack.com/t/aframevr/shared_invite/zt-f6rne3ly-ekVaBU~Xu~fsZHXr56jacQ) to hang
out and join the discussion. The Slack is pretty active with currently over 7000
people!
| 1 |
diff --git a/lib/waterline/methods/count.js b/lib/waterline/methods/count.js @@ -9,6 +9,42 @@ var forgeStageTwoQuery = require('../utils/query/forge-stage-two-query');
var forgeStageThreeQuery = require('../utils/query/forge-stage-three-query');
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+// FUTURE: Check the performance on the way it is now with parley.
+// If it's at least as good as it was before in Sails/WL <= v0.12, then
+// no worries, we'll leave it exactly as it is.
+//
+// BUT, if it turns out that performance is significantly worse because
+// of dynamic binding of custom methods, then instead...
+//
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// (1) Do something like this right up here:
+// ```
+// parley = parley.customize(function (done){
+// ...most of the implementation...
+// }, {
+// ...custom Deferred methods here...
+// });
+// ```
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+//
+//
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// (2) And then the code down below becomes something like:
+// ```
+// var deferredMaybe = parley(explicitCbMaybe);
+// return deferrredMaybe;
+// ```
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+//
+// > Note that the cost of this approach is that neither the implementation
+// > nor the custom deferred methods can access closure scope. It's hard to
+// > say whether the perf. boost is worth the extra complexity, so again, it's
+// > only worth looking into this further when/if we find out it is necessary.
+//
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+
/**
* count()
*
| 0 |
diff --git a/test/models/behaviorsTest.js b/test/models/behaviorsTest.js @@ -963,6 +963,20 @@ describe('behaviors', function () {
}]);
});
+ it('should not be valid if missing "into" field', function () {
+ var config = {
+ key: { from: 'data', using: { method: 'regex', selector: '.*' } },
+ fromDataSource: { csv: { path: '', columnMatch: '', columnInto: ['key'] } }
+ },
+ errors = behaviors.validate({ lookup: [config] });
+ assert.deepEqual(errors, [{
+ code: 'bad data',
+ message: 'lookup behavior "into" field required',
+ source: config
+ }]);
+ });
+
+ describe('csv', function () {
it('should not be valid if "fromDataSource.csv" is not an object', function () {
var config = {
key: { from: 'data', using: { method: 'regex', selector: '.*' } },
@@ -1060,18 +1074,6 @@ describe('behaviors', function () {
source: config
}]);
});
-
- it('should not be valid if missing "into" field', function () {
- var config = {
- key: { from: 'data', using: { method: 'regex', selector: '.*' } },
- fromDataSource: { csv: { path: '', columnMatch: '', columnInto: ['key'] } }
- },
- errors = behaviors.validate({ lookup: [config] });
- assert.deepEqual(errors, [{
- code: 'bad data',
- message: 'lookup behavior "into" field required',
- source: config
- }]);
});
});
});
| 5 |
diff --git a/src/data/__snapshots__/performance.test.js.snap b/src/data/__snapshots__/performance.test.js.snap // Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`Performance decoder correctly decodes valid CMS sponsor 1`] = `
+exports[`Performance decoder correctly decodes valid CMS performance 1`] = `
Object {
"contentType": "performance",
"fields": Object {
| 3 |
diff --git a/src/app/Header.js b/src/app/Header.js @@ -47,9 +47,6 @@ export default class Header extends Component {
</div>
<div className="right mr-2">
- <a>
- <Icon name="notifications_none" className="Icon--menu" />
- </a>
<Link to="/bookmarks">
<Icon name="bookmarks" className="Icon--menu" />
</Link>
| 2 |
diff --git a/templates/docs/db/relations.md b/templates/docs/db/relations.md @@ -43,17 +43,12 @@ type Addresses []Address
Using the above [example](#example) code below is a list of available struct tags and how to use them.
-`has_many`: Will load all records from the `books` table that have a column named `user_id`, or the column specified with `fk_id` that matches the `User.ID` value.
-
-`belongs_to`: Will load a record from `users` table that have a column named `id` that matches with `Book.UserID` value.
-
-`has_one`: Will load a record from the `songs` table that have a column named `user_id`, or the column specified with `fk_id` that matches the `User.ID` value.
-
-`many_to_many`: Will load all records from the `addresses` table through the table `users_addresses`. Table `users_addresses` **MUST** define `address_id` and `user_id` columns to match `User.ID` and `Address.ID` values. You can also define a `fk_id` tag that will be used in the target association i.e. `addresses` table.
-
-`fk_id`: Defines the column name in the target association that matches model ID. In the example above `Song` has a column named `u_id` that represents id of `users` table. When loading `FavoriteSong`, `u_id` will be used instead of `user_id`.
-
-`order_by`: Used in `has_many` and `many_to_many` to indicate the order for the association when loading. The format to use is `order_by:"<column_name> <asc | desc>"`
+* `has_many`: Will load all records from the `books` table that have a column named `user_id`, or the column specified with `fk_id` that matches the `User.ID` value.
+* `belongs_to`: Will load a record from `users` table that have a column named `id` that matches with `Book.UserID` value.
+* `has_one`: Will load a record from the `songs` table that have a column named `user_id`, or the column specified with `fk_id` that matches the `User.ID` value.
+* `many_to_many`: Will load all records from the `addresses` table through the table `users_addresses`. Table `users_addresses` **MUST** define `address_id` and `user_id` columns to match `User.ID` and `Address.ID` values. You can also define a `fk_id` tag that will be used in the target association i.e. `addresses` table.
+* `fk_id`: Defines the column name in the target association that matches model ID. In the example above `Song` has a column named `u_id` that represents id of `users` table. When loading `FavoriteSong`, `u_id` will be used instead of `user_id`.
+* `order_by`: Used in `has_many` and `many_to_many` to indicate the order for the association when loading. The format to use is `order_by:"<column_name> <asc | desc>"`
<%= title("Eager Loading Associations") %>
| 7 |
diff --git a/userscript.user.js b/userscript.user.js @@ -27660,7 +27660,10 @@ var $$IMU_EXPORT$$;
.replace(/_wmk(\.[^/.]*)(?:[?#].*)?$/, "$1");
}
- if (domain_nosub === "so-net.ne.jp") {
+ if (domain_nosub === "so-net.ne.jp" ||
+ // https://harrypotter-fun.c.blog.ss-blog.jp/_images/blog/_985/harrypotter-fun/m_lunalovegood.jpg
+ // https://harrypotter-fun.c.blog.ss-blog.jp/_images/blog/_985/harrypotter-fun/lunalovegood.jpg
+ domain_nosub === "ss-blog.jp") {
// http://harrypotter-fun.c.blog.so-net.ne.jp/_images/blog/_985/harrypotter-fun/m_lunalovegood.jpg
// http://harrypotter-fun.c.blog.so-net.ne.jp/_images/blog/_985/harrypotter-fun/lunalovegood.jpg
// http://news.so-net.ne.jp/photos/30/365455840452641889/S200_365455840452641889_365547478327575649_origin_1.jpg
@@ -28972,7 +28975,10 @@ var $$IMU_EXPORT$$;
if (domain === "images.apester.com") {
// https://images.apester.com/user-images%2Faa%2Faaecb0949e6508374487f5f8dc120595.jpg/400/undefined/undefined
// https://images.apester.com/user-images%2Faa%2Faaecb0949e6508374487f5f8dc120595.jpg
- return src.replace(/(:\/\/[^/]*\/[^/]*\.[^/.]*)\/[/a-z0-9]+$/, "$1");
+ return {
+ url: src.replace(/(:\/\/[^/]*\/[^/]*\.[^/.]*)\/[/a-z0-9]+$/, "$1"),
+ head_wrong_contentlength: true
+ };
}
if (domain === "twt-thumbs.washtimes.com") {
| 1 |
diff --git a/src/encoded/static/components/filegallery.js b/src/encoded/static/components/filegallery.js @@ -4,8 +4,6 @@ import moment from 'moment';
import globals from './globals';
import { Panel, PanelHeading } from '../libs/bootstrap/panel';
import { Modal, ModalHeader, ModalBody, ModalFooter } from '../libs/bootstrap/modal';
-import { DropdownButton } from '../libs/bootstrap/button';
-import { DropdownMenu } from '../libs/bootstrap/dropdown-menu';
import { StatusLabel } from './statuslabel';
import { requestFiles, DownloadableAccession, BrowserSelector } from './objectutils';
import { Graph, JsonGraph } from './graph';
@@ -91,6 +89,17 @@ export const FileTable = React.createClass({
const buttonEnabled = !!(meta.graphedFiles && meta.graphedFiles[item['@id']]);
return <DownloadableAccession file={item} buttonEnabled={buttonEnabled} clickHandler={meta.fileClick ? meta.fileClick : null} loggedIn={loggedIn} adminUser={adminUser} />;
},
+ objSorter: (a, b) => {
+ // First determine if either or both use an external accession or not.
+ if (!a.accession !== !b.accession) {
+ // One or the other but not both use an external accession. Sort so that
+ // regular accession comes first.
+ return a.accession ? -1 : 1;
+ }
+ const aTitle = a.title.toLowerCase();
+ const bTitle = b.title.toLowerCase();
+ return aTitle > bTitle ? 1 : (aTitle < bTitle ? -1 : 0);
+ },
},
file_type: { title: 'File type' },
output_type: { title: 'Output type' },
@@ -145,6 +154,17 @@ export const FileTable = React.createClass({
const buttonEnabled = !!(meta.graphedFiles && meta.graphedFiles[item['@id']]);
return <DownloadableAccession file={item} buttonEnabled={buttonEnabled} clickHandler={meta.fileClick ? meta.fileClick : null} loggedIn={loggedIn} adminUser={adminUser} />;
},
+ objSorter: (a, b) => {
+ // First determine if either or both use an external accession or not.
+ if (!a.accession !== !b.accession) {
+ // One or the other but not both use an external accession. Sort so that
+ // regular accession comes first.
+ return a.accession ? -1 : 1;
+ }
+ const aTitle = a.title.toLowerCase();
+ const bTitle = b.title.toLowerCase();
+ return aTitle > bTitle ? 1 : (aTitle < bTitle ? -1 : 0);
+ },
},
file_type: { title: 'File type' },
output_type: { title: 'Output type' },
| 0 |
diff --git a/includes/Modules/Analytics.php b/includes/Modules/Analytics.php @@ -1005,7 +1005,7 @@ final class Analytics extends Module implements Module_With_Screen, Module_With_
}
$found_property = new \Google_Service_Analytics_Webproperty();
- $current_url = untrailingslashit( $this->context->get_reference_site_url() );
+ $current_url = $this->context->get_reference_site_url();
// If requested for a specific property, only match by property ID.
if ( ! empty( $data['existingPropertyId'] ) ) {
| 2 |
diff --git a/userscript.user.js b/userscript.user.js @@ -10589,16 +10589,16 @@ var $$IMU_EXPORT$$;
description: "Enables the use of a hold key that, when pressed, will keep the popup open",
requires: [
{
- mouseover_trigger_behavior: "mouse",
- mouseover_open_behavior: "popup"
+ _condition: "action:popup",
+ mouseover_trigger_behavior: "mouse"
},
{
- mouseover_auto_close_popup: true,
- mouseover_open_behavior: "popup"
+ _condition: "action:popup",
+ mouseover_auto_close_popup: true
},
{
- mouseover_close_need_mouseout: true,
- mouseover_open_behavior: "popup"
+ _condition: "action:popup",
+ mouseover_close_need_mouseout: true
},
],
category: "popup",
| 14 |
diff --git a/src/renderer.js b/src/renderer.js @@ -452,6 +452,10 @@ class gltfRenderer
const diffuseTextureIndex = scene.imageBasedLight.diffuseEnvironmentTexture;
const specularTextureIndex = scene.imageBasedLight.specularEnvironmentTexture;
+
+ gltf.textures[diffuseTextureIndex].type = WebGl.context.TEXTURE_CUBE_MAP;
+ gltf.textures[specularTextureIndex].type = WebGl.context.TEXTURE_CUBE_MAP;
+
gltf.envData.diffuseEnvMap = new gltfTextureInfo(diffuseTextureIndex, 0, linear);
gltf.envData.specularEnvMap = new gltfTextureInfo(specularTextureIndex, 0, linear);
}
| 12 |
diff --git a/generators/client/templates/angular/package.json.ejs b/generators/client/templates/angular/package.json.ejs "copy-webpack-plugin": "4.4.1",
"css-loader": "0.28.10",
"exports-loader": "0.6.4",
- "extract-text-webpack-plugin": "4.0.0-alpha.0",
+ "extract-text-webpack-plugin": "4.0.0-beta.0",
"file-loader": "1.1.6",
"generator-jhipster": "<%= packagejs.version %>",
"html-loader": "0.5.0",
| 3 |
diff --git a/src/core/curlify.js b/src/core/curlify.js @@ -20,7 +20,7 @@ export default function curl( request ){
if ( request.get("body") ){
if(type === "multipart/form-data" && request.get("method") === "POST") {
- for( let [ k,v ] of request.get("body").values()) {
+ for( let [ k,v ] of request.get("body").entrySeq()) {
curlified.push( "-F" )
if (v instanceof win.File) {
curlified.push( `"${k}=@${v.name};type=${v.type}"` )
| 14 |
diff --git a/package.json b/package.json {
"name": "nativescript-doctor",
- "version": "0.4.0",
+ "version": "0.4.1",
"description": "Library that helps identifying if the environment can be used for development of {N} apps.",
"main": "lib/index.js",
"types": "./typings/nativescript-doctor.d.ts",
| 12 |
diff --git a/src/encoded/schemas/file.json b/src/encoded/schemas/file.json }
]
},
-
+ "content_error_detail":{
+ "comment": "Specification of status of content error is required if content_error_detail is specified",
+ "required": ["status"],
+ "properties": {
+ "status": {
+ "enum": ["content error"]
+ }
+ }
+ },
"status": {
"comment": "file_size is required in files with statuses in progress, revoked, archived and released unless the file is not available from the portal. content_error_details can be specified in files with status deleted and is required in files with the status content error.",
"allOf": [
| 0 |
diff --git a/src/web/client/src/js/components/ControlPanel/ContentBody/Server/Settings/index.js b/src/web/client/src/js/components/ControlPanel/ContentBody/Server/Settings/index.js @@ -146,15 +146,16 @@ function ServerSettings () {
<SectionTitle heading='Dates' subheading='These settings will all apply to the {date} placeholder. If no {date} placeholders are used in any feeds, these settings will have no effect.' />
<SectionSubtitle>Preview</SectionSubtitle>
<Date botConfig={botConfig} timezone={timezoneValue} dateFormat={dateFormatValue} invalidTimezone={invalidTimezone} />
- <Divider />
+ <br />
+ <br />
<SectionSubtitle>Timezone</SectionSubtitle>
<Input fluid onChange={e => setValue('timezone', e.target.value)} error={invalidTimezone} value={timezoneValue} placeholder={botConfig.timezone} />
<InputDescription>This will change the timezone of the {`{date}`} placeholder to the one you specify. <a href='https://en.wikipedia.org/wiki/List_of_tz_database_time_zones' target='_blank' rel='noopener noreferrer'>See here for a list of valid timezones under the "TZ database name" column.</a></InputDescription>
- <Divider />
+ <br />
<SectionSubtitle>Date Language</SectionSubtitle>
<Dropdown selection fluid options={botConfig.dateLanguageList.map(lang => { return { text: lang, value: lang } })} value={dateLanguageValue} onChange={(e, data) => setValue('dateLanguage', data.value)} />
<InputDescription>Only a certain number of languages are manually supported for dates. To request your language to be supported, please contact the developer on the support server.</InputDescription>
- <Divider />
+ <br />
<SectionSubtitle>Date Format</SectionSubtitle>
<Input fluid value={dateFormatValue} onChange={e => setValue('dateFormat', e.target.value)} placeholder={botConfig.dateFormat} />
<InputDescription>This will dictate how the {`{date}`} placeholder will be formatted. <a href='https://momentjs.com/docs/#/displaying/' target='_blank' rel='noopener noreferrer'>See here on how to customize your date formats.</a>.</InputDescription>
| 14 |
diff --git a/articles/migrations/guides/extensibility-node8.md b/articles/migrations/guides/extensibility-node8.md @@ -36,7 +36,7 @@ However, there may be behavioral changes as a result of this migration. As such,
## How to enable the Node.js v8 runtime
:::warning
-The Extensibility panel, that this section refers to, will be made available to our cloud customers when the Node 8 runtime is available.
+The Extensibility panel, that this section refers to, will be made available to our cloud customers on **April 17th, 2018**.
:::
Node 8 can be enabled through the new Extensibility panel on the [Advanced Tenant Settings](${manage_url}/#/tenant/advanced) page of the Dashboard. This panel will be visible once the new Node 8 runtime is made available on 17 April 2018.
| 14 |
diff --git a/app/controllers/carto/api/visualizations_controller.rb b/app/controllers/carto/api/visualizations_controller.rb @@ -60,7 +60,7 @@ module Carto
VALID_ORDER_PARAMS = %i(name updated_at size mapviews likes favorited estimated_row_count privacy
dependent_visualizations).freeze
- VALID_ORDER_COMBINATIONS = %i(name updated_at favorited privacy).freeze
+ VALID_ORDER_COMBINATIONS = VALID_ORDER_PARAMS - Carto::VisualizationQueryOrderer::SUPPORTED_OFFDATABASE_ORDERS
def show
presenter = VisualizationPresenter.new(
| 11 |
diff --git a/lib/networkHandler.js b/lib/networkHandler.js @@ -51,10 +51,12 @@ const handleInterceptor = p => {
const interceptor = matches.pop();
if (!interceptor.action) { options.errorReason = defaultErrorReason;}
else if (isFunction(interceptor.action)) {
- p.continue = (override) => overrideRequest(override, options);
+ p.continue = (override) => overrideRequest(p, override, options);
p.respond = (mock) => {
options = mockResponse(mock, options);
- network.continueInterceptedRequest(options);
+ network.continueInterceptedRequest(options).catch(()=>{
+ console.warn(`Could not intercept request ${p.request.url}`);
+ });
};
interceptor.action(p);
return;
@@ -62,7 +64,9 @@ const handleInterceptor = p => {
else if (isString(interceptor.action)) options.url = interceptor.action;
else options = mockResponse(interceptor.action, options);
}
- network.continueInterceptedRequest(options);
+ network.continueInterceptedRequest(options).catch(()=> {
+ if(matchesLen) console.warn(`Could not intercept request ${p.request.url}`);
+ });
};
const mockResponse = (response, options) => {
@@ -97,9 +101,11 @@ const mockResponse = (response, options) => {
return options;
};
-const overrideRequest = (override, options) => {
+const overrideRequest = (p, override, options) => {
for (const key in override) options[key] = override[key];
- network.continueInterceptedRequest(options);
+ network.continueInterceptedRequest(options).catch(()=>{
+ console.warn(`Could not intercept request ${p.request.url}`);
+ });
};
const addInterceptor = async (requestWithAction) => {
| 9 |
diff --git a/README.md b/README.md @@ -81,6 +81,28 @@ npm run apply:copay
npm run start:ios
```
+### Windows Phone
+
+Follow the [Cordova Windows Phone Platform Guide](https://cordova.apache.org/docs/en/latest/guide/platforms/win8/index.html) to set up your development environment.
+
+When your developement enviroment is ready, run the `start:ios` npm package script.
+
+- Go to app-template folder, search for config-template.xml and then remove this line:
+```sh
+<plugin name="cordova-plugin-qrscanner" spec="~2.5.0" />
+```
+and then enable this one:
+```sh
+<plugin name="phonegap-plugin-barcodescanner" spec="https://github.com/phonegap/phonegap-plugin-barcodescanner.git" />
+```
+- Run:
+```sh
+npm run clean-all
+npm run apply:copay
+npm run start:windows
+```
+- Then open the project file with VS inside cordova/platform/windows/
+
### Desktop (Linux, macOS, and Windows)
The desktop version of Copay currently uses NW.js, an app runtime based on Chromium. To get started, first install NW.js on your system from [the NW.js website](https://nwjs.io/).
@@ -116,8 +138,22 @@ npm run final:ios
### Windows Phone
-- Install Visual Studio 2013 (or newer)
-- Run `make wp8-prod`
+- Install Visual Studio 2015 (or newer)
+- Go to app-template folder, search for config-template.xml and then remove this line:
+```sh
+<plugin name="cordova-plugin-qrscanner" spec="~2.5.0" />
+```
+and then enable this one:
+```sh
+<plugin name="phonegap-plugin-barcodescanner" spec="https://github.com/phonegap/phonegap-plugin-barcodescanner.git" />
+```
+- Run:
+```sh
+npm run clean-all
+npm run apply:copay
+npm run final:windows
+```
+- Then open the project file with VS inside cordova/platform/windows/
### Desktop (Linux, macOS, and Windows)
| 3 |
diff --git a/guides/prereqs/wsl.md b/guides/prereqs/wsl.md @@ -37,10 +37,8 @@ Certain workshops make use of GitHub. This section adds in git to the bash shel
* Run Bash on Windows by typing bash in a Command Prompt
* Ensure the package list is up to date and then install the basic Git tools
-```
-sudo apt-get update && sudo apt-get install git-all
-```
-* Verify by opening Git Bash from the Start Menu and typing `git` to see the base commands
+`sudo apt-get update && sudo apt-get install git-all`
+* Verify by going into the bash shell and typing `git` to see the base commands
## *Optional*: Change font and vi colours
@@ -49,8 +47,8 @@ The default colours for both the PS1 prompt and for vi and vim can be difficult
* Edit ~/.bashrc (using nano, vi, or vim) and then scroll to the color_prompt section.
* The PS1 prompt colours are set in the sections that are in the format `[01:34m\]`. The 34 is light blue, which is hard to read. Changing the number from 34 to 36 (cyan) or 33 (yellow) will be more readable. (Info from [here](http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html).)
* For vi(m) users then creating a .vimrc file will also help to set a more readable colour scheme
-```
-umask 022
+```bash
+umask 022
echo -e "colo murphy\nsyntax on" >> ~/.vimrc
```
\ No newline at end of file
| 7 |
diff --git a/articles/extensions/authorization-extension/v2/rules.md b/articles/extensions/authorization-extension/v2/rules.md @@ -11,7 +11,7 @@ You can use [rules](/rules) with the Authorization Extension to do things like:
* Add [custom claims](/scopes/current#custom-claims) to the issued token
* Determining the user's group membership, roles and permissions
* Storing the user's groups, roles and permissions info as [part of the `app_metadata`](/extensions/authorization-extension/v2/configuration#persistence)
-* Adding the user's groups, roles and permissions to the [outgoing token]((/extensions/authorization-extension/v2/configuration#token-contents)) (which can be requested via the `openid groups permissions roles` scope)
+* Adding the user's groups, roles and permissions to the [outgoing token](/extensions/authorization-extension/v2/configuration#token-contents)) (which can be requested via the `openid groups permissions roles` scope)
Because the above logic is part of a rule, it will only be executed in the context of a login. If users are added to or removed from a group, this change will only be reflected in Auth0 after the user's next login.
| 2 |
diff --git a/src/scripts/interaction.js b/src/scripts/interaction.js @@ -225,7 +225,7 @@ function Interaction(parameters, player, previousState) {
if (event.which === 32) {
goto({data: parameters.goto.time});
}
- }).attr('role', 'button')
+ }).attr('href', '#')
.attr('tabindex', '0');
}
else { // URL
@@ -326,7 +326,7 @@ function Interaction(parameters, player, previousState) {
var isGotoClickable = self.isGotoClickable();
// Create wrapper for dialog content
- var $dialogContent = $(isGotoClickable && parameters.goto.type === 'url' ? '<a>' : '<div>', {
+ var $dialogContent = $(isGotoClickable ? '<a>' : '<div>', {
'class': 'h5p-dialog-interaction h5p-frame'
});
@@ -610,7 +610,7 @@ function Interaction(parameters, player, previousState) {
'class': 'h5p-interaction-outer'
}).appendTo($interaction);
- $inner = $(isGotoClickable && parameters.goto.type === 'url' ? '<a>' : '<div>', {
+ $inner = $(isGotoClickable ? '<a>' : '<div>', {
'class': 'h5p-interaction-inner h5p-frame'
}).appendTo($outer);
| 0 |
diff --git a/src/components/layouts/Layout.js b/src/components/layouts/Layout.js @@ -81,14 +81,19 @@ const Layout = ({ children, initialContext, hasSideBar, location }) => {
sprk-u-pvm
sprk-u-AbsoluteCenter"
>
+ <p className="sprk-u-Color--white sprk-u-pam">
+ Designs launching
+ <span className="sprk-u-FontWeight--bold sprk-u-mas">before</span>
+ July 14, 2021 should reference
<a
- href="https://v13--spark-design-system.netlify.app/"
- className="docs-c-Banner--link sprk-u-mlm"
+ href="https://sparkdesignsystem.com/"
+ className="docs-c-Banner--link sprk-u-mas"
>
- For designs launching BEFORE July 14, 2021, please reference
- version 13 of Spark. Talk to your PO or Experience Director if
- there are any questions.
+ version 13 of Spark.
</a>
+ Questions? Please contact your Product Owner or Experience
+ Director.
+ </p>
</div>
<Header
context={context}
| 3 |
diff --git a/components/bases-locales/publication/code-authentification.js b/components/bases-locales/publication/code-authentification.js @@ -15,7 +15,12 @@ function CodeAuthentification({submissionId, email, handleValidCode, sendBackCod
const submitCode = useCallback(async () => {
try {
- await submitAuthentificationCode(submissionId, code)
+ const response = await submitAuthentificationCode(submissionId, code)
+
+ if (response.error) {
+ throw new Error(response.error)
+ }
+
handleValidCode()
} catch (error) {
setError(error.message)
| 0 |
diff --git a/src/js/services/wallet-history.service.js b/src/js/services/wallet-history.service.js return service;
function addEarlyTransactions(walletId, cachedTxs, newTxs) {
-
+ var cachedTxCountBeforeMerging = cachedTxs.length;
var cachedTxIndexFromId = {};
cachedTxs.forEach(function forCachedTx(tx, txIndex){
cachedTxIndexFromId[tx.txid] = txIndex;
});
var txsAreContinuous = false;
- if (cachedTxs.length > 0) {
- var overlappingTxFraction = overlappingTxsCount / Math.min(cachedTxs.length, PAGE_OVERLAP);
- console.log('overlappingTxsCount:', overlappingTxsCount);
- console.log('overlappingTxFraction:', overlappingTxFraction);
+ if (cachedTxCountBeforeMerging.length > 0) {
+ var overlappingTxFraction = overlappingTxsCount / Math.min(cachedTxCountBeforeMerging, PAGE_OVERLAP);
txsAreContinuous = overlappingTxFraction >= MIN_KNOWN_TX_OVERLAP_FRACTION;
} else {
txsAreContinuous = true;
return cachedTxs;
} else {
// We might be missing some txs.
- $log.error('We might be missing some txs in the history.');
+ $log.error('We might be missing some txs in the history. Overlapping txs count: ' + overlappingTxsCount + ', txs in cache before merging: ' + cachedTxCountBeforeMerging);
// Our history is wrong, so remove it - we could instead, try to fetch data that was not so early.
storageService.removeTxHistory(walletId, function onRemoveTxHistory(){});
return [];
var txsAreContinuous = false;
if (cachedTxs.length > 0) {
var overlappingTxFraction = overlappingTxsCount / Math.min(cachedTxs.length, PAGE_OVERLAP);
- console.log('overlappingTxsCount:', overlappingTxsCount);
- console.log('overlappingTxFraction:', overlappingTxFraction);
txsAreContinuous = overlappingTxFraction >= MIN_KNOWN_TX_OVERLAP_FRACTION;
} else {
txsAreContinuous = true;
}
} else {
// We might be missing some txs.
- $log.error('We might be missing some txs in the history.');
+ $log.error('We might be missing some txs in the history. OverlappingTxsCount: ' + overlappingTxsCount + ', txs in cache: ' + cachedTxs.length);
// Our history is wrong, so just include the latest ones
saveTxHistory(walletId, newTxs);
return newTxs;
| 1 |
diff --git a/services/importer/lib/importer/downloader.rb b/services/importer/lib/importer/downloader.rb @@ -165,13 +165,6 @@ module CartoDB
raw_url.try(:is_a?, String) ? URI.escape(raw_url.strip, URL_ESCAPED_CHARACTERS) : raw_url
end
- def set_local_source_file
- unless valid_url?
- @source_file = SourceFile.new(url)
- self
- end
- end
-
def set_downloaded_source_file(available_quota_in_bytes = nil)
if available_quota_in_bytes
raise_if_over_storage_quota(requested_quota: content_length_from_headers(headers),
| 2 |
diff --git a/src/traces/treemap/plot.js b/src/traces/treemap/plot.js @@ -162,14 +162,14 @@ function plotOne(gd, cd, element, transitionOpts) {
var cenX = -vpw / 2 + gs.l + gs.w * (domain.x[1] + domain.x[0]) / 2;
var cenY = -vph / 2 + gs.t + gs.h * (1 - (domain.y[1] + domain.y[0]) / 2);
- var viewMapX = function(x) { return cenX + (x || 0); };
- var viewMapY = function(y) { return cenY + (y || 0); };
+ var viewMapX = function(x) { return cenX + x; };
+ var viewMapY = function(y) { return cenY + y; };
var barY0 = viewMapY(0);
var barX0 = viewMapX(0);
- var viewBarX = function(x) { return barX0 + (x || 0); };
- var viewBarY = function(y) { return barY0 + (y || 0); };
+ var viewBarX = function(x) { return barX0 + x; };
+ var viewBarY = function(y) { return barY0 + y; };
function pos(x, y) {
return x + ',' + y;
@@ -315,6 +315,11 @@ function plotOne(gd, cd, element, transitionOpts) {
if(opts.isHeader) {
x0 += pad.l - TEXTPAD;
x1 -= pad.r - TEXTPAD;
+ if(x0 >= x1) {
+ var mid = (x0 + x1) / 2;
+ x0 = mid - TEXTPAD;
+ x1 = mid + TEXTPAD;
+ }
// limit the drawing area for headers
var limY;
@@ -343,13 +348,20 @@ function plotOne(gd, cd, element, transitionOpts) {
else if(offsetDir === 'right') transform.targetX += deltaX;
}
+ transform.targetX = viewMapX(transform.targetX);
+ transform.targetY = viewMapY(transform.targetY);
+
+ if(isNaN(transform.targetX) || isNaN(transform.targetY)) {
+ return {};
+ }
+
return {
scale: transform.scale,
rotate: transform.rotate,
textX: transform.textX,
textY: transform.textY,
- targetX: viewMapX(transform.targetX),
- targetY: viewMapY(transform.targetY)
+ targetX: transform.targetX,
+ targetY: transform.targetY
};
};
| 13 |
diff --git a/lib/determine-basal/determine-basal.js b/lib/determine-basal/determine-basal.js @@ -480,7 +480,7 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
var minIOBPredBG = 999;
var minCOBPredBG = 999;
var minUAMPredBG = 999;
- var minGuardBG = 999;
+ var minGuardBG = bg;
var minCOBGuardBG = 999;
var minUAMGuardBG = 999;
var minIOBGuardBG = 999;
@@ -843,33 +843,16 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
if (bg < threshold && iob_data.iob < -profile.current_basal*20/60 && minDelta > 0 && minDelta > expectedDelta) {
rT.reason += "IOB "+iob_data.iob+" < " + round(-profile.current_basal*20/60,2);
rT.reason += " and minDelta " + minDelta + " > " + "expectedDelta " + expectedDelta + "; ";
- // predictive low glucose suspend mode: BG is projected to be < threshold
- } else if ( minGuardBG < threshold ) {
- rT.reason += "minGuardBG " + convert_bg(minGuardBG, profile) + "<" + convert_bg(threshold, profile);
- // always set a 30m zero temp (oref0-pump-loop will let any longer SMB zero temp run)
- return tempBasalFunctions.setTempBasal(0, 30, profile, rT, currenttemp);
- // low glucose suspend mode: BG is < ~80
+ // predictive low glucose suspend mode: BG is / is projected to be < threshold
} else if ( bg < threshold || minGuardBG < threshold ) {
- rT.reason += "BG " + convert_bg(bg, profile) + "<" + convert_bg(threshold, profile);
- if ((glucose_status.delta <= 0 && minDelta <= 0) || (glucose_status.delta < expectedDelta && minDelta < expectedDelta) || bg < 60 ) {
- // BG is still falling / rising slower than predicted
- if ( minDelta < expectedDelta ) {
- rT.reason += ", minDelta " + minDelta + " < " + "expectedDelta " + expectedDelta + "; ";
- }
- return tempBasalFunctions.setTempBasal(0, 30, profile, rT, currenttemp);
- }
- if (glucose_status.delta > minDelta) {
- rT.reason += ", delta " + glucose_status.delta + ">0";
- } else {
- rT.reason += ", min delta " + minDelta.toFixed(2) + ">0";
- }
- if (currenttemp.duration > 15 && (round_basal(basal, profile) === round_basal(currenttemp.rate, profile))) {
- rT.reason += ", temp " + currenttemp.rate + " ~ req " + basal + "U/hr. ";
- return rT;
- } else {
- rT.reason += "; setting current basal of " + basal + " as temp. ";
- return tempBasalFunctions.setTempBasal(basal, 30, profile, rT, currenttemp);
- }
+ rT.reason += "minGuardBG " + convert_bg(minGuardBG, profile) + "<" + convert_bg(threshold, profile);
+ var bgUndershoot = target_bg - minGuardBG;
+ var worstCaseInsulinReq = bgUndershoot / sens;
+ var durationReq = round(60*worstCaseInsulinReq / profile.current_basal);
+ durationReq = round(durationReq/30)*30;
+ // always set a 30-120m zero temp (oref0-pump-loop will let any longer SMB zero temp run)
+ durationReq = Math.min(120,Math.max(30,durationReq));
+ return tempBasalFunctions.setTempBasal(0, durationReq, profile, rT, currenttemp);
}
if (eventualBG < min_bg) { // if eventual BG is below target:
| 12 |
diff --git a/grails-app/assets/javascripts/streama/directives/streama-video-player-directive.js b/grails-app/assets/javascripts/streama/directives/streama-video-player-directive.js @@ -448,7 +448,11 @@ angular.module('streama').directive('streamaVideoPlayer', [
function initMouseWheel() {
+ var isMouseWheelVolumeCtrlActive = true;
jQuery($elem).mousewheel(function (event) {
+ if (!isMouseWheelVolumeCtrlActive) {
+ return;
+ }
if (event.deltaY > 0) {
changeVolume(1);
} else if (event.deltaY < 0) {
@@ -456,6 +460,13 @@ angular.module('streama').directive('streamaVideoPlayer', [
}
$scope.showControls();
});
+ var playerMenu = document.querySelector('#player-menu-episode-selector');
+ playerMenu.addEventListener('mouseenter', function (event) {
+ isMouseWheelVolumeCtrlActive = false;
+ });
+ playerMenu.addEventListener('mouseleave', function (event) {
+ isMouseWheelVolumeCtrlActive = true;
+ });
}
function initMousetrap() {
| 7 |
diff --git a/ui/src/dialogs/DiagramCreateDialog/DiagramCreateDialog.jsx b/ui/src/dialogs/DiagramCreateDialog/DiagramCreateDialog.jsx @@ -135,7 +135,7 @@ class DiagramCreateDialog extends Component {
const { location } = this.props;
const context = {
- 'filter:kind': 'casefile',
+ 'filter:writeable': true,
};
return Query.fromLocation('collections', location, context, 'collections')
.sortBy('label', 'asc');
| 12 |
diff --git a/apiserver/apiserver/model.py b/apiserver/apiserver/model.py @@ -50,7 +50,7 @@ all_users = sqlalchemy.sql.select([
_func.coalesce(_func.sum(ranked_bots.c.games_played), 0).label("num_games"),
_func.coalesce(_func.sum(ranked_bots.c.version_number), 0).label("num_submissions"),
_func.coalesce(_func.max(ranked_bots.c.score), 0).label("score"),
- sqlalchemy.cast(sqlalchemy.sql.text("ranked_bots.bot_rank"), sqlalchemy.Integer).label("rank"),
+ _func.coalesce(_func.min(sqlalchemy.sql.text("ranked_bots.bot_rank"))).label("rank"),
]).select_from(users.join(
ranked_bots,
ranked_bots.c.user_id == users.c.id,
| 1 |
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/editor/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/editor/template.vue data: function() {
return {
formOptions: {
- validateAfterLoad: false,
+ validateAfterLoad: true,
validateAfterChanged: true,
focusFirstField: true
}
| 12 |
diff --git a/contribs/gmf/src/sass/map.scss b/contribs/gmf/src/sass/map.scss @@ -142,7 +142,7 @@ button[ngeo-geolocation] {
bottom: $app-margin;
left: $app-margin;
width: 18.75rem;
- z-index: $above-content-index;
+ z-index: $above-search-index;
.alert {
padding: $half-app-margin calc(#{$app-margin} + 1rem) $half-app-margin $app-margin;
| 12 |
diff --git a/protocols/market/test/Market-unit.js b/protocols/market/test/Market-unit.js @@ -161,6 +161,20 @@ contract('Market Unit Tests', async accounts => {
equal(intents[1], carolLocator, 'Carol should be second')
equal(intents[2], bobLocator, 'Bob should be third')
})
+
+ it('user should not be able to set a second intent if one already exists', async () => {
+ let trx = market.setIntent(aliceAddress, 2000, aliceLocator, {
+ from: owner,
+ })
+ await passes(trx)
+ trx = market.setIntent(aliceAddress, 5000, aliceLocator, {
+ from: owner,
+ })
+ await reverted(trx, 'USER_ALREADY_HAS_INTENT')
+
+ let length = await market.length.call()
+ equal(length.toNumber(), 1, 'length increased, but total stakers has not')
+ })
})
describe('Test unsetIntent', async () => {
@@ -363,20 +377,4 @@ contract('Market Unit Tests', async accounts => {
equal(hasIntent, true, 'hasIntent should have returned true')
})
})
-
- describe('Test multiple setting of intents from same address', async () => {
- it('should not increase the total number of intents', async () => {
- let trx = market.setIntent(aliceAddress, 2000, aliceLocator, {
- from: owner,
- })
- await passes(trx)
- trx = market.setIntent(aliceAddress, 5000, aliceLocator, {
- from: owner,
- })
- await reverted(trx, 'USER_ALREADY_HAS_INTENT')
-
- let length = await market.length.call()
- equal(length.toNumber(), 1, 'length increased, but total stakers has not')
- })
- })
})
| 5 |
diff --git a/src/middleware/packages/auth/services/migration.js b/src/middleware/packages/auth/services/migration.js const { MIME_TYPES } = require('@semapps/mime-types');
+const { getSlugFromUri } = require('@semapps/ldp');
module.exports = {
name: 'auth.migration',
@@ -13,7 +14,7 @@ module.exports = {
try {
await ctx.call('auth.account.create', {
email: user[emailPredicate],
- username: user[usernamePredicate],
+ username: usernamePredicate ? user[usernamePredicate] : getSlugFromUri(user.id),
webId: user.id
});
} catch (e) {
| 7 |
diff --git a/angular/projects/spark-angular/src/lib/components/sprk-dropdown/sprk-dropdown.module.ts b/angular/projects/spark-angular/src/lib/components/sprk-dropdown/sprk-dropdown.module.ts @@ -15,6 +15,11 @@ import { SprkTextModule } from '../../directives/sprk-text/sprk-text.module';
SprkTextModule,
],
declarations: [SprkDropdownComponent],
- exports: [SprkDropdownComponent],
+ exports: [
+ SprkDropdownComponent,
+ SprkIconModule,
+ SprkLinkDirectiveModule,
+ SprkTextModule,
+ ],
})
export class SprkDropdownModule {}
| 3 |
diff --git a/sirepo/package_data/static/js/sirepo-common.js b/sirepo/package_data/static/js/sirepo-common.js @@ -10,6 +10,9 @@ window.cookieconsent.initialise({
dismiss: 'I accept',
link: null,
},
+ cookie: {
+ name: 'sr_cookieconsent',
+ },
palette: {
popup: {
background: "#000",
| 4 |
diff --git a/assets/js/components/user-input/UserInputPreviewGroup.js b/assets/js/components/user-input/UserInputPreviewGroup.js @@ -24,7 +24,7 @@ import PropTypes from 'prop-types';
/**
* WordPress dependencies
*/
-import { __, sprintf } from '@wordpress/i18n';
+import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
@@ -41,10 +41,6 @@ export default function UserInputPreviewGroup( {
const trim = ( value ) => value.trim();
const notEmpty = ( value ) => value.length > 0;
- const sprintfTemplate =
- /* translators: %s: other option */
- questionNumber < 5 ? __( 'Other: %s', 'google-site-kit' ) : '%s';
-
return (
<div className="googlesitekit-user-input__preview-group">
<div className="googlesitekit-user-input__preview-group-title">
@@ -65,8 +61,7 @@ export default function UserInputPreviewGroup( {
key={ value }
className="googlesitekit-user-input__preview-answer"
>
- { options[ value ] ||
- sprintf( sprintfTemplate, value ) }
+ { options[ value ] }
</div>
) ) }
</div>
| 2 |
diff --git a/src/user/User.js b/src/user/User.js @@ -62,6 +62,7 @@ export default class UserProfile extends React.Component {
super(props);
this.state = {
user: {},
+ fetching: false
};
}
@@ -76,9 +77,16 @@ export default class UserProfile extends React.Component {
}
fetchUserData() {
- this.setState({ user: {} });
+ this.setState({ user: {}, fetching: true });
getAccountWithFollowingCount(this.props.params.name)
- .then(user => this.setState({ user }));
+ .then(user => this.setState({ user }))
+ .catch((e) => {
+ if (e.message === 'User Not Found') {
+ this.setState({ user: null });
+ }
+ }).finally(() => {
+ this.setState({ fetching: false });
+ });
}
isFavorited() {
@@ -87,20 +95,16 @@ export default class UserProfile extends React.Component {
return username && favorites.includes(username);
}
- render() {
- const username = this.props.params.name;
- const user = this.state.user;
- return (
- <div className="main-panel">
- <Header />
+ getUserView(user) {
+ return user ? (<div>
<MenuUser
auth={this.props.auth}
- username={this.props.params.name}
+ username={user.name}
/>
<section
className="align-center bg-green profile-header"
style={{
- backgroundImage: `url(${process.env.STEEMCONNECT_IMG_HOST}/@${username}/cover)`,
+ backgroundImage: `url(${process.env.STEEMCONNECT_IMG_HOST}/@${user.name}/cover)`,
backgroundSize: 'cover',
position: 'relative',
}}
@@ -108,33 +112,32 @@ export default class UserProfile extends React.Component {
<div className="my-5">
<Avatar
xl
- key={username}
- username={username}
+ key={user.name}
+ username={user.name}
reputation={_.has(user, 'name') && user.reputation}
/>
<h1>
{_.has(user.json_metadata, 'profile.name')
? user.json_metadata.profile.name
- : username
+ : user.name
}
{' '}
<FavoriteButton
isFavorited={this.isFavorited()}
onClick={this.isFavorited()
- ? () => this.props.removeUserFavorite(username)
- : () => this.props.addUserFavorite(username)
+ ? () => this.props.removeUserFavorite(user.name)
+ : () => this.props.addUserFavorite(user.name)
}
/>
</h1>
- <Follow username={username} />
+ <Follow username={user.name} />
</div>
</section>
<div className="profile">
- {!_.has(user, 'name') && <Loading />}
{_.has(user, 'name') && <div>
<ul className="secondary-nav">
<li>
- <Link to={`/@${username}`}>
+ <Link to={`/@${user.name}`}>
<Icon name="library_books" /> {numeral(user.post_count).format('0,0')}
<span className="hidden-xs">
{' '}<FormattedMessage id="posts" />
@@ -142,22 +145,22 @@ export default class UserProfile extends React.Component {
</Link>
</li>
<li>
- <Icon name="gavel" /> {numeral(parseInt(user.voting_power) / 10000).format('%0')}
+ <Icon name="gavel" /> {numeral(parseInt(user.voting_power, 10) / 10000).format('%0')}
<span className="hidden-xs">
{' '}<FormattedMessage id="voting_power" />
</span>
</li>
<li>
- <Link to={`/@${username}/followers`}>
- <Icon name="people" /> {numeral(parseInt(user.follower_count)).format('0,0')}
+ <Link to={`/@${user.name}/followers`}>
+ <Icon name="people" /> {numeral(parseInt(user.follower_count, 10)).format('0,0')}
<span className="hidden-xs">
{' '}<FormattedMessage id="followers" />
</span>
</Link>
</li>
<li>
- <Link to={`/@${username}/followed`}>
- <Icon name="people" /> {numeral(parseInt(user.following_count)).format('0,0')}
+ <Link to={`/@${user.name}/followed`}>
+ <Icon name="people" /> {numeral(parseInt(user.following_count, 10)).format('0,0')}
<span className="hidden-xs">
{' '}<FormattedMessage id="followed" />
</span>
@@ -176,6 +179,15 @@ export default class UserProfile extends React.Component {
}
)}
</div>
+ </div>) : <strong className="text-center w-100 p-5">User not found</strong>;
+ }
+
+ render() {
+ const { user, fetching } = this.state;
+ return (
+ <div className="main-panel">
+ <Header />
+ {fetching ? <Loading /> : this.getUserView(user)}
</div>
);
}
| 9 |
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/field/texteditor/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/field/texteditor/template.vue })
const toolbar = this.quill.getModule('toolbar')
toolbar.addHandler('link', (value) => {
- this.showPageBrowser()
+ console.log('showPathBrowser: ', value)
+ this.showPathBrowser(this.getSelectedPath())
})
this.quill.on('text-change', (delta, oldDelta, source) => {
this.value = this.$refs.quilleditor.children[0].innerHTML
} )
},
- showPageBrowser() {
- $perAdminApp.pageBrowser(
- '/content/sites',
- true, // with Link tab?
- (newValue) => {
- newValue ? this.quill.format('link', newValue) : this.quill.format('link', false)
+ getSelectedPath(){
+ var range = this.quill.getSelection()
+ if (range && !range.length == 0) {
+ var selectedText = this.quill.getText(range.index, range.length)
+ console.log('User has highlighted: ', selectedText)
+ // find link with text as value
+ var linkNodes = document.querySelectorAll('.ql-editor > p > a')
+ console.log('linkNodes: ', linkNodes)
+ // find link with selected text (selectedText)
+ let len = linkNodes.length
+ for(let i=0; i<len; i++){
+ let node = linkNodes[i]
+ if(node.textContent === selectedText) {
+ // return link pathname so we can set as selectedText
+ return node.pathname
}
- )
+ }
+ }
+ return false
+ },
+ showPathBrowser(selectedPath) {
+ let root = '/content/sites'
+ let currentPath
+ selectedPath
+ ? currentPath = selectedPath.substr(0, selectedPath.lastIndexOf('/'))
+ : currentPath = root
+ const initModalState = {
+ root: root,
+ type: 'default',
+ current: currentPath,
+ selected: selectedPath,
+ withLinkTab: true
+ }
+ console.log('initialModalState: ', initModalState)
+ const options = {
+ complete: this.setLinkValue
+ }
+ $perAdminApp.pathBrowser(initModalState, options)
+ },
+ setLinkValue(){
+ const newValue = $perAdminApp.getNodeFromView('/state/pathbrowser/selected')
+ newValue
+ ? this.quill.format('link', newValue)
+ : this.quill.format('link', false)
}
}
}
| 12 |
diff --git a/services/user-mover/import_user.rb b/services/user-mover/import_user.rb @@ -191,14 +191,14 @@ module CartoDB
end
begin
if @target_org_id && @target_is_owner && File.exists?(org_dump_path)
- create_db(org_dump_path)
+ create_db(from_dump: true)
create_org_oauth_app_user_roles(@target_org_id)
create_org_api_key_roles(@target_org_id)
import_pgdump("org_#{@target_org_id}.dump")
grant_org_oauth_app_user_roles(@target_org_id)
grant_org_api_key_roles(@target_org_id)
elsif File.exists?(user_dump_path)
- create_db(user_dump_path)
+ create_db(from_dump: true)
create_user_oauth_app_user_roles(@target_userid)
create_user_api_key_roles(@target_userid)
import_pgdump("user_#{@target_userid}.dump")
@@ -596,13 +596,13 @@ module CartoDB
superuser_pg_conn.query("ALTER USER \"#{user}\" SET search_path= #{search_path}")
end
- def create_db(dump_path = nil)
+ def create_db(from_dump: true)
# When a dump file is provided, the database should be created empty (will receive a pg_dump).
# dump = nil: it should have postgis, cartodb/cdb_importer/cdb schemas
# connect as superuser (postgres)
@logger.info "Creating user DB #{@target_dbname}..."
begin
- if dump_path
+ if params[:from_dump]
superuser_pg_conn.query("CREATE DATABASE \"#{@target_dbname}\"")
else
superuser_pg_conn.query("CREATE DATABASE \"#{@target_dbname}\" WITH TEMPLATE template_postgis")
@@ -610,7 +610,7 @@ module CartoDB
# This rescue can be improved a little bit. The way it is it assumes that the error
# will always be that the db already exists
rescue PG::Error => e
- if dump_path
+ if params[:from_dump]
@logger.error "Error: Database already exists"
raise e
else
@@ -618,7 +618,7 @@ module CartoDB
end
end
- dump_path ? setup_db_for_migration(dump_path) : setup_db
+ params[:from_dump] ? setup_db_for_migration : setup_db
end
def setup_db
@@ -635,7 +635,7 @@ module CartoDB
raise e
end
- def setup_db_for_migration(dump_path)
+ def setup_db_for_migration
destination_db_version = get_database_version_for_binaries(superuser_pg_conn).split('.').first
return if destination_db_version != '12'
| 2 |
diff --git a/package.json b/package.json "babel-preset-es2015": "~6.24.1",
"babel-preset-stage-0": "~6.24.1",
"browserify": "~14.4.0",
- "electron-packager": "~8.7.2",
+ "electron-packager": "~8.6.0",
"expect.js": "~0.3.1",
"extract-zip": "~1.6.5",
"grunt": "~1.0.1",
| 13 |
diff --git a/js/bootstrap-select.js b/js/bootstrap-select.js // If we are multiple or showTick option is set, then add the show-tick class
var showTick = (this.multiple || this.options.showTick) ? ' show-tick' : '',
autofocus = this.autofocus ? ' autofocus' : '';
+
// Elements
- var header = this.options.header ? '<div class="' + classNames.POPOVERHEADER + '"><button type="button" class="close" aria-hidden="true">×</button>' + this.options.header + '</div>' : '';
- var searchbox = this.options.liveSearch ?
+ var drop,
+ header = '',
+ searchbox = '',
+ actionsbox = '',
+ donebutton = '';
+
+ if (this.options.header) {
+ header =
+ '<div class="' + classNames.POPOVERHEADER + '">' +
+ '<button type="button" class="close" aria-hidden="true">×</button>' +
+ this.options.header +
+ '</div>';
+ }
+
+ if (this.options.liveSearch) {
+ searchbox =
'<div class="bs-searchbox">' +
'<input type="text" class="form-control" autocomplete="off"' +
- (null === this.options.liveSearchPlaceholder ? '' : ' placeholder="' + htmlEscape(this.options.liveSearchPlaceholder) + '"') + ' role="textbox" aria-label="Search">' +
- '</div>'
- : '';
- var actionsbox = this.multiple && this.options.actionsBox ?
+ (
+ null === this.options.liveSearchPlaceholder ? ''
+ :
+ ' placeholder="' + htmlEscape(this.options.liveSearchPlaceholder) + '"'
+ ) +
+ ' role="textbox" aria-label="Search">' +
+ '</div>';
+ }
+
+ if (this.multiple && this.options.actionsBox) {
+ actionsbox =
'<div class="bs-actionsbox">' +
'<div class="btn-group btn-group-sm btn-block">' +
'<button type="button" class="actions-btn bs-select-all btn ' + classNames.BUTTONCLASS + '">' +
this.options.deselectAllText +
'</button>' +
'</div>' +
- '</div>'
- : '';
- var donebutton = this.multiple && this.options.doneButton ?
+ '</div>';
+ }
+
+ if (this.multiple && this.options.doneButton) {
+ donebutton =
'<div class="bs-donebutton">' +
'<div class="btn-group btn-block">' +
'<button type="button" class="btn btn-sm ' + classNames.BUTTONCLASS + '">' +
this.options.doneButtonText +
'</button>' +
'</div>' +
- '</div>'
- : '';
- var drop =
+ '</div>';
+ }
+
+ drop =
'<div class="dropdown bootstrap-select' + showTick + '">' +
'<button type="button" class="' + this.options.styleBase + ' dropdown-toggle" ' + (this.options.display === 'static' ? 'data-display="static"' : '') + 'data-toggle="dropdown"' + autofocus + ' role="button">' +
'<div class="filter-option">' +
'<div class="filter-option-inner-inner"></div>' +
'</div> ' +
'</div>' +
- (version.major === '4' ?
- '' :
+ (
+ version.major === '4' ? ''
+ :
'<span class="bs-caret">' +
this.options.template.caret +
'</span>'
| 7 |
diff --git a/js/kiri-serial.js b/js/kiri-serial.js @@ -259,7 +259,7 @@ var gs_kiri_serial = exports;
var data = msg.data.trim();
if (data.charAt(0) === '{') {
data = js2o(data);
- if (data.Cmd) console.log(data);
+ // if (data.Cmd) console.log(data);
if (data.Cmd && data.Cmd === 'Queued' && data.Data) {
queueAck(data.Data);
}
| 2 |
diff --git a/website/ops.js b/website/ops.js @@ -49,11 +49,12 @@ module.exports={
} else {
fs.copy("dictTemplates/"+template+".sqlite", path.join(module.exports.siteconfig.dataDir, "dicts/"+dictID+".sqlite"), function(err){
var users={}; users[email]={"canEdit": true, "canConfig": true, "canDownload": true, "canUpload": true};
- db.run("update configs set json=$json where id='users'", {$json: JSON.stringify(users, null, "\t")}, function(err){ if(err) console.log(err);
+ var dictDB = module.exports.getDB(dictID);
+ dictDB.run("update configs set json=$json where id='users'", {$json: JSON.stringify(users, null, "\t")}, function(err){ if(err) console.log(err);
var ident={"title": title, "blurb": blurb};
- db.run("update configs set json=$json where id='ident'", {$json: JSON.stringify(ident, null, "\t")}, function(err){ if(err) console.log(err);
- module.exports.attachDict(db, dictID, function(){
- db.close();
+ dictDB.run("update configs set json=$json where id='ident'", {$json: JSON.stringify(ident, null, "\t")}, function(err){ if(err) console.log(err);
+ module.exports.attachDict(dictDB, dictID, function(){
+ dictDB.close();
callnext(true);
});
});
| 1 |
diff --git a/token-metadata/0xf0be50ED0620E0Ba60CA7FC968eD14762e0A5Dd3/metadata.json b/token-metadata/0xf0be50ED0620E0Ba60CA7FC968eD14762e0A5Dd3/metadata.json "symbol": "COW",
"address": "0xf0be50ED0620E0Ba60CA7FC968eD14762e0A5Dd3",
"decimals": 9,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/package.json b/package.json "scripts": {
"start": "npx grunt dev",
"build": "npx grunt prod",
+ "node": "npx grunt node",
"repl": "node --experimental-modules --experimental-json-modules --experimental-specifier-resolution=node --no-warnings src/node/repl.mjs",
"test": "npx grunt configTests && node --experimental-modules --experimental-json-modules --no-warnings --no-deprecation tests/node/index.mjs && node --experimental-modules --experimental-json-modules --no-warnings --no-deprecation tests/operations/index.mjs",
"testnodeconsumer": "npx grunt testnodeconsumer",
| 0 |
diff --git a/webpack/internals.config.js b/webpack/internals.config.js const path = require('path')
const fs = require('fs')
-const webpack = require('webpack')
const webpackMain = require('electron-webpack/webpack.main.config') // eslint-disable-line import/no-extraneous-dependencies
const define = require('./define')
@@ -17,35 +16,24 @@ const dirs = p =>
}, {})
module.exports = webpackMain().then(config => ({
- target: 'electron-main',
+ context: config.context,
+ devtool: config.devtool,
+ target: config.target,
entry: dirs(path.resolve(__dirname, '../src/internals')),
resolve: {
- extensions: ['.js', '.json', '.node'],
+ extensions: config.extensions,
},
externals: ['node-hid', ...config.externals],
output: {
path: path.resolve(__dirname, '../dist/internals'),
- filename: '[name].js',
- libraryTarget: 'commonjs2',
+ ...config.output,
},
- module: {
- rules: [
- {
- test: /\.js$/,
- use: 'babel-loader',
- exclude: /node_modules/,
- },
- {
- test: /\.node$/,
- use: 'node-loader',
- },
- ],
- },
+ module: config.module,
- plugins: [define, new webpack.optimize.ModuleConcatenationPlugin()],
+ plugins: [define, ...config.plugins],
}))
| 4 |
diff --git a/src/Storage/Device.php b/src/Storage/Device.php @@ -13,7 +13,7 @@ abstract class Device
*
* @return string
*/
- abstract public function getName();
+ abstract public function getName():string;
/**
* Get Description.
@@ -22,7 +22,7 @@ abstract class Device
*
* @return string
*/
- abstract public function getDescription();
+ abstract public function getDescription():string;
/**
* Get Root.
@@ -31,7 +31,7 @@ abstract class Device
*
* @return string
*/
- abstract public function getRoot();
+ abstract public function getRoot():string;
/**
* Get Path.
@@ -42,10 +42,7 @@ abstract class Device
*
* @return string
*/
- public function getPath($filename)
- {
- return $this->getRoot().DIRECTORY_SEPARATOR.$filename;
- }
+ abstract public function getPath($filename):string;
/**
* Upload.
@@ -59,29 +56,7 @@ abstract class Device
*
* @return string|bool saved destination on success or false on failures
*/
- public function upload($target, $filename = '')
- {
- $filename = (empty($filename)) ? $target : $filename;
- $filename = uniqid().'.'.pathinfo($filename, PATHINFO_EXTENSION);
-
- $path = $this->getPath($filename);
-
- if (!is_uploaded_file($target)) {
- throw new Exception('File is not a valid uploaded file');
- }
-
- if (!file_exists(dirname($path))) { // Checks if directory path to file exists
- if (!@mkdir(dirname($path), 0755, true)) {
- throw new Exception('Can\'t create directory '.dirname($path));
- }
- }
-
- if (move_uploaded_file($target, $path)) {
- return $path;
- }
-
- throw new Exception('Upload failed');
- }
+ abstract public function upload($target, $filename = '');
/**
* Read file by given path.
@@ -90,10 +65,7 @@ abstract class Device
*
* @return string
*/
- public function read(string $path):string
- {
- return file_get_contents($path);
- }
+ abstract public function read(string $path):string;
/**
* Write file by given path.
@@ -103,10 +75,7 @@ abstract class Device
*
* @return string
*/
- public function write(string $path, string $data):bool
- {
- return file_put_contents($path, $data);
- }
+ abstract public function write(string $path, string $data):bool;
/**
* Delete file in given path, Return true on success and false on failure.
@@ -117,36 +86,7 @@ abstract class Device
*
* @return bool
*/
- public function delete(string $path):bool
- {
- return unlink($path);
- }
-
- /**
- * Delete all file and directories in given path, Return true on success and false on failure.
- *
- * @see https://paulund.co.uk/php-delete-directory-and-files-in-directory
- *
- * @param string $path
- *
- * @return bool
- */
- public function deleteDir($target):bool
- {
- if (is_dir($target)) {
- $files = glob($target.'*', GLOB_MARK); // GLOB_MARK adds a slash to directories returned
-
- foreach ($files as $file) {
- $this->deleteDir($file);
- }
-
- rmdir($target);
- } elseif (is_file($target)) {
- unlink($target);
- }
-
- return true;
- }
+ abstract public function delete(string $path):bool;
/**
* Returns given file path its size.
@@ -157,10 +97,7 @@ abstract class Device
*
* @return int
*/
- public function getFileSize(string $path):int
- {
- return filesize($path);
- }
+ abstract public function getFileSize(string $path):int;
/**
* Returns given file path its mime type.
@@ -171,10 +108,7 @@ abstract class Device
*
* @return string
*/
- public function getFileMimeType(string $path):string
- {
- return mime_content_type($path);
- }
+ abstract public function getFileMimeType(string $path):string;
/**
* Returns given file path its MD5 hash value.
@@ -185,10 +119,7 @@ abstract class Device
*
* @return string
*/
- public function getFileHash(string $path):string
- {
- return md5_file($path);
- }
+ abstract public function getFileHash(string $path):string;
/**
* Get directory size in bytes.
@@ -201,34 +132,7 @@ abstract class Device
*
* @return int
*/
- public function getDirectorySize(string $path):int
- {
- $size = 0;
-
- $directory = opendir($path);
-
- if (!$directory) {
- return -1;
- }
-
- while (($file = readdir($directory)) !== false) {
- // Skip file pointers
- if ($file[0] == '.') {
- continue;
- }
-
- // Go recursive down, or add the file size
- if (is_dir($path.$file)) {
- $size += $this->getDirectorySize($path.$file.DIRECTORY_SEPARATOR);
- } else {
- $size += filesize($path.$file);
- }
- }
-
- closedir($directory);
-
- return $size;
- }
+ abstract public function getDirectorySize(string $path):int;
/**
* Get Partition Free Space.
@@ -237,10 +141,7 @@ abstract class Device
*
* @return float
*/
- public function getPartitionFreeSpace():float
- {
- return disk_free_space($this->getRoot());
- }
+ abstract public function getPartitionFreeSpace():float;
/**
* Get Partition Total Space.
@@ -249,10 +150,7 @@ abstract class Device
*
* @return float
*/
- public function getPartitionTotalSpace():float
- {
- return disk_total_space($this->getRoot());
- }
+ abstract public function getPartitionTotalSpace():float;
/**
* Human readable data size format from bytes input.
| 7 |
diff --git a/src/core/operations/RenderMarkdown.mjs b/src/core/operations/RenderMarkdown.mjs * @license Apache-2.0
*/
-import Operation from "../Operation";
+import Operation from "../Operation.mjs";
import MarkdownIt from "markdown-it";
+import hljs from "highlight.js";
/**
* Render Markdown operation
@@ -20,7 +21,7 @@ class RenderMarkdown extends Operation {
this.name = "Render Markdown";
this.module = "Default";
- this.description = "Renders Markdown as HTML.";
+ this.description = "Renders input Markdown as HTML.";
this.infoURL = "https://wikipedia.org/wiki/Markdown";
this.inputType = "string";
this.outputType = "html";
@@ -31,9 +32,9 @@ class RenderMarkdown extends Operation {
value: false
},
{
- name: "Convert \\n to <br>",
+ name: "Enable syntax highlighting",
type: "boolean",
- value: false
+ value: true
}
];
}
@@ -44,10 +45,19 @@ class RenderMarkdown extends Operation {
* @returns {html}
*/
run(input, args) {
- const [convertLinks, convertNewLine] = args,
+ const [convertLinks, enableHighlighting] = args,
md = new MarkdownIt({
- breaks: convertNewLine,
- linkify: convertLinks
+ linkify: convertLinks,
+ html: false, // Explicitly disable HTML rendering
+ highlight: function(str, lang) {
+ if (lang && hljs.getLanguage(lang) && enableHighlighting) {
+ try {
+ return hljs.highlight(lang, str).value;
+ } catch (__) {}
+ }
+
+ return "";
+ }
}),
rendered = md.render(input);
| 0 |
diff --git a/src/components/signup/SignupState.js b/src/components/signup/SignupState.js @@ -81,7 +81,7 @@ const Signup = ({ navigation, screenProps }: { navigation: any, screenProps: any
await API.verifyTopWallet()
const { email: to, fullName: name } = state
const mnemonic = localStorage.getItem('GD_USER_MNEMONIC')
- logger.info({ to, name, mnemonic })
+ log.info({ to, name, mnemonic })
await API.sendRecoveryInstructionByEmail({ to, name, mnemonic })
if (destinationPath !== '') {
navigation.navigate(JSON.parse(destinationPath))
| 14 |
diff --git a/articles/api-auth/tutorials/authorization-code-grant.md b/articles/api-auth/tutorials/authorization-code-grant.md @@ -124,7 +124,7 @@ The response contains the `access_token`, `refresh_token`, `id_token`, and `toke
Note that `refresh_token` will only be present in the response if you included the `offline_access` scope AND enabled __Allow Offline Access__ for your API in the Dashboard. See [Refresh Tokens](/tokens/concepts/refresh-tokens) for more information.
::: panel-warning Security Warning
-It is important to understand that the Authorization Code flow should only be used in cases such as a Regular Web Application where the Client Secret can be safely stored. In cases such as a Single-Page Application, the Client Secret is available to the application (in the web browser), so the integrity of the Client Secret cannot be maintained. That is why the [Implicit Grant flow](/api-auth/grant/implicit) is more appropriate in that case.
+It is important to understand that the Authorization Code flow should only be used in cases such as a Regular Web Application where the Client Secret can be safely stored. In cases such as a Single-Page Application, the Client Secret is available to the application (in the web browser), so the integrity of the Client Secret cannot be maintained. That is why the [Authorization Code Flow with PKCE ](/flows/concepts/auth-code-pkce) is more appropriate in that case.
:::
## 3. Call the API
| 2 |
diff --git a/client/src/js/index.js b/client/src/js/index.js var layers = $.getJSON(config.layersPath || layersPath);
layers.done(data => {
+ // Set <title> in HTML if map has a title property in JSON config
+ if (map_config.hasOwnProperty('map') && map_config.map.hasOwnProperty('title')) {
+ document.title = map_config.map.title;
+ }
+
var layerSwitcherTool = map_config.tools.find(tool => {
return tool.type === 'layerswitcher';
});
| 12 |
diff --git a/articles/appliance/infrastructure/virtual-machines.md b/articles/appliance/infrastructure/virtual-machines.md @@ -44,7 +44,7 @@ For multi-node clusters, Auth0 recommends deploying the PSaaS Appliance virtual
## For AWS Users
-* The *recommended* [instance type](https://aws.amazon.com/ec2/instance-types/) is **M4.2xlarge** (M4.xlarge minimum).
+* The *recommended* [instance type](https://aws.amazon.com/ec2/instance-types/) is **M4.2xlarge** (minimum).
* Auth0 will need the following pieces of information to share the AMI with you:
* AWS account number;
* AWS region name. The region should have at least three [availability zones](https://aws.amazon.com/about-aws/global-infrastructure) for your Production cluster.
| 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.