code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/assets/js/modules/search-console/components/dashboard/SearchFunnelWidget/Overview.js b/assets/js/modules/search-console/components/dashboard/SearchFunnelWidget/Overview.js @@ -43,7 +43,6 @@ import { isZeroReport } from '../../../../analytics/util';
import ActivateModuleCTA from '../../../../../components/ActivateModuleCTA';
import ViewContextContext from '../../../../../components/Root/ViewContextContext';
import DataBlock from '../../../../../components/DataBlock';
-import { isArray } from 'lodash';
const { useSelect } = Data;
function getDatapointAndChange( [ report ], selectedStat, divider = 1 ) {
@@ -89,8 +88,8 @@ const Overview = ( {
if (
analyticsModuleActive &&
- isArray( analyticsData ) &&
- isArray( analyticsVisitorsData )
+ Array.isArray( analyticsData ) &&
+ Array.isArray( analyticsVisitorsData )
) {
( { change: analyticsGoalsChange } = getDatapointAndChange(
analyticsData,
| 2 |
diff --git a/lib/autotune-prep/index.js b/lib/autotune-prep/index.js @@ -27,27 +27,27 @@ function generate (inputs) {
if (opts.profile.curve === 'bilinear') {
console.error('--tune-insulin-curve is set but only valid for exponential curves');
} else {
- let minDeviations = 1000000;
- let newDIA = 0;
- let diaDeviations = [];
- let peakDeviations = [];
- let currentDIA = opts.profile.dia;
- let currentPeak = opts.profile.insulinPeakTime;
-
- let consoleError = console.error;
+ var minDeviations = 1000000;
+ var newDIA = 0;
+ var diaDeviations = [];
+ var peakDeviations = [];
+ var currentDIA = opts.profile.dia;
+ var currentPeak = opts.profile.insulinPeakTime;
+
+ var consoleError = console.error;
console.error = function() {};
- let startDIA=currentDIA - 2;
- let endDIA=currentDIA + 2;
- for (let dia=startDIA; dia <= endDIA; ++dia) {
- let deviations = 0;
+ var startDIA=currentDIA - 2;
+ var endDIA=currentDIA + 2;
+ for (var dia=startDIA; dia <= endDIA; ++dia) {
+ var deviations = 0;
opts.profile.dia = dia;
- let curve_output = categorize(opts);
- let basalGlucose = curve_output.basalGlucoseData;
+ var curve_output = categorize(opts);
+ var basalGlucose = curve_output.basalGlucoseData;
- for (let hour=0; hour < 24; ++hour) {
+ for (var hour=0; hour < 24; ++hour) {
for (var i=0; i < basalGlucose.length; ++i) {
var BGTime;
@@ -84,7 +84,7 @@ function generate (inputs) {
minDeviations = 1000000;
- let newPeak = 0;
+ var newPeak = 0;
opts.profile.dia = currentDIA;
//consoleError(opts.profile.useCustomPeakTime, opts.profile.insulinPeakTime);
if ( ! opts.profile.useCustomPeakTime && opts.profile.curve === "ultra-rapid" ) {
@@ -92,18 +92,18 @@ function generate (inputs) {
}
opts.profile.useCustomPeakTime = true;
- let startPeak=opts.profile.insulinPeakTime - 10;
- let endPeak=opts.profile.insulinPeakTime + 10;
- for (let peak=startPeak; peak <= endPeak; peak=(peak+5)) {
- let deviations = 0;
+ var startPeak=opts.profile.insulinPeakTime - 10;
+ var endPeak=opts.profile.insulinPeakTime + 10;
+ for (var peak=startPeak; peak <= endPeak; peak=(peak+5)) {
+ var deviations = 0;
opts.profile.insulinPeakTime = peak;
- let curve_output = categorize(opts);
- let basalGlucose = curve_output.basalGlucoseData;
+ var curve_output = categorize(opts);
+ var basalGlucose = curve_output.basalGlucoseData;
- for (let hour=0; hour < 24; ++hour) {
+ for (var hour=0; hour < 24; ++hour) {
for (var i=0; i < basalGlucose.length; ++i) {
var BGTime;
| 14 |
diff --git a/articles/quickstart/spa/angular-beta/02-calling-an-api.md b/articles/quickstart/spa/angular-beta/02-calling-an-api.md @@ -225,10 +225,6 @@ With this in place, modify the application router so that this new page can be a
import { ExternalApiComponent } from './external-api/external-api.component';
const routes: Routes = [
- {
- path: '',
- component: HomeComponent
- },
{
path: 'callback',
component: CallbackComponent
| 2 |
diff --git a/imports/client/ui/components/SharePanel/index.js b/imports/client/ui/components/SharePanel/index.js @@ -36,7 +36,7 @@ import './styles.scss'
*/
// NOTE: testing facebook share on local machine will lead to an error page if target domain is localhost
-// const url = window.location
+// const url = window.location <-- set this to a live www. url to test
class SharePanel extends Component {
@@ -49,7 +49,7 @@ class SharePanel extends Component {
const hoursReactComponent = HoursFormatted({ data: this.props.data })
const hoursText = drillDownToText(hoursReactComponent, '')
- const url = 'https://focallocal.org/page/fGd8HuHZEv8QectPS'
+ const url = window.location
const string = i18n.Map.eventInfo.socialMedia.messagePre + document.title + "\n" + hoursText + "\n"
const title = string.replace(' Next:', 'Next:').replace(' Repeating:', '\nRepeating:')
| 14 |
diff --git a/src/component/props.js b/src/component/props.js @@ -73,7 +73,7 @@ export type BooleanPropDefinitionType<T : boolean, P> = PropDefinitionType<T, P,
export type StringPropDefinitionType<T : string, P> = PropDefinitionType<T, P, 'string'>;
export type NumberPropDefinitionType<T : number, P> = PropDefinitionType<T, P, 'number'>;
export type FunctionPropDefinitionType<T : Function, P> = PropDefinitionType<T, P, 'function'>;
-export type ArrayPropDefinitionType<T : Array<*>, P> = PropDefinitionType<T, P, 'array'>; // eslint-disable-line flowtype/no-mutable-array
+export type ArrayPropDefinitionType<T : Array<*> | $ReadOnlyArray<*>, P> = PropDefinitionType<T, P, 'array'>; // eslint-disable-line flowtype/no-mutable-array
export type ObjectPropDefinitionType<T : Object, P> = PropDefinitionType<T, P, 'object'>;
export type MixedPropDefinitionType<P> = BooleanPropDefinitionType<*, P> | StringPropDefinitionType<*, P> | NumberPropDefinitionType<*, P> | FunctionPropDefinitionType<*, P> | ObjectPropDefinitionType<*, P> | ArrayPropDefinitionType<*, P>;
| 11 |
diff --git a/src/patterns/components/masthead/default.hbs b/src/patterns/components/masthead/default.hbs @@ -80,50 +80,50 @@ hasAngularCodeInfo: true
data-sprk-mobile-nav="mobileNav"
role="navigation"
data-id="navigation-narrow-1">
- <ul class="sprk-c-Accordion sprk-c-Accordion--navigation sprk-b-List sprk-b-List--bare">
- <li class="sprk-c-Accordion__item" data-sprk-toggle="container">
- <a aria-controls="details1" class="sprk-c-Accordion__summary" data-sprk-toggle="trigger" data-sprk-toggle-type="accordion" href="#">
- <span class="sprk-b-TypeBodyOne sprk-c-Accordion__heading">
+ <ul class="sprk-c-MastheadAccordion sprk-b-List sprk-b-List--bare">
+ <li class="sprk-c-MastheadAccordion__item" data-sprk-toggle="container">
+ <a aria-controls="details1" class="sprk-c-MastheadAccordion__summary" data-sprk-toggle="trigger" data-sprk-toggle-type="masthead-accordion" href="#">
+ <span class="sprk-b-TypeBodyOne sprk-c-MastheadAccordion__heading">
Item 1
</span>
- <svg class="sprk-c-Icon sprk-c-Icon--l sprk-c-Accordion__icon" data-sprk-toggle="icon" viewBox="0 0 64 64">
+ <svg class="sprk-c-Icon sprk-c-Icon--l sprk-c-Icon--current-color sprk-c-MastheadAccordion__icon" data-sprk-toggle="icon" viewBox="0 0 64 64">
<use xlink:href="#chevron-down"></use>
</svg>
</a>
- <ul id="details1" class="sprk-b-List sprk-b-List--bare sprk-c-Accordion__details" data-sprk-toggle="content">
+ <ul id="details1" class="sprk-b-List sprk-b-List--bare sprk-c-MastheadAccordion__details" data-sprk-toggle="content">
<li>
- <a class="sprk-b-Link sprk-b-Link--simple sprk-u-pam" href="#">
+ <a class="sprk-b-Link sprk-b-Link--plain sprk-c-Masthead__link" href="#">
Item 1
</a>
</li>
<li>
- <a class="sprk-b-Link sprk-b-Link--simple sprk-u-pam" href="#">
+ <a class="sprk-b-Link sprk-b-Link--plain sprk-c-Masthead__link" href="#">
Item 2
</a>
</li>
<li>
- <a class="sprk-b-Link sprk-b-Link--simple sprk-u-pam" href="#">
+ <a class="sprk-b-Link sprk-b-Link--plain sprk-c-Masthead__link" href="#">
Item 3
</a>
</li>
</ul>
</li>
- <li class="sprk-c-Accordion__item sprk-c-Accordion__item--active">
- <a class="sprk-c-Accordion__summary" href="#">
- <span class="sprk-b-TypeBodyOne sprk-c-Accordion__heading">
+ <li class="sprk-c-MastheadAccordion__item sprk-c-MastheadAccordion__item--active">
+ <a class="sprk-c-MastheadAccordion__summary" href="#">
+ <span class="sprk-b-TypeBodyOne sprk-c-MastheadAccordion__heading">
Item 2
</span>
</a>
</li>
- <li class="sprk-c-Accordion__item">
- <a class="sprk-c-Accordion__summary" href="tel:555-555-5555">
- <span class="sprk-b-TypeBodyOne sprk-c-Accordion__heading">
+ <li class="sprk-c-MastheadAccordion__item">
+ <a class="sprk-c-MastheadAccordion__summary" href="tel:555-555-5555">
+ <span class="sprk-b-TypeBodyOne sprk-c-MastheadAccordion__heading">
<svg class="sprk-c-Icon sprk-c-Icon--current-color sprk-c-Icon--l sprk-u-mrs" viewBox="0 0 64 64">
<use xlink:href="#landline" />
</svg>
@@ -132,9 +132,9 @@ hasAngularCodeInfo: true
</a>
</li>
- <li class="sprk-c-Accordion__item">
- <a class="sprk-c-Accordion__summary" href="#">
- <span class="sprk-b-TypeBodyOne sprk-c-Accordion__heading">
+ <li class="sprk-c-MastheadAccordion__item">
+ <a class="sprk-c-MastheadAccordion__summary" href="#">
+ <span class="sprk-b-TypeBodyOne sprk-c-MastheadAccordion__heading">
<svg class="sprk-c-Icon sprk-c-Icon--current-color sprk-c-Icon--l sprk-u-mrs" viewBox="0 0 64 64">
<use xlink:href="#call-team-member" />
</svg>
@@ -143,7 +143,7 @@ hasAngularCodeInfo: true
</a>
</li>
- <li class="sprk-c-Accordion__item sprk-o-Box">
+ <li class="sprk-c-MastheadAccordion__item sprk-o-Box">
<a class="sprk-c-Button sprk-c-Button--secondary sprk-c-Button--compact sprk-c-Button--full@sm" href="#nogo">
Sign In
</a>
| 3 |
diff --git a/lib/tasks/user_migrator.rake b/lib/tasks/user_migrator.rake @@ -117,6 +117,7 @@ namespace :cartodb do
def clean_user_metadata(user)
carto_user = Carto::User.find(user.id)
carto_user.assets.each(&:delete)
+ carto_user.visualizatons.each(&:destroy)
carto_user.destroy
user.before_destroy(skip_table_drop: true)
end
| 2 |
diff --git a/cli/scripts/move-to-org.zsh b/cli/scripts/move-to-org.zsh @@ -22,11 +22,10 @@ find \
--expression="s|$OLD_REPO_PATH|$NEW_REPO_PATH|g" \
__FILE__
-cat \
- $PACKAGE/package.json \
- | jq \
- ".repository = .repository + {directory:\"cli/packages/$1\"}" \
- > $PACKAGE/package.json
+jq ".repository = .repository + {directory:\"cli/packages/$1\"}" \
+ < $PACKAGE/package.json \
+ > $PACKAGE/new.package.json
+mv $PACKAGE/new.package.json $PACKAGE/package.json
echo "TODO: review diffs and stage changes"
read "READY?Ready ('y' to proceed)? "
@@ -35,12 +34,14 @@ read "READY?Ready ('y' to proceed)? "
echo "Comitting..."
git commit -m "Move $1 to @themerdev"
+read "OTP?npm OTP: "
+
echo "Publishing to npm..."
-npm publish $PACKAGE --access public
+npm publish $PACKAGE --access public --otp $OTP
echo "Tagging commit..."
-read "VERSION?Version published: "
+VERSION="$(jq --raw-output '.version' < $PACKAGE/package.json)"
git tag "$NEW_PACKAGE_SCOPE$1-v$VERSION"
echo "Deprecating old package..."
-npm deprecate "$OLD_PACKAGE_SCOPE$1" "Moved to $NEW_PACKAGE_SCOPE$1"
+npm deprecate "$OLD_PACKAGE_SCOPE$1" "Moved to $NEW_PACKAGE_SCOPE$1" --otp $OTP
| 7 |
diff --git a/src/6_branch.js b/src/6_branch.js @@ -802,28 +802,6 @@ Branch.prototype['logout'] = wrap(callback_params.CALLBACK_ERR, function(done) {
});
});
-/**
- * @function Branch.getBrowserFingerprintId
- * @param {function(?Error, data=)=} callback - callback to read a user's browser-fingerprint-id
- *
- * Returns the current user's browser-fingerprint-id. If tracking is disabled then 'null' is returned.
- *
- * ##### Usage
- * ```js
- * branch.getBrowserFingerprintId(function(err, data) { console.log(data); });
- * ```
- *
- * ##### Callback Format
- * ```js
- * callback(
- * null,
- * '79336952217731267', // browser-fingerprint-id, stored in `localStorage`.
- * );
- * ```
- * ___
- *
- */
-/*** +TOC_ITEM #getbrowserfingerprintidcallback &.getBrowserFingerprintId()& ^ALL ***/
Branch.prototype['getBrowserFingerprintId'] = wrap(callback_params.CALLBACK_ERR_DATA, function(done) {
var permData = session.get(this._storage, true) || {};
done(null, permData['browser_fingerprint_id'] || null);
| 2 |
diff --git a/modules/site/parent_templates/site/common/css/bootstrap.css b/modules/site/parent_templates/site/common/css/bootstrap.css @@ -6160,3 +6160,30 @@ a.badge:focus {
.affix {
position: fixed;
}
+
+
+@media print {
+
+ .navbar, #contentTable, .carousel-control, section .btn-mini.pull-right {
+ display: none;
+ }
+
+ .addthis_sharing_toolbox {
+ display: none !important;
+ }
+
+ .tab-content .tab-pane {
+ display: block;
+ border-bottom: 1px solid #ccc;
+ margin-bottom: 1em;
+ }
+
+ .accordion-group .accordion-body {
+ height: auto;
+ }
+
+ .carousel-inner .item {
+ display: block;
+ }
+
+}
| 7 |
diff --git a/src/views/preview/project-view.jsx b/src/views/preview/project-view.jsx @@ -282,6 +282,8 @@ class Preview extends React.Component {
adminModalOpen: false
});
}
+ if (messageEvent.data === 'openPanel') this.handleOpenAdminPanel();
+ if (messageEvent.data === 'closePanel') this.handleCloseAdminPanel();
}
handleReportComment (id, topLevelCommentId) {
this.props.handleReportComment(this.state.projectId, id, topLevelCommentId, this.props.user.token);
| 11 |
diff --git a/generators/generator-constants.js b/generators/generator-constants.js @@ -33,7 +33,7 @@ const NPM_VERSION = commonPackageJson.devDependencies.npm;
const OPENAPI_GENERATOR_CLI_VERSION = '2.5.1';
// Libraries version
-const JHIPSTER_DEPENDENCIES_VERSION = '7.9.1';
+const JHIPSTER_DEPENDENCIES_VERSION = '7.9.2';
// The spring-boot version should match the one managed by https://mvnrepository.com/artifact/tech.jhipster/jhipster-dependencies/JHIPSTER_DEPENDENCIES_VERSION
const SPRING_BOOT_VERSION = '2.7.2';
const LIQUIBASE_VERSION = '4.12.0';
| 3 |
diff --git a/src/core/operations/Substitute.mjs b/src/core/operations/Substitute.mjs @@ -34,10 +34,49 @@ class Substitute extends Operation {
"name": "Ciphertext",
"type": "binaryString",
"value": "XYZABCDEFGHIJKLMNOPQRSTUVW"
+ },
+ {
+ "name": "Ignore case",
+ "type": "boolean",
+ "value": false
}
];
}
+ /**
+ * Convert a single character using the dictionary, if ignoreCase is true then
+ * check in the dictionary for both upper and lower case versions of the character.
+ * In output the input character case is preserved.
+ * @param {string} char
+ * @param {Object} dict
+ * @param {boolean} ignoreCase
+ * @returns {string}
+ */
+ cipherSingleChar(char, dict, ignoreCase) {
+ if (!ignoreCase)
+ return dict[char] || char;
+
+ const isUpperCase = char === char.toUpperCase();
+
+ // convert using the dictionary keeping the case of the input character
+
+ if (dict[char] !== undefined)
+ // if the character is in the dictionary return the value with the input case
+ return isUpperCase ? dict[char].toUpperCase() : dict[char].toLowerCase();
+
+ // check for the other case, if it is in the dictionary return the value with the right case
+ if (isUpperCase) {
+ if (dict[char.toLowerCase()] !== undefined)
+ return dict[char.toLowerCase()].toUpperCase();
+ } else {
+ if(dict[char.toUpperCase()] !== undefined)
+ return dict[char.toUpperCase()].toLowerCase();
+ }
+
+ return char;
+ }
+
+
/**
* @param {string} input
* @param {Object[]} args
@@ -46,17 +85,20 @@ class Substitute extends Operation {
run(input, args) {
const plaintext = Utils.expandAlphRange([...args[0]]),
ciphertext = Utils.expandAlphRange([...args[1]]);
- let output = "",
- index = -1;
+ let output = "";
+ const ignoreCase = args[2];
- if (plaintext.length !== ciphertext.length) {
+ if (plaintext.length !== ciphertext.length)
output = "Warning: Plaintext and Ciphertext lengths differ\n\n";
- }
- for (const character of input) {
- index = plaintext.indexOf(character);
- output += index > -1 && index < ciphertext.length ? ciphertext[index] : character;
- }
+ // create dictionary for conversion
+ const dict = {};
+ for (let i = 0; i < Math.min(ciphertext.length, plaintext.length); i++)
+ dict[plaintext[i]] = ciphertext[i];
+
+ // map every letter with the conversion function
+ for (const character of input)
+ output += this.cipherSingleChar(character, dict, ignoreCase);
return output;
}
| 0 |
diff --git a/tests/beaker_compat_test.py b/tests/beaker_compat_test.py @@ -8,6 +8,40 @@ from __future__ import absolute_import, division, print_function
import pytest
+def test_anonymous_user():
+ _test_cookie(
+ '978f20c7f29a4838a9f16c0dbc61d044.cache',
+ 'net.sirepo.first_visit=1535555450168; net.sirepo.get_started_notify=1535555451699; sr_cookieconsent=dismiss; net.sirepo.sim_list_view=true; net.sirepo.login_notify_timeout=1535742744032; sirepo_dev=9240a807fbfde9841c278b7f5eb580a7933663a5978f20c7f29a4838a9f16c0dbc61d044',
+ 'mshw0FdP',
+ (
+ ('a', 'sros'),
+ ),
+ )
+
+
+def test_no_user():
+ _test_cookie(
+ 'eff2360ca9184155a6757ac096f9d44c.cache',
+ 'net.sirepo.first_visit=1535555450168; net.sirepo.get_started_notify=1535555451699; sr_cookieconsent=dismiss; net.sirepo.sim_list_view=true; net.sirepo.login_notify_timeout=1535742744032; sirepo_dev=dd68627088f9d783ab32c3a0a63797cc170a80ebeff2360ca9184155a6757ac096f9d44c',
+ None,
+ (
+ (None, 'sros'),
+ ),
+ )
+
+
+def test_oauth_user():
+ _test_cookie(
+ 'daaf2aa83ac34f65b42102389c4ff11f.cache',
+ 'sirepo_dev=2f4adb8e95a2324a12f9607b2347ecbce93463bddaaf2aa83ac34f65b42102389c4ff11f; net.sirepo.first_visit=1535736574400; net.sirepo.get_started_notify=1535736579192; sr_cookieconsent=dismiss; net.sirepo.login_notify_timeout=1535746957193',
+ 'S0QmCORV',
+ (
+ ('li', 'sros'),
+ ('moellep', 'sron'),
+ ),
+ )
+
+
def _test_cookie(filename, header, uid, cases):
import shutil
from pykern import pkconfig, pkunit, pkio
@@ -20,6 +54,9 @@ def _test_cookie(filename, header, uid, cases):
'beaker', 'container_file', filename[0:1], filename[0:2], filename)
pkio.mkdir_parent_only(target)
shutil.copy(str(pkunit.data_dir().join(filename)), str(target))
+ for h in header.split('; '):
+ x = h.split('=')
+ fc.set_cookie('', *x)
def _op():
from sirepo import cookie
@@ -40,40 +77,5 @@ def _test_cookie(filename, header, uid, cases):
'SIREPO_OAUTH_GITHUB_CALLBACK_URI': 'n/a',
},
before_request=_before_request,
- headers=dict(Cookie=header),
want_cookie=False,
)
-
-
-def skip_test_anonymous_user():
- _test_cookie(
- '978f20c7f29a4838a9f16c0dbc61d044.cache',
- 'net.sirepo.first_visit=1535555450168; net.sirepo.get_started_notify=1535555451699; sr_cookieconsent=dismiss; net.sirepo.sim_list_view=true; net.sirepo.login_notify_timeout=1535742744032; sirepo_dev=9240a807fbfde9841c278b7f5eb580a7933663a5978f20c7f29a4838a9f16c0dbc61d044',
- 'mshw0FdP',
- (
- ('a', 'sros'),
- ),
- )
-
-
-def skip_test_no_user():
- _test_cookie(
- 'eff2360ca9184155a6757ac096f9d44c.cache',
- 'net.sirepo.first_visit=1535555450168; net.sirepo.get_started_notify=1535555451699; sr_cookieconsent=dismiss; net.sirepo.sim_list_view=true; net.sirepo.login_notify_timeout=1535742744032; sirepo_dev=dd68627088f9d783ab32c3a0a63797cc170a80ebeff2360ca9184155a6757ac096f9d44c',
- None,
- (
- (None, 'sros'),
- ),
- )
-
-
-def skip_test_oauth_user():
- _test_cookie(
- 'daaf2aa83ac34f65b42102389c4ff11f.cache',
- 'sirepo_dev=2f4adb8e95a2324a12f9607b2347ecbce93463bddaaf2aa83ac34f65b42102389c4ff11f; net.sirepo.first_visit=1535736574400; net.sirepo.get_started_notify=1535736579192; sr_cookieconsent=dismiss; net.sirepo.login_notify_timeout=1535746957193',
- 'S0QmCORV',
- (
- ('li', 'sros'),
- ('moellep', 'sron'),
- ),
- )
| 1 |
diff --git a/packages/composer-playground/src/app/services/wallet.service.spec.ts b/packages/composer-playground/src/app/services/wallet.service.spec.ts @@ -6,6 +6,7 @@ import { TestBed, inject, fakeAsync, tick } from '@angular/core/testing';
import { WalletService } from './wallet.service';
import * as sinon from 'sinon';
import { FileWallet } from 'composer-common';
+import { Logger } from 'composer-common';
describe('WalletService', () => {
@@ -23,6 +24,37 @@ describe('WalletService', () => {
});
});
+ describe('getWallet', () => {
+ beforeEach(() => {
+ // webpack can't handle dymanically creating a logger
+ Logger.setFunctionalLogger({
+ log: sinon.stub()
+ });
+ });
+
+ it('should get a wallet', fakeAsync(inject([WalletService], (service: WalletService) => {
+ service['fileWallets'] = mockFileWallets;
+ mockFileWallets.has.returns(true);
+
+ service.getWallet('identity1');
+
+ tick();
+
+ mockFileWallets.set.should.not.have.been.called;
+ mockFileWallets.get.should.have.been.calledWith('identity1');
+ })));
+
+ it('should create a new wallet if it doesn\'t already exist', fakeAsync(inject([WalletService], (service: WalletService) => {
+ service['fileWallets'] = mockFileWallets;
+
+ service.getWallet('secrectIdentity');
+
+ tick();
+
+ mockFileWallets.set.should.have.been.calledWith('secrectIdentity');
+ })));
+ });
+
describe('removeFromWallet', () => {
it('should remove an identity from the wallet', fakeAsync(inject([WalletService], (service: WalletService) => {
let mockGetWallet = sinon.stub(service, 'getWallet').returns(mockFileWallet);
| 7 |
diff --git a/Source/Core/ClippingPlaneCollection.js b/Source/Core/ClippingPlaneCollection.js @@ -119,7 +119,7 @@ define([
*
* @memberof ClippingPlaneCollection.prototype
* @type {Boolean}
- * @default true
+ * @default false
*/
unionClippingRegions : {
get : function() {
| 3 |
diff --git a/src/commands/deploy.js b/src/commands/deploy.js @@ -130,19 +130,26 @@ class DeployCommand extends Command {
} catch (e) {
switch (true) {
case e.name === 'JSONHTTPError': {
- this.error(e.json.message)
+ this.warn(`JSONHTTPError: ${e.json.message} ${e.status}`)
+ this.warn(`\n${JSON.stringify(e, null, ' ')}\n`)
+ this.error(e)
return
}
case e.name === 'TextHTTPError': {
- this.error(e.data)
+ this.warn(`TextHTTPError: ${e.status}`)
+ this.warn(`\n${e}\n`)
+ this.error(e)
return
}
case e.message && e.message.includes('Invalid filename'): {
- this.error(e.message)
+ this.warn(e.message)
+ this.error(e)
return
}
default: {
+ this.warn(`\n${JSON.stringify(e, null, ' ')}\n`)
this.error(e)
+ return
}
}
}
| 7 |
diff --git a/src/components/foregroundNotification/foregroundNotification.tsx b/src/components/foregroundNotification/foregroundNotification.tsx -import { get, isEmpty, some } from 'lodash';
+import { get } from 'lodash';
import React, { useEffect, useRef, useState } from 'react';
-import { Animated, Text, TouchableOpacity, View } from 'react-native';
+import { Text, TouchableOpacity, View } from 'react-native';
+import { View as AnimatedView } from 'react-native-animatable';
import { useDispatch } from 'react-redux';
import { IconButton } from '..';
import { toastNotification } from '../../redux/actions/uiAction';
@@ -35,10 +36,11 @@ interface Props {
const ForegroundNotification = ({ remoteMessage }: Props) => {
- let hideTimeout = null;
- const dispatch = useDispatch();
const intl = useIntl();
+ const hideTimeoutRef = useRef<any>(null);
+ const containerRef = useRef<AnimatedView>(null);
+
const [duration] = useState(5000);
const [activeId, setActiveId] = useState('');
const [isVisible, setIsVisible] = useState(false);
@@ -47,9 +49,6 @@ const ForegroundNotification = ({remoteMessage}:Props) => {
const [body, setBody] = useState('');
- const animatedValue = useRef(new Animated.Value(-CONTAINER_HEIGHT)).current;
-
-
useEffect(() => {
if (remoteMessage) {
@@ -75,39 +74,29 @@ const ForegroundNotification = ({remoteMessage}:Props) => {
}
return () => {
- if(hideTimeout){
- clearTimeout(hideTimeout);
+ if (hideTimeoutRef.current) {
+ clearTimeout(hideTimeoutRef.current);
}
}
}, [remoteMessage]);
const show = () => {
- // Will change fadeAnim value to 1 in 5 seconds
- Animated.timing(animatedValue, {
- toValue: 0,
- duration: 350
- }).start();
-
- setIsVisible(true);
-
- hideTimeout = setTimeout(()=>{
+ setIsVisible(true)
+ hideTimeoutRef.current = setTimeout(() => {
hide();
}, duration)
};
- const hide = () => {
- if(hideTimeout || isVisible){
- // Will change fadeAnim value to 0 in 3 seconds
- Animated.timing(animatedValue, {
- toValue: -CONTAINER_HEIGHT,
- duration: 200
- }).start(()=>{
- dispatch(toastNotification(''))
- });
+ const hide = async () => {
+ if (isVisible && containerRef.current && containerRef.current.fadeOutUp) {
+ await containerRef.current.fadeOutUp(300);
setIsVisible(false);
- clearTimeout(hideTimeout);
+ if(hideTimeoutRef.current){
+ clearTimeout(hideTimeoutRef.current);
+ }
+
}
};
@@ -129,17 +118,19 @@ const ForegroundNotification = ({remoteMessage}:Props) => {
params,
key,
});
+ hide();
}
return (
- <Animated.View
- style={{
- ...styles.container,
- transform: [{ translateY: animatedValue }],
- }}
- >
+ isVisible &&
+ <AnimatedView
+ ref={containerRef}
+ style={styles.container}
+ animation='slideInDown'
+ duration={500}>
+
<View style={styles.contentContainer}>
<TouchableOpacity onPress={_onPress} style={{ flexShrink: 1 }}>
@@ -153,8 +144,6 @@ const ForegroundNotification = ({remoteMessage}:Props) => {
</View>
</TouchableOpacity>
-
-
<IconButton
name='close'
color="white"
@@ -162,8 +151,7 @@ const ForegroundNotification = ({remoteMessage}:Props) => {
onPress={hide}
/>
</View>
-
- </Animated.View>
+ </AnimatedView>
)
}
| 7 |
diff --git a/tools/remark/plugins/remark-html-equation-src-urls/lib/transformer.js b/tools/remark/plugins/remark-html-equation-src-urls/lib/transformer.js @@ -32,33 +32,35 @@ var LABEL = /data-equation="eq:([^"]*)">/;
function factory( opts ) {
return transformer;
/**
- * Transforms a Markdown file.
+ * Transforms a Markdown abstract syntax tree (AST).
*
* @private
- * @param {Node} ast - root node
- * @param {File} file - Virtual file
+ * @param {Node} tree - root AST node
+ * @param {File} file - virtual file
*/
- function transformer( ast, file ) {
+ function transformer( tree, file ) {
debug( 'Processing virtual file...' );
- visit( ast, 'html', insertURLs );
+ visit( tree, 'html', visitor );
/**
- * Insert SVG equation rawgit URLs in Markdown HTML equation elements.
+ * Callback invoked upon finding a matching node. Inserts SVG equation rawgit URLs in Markdown HTML equation elements.
*
* @private
* @param {Node} node - reference node
*/
- function insertURLs( node ) {
+ function visitor( node ) {
var fpath;
var rpath;
var label;
var url;
+
if ( DIV_EQN.test( node.value ) === true ) {
label = LABEL.exec( node.value )[ 1 ];
debug( 'Equation label: %s', label );
- // Get absolute file path of current SVG (note: we assume that the `label` attribute matches the eqn filename):
debug( 'File directory: %s', file.dirname );
+
+ // Get absolute file path of current SVG (note: we assume that the `label` attribute matches the eqn filename):
fpath = join( opts.dir, opts.prefix+label+'.svg' );
debug( 'SVG filename: %s', fpath );
@@ -79,7 +81,7 @@ function factory( opts ) {
// Replace `src` attribute in `<img>` tag:
node.value = node.value.replace( IMG_SOURCE, '$1'+url+'$3' );
}
- }// end FUNCTION insertURLs()
+ }// end FUNCTION visitor()
} // end FUNCTION transformer()
} // end FUNCTION factory()
| 10 |
diff --git a/app/assets/src/components/visualizations/heatmap/Heatmap.js b/app/assets/src/components/visualizations/heatmap/Heatmap.js @@ -478,8 +478,7 @@ export default class Heatmap {
);
// Set up space bar+click to pan behavior.
- d3
- .select("body")
+ d3.select("body")
.on("keydown", () => {
if (d3.event.code === "Space") {
this.svg.style("cursor", "move");
@@ -522,7 +521,7 @@ export default class Heatmap {
}
scroll() {
- this.pan(d3.event.wheelDeltaX, d3.event.wheelDeltaY);
+ this.pan(d3.event.deltaX, d3.event.deltaY);
d3.event.stopPropagation();
}
@@ -1484,9 +1483,7 @@ export default class Heatmap {
columnMetadataLabel
.select(".metadataSortIcon")
- .attr(
- "xlink:href",
- d =>
+ .attr("xlink:href", d =>
d.value === this.columnMetadataSortField
? `${this.options.iconPath}/sort_${
this.columnMetadataSortAsc ? "asc" : "desc"
| 14 |
diff --git a/chatbot-conversational_AI/update-bot/app/update-bot.js b/chatbot-conversational_AI/update-bot/app/update-bot.js @@ -9,11 +9,11 @@ async function main() {
const [stackData, dbData, caiCredentials] = await Promise.all([get_stackQuestions(), get_dbData(db_request), get_caiCredentials()]);
var update_all_questions = false;
if ('UPDATE_ALL' in process.env && process.env.UPDATE_ALL == 'Y') {
- update_all_questions = true;
- console.log("Updating all questions.");
-
console.log("Clean up CAI");
await clean_up_cai(dbData, caiCredentials.access_token);
+
+ update_all_questions = true;
+ console.log("Updating all questions.");
}
console.log("********************************** all knowledge received **********************************")
@@ -312,6 +312,7 @@ async function clean_up_cai(mssql_db_data, access_token) {
// filter list of indices to get list of unused CAI entries
var unused_indices_in_CAI = cai_indices.filter(x => !mssql_indices.includes(x));
+ console.log(`[CLEAN_CAI] There are ${unused_indices_in_CAI.length} unused indices in CAI that will be deleted. `)
// delete unused CAI entries
unused_indices_in_CAI.forEach(index => {
| 7 |
diff --git a/packages/wast-parser/src/tokenizer.js b/packages/wast-parser/src/tokenizer.js @@ -309,8 +309,10 @@ function tokenize(input: string) {
while (
(char !== undefined && numberLiterals.test(char)) ||
(lookbehind() === "p" && char === "+") ||
+ (lookbehind() === "p" && char === "-") ||
+ (lookbehind() === "e" && char === "+") ||
(lookbehind() === "e" && char === "-") ||
- (value.length > 0 && char === "e")
+ (value.length > 0 && (char === "e" || char === "E"))
) {
if (char === "p" && value.includes("p")) {
throw new Error("Unexpected character `p`.");
| 11 |
diff --git a/core/algorithm-queue/lib/metrics/aggregation-metrics-factory.js b/core/algorithm-queue/lib/metrics/aggregation-metrics-factory.js @@ -170,14 +170,14 @@ class AggregationMetricsFactory {
*/
_histogram(metric, task, metricOperation) {
const metricData = {
- id: task.taskId,
+ id: `${task.taskId}-${task.status}`,
labelValues: {
pipeline_name: formatPipelineName(task.pipelineName),
algorithm_name: task.algorithmName,
node_name: task.nodeName
}
};
-
+ try {
if (metricOperation === metricsTypes.HISTOGRAM_OPERATION.start) {
metric.start(metricData);
}
@@ -189,6 +189,10 @@ class AggregationMetricsFactory {
metric.retroactive({ labelValues: metricData.labelValues });
}
}
+ catch (error) {
+ log.warning(`metrics error ${error}`, { component: componentName.AGGREGATION_METRIC });
+ }
+ }
/**
* Apply operation on gauge metric
| 0 |
diff --git a/README.md b/README.md # Why ?
1. You prefer to be [D.R.Y.](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) and build reusable web components on a gradual learning curve.
- 2. Because [You _(probably)_ don't need a Javascript Framework](https://slack-files.com/T03JT4FC2-F151AAF7A-13fe6f98da).
+ 2. Because [You _(probably)_ don't need a Javascript Framework](https://dev.to/steelvoltage/you-probably-don-t-need-a-front-end-framework-26o6).
3. You prefer [convention over configuration](https://en.wikipedia.org/wiki/Convention_over_configuration).
4. [Web Components](https://developer.mozilla.org/en-US/docs/Web/Web_Components)
| 1 |
diff --git a/token-metadata/0xC0134b5B924c2FCA106eFB33C45446c466FBe03e/metadata.json b/token-metadata/0xC0134b5B924c2FCA106eFB33C45446c466FBe03e/metadata.json "symbol": "ALEPH",
"address": "0xC0134b5B924c2FCA106eFB33C45446c466FBe03e",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/token-metadata/0x4599836c212CD988EAccc54C820Ee9261cdaAC71/metadata.json b/token-metadata/0x4599836c212CD988EAccc54C820Ee9261cdaAC71/metadata.json "symbol": "CID",
"address": "0x4599836c212CD988EAccc54C820Ee9261cdaAC71",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/workshops/terraform.md b/workshops/terraform.md @@ -78,7 +78,7 @@ Advanced Terraform Snippets Generator | Richard Sentino | [mindginative.terrafor
Use `CTRL`+`SHIFT`+`X` to open the extensions sidebar. You can search and install the extensions from within there.
-
+For Windows Subsystem for Linux users then you should also switch your integrated console from the default $SHELL (either Command Prompt or PowerShell) to WSL. Open the Command Palette (`CTRL`+`SHIFT`+`P`) and then search for the convenience command **Select Default Shell**.
----------
| 12 |
diff --git a/layouts/partials/helpers/slot.html b/layouts/partials/helpers/slot.html {{- $slot := .slot -}}
+{{- $slot_name := printf "%s/%s" .root.self.File.BaseFileName $slot -}}
+{{- $nested_level := .root.nested_level | default 0 -}}
{{- $page_scratch := .root.page_scratch -}}
-{{- $slot_name := printf "%s/%s" $.root.self.File.BaseFileName $slot -}}
{{- $root := .root -}}
{{- $page_scratch.Set $slot_name (slice) -}}
{{- end -}}
{{ $page_scratch.Add "page_slots" (dict "slot" $slot_name "fragments" ($page_scratch.Get $slot_name)) }}
-
+{{- if lt $nested_level 3 -}}
{{- range sort ($page_scratch.Get $slot_name) "Params.weight" -}}
{{/* Cleanup .Name to be more useful within fragments */}}
{{- $name := cond (eq $.root.page .) .File.BaseFileName (strings.TrimSuffix ".md" (replace .Name "/index.md" "")) -}}
{{- .Scratch.Set "bg" $bg -}}
{{- $file_path := strings.TrimSuffix ".md" (replace .File.Path "/index.md" "") -}}
- {{- $context := dict "page_scratch" $page_scratch "root" $root.root "Site" $root.Site "page" $root.page "resources" $root.resources "self" . "Params" .Params "Name" $name "file_path" $file_path "in_slot" true "data" ($.data | default (dict)) -}}
+ {{- $context := dict "page_scratch" $page_scratch "root" $root.root "Site" $root.Site "page" $root.page "resources" $root.resources "self" . "Params" .Params "Name" $name "file_path" $file_path "nested_level" (add $nested_level 1) "in_slot" true "data" ($.data | default (dict)) -}}
{{- partial (print "fragments/" (strings.TrimPrefix (printf "%s/%s:" $.root.self.File.BaseFileName $slot) .Params.fragment) ".html") $context -}}
{{- end -}}
+{{- end -}}
| 0 |
diff --git a/src/tree/Stage.mjs b/src/tree/Stage.mjs @@ -176,7 +176,7 @@ export default class Stage extends EventEmitter {
opt('memoryPressure', 24e6);
opt('bufferMemory', 2e6);
opt('textRenderIssueMargin', 0);
- opt('fontSharp',{precision:0.6666666667, fontSize: 39})
+ opt('fontSharp',{precision:0.6666666667, fontSize: 24})
opt('clearColor', [0, 0, 0, 0]);
opt('defaultFontFace', 'sans-serif');
opt('fixedDt', 0);
| 3 |
diff --git a/Source/Scene/Scene.js b/Source/Scene/Scene.js @@ -1928,7 +1928,7 @@ define([
if (environmentState.useGlobeDepthFramebuffer) {
framebuffer = scene._globeDepth.framebuffer;
} else if (environmentState.usePostProcess) {
- framebuffer = scene._sceneFramebuffer.getColorFramebuffer();
+ framebuffer = scene._sceneFramebuffer.getFramebuffer().getColorFramebuffer();
} else {
framebuffer = environmentState.originalFramebuffer;
}
@@ -2750,7 +2750,7 @@ define([
scene._oit.execute(context, passState);
}
- if (usePostProcess) {
+ if (usePostProcess && (useOIT || defined(globeFramebuffer))) {
var inputFramebuffer = useOIT ? sceneFramebuffer : globeFramebuffer;
var postProcess = scene.postProcessCollection;
| 1 |
diff --git a/source/Overture/views/controls/RichTextView.js b/source/Overture/views/controls/RichTextView.js @@ -75,6 +75,7 @@ const RichTextView = Class({
isFocussed: false,
isDisabled: false,
tabIndex: undefined,
+ label: undefined,
allowTextSelection: true,
@@ -203,6 +204,9 @@ const RichTextView = Class({
draw ( layer, Element, el ) {
const editorClassName = this.get( 'editorClassName' );
const editingLayer = this._editingLayer = el( 'div', {
+ 'role': 'textbox',
+ 'aria-multiline': 'true',
+ 'aria-label': this.get( 'label' ),
tabIndex: this.get( 'tabIndex' ),
className: 'v-RichText-input' +
( editorClassName ? ' ' + editorClassName : '' ),
| 0 |
diff --git a/kitty-items-js/README.md b/kitty-items-js/README.md # kitty-items-js
-API that sends transactions to the Flow Blockchain:
+API that sends transactions to the Flow Blockchain, using the [flow-js-sdk](https://github.com/onflow/flow-js-sdk/).
+This API currently supports:
-- Mint Kibbles
-- Mint Kitty Items
+- Minting Kibbles (fungible token)
+- Minting Kitty Items (non-fungible token)
+- Creating Sale Offers for Kitty Items
-### Running API
+### Setup
- Install npm dependencies:
@@ -14,16 +16,34 @@ npm install
```
- Run docker:
+
```
docker-compose up -d
```
+- Create a `.env` file based out of `.env.example`. Refer to `Creating a new Flow Account on Testnet` section below in order to
+ setup your private key for the `MINTER_PRIVATE_KEY` variable.
+
- Start app:
```
npm run start:dev
```
+Note that when the API starts, it will automatically run the database migrations for the configured `DATABASE_URL` url.
+
+- Start workers / flow event handlers:
+
+```
+npm run workers:dev
+```
+
+### Creating a new Flow Account on Testnet
+
+In order to create an account on Testnet to deploy the smart contracts and mint Kibbles or Kitty Items, follow these steps:
+
+- Head to https://testnet-faucet.onflow.org/
+- Sign up for `Creating an account`
### Creating a new database migration:
| 0 |
diff --git a/src/XR.js b/src/XR.js @@ -168,7 +168,7 @@ class XRSession extends EventTarget {
set layers(layers) {
this.device.layers = layers;
}
- requestFrameOfReference(type, options = {}) {
+ requestReferenceSpace(type, options = {}) {
// const {disableStageEmulation = false, stageEmulationHeight = 0} = options;
return Promise.resolve(this._frameOfReference);
}
| 10 |
diff --git a/src/components/signup/EmailForm.js b/src/components/signup/EmailForm.js // @flow
import React from 'react'
import { HelperText, TextInput } from 'react-native-paper'
-import { Wrapper, Title } from './components'
-import logger from '../../lib/logger/pino-logger'
+import type { Store } from 'undux'
+
import { userModelValidations } from '../../lib/gundb/UserModel'
+import logger from '../../lib/logger/pino-logger'
+import GDStore from '../../lib/undux/GDStore'
+import { Title, Wrapper } from './components'
const log = logger.child({ from: 'EmailForm' })
@@ -11,7 +14,8 @@ type Props = {
// callback to report to parent component
doneCallback: ({ email: string }) => null,
screenProps: any,
- navigation: any
+ navigation: any,
+ store: Store
}
export type EmailRecord = {
@@ -22,7 +26,7 @@ export type EmailRecord = {
type State = EmailRecord & { valid?: boolean }
-export default class EmailForm extends React.Component<Props, State> {
+class EmailForm extends React.Component<Props, State> {
state = {
email: this.props.screenProps.data.email || '',
errorMessage: ''
@@ -52,7 +56,7 @@ export default class EmailForm extends React.Component<Props, State> {
const { errorMessage } = this.state
return (
- <Wrapper valid={true} handleSubmit={this.handleSubmit}>
+ <Wrapper valid={true} handleSubmit={this.handleSubmit} loading={this.props.store.get('currentScreen').loading}>
<Title>And which email address should we use to notify you?</Title>
<TextInput
id="signup_email"
@@ -71,3 +75,5 @@ export default class EmailForm extends React.Component<Props, State> {
)
}
}
+
+export default GDStore.withStore(EmailForm)
| 0 |
diff --git a/packages/app/test/cypress/integration/2-basic-features/access-to-page.spec.ts b/packages/app/test/cypress/integration/2-basic-features/access-to-page.spec.ts @@ -31,7 +31,7 @@ context('Access to page', () => {
});
- it('/Draft page will be successfully shown', () => {
+ it('/Draft page is successfully shown', () => {
cy.visit('/me/drafts');
cy.screenshot(`${ssPrefix}-draft-page`, { capture: 'viewport' });
});
| 10 |
diff --git a/README.md b/README.md # Design System for React
### Accessible, localization-friendly, presentational React components
-[](https://travis-ci.com/salesforce-ux/design-system-react)
+[](https://travis-ci.com/salesforce/design-system-react)
## Overview
Welcome to the project! :wave: This library is the [React](https://facebook.github.io/react/) implementation of the [Lightning Design System](https://www.lightningdesignsystem.com/). It is an internal open source project and contributions are expected from production teams consuming this library. There is only one engineer that is partially-aligned to this project as part of their V2MOM. All other contributors are on production teams that ship end-product with releases dates, too.
@@ -49,7 +49,7 @@ Add the following line to your `package.json` devDependencies and run `npm insta
```
# package.json
-"design-system-react": "git+ssh://[email protected]:salesforce-ux/design-system-react.git#v[VERSION]",
+"design-system-react": "git+ssh://[email protected]:salesforce/design-system-react.git#v[VERSION]",
```
The bundled files are provided only for convenience.
@@ -83,9 +83,9 @@ Please read the [CONTRIBUTING.md](CONTRIBUTING.md) and [Test README](/tests/READ
## Licenses
* Source code is licensed under [BSD 3-Clause](https://git.io/sfdc-license)
-* All icons and images are licensed under [Creative Commons Attribution-NoDerivatives 4.0](https://github.com/salesforce-ux/licenses/blob/master/LICENSE-icons-images.txt)
-* The Salesforce Sans font is licensed under our [font license](https://github.com/salesforce-ux/licenses/blob/master/LICENSE-font.txt)
+* All icons and images are licensed under [Creative Commons Attribution-NoDerivatives 4.0](https://github.com/salesforce/licenses/blob/master/LICENSE-icons-images.txt)
+* The Salesforce Sans font is licensed under our [font license](https://github.com/salesforce/licenses/blob/master/LICENSE-font.txt)
## Got feedback?
-Please create a [GitHub Issue](https://github.com/salesforce-ux/design-system-react/issues)
+Please create a [GitHub Issue](https://github.com/salesforce/design-system-react/issues)
| 1 |
diff --git a/articles/client-auth/v2/mobile-desktop.md b/articles/client-auth/v2/mobile-desktop.md @@ -40,3 +40,51 @@ Once Auth0 creates the Client, navigate to the Client's **Settings** tab to add
Scroll to the bottom of the page and click **Save**.

+
+## Implement Authentication
+
+To implement the Authorization Code Grant Flow using Proof Key for Code Exchange, you will need to execute the following steps:
+
+1. Create a random key (called the **code verifier**) and its transformed value (called the **code challenge**)
+2. Obtain the user's authorization
+3. Obtain an access token
+4. Call the API using the new access token
+
+Step 1: Create a Random Key and the Code Challenge
+
+You will need to generate and store a `code_verifier`, which is a cryptographically random key that, along with its transformed value (called the `code_challenge`), will be sent to Auth0 for an `authorization_code`.
+
+Step 2: Authorize the User
+
+Once you've created the `code_verifier` and the `code_challenge` that you include in the authorization request, you'll need to obtain the user's authorization. This is technically the beginning of the authorization flow, and this step may include one or more of the following processes:
+
+* Authenticating the user;
+* Redirecting the user to an Identity Provider to handle authentication;
+* Checking for active SSO sessions.
+
+To authorize the user, your application must send the user to the [authorization URL](/api/authentication#authorization-code-grant-pkce-) (which includes the `code_challenge` you generated in the previous step, as well as the method you used to generate the `code_challenge`). Your URL should following this format:
+
+```text
+https://${account.namespace}/authorize?
+ audience=API_AUDIENCE&
+ scope=SCOPE&
+ response_type=code&
+ client_id=${account.clientId}&
+ code_challenge=CODE_CHALLENGE&
+ code_challenge_method=S256&
+ redirect_uri=${account.callback}
+```
+
+Request Parameters:
+
+* `audience`: The unique identifier of the target API. Use the __Identifier__ value in [API Settings](${manage_url}/#/apis). If you don't see this page in the Dashboard, enable the __Enable APIs Section__ toggle at [Account Settings > Advanced](${manage_url}/#/account/advanced).
+* `scope`: The [scopes](/scopes) for which you want to request authorization. Each scope must be separated from the others using a whitespace character. You can request any of the [standard OIDC scopes](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims) for users (such as `profile` and `email`), custom claims conforming to a namespaced format (see note below on Arbitrary Claims), and any scopes supported by the target API. Include `offline_access` to get a refresh token (make sure that you've enabled __Allow Offline Access__ in your [API Settings](${manage_url}/#/apis)).
+* `response_type`: The credential type you want Auth0 to return (code or token). For authentication using PKCE, this value must be set to `code`.
+* `client_id`: Your Client's ID. You can find this value in your [Client's Settings](${manage_url}/#/clients/${account.clientId}/settings).
+* `redirect_uri`: The URL to which Auth0 will redirect the browser after user authorization. This URL must be specified as a valid callback URL in your [Client's Settings](${manage_url}/#/clients/${account.clientId}/settings).
+* `code_challenge`: the generated challenge associated with the `code_verifier`.
+* `code_challenge_method`: the method used to generate the challenge. The PKCE spec defines two methods (`S256` and `plain`), but Auth0 only supports `S256`.
+
+::: panel-info Arbitrary Claims
+To improve Client application compatibility, Auth0 returns profile information using an [OIDC-defined structured claim format](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims). This means that arbitrary claims to ID or access tokens must conform to a namespaced format to avoid collisions with standard OIDC claims. For example, if your namespace is `https://foo.com/` and you want to add an arbitrary claim named `myclaim`, you would name the claim `https://foo.com/myclaim`, not `myclaim`.
+:::
| 0 |
diff --git a/dev-tools/docker-compose/src/release/get-changed-packages.js b/dev-tools/docker-compose/src/release/get-changed-packages.js @@ -44,10 +44,29 @@ function getDependentPackages(available = {}, changedLib = '', type = '') {
return dependent
}
+function bumpMinor(available = {}, pkg = '') {
+ const found = available.find((p) => p.name === pkg)
+ if (found) {
+ const [major, minor, patch] = found.version
+ .split('.')
+ .map((v) => parseInt(v, 10))
+
+ console.log(major, minor, patch)
+ const temp = JSON.parse(fs.readFileSync(`${found.path}/package.json`))
+ temp.version = `${major}.${minor + 1}.${0}`
+ fs.writeFileSync(
+ `${found.path}/package.json`,
+ JSON.stringify(temp, null, 2),
+ 'utf8'
+ )
+ }
+}
+
checkTools(['git'])
async function run() {
const tag = process.argv[2]
+ const shouldBump = !!(process.argv[3] && process.argv[3] === 'bump')
const available = {
services: getAvailablePackages('services'),
@@ -108,6 +127,11 @@ async function run() {
console.log('lib', total.lib.length, total.lib)
console.log('services', total.services.length, total.services)
+
+ if (shouldBump) {
+ total.lib.forEach((lib) => bumpMinor(available.lib, lib))
+ total.services.forEach((service) => bumpMinor(available.services, service))
+ }
}
;(async () => {
| 11 |
diff --git a/src/image/environment.js b/src/image/environment.js -import Canvas, {Image as DOMImage, ImageData} from 'canvas';
+let Canvas, DOMImage, ImageData;
+try {
+ const canvas = require('canvas');
+ Canvas = canvas;
+ DOMImage = canvas.Image;
+ ImageData = canvas.ImageData;
+} catch (e) {
+ // eslint-disable-next-line no-console
+ console.error('image-js could not load the canvas library. Some methods may not work.');
+ Canvas = function () {
+ throw new Error('Canvas requires the canvas library');
+ };
+ DOMImage = function () {
+ throw new Error('DOMImage requires the canvas library');
+ };
+ ImageData = function () {
+ throw new Error('ImageData requires the canvas library');
+ };
+}
+
import {readFile, createWriteStream, writeFile} from 'fs';
const env = 'node';
| 11 |
diff --git a/src/WebformBuilder.js b/src/WebformBuilder.js @@ -4,7 +4,7 @@ import Tooltip from 'tooltip.js';
import NativePromise from 'native-promise-only';
import Components from './components/Components';
import Formio from './Formio';
-import { fastCloneDeep, bootstrapVersion } from './utils/utils';
+import { fastCloneDeep, bootstrapVersion, getArrayFromComponentPath, getStringFromComponentPath } from './utils/utils';
import { eachComponent, getComponent } from './utils/formUtils';
import BuilderUtils from './utils/builder';
import _ from 'lodash';
@@ -1117,12 +1117,18 @@ export default class WebformBuilder extends Component {
}
}
else {
- const dataPath = _.get(defaultValueComponent, 'component.type') === 'datagrid'
- ? `_data[${component.key}][${changed.instance.rowIndex}][${changed.instance.key}]`
- : `_data[${changed.instance._data.key}]`;
+ let dataPath = changed.instance._data.key;
- _.set(this.preview, dataPath, changed.value);
- _.set(this.webform, dataPath, changed.value);
+ const path = getArrayFromComponentPath(changed.instance.path);
+ path.shift();
+
+ if (path.length) {
+ path.unshift(component.key);
+ dataPath = getStringFromComponentPath(path);
+ }
+
+ _.set(this.preview._data, dataPath, changed.value);
+ _.set(this.webform._data, dataPath, changed.value);
}
}
| 7 |
diff --git a/app/shared/actions/validate.js b/app/shared/actions/validate.js @@ -55,7 +55,7 @@ export function validateAccount(account) {
};
}
-export function validateNode(node) {
+export function validateNode(node, expectedChainId = false) {
return (dispatch: () => void, getState) => {
dispatch({
node,
@@ -91,6 +91,14 @@ export function validateNode(node) {
// If we received a valid height, confirm this server can be connected to
if (result.head_block_num > 1) {
const blockchain = find(blockchains, { chainId: result.chain_id });
+ if (expectedChainId && expectedChainId !== result.chain_id) {
+ return dispatch({
+ type: types.VALIDATE_NODE_FAILURE,
+ payload: {
+ error: 'mismatch_chainid'
+ }
+ });
+ }
// Dispatch success
dispatch({
payload: {
@@ -191,6 +199,7 @@ export function clearValidationState() {
}
export default {
+ clearValidationState,
validateAccount,
validateNode,
validateKey
| 11 |
diff --git a/lib/taiko.js b/lib/taiko.js @@ -340,14 +340,16 @@ const _write = async (text,options) => {
*/
module.exports.attach = async (filepath, to) => {
validate();
+ resolvedPath = filepath ? path.resolve(process.cwd(), filepath) : path.resolve(process.cwd());
+ if (!(fs.statSync(resolvedPath).isFile())) throw Error('File not found');
if (isString(to)) to = fileField(to);
else if (!isSelector(to)) throw Error('Invalid element passed as paramenter');
const nodeId = await element(to);
await dom.setFileInputFiles({
nodeId: nodeId,
- files: [filepath]
+ files: [resolvedPath]
});
- return { description: `Attached ${filepath} to the ` + description(to, true) };
+ return { description: `Attached ${resolvedPath} to the ` + description(to, true) };
};
/**
| 1 |
diff --git a/content/questions/equality-operators/index.md b/content/questions/equality-operators/index.md ---
title: Equality Operators
-tags: operators
- -
+tags:
+ - operators
order: 51
date: Sun Oct 20 2019 12:14:42 GMT-0700 (Pacific Daylight Time)
answers:
- - 'true, false'
+ - 'true, false // correct'
- 'true, true'
- 'false, true'
- 'false, false'
| 0 |
diff --git a/public/javascripts/SVLabel/src/SVLabel/keyboard/Keyboard.js b/public/javascripts/SVLabel/src/SVLabel/keyboard/Keyboard.js @@ -231,7 +231,6 @@ function Keyboard (svl, canvas, contextMenu, googleMap, ribbon, zoomControl) {
*/
status.shiftDown = e.shiftKey;
if (!status.focusOnTextField) {
- var label = contextMenu.isOpen() ? contextMenu.getTargetLabel() : undefined;
switch (e.keyCode) {
case util.misc.getLabelDescriptions('Occlusion')['shortcut']['keyNumber']:
// "b" for a blocked view
@@ -247,12 +246,8 @@ function Keyboard (svl, canvas, contextMenu, googleMap, ribbon, zoomControl) {
svl.tracker.push("KeyboardShortcut_ModeSwitch_CurbRamp", {
keyCode: e.keyCode
});
- } else if (contextMenu.isOpen() && label.getProperty('labelType') === 'CurbRamp') {
- contextMenu.hide();
- svl.tracker.push("ContextMenu_CloseKeyboardShortcut", {
- keyCode: e.keyCode
- });
- svl.tracker.push("KeyboardShortcut_CloseContextMenu");
+ } else {
+ _closeContextMenu(e.keyCode);
}
break;
case util.misc.getLabelDescriptions('Walk')['shortcut']['keyNumber']:
@@ -269,12 +264,8 @@ function Keyboard (svl, canvas, contextMenu, googleMap, ribbon, zoomControl) {
svl.tracker.push("KeyboardShortcut_ModeSwitch_NoCurbRamp", {
keyCode: e.keyCode
});
- } else if (contextMenu.isOpen() && label.getProperty('labelType') === 'NoCurbRamp') {
- contextMenu.hide();
- svl.tracker.push("ContextMenu_CloseKeyboardShortcut", {
- keyCode: e.keyCode
- });
- svl.tracker.push("KeyboardShortcut_CloseContextMenu");
+ } else {
+ _closeContextMenu(e.keyCode);
}
break;
case util.misc.getLabelDescriptions('NoSidewalk')['shortcut']['keyNumber']:
@@ -290,12 +281,8 @@ function Keyboard (svl, canvas, contextMenu, googleMap, ribbon, zoomControl) {
svl.tracker.push("KeyboardShortcut_ModeSwitch_Obstacle", {
keyCode: e.keyCode
});
- } else if (contextMenu.isOpen() && label.getProperty('labelType') === 'Obstacle') {
- contextMenu.hide();
- svl.tracker.push("ContextMenu_CloseKeyboardShortcut", {
- keyCode: e.keyCode
- });
- svl.tracker.push("KeyboardShortcut_CloseContextMenu");
+ } else {
+ _closeContextMenu(e.keyCode);
}
break;
case util.misc.getLabelDescriptions('SurfaceProblem')['shortcut']['keyNumber']:
@@ -304,12 +291,8 @@ function Keyboard (svl, canvas, contextMenu, googleMap, ribbon, zoomControl) {
svl.tracker.push("KeyboardShortcut_ModeSwitch_SurfaceProblem", {
keyCode: e.keyCode
});
- } else if (contextMenu.isOpen() && label.getProperty('labelType') === 'SurfaceProblem') {
- contextMenu.hide();
- svl.tracker.push("ContextMenu_CloseKeyboardShortcut", {
- keyCode: e.keyCode
- });
- svl.tracker.push("KeyboardShortcut_CloseContextMenu");
+ } else {
+ _closeContextMenu(e.keyCode);
}
break;
case 16: //shift
@@ -375,6 +358,14 @@ function Keyboard (svl, canvas, contextMenu, googleMap, ribbon, zoomControl) {
}
};
+ function _closeContextMenu(key) {
+ contextMenu.hide();
+ svl.tracker.push("ContextMenu_CloseKeyboardShortcut", {
+ keyCode: key
+ });
+ svl.tracker.push("KeyboardShortcut_CloseContextMenu");
+ }
+
/**
* Get status
| 11 |
diff --git a/lib/index.js b/lib/index.js @@ -650,6 +650,7 @@ class MerossPlatform {
if (!hidden) {
accessory
.getService(this.api.hap.Service.AccessoryInformation)
+ .setCharacteristic(this.api.hap.Characteristic.Name, device.devName)
.setCharacteristic(this.api.hap.Characteristic.SerialNumber, device.uuid)
.setCharacteristic(this.api.hap.Characteristic.Manufacturer, this.lang.brand)
.setCharacteristic(this.api.hap.Characteristic.Model, device.model)
| 12 |
diff --git a/token-metadata/0xa7C71d444bf9aF4bfEd2adE75595d7512Eb4DD39/metadata.json b/token-metadata/0xa7C71d444bf9aF4bfEd2adE75595d7512Eb4DD39/metadata.json "symbol": "T1C",
"address": "0xa7C71d444bf9aF4bfEd2adE75595d7512Eb4DD39",
"decimals": 16,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/test/tests/operations/FlowControl.js b/test/tests/operations/FlowControl.js @@ -52,4 +52,16 @@ TestRegister.addTests([
},
],
},
+ {
+ name: "Fork, Conditional Jump, Encodings",
+ input: "Some data with a 1 in it\nSome data with a 2 in it",
+ expectedOutput: "U29tZSBkYXRhIHdpdGggYSAxIGluIGl0\n53 6f 6d 65 20 64 61 74 61 20 77 69 74 68 20 61 20 32 20 69 6e 20 69 74\n",
+ recipeConfig: [
+ {"op":"Fork", "args":["\\n", "\\n", false]},
+ {"op":"Conditional Jump", "args":["1", "2", "10"]},
+ {"op":"To Hex", "args":["Space"]},
+ {"op":"Return", "args":[]},
+ {"op":"To Base64", "args":["A-Za-z0-9+/="]}
+ ]
+ },
]);
| 0 |
diff --git a/packages/@uppy/core/types/index.d.ts b/packages/@uppy/core/types/index.d.ts @@ -81,8 +81,8 @@ interface Locale {
export interface UppyOptions {
id: string;
autoProceed: boolean;
+ allowMultipleUploads: boolean;
debug: boolean;
- showLinkToFileUploadResult: boolean;
restrictions: {
maxFileSize: number | null;
maxNumberOfFiles: number | null;
| 2 |
diff --git a/src/userscript.ts b/src/userscript.ts @@ -45417,6 +45417,15 @@ var $$IMU_EXPORT$$;
return obj;
}
+ // thanks to anyunami2000: https://github.com/qsniyg/maxurl/issues/926
+ // https://partycity6.scene7.com/is/image/PartyCity/_pdp_sq_?$_500x500_$&$product=PartyCity/177905_01
+ // https://partycity6.scene7.com/is/image/PartyCity/177905_01?scl=1&fmt=png-alpha
+ match = src.match(/\/is\/+image\/+.*?[?&]\$product=([^&]+).*?$/);
+ if (match) {
+ obj.url = src.replace(/\/is\/+image\/.*/, "/is/image/" + decodeURIComponent(match[1]));
+ return obj;
+ }
+
if (domain === "bonprix.scene7.com") {
src = src.replace(/\/[0-9]+[wh]\/+([^/]+(?:[?#].*)?)$/, "/original/$1"); // can be anything
}
| 7 |
diff --git a/CHANGELOG.md b/CHANGELOG.md All notable changes to this project are documented in this file.
-## Head
+## 14.6.1
- Fixed: `custom-property-pattern` TypeError for "Cannot destructure property..." ([#5982](https://github.com/stylelint/stylelint/pull/5982)).
- Fixed: `selector-type-case` false positives for SVG elements ([#5973](https://github.com/stylelint/stylelint/pull/5973)).
| 6 |
diff --git a/lib/assets/core/javascripts/cartodb/organization/organization_notification/organization_notification_view.js b/lib/assets/core/javascripts/cartodb/organization/organization_notification/organization_notification_view.js @@ -67,13 +67,35 @@ module.exports = cdb.core.View.extend({
}
},
+ _destroyRemoveNotificationDialog: function () {
+ if (this.remove_notification_dialog) {
+ this._unbindRemoveNotificationDialog();
+ this.remove_notification_dialog.remove();
+ this.removeView(this.remove_notification_dialog);
+ this.remove_notification_dialog.hide();
+ delete this.remove_notification_dialog;
+ }
+ },
+
+ _bindRemoveNotificationDialog: function () {
+ cdb.god.bind('closeDialogs:delete', this._destroyRemoveNotificationDialog, this);
+ },
+
+ _unbindRemoveNotificationDialog: function () {
+ cdb.god.unbind('closeDialogs:delete', this._destroyRemoveNotificationDialog, this);
+ },
+
_onClickRemove: function (event) {
+ cdb.god.trigger('closeDialogs:delete');
+
var $target = $(event.target);
+
this.remove_notification_dialog = new RemoveNotificationDialog({
authenticityToken: this.options.authenticityToken,
notificationId: $target.data('id')
});
this.remove_notification_dialog.appendToBody();
+ this._bindRemoveNotificationDialog();
this.addView(this.remove_notification_dialog);
}
});
| 2 |
diff --git a/templates/customdashboard/publicdashboard/program_dashboard.html b/templates/customdashboard/publicdashboard/program_dashboard.html $(document).ready(() => {
$('#summaryTable').dataTable();
$('#indicatorSummary').dataTable();
+ $('#beneficiariesTable').dataTable();
+ $('#trainingsTable').dataTable();
+ $('#distributionsTable').dataTable();
})
</script>
<!-- End of Monitoring Contents -->
<!-- Monitoring contents -->
- <div class="sidebar-pane" id="monitoring">
- <h1 class="sidebar-header">
+ <div class="tab-pane" id="monitoring">
+ <h4 class="page-header">
Monitoring (Beneficiaries, Distributions & Trainings)
- </h1>
- <br />
- <div class="row">
+ </h4>
+
<div class="panel panel-info">
<div class="panel-heading">
<strong>Beneficiaries for {{ get_program.name }} </strong>
</div>
<div class="panel-body">
- <table class="table table-striped">
- {% if getBeneficiaries %}
+ <table class="table" id="beneficiariesTable">
+ <thead>
<tr>
<th>Date Created</th>
<th>Name</th>
<th>Age</th>
<th>Gender</th>
</tr>
- {% endif %} {% for item in getBeneficiaries %}
+ </thead>
+ <tbody>
+ {% for item in getBeneficiaries %}
<tr>
<td>{{ item.create_date | date }}</td>
<td>{{ item.beneficiary_name }}</td>
<td>{{ item.age }}</td>
<td>{{ item.gender }}</td>
</tr>
-
- {% empty %}
- <li class="list-group-item">No beneficiaries yet.</li>
{% endfor %}
+ </tbody>
</table>
</div>
</div>
- </div>
- <div class="row">
+
<div class="panel panel-info">
<div class="panel-heading">
<strong>Trainings for {{ get_program.name }} </strong>
</div>
<div class="panel-body">
- <table class="table table-striped">
- {% if getTrainings %}
+ <table class="table" id="trainingsTable">
+ <thead>
<tr>
- <th>Date Created</th>
<th>Name</th>
+ <th>Date Created</th>
</tr>
- {% endif %} {% for item in getTrainings %}
+ </thead>
+
+ <tbody>
+ {% for item in getTrainings %}
<tr>
- <td>{{ item.create_date | date }}</td>
<td>{{ item.training_name }}</td>
+ <td>{{ item.create_date | date }}</td>
</tr>
-
- {% empty %}
- <li class="list-group-item">No Training(s) yet.</li>
{% endfor %}
+ </tbody>
</table>
</div>
</div>
- </div>
- <div class="row">
+
<div class="panel panel-info">
<div class="panel-heading">
<strong>Distributions for {{ get_program.name }} </strong>
</div>
<div class="panel-body">
- <table class="table table-striped">
- {% if get_distributions %}
+ <table class="table" id="distributionsTable">
+ <thead>
<tr>
- <th>Date Created</th>
<th>Name</th>
+ <th>Date Created</th>
</tr>
- {% endif %} {% for item in get_distributions %}
+ </thead>
+ <tbody>
+ {% for item in get_distributions %}
<tr>
- <td>{{ item.create_date | date }}</td>
<td>{{ item.distribution_name }}</td>
+ <td>{{ item.create_date | date }}</td>
</tr>
-
- {% empty %}
- <li class="list-group-item">No Distribution(s) yet.</li>
{% endfor %}
+ </tbody>
</table>
</div>
</div>
</div>
- </div>
<!-- End of Monitoring Contents -->
<div class="sidebar-pane" id="i_surveys">
| 3 |
diff --git a/src/components/IOUConfirmationList.js b/src/components/IOUConfirmationList.js @@ -65,7 +65,7 @@ const propTypes = {
phoneNumber: PropTypes.string,
})).isRequired,
- /** Amount split belongs to group or not */
+ /** Whether this is an IOU split and belongs to a group report */
isGroupSplit: PropTypes.bool.isRequired,
...windowDimensionsPropTypes,
| 7 |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -177,6 +177,32 @@ which shows the baseline image, the generated image, the diff and the json mocks
To view the results of a run on CircleCI, download the `build/test_images/` and `build/test_images_diff/` artifacts into your local repo and then run `npm run start-image_viewer`.
+### Writing selection tests
+Keep in mind that the selection coordinates are relative to the top-left corner of the plot, including the margins. To produce a reliable selection test,
+it may be necessary to to fix the width, height, margins, X axis range and Y axis range of the plot. For example:
+
+```
+Plotly.newPlot(gd,
+ [
+ {
+ x: [1, 1, 1, 2, 2, 2, 3, 3, 3],
+ y: [1, 2, 3, 1, 2, 3, 1, 2, 3],
+ mode: 'markers'
+ }
+ ],
+ {
+ width: 400, height: 400,
+ margin: {l: 100, r: 100, t: 100, b: 100},
+ xaxis: {range: [0, 4]},
+ yaxis: {range: [0, 4]}
+ }
+)
+```
+
+This will produce the following plot, and you want to simulate a selection path of (175, 175) to (225, 225):
+
+<img src="https://user-images.githubusercontent.com/31989842/38889542-5303cf9c-427f-11e8-93a2-16ce2e29f521.png">
+
## Repo organization
| 0 |
diff --git a/src/components/App/index.js b/src/components/App/index.js @@ -25,7 +25,7 @@ function App(props) {
</StoryCard>
<StoryCard title="Introduction to Fire Stuff">
<p className="Description">
- Here are all things you don't know yet.
+ Here are all things you don't know yet.
</p>
</StoryCard>
<StoryCard title="Have a Map">
| 14 |
diff --git a/services/user.js b/services/user.js @@ -38,7 +38,7 @@ export const registerUser = ({ email, password, repeatPassword }) => {
logger.info('Register user');
return controlTowerAPI
.post(
- 'auth/sign-up',
+ `auth/sign-up?origin=${process.env.APPLICATIONS}`,
{
email,
password,
| 12 |
diff --git a/token-metadata/0xEb7355C2f217b3485a591332Fe13C8c5A76A581D/metadata.json b/token-metadata/0xEb7355C2f217b3485a591332Fe13C8c5A76A581D/metadata.json "symbol": "JT",
"address": "0xEb7355C2f217b3485a591332Fe13C8c5A76A581D",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/yarn.lock b/yarn.lock @@ -1754,13 +1754,13 @@ debug-log@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f"
-debug@2, [email protected], debug@^2.1.1, debug@^2.2.0:
+debug@2, [email protected]:
version "2.6.3"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d"
dependencies:
ms "0.7.2"
[email protected]:
[email protected], debug@^2.1.1, debug@^2.2.0:
version "2.4.5"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.4.5.tgz#34c7b12a1ca96674428f41fe92c49b4ce7cd0607"
dependencies:
@@ -3230,14 +3230,14 @@ js-tokens@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7"
[email protected]:
[email protected], js-yaml@^3.5.1:
version "3.8.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.1.tgz#782ba50200be7b9e5a8537001b7804db3ad02628"
dependencies:
argparse "^1.0.7"
esprima "^3.1.1"
-js-yaml@^3.5.1, js-yaml@~3.7.0:
+js-yaml@~3.7.0:
version "3.7.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80"
dependencies:
@@ -5463,14 +5463,10 @@ validate.js@^0.9.0:
version "0.9.0"
resolved "https://registry.yarnpkg.com/validate.js/-/validate.js-0.9.0.tgz#8acf0144f1520a19835c6cc663f45e0836aa56c8"
[email protected]:
[email protected], validator@^6.0.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/validator/-/validator-6.2.0.tgz#b2cccdc49ff0f4b8ee4e61dba2ddd3dde13f23e7"
-validator@^6.0.0:
- version "6.3.0"
- resolved "https://registry.yarnpkg.com/validator/-/validator-6.3.0.tgz#47ce23ed8d4eaddfa9d4b8ef0071b6cf1078d7c8"
-
value-equal@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.2.0.tgz#4f41c60a3fc011139a2ec3d3340a8998ae8b69c0"
@@ -5770,8 +5766,8 @@ z-schema@^3.17.0:
commander "^2.7.1"
zefir@beta:
- version "1.0.0-beta.18"
- resolved "https://registry.yarnpkg.com/zefir/-/zefir-1.0.0-beta.18.tgz#d288e9c1f2dc8d638beff0097ad1cd59a2e4c527"
+ version "1.0.0-beta.19"
+ resolved "https://registry.yarnpkg.com/zefir/-/zefir-1.0.0-beta.19.tgz#1c8655ab111b76245359ce9097ec7a1ec3739252"
dependencies:
babel-core "6.23.1"
babel-generator "6.22.0"
| 1 |
diff --git a/dangerfile.js b/dangerfile.js // eslint-disable-next-line import/no-extraneous-dependencies
import { danger, fail } from 'danger';
-const CHANGELOG_PATTERN = /^packages\/terra-([a-z-])*\/CHANGELOG\.md/i;
+const CHANGELOG_PATTERN = /^packages\/terra-([a-z-0-9])*\/CHANGELOG\.md/i;
const changedFiles = danger.git.created_files.concat(danger.git.modified_files);
| 11 |
diff --git a/js/zb.js b/js/zb.js @@ -24,6 +24,7 @@ module.exports = class zb extends Exchange {
'swap': undefined, // has but unimplemented
'future': undefined,
'option': undefined,
+ 'cancelAllOrders': true,
'cancelOrder': true,
'createMarketOrder': undefined,
'createOrder': true,
| 12 |
diff --git a/src/AvatarIcon.jsx b/src/AvatarIcon.jsx @@ -14,6 +14,7 @@ import styles from './AvatarIcon.module.css';
import { localPlayer } from '../players.js';
import { AvatarIconer } from '../avatar-iconer.js';
import cameraManager from '../camera-manager.js'
+import * as sounds from '../sounds.js'
const characterIconSize = 100;
const pixelRatio = window.devicePixelRatio;
@@ -52,10 +53,17 @@ const CharacterIcon = () => {
}, [canvasRef.current]);
return (
- <div className={classnames(
+ <div
+ className={classnames(
styles.characterIcon,
loaded ? styles.loaded : null,
- )}>
+ )}
+ onMouseEnter={e => {
+ const soundFiles = sounds.getSoundFiles();
+ const audioSpec = soundFiles.menuClick[Math.floor(Math.random() * soundFiles.menuClick.length)];
+ sounds.playSound(audioSpec);
+ }}
+ >
<div className={styles.main}>
<canvas
className={styles.canvas}
| 0 |
diff --git a/src/components/play-mode/hotbar/Hotbar.jsx b/src/components/play-mode/hotbar/Hotbar.jsx @@ -235,7 +235,7 @@ const fullscreenFragmentShader = `\
// gl_FragColor.gb = uv;
// gl_FragColor.a = 1.;
- s = texture2D(uTex, vUv);
+ s = texture2D(uTex, uv);
gl_FragColor = s;
} else {
s = vec4(0.);
| 4 |
diff --git a/.travis.yml b/.travis.yml @@ -5,22 +5,18 @@ node_js:
script:
- npm test
branches:
- # expected format: v1.0.0
on:
- - /^v\d+(\.\d+)+$/
+ - /^v\d+(\.\d+)+$/ # expected format: v1.0.0
- master
before_deploy:
- npm run build
- cd dist
- #- zip og-${TRAVIS_TAG}.zip *
+- zip ${TRAVIS_TAG}-dist.zip *
deploy:
provider: releases
token: $GITHUB_TOKEN
file_glob: true
- #file: og-${TRAVIS_TAG}.zip
- file:
- - "*.js"
- - "*.css"
+ file: ${TRAVIS_TAG}-dist.zip
skip_cleanup: true
on:
tags: true
\ No newline at end of file
| 0 |
diff --git a/src/content/glossary/index.md b/src/content/glossary/index.md @@ -123,14 +123,6 @@ A group of at least 128 [validators](#validator) assigned to beacon and shard bl
When numerous nodes (usually most nodes on the network) all have the same blocks in their locally validated best blockchain. Not to be confused with [consensus rules](#consensus-rules).
-### consensus client {consensus-client}
-
-After the merge to [proof-of-stake](#pos), consensus about the true head of the blockchain will be governed by a new set of clients running on the Beacon Chain known as "consensus clients". Consensus clients do not participate in validating transactions or executing state transitions. They request this to be done by [execution clients](#execution-client).
-
-### consensus layer {consensus-layer}
-
-Ethereum's consensus layer is the network of [consensus clients](#consensus-client).
-
### consensus rules {#consensus-rules}
The block validation rules that full nodes follow to stay in consensus with other nodes. Not to be confused with [consensus](#consensus).
@@ -257,14 +249,6 @@ The ENS registry is a single central [contract](#smart-contract) that provides a
In the context of cryptography, lack of predictability or level of randomness. When generating secret information, such as [private keys](#private-key), algorithms usually rely on a source of high entropy to ensure the output is unpredictable.
-### execution client {#execution-client}
-
-After the merge to [proof-of-stake](#pos), existing Ethereum Mainnet clients will continue to host the [Ethereum Virtual Machine](#evm), validate transactions and execute state transitions but will not participate in consensus. These clients will therefore be referred to as "execution clients".
-
-### execution layer
-
-Ethereum's execution layer is the network of [execution clients](#execution-client).
-
### externally owned account (EOA) {#eoa}
An [account](#account) created by or for human users of the Ethereum network.
| 13 |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md # Contribute
-## What to Contribute:
+## What to Contribute
Contributions to the sketch library and sketchlibs are welcome.
Code that can be reused across multiple sketches should be placed in sketchlibs.
@@ -11,7 +11,7 @@ Chalktalk is an educational platform and performance language capable of visuall
Current development for Chalktalk content will focus on building sketches that belong to certain domains of knowledge. (e.g. mathematics, architecture, audio engineering, sound design, VR, art, computer graphics, computer science, chemistry, cooking, etc.) Sketches should interact with each other as part of a larger ecosystem.
We encourage creativity and are excited to see contributions going beyond the current library.
-## How to Contribute:
+## How to Contribute
Formatting and Style:
- 3 space indents, terminate statements with semicolons. Best to use braces for if/else/while/etc. for clarity.
| 2 |
diff --git a/aws/cloudwatch/structured_metric.go b/aws/cloudwatch/structured_metric.go @@ -126,6 +126,15 @@ func (em *EmbeddedMetric) NewMetricDirective(namespace string) *MetricDirective
// Publish the metric to the logfile
func (em *EmbeddedMetric) Publish(additionalProperties map[string]interface{}) {
+ // BEGIN - Preconditions
+ for _, eachDirective := range em.metrics {
+ // Precondition...
+ if len(eachDirective.Dimensions) > 9 {
+ fmt.Printf("DimensionSet for structured metric must not have more than 9 elements. Count: %d",
+ len(eachDirective.Dimensions))
+ }
+ }
+ // END - Preconditions
em.properties = additionalProperties
rawJSON, rawJSONErr := json.Marshal(em)
if rawJSONErr == nil {
| 0 |
diff --git a/src/core/ChefWorker.js b/src/core/ChefWorker.js @@ -37,6 +37,10 @@ self.postMessage({
/**
* Respond to message from parent thread.
*
+ * An inputNum only needs to be sent when baking.
+ * (The background ChefWorker doesn't send one, but as
+ * it only deals with one input at a time it isn't needed)
+ *
* Messages should have the following format:
* {
* action: "bake" | "silentBake",
@@ -45,7 +49,8 @@ self.postMessage({
* recipeConfig: {[Object]},
* options: {Object},
* progress: {number},
- * step: {boolean}
+ * step: {boolean},
+ * inputNum: {number} | undefined
* } | undefined
* }
*/
@@ -94,7 +99,7 @@ async function bake(data) {
// Ensure the relevant modules are loaded
self.loadRequiredModules(data.recipeConfig);
try {
- self.inputNum = parseInt(data.inputNum, 10);
+ self.inputNum = data.inputNum;
const response = await self.chef.bake(
data.input, // The user's input
data.recipeConfig, // The configuration of the recipe
@@ -103,16 +108,7 @@ async function bake(data) {
data.step // Whether or not to take one step or execute the whole recipe
);
- if (data.input instanceof ArrayBuffer) {
- self.postMessage({
- action: "bakeComplete",
- data: Object.assign(response, {
- id: data.id,
- inputNum: data.inputNum,
- bakeId: data.bakeId
- })
- }, [data.input]);
- } else {
+ const transferable = (data.input instanceof ArrayBuffer) ? [data.input] : undefined;
self.postMessage({
action: "bakeComplete",
data: Object.assign(response, {
@@ -120,8 +116,8 @@ async function bake(data) {
inputNum: data.inputNum,
bakeId: data.bakeId
})
- });
- }
+ }, transferable);
+
} catch (err) {
self.postMessage({
action: "bakeError",
@@ -154,24 +150,14 @@ function silentBake(data) {
*/
async function getDishAs(data) {
const value = await self.chef.getDishAs(data.dish, data.type);
-
- if (data.type === "ArrayBuffer") {
- self.postMessage({
- action: "dishReturned",
- data: {
- value: value,
- id: data.id
- }
- }, [value]);
- } else {
+ const transferable = (data.type === "ArrayBuffer") ? [value] : undefined;
self.postMessage({
action: "dishReturned",
data: {
value: value,
id: data.id
}
- });
- }
+ }, transferable);
}
@@ -223,7 +209,7 @@ self.sendStatusMessage = function(msg) {
action: "statusMessage",
data: {
message: msg,
- inputNum: self.inputNum || -1
+ inputNum: self.inputNum
}
});
};
| 0 |
diff --git a/src/module/item/item.js b/src/module/item/item.js @@ -300,6 +300,9 @@ export class ItemSFRPG extends Mix(Item).with(ItemActivationMixin, ItemCapacityM
chatData["whisper"] = ChatMessage.getWhisperRecipients(game.user.name);
}
+ // Allow context menu popouts
+ chatData["flags.core.canPopout"] = true;
+
// Create the chat message
return ChatMessage.create(chatData, { displaySheet: false });
}
| 11 |
diff --git a/src/api-gateway/authMatchPolicyResource.js b/src/api-gateway/authMatchPolicyResource.js @@ -21,6 +21,10 @@ export default function authMatchPolicyResource(policyResource, resource) {
return true
}
+ if (policyResource === 'arn:aws:execute-api:*:*:*') {
+ return true
+ }
+
if (policyResource.includes('*') || policyResource.includes('?')) {
// Policy contains a wildcard resource
| 0 |
diff --git a/lib/fetching/content-services/crowd-tangle-content-service.js b/lib/fetching/content-services/crowd-tangle-content-service.js @@ -115,7 +115,7 @@ CrowdTangleContentService.prototype._parse = function(data) {
var text = data.message || data.description || data.title || data.caption || "[No Content]"; //??? need to revisit, what if there is no text? what about youtube case
//check for encoding. TODO: verify if the current language is Burmese
- if(this.zawgyiDetector.getZawgyiProbability(text) >= 0.9){
+ if(this.zawgyiDetector.getZawgyiProbability(text) >= config.get().zawgyiProb){
text = this.zawgyiConvertor.zawgyiToUnicode(text);
}
| 14 |
diff --git a/packages/pg/lib/client.js b/packages/pg/lib/client.js @@ -248,7 +248,7 @@ class Client extends EventEmitter {
this._checkPgPass(() => {
this.saslSession = sasl.startSession(msg.mechanisms)
const con = this.connection
- con.sendSASLInitialResponseMessage(saslSession.mechanism, saslSession.response)
+ con.sendSASLInitialResponseMessage(this.saslSession.mechanism, this.saslSession.response)
})
}
| 1 |
diff --git a/src/core/operations/RemoveLetterAccents.mjs b/src/core/operations/RemoveLetterAccents.mjs @@ -46,9 +46,8 @@ class RemoveLetterAccents extends Operation {
* @returns {string}
*/
run(input, args) {
- // const [firstArg, secondArg] = args;
-
- throw new OperationError("Test");
+ return input.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
+ //reference: https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript/37511463
}
}
| 0 |
diff --git a/web/src/Main.js b/web/src/Main.js @@ -35,12 +35,16 @@ export default () => {
}
});
const { getActiveColorOrFallback } = useContext(ThemeContext);
+ const backgroundColor = getActiveColorOrFallback(['shade0'], true);
+ useEffect(() => {
+ window.document.body.style.backgroundColor = backgroundColor;
+ }, [ backgroundColor ]);
return (
<div
className={ `${styles.app} ${keyboarding ? styles.keyboarding : ''}` }
style={{
- backgroundColor: getActiveColorOrFallback(['shade0'], true),
- '--selection-foreground-color': getActiveColorOrFallback(['shade0'], true),
+ backgroundColor,
+ '--selection-foreground-color': backgroundColor,
'--selection-background-color': getActiveColorOrFallback(['accent5']),
'--focus-outline-color': getActiveColorOrFallback(['accent6']),
}}
| 12 |
diff --git a/src/components/dashboard/SendLinkSummary.js b/src/components/dashboard/SendLinkSummary.js // @flow
import React from 'react'
-import { View, Linking } from 'react-native'
-import { Text } from 'react-native-elements'
+import { View } from 'react-native'
+
+import UserStorage, { type TransactionEvent } from '../../lib/gundb/UserStorage'
+import logger from '../../lib/logger/pino-logger'
+import GDStore from '../../lib/undux/GDStore'
import { useWrappedGoodWallet } from '../../lib/wallet/useWrappedWallet'
-import { type TransactionEvent } from '../../lib/gundb/UserStorage'
-import UserStorage from '../../lib/gundb/UserStorage'
-import { Section, Wrapper, Avatar, BigGoodDollar, CustomButton, CustomDialog } from '../common'
-import { BackButton, PushButton, useScreenState } from '../appNavigation/stackNavigation'
-import { receiveStyles } from './styles'
+import { BackButton, useScreenState } from '../appNavigation/stackNavigation'
+import { Avatar, BigGoodDollar, CustomButton, Section, Wrapper } from '../common'
import TopBar from '../common/TopBar'
-import { useWrappedApi } from '../../lib/API/useWrappedApi'
-import isEmail from 'validator/lib/isEmail'
-import isMobilePhone from '../../lib/validators/isMobilePhone'
-import GDStore from '../../lib/undux/GDStore'
-import logger from '../../lib/logger/pino-logger'
-import wrapper from '../../lib/undux/utils/wrapper'
+import { receiveStyles } from './styles'
const log = logger.child({ from: 'SendLinkSummary' })
@@ -31,36 +26,9 @@ const SendLinkSummary = (props: AmountProps) => {
const goodWallet = useWrappedGoodWallet()
const store = GDStore.useStore()
const { loading } = store.get('currentScreen')
- const API = useWrappedApi()
const { amount, reason, to } = screenState
- /**
- * Send link via SMS or Email
- *
- * @param {string} to - Email address or phone number
- * @param {string} sendLink - Link
- * @returns JSON Object with ok if email or sms has been sent
- * @throws Error with invalid email/phone
- */
- const generateHrefLink = (to: string, sendLink: string) => {
- const text = `You got GD. To withdraw open: ${sendLink}`
-
- if (!to) return
-
- // Send email if to is email
- if (isEmail(to)) {
- return `mailto:${to}?subject=Sending GD via Good Dollar App&body=${text}`
- }
-
- // Send sms if to is phone
- if (isMobilePhone(to)) {
- return `sms:${to}?body=${text}`
- }
-
- throw new Error(`${to} is neither a valid phone or email`)
- }
-
/**
* Generates link to send and call send email/sms action
* @throws Error if link cannot be send
@@ -89,11 +57,9 @@ const SendLinkSummary = (props: AmountProps) => {
if (generateLinkResponse) {
try {
// Generate link deposit
- const { sendLink, receipt } = generateLinkResponse
- const hrefLink = generateHrefLink(to, sendLink)
- log.debug({ sendLink, receipt })
+ const { sendLink } = generateLinkResponse
// Show confirmation
- screenProps.push('SendConfirmation', { sendLink, amount, reason, hrefLink })
+ screenProps.push('SendConfirmation', { sendLink, amount, reason, to })
} catch (e) {
const { hashedString } = generateLinkResponse
await goodWallet.cancelOtl(hashedString)
| 2 |
diff --git a/test/client/Query.test.tsx b/test/client/Query.test.tsx @@ -729,7 +729,7 @@ describe('Query component', () => {
},
];
- const onError = (queryError: ApolloError) => {
+ const onErrorFunc = (queryError: ApolloError) => {
expect(queryError).toEqual(null);
done();
};
@@ -737,7 +737,7 @@ describe('Query component', () => {
const onError = jest.fn();
const Component = () => (
- <Query query={allPeopleQuery} onError={onError}>
+ <Query query={allPeopleQuery} onError={onErrorFunc}>
{({ loading }) => {
if (!loading) {
expect(onError).not.toHaveBeenCalled();
@@ -842,13 +842,13 @@ describe('Query component', () => {
},
];
- const onError = (queryError: ApolloError) => {
+ const onErrorFunc = (queryError: ApolloError) => {
expect(queryError.networkError).toEqual(error);
done();
};
const Component = () => (
- <Query query={allPeopleQuery} onError={onError}>
+ <Query query={allPeopleQuery} onError={onErrorFunc}>
{() => {
return null;
}}
| 10 |
diff --git a/lib/plugins/platform/platform.js b/lib/plugins/platform/platform.js @@ -366,6 +366,9 @@ class Platform {
}
}
subscription.event = event.stream;
+ if (typeof event.stream === 'object') {
+ subscription.event.arn = JSON.stringify(event.stream.arn);
+ }
} else if (Object.keys(event)[0] === 's3') {
subscription = this.getS3Subscription(event.s3, fn);
} else if (Object.keys(event)[0] === 'schedule') {
| 1 |
diff --git a/src/Header.jsx b/src/Header.jsx @@ -292,7 +292,8 @@ export default function Header() {
if (!world.isConnected() && rigManager.localRig) {
await world.connectRoom(
window.location.protocol + '//' + window.location.host + ':' +
- ((window.location.port ? parseInt(window.location.port, 10) : (window.location.protocol === 'https:' ? 443 : 80)) + 1)
+ ((window.location.port ? parseInt(window.location.port, 10) : (window.location.protocol === 'https:' ? 443 : 80)) + 1) + '/' +
+ roomName
);
setConnected(world.isConnected());
} else {
| 0 |
diff --git a/src/server/models/tag.js b/src/server/models/tag.js -module.exports = function(crowi) {
- var debug = require('debug')('growi:models:tag'),
- mongoose = require('mongoose'),
- ObjectId = mongoose.Schema.Types.ObjectId,
- USER_PUBLIC_FIELDS = '_id name',
- tagSchema;
+const mongoose = require('mongoose');
+const mongoosePaginate = require('mongoose-paginate');
+const ObjectId = mongoose.Schema.Types.ObjectId;
- tagSchema = new mongoose.Schema({
+/*
+ * define schema
+ */
+const schema = new mongoose.Schema({
name: {
type: String,
required: true
},
});
+schema.plugin(mongoosePaginate);
+
+/**
+ * Tag Class
+ *
+ * @class Tag
+ */
+class Tag {
+}
- return mongoose.model('Tag', tagSchema);
+module.exports = function(crowi) {
+ Tag.crowi = crowi;
+ schema.loadClass(Tag);
+ const model = mongoose.model('Tag', schema);
+ return model;
};
| 14 |
diff --git a/src/cmd/cloud.js b/src/cmd/cloud.js @@ -132,9 +132,10 @@ class CloudCommand {
return this._flashKnownApp({ api, deviceId, filePath: files[0] });
}
- const version = target === 'latest' ? null : target;
- if (version) {
- console.log('Targeting version: ', version);
+ const targetVersion = target === 'latest' ? null : target;
+
+ if (targetVersion) {
+ console.log('Targeting version: ', targetVersion);
console.log();
}
@@ -155,7 +156,7 @@ class CloudCommand {
}
}
- return this._doFlash({ api, deviceId, fileMapping, version });
+ return this._doFlash({ api, deviceId, fileMapping, targetVersion });
});
}).catch((err) => {
throw new VError(ensureError(err), 'Flash device failed');
| 10 |
diff --git a/Multi-Period-Daily/User.Bot.js b/Multi-Period-Daily/User.Bot.js logger.write(MODULE_NAME, "[INFO] Entering function 'start'");
}
- let nextIntervalExecution = false; // This tell weather the Interval module will be executed again or not. By default it will not unless some hole have been found in the current execution.
- let nextIntervalLapse; // With this we can request the next execution wait time.
-
- let periods =
- '[' +
- '[' + 45 * 60 * 1000 + ',' + '"45-min"' + ']' + ',' +
- '[' + 40 * 60 * 1000 + ',' + '"40-min"' + ']' + ',' +
- '[' + 30 * 60 * 1000 + ',' + '"30-min"' + ']' + ',' +
- '[' + 20 * 60 * 1000 + ',' + '"20-min"' + ']' + ',' +
- '[' + 15 * 60 * 1000 + ',' + '"15-min"' + ']' + ',' +
- '[' + 10 * 60 * 1000 + ',' + '"10-min"' + ']' + ',' +
- '[' + 05 * 60 * 1000 + ',' + '"05-min"' + ']' + ',' +
- '[' + 04 * 60 * 1000 + ',' + '"04-min"' + ']' + ',' +
- '[' + 03 * 60 * 1000 + ',' + '"03-min"' + ']' + ',' +
- '[' + 02 * 60 * 1000 + ',' + '"02-min"' + ']' + ',' +
- '[' + 01 * 60 * 1000 + ',' + '"01-min"' + ']' + ']';
-
- const outputPeriods = JSON.parse(periods);
-
/* One of the challenges of this process is that each imput file contains one day of candles. So if a stair spans more than one day
then we dont want to break the stais in two pieces. What we do is that we read to candles files at the time and record at the current
date all stairs of the day plus the ones thas spans to the second day without bigining at the second day. Then when we process the next
let lastEndValues = [];
- for (let i = 0; i < outputPeriods.length; i++) {
+ for (let i = 0; i < global.dailyFilePeriods.length; i++) {
let lastEndValuesItem = {
- timePeriod: outputPeriods[i][1],
+ timePeriod: global.dailyFilePeriods[i][1],
candleStairEnd: undefined,
volumeBuyEnd: undefined,
volumeSellEnd: undefined
let currentEndValues = [];
- for (let i = 0; i < outputPeriods.length; i++) {
+ for (let i = 0; i < global.dailyFilePeriods.length; i++) {
let currentEndValuesItem = {
- timePeriod: outputPeriods[i][1],
+ timePeriod: global.dailyFilePeriods[i][1],
candleStairEnd: undefined,
volumeBuyEnd: undefined,
volumeSellEnd: undefined
function loopBody() {
- const timePeriod = outputPeriods[n][1];
+ const timePeriod = global.dailyFilePeriods[n][1];
processCandles();
n++;
- if (n < outputPeriods.length) {
+ if (n < global.dailyFilePeriods.length) {
loopBody();
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] start -> writeDataRanges -> Entering function."); }
- writeDataRange(contextVariables.firstTradeFile, contextVariables.lastCandleFile, CANDLES_STAIRS_FOLDER_NAME, onCandlesStairsDataRangeWritten);
+ writeDataRange(contextVariables.firstTradeFile, contextVariables.lastCandleFile, CANDLE_STAIRS_FOLDER_NAME, onCandlesStairsDataRangeWritten);
function onCandlesStairsDataRangeWritten(err) {
| 4 |
diff --git a/appveyor.yml b/appveyor.yml version: '{build}'
environment:
+ global:
+ APPVEYOR_BUILD_SYS: MSYS2
+
+ # Executables from within Windows:
+ WIN_SHELL: C:\msys64\usr\bin\bash
+ WIN_MAKE: C:\msys64\usr\bin\make
+ WIN_SETUP: C:\msys64\usr\bin\bash
+
+ # Executables from within MSYS2:
+ SHELL: /usr/bin/bash
+ MAKE: /usr/bin/make
+ SETUP: /usr/bin/bash
+
+ # Compilers:
+ CC: /c/msys64/mingw64/bin/gcc
+ C_COMPILER: /c/msys64/mingw64/bin/gcc
+ CXX: /c/msys64/mingw64/bin/g++
+ CXX_COMPILER: /c/msys64/mingw64/bin/g++
+ FC: /c/msys64/mingw64/bin/gfortran
+ FORTRAN_COMPILER: /c/msys64/mingw64/bin/gfortran
+ LINKER: /c/msys64/mingw64/bin/gfortran
+
matrix:
# Unit tests:
- nodejs_version: '7'
@@ -143,39 +165,37 @@ install:
# Install node module dependencies:
- cmd: npm install || type npm-debug.log
+ # Remove [MinGW][1], a minimalist GNU for Windows, from the path. This version is old and no longer maintained. To generate builds with modern tool chains, need to use an alternative.
+ #
+ # [1]: http://www.mingw.org/
+ - cmd: set PATH=%PATH:C:\MinGW\bin;=%
+
+ # In order to run `make` commands and perform compilation steps, we can use [MSYS2][1], an independent rewrite of [MSYS][2] based on modern Cygwin (POSIX compatibility layer) and [MinGW-w64][3], by adding the application folder to the `PATH` variable.
+ #
+ # [1]: https://msys2.github.io/
+ # [2]: http://www.mingw.org/wiki/MSYS
+ # [3]: https://mingw-w64.org/doku.php
+ - cmd: set PATH=C:\msys64\usr\bin;C:\msys64\mingw64\bin;%PATH%
+
build_script:
# If a newer build is queued for the same PR, cancel the current build:
- ps: 'if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `throw "Canceling the current build as newer builds are queued for this pull request." }'
-before_test:
- # In order to run `make` commands, we can use [MinGW][1], a minimalist GNU for Windows, by adding the application folder to the `PATH` variable. For a reference configuration, see [utf8proc][2] and [julia][3].
- #
- # [1]: http://www.mingw.org/
- # [2]: http://fossies.org/linux/utf8proc/appveyor.yml
- # [3]: https://github.com/JuliaLang/julia/blob/master/appveyor.yml
- - cmd: set PATH=C:\MinGW\bin;%PATH%
-
-
test_script:
# Print debug info:
- cmd: git --version
- cmd: node --version
- cmd: npm --version
- # Rely on [MSYS][1], a collection of GNU utilities including `make`, being installed in a `1.0` directory.
- #
- # [1]: http://www.mingw.org/wiki/MSYS
- - cmd: 'C:\MinGW\msys\1.0\bin\sh --login -c " /c/projects/stdlib/tools/ci/appveyor/script $BUILD_TASK"'
+ # Run tests:
+ - cmd: '%WIN_SHELL% "/c/projects/stdlib/tools/ci/appveyor/script $BUILD_TASK"'
# Scripts run after a build success or failure:
on_finish:
- # Rely on [MSYS][1], a collection of GNU utilities including `make`, being installed in a `1.0` directory.
- #
- # [1]: http://www.mingw.org/wiki/MSYS
- - cmd: 'C:\MinGW\msys\1.0\bin\sh --login -c " /c/projects/stdlib/tools/ci/appveyor/on_finish"'
+ - cmd: '%WIN_SHELL% /c/projects/stdlib/tools/ci/appveyor/on_finish'
notifications:
| 14 |
diff --git a/extensions/single-file-stac/json-schema/schema.json b/extensions/single-file-stac/json-schema/schema.json "description": "Single File STAC Extension to combine Collections and Items in single file catalog",
"allOf": [
{
-<<<<<<< HEAD
"$ref": "../../catalog-spec/json-schema/catalog.json"
},
{
-=======
->>>>>>> 99aa7da2760462aac1d304af8af5c303f9287173
"$ref": "https://geojson.org/schema/FeatureCollection.json"
},
{
| 0 |
diff --git a/server/dump.js b/server/dump.js @@ -458,7 +458,7 @@ var ScopeInfo = function(scope) {
* Map of variable name -> dump status.
* @private @const {!Object<string, Do>}
*/
- this.done_ = Object.create(null);
+ this.doneVar_ = Object.create(null);
};
/**
@@ -513,7 +513,7 @@ ScopeInfo.prototype.getDone = function(part) {
if (typeof part !== 'string') {
throw new TypeError('Invalid part (not a variable name)');
}
- return this.done_[part] || Do.UNSTARTED;
+ return this.doneVar_[part] || Do.UNSTARTED;
};
/**
@@ -528,7 +528,7 @@ ScopeInfo.prototype.setDone = function(part, done) {
} else if (done < this.getDone(part)) {
throw new RangeError('Undoing previous variable binding??');
}
- this.done_[part] = done;
+ this.doneVar_[part] = done;
};
/**
@@ -541,8 +541,12 @@ var ObjectInfo = function(dumper, obj) {
this.obj = obj;
/** @type {!Selector|undefined} Reference to this object, once created. */
this.ref = undefined;
+ /** @type {!Do} Has prototype been set? */
+ this.doneProto = Do.DECL; // Never need to 'declare' the [[Prototype]] slot!
+ /** @type {!Do} Has owner been set? */
+ this.doneOwner = Do.DECL; // Never need to 'declare' that object has owner!
/** @type {!Object<string, Do>} Map of property name -> dump status. */
- this.done_ = Object.create(null);
+ this.doneProp_ = Object.create(null);
/**
* Map of property name -> property descriptor, where property
* descriptor is a map of attribute names (writable, enumerable,
@@ -551,10 +555,6 @@ var ObjectInfo = function(dumper, obj) {
* @type {!Object<string, !Object<string, boolean>>}
*/
this.attributes = Object.create(null);
- /** @type {!Do} Has prototype been set? */
- this.doneProto = Do.DECL; // Never need to 'declare' the [[Prototype]] slot!
- /** @type {!Do} Has owner been set? */
- this.doneOwner = Do.DECL; // Never need to 'declare' that object has owner!
};
/**
@@ -709,7 +709,7 @@ ObjectInfo.prototype.getDone = function(part) {
if (part === Selector.PROTOTYPE) {
return this.doneProto;
} else if (typeof part === 'string') {
- return this.done_[part] || Do.UNSTARTED;
+ return this.doneProp_[part] || Do.UNSTARTED;
} else {
throw new TypeError('Invalid part');
}
@@ -729,7 +729,7 @@ ObjectInfo.prototype.setDone = function(part, done) {
}
this.doneProto = done;
} else if (typeof part === 'string') {
- var old = this.done_[part];
+ var old = this.doneProp_[part];
if (done < old) {
throw new RangeError("Can't undo work on " + part);
} else if(done === old && done < Do.RECURSE) {
@@ -743,7 +743,7 @@ ObjectInfo.prototype.setDone = function(part, done) {
!this.attributes[part]['writable']) {
throw new Error('Property ' + part + ' made immutable too early');
}
- this.done_[part] = done;
+ this.doneProp_[part] = done;
} else {
throw new TypeError('Invalid part');
}
| 10 |
diff --git a/docs/cypress-testing-library/intro.md b/docs/cypress-testing-library/intro.md @@ -29,7 +29,7 @@ and `queryAllBy` commands.
## Examples
To show some simple examples (from
-[https://github.com/kentcdodds/cypress-testing-library/blob/master/cypress/integration/commands.spec.js](cypress/integration/commands.spec.js)):
+[https://github.com/kentcdodds/cypress-testing-library/blob/master/cypress/integration/commands.spec.js](https://github.com/kentcdodds/cypress-testing-library/blob/master/cypress/integration/commands.spec.js)):
```javascript
cy.getAllByText('Jackie Chan').click()
| 1 |
diff --git a/package.json b/package.json "bootstrap-switch": "^3.3.4",
"crypto-api": "^0.6.2",
"crypto-js": "^3.1.9-1",
+ "d3": "^4.9.1",
+ "d3-hexbin": "^0.2.2",
"diff": "^3.2.0",
"escodegen": "^1.8.1",
"esmangle": "^1.0.1",
| 0 |
diff --git a/protocols/peer/contracts/Peer.sol b/protocols/peer/contracts/Peer.sol @@ -176,8 +176,8 @@ contract Peer is IPeer, Ownable {
* @notice Get a Maximum Quote from the Peer
* @param _quoteTakerToken address The address of an ERC-20 token the peer would send
* @param _quoteMakerToken address The address of an ERC-20 token the consumer would send
- * @return uint256 The amount the Peer would send
- * @return uint256 The amount the Consumer would send
+ * @return uint256 quoteTakerParam The amount the peer would send
+ * @return uint256 quoteMakerParam The amount the consumer would send
*/
function getMaxQuote(
address _quoteTakerToken,
| 3 |
diff --git a/packages/@uppy/aws-s3-multipart/types/index.d.ts b/packages/@uppy/aws-s3-multipart/types/index.d.ts @@ -11,6 +11,7 @@ export interface AwsS3Part {
interface AwsS3MultipartOptions extends PluginOptions {
companionHeaders?: { [type: string]: string }
companionUrl?: string
+ companionCookiesRule?: string
getChunkSize?: (file: UppyFile) => number
createMultipartUpload?: (
file: UppyFile
| 0 |
diff --git a/kamu/common_settings.py b/kamu/common_settings.py @@ -70,7 +70,8 @@ USE_TZ = True
STATIC_URL = '/static/'
STATICFILES_DIRS = [
- os.path.join(BASE_DIR, 'assets/'),
+ os.path.join(BASE_DIR, 'assets'),
+ os.path.join(BASE_DIR, 'public')
]
WEBPACK_LOADER = {
| 0 |
diff --git a/test/jasmine/tests/legend_test.js b/test/jasmine/tests/legend_test.js @@ -1029,7 +1029,7 @@ describe('legend interaction', function() {
});
});
- describe('visible toggle', function() {
+ describe('@flaky visible toggle', function() {
var gd;
beforeEach(function() {
| 0 |
diff --git a/examples/radio-group/stories.jsx b/examples/radio-group/stories.jsx import React from 'react';
import PropTypes from 'prop-types';
-import { storiesOf, action } from '@kadira/storybook';
+import { storiesOf, action } from '@storybook/react';
import { shape } from 'airbnb-prop-types';
import RadioGroup from '../../components/radio-group';
@@ -37,7 +37,7 @@ class RadioGroupExample extends React.Component {
disabled={this.props.disabled}
required={this.props.required}
>
- {values.map((value) =>
+ {values.map((value) => (
<Radio
key={value}
id={value}
@@ -45,12 +45,12 @@ class RadioGroupExample extends React.Component {
value={value}
checked={this.state.checked === value}
variant="base"
- />)}
+ />
+ ))}
</RadioGroup>
</div>
);
}
-
}
RadioGroupExample.propTypes = {
@@ -73,4 +73,3 @@ storiesOf(RADIO_GROUP, module)
.add('Disabled', () => <RadioGroupExample heading="Disabled" disabled />)
.add('Required', () => <RadioGroupExample heading="Required" required />)
.add('Error', () => <RadioGroupExample heading="Error" labels={{ label: 'Radio Group Label', error: 'There is an error' }} />);
-
| 3 |
diff --git a/docs/api/vast-tracker.md b/docs/api/vast-tracker.md @@ -139,7 +139,7 @@ Macros will be replaced and the skip tracking URL will be called with the follow
### error(macros, isCustomCode)
Send a request to the URI provided by the VAST <Error> element. `macros` is an optional Object containing macros and their values to be used and replaced in the tracking calls.
-Pass `isCustomCode` as true in order to use any value. If false or no value is passed, the macro will be replaced using `errorCode` only if the code is a number between 100 and 999 (see <https://gist.github.com/rhumlover/5747417>). Otherwise 900 will be used.
+Pass `isCustomCode` as true in order to use any value, `isCustomCode` and its value are related to the[ERRORCODE] macro. If no [ERRORCODE] macro is provided, `isCustomCode`, has no purpose. If false or no value is passed, the macro will be replaced using `errorCode` only if the code is a number between 100 and 999 (see <https://gist.github.com/rhumlover/5747417>). Otherwise 900 will be used.
#### Parameters
| 0 |
diff --git a/src/parsers/GmlExtLambda.hx b/src/parsers/GmlExtLambda.hx @@ -69,12 +69,12 @@ class GmlExtLambda {
static var rxLambdaArgsSp = new RegExp("^([ \t]*)([\\s\\S]*)([ \t]*)$");
static var rxLambdaPre = new RegExp("^"
+ "(?:///.*\r?\n)?"
- + "(//!#lambda" // -> has meta?
- + "([ \t]*)(\\$|\\w+)" // -> namePre, name
- + "([ \t]*)(?:\\(([ \t]*)\\$([ \t]*)\\))?" // -> argsPre, args0, args1
+ + "(//!#lambda" // -> 1: has meta?
+ + "([ \t]*)(\\$|\\w+)" // -> 2: namePre, 3: name
+ + "([ \t]*)(?:\\(([ \t]*)\\$([ \t]*)\\))?" // -> 4: argsPre, 5: args0, 6: args1
+ ".*\r?\n)"
- + "(?:#args\\b[ \t]*(.+)\r?\n)?" // -> argsData
- + "([ \t]*\\{[\\s\\S]*)$");
+ + "(?:#args\\b[ \t]*(.+)\r?\n)?" // -> 7: argsData
+ + "([\\s\\S]*)$");
static var rxLambdaDef = new RegExp("^/\\*!#lamdef (\\w+)\\*/");
//
public static function preImpl(code:String, data:GmlExtLambdaPre) {
@@ -106,6 +106,7 @@ class GmlExtLambda {
// form the magic code:
flush(p);
var laName = mt[3];
+ if (mt[5] != null && mt[7] == null) mt[7] = "";
var laArgs = (mt[7] != null ? "(" + mt[5] + mt[7] + mt[6] + ")" : "");
if (laName != "$") {
scope.remap.set(s, laName);
@@ -224,7 +225,7 @@ class GmlExtLambda {
//
function proc():String {
var p0 = q.pos;
- q.skipSpaces0();
+ q.skipSpaces1();
var p:Int;
var laName = null;
var laNamePre = "";
@@ -233,14 +234,17 @@ class GmlExtLambda {
p = q.pos;
q.skipIdent1();
laNamePre = q.substring(p0, p);
+ if (laNamePre.contains("\n")) {
+ return error("You can't have a linebreak between #lambda and name");
+ }
laName = q.substring(p, q.pos);
p0 = q.pos;
- q.skipSpaces0();
+ q.skipSpaces1();
}
//
var laArgs = null;
var laArgsPre = "";
- if (q.peek() == "(".code) {
+ if (q.peek() == "(".code) { // parse (args)
p = q.pos + 1;
var depth = 0;
while (q.loop) {
@@ -263,11 +267,20 @@ class GmlExtLambda {
laArgs = q.substring(p, q.pos);
q.skip();
p0 = q.pos;
- q.skipSpaces0();
+ q.skipSpaces1();
} else return error("Expected a closing `)`");
}
//
- if (q.peek() == "{".code) {
+ if (q.peek() != "{".code) {
+ var opts = ["{code}"];
+ if (laName != null) opts.push("name");
+ if (laArgs != null) opts.push("(args)");
+ if (opts.length > 1) {
+ var optl = opts.pop();
+ return error('Expected a ${opts.join(", ")} or $optl.');
+ } else return error('Expected a ${opts[0]}.');
+ }
+ else { // ok, we now parse the code block
p = q.pos + 1;
var depth = 0;
while (q.loop) {
@@ -291,8 +304,10 @@ class GmlExtLambda {
var laArgsMt, laArgsDoc;
if (laArgs != null) {
laArgsMt = rxLambdaArgsSp.exec(laArgs);
+ if (laArgsMt[2] != "") {
laCode = '#args $laArgs\n' + laCode;
laCode = GmlExtArgs.post(laCode);
+ }
laArgsDoc = laArgs;
if (laCode == null) return error("Arguments error:\n" + GmlExtArgs.errorText);
} else {
@@ -334,14 +349,6 @@ class GmlExtLambda {
list1.push(laFull);
map1.set(laFull, laCode);
return laFull;
- } else {
- var opts = ["{code}"];
- if (laName != null) opts.push("name");
- if (laArgs != null) opts.push("(args)");
- if (opts.length > 1) {
- var optl = opts.pop();
- return error('Expected a ${opts.join(", ")} or $optl.');
- } else return error('Expected a ${opts[0]}.');
}
}
//
| 11 |
diff --git a/nerdamer.core.js b/nerdamer.core.js @@ -960,6 +960,9 @@ var nerdamer = (function(imports) {
csc: function(x) { return 1/Math.sin(x); },
sec: function(x) { return 1/Math.cos(x); },
cot: function(x) { return 1/Math.tan(x); },
+ acsc: function(x) { return Math.asin(1/x); },
+ asec: function(x) { return Math.acos(1/x); },
+ acot: function(x) { return (Math.PI / 2) - Math.atan(x)},
// https://gist.github.com/jiggzson/df0e9ae8b3b06ff3d8dc2aa062853bd8
erf: function(x) {
var t = 1/(1+0.5*Math.abs(x));
@@ -4189,25 +4192,15 @@ var nerdamer = (function(imports) {
return _.symfunction('acsc', arguments);
},
acot: function(symbol) {
- var retval;
if(Settings.PARSE2NUMBER) {
- if(symbol.isImaginary()) {
- retval = complex.evaluate(symbol, 'acot');
- }
- else {
- var k = _.parse('pi/2');
- if(symbol.equals(0))
- retval = k;
- else {
- if(symbol.lessThan(0))
- k.negate();
- retval = _.subtract(k, trig.atan(symbol));
- }
+ if(symbol.isConstant()) {
+ return new _.add(_.parse('pi/2'), trig.atan(symbol).negate());
}
+
+ if(symbol.isImaginary())
+ return complex.evaluate(symbol, 'acot');
}
- else
- retval = _.symfunction('acot', arguments);
- return retval;
+ return _.symfunction('acot', arguments);
},
atan2: function(a, b) {
if(a.equals(0) && b.equals(0))
| 1 |
diff --git a/app/src/RoomClient.js b/app/src/RoomClient.js @@ -198,8 +198,12 @@ export default class RoomClient
this._basePath = basePath;
// Use displayName
+ this._displayName=null;
if (displayName)
+ {
store.dispatch(settingsActions.setDisplayName(displayName));
+ this._displayName=displayName;
+ }
this._tracker = 'wss://tracker.lab.vvc.niif.hu:443';
@@ -609,6 +613,8 @@ export default class RoomClient
store.dispatch(settingsActions.setDisplayName(displayName));
+ this._displayName=displayName;
+
if (!store.getState().settings.localPicture)
{
store.dispatch(meActions.setPicture(picture));
@@ -800,6 +806,9 @@ export default class RoomClient
displayName
})
}));
+
+ this._displayName=displayName;
+
}
catch (error)
{
@@ -2702,6 +2711,9 @@ export default class RoomClient
})
}));
+ if (peerId === this._peerId)
+ this._displayName=displayName;
+
break;
}
@@ -2803,6 +2815,9 @@ export default class RoomClient
})
}));
+ if (peerId === this._peerId)
+ this._displayName=displayName;
+
break;
}
@@ -3285,6 +3300,9 @@ export default class RoomClient
logger.debug('_joinRoom()');
const { displayName } = store.getState().settings;
+
+ this._displayName=displayName;
+
const { picture } = store.getState().me;
try
| 12 |
diff --git a/generators/server/files.js b/generators/server/files.js @@ -534,7 +534,7 @@ const serverFiles = {
condition: generator => !(generator.applicationType !== 'microservice' && !(generator.applicationType === 'gateway' && (generator.authenticationType === 'uaa' || generator.authenticationType === 'oauth2'))),
path: SERVER_MAIN_SRC_DIR,
templates: [
- { file: 'package/config/MicroserviceSecurityConfiguration.java', renameTo: generator => `${generator.javaDir}config/MicroserviceSecurityConfiguration.java` }
+ { file: 'package/config/MicroserviceSecurityConfiguration.java', renameTo: generator => `${generator.javaDir}config/SecurityConfiguration.java` }
]
},
{
| 10 |
diff --git a/README.md b/README.md @@ -266,6 +266,10 @@ TestCafe developers and community members made these plugins:
* [NUnit](https://github.com/AndreyBelym/testcafe-reporter-nunit) (by [@AndreyBelym](https://github.com/AndreyBelym))
* [TimeCafe](https://github.com/jimthedev/timecafe) (by [@jimthedev](https://github.com/jimthedev))
+* **GitHub Action**<br/>
+ Run TestCafe tests in GitHub Actions workflows.
+ * [Run TestCafe](https://github.com/DevExpress/testcafe-action/)
+
* **Test Accessibility**<br/>
Find accessibility issues in your web app.
* [axe-testcafe](https://github.com/helen-dikareva/axe-testcafe) (by [@helen-dikareva](https://github.com/helen-dikareva))
| 0 |
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -2980,7 +2980,7 @@ class Avatar {
isAudioEnabled() {
return !!this.microphoneWorker;
}
- async setAudioEnabled(enabled) {
+ async setAudioEnabled(enabled) { // XXX this can be made sync if we preload the microphone worklet module...
// cleanup
if (this.microphoneWorker) {
this.microphoneWorker.close();
| 0 |
diff --git a/src/actions/user.js b/src/actions/user.js @@ -21,7 +21,7 @@ export const login = () => dispatch => {
let provider = new firebase.auth.TwitterAuthProvider();
firebase
.auth()
- .signInWithRedirect(provider)
+ .signInWithPopup(provider)
.then(result => {
let user = result.user;
| 13 |
diff --git a/assets/js/googlesitekit/datastore/user/surveys.test.js b/assets/js/googlesitekit/datastore/user/surveys.test.js @@ -85,10 +85,6 @@ describe( 'core/user surveys', () => {
expect( () => {
registry.dispatch( STORE_NAME ).sendSurveyEvent( 'b', { foo: 'bar' } );
} ).not.toThrow();
- expect( () => {
- registry.dispatch( STORE_NAME ).triggerSurvey( 'c' );
- registry.dispatch( STORE_NAME ).sendSurveyEvent( 'd', { foo: 'bar' } );
- } ).not.toThrow();
} );
} );
} );
| 2 |
diff --git a/bin/near-cli.js b/bin/near-cli.js @@ -81,7 +81,11 @@ const keys = {
const sendMoney = {
command: 'send <sender> <receiver> <amount>',
desc: 'send tokens to given receiver',
- builder: (yargs) => yargs,
+ builder: (yargs) => yargs
+ .option('amount', {
+ desc: 'Amount of NEAR tokens to send',
+ type: 'string',
+ }),
handler: exitOnError(main.sendMoney)
};
| 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.