code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/src/ace/AceGmlCommands.hx b/src/ace/AceGmlCommands.hx @@ -12,6 +12,15 @@ class AceGmlCommands {
inline function wm(win:String, mac:String):AceCommandKey {
return { win: win, mac: mac };
}
+ commands.addCommand({
+ name: "startAutocomplete",
+ exec: function(editor:AceWrap) {
+ if (editor.completer != null) {
+ editor.completer.showPopup(editor);
+ }
+ },
+ bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space"
+ });
commands.addCommand({
name: "showKeyboardShortcuts",
bindKey: wm("Ctrl-Alt-h", "Command-Alt-h"),
| 11 |
diff --git a/src/encoded/schemas/mixins.json b/src/encoded/schemas/mixins.json "5' RLM RACE",
"MNase-seq"
]
- },
- "assay_term_id": {
- "@type": "@id",
- "title": "Assay ID",
- "description": "OBI (Ontology for Biomedical Investigations) ontology identifier for the assay.",
- "type": "string",
- "comment": "Based on the choice in assay_term_name use the corresponding identifier",
- "enum": [
- "OBI:0000716",
- "OBI:0001271",
- "OBI:0001853",
- "NTR:0003027",
- "NTR:0000762",
- "OBI:0002044",
- "OBI:0001463",
- "OBI:0001332",
- "OBI:0001863",
- "OBI:0001862",
- "NTR:0000763",
- "OBI:0001864",
- "OBI:0001393",
- "OBI:0001674",
- "NTR:0003082",
- "OBI:0001920",
- "OBI:0001922",
- "NTR:0003660",
- "OBI:0001861",
- "OBI:0001857",
- "OBI:0001915",
- "OBI:0000693",
- "OBI:0001848",
- "OBI:0001859",
- "OBI:0002039",
- "OBI:0002045",
- "OBI:0001918",
- "OBI:0001850",
- "OBI:0001247",
- "NTR:0003814",
- "OBI:0001923",
- "OBI:0001919",
- "OBI:0002042",
- "NTR:0002490",
- "OBI:0002043",
- "OBI:0001849",
- "NTR:0000612",
- "NTR:0001684",
- "OBI:0001924"
- ]
}
},
"treatment_classification": {
| 2 |
diff --git a/src/lib/collections.ts b/src/lib/collections.ts import StreamClient, { APIResponse } from './client';
import errors from './errors';
-type CollectionResponse<CollectionType> = {
+type BaseCollection<CollectionType> = {
collection: string;
id: string;
data: CollectionType;
+};
+
+type CollectionResponse<CollectionType> = BaseCollection<CollectionType> & {
foregin_id: string;
created_at: Date;
updated_at: Date;
+};
+
+type NewCollectionEntry<CollectionType> = BaseCollection<CollectionType> & {
user_id?: string;
};
@@ -214,7 +220,7 @@ export default class Collections<CollectionType> {
upsert(
collection: string,
- data: CollectionType | CollectionType[],
+ data: NewCollectionEntry<CollectionType> | NewCollectionEntry<CollectionType>[],
): Promise<UpsertCollectionAPIResponse<CollectionType>> {
/**
* Upsert one or more items within a collection.
| 1 |
diff --git a/Source/Widgets/CesiumInspector/Cesium3DTilesInspector.js b/Source/Widgets/CesiumInspector/Cesium3DTilesInspector.js @@ -288,7 +288,7 @@ define([
slider.min = min;
slider.max = max;
slider.step = step;
- slider.setAttribute('data-bind', 'value: ' + property);
+ slider.setAttribute('data-bind', 'valueUpdate: "input", value: ' + property);
container.appendChild(document.createTextNode(text));
var wrapper = document.createElement('div');
| 3 |
diff --git a/README.md b/README.md @@ -127,6 +127,8 @@ package = "./plugins/netlify-plugin-hello-world"
(Note that each plugin you add to the `netlify.toml` file has its own `[[plugins]]` line.)
+Local plugins `package` value must start with `.` or `/`.
+
Now that the plugin is declared, we can verify it's loading correctly with the `netlify build --dry` command. This
execute a "dry run" of our build and show us the plugins & commands that will execute for a real build.
| 7 |
diff --git a/packages/component-library/src/Sandbox/Sandbox.js b/packages/component-library/src/Sandbox/Sandbox.js import PropTypes from "prop-types";
import React from "react";
import { css } from "emotion";
-
import BaseMap from "../BaseMap/BaseMap";
import CivicSandboxMap from "../CivicSandboxMap/CivicSandboxMap";
import CivicSandboxTooltip from "../CivicSandboxMap/CivicSandboxTooltip";
@@ -20,8 +19,7 @@ class Sandbox extends React.Component {
constructor(props) {
super();
this.state = {
- baseMapStyle: "light",
- baseMapStyleUrl: "mapbox://styles/hackoregon/cjiazbo185eib2srytwzleplg"
+ baseMapStyle: "light"
};
this.handleBaseMapStyleChange = this.handleBaseMapStyleChange.bind(this);
}
@@ -29,13 +27,10 @@ class Sandbox extends React.Component {
handleBaseMapStyleChange = baseMapStyleChangeEvent => {
baseMapStyleChangeEvent.target.value === "light"
? this.setState({
- baseMapStyle: "light",
- baseMapStyleUrl:
- "mapbox://styles/hackoregon/cjiazbo185eib2srytwzleplg"
+ baseMapStyle: "light"
})
: this.setState({
- baseMapStyle: "dark",
- baseMapStyleUrl: "mapbox://styles/mapbox/dark-v9"
+ baseMapStyle: "dark"
});
};
@@ -107,7 +102,7 @@ class Sandbox extends React.Component {
<div className={baseMapWrapper}>
<BaseMap
- mapboxStyle={this.state.baseMapStyleUrl}
+ civicMapStyle={this.state.baseMapStyle}
initialZoom={10.5}
initialLatitude={45.5431}
initialLongitude={-122.5765}
| 2 |
diff --git a/avatars/util.mjs b/avatars/util.mjs @@ -522,6 +522,7 @@ export const cloneModelBones = modelBones => {
const nameToDstBoneMap = {};
for (const k in modelBones) {
const srcBone = modelBones[k];
+ if (srcBone) {
const dstBone = new THREE.Bone();
dstBone.name = srcBone.name;
dstBone.position.copy(srcBone.position);
@@ -529,6 +530,7 @@ export const cloneModelBones = modelBones => {
result[k] = dstBone;
nameToDstBoneMap[dstBone.name] = dstBone;
}
+ }
modelBones.Root.traverse(srcBone => {
if (!nameToDstBoneMap[srcBone.name]) {
const dstBone = new THREE.Bone();
| 0 |
diff --git a/controllers/user.js b/controllers/user.js -const async = require('async');
const crypto = require('crypto');
const nodemailer = require('nodemailer');
const passport = require('passport');
@@ -250,13 +249,11 @@ exports.postReset = (req, res, next) => {
return res.redirect('back');
}
- async.waterfall([
- function resetPassword(done) {
- User
+ function resetPassword() {
+ return User
.findOne({ passwordResetToken: req.params.token })
.where('passwordResetExpires').gt(Date.now())
- .exec((err, user) => {
- if (err) { return next(err); }
+ .then((user) => {
if (!user) {
req.flash('errors', { msg: 'Password reset token is invalid or has expired.' });
return res.redirect('back');
@@ -264,15 +261,17 @@ exports.postReset = (req, res, next) => {
user.password = req.body.password;
user.passwordResetToken = undefined;
user.passwordResetExpires = undefined;
- user.save((err) => {
- if (err) { return next(err); }
+ return user.save().then(() => new Promise((resolve, reject) => {
req.logIn(user, (err) => {
- done(err, user);
+ if (err) return reject(err);
+ resolve(user);
});
+ }));
});
- });
- },
- function sendResetPasswordEmail(user, done) {
+ }
+
+ function sendResetPasswordEmail(user) {
+ if (!user) return;
const transporter = nodemailer.createTransport({
service: 'SendGrid',
auth: {
@@ -286,15 +285,16 @@ exports.postReset = (req, res, next) => {
subject: 'Your Hackathon Starter password has been changed',
text: `Hello,\n\nThis is a confirmation that the password for your account ${user.email} has just been changed.\n`
};
- transporter.sendMail(mailOptions, (err) => {
+ return transporter.sendMail(mailOptions)
+ .then(() => {
req.flash('success', { msg: 'Success! Your password has been changed.' });
- done(err);
});
}
- ], (err) => {
- if (err) { return next(err); }
- res.redirect('/');
- });
+
+ resetPassword()
+ .then(sendResetPasswordEmail)
+ .then(() => { if (!res.finished) res.redirect('/'); })
+ .catch(err => next(err));
};
/**
@@ -325,28 +325,24 @@ exports.postForgot = (req, res, next) => {
return res.redirect('/forgot');
}
- async.waterfall([
- function createRandomToken(done) {
+ function createRandomToken() {
+ return new Promise((resolve, reject) => {
crypto.randomBytes(16, (err, buf) => {
- const token = buf.toString('hex');
- done(err, token);
+ if (err) return reject(err);
+ resolve(buf.toString('hex'));
+ });
});
- },
- function setRandomToken(token, done) {
- User.findOne({ email: req.body.email }, (err, user) => {
- if (err) { return done(err); }
+ }
+ function setRandomToken([token, user]) {
if (!user) {
req.flash('errors', { msg: 'Account with that email address does not exist.' });
return res.redirect('/forgot');
}
user.passwordResetToken = token;
user.passwordResetExpires = Date.now() + 3600000; // 1 hour
- user.save((err) => {
- done(err, token, user);
- });
- });
- },
- function sendForgotPasswordEmail(token, user, done) {
+ return user.save().then(() => [token, user]);
+ }
+ function sendForgotPasswordEmail([token, user]) {
const transporter = nodemailer.createTransport({
service: 'SendGrid',
auth: {
@@ -363,13 +359,17 @@ exports.postForgot = (req, res, next) => {
http://${req.headers.host}/reset/${token}\n\n
If you did not request this, please ignore this email and your password will remain unchanged.\n`
};
- transporter.sendMail(mailOptions, (err) => {
+ return transporter.sendMail(mailOptions)
+ .then(() => {
req.flash('info', { msg: `An e-mail has been sent to ${user.email} with further instructions.` });
- done(err);
});
}
- ], (err) => {
- if (err) { return next(err); }
- res.redirect('/forgot');
- });
+ return Promise.all([
+ createRandomToken(),
+ User.findOne({ email: req.body.email }).exec()
+ ])
+ .then(setRandomToken)
+ .then(sendForgotPasswordEmail)
+ .then(() => res.redirect('/forgot'))
+ .catch(err => next(err));
};
| 14 |
diff --git a/sox.github.js b/sox.github.js const $issue = $('#issue_body');
if ($issue.length) {
$issue.prop('disabled', 'true');
- let issueText = $issue.text();
+ const environmentText = `
+**Environment**
+SOX version: ${version}
+Platform: ${handler}
+`;
- issueText = issueText.replace('1.X.X', version); //inject the SOX version by replacing the issue template's placeholder '1.X.X'
- issueText = issueText.replace('Chrome/Tampermonkey', handler); //inject the SOX userscript manager+platform by replacing the issue template's placeholder 'Chrome/Tampermonkey'
+ let issueText = $issue.text();
+ issueText = issueText.replace('**Environment**', environmentText); //inject environment details
issueText += '\n---\n\n### Features Enabled \n\n ' + JSON.stringify(sox.settings.load());
$('#issue_body').delay(500).text(issueText).removeAttr('disabled');
}
| 4 |
diff --git a/README.md b/README.md @@ -59,6 +59,19 @@ The security token registry keeps track of deployed STs on the Polymath Platform
### ModuleRegistry
Modules allow custom add-in functionality in the issuance process and beyond. The module registry keeps track of modules added by Polymath or any other users. Modules can only be attached to STs if Polymath has previously verified them. If not, the only user able to utilize a module is its owner, and they should be using it "at their own risk".
+## CLI and CLI Documentation
+
+The CLI is for users that want to easily walkthrough all the details of an STO issuance. The CLI documentation is located on our [Github Wiki](https://github.com/PolymathNetwork/polymath-core/wiki). You can easily navigate through it with the sidebar directory in order to run the CLI and set up and test the following:
+
+1. Prerequisite Instructions / Deploy and setup the Polymath contracts
+2. Launch the CLI on Ganache
+3. Use the Faucet to get POLY
+4. Deploy a token + Launch a USDTieredSTO
+5. Whitelist investors
+6. Work with the Dividends module
+7. Using other CLI features
+
+
# Setting up Polymath Core
### v2.0.0 MAINNET
| 3 |
diff --git a/src/utils/live-tunnel.js b/src/utils/live-tunnel.js @@ -73,8 +73,9 @@ async function connectTunnel(session, netlifyApiToken, localPort, log) {
}
async function installTunnelClient(log) {
+ const win = isWindows();
const binPath = path.join(os.homedir(), ".netlify", "tunnel", "bin");
- const execName = isWindows() ? "live-tunnel-client.exe" : "live-tunnel-client";
+ const execName = win ? "live-tunnel-client.exe" : "live-tunnel-client";
const execPath = path.join(binPath, execName);
const newVersion = await fetchTunnelClient(execPath);
if (!newVersion) {
@@ -83,7 +84,6 @@ async function installTunnelClient(log) {
log(`${NETLIFYDEVLOG} Installing Live Tunnel Client`);
- const win = isWindows();
const platform = win ? "windows" : process.platform;
const extension = win ? "zip" : "tar.gz";
const release = {
| 5 |
diff --git a/src/components/button/Button.js b/src/components/button/Button.js @@ -188,7 +188,7 @@ export default class ButtonComponent extends Field {
if (this.component.action === 'event') {
this.on('change', (value) => {
- const isValid = this.root.isValid(value.data, true);
+ const isValid = value && value.hasOwnProperty('isValid') ? value.isValid : this.root.isValid(value.data, true);
this.disabled = this.options.readOnly || (this.component.disableOnInvalid && !isValid);
});
}
| 7 |
diff --git a/sirepo/package_data/static/js/sirepo-components.js b/sirepo/package_data/static/js/sirepo-components.js @@ -677,6 +677,9 @@ SIREPO.app.directive('fieldEditor', function(appState, keypressService, panelSta
'<div class="form-control-static" data-ng-if="model.valueList[field].length == 1">{{ model.valueList[field][0] }}</div>',
'<select data-ng-if="model.valueList[field].length != 1" class="form-control" data-ng-model="model[field]" data-ng-options="item as item for item in model.valueList[field]"></select>',
'</div>',
+ '<div data-ng-switch-when="ModelArray" class="col-sm-12">',
+ '<div data-model-array="" data-model-name="modelName" data-model="model" data-field="field"></div>',
+ '</div>',
SIREPO.appFieldEditors,
// assume it is an enum
'<div data-ng-switch-default data-ng-class="fieldClass">',
@@ -3142,6 +3145,78 @@ SIREPO.app.directive('jobsList', function(requestSender, appState, $location, $s
};
});
+
+SIREPO.app.directive('modelArray', function() {
+ return {
+ restrict: 'A',
+ scope: {
+ modelName: '=',
+ model: '=',
+ field: '=',
+ },
+ template: `
+ <div class="row">
+ <div class="col-sm-11"><div class="row">
+ <div data-ng-if="fields.length < 4" class="col-sm-3"></div>
+ <div class="col-sm-3 text-center" data-ng-repeat="heading in headings track by $index">
+<div data-label-with-tooltip="" data-label="{{ heading[0] }}" data-tooltip="{{ heading[3] }}"></div>
+ </div></div>
+ </div>
+ </div>
+ <div class="form-group form-group-sm" data-ng-show="showRow($index)" data-ng-repeat="m in modelArray() track by $index">
+ <div class="col-sm-11"><div class="row">
+ <div data-ng-if="fields.length < 4" class="col-sm-3"></div>
+ <div class="col-sm-3" data-ng-repeat="f in fields track by $index">
+ <input data-string-to-number="" data-ng-model="m[f]" class="form-control" style="text-align: right" data-lpignore="true" />
+ </div>
+ </div></div>
+ <div class="col-sm-1"><button style="margin-left: -15px; margin-top: 5px" data-ng-show="! isEmpty($index)" data-ng-click="deleteRow(idx)" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove"></span></button></div>
+ </div>
+ `,
+ controller: function(appState, $scope) {
+ const mView = SIREPO.APP_SCHEMA.view[$scope.field];
+ $scope.fields = mView.advanced;
+ $scope.headings = SIREPO.APP_SCHEMA.model[$scope.field];
+
+ function initArray() {
+ for (let i = 0; i < mView.maxRows; i++) {
+ model(i);
+ }
+ }
+
+ function model(idx) {
+ if (! $scope.modelArray()[idx]) {
+ $scope.modelArray()[idx] = {};
+ }
+ return $scope.modelArray()[idx];
+ }
+
+ $scope.deleteRow = idx => {
+ $scope.modelArray().splice(idx, 1);
+ initArray();
+ };
+
+ $scope.isEmpty = idx => {
+ const m = model(idx);
+ return ! $scope.fields.some(f => angular.isNumber(m[f]));
+ };
+
+ $scope.modelArray = () => {
+ if (! $scope.model) {
+ return;
+ }
+ if (! $scope.model[$scope.field]) {
+ $scope.model[$scope.field] = [];
+ initArray();
+ }
+ return $scope.model[$scope.field];
+ };
+
+ $scope.showRow = idx => (idx == 0) || ! $scope.isEmpty(idx - 1);
+ },
+ };
+});
+
SIREPO.app.directive('optimizeFloat', function(appState, panelState) {
return {
restrict: 'A',
| 1 |
diff --git a/app_web/index.html b/app_web/index.html @@ -111,7 +111,7 @@ function getUrlParam(parameter, defaultvalue){
</div>
</div>
</div>
- <b-tabs vertical position="is-right" v-model="activeTab" class="is-flex-wrap-nowrap" type="is-toggle">
+ <b-tabs vertical position="is-right" v-model="activeTab" class="is-flex-wrap-nowrap" type="is-toggle" v-bind:animated="false">
<b-tab-item label="Models" icon="google-photos" class="tab-item tabItemScrollable">
<template #header>
<!-- to get colored icons use: https://stackoverflow.com/a/43916743 -->
| 2 |
diff --git a/bundleSize.js b/bundleSize.js @@ -18,11 +18,11 @@ Object.entries(oldValues).forEach(([name, size]) => {
const newSize = newValues[name];
const delta = newSize - size;
const sizeColorFg = delta <= 0 ? '\x1b[32m' : '\x1b[31m';
- const reset = '\x1b[0m';
+ const resetColorFg = '\x1b[0m';
const nameColorFg = '\x1b[36m';
// eslint-disable-next-line no-console
console.log(
- `${nameColorFg}%s${reset}%s${sizeColorFg}%s${reset}`,
+ `${nameColorFg}%s${resetColorFg}%s${sizeColorFg}%s${resetColorFg}`,
`${name}:`,
` ${size} B -> ${newSize} B `,
`(${delta >= 0 ? '+' : ''}${delta} B)`
| 10 |
diff --git a/userscript.user.js b/userscript.user.js @@ -5277,7 +5277,7 @@ var $$IMU_EXPORT$$;
try {
var deviation = initialstate["@@entities"].deviation[deviationid];
- //console_log(deviation);
+ console_log(deviation);
if (deviation.title)
obj.extra.caption = deviation.title;
@@ -5299,12 +5299,22 @@ var $$IMU_EXPORT$$;
for (var i = types.length - 1; i >= 0; i--) {
var link = null;
- var tokenq = "?token=" + deviation.media.token[0];
+ var tokenid = 0;
+
+ // https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/40458dca-4360-4b4b-8aca-ba831f8db36d/ddsdflz-9484b31e-187e-4761-9724-6853698242a7.png/v1/fill/w_712,h_1123,q_100/morning_sun_by_pegaite_ddsdflz-pre.png
+ // https://www.deviantart.com/pegaite/art/Morning-Sun-833716295
+ if ("r" in types[i] && types[i].r < deviation.media.token.length)
+ tokenid = types[i].r;
+
+ var tokenq = "?token=" + deviation.media.token[tokenid];
if (types[i].c) {
link = deviation.media.baseUri + "/" + types[i].c.replace("<prettyName>", deviation.media.prettyName) + tokenq;
} else if (types[i].b) { // e.g. animated gifs
link = types[i].b + tokenq;
+ } else if (types[i].t === "fullview" && "r" in types[i]) {
+ // TODO: improve check?
+ link = deviation.media.baseUri + tokenq;
}
// Occasionally this exists for some images, where it instead has:
| 7 |
diff --git a/procgen-manager.js b/procgen-manager.js import {murmurhash3} from './procgen/procgen.js';
import {DcWorkerManager} from './dc-worker-manager.js';
import {LodChunkTracker} from './lod.js';
+import {LightMapper} from './light-mapper.js';
import {defaultChunkSize} from './constants.js';
// import {getLocalPlayer} from './players.js';
+const chunkSize = defaultChunkSize;
+const terrainWidthInChunks = 4;
+const terrainSize = chunkSize * terrainWidthInChunks;
+
class ProcGenInstance {
constructor(instance, {
chunkSize,
@@ -17,6 +22,8 @@ class ProcGenInstance {
instance,
});
this.range = null;
+
+ this.lightmapper = null;
}
setRange(range) {
this.dcWorkerManager.setRange(range);
@@ -39,6 +46,16 @@ class ProcGenInstance {
}
return tracker;
}
+ getLightMapper() {
+ if (!this.lightmapper) {
+ const {chunkSize} = this;
+ this.lightmapper = new LightMapper({
+ chunkSize,
+ terrainSize,
+ });
+ }
+ return this.lightmapper;
+ }
}
class ProcGenManager {
| 0 |
diff --git a/.github/workflows/reusable-app-prod.yml b/.github/workflows/reusable-app-prod.yml @@ -197,22 +197,22 @@ jobs:
steps:
- uses: actions/checkout@v3
- - name: Get yarn cache dir
- id: yarn-cache-dir
- run: |
- echo "::set-output name=value::`yarn cache dir --silent`"
+ - uses: actions/setup-node@v3
+ with:
+ node-version: ${{ matrix.node-version }}
+ cache: 'yarn'
+ cache-dependency-path: '**/yarn.lock'
- - name: Cache/Restore dependencies
+ - name: Cache/Restore node_modules
+ id: cache-dependencies
uses: actions/cache@v3
with:
path: |
**/node_modules
- ~/.cache/Cypress
- ${{ steps.yarn-cache-dir.outputs.value }}
- key: deps-for-cypress-${{ runner.OS }}-node${{ inputs.node-version }}-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('packages/app/package.json') }}
+ key: node_modules-${{ runner.OS }}-node${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('packages/app/package.json') }}
restore-keys: |
- deps-for-cypress-${{ runner.OS }}-node${{ inputs.node-version }}-${{ hashFiles('**/yarn.lock') }}-
- deps-for-cypress-${{ runner.OS }}-node${{ inputs.node-version }}
+ node_modules-${{ runner.OS }}-node${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}-
+ node_modules-${{ runner.OS }}-node${{ matrix.node-version }}-
- name: lerna bootstrap
run: |
| 7 |
diff --git a/Makefile b/Makefile @@ -39,7 +39,7 @@ create-html-runners: build/test test/tests.tpl.html test/JasmineRunner.tpl.html
.PHONY: create-html-runners
test-phantomjs: create-html-runners ${TARGETS}
- phantomjs ./node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js test/tests.html spec "`node -pe 'JSON.stringify({useColors:true,grep:process.env.grep})'`"
+ phantomjs ./node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js build/test/tests.html spec "`node -pe 'JSON.stringify({useColors:true,grep:process.env.grep})'`"
test-jasmine:
./node_modules/.bin/jasmine JASMINE_CONFIG_PATH=test/support/jasmine.json
| 1 |
diff --git a/packages/stockflux-launcher/src/app-shortcuts/AppShortcuts.js b/packages/stockflux-launcher/src/app-shortcuts/AppShortcuts.js @@ -14,7 +14,9 @@ export default () => {
return (
< div className="app-shortcuts" >
- {apps
+ {
+
+ apps
.filter(
app =>
app.customConfig !== undefined &&
@@ -29,8 +31,9 @@ export default () => {
.charAt(0)
.toUpperCase() + app.appId.slice(11)
];
- return <AppShortcut key={app.appId} symbol="TSLA" name="Tesla" />;
- })}
+ return <AppShortcut key={app.appId} symbol="TSLA" name="Tesla" small={false} />;
+ })
+ }
</div >
);
};
| 3 |
diff --git a/packages/bitcore-wallet-service/test/expressapp.js b/packages/bitcore-wallet-service/test/expressapp.js @@ -17,7 +17,7 @@ var { WalletService } = require('../ts_build/lib/server');
describe('ExpressApp', function() {
describe('#constructor', function() {
it('will set an express app', function() {
- var TestExpressApp = proxyquire('../ts_build/lib/expressapp', {});
+ var {ExpressApp: TestExpressApp} = proxyquire('../ts_build/lib/expressapp', {});
var express = new TestExpressApp();
should.exist(express.app);
should.exist(express.app.use);
@@ -27,7 +27,7 @@ describe('ExpressApp', function() {
describe('#start', function() {
it('will listen at the specified port', function(done) {
var initialize = sinon.stub().callsArg(1);
- var TestExpressApp = proxyquire('../ts_build/lib/expressapp', {
+ var {ExpressApp: TestExpressApp} = proxyquire('../ts_build/lib/expressapp', {
'./server': {
WalletService : {
initialize: initialize,
@@ -68,7 +68,7 @@ describe('ExpressApp', function() {
var server = {
getStatus: sinon.stub().callsArgWith(1, null, {}),
};
- var TestExpressApp = proxyquire('../ts_build/lib/expressapp', {
+ var {ExpressApp: TestExpressApp} = proxyquire('../ts_build/lib/expressapp', {
'./server': {
WalletService: {
initialize: sinon.stub().callsArg(1),
@@ -100,7 +100,7 @@ describe('ExpressApp', function() {
var server = {
getMainAddresses: sinon.stub().callsArgWith(1, null, {}),
};
- var TestExpressApp = proxyquire('../ts_build/lib/expressapp', {
+ var {ExpressApp: TestExpressApp} = proxyquire('../ts_build/lib/expressapp', {
'./server': {
WalletService: {
initialize: sinon.stub().callsArg(1),
@@ -134,7 +134,7 @@ describe('ExpressApp', function() {
amount: 123
}),
};
- var TestExpressApp = proxyquire('../ts_build/lib/expressapp', {
+ var {ExpressApp: TestExpressApp} = proxyquire('../ts_build/lib/expressapp', {
'./server': {
WalletService : {
initialize: sinon.stub().callsArg(1),
@@ -168,7 +168,7 @@ describe('ExpressApp', function() {
var server = {
getBalance: sinon.stub().callsArgWith(1, null, {}),
};
- var TestExpressApp = proxyquire('../ts_build/lib/expressapp', {
+ var {ExpressApp: TestExpressApp} = proxyquire('../ts_build/lib/expressapp', {
'./server': {
WalletService : {
initialize: sinon.stub().callsArg(1),
@@ -205,14 +205,14 @@ describe('ExpressApp', function() {
});
describe('/v1/notifications', function(done) {
- var server, TestExpressApp, clock;
+ var server, clock, TestExpressApp;
beforeEach(function() {
clock = sinon.useFakeTimers(2000000000, 'Date');
server = {
getNotifications: sinon.stub().callsArgWith(1, null, {})
};
- TestExpressApp = proxyquire('../ts_build/lib/expressapp', {
+ var {ExpressApp} = proxyquire('../ts_build/lib/expressapp', {
'./server': {
WalletService: {
initialize: sinon.stub().callsArg(1),
@@ -221,6 +221,7 @@ describe('ExpressApp', function() {
}
}
});
+ TestExpressApp = ExpressApp;
});
afterEach(function() {
clock.restore();
| 3 |
diff --git a/assets/js/components/legacy-setup/wizard-step-authentication.js b/assets/js/components/legacy-setup/wizard-step-authentication.js @@ -97,7 +97,6 @@ class WizardStepAuthentication extends Component {
WizardStepAuthentication.propTypes = {
connectURL: PropTypes.string.isRequired,
- helpVisibilityEnabled: PropTypes.bool,
resetAndRestart: PropTypes.func,
};
| 2 |
diff --git a/src/traces/parcoords/parcoords.js b/src/traces/parcoords/parcoords.js @@ -458,7 +458,7 @@ module.exports = function(root, svg, parcoordsLineLayers, styledData, layout, ca
.each(function(d) {
if(d.viewModel) {
if((!d.lineLayer) ||
- (callbacks)) { // recreate in case of having callbacks e.g. restyle, Should we explicitly test for callback to be a restyle?
+ (callbacks)) { // recreate in case of having callbacks e.g. restyle. Should we test for callback to be a restyle?
d.lineLayer = lineLayerMaker(this, d);
} else d.lineLayer.update(d);
@@ -466,7 +466,7 @@ module.exports = function(root, svg, parcoordsLineLayers, styledData, layout, ca
d.viewModel[d.key] = d.lineLayer;
var setChanged = ((!d.context) || // don't update background
- ((d.key !== 'contextLayer') || (callbacks))); // unless there is a callback on this line layer
+ ((d.key !== 'contextLayer') || (callbacks))); // unless there is a callback on the context layer. Should we test the callback?
d.lineLayer.render(d.viewModel.panels, setChanged);
}
| 3 |
diff --git a/lib/nodes/addon/components/driver-oci/component.js b/lib/nodes/addon/components/driver-oci/component.js @@ -185,11 +185,15 @@ export default Component.extend(NodeDriver, {
if (!get(this, 'config.subnetId') || !get(this, 'config.subnetId').startsWith('ocid1.subnet')) {
errors.push('Specifying a valid oci subnet OCID is required');
}
- // phoenix has a different region identifier
+ // phoenix and ashburn have different region identifiers
if (get(this, 'config.region').includes('phoenix')) {
if (!get(this, 'config.subnetId').includes('phx') || !get(this, 'config.vcnId').includes('phx')) {
errors.push('The VCN and subnet must reside in the same region as the compute instance');
}
+ } else if (get(this, 'config.region').includes('ashburn')) {
+ if (!get(this, 'config.subnetId').includes('iad') || !get(this, 'config.vcnId').includes('iad')) {
+ errors.push('The VCN and subnet must reside in the same region as the compute instance');
+ }
} else {
if (!get(this, 'config.region').includes(getRegionIdent(get(this, 'config.subnetId'))) ||
!get(this, 'config.region').includes(getRegionIdent(get(this, 'config.vcnId')))) {
| 9 |
diff --git a/learn/configuration/instance_options.md b/learn/configuration/instance_options.md @@ -378,11 +378,11 @@ Sets the maximum size of [accepted payloads](/learn/core_concepts/documents.md#d
Activates scheduled snapshots. Snapshots are disabled by default.
-It is possible to use `--schedule-snapshot` as a flag. In this case, if `--schedule-snapshot` is present when launching an instance, Meilisearch takes a new snapshot every 24 hours.
+It is possible to use `--schedule-snapshot` as a flag. If `--schedule-snapshot` is present when launching an instance but has not been assigned a value, Meilisearch takes a new snapshot every 24 hours.
-It is also possible to explicitly pass a boolean value to `--schedule-snapshot`. Meilisearch takes a new snapshot every 24 hours if `--schedule-snapshot=true`, and takes no snapshots if `--schedule-snapshot=false`.
+It is also possible to explicitly pass a boolean value to `--schedule-snapshot`. Meilisearch takes a new snapshot every 24 hours when `--schedule-snapshot=true`, and takes no snapshots when `--schedule-snapshot=false`.
-For more control over snapshot scheduling, pass an integer representing the interval in seconds between each snapshot. With `--schedule-snapshot=3600`, Meilisearch takes a new snapshot every hour.
+For more control over snapshot scheduling, pass an integer representing the interval in seconds between each snapshot. When `--schedule-snapshot=3600`, Meilisearch takes a new snapshot every hour.
[Learn more about snapshots](/learn/advanced/snapshots.md).
| 7 |
diff --git a/Apps/Sandcastle/CesiumSandcastle.css b/Apps/Sandcastle/CesiumSandcastle.css @@ -174,6 +174,17 @@ a.linkButton:focus, a.linkButton:hover {
overflow: hidden;
}
+.bottomPanel #innerPanel_tablist {
+ overflow-y: hidden!important;
+ max-height: 34px;
+}
+
+@media (max-width: 1064px){
+ .bottomPanel #innerPanel_tablist {
+ overflow-y: scroll!important;
+ }
+}
+
.claro .dijitTabContainerTop-tabs .dijitTabChecked .dijitTabContent {
background-position: 0 -103px;
}
| 12 |
diff --git a/character-controller.js b/character-controller.js @@ -56,6 +56,18 @@ class UniActionInterpolant extends Interpolant {
}
}
}
+class ModActionInterpolant extends Interpolant {
+ constructor(fn, minValue) {
+ super(fn, minValue);
+ }
+ update(timeDiff) {
+ if (this.fn()) {
+ this.value += timeDiff;
+ } else {
+ this.value = this.minValue;
+ }
+ }
+}
class PlayerHand {
constructor() {
| 0 |
diff --git a/storage.js b/storage.js @@ -578,7 +578,7 @@ function determineWitnessedLevelAndBestParent(conn, arrParentUnits, arrWitnesses
if (level === null)
throw Error("null level in updateWitnessedLevel");
if (level === 0) // genesis
- return handleWitnessedLevelAndBestParent(0, null);
+ return handleWitnessedLevelAndBestParent(0, my_best_parent_unit);
readUnitAuthors(conn, start_unit, function(arrAuthors){
for (var i=0; i<arrAuthors.length; i++){
var address = arrAuthors[i];
| 12 |
diff --git a/userscript.user.js b/userscript.user.js @@ -57872,6 +57872,7 @@ var $$IMU_EXPORT$$;
var current_chord = [];
var current_chord_timeout = {};
var release_ignore = [];
+ var editing_text = false;
function resetifout(e) {
// doesn't work, as e doesn't contain ctrlKey etc.
@@ -58933,6 +58934,7 @@ var $$IMU_EXPORT$$;
var imagestotal_input_enable = function() {
images_total_input_active = true;
+ editing_text = true;
images_total.innerText = "";
set_important_style(images_total_input, "display", "initial");
@@ -58948,6 +58950,7 @@ var $$IMU_EXPORT$$;
};
var imagestotal_input_disable = function() {
+ editing_text = false;
if (!images_total_input_active)
return;
@@ -62384,6 +62387,9 @@ var $$IMU_EXPORT$$;
if (!mouseover_enabled())
return;
+ if (editing_text && event.type === "keydown")
+ return;
+
var ret = undefined;
var actions = [];
| 8 |
diff --git a/src/client/js/components/PageStatusAlert.jsx b/src/client/js/components/PageStatusAlert.jsx @@ -80,7 +80,7 @@ class PageStatusAlert extends React.Component {
<i className="fa fa-angle-double-right"></i>
- <a onClick={this.refreshPage}>
+ <a href="#" onClick={this.refreshPage}>
{label2}
</a>
</div>
| 12 |
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md @@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported by contacting [email protected], which is a shared team inbox. If the incident involves someone who receives that shared inbox, you can contact an individual maintainer (@glind or @mahmoodkhan) at ```GitHub username``` + ```@github.com```. All
+reported by contacting [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
| 3 |
diff --git a/pages/community/donate.js b/pages/community/donate.js +import Link from 'next/link';
import Layout from '../../components/Layout';
import Content from '../../components/resources/Content';
@@ -8,12 +9,36 @@ export default () => (
<Content>
<div className="rubygems">
<h1>Donate to Support Development</h1>
- <p>Verge is not a pre-mined coin, so all of its development is funded by kind people like you.</p>
+ <h3>
+ Verge Community,
+ </h3>
+ <p>
+ We are excited to announce a brand new crowd funding initiative in order to help progress forward in the crypto space. It has come to our attention over the past couple months that there has been an increased demand for several things:
+ </p>
+ <ul>
+ <li><strong>Ledger Nano hardware</strong> wallet integration and support</li>
+ <li>Wraith protocol <strong>iOS enabled wallet</strong> applications</li>
+ <li>Advanced Marketing tactics which <strong>span the globe</strong></li>
+ <li><strong>Partnerships with large scale companies</strong></li>
+ <li><strong>Real world adoption</strong></li>
+ </ul>
+ <p>At Verge we are always striving to achieve new heights and deliver products or software implementations that are requested by the community. Listening to our community members and taking in feedback is not only one of the core founding principles of Verge, but it is inherent in our open-source nature. Verge is continuously looking to grow and improve to ensure you, the user of our product, are getting the best possible experience you can.</p>
+ <p>As many of you are aware, no one on the Verge staff is paid to do the work they do and generally any marketing efforts that come from our team are funded out of our own day job salaries. That is why we need your help. In order for us to be able to provide these services to you, our community, we need to raise a substantial amount of funding.</p>
+ <h3>Verge has some exciting news today!</h3>
+ <p>
+ In line with our mission to empower people to bring blockchain transactions into everyday life, we are thrilled to announce efforts to establish the largest cryptocurrency collaboration to hit the market. A global organization with a vast network of high traffic sites is looking to enter the cryptocurrency market and form a strategic business alliance with Verge as the preferred form of secure payment method, offering a quick and private means of transaction to hundreds of millions of potential consumers daily. This partnership represents an enormous potential market with a global reach that will compete with multiple fiat currencies.
+ We are eager to see this partnership materialize and invite everyone in the Verge community to support this groundbreaking initiative. Help us accelerate this crowdfunding effort and reach our target by donating coins today.
+ </p>
+ <p>Below you will find a donation address, anything you can contribute is greatly appreciated.</p>
<h3>Verge Verge Wallet Address</h3>
- <p>DDd1pVWr8PPAw1z7DRwoUW6maWh5SsnCcp</p>
- <h3>Bitcoin Wallet Address</h3>
- <p>142r3vCAH3AzABiQjFPmcrSCp6TDzEDuB1</p>
+ <p>
+ <Link href="https://verge-blockchain.info/address/DLv25ww5CipJngsKMYemBTBWH14CUpucxX">
+ <a rel="noopener noreferrer" href="https://verge-blockchain.info/address/DLv25ww5CipJngsKMYemBTBWH14CUpucxX" target="_blank">
+ DLv25ww5CipJngsKMYemBTBWH14CUpucxX
+ </a>
+ </Link>
+ </p>
</div>
</Content>
</div>
| 14 |
diff --git a/src/menelaus_web_buckets.erl b/src/menelaus_web_buckets.erl @@ -1408,20 +1408,20 @@ parse_validate_replica_index("1") -> {ok, replica_index, true};
parse_validate_replica_index(_ReplicaValue) -> {error, replicaIndex, <<"replicaIndex can only be 1 or 0">>}.
parse_validate_compression_mode(Params, BucketConfig, IsNew) ->
- CanParse = cluster_compat_mode:is_enterprise() andalso cluster_compat_mode:is_cluster_vulcan(),
CompMode = proplists:get_value("compressionMode", Params),
- parse_validate_compression_mode_inner(CanParse, CompMode, BucketConfig, IsNew).
+ parse_validate_compression_mode_inner(cluster_compat_mode:is_enterprise(),
+ cluster_compat_mode:is_cluster_vulcan(),
+ CompMode, BucketConfig, IsNew).
-parse_validate_compression_mode_inner(false, undefined, _BucketCfg, _IsNew) ->
+parse_validate_compression_mode_inner(false, _, undefined, _BucketCfg, _IsNew) ->
+ {ok, compression_mode, "off"};
+parse_validate_compression_mode_inner(_, false, undefined, _BucketCfg, _IsNew) ->
ignore;
-parse_validate_compression_mode_inner(false, _CompMode, _BucketCfg, _IsNew) ->
- case not cluster_compat_mode:is_enterprise() of
- true ->
+parse_validate_compression_mode_inner(false, _, _CompMode, _BucketCfg, _IsNew) ->
{error, compressionMode, <<"Compression mode is supported in enterprise edition only">>};
- false ->
- {error, compressionMode, <<"Compression mode can not be set until the cluster is fully vulcan">>}
- end;
-parse_validate_compression_mode_inner(true, CompMode, BucketCfg, IsNew) ->
+parse_validate_compression_mode_inner(_, false, _CompMode, _BucketCfg, _IsNew) ->
+ {error, compressionMode, <<"Compression mode can not be set until the cluster is fully vulcan">>};
+parse_validate_compression_mode_inner(true, true, CompMode, BucketCfg, IsNew) ->
DefaultVal = case IsNew of
true -> "off";
false -> proplists:get_value(compression_mode, BucketCfg)
@@ -1434,20 +1434,20 @@ validate_compression_mode(_) ->
{error, compressionMode, <<"compressionMode can be set to 'off', 'passive' or 'active'">>}.
parse_validate_max_ttl(Params, BucketConfig, IsNew) ->
- CanParse = cluster_compat_mode:is_enterprise() andalso cluster_compat_mode:is_cluster_vulcan(),
MaxTTL = proplists:get_value("maxTTL", Params),
- parse_validate_max_ttl_inner(CanParse, MaxTTL, BucketConfig, IsNew).
+ parse_validate_max_ttl_inner(cluster_compat_mode:is_enterprise(),
+ cluster_compat_mode:is_cluster_vulcan(), MaxTTL,
+ BucketConfig, IsNew).
-parse_validate_max_ttl_inner(false, undefined, _BucketCfg, _IsNew) ->
+parse_validate_max_ttl_inner(false, _, undefined, _BucketCfg, _IsNew) ->
+ {ok, max_ttl, 0};
+parse_validate_max_ttl_inner(_, false, undefined, _BucketCfg, _IsNew) ->
ignore;
-parse_validate_max_ttl_inner(false, _MaxTTL, _BucketCfg, _IsNew) ->
- case not cluster_compat_mode:is_enterprise() of
- true ->
+parse_validate_max_ttl_inner(false, _, _MaxTTL, _BucketCfg, _IsNew) ->
{error, maxTTL, <<"Max TTL is supported in enterprise edition only">>};
- false ->
- {error, maxTTL, <<"Max TTL can not be set until the cluster is fully vulcan">>}
- end;
-parse_validate_max_ttl_inner(true, MaxTTL, BucketCfg, IsNew) ->
+parse_validate_max_ttl_inner(_, false, _MaxTTL, _BucketCfg, _IsNew) ->
+ {error, maxTTL, <<"Max TTL can not be set until the cluster is fully vulcan">>};
+parse_validate_max_ttl_inner(true, true, MaxTTL, BucketCfg, IsNew) ->
DefaultVal = case IsNew of
true -> "0";
false -> proplists:get_value(max_ttl, BucketCfg)
| 12 |
diff --git a/src/server/services/generator/index.js b/src/server/services/generator/index.js const fs = require('fs-extra')
const path = require('path')
+const debug = require('debug')('services:generator')
const { User, Repo } = require('../../models')
@@ -11,8 +12,10 @@ module.exports = {
* Generate data.
*/
async generate() {
+ debug('Generate all data...')
await this.generateUsers()
await this.generateRepos()
+ debug('All data generated!')
},
/**
@@ -20,10 +23,10 @@ module.exports = {
* @return {Promise}
*/
async generateUsers() {
- return await User.findAll()
- .then((users) => {
- return fs.writeJSON(path.join(target, 'users.json'), users)
- })
+ debug('Generating data for users...')
+ const users = await User.findAll()
+ debug('Generating data for %d users.', users.length)
+ return await fs.writeJSON(path.join(target, 'users.json'), users)
},
/**
@@ -31,9 +34,9 @@ module.exports = {
* @return {Promise}
*/
async generateRepos() {
- return await Repo.findAll()
- .then((repos) => {
- return fs.writeJSON(path.join(target, 'repos.json'), repos)
- })
+ debug('Generating data for repos...')
+ const repos = await Repo.findAll()
+ debug('Generating data for %d repos.', repos.length)
+ return await fs.writeJSON(path.join(target, 'repos.json'), repos)
}
}
| 3 |
diff --git a/packages/app/src/styles/_sidebar.scss b/packages/app/src/styles/_sidebar.scss @mixin drawer() {
z-index: $zindex-fixed + 2;
- // override @atlaskit/navigation-next styles
+ .data-layout-container {
+ width: 0;
+ }
div.navigation {
max-width: 80vw;
| 12 |
diff --git a/scenes/street.scn b/scenes/street.scn 0,
0.7071067811865475
],
- "scale": [
- 2,
- 2,
- 2
- ],
- "physics": false,
- "start_url": "https://avaer.github.io/sakura/index.glbb",
+ "start_url": "https://yaserosource.github.io/material-debug-assets/MaterialDebug_MTOON_vian.vrm",
"dynamic": true
},
{
| 0 |
diff --git a/test/sol6/kyberStorage.js b/test/sol6/kyberStorage.js @@ -551,8 +551,13 @@ contract('KyberStorage', function(accounts) {
reserves = await kyberStorage.getReservesPerType(reserve.onChainType);
Helper.assertEqualArray(reserves, [reserve.reserveId], "reserve arrays not equal");
+ let reserveAddresses = await kyberStorage.getReserveAddressesByReserveId(reserve.reserveId);
+ Helper.assertEqualArray(reserveAddresses, [reserve.address], "reserve arrays not equal");
+
// reset
await kyberStorage.removeReserve(reserve.reserveId, 0, {from: operator});
+ reserveAddresses = await kyberStorage.getReserveAddressesByReserveId(reserve.reserveId);
+ Helper.assertEqualArray(reserveAddresses, [zeroAddress, reserve.address], "reserve arrays not equal");
});
});
@@ -578,13 +583,21 @@ contract('KyberStorage', function(accounts) {
it("should be able to re-add a reserve after its removal", async() => {
await kyberStorage.removeReserve(reserve.reserveId, zeroBN, {from: operator});
+ let reserveAddresses = await kyberStorage.getReserveAddressesByReserveId(reserve.reserveId);
+ Helper.assertEqualArray(reserveAddresses, [zeroAddress, reserve.address, reserve.address], "reserve arrays not equal");
await kyberStorage.addReserve(reserve.address, reserve.reserveId, reserve.onChainType, reserve.rebateWallet, {from: operator});
+ reserveAddresses = await kyberStorage.getReserveAddressesByReserveId(reserve.reserveId);
+ Helper.assertEqualArray(reserveAddresses, [reserve.address, reserve.address ,reserve.address], "reserve arrays not equal");
});
it("should be able to add a new reserve address for an existing id after removing an old one", async() => {
let newReserve = await MockReserve.new();
await kyberStorage.removeReserve(reserve.reserveId, zeroBN, {from: operator});
+ let reserveAddresses = await kyberStorage.getReserveAddressesByReserveId(reserve.reserveId);
+ Helper.assertEqualArray(reserveAddresses, [zeroAddress, reserve.address, reserve.address ,reserve.address], "reserve arrays not equal");
await kyberStorage.addReserve(newReserve.address, reserve.reserveId, reserve.onChainType, reserve.rebateWallet, {from: operator});
+ reserveAddresses = await kyberStorage.getReserveAddressesByReserveId(reserve.reserveId);
+ Helper.assertEqualArray(reserveAddresses, [newReserve.address, reserve.address, reserve.address ,reserve.address], "reserve arrays not equal");
let reserves = await kyberStorage.getReserveAddressesByReserveId(reserve.reserveId);
let actualNewReserveAddress = reserves[0];
let actualOldReserveAddress = reserves[1];
| 7 |
diff --git a/db.js b/db.js @@ -527,7 +527,12 @@ User.findById = function(id,callback){
});
}
-// thumbnailDocument (optional) is the thumbnail document from the collection
+
+// Creates a new Thumbnail which represents the thumbnails stored in the
+// database. Thumbnails are 2D representation of the path a file is describing
+// (in G-Code or OpenSBP).
+//
+// @param {Document} [thumbnailDocument] - The thumbnail stored in the database.
Thumbnail = function(thumbnailDocument) {
if(thumbnailDocument) {
this.file_id = thumbnailDocument.file_id;
@@ -540,13 +545,15 @@ Thumbnail = function(thumbnailDocument) {
}
}
-// Checks if needs update
+// Checks if needs update.
+// @return {boolean} If needs update.
Thumbnail.prototype.needUpdate = function() {
return this.version < cnctosvg.VERSION;
};
-// Updates the thumbnail in the database
-// callback(err, thumbnail): if err is true, thumbnail is old one else new one
+// Updates the thumbnail in the database.
+// @param {function} callback({boolean} err, {Thumbnail} thumbnail): if err is
+// true, thumbnail is old one else new one
Thumbnail.prototype.update = function(callback) {
var that = this;
@@ -582,20 +589,23 @@ Thumbnail.prototype.update = function(callback) {
// Checks if needs update and returns himself to callback (the new or old
// version)
-// callback(err, thumbnail): if err is always null, thumbnail is new or old one
+// @param {function} callback({boolean} err, {Thumbnail} thumbnail): err is
+// always false, thumbnail is old one or news one
Thumbnail.prototype.checkUpdateAndReturn = function(callback) {
var that = this;
if(that.needUpdate()) {
that.update(function(err, thumbnail) {
- callback(null, thumbnail);
+ callback(false, thumbnail);
});
} else {
- callback(null, that);
+ callback(false, that);
}
};
// Creates image but does not add a thumbnail into the database
-// Returns the image
+// @param {string} gcode
+// @param {string} title
+// @return {string} the image
Thumbnail.createImage = function(gcode, title) {
var colors = { G1 : "#000000", G2G3 : "#000000" };
var width = 100;
@@ -605,7 +615,8 @@ Thumbnail.createImage = function(gcode, title) {
};
// Generates the thumbnail and insert it in the database
-// callback(err, thumbnail): if err is true, thumbnail is null else new one
+// @param {function} callback({boolean} err, {Thumbnail} thumbnail): if err is
+// true, thumbnail is null else new one
Thumbnail.generate = function(fileId, callback) {
thumbnails.findOne({ "file_id" : fileId }, function(err, thumbnail) {
if(!err && thumbnail) {
@@ -641,7 +652,8 @@ Thumbnail.generate = function(fileId, callback) {
};
// Get the thumbnail, if no thumbnail in database: try to make one and return it
-// callback(err, thumbnail): if err is true, thumbnail is null else the found one
+// @param {function} callback({boolean} err, {Thumbnail} thumbnail): if err is
+// true, thumbnail is null else the found one
Thumbnail.getFromFileId = function(fileId, callback) {
thumbnails.findOne({ "file_id" : fileId }, function(err, thumbnail) {
if(err) {
| 0 |
diff --git a/articles/quickstart/webapp/aspnet-owin/_includes/_login.md b/articles/quickstart/webapp/aspnet-owin/_includes/_login.md @@ -6,7 +6,13 @@ The easiest way to enable authentication with Auth0 in your ASP.NET MVC applicat
Install-Package Auth0-ASPNET-Owin
```
-Now go to the `Configuration` method of your `Startup` class and configure the cookie middleware as well as the Auth0 middleware:
+Also, there is a bug in Microsoft's OWIN implementation for System.Web, which can cause cookies to disappear on some occasions. To work around this issue, you will need to install the `Kentor.OwinCookieSaver` NuGet package:
+
+```
+Install-Package Kentor.OwinCookieSaver
+```
+
+Now go to the `Configuration` method of your `Startup` class and configure the cookie middleware as well as the Auth0 middleware. Also be sure to register the [Kentor OWIN Cookie saver middleware](https://github.com/KentorIT/owin-cookie-saver) which must be added *before* any cookie handling middleware.
```cs
// Startup.cs
@@ -18,6 +24,9 @@ public void Configuration(IAppBuilder app)
string auth0ClientId = ConfigurationManager.AppSettings["auth0:ClientId"];
string auth0ClientSecret = ConfigurationManager.AppSettings["auth0:ClientSecret"];
+ // Enable the Cookie saver middleware to work around a bug in the OWIN implementation
+ app.UseKentorOwinCookieSaver();
+
// Set Cookies as default authentication type
app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
app.UseCookieAuthentication(new CookieAuthenticationOptions
@@ -37,7 +46,7 @@ public void Configuration(IAppBuilder app)
}
```
-It is important that you register both pieces of middleware as both of them are required for the authentication to work. The Auth0 middleware will handle the authentication with Auth0. Once the user has authenticated, their identity will be stored in the cookie middleware.
+It is important that you register the cookie mmiddeware as well as the Auth0 middleware as all of them are required for the authentication to work. The Auth0 middleware will handle the authentication with Auth0. Once the user has authenticated, their identity will be stored in the cookie middleware.
## Add Login and Logout Methods
| 0 |
diff --git a/src/routes.json b/src/routes.json {
"name": "annual-report",
"pattern": "^/annual-report/?$",
- "routeAlias": "/annual-report/?$",
+ "routeAlias": "/annual-report/?(?:\?.*)$",
"view": "annual-report/annual-report",
"title": "Annual Report",
"viewportWidth": "device-width"
| 11 |
diff --git a/lighthouse-core/gather/gather-runner.js b/lighthouse-core/gather/gather-runner.js @@ -105,8 +105,12 @@ class GatherRunner {
// We dont need to hold up the reporting for the reload/disconnect,
// so we will not return a promise in here.
log.log('status', 'Disconnecting from browser...');
- driver.disconnect().catch(e => {
- log.error('gather-runner disconnect', e);
+ driver.disconnect().catch(err => {
+ // Ignore disconnecting error if browser was already closed.
+ // See https://github.com/GoogleChrome/lighthouse/issues/1583
+ if (!(/close\/.*status: 500$/.test(err.message))) {
+ log.error('GatherRunner disconnect', err.message);
+ }
});
}
| 8 |
diff --git a/public/javascripts/SVLabel/src/SVLabel/onboarding/InitialMissionInstruction.js b/public/javascripts/SVLabel/src/SVLabel/onboarding/InitialMissionInstruction.js @@ -20,9 +20,9 @@ function InitialMissionInstruction(compass, mapService, neighborhoodContainer, p
var neighborhood = neighborhoodContainer.getCurrentNeighborhood();
var distance = taskContainer.getCompletedTaskDistance(neighborhood.getProperty("regionId"), "kilometers");
if (distance >= 0.025) {
- var title = "Please check both sides of the street!";
- var message = "Remember, we would like you to check both sides of the street! " +
- "Please label accessibility issues like sidewalk obstacles and surface problems!";
+ var title = "Please check both sides of the street";
+ var message = "Remember, we would like you to check both sides of the street. " +
+ "Please label accessibility issues like sidewalk obstacles and surface problems.";
popUpMessage.notify(title, message);
mapService.unbindPositionUpdate(self._instructToCheckSidewalks);
@@ -32,10 +32,9 @@ function InitialMissionInstruction(compass, mapService, neighborhoodContainer, p
this._instructToFollowTheGuidance = function () {
if (!svl.isOnboarding()) {
- var title = "Follow the navigator and audit the street!";
- var message = "It looks like you've looked around this entire intersection. " +
- "If you're done labeling this place, it's time to take a step. " +
- "Walk in the direction of the red line highlighted on the map.";
+ var title = "Let's take a step!";
+ var message = "It looks like you've looked around this entire intersection, so it's time to explore " +
+ "other areas. Walk in the direction of the red line highlighted on the map.";
popUpMessage.notify(title, message, this._finishedInstructionToFollowTheGuidance);
compass.blink();
| 3 |
diff --git a/articles/api-auth/tutorials/implicit-grant.md b/articles/api-auth/tutorials/implicit-grant.md @@ -41,7 +41,7 @@ Where:
Auth0 returns profile information in a [structured claim format as defined by the OIDC specification](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims). This means that in order to add custom claims to ID tokens or access tokens, they must [conform to a namespaced format](/api-auth/tutorials/adoption/scope-custom-claims) to avoid possible collisions with standard OIDC claims. For example, if you choose the namespace `https://foo.com/` and you want to add a custom claim named `myclaim`, you would name the claim `https://foo.com/myclaim`, instead of `myclaim`. You can [add namespaced claims using Rules](#optional-customize-the-tokens).
:::
-* `response_type`: Indicates the type of credentials returned in the response. For this flow you can either use `token`, to get only an `access_token`, or `id_token token`, to get both an `id_token` and an `access_token`.
+* `response_type`: Indicates the type of credentials returned in the response. For this flow you can either use `token`, to get only an `access_token`, `id_token` to get only an `id_token`, or `id_token token` to get both an `id_token` and an `access_token`.
* `client_id`: Your application's Client ID. You can find this value at your [Client's Settings](${manage_url}/#/clients/${account.clientId}/settings).
| 3 |
diff --git a/www/tablet/js/widget_departure.js b/www/tablet/js/widget_departure.js @@ -157,7 +157,7 @@ var Modul_departure = function () {
var text = '';
var n = 0;
var collection = JSON.parse(list);
- for ( var idx = 0; idx < collection.length; idx++) {
+ for ( var idx = 0, len = collection.length; idx < len; idx++) {
n++;
var line = collection[idx];
var when = line[2];
| 1 |
diff --git a/web/index.js b/web/index.js import {AppRegistry} from 'react-native';
import App from '../src/App';
import {name as appName} from '../app.json';
-import checkForUpdates from '../src/lib/checkForUpdates';
-import HttpUtils from '../src/lib/HttpUtils';
-import Visibility from '../src/lib/Visibility';
+import checkForUpdates from '../src/libs/checkForUpdates';
+import HttpUtils from '../src/libs/HttpUtils';
+import Visibility from '../src/libs/Visibility';
AppRegistry.registerComponent('App', () => App);
AppRegistry.registerComponent(appName, () => App);
| 10 |
diff --git a/assets/js/modules/optimize/setup.js b/assets/js/modules/optimize/setup.js @@ -45,7 +45,6 @@ class OptimizeSetup extends Component {
const {
optimizeID,
- ampClientIDOptIn,
ampExperimentJSON,
} = global.googlesitekit.modules.optimize.settings;
@@ -67,7 +66,6 @@ class OptimizeSetup extends Component {
gtmUseSnippet,
errorCode: false,
errorMsg: '',
- ampClientIDOptIn: ampClientIDOptIn || false,
ampExperimentJSON: ampExperimentJSON || '',
ampExperimentJSONValidated: true,
OptimizeIDValidated: true,
@@ -235,7 +233,6 @@ class OptimizeSetup extends Component {
renderAMPSnippet() {
const {
analyticsUseSnippet,
- ampClientIDOptIn,
ampExperimentJSON,
ampExperimentJSONValidated,
} = this.state;
@@ -247,8 +244,6 @@ class OptimizeSetup extends Component {
}
return (
- <Fragment>
- { ampClientIDOptIn &&
<Fragment>
<p>{ __( 'Please input your AMP experiment settings in JSON format below.', 'google-site-kit' ) } <Link href="https://developers.google.com/optimize/devguides/amp-experiments" external inherit>{ __( 'Learn More.', 'google-site-kit' ) }</Link></p>
<TextField
@@ -269,9 +264,6 @@ class OptimizeSetup extends Component {
<p className="googlesitekit-error-text">{ __( 'Error: AMP experiment settings are not in a valid JSON format.', 'google-site-kit' ) }</p>
}
</Fragment>
-
- }
- </Fragment>
);
}
| 2 |
diff --git a/src/components/views/Actions/core.js b/src/components/views/Actions/core.js @@ -242,7 +242,7 @@ class ActionsCore extends Component {
value={selectedVoice}
onChange={e => this.setState({ selectedVoice: e.target.value })}
>
- {(this.voices ? this.voices : []).map(c => (
+ {this.voices.map(c => (
<option key={c.name} value={c.name}>
{c.name}
</option>
| 1 |
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -2,12 +2,12 @@ version: 2.1
aliases:
- &node_env
- - image: circleci/node:16-bullseye
+ - image: cimg/node:16-bullseye
- &node_mongo_env
- - image: circleci/node:16-bullseye
- - image: circleci/mongo:4.4
+ - image: cimg/node:16-bullseye
+ - image: cimg/mongo:4.4
- &node_amqp_env
- - image: circleci/node:16-bullseye
+ - image: cimg/node:16-bullseye
- image: rabbitmq:3.8.9-alpine
- &run_npm_install
name: Installing Dependencies
| 4 |
diff --git a/src/components/general/equipment/Equipment.jsx b/src/components/general/equipment/Equipment.jsx @@ -6,6 +6,7 @@ import { MegaHotBox } from '../../play-mode/mega-hotbox';
import { Spritesheet } from '../spritesheet';
import game from '../../../../game.js';
import {transparentPngUrl} from '../../../../constants.js';
+import * as sounds from '../../../../sounds.js';
import {mod} from '../../../../util.js';
//
@@ -127,9 +128,14 @@ export const Equipment = () => {
setHoverObject(object);
};
const onMouseDown = object => () => {
- setSelectObject(selectObject !== object ? object : null);
+ const newSelectObject = selectObject !== object ? object : null;
+ setSelectObject(newSelectObject);
// game.renderCard(object);
+
+ const soundFiles = sounds.getSoundFiles();
+ const audioSpec = soundFiles.menuClick[Math.floor(Math.random() * soundFiles.menuClick.length)];
+ sounds.playSound(audioSpec);
};
const onDragStart = object => e => {
e.dataTransfer.setData('application/json', JSON.stringify(object));
@@ -149,9 +155,17 @@ export const Equipment = () => {
};
const menuLeft = () => {
setFaceIndex(faceIndex - 1);
+
+ const soundFiles = sounds.getSoundFiles();
+ const audioSpec = soundFiles.menuLeft[Math.floor(Math.random() * soundFiles.menuLeft.length)];
+ sounds.playSound(audioSpec);
};
const menuRight = () => {
setFaceIndex(faceIndex + 1);
+
+ const soundFiles = sounds.getSoundFiles();
+ const audioSpec = soundFiles.menuRight[Math.floor(Math.random() * soundFiles.menuRight.length)];
+ sounds.playSound(audioSpec);
};
const selectClassName = styles[`select-${selectedMenuIndex}`];
@@ -286,6 +300,10 @@ export const Equipment = () => {
onClick={e => {
const delta = i - selectedMenuIndex;
setFaceIndex(faceIndex + delta);
+
+ const soundFiles = sounds.getSoundFiles();
+ const audioSpec = soundFiles.menuNext[Math.floor(Math.random() * soundFiles.menuNext.length)];
+ sounds.playSound(audioSpec);
}}
key={i}
>
| 0 |
diff --git a/assets/js/modules/search-console/components/dashboard/SearchFunnelWidget/SearchConsoleStats.js b/assets/js/modules/search-console/components/dashboard/SearchFunnelWidget/SearchConsoleStats.js @@ -91,7 +91,7 @@ const SearchConsoleStats = ( {
);
if ( isZeroChart ) {
- options.vAxis.viewWindow.max = 100;
+ options.vAxis.viewWindow.max = 1;
} else {
options.vAxis.viewWindow.max = undefined;
}
| 12 |
diff --git a/services/component-orchestrator/src/drivers/kubernetes/KubernetesDriver.js b/services/component-orchestrator/src/drivers/kubernetes/KubernetesDriver.js @@ -187,8 +187,8 @@ class KubernetesDriver extends BaseDriver {
};
}
- _prepareEnvVars(flow, node, nodeQueues) {
- let envVars = Object.assign({}, nodeQueues);
+ _prepareEnvVars(flow, node, vars) {
+ let envVars = Object.assign({}, vars);
envVars.EXEC_ID = uuid().replace(/-/g, '');
envVars.STEP_ID = node.id;
envVars.FLOW_ID = flow.id;
@@ -196,8 +196,8 @@ class KubernetesDriver extends BaseDriver {
envVars.COMP_ID = node.componentId;
envVars.FUNCTION = node.function;
envVars.API_URI = this._config.get('SELF_API_URI').replace(/\/$/, '');
- envVars.API_USERNAME = 'does not matter';
- envVars.API_KEY = 'does not matter';
+ envVars.API_USERNAME = 'iam_token';
+ envVars.API_KEY = envVars.IAM_TOKEN;
envVars.CONTAINER_ID = 'does not matter';
envVars.WORKSPACE_ID = 'does not matter';
envVars = Object.entries(envVars).reduce((env, [k, v]) => {
| 4 |
diff --git a/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php b/tests/e2e/Services/Functions/FunctionsConsoleClientTest.php @@ -227,6 +227,16 @@ class FunctionsConsoleClientTest extends Scope
$this->assertEquals(200, $response['headers']['status-code']);
$this->assertCount(1, $response['body']['variables']);
+ $response = $this->client->call(Client::METHOD_GET, '/functions/' . $data['functionId'] . '/variables', array_merge([
+ 'content-type' => 'application/json',
+ 'x-appwrite-project' => $this->getProject()['$id'],
+ ], $this->getHeaders()), [
+ 'queries' => [ 'equal("key", "NON_EXISTING_VARIABLE")' ]
+ ]);
+
+ $this->assertEquals(200, $response['headers']['status-code']);
+ $this->assertCount(0, $response['body']['variables']);
+
/**
* Test for FAILURE
*/
| 7 |
diff --git a/src/renderer/component/categoryList/view.jsx b/src/renderer/component/categoryList/view.jsx @@ -251,7 +251,7 @@ class CategoryList extends React.PureComponent<Props, State> {
{obscureNsfw && isCommunityTopBids ? (
<div className="card__content help">
{__(
- 'The community top bids section is only visible if you allow NSFW content in the app. You can change your content viewing preferences'
+ 'The community top bids section is only visible if you allow mature content in the app. You can change your content viewing preferences'
)}{' '}
<Button button="link" navigate="/settings" label={__('here')} />.
</div>
| 10 |
diff --git a/package.json b/package.json "test:lint": "eslint src",
"test:deps": "dependency-check ./package.json --entry \"src/**/!(*.test).js\" --unused --missing --no-dev --no-peer -i @oclif/plugin-not-found -i @oclif/config -i @oclif/plugin-help",
"watch": "nyc --reporter=lcov ava --watch",
- "prepack": "oclif-dev manifest && oclif-dev readme && npm shrinkwrap",
+ "prepack": "oclif-dev manifest && npm shrinkwrap",
"postpack": "rm -f oclif.manifest.json npm-shrinkwrap.json",
- "version": "oclif-dev readme && git add README.md",
"report": "nyc report --reporter=text-lcov | coveralls"
},
"ava": {
| 2 |
diff --git a/app/builtin-pages/views/settings.js b/app/builtin-pages/views/settings.js @@ -126,7 +126,7 @@ function renderWorkspacePathSettings () {
<p>
<code>${settings.workspace_default_path}</code>
- <button class="btn small" onclick=${onUpdateDefaultWorkspaceDirectory}>
+ <button class="btn" onclick=${onUpdateDefaultWorkspaceDirectory}>
Choose directory
</button>
</p>
| 4 |
diff --git a/src/renderer/scss/component/_table.scss b/src/renderer/scss/component/_table.scss @@ -29,7 +29,7 @@ table.table,
td {
font-family: 'metropolis-medium';
color: var(--color-help);
- padding: $spacing-vertical * 1/3 $spacing-vertical * 1/3;
+ padding: $spacing-vertical * 1/6 $spacing-vertical * 1/3;
.btn:not(.btn--link) {
display: inline;
| 13 |
diff --git a/generators/ci-cd/templates/.gitlab-ci.yml.ejs b/generators/ci-cd/templates/.gitlab-ci.yml.ejs @@ -291,7 +291,7 @@ maven-package:
# dependencies:
# - maven-package
# script:
-# - ./mvnw -ntp compile jib:build -Pprod -Djib.to.image=$IMAGE_TAG -Djib.to.auth.username=gitlab-ci-token -Djib.to.auth.password=$CI_BUILD_TOKEN -Dmaven.repo.local=$MAVEN_USER_HOME
+# - ./mvnw -ntp jib:build -Pprod -Djib.to.image=$IMAGE_TAG -Djib.to.auth.username=gitlab-ci-token -Djib.to.auth.password=$CI_BUILD_TOKEN -Dmaven.repo.local=$MAVEN_USER_HOME
<%_ if (cicdIntegrations.includes('heroku')) { _%>
deploy-to-production:
| 2 |
diff --git a/src/views/teachers/landing/landing.jsx b/src/views/teachers/landing/landing.jsx @@ -40,22 +40,22 @@ const Landing = () => (
<SubNavigation className="inner">
<a href="#resources">
<li>
- <FormattedMessage id="teacherlanding.resourcesAnchor" />
+ <FormattedMessage id="teacherlanding.resourcesTitle" />
</li>
</a>
<a href="#connect">
<li>
- <FormattedMessage id="teacherlanding.connectAnchor" />
+ <FormattedMessage id="teacherlanding.connectTitle" />
</li>
</a>
<a href="#news">
<li>
- <FormattedMessage id="teacherlanding.newsAnchor" />
+ <FormattedMessage id="teacherlanding.newsTitle" />
</li>
</a>
<a href="#teacher-accounts">
<li>
- <FormattedMessage id="teacherlanding.teacherAccountsAnchor" />
+ <FormattedMessage id="teacherlanding.teacherAccountsTitle" />
</li>
</a>
</SubNavigation>
@@ -65,7 +65,7 @@ const Landing = () => (
<div className="inner">
<section id="resources">
<span className="nav-spacer" />
- <h2><FormattedMessage id="teacherlanding.educatorResources" /></h2>
+ <h2><FormattedMessage id="teacherlanding.educatorResourcesTitle" /></h2>
<FlexRow className="educator-community">
<div>
<p>
@@ -99,7 +99,7 @@ const Landing = () => (
</section>
<section>
<span className="nav-spacer" />
- <h2><FormattedMessage id="teacherlanding.studentResources" /></h2>
+ <h2><FormattedMessage id="teacherlanding.studentResourcesTitle" /></h2>
<FlexRow className="guides-and-tutorials">
<div>
<a href="/projects/editor/?tutorial=all">
@@ -199,7 +199,7 @@ const Landing = () => (
</section>
<section>
<span className="nav-spacer" />
- <h2><FormattedMessage id="teacherlanding.moreGetStarted" /></h2>
+ <h2><FormattedMessage id="teacherlanding.moreGetStartedTitle" /></h2>
<FlexRow className="educator-community">
<div>
<p>
@@ -233,7 +233,7 @@ const Landing = () => (
</section>
<section id="news">
<span className="nav-spacer" />
- <h2><FormattedMessage id="teacherlanding.newsAndUpdates" /></h2>
+ <h2><FormattedMessage id="teacherlanding.newsAndUpdatesTitle" /></h2>
<FlexRow className="educator-community">
<div>
<p>
| 10 |
diff --git a/assets/js/modules/optimize/components/common/PlaceAntiFlickerSwitch.js b/assets/js/modules/optimize/components/common/PlaceAntiFlickerSwitch.js * WordPress dependencies
*/
import { useCallback, createInterpolateElement } from '@wordpress/element';
-import { __, sprintf } from '@wordpress/i18n';
+import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
@@ -45,15 +45,13 @@ export default function PlaceAntiFlickerSwitch() {
let message;
if ( placeAntiFlickerSnippet ) {
- /* translators: %s: link to learn more about anti flicker snippet */
message = __(
- 'Site Kit will add the code automatically. %s',
+ 'Site Kit will add the code automatically. <a>Learn more</a>.',
'google-site-kit'
);
} else {
- /* translators: %s: link to learn more about anti flicker snippet */
message = __(
- 'Site Kit will not add the code to your site. %s',
+ 'Site Kit will not add the code to your site. <a>Learn more</a>.',
'google-site-kit'
);
}
@@ -82,12 +80,7 @@ export default function PlaceAntiFlickerSwitch() {
</div>
</div>
<p className="googlesitekit-margin-top-0">
- { createInterpolateElement(
- sprintf(
- message,
- `<a>${ __( 'Learn more.', 'google-site-kit' ) }</a>`
- ),
- {
+ { createInterpolateElement( message, {
a: (
<Link
href={ supportURL }
@@ -99,8 +92,7 @@ export default function PlaceAntiFlickerSwitch() {
) }
/>
),
- }
- ) }
+ } ) }
</p>
</fieldset>
);
| 2 |
diff --git a/packages/app/src/server/routes/apiv3/security-setting.js b/packages/app/src/server/routes/apiv3/security-setting.js @@ -794,7 +794,7 @@ module.exports = (crowi) => {
isPasswordResetEnabled: await crowi.configManager.getConfig('crowi', 'security:passport-local:isPasswordResetEnabled'),
isEmailAuthenticationEnabled: await crowi.configManager.getConfig('crowi', 'security:passport-local:isEmailAuthenticationEnabled'),
};
- const parameters = { action: SupportedAction.ACTION_ADMIN_AUTH_IP_PASS_UPDATE };
+ const parameters = { action: SupportedAction.ACTION_ADMIN_AUTH_ID_PASS_UPDATE };
activityEvent.emit('update', res.locals.activity._id, parameters);
return res.apiv3({ localSettingParams });
}
| 10 |
diff --git a/assets/js/components/dashboard-sharing/UserRoleSelect.js b/assets/js/components/dashboard-sharing/UserRoleSelect.js @@ -28,7 +28,13 @@ import { Chip, ChipCheckmark } from '@material/react-chips';
*/
import { __ } from '@wordpress/i18n';
import { ESCAPE, ENTER } from '@wordpress/keycodes';
-import { useCallback, useRef, forwardRef, Fragment } from '@wordpress/element';
+import {
+ useCallback,
+ useEffect,
+ useRef,
+ forwardRef,
+ Fragment,
+} from '@wordpress/element';
/**
* Internal dependencies
@@ -52,7 +58,7 @@ const ALL_CHIP_DISPLAY_NAME = __( 'All', 'google-site-kit' );
const UserRoleSelect = forwardRef(
( { moduleSlug, isLocked = false }, ref ) => {
const viewContext = useViewContext();
- const roleSelectButtonRef = useRef();
+ const roleSelectRef = useRef();
const { setSharedRoles } = useDispatch( CORE_MODULES );
const { setValue } = useDispatch( CORE_UI );
@@ -71,9 +77,6 @@ const UserRoleSelect = forwardRef(
useKeyCodesInside( [ ESCAPE ], ref, () => {
if ( editMode ) {
setValue( EDITING_USER_ROLE_SELECT_SLUG_KEY, undefined );
-
- // Reset focus to edit roles button.
- roleSelectButtonRef.current.focus();
}
} );
@@ -108,9 +111,19 @@ const UserRoleSelect = forwardRef(
viewContext,
] );
+ useEffect( () => {
+ if ( editMode ) {
+ // Focus on the "All" roles button.
+ roleSelectRef.current.firstChild.focus();
+ } else {
+ // Focus on the role select button.
+ roleSelectRef.current.focus();
+ }
+ }, [ editMode ] );
+
const toggleChip = useCallback(
( { type, target, keyCode } ) => {
- if ( type === 'keyup' && keyCode !== ENTER ) {
+ if ( type === 'keydown' && keyCode !== ENTER ) {
return;
}
@@ -173,7 +186,7 @@ const UserRoleSelect = forwardRef(
onClick={ toggleEditMode }
icon={ <ShareIcon width={ 23 } height={ 23 } /> }
tabIndex={ isLocked ? -1 : undefined }
- ref={ roleSelectButtonRef }
+ ref={ roleSelectRef }
/>
) }
@@ -187,13 +200,7 @@ const UserRoleSelect = forwardRef(
( ! sharedRoles || sharedRoles?.length === 0 ) && (
<span className="googlesitekit-user-role-select__add-roles">
<Link
- onClick={ () => {
- // As this link exits the DOM on click, we change
- // the focus to the role select button.
- roleSelectButtonRef.current.focus();
-
- toggleEditMode();
- } }
+ onClick={ toggleEditMode }
tabIndex={ isLocked ? -1 : undefined }
>
{ __( 'Add roles', 'google-site-kit' ) }
@@ -203,14 +210,17 @@ const UserRoleSelect = forwardRef(
{ editMode && (
<Fragment>
- <div className="googlesitekit-user-role-select__chipset">
+ <div
+ className="googlesitekit-user-role-select__chipset"
+ ref={ roleSelectRef }
+ >
<Chip
chipCheckmark={ <ChipCheckmark /> }
data-chip-id={ ALL_CHIP_ID }
id={ ALL_CHIP_ID }
label={ ALL_CHIP_DISPLAY_NAME }
onClick={ toggleChip }
- onKeyUp={ toggleChip }
+ onKeyDown={ toggleChip }
selected={
sharedRoles?.length ===
shareableRoles?.length
@@ -227,7 +237,7 @@ const UserRoleSelect = forwardRef(
key={ index }
label={ displayName }
onClick={ toggleChip }
- onKeyUp={ toggleChip }
+ onKeyDown={ toggleChip }
selected={ sharedRoles?.includes( id ) }
className="googlesitekit-user-role-select__chip"
/>
@@ -240,7 +250,6 @@ const UserRoleSelect = forwardRef(
onClick={ toggleEditMode }
icon={ <CloseIcon width={ 18 } height={ 18 } /> }
tabIndex={ isLocked ? -1 : undefined }
- ref={ roleSelectButtonRef }
/>
</Fragment>
) }
| 1 |
diff --git a/src/angular/src/app/spark-core-angular/components/sprk-pagination/sprk-pagination.component.ts b/src/angular/src/app/spark-core-angular/components/sprk-pagination/sprk-pagination.component.ts @@ -160,12 +160,12 @@ export class SparkPaginationComponent {
@Output() nextClick = new EventEmitter();
@Output() pageClick = new EventEmitter();
- // Emit out page number of page clicked
+ // Emit out event when page clicked
goToPage(event): void {
this.pageClick.emit(event);
}
- // Emit out true when previous is clicked
+ // Emit out event when previous is clicked
goBack(event): void {
this.previousClick.emit(event);
}
| 3 |
diff --git a/packages/transformers/babel/src/config.js b/packages/transformers/babel/src/config.js @@ -177,14 +177,22 @@ function isLocal(/* configItemPath */) {
function prepForReyhdration(options) {
// ConfigItem.value is a function which the v8 serializer chokes on
// It is being ommited here and will be rehydrated later using the path provided by ConfigItem.file
- options.presets = (options.presets || []).map(configItem => ({
- file: configItem.file,
- options: configItem.options
- }));
- options.plugins = (options.plugins || []).map(configItem => ({
- file: configItem.file,
- options: configItem.options
- }));
+ options.presets = (options.presets || []).map(
+ ({options, dirname, name, file}) => ({
+ options,
+ dirname,
+ name,
+ file
+ })
+ );
+ options.plugins = (options.plugins || []).map(
+ ({options, dirname, name, file}) => ({
+ options,
+ dirname,
+ name,
+ file
+ })
+ );
}
async function definePluginDependencies(config) {
@@ -212,7 +220,10 @@ export function rehydrate(config: Config) {
// $FlowFixMe
let value = require(configItem.file.resolved);
value = value.default ? value.default : value;
- return createConfigItem([value, configItem.options], {type: 'preset'});
+ return createConfigItem([value, configItem.options], {
+ type: 'preset',
+ dirname: configItem.dirname
+ });
}
);
config.result.config.plugins = config.result.config.plugins.map(
| 1 |
diff --git a/InitMaster/script.json b/InitMaster/script.json "authors": "Richard E.",
"roll20userid": "6497708",
"useroptions": [],
- "dependencies": ["RoundMaster","],
+ "dependencies": ["RoundMaster","libRPGMaster2e"],
"modifies": {
"state.initMaster": "read,write",
"player.id": "read",
| 3 |
diff --git a/src/core/operations/Cipher.js b/src/core/operations/Cipher.js @@ -766,8 +766,8 @@ const Cipher = {
* @returns {string}
*/
runSubstitute: function (input, args) {
- let plaintext = Utils.expandAlphRange(args[0]).join(),
- ciphertext = Utils.expandAlphRange(args[1]).join(),
+ let plaintext = Utils.expandAlphRange(args[0]).join(""),
+ ciphertext = Utils.expandAlphRange(args[1]).join(""),
output = "",
index = -1;
| 1 |
diff --git a/assets/js/modules/analytics/util/calculateOverviewData.test.js b/assets/js/modules/analytics/util/calculateOverviewData.test.js @@ -54,7 +54,6 @@ describe( 'calculateOverviewData', () => {
];
it.each( rangeData )( 'calculating data overview', ( data, expected ) => {
const overviewData = calculateOverviewData( data );
- expect( overviewData.totalUsersChange ).toEqual( expected[ 0 ] );
expect( overviewData.totalSessionsChange ).toEqual( expected[ 1 ] );
expect( overviewData.averageBounceRateChange ).toEqual( expected[ 2 ] );
expect( overviewData.averageSessionDurationChange ).toEqual( expected[ 3 ] );
| 2 |
diff --git a/test/browser/lifecycle.js b/test/browser/lifecycle.js @@ -1618,10 +1618,10 @@ describe('Lifecycle methods', () => {
return <div>{this.state.error ? String(this.state.error) : this.props.children}</div>;
}
}
+ // eslint-disable-next-line react/require-render-return
class ErrorGeneratorComponent extends Component {
render() {
throw new Error('Error!');
- return <div />;
}
}
sinon.spy(ErrorReceiverComponent.prototype, 'componentDidCatch');
@@ -1638,10 +1638,10 @@ describe('Lifecycle methods', () => {
return this.state.error ? String(this.state.error) : this.props.children;
}
}
+ // eslint-disable-next-line react/require-render-return
class ErrorGeneratorComponent extends Component {
render() {
throw new Error('Error!');
- return <div />;
}
}
sinon.spy(ErrorReceiverComponent.prototype, 'componentDidCatch');
@@ -2375,11 +2375,13 @@ describe('Lifecycle methods', () => {
}
}
function ErrorGeneratorComponent() {
+ // eslint-disable-next-line react/jsx-wrap-multilines
return <div ref={(element) => {
if (element) {
throw new Error('Error');
}
- }} />
+ // eslint-disable-next-line react/jsx-closing-bracket-location
+ }} />;
}
sinon.spy(ErrorReceiverComponent.prototype, 'componentDidCatch');
render(<ErrorReceiverComponent><ErrorGeneratorComponent /></ErrorReceiverComponent>, scratch);
@@ -2399,7 +2401,7 @@ describe('Lifecycle methods', () => {
throw new Error('Error!');
}
function ErrorGeneratorComponent() {
- return <div ref={throwError} />
+ return <div ref={throwError} />;
}
sinon.spy(ErrorReceiverComponent.prototype, 'componentDidCatch');
render(<ErrorReceiverComponent><ErrorGeneratorComponent /></ErrorReceiverComponent>, scratch);
| 1 |
diff --git a/app/src/main/index.js b/app/src/main/index.js @@ -151,7 +151,7 @@ function createWindow() {
function startProcess(name, args, env) {
let binPath
- if (process.env.BINARY_PATH) {
+ if (process.NODE_ENV !== "testing" && process.env.BINARY_PATH) {
binPath = process.env.BINARY_PATH
} else if (DEV) {
// in dev mode or tests, use binaries installed in GOPATH
| 8 |
diff --git a/lib/node_modules/@stdlib/math/base/tools/continued-fraction/docs/repl.txt b/lib/node_modules/@stdlib/math/base/tools/continued-fraction/docs/repl.txt > function closure() {
... var i = 0;
... return function() {
- ... i++;
+ ... i += 1;
... return [ i, i ];
... };
... };
> function* generator() {
... var i = 0;
... while ( true ) {
- ... i++;
+ ... i += 1;
... yield [ i, i ];
... }
... };
| 14 |
diff --git a/src/app.js b/src/app.js @@ -81,7 +81,7 @@ async function main(){
app.get('/stats/:player/:profile?', async (req, res, next) => {
let response;
- let paramPlayer = req.params.player.toLowerCase().replace(/\-/g, '');
+ let paramPlayer = req.params.player.toLowerCase().replace(/[^a-z\d\-\_:]/g, '');
let paramProfile = req.params.profile ? req.params.profile.toLowerCase() : null;
let playerUsername = paramPlayer;
| 14 |
diff --git a/src/components/molecules/SfBanner/SfBanner.stories.js b/src/components/molecules/SfBanner/SfBanner.stories.js @@ -5,7 +5,7 @@ import SfBanner from "./SfBanner.vue";
export default storiesOf("Banner", module)
.addDecorator(withKnobs)
- .add("Props filled", () => ({
+ .add("Props", () => ({
components: { SfBanner },
props: {
title: {
@@ -38,7 +38,7 @@ export default storiesOf("Banner", module)
/>
`
}))
- .add("Slots filled (custom markup)", () => ({
+ .add("Slots (custom markup)", () => ({
components: { SfBanner },
template: `
<SfBanner
| 10 |
diff --git a/articles/multifactor-authentication/custom-mfa-rules.md b/articles/multifactor-authentication/custom-mfa-rules.md @@ -5,8 +5,8 @@ description: Learn how you can add step-up authentication to your app with Auth0
# Step-Up Authentication with Custom MFA Rules
-::: note
-Auth0 now supports `amr` and `acr` claims with `acr_values` for step-up authentication. This approach allows for more control with MFA. For details see [Step-up Authentication with ID Tokens](/multifactor-authentication/developer/mfa-from-id-token).
+::: warning
+The functionality described in this article is outdated. Auth0 now supports `amr` and `acr` claims with `acr_values` for step-up authentication. For details see [Step-up Authentication with ID Tokens](/multifactor-authentication/developer/mfa-from-id-token).
:::
With Step-Up Authentication, applications that allow access to different types of resources can require users to authenticate with a stronger authentication mechanism to access sensitive resources.
| 3 |
diff --git a/src/components/source/mediaSource/suggest/SuggestSourceContainer.js b/src/components/source/mediaSource/suggest/SuggestSourceContainer.js @@ -6,7 +6,7 @@ import { connect } from 'react-redux';
import { Grid, Row, Col } from 'react-flexbox-grid/lib';
import composeIntlForm from '../../../common/IntlForm';
import SourceSuggestionForm from './SourceSuggestionForm';
-import SourceCollectionsForm from '../form/SourceCollectionsForm';
+import PickCollectionsForm from '../form/PickCollectionsForm';
import { emptyString } from '../../../../lib/formValidators';
import { suggestSource } from '../../../../actions/sourceActions';
import { updateFeedback } from '../../../../actions/appActions';
@@ -37,7 +37,7 @@ const SuggestSourceContainer = (props) => {
</Row>
<form name="suggestionForm" onSubmit={handleSubmit(handleSave.bind(this))}>
<SourceSuggestionForm initialValues={initialValues} />
- <SourceCollectionsForm form="suggestionForm" />
+ <PickCollectionsForm form="suggestionForm" />
<Row>
<Col lg={12}>
<AppButton
| 10 |
diff --git a/ChatImprovements.user.js b/ChatImprovements.user.js // @description New responsive userlist with usernames and total count, more timestamps, use small signatures only, mods with diamonds, message parser (smart links), timestamps on every message, collapse room description and room tags, mobile improvements, expand starred messages on hover, highlight occurances of same user link, room owner changelog, pretty print styles, and more...
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 2.11
+// @version 2.11.1
//
// @include https://chat.stackoverflow.com/*
// @include https://chat.stackexchange.com/*
@@ -1636,9 +1636,6 @@ ul#my-rooms > li > a span {
.monologue {
min-width: 300px;
}
-.monologue .timestamp {
- color: #444;
-}
.message a i.transcript-link {
opacity: 0.5;
font-size: 0.9em;
| 2 |
diff --git a/shared/js/ublock.js b/shared/js/ublock.js @@ -69,11 +69,8 @@ class UBlock {
// http://en.www.googletagservices.com/some/other/random/path/gpt.js?v=123
//
// All our rules have domain + filename, so for now we're safe making that assumption.
- let a = document.createElement('a')
- a.href = url
-
- let splitPath = a.pathname.split('/')
- let filename = splitPath[splitPath.length - 1]
+ let splitUrl = url.split('/')
+ let filename = splitUrl[splitUrl.length - 1]
let ruleToMatch = parsedUrl.domain + '/' + filename
return surrogates.surrogateList.parsed[ruleToMatch]
}
| 2 |
diff --git a/src/directives/formBuilder.js b/src/directives/formBuilder.js @@ -212,7 +212,8 @@ module.exports = ['debounce', function(debounce) {
label: component.label,
key: component.key,
lockKey: true,
- source: resource._id
+ source: resource._id,
+ isNew: true
}
}
));
| 1 |
diff --git a/thali/NextGeneration/thaliWifiInfrastructure.js b/thali/NextGeneration/thaliWifiInfrastructure.js @@ -682,6 +682,13 @@ ThaliWifiInfrastructure.prototype._setUpEvents = function() {
inherits(ThaliWifiInfrastructure, EventEmitter);
+ThaliWifiInfrastructure.prototype._isDisconnected = function () {
+ var lastStatus = this._lastNetworkStatus;
+ return lastStatus ?
+ (lastStatus.wifi === 'off' || lastStatus.bssidName === null) :
+ false;
+};
+
ThaliWifiInfrastructure.prototype._handleNetworkChanges =
function (networkStatus) {
var lastStatus = this._lastNetworkStatus;
@@ -878,7 +885,7 @@ enqueued(function () {
if (!this._isStarted) {
return Promise.reject(new Error('Call Start!'));
}
- if (this._lastNetworkStatus && this._lastNetworkStatus.wifi === 'off') {
+ if (this._isDisconnected()) {
return this._rejectPerWifiState();
}
return this.listener.start();
@@ -994,7 +1001,7 @@ enqueued(function () {
return Promise.reject(new Error('Call Start!'));
}
- if (this._lastNetworkStatus && this._lastNetworkStatus.wifi === 'off') {
+ if (this._isDisconnected()) {
return this._rejectPerWifiState();
}
@@ -1034,21 +1041,19 @@ ThaliWifiInfrastructure.prototype._pauseAdvertisingAndListening =
ThaliWifiInfrastructure.prototype._rejectPerWifiState = function () {
var errorMessage;
- switch (this._lastNetworkStatus.wifi) {
- case 'off': {
+ var wifi = this._lastNetworkStatus.wifi;
+ var bssidName = this._lastNetworkStatus.bssidName;
+ if (wifi === 'off') {
errorMessage = 'Radio Turned Off';
- break;
- }
- case 'notHere': {
+ } else if (wifi === 'notHere') {
errorMessage = 'No Wifi radio';
- break;
- }
- default: {
- logger.warn('Got unexpected Wifi state: %s',
- this.states.networkStatus.wifi);
+ } else if (bssidName === null) {
+ errorMessage = 'Not connected to WiFi access point';
+ } else {
+ logger.warn('Got unexpected Wifi state (wifi: %s, bssidName: %s)',
+ JSON.stringify(wifi), JSON.stringify(bssidName));
errorMessage = 'Unspecified Error with Radio infrastructure';
}
- }
return Promise.reject(new Error(errorMessage));
};
| 1 |
diff --git a/src/services/donations/donations.hooks.js b/src/services/donations/donations.hooks.js @@ -104,7 +104,7 @@ const donationResolvers = {
},
};
-const convertTokenToTokenSymbol = () => context => {
+const convertTokenToTokenAddress = () => context => {
const { data } = context;
if (data.token) {
data.tokenAddress = data.token.address;
@@ -435,14 +435,14 @@ module.exports = {
}),
updateMilestoneIfNotPledged(),
addActionTakerAddress(),
- convertTokenToTokenSymbol(),
+ convertTokenToTokenAddress(),
],
update: [commons.disallow()],
patch: [
restrict(),
sanitizeAddress('giverAddress', { validate: true }),
addActionTakerAddress(),
- convertTokenToTokenSymbol(),
+ convertTokenToTokenAddress(),
],
remove: [commons.disallow()],
},
| 10 |
diff --git a/packages/api-explorer/src/Variable.jsx b/packages/api-explorer/src/Variable.jsx @@ -38,6 +38,11 @@ class Variable extends React.Component {
this.toggleVarDropdown = this.toggleVarDropdown.bind(this);
this.toggleAuthDropdown = this.toggleAuthDropdown.bind(this);
this.renderVarDropdown = this.renderVarDropdown.bind(this);
+ this.onChange = this.onChange.bind(this);
+ }
+ onChange(event) {
+ this.toggleVarDropdown();
+ this.props.changeSelected(event.target.value)
}
getDefault() {
const def = this.props.defaults.find(d => d.name === this.props.variable) || {};
@@ -62,10 +67,9 @@ class Variable extends React.Component {
}
renderVarDropdown() {
return (
- <select value={this.props.selected} onChange={event => this.props.changeSelected(event.target.value)}>
+ <select value={this.props.selected} onChange={this.onChange}>
{this.props.user.keys.map(key => (
<option
- onClick={event => this.props.changeSelected(event.target.innerText)}
key={key.name}
value={key.name}
>
@@ -87,7 +91,6 @@ class Variable extends React.Component {
<span
className="variable-underline"
onClick={this.toggleVarDropdown}
- ref={this.variableElement}
>
{selectedValue[variable]}
</span>
| 1 |
diff --git a/packages/api-explorer/src/lib/Oas.js b/packages/api-explorer/src/lib/Oas.js @@ -64,16 +64,26 @@ class Operation {
}
}
-class Oas {
- constructor(oas, user) {
- Object.assign(this, oas);
- this.user = user || {};
+function ensureProtocol(url) {
+ // Add protocol to urls starting with // e.g. //example.com
+ // This is because httpsnippet throws a HARError when it doesnt have a protocol
+ if (url.match(/^\/\//)) {
+ return `https:${url}`;
}
- url() {
+ // Add protocol to urls with no // within them
+ // This is because httpsnippet throws a HARError when it doesnt have a protocol
+ if (!url.match(/\/\//)) {
+ return `https://${url}`;
+ }
+
+ return url;
+}
+
+function normalizedUrl(oas) {
let url;
try {
- url = this.servers[0].url;
+ url = oas.servers[0].url;
// This is to catch the case where servers = [{}]
if (!url) throw Error('no url');
@@ -85,6 +95,18 @@ class Oas {
url = 'https://example.com';
}
+ return ensureProtocol(url);
+}
+
+class Oas {
+ constructor(oas, user) {
+ Object.assign(this, oas);
+ this.user = user || {};
+ }
+
+ url() {
+ const url = normalizedUrl(this);
+
let variables;
try {
variables = this.servers[0].variables;
@@ -93,18 +115,6 @@ class Oas {
variables = {};
}
- // Add protocol to urls starting with // e.g. //example.com
- // This is because httpsnippet throws a HARError when it doesnt have a protocol
- if (url.match(/^\/\//)) {
- url = `https:${url}`;
- }
-
- // Add protocol to urls with no // within them
- // This is because httpsnippet throws a HARError when it doesnt have a protocol
- if (!url.match(/\/\//)) {
- url = `https://${url}`;
- }
-
return url.replace(/{([-_a-zA-Z0-9[\]]+)}/g, (original, key) => {
if (getUserVariable(this.user, key)) return getUserVariable(this.user, key);
return variables[key] ? variables[key].default : original;
| 5 |
diff --git a/modules/@apostrophecms/login/index.js b/modules/@apostrophecms/login/index.js @@ -388,7 +388,7 @@ module.exports = {
async enableBearerTokens() {
self.bearerTokens = self.apos.db.collection('aposBearerTokens');
- await self.bearerTokens.enableIndex({ expires: 1 }, { expireAfterSeconds: 0 });
+ await self.bearerTokens.createIndex({ expires: 1 }, { expireAfterSeconds: 0 });
}
};
},
| 4 |
diff --git a/token-metadata/0x0d88eD6E74bbFD96B831231638b66C05571e824F/metadata.json b/token-metadata/0x0d88eD6E74bbFD96B831231638b66C05571e824F/metadata.json "symbol": "AVT",
"address": "0x0d88eD6E74bbFD96B831231638b66C05571e824F",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/webpack.common.js b/webpack.common.js @@ -48,6 +48,7 @@ module.exports = {
loader: 'eslint-loader',
exclude: /node_modules|\.native.js$/,
options: {
+ cache: false,
emitWarning: true,
},
},
| 12 |
diff --git a/sounds.js b/sounds.js @@ -31,6 +31,8 @@ const soundFiles = {
menuLeft: _getSoundFiles(/PauseMenu_Turn_Left/),
menuRight: _getSoundFiles(/PauseMenu_Turn_Right/),
menuReady: _getSoundFiles(/ff7_cursor_ready/),
+ menuBeep: _getSoundFiles(/beep/),
+ menuBoop: _getSoundFiles(/boop/),
itemEquip: _getSoundFiles(/Link_Item\.wav/),
itemUnequip: _getSoundFiles(/Link_Item_Away/),
zTargetCenter: _getSoundFiles(/ZTarget_Center/),
@@ -72,9 +74,13 @@ const playSoundName = name => {
const snds = soundFiles[name];
if (snds) {
const sound = snds[Math.floor(Math.random() * snds.length)];
+ if (!sound) {
+ debugger;
+ }
playSound(sound);
return true;
} else {
+ debugger;
return false;
}
};
| 0 |
diff --git a/includes/Modules/Analytics/Plugin_Detector.php b/includes/Modules/Analytics/Plugin_Detector.php @@ -39,6 +39,7 @@ class Plugin_Detector {
* @return array
*/
public function get_active_plugins() {
+ $active_plugins = array();
foreach ( $this->supported_plugins as $key => $function_name ) {
if ( defined( $function_name ) || function_exists( $function_name ) ) {
array_push( $active_plugins, $key);
| 1 |
diff --git a/assets/js/modules/analytics/datastore/tags.js b/assets/js/modules/analytics/datastore/tags.js @@ -76,7 +76,7 @@ const fetchGetTagPermissionStore = createFetchStore( {
// Actions
const WAIT_FOR_EXISTING_TAG = 'WAIT_FOR_EXISTING_TAG';
-const WAIT_FOR_EXISTING_TAG_PERMISSION = 'WAIT_FOR_EXISTING_TAG_PERMISSION';
+const WAIT_FOR_TAG_PERMISSION = 'WAIT_FOR_TAG_PERMISSION';
const BASE_INITIAL_STATE = {
existingTag: undefined,
@@ -90,10 +90,10 @@ const baseActions = {
type: WAIT_FOR_EXISTING_TAG,
};
},
- waitForExistingTagPermission( existingTag ) {
+ waitForTagPermission( propertyID ) {
return {
- payload: { existingTag },
- type: WAIT_FOR_EXISTING_TAG_PERMISSION,
+ payload: { propertyID },
+ type: WAIT_FOR_TAG_PERMISSION,
};
},
};
@@ -114,11 +114,11 @@ const baseControls = {
} );
} );
} ),
- [ WAIT_FOR_EXISTING_TAG_PERMISSION ]: createRegistryControl( ( registry ) => ( { payload: { existingTag } } ) => {
+ [ WAIT_FOR_TAG_PERMISSION ]: createRegistryControl( ( registry ) => ( { payload: { propertyID } } ) => {
// Select first to ensure resolution is always triggered.
- const analyticsStore = registry.select( STORE_NAME );
- analyticsStore.getTagPermission( existingTag );
- const isTagPermissionLoaded = () => analyticsStore.hasFinishedResolution( 'getTagPermission', [ existingTag ] );
+ const { getTagPermission, hasFinishedResolution } = registry.select( STORE_NAME );
+ getTagPermission( propertyID );
+ const isTagPermissionLoaded = () => hasFinishedResolution( 'getTagPermission', [ propertyID ] );
if ( isTagPermissionLoaded() ) {
return;
}
| 10 |
diff --git a/lib/exposes.js b/lib/exposes.js class Base {
withEndpoint(endpointName) {
this.endpoint = endpointName;
+ this.property = `${this.name}_${this.endpoint}`;
return this;
}
}
-// class Action extends Base {
-// constructor(values) {
-// super();
-// this.type = 'action';
-// this.values = values;
-// }
-// }
-
class Switch extends Base {
constructor() {
super();
@@ -34,6 +27,7 @@ class Binary extends Base {
super();
this.type = 'binary';
this.name = name;
+ this.property = name;
this.access = access;
this.value_on = valueOn;
this.value_off = valueOff;
@@ -50,6 +44,7 @@ class Numeric extends Base {
super();
this.type = 'numeric';
this.name = name;
+ this.property = name;
this.access = access;
}
@@ -74,18 +69,24 @@ class Enum extends Base {
super();
this.type = 'enum';
this.name = name;
+ this.property = name;
this.access = access;
this.values = values;
}
}
-class Json extends Base {
- constructor(name, access, schema) {
+class Composite extends Base {
+ constructor(name, property) {
super();
- this.type = 'json';
+ this.type = 'composite';
+ this.property = property;
this.name = name;
- this.access = access;
- this.schema = schema;
+ this.features = [];
+ }
+
+ withFeature(feature) {
+ this.features.push(feature);
+ return this;
}
}
@@ -108,22 +109,20 @@ class Light extends Base {
}
withColor(types) {
- const schema = {
- type: 'object',
- properties: {},
- };
-
if (types.includes('xy')) {
- schema.properties.x = {type: 'number'};
- schema.properties.y = {type: 'number'};
+ const colorXY = new Composite('color_xy', 'color')
+ .withFeature(new Numeric('x', 'rw'))
+ .withFeature(new Numeric('y', 'rw'));
+ this.features.push(colorXY);
}
if (types.includes('hs')) {
- schema.properties.hue = {type: 'number'};
- schema.properties.saturation = {type: 'number'};
+ const colorHS = new Composite('color_hs', 'color')
+ .withFeature(new Numeric('hue', 'rw'))
+ .withFeature(new Numeric('saturation', 'rw'));
+ this.features.push(colorHS);
}
- this.features.push(new Json('color', 'rw', schema));
return this;
}
}
@@ -150,11 +149,10 @@ class Cover extends Base {
module.exports = {
binary: (name, access, valueOn, valueOff) => new Binary(name, access, valueOn, valueOff),
cover: () => new Cover(),
- // action: (values) => new Action(values),
light: () => new Light(),
numeric: (name, access) => new Numeric(name, access),
switch: () => new Switch(),
- json: (name, access, schema) => new Json(name, access, schema),
+ composite: (name, property) => new Composite(name, property),
enum: (name, access, values) => new Enum(name, access, values),
presets: {
aqi: () => new Numeric('aqi', 'r'),
| 14 |
diff --git a/dev/logger.js b/dev/logger.js @@ -75,13 +75,14 @@ function createBroker(options) {
console.log(chalk.yellow.bold("\n--- WINSTON ---"));
const winston = require("winston");
const broker = createBroker({
- logger: bindings => extend(new winston.Logger({
+ logger: bindings => extend(winston.createLogger({
+ format: winston.format.combine(
+ winston.format.label({ label: bindings }),
+ winston.format.timestamp(),
+ winston.format.json(),
+ ),
transports: [
- new (winston.transports.Console)({
- timestamp: true,
- colorize: true,
- prettyPrint: true
- })
+ new winston.transports.Console()
]
})),
transporter: "NATS",
@@ -90,13 +91,21 @@ function createBroker(options) {
logging(broker);
broker.start();
})();
-
+/*
(function() {
console.log(chalk.yellow.bold("\n--- WINSTON CONTEXT ---"));
const WinstonContext = require("winston-context");
const winston = require("winston");
const broker = createBroker({
- logger: bindings => extend(new WinstonContext(winston, "", bindings)),
+ logger: bindings => extend(new WinstonContext(winston.createLogger({
+ transports: [
+ new winston.transports.Console({
+ timestamp: true,
+ colorize: true,
+ prettyPrint: true
+ })
+ ]
+ }), "", bindings)),
transporter: "NATS",
cacher: "Memory"
});
@@ -104,5 +113,5 @@ function createBroker(options) {
broker.start();
})();
-
+*/
console.log(chalk.yellow.bold("-----------------\n"));
| 3 |
diff --git a/avatars/vrarmik/ShoulderPoser.js b/avatars/vrarmik/ShoulderPoser.js @@ -75,7 +75,7 @@ class ShoulderPoser {
.magnitude);
} */
- Update() {
+ Update(leftArmIk, rightArmIk) {
this.shoulder.proneFactor = this.getProneFactor();
this.shoulder.prone = this.shoulder.proneFactor > 0;
if (this.shoulder.prone) {
@@ -88,8 +88,8 @@ class ShoulderPoser {
this.updateHips();
- this.shoulder.leftShoulderAnchor.quaternion.set(0, 0, 0, 1);
- this.shoulder.rightShoulderAnchor.quaternion.set(0, 0, 0, 1);
+ leftArmIk && this.shoulder.leftShoulderAnchor.quaternion.set(0, 0, 0, 1);
+ rightArmIk && this.shoulder.rightShoulderAnchor.quaternion.set(0, 0, 0, 1);
// this.shoulder.transform.rotation = Quaternion.identity;
// this.positionShoulder();
| 0 |
diff --git a/engine/core/src/main/resources/view/core/Drawer.js b/engine/core/src/main/resources/view/core/Drawer.js @@ -702,7 +702,7 @@ export class Drawer {
loader.add('avatar' + index, agent.avatar, {loadType: 2, crossOrigin: true}, function (event) {
agentData.avatar = event.texture
- PIXI.Texture.addTextureToCache(event.texture, '$' + agentData.index)
+ PIXI.Texture.AddToCache(event.texture, '$' + agentData.index)
})
return agentData
})
@@ -816,7 +816,7 @@ export class Drawer {
this.demo.agents.forEach(agent => {
loader.add('avatar' + agent.index, agent.avatar, {loadType: 2, crossOrigin: true}, function (event) {
agent.avatarTexture = event.texture
- PIXI.Texture.addTextureToCache(event.texture, '$' + agent.index)
+ PIXI.Texture.AddToCache(event.texture, '$' + agent.index)
})
})
}
@@ -838,7 +838,7 @@ export class Drawer {
var key
for (key in resources.images) {
if (resources.images.hasOwnProperty(key)) {
- PIXI.Texture.addTextureToCache(loader.resources[key].texture, key)
+ PIXI.Texture.AddToCache(loader.resources[key].texture, key)
}
}
for (key in resources.spines) {
| 1 |
diff --git a/shared/js/background/banner.es6.js b/shared/js/background/banner.es6.js @@ -114,7 +114,7 @@ function handleOnCommitted (details) {
const { url } = details
let pixelOps = {
bc: 0,
- d: experiment.getDaysSinceInstall() || -1
+ d: experiment.getDaysSinceInstall()
}
let pixelID
@@ -182,7 +182,7 @@ function firePixel (args) {
const id = args[0]
const ops = args[1] || {}
const defaultOps = {
- d: experiment.getDaysSinceInstall() || -1
+ d: experiment.getDaysSinceInstall()
}
const pixelOps = Object.assign(defaultOps, ops)
| 2 |
diff --git a/assets/src/dashboard/app/api/useTemplateApi.js b/assets/src/dashboard/app/api/useTemplateApi.js @@ -96,7 +96,7 @@ const useTemplateApi = (dataAdapter, config) => {
[fetchExternalTemplates]
);
- const bookmarkTemplate = useCallback((templateId, shouldBookmark) => {
+ const bookmarkTemplateById = useCallback((templateId, shouldBookmark) => {
if (shouldBookmark) {
// api call to bookmark template
return Promise.resolve({ success: true });
@@ -108,7 +108,7 @@ const useTemplateApi = (dataAdapter, config) => {
const api = useMemo(
() => ({
- bookmarkTemplate,
+ bookmarkTemplateById,
createStoryFromTemplatePages,
fetchBookmarkedTemplates,
fetchSavedTemplates,
@@ -118,7 +118,7 @@ const useTemplateApi = (dataAdapter, config) => {
fetchExternalTemplateById,
}),
[
- bookmarkTemplate,
+ bookmarkTemplateById,
createStoryFromTemplatePages,
fetchBookmarkedTemplates,
fetchExternalTemplateById,
| 10 |
diff --git a/token-metadata/0x493c8d6a973246a7B26Aa8Ef4b1494867A825DE5/metadata.json b/token-metadata/0x493c8d6a973246a7B26Aa8Ef4b1494867A825DE5/metadata.json "symbol": "NLINK",
"address": "0x493c8d6a973246a7B26Aa8Ef4b1494867A825DE5",
"decimals": 3,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/common/deck_validation.js b/common/deck_validation.js @@ -4,6 +4,7 @@ const INSTRUCTIONS_MAX_LENGTH = 400;
const IMAGE_QUESTION_MAX_LENGTH = 20;
const TEXT_QUESTION_MAX_LENGTH = 400;
const DESCRIPTION_MAX_LENGTH = 500;
+const MAX_NEWLINES_IN_DESCRIPTION = 8;
const ANSWERS_TOTAL_MAX_LENGTH = 200;
const COMMENT_MAX_LENGTH = 600;
const MAX_CARDS = 10000;
@@ -63,6 +64,10 @@ function sanitizeDeckPreValidation(deck) {
deckCopy.name = deckCopy.name.trim();
}
+ if (typeof deckCopy.description === typeof '') {
+ deckCopy.description = deckCopy.description.trim();
+ }
+
for (let cardIndex = 0; cardIndex < deckCopy.cards.length; cardIndex += 1) {
const card = deckCopy.cards[cardIndex];
@@ -192,6 +197,15 @@ function validateCards(cards) {
return successValidationResult;
}
+function countOccurrences(str, character) {
+ let count = 0;
+ for (let i = 0; i < str.length; ++i) {
+ count += str[i] === character ? 1 : 0;
+ }
+
+ return count;
+}
+
function validateDeck(deck) {
if (typeof deck !== typeof {}) {
return createFailureValidationResult(NON_LINE_ERROR_LINE, 'Deck is not an object. Please report this error.');
@@ -214,7 +228,7 @@ function validateDeck(deck) {
}
if (deck.shortName.length < 1 || deck.shortName.length > SHORT_NAME_MAX_LENGTH) {
- return createFailureValidationResult(NON_LINE_ERROR_LINE, `The deck's short name must be more than 0 and less than ${SHORT_NAME_MAX_LENGTH} characters long.`);
+ return createFailureValidationResult(NON_LINE_ERROR_LINE, `The deck's short name must be more than 0 and no more than ${SHORT_NAME_MAX_LENGTH} characters long.`);
}
if (!deck.shortName.match(SHORT_NAME_ALLOWED_CHARACTERS_REGEX)) {
@@ -234,11 +248,19 @@ function validateDeck(deck) {
}
if (deck.name.length < 1 || deck.name.length > FULL_NAME_MAX_LENGTH) {
- return createFailureValidationResult(NON_LINE_ERROR_LINE, `The deck's full name must be more than 0 and less than ${FULL_NAME_MAX_LENGTH} characters long.`);
+ return createFailureValidationResult(NON_LINE_ERROR_LINE, `The deck's full name must be more than 0 and no more than ${FULL_NAME_MAX_LENGTH} characters long.`);
+ }
+
+ if (deck.name.includes('\n')) {
+ return createFailureValidationResult(NON_LINE_ERROR_LINE, `The deck's full name must not contain newlines.`);
}
if (deck.description.length > DESCRIPTION_MAX_LENGTH) {
- return createFailureValidationResult(NON_LINE_ERROR_LINE, `The deck's description must be less than ${DESCRIPTION_MAX_LENGTH} characters long.`);
+ return createFailureValidationResult(NON_LINE_ERROR_LINE, `The deck's description must be no more than than ${DESCRIPTION_MAX_LENGTH} characters long.`);
+ }
+
+ if (countOccurrences(deck.description, '\n') > MAX_NEWLINES_IN_DESCRIPTION) {
+ return createFailureValidationResult(NON_LINE_ERROR_LINE, `The deck's description must have no more than ${MAX_NEWLINES_IN_DESCRIPTION} newlines.`);
}
return validateCards(deck.cards);
| 9 |
diff --git a/src/core/config/scripts/newMinorVersion.mjs b/src/core/config/scripts/newMinorVersion.mjs @@ -136,7 +136,7 @@ const getFeature = function() {
fs.writeFileSync(path.join(process.cwd(), "CHANGELOG.md"), changelogData);
- console.log("Written CHANGELOG.md");
+ console.log("Written CHANGELOG.md\nCommit changes and then run `npm version minor`.");
}
});
};
| 3 |
diff --git a/README.md b/README.md @@ -45,7 +45,7 @@ Check the [getting started](https://github.com/ericmdantas/generator-ng-fullstac
### Wiki
-In the wiki you'll find: [the sub-generators](https://github.com/ericmdantas/generator-ng-fullstack/wiki/Sub-Generators), [FAQ](https://github.com/ericmdantas/generator-ng-fullstack/wiki/FAQ), [Troubleshooting](https://github.com/ericmdantas/generator-ng-fullstack/wiki/Troubleshooting), [walkthroughs](https://github.com/ericmdantas/generator-ng-fullstack/wiki/Todo-Walkthrough), [tips for deployment](https://github.com/ericmdantas/generator-ng-fullstack/wiki/Deploying-to-Heroku) and [much more](https://github.com/ericmdantas/generator-ng-fullstack/wiki).
+In the wiki you'll find: [pro tips](https://github.com/ericmdantas/generator-ng-fullstack/wiki/Pro-tips), [the sub-generators](https://github.com/ericmdantas/generator-ng-fullstack/wiki/Sub-Generators), [FAQ](https://github.com/ericmdantas/generator-ng-fullstack/wiki/FAQ), [Troubleshooting](https://github.com/ericmdantas/generator-ng-fullstack/wiki/Troubleshooting), [walkthroughs](https://github.com/ericmdantas/generator-ng-fullstack/wiki/Todo-Walkthrough), [tips for deployment](https://github.com/ericmdantas/generator-ng-fullstack/wiki/Deploying-to-Heroku) and [much more](https://github.com/ericmdantas/generator-ng-fullstack/wiki).
### Chat
| 0 |
diff --git a/tests/contract_interfaces/issuanceController_interface.py b/tests/contract_interfaces/issuanceController_interface.py @@ -37,7 +37,7 @@ class IssuanceControllerInterface():
self.contract.functions.exchangeEtherForNomins().transact({'from': sender, 'value': value}), "exchangeEtherForNomins", self.contract_name
)
self.exchangeNominsForHavvens = lambda sender, value: mine_tx(
- self.contract.functions.exchangeNominsForHavvens().transact({'from': sender, 'value': value}), "exchangeNominsForHavvens", self.contract_name
+ self.contract.functions.exchangeNominsForHavvens(value).transact({'from': sender}), "exchangeNominsForHavvens", self.contract_name
)
self.withdrawHavvens = lambda sender, value: mine_tx(
self.contract.functions.withdrawHavvens(value).transact({'from': sender}), "withdrawHavvens", self.contract_name
@@ -45,9 +45,6 @@ class IssuanceControllerInterface():
self.withdrawNomins = lambda sender, value: mine_tx(
self.contract.functions.withdrawNomins(value).transact({'from': sender}), "withdrawNomins", self.contract_name
)
- self.exchangeForHavvens = lambda sender, amount: mine_tx(
- self.contract.functions.exchangeForHavvens(amount).transact({'from': sender}), "exchangeForHavvens", self.contract_name
- )
# TODO: Add inherited interface here instead
self.setPaused = lambda sender, paused: mine_tx(
self.contract.functions.setPaused(paused).transact({'from': sender}), "setPaused", self.contract_name
| 1 |
diff --git a/src/plots/gl3d/index.js b/src/plots/gl3d/index.js @@ -35,9 +35,6 @@ exports.layoutAttributes = require('./layout/layout_attributes');
exports.baseLayoutAttrOverrides = overrideAll({
hoverlabel: fxAttrs.hoverlabel
- // dragmode needs docalc but only when transitioning TO lasso or select
- // so for now it's left inside _relayout
- // dragmode: fxAttrs.dragmode
}, 'doplot', 'nested');
exports.supplyLayoutDefaults = require('./layout/defaults');
| 2 |
diff --git a/js/src/miscellaneous/resolve.js b/js/src/miscellaneous/resolve.js @@ -97,7 +97,7 @@ module.exports = (createCommon, options) => {
// Test resolve turns /ipns/QmPeerHash into /ipns/domain.com into /ipfs/QmHash
it('should resolve IPNS link recursively', function (done) {
- this.timeout(2 * 60 * 1000)
+ this.timeout(4 * 60 * 1000)
ipfs.name.publish('/ipns/ipfs.io', { resolve: false }, (err, res) => {
expect(err).to.not.exist()
| 1 |
diff --git a/framer/Extras/Preloader.coffee b/framer/Extras/Preloader.coffee @@ -37,10 +37,10 @@ class Preloader extends BaseClass
@brand.style["background-image"] = "url('#{url}')" if @brand
addImagesFromContext: (context) ->
- _.pluck(context.layers, "image").map(@addImage)
+ _.map(context.layers, "image").map(@addImage)
addPlayersFromContext: (context) ->
- _.pluck(context.layers, "player").map(@addPlayer)
+ _.map(context.layers, "player").map(@addPlayer)
addImage: (image) =>
if image and image not in @_media
| 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.