code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/app/models/concerns/cartodb_central_synchronizable.rb b/app/models/concerns/cartodb_central_synchronizable.rb @@ -133,7 +133,7 @@ module Concerns
allowed_attributes = %i(seats viewer_seats display_name description website discus_shortname twitter_username
auth_username_password_enabled auth_google_enabled password_expiration_in_d
inherit_owner_ffs)
- attributes.with_indifferent_access.slice(*allowed_attributes)
+ attributes.symbolize_keys.slice(*allowed_attributes)
end
elsif is_a_user?
allowed_attributes = %i(
@@ -151,7 +151,7 @@ module Concerns
password_reset_sent_at company_employees use_case private_map_quota session_salt public_dataset_quota
dashboard_viewed_at email_verification_token email_verification_sent_at
)
- attrs = attributes.with_indifferent_access.slice(*allowed_attributes)
+ attrs = attributes.symbolize_keys.slice(*allowed_attributes)
attrs[:multifactor_authentication_status] = multifactor_authentication_status()
case action
when :create
| 7 |
diff --git a/lib/taiko.js b/lib/taiko.js @@ -340,7 +340,7 @@ const _write = async (text,options) => {
*/
module.exports.attach = async (filepath, to) => {
validate();
- resolvedPath = filepath ? path.resolve(process.cwd(), filepath) : path.resolve(process.cwd());
+ let 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');
| 1 |
diff --git a/assets/sass/components/idea-hub/_googlesitekit-idea-hub-dashboard-ideas-widget.scss b/assets/sass/components/idea-hub/_googlesitekit-idea-hub-dashboard-ideas-widget.scss .googlesitekit-widget--ideaHubIdeas .googlesitekit-idea-hub__footer {
padding: 0;
+
+ .googlesitekit-idea-hub__footer--updated {
+ height: 36px;
+ }
}
}
| 12 |
diff --git a/packages/viewer/src/defaultProps.ts b/packages/viewer/src/defaultProps.ts @@ -66,8 +66,14 @@ export default {
terrainProviderViewModels: Array as PropType<Array<Cesium.ProviderViewModel>>,
imageryProvider: Object as PropType<Cesium.ImageryProvider>,
terrainProvider: Object as PropType<Cesium.TerrainProvider>,
- skyBox: [Object, Boolean] as PropType<Cesium.SkyBox>,
- skyAtmosphere: [Object, Boolean] as PropType<Cesium.SkyAtmosphere>,
+ skyBox: {
+ type: [Object, Boolean] as PropType<Cesium.SkyBox>,
+ default: () => undefined
+ },
+ skyAtmosphere: {
+ type: [Object, Boolean] as PropType<Cesium.SkyAtmosphere>,
+ default: () => undefined
+ },
fullscreenElement: {
type: [String, Element] as PropType<string | Element>
},
| 1 |
diff --git a/blocks/typed_blocks.js b/blocks/typed_blocks.js @@ -104,7 +104,6 @@ Blockly.Blocks['logic_ternary_typed'] = {
this.setColour(210);
var A = Blockly.TypeExpr.generateTypeVar();
this.appendValueInput('IF')
- .setCheck('Boolean')
.setTypeExpr(new Blockly.TypeExpr.BOOL())
.appendField('if')
this.appendValueInput('THEN')
@@ -175,10 +174,8 @@ Blockly.Blocks['int_arithmetic_typed'] = {
this.setOutputTypeExpr(new Blockly.TypeExpr.INT());
this.appendValueInput('A')
.setTypeExpr(new Blockly.TypeExpr.INT())
- .setCheck('Int');
this.appendValueInput('B')
.setTypeExpr(new Blockly.TypeExpr.INT())
- .setCheck('Int')
.appendField(new Blockly.FieldDropdown(OPERATORS), 'OP_INT');
this.setInputsInline(true);
// Assign 'this' to a variable for use in the tooltip closure below.
@@ -246,10 +243,8 @@ Blockly.Blocks['float_arithmetic_typed'] = {
this.setOutputTypeExpr(new Blockly.TypeExpr.FLOAT());
this.appendValueInput('A')
.setTypeExpr(new Blockly.TypeExpr.FLOAT())
- .setCheck('Float');
this.appendValueInput('B')
.setTypeExpr(new Blockly.TypeExpr.FLOAT())
- .setCheck('Float')
.appendField(new Blockly.FieldDropdown(OPERATORS), 'OP_FLOAT');
this.setInputsInline(true);
// Assign 'this' to a variable for use in the tooltip closure below.
| 2 |
diff --git a/lib/assets/core/javascripts/cartodb3/data/query-rows-collection.js b/lib/assets/core/javascripts/cartodb3/data/query-rows-collection.js @@ -46,7 +46,7 @@ module.exports = Backbone.Collection.extend({
},
_initBinds: function () {
- this.listenTo(this._querySchemaModel, 'change:status', this._onQuerySchemaChange);
+ this.listenTo(this._querySchemaModel, 'change:query', this._onQuerySchemaQueryChange);
},
isFetched: function () {
@@ -69,7 +69,7 @@ module.exports = Backbone.Collection.extend({
return !!this._querySchemaModel.get('query') && this._querySchemaModel.get('ready') && this._querySchemaModel.isFetched();
},
- _onQuerySchemaChange: function () {
+ _onQuerySchemaQueryChange: function () {
this.statusModel.set('status', 'unfetched');
this.reset([], { silent: true });
},
| 12 |
diff --git a/src/components/DatePicker/index.ios.js b/src/components/DatePicker/index.ios.js @@ -39,6 +39,8 @@ class DatePicker extends React.Component {
* @param {Event} event
*/
showPicker(event) {
+ this.initialValue = this.state.selectedDate;
+
// Opens the popover only after the keyboard is hidden to avoid a "blinking" effect where the keyboard was on iOS
// See https://github.com/Expensify/App/issues/14084 for more context
if (!this.props.isKeyboardShown) {
@@ -50,7 +52,6 @@ class DatePicker extends React.Component {
listener.remove();
});
Keyboard.dismiss();
- this.initialValue = this.state.selectedDate;
event.preventDefault();
}
| 12 |
diff --git a/src/traces/scattergl/index.js b/src/traces/scattergl/index.js var createScatter = require('regl-scatter2d');
var createLine = require('regl-line2d');
-var createErrorX = require('regl-error2d');
-var createErrorY = require('regl-error2d');
+var createError = require('regl-error2d');
var cluster = require('point-cluster');
var arrayRange = require('array-range');
var Text = require('gl-text');
@@ -108,8 +107,7 @@ function calc(gd, trace) {
if(opts.fill && !scene.fill2d) scene.fill2d = true;
if(opts.marker && !scene.scatter2d) scene.scatter2d = true;
if(opts.line && !scene.line2d) scene.line2d = true;
- if(opts.errorX && !scene.errorX2d) scene.errorX2d = true;
- if(opts.errorY && !scene.errorY2d) scene.errorY2d = true;
+ if((opts.errorX || opts.errorY) && !scene.error2d) scene.error2d = true;
if(opts.text && !scene.glText) scene.glText = true;
// FIXME: organize it in a more appropriate manner, probably in sceneOptions
@@ -163,15 +161,12 @@ function sceneOptions(gd, subplot, trace, positions, x, y) {
);
}
- var errors;
- if(opts.errorX) {
- errors = convert.errorBarPositions(gd, trace, positions, x, y);
+ if(opts.errorX || opts.errorY) {
+ var errors = convert.errorBarPositions(gd, trace, positions, x, y);
+
if(opts.errorX) {
Lib.extendFlat(opts.errorX, errors.x);
}
- }
- if(opts.errorY) {
- errors = convert.errorBarPositions(gd, trace, positions, x, y);
if(opts.errorY) {
Lib.extendFlat(opts.errorY, errors.y);
}
@@ -227,8 +222,7 @@ function sceneUpdate(gd, subplot) {
// regl- component stubs, initialized in dirty plot call
fill2d: false,
scatter2d: false,
- errorX2d: false,
- errorY2d: false,
+ error2d: false,
line2d: false,
glText: false,
select2d: null
@@ -250,8 +244,7 @@ function sceneUpdate(gd, subplot) {
if(scene.fill2d) scene.fill2d.update(opts);
if(scene.scatter2d) scene.scatter2d.update(opts);
if(scene.line2d) scene.line2d.update(opts);
- if(scene.errorX2d) scene.errorX2d.update(opts);
- if(scene.errorY2d) scene.errorY2d.update(opts);
+ if(scene.error2d) scene.error2d.update(opts.concat(opts));
if(scene.select2d) scene.select2d.update(opts);
if(scene.glText) {
for(var i = 0; i < scene.count; i++) {
@@ -264,8 +257,7 @@ function sceneUpdate(gd, subplot) {
scene.draw = function draw() {
var count = scene.count;
var fill2d = scene.fill2d;
- var errorX2d = scene.errorX2d;
- var errorY2d = scene.errorY2d;
+ var error2d = scene.error2d;
var line2d = scene.line2d;
var scatter2d = scene.scatter2d;
var glText = scene.glText;
@@ -280,11 +272,9 @@ function sceneUpdate(gd, subplot) {
if(line2d && scene.lineOptions[i]) {
line2d.draw(i);
}
- if(errorX2d && scene.errorXOptions[i]) {
- errorX2d.draw(i);
- }
- if(errorY2d && scene.errorYOptions[i]) {
- errorY2d.draw(i);
+ if(error2d) {
+ if(scene.errorXOptions[i]) error2d.draw(i);
+ if(scene.errorYOptions[i]) error2d.draw(i + count);
}
if(scatter2d && scene.markerOptions[i] && (!selectBatch || !selectBatch[i])) {
scatter2d.draw(i);
@@ -306,8 +296,7 @@ function sceneUpdate(gd, subplot) {
scene.destroy = function destroy() {
if(scene.fill2d && scene.fill2d.destroy) scene.fill2d.destroy();
if(scene.scatter2d && scene.scatter2d.destroy) scene.scatter2d.destroy();
- if(scene.errorX2d && scene.errorX2d.destroy) scene.errorX2d.destroy();
- if(scene.errorY2d && scene.errorY2d.destroy) scene.errorY2d.destroy();
+ if(scene.error2d && scene.error2d.destroy) scene.error2d.destroy();
if(scene.line2d && scene.line2d.destroy) scene.line2d.destroy();
if(scene.select2d && scene.select2d.destroy) scene.select2d.destroy();
if(scene.glText) {
@@ -381,11 +370,8 @@ function plot(gd, subplot, cdata) {
if(scene.dirty) {
// make sure scenes are created
- if(scene.errorX2d === true) {
- scene.errorX2d = createErrorX(regl);
- }
- if(scene.errorY2d === true) {
- scene.errorY2d = createErrorY(regl);
+ if(scene.error2d === true) {
+ scene.error2d = createError(regl);
}
if(scene.line2d === true) {
scene.line2d = createLine(regl);
@@ -442,11 +428,9 @@ function plot(gd, subplot, cdata) {
});
scene.line2d.update(scene.lineOptions);
}
- if(scene.errorX2d) {
- scene.errorX2d.update(scene.errorXOptions);
- }
- if(scene.errorY2d) {
- scene.errorY2d.update(scene.errorYOptions);
+ if(scene.error2d) {
+ var errorBatch = (scene.errorXOptions || []).concat(scene.errorYOptions || []);
+ scene.error2d.update(errorBatch);
}
if(scene.scatter2d) {
scene.scatter2d.update(scene.markerOptions);
@@ -685,11 +669,8 @@ function plot(gd, subplot, cdata) {
if(scene.line2d) {
scene.line2d.update(vpRange);
}
- if(scene.errorX2d) {
- scene.errorX2d.update(vpRange);
- }
- if(scene.errorY2d) {
- scene.errorY2d.update(vpRange);
+ if(scene.error2d) {
+ scene.error2d.update(vpRange.concat(vpRange));
}
if(scene.scatter2d) {
scene.scatter2d.update(vpRange);
| 13 |
diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js @@ -100,6 +100,8 @@ angular.module('copayApp.controllers').controller('indexController', function($r
});
return;
}
+ if (error_message.indexOf('ttl expired') >= 0) // TOR error after wakeup from sleep
+ return;
console.log('stack', error_object.stack);
sendBugReport(error_message, error_object);
if (error_object && error_object.bIgnore)
| 8 |
diff --git a/guides/advanced_guides/known_limitations.md b/guides/advanced_guides/known_limitations.md @@ -11,7 +11,7 @@ Some of these limitations have been made by MeiliSearch developers for relevacy
MeiliSearch uses two databases: the first one for storage and the second one for updates.
On launch LMDB needs to know the size that it can allocate on disk. This space will be reserved on disk for LMDB, thus MeiliSearch. This space will also be allocated as virtual memory.
-The maxime database size is by default __100GiB__ for each databases. This size can me modified using the options `--max-mdb-size` & `--max-udb-size` as described in the [configuration guide](/guides/advanced_guides/configuration.md#max-mdb-size).
+The maximum database size is by default __100GiB__ for each databases. This size can me modified using the options `--max-mdb-size` & `--max-udb-size` as described in the [configuration guide](/guides/advanced_guides/configuration.md#max-mdb-size).
### Number of indexes
@@ -19,7 +19,7 @@ You can create __up to 200 indexes__ in MeiliSearch. This limit has been hard se
### Maximum words per attribute
-A maximum of __1000 words par attribute__ can be indexed. This means that if an attribute contains more than 1000 words, only the first 1000 words will be indexed and the rest will be silently ignored.
+A maximum of __1000 words per attribute__ can be indexed. This means that if an attribute contains more than 1000 words, only the first 1000 words will be indexed and the rest will be silently ignored.
This limit is enforced for relevancy reasons. The more words there are in a given attribute, the less relevant the search queries will be.
| 1 |
diff --git a/includes/Modules/Analytics/Advanced_Tracking/Measurement_Events/Measurement_Event.php b/includes/Modules/Analytics/Advanced_Tracking/Measurement_Events/Measurement_Event.php @@ -53,7 +53,6 @@ final class Measurement_Event implements \JsonSerializable {
private function validate_config( $config ) {
$valid_keys = array(
'pluginName' => false,
- 'category' => false,
'action' => false,
'selector' => false,
'on' => false,
@@ -98,7 +97,7 @@ final class Measurement_Event implements \JsonSerializable {
$vars_config = array();
$vars_config['event_name'] = $this->config['action'];
- $vars_config['event_category'] = $this->config['category'];
+ $vars_config['event_category'] = $this->config['metadata']['event_category'];
$amp_config['vars'] = $vars_config;
return $amp_config;
| 2 |
diff --git a/packages/bitcore-lib-doge/lib/networks.js b/packages/bitcore-lib-doge/lib/networks.js @@ -130,19 +130,19 @@ addNetwork({
name: 'livenet',
alias: 'mainnet',
pubkeyhash: 0x30,
- privatekey: 0xb0,
- scripthash: 0x32,
- xpubkey: 0x019da462,
- xprivkey: 0x019d9cfe,
+ privatekey: 0x9e,
+ scripthash: 0x16,
+ xpubkey: 0x02facafd,
+ xprivkey: 0x02fac398,
networkMagic: 0xfbc0b6db,
- port: 9333,
+ port: 22556,
dnsSeeds: [
- 'dnsseed.litecointools.com',
- 'dnsseed.litecoinpool.org',
- 'dnsseed.ltc.xurious.com',
- 'dnsseed.koin-project.com',
- 'seed-a.litecoin.loshan.co.uk',
- 'dnsseed.thrasher.io'
+ 'seed.multidoge.org',
+ 'seed2.multidoge.org',
+ 'multidoge.org',
+ 'veryseed.denarius.pro',
+ 'muchseed.denarius.pro',
+ 'suchseed.denarius.pro'
]
});
@@ -155,11 +155,11 @@ var livenet = get('livenet');
addNetwork({
name: 'testnet',
alias: 'regtest',
- pubkeyhash: 0x6f,
- privatekey: 0xef,
- scripthash: 0x3a,
- xpubkey: 0x0436f6e1,
- xprivkey: 0x0436ef7d
+ pubkeyhash: 0x71,
+ privatekey: 0xf1,
+ scripthash: 0xc4,
+ xpubkey: 0x043587cf,
+ xprivkey: 0x04358394
});
/**
@@ -171,11 +171,11 @@ var testnet = get('testnet');
// Add configurable values for testnet/regtest
var TESTNET = {
- PORT: 19335,
+ PORT: 44556,
NETWORK_MAGIC: BufferUtil.integerAsBuffer(0xfdd2c8f1),
DNS_SEEDS: [
- 'testnet-seed.litecointools.com',
- 'seed-b.litecoin.loshan.co.uk'
+ 'jrn.me.uk',
+ 'testseed.jrn.me.uk'
]
};
@@ -186,7 +186,7 @@ for (var key in TESTNET) {
}
var REGTEST = {
- PORT: 19444,
+ PORT: 18444,
NETWORK_MAGIC: BufferUtil.integerAsBuffer(0xfabfb5da),
DNS_SEEDS: []
};
| 3 |
diff --git a/www/src/components/showcase-details.js b/www/src/components/showcase-details.js @@ -435,8 +435,8 @@ const ShowcaseDetails = ({ parent, data, isModal, categories }) => (
<div
css={{
position: `absolute`,
- right: gutter,
- top: gutter,
+ right: rhythm(3 / 4),
+ top: rhythm(-15 / 8),
left: `auto`,
zIndex: 1,
display: `flex`,
| 5 |
diff --git a/tests/end2end/helpers/E2ETopics.js b/tests/end2end/helpers/E2ETopics.js @@ -96,7 +96,7 @@ export class E2ETopics {
E2EGlobal.waitSomeTime();
if (subject) {
- browser.setValue('#id_subject', subject);
+ E2EGlobal.setValueSafe('#id_subject', subject);
}
if (responsible) {
E2ETopics.responsible2TopicEnterFreetext(responsible);
@@ -113,7 +113,7 @@ export class E2ETopics {
E2EGlobal.waitSomeTime();
if (subject) {
- browser.setValue('#id_subject', subject);
+ E2EGlobal.setValueSafe('#id_subject', subject);
}
if(label) {
E2ETopics.label2TopicEnterFreetext(label);
@@ -130,7 +130,7 @@ export class E2ETopics {
E2EGlobal.waitSomeTime();
if (subject) {
- browser.setValue('#addTopicField', subject);
+ E2EGlobal.setValueSafe('#addTopicField', subject);
}
if (responsible) {
E2ETopics.responsible2TopicEnterFreetext(responsible);
@@ -218,7 +218,7 @@ export class E2ETopics {
E2EGlobal.waitSomeTime(500);
if (infoItemDoc.subject) {
- browser.setValue('#id_item_subject', infoItemDoc.subject);
+ E2EGlobal.setValueSafe('#id_item_subject', infoItemDoc.subject);
}
if (infoItemDoc.label) {
E2ETopics.labelEnterFreetext(infoItemDoc.label);
@@ -227,7 +227,7 @@ export class E2ETopics {
E2ETopics.responsible2ItemEnterFreetext(infoItemDoc.responsible);
}
if (infoItemDoc.priority) {
- browser.setValue('#id_item_priority', infoItemDoc.priority);
+ E2EGlobal.setValueSafe('#id_item_priority', infoItemDoc.priority);
}
//todo: set other fields (duedate)
@@ -433,7 +433,7 @@ export class E2ETopics {
console.error('Could not add details. Input field not visible');
return false;
}
- browser.setValue(selFocusedInput, detailsText);
+ E2EGlobal.setValueSafe(selFocusedInput, detailsText);
if (doBeforeSubmit) {
doBeforeSubmit(selFocusedInput);
}
@@ -462,7 +462,7 @@ export class E2ETopics {
} catch (e) {
return false;
}
- browser.setValue(selFocusedInput, detailsText);
+ E2EGlobal.setValueSafe(selFocusedInput, detailsText);
browser.keys(['Escape']);
}
| 7 |
diff --git a/test/basic.js b/test/basic.js @@ -130,7 +130,7 @@ describe('request', function() {
});
});
- it('should should be an Error object', done => {
+ it('should be an Error object', done => {
let calledErrorEvent = false;
request
.get(`${uri}/error`)
| 2 |
diff --git a/spec/models/map_spec.rb b/spec/models/map_spec.rb @@ -167,8 +167,8 @@ describe Map do
it 'checks max-min bounds' do
new_map = Map.create(user_id: @user.id, table_id: @table.id)
- max_value= :maxlon # 179
- min_value= :minlon # -179
+ max_value = :maxx # 179
+ min_value = :minx # -179
value1 = 5
value2 = 179
value3 = -179
@@ -186,14 +186,7 @@ describe Map do
Carto::BoundingBoxUtils.bound_for(value6, min_value, max_value).should eq value6
# As map has no geometries, bounds should still be default ones instead of zeros
- map_bounds = new_map.send(:get_map_bounds)
- default_bounds = Carto::BoundingBoxUtils.DEFAULT_BOUNDS
-
- map_bounds[:maxx].should eq default_bounds[:maxx]
- map_bounds[:maxy].should eq default_bounds[:maxy]
- map_bounds[:minx].should eq default_bounds[:minx]
- map_bounds[:miny].should eq default_bounds[:miny]
-
+ new_map.send(:get_map_bounds).should be_nil
new_map.destroy
end
| 1 |
diff --git a/packages/gatsby-theme-apollo-docs/src/components/typescript-api-box.js b/packages/gatsby-theme-apollo-docs/src/components/typescript-api-box.js @@ -254,7 +254,9 @@ export class TypescriptApiBox extends Component {
}
if (declaration.indexSignature) {
- const signature = declaration.indexSignature[0];
+ const signature = Array.isArray(declaration.indexSignature)
+ ? declaration.indexSignature[0]
+ : declaration.indexSignature;
return (
this._indexParameterString(signature) + ':' + this._type(signature)
);
| 9 |
diff --git a/js/places/fullTextSearch.js b/js/places/fullTextSearch.js @@ -132,7 +132,13 @@ const stopWords = {
/* this is used in placesWorker.js when a history item is created */
function tokenize (string) {
- return string.trim().toLowerCase().replace(ignoredCharactersRegex, '').replace(nonLetterRegex, ' ').split(whitespaceRegex).filter(function (token) {
+ return string.trim().toLowerCase()
+ .replace(ignoredCharactersRegex, '')
+ .replace(nonLetterRegex, ' ')
+ // remove diacritics
+ // https://stackoverflow.com/a/37511463
+ .normalize('NFD').replace(/[\u0300-\u036f]/g, '')
+ .split(whitespaceRegex).filter(function (token) {
return !stopWords[token] && token.length <= 100
}).slice(0, 20000)
}
| 2 |
diff --git a/src/components/home/Bubbles.js b/src/components/home/Bubbles.js @@ -106,7 +106,7 @@ LargeButton.link = LargeButton.withComponent(Link)
const Bubbles = ({ children }) => (
<Root justify="center" align="center" pt={3} px={[0, 3]}>
<Flex justify="space-around" wrap pt={2}>
- {shuffle([...range(92), ...range(92)]).map((i, n) => (
+ {shuffle([...range(92), ...range(92), ...range(92)]).map((i, n) => (
<Avatar
src={`/avatars/${i + 1}.jpg`}
size={sample([48, 56, 64, 72, 84, 96]) + 'px'}
| 7 |
diff --git a/src/components/selections/select.js b/src/components/selections/select.js @@ -538,6 +538,8 @@ function newPointNumTester(pointSelectionDef) {
* selection testers that were passed in list.
*/
function multiTester(list) {
+ if(!list.length) return;
+
var testers = [];
var xmin = isPointSelectionDef(list[0]) ? 0 : list[0][0][0];
var xmax = xmin;
| 0 |
diff --git a/exampleSite/content/fragments/nav/docs.md b/exampleSite/content/fragments/nav/docs.md @@ -16,7 +16,7 @@ Use one instance of this fragment per page. Running more might lead to unexpecte
- .Site.Menus.main
- **Note:** Menus displayed in the nav fragment can be nested, in which case the nested menus are displayed in a dropdown, adding a chevron to the parent menu.
+ **Note:** Menus displayed in the nav fragment can be nested, in which case the nested menus are displayed in a dropdown.
```
# config.toml
| 2 |
diff --git a/accessibility-checker-extension/src/ts/styles/popup.scss b/accessibility-checker-extension/src/ts/styles/popup.scss .popupPanel {
width: 500px;
- margin: 26px;
+// margin-left: 26px;
+// margin-right: 26px;
+// margin-top: 26px;
+// margin-bottom: 24px;
+ margin: 26px 26px 24px 26px
}
.popupPanel a {
line-height: 1.25rem;
color: #252525;
font-family: "IBM Plex Sans";
- padding-top: 10px;
+ padding-top: 8px;
}
.versionDec {
| 2 |
diff --git a/OurUmbraco.Site/Views/Partials/Forum/TopicForm.cshtml b/OurUmbraco.Site/Views/Partials/Forum/TopicForm.cshtml <a href="#" data-topic="{{topicId}}" data-parent="{{id}}" data-controller="comment" class="forum-reply reply">
<i class="icon-Reply-arrow"></i><span>Reply</span>
</a>
-
+ {{#canManageComment}}
<a href="#" class="edit-post" data-id="{{id}}" data-topic="{{topicId}}" data-controller="comment">
<i class="icon-Edit"></i><span>Edit</span>
</a>
- {{/isLoggedIn}}
- {{#isCommentOwner}}
<a href="#" class="delete-reply" data-id="{{id}}">
<i class="icon-Delete-key"></i><span>Delete post</span>
</a>
- {{/isCommentOwner}}
+ {{/canManageComment}}
+ {{/isLoggedIn}}
<a href="#" class="copy-link" data-id="#{{id}}">
<i class="icon-Link"></i><span>Copy Link</span>
</a>
| 3 |
diff --git a/README.md b/README.md @@ -39,7 +39,6 @@ pg-promise
- [Tasks](#tasks)
- [Transactions](#transactions)
- [Nested Transactions](#nested-transactions)
- - [Synchronous Transactions](#synchronous-transactions)
- [Configurable Transactions](#configurable-transactions)
- [ES6 Generators](#es6-generators)
- [Library de-initialization](#library-de-initialization)
| 1 |
diff --git a/app/wallet.js b/app/wallet.js @@ -93,27 +93,18 @@ function setValueIfEmpty() {
function hideBalances() {
if (document.getElementById("hideZeroBalancesButton").textContent === "Hide Zero Balances") {
- for (let i = 0, j = 1; i < document.getElementById("walletList").childElementCount; i += 1) {
- if (document.getElementById("walletList").childNodes[i].childNodes[1].innerText === "0.00000000") {
- document.getElementById("walletList").childNodes[i].classList.add("walletListItemZero");
- } else {
- document.getElementById("walletList").childNodes[i].classList.remove("walletListItemOdd");
- if (j === 2) {
- j = 0;
- document.getElementById("walletList").childNodes[i].classList.add("walletListItemOdd");
- }
- j++;
- }
+ document.getElementById("walletList").childNodes.forEach(function(element) {
+ if (element.childNodes[1].innerText === "0.00000000") {
+ element.classList.add("walletListItemZero");
}
+ }, this);
document.getElementById("hideZeroBalancesButton").textContent = "Show Zero Balances";
document.getElementById("hideZeroBalancesButton").classList.remove("balancesButtonHide");
document.getElementById("hideZeroBalancesButton").classList.add("balancesButtonShow");
} else {
- for (let i = 0; i < document.getElementById("walletList").childElementCount; i += 1) {
- document.getElementById("walletList").childNodes[i].classList.remove("walletListItemZero");
- document.getElementById("walletList").childNodes[i].classList.remove("walletListItemOdd");
- if (i % 2 === 0) document.getElementById("walletList").childNodes[i].classList.add("walletListItemOdd");
- }
+ document.getElementById("walletList").childNodes.forEach(function(element) {
+ element.classList.remove("walletListItemZero");
+ }, this);
document.getElementById("hideZeroBalancesButton").textContent = "Hide Zero Balances";
document.getElementById("hideZeroBalancesButton").classList.remove("balancesButtonShow");
document.getElementById("hideZeroBalancesButton").classList.add("balancesButtonHide");
@@ -224,22 +215,17 @@ ipcRenderer.on("get-wallets-response", function (event, resp) {
showWallet();
document.getElementById("walletList").innerHTML = "";
- for (let i = 0, j = 1; i < data.wallets.length; i += 1) {
+ for (let i = 0; i < data.wallets.length; i += 1) {
wAddress = data.wallets[i][2];
wBalance = data.wallets[i][3];
wName = data.wallets[i][4];
let walletPick = "";
walletClass = "<div name=\"block_" + wAddress + "\" class=\"walletListItem";
- if (wBalance === 0) {
- walletClass += " walletListItemZero";
- } else {
- if (j === 2) {
- j = 0;
+ /* wallet is ordered by amount */
+ if (i % 2 === 0) {
walletClass += " walletListItemOdd";
}
- j++;
- }
walletClass += "\">";
walletName = "<span id=\"listName_"+ wAddress +"\" class=\"walletListItemAddress walletListItemTitle\">" + wName + "</span>";
walletTitle = "<span id=\"pickName_"+ wAddress +"\" class=\"walletListItemAddress walletListItemTitle\">";
@@ -337,7 +323,7 @@ ipcRenderer.on("generate-wallet-response", function (event, resp) {
{
let i = 0;
let list = document.getElementById("walletList").childNodes;
- while (document.getElementById("walletList").childNodes[i].childNodes[1].innerText !== "0.00000000") {
+ while (document.getElementById("walletList").childElementCount > i && document.getElementById("walletList").childNodes[i].childNodes[1].innerText !== "0.00000000") {
i++;
}
let wAddress = data.msg;
@@ -353,9 +339,15 @@ ipcRenderer.on("generate-wallet-response", function (event, resp) {
let newItem = document.createElement("div");
newItem.innerHTML = walletName + walletBalance + walletAddress;
newItem.classList.add("walletListItem");
+ if (i % 2 == 0) {
+ newItem.classList.add("walletListItemOdd");
+ }
newItem.name = elemName;
document.getElementById("walletList").insertBefore(newItem, list[i]);
document.getElementById("newWalletAddress").value = wAddress;
+ for (i = i + 1; i < document.getElementById("walletList").childElementCount; i += 1) {
+ document.getElementById("walletList").childNodes[i].classList.toggle("walletListItemOdd");
+ }
}
});
| 7 |
diff --git a/src/js/controllers/tab-scan.controller.js b/src/js/controllers/tab-scan.controller.js @@ -82,7 +82,7 @@ angular.module('copayApp.controllers').controller('tabScanController', function(
if(err){
$log.debug('Scan canceled.');
} else if ($state.params.passthroughMode) {
- $rootScope.scanResult = contents;
+ $rootScope.scanResult = contents.result || contents;
goBack();
} else {
handleSuccessfulScan(contents);
| 1 |
diff --git a/core/block_svg.js b/core/block_svg.js @@ -1136,6 +1136,13 @@ Blockly.BlockSvg.prototype.typeExprHasChanged = function() {
if (input.connection && input.connection.typeExprHasChanged()) {
return true;
}
+ for (var i = 0, field; field = input.fieldRow[i]; i++) {
+ if (field.referencesVariables() == Blockly.FIELD_VARIABLE_BINDING) {
+ if (field.needRendered_()) {
+ return true;
+ }
+ }
+ }
}
return false;
};
| 1 |
diff --git a/ui/page/settings/view.jsx b/ui/page/settings/view.jsx @@ -39,8 +39,7 @@ class SettingsPage extends React.PureComponent<Props> {
const { daemonSettings, isAuthenticated } = this.props;
const noDaemonSettings = !daemonSettings || Object.keys(daemonSettings).length === 0;
- const newStyle = true;
- return newStyle ? (
+ return (
<Page noFooter noSideNavigation backout={{ title: __('Settings'), backLabel: __('Done') }} className="card-stack">
{!isAuthenticated && IS_WEB && (
<>
@@ -60,28 +59,18 @@ class SettingsPage extends React.PureComponent<Props> {
</>
)}
+ {!IS_WEB && noDaemonSettings ? (
+ <section className="card card--section">
+ <div className="card__title card__title--deprecated">{__('Failed to load settings.')}</div>
+ </section>
+ ) : (
<div className={classnames('card-stack', { 'card--disabled': IS_WEB && !isAuthenticated })}>
<SettingAppearance />
<SettingAccount />
<SettingContent />
<SettingSystem />
</div>
- </Page>
- ) : (
- <Page
- noFooter
- noSideNavigation
- backout={{
- title: __('Settings'),
- backLabel: __('Done'),
- }}
- className="card-stack"
- >
- {!IS_WEB && noDaemonSettings ? (
- <section className="card card--section">
- <div className="card__title card__title--deprecated">{__('Failed to load settings.')}</div>
- </section>
- ) : null}
+ )}
</Page>
);
}
| 9 |
diff --git a/src/components/DashboardPage/index.js b/src/components/DashboardPage/index.js @@ -49,6 +49,8 @@ type Props = {
}
type State = {
+ accountsChunk: Array<any>,
+ allTransactions: Array<Object>,
fakeDatas: Array<any>,
selectedTime: string,
}
@@ -93,10 +95,21 @@ const getAllTransactions = accounts => {
return sortBy(allTransactions, t => t.received_at).reverse()
}
+const getAccountsChunk = accounts => {
+ // create shallow copy of accounts, to be mutated
+ const listAccounts = [...accounts]
+
+ while (listAccounts.length % ACCOUNTS_BY_LINE !== 0) listAccounts.push(null)
+
+ return chunk(listAccounts, ACCOUNTS_BY_LINE)
+}
+
class DashboardPage extends PureComponent<Props, State> {
state = {
- selectedTime: 'day',
+ accountsChunk: getAccountsChunk(this.props.accounts),
+ allTransactions: getAllTransactions(this.props.accounts),
fakeDatas: generateFakeDatas(this.props.accounts),
+ selectedTime: 'day',
}
componentDidMount() {
@@ -104,31 +117,24 @@ class DashboardPage extends PureComponent<Props, State> {
}
componentWillReceiveProps(nextProps) {
- if (
- this.state.fakeDatas.length === 0 &&
- nextProps.accounts.length !== this.props.accounts.length
- ) {
+ if (this.state.fakeDatas.length === 0) {
this.setState({
fakeDatas: generateFakeDatas(nextProps.accounts),
})
}
+
+ if (nextProps.accounts.length !== this.props.accounts.length) {
+ this.setState({
+ accountsChunk: getAccountsChunk(nextProps.accounts),
+ allTransactions: getAllTransactions(nextProps.accounts),
+ })
+ }
}
componentWillUnmount() {
clearTimeout(this._timeout)
}
- getAccountsChunk() {
- const { accounts } = this.props
-
- // create shallow copy of accounts, to be mutated
- const listAccounts = [...accounts]
-
- while (listAccounts.length % ACCOUNTS_BY_LINE !== 0) listAccounts.push(null)
-
- return chunk(listAccounts, ACCOUNTS_BY_LINE)
- }
-
addFakeDatasOnAccounts = () => {
const { accounts } = this.props
@@ -155,7 +161,7 @@ class DashboardPage extends PureComponent<Props, State> {
render() {
const { push, accounts } = this.props
- const { selectedTime, fakeDatas } = this.state
+ const { accountsChunk, allTransactions, selectedTime, fakeDatas } = this.state
const totalAccounts = accounts.length
@@ -227,7 +233,7 @@ class DashboardPage extends PureComponent<Props, State> {
</Box>
</Box>
<Box flow={5}>
- {this.getAccountsChunk().map((accountsByLine, i) => (
+ {accountsChunk.map((accountsByLine, i) => (
<Box
key={i} // eslint-disable-line react/no-array-index-key
horizontal
@@ -255,7 +261,7 @@ class DashboardPage extends PureComponent<Props, State> {
</Box>
</Box>
<Card p={0} px={4} title="Recent activity">
- <TransactionsList withAccounts transactions={getAllTransactions(accounts)} />
+ <TransactionsList withAccounts transactions={allTransactions} />
</Card>
</Fragment>
)}
| 7 |
diff --git a/ts/core/run.ts b/ts/core/run.ts @@ -24,8 +24,11 @@ function run(schema: JsonSchema, container: Container) {
delete sub.$schema;
}
- if (typeof sub.$ref === 'string' && sub.$ref.indexOf('#/') === -1) {
- throw new Error('Only local references are allowed in sync mode.');
+ if (typeof sub.$ref === 'string') {
+ if (sub.$ref.indexOf('#/') === -1) {
+ throw new Error('Only local references are allowed in sync mode.')
+ }
+ return null;
}
if (Array.isArray(sub.allOf)) {
| 2 |
diff --git a/articles/quickstart/webapp/nodejs-ea/01-login.md b/articles/quickstart/webapp/nodejs-ea/01-login.md @@ -86,20 +86,13 @@ app.get('/', (req, res) => {
## Login and Logout
### Login
To log a user in you have 3 options:
-- Visiting the route `/login` route registered by the `express-oidc-connect.auth` middleware
+- Visit the `/login` route registered by the `express-oidc-connect.auth` middleware, or if testing your application locally [`localhost:3000/login`](http://localhost:3000/login)
- Use the `express-oidc-connect.requiresAuth` middleware to protect a route.
- When initializing the `express-oidc-connect.auth` middleware, pass in `required: true` to force authentication on all routes.
-::: note
-If you are testing your application locally, you can login by visiting `http://localhost:3000/login`
-:::
-
### Logout
-To log a user out visit the `/logout` route registered by the `express-oidc-connect.auth` middleware.
-
-::: note
-If you are testing your application locally, you can logout by visiting `http://localhost:3000/logout`
-:::
+To log a user out visit the `/logout` route registered by the `express-oidc-connect.auth` middleware,
+or if you are testing your application locally [`localhost:3000/logout`](http://localhost:3000/)
## What's next?
This is an Early Access version of the Auth0 Express OIDC library. You can further explore this library and its configuration options on [GitHub](https://github.com/auth0/express-openid-connect).
| 2 |
diff --git a/src/components/Identity/customerIds/createCustomerIds.js b/src/components/Identity/customerIds/createCustomerIds.js @@ -19,7 +19,7 @@ export default ({ eventManager, consent, logger }) => {
if (!hashedId) {
delete finalIds[idsToHash[index]];
logger.warn(
- `Unable to hash identity ${idsToHash[index]} due to lack of browser support.`
+ `Unable to hash identity ${idsToHash[index]} due to lack of browser support. Provided ${idsToHash[index]} will not be sent to Adobe Experience Cloud`
);
} else {
finalIds[idsToHash[index]].id = convertBufferToHex(hashedId);
| 3 |
diff --git a/src/components/RestaurantSearch.js b/src/components/RestaurantSearch.js @@ -45,8 +45,8 @@ function RestaurantSearch(props) {
<TouchableNativeFeedback onPress={() => {
navigation.navigate('AccountAddresses', { action: 'search' })
}}>
- <Center>
- <Text fontSize={'md'} style={{
+ <Center px="2">
+ <Text fontSize={'md'} numberOfLines={ 1 } style={{
color: whiteColor,
}}>{ props.defaultValue?.streetAddress }</Text>
<ChevronDownIcon color={ whiteColor }/>
| 7 |
diff --git a/src/og/index.js b/src/og/index.js @@ -51,6 +51,7 @@ import { wgs84 } from './ellipsoid/wgs84.js';
import { EmptyTerrain } from './terrain/EmptyTerrain.js';
import { GlobusTerrain } from './terrain/GlobusTerrain.js';
import { MapboxTerrain } from './terrain/MapboxTerrain.js';
+import { BilTerrain } from './terrain/BilTerrain.js';
import { Camera } from './camera/Camera.js';
import { PlanetCamera } from './camera/PlanetCamera.js';
@@ -130,7 +131,8 @@ const entity = {
const terrain = {
EmptyTerrain: EmptyTerrain,
GlobusTerrain: GlobusTerrain,
- MapboxTerrain: MapboxTerrain
+ MapboxTerrain: MapboxTerrain,
+ BilTerrain: BilTerrain
};
const webgl = {
| 0 |
diff --git a/content/questions/object-clone-assign-mutation/index.md b/content/questions/object-clone-assign-mutation/index.md @@ -35,4 +35,4 @@ console.log(
<!-- explanation -->
-Setting `b = Object.assign({},a);` will perform a shallow copy of object `a`. Since `b` is a shallow copy, any fields in `b` that have of the type "object", including Date objects, will be a ref to the field in `a`. However, unlike using `JSON.parse` and `JSON.stringify` to clone an object, `Object.assign` will work with non valid JSON values such as Functions and Symbols. See [MDN Description](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Examples) for a more detailed explanation.
+Setting `b = Object.assign({},a);` will perform a shallow copy of object `a`. Since `b` is a shallow copy, any fields in `b` of the type "object", including Date objects, will be a ref to the field in `a`. However, unlike using `JSON.parse` and `JSON.stringify` to clone an object, `Object.assign` will work with non valid JSON values such as Functions and Symbols. See [MDN Description](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Examples) for a more detailed explanation.
| 3 |
diff --git a/deploy/helm/magda-common/templates/_image.tpl b/deploy/helm/magda-common/templates/_image.tpl {{/*
Generating `imagePullSecrets` field (for a k8s deployment or pod etc.) based on:
- `.Values.image`: this config will always be considered.
- - `.Values.global.image.pullSecret`: Only used when `magdaModuleType` = `core`
- - `.Values.connectors.image.pullSecret`: Only used when `magdaModuleType` = `connector`
- - `.Values.minions.image.pullSecret`: Only used when `magdaModuleType` = `minion`
- - `.Values.urlProcessors.image.pullSecret`: Only used when `magdaModuleType` = `urlProcessor`
+ - `.Values.global.image`: Only used when `magdaModuleType` = `core`
+ - `.Values.connectors.image`: Only used when `magdaModuleType` = `connector`
+ - `.Values.minions.image`: Only used when `magdaModuleType` = `minion`
+ - `.Values.urlProcessors.image`: Only used when `magdaModuleType` = `urlProcessor`
`magdaModuleType` can be set via `annotations` field of Chart.yaml.
If not set, it will assume `magdaModuleType` = `core`.
{{- include "magda.imagePullSecrets" . | indent 10 }}
*/}}
{{- define "magda.imagePullSecrets" -}}
+ {{- $pullSecrets := include "magda.image.getConsolidatedPullSecretList" . | mustFromJson }}
+ {{- if (not (empty $pullSecrets)) }}
+imagePullSecrets:
+ {{- range $pullSecrets }}
+ - name: {{ . | quote }}
+ {{- end }}
+ {{- end }}
+{{- end -}}
+
+{{/*
+ Get consolidated image pull secret lists based on:
+ - `.Values.image`: this config will always be considered.
+ - `.Values.global.image`: Only used when `magdaModuleType` = `core`
+ - `.Values.connectors.image`: Only used when `magdaModuleType` = `connector`
+ - `.Values.minions.image`: Only used when `magdaModuleType` = `minion`
+ - `.Values.urlProcessors.image`: Only used when `magdaModuleType` = `urlProcessor`
+
+ `magdaModuleType` can be set via `annotations` field of Chart.yaml.
+ If not set, it will assume `magdaModuleType` = `core`.
+
+ Parameters / Input:
+ Must passing the root scope as the template input.
+
+ Return:
+ an array of image pull secret name as JSON string.
+ You are supposed to call `mustFromJson` to convert it back to the original value.
+ if can't find the config, it will return string `[]` which will be convert to empty list by `mustFromJson`.
+ Usage:
+ {{- $pullSecretList := include "magda.image.getConsolidatedPullSecretList" . | mustFromJson }}
+*/}}
+{{- define "magda.image.getConsolidatedPullSecretList" -}}
{{- $pullSecrets := list }}
{{- if not (empty .Values.image) }}
{{- $pullSecretList := include "magda.image.getPullSecretList" .Values.image | mustFromJson }}
{{- $pullSecretList := include "magda.image.getPullSecretList" (get $urlProcessorsConfig "image") | mustFromJson }}
{{- $pullSecrets = concat $pullSecrets $pullSecretList }}
{{- end }}
- {{- if (not (empty $pullSecrets)) }}
-imagePullSecrets:
- {{- range $pullSecrets }}
- - name: {{ . | quote }}
- {{- end }}
- {{- end }}
+ {{- $pullSecrets | mustToJson }}
{{- end -}}
{{/*
@@ -58,7 +84,7 @@ imagePullSecrets:
You are supposed to call `mustFromJson` to convert it back to the original value.
if can't find the config, it will return string `[]` which will be convert to empty list by `mustFromJson`.
Usage:
- {{- $pullSecretsConfig := include "magda.image.getPullSecretList" .Values.image | mustFromJson }}
+ {{- $pullSecretList := include "magda.image.getPullSecretList" .Values.image | mustFromJson }}
*/}}
{{- define "magda.image.getPullSecretList" -}}
{{- $pullSecretsConfig := false }}
| 5 |
diff --git a/minutes/2018-05-15.md b/minutes/2018-05-15.md @@ -9,10 +9,10 @@ Planning board: https://github.com/nodejs/i18n/projects/1
- @zeke (GitHub on the Electron team, deals with i18n)
- @obensource (InVision Dev Advocate, CommComm)
- @RichardLitt (low resource language researcher)
-- @Vanessayuenn (Also on electron, i18n)
+- @Vanessayuenn (Also on Electron, i18n)
- Andriy (CrowdIn)
- Mikhailo (CrowdIn)
-- Tiago Danin
+- @TiagoDanin (Also on Electron, i18n)
- @maddhruv (Member of Website Redesign and i18n)
- @bnb (DevAdvocate at Node Source, chair of CommComm)
@@ -24,14 +24,14 @@ Planning board: https://github.com/nodejs/i18n/projects/1
### Agenda
-- continuous integration #58
+- Continuous integration #58
- Translation languages #70
- Versions to Translate #71
-- website content to be translated #72
+- Website content to be translated #72
- Set up the Crowdin-GitHub integration together, and record it #77
- New project board #82
-- @Zeke: Let's get CrowdIn to a state where we can start translating NodeDocs
+- @zeke: Let's get CrowdIn to a state where we can start translating NodeDocs
- There are some blockers. We could do a high-level look at this... but maybe I should just dive in
- CrowdIn: A localization management tool
@@ -39,9 +39,9 @@ Planning board: https://github.com/nodejs/i18n/projects/1
- Project starts with project creation on the profile page, and you can set up integrations after
- Collect latest major versions of node [#83](https://github.com/nodejs/i18n/pull/83)
- - @Zeke made a PR to use major versions instead of smaller versions, to make dedupelication earlier
- - node 9 is also EOL
- - soon we'll have node 11 and it will be active for a time, but will not have LTS
+ - @zeke made a PR to use major versions instead of smaller versions, to make deduplication earlier
+ - Node 9 is also EOL
+ - Soon we'll have node 11 and it will be active for a time, but will not have LTS
- @zeke: anyone mind if we pull node 9? everyone: no.
- Might be a good idea to push for node 11 as having translations (launch date: 10/31/2018)
- For now, v6, v8, and v10 are good. We can turn on odd versions as needed
@@ -51,8 +51,6 @@ Planning board: https://github.com/nodejs/i18n/projects/1
< There was a 15 minute gap in documenting this meeting >
-- [ ] @maddhruv: I will set up an issue for optimizing getting documentation, as I get time.
-
+@maddhruv: I will set up an issue for optimizing getting documentation, as I get time.
@maddhruv: Could we move the docs to another repository to make it easier?
@zeke: I'm not sure. Node has always had the docs in the same repo, and that has been essential to the success of the project, as any code will be in the same repo as the docs which need to be updated. I know this is hard for content collection, and any processes which could update this would be welcome.
-
| 7 |
diff --git a/articles/appliance/private-cloud-requirements.md b/articles/appliance/private-cloud-requirements.md @@ -24,6 +24,4 @@ If your subscription agreement includes an Appliance that is hosted in a dedicat
## Further Reading
-* [DNS](/appliance/infrastructure/dns)
-* [DNS Records](/appliance/infrastructure/network#dns-records)
* [Custom Domains on the Appliance](/appliance/custom-domains)
| 2 |
diff --git a/src/encoded/static/components/award.js b/src/encoded/static/components/award.js @@ -635,7 +635,7 @@ GenusButtons.defaultProps = {
selectedOrganisms: [],
};
-
+// Overall component to render the cumulative line graph
const ExperimentDate = (props) => {
const { experiments } = props;
let dateArray;
@@ -645,21 +645,21 @@ const ExperimentDate = (props) => {
let cumulativedataset = [];
let accumulator = 0;
let monthdiff = 0;
- // let previousmonthdiff = 0;
const fillDates = [];
- // 'no-const-assign': 0;
- // const experimentsConfig = searchData.experiments;
+ // Search experiments for month_released in facets
if (experiments && experiments.facets && experiments.facets.length) {
const categoryFacet = experiments.facets.find(facet => facet.field === 'month_released');
dateArray = (categoryFacet && categoryFacet.terms && categoryFacet.terms.length) ? categoryFacet.terms : [];
}
+ // Use Library Moment to format array of dates
const standardTerms = dateArray.map((term) => {
const standardDate = moment(term.key, ['MMMM, YYYY', 'YYYY-MM']).format('YYYY-MM');
return { key: standardDate, doc_count: term.doc_count };
});
+ // Sort array chronologically
const sortedTerms = standardTerms.sort((termA, termB) => {
if (termA.key < termB.key) {
return -1;
@@ -669,6 +669,7 @@ const ExperimentDate = (props) => {
return 0;
});
+ // Add objects to the array with doc_count 0 for the missing months
const arrayLength = sortedTerms.length;
for (let j = 0; j < arrayLength - 1; j += 1) {
fillDates.push(sortedTerms[j]);
@@ -680,10 +681,6 @@ const ExperimentDate = (props) => {
fillDates.push({ key: startDate.add(1, 'months').format('YYYY-MM'), doc_count: 0 });
}
}
- // for (let i = 1; i < monthdiff; i += 1) {
- // sortedTerms.splice(previousmonthdiff + i, 0, { key: startDate.add(1, 'months').format('YYYY-MM'), doc_count: 0 });
- // }
- // previousmonthdiff = monthdiff;
}
fillDates.push(sortedTerms[arrayLength - 1]);
@@ -692,6 +689,7 @@ const ExperimentDate = (props) => {
return { key: formattedDate, doc_count: term.doc_count };
});
+ // Deduplicate dates
formatTerms.forEach((elem) => {
if (deduplicated[elem.key]) {
deduplicated[elem.key] += elem.doc_count;
@@ -700,17 +698,20 @@ const ExperimentDate = (props) => {
}
});
+ // Create an array of dates
const date = Object.keys(deduplicated).map((term) => {
label = term;
return label;
});
+ // Create an array of data from objects' doc_counts
const dataset = Object.keys(deduplicated).map((item) => {
label = item;
data = deduplicated[label];
return data;
});
+ // Make the data cumulative
const accumulatedData = dataset.map((term) => {
accumulator += term;
cumulativedataset = accumulator;
@@ -719,14 +720,12 @@ const ExperimentDate = (props) => {
return (
<div>
- {console.log(experiments)}
<CumulativeGraph data={accumulatedData} monthReleased={date} />
</div>
);
};
ExperimentDate.propTypes = {
- award: PropTypes.object.isRequired, // Award represented by this chart
experiments: PropTypes.object,
};
@@ -826,7 +825,6 @@ AwardCharts.propTypes = {
};
class FetchGraphData extends React.Component {
-
render() {
const { award } = this.props;
return (
@@ -842,9 +840,9 @@ FetchGraphData.propTypes = {
award: PropTypes.object.isRequired, // Award represented by this chart
};
+// Create a cumulative line chart in the div.
class CumulativeGraph extends React.Component {
-
componentDidMount() {
const { data, monthReleased } = this.props;
require.ensure(['chart.js'], (require) => {
@@ -861,6 +859,7 @@ class CumulativeGraph extends React.Component {
}],
},
options: {
+ maintainAspectRatio: true,
legend: {
display: false,
labels: {
@@ -871,29 +870,19 @@ class CumulativeGraph extends React.Component {
line: {
tension: 0,
},
+ point: {
+ radius: 0,
+ },
+ },
+ scales: {
+ xAxes: [{
+ ticks: {
+ autoSkip: true,
+ maxTicksLimit: 15,
+ },
+ },
+ ],
},
- // scales: {
- // xAxes: [
- // {
- // id: 'xAxis1',
- // type: 'category',
- // interval: 50,
- // ticks: {
- // monthReleased,
- // },
- // },
- // {
- // id: 'xAxis2',
- // type: 'category',
- // gridLines: {
- // drawOnChartArea: false, // only want the grid lines for one axis to show up
- // },
- // interval: 50 * 12,
- // ticks: {
- // },
- // },
- // ],
- // },
},
});
});
@@ -964,7 +953,6 @@ class Award extends React.Component {
<h4>Cumulative Number of Experiments</h4>
</PanelHeading>
<PanelBody>
- {/* <CumulativeGraph />*/}
<FetchGraphData award={context} />
</PanelBody>
</Panel>
| 0 |
diff --git a/cli/cli.js b/cli/cli.js @@ -21,7 +21,7 @@ const chalk = require('chalk');
const didYouMean = require('didyoumean');
const packageJson = require('../package.json');
-const { CLI_NAME, initHelp, logger, toString, getCommand, getCommandOptions, addKebabCase, getArgs, done } = require('./utils');
+const { CLI_NAME, initHelp, logger, toString, getCommand, getCommandOptions, getArgs, done } = require('./utils');
const EnvironmentBuilder = require('./environment-builder');
const initAutoCompletion = require('./completion').init;
const SUB_GENERATORS = require('./commands');
@@ -158,9 +158,9 @@ Object.entries(allCommands).forEach(([key, opts]) => {
// Get unknown options and parse.
const options = {
...getCommandOptions(packageJson, unknownArgs),
- ...addKebabCase(program.opts()),
- ...addKebabCase(cmdOptions),
- ...addKebabCase(customOptions),
+ ...program.opts(),
+ ...cmdOptions,
+ ...customOptions,
};
if (opts.cliOnly) {
| 2 |
diff --git a/test/util.mjs b/test/util.mjs @@ -50,16 +50,73 @@ export var failRej = function (x){
export var assertIsFuture = function (x){ return expect(x).to.be.an.instanceof(Future) };
export var assertEqual = function (a, b){
- var states = ['pending', 'rejected', 'resolved'];
- if(!(a instanceof Future && b instanceof Future)){ throw new Error('Both values must be Futures') }
+ var states = ['pending', 'crashed', 'rejected', 'resolved'];
var astate = 0, aval;
var bstate = 0, bval;
- a._interpret(throwit, function (x){astate = 1; aval = x}, function (x){astate = 2; aval = x});
- b._interpret(throwit, function (x){bstate = 1; bval = x}, function (x){bstate = 2; bval = x});
- if(astate === 0){ throw new Error('First Future passed to assertEqual did not resolve instantly') }
- if(bstate === 0){ throw new Error('Second Future passed to assertEqual did not resolve instantly') }
+
+ if(!(a instanceof Future && b instanceof Future)){
+ throw new Error('Both values must be Futures');
+ }
+
+ a._interpret(
+ function (x){
+ if(astate > 0){
+ throw new Error('The first Future ' + states[1] + ' while already ' + states[astate]);
+ }
+ astate = 1;
+ aval = x;
+ },
+ function (x){
+ if(astate > 0){
+ throw new Error('The first Future ' + states[2] + ' while already ' + states[astate]);
+ }
+ astate = 2;
+ aval = x;
+ },
+ function (x){
+ if(astate > 0){
+ throw new Error('The first Future ' + states[3] + ' while already ' + states[astate]);
+ }
+ astate = 3;
+ aval = x;
+ }
+ );
+
+ b._interpret(
+ function (x){
+ if(bstate > 0){
+ throw new Error('The second Future ' + states[1] + ' while already ' + states[bstate]);
+ }
+ bstate = 1;
+ bval = x;
+ },
+ function (x){
+ if(bstate > 0){
+ throw new Error('The second Future ' + states[2] + ' while already ' + states[bstate]);
+ }
+ bstate = 2;
+ bval = x;
+ },
+ function (x){
+ if(bstate > 0){
+ throw new Error('The second Future ' + states[3] + ' while already ' + states[bstate]);
+ }
+ bstate = 3;
+ bval = x;
+ }
+ );
+
+ if(astate === 0){
+ throw new Error('The first Future passed to assertEqual did not resolve instantly');
+ }
+
+ if(bstate === 0){
+ throw new Error('The second Future passed to assertEqual did not resolve instantly');
+ }
+
if(isFuture(aval) && isFuture(bval)) return assertEqual(aval, bval);
if(astate === bstate && isDeepStrictEqual(aval, bval)){ return true }
+
throw new Error(
'\n ' + (a.toString()) +
' :: Future({ <' + states[astate] + '> ' + show(aval) + ' })' +
| 7 |
diff --git a/src/encoded/static/vis_defs/eCLIP_vis_def.json b/src/encoded/static/vis_defs/eCLIP_vis_def.json "tag": "SIGLR",
"visibility": "full",
"type": "bigWig",
- "viewLimits": "0:1",
+ "viewLimits": "-1:0",
"autoScale": "off",
- "negateValues": "on",
"maxHeightPixels": "64:18:8",
"windowingFunction": "mean+whiskers",
"output_type": [ "minus strand signal of unique reads" ]
| 1 |
diff --git a/lib/routes/login-passport.js b/lib/routes/login-passport.js @@ -259,6 +259,15 @@ module.exports = function(crowi, app) {
`${response.name.givenName} ${response.name.familyName}`
)
.catch((err) => {
+ if (err.name === 'DuplicatedUsernameException') {
+ // get option
+ const isSameUsernameTreatedAsIdenticalUser = Config.isSameUsernameTreatedAsIdenticalUser(config, 'google');
+ if (isSameUsernameTreatedAsIdenticalUser) {
+ // associate to existing user
+ debug(`ExternalAccount '${response.displayName}' will be created and bound to the exisiting User account`);
+ return ExternalAccount.associate('google', response.id, err.user);
+ }
+ }
throw err;
})
.then((externalAccount) => {
@@ -274,6 +283,15 @@ module.exports = function(crowi, app) {
return loginSuccess(req, res, user);
}
});
+ })
+ .catch((err) => {
+ if (err.name === 'DuplicatedUsernameException') {
+ req.flash('isDuplicatedUsernameExceptionOccured', true);
+ return next();
+ }
+ else {
+ return next(err);
+ }
});
})(req, res, next);
};
| 9 |
diff --git a/src/components/Footer.js b/src/components/Footer.js @@ -45,7 +45,7 @@ const Footer = () => {
<div className='flex flex-col md:flex-row justify-center items-center'>
<label
className='text-blue-500 text-lg md:mr-6 font-semibold text-center md:text-left'
- htmlFor='email'
+ htmlFor='newsletter-email'
>
Sign up for our mailing list!
</label>
@@ -54,7 +54,7 @@ const Footer = () => {
data-cy='mailing-list-signup'
type='email'
className='px-4 py-1 w-full md:w-2/5 my-3 md:my-0'
- id='email'
+ id='newsletter-email'
autoComplete='off'
onBlur={(e) => setEmail(e.target.value)}
name='email'
| 10 |
diff --git a/src/components/AddressSearch.js b/src/components/AddressSearch.js @@ -23,7 +23,7 @@ const propTypes = {
value: PropTypes.string,
/** A callback function when the value of this field has changed */
- onChangeText: PropTypes.func.isRequired,
+ onChange: PropTypes.func.isRequired,
/** Customize the ExpensiTextInput container */
containerStyles: PropTypes.arrayOf(PropTypes.object),
@@ -51,35 +51,40 @@ const AddressSearch = (props) => {
const saveLocationDetails = (details) => {
const addressComponents = details.address_components;
- if (GooglePlacesUtils.isAddressValidForVBA(addressComponents)) {
+ if (!addressComponents) {
+ return;
+ }
+
// Gather the values from the Google details
- const streetNumber = GooglePlacesUtils.getAddressComponent(addressComponents, 'street_number', 'long_name');
- const streetName = GooglePlacesUtils.getAddressComponent(addressComponents, 'route', 'long_name');
- let city = GooglePlacesUtils.getAddressComponent(addressComponents, 'locality', 'long_name');
- if (!city) {
- city = GooglePlacesUtils.getAddressComponent(addressComponents, 'sublocality', 'long_name');
- Log.hmmm('[AddressSearch] Replacing missing locality with sublocality: ', {address: details.formatted_address, sublocality: city});
+ const streetNumber = GooglePlacesUtils.getAddressComponent(addressComponents, 'street_number', 'long_name') || '';
+ const streetName = GooglePlacesUtils.getAddressComponent(addressComponents, 'route', 'long_name') || '';
+ const addressStreet = `${streetNumber} ${streetName}`.trim();
+ let addressCity = GooglePlacesUtils.getAddressComponent(addressComponents, 'locality', 'long_name');
+ if (!addressCity) {
+ addressCity = GooglePlacesUtils.getAddressComponent(addressComponents, 'sublocality', 'long_name');
+ Log.hmmm('[AddressSearch] Replacing missing locality with sublocality: ', {address: details.formatted_address, sublocality: addressCity});
+ }
+ const addressZipCode = GooglePlacesUtils.getAddressComponent(addressComponents, 'postal_code', 'long_name');
+ const addressState = GooglePlacesUtils.getAddressComponent(addressComponents, 'administrative_area_level_1', 'short_name');
+
+ const values = {};
+ if (addressStreet) {
+ values.addressStreet = addressStreet;
+ }
+ if (addressCity) {
+ values.addressCity = addressCity;
}
- const state = GooglePlacesUtils.getAddressComponent(addressComponents, 'administrative_area_level_1', 'short_name');
- const zipCode = GooglePlacesUtils.getAddressComponent(addressComponents, 'postal_code', 'long_name');
-
- // Trigger text change events for each of the individual fields being saved on the server
- props.onChangeText('addressStreet', `${streetNumber} ${streetName}`);
- props.onChangeText('addressCity', city);
- props.onChangeText('addressState', state);
- props.onChangeText('addressZipCode', zipCode);
- } else {
- // Clear the values associated to the address, so our validations catch the problem
- Log.hmmm('[AddressSearch] Search result failed validation: ', {
- address: details.formatted_address,
- address_components: addressComponents,
- place_id: details.place_id,
- });
- props.onChangeText('addressStreet', null);
- props.onChangeText('addressCity', null);
- props.onChangeText('addressState', null);
- props.onChangeText('addressZipCode', null);
+ if (addressZipCode) {
+ values.addressZipCode = addressZipCode;
}
+ if (addressState) {
+ values.addressState = addressState;
+ }
+ if (_.size(values) === 0) {
+ return;
+ }
+
+ props.onChange(values);
};
return (
@@ -88,6 +93,7 @@ const AddressSearch = (props) => {
fetchDetails
suppressDefaultStyles
enablePoweredByContainer={false}
+ placeholder=""
onPress={(data, details) => {
saveLocationDetails(details);
@@ -110,12 +116,7 @@ const AddressSearch = (props) => {
containerStyles: props.containerStyles,
errorText: props.errorText,
onChangeText: (text) => {
- const isTextValid = !_.isEmpty(text) && _.isEqual(text, props.value);
-
- // Ensure whether an address is selected already or has address value initialized.
- if (!_.isEmpty(googlePlacesRef.current.getAddressText()) && !isTextValid) {
- saveLocationDetails({});
- }
+ props.onChange({addressStreet: text});
// If the text is empty, we set displayListViewBorder to false to prevent UI flickering
if (_.isEmpty(text)) {
| 14 |
diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist <string>Your photos are used to create chat attachments.</string>
<key>UIAppFonts</key>
<array>
- <string>Expensify-New-Kansas-MediumItalic.otf</string>
- <string>Expensify-New-Kansas-Meduim.otf</string>
- <string>Expensify-Neue-Regular.otf</string>
- <string>Expensify-Neue-Italic.otf</string>
- <string>Expensify-Neue-BoldItalic.otf</string>
- <string>Expensify-Neue-Bold.otf</string>
- <string>Expensify-Mono-Regular.otf</string>
- <string>Expensify-Mono-Bold.otf</string>
+ <string>ExpensifyNewKansas-MediumItalic.otf</string>
+ <string>ExpensifyNewKansas-Meduim.otf</string>
+ <string>ExpensifyNeue-Regular.otf</string>
+ <string>ExpensifyNeue-Italic.otf</string>
+ <string>ExpensifyNeue-BoldItalic.otf</string>
+ <string>ExpensifyNeue-Bold.otf</string>
+ <string>ExpensifyMono-Regular.otf</string>
+ <string>ExpensifyMono-Bold.otf</string>
</array>
<key>UIBackgroundModes</key>
<array>
| 4 |
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.0';
+const JHIPSTER_DEPENDENCIES_VERSION = '7.9.1';
// 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/traces/violin/attributes.js b/src/traces/violin/attributes.js @@ -180,8 +180,10 @@ module.exports = {
role: 'style',
editType: 'style',
description: 'Sets the inner box plot bounding line width.'
- }
- }
+ },
+ editType: 'style'
+ },
+ editType: 'plot'
},
meanline: {
@@ -209,7 +211,8 @@ module.exports = {
role: 'style',
editType: 'style',
description: 'Sets the mean line width.'
- }
+ },
+ editType: 'plot'
},
side: {
| 0 |
diff --git a/lib/collector/remote-method.js b/lib/collector/remote-method.js @@ -249,14 +249,12 @@ RemoteMethod.prototype._safeRequest = function _safeRequest(options) {
}
// If trace level is not explicitly enabled check to see if the audit log is
- // enabled. If the filter property is empty, then always log the event otherwise
- // check to see if the filter includes this method.
+ // enabled.
if (
- (logConfig != null &&
+ logConfig != null &&
logConfig.level !== 'trace' &&
auditLog.enabled &&
- auditLog.endpoints.length === 0) ||
- auditLog.endpoints.indexOf(this.name) > -1
+ (auditLog.endpoints.length === 0 || auditLog.endpoints.indexOf(this.name) > -1)
) {
level = 'info'
}
| 1 |
diff --git a/package.json b/package.json "generate-cast-functions": "node ./scripts/generate-cast-functions.js",
"build": "npm run generate-cast-functions && rollup -c & parcel build ./example/*.html --out-dir ./example/bundle/ --public-url . --no-cache --no-source-maps --no-content-hash",
"test": "npm run generate-cast-functions && jest",
- "lint": "npm run generate-cast-functions && eslint \"./src/*.js\" \"./test/*.js\" \"./extra/*.js\"",
+ "lint": "npm run generate-cast-functions && eslint \"./src/*.js\" \"./test/*.js\" \"./extra/*.js\" \"./example/*.js\"",
"benchmark": "npm run generate-cast-functions && node benchmark/index.js"
},
"files": [
| 0 |
diff --git a/src/matrix/calls/group/Member.ts b/src/matrix/calls/group/Member.ts @@ -343,64 +343,65 @@ export class Member {
/** @internal */
handleDeviceMessage(message: SignallingMessage<MGroupCallBase>, syncLog: ILogItem): void {
this.errorBoundary.try(() => {
+ syncLog.wrap({l: "Member.handleDeviceMessage", type: message.type, seq: message.content?.seq}, log => {
const {connection} = this;
if (connection) {
const destSessionId = message.content.dest_session_id;
if (destSessionId !== this.options.sessionId) {
const logItem = connection.logItem.log({l: "ignoring to_device event with wrong session_id", destSessionId, type: message.type});
- syncLog.refDetached(logItem);
+ log.refDetached(logItem);
return;
}
// if there is no peerCall, we either create it with an invite and Handle is implied or we'll ignore it
- let action = IncomingMessageAction.Handle;
if (connection.peerCall) {
- action = connection.peerCall.getMessageAction(message);
+ const action = connection.peerCall.getMessageAction(message);
// deal with glare and replacing the call before creating new calls
if (action === IncomingMessageAction.InviteGlare) {
const {shouldReplace, log} = connection.peerCall.handleInviteGlare(message, this.deviceId, connection.logItem);
if (log) {
- syncLog.refDetached(log);
+ log.refDetached(log);
}
if (shouldReplace) {
connection.peerCall.dispose();
connection.peerCall = undefined;
- action = IncomingMessageAction.Handle;
}
}
}
+ // create call on invite
if (message.type === EventType.Invite && !connection.peerCall) {
connection.peerCall = this._createPeerCall(message.content.call_id);
}
- if (action === IncomingMessageAction.Handle) {
+ // enqueue
const idx = sortedIndex(connection.queuedSignallingMessages, message, (a, b) => a.content.seq - b.content.seq);
connection.queuedSignallingMessages.splice(idx, 0, message);
+ // dequeue as much as we can
+ let hasNewMessageBeenDequeued = false;
if (connection.peerCall) {
- const hasNewMessageBeenDequeued = this.dequeueSignallingMessages(connection, connection.peerCall, message, syncLog);
- if (!hasNewMessageBeenDequeued) {
- syncLog.refDetached(connection.logItem.log({l: "queued signalling message", type: message.type, seq: message.content.seq}));
+ hasNewMessageBeenDequeued = this.dequeueSignallingMessages(connection, connection.peerCall, message, log);
}
- }
- } else if (action === IncomingMessageAction.Ignore && connection.peerCall) {
- const logItem = connection.logItem.log({l: "ignoring to_device event with wrong call_id", callId: message.content.call_id, type: message.type});
- syncLog.refDetached(logItem);
+ if (!hasNewMessageBeenDequeued) {
+ log.refDetached(connection.logItem.log({l: "queued message", type: message.type, seq: message.content.seq, idx}));
}
} else {
+ // TODO: the right thing to do here would be to at least enqueue the message rather than drop it,
+ // and if it's up to the other end to send the invite and the type is an invite to actually
+ // call connect and assume the m.call.member state update is on its way?
syncLog.log({l: "member not connected", userId: this.userId, deviceId: this.deviceId});
}
});
+ });
}
private dequeueSignallingMessages(connection: MemberConnection, peerCall: PeerCall, newMessage: SignallingMessage<MGroupCallBase>, syncLog: ILogItem): boolean {
let hasNewMessageBeenDequeued = false;
while (connection.canDequeueNextSignallingMessage) {
- syncLog.wrap("dequeue message", log => {
const message = connection.queuedSignallingMessages.shift()!;
- if (message === newMessage) {
- log.set("isNewMsg", true);
- hasNewMessageBeenDequeued = true;
- }
+ const isNewMsg = message === newMessage;
+ hasNewMessageBeenDequeued = hasNewMessageBeenDequeued || isNewMsg;
+ syncLog.wrap(isNewMsg ? "process message" : "dequeue message", log => {
const seq = message.content?.seq;
log.set("seq", seq);
+ log.set("type", message.type);
// ignore items in the queue that should not be handled and prevent
// the lastProcessedSeqNr being corrupted with the `seq` for other call ids
// XXX: Not needed anymore when seq is scoped to call_id
@@ -411,7 +412,6 @@ export class Member {
log.refDetached(item);
connection.lastProcessedSeqNr = seq;
} else {
- log.set("type", message.type);
log.set("ignored", true);
connection.lastIgnoredSeqNr = seq;
}
| 7 |
diff --git a/generators/server/templates/src/main/java/package/config/SecurityConfiguration.java.ejs b/generators/server/templates/src/main/java/package/config/SecurityConfiguration.java.ejs @@ -165,6 +165,9 @@ public class SecurityConfiguration {
// @formatter:off
http
.csrf()
+<%_ if (devDatabaseTypeH2Any) { _%>
+ .ignoringAntMatchers("/h2-console/**")
+<%_ } _%>
<%_ if ((authenticationTypeOauth2 || authenticationTypeSession) && !applicationTypeMicroservice) { _%>
.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse())
.and()
| 8 |
diff --git a/src/index.js b/src/index.js @@ -562,6 +562,10 @@ class Offline {
const contentTypesThatRequirePayloadParsing = ['application/json', 'application/vnd.api+json'];
if (contentTypesThatRequirePayloadParsing.includes(contentType)) {
try {
+ if (!request.payload || request.payload.length < 1) {
+ request.payload = '{}';
+ }
+
request.payload = JSON.parse(request.payload);
}
catch (err) {
| 12 |
diff --git a/app/shared/components/Rex/Lend/Manage.js b/app/shared/components/Rex/Lend/Manage.js @@ -25,8 +25,8 @@ class RexLendManage extends PureComponent<Props> {
actions.clearSystemState();
- actions.getTable('eosio', settings.account, 'rexbal');
- actions.getTable('eosio', settings.account, 'rexfund');
+ actions.getTableByBounds('eosio', 'eosio', 'rexbal', settings.account, settings.account);
+ actions.getTableByBounds('eosio', 'eosio', 'rexfund', settings.account, settings.account);
}
confirmTransaction = () => {
const { actions } = this.props;
@@ -52,8 +52,9 @@ class RexLendManage extends PureComponent<Props> {
const { tables, settings } = this.props;
- const fundedBalance = (get(tables, `tables.eosio.${settings.account}.fundbal`) || [])[0];
- const rexBalance = (get(tables, `tables.eosio.${settings.account}.rexfund`) || [])[0];
+ const rexBalance = get(tables, `eosio.eosio.rexbal.${settings.account}.rows.0.balance`, '0.0000 EOS');
+ const fundedBalance = get(tables, `eosio.eosio.rexfund.${settings.account}.rows.0.balance`, '0.0000 EOS');
+
let notEnoughBalance = false;
if (name === 'amountToBuy') {
@@ -115,8 +116,8 @@ class RexLendManage extends PureComponent<Props> {
(!amountToBuy && transactionType === 'buy') ||
(!amountToSell && transactionType === 'sell');
const displaySuccessMessage = !saveDisabled;
- const rexBalance = (get(tables, `tables.eosio.${settings.account}.rexbal`) || [])[0];
- const fundedBalance = (get(tables, `tables.eosio.${settings.account}.fundbal`) || [])[0];
+ const rexBalance = get(tables, `eosio.eosio.rexbal.${settings.account}.rows.0.balance`, '0.0000 EOS');
+ const fundedBalance = get(tables, `eosio.eosio.rexfund.${settings.account}.rows.0.balance`, '0.0000 EOS');
const confirmationPage = confirming ? (
<React.Fragment>
@@ -183,14 +184,14 @@ class RexLendManage extends PureComponent<Props> {
t(
'rex_interface_rent_funding_balance',
{
- fundedBalance: Number(fundedBalance || 0).toFixed(4),
+ fundedBalance: Number(parseFloat(fundedBalance) || 0).toFixed(4),
chainSymbol: connection.chainSymbol
}
)
}
</p>
<p>
- {t('rex_interface_rent_rex_balance', { rexBalance: Number(rexBalance || 0).toFixed(4) })}
+ {t('rex_interface_rent_rex_balance', { rexBalance: Number(parseFloat(rexBalance) || 0).toFixed(4) })}
</p>
</Message>
<Form success={displaySuccessMessage}>
| 4 |
diff --git a/src/components/NavigationTabBar.js b/src/components/NavigationTabBar.js // @flow
import React from "react";
-import { Animated, StyleSheet, View } from "react-native";
+import { Animated, StyleSheet, View, Text } from "react-native";
import type { TabScene, _TabBarBottomProps } from "react-navigation";
import SafeAreaView from "react-native-safe-area-view";
import {
@@ -61,72 +61,44 @@ class NavigationTabBar extends React.PureComponent<_TabBarBottomProps> {
};
renderLabel = (scene: TabScene) => {
- const { position, navigation } = this.props;
- const { index, focused } = scene;
- const { routes } = navigation.state;
-
- // Prepend '-1', so there are always at least 2 items in inputRange
- const inputRange = [-1, ...routes.map((x, i) => i)];
- // const color = "#666666";
- // position.interpolate({
- // inputRange,
- // outputRange: inputRange.map(
- // inputIndex =>
- // inputIndex === index ? tabBarActiveLabelColor : tabBarLabelColor
- // )
- // });
+ const { focused } = scene;
const color = focused ? tabBarActiveLabelColor : tabBarLabelColor;
const label = this.props.getLabelText(scene);
return (
- <Animated.Text
+ <Text
numberOfLines={1}
style={[styles.label, { color }]}
allowFontScaling
>
{label}
- </Animated.Text>
+ </Text>
);
};
renderIcon = (scene: TabScene) => {
- const { position, navigation } = this.props;
const { route, index, focused } = scene;
- const { routes } = navigation.state;
-
- // Prepend '-1', so there are always at least 2 items in inputRange
- const inputRange = [-1, ...routes.map((x, i) => i)];
const opacity = focused ? 1 : 0;
const opacitInv = focused ? 0 : 1;
- // const activeOpacity = 1;
- // position.interpolate({
- // inputRange,
- // outputRange: inputRange.map(i => (i === index ? 1 : 0))
- // });
- // const inactiveOpacity = 0.5
- // position.interpolate({
- // inputRange,
- // outputRange: inputRange.map(i => (i === index ? 0 : 1))
- // });
// We render the icon twice at the same position on top of each other:
// active and inactive one, so we can fade between them.
return (
<View style={styles.iconContainer}>
- <Animated.View style={[styles.icon, { opacity }]}>
+ <View style={[styles.icon, { opacity }]}>
{this.props.renderIcon({
route,
index,
focused: true
})}
- </Animated.View>
- <Animated.View style={[styles.icon, { opacity: opacitInv }]}>
+ </View>
+ <View style={[styles.icon, { opacity: opacitInv }]}>
{this.props.renderIcon({
route,
index,
focused: false
})}
- </Animated.View>
+ </View>
</View>
);
};
| 2 |
diff --git a/src/userscript.ts b/src/userscript.ts @@ -21060,10 +21060,15 @@ var $$IMU_EXPORT$$;
};
var candidates_sorter = function(a, b) {
+ // thanks to robindz on github: https://github.com/qsniyg/maxurl/issues/1000
+ // https://www.instagram.com/p/B7AXLsplw6Y/
+ // https://www.instagram.com/p/B8BFW14Ffwz/
+ if (!a.is_unprocessed || !b.is_unprocessed) {
if (a.is_unprocessed)
return -1;
if (b.is_unprocessed)
return 1;
+ }
return b.size - a.size;
};
@@ -34316,6 +34321,15 @@ var $$IMU_EXPORT$$;
if (newsrc) return newsrc;
}
+ if (domain === "community.akamai.steamstatic.com") {
+ // https://community.akamai.steamstatic.com/public/images/sharedfiles/game_highlight_activethumb_blue.png
+ if (/\/public\/+images\/+sharedfiles\/+game_highlight_activethumb/.test(src))
+ return {
+ url: src,
+ bad: "mask"
+ };
+ }
+
if ((domain_nosub === "steamstatic.com" && domain.match(/cdn\.[^.]*\.steamstatic\.com/)) ||
// https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/2c/2c43030ea4900ebfcd3c42a4e665e9d926b488ef_medium.jpg
// https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/2c/2c43030ea4900ebfcd3c42a4e665e9d926b488ef_full.jpg
| 7 |
diff --git a/generators/server/templates/src/main/java/package/config/SecurityConfiguration.java.ejs b/generators/server/templates/src/main/java/package/config/SecurityConfiguration.java.ejs @@ -334,8 +334,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Bean
JwtDecoder jwtDecoder() {
- NimbusJwtDecoderJwkSupport jwtDecoder = (NimbusJwtDecoderJwkSupport)
- JwtDecoders.fromOidcIssuerLocation(issuerUri);
+ NimbusJwtDecoder jwtDecoder = (NimbusJwtDecoder) JwtDecoders.fromOidcIssuerLocation(issuerUri);
OAuth2TokenValidator<Jwt> audienceValidator = new AudienceValidator(jHipsterProperties.getSecurity().getOauth2().getAudience());
OAuth2TokenValidator<Jwt> withIssuer = JwtValidators.createDefaultWithIssuer(issuerUri);
| 4 |
diff --git a/src/components/screens/ChapterScreen/LanguageMenu/FrameworkMenu.js b/src/components/screens/ChapterScreen/LanguageMenu/FrameworkMenu.js @@ -218,34 +218,27 @@ const FrameworkMenu = ({
<TooltipMessage
title={`Available translations for the ${startCase(
framework
- )} version of the tutorial`}
- />
- </Item>
- <Item>
- {availableTranslations.map((translation, frameworkIndex) => {
- const isLastFramework = frameworkIndex + 1 === availableTranslations.length;
- return (
- <TooltipMessage
+ )} version of the tutorial:`}
desc={
<>
+ {availableTranslations.map(translationLanguage => (
<Link
- key={translation}
+ key={translationLanguage}
to={getChapterInOtherLanguage(
framework,
- translation,
+ translationLanguage,
guide,
chapter,
firstChapter,
translationPages
)}
>
- {getLanguageName(translation)}
+ {getLanguageName(translationLanguage)}
</Link>
+ ))}
</>
}
- links={
- isLastFramework
- ? [
+ links={[
{
title: 'Help us translate',
href: contributeUrl,
@@ -253,12 +246,8 @@ const FrameworkMenu = ({
rel: 'noopener',
className: 'help-translate-link',
},
- ]
- : null
- }
+ ]}
/>
- );
- })}
</Item>
</>
</TooltipList>
| 3 |
diff --git a/src/geo/ui/search/search.js b/src/geo/ui/search/search.js @@ -77,33 +77,16 @@ var Search = View.extend({
},
_onResult: function (places) {
- var center;
var address = this.$('.js-textInput').val();
if (places && places.length > 0) {
var location = places[0];
- var validBBox = this._isBBoxValid(location);
- center = location.center;
- // Get BBox if possible and set bounds
- if (validBBox) {
- var s = parseFloat(location.boundingbox.south);
- var w = parseFloat(location.boundingbox.west);
- var n = parseFloat(location.boundingbox.north);
- var e = parseFloat(location.boundingbox.east);
-
- this.model.setBounds([ [ s, w ], [ n, e ] ]);
- }
-
- // In the case that BBox is not valid, let's
- // center the map using the position
- if (!validBBox) {
- this.model.setCenter(center);
+ this.model.setCenter(location.center);
this.model.setZoom(this._getZoomByCategory(location.type));
- }
if (this.options.searchPin) {
- this._createSearchPin(center, address);
+ this._createSearchPin(location.center, address);
}
}
},
@@ -121,16 +104,6 @@ var Search = View.extend({
return this._ZOOM_BY_CATEGORY['default'];
},
- _isBBoxValid: function (location) {
- return false;
- if (!location.boundingbox ||
- location.boundingbox.south === location.boundingbox.north ||
- location.boundingbox.east === location.boundingbox.west) {
- return false;
- }
- return true;
- },
-
_createSearchPin: function (position, address) {
this._destroySearchPin();
this._createPin(position, address);
| 8 |
diff --git a/token-metadata/0x82f39cD08A942f344CA7E7034461Cc88c2009199/metadata.json b/token-metadata/0x82f39cD08A942f344CA7E7034461Cc88c2009199/metadata.json "symbol": "AZBI",
"address": "0x82f39cD08A942f344CA7E7034461Cc88c2009199",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/lib/command.js b/lib/command.js @@ -46,7 +46,12 @@ async function apibCmd(input, cmd) {
async function jsonCmd(input, cmd) {
const result = await load(input);
- const data = JSON.stringify(result, null, 2);
+
+ if (!result) {
+ throw new Error(`ERROR: unable to parse input: ${input}`);
+ }
+
+ const data = JSON.stringify(result.data, null, 2);
writeOutput(cmd.output, data);
@@ -70,6 +75,10 @@ function lintMap(result) {
async function lintCmd(input, cmd) {
const result = await lint(input);
+ if (!result) {
+ throw new Error(`ERROR: unable to parse input: ${input}`);
+ }
+
if (result.length === 0) {
if (!cmd.quiet) {
console.log("OK");
@@ -147,6 +156,11 @@ function parseBinding(str) {
async function htmlBundle(input, cmd) {
const result = await load(input);
+
+ if (!result) {
+ throw new Error(`ERROR: unable to parse input: ${input}`);
+ }
+
return await renderHtmlBundle(result, cmd);
}
@@ -155,8 +169,12 @@ async function htmlBundleSpinner(input, cmd) {
spinner.start();
try {
- return load(input)
+ return await load(input)
.then(result => {
+ if (!result) {
+ throw new Error(`ERROR: unable to parse input: ${input}`);
+ }
+
spinner.text = "Rendering HTML documentation";
spinner.color = "yellow";
return renderHtmlBundle(result, cmd);
| 9 |
diff --git a/docs/articles/documentation/test-api/intercepting-http-requests/attaching-hooks-to-tests-and-fixtures.md b/docs/articles/documentation/test-api/intercepting-http-requests/attaching-hooks-to-tests-and-fixtures.md @@ -24,7 +24,7 @@ Parameter | Type | Description
--------- | ---- | ------------
`hooks` | RequestHook subclass | A `RequestLogger`, `RequestMock` or custom user-defined hook.
-The `fixture.requestHooks`, `test.requestHooks` `t.addRequestHooks` and `t.removeRequestHooks` methods use the rest operator which allows you to pass multiple hooks as parameters or arrays of hooks.
+The `fixture.requestHooks`, `test.requestHooks`, `t.addRequestHooks` and `t.removeRequestHooks` methods use the rest operator which allows you to pass multiple hooks as parameters or arrays of hooks.
```js
import { RequestLogger, RequestMock } from 'testcafe';
| 0 |
diff --git a/src/lime/_internal/backend/html5/HTML5Application.hx b/src/lime/_internal/backend/html5/HTML5Application.hx @@ -23,11 +23,12 @@ import lime.ui.Window;
@:access(lime.ui.Window)
class HTML5Application
{
- private var gameDeviceCache = new Map<Int, GameDeviceData>();
private var accelerometer:Sensor;
private var currentUpdate:Float;
private var deltaTime:Float;
private var framePeriod:Float;
+ private var gameDeviceCache = new Map<Int, GameDeviceData>();
+ private var hidden:Bool;
private var lastUpdate:Float;
private var nextUpdate:Float;
private var parent:Application;
@@ -441,12 +442,40 @@ class HTML5Application
switch (event.type)
{
case "focus":
+ if (hidden)
+ {
parent.window.onFocusIn.dispatch();
parent.window.onActivate.dispatch();
+ hidden = false;
+ }
case "blur":
+ if (!hidden)
+ {
+ parent.window.onFocusOut.dispatch();
+ parent.window.onDeactivate.dispatch();
+ hidden = true;
+ }
+
+ case "visibilitychange":
+ if (Browser.document.hidden)
+ {
+ if (!hidden)
+ {
parent.window.onFocusOut.dispatch();
parent.window.onDeactivate.dispatch();
+ hidden = true;
+ }
+ }
+ else
+ {
+ if (hidden)
+ {
+ parent.window.onFocusIn.dispatch();
+ parent.window.onActivate.dispatch();
+ hidden = false;
+ }
+ }
case "resize":
parent.window.__backend.handleResizeEvent(event);
| 12 |
diff --git a/README.md b/README.md @@ -164,7 +164,7 @@ Following the steps in [this blog post](http://blog.apps.npr.org/2015/03/02/app-
You should only need to do this once.
-**NPR users:** The environment variables you need have already been generated, so you can skip the first step. Contact Alyson, David or Chris for more information.
+**NPR users:** The environment variables you need have already been generated, so you can skip the first step. Contact Alyson or Juan for more information.
Run The Project
| 3 |
diff --git a/workshops/reinvent2019/readme.md b/workshops/reinvent2019/readme.md @@ -70,7 +70,14 @@ Important note: If you are attending re:Invent 2019, step 1 is already complete
Admin user password which you will need to perform. After the Content Designer UI Admin password is reset to something you know, you can
jump along to Step 2.
-### Resetting the Content Designer UI Password
+If you are not attending re:Invent 2019, please follow the steps in Workshop Setup below.
+
+### Resetting the Content Designer UI Password for Event Engine Supplied AWS Account
+
+Login to the event engine supplied AWS Account and provision a Cloud9 IDE. If you have not used Cloud9 IDE before,
+these steps are also covered in Step 3. Within the Cloud9 console open a new Terminal window. From this window
+perform the following steps.
+
```
aws cognito-idp list-user-pools --max-results 25
```
@@ -79,8 +86,9 @@ This outputs json. Looks for something similar to
"Id": "us-east-1_tdc8N6oyZ",
"Name": "UserPool-QNA-[basedOnStackName]"
```
-Next execute the command below. You can use any password you wish. This password will be required when
-you login to the designerUI.
+Next execute the command below. You can specify any password you wish although it should be at least 8 characters in length,
+have at least one uppercase letter, one lowercase letter, one number, and one special character. An acceptable password is "MyPassword2019_" as shown in the
+command. This password will be required when you login to the designer UI later in step 2.
```
aws cognito-idp admin-set-user-password --user-pool-id [YourUserPoolIdFromJson] --username Admin --password MyPassword2019_
```
| 3 |
diff --git a/src/backends/git-gateway/implementation.js b/src/backends/git-gateway/implementation.js @@ -55,9 +55,9 @@ export default class GitGateway extends GitHubBackend {
.then((token) => {
let validRole = true;
if (this.accept_roles && this.accept_roles.length > 0) {
+ const userRoles = get(jwtDecode(token), 'app_metadata.roles', []);
validRole = intersection(userRoles, this.accept_roles).length > 0;
}
- const userRoles = get(jwtDecode(token), 'app_metadata.roles', []);
if (validRole) {
const userData = {
name: user.user_metadata.name || user.email.split('@').shift(),
| 1 |
diff --git a/modules/clipboard.js b/modules/clipboard.js @@ -153,9 +153,10 @@ class Clipboard extends Module {
select.parentNode.removeChild(select);
});
const div = this.quill.root.ownerDocument.createElement('div');
+ div.style.whiteSpace = 'pre-wrap';
div.appendChild(fragment);
e.clipboardData.setData('text/plain', text);
- e.clipboardData.setData('text/html', div.innerHTML);
+ e.clipboardData.setData('text/html', div.outerHTML);
}
onPaste(e, range) {
| 9 |
diff --git a/src/components/App/index.js b/src/components/App/index.js @@ -59,7 +59,7 @@ function App(props) {
</StoryCard>
<StoryCard title="How Response Time Varies Across The City" collectionId="emergency-response" cardId="response-time-varies">
<p className="Description">
- How Response Time Varies Across The City <br/> Scatter Plot <br/> Scatter Plot <br/> Scatter Plot <br/> Scatter Plot <br/> Scatter Plot <br/> Scatter Plot
+ How Response Time Varies Across The City
</p>
<ResponseTimeVaries />
</StoryCard>
| 2 |
diff --git a/templates/master/routes/bot/alexa.vm b/templates/master/routes/bot/alexa.vm "languageModel": {
"invocationName": "q and a",
"types": [
+ ## {
+ ## "name": "EXAMPLE_QUESTIONS",
+ ## "values": [
+ ## #foreach( $utterance in $utterances)
+ ## {"name":{
+ ## "value":"$utterance"
+ ## }}#if( $foreach.hasNext ),#end
+ ## #end
+ ## ]
+ ## }
{
"name": "EXAMPLE_QUESTIONS",
"values": [
- #foreach( $utterance in $utterances)
- {"name":{
- "value":"$utterance"
- }}#if( $foreach.hasNext ),#end
- #end
+ {
+ "name": {
+ "value": "this is required"
+ }
+ }
]
}
],
{
"name": "AMAZON.RepeatIntent"
},
+ {
+ "name": "AMAZON.FallbackIntent"
+ },
{
"name": "AMAZON.CancelIntent"
}
| 3 |
diff --git a/lib/elastic_model/acts_as_elastic_model.rb b/lib/elastic_model/acts_as_elastic_model.rb @@ -181,7 +181,7 @@ module ActsAsElasticModel
end
end
- def result_to_will_paginate_collection(result, options)
+ def result_to_will_paginate_collection(result, options={})
try_and_try_again( PG::ConnectionBad, sleep: 20 ) do
begin
records = options[:keep_es_source] ?
| 1 |
diff --git a/articles/connections/passwordless/ios-magic-link.md b/articles/connections/passwordless/ios-magic-link.md @@ -25,8 +25,8 @@ iOS needs to know which domains your application handles. To configure this:
## Pass Callbacks to the Auth0 Lock Library
-:::panel-info
-If you've already implemented [Lock iOS](https://auth0.com/blog/how-to-implement-slack-like-login-on-ios-with-auth0/), you have already configured callbacks to the Auth0 Lock Library.
+::: panel-info Callbacks to the Autho Lock Library
+If you've already implemented [Lock v1 for iOS](https://auth0.com/blog/how-to-implement-slack-like-login-on-ios-with-auth0/), you have already configured callbacks to the Auth0 Lock Library.
:::
In the `AppDelegate` class of your iOS application, include the following code to pass callbacks to Auth0 Lock:
| 3 |
diff --git a/src/angular/projects/spark-core-angular/src/lib/components/sprk-footer/sprk-footer.component.spec.ts b/src/angular/projects/spark-core-angular/src/lib/components/sprk-footer/sprk-footer.component.spec.ts @@ -40,7 +40,7 @@ describe('SparkFooterComponent', () => {
component.additionalClasses = 'sprk-u-pam sprk-u-man';
fixture.detectChanges();
expect(component.getClasses()).toEqual(
- 'sprk-o-CenteredColumn sprk-o-Stack sprk-o-Stack--medium sprk-u-pam sprk-u-man'
+ 'sprk-o-CenteredColumn sprk-o-Stack sprk-o-Stack--misc-b sprk-u-pam sprk-u-man'
);
});
| 3 |
diff --git a/README.md b/README.md @@ -111,7 +111,7 @@ The **#matrix** project has some environments that important to define.
ROOMS_SOURCE=ENVIRONMENT
-5. There is a config that define the rooms of The **#matrix**, if you prefer you can generate the unique id per room [here](https://www.uuidgenerator.net), to define this:
+5. There is a config that define the rooms of The **#matrix**, If you want to customize your rooms or add and remove, you have to config a `ROOMS_SOURCE=ENVIRONMENT` and config `ROOMS_DATA` like the example:
ROOMS_DATA=[
| 7 |
diff --git a/src/injected/safe-globals-injected.js b/src/injected/safe-globals-injected.js @@ -33,7 +33,10 @@ export const isString = val => typeof val === 'string';
export const getOwnProp = (obj, key, defVal) => {
// obj may be a Proxy that throws in has() or its getter throws
try {
- if (hasOwnProperty(obj, key)) defVal = obj[key];
+ // hasOwnProperty is Reflect.has which throws for non-objects
+ if (obj && typeof obj === 'object' && hasOwnProperty(obj, key)) {
+ defVal = obj[key];
+ }
} catch (e) { /* NOP */ }
return defVal;
};
| 1 |
diff --git a/source/selection/SelectionController.js b/source/selection/SelectionController.js @@ -75,6 +75,12 @@ const SelectionController = Class({
return !!this._selectedStoreKeys[ storeKey ];
},
+ getSelectedRecords ( store ) {
+ return this.get( 'selectedStoreKeys' ).map(
+ storeKey => store.getRecordFromStoreKey( storeKey )
+ );
+ },
+
// ---
selectStoreKeys ( storeKeys, isSelected, _selectionId ) {
| 0 |
diff --git a/macros/spells/greenFlameBlade.js b/macros/spells/greenFlameBlade.js const lastArg = args[args.length - 1];
// macro vars
-const sequencerFile = "jb2a.particles.outward.greenyellow.01.05";
-const sequencerScale = 1.5;
const damageType = "fire";
+const freeSequence = "jb2a.particles.outward.greenyellow.01.05";
+const patreonPrimary = "jb2a.dagger.melee.fire.green"
+const patreonSecondary = "jb2a.chain_lightning.secondary.green";
+
+const baseAutoAnimation = {
+ version: 4,
+ killAnim: false,
+ options: {
+ ammo: false,
+ menuType: "weapon",
+ variant: "01",
+ enableCustom: false,
+ repeat: null,
+ delay: null,
+ scale: null,
+ customPath: "",
+ },
+ override: true,
+ autoOverride: {
+ enable: false,
+ variant: "01",
+ color: "darkorangepurple",
+ repeat: null,
+ delay: null,
+ scale: null,
+ },
+ sourceToken: {
+ enable: false,
+ },
+ targetToken: {
+ enable: false,
+ },
+ levels3d: {
+ type: "",
+ },
+ macro: {
+ enable: false,
+ },
+ animLevel: false,
+ animType: "melee",
+ animation: "shortsword",
+ color: "green",
+ audio: {
+ a01: {
+ enable: false,
+ },
+ a02: {
+ enable: false,
+ },
+ },
+ preview: false,
+ meleeSwitch: {
+ switchType: "on",
+ returning: false,
+ },
+ explosions: {
+ enable: false,
+ },
+};
+
// sequencer caller for effects on target
-function sequencerEffect(target, file, scale) {
- if (game.modules.get("sequencer")?.active && hasProperty(Sequencer.Database.entries, "jb2a")) {
- new Sequence().effect().file(file).atLocation(target).scaleToObject(scale).play();
+function sequencerEffect(target, origin = null) {
+ if (game.modules.get("sequencer")?.active && Sequencer.Database.entryExists(patreonSecondary)) {
+ new Sequence()
+ .effect()
+ .atLocation(origin)
+ .reachTowards(target)
+ .file(Sequencer.Database.entryExists(patreonSecondary))
+ .repeats(1, 200, 300)
+ .randomizeMirrorY()
+ .play();
+ } else {
+ const attackAnimation = Sequencer.Database.entryExists(patreonPrimary) ? patreonPrimary : freeSequence;
+ new Sequence()
+ .effect()
+ .file(Sequencer.Database.entryExists(attackAnimation))
+ .atLocation(target)
+ .play();
}
}
@@ -25,7 +97,10 @@ async function findTargets(originToken, range, includeOrigin = false, excludeAct
function weaponAttack(caster, sourceItemData, origin, target) {
const chosenWeapon = DAE.getFlag(caster, "greenFlameBladeChoice");
- const filteredWeapons = caster.items.filter((i) => i.data.type === "weapon" && i.data.data.equipped);
+ const filteredWeapons = caster.items.filter((i) =>
+ i.data.type === "weapon" && i.data.data.equipped &&
+ i.data.data.activation.type ==="action" && i.data.data.actionType == "mwak"
+ );
const weaponContent = filteredWeapons
.map((w) => {
const selected = chosenWeapon && chosenWeapon == w.id ? " selected" : "";
@@ -64,7 +139,14 @@ function weaponAttack(caster, sourceItemData, origin, target) {
});
setProperty(weaponCopy, "flags.itemacro", duplicate(sourceItemData.flags.itemacro));
setProperty(weaponCopy, "flags.midi-qol.effectActivation", false);
+ const autoAnimationsAdjustments = duplicate(baseAutoAnimation);
+ autoAnimationsAdjustments.animation = weaponCopy.data.baseItem ? weaponCopy.data.baseItem : "shortsword";
+ const autoanimations = hasProperty(weaponCopy, "flags.autoanimations")
+ ? mergeObject(getProperty(weaponCopy, "flags.autoanimations"), autoAnimationsAdjustments)
+ : autoAnimationsAdjustments;
+ setProperty(weaponCopy, "flags.autoanimations", autoanimations);
const attackItem = new CONFIG.Item.documentClass(weaponCopy, { parent: caster });
+ console.warn(attackItem);
const options = { showFullCard: false, createWorkflow: true, configureDialog: true };
await MidiQOL.completeItemRoll(attackItem, options);
},
@@ -116,7 +198,7 @@ async function attackNearby(originToken, ignoreIds) {
isCritical: false,
}
);
- sequencerEffect(targetToken, sequencerFile, sequencerScale);
+ sequencerEffect(targetToken, originToken);
},
},
Cancel: {
@@ -136,5 +218,6 @@ if (args[0].tag === "OnUse"){
} else if (args[0] === "on") {
const targetToken = canvas.tokens.get(lastArg.tokenId);
const casterId = lastArg.efData.flags.casterId;
+ console.log(`Checking ${targetToken.name} for nearby tokens for Grren-Flame Blade from ${casterId}`);
await attackNearby(targetToken, [casterId]);
}
| 7 |
diff --git a/docs/content/examples/charts/column/Stacked.js b/docs/content/examples/charts/column/Stacked.js -import { HtmlElement, Grid, Repeater } from 'cx/widgets';
+import { HtmlElement, Grid, Repeater, Content, Tab } from 'cx/widgets';
import { Controller, KeySelection } from 'cx/ui';
import { Svg, Rectangle, Text } from 'cx/svg';
import { Gridlines, NumericAxis, CategoryAxis, Chart, Column, Legend } from 'cx/charts';
@@ -112,7 +112,12 @@ export const Stacked = <cx>
</div>
</div>
- <CodeSnippet putInto="code" fiddle="9AHWzPA2">{`
+ <Content name="code">
+ <div>
+ <Tab value-bind="$page.code.tab" tab="controller" mod="code"><code>Controller</code></Tab>
+ <Tab value-bind="$page.code.tab" tab="chart" mod="code" default><code>Chart</code></Tab>
+ </div>
+ <CodeSnippet fiddle="9AHWzPA2" visible-expr="{$page.code.tab}=='controller'">{`
var categories = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
class PageController extends Controller {
@@ -130,7 +135,8 @@ export const Stacked = <cx>
})));
}
}
- ...
+ `}</CodeSnippet>
+ <CodeSnippet fiddle="9AHWzPA2" visible-expr="{$page.code.tab}=='chart'">{`
<Svg style="width:600px; height:400px;">
<Chart offset="20 -20 -40 40" axes={{ x: { type: CategoryAxis }, y: { type: NumericAxis, vertical: true, snapToTicks: 0 } }}>
<Gridlines/>
@@ -206,6 +212,7 @@ export const Stacked = <cx>
</Svg>
<Legend />
`}</CodeSnippet>
+ </Content>
</CodeSplit>
</Md>
</cx>;
| 0 |
diff --git a/src/scss/components/_layout.scss b/src/scss/components/_layout.scss @@ -72,7 +72,11 @@ body,
}
.docs-o-Grid--three-col {
- grid-template-columns: repeat(auto-fit, minmax(310px, 425px));
+ grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
+
+ @media (min-width: $doc-site-mobile-breakpoint) {
+ grid-template-columns: repeat(3, minmax(310px, 1fr));
+ }
}
.docs-o-Grid--large {
| 3 |
diff --git a/assets/js/googlesitekit/data/create-existing-tag-store.test.js b/assets/js/googlesitekit/data/create-existing-tag-store.test.js @@ -53,14 +53,13 @@ describe( 'createExistingTagStore store', () => {
tagMatchers,
isValidTag: isValidPropertyID,
} );
- registry.registerStore( STORE_NAME, Data.combineStores(
+ store = registry.registerStore( STORE_NAME, Data.combineStores(
Data.commonStore,
createExistingTagStore( ...STORE_ARGS, {
tagMatchers,
isValidTag: isValidPropertyID,
} )
) );
- store = registry.stores[ STORE_NAME ].store;
registry.dispatch( CORE_SITE ).receiveSiteInfo( { homeURL } );
} );
| 12 |
diff --git a/src/og/control/ruler/Ruler.js b/src/og/control/ruler/Ruler.js @@ -34,7 +34,7 @@ class Ruler extends Control {
oninit() {
this._rulerScene.bindPlanet(this.planet);
this. createMenuBtn();
- btnClickHandler('ruler-menu-btn', null, null, '#ruler-menu-icon'); // btn_id, dialog_id, dialog_selector, icon_id
+ btnClickHandler('og-ruler-menu-btn', null, null, '#ruler-menu-icon'); // btn_id, dialog_id, dialog_selector, icon_id
}
| 1 |
diff --git a/Serene/Serene.Core/Serene.Core.csproj b/Serene/Serene.Core/Serene.Core.csproj <PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>Serene.Core</AssemblyName>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
+ <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<DotNetSergen>dotnet sergen</DotNetSergen>
<DotNetSergen Condition=" '$(TargetFramework)' == 'net461' AND Exists('..\..\Serenity\Serenity.CodeGenerator\bin\$(Configuration)\$(TargetFramework)\dotnet-sergen.exe')">..\..\Serenity\Serenity.CodeGenerator\bin\$(Configuration)\$(TargetFramework)\dotnet-sergen.exe</DotNetSergen>
<DotNetSergen Condition=" '$(TargetFramework)' == 'netcoreapp2.0' AND Exists('..\..\Serenity\Serenity.CodeGenerator\bin\$(Configuration)\$(TargetFramework)\dotnet-sergen.dll')">dotnet ..\..\Serenity\Serenity.CodeGenerator\bin\$(Configuration)\$(TargetFramework)\dotnet-sergen.dll</DotNetSergen>
<PlatformTarget>x64</PlatformTarget>
<DefineConstants>$(DefineConstants);ASPNETCORE</DefineConstants>
</PropertyGroup>
+ <ItemGroup>
+ <SiteLessSources Include="wwwroot\content\**\*.less"></SiteLessSources>
+ <TSCSources Include="Modules\**\*.ts;Imports\**\*.ts"></TSCSources>
+ <TSCOutputs Include="wwwroot\Scripts\site\*.js"></TSCOutputs>
+ </ItemGroup>
<Target Name="PrecompileScript" BeforeTargets="BeforeBuild">
<Exec Command="$(DotNetSergen) mvc" ContinueOnError="true" />
<Exec Command="$(DotNetSergen) clienttypes" ContinueOnError="true" />
+ <Message Text="Installing NPM packages..." Importance="high"></Message>
<Exec Command="npm install" />
</Target>
- <Target Name="PostcompileScript" AfterTargets="Build">
+ <Target Name="CompileSiteLess" AfterTargets="Build" Inputs="@(SiteLessSources)" Outputs="wwwroot\content\site\site.css">
+ <Message Text="Compiling site.less..." Importance="high"></Message>
<Exec Command="node_modules/.bin/lessc ./wwwroot/Content/site/site.less ./wwwroot/content/site/site.css" ContinueOnError="true" />
+ </Target>
+ <Target Name="PostcompileScript" AfterTargets="Build">
<Exec Command="$(DotNetSergen) servertypings" ContinueOnError="true" />
+ </Target>
+ <Target Name="CompileTSC" AfterTargets="Build" Inputs="@(TSCSources)" Outputs="@(TSCOutputs)">
+ <Message Text="Executing TypeScript compiler..." Importance="high"></Message>
<Exec Command="node_modules/.bin/tsc -p ./tsconfig.json" ContinueOnError="true" />
</Target>
<ItemGroup>
| 7 |
diff --git a/packages/app-project/stores/YourStats.js b/packages/app-project/stores/YourStats.js @@ -5,7 +5,7 @@ import { GraphQLClient } from 'graphql-request'
import asyncStates from '@zooniverse/async-states'
import { panoptes } from '@zooniverse/panoptes-js'
-export const statsClient = new GraphQLClient('https://stats.zooniverse.org/graphql')
+export const statsClient = new GraphQLClient('https://graphql-stats.zooniverse.org/graphql')
const YourStats = types
.model('YourStats', {
| 4 |
diff --git a/src/client/styles/scss/_override-bootstrap-variables.scss b/src/client/styles/scss/_override-bootstrap-variables.scss @@ -27,6 +27,10 @@ $red: #ff0a54 !default;
//== Typography
//
+$gray-400: $gray-300;
+$gray-500: $gray-400;
+$gray-600: $gray-500;
+
//## Font, line-height, and color for body text, headings, and more.
$font-family-sans-serif: Lato, -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
$font-family-serif: Georgia, "Times New Roman", Times, serif;
| 14 |
diff --git a/lib/container.js b/lib/container.js @@ -8,7 +8,6 @@ const recorder = require('./recorder');
const event = require('./event');
const WorkerStorage = require('./workerStorage');
const store = require('./store');
-global.codecept_dir = global.codecept_dir || process.cwd();
let container = {
helpers: {},
| 13 |
diff --git a/codegens/swift/lib/swift.js b/codegens/swift/lib/swift.js @@ -14,6 +14,9 @@ var _ = require('./lodash'),
* @returns {String} request body in the desired format
*/
function parseRawBody (body, mode, trim) {
+ if (_.isEmpty(body)) {
+ return '';
+ }
var bodySnippet;
bodySnippet = `let parameters = ${sanitize(body, mode, trim)}\n`;
bodySnippet += 'let postData = parameters.data(using: .utf8)';
@@ -29,6 +32,9 @@ function parseRawBody (body, mode, trim) {
* @returns {String} request body in the desired format
*/
function parseGraphQL (body, mode, trim) {
+ if (_.isEmpty(body)) {
+ return '';
+ }
let query = body.query,
graphqlVariables, bodySnippet;
try {
@@ -54,6 +60,9 @@ function parseGraphQL (body, mode, trim) {
* @returns {String} request body in the desired format
*/
function parseURLEncodedBody (body, mode, trim) {
+ if (_.isEmpty(body)) {
+ return '';
+ }
var payload, bodySnippet;
payload = _.reduce(body, function (accumulator, data) {
if (!data.disabled) {
@@ -150,7 +159,7 @@ function parseFile () {
* @returns {String} utility function for getting request body in the desired format
*/
function parseBody (body, trim, indent) {
- if (!_.isEmpty(body) && !_.isEmpty(body[body.mode])) {
+ if (!_.isEmpty(body)) {
switch (body.mode) {
case 'urlencoded':
return parseURLEncodedBody(body.urlencoded, body.mode, trim);
| 9 |
diff --git a/spec/models/asset_spec.rb b/spec/models/asset_spec.rb @@ -60,7 +60,7 @@ describe Asset do
end
def local_path(asset)
- local_url = asset.public_url.gsub(/http:\/\/#{CartoDB.account_host}\/uploads/,'')
+ local_url = asset.public_url.gsub(/\/uploads/,'')
Carto::Conf.new.public_uploaded_assets_path + local_url
end
| 1 |
diff --git a/app/shared/containers/Global/Blockchain/Dropdown.js b/app/shared/containers/Global/Blockchain/Dropdown.js @@ -21,9 +21,11 @@ class GlobalBlockchainDropdown extends Component<Props> {
render() {
const {
blockchains,
+ chainIds,
disabled,
fluid,
initialize,
+ onSelect,
selected,
selection,
settings,
@@ -58,6 +60,7 @@ class GlobalBlockchainDropdown extends Component<Props> {
const isEnabled = settings.blockchains.includes(b.chainId);
const isCurrent = b.chainId === blockchain.chainId;
const isPinned = (hasPins && pinnedBlockchains.includes(b.chainId));
+ const isSelectable = (!chainIds || chainIds.includes(b.chainId));
// Return all chains while initializing
if (
initialize
@@ -67,6 +70,7 @@ class GlobalBlockchainDropdown extends Component<Props> {
return (
!isCurrent
&& isEnabled
+ && isSelectable
&& (
!hasPins
|| isPinned
@@ -80,7 +84,7 @@ class GlobalBlockchainDropdown extends Component<Props> {
props: {
image,
key: b.chainId,
- onClick: () => this.swapBlockchain(b.chainId),
+ onClick: () => ((onSelect) ? onSelect(b.chainId) : this.swapBlockchain(b.chainId)),
text: b.name,
value: b.chainId,
},
@@ -103,7 +107,7 @@ class GlobalBlockchainDropdown extends Component<Props> {
)
: t('dropdown_select_blockchain')
}
- {(blockchain.testnet)
+ {(blockchain.testnet && !chainIds)
? (
<Label color="orange" content="Testnet" size="large" />
)
| 11 |
diff --git a/app/controllers/copy_controller.js b/app/controllers/copy_controller.js @@ -113,6 +113,13 @@ function handleCopyTo (logger) {
})
.on('end', () => responseEnded = true);
+ pgstream.on('error', (err) => {
+ metrics.end(null, err);
+ pgstream.unpipe(res);
+
+ return next(err);
+ });
+
pgstream
.on('data', data => metrics.addSize(data.length))
.pipe(res);
| 9 |
diff --git a/hyperapp.d.ts b/hyperapp.d.ts @@ -10,7 +10,7 @@ export interface VNode<Attributes = {}> {
nodeName: string
attributes?: Attributes
children: Array<VNode | string>
- key: string
+ key: string | number
}
/** A Component is a function that returns a custom VNode or View.
| 7 |
diff --git a/UserReviewBanHelper.user.js b/UserReviewBanHelper.user.js // @description Display users' prior review bans in review, Insert review ban button in user review ban history page, Load ban form for user if user ID passed via hash
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 2.1.1
+// @version 2.2
//
// @include */review/close*
// @include */review/reopen*
const reloadPage = () => location.reload(true);
+ const pluralize = s => s.length != 0 ? 's' : '';
// Solution from https://stackoverflow.com/a/24719409/584192
// Load ban form for user if passed via querystring
var params = location.hash.substr(1).split('|');
var uid = params[0];
+ var posts = params[1].split(';').map(v => v.replace(/\/?review\//, '')).sort();
+
+ // Remove similar consecutive review types from urls
+ var prevType = null;
+ posts = posts.map(v => {
+ if(v.includes(prevType + '/')) v = v.replace(/\D+/g, '');
+ else prevType = v.split('/')[0];
+ return v;
+ });
+
+ // Fit as many URLs as possible into message
+ var posttext = '';
+ var i = posts.length;
+ do {
+ posttext = posts.slice(0, i--).join(", ");
+ }
+ while(i > 1 && 150 + location.hostname.length + posttext.length > 300);
// Completed loading lookup
$(document).ajaxComplete(function(event, xhr, settings) {
// Insert ban message if review link found
if(typeof params[1] !== 'undefined') {
- var banMsg = `Your review(s) on https://${location.hostname}${params[1]} wasn't helpful. Please review the history of the post(s) and consider how choosing a different action would help achieve that outcome more quickly.`;
+ var banMsg = `Your review${pluralize(posts)} on https://${location.hostname}/review/${posttext} wasn't helpful. Do review the history of the post${pluralize(posts)} and consider which action would achieve that outcome more quickly.`;
$('textarea[name=explanation]').val(banMsg);
}
| 11 |
diff --git a/app/models/listed_taxon.rb b/app/models/listed_taxon.rb @@ -583,7 +583,7 @@ class ListedTaxon < ActiveRecord::Base
def self.earliest_and_latest_ids(options)
earliest_id = nil
latest_id = nil
- return [ nil, nil ] unless options[:filters]
+ return [ nil, nil, 0 ] unless options[:filters]
search_params = { filters: options[:filters].dup }
search_params[:size] = 1
if options[:range_filters]
@@ -617,19 +617,19 @@ class ListedTaxon < ActiveRecord::Base
}
}
))
- rescue Elasticsearch::Transport::Transport::Errors::NotFound,
- Elasticsearch::Transport::Transport::Errors::BadRequest => e
- rs = nil
- Logstasher.write_exception(e, reference: "ListedTaxon.earliest_and_latest_ids failed")
- Rails.logger.error "[Error] ListedTaxon::earliest_and_latest_ids failed: #{ e }"
- Rails.logger.error "Backtrace:\n#{ e.backtrace[0..30].join("\n") }\n..."
- end
if rs && rs.total_entries > 0 && rs.response.aggregations
earliest_id = rs.response.aggregations.earliest.hits.hits[0]._source.id
latest_id = rs.response.aggregations.latest.hits.hits[0]._source.id
total = rs.total_entries
end
[ earliest_id, latest_id, total || 0]
+ rescue Elasticsearch::Transport::Transport::Errors::NotFound,
+ Elasticsearch::Transport::Transport::Errors::BadRequest => e
+ Logstasher.write_exception(e, reference: "ListedTaxon.earliest_and_latest_ids failed")
+ Rails.logger.error "[Error] ListedTaxon::earliest_and_latest_ids failed: #{ e }"
+ Rails.logger.error "Backtrace:\n#{ e.backtrace[0..30].join("\n") }\n..."
+ [ nil, nil, 0 ]
+ end
end
def self.update_cache_columns_for(lt)
| 5 |
diff --git a/docs/package.json b/docs/package.json "scripts": {
"dev": "npm run compile-css-js && jigsaw build",
"compile-css-js": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
- "watch-css": "chokidar 'tailwind.js' 'source/_assets/_less/**/*' --initial=true -c 'npm run compile-css-js'",
+ "watch-css": "chokidar 'tailwind.js' 'source/_assets/less/**/*' --initial=true -c 'npm run compile-css-js'",
"watch-templates": "chokidar 'source/**/*' --initial=true -c 'jigsaw build'",
"watch": "concurrently \"npm run watch-css\" \"npm run watch-templates\"",
"prod": "npm run production && jigsaw build production",
| 1 |
diff --git a/src/public/common/search/Search.js b/src/public/common/search/Search.js @@ -26,7 +26,7 @@ const groupOptions = (searchData, inputValue) => {
},
{
label: 'Top Hit',
- options: searchData.topHit
+ options: searchData.topHit.hits[0]
? [
{
...searchData.topHit.hits[0],
| 9 |
diff --git a/token-metadata/0xBD6467a31899590474cE1e84F70594c53D628e46/metadata.json b/token-metadata/0xBD6467a31899590474cE1e84F70594c53D628e46/metadata.json "symbol": "KAI",
"address": "0xBD6467a31899590474cE1e84F70594c53D628e46",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/package-lock.json b/package-lock.json }
},
"tar": {
- "version": "6.1.8",
- "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.8.tgz",
- "integrity": "sha512-sb9b0cp855NbkMJcskdSYA7b11Q8JsX4qe4pyUAfHp+Y6jBjJeek2ZVlwEfWayshEIwlIzXx0Fain3QG9JPm2A==",
+ "version": "6.1.11",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz",
+ "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==",
"dev": true,
"requires": {
"chownr": "^2.0.0",
| 3 |
diff --git a/layouts/partials/fragments/contact.html b/layouts/partials/fragments/contact.html </div>
<div class="row">
<div class="col-12">
- {{ if not $contact.posturl }}
- <form class="contact" action="https://formspree.io/{{ $contact.email }}" method="POST" name="sentMessage" id="{{ $contact.formName | default "contactForm" }}">
- {{ else }}
- <form class="contact" action="{{ $contact.postURL }}" method="POST" name="sentMessage" id="{{ $contact.formName | default "contactForm" }}">
- {{ end }}
+ <form class="contact" action="
+ {{- if not $contact.netlify -}}
+ {{- $postUrl := $contact.posturl | default $contact.email -}}
+ {{- printf "https://formspree.io/%s" $postUrl -}}
+ {{- end -}}
+ " method="POST" name="
+ {{- if $contact.netlify -}}
+ netlify
+ {{- else -}}
+ sentMessage
+ {{- end -}}
+ " id="{{ $contact.formName | default "contactForm" }}">
<div class="row py-3">
<div class="col-md-6">
{{ with $contact.fields.name }}
| 0 |
diff --git a/server/tests/classes/jumpDrive.test.js b/server/tests/classes/jumpDrive.test.js // TODO: Figure out why we need import { Engine } what to do about it
-import { Engine } from '../../src/classes/engine';
+import { Engine } from "../../src/classes/engine";
import { System } from "../../src/classes/generic";
-import JumpDrive from '../../src/classes/jumpDrive';
+import JumpDrive from "../../src/classes/jumpDrive";
-describe('JumpDrive', () => {
-
- test('should throw if called without the \'new\' operator', () => {
- expect(() => { const j = JumpDrive(); }).toThrow(/Cannot call a class as a function/);
+describe("JumpDrive", () => {
+ test("should throw if called without the 'new' operator", () => {
+ expect(() => {
+ const j = JumpDrive();
+ }).toThrow(/Cannot call a class as a function/);
});
- test('should extend System', () => {
+ test("should extend System", () => {
expect(new JumpDrive()).toBeInstanceOf(System);
- })
+ });
- describe('constructor', () => {
- test('should set default parameters', () => {
+ describe("constructor", () => {
+ test("should set default parameters", () => {
const j = new JumpDrive();
- expect(j.name).toBe('Jump Drive');
- expect(j.class).toBe('JumpDrive');
- expect(j.type).toBe('JumpDrive');
- expect(j.displayName).toBe('Jump Drive');
+ expect(j.name).toBe("Jump Drive");
+ expect(j.class).toBe("JumpDrive");
+ expect(j.type).toBe("JumpDrive");
+ expect(j.displayName).toBe("Jump Drive");
expect(j.simulatorId).toBeNull();
expect(j.power).toEqual({
power: 5,
powerLevels: [10, 16, 22, 28, 34, 40],
- defaultLevel: 0
+ defaultLevel: -1
});
expect(j.env).toBe(0);
expect(j.activated).toBe(false);
});
});
- describe('stealth factor', () => {
- test.skip('should calculate the stealth factor', () => {
+ describe("stealth factor", () => {
+ test.skip("should calculate the stealth factor", () => {
const j = new JumpDrive();
expect(j.stress).toBe(0);
- j.setSectorOffset('fore', 0.3);
- j.setSectorOffset('aft', 0.4);
- j.setSectorOffset('starboard', 0.5);
- j.setSectorOffset('port', 0.6);
+ j.setSectorOffset("fore", 0.3);
+ j.setSectorOffset("aft", 0.4);
+ j.setSectorOffset("starboard", 0.5);
+ j.setSectorOffset("port", 0.6);
expect(j.stealthFactor).toBe(0);
j.setActivated(true);
expect(j.stealthFactor).toBe(0.45);
});
});
- describe('stress', () => {
- test('should calculate the stress', () => {
+ describe("stress", () => {
+ test("should calculate the stress", () => {
const j = new JumpDrive();
expect(j.stress).toBe(0);
- j.addSectorOffset('fore', 0.3);
- j.addSectorOffset('aft', 0.4);
- j.addSectorOffset('starboard', 0.5);
- j.addSectorOffset('port', 0.6);
+ j.addSectorOffset("fore", 0.3);
+ j.addSectorOffset("aft", 0.4);
+ j.addSectorOffset("starboard", 0.5);
+ j.addSectorOffset("port", 0.6);
expect(j.stress).toBeCloseTo(0.45, 6);
});
});
- describe('break', () => {
- test('should deactivate jump drive', () => {
+ describe("break", () => {
+ test("should deactivate jump drive", () => {
const j = new JumpDrive({ activated: true });
expect(j.activated).toBe(true);
j.break();
expect(j.activated).toBe(false);
});
- test('should call super', () => {
+ test("should call super", () => {
const j = new JumpDrive();
expect(j.damage.damaged).toBe(false);
j.break();
@@ -73,8 +74,8 @@ describe('JumpDrive', () => {
});
});
- describe('setPower', () => {
- test('should decrease env to the level indicated by the power', () => {
+ describe("setPower", () => {
+ test("should decrease env to the level indicated by the power", () => {
const j = new JumpDrive();
j.setEnv(5);
@@ -96,7 +97,7 @@ describe('JumpDrive', () => {
expect(j.env).toBe(1);
});
- test('should call super', () => {
+ test("should call super", () => {
const j = new JumpDrive();
j.setPower(30);
expect(j.power.power).toBe(30);
| 1 |
diff --git a/lib/assets/javascripts/unpoly/layer.coffee.erb b/lib/assets/javascripts/unpoly/layer.coffee.erb @@ -39,6 +39,7 @@ up.layer = do ->
targets: ['[up-content~=drawer]']
backdrop: true
position: 'left'
+ size: 'medium'
openAnimation: (layer) ->
switch layer.position
when 'left' then 'move-from-left'
@@ -50,9 +51,11 @@ up.layer = do ->
modal:
targets: ['[up-content~=modal]']
backdrop: true
+ size: 'medium'
popup:
targets: ['[up-content~=popup]']
position: 'bottom'
+ size: 'medium'
align: 'left'
history: false
| 12 |
diff --git a/src/traces/violin/layout_attributes.js b/src/traces/violin/layout_attributes.js 'use strict';
var boxLayoutAttrs = require('../box/layout_attributes');
+var extendFlat = require('../../lib').extendFlat;
-// TODO update descriptions
module.exports = {
- violinmode: boxLayoutAttrs.boxmode,
- violingap: boxLayoutAttrs.boxgap,
- violingroupgap: boxLayoutAttrs.boxgroupgap
+ violinmode: extendFlat({}, boxLayoutAttrs.boxmode, {
+ description: [
+ 'Determines how violins at the same location coordinate',
+ 'are displayed on the graph.',
+ 'If *group*, the violins are plotted next to one another',
+ 'centered around the shared location.',
+ 'If *overlay*, the violins are plotted over one another,',
+ 'you might need to set *opacity* to see them multiple violins.'
+ ].join(' ')
+ }),
+ violingap: extendFlat({}, boxLayoutAttrs.boxgap, {
+ description: [
+ 'Sets the gap (in plot fraction) between violins of',
+ 'adjacent location coordinates.'
+ ].join(' ')
+ }),
+ violingroupgap: extendFlat({}, boxLayoutAttrs.boxgroupgap, {
+ description: [
+ 'Sets the gap (in plot fraction) between violins of',
+ 'the same location coordinate.'
+ ].join(' ')
+ })
};
| 3 |
diff --git a/assets/js/modules/analytics/datastore/accounts.test.js b/assets/js/modules/analytics/datastore/accounts.test.js @@ -288,8 +288,6 @@ describe( 'modules/analytics accounts', () => {
),
);
- // expect( matchedProperty ).toEqual( undefined );
-
expect( store.getState().matchedProperty ).toMatchObject( matchedProperty );
expect( registry.select( STORE_NAME ).getAccountID() ).toBe( matchedProperty.accountId );
expect( registry.select( STORE_NAME ).getPropertyID() ).toBe( matchedProperty.id );
| 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.