code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/js/mexc3.js b/js/mexc3.js @@ -421,6 +421,8 @@ module.exports = class mexc3 extends Exchange {
'FLUX1': 'FLUX', // switched places
'FLUX': 'FLUX1', // switched places
'FREE': 'FreeRossDAO', // conflict with FREE Coin
+ 'GMT': 'GMT Token', // Conflict with GMT (STEPN)
+ 'STEPN': 'GMT', // Conflict with GMT Token
'HERO': 'Step Hero', // conflict with Metahero
'MIMO': 'Mimosa',
'PROS': 'Pros.Finance', // conflict with Prosper
| 13 |
diff --git a/src/components/message/style.js b/src/components/message/style.js @@ -16,8 +16,9 @@ const Bubble = styled.div`
box-shadow: ${props =>
props.hashed
- ? `inset 0 0 0 2px ${props.theme.bg.default}, inset 0 0 0 4px ${props
- .theme.brand.default}`
+ ? `inset 0 0 0 2px ${props.theme.bg.default}, inset 0 0 0 4px ${
+ props.theme.brand.default
+ }`
: ''};
margin-top: 4px;
margin-bottom: ${props => (props.hashed ? '4px' : '0')};
@@ -279,8 +280,9 @@ export const Image = styled.img`
margin-bottom: ${props => (props.hashed ? '4px' : '0')};
box-shadow: ${props =>
props.hashed
- ? `0 0 0 2px ${props.theme.bg.default}, 0 0 0 4px ${props.theme.brand
- .default}`
+ ? `0 0 0 2px ${props.theme.bg.default}, 0 0 0 4px ${
+ props.theme.brand.default
+ }`
: ''};
`;
@@ -304,4 +306,10 @@ export const Line = styled.pre`
${monoStack};
`;
-export const Paragraph = styled.p`line-height: 1.5;`;
+export const Paragraph = styled.p`
+ line-height: 1.5;
+
+ & ~ & {
+ margin-top: 1em;
+ }
+`;
| 7 |
diff --git a/assets/sass/components/global/_googlesitekit-gathering-data-notice.scss b/assets/sass/components/global/_googlesitekit-gathering-data-notice.scss * limitations under the License.
*/
-.googlesitekit-plugin {
-
- .googlesitekit-gathering-data-notice {
- text-transform: lowercase;
-
- &.googlesitekit-gathering-data-notice--has-style {
+@mixin notice-text {
span {
color: $c-jumbo;
}
}
+}
+
+.googlesitekit-plugin {
+
+ .googlesitekit-gathering-data-notice {
+ text-transform: lowercase;
+
&.googlesitekit-gathering-data-notice--has-style-small {
+ @include notice-text;
+
span {
font-size: 13px;
line-height: 16px;
}
&.googlesitekit-gathering-data-notice--has-style-default {
+
+ @include notice-text;
+
position: relative;
text-align: center;
}
&.googlesitekit-gathering-data-notice--has-style-overlay {
+
+ @include notice-text;
+
align-items: center;
display: flex;
height: 100%;
width: 100%;
}
}
- }
+
}
#wpadminbar {
| 2 |
diff --git a/src/styles/transitions.spec.js b/src/styles/transitions.spec.js @@ -96,5 +96,40 @@ describe('transitions', () => {
transitions.create('size', { fffds: 'value' });
assert.strictEqual(consoleErrorStub.callCount, 1, 'Wrong number of calls of warning()');
});
+
+ it('should return zero when not passed arguments', () => {
+ const zeroHeightDuration = transitions.getAutoHeightDuration();
+ assert.strictEqual(zeroHeightDuration, 0);
+ });
+
+ it('should return zero when passed undefined', () => {
+ const zeroHeightDuration = transitions.getAutoHeightDuration(undefined);
+ assert.strictEqual(zeroHeightDuration, 0);
+ });
+
+ it('should return zero when passed null', () => {
+ const zeroHeightDuration = transitions.getAutoHeightDuration(null);
+ assert.strictEqual(zeroHeightDuration, 0);
+ });
+
+ it('should return NaN when passed a negative number', () => {
+ const zeroHeightDurationNegativeOne = transitions.getAutoHeightDuration(-1);
+ assert.strictEqual(isNaN(zeroHeightDurationNegativeOne), true);
+ const zeroHeightDurationSmallNegative = transitions.getAutoHeightDuration(-0.000001);
+ assert.strictEqual(isNaN(zeroHeightDurationSmallNegative), true);
+ const zeroHeightDurationBigNegative = transitions.getAutoHeightDuration(-100000);
+ assert.strictEqual(isNaN(zeroHeightDurationBigNegative), true);
+ });
+
+ it('should return values for pre-calculated positive examples', () => {
+ let zeroHeightDuration = transitions.getAutoHeightDuration(14);
+ assert.strictEqual(zeroHeightDuration, 159);
+ zeroHeightDuration = transitions.getAutoHeightDuration(100);
+ assert.strictEqual(zeroHeightDuration, 239);
+ zeroHeightDuration = transitions.getAutoHeightDuration(0.0001);
+ assert.strictEqual(zeroHeightDuration, 46);
+ zeroHeightDuration = transitions.getAutoHeightDuration(100000);
+ assert.strictEqual(zeroHeightDuration, 6685);
+ });
});
});
| 0 |
diff --git a/resources/functions/handler.js b/resources/functions/handler.js @@ -1104,8 +1104,6 @@ const handler = {
// });
//do anything with stereo pcm here
var pcmData = Buffer.from(new Int8Array(interleave16(Int16Array.from(newaudio[0], x => convert(x)), Int16Array.from(newaudio[1], x => convert(x))).buffer));
-
- console.log('oof')
if (!headerSent) {
const header = new Buffer.alloc(44)
| 2 |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -128,6 +128,10 @@ Sometimes you are only making changes to a single compendium, such as `alien-arc
This also works for other compendiums, naturally. Just replace `alien-archives` with another pack.
This also only works with 1 pack at a time; adding more pack arguments will be ignored. If this is desired functionality, you can request it in Discord.
+### Copy Localizations
+
+Another neat script is `npm run copyLocalization`. This automatically sorts localization files and copies any new strings from the edited file to the others. This means you only have to do localizations once (and you don't need to be too precise with where you put them), then you run the script, and the others are taken care of, ready for a kind contributor to translate them into that language into the future.
+
### Getting Foundry Intellisense in Visual Studio Code
If you would like some basic Intellisense for the Foundry types when using Visual Studio Code, all you have to do is copy `foundry.js` into the projects root folder. Once you do this, restart VS Code, and you should now see proper Intellisense.
| 0 |
diff --git a/src/components/VBALoadingIndicator.js b/src/components/VBALoadingIndicator.js @@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import {Image, StyleSheet, View} from 'react-native';
import styles from '../styles/styles';
+import CONST from '../CONST';
import withLocalize, {withLocalizePropTypes} from './withLocalize';
import Text from './Text';
import compose from '../libs/compose';
@@ -26,7 +27,7 @@ const VBALoadingIndicator = ({translate, visible}) => visible && (
<View style={[StyleSheet.absoluteFillObject, styles.fullScreenLoading]}>
<View style={[styles.pageWrapper]}>
<Image
- source={{uri: 'https://d2k5nsl2zxldvw.cloudfront.net/images/icons/emptystates/emptystate_reviewing.gif'}}
+ source={{uri: `${CONST.CLOUDFRONT_URL}/images/icons/emptystates/emptystate_reviewing.gif`}}
style={[
styles.loadingVBAAnimation,
]}
| 4 |
diff --git a/token-metadata/0x658bBe318260AB879af701043B18F7e8c4dAf448/metadata.json b/token-metadata/0x658bBe318260AB879af701043B18F7e8c4dAf448/metadata.json "symbol": "AETH",
"address": "0x658bBe318260AB879af701043B18F7e8c4dAf448",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/index.d.ts b/index.d.ts @@ -96,7 +96,13 @@ export interface FormDataVisitorHelpers {
}
export interface SerializerVisitor {
- (value: any, key: string | number, path: null | Array<string | number>, helpers: FormDataVisitorHelpers): boolean;
+ (
+ this: GenericFormData,
+ value: any,
+ key: string | number,
+ path: null | Array<string | number>,
+ helpers: FormDataVisitorHelpers
+ ): boolean;
}
export interface SerializerOptions {
| 3 |
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js @@ -86,13 +86,13 @@ export default class ServicesStore extends Store {
}
@computed get allDisplayed() {
- return this.stores.settings.all.service.showDisabledServices ? this.all : this.enabled;
+ return this.stores.settings.all.app.showDisabledServices ? this.all : this.enabled;
}
// This is just used to avoid unnecessary rerendering of resource-heavy webviews
@computed get allDisplayedUnordered() {
const services = this.allServicesRequest.execute().result || [];
- return this.stores.settings.all.service.showDisabledServices ? services : services.filter(service => service.isEnabled);
+ return this.stores.settings.all.app.showDisabledServices ? services : services.filter(service => service.isEnabled);
}
@computed get filtered() {
@@ -434,7 +434,7 @@ export default class ServicesStore extends Store {
}
@action _reorder({ oldIndex, newIndex }) {
- const showDisabledServices = this.stores.settings.all.service.showDisabledServices;
+ const showDisabledServices = this.stores.settings.all.app.showDisabledServices;
const oldEnabledSortIndex = showDisabledServices ? oldIndex : this.all.indexOf(this.enabled[oldIndex]);
const newEnabledSortIndex = showDisabledServices ? newIndex : this.all.indexOf(this.enabled[newIndex]);
@@ -554,7 +554,10 @@ export default class ServicesStore extends Store {
_logoutReaction() {
if (!this.stores.user.isLoggedIn) {
- this.actions.settings.remove({ key: 'activeService' });
+ this.actions.settings.remove({
+ type: 'service',
+ key: 'activeService',
+ });
this.allServicesRequest.invalidate().reset();
}
}
@@ -562,7 +565,7 @@ export default class ServicesStore extends Store {
_shareSettingsWithServiceProcess() {
this.actions.service.sendIPCMessageToAllServices({
channel: 'settings-update',
- args: this.stores.settings.all,
+ args: this.stores.settings.all.app,
});
}
| 12 |
diff --git a/packages/frontend/src/redux/reducers/sign/index.js b/packages/frontend/src/redux/reducers/sign/index.js @@ -2,7 +2,8 @@ import BN from 'bn.js';
import { utils, transactions as transaction } from 'near-api-js';
import { handleActions } from 'redux-actions';
-import { parseTransactionsToSign, signAndSendTransactions, setSignTransactionStatus, makeAccountActive, multiplyGas, multiplyGasXXX } from '../../actions/account';
+import { parseTransactionsToSign, setSignTransactionStatus, makeAccountActive, multiplyGas, multiplyGasXXX } from '../../actions/account';
+import { handleSignTransaction } from '../../slices/sign';
const MULTIPLY_TX_GAS_BY = 2;
@@ -41,27 +42,19 @@ const sign = handleActions({
.length
};
},
- [signAndSendTransactions]: (state, { error, payload, ready }) => {
-
- if (!ready) {
- return {
- ...state
- };
- }
-
- if (error) {
- return {
+ [handleSignTransaction.pending]: (state, { error, payload, ready }) => ({
...state,
- status: 'error',
- error: payload
- };
- }
-
- return {
+ status: 'in-progress'
+ }),
+ [handleSignTransaction.fulfilled]: (state, { error, payload, ready }) => ({
...state,
status: 'success'
- };
- },
+ }),
+ [handleSignTransaction.rejected]: (state, { error, payload, ready }) => ({
+ ...state,
+ status: 'error',
+ error: error
+ }),
[setSignTransactionStatus]: (state, { payload }) => {
return {
...state,
| 9 |
diff --git a/src/components/postBoost/postBoostView.js b/src/components/postBoost/postBoostView.js @@ -3,7 +3,6 @@ import { injectIntl } from 'react-intl';
import { Text, View, ScrollView, TouchableOpacity, Alert } from 'react-native';
import { WebView } from 'react-native-webview';
import get from 'lodash/get';
-import ActionSheet from 'react-native-actionsheet';
import Autocomplete from '@esteemapp/react-native-autocomplete-input';
import { Icon, TextInput } from '..';
import { hsOptions } from '../../constants/hsOptions';
@@ -21,6 +20,7 @@ import { Modal } from '../modal';
// Styles
import styles from './postBoostStyles';
+import { OptionsModal } from '../atoms';
class BoostPostScreen extends PureComponent {
/* Props
@@ -240,7 +240,7 @@ class BoostPostScreen extends PureComponent {
</View>
</ScrollView>
</View>
- <ActionSheet
+ <OptionsModal
ref={this.startActionSheet}
options={[
intl.formatMessage({ id: 'alert.confirm' }),
| 14 |
diff --git a/utils/validators-info.js b/utils/validators-info.js @@ -64,15 +64,15 @@ async function showProposalsTable(near) {
result.current_proposals.forEach((p) => proposals.set(p.account_id, p));
const combinedProposals = combineValidatorsAndProposals(result.current_validators, proposals);
const expectedSeatPrice = validators.findSeatPrice(combinedProposals, result.numSeats);
- console.log(`Proposals (total: ${proposals.size})`);
- console.log(`Expected seat price = ${utils.format.formatNearAmount(expectedSeatPrice, 0)}`);
+ console.log(`Proposals for the epoch after next (total: ${proposals.size}, expected seat price = ${utils.format.formatNearAmount(expectedSeatPrice, 0)})`);
const proposalsTable = new AsciiTable();
+ proposalsTable.setHeading('Status', 'Validator', 'Stake => New Stake');
combinedProposals.sort((a, b) => -new BN(a.stake).cmp(new BN(b.stake))).forEach((proposal) => {
let kind = '';
if (new BN(proposal.stake).gte(expectedSeatPrice)) {
- kind = proposals.has(proposal.account_id) ? 'New' : 'Rollover';
+ kind = proposals.has(proposal.account_id) ? 'Proposal(Accepted)' : 'Rollover';
} else {
- kind = proposals.has(proposal.account_id) ? 'Declined' : 'Kicked out';
+ kind = proposals.has(proposal.account_id) ? 'Proposal(Declined)' : 'Kicked out';
}
let stake_fmt = utils.format.formatNearAmount(proposal.stake, 0);
if (currentValidators.has(proposal.account_id) && proposals.has(proposal.account_id)) {
@@ -85,6 +85,8 @@ async function showProposalsTable(near) {
);
});
console.log(proposalsTable.toString());
+ console.log("Expected seat price is calculated based on observed so far proposals and validators.");
+ console.log("It can change from new proposals or some validators going offline.");
console.log("Note: this currently doesn't account for offline kickouts and rewards for current epoch");
}
| 1 |
diff --git a/packages/vue/src/components/organisms/SfTabs/SfTabs.stories.js b/packages/vue/src/components/organisms/SfTabs/SfTabs.stories.js @@ -63,6 +63,7 @@ storiesOf("Organisms|Tabs", module)
<pre>
<code>
import { SfTabs } from "@storefront-ui/vue"
+ import { SfTabs } from "@storefront-ui/vue"
</code>
</pre>
${generateStorybookTable(scssTableConfig, "SCSS variables")}
| 13 |
diff --git a/layout/explore/explore-datasets/list/list-item/styles.scss b/layout/explore/explore-datasets/list/list-item/styles.scss position: relative;
min-height: 130px;
border-radius: 4px;
- box-shadow: 0 0px 0px 1px rgba(0,0,0,.03), 0 1px 6px 0 rgba(0,0,0,.1);
+ box-shadow: 0 0 0 1px rgba(0,0,0,0.05), 0 1px 6px 0 rgba(0,0,0,.0);
box-sizing: border-box;
transition: all $animation-time-2 $ease-in-out-sine;
cursor: pointer;
background-color: white;
&:hover {
- box-shadow: 0 20px 30px rgba($black, .2);
+ box-shadow: 0 0 0 1px rgba(0,0,0,0.05), 0 20px 30px rgba(0,0,0,.2);
+ -webkit-transform: translateY(-4px);
transform: translateY(-4px);
+ z-index: 9999;
}
&.-active {
border: none;
- box-shadow: 0 0 0 0, 0 0 0 2px $dark-pink;
+ box-shadow: 0 0 0 2px $dark-pink, 0 1px 6px 0 rgba(0,0,0,.0);
+
+ &:hover {
+ box-shadow: 0 0 0 2px $dark-pink, 0 20px 30px rgba(0,0,0,.2);
+ }
}
// Chart
| 7 |
diff --git a/token-metadata/0xd07D9Fe2d2cc067015E2b4917D24933804f42cFA/metadata.json b/token-metadata/0xd07D9Fe2d2cc067015E2b4917D24933804f42cFA/metadata.json "symbol": "TOL",
"address": "0xd07D9Fe2d2cc067015E2b4917D24933804f42cFA",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/web/tfjsexample2.html b/web/tfjsexample2.html <script src="https://bioimagesuiteweb.github.io/unstableapp/webcomponents-lite.js"></script>
<script src="https://bioimagesuiteweb.github.io/unstableapp/jquery.min.js"></script>
<script src="https://bioimagesuiteweb.github.io/unstableapp/bootstrap.min.js"></script>
- <script src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]/dist/tf.min.js"></script>
<script src="../build/web/libbiswasm_wasm.js"></script>
<script src="../build/web/bislib.js"></script>
<link rel="stylesheet" type="text/css" href="../build/web/bislib.css">
| 7 |
diff --git a/apiserver/apiserver/web/views.py b/apiserver/apiserver/web/views.py @@ -725,7 +725,7 @@ def store_user_bot(user_id, intended_user, bot_id):
raise util.APIError(404, message="Bot not found.")
# Check if the user already has a bot compiling
- if bot["compile_status"] not in ("Successful", "Failed"):
+ if bot["compile_status"] not in ("Successful", "Failed", "Disabled"):
raise util.APIError(400, message="Cannot upload new bot until "
"previous one is compiled.")
| 11 |
diff --git a/bl-kernel/security.class.php b/bl-kernel/security.class.php @@ -107,13 +107,6 @@ class Security extends dbJSON
public function getUserIp()
{
- if (getenv('HTTP_X_FORWARDED_FOR')) {
- $ip = getenv('HTTP_X_FORWARDED_FOR');
- } elseif (getenv('HTTP_CLIENT_IP')) {
- $ip = getenv('HTTP_CLIENT_IP');
- } else {
- $ip = getenv('REMOTE_ADDR');
- }
- return $ip;
+ return getenv('REMOTE_ADDR');
}
}
| 2 |
diff --git a/src/middleware/packages/ldp/service.js b/src/middleware/packages/ldp/service.js @@ -23,7 +23,8 @@ module.exports = {
ontologies,
containers,
defaultOptions: defaultContainerOptions
- }
+ },
+ hooks:this.schema.hooksContainer||{}
});
await this.broker.createService(LdpResourceService, {
@@ -31,7 +32,8 @@ module.exports = {
baseUrl,
ontologies,
containers
- }
+ },
+ hooks:this.schema.hooksResource||{}
});
// Only create this service if a cacher is defined
| 11 |
diff --git a/modules/Cockpit/admin.php b/modules/Cockpit/admin.php @@ -201,6 +201,11 @@ $app->on("after", function() {
if ($this->req_is('ajax')) {
$this->response->body = '{"error": "404", "message":"File not found"}';
} else {
+
+ if (!$this->module('cockpit')->getUser()) {
+ $this->reroute('/auth/login');
+ }
+
$this->response->body = $this->view("cockpit:views/errors/404.php");
}
| 7 |
diff --git a/assets/js/components/surveys/SurveyQuestionOpenText.js b/assets/js/components/surveys/SurveyQuestionOpenText.js @@ -80,8 +80,13 @@ const SurveyQuestionOpenText = ( {
onChange={ onChange }
label={ placeholder }
noLabel
+ textarea
>
- <Input id={ instanceID } value={ value } />
+ <Input
+ inputType="textarea"
+ id={ instanceID }
+ value={ value }
+ />
</TextField>
</div>
<div className="googlesitekit-survey__footer">
| 4 |
diff --git a/config/achievements-network.yml b/config/achievements-network.yml @@ -384,84 +384,84 @@ blog:
prata:
name: 'Prata'
ranges:
- I: 6
- II: 7
- III: 8
- IV: 9
- V: 10
+ I: 7
+ II: 9
+ III: 11
+ IV: 13
+ V: 15
xp: 5
ouro:
name: 'Ouro'
ranges:
- I: 11
- II: 12
- III: 13
- IV: 14
- V: 15
+ I: 18
+ II: 21
+ III: 24
+ IV: 27
+ V: 30
xp: 7
platina:
name: 'Platina'
ranges:
- I: 16
- II: 17
- III: 18
- IV: 19
- V: 20
+ I: 34
+ II: 38
+ III: 42
+ IV: 46
+ V: 50
xp: 9
diamante:
name: 'Diamante'
ranges:
- I: 21
- II: 22
- III: 23
- IV: 24
- V: 25
+ I: 55
+ II: 60
+ III: 70
+ IV: 80
+ V: 90
xp: 11
comment:
bronze:
name: 'Bronze'
ranges:
I: 1
- II: 2
- III: 5
- IV: 8
- V: 13
+ II: 4
+ III: 9
+ IV: 16
+ V: 25
xp: 3
prata:
name: 'Prata'
ranges:
- I: 18
- II: 25
- III: 32
- IV: 41
- V: 50
+ I: 36
+ II: 49
+ III: 64
+ IV: 81
+ V: 100
xp: 5
ouro:
name: 'Ouro'
ranges:
- I: 61
- II: 72
- III: 85
- IV: 98
- V: 113
+ I: 121
+ II: 144
+ III: 169
+ IV: 196
+ V: 225
xp: 7
platina:
name: 'Platina'
ranges:
- I: 128
- II: 145
- III: 162
- IV: 181
- V: 200
+ I: 256
+ II: 289
+ III: 324
+ IV: 361
+ V: 400
xp: 9
diamante:
name: 'Diamante'
ranges:
- I: 221
- II: 242
- III: 265
- IV: 288
- V: 313
+ I: 441
+ II: 484
+ III: 529
+ IV: 576
+ V: 625
xp: 11
level:
bronze:
| 3 |
diff --git a/apps/lcars/lcars.app.js b/apps/lcars/lcars.app.js @@ -293,6 +293,13 @@ function draw(){
// Handle steps for graph data
handleSteps();
+ // Clear data
+ var current = new Date();
+ if(current.getHours() == 0 && current.getMinutes() == 0){
+ stepsData = new Array(24).fill(0);
+ hrmData = new Array(24).fill(0);
+ }
+
// Next draw the watch face
g.reset();
g.clearRect(0, 0, g.getWidth(), g.getHeight());
| 12 |
diff --git a/lib/api-ban.js b/lib/api-ban.js @@ -38,6 +38,10 @@ export function getVoiesFantoir(communeCode) {
return _fetch(`${API_BAN_URL}/api-fantoir/communes/${communeCode}/voies`)
}
+export function getVoiesCSVFantoir(communeCode) {
+ return `${API_BAN_URL}/api-fantoir/communes/${communeCode}/voies.csv`
+}
+
export function getVoieFantoir(voieCode) {
return _fetch(`${API_BAN_URL}/api-fantoir/voies/${voieCode}`)
}
| 0 |
diff --git a/src/redux/Checkout/actions.js b/src/redux/Checkout/actions.js @@ -614,6 +614,14 @@ export function checkout(number, expMonth, expYear, cvc) {
dispatch(checkoutRequest())
+ httpClient
+ .get(cart['@id'] + '/payment')
+ .then(payment => {
+
+ if (null !== payment.stripeAccount) {
+ Stripe.setStripeAccount(payment.stripeAccount)
+ }
+
Stripe.createPaymentMethod({
card : {
number,
@@ -648,6 +656,9 @@ export function checkout(number, expMonth, expYear, cvc) {
.catch(e => dispatch(checkoutFailure(e)))
})
.catch(e => dispatch(checkoutFailure(e)))
+
+ })
+ .catch(e => dispatch(checkoutFailure(e)))
}
}
| 9 |
diff --git a/app/models/project_observation.rb b/app/models/project_observation.rb @@ -34,12 +34,16 @@ class ProjectObservation < ActiveRecord::Base
include ActsAsUUIDable
def notify_observer(association)
- if UpdateAction.joins(:update_subscribers).
- where(resource: project, notification: UpdateAction::YOUR_OBSERVATIONS_ADDED).
- where("update_subscribers.subscriber_id = ?", observation.user_id).
- where("update_subscribers.viewed_at IS NULL").count >= 15
- return
- end
+ existing_project_updates = UpdateAction.elastic_paginate(
+ filters: [
+ { term: { notification: UpdateAction::YOUR_OBSERVATIONS_ADDED } },
+ { term: { subscriber_ids: observation.user_id } }
+ ],
+ inverse_filters: [
+ { term: { viewed_subscriber_ids: observation.user_id } }
+ ],
+ per_page: 1 )
+ return if existing_project_updates && existing_project_updates.total_entries >= 15
action_attrs = {
resource: project,
notifier: self,
| 14 |
diff --git a/src/parsers/GmlExtImport.hx b/src/parsers/GmlExtImport.hx @@ -21,7 +21,7 @@ class GmlExtImport {
private static var rxImport = new RegExp((
"^#import[ \t]+"
+ "([\\w.]+\\*?)" // com.pkg[.*]
- + "(?:[ \t]+(?:in|as)[ \t]+(\\w+))?" // in name
+ + "(?:[ \t]+(?:in|as)[ \t]+(\\w+)(?:\\.(\\w+))?)?" // in name
), "");
private static var rxImportFile = new RegExp("^#import[ \t]+(\"[^\"]*\"|'[^']*')", "");
private static var rxPeriod = new RegExp("\\.", "g");
@@ -61,6 +61,11 @@ class GmlExtImport {
if (p < 0) return;
alias = flat.substring(p + 1);
}
+ var ns:String = null;
+ if (mt[3] != null) {
+ ns = alias;
+ alias = mt[3];
+ }
function check(
kind:Dictionary<String>, comp:AceAutoCompleteItems, docs:Dictionary<GmlFuncDoc>
) {
@@ -69,7 +74,7 @@ class GmlExtImport {
var comps = comp.filter(function(comp) {
return comp.name == flat;
});
- imp.add(flat, alias, fdk, comps[0], docs[flat]);
+ imp.add(flat, alias, fdk, comps[0], docs[flat], ns);
return true;
}
if(!check(GmlAPI.stdKind, GmlAPI.stdComp, GmlAPI.stdDoc)
| 11 |
diff --git a/lib/ag-solo/vats/bootstrap.js b/lib/ag-solo/vats/bootstrap.js @@ -33,8 +33,11 @@ function parseArgs(argv) {
return [ROLE, bootAddress, additionalAddresses];
}
-const SCENARIO_1_INDEX = 1;
-const SCENARIO_2_INDEX = 1;
+// Used in scenario 1 for coordinating on an index for registering public keys
+// while requesting provisioning.
+const KEY_REG_INDEX = 1;
+// Used for coordinating on an index in comms for the provisioning service
+const PROVISIONER_INDEX = 1;
export default function setup(syscall, state, helpers) {
return helpers.makeLiveSlots(
@@ -170,13 +173,17 @@ export default function setup(syscall, state, helpers) {
const provisioner = harden({
pleaseProvision(nickname, pubkey) {
console.log('Provisioning', nickname, pubkey);
- return E(vats.provisioning).pleaseProvision(nickname, pubkey);
+ return E(vats.provisioning).pleaseProvision(
+ nickname,
+ pubkey,
+ PROVISIONER_INDEX,
+ );
},
});
// bootAddress holds the pubkey of controller
await E(vats.comms).addEgress(
bootAddress,
- SCENARIO_1_INDEX,
+ KEY_REG_INDEX,
provisioner,
);
break;
@@ -195,7 +202,7 @@ export default function setup(syscall, state, helpers) {
await addRemote(GCI);
const chainProvisioner = await E(vats.comms).addIngress(
GCI,
- SCENARIO_1_INDEX,
+ KEY_REG_INDEX,
);
// Allow web requests from the provisioning server to call our
// provisioner object.
@@ -220,14 +227,14 @@ export default function setup(syscall, state, helpers) {
vats.timer,
);
await addRemote(GCI);
- // todo: this should be the ingressIndex from the provisioner
- const INDEX = 1;
- const demoProvider = await E(vats.comms).addIngress(GCI, INDEX);
+ // addEgress(..., index, ...) is called in vat-provisioning.
+ const demoProvider = await E(vats.comms).addIngress(GCI, PROVISIONER_INDEX);
const { purses, bundle } = await E(demoProvider).getDemoBundle();
await E(vats.http).setPresences(
{ ...bundle, localTimerService },
await createLocalBundle(vats, bundle, purses),
);
+ await setupWalletVat(devices.command, vats.http, vats.wallet);
break;
}
case 'two_chain': {
@@ -244,7 +251,7 @@ export default function setup(syscall, state, helpers) {
});
await Promise.all(
[bootAddress, ...additionalAddresses].map(addr =>
- E(vats.comms).addEgress(addr, SCENARIO_2_INDEX, demoProvider),
+ E(vats.comms).addEgress(addr, PROVISIONER_INDEX, demoProvider),
),
);
console.log(`localchain vats initialized`);
@@ -262,9 +269,10 @@ export default function setup(syscall, state, helpers) {
vats.timer,
);
await addRemote(GCI);
+ // addEgress(..., PROVISIONER_INDEX) is called in case two_chain
const demoProvider = E(vats.comms).addIngress(
GCI,
- SCENARIO_2_INDEX,
+ PROVISIONER_INDEX,
);
// Get the demo bundle from the chain-side provider
const { purses, bundle } = await E(demoProvider).getDemoBundle();
| 10 |
diff --git a/razzle.config.js b/razzle.config.js @@ -8,6 +8,7 @@ const path = require('path');
const autoprefixer = require('autoprefixer');
const makeLoaderFinder = require('razzle-dev-utils/makeLoaderFinder');
const nodeExternals = require('webpack-node-externals');
+const webpack = require('webpack');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const LodashModuleReplacementPlugin = require('lodash-webpack-plugin');
const fs = require('fs');
@@ -121,6 +122,12 @@ module.exports = {
}),
);
config.plugins.unshift(
+ // restrict moment.js locales to en/de
+ // see https://github.com/jmblog/how-to-optimize-momentjs-with-webpack for details
+ new webpack.ContextReplacementPlugin(
+ /moment[/\\]locale$/,
+ /en|de|nl|it/,
+ ),
new LodashModuleReplacementPlugin({
shorthands: true,
cloning: true,
| 8 |
diff --git a/token-metadata/0x85Eee30c52B0b379b046Fb0F85F4f3Dc3009aFEC/metadata.json b/token-metadata/0x85Eee30c52B0b379b046Fb0F85F4f3Dc3009aFEC/metadata.json "symbol": "KEEP",
"address": "0x85Eee30c52B0b379b046Fb0F85F4f3Dc3009aFEC",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/package.json b/package.json "cover": "NODE_ENV=test nyc --reporter html --reporter cobertura --reporter=lcov npm run test cover",
"lint": "scripts/lint.sh",
"lint-docs": "scripts/lint-markdown.sh",
- "publish-prod": "npm run build && npm run test && npm run test dist && scripts/publish.sh prod",
- "publish-beta": "npm run build && npm run test && npm run test dist && scripts/publish.sh beta",
+ "publish-prod": "npm run bootstrap && npm run build && npm run test && npm run test dist && scripts/publish.sh prod",
+ "publish-beta": "npm run bootstrap && npm run build && npm run test && npm run test dist && scripts/publish.sh beta",
"start": "open http://uber.github.io/deck.gl/#/documentation/getting-started/installation?section=running-the-examples",
"test": "scripts/test.sh",
"test-fast": "scripts/test.sh fast",
| 0 |
diff --git a/token-metadata/0x19810559dF63f19cfE88923313250550eDADB743/metadata.json b/token-metadata/0x19810559dF63f19cfE88923313250550eDADB743/metadata.json "symbol": "HOUSE",
"address": "0x19810559dF63f19cfE88923313250550eDADB743",
"decimals": 0,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/web/stylesheets/layout/_io.css b/src/web/stylesheets/layout/_io.css display: flex;
flex-direction: row;
border-bottom: 1px solid var(--primary-border-colour);
+ border-left: 1px solid var(--primary-border-colour);
height: var(--tab-height);
+ width: calc(100% - 75px);
+ clear: none;
}
#input-tabs li,
.input-tab-buttons,
.output-tab-buttons {
- transition: 1s all ease;
- display: none;
+ width: 25px;
+ text-align: center;
+ margin: 0;
+ height: var(--tab-height);
+ line-height: var(--tab-height);
+ font-weight: bold;
+ background-color: var(--title-background-colour);
+ border-bottom: 1px solid var(--primary-border-colour);
+}
+
+.input-tab-buttons:hover,
+.output-tab-buttons:hover {
+ cursor: pointer;
+ background-color: var(--primary-background-colour);
+}
+
+
+#btn-next-input-tab,
+#btn-go-to-input-tab,
+#btn-next-output-tab,
+#btn-go-to-output-tab {
+ float: right;
+}
+
+#btn-previous-input-tab,
+#btn-previous-output-tab {
+ float: left;
}
.input-tab-content,
| 5 |
diff --git a/tests/playground.html b/tests/playground.html @@ -293,7 +293,8 @@ function updateRenderDebugOptions(e) {
function addRenderDebugOptionsCheckboxes() {
var renderDebugConfig = Blockly.blockRendering.Debug.config;
var renderDebugOptionsListEl = document.getElementById('renderDebugOptions');
- Object.keys(renderDebugConfig).forEach(function(optionName) {
+ var optionNames = Object.keys(renderDebugConfig);
+ for (var i = 0, optionName; (optionName = optionNames[i]); i++) {
var optionCheckId = 'RenderDebug' + optionName + 'Check';
var optionLabel = document.createElement('label');
optionLabel.setAttribute('htmlFor', optionCheckId);
@@ -307,7 +308,7 @@ function addRenderDebugOptionsCheckboxes() {
optionLi.appendChild(optionLabel);
optionLi.appendChild(optionCheck);
renderDebugOptionsListEl.appendChild(optionLi);
- });
+ }
}
function changeTheme() {
| 2 |
diff --git a/src/components/AdminPane/HOCs/WithChallengeManagement/WithChallengeManagement.js b/src/components/AdminPane/HOCs/WithChallengeManagement/WithChallengeManagement.js @@ -38,6 +38,7 @@ async function uploadLineByLine(dispatch, ownProps, challenge, geoJSON, removeUn
const lineFile = AsLineReadableFile(geoJSON)
let allLinesRead = false
let totalTasksCreated = 0
+ let removeUnmatched = removeUnmatchedTasks
while (!allLinesRead) {
let taskLines = await lineFile.readLines(100)
@@ -47,8 +48,9 @@ async function uploadLineByLine(dispatch, ownProps, challenge, geoJSON, removeUn
}
await dispatch(
- uploadChallengeGeoJSON(challenge.id, taskLines.join('\n'), true, removeUnmatchedTasks)
+ uploadChallengeGeoJSON(challenge.id, taskLines.join('\n'), true, removeUnmatched)
)
+ removeUnmatched = false
totalTasksCreated += taskLines.length
ownProps.updateCreatingTasksProgress(true, totalTasksCreated)
}
| 12 |
diff --git a/plugins/precise-volume/front.js b/plugins/precise-volume/front.js @@ -3,8 +3,36 @@ const { ipcRenderer, remote } = require("electron");
const { setOptions } = require("../../config/plugins");
function $(selector) { return document.querySelector(selector); }
+let api = $('#movie_player');
module.exports = (options) => {
+ if (api) {
+ firstRun(options);
+ return;
+ }
+
+ const observer = new MutationObserver(() => {
+ api = $('#movie_player');
+ if (api) {
+ observer.disconnect();
+ firstRun(options);
+ }
+ })
+
+ observer.observe(document.documentElement, { childList: true, subtree: true });
+};
+
+
+/** Restore saved volume and setup tooltip */
+function firstRun(options) {
+ if (typeof options.savedVolume === "number") {
+ // Set saved volume as tooltip
+ setTooltip(options.savedVolume);
+
+ if (api.getVolume() !== options.savedVolume) {
+ api.setVolume(options.savedVolume);
+ }
+ }
setupPlaybar(options);
@@ -14,16 +42,12 @@ module.exports = (options) => {
setupGlobalShortcuts(options);
}
- window.addEventListener('load', () => {
const noVid = $("#main-panel")?.computedStyleMap().get("display").value === "none";
injectVolumeHud(noVid);
if (!noVid) {
setupVideoPlayerOnwheel(options);
}
- });
-
- firstRun(options);
-};
+}
function injectVolumeHud(noVid) {
if (noVid) {
@@ -89,28 +113,9 @@ function writeOptions(options) {
}, 1500)
}
-/** Restore saved volume and setup tooltip */
-function firstRun(options) {
- const video = $("video");
- // Those elements load abit after DOMContentLoaded
- if (video) {
- setupVolumeOverride(video, options);
- if (typeof options.savedVolume === "number") {
- // Set saved volume as tooltip
- setTooltip(options.savedVolume);
- }
- } else {
- setTimeout(firstRun, 500, options); // Try again in 500 milliseconds
- }
-}
-
/** Add onwheel event to play bar and also track if play bar is hovered*/
function setupPlaybar(options) {
const playerbar = $("ytmusic-player-bar");
- if (!playerbar) {
- setTimeout(setupPlaybar(options), 200);
- return;
- }
playerbar.addEventListener("wheel", event => {
event.preventDefault();
@@ -153,16 +158,14 @@ function setupSliderObserver(options) {
/** if (toIncrease = false) then volume decrease */
function changeVolume(toIncrease, options) {
- // Need to change both the actual volume and the slider
- const videoStream = $(".video-stream");
// Apply volume change if valid
- const steps = (options.steps || 1) / 100;
- videoStream.volume = (toIncrease ?
- Math.min(videoStream.volume + steps, 1) :
- Math.max(videoStream.volume - steps, 0)).toFixed(2);
+ const steps = (options.steps || 1);
+ api.setVolume(toIncrease ?
+ Math.min(api.getVolume() + steps, 100) :
+ Math.max(api.getVolume() - steps, 0));
// Save the new volume
- saveVolume(toPercent(videoStream.volume), options);
+ saveVolume(api.getVolume(), options);
// change slider position (important)
updateVolumeSlider(options);
@@ -175,25 +178,6 @@ function changeVolume(toIncrease, options) {
showVolumeHud(options.savedVolume);
}
-function setupVolumeOverride(video, options) {
- video.addEventListener("canplay", () => {
- if (typeof options.savedVolume === "number") {
- const newVolume = (options.savedVolume / 100).toFixed(2);
-
- video.volume = newVolume;
- updateVolumeSlider(options);
-
- const volumeOverrideInterval = setInterval(() => {
- video.volume = newVolume;
- }, 4);
- setTimeout((interval) => {
- updateVolumeSlider(options);
- clearInterval(interval);
- }, 500, volumeOverrideInterval);
- }
- });
-}
-
function updateVolumeSlider(options) {
// Slider value automatically rounds to multiples of 5
$("#volume-slider").value = options.savedVolume > 0 && options.savedVolume < 5 ?
| 4 |
diff --git a/lib/assets/core/test/spec/cartodb3/components/form-components/editors/fill/input-color/input-categories/input-color-categories.spec.js b/lib/assets/core/test/spec/cartodb3/components/form-components/editors/fill/input-color/input-categories/input-color-categories.spec.js @@ -66,7 +66,7 @@ describe('components/form-components/editors/fill/input-color/input-categories/i
it('should hide the title label back arrow', function () {
this.view.$('.js-listItem:eq(0)').click();
- expect(this.view.$('.js-prevStep').attr('style')).toBe('display: none;');
+ expect(this.view.$('.js-prevStep').attr('style')).toContain('display: none;');
expect(this.view.$('.js-label').text()).not.toBe('column1');
expect(this.view.$('.js-back').length).toBe(2);
});
| 1 |
diff --git a/src/lambda/handler-runner/docker-runner/DockerContainer.js b/src/lambda/handler-runner/docker-runner/DockerContainer.js @@ -91,12 +91,6 @@ export default class DockerContainer {
} is Unsupported. Layers are only supported on aws.`,
)
} else {
- // Only initialise if we have layers, and we're using AWS
- this.#lambda = new Lambda({
- apiVersion: '2015-03-31',
- region: this.#provider.region,
- })
-
let layerDir = this.#dockerOptions.layersDir
if (!layerDir) {
@@ -104,9 +98,22 @@ export default class DockerContainer {
}
layerDir = `${layerDir}/${this._getLayersSha256()}`
+
+ if (await pathExists(layerDir)) {
+ logLayers(
+ `Layers already exist for this function. Skipping download.`,
+ )
+ } else {
const layers = []
logLayers(`Storing layers at ${layerDir}`)
+
+ // Only initialise if we have layers, we're using AWS, and they don't already exist
+ this.#lambda = new Lambda({
+ apiVersion: '2015-03-31',
+ region: this.#provider.region,
+ })
+
logLayers(`Getting layers`)
for (const layerArn of this.#layers) {
@@ -114,6 +121,7 @@ export default class DockerContainer {
}
await Promise.all(layers)
+ }
dockerArgs.push('-v', `${layerDir}:/opt:ro,delegated`)
}
@@ -174,11 +182,6 @@ export default class DockerContainer {
logLayers(`[${layerName}] ARN: ${layerArn}`)
- if (await pathExists(layerDir)) {
- logLayers(`[${layerName}] Already downloaded. Skipping.`)
- return
- }
-
const params = {
Arn: layerArn,
}
| 3 |
diff --git a/articles/users/search.md b/articles/users/search.md @@ -28,6 +28,22 @@ In this document, we use the terms **eventually consistent** and **immediately c
* **Immediately consistent**: When you request information about a user (or a group of users), the response will reflect the results of all successful write operations, including those that occured shortly prior to your request.
+## General Principles
+
+When running user searches:
+
+* Use an immediately consistent endpoint during authentication pipeline
+* Try to use exact match searches (with the `raw` subfield) whenever possible
+* Avoid existence queries (for example, "give me all users with a property regardless of its value")
+* Avoid full text search or partial searches
+* Avoid polling the search APIs
+* Avoid using large metadata field (try to keep metadata fields to 2 KB or less)
+* Use a well-known schema for metadata:
+ * Use consistent data types for properties
+ * Avoid dynamic property names
+ * Avoid large schema sizes and deep structures
+ * Avoid storing data you do not need for authentication and authorization purposes
+
## Users
The [`GET /api/v2/users` endpoint](/api/management/v2#!/Users/get_users) allows you to retrieve a list of users. Using this endpoint, you can:
| 0 |
diff --git a/wwwroot/config.json b/wwwroot/config.json }
],
"mobileDefaultViewerMode": "2d",
- "regionMappingDefinitionsUrl": "https://terria-catalogs-public.storage.googleapis.com/nationalmap/regionMapping-2021-06-02.json",
+ "regionMappingDefinitionsUrl": "https://terria-catalogs-public.storage.googleapis.com/nationalmap/regionMapping.json",
"showWelcomeMessage": true,
"supportEmail": "[email protected]",
"theme": {
| 4 |
diff --git a/website/src/docs/companion.md b/website/src/docs/companion.md @@ -249,7 +249,8 @@ See [env.example.sh](https://github.com/transloadit/uppy/blob/master/env.example
bucket: "bucket-name",
region: "us-east-1",
useAccelerateEndpoint: false, // default: false,
- expires: 3600 // default: 300 (5 minutes)
+ expires: 3600, // default: 300 (5 minutes)
+ acl: "private" // default: public-read
}
},
server: {
| 0 |
diff --git a/src/user_interface.js b/src/user_interface.js @@ -97,7 +97,8 @@ class gltfUserInterface
function createElement(gltf)
{
const scenes = gltf !== undefined ? gltf.scenes : [];
- return self.gltfFolder.add(self.renderingParameters, "sceneIndex", Object.keys(scenes)).name("Scene Index");
+ return self.gltfFolder.add(self.renderingParameters, "sceneIndex", Object.keys(scenes)).name("Scene Index")
+ .onChange(() => self.update(gltf));
}
this.initializeUpdatable(this.gltfFolder, createElement);
}
| 3 |
diff --git a/services/graph.js b/services/graph.js @@ -6,6 +6,8 @@ import { logger } from 'utils/logs';
/**
* Get all tags
+ * @param {Object} params Request parameters
+ * https://resource-watch.github.io/doc-api/index-rw.html#list-concepts
*/
export const fetchAllTags = (params = {}) => {
logger.info('Fetch all tags');
@@ -28,6 +30,8 @@ export const fetchAllTags = (params = {}) => {
/**
* Get inferred tags
+ * @param {Object} params Request parameters
+ * https://resource-watch.github.io/doc-api/index-rw.html#get-inferred-concepts
*/
export const fetchInferredTags = (params = {}) => {
logger.info('Fetch inferred tags');
@@ -75,6 +79,7 @@ export const countDatasetView = (datasetId, token, params = {}) => {
/**
* Get the list of most viewed datasets
+ * @param {Object} params Request parameters
* @returns {Promise<string[]>} List of sorted ids
*/
export const fetchMostViewedDatasets = (params = {}) => {
@@ -98,7 +103,8 @@ export const fetchMostViewedDatasets = (params = {}) => {
/**
* Get the list of most favourited datasets
- * @returns {Promise<string[]>} List of sorted ids
+ * @param {Object} params Request parameters
+ * https://resource-watch.github.io/doc-api/index-rw.html#most-liked-datasets
*/
export const fetchMostFavoritedDatasets = (params = {}) => {
logger.info('Fetch most favorited datasets');
@@ -119,6 +125,13 @@ export const fetchMostFavoritedDatasets = (params = {}) => {
});
};
+/**
+ * Fetch similar datasets
+ * @param {Object} params Request parameters
+ * @param {boolean} withAncestors Flag indicating whether tags' ancestors
+ * should be considered or not
+ * https://resource-watch.github.io/doc-api/index-rw.html#similar-datasets-including-ancestors
+ */
export const fetchSimilarDatasets = (params = {}, withAncestors = true) => {
logger.info('Fetch similar datasets');
const endpoint = withAncestors ? 'similar-dataset-including-descendent' : 'similar-dataset';
| 7 |
diff --git a/articles/hosted-pages/login/index.md b/articles/hosted-pages/login/index.md @@ -87,18 +87,6 @@ var config = JSON.parse(decodeURIComponent(escape(window.atob('@@config@@'))));
The below examples assume that you are using [Auth0.js](/libraries/auth0js) within your application to call the `authorize` endpoint and show the login page.
-##### Login Hint
-
-For example, suppose you wanted to add a login hint to your page; it can be done simply by passing the `login_hint` parameter to your `authorize` call:
-
-```js
-webAuth.authorize({
- login_hint: "Here is a cool login hint"
-});
-```
-
-You will then be able to access the value of `login_hint` within the login page editor by using `config.extraParams.login_hint`.
-
##### Callback URL
Once authentication has been performed using universal login, your user will then be redirected to the default callback URL set in your [Client's settings page](${manage_url}/#/clients/${account.clientId}/settings). You can also pass a specific `redirect_uri` option to `authorize`, and access it within the login page editor by referring to `config.callbackURL`.
| 2 |
diff --git a/circle.yml b/circle.yml @@ -29,7 +29,7 @@ machine:
post:
# Log metrics in the background in order to monitor resource usage over time:
- - 'FILE=$CIRCLE_ARTIFACTS/monitoring_metrics.txt; while true; do ps -u ubuntu eo pid,%cpu,%mem,rss,args,uname --sort=-%mem >> $FILE; echo "----------" >> $FILE; sleep 1; done':
+ - 'FILE=$CIRCLE_ARTIFACTS/process_metrics.txt; while true; do ps -u ubuntu -eo pid,%cpu,%mem,rss,args,uname -w -w --sort=-%mem >> $FILE; echo "----------" >> $FILE; sleep 1; done':
background: true
| 10 |
diff --git a/src/lib/wallet/GoodWalletClass.js b/src/lib/wallet/GoodWalletClass.js @@ -9,6 +9,7 @@ import type Web3 from 'web3'
import { BN, toBN } from 'web3-utils'
import abiDecoder from 'abi-decoder'
import { get, invokeMap, values } from 'lodash'
+import moment from 'moment'
import Config from '../../config/config'
import logger from '../../lib/logger/pino-logger'
import API from '../../lib/API/api'
@@ -372,7 +373,18 @@ export class GoodWallet {
async getAmountAndQuantityClaimedToday(): Promise<any> {
try {
- const stats = await this.UBIContract.methods.getDailyStats().call()
+ const ubiStart = await this.UBIContract.methods
+ .periodStart()
+ .call()
+ .then(_ => _.toNumber() * 1000)
+ const today = moment().diff(ubiStart, 'days')
+
+ //we dont use getDailyStats because it returns stats for last day where claim happened
+ //if user is the first the stats he says are incorrect and will reset once he claims
+ const stats = await Promise.all([
+ this.UBIContract.methods.getClaimerCount(today).call(),
+ this.UBIContract.methods.getClaimAmount(today).call(),
+ ])
const [people, amount] = invokeMap(stats || [ZERO, ZERO], 'toNumber')
return { amount, people }
| 0 |
diff --git a/docs/en/platform/turtlebot3/manipulation.md b/docs/en/platform/turtlebot3/manipulation.md @@ -78,6 +78,8 @@ The OpenManipulator has the advantage of being compatible with TurtleBot3 Waffle
## [Hardware Setup](#hardware-setup)
+ 
+
- First, detach lidar sensor and shift it front of TurtleBot3 (Red circle represents position of bolts).
- Second, attach OpenManipulator on the TurtleBot3 (Yellow circle represents position of bolts).
| 14 |
diff --git a/token-metadata/0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C/metadata.json b/token-metadata/0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C/metadata.json "symbol": "BNT",
"address": "0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/worker.js b/worker.js @@ -78,7 +78,29 @@ function mod(a, b) {
const _getSliceIndex = (x, y, z) => z + y*NUM_PARCELS + x*NUM_PARCELS*NUM_PARCELS;
const _getPotentialIndex = (x, y, z) => x + y*SUBPARCEL_SIZE*SUBPARCEL_SIZE + z*SUBPARCEL_SIZE;
const _getPotentialFullIndex = (x, y, z) => x + y*SUBPARCEL_SIZE_P1*SUBPARCEL_SIZE_P1 + z*SUBPARCEL_SIZE_P1;
-const _makePotentials = (seedData, shiftsData) => {
+const _makeLandPotentials = (seedData, shiftsData) => {
+ const allocator = new Allocator();
+
+ const potentials = allocator.alloc(Float32Array, SUBPARCEL_SIZE * SUBPARCEL_SIZE * SUBPARCEL_SIZE);
+ const dims = allocator.alloc(Int32Array, 3);
+ dims.set(Int32Array.from([SUBPARCEL_SIZE, SUBPARCEL_SIZE, SUBPARCEL_SIZE]));
+ const shifts = allocator.alloc(Float32Array, 3);
+ shifts.set(Float32Array.from(shiftsData));
+
+ Module._doNoise3(
+ seedData,
+ 0.1,
+ 6,
+ 16,
+ dims.offset,
+ shifts.offset,
+ potentialDefault,
+ potentials.offset
+ );
+
+ return {potentials, dims, shifts/*, allocator*/};
+};
+const _makePlanetPotentials = (seedData, shiftsData) => {
const allocator = new Allocator();
const potentials = allocator.alloc(Float32Array, SUBPARCEL_SIZE * SUBPARCEL_SIZE * SUBPARCEL_SIZE);
@@ -93,7 +115,6 @@ const _makePotentials = (seedData, shiftsData) => {
4,
dims.offset,
shifts.offset,
- 0,
potentialDefault,
potentials.offset
);
@@ -259,7 +280,48 @@ let loaded = false;
const _handleMessage = data => {
const {method} = data;
switch (method) {
- case 'march': {
+ case 'marchLand': {
+ const {seed: seedData, meshId, x, z, slabSliceTris} = data;
+
+ const chunk = _getChunk(meshId);
+ for (let dx = 0; dx <= 1; dx++) {
+ const ix = x + dx;
+ for (let dy = 0; dy < 2; dy++) {
+ const iy = dy;
+ for (let dz = 0; dz <= 1; dz++) {
+ const iz = z + dz;
+ const slab = chunk.getSlab(ix, iy, iz);
+ if (!slab) {
+ const shiftsData = [ix*SUBPARCEL_SIZE, iy*SUBPARCEL_SIZE, iz*SUBPARCEL_SIZE];
+ const {potentials} = _makeLandPotentials(seedData, shiftsData);
+ chunk.setSlab(ix, iy, iz, potentials);
+ }
+ }
+ }
+ }
+
+ const results = [];
+ const transfers = [];
+ for (let dx = 0; dx < 1; dx++) {
+ const ix = x + dx;
+ for (let dy = 0; dy < 2; dy++) {
+ const iy = dy;
+ for (let dz = 0; dz < 1; dz++) {
+ const iz = z + dz;
+ const slab = chunk.getSlab(ix, iy, iz);
+ const [result, transfer] = _meshChunkSlab(chunk, slab, slabSliceTris);
+ results.push(result);
+ transfers.push(transfer);
+ }
+ }
+ }
+
+ self.postMessage({
+ result: results,
+ }, transfers);
+ break;
+ }
+ case 'marchPlanet': {
const {seed: seedData, meshId, slabSliceTris} = data;
const chunk = _getChunk(meshId);
@@ -267,7 +329,7 @@ const _handleMessage = data => {
for (let iy = 0; iy < NUM_PARCELS; iy++) {
for (let iz = 0; iz < NUM_PARCELS; iz++) {
const shiftsData = [ix*SUBPARCEL_SIZE, iy*SUBPARCEL_SIZE, iz*SUBPARCEL_SIZE];
- const {potentials} = _makePotentials(seedData, shiftsData);
+ const {potentials} = _makePlanetPotentials(seedData, shiftsData);
if (ix === 0) {
for (let dy = 0; dy < SUBPARCEL_SIZE; dy++) {
for (let dz = 0; dz < SUBPARCEL_SIZE; dz++) {
| 0 |
diff --git a/packages/app/src/components/Admin/ImportData/GrowiArchiveSection.jsx b/packages/app/src/components/Admin/ImportData/GrowiArchiveSection.jsx import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
-import { withTranslation } from 'react-i18next';
+import { useTranslation } from 'react-i18next';
import * as toastr from 'toastr';
import AppContainer from '~/client/services/AppContainer';
@@ -155,9 +155,14 @@ GrowiArchiveSection.propTypes = {
appContainer: PropTypes.instanceOf(AppContainer).isRequired,
};
+const GrowiArchiveSectionWrapperFc = (props) => {
+ const { t } = useTranslation();
+
+ return <GrowiArchiveSection t={t} {...props} />;
+};
/**
* Wrapper component for using unstated
*/
-const GrowiArchiveSectionWrapper = withUnstatedContainers(GrowiArchiveSection, [AppContainer]);
+const GrowiArchiveSectionWrapper = withUnstatedContainers(GrowiArchiveSectionWrapperFc, [AppContainer]);
-export default withTranslation()(GrowiArchiveSectionWrapper);
+export default GrowiArchiveSectionWrapper;
| 14 |
diff --git a/src/content/developers/docs/oracles/index.md b/src/content/developers/docs/oracles/index.md @@ -18,7 +18,7 @@ An oracle is a bridge between the blockchain and the real world. They act as on-
## Why are they needed? {#why-are-they-needed}
-With a blockchain like Ethereum you need every node in the network to be able to replay every transaction and end up with the same result, guaranteed. APIs introduce potentially variable data. If you were sending someone an amount of ETH based on an agreed \$USD value using a price API, the query would return a different result from one day to the next. Not to mention, the API could be hacked or deprecated. If this happens, the nodes in the network wouldn't be able to agree on Ethereum's current state, effectively breaking [consensus](/developers/docs/consensus-mechanisms/).
+With a blockchain like Ethereum you need every node in the network to be able to replay every transaction and end up with the same result, guaranteed. APIs introduce potentially variable data. If you were sending someone an amount of ETH based on an agreed $USD value using a price API, the query would return a different result from one day to the next. Not to mention, the API could be hacked or deprecated. If this happens, the nodes in the network wouldn't be able to agree on Ethereum's current state, effectively breaking [consensus](/developers/docs/consensus-mechanisms/).
Oracles solve this problem by posting the data on the blockchain. So any node replaying the transaction will use the same immutable data that's posted for all to see. To do this, an oracle is typically made up of a smart contract and some off-chain components that can query APIs, then periodically send transactions to update the smart contract's data.
| 13 |
diff --git a/package.json b/package.json {
"name": "iframe-resizer",
- "version": "4.2.3",
+ "version": "4.2.2",
"homepage": "https://github.com/davidjbradshaw/iframe-resizer",
"authors": [
"David J. Bradshaw <[email protected]>"
| 13 |
diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts @@ -129,9 +129,11 @@ export default function getBaseWebpackConfig (dir: string, {dev = false, debug =
'amp-toolbox-optimizer' // except this one
],
optimization: isServer ? {
+ nodeEnv: false,
splitChunks: false,
minimize: false
} : Object.assign({
+ nodeEnv: false,
runtimeChunk: __selectivePageBuilding ? false : {
name: CLIENT_STATIC_FILES_RUNTIME_WEBPACK
},
@@ -253,6 +255,7 @@ export default function getBaseWebpackConfig (dir: string, {dev = false, debug =
[`process.env.${key}`]: JSON.stringify(config.env[key])
}
}, {})),
+ 'process.env.NODE_ENV': JSON.stringify(webpackMode),
'process.crossOrigin': JSON.stringify(config.crossOrigin),
'process.browser': JSON.stringify(!isServer),
// This is used in client/dev-error-overlay/hot-dev-client.js to replace the dist directory
| 5 |
diff --git a/OurUmbraco.Site/config/IISRewriteMaps.config b/OurUmbraco.Site/config/IISRewriteMaps.config <add key="documentation/implementation/routing/pipeline/ishortstringhelper" value="/documentation/Legacy/" />
<add key="documentation/references/searching/examine/full-configuration" value="/documentation/Reference/Config/ExamineSettings/" />
+ <add key="documentation/Umbraco-Cloud/Troubleshooting/Moving-From-Courier-To-Deploy" value="/documentation/Umbraco-Cloud/Upgrades/Moving-From-Courier-To-Deploy/" />
+ <add key="documentation/Umbraco-Cloud/Troubleshooting/Minor-Upgrades/" value="/documentation/Umbraco-Cloud/Upgrades/Minor-Upgrades/" />
<!-- Umbraco Cloud section -->
<add key="documentation/Umbraco-Cloud/Deployment/Migrate-Existing-Site" value="/documentation/Umbraco-Cloud/Getting-Started/Migrate-Existing-Site/" />
| 5 |
diff --git a/waitlist/tasks.py b/waitlist/tasks.py from celery import task
+from celery.utils.log import get_task_logger
from django.apps import apps
from django.conf import settings
from django.core import mail
from django.template.loader import render_to_string
+logger = get_task_logger(__name__)
+
@task
def send_new_user_on_waitlist_notification(waitlist_item_id):
waitlist_item = apps.get_model('waitlist', 'WaitlistItem').objects.get(pk=waitlist_item_id)
book = waitlist_item.book
borrowers = [copy.user for copy in book.bookcopy_set.exclude(user=None)]
+
+ logger.info(f'Starting a waitlist notification task for book {book.title} ' +
+ f'({len(borrowers)} borrowers in {waitlist_item.library.name})')
+
if len(borrowers) == 0:
+ logger.debug(f'Exiting task because the book {book.title} has no borrowers in {waitlist_item.library.name}')
return
+ borrowers_email_list = [user.email for user in borrowers]
+ logger.info(f'Sending waitlist notification email for {borrowers_email_list}')
+
waitlist_user_name = f'{waitlist_item.user.first_name} {waitlist_item.user.last_name}'
subject = f'{waitlist_user_name} is waiting for the book {book.title} on Kamu'
message = render_to_string('new_user_on_waitlist_notification_email.txt', {
@@ -25,5 +36,7 @@ def send_new_user_on_waitlist_notification(waitlist_item_id):
subject,
message,
settings.EMAIL_FROM,
- [user.email for user in borrowers],
+ borrowers_email_list,
)
+
+ logger.info(f'Waitlist email notification sent successfully')
| 0 |
diff --git a/src/Webform.js b/src/Webform.js @@ -760,13 +760,18 @@ export default class Webform extends NestedDataComponent {
console.warn('Cannot save draft unless a user is authenticated.');
return;
}
- const draft = fastCloneDeep(this.submission);
+ const draft = this.submission;
draft.state = 'draft';
if (!this.savingDraft) {
this.savingDraft = true;
this.formio.saveSubmission(draft).then((sub) => {
- this.savingDraft = false;
+ // this.savingDraft = false;
+ const currentSubmission = _.merge(sub, draft);
+
this.emit('saveDraft', sub);
+ this.setSubmission(currentSubmission).then(() => {
+ this.savingDraft = false;
+ });
});
}
}
| 12 |
diff --git a/includes/Modules/Idea_Hub.php b/includes/Modules/Idea_Hub.php namespace Google\Site_Kit\Modules;
-use Google\Service\ShoppingContent\Resource\Pos;
use Google\Site_Kit\Context;
use Google\Site_Kit\Core\Admin\Notice;
use Google\Site_Kit\Core\Assets\Asset;
@@ -54,6 +53,7 @@ use WP_Error;
*/
final class Idea_Hub extends Module
implements Module_With_Scopes, Module_With_Settings, Module_With_Debug_Fields, Module_With_Assets, Module_With_Deactivation, Module_With_Persistent_Registration {
+
use Module_With_Assets_Trait;
use Module_With_Scopes_Trait;
use Module_With_Settings_Trait;
| 2 |
diff --git a/.github/workflows/browserslist-db-update.yml b/.github/workflows/browserslist-db-update.yml @@ -2,8 +2,11 @@ name: Update Browserslist Database
on:
schedule:
+ # Run workflow every Sunday at 00:00
- cron: '0 0 * * 0'
+ workflow_dispatch:
+
permissions:
contents: write
pull-requests: write
| 11 |
diff --git a/web-stories.php b/web-stories.php * Plugin URI: https://wp.stories.google/
* Author: Google
* Author URI: https://opensource.google.com/
- * Version: 1.6.0-alpha.0
+ * Version: 1.6.0-rc.1
* Requires at least: 5.3
* Requires PHP: 5.6
* Text Domain: web-stories
@@ -40,7 +40,7 @@ if ( ! defined( 'ABSPATH' ) ) {
exit;
}
-define( 'WEBSTORIES_VERSION', '1.6.0-alpha.0' );
+define( 'WEBSTORIES_VERSION', '1.6.0-rc.1' );
define( 'WEBSTORIES_DB_VERSION', '3.0.6' );
define( 'WEBSTORIES_AMP_VERSION', '2.1.0-beta1' ); // Version of the AMP library included in the plugin.
define( 'WEBSTORIES_PLUGIN_FILE', __FILE__ );
| 6 |
diff --git a/src/core/operations/RegularExpression.mjs b/src/core/operations/RegularExpression.mjs @@ -45,7 +45,7 @@ class RegularExpression extends Operation {
},
{
name: "Email address",
- value: "\\b(\\w[-.\\w]*)@([-\\w]+(?:\\.[-\\w]+)*)\\.([A-Za-z]{2,4})\\b"
+ value: "(?:[\u00A0-\uD7FF\uE000-\uFFFF-a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[\u00A0-\uD7FF\uE000-\uFFFF-a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*\")@(?:(?:[\u00A0-\uD7FF\uE000-\uFFFF-a-z0-9](?:[\u00A0-\uD7FF\uE000-\uFFFF-a-z0-9-]*[\u00A0-\uD7FF\uE000-\uFFFF-a-z0-9])?\\.)+[\u00A0-\uD7FF\uE000-\uFFFF-a-z0-9](?:[\u00A0-\uD7FF\uE000-\uFFFF-a-z0-9-]*[\u00A0-\uD7FF\uE000-\uFFFF-a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\\])"
},
{
name: "URL",
| 7 |
diff --git a/src/components/Cluster/RKEClusterAdd/index.js b/src/components/Cluster/RKEClusterAdd/index.js @@ -497,6 +497,8 @@ export default class RKEClusterConfig extends PureComponent {
};
handleStartCheck = isNext => {
let next = false;
+ const { activeKey } = this.state;
+ if (activeKey === '1') {
this.handleEnvGroup(
() => {
next = true;
@@ -506,6 +508,9 @@ export default class RKEClusterConfig extends PureComponent {
this.handleCheck(false);
}
);
+ } else {
+ next = true;
+ }
this.props.form.validateFields(err => {
if (next && err && err.yamls) {
| 1 |
diff --git a/framer/Layer.coffee b/framer/Layer.coffee @@ -115,20 +115,21 @@ asBorderRadius = (value) ->
return 0 if not _.isObject(value)
result = {}
+ isValidObject = false
for key in ["topLeft", "topRight", "bottomRight", "bottomLeft"]
- # TODO: Also support percentages?
- if _.has(value, key) and _.isNumber(value[key])
- result[key] = value[key]
- return if _.isEmpty(result) then 0 else result
+ isValidObject ||= _.has(value, key)
+ result[key] = value[key] ? 0
+ return if not isValidObject then 0 else result
asBorderWidth = (value) ->
return value if _.isNumber(value)
return 0 if not _.isObject(value)
result = {}
+ isValidObject = false
for key in ["left", "right", "bottom", "top"]
- if _.has(value, key) and _.isNumber(value[key])
- result[key] = value[key]
- return if _.isEmpty(result) then 0 else result
+ isValidObject ||= _.has(value, key)
+ result[key] = value[key] ? 0
+ return if not isValidObject then 0 else result
parentOrContext = (layerOrContext) ->
if layerOrContext.parent?
| 12 |
diff --git a/token-metadata/0x580c8520dEDA0a441522AEAe0f9F7A5f29629aFa/metadata.json b/token-metadata/0x580c8520dEDA0a441522AEAe0f9F7A5f29629aFa/metadata.json "symbol": "DAWN",
"address": "0x580c8520dEDA0a441522AEAe0f9F7A5f29629aFa",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly/index.js b/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly/index.js import React from 'react';
-import {StyleSheet} from 'react-native';
+import {Pressable, StyleSheet} from 'react-native';
import lodashGet from 'lodash/get';
import Text from '../../Text';
+import Icon from '../../Icon';
import {propTypes, defaultProps} from '../anchorForCommentsOnlyPropTypes';
import PressableWithSecondaryInteraction from '../../PressableWithSecondaryInteraction';
import {showContextMenu} from '../../../pages/home/report/ContextMenu/ReportActionContextMenu';
import {CONTEXT_MENU_TYPES} from '../../../pages/home/report/ContextMenu/ContextMenuActions';
+import {Download} from '../../Icon/Expensicons';
+import AttachmentView from '../../AttachmentView';
+import fileDownload from '../../../libs/fileDownload';
/*
@@ -17,10 +21,28 @@ const BaseAnchorForCommentsOnly = ({
target,
children,
style,
+ text,
...props
}) => {
let linkRef;
return (
+
+ props.shouldDownloadFile
+ ? (
+ <Pressable onPress={() => {
+ fileDownload(href);
+ }}
+ >
+ <AttachmentView
+ sourceURL={href}
+ file={{name: text}}
+ rightElement={(
+ <Icon src={Download} />
+ )}
+ />
+ </Pressable>
+ )
+ : (
<PressableWithSecondaryInteraction
onSecondaryInteraction={
(event) => {
@@ -45,6 +67,8 @@ const BaseAnchorForCommentsOnly = ({
{children}
</Text>
</PressableWithSecondaryInteraction>
+ )
+
);
};
| 14 |
diff --git a/packages/app/src/server/routes/page.js b/packages/app/src/server/routes/page.js @@ -168,7 +168,7 @@ module.exports = function(crowi, app) {
const actions = {};
function getPathFromRequest(req) {
- return pathUtils.normalizePath(req.params[0] || '');
+ return pathUtils.normalizePath(req.pagePath || req.params[0] || '');
}
function isUserPage(path) {
@@ -290,7 +290,7 @@ module.exports = function(crowi, app) {
}
async function _notFound(req, res) {
- const path = req.pagePath || getPathFromRequest(req);
+ const path = getPathFromRequest(req);
let view;
const renderVars = { path };
| 7 |
diff --git a/packages/lib/buildScripts/getOptionsMap.js b/packages/lib/buildScripts/getOptionsMap.js @@ -28,10 +28,6 @@ function getOptionsMap(schema) {
function definition(obj, schema) {
return schema.definitions[obj.$ref.split('#/definitions/').pop()];
}
-/**
- * example input -> output
- * assignByString({}, 'a_b_c', 'value') -> {a: {b: {c: 'value'}}}
- */
function assignByString(Obj, string, value) {
// TODO: Figure out why I cannot import this from pro-gallery-lib
let _obj = { ...Obj };
| 2 |
diff --git a/game.js b/game.js @@ -537,6 +537,7 @@ const _click = () => {
}
}
};
+let lastPistolUseStartTime = -Infinity;
const _startUse = () => {
const localPlayer = useLocalPlayer();
const objects = world.appManager.getObjects();
@@ -547,9 +548,10 @@ const _startUse = () => {
let useAction = localPlayer.actions.find(action => action.type === 'use');
if (!useAction) {
const {instanceId} = wearApp;
- const {boneAttachment, animation, position, quaternion, scale} = useComponent;
+ const {subtype, boneAttachment, animation, position, quaternion, scale} = useComponent;
useAction = {
type: 'use',
+ subtype,
time: 0,
instanceId,
animation,
@@ -559,6 +561,9 @@ const _startUse = () => {
scale,
};
localPlayer.actions.push(useAction);
+ if (useAction && useAction.subtype === 'pistol') {
+ lastPistolUseStartTime = performance.now();
+ }
wearApp.use();
}
@@ -930,6 +935,39 @@ const _gameUpdate = (timestamp) => {
const _updateLocalPlayer = () => {
if (rigManager.localRig) {
+ if (lastPistolUseStartTime >= 0) {
+ const lastUseTimeDiff = timestamp - lastPistolUseStartTime;
+ const kickbackTime = 300;
+ const kickbackExponent = 0.05;
+ const f = Math.min(Math.max(lastUseTimeDiff / kickbackTime, 0), 1);
+ const v = Math.sin(Math.pow(f, kickbackExponent) * Math.PI);
+ const fakeArmLength = 0.2;
+ localQuaternion.setFromRotationMatrix(
+ localMatrix.lookAt(
+ localVector.copy(rigManager.localRig.inputs.leftGamepad.position),
+ localVector2.copy(rigManager.localRig.inputs.leftGamepad.position)
+ .add(
+ localVector3.set(0, 1, -1)
+ .applyQuaternion(rigManager.localRig.inputs.leftGamepad.quaternion)
+ ),
+ localVector3.set(0, 0, 1)
+ .applyQuaternion(rigManager.localRig.inputs.leftGamepad.quaternion)
+ )
+ )// .multiply(rigManager.localRig.inputs.leftGamepad.quaternion);
+
+ rigManager.localRig.inputs.leftGamepad.position.sub(
+ localVector.set(0, 0, -fakeArmLength)
+ .applyQuaternion(rigManager.localRig.inputs.leftGamepad.quaternion)
+ );
+
+ rigManager.localRig.inputs.leftGamepad.quaternion.slerp(localQuaternion, v);
+
+ rigManager.localRig.inputs.leftGamepad.position.add(
+ localVector.set(0, 0, -fakeArmLength)
+ .applyQuaternion(rigManager.localRig.inputs.leftGamepad.quaternion)
+ );
+ }
+
localPlayer.position.copy(rigManager.localRig.inputs.hmd.position);
localPlayer.quaternion.copy(rigManager.localRig.inputs.hmd.quaternion);
localPlayer.leftHand.position.copy(rigManager.localRig.inputs.leftGamepad.position);
| 0 |
diff --git a/src/external/lively4-serviceworker/src/swx.js b/src/external/lively4-serviceworker/src/swx.js @@ -59,7 +59,7 @@ class ServiceWorker {
pendingRequests = null; // stop listening to requests..
}
- fetch(event) {
+ fetch(event, pending) {
// console.log("SWX.fetch " + event + ", " + pending)
let request = event.request;
if (!request) return
@@ -74,6 +74,7 @@ class ServiceWorker {
if (url.pathname.match(/\/_meta\//)) return;
if (url.pathname.match(/lively4-serviceworker/)) return;
+
try {
var p = new Promise(async (resolve, reject) => {
var email = await focalStorage.getItem(storagePrefix+ "githubEmail")
@@ -125,7 +126,10 @@ class ServiceWorker {
return new Response("Could not fetch " + url +", because of: " + e)
}))
})
- return p
+ if (pending)
+ pending.resolve(p)
+ else
+ event.respondWith(p)
} catch(err) {
if (err.toString().match("The fetch event has already been responded to.")) {
console.log("How can we check for this before? ", err)
@@ -158,7 +162,11 @@ class ServiceWorker {
return new Response(content, {status: 500, statusText: message})
})
- return response
+ if (pending) {
+ console.log("resolve pending request: " + pending.url)
+ pending.resolve(response)
+ } else
+ event.respondWith(response)
}
}
| 13 |
diff --git a/types/index.d.ts b/types/index.d.ts @@ -353,7 +353,7 @@ declare module 'mongoose' {
statics: { [F in keyof TStaticMethods]: TStaticMethods[F] } & { [name: string]: (this: M, ...args: any[]) => any };
/** Creates a virtual type with the given name. */
- virtual<T = HydratedDocument<DocType, TInstanceMethods>>(
+ virtual<T = HydratedDocument<DocType, TInstanceMethods, TVirtuals>>(
name: keyof TVirtuals | string,
options?: VirtualTypeOptions<T, DocType>
): VirtualType<T>;
| 11 |
diff --git a/src/screens/SavedEventListScreen/index.js b/src/screens/SavedEventListScreen/index.js @@ -16,7 +16,6 @@ import { selectLoading, selectRefreshing } from "../../selectors/data";
import { groupEventsByStartTime } from "../../selectors/event";
import { resolveSavedEvents } from "../../selectors/saved-events";
import Component from "./component";
-import onlyUpdateWhenFocused from "../../components/OnlyUpdateWhenFocused";
type OwnProps = {
navigation: NavigationScreenProp<NavigationState>
@@ -72,4 +71,4 @@ const connector: Connector<StateProps, Props> = connect(
mapDispatchToProps
);
-export default connector(onlyUpdateWhenFocused(Component));
+export default connector(Component);
| 13 |
diff --git a/CHANGELOG.md b/CHANGELOG.md # Release notes
-## Next
+## v1.8.1
- Prettified JS code
-- Added `labelShowAssembly` as an option to allow hiding the assembly in track options `hg19 | ` text
+- Added `labelShowAssembly` as an option to allow hiding the assembly in track label (e.g. `hg19 | ` text)
- Added `tickFormat` and `tickPosition` options to the chromosome labels track
- Enabled the colorbar slider by adding the options `colorbarPosition` and `colorbarBackgroundColor` for the `horizontal-multivec`
- Added release notes to docs.
| 3 |
diff --git a/renderer/pages/settings.js b/renderer/pages/settings.js @@ -194,13 +194,6 @@ class Settings extends React.Component {
config={config}
/>
- <BooleanOption
- onConfigSet={this.reloadConfig}
- label={<FormattedMessage id='Settings.Sharing.IncludeCountryCode' />}
- optionKey='sharing.include_country'
- config={config}
- />
-
<BooleanOption
onConfigSet={this.reloadConfig}
label={<FormattedMessage id='Settings.Sharing.IncludeIP' />}
| 2 |
diff --git a/docs/source/api_reference/layers_control.rst b/docs/source/api_reference/layers_control.rst Layers Control
==============
-The ``LayersControl`` allows one to display a selector on the top right of the map in order to select which tile layer to display on the map.
+The ``LayersControl`` allows one to display a layer selector on the map in order
+to select which layers to display on the map.
+
+Layers have a ``name`` attribute which is displayed in the selector and can be changed
+by the user.
.. code::
| 7 |
diff --git a/userscript.user.js b/userscript.user.js @@ -45095,7 +45095,18 @@ var $$IMU_EXPORT$$;
}
// FIXME: this is rather weird. Less CPU usage, but doesn't behave in the way one would expect
- if (popups.length === 0 && !delay_handle) {
+ if (popups.length === 0) {
+ if (delay_handle) {
+ var trigger_mouse_jitter_thresh = 10;
+
+ if ((mouseX - mouseDelayX) < trigger_mouse_jitter_thresh &&
+ (mouseY - mouseDelayY) < trigger_mouse_jitter_thresh)
+ return;
+
+ delay_handle = null;
+ clearTimeout(delay_handle);
+ }
+
mouseDelayX = mouseX;
mouseDelayY = mouseY;
mouse_in_image_yet = false;
| 7 |
diff --git a/lib/assets/javascripts/unpoly/radio.coffee b/lib/assets/javascripts/unpoly/radio.coffee @@ -95,11 +95,10 @@ up.radio = do ->
return if stopped
if shouldPoll(fragment)
- up.emit(fragment, 'up:poll:reload', 'Reloading fragment')
u.always(up.reload(fragment, options), doSchedule)
else
+ up.puts '[up-poll]', 'Polling is disabled'
# Reconsider after 10 seconds at most
- up.emit(fragment, 'up:poll:disabled', 'Polling is disabled')
doSchedule(Math.min(10 * 1000, interval))
doSchedule = (delay = interval) ->
@@ -120,26 +119,6 @@ up.radio = do ->
return destructor
- ###**
- This event is emitted before a [polling fragment](/up-poll) is being reloaded.
-
- @event up:poll:reload
- @param {event.target}
- The polling fragment.
- @experimental
- ###
-
- ###**
- This event is emitted when a [polling fragment](/up-poll) is *not* reloaded due to polling being disabled.
-
- Use `up.radio.config.pollEnabled` to enable or disable polling.
-
- @event up:poll:disabled
- @param {event.target}
- The polling fragment.
- @experimental
- ###
-
###**
Stops [polling](/up-poll) the given element.
| 14 |
diff --git a/packages/turf-center-median/index.js b/packages/turf-center-median/index.js @@ -75,7 +75,7 @@ function findMedian(candidateMedian, previousCandidate, centroids, counter) {
if (weight === 0 || weight < 0) {
weight = 0;
} else {
- if (!isNumber(weight)) throw new Error('weight value must be a number');
+ if (!isNumber(weight)) weight = 1;
weight = weight;
}
if (weight > 0) {
| 12 |
diff --git a/token-metadata/0x0316EB71485b0Ab14103307bf65a021042c6d380/metadata.json b/token-metadata/0x0316EB71485b0Ab14103307bf65a021042c6d380/metadata.json "symbol": "HBTC",
"address": "0x0316EB71485b0Ab14103307bf65a021042c6d380",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/config/supportedRuntimes.js b/src/config/supportedRuntimes.js // native runtime support for AWS
// https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
+// deprecated runtimes
+// https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html
module.exports = new Set([
- // .net
+ // ==========
+ // .NET CORE
+ // ==========
+
+ // deprecated
+ // 'dotnetcore1.0',
+ // 'dotnetcore2.0',
+
+ // supported
// dotnetcore2.1
- // dotnetcore1.0
- // go
+ // ==========
+ // GO
+ // ==========
+
'go1.x',
- // java
+ // ==========
+ // JAVA
+ // ==========
+
+ // supported
// java8
- // node.js
+ // ==========
+ // NODE.JS
+ // ==========
+
+ // deprecated, but still working
+ 'nodejs4.3',
+ 'nodejs6.10',
+
+ // supported
'nodejs8.10',
'nodejs10.x',
- // provided
+ // ==========
+ // PROVIDED
+ // ==========
+
'provided',
- // python
+ // ==========
+ // PYTHON
+ // ==========
+
'python2.7',
'python3.6',
'python3.7',
- // ruby
+ // ==========
+ // RUBY
+ // ==========
+
'ruby2.5',
]);
| 0 |
diff --git a/bin/locale-packs.js b/bin/locale-packs.js @@ -55,7 +55,7 @@ function buildPluginsList () {
for (let file of files) {
const dirName = path.dirname(file)
const pluginName = path.basename(dirName)
- if (pluginName === 'locales') {
+ if (pluginName === 'locales' || pluginName === 'react-native') {
continue
}
const Plugin = require(dirName)
| 8 |
diff --git a/src/plots/plots.js b/src/plots/plots.js @@ -1888,6 +1888,7 @@ plots.autoMargin = function(gd, id, o) {
var fullLayout = gd._fullLayout;
var width = fullLayout.width;
var height = fullLayout.height;
+ var margin = fullLayout.margin;
var maxSpaceW = Math.max(0, width - MIN_FINAL_WIDTH);
var maxSpaceH = Math.max(0, height - MIN_FINAL_HEIGHT);
@@ -1895,14 +1896,13 @@ plots.autoMargin = function(gd, id, o) {
var pushMargin = fullLayout._pushmargin;
var pushMarginIds = fullLayout._pushmarginIds;
- if(fullLayout.margin.autoexpand !== false) {
+ if(margin.autoexpand !== false) {
if(!o) {
delete pushMargin[id];
delete pushMarginIds[id];
} else {
var pad = o.pad;
if(pad === undefined) {
- var margin = fullLayout.margin;
// if no explicit pad is given, use 12px unless there's a
// specified margin that's smaller than that
pad = Math.min(12, margin.l, margin.r, margin.t, margin.b);
@@ -1910,16 +1910,20 @@ plots.autoMargin = function(gd, id, o) {
// if the item is too big, just give it enough automargin to
// make sure you can still grab it and bring it back
+ if(maxSpaceW) {
var rW = (o.l + o.r) / maxSpaceW;
if(rW > 1) {
o.l /= rW;
o.r /= rW;
}
+ }
+ if(maxSpaceH) {
var rH = (o.t + o.b) / maxSpaceH;
if(rH > 1) {
o.t /= rH;
o.b /= rH;
}
+ }
var xl = o.xl !== undefined ? o.xl : o.x;
var xr = o.xr !== undefined ? o.xr : o.x;
@@ -1945,8 +1949,6 @@ plots.doAutoMargin = function(gd) {
var fullLayout = gd._fullLayout;
var width = fullLayout.width;
var height = fullLayout.height;
- var maxSpaceW = Math.max(0, width - MIN_FINAL_WIDTH);
- var maxSpaceH = Math.max(0, height - MIN_FINAL_HEIGHT);
if(!fullLayout._size) fullLayout._size = {};
initMargins(fullLayout);
@@ -2019,17 +2021,24 @@ plots.doAutoMargin = function(gd) {
}
}
+ var maxSpaceW = Math.max(0, width - MIN_FINAL_WIDTH);
+ var maxSpaceH = Math.max(0, height - MIN_FINAL_HEIGHT);
+
+ if(maxSpaceW) {
var rW = (ml + mr) / maxSpaceW;
if(rW > 1) {
ml /= rW;
mr /= rW;
}
+ }
+ if(maxSpaceH) {
var rH = (mb + mt) / maxSpaceH;
if(rH > 1) {
mb /= rH;
mt /= rH;
}
+ }
gs.l = Math.round(ml);
gs.r = Math.round(mr);
| 0 |
diff --git a/src/pages/start/index.js b/src/pages/start/index.js @@ -166,15 +166,25 @@ function Start(props) {
</Link>
</li>
<li>
- <a
+ {/* <a
href = {'https://discord.com/api/oauth2/authorize?client_id=925298399371231242&permissions=309237664832&scope=bot%20applications.commands'}
+ > */}
+ <Icon
+ path={mdiDiscord}
+ size={1}
+ className = 'icon-with-text'
+ />
+ {t('Discord bot - Currently full')}
+ {/* </a> */}
+ <a
+ href = {'https://discord.gg/B2xM8WZyVv'}
>
<Icon
path={mdiDiscord}
size={1}
className = 'icon-with-text'
/>
- {t('Discord bot')}
+ {t('Join the waitlist via our Discord')}
</a>
</li>
<li>
| 9 |
diff --git a/src/core/config/Categories.json b/src/core/config/Categories.json "Escape string",
"Unescape string",
"Pseudo-Random Number Generator",
- "Sleep"
+ "Sleep",
+ "Defang URL"
]
},
{
| 0 |
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe
## Enforcement
-Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
| 3 |
diff --git a/static/css/components.css b/static/css/components.css /* states */
.hikaya-active a {
border-left: 5px #25CED1 solid;
- border-radius: 0px !important;
}
.hikaya-active a:hover {
color: #01579B;
+ border-radius: 0px !important;
+}
+
+/* Links rendered as pills */
+.nav-pills > li > a {
+ border-radius: 0px;
}
\ No newline at end of file
| 2 |
diff --git a/src/views/communitySettings/components/editForm.js b/src/views/communitySettings/components/editForm.js @@ -191,7 +191,6 @@ class EditForm extends React.Component<Props, State> {
website,
file,
coverFile,
- coverPhoto,
communityId,
photoSizeError,
} = this.state;
@@ -201,7 +200,6 @@ class EditForm extends React.Component<Props, State> {
website,
file,
coverFile,
- coverPhoto,
communityId,
};
| 1 |
diff --git a/src/client.js b/src/client.js @@ -568,7 +568,9 @@ Request.prototype.auth = function (user, pass, options) {
};
}
- const encoder = (string) => {
+ const encoder =
+ options.encoder ||
+ (string) => {
if (typeof btoa === 'function') {
return btoa(string);
}
| 4 |
diff --git a/vis/js/HeadstartRunner.js b/vis/js/HeadstartRunner.js @@ -58,15 +58,12 @@ class HeadstartRunner {
const browser = Bowser.getParser(window.navigator.userAgent);
// TODO use proper browser filtering https://www.npmjs.com/package/bowser#filtering-browsers
if (
- !["chrome", "firefox", "safari", "opera", "edge"].includes(
- browser.getBrowserName(true)
- )
+ !["chrome", "firefox", "safari"].includes(browser.getBrowserName(true))
) {
alert(
"You are using an unsupported browser. " +
"This visualization was successfully tested " +
- "with the latest versions of Firefox, Chrome, Safari, " +
- "Opera and Edge."
+ "with the latest versions of Chrome, Firefox and Safari."
);
}
}
| 2 |
diff --git a/edit.js b/edit.js @@ -7187,6 +7187,7 @@ const keys = {
left: false,
right: false,
shift: false,
+ ctrl: false
};
const _resetKeys = () => {
for (const k in keys) {
@@ -7284,7 +7285,9 @@ window.addEventListener('keydown', e => {
case 86: { // V
e.preventDefault();
e.stopPropagation();
+ if (!keys.ctrl && document.pointerLockElement) {
tools.find(tool => tool.getAttribute('tool') === 'firstperson').click();
+ }
break;
}
case 66: { // B
@@ -7305,6 +7308,12 @@ window.addEventListener('keydown', e => {
tools.find(tool => tool.getAttribute('tool') === 'birdseye').click();
break;
}
+ case 17: { // ctrl
+ if (document.pointerLockElement) {
+ keys.ctrl = true;
+ }
+ break;
+ }
case 16: { // shift
if (document.pointerLockElement) {
keys.shift = true;
@@ -7338,8 +7347,10 @@ window.addEventListener('keydown', e => {
break;
}
case 67: { // C
+ if (!keys.ctrl && document.pointerLockElement) {
document.querySelector('.weapon[weapon="build"]').click();
buildMode = 'stair';
+ }
break;
}
/* case 80: { // P
@@ -7405,6 +7416,12 @@ window.addEventListener('keyup', e => {
}
break;
}
+ case 17: { // ctrl
+ if (document.pointerLockElement) {
+ keys.ctrl = false;
+ }
+ break;
+ }
}
});
window.addEventListener('mousedown', e => {
| 0 |
diff --git a/README.md b/README.md @@ -22,22 +22,6 @@ Slate is tightly scoped for the present and more broadly thought out for the fut
- New brand: https://slate.host/narative/slate-brand-identity
- Monet on Filecoin: https://slate.host/slate/monet
-### Developer API
-
-Slate has a Developer API that allows you upload files using code and HTTP.
-
-Every user who creates an account on Slate can use the API. Here is an example:
-
-```js
-const response = await fetch("https://slate.host/api/v1/get", {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- Authorization: "Basic XXX-YOUR-SLATE-KEY-XXX",
- },
-});
-```
-
[Create an account and try it out!](https://slate.host/_)
# Get involved
@@ -122,3 +106,19 @@ Our design system is out of date and could use an update.
- [Use our components](https://slate.host/_/system)
- [Design System Release Repository](https://github.com/filecoin-project/slate-react-system)
+
+## Developer API
+
+Slate has a Developer API that allows you upload files using code and HTTP.
+
+Every user who creates an account on Slate can use the API. Here is an example:
+
+```js
+const response = await fetch("https://slate.host/api/v1/get", {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: "Basic XXX-YOUR-SLATE-KEY-XXX",
+ },
+});
+```
| 5 |
diff --git a/test/integration/lift.lower.test.js b/test/integration/lift.lower.test.js @@ -28,7 +28,8 @@ describe('sails being lifted and lowered (e.g in a test framework)', function()
globals: false,
hooks: {
grunt: false,
- i18n: false
+ i18n: false,
+ session: false
}
}, function(err, sails) {
if (err) {
@@ -71,7 +72,11 @@ describe('sails being lifted and lowered (e.g in a test framework)', function()
});
after(function(done) {
+ if (_.isUndefined(originalNodeEnv)) {
+ delete process.env.NODE_ENV;
+ } else {
process.env.NODE_ENV = originalNodeEnv;
+ }
if (sailsApp) {
return sailsApp.lower(done);
}
@@ -94,7 +99,8 @@ describe('sails being lifted and lowered (e.g in a test framework)', function()
globals: false,
hooks: {
grunt: false,
- i18n: false
+ i18n: false,
+ session: false
}
}, function(err, _sailsApp) {
if (err) { return done(err); }
@@ -126,7 +132,11 @@ describe('sails being lifted and lowered (e.g in a test framework)', function()
});
after(function(done) {
+ if (_.isUndefined(originalNodeEnv)) {
+ delete process.env.NODE_ENV;
+ } else {
process.env.NODE_ENV = originalNodeEnv;
+ }
if (sailsApp) {
return sailsApp.lower(done);
}
@@ -146,7 +156,8 @@ describe('sails being lifted and lowered (e.g in a test framework)', function()
globals: false,
hooks: {
grunt: false,
- i18n: false
+ i18n: false,
+ session: false
}
}, function(err, _sailsApp) {
@@ -179,7 +190,11 @@ describe('sails being lifted and lowered (e.g in a test framework)', function()
});
after(function(done) {
+ if (_.isUndefined(originalNodeEnv)) {
+ delete process.env.NODE_ENV;
+ } else {
process.env.NODE_ENV = originalNodeEnv;
+ }
if (sailsApp) {
return sailsApp.lower(done);
}
@@ -199,7 +214,8 @@ describe('sails being lifted and lowered (e.g in a test framework)', function()
globals: false,
hooks: {
grunt: false,
- i18n: false
+ i18n: false,
+ session: false
}
}, function(err, _sailsApp) {
@@ -232,7 +248,11 @@ describe('sails being lifted and lowered (e.g in a test framework)', function()
});
after(function(done) {
+ if (_.isUndefined(originalNodeEnv)) {
+ delete process.env.NODE_ENV;
+ } else {
process.env.NODE_ENV = originalNodeEnv;
+ }
if (sailsApp) {
return sailsApp.lower(done);
}
@@ -262,7 +282,8 @@ describe('sails being lifted and lowered (e.g in a test framework)', function()
globals: false,
hooks: {
grunt: false,
- i18n: false
+ i18n: false,
+ session: false
}
}, function(err, _sailsApp) {
@@ -301,7 +322,11 @@ describe('sails being lifted and lowered (e.g in a test framework)', function()
});
after(function(done) {
+ if (_.isUndefined(originalNodeEnv)) {
+ delete process.env.NODE_ENV;
+ } else {
process.env.NODE_ENV = originalNodeEnv;
+ }
if (sailsApp) {
return sailsApp.lower(done);
}
@@ -319,7 +344,8 @@ describe('sails being lifted and lowered (e.g in a test framework)', function()
globals: false,
hooks: {
grunt: false,
- i18n: false
+ i18n: false,
+ session: false
}
}, function(err, _sailsApp) {
if (!err) { return done(new Error('Sails should have failed to lift!')); }
| 12 |
diff --git a/token-metadata/0x7e8539D1E5cB91d63E46B8e188403b3f262a949B/metadata.json b/token-metadata/0x7e8539D1E5cB91d63E46B8e188403b3f262a949B/metadata.json "symbol": "SMDX",
"address": "0x7e8539D1E5cB91d63E46B8e188403b3f262a949B",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/ui/src/components/common/QuickLinks.scss b/ui/src/components/common/QuickLinks.scss @import "app/variables.scss";
-
.QuickLinks {
+ // grid fallback
display: flex;
flex-wrap: wrap;
- margin: 0 -($aleph-grid-size);
- align-content: stretch;
+
+ padding: 0 5px;
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
+ gap: $aleph-grid-size*1.5 $aleph-grid-size*1.5;
+ @media screen and (max-width: $aleph-screen-sm-max-width) {
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ }
&__item {
flex: 0 0 25%;
- padding: $aleph-content-padding/2;
- min-width: 125px;
- text-decoration: none !important;
- @media screen and (max-width: 1275px) {
- flex-basis: 50%;
- }
+ text-decoration: none !important;
&__content {
border-radius: 5px;
}
}
-
&__text {
text-align: center;
padding: 5px 15px 15px;
| 7 |
diff --git a/scripts/helpers/injectDependencies.js b/scripts/helpers/injectDependencies.js @@ -2,7 +2,10 @@ const { search = '' } = document.location;
const ecmaVersion = (search.match(/[?&]es=(\d)/) || [])[1] || '6';
const docHead = document.querySelector('head');
-const injectScript = document.querySelector('script');
+
+const injectScript = Array
+ .from(document.querySelectorAll('script'))
+ .find(domEl => domEl.getAttribute('src').endsWith('injectDependencies.js'));
const polyfillScript = document.createElement('script');
polyfillScript.src = '../../../polyfills/webcomponents-bundle-2.0.2.js';
| 7 |
diff --git a/test/jasmine/tests/hover_label_test.js b/test/jasmine/tests/hover_label_test.js @@ -6144,6 +6144,40 @@ describe('hovermode: (x|y)unified', function() {
.then(done, done.fail);
});
+ it('should use hoverlabel.grouptitlefont for group titles', function(done) {
+ function assertFont(fontFamily, fontSize, fontColor) {
+ var hover = getHoverLabel();
+ var traces = hover.selectAll('g.traces');
+
+ traces.each(function() {
+ var e = d3Select(this);
+ var text = e.select('text.legendtext');
+ var node = text.node();
+ var label = node.innerHTML;
+ if(label.indexOf('group') !== -1) {
+ var textStyle = window.getComputedStyle(node);
+ expect(textStyle.fontFamily.split(',')[0]).toBe(fontFamily, 'wrong font family');
+ expect(textStyle.fontSize).toBe(fontSize, 'wrong font size');
+ expect(textStyle.fill).toBe(fontColor, 'wrong font color');
+ }
+ });
+ }
+
+ var mockCopy = Lib.extendDeep({}, groupTitlesMock);
+
+ mockCopy.layout.hoverlabel = {
+ grouptitlefont: {size: 20, family: 'Mono', color: 'rgb(255, 127, 0)'}
+ };
+
+ Plotly.newPlot(gd, mockCopy)
+ .then(function(gd) {
+ _hover(gd, { xval: 0});
+
+ assertFont('Mono', '20px', 'rgb(255, 127, 0)');
+ })
+ .then(done, done.fail);
+ });
+
it('should work with hovertemplate', function(done) {
var mockCopy = Lib.extendDeep({}, mock);
mockCopy.data[0].hovertemplate = 'hovertemplate: %{y:0.2f}';
| 0 |
diff --git a/ext/abp-filter-parser-modified/abp-filter-parser.js b/ext/abp-filter-parser-modified/abp-filter-parser.js @@ -167,6 +167,27 @@ Trie.prototype.getSubstringsOf = function (string) {
return substrings
}
+Trie.prototype.getStartingSubstringsOf = function (string) {
+ var substrings = []
+ // loop through each character in the string
+
+ var data = this.data[string[0]]
+ if (!data) {
+ return substrings
+ }
+ for (var i = 1; i < string.length; i++) {
+ data = data[string[i]]
+ if (!data) {
+ break
+ }
+ if (data._d) {
+ substrings = substrings.concat(data._d)
+ }
+ }
+
+ return substrings
+}
+
function parseFilter (input, parsedFilterData) {
input = input.trim()
@@ -361,9 +382,9 @@ function matchOptions (filterOptions, input, contextParams, currentHost) {
*/
function parse (input, parserData, callback) {
- var arrayFilterCategories = ['regex', 'leftAnchored', 'rightAnchored', 'bothAnchored', 'indexOf']
+ var arrayFilterCategories = ['regex', 'rightAnchored', 'bothAnchored', 'indexOf']
var objectFilterCategories = ['hostAnchored']
- var trieFilterCategories = ['plainString', 'wildcard']
+ var trieFilterCategories = ['plainString', 'leftAnchored', 'wildcard']
parserData.exceptionFilters = parserData.exceptionFilters || {}
@@ -407,7 +428,7 @@ function parse (input, parserData, callback) {
if (parsedFilterData.rightAnchored) {
object.bothAnchored.push(parsedFilterData)
} else {
- object.leftAnchored.push(parsedFilterData)
+ object.leftAnchored.add(parsedFilterData.data, parsedFilterData.options)
}
} else if (parsedFilterData.rightAnchored) {
object.rightAnchored.push(parsedFilterData)
@@ -493,14 +514,15 @@ function matchesFilters (filters, input, contextParams) {
// check if the string matches a left anchored filter
- for (i = 0, len = filters.leftAnchored.length; i < len; i++) {
- filter = filters.leftAnchored[i]
-
- if (input.startsWith(filter.data) && matchOptions(filter.options, input, contextParams, currentHost)) {
- // console.log(filter, 1)
+ var leftAnchoredMatches = filters.leftAnchored.getStartingSubstringsOf(input)
+ if (leftAnchoredMatches.length !== 0) {
+ var len = leftAnchoredMatches.length
+ for (i = 0; i < len; i++) {
+ if (matchOptions(leftAnchoredMatches[i], input, contextParams, currentHost)) {
return true
}
}
+ }
// check if the string matches a right anchored filter
| 4 |
diff --git a/item-spec/common-metadata.md b/item-spec/common-metadata.md @@ -132,7 +132,7 @@ with domain-specific extensions that describe the actual data, such as the `eo`
| instruments | \[string] | Name of instrument or sensor used (e.g., MODIS, ASTER, OLI, Canon F-1). |
| constellation | string | Name of the constellation to which the platform belongs. |
| mission | string | Name of the mission for which data is collected. |
-| gsd | number | Ground Sample Distance at the sensor. |
+| gsd | number | Ground Sample Distance at the sensor, in meters (m). |
**platform** is the unique name of the specific platform the instrument is attached to. For satellites this would
be the name of the satellite, whereas for drones this would be a unique name for the drone. Examples include
| 0 |
diff --git a/gulp-tasks/zip.js b/gulp-tasks/zip.js @@ -42,10 +42,15 @@ function getGit() {
*/
function generateFilename() {
const version = getPluginVersion();
- const { branch, date, shortSha } = getGit();
+
+ let gitSuffix = '';
+ try {
+ const { branch, shortSha } = getGit();
+ gitSuffix = `.${ branch }@${ shortSha }`;
+ } catch {}
return sanitizeFilename(
- `google-site-kit.v${ version }.${ branch }@${ shortSha }.${ date }.zip`
+ `google-site-kit.v${ version }${ gitSuffix }.zip`
);
}
| 11 |
diff --git a/compat/test/browser/events.test.js b/compat/test/browser/events.test.js @@ -75,6 +75,19 @@ describe('preact/compat events', () => {
expect(vnode.props).to.not.haveOwnProperty('onchange');
});
+ it('should by pass onInputCapture normalization for custom onInputAction when using it along with onChange', () => {
+ const onInputAction = () => null;
+ const onChange = () => null;
+
+ let vnode = <textarea onChange={onChange} onInputAction={onInputAction} />;
+
+ expect(vnode.props).to.haveOwnProperty('onInputAction');
+ expect(vnode.props.onInputAction).to.equal(onInputAction);
+ expect(vnode.props).to.haveOwnProperty('oninput');
+ expect(vnode.props.oninput).to.equal(onChange);
+ expect(vnode.props).to.not.haveOwnProperty('oninputCapture');
+ });
+
it('should normalize onChange for range, except in IE11', () => {
// NOTE: we don't normalize `onchange` for range inputs in IE11.
const eventType = /Trident\//.test(navigator.userAgent)
| 7 |
diff --git a/token-metadata/0x245ef47D4d0505ECF3Ac463F4d81f41ADE8f1fd1/metadata.json b/token-metadata/0x245ef47D4d0505ECF3Ac463F4d81f41ADE8f1fd1/metadata.json "symbol": "NUG",
"address": "0x245ef47D4d0505ECF3Ac463F4d81f41ADE8f1fd1",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.