code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/infra/token-transfer-client/src/components/StakeModal.js b/infra/token-transfer-client/src/components/StakeModal.js @@ -28,7 +28,7 @@ class StakeModal extends React.Component {
>
<div className="stake-modal-content d-flex flex-column d-flex align-items-center justify-content-end">
<div className="stake-modal-text">
- <h1>Staking OGN has moved</h1>
+ <h1>OGN staking has moved</h1>
<p>
As part of the Origin Dollar governance project, OGN staking has
moved to OUSD.com
| 7 |
diff --git a/animations-baker.js b/animations-baker.js @@ -383,7 +383,7 @@ const baker = async (uriPath = '', fbxFileNames, vpdFileNames, outFile) => {
rightFootYDeltas[i] = rightFootYDelta;
}
- const range = 0.0175;
+ const range = /sneak/i.test(walkAnimationName) ? 0.3 : 0.05;
let leftMin = Infinity;
let leftMax = -Infinity;
| 0 |
diff --git a/translations/en-us.yaml b/translations/en-us.yaml @@ -4735,7 +4735,7 @@ clusterNew:
even: Setting {count} etcd nodes is a waste of hardware because it doesn't increase the quorum until you have an odd number.
noEtcd: The number of etcd nodes should not be less than 1.
windowsSupport:
- deprecated: Windows support is being deprecated for RKE1. We suggest migrating to RKE2/K3s.
+ deprecated: Windows support is being deprecated for RKE1. We suggest migrating to RKE2.
disabled: Not support {plugin} network provider.
help: Available for Kubernetes 1.15 or above with Flannel network provider.
label: Windows Support
| 3 |
diff --git a/lib/linters/newline_after_block.js b/lib/linters/newline_after_block.js 'use strict';
-const hasNewline = require('../utils/has-newline');
-
module.exports = {
name: 'newlineAfterBlock',
nodeTypes: ['atrule', 'rule'],
@@ -10,9 +8,6 @@ module.exports = {
lint: function newlineAfterBlockLinter (config, node) {
const { parent } = node;
- let prev = parent.index(node) - 1;
- prev = parent.nodes[prev] || {};
-
// Ignore at-rules without a body
if (node.empty || (node.type === 'atrule' && !node.nodes)) {
/**
@@ -37,14 +32,18 @@ module.exports = {
*/
const regexp = /\r?\n[ \t]*\r?\n/;
- if (prev.type === 'comment') {
+ let prev = node.prev() || {};
+
+ while (prev.type === 'comment') {
if (Object.is(prev, parent.first) || regexp.test(prev.raws.before)) {
return;
}
- if (hasNewline(prev.raws.right)) {
+ if (regexp.test(prev.raws.right)) {
return;
}
+
+ prev = prev.prev ? prev.prev() : {};
}
if (!regexp.test(node.raws.before)) {
| 7 |
diff --git a/app/main.js b/app/main.js @@ -40,7 +40,11 @@ app.on('ready', () => {
// Download files
session.defaultSession.on('will-download', (event, item) => {
let location = dialog.showSaveDialog({ defaultPath: item.getFilename() })
+ if (location) {
item.setSavePath(location)
+ } else {
+ event.preventDefault()
+ }
})
createMenu()
| 9 |
diff --git a/src/common.cc b/src/common.cc @@ -197,7 +197,8 @@ namespace sharp {
imageType = ImageType::HEIF;
} else if (EndsWith(loader, "PdfBuffer")) {
imageType = ImageType::PDF;
- } else if (EndsWith(loader, "MagickBuffer")) {
+ } else if (EndsWith(loader, "MagickBuffer") ||
+ EndsWith(loader, "Magick7Buffer")) {
imageType = ImageType::MAGICK;
}
}
@@ -236,7 +237,9 @@ namespace sharp {
imageType = ImageType::FITS;
} else if (EndsWith(loader, "Vips")) {
imageType = ImageType::VIPS;
- } else if (EndsWith(loader, "Magick") || EndsWith(loader, "MagickFile")) {
+ } else if (EndsWith(loader, "Magick") ||
+ EndsWith(loader, "MagickFile") ||
+ EndsWith(loader, "Magick7File")) {
imageType = ImageType::MAGICK;
}
} else {
| 0 |
diff --git a/components/admin/tags/TagsForm.js b/components/admin/tags/TagsForm.js @@ -13,6 +13,8 @@ import Select from 'components/form/SelectInput';
import GraphService from 'services/GraphService';
const graphOptions = {
+ height: '100%',
+ width: '100%',
layout: {
hierarchical: false
},
@@ -59,11 +61,14 @@ class TagsForm extends React.Component {
}
loadSubGraph() {
- const { inferredTags } = this.state;
+ const { inferredTags, selectedTags } = this.state;
this.setState({
graph: {
- edges: this.knowledgeGraph.edges.filter(elem => inferredTags.find(tag => tag.id === elem.to)),
- nodes: this.knowledgeGraph.nodes.filter(elem => inferredTags.find(tag => tag.id === elem.id))
+ edges: this.knowledgeGraph.edges
+ .filter(elem => inferredTags.find(tag => tag.id === elem.to)),
+ nodes: this.knowledgeGraph.nodes
+ .filter(elem => inferredTags.find(tag => tag.id === elem.id))
+ .map(elem => ({ ...elem, color: selectedTags.find(tag => tag === elem.id) ? '#c32d7b' : '#F4F6F7' }))
}
});
}
| 4 |
diff --git a/helpers/wrapper/test/Wrapper-unit.js b/helpers/wrapper/test/Wrapper-unit.js @@ -44,6 +44,18 @@ contract('Wrapper Unit Tests', async accounts => {
.encodeABI()
await mockWeth.givenMethodReturnBool(weth_approve, true)
+ // mock the weth.allowance method
+ let weth_allowance = wethTemplate.contract.methods
+ .allowance(EMPTY_ADDRESS, EMPTY_ADDRESS)
+ .encodeABI()
+ await mockWeth.givenMethodReturnUint(weth_allowance, 100000)
+
+ // mock the weth.balanceOf method
+ let weth_wrapper_balance = wethTemplate.contract.methods
+ .balanceOf(EMPTY_ADDRESS)
+ .encodeABI()
+ await mockWeth.givenMethodReturnUint(weth_wrapper_balance, 100000)
+
//mock the weth.transferFrom method
let weth_transferFrom = wethTemplate.contract.methods
.transferFrom(EMPTY_ADDRESS, EMPTY_ADDRESS, 0)
| 3 |
diff --git a/src/trumbowyg.js b/src/trumbowyg.js @@ -1255,7 +1255,10 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', {
const VALID_LINK_PREFIX = /^([a-z][-+.a-z0-9]*:|\/|#)/i;
if(VALID_LINK_PREFIX.test(url)) { return url; }
- return url.includes("@") ? `mailto:${url}` : `http://${url}`;
+ const SIMPLE_EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
+ if(SIMPLE_EMAIL_REGEX.test(url)) { return "mailto:" + url; }
+
+ return "http://" + url;
},
unlink: function () {
var t = this,
| 11 |
diff --git a/src/index.js b/src/index.js -import { createStore, combineReducers, bindActionCreators } from 'redux';
+import { createStore, combineReducers, bindActionCreators, applyMiddleware } from 'redux';
import Immutable from 'immutable';
import { createProvider } from 'react-redux';
import React, { Component } from 'react';
@@ -78,6 +78,7 @@ class Griddle extends Component {
renderProperties:userRenderProperties={},
settingsComponentObjects:userSettingsComponentObjects,
storeKey = 'store',
+ reduxMiddleware = [],
...userInitialState
} = props;
@@ -134,7 +135,8 @@ class Griddle extends Component {
this.store = createStore(
reducers,
- initialState
+ initialState,
+ applyMiddleware(...reduxMiddleware)
);
this.provider = createProvider(storeKey);
| 0 |
diff --git a/data/scripts/model.py b/data/scripts/model.py @@ -234,8 +234,8 @@ def assess_model(params, data, cases):
# Any parameters given in guess are fit. The remaining are fixed and set by DefaultRates
def fit_params(key, time_points, data, guess, bounds=None):
- # if key not in POPDATA:
- # return Params(None, None, None, DefaultRates, Fracs()), 10, (False, "Not within population database")
+ if key not in POPDATA:
+ return Params(None, None, None, DefaultRates, Fracs()), 10, (False, "Not within population database")
params_to_fit = {key : i for i, key in enumerate(guess.keys())}
@@ -279,7 +279,7 @@ def load_data(key):
ts = CASE_DATA[key]
- for tp in ts:
+ for tp in ts: #replace all zeros by np.nan
data[Sub.T].append(tp['cases'] or np.nan)
data[Sub.D].append(tp['deaths'] or np.nan)
data[Sub.H].append(tp['hospitalized'] or np.nan)
@@ -291,12 +291,12 @@ def load_data(key):
return days, data
-def get_pre_confinement(days, data_original, confinement_start=None):
+def get_fit_data(days, data_original, confinement_start=None):
data = copy.deepcopy(data_original)
case_min = 20
if confinement_start is None:
- fit_stop_day = times[-1]
+ fit_stop_day = days[-1]
else:
fit_stop_day = confinement_start + 1.0/DefaultRates.latency + 1.0/DefaultRates.infection
day0 = days[case_min <= data[Sub.T]][0]
@@ -328,7 +328,7 @@ def fit_population(key, time_points, data, confinement_start, guess=None):
"logInitial" : 1
}
- time_point_fit, data_fit = get_pre_confinement(time_points, data, confinement_start)
+ time_point_fit, data_fit = get_fit_data(time_points, data, confinement_start)
param, init_cases, err = fit_params(key, time_point_fit, data_fit, guess)
tMin = datetime.strftime(datetime.fromordinal(time_points[0]), '%Y-%m-%d')
@@ -352,21 +352,23 @@ if __name__ == "__main__":
# param = Params(AGES[COUNTRY], POPDATA[make_key(COUNTRY, REGION)], times, rates, fracs)
# model = trace_ages(solve_ode(param, init_pop(param.ages, param.size, 1)))
- key = "USA-California"
- confinement_start = datetime.strptime("2020-03-16", "%Y-%m-%d").toordinal()
+ # key = "USA-California"
+ # key = "CHE-Basel-Stadt"
+ key = "DEU-Berlin"
+ # confinement_start = datetime.strptime("2020-03-16", "%Y-%m-%d").toordinal()
+ confinement_start = None
+ # confinement_start = datetime.strptime("2020-03-13", "%Y-%m-%d").toordinal()
+ # confinement_start = datetime.strptime("2020-03-16", "%Y-%m-%d").toordinal()
# Raw data and time points
time, data = load_data(key)
# Fitting over the pre-confinement days
res = fit_population(key, time, data, confinement_start)
- res['params'].time = np.concatenate(([time[0]-21], time)) # to project model past fitting window
+ res['params'].time = np.concatenate((res['params'].time, time[time>res['params'].time[-1]])) # to project model past fitting window
model = trace_ages(solve_ode(res['params'], init_pop(res['params'].ages, res['params'].size, res['initialCases'])))
- tp = res['params'].time - JAN1_2020
- confinement_start -= tp[0] + JAN1_2020
- tp = tp - tp[0]
- time = time - time[0] + 21
-
+ time = time - res['params'].time[0]
+ tp = res['params'].time - res['params'].time[0]
plt.figure()
plt.title(f"{key}")
@@ -385,7 +387,7 @@ if __name__ == "__main__":
plt.plot(tp, model[:,Sub.I], color="#fdbe6e", label="infected")
plt.plot(tp, model[:,Sub.R], color="#36a130", label="recovered")
- plt.plot(confinement_start, data[Sub.T][time==confinement_start], 'kx', markersize=20, label="Confinement start")
+ # plt.plot(confinement_start, data[Sub.T][time==confinement_start], 'kx', markersize=20, label="Confinement start")
plt.xlabel("Time [days]")
plt.ylabel("Number of people")
| 1 |
diff --git a/lib/routes.js b/lib/routes.js @@ -42,6 +42,7 @@ routes
.add('questionnaireCrowd', `/umfrage/:slug(${routes.questionnaireCrowdSlug})`)
.add('questionnaire', '/umfrage/:slug')
.add('events', '/veranstaltungen')
+ .add('event', '/veranstaltung/:slug', 'events')
.add('faq', '/faq')
.add('feed', '/feed')
.add('feuilleton', '/feuilleton')
| 13 |
diff --git a/deepfence_ui/app/scripts/components/vulnerability-view/vulnerability-modal/index.jsx b/deepfence_ui/app/scripts/components/vulnerability-view/vulnerability-modal/index.jsx @@ -67,7 +67,17 @@ export const VulnerabilityModal = ({
<ModalBody>
<div className={styles.modalBodyColumnsWrapper}>
<div className={styles.modalBodyColumn}>
- <KeyValueContent data={convertDocumentToKeyValuePairs(source, ['@timestamp', 'type', 'cve_overall_score', 'cve_id', 'cve_severity'], [])} />
+ <KeyValueContent data={convertDocumentToKeyValuePairs(source, ['@timestamp', 'type', 'cve_overall_score', 'cve_id', 'cve_severity'], [
+ 'cve_container_image',
+ 'host_name',
+ 'cve_attack_vector',
+ 'cve_cvss_score',
+ 'cve_description',
+ 'cve_fixed_in',
+ 'cve_link',
+ 'cve_type',
+ 'cve_caused_by_package_path',
+ ])} />
</div>
<div className={classNames(styles.modalBodyColumn, styles.attackPathWrapper)}>
<div className={styles.attackPathTitle}>Top 5 Attack Paths</div>
| 3 |
diff --git a/src/botPage/view/View.js b/src/botPage/view/View.js @@ -89,8 +89,6 @@ const addBalanceForToken = token => {
});
};
-const chart = new Chart(api);
-
const tradingView = new TradingView();
const showRealityCheck = () => {
@@ -212,7 +210,9 @@ const updateTokenList = () => {
$('.account-type').text(`${prefix}`);
} else {
$('.login-id-list').append(
- `<a href="#" value="${tokenInfo.token}"><li><span>${prefix}</span><div>${tokenInfo.accountName}</div></li></a><div class="separator-line-thin-gray"></div>`
+ `<a href="#" value="${tokenInfo.token}"><li><span>${prefix}</span><div>${
+ tokenInfo.accountName
+ }</div></li></a><div class="separator-line-thin-gray"></div>`
);
}
});
@@ -419,6 +419,7 @@ export default class View {
});
$('#chartButton').click(() => {
+ const chart = new Chart(api);
chart.open();
});
| 3 |
diff --git a/packages/workbox-build/src/lib/generate-sw.js b/packages/workbox-build/src/lib/generate-sw.js @@ -96,6 +96,9 @@ const generateSW = function(input) {
}
// Type check input so that defaults can be used if appropriate.
+ if (typeof input.globIgnores === 'string') {
+ input.globIgnores = [input.globIgnores];
+ }
if (input.globIgnores && !(Array.isArray(input.globIgnores))) {
return Promise.reject(
new Error(errors['invalid-glob-ignores']));
| 11 |
diff --git a/packages/yoroi-extension/chrome/extension/ergo-connector/api.js b/packages/yoroi-extension/chrome/extension/ergo-connector/api.js @@ -65,7 +65,7 @@ export async function connectorGetBalance(
pendingTxs: PendingTransaction[],
tokenId: TokenId
): Promise<Value> {
- if (tokenId === 'ERG' || tokenId === 'ADA') {
+ if (tokenId === 'ERG' || tokenId === 'ADA' || tokenId === 'TADA') {
if (pendingTxs.length === 0) {
// can directly query for balance
const canGetBalance = asGetBalance(wallet);
@@ -165,7 +165,7 @@ export async function connectorGetUtxosCardano(
})
let valueAcc = new BigNumber(0);
for(const formatted of formattedUtxos){
- if (tokenId === 'ADA') {
+ if (tokenId === 'ADA' || tokenId === 'TADA') {
valueAcc = valueAcc.plus(valueToBigNumber(formatted.amount));
utxosToUse.push(formatted);
} else {
| 11 |
diff --git a/src/lib/userStorage/FeedStorage.js b/src/lib/userStorage/FeedStorage.js @@ -90,6 +90,8 @@ export class FeedStorage {
feedQ: {} = {}
+ profilesCache = {}
+
isEmitEvents = true
db: ThreadDB
@@ -443,7 +445,6 @@ export class FeedStorage {
async getCounterParty(feedEvent) {
let addressField
- const { Profiles } = this.db
log.debug('updateFeedEventCounterParty:', feedEvent.data.receiptEvent, feedEvent.id, feedEvent.txType)
@@ -466,7 +467,7 @@ export class FeedStorage {
return {}
}
- let profile = await Profiles.findById(address)
+ let profile = await this._readProfileCache(address)
let { fullName, smallAvatar, lastUpdated } = profile || {}
const lastUpdatedTs = new Date(lastUpdated).getTime()
@@ -485,7 +486,7 @@ export class FeedStorage {
/** =================================================== */
// cache, update last sync date
- await Profiles.save({ _id: address, fullName, smallAvatar, lastUpdated: new Date().toISOString() })
+ await this._writeProfileCache({ address, fullName, smallAvatar })
}
return {
@@ -495,6 +496,30 @@ export class FeedStorage {
}
}
+ async _readProfileCache(address) {
+ const { profilesCache } = this
+ let profile = profilesCache[address]
+
+ if (!profile) {
+ profile = await this.db.Profiles.findById(address)
+
+ if (profile) {
+ const { fullName, smallAvatar } = profile
+
+ profilesCache[address] = { fullName, smallAvatar }
+ }
+ }
+
+ return profile
+ }
+
+ async _writeProfileCache(profile) {
+ const { address, fullName, smallAvatar } = profile
+
+ this.profilesCache[address] = { fullName, smallAvatar }
+ await this.db.Profiles.save({ _id: address, fullName, smallAvatar, lastUpdated: new Date().toISOString() })
+ }
+
/**
* remove and return pending TX
* @param eventId
| 0 |
diff --git a/app-manager.js b/app-manager.js @@ -409,8 +409,8 @@ class AppManager extends EventTarget {
trackedApp.set('quaternion', quaternion);
trackedApp.set('scale', scale);
trackedApp.set('components', JSON.stringify(components));
- const originalJson = trackedApp.toJSON();
- trackedApp.set('originalJson', JSON.stringify(originalJson));
+ // const originalJson = trackedApp.toJSON();
+ // trackedApp.set('originalJson', JSON.stringify(originalJson));
return trackedApp;
}
addTrackedApp(
| 2 |
diff --git a/package.json b/package.json "start": "bash ./node_modules/terriajs-server/run_server.sh --config-file devserverconfig.json",
"stop": "bash ./node_modules/terriajs-server/stop_server.sh",
"gulp": "gulp",
- "postinstall": "echo 'Installation with NPM successful. What to do next:\\n npm start # Starts the server on port 3001\\n gulp watch # Builds NationalMap and dependencies, and rebuilds if files change.'",
+ "postinstall": "echo 'Installation successful. What to do next:\\n npm start # Starts the server on port 3001\\n gulp watch # Builds TerriaMap and dependencies, and rebuilds if files change.'",
"hot": "webpack-dev-server --inline --config buildprocess/webpack.config.hot.js --hot --host 0.0.0.0",
"deploy": "rm -rf node_modules && npm install && npm run deploy-without-reinstall",
"deploy-without-reinstall": "gulp clean && gulp release && npm run deploy-current",
| 7 |
diff --git a/lib/model.js b/lib/model.js @@ -77,7 +77,7 @@ Model.prototype.initStore = function() {
// LevelUP ; the safety we have here to re-use instance is right now only because of the tests
this.store = stores[path.resolve(filename)];
- this.store = stores[path.resolve(filename)] = (this.store && this.store.isOpen()) ? this.store : levelup(encode(this.options.store.db(filename)), this.options.store || { });
+ this.store = stores[path.resolve(filename)] = (this.store && this.store.isOpen()) ? this.store : levelup(encode(this.options.store.db(filename, this.options.store || { })));
this._pipe.resume();
};
| 1 |
diff --git a/public/app/style.scss b/public/app/style.scss @@ -231,6 +231,7 @@ header {
.list--episodes {
margin-top: 71px;
+ overflow-x: hidden;
overflow-y: scroll;
height: calc(100% - 71px);
}
@@ -384,9 +385,10 @@ cbus-episode {
width: 100%;
height: $height;
+ position: relative;
background-color: $white;
- position: relative;
+ cursor: default;
transition-property: transform;
@@ -925,6 +927,9 @@ cbus-episode {
display: flex;
justify-content: space-around;
align-items: center;
+ flex-wrap: wrap;
+ flex-direction: column;
+ padding: 0 0.5em;
.filter {
border: none;
@@ -932,9 +937,10 @@ cbus-episode {
background: transparent;
box-shadow: 0 1px rgba(0, 0, 0, 0.1);
border-radius: 0;
- padding: 0.5em 0;
+ width: 50%;
+ padding: 0.3em 0;
+ padding-right: 1.5em;
font-size: 0.8em;
- width: 100px;
appearance: none;
background-image: url("img/arrow_drop_down.svg");
@@ -1265,3 +1271,98 @@ button.material {
}
}
}
+
+@media only screen and (max-width: 1037px) {
+ $content-width: 400px;
+ $header-width: 50px;
+
+ .content-container {
+ width: $content-width;
+ left: $header-width;
+ }
+
+ .player {
+ width: calc(100% - #{$header-width + $content-width});
+ }
+
+ .podcast-detail-container {
+ width: $content-width + $header-width;
+ }
+
+ .firstrun-container {
+ width: calc(100% - #{$header-width + $content-width});
+ }
+
+ header {
+ width: $header-width;
+
+ .material-icons.md-36 {
+ font-size: 24px;
+ }
+
+ .logo {
+ width: $header-width;
+ height: $header-width;
+ }
+ }
+
+ .podcasts_feed, .explore_feed {
+ $size: 111px;
+ width: $size !important;
+ height: $size !important;
+ }
+
+ cbus-episode {
+ .episode_info .episode_text .episode_title {
+ font-size: 1em;
+ }
+
+ .episode_buttons {
+ width: #{24 + 5}px;
+
+ button {
+ &:not(.episode_button--play) {
+ transform: translateX(100px);
+ opacity: 0;
+ }
+
+ &.episode_button--play {
+ transform: translateX(#{- (24 + 5) * 3}px);
+ }
+ }
+ }
+
+ &:hover {
+ .episode_buttons {
+ width: #{(24 + 5) * 4}px;
+
+ button {
+ transform: translateX(0);
+ opacity: 1;
+
+ &:not(.episode_button--play) {
+ transition-property: transform, opacity;
+ }
+ }
+ }
+ }
+ }
+
+ .player .player_main .player_bottom .player_detail .player_detail_header .player_detail_image {
+ $size: 120px;
+ width: 120px;
+ height: 120px;
+ }
+
+ .player .player_main .player_bottom .player_detail .player_detail_header .player_detail_header_right .player_detail_title, .player.video-mode .player_main .player_bottom .player_detail .player_detail_header .player_detail_header_right .player_detail_title {
+ font-size: 0.7em;
+ }
+
+ .player .player_main .player_bottom .player_detail .player_detail_header .player_detail_header_right .player_detail_feed-title {
+ font-size: 0.5em;
+ }
+
+ .player .player_main .player_bottom .player_detail .player_detail_header .player_detail_header_right .player_detail_date {
+ font-size: 0.35em;
+ }
+}
| 7 |
diff --git a/src/map/handler/Map.Drag.js b/src/map/handler/Map.Drag.js @@ -174,7 +174,15 @@ class MapDragHandler extends Handler {
}
if (this._rotateMode.indexOf('rotate') >= 0 && map.options['dragRotate']) {
- const bearing = map.getBearing() - 0.6 * (this.preX - mx);
+ let bearing;
+ if (map.options['dragPitch'] || dx > dy) {
+ bearing = map.getBearing() - 0.6 * (this.preX - mx);
+ } else if (mx > map.width / 2) {
+ bearing = map.getBearing() + 0.6 * (this.preY - my);
+ } else {
+ bearing = map.getBearing() - 0.6 * (this.preY - my);
+ }
+
if (!this.db) {
this.db = sign(bearing - this.startBearing);
}
| 3 |
diff --git a/new-client/src/components/App.js b/new-client/src/components/App.js @@ -156,8 +156,9 @@ class App extends React.PureComponent {
mapClickDataResult: {},
// Drawer-related states
- drawerVisible: false,
- drawerPermanent: false,
+ drawerVisible: props.config.mapConfig.map.drawerVisibleAtStart || false,
+ drawerPermanent:
+ props.config.mapConfig.map.drawerPermanentAtStart || false,
drawerMouseOverLock: false
};
this.globalObserver = new Observer();
| 11 |
diff --git a/src/traces/splom/index.js b/src/traces/splom/index.js @@ -198,7 +198,7 @@ function plotOne(gd, cd0) {
// TODO splom 'needs' the grid component, register it here?
-function hoverPoints(pointData, xval, yval, hovermode) {
+function hoverPoints(pointData, xval, yval) {
var cd = pointData.cd;
var trace = cd[0].trace;
var xa = pointData.xa;
| 2 |
diff --git a/token-metadata/0x431ad2ff6a9C365805eBaD47Ee021148d6f7DBe0/metadata.json b/token-metadata/0x431ad2ff6a9C365805eBaD47Ee021148d6f7DBe0/metadata.json "symbol": "DF",
"address": "0x431ad2ff6a9C365805eBaD47Ee021148d6f7DBe0",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/compat/src/index.js b/compat/src/index.js import { render as preactRender, cloneElement as preactCloneElement, createRef, h, Component, options, toChildArray, createContext, Fragment } from 'preact';
import * as hooks from 'preact/hooks';
export * from 'preact/hooks';
+import { assign } from '../../src/util';
const version = '16.8.0'; // trick libraries to think we are react
@@ -292,7 +293,7 @@ function memo(c, comparer) {
function Memoed(props) {
this.shouldComponentUpdate = shouldUpdate;
- return h(c, { ...props });
+ return h(c, assign({}, props));
}
Memoed.displayName = 'Memo(' + (c.displayName || c.name) + ')';
Memoed._forwarded = true;
@@ -365,8 +366,7 @@ export {
};
// React copies the named exports to the default one.
-export default {
- ...hooks,
+export default assign({
version,
Children,
render,
@@ -385,4 +385,4 @@ export default {
PureComponent,
memo,
forwardRef
-};
+}, hooks);
| 14 |
diff --git a/public/css/main.css b/public/css/main.css @@ -197,47 +197,6 @@ footer {
top:1px;
}
-@media only screen and (max-width: 767px) {
- .navbar-right {
- float: none !important;
- }
-
- .navbar-nav {
- background-color: white;
- box-shadow: 0px 2px 5px darkgrey;
- border-left: 1px solid #e7e7e7;
- border-right: 1px solid #e7e7e7;
- border-bottom: 1px solid #e7e7e7;
- border-radius: 5px;
- }
-
- .navbar-nav > li {
- float: none !important;
- }
-
- .navbar-nav > li > a.navbarBtn {
- -moz-border-radius: 0px;
- -webkit-border-radius: 0px;
- border-radius: 0px;
- border: none;
- display: block;
- top: 0px;
- }
-
- .navbarLink {
- margin-top: 0px;
- margin-left: 0px;
- }
-
- .grayButton {
- top: 0px;
- }
-
- .container-fluid > .navbar-header {
- margin-left: 0px;
- }
-}
-
.logintext {
font: normal normal normal 14px/1.4em raleway,sans-serif;
font-family: 'Raleway', sans-serif;
@@ -1257,17 +1216,6 @@ kbd {
position: relative;
}
-@media only screen and (max-width: 767px) {
- .navbar-nav .open .dropdown-menu {
- position: relative;
- border: none;
- -moz-border-radius: 0px;
- -webkit-border-radius: 0px;
- border-radius: 0px;
- width: 100%;
- }
-}
-
/*Overlay box - start*/
#advanced-overlay,
#neighborhood-completion-overlay,
@@ -1449,3 +1397,73 @@ kbd {
top: -85px;
visibility: hidden;
}
+
+@media only screen and (max-width: 767px) {
+ .navbar-nav {
+ background-color: white;
+ -moz-box-shadow: 0px 1px 8px 0px #999;
+ -webkit-box-shadow: 0px 1px 8px 0px #999;
+ box-shadow: 0px 1px 8px 0px #999;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ margin: 5px 0 5px 0;
+ padding-top: 10px;
+ }
+
+ .navbar-nav > li {
+ float: none;
+ }
+
+ .navbar-nav > :last-child {
+ padding-top: 5px;
+ }
+
+ .navbar-nav > li > a.navbarBtn {
+ -moz-border-radius: 0px;
+ -webkit-border-radius: 0px;
+ border-radius: 0px;
+ border: none;
+ display: block;
+ top: 0px;
+ }
+
+ .navbarLink {
+ margin-top: 0px;
+ margin-left: 0px;
+ }
+
+ .grayButton {
+ top: 0px;
+ border: none;
+ width: 100%;
+ -moz-border-radius: 0 0 5px 5px;
+ -webkit-border-radius: 0 0 5px 5px;
+ border-radius: 0 0 5px 5px;
+ }
+
+ .container-fluid > .navbar-header {
+ margin-left: 0px;
+ }
+
+ .navbar-nav > li > a.navbarBtn:hover {
+ border: none;
+ }
+
+ .navbar-collapse {
+ border: none;
+ }
+
+ .navbar-nav .open .dropdown-menu {
+ position: relative;
+ border: none;
+ -moz-border-radius: 0 0 5px 5px;
+ -webkit-border-radius: 0 0 5px 5px;
+ border-radius: 0 0 5px 5px;
+ width: 100%;
+ }
+
+ .navbar-nav.navbar-right:last-child {
+ margin-right: 0px;
+ }
+}
| 7 |
diff --git a/README.md b/README.md @@ -122,6 +122,41 @@ A repo that demonstrates how to build plotly.js with Webpack can be found [here]
...
```
+#### Building plotly.js with Angular CLI
+
+Currently Angular CLI use Webpack under the hood to bundle and build your Angular application.
+Sadly it doesn't allow to override its Webpack config, and therefore to use the plugin mentioned in [Building plotly.js with Webpack](#building-plotly.js-with-webpack).
+Without this plugin your build will fail when it tries to build glslify for GLSL plots.
+
+Currently 2 solutions exists to circumvent this issue :
+1) If you need to use GLSL plots, you can create a Webpack config from your Angular CLI projet with [ng eject](https://github.com/angular/angular-cli/wiki/eject).
+This will allow you to follow the instructions regarding Webpack.
+2) If you don't need to use GLSL plots, you can make a custom build containing only the required modules for your plots.
+The clean way to do it with Angular CLI is not the method described in [Modules](#modules) but the following :
+```typescript
+// in the Component you want to create a graph
+import * as Plotly from 'plotly.js';
+```
+
+```json
+// in src/tsconfig.app.json
+...
+ "compilerOptions": {
+ ...
+ "paths": {
+ "plotly.js": [
+ // List here the modules you want to import
+ // this exemple is enough for scatter plots
+ "../node_modules/plotly.js/lib/core.js",
+ "../node_modules/plotly.js/lib/scatter.js"
+ ]
+ }
+ ...
+ }
+...
+
+```
+
## Bugs and feature requests
Have a bug or a feature request? Please first read the [issues guidelines](https://github.com/plotly/plotly.js/blob/master/CONTRIBUTING.md#opening-issues).
| 0 |
diff --git a/Source/Scene/ModelExperimental/PickingPipelineStage.js b/Source/Scene/ModelExperimental/PickingPipelineStage.js @@ -38,8 +38,6 @@ PickingPipelineStage.process = function (
var model = renderResources.model;
var instances = runtimeNode.node.instances;
- shaderBuilder.addDefine("USE_PICKING", undefined, ShaderDestination.BOTH);
-
if (renderResources.hasFeatureIds) {
processPickTexture(renderResources, primitive, instances, context);
} else if (defined(instances)) {
@@ -166,6 +164,7 @@ function processInstancedPickIds(renderResources, instances, context) {
renderResources.attributes.push(pickIdsVertexAttribute);
var shaderBuilder = renderResources.shaderBuilder;
+ shaderBuilder.addDefine("USE_PICKING", undefined, ShaderDestination.BOTH);
shaderBuilder.addAttribute("vec4", "a_pickColor");
shaderBuilder.addVarying("vec4", "v_pickColor");
renderResources.pickId = "v_pickColor";
| 1 |
diff --git a/packages/app/src/server/models/page-operation.ts b/packages/app/src/server/models/page-operation.ts @@ -52,7 +52,7 @@ export type PageOperationDocumentHasId = PageOperationDocument & { _id: ObjectId
export interface PageOperationModel extends Model<PageOperationDocument> {
findByIdAndUpdatePageActionStage(pageOpId: ObjectIdLike, stage: PageActionStage): Promise<PageOperationDocumentHasId | null>
findMainOps(filter?: FilterQuery<PageOperationDocument>, projection?: any, options?: QueryOptions): Promise<PageOperationDocumentHasId[]>
- deleteAllByPageActionType(deleteTypeList: PageActionType[]): Promise<void>
+ deleteByActionTypes(deleteTypeList: PageActionType[]): Promise<void>
}
const pageSchemaForResuming = new Schema<IPageForResuming>({
@@ -121,11 +121,11 @@ schema.statics.findMainOps = async function(
);
};
-schema.statics.deleteAllByPageActionType = async function(
- deleteTypeList: PageActionType[],
+schema.statics.deleteByActionTypes = async function(
+ actionTypes: PageActionType[],
): Promise<void> {
- await this.deleteMany({ actionType: { $in: deleteTypeList } });
- logger.info(`Deleted all PageOperation documents with actionType: [${deleteTypeList}]`);
+ await this.deleteMany({ actionType: { $in: actionTypes } });
+ logger.info(`Deleted all PageOperation documents with actionType: [${actionTypes}]`);
};
export default getOrCreateModel<PageOperationDocument, PageOperationModel>('PageOperation', schema);
| 7 |
diff --git a/app/shared/components/Global/Form/Field/Key/Public.js b/app/shared/components/Global/Form/Field/Key/Public.js @@ -63,7 +63,8 @@ class GlobalFormFieldKeyPublic extends Component<Props> {
label,
loading,
name,
- t
+ t,
+ width
} = this.props;
const {
@@ -95,6 +96,7 @@ class GlobalFormFieldKeyPublic extends Component<Props> {
name={name}
onChange={this.onChange}
defaultValue={generated || value}
+ width={width}
/>
);
}
| 11 |
diff --git a/token-metadata/0xc5e19Fd321B9bc49b41d9a3a5ad71bcc21CC3c54/metadata.json b/token-metadata/0xc5e19Fd321B9bc49b41d9a3a5ad71bcc21CC3c54/metadata.json "symbol": "TDEX",
"address": "0xc5e19Fd321B9bc49b41d9a3a5ad71bcc21CC3c54",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/tom-select.js b/src/tom-select.js @@ -235,7 +235,7 @@ export default class TomSelect extends MicroPlugin(MicroEvent){
var target_match = parentMatch(e.target, '[data-selectable]', dropdown);
if( target_match ){
- return self.onOptionHover.call(self, target_match );
+ return self.onOptionHover.call(self, e, target_match );
}
}, true);
@@ -243,7 +243,7 @@ export default class TomSelect extends MicroPlugin(MicroEvent){
var target_match = parentMatch( evt.target, '.'+self.settings.itemClass, control);
if( target_match ){
- return self.onItemSelect.call(self, target_match, evt);
+ return self.onItemSelect.call(self, evt, target_match);
}
return self.onMouseDown.call(self, evt);
});
@@ -265,8 +265,11 @@ export default class TomSelect extends MicroPlugin(MicroEvent){
// clicking on an option should selectit
var doc_mousedown = function(e){
+ // if dropdownParent is set, options may not be within self.wrapper
+ var option = parentMatch(e.target, '[data-selectable]',self.dropdown);
+
// outside of this instance
- if( !self.wrapper.contains(e.target) ){
+ if( !option && !self.wrapper.contains(e.target) ){
if (self.isFocused) {
self.blur(e.target);
}
@@ -276,10 +279,8 @@ export default class TomSelect extends MicroPlugin(MicroEvent){
e.preventDefault();
e.stopPropagation();
- // option
- var option = parentMatch(e.target, '[data-selectable]', self.wrapper);
if( option ){
- self.onOptionSelect(option,true);
+ self.onOptionSelect( e, option );
}
};
@@ -619,7 +620,7 @@ export default class TomSelect extends MicroPlugin(MicroEvent){
// doc_src select active option
case constants.KEY_RETURN:
if (self.isOpen && self.activeOption) {
- self.onOptionSelect(self.activeOption);
+ self.onOptionSelect(e,self.activeOption);
e.preventDefault();
}
return;
@@ -637,7 +638,7 @@ export default class TomSelect extends MicroPlugin(MicroEvent){
// tab: select active option and/or create item
case constants.KEY_TAB:
if (self.settings.selectOnTab && self.isOpen && self.activeOption) {
- self.onOptionSelect(self.activeOption);
+ self.onOptionSelect(e,self.activeOption);
// prevent default [tab] behaviour of jump to the next field
// if select isFull, then the dropdown won't be open and [tab] will work normally
@@ -773,10 +774,11 @@ export default class TomSelect extends MicroPlugin(MicroEvent){
* Triggered when the user rolls over
* an option in the autocomplete dropdown menu.
*
+ * @param {object} evt
* @param {HTMLElement} option
* @returns {boolean}
*/
- onOptionHover( option ){
+ onOptionHover( evt, option ){
if (this.ignoreHover) return;
this.setActiveOption(option, false);
}
@@ -785,37 +787,37 @@ export default class TomSelect extends MicroPlugin(MicroEvent){
* Triggered when the user clicks on an option
* in the autocomplete dropdown menu.
*
- * @param {HTMLElement} target
- * @param {boolean} is_mouse_event
+ * @param {object} evt
+ * @param {HTMLElement} option
* @returns {boolean}
*/
- onOptionSelect( target, is_mouse_event=false ){
+ onOptionSelect( evt, option ){
var value, self = this;
- if( !target ){
+ if( !option ){
return;
}
// should not be possible to trigger a option under a disabled optgroup
- if( target.parentElement && target.parentElement.matches('[data-disabled]') ){
+ if( option.parentElement && option.parentElement.matches('[data-disabled]') ){
return;
}
- if( target.classList.contains('create') ){
+ if( option.classList.contains('create') ){
self.createItem(null, true, function() {
if (self.settings.closeAfterSelect) {
self.close();
}
});
} else {
- value = target.dataset.value;
+ value = option.dataset.value;
if (typeof value !== 'undefined') {
self.lastQuery = null;
self.addItem(value);
if (self.settings.closeAfterSelect) {
self.close();
- } else if (!self.settings.hideSelected && is_mouse_event ) {
+ } else if (!self.settings.hideSelected && evt.type && /mouse/.test(evt.type)) {
self.setActiveOption(self.getOption(value));
}
@@ -827,17 +829,17 @@ export default class TomSelect extends MicroPlugin(MicroEvent){
* Triggered when the user clicks on an item
* that has been selected.
*
+ * @param {object} evt
* @param {HTMLElement} item
- * @param {object} e
* @returns {boolean}
*/
- onItemSelect( item, e ){
+ onItemSelect( evt, item ){
var self = this;
if (self.isLocked) return;
if (self.settings.mode === 'multi') {
- e.preventDefault();
- self.setActiveItem(item, e);
+ evt.preventDefault();
+ self.setActiveItem(item, evt);
}
}
| 13 |
diff --git a/Documentation/Contributors/TestingGuide/README.md b/Documentation/Contributors/TestingGuide/README.md @@ -106,7 +106,7 @@ However, many users build apps using the built Cesium.js in `Build/Cesium` (whic
The **Run All Tests against Combined File with Debug Code Removed** is the same except it is for use with the release version of the built Cesium.js (which is created, for example, by running `npm run combineRelease`). The release version has `DeveloperError` exceptions optimized out so this test option makes `toThrowDeveloperError` always pass.
-See the [Contributor's Guide](https://github.com/AnalyticalGraphicsInc/cesium/wiki/Contributor%27s-Guide) for all the CesiumJS build options.
+See the [Build Guide](https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Documentation/Contributors/BuildGuide/README.md#build-scripts) for all the CesiumJS build options.
### Run All Tests with Code Coverage (Build 'instrumentForCoverage' First)
| 1 |
diff --git a/packages/components/types/components/Spacer.d.ts b/packages/components/types/components/Spacer.d.ts @@ -66,9 +66,20 @@ export declare type SpacerProps = {
*
* @example
* ```jsx
+ * // Adding space for elements.
* <Spacer py={10}>
* <View>...</View>
* </Spacer>
* ```
+ *
+ * @example
+ * ```jsx
+ * // Adding adaptive spacing with HStack
+ * <HStack>
+ * <View>...</View>
+ * <Spacer />
+ * <View>...</View>
+ * </HStack>
+ * ```
*/
export declare const Spacer: PolymorphicComponent<SpacerProps>;
| 7 |
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md @@ -37,6 +37,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
* [Erik Andersson](https://github.com/erikmaarten)
* [Austin Eng](https://github.com/austinEng)
* [Shehzan Mohammed](https://github.com/shehzan10)
+ * [Rachel Hwang](https://github.com/rahwang)
* [NICTA](http://www.nicta.com.au/)
* [Chris Cooper](https://github.com/chris-cooper)
* [Kevin Ring](https://github.com/kring)
| 3 |
diff --git a/token-metadata/0x5aCD07353106306a6530ac4D49233271Ec372963/metadata.json b/token-metadata/0x5aCD07353106306a6530ac4D49233271Ec372963/metadata.json "symbol": "ETY",
"address": "0x5aCD07353106306a6530ac4D49233271Ec372963",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/common/lib/util/logger.ts b/common/lib/util/logger.ts @@ -8,8 +8,8 @@ enum LogLevels {
Micro = 4,
}
-function pad(str: unknown, three?: number) {
- return ('000' + str).slice(-2-(three || 0));
+function pad(timeSegment: number, three?: number) {
+ return `${timeSegment}`.padStart(three ? 3 : 2, '0');
}
function getHandler(logger: Function): Function {
| 7 |
diff --git a/src/plugins/Webcam/index.js b/src/plugins/Webcam/index.js @@ -238,9 +238,7 @@ module.exports = class Webcam extends Plugin {
this.captureInProgress = false
const dashboard = this.uppy.getPlugin('Dashboard')
if (dashboard) dashboard.hideAllPanels()
- return this.uppy.addFile(tagFile).catch(() => {
- // Ignore
- })
+ return this.uppy.addFile(tagFile)
}, (error) => {
this.captureInProgress = false
throw error
| 2 |
diff --git a/test_apps/test_app/embark.json b/test_apps/test_app/embark.json "css/app.css": ["app/css/**"],
"images/": ["app/images/**"],
"js/app.js": ["app/js/index.js"],
- "js/test.js": ["app/js/_vendor/jquery.min.js", "app/js/_vendor/async.min.js", "app/js/test.js", "app/js/non_existant_file.js"],
+ "js/test.js": ["app/js/_vendor/jquery.min.js", "app/js/_vendor/async.min.js", "app/js/test.js"],
"index.html": "app/index.html",
"test.html": "app/test.html",
"test2.html": "app/test2.html",
| 2 |
diff --git a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js @@ -348,6 +348,9 @@ export default class ConfirmTransactionBase extends Component {
title = tokenToSend ? `${txParams.value} ${tokenToSend.symbol}` : 'UNKNOWN TOKEN'
subtitle = tokenToSend ? txParams.sendTokenData.tokenProtocol === 'slp' ? 'Simple Ledger Protocol' : 'Wormhole' : ''
hideSubtitle = !tokenToSend
+
+ // Update sendTokenData symbol
+ txParams.sendTokenData.tokenSymbol = tokenToSend ? tokenToSend.symbol : 'UNKNOWN TOKEN'
}
return (
| 12 |
diff --git a/Source/Core/TimeInterval.js b/Source/Core/TimeInterval.js /*global define*/
define([
+ './Check',
'./defaultValue',
'./defined',
'./defineProperties',
- './DeveloperError',
'./freezeObject',
'./JulianDate'
], function(
+ Check,
defaultValue,
defined,
defineProperties,
- DeveloperError,
freezeObject,
JulianDate) {
'use strict';
@@ -139,12 +139,8 @@ define([
*/
TimeInterval.fromIso8601 = function(options, result) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(options)) {
- throw new DeveloperError('options is required.');
- }
- if (!defined(options.iso8601)) {
- throw new DeveloperError('options.iso8601 is required.');
- }
+ Check.typeOf.object('options', options);
+ Check.typeOf.string('options.iso8601', options.iso8601);
//>>includeEnd('debug');
var dates = options.iso8601.split('/');
@@ -180,9 +176,7 @@ define([
*/
TimeInterval.toIso8601 = function(timeInterval, precision) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(timeInterval)) {
- throw new DeveloperError('timeInterval is required.');
- }
+ Check.typeOf.object('timeInterval', timeInterval);
//>>includeEnd('debug');
return JulianDate.toIso8601(timeInterval.start, precision) + '/' + JulianDate.toIso8601(timeInterval.stop, precision);
@@ -243,9 +237,7 @@ define([
*/
TimeInterval.equalsEpsilon = function(left, right, epsilon, dataComparer) {
//>>includeStart('debug', pragmas.debug);
- if (typeof epsilon !== 'number') {
- throw new DeveloperError('epsilon is required and must be a number.');
- }
+ Check.typeOf.number('epsilon', epsilon);
//>>includeEnd('debug');
return left === right ||
@@ -269,12 +261,8 @@ define([
*/
TimeInterval.intersect = function(left, right, result, mergeCallback) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(left)) {
- throw new DeveloperError('left is required.');
- }
- if (!defined(result)) {
- throw new DeveloperError('result is required.');
- }
+ Check.typeOf.object('left', left);
+ Check.typeOf.object('result', result);
//>>includeEnd('debug');
if (!defined(right)) {
@@ -317,12 +305,8 @@ define([
*/
TimeInterval.contains = function(timeInterval, julianDate) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(timeInterval)) {
- throw new DeveloperError('timeInterval is required.');
- }
- if (!defined(julianDate)) {
- throw new DeveloperError('julianDate is required.');
- }
+ Check.typeOf.object('timeInterval', timeInterval);
+ Check.typeOf.object('julianDate', julianDate);
//>>includeEnd('debug');
if (timeInterval.isEmpty) {
| 14 |
diff --git a/app_web/src/logic/uimodel.js b/app_web/src/logic/uimodel.js @@ -44,7 +44,7 @@ class UIModel
pluck('newValue'),
map( environmentName => this.app.environments[environmentName].hdr_path)
);
- const initialEnvironment = "footprint_court";
+ const initialEnvironment = "footprint_court_512";
this.app.selectedEnvironment = initialEnvironment;
this.app.tonemaps = Object.keys(GltfState.ToneMaps).map((key) => {
| 4 |
diff --git a/app/models/taxon_change.rb b/app/models/taxon_change.rb @@ -98,7 +98,7 @@ class TaxonChange < ActiveRecord::Base
end
def input_taxa
- [taxon]
+ [taxon].compact
end
def output_taxa
@@ -178,7 +178,10 @@ class TaxonChange < ActiveRecord::Base
page = 1
loop do
results = Identification.elastic_paginate(
- filters: [{ terms: { "taxon.ancestor_ids" => input_taxon_ids } }],
+ filters: [
+ { terms: { "taxon.ancestor_ids" => input_taxon_ids } },
+ { term: { current: true } }
+ ],
page: page,
per_page: 100
)
| 1 |
diff --git a/app/index.js b/app/index.js @@ -12,6 +12,8 @@ const sanitizeOpts = require('./sanitizeOpts')
app.use(session({
secret: 'alsdjfwernfeklbjweiugerpfiorq3jlkhewfbads',
+ saveUninitialized: true,
+ resave: true
}))
app.use('/front.min.js', browserify(__dirname + '/front.js'))
| 2 |
diff --git a/token-metadata/0x66186008C1050627F979d464eABb258860563dbE/metadata.json b/token-metadata/0x66186008C1050627F979d464eABb258860563dbE/metadata.json "symbol": "MDS",
"address": "0x66186008C1050627F979d464eABb258860563dbE",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/utils/Utils.js b/src/utils/Utils.js @@ -94,6 +94,9 @@ class Utils {
cloneResult[i] = this.clone(source[i])
}
return cloneResult
+ } else if (Object.prototype.toString.call(source) === '[object Null]') {
+ // fixes an issue where null values were converted to {}
+ return null
} else if (typeof source === 'object') {
let cloneResult = {}
for (let prop in source) {
| 1 |
diff --git a/templates/registration/profile.html b/templates/registration/profile.html {% block content %}
-
- <h3>User Registration/Profile</h3>
+<div class ="container">
+ <!-- Sub navigation -->
+ <div class="sub-navigation">
+ <div class="sub-navigation-header">
+ <h4 class="page-title">User Registration/Profile</h4>
+ </div>
+ <div class="sub-navigation-actions">
+ <div class="sub-nav-item">
+ <a href="/bookmark_list">Bookmarks</a>
+</div>
+</div>
+ </div>
{% if form.errors %}
{% for field in form %}
{% for error in field.errors %}
{% endif %}
{% load crispy_forms_tags %}
{% crispy form form.helper %}
- <a href="/bookmark_list">Bookmarks</a>
+ </div>
+
{% endblock content %}
\ No newline at end of file
| 3 |
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -309,11 +309,24 @@ const loadPromise = (async () => {
}
})(),
(async () => {
+ const audioTimeoutTime = 5 * 1000;
const _loadSoundFiles = (fileNames, soundType) => Promise.all(fileNames.map(async fileName => {
const audio = new Audio();
const p = new Promise((accept, reject) => {
- audio.oncanplaythrough = accept;
- audio.onerror = reject;
+ const timeout = setTimeout(() => {
+ reject(new Error('audio load timed out'));
+ }, audioTimeoutTime);
+ const _cleanup = () => {
+ clearTimeout(timeout);
+ };
+ audio.oncanplaythrough = () => {
+ _cleanup();
+ accept();
+ };
+ audio.onerror = err => {
+ _cleanup();
+ reject(err);
+ };
});
// console.log('got src', `../sounds/${soundType}/${fileName}`);
audio.src = `/sounds/${soundType}/${fileName}`;
| 0 |
diff --git a/app/i18n/locales/en-US.json b/app/i18n/locales/en-US.json "wallet.navigation.receive": "Receive",
"wallet.navigation.send": "Send",
"wallet.navigation.transactions": "Transactions",
- "wallet.receive.page.addressCopyNotificationMessage": "You have successfully copied wallet address",
+ "wallet.receive.page.addressCopyNotificationMessage": "You have successfully copied your wallet address",
"wallet.receive.page.copyAddressLabel": "Copy address",
"wallet.receive.page.generateNewAddressButtonLabel": "Generate new address",
"wallet.receive.page.generatedAddressesSectionTitle": "Generated addresses",
| 7 |
diff --git a/src/generators/overflow.js b/src/generators/overflow.js @@ -7,7 +7,7 @@ export default function() {
'mask': { overflow: 'hidden' },
'overflow-visible': { overflow: 'visible' },
'overflow-scroll': { overflow: 'scroll' },
- 'overflow-scroll-x': { 'overflow-x': 'auto', '-ms-overflow-style': '-ms-autohiding-scrollbar' },
- 'overflow-scroll-y': { 'overflow-y': 'auto', '-ms-overflow-style': '-ms-autohiding-scrollbar' },
+ 'overflow-x-scroll': { 'overflow-x': 'auto', '-ms-overflow-style': '-ms-autohiding-scrollbar' },
+ 'overflow-y-scroll': { 'overflow-y': 'auto', '-ms-overflow-style': '-ms-autohiding-scrollbar' },
})
}
| 10 |
diff --git a/Source/Scene/Camera.js b/Source/Scene/Camera.js @@ -2986,7 +2986,7 @@ Camera.prototype.getPickRay = function (windowPosition, result) {
const scene = this._scene;
const frustum = this.frustum;
- if (scene.canvas.style["display"] === "none") {
+ if (defined(scene.canvas.style) && scene.canvas.style["display"] === "none") {
return undefined;
} else if (
defined(frustum.aspectRatio) &&
| 3 |
diff --git a/src/components/general/character-select/CharacterSelect.jsx b/src/components/general/character-select/CharacterSelect.jsx @@ -7,8 +7,9 @@ import { AppContext } from '../../app';
import { MegaHup } from '../../../MegaHup.jsx';
import { LightArrow } from '../../../LightArrow.jsx';
import { world } from '../../../../world.js';
-// import { NpcPlayer } from '../../../../character-controller.js';
+import { NpcPlayer } from '../../../../character-controller.js';
import * as sounds from '../../../../sounds.js';
+import { chatManager } from '../../../../chat-manager.js';
import musicManager from '../../../../music-manager.js';
//
@@ -131,7 +132,8 @@ export const CharacterSelect = () => {
const [ npcPlayer, setNpcPlayer ] = useState(null);
const [ enabled, setEnabled ] = useState(false);
const [ npcPlayerCache, setNpcPlayerCache ] = useState(new Map());
- const [ themeSongCache, setThemeSongCache ] = useState(new WeakMap());
+ const [ themeSongCache, setThemeSongCache ] = useState(new Map());
+ const [ characterIntroCache, setCharacterIntroCache ] = useState(new Map());
const refsMap = (() => {
const map = new Map();
@@ -154,8 +156,6 @@ export const CharacterSelect = () => {
if (el) {
const rect = el.getBoundingClientRect();
const parentRect = el.offsetParent.getBoundingClientRect();
- // window.rect = rect;
- // window.parentRect = parentRect;
setArrowPosition([
Math.floor(rect.left - parentRect.left + rect.width / 2 + 40),
Math.floor(rect.top - parentRect.top + rect.height / 2),
@@ -163,8 +163,6 @@ export const CharacterSelect = () => {
} else {
setArrowPosition(null);
}
- // console.log('got ref', ref);
- // setArrowPosition([highlightCharacter.x, highlightCharacter.y]);
} else {
setArrowPosition(null);
}
@@ -177,8 +175,16 @@ export const CharacterSelect = () => {
const {avatarUrl} = targetCharacter;
let live = true;
- let npcPlayer = npcPlayerCache.get(avatarUrl);
(async () => {
+ sounds.playSoundName('menuClick');
+
+ let [
+ npcPlayer,
+ themeSong,
+ characterIntro,
+ ] = await Promise.all([
+ (async () => {
+ let npcPlayer = npcPlayerCache.get(avatarUrl);
if (!npcPlayer) {
const avatarApp = await metaversefile.createAppAsync({
// type: 'application/npc',
@@ -195,24 +201,49 @@ export const CharacterSelect = () => {
avatarApp.destroy();
return;
}
- // console.log('got avatar app', avatarApp, targetCharacter);
- // debugger;
npcPlayer = avatarApp.npcPlayer;
- // npcPlayer = new NpcPlayer();
- // npcPlayer.setAvatarApp(avatarApp);
npcPlayerCache.set(avatarUrl, npcPlayer);
}
-
- sounds.playSoundName('menuClick');
-
- let themeSong = themeSongCache.get(npcPlayer);
+ return npcPlayer;
+ })(),
+ (async () => {
+ let themeSong = themeSongCache.get(targetCharacter.themeSongUrl);
if (!themeSong) {
- themeSong = await npcPlayer.fetchThemeSong();
- themeSongCache.set(npcPlayer, themeSong);
+ themeSong = await NpcPlayer.fetchThemeSong(targetCharacter.themeSongUrl);
+ themeSongCache.set(targetCharacter.themeSongUrl, themeSong);
if (!live) return;
}
musicManager.playCurrentMusic(themeSong);
+ return themeSong;
+ })(),
+ (async () => {
+ let characterIntro = characterIntroCache.get(targetCharacter.avatarUrl);
+ if (!characterIntro) {
+ const loreAIScene = metaversefile.useLoreAIScene();
+ const response = await loreAIScene.generateCharacterIntroPrompt(targetCharacter.name, targetCharacter.bio);
+ console.log('got character intro', response);
+ characterIntroCache.set(targetCharacter.avatarUrl, response);
+ if (!live) return;
+ return response;
+ } else {
+ return characterIntro;
+ }
+ })(),
+ ]);
+
+ (async () => {
+ if (characterIntro) {
+ const {message, onselect} = characterIntro;
+
+ const preloadedMessage = npcPlayer.voicer.preloadMessage(message);
+ await chatManager.waitForVoiceTurn(() => {
+ return npcPlayer.voicer.start(preloadedMessage);
+ });
+ } else {
+ console.warn('no character intro');
+ }
+ })();
setNpcPlayer(npcPlayer);
})();
@@ -274,6 +305,20 @@ export const CharacterSelect = () => {
await localPlayer.setPlayerSpec(character.avatarUrl, character);
})();
+ (async () => {
+ let characterIntro = characterIntroCache.get(character.avatarUrl);
+ // console.log('character on click', character.avatarUrl, characterIntro)
+ if (characterIntro) {
+ const {onselect} = characterIntro;
+ // console.log('onselect', {characterIntro, onselect});
+
+ const preloadedMessage = npcPlayer.voicer.preloadMessage(onselect);
+ await chatManager.waitForVoiceTurn(() => {
+ return npcPlayer.voicer.start(preloadedMessage);
+ });
+ }
+ })();
+
setTimeout(() => {
setState({ openedPanel: null });
}, 1000);
| 0 |
diff --git a/src/js/wallet/wallet.deposit.controller.js b/src/js/wallet/wallet.deposit.controller.js deposit.refreshUri = function () {
var params = null;
- if (deposit.bitcoinAmount > 0) {
+ if (deposit.bitcoinAmount >= 0.01) {
params = {
amount: deposit.bitcoinAmount
};
| 12 |
diff --git a/site/rabbit.ent b/site/rabbit.ent @@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-<!ENTITY version-java-client "5.5.1">
+<!ENTITY version-java-client "5.5.2">
<!ENTITY version-dotnet-client "5.1.0">
<!ENTITY version-server "3.7.9">
<!ENTITY version-server-series "v3.7.x">
| 12 |
diff --git a/includes/Modules/Search_Console.php b/includes/Modules/Search_Console.php @@ -127,7 +127,6 @@ final class Search_Console extends Module implements Module_With_Screen, Module_
// GET.
'sites' => 'webmasters',
'matched-sites' => 'webmasters',
- 'index-status' => 'webmasters',
'searchanalytics' => 'webmasters',
// POST.
@@ -180,13 +179,6 @@ final class Search_Console extends Module implements Module_With_Screen, Module_
}
return $this->create_search_analytics_data_request( $data_request );
- case 'index-status':
- return $this->create_search_analytics_data_request(
- array(
- 'start_date' => date( 'Y-m-d', strtotime( '365daysAgo' ) ),
- 'end_date' => date( 'Y-m-d', strtotime( 'yesterday' ) ),
- )
- );
}
} elseif ( 'POST' === $method ) {
switch ( $datapoint ) {
@@ -287,7 +279,6 @@ final class Search_Console extends Module implements Module_With_Screen, Module_
'propertyMatches' => $property_matches, // (array) of site objects, or empty array if none.
);
case 'searchanalytics':
- case 'index-status':
return $response->getRows();
}
}
| 2 |
diff --git a/commands/remote.js b/commands/remote.js @@ -10,9 +10,9 @@ module.exports = {
cmd: function(bosco) {
// The attached is unashamedly default TES config, you need to replace it with your own in the bosco.config
var defaultConfig = {
- localConfigurationFiles: ['default.json', 'local.json'],
- likelyHostConfig: '(host)',
- localConnectionString: '(local|127\.0\.0\.1|0\.0\.0\.0)',
+ localConfigurationFiles: ['default.json', 'local.json', 'test.json'],
+ likelyHostConfig: '([^v]host|url)',
+ notLocalConnectionString: '(development|staging|live)',
modules: {
'module-tsl-logger': '^0.2.41',
'electric-metrics': '^0.0.15',
@@ -42,7 +42,7 @@ module.exports = {
var currentPath = this.path.join('.');
if (currentPath.match(remoteConfig.likelyHostConfig)) {
if (typeof item === 'string') {
- if (!item.match(remoteConfig.localConnectionString)) {
+ if (item.match(remoteConfig.notLocalConnectionString)) {
localProblems = true;
bosco.warn('Host problem in ' + repo.cyan + ' at config ' + currentPath.green + ' of ' + item.yellow);
}
@@ -59,7 +59,7 @@ module.exports = {
if (bosco.exists(packageJsonPath)) {
var pkgJson = require(packageJsonPath);
_.forEach(remoteConfig.modules, function(version, module) {
- var repoModuleVersion = pkgJson.dependencies[module] || pkgJson.devDependencies[module];
+ var repoModuleVersion = pkgJson.dependencies && pkgJson.dependencies[module] || pkgJson.devDependencies && pkgJson.devDependencies[module];
if (repoModuleVersion && repoModuleVersion !== 'latest') {
var satisfies = !semver.lt(repoModuleVersion.replace('^', ''), version.replace('^', ''));
if (!satisfies) {
| 7 |
diff --git a/jazz_codeq/index.js b/jazz_codeq/index.js @@ -64,7 +64,7 @@ function handler(event, context, cb) {
const output = responseObj(data.get_codeq_report, serviceContext.query);
return cb(null, output);
}).catch(err => {
- const output = factory.getReportOnError(err, metrics, config, serviceContext);
+ const output = exportable.getReportOnError(err, metrics, config, serviceContext);
if(output.error) {
logger.error(output.error);
return cb(JSON.stringify(errorHandler.throwInputValidationError(output.error)));
@@ -198,8 +198,9 @@ function getReportOnError(err, metrics, config, serviceContext) {
}
}
-const factory = {
+const exportable = {
getReportOnError,
handler
}
-module.exports = factory;
\ No newline at end of file
+
+module.exports = exportable;
\ No newline at end of file
| 10 |
diff --git a/articles/guides/login/universal-vs-embedded.md b/articles/guides/login/universal-vs-embedded.md @@ -64,9 +64,7 @@ Embedded logins in web apps with Auth0 use [Cross-Origin Authentication](/cross-
Cross-origin authentication is only necessary when authenticating against a directory using a username and password. Social identity providers and enterprise federation use a different mechanism, redirecting via standard protocols like OpenID Connect and SAML.
:::
-If you are implementing passwordless with embedded login using Lock or Auth0.js from within your app, rather than Universal Login, you will need to have [custom domains](/custom-domains) set up.
-
-In addition, if you have not enabled custom domain names (`cnames`), the end user must have a browser that supports third-party cookies. Otherwise, in some browsers, cross-origin authentication will fail. For more information, see [Limitations of Cross-Origin Authentication](/cross-origin-authentication).
+In addition, if you have not enabled [custom domains](/custom-domains), the end user must have a browser that supports third-party cookies. Otherwise, in some browsers, cross-origin authentication will fail. For more information, see [Limitations of Cross-Origin Authentication](/cross-origin-authentication). This limitation applies to both traditional username/password database connections as well as to passwordless database connections.
### Security risks
| 3 |
diff --git a/app/components/Features/Grandpa/index.js b/app/components/Features/Grandpa/index.js @@ -18,21 +18,14 @@ import Transfer from './TransferForm';
import Info from '@material-ui/icons/Info';
import GrandpaInfo from 'components/Information/Grandpa';
-import { FormattedMessage } from 'react-intl';
-
-import messages from './messages';
-
-const makeClaim = (values, networkIdentity, referrer) => {
- const data = {
- owner: networkIdentity ? networkIdentity.name : '',
- sym: `4,${values}`,
- referrer,
- };
+const makeClaim = (values, networkIdentity) => {
const transaction = [
{
account: 'grandpacoins',
- name: 'mine',
- data,
+ name: 'quit',
+ data: {
+ owner: networkIdentity ? networkIdentity.name : '',
+ },
},
];
return transaction;
@@ -40,48 +33,21 @@ const makeClaim = (values, networkIdentity, referrer) => {
const Grandpa = props => {
const { pushTransaction, networkIdentity, networkAccount, miner, intl } = props;
- const referrer = props.location.search ? props.location.search.split('=')[1] : '';
const handleClaims = values => {
- const transaction = makeClaim(values, networkIdentity, referrer);
+ const transaction = makeClaim(values, networkIdentity);
pushTransaction(transaction, props.history);
};
- const refLink = `https://eostoolkit.io/grandpacoins?r=${networkIdentity ? networkIdentity.name : 'youracctname'}`;
-
return (
<Tool>
- <ToolSection lg={12}>
- <ToolBody
- color="info"
- icon={Info}
- header={intl.formatMessage(messages.grandpaIndexHeader)}
- subheader={intl.formatMessage(messages.grandpaIndexSubHeader)}>
+ <ToolSection lg={6}>
+ <ToolBody color="info" icon={Info} header="GrandpaCoins">
<GrandpaInfo />
- <h5>
- <FormattedMessage {...messages.grandpaIndexReferralLinkText} />
- <a href={refLink} target="new">
- {refLink}
- </a>
- </h5>
</ToolBody>
</ToolSection>
<ToolSection lg={6}>
- <MineTable
- tokens={['BTC', 'ETH', 'DOGE']}
- stats={miner ? miner.stats : null}
- handleSubmit={handleClaims}
- referrer={referrer}
- intl={intl}
- />
- <MinerTable intl={intl} {...props} />
- <Usurp {...props} />
- <Transfer {...props} />
- </ToolSection>
- <ToolSection lg={6}>
- <TokenTable token={miner ? miner.stats.find(s => s.token === 'BTC') : null} symbol={'BTC'} intl={intl} />
- <TokenTable token={miner ? miner.stats.find(s => s.token === 'ETH') : null} symbol={'ETH'} intl={intl} />
- <TokenTable token={miner ? miner.stats.find(s => s.token === 'DOGE') : null} symbol={'DOGE'} intl={intl} />
+ <MineTable handleSubmit={handleClaims} intl={intl}/>
</ToolSection>
</Tool>
);
| 3 |
diff --git a/scripts/compileContract.js b/scripts/compileContract.js @@ -16,7 +16,7 @@ fs.readFile(inputFilePath, "utf8", function(err, content) {
return console.log(err.message);
}
- content = "// Created using ICO Wizard https://github.com/oraclesorg/ico-wizard by Oracles Network \n" + content;
+ content = "// Created using ICO Wizard https://github.com/poanetwork/ico-wizard by POA Network \n" + content;
if (!isExtended) return compileContract(content);
addExtendedCode(extensionFilePath, content, function(err, contentUpdated) {
| 3 |
diff --git a/modules/binary.js b/modules/binary.js @@ -81,27 +81,45 @@ exports.ByteArray = ByteArray;
exports.ByteString = ByteString;
/**
- * Converts the String to a mutable ByteArray using the specified encoding.
- * @param {String} string The string to convert into a ByteArray
- * @param {String} charset the name of the string encoding. Defaults to 'UTF-8'
- * @returns {ByteArray} a ByteArray representing the string
+ * Converts a String or Binary instance to a mutable ByteArray using the specified encoding.
+ * @param {String|Binary} str The String or Binary to convert into a ByteArray
+ * @param {String} charset the string's encoding. Defaults to 'UTF-8'
+ * @returns {ByteArray} a ByteArray representing the str
* @example const binary = require("binary");
* const ba = binary.toByteArray("hello world");
*/
-exports.toByteArray = (string, charset) => {
- return new ByteArray(String(string), charset || 'utf8');
+exports.toByteArray = (str, charset) => {
+ if (typeof str !== "string" && !(str instanceof Binary)) {
+ throw new Error("'str' must be a string or instance of Binary.");
+ }
+
+ const appliedCharset = charset || 'utf8';
+ if (str instanceof Binary) {
+ return str.toByteArray(appliedCharset, appliedCharset);
+ }
+
+ return new ByteArray(String(str), appliedCharset);
};
/**
- * Converts the String to an immutable ByteString using the specified encoding.
- * @param {String} string The string to convert into a ByteString
- * @param {String} charset the name of the string encoding. Defaults to 'UTF-8'
- * @returns {ByteString} a ByteString representing the string
+ * Converts a String or Binary instance to an immutable ByteString using the specified encoding.
+ * @param {String|Binary} str A String or Binary to convert into a ByteString
+ * @param {String} charset the string's encoding. Defaults to 'UTF-8'
+ * @returns {ByteString} a ByteString representing str
* @example const binary = require("binary");
* const bs = binary.toByteString("hello world");
*/
-exports.toByteString = (string, charset) => {
- return new ByteString(String(string), charset || 'utf8');
+exports.toByteString = (str, charset) => {
+ if (typeof str !== "string" && !(str instanceof Binary)) {
+ throw new Error("'str' must be a string or instance of Binary.");
+ }
+
+ const appliedCharset = charset || 'utf8';
+ if (str instanceof Binary) {
+ return str.toByteString(appliedCharset, appliedCharset);
+ }
+
+ return new ByteString(String(str), appliedCharset);
};
/**
| 11 |
diff --git a/src/core/operations/ResizeImage.mjs b/src/core/operations/ResizeImage.mjs @@ -32,12 +32,14 @@ class ResizeImage extends Operation {
{
name: "Width",
type: "number",
- value: 100
+ value: 100,
+ min: 1
},
{
name: "Height",
type: "number",
- value: 100
+ value: 100,
+ min: 1
},
{
name: "Unit type",
| 0 |
diff --git a/public/app/js/cbus-audio.js b/public/app/js/cbus-audio.js @@ -23,7 +23,7 @@ cbus.audio = {
if (disableAutomaticProgressRestore === true) {
cbus.audio.element.currentTime = 0;
} else {
- tryRestoreProgress();
+ cbus.audio.tryRestoreProgress();
}
cbus.audio.element.onseeked = function() {
@@ -33,7 +33,7 @@ cbus.audio = {
if (disableAutomaticProgressRestore === true) {
cbus.audio.element.currentTime = 0;
} else {
- tryRestoreProgress();
+ cbus.audio.tryRestoreProgress();
}
cbus.audio.updatePlayerTime();
};
| 1 |
diff --git a/source/drag-drop/Drag.js b/source/drag-drop/Drag.js @@ -378,7 +378,13 @@ const Drag = Class({
}
// Add to files if type matches.
if ( !typeRegExp || typeRegExp.test( itemType ) ) {
- files.push( item.getAsFile() );
+ // Error logs show Chrome may return null for
+ // getAsFile; not sure why, but we should ignore
+ // these, nothing we can do.
+ const file = item.getAsFile();
+ if ( file ) {
+ files.push( file );
+ }
}
}
}
| 8 |
diff --git a/src/server/models/config.js b/src/server/models/config.js @@ -185,6 +185,7 @@ module.exports = function(crowi) {
isSavedStatesOfTabChanges: crowi.configManager.getConfig('crowi', 'customize:isSavedStatesOfTabChanges'),
hasSlackConfig: crowi.slackNotificationService.hasSlackConfig(),
env: {
+ NODE_ENV: env.NODE_ENV || 'default',
PLANTUML_URI: env.PLANTUML_URI || null,
BLOCKDIAG_URI: env.BLOCKDIAG_URI || null,
HACKMD_URI: env.HACKMD_URI || null,
| 12 |
diff --git a/configs/next_router_vuejs.json b/configs/next_router_vuejs.json {
"index_name": "next_router_vuejs",
"start_urls": [
+ {
+ "url": "https://next.router.vuejs.org/zh/guide/",
+ "selectors_key": "guide",
+ "page_rank": 10,
+ "tags": ["guide"]
+ },
+ {
+ "url": "https://next.router.vuejs.org/zh/api/",
+ "selectors_key": "api",
+ "page_rank": 8,
+ "tags": ["api"]
+ },
{
"url": "https://next.router.vuejs.org/guide/",
"selectors_key": "guide",
"page_rank": 10,
- "tags": ["guide"],
- "extra_attributes": {
- "language": ["zh"]
- }
+ "tags": ["guide"]
},
{
"url": "https://next.router.vuejs.org/api/",
"selectors_key": "api",
"page_rank": 8,
- "tags": ["api"],
- "extra_attributes": {
- "language": ["zh"]
- }
+ "tags": ["api"]
}
],
"stop_urls": ["(?:(?<!\\.html)(?<!/))$"],
},
"strip_chars": " .,;:#",
"custom_settings": {
- "attributesForFaceting": ["language"]
+ "attributesForFaceting": ["language", "tags"]
},
"conversation_id": ["1305035158"],
- "nb_hits": 1518
+ "nb_hits": 3034
}
| 9 |
diff --git a/includes/Modules/Idea_Hub.php b/includes/Modules/Idea_Hub.php @@ -253,6 +253,7 @@ final class Idea_Hub extends Module
add_filter( 'wp_insert_post_empty_content', '__return_false' );
$post_id = wp_insert_post( array(), false );
+ remove_filter( 'wp_insert_post_empty_content', '__return_false' );
if ( 0 === $post_id ) {
return new WP_Error(
'unable_to_draft_post',
| 2 |
diff --git a/examples/linkedcat/search_options.js b/examples/linkedcat/search_options.js @@ -208,6 +208,15 @@ var SearchOptions = {
}
self.setDateRangeFromPreset("#from", "#to", element.val());
+
+ if($(element.parent()).attr("id") === "include_content_type") {
+ $("#include_content_type-error").css("display", "none")
+ }
+ }
+ }
+ , onSelectAll: function (checked) {
+ if(dropdown_class === ".dropdown_multi_include_content_type") {
+ $("#include_content_type-error").css("display", "none")
}
}
});
| 2 |
diff --git a/test/unit/controller.js b/test/unit/controller.js @@ -616,7 +616,7 @@ exports['controller.tesselEnvVersions'] = {
// This happens with development builds.
noBuildVersionExistsForThisSha(test) {
- test.expect(4);
+ test.expect(1);
const sha = '59ce9c97e275e6e970c1ee668e5591514eb1cd74';
@@ -627,10 +627,7 @@ exports['controller.tesselEnvVersions'] = {
controller.tesselEnvVersions(opts)
.then(() => {
- test.equal(this.info.getCall(0).args[0], 'Tessel Environment Versions:');
- test.equal(this.info.getCall(1).args[0], 't2-cli: 0.1.4');
test.equal(this.info.getCall(2).args[0], `t2-firmware: ${sha}`);
- test.equal(this.info.getCall(3).args[0], 'Node.js: 4.2.1');
test.done();
})
.catch(() => {
| 1 |
diff --git a/packages/app/src/styles/theme/default.scss b/packages/app/src/styles/theme/default.scss @@ -172,7 +172,7 @@ html[dark] {
$color-resize-button-hover: white;
$bgcolor-resize-button-hover: darken($bgcolor-resize-button, 5%);
// Sidebar contents
- $bgcolor-sidebar-context: #111d2f;
+ $bgcolor-sidebar-context: lighten($bgcolor-global, 10%);
$color-sidebar-context: $color-global;
// Sidebar list group
$bgcolor-sidebar-list-group: #1c2a3e; // optional
| 7 |
diff --git a/README.md b/README.md This is the source files repo for [https://www.daskeyboard.io](https://www.daskeyboard.io).
[](https://travis-ci.com/daskeyboard/daskeyboard.io/)
-[](https://montastic.com)
+[](https://daskeyboard.montastic.io)
## Issues, bugs, and requests
-We welcome contributions and feedback on our website!
+We welcome contributions and feedback.
Please file a request in our
[issue tracker](https://github.com/DasKeyboard/q/issues/new)
and we'll take a look.
## Dev env installation
-A tldr version follows:
+A TLDR version follows:
1. Ensure you have [Ruby](https://www.ruby-lang.org/en/documentation/installation/) installed; you need version 2.2.2 or later:
- `ruby --version`
@@ -45,7 +45,7 @@ or
rake checklinks
->IMPORTANT:
+>IMPORTANT
>Need to run the website in another process
Some form of broken links prevention is done automatically by `rake checklinks`
| 14 |
diff --git a/pages/docs/reference/inline-classes.md b/pages/docs/reference/inline-classes.md @@ -180,8 +180,8 @@ fun main() {
acceptString(nameInlineClass) // Not OK: can't pass inline class instead of underlying type
// And vice versa:
- acceptNameTypeAlias("") // OK: pass underlying type instead of alias
- acceptNameInlineClass("") // Not OK: can't pass underlying type instead of inline class
+ acceptNameTypeAlias(string) // OK: pass underlying type instead of alias
+ acceptNameInlineClass(string) // Not OK: can't pass underlying type instead of inline class
}
```
| 14 |
diff --git a/player-avatar-binding.js b/player-avatar-binding.js /* utils to bind players to their avatars
set the avatar state from the player state */
+import * as THREE from 'three';
import Avatar from './avatars/avatars.js';
import {unFrustumCull, enableShadows} from './util.js';
const appSymbol = 'app'; // Symbol('app');
const avatarSymbol = 'avatar'; // Symbol('avatar');
+const maxMirrorDistanace = 3;
+
+const localVector = new THREE.Vector3();
+const localVector2 = new THREE.Vector3();
+const localQuaternion = new THREE.Quaternion();
+// const localPlane = new THREE.Plane();
export function applyPlayerTransformsToAvatar(player, session, rig) {
if (!session) {
@@ -157,6 +164,30 @@ export function applyPlayerActionsToAvatar(player, rig) {
// pose
rig.poseAnimation = poseAction?.animation || null;
}
+export function applyPlayerMirrorsToAvatar(player, rig, mirrors) {
+ rig.eyeballTargetEnabled = false;
+
+ const closestMirror = mirrors.sort((a, b) => {
+ const aDistance = player.position.distanceTo(a.position);
+ const bDistance = player.position.distanceTo(b.position);
+ return aDistance - bDistance;
+ })[0];
+ if (closestMirror) {
+ // console.log('player bind mirror', closestMirror);
+ const mirrorPosition = localVector2.setFromMatrixPosition(closestMirror.matrixWorld);
+
+ if (mirrorPosition.distanceTo(player.position) < maxMirrorDistanace) {
+ rig.eyeballTargetPlane.setFromNormalAndCoplanarPoint(
+ localVector.set(0, 0, 1)
+ .applyQuaternion(localQuaternion.setFromRotationMatrix(closestMirror.matrixWorld)),
+ mirrorPosition
+ );
+ // rig.eyeballTargetPlane.projectPoint(player.position, rig.eyeballTarget);
+ // rig.eyeballTargetInverted = false;
+ rig.eyeballTargetEnabled = true;
+ }
+ }
+}
export function applyPlayerChatToAvatar(player, rig) {
const localPlayerChatActions = Array.from(player.getActions()).filter(action => action.type === 'chat');
const lastMessage = localPlayerChatActions.length > 0 ? localPlayerChatActions[localPlayerChatActions.length - 1] : null;
@@ -201,11 +232,12 @@ export function applyPlayerChatToAvatar(player, rig) {
};
_applyFakeSpeech(lastMessage);
}
-export function applyPlayerToAvatar(player, session, rig) {
+export function applyPlayerToAvatar(player, session, rig, mirrors) {
applyPlayerTransformsToAvatar(player, session, rig);
// applyPlayerMetaTransformsToAvatar(player, session, rig);
applyPlayerModesToAvatar(player, session, rig);
applyPlayerActionsToAvatar(player, rig);
+ applyPlayerMirrorsToAvatar(player, rig, mirrors);
applyPlayerChatToAvatar(player, rig);
}
export async function switchAvatar(oldAvatar, newApp) {
| 0 |
diff --git a/src/js/components/Chart/Chart.js b/src/js/components/Chart/Chart.js @@ -17,8 +17,10 @@ const renderBars = (values, bounds, scale, height) =>
const bottom = (value.length === 2 ? bounds[1][0] : value[1]);
const top = (value.length === 2 ? value[1] : value[2]);
if (top !== 0) {
- const d = `M ${value[0] * scale[0]},${height - (bottom * scale[1])}` +
- ` L ${value[0] * scale[0]},${height - (top * scale[1])}`;
+ const d = `M ${(value[0] - bounds[0][0]) * scale[0]},` +
+ `${height - ((bottom - bounds[1][0]) * scale[1])}` +
+ ` L ${(value[0] - bounds[0][0]) * scale[0]},` +
+ `${height - ((top - bounds[1][0]) * scale[1])}`;
return (
<g key={key} fill='none'>
@@ -33,7 +35,8 @@ const renderBars = (values, bounds, scale, height) =>
const renderLine = (values, bounds, scale, height) => {
let d = '';
(values || []).forEach(({ value }, index) => {
- d += `${index ? ' L' : 'M'} ${value[0] * scale[0]},${height - (value[1] * scale[1])}`;
+ d += `${index ? ' L' : 'M'} ${(value[0] - bounds[0][0]) * scale[0]},` +
+ `${height - ((value[1] - bounds[1][0]) * scale[1])}`;
});
return (
<g fill='none'>
@@ -47,11 +50,13 @@ const renderArea = (values, bounds, scale, height, props) => {
let d = '';
(values || []).forEach(({ value }, index) => {
const top = (value.length === 2 ? value[1] : value[2]);
- d += `${!index ? 'M' : ' L'} ${value[0] * scale[0]},${height - (top * scale[1])}`;
+ d += `${!index ? 'M' : ' L'} ${(value[0] - bounds[0][0]) * scale[0]},` +
+ `${height - ((top - bounds[1][0]) * scale[1])}`;
});
(values || []).reverse().forEach(({ value }) => {
const bottom = (value.length === 2 ? bounds[1][0] : value[1]);
- d += ` L ${value[0] * scale[0]},${height - (bottom * scale[1])}`;
+ d += ` L ${value[0] * scale[0]},` +
+ `${height - ((bottom - bounds[1][0]) * scale[1])}`;
});
d += ' Z';
return (
| 1 |
diff --git a/README.md b/README.md @@ -32,14 +32,14 @@ Community chat. [Join us!][discord-url]
### Basic setup
-Download the [minified library](https://raw.githubusercontent.com/WhitestormJS/whs.js/dev/build/whs.min.js) or link the one from [CDN](https://cdnjs.com/libraries/whitestorm.js)
+Download the [minified library](https://raw.githubusercontent.com/WhitestormJS/whs.js/build/whs.min.js) or link the one from [CDN](https://cdnjs.com/libraries/whitestorm.js)
```html
<script src="js/three.min.js"></script>
<script src="js/whs.min.js"></script>
```
-The code below makes a `WHS.App` instance which handles all your [modules]() and components for better work with `WebGL`. This one creates a _scene_, _camera_ and _renderer_ - we add the following modules to the App.
+The code below makes a `WHS.App` instance which handles all your [modules](https://github.com/WhitestormJS/whs.js/tree/dev/modules) and components for better work with `WebGL`. This one creates a _scene_, _camera_ and _renderer_ - we add the following modules to the App.
```js
const app = new WHS.App([
| 3 |
diff --git a/userscript.user.js b/userscript.user.js @@ -51864,8 +51864,10 @@ var $$IMU_EXPORT$$;
if (domain === "bizweb.dktcdn.net") {
// https://bizweb.dktcdn.net/thumb/grande/100/177/764/products/alicia-vikander-6.jpg?v=1502942542610
+ // https://bizweb.dktcdn.net/thumb/compact/100/177/764/products/alicia-vikander-6.jpg?v=1502942542610
+ // https://bizweb.dktcdn.net/thumb/1024x1024/100/177/764/products/alicia-vikander-6.jpg?v=1502942542610
// https://bizweb.dktcdn.net/100/177/764/products/alicia-vikander-6.jpg?v=1502942542610
- return src.replace(/(:\/\/[^/]*\/)thumb\/[a-z]+\//, "$1");
+ return src.replace(/(:\/\/[^/]+\/+)thumb\/+(?:[a-z]+|[0-9]+x[0-9]+)\/+/, "$1");
}
if (domain_nowww === "socialbliss.com") {
| 7 |
diff --git a/geometry-manager.js b/geometry-manager.js @@ -2342,6 +2342,42 @@ const geometryWorker = (() => {
allocator.freeAll();
};
+ w.getGeometryPhysics = (physics, id) => {
+ const allocator = new Allocator();
+ const positionsBuffer = allocator.alloc(Float32Array, 1024 * 1024);
+ const numPositions = allocator.alloc(Uint32Array, 1);
+ const indicesBuffer = allocator.alloc(Uint32Array, 1024 * 1024);
+ const numIndices = allocator.alloc(Uint32Array, 1);
+
+ const ok = moduleInstance._getGeometryPhysics(
+ physics,
+ id,
+ positionsBuffer.byteOffset,
+ numPositions.byteOffset,
+ indicesBuffer.byteOffset,
+ numIndices.byteOffset,
+ );
+ /* const objectId = scratchStack.u32[21];
+ const faceIndex = scratchStack.u32[22];
+ const objectPosition = scratchStack.f32.slice(23, 26);
+ const objectQuaternion = scratchStack.f32.slice(26, 30); */
+
+ if (ok) {
+ const positions = positionsBuffer.slice(0, numPositions[0]);
+ const indices = indicesBuffer.slice(0, numIndices[0]);
+
+ allocator.freeAll();
+
+ return {
+ positions,
+ indices,
+ };
+ } else {
+ allocator.freeAll();
+ return null;
+ }
+ };
+
w.disableGeometryPhysics = (physics, id) => {
moduleInstance._disableGeometryPhysics(physics, id);
};
| 0 |
diff --git a/src/core/content/connector.js b/src/core/content/connector.js @@ -374,7 +374,8 @@ function BaseConnector() {
* @see {@link MetadataFilter}
* @type {Object}
*/
- this.filter = MetadataFilter.getTrimFilter();
+ this.filter = MetadataFilter.getTrimFilter().extend(
+ MetadataFilter.getNbspFilter());
/**
* Add custom filter to default one. Prefer to use this method to use
| 14 |
diff --git a/lib/types.js b/lib/types.js @@ -96,7 +96,7 @@ type DatatoolsSettings = {
export type Fare = {
currencyType: string,
description: string,
- fareRules: Array<Object>,
+ fare_rules: Array<Object>,
feedId: string,
gtfsFareId: string,
id: string,
@@ -195,7 +195,7 @@ export type GtfsFare = {
currency_type: string,
description: string,
fare_id: string,
- fareRules: Array<Object>,
+ fare_rules: Array<Object>,
feedId: string,
id: string,
payment_method: string,
| 3 |
diff --git a/token-metadata/0x79C5a1Ae586322A07BfB60be36E1b31CE8C84A1e/metadata.json b/token-metadata/0x79C5a1Ae586322A07BfB60be36E1b31CE8C84A1e/metadata.json "symbol": "EDI",
"address": "0x79C5a1Ae586322A07BfB60be36E1b31CE8C84A1e",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/blocks/datatypes.js b/blocks/datatypes.js @@ -18,7 +18,7 @@ Blockly.Blocks['defined_recordtype_typed'] = {
this.appendDummyInput()
.appendField('type ')
- .appendField(typename_field, 'VAR')
+ .appendField(typename_field, 'DATANAME')
.appendField('= {');
this.itemCount_ = 0;
| 10 |
diff --git a/src/test/functional/functional-tests.js b/src/test/functional/functional-tests.js @@ -446,7 +446,6 @@ describe('functional tests', function() {
client.statObject(bucketName, _100kbObjectName, (e, stat) => {
if (e) return done(e)
if (stat.size !== _100kb.length) return done(new Error('size mismatch'))
- if (Object.keys(stat.metaData).length !== Object.keys(metaData).length) return done(new Error('content-type mismatch'))
assert.equal(stat.metaData['content-type'], metaData['Content-Type'])
assert.equal(stat.metaData['Testing'], metaData['Testing'])
assert.equal(stat.metaData['randomstuff'], metaData['randomstuff'])
| 2 |
diff --git a/packages/app/src/components/Navbar/GrowiContextualSubNavigation.tsx b/packages/app/src/components/Navbar/GrowiContextualSubNavigation.tsx @@ -194,8 +194,30 @@ const GrowiContextualSubNavigation = (props) => {
if (typeof pathOrPathsToDelete !== 'string') {
return;
}
+
mutateChildren();
+
+ const path = pathOrPathsToDelete;
+
+ if (isRecursively) {
+ if (isCompletely) {
+ // redirect to not found page
+ window.location.href = path;
+ }
+ else {
+ window.location.reload();
+ }
+ }
+ else {
+ // eslint-disable-next-line no-lonely-if
+ if (isCompletely) {
+ // redirect to not found page
+ window.location.href = path;
+ }
+ else {
window.location.reload();
+ }
+ }
}, [mutateChildren]);
const deleteItemClickedHandler = useCallback(async(pageToDelete, isAbleToDeleteCompletely) => {
@@ -294,7 +316,6 @@ const GrowiContextualSubNavigation = (props) => {
tags={tagsInfoData?.tags || []}
tagsUpdatedHandler={tagsUpdatedHandler}
controls={ControlComponents}
- additionalClasses={['container-fluid']}
/>
);
};
| 7 |
diff --git a/shared/img/status--mixed.svg b/shared/img/status--mixed.svg -<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22"><g fill="none" fill-rule="evenodd"><circle cx="11" cy="11" r="10.5" stroke="#F89D1F"/><path fill="#F89D1F" d="M11 12.731c-.393 0-.714-.4-.714-.891L10 6.892c0-.49.607-.892 1-.892s1 .401 1 .892l-.286 4.948c0 .49-.321.891-.714.891zm0 1.19c.473 0 .857.478.857 1.07 0 .59-.384 1.069-.857 1.069s-.857-.479-.857-1.07c0-.59.384-1.07.857-1.07z"/></g></svg>
\ No newline at end of file
+<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22"><g fill="none" fill-rule="evenodd"><circle cx="11" cy="11" r="10.5" stroke="#A8A8AB"/><path fill="#A8A8AB" d="M12.414 11l2.122 2.121a1 1 0 0 1-1.415 1.415L11 12.414l-2.121 2.122a1 1 0 0 1-1.415-1.415L9.586 11 7.464 8.879A1 1 0 0 1 8.88 7.464L11 9.586l2.121-2.122a1 1 0 0 1 1.415 1.415L12.414 11z"/></g></svg>
\ No newline at end of file
| 3 |
diff --git a/CHANGELOG.md b/CHANGELOG.md ## 7.6.1 (unreleased)
-### Breaking
-
### Feature
+
- Allow addons to provide less files @tiberiuichim
-- Highlight the sidebar toggle button with a small flashing animation @silviubogan @tiberiuichim
- Making Content browser aware of context @iFlameing
-- Fix click-select block on unknown block type @nileshgulia1
### Bugfix
-### Internal
+- Fix click-select block on unknown block type @nileshgulia1
+
## 7.6.0 (2020-07-31)
| 6 |
diff --git a/token-metadata/0x80fB784B7eD66730e8b1DBd9820aFD29931aab03/metadata.json b/token-metadata/0x80fB784B7eD66730e8b1DBd9820aFD29931aab03/metadata.json "symbol": "LEND",
"address": "0x80fB784B7eD66730e8b1DBd9820aFD29931aab03",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/script/ci/init.sh b/script/ci/init.sh @@ -4,9 +4,6 @@ cd /cartodb
mkdir -p log && chmod -R 777 log/
createdb -T template0 -O postgres -h localhost -U postgres -E UTF8 template_postgis || true
psql -h localhost -U postgres template_postgis -c 'CREATE EXTENSION IF NOT EXISTS postgis;CREATE EXTENSION IF NOT EXISTS postgis_topology;'
-REDIS_PORT=6335 RAILS_ENV=development bundle exec rake db:drop || true
REDIS_PORT=6335 RAILS_ENV=test bundle exec rake cartodb:test:prepare
-REDIS_PORT=6335 RAILS_ENV=development bundle exec rake db:create
-REDIS_PORT=6335 RAILS_ENV=development bundle exec rake db:migrate
cd -
| 2 |
diff --git a/node-binance-api.js b/node-binance-api.js /* ============================================================
* node-binance-api
* https://github.com/jaggedsoft/node-binance-api
+ * ============================================================
+ * Copyright 2017-, Jon Eyrick
+ * Released under the MIT License
* ============================================================ */
-
module.exports = function() {
'use strict';
const WebSocket = require('ws');
@@ -93,12 +95,25 @@ module.exports = function() {
ws.on('open', function() {
//console.log("subscribe("+endpoint+")");
});
+ ws.on('close', function() {
+ console.log("WebSocket connection closed");
+ });
ws.on('message', function(data) {
//console.log(data);
callback(JSON.parse(data));
});
};
+ const userDataHandler = function(data) {
+ let type = data.e;
+ if ( type == "outboundAccountInfo" ) {
+ options.balance_callback(data);
+ } else if ( type == "executionReport" ) {
+ options.execution_callback(data);
+ } else {
+ console.log("Unexpected data: "+type);
+ }
+ };
////////////////////////////
const priceData = function(data) {
let prices = {};
@@ -188,14 +203,23 @@ module.exports = function() {
signedRequest(url, data, callback, method);
},
websockets: {
- userData: function(callback) {
+ userData: function(callback, execution_callback = null) {
apiRequest(base+"v1/userDataStream", function(response) {
options.listenKey = response.listenKey;
setInterval(function() { // keepalive
apiRequest(base+"v1/userDataStream", false, "PUT");
},30000);
+ if ( typeof execution_callback == "function" ) {
+ options.balance_callback = callback;
+ options.execution_callback = execution_callback;
+ subscribe(options.listenKey, userDataHandler);
+ return;
+ }
subscribe(options.listenKey, callback);
},"POST");
+ },
+ subscribe: function(url, callback) {
+
},
depth: function(symbols, callback) {
for ( let symbol of symbols ) {
| 3 |
diff --git a/spec/components/list.js b/spec/components/list.js @@ -50,7 +50,7 @@ class ListTest extends React.Component {
rightIcon="star"
/>
<ListItem
- avatar="https://pbs.twimg.com/profile_images/693578804808278017/a5y4h8MN_400x400.png"
+ avatar="https://placeimg.com/80/80/people"
caption="Javi Velasco"
legend="Frontend engineer at Audiense"
rightIcon="star"
@@ -62,7 +62,7 @@ class ListTest extends React.Component {
rightIcon="star"
/>
<ListItem
- avatar="https://pbs.twimg.com/profile_images/755797598565531649/Whsf9259.jpg"
+ avatar="https://placeimg.com/80/80/people"
caption="Tobias Van Schneider"
legend="Designer at Spotify"
rightIcon="star"
@@ -112,7 +112,7 @@ class ListTest extends React.Component {
rightIcon="mail"
/>
<ListItem
- avatar="https://pbs.twimg.com/profile_images/693578804808278017/a5y4h8MN_400x400.png"
+ avatar="https://placeimg.com/80/80/people"
caption="Javi Velasco"
rightIcon="mail"
/>
@@ -122,7 +122,7 @@ class ListTest extends React.Component {
rightIcon="mail"
/>
<ListItem
- avatar="https://pbs.twimg.com/profile_images/755797598565531649/Whsf9259.jpg"
+ avatar="https://placeimg.com/80/80/people"
caption="Tobias Van Schneider"
rightIcon="mail"
/>
@@ -149,7 +149,7 @@ class ListTest extends React.Component {
<ListItem leftIcon="send" rightIcon="done" caption="Reference item" />
<ListItem rightIcon="done" caption="Item with custom left icons">
<FontIcon value="send" />
- <Avatar image="https://pbs.twimg.com/profile_images/693578804808278017/a5y4h8MN_400x400.png" />
+ <Avatar image="https://placeimg.com/80/80/people" />
</ListItem>
<ListItem leftIcon="send">
<ListItemContent caption="custom right icons" legend="ListItemContent acts as a divider" />
@@ -175,7 +175,7 @@ class ListTest extends React.Component {
<ListItem caption="Item with overlayed click events" onClick={() => console.log('clicked row')}>
<FontIcon value="send" onClick={() => console.log('clicked icon')} />
<Avatar
- image="https://pbs.twimg.com/profile_images/693578804808278017/a5y4h8MN_400x400.png"
+ image="https://placeimg.com/80/80/people"
onMouseDown={() => console.log('avatar mouse down, should see ripple')}
onClick={() => console.log('clicked avatar')}
/>
| 1 |
diff --git a/packages/app/test/integration/service/v5.migration.test.js b/packages/app/test/integration/service/v5.migration.test.js @@ -1206,12 +1206,17 @@ describe('V5 page migration', () => {
await normalizeParentByPath('/norm_parent_by_path_B', rootUser);
- const pageB = await Page.findOne({ path: '/norm_parent_by_path_B' });
- const pageBC = await Page.findOne(root({ path: '/norm_parent_by_path_B/norm_parent_by_path_C' }));
+ const pagesB = await Page.find({ path: '/norm_parent_by_path_B' }); // did not exist before running normalizeParentByPath
+ const pageBC = await Page.findById(_pageBC._id);
+
+ // -- check count
+ expect(pagesB.length).toBe(1);
+
+ const pageB = pagesB[0];
// -- check existance
- expect(pageB).not.toBeNull();
- expect(pageBC).not.toBeNull();
+ expect(pageB.path).toBe('/norm_parent_by_path_B');
+ expect(pageBC.path).toBe('/norm_parent_by_path_B/norm_parent_by_path_C');
// -- check parent
expect(pageB.parent).toStrictEqual(rootPage._id);
@@ -1238,16 +1243,17 @@ describe('V5 page migration', () => {
// -- check count
expect(countD).toBe(1);
- const pageD = await Page.findOne({ path: '/norm_parent_by_path_D' });
- const pageDE = await Page.findOne(public({ path: '/norm_parent_by_path_D/norm_parent_by_path_E' }));
- const pageDF = await Page.findOne(root({ path: '/norm_parent_by_path_D/norm_parent_by_path_F' }));
+ const pageD = await Page.findById(_emptyD._id);
+ const pageDE = await Page.findById(_pageDE._id);
+ const pageDF = await Page.findById(_pageDF._id);
// -- check existance
- expect(pageD).not.toBeNull();
- expect(pageDE).not.toBeNull();
- expect(pageDF).not.toBeNull();
+ expect(pageD.path).toBe('/norm_parent_by_path_D');
+ expect(pageDE.path).toBe('/norm_parent_by_path_D/norm_parent_by_path_E');
+ expect(pageDF.path).toBe('/norm_parent_by_path_D/norm_parent_by_path_F');
- // -- check isEmpty
+ // -- check isEmpty of pageD
+ // pageD should not be empty because growi system will create a non-empty page while running normalizeParentByPath
expect(pageD.isEmpty).toBe(false);
// -- check parent
@@ -1277,17 +1283,14 @@ describe('V5 page migration', () => {
// -- check count
expect(countG).toBe(1);
- const pageG = await Page.findOne(public({ path: '/norm_parent_by_path_G' }));
- const pageGH = await Page.findOne(public({ path: '/norm_parent_by_path_G/norm_parent_by_path_H' }));
- const pageGI = await Page.findOne(root({ path: '/norm_parent_by_path_G/norm_parent_by_path_I' }));
+ const pageG = await Page.findById(_pageG._id);
+ const pageGH = await Page.findById(_pageGH._id);
+ const pageGI = await Page.findById(_pageGI._id);
// -- check existance
- expect(pageG).not.toBeNull();
- expect(pageGH).not.toBeNull();
- expect(pageGI).not.toBeNull();
-
- // -- check isEmpty
- expect(pageG.isEmpty).toBe(false);
+ expect(pageG.path).toBe('/norm_parent_by_path_G');
+ expect(pageGH.path).toBe('/norm_parent_by_path_G/norm_parent_by_path_H');
+ expect(pageGI.path).toBe('/norm_parent_by_path_G/norm_parent_by_path_I');
// -- check parent
expect(pageG.parent).toStrictEqual(rootPage._id);
| 7 |
diff --git a/src/lib/connectTraceToPlot.js b/src/lib/connectTraceToPlot.js @@ -32,7 +32,30 @@ export default function connectTraceToPlot(WrappedComponent) {
let fullTrace = {};
for (let i = 0; i < fullData.length; i++) {
if (trace.uid === fullData[i]._fullInput._input.uid) {
+ /*
+ * Fit transforms are custom transforms in our custom plotly.js bundle,
+ * they are different from others as they create an extra trace in the
+ * data array. When plotly.js runs supplyTraceDefaults (before the
+ * transforms code executes) it stores the result in _fullInput,
+ * so that we have a reference to what the original, corrected input was.
+ * Then the transform code runs, our figure changes accordingly, but
+ * we're still able to use the original input as it's in _fullInput.
+ * This is the desired behaviour for our transforms usually,
+ * but it is not useful for fits, as the transform code adds some styles
+ * that are useful for the trace, so really for fits we'd like to read
+ * from _fullData, not _fullInput. Here we're setting _fullInput to
+ * _fullData as that is where the rest of our code expects to find its
+ * values.
+ */
+ if (
+ trace.transforms &&
+ trace.transforms.every(t => t.type === 'fit')
+ ) {
+ fullData[i]._fullInput = fullData[i];
+ }
+
fullTrace = fullData[i]._fullInput;
+
break;
}
}
| 12 |
diff --git a/universe.js b/universe.js @@ -28,7 +28,7 @@ const universeSpecs = {
start_url: 'https://webaverse.github.io/street/index.js',
},
{
- position: [-40, 15, -30],
+ position: [-20, 30, -30],
start_url: 'https://avaer.github.io/land/index.js',
},
{
@@ -40,19 +40,24 @@ const universeSpecs = {
start_url: 'https://avaer.github.io/mirror/index.js',
},
{
- position: [-10, 0, -10],
+ position: [-10, 0, -30],
start_url: 'https://avaer.github.io/shield/index.js',
},
{
position: [4, 0, 1],
- quaternion: [0, 0.7071067811865475, 0, 0.7071067811865476],
+ quaternion: new THREE.Quaternion().setFromUnitVectors(new THREE.Vector3(0, 0, -1), new THREE.Vector3(-1, 0, 0)).toArray(),
start_url: 'https://avatar-models.exokit.org/model43.vrm',
},
{
position: [4, 0, 2],
- quaternion: [0, 0.7071067811865475, 0, 0.7071067811865476],
+ quaternion: new THREE.Quaternion().setFromUnitVectors(new THREE.Vector3(0, 0, -1), new THREE.Vector3(-1, 0, 0)).toArray(),
start_url: 'https://webaverse.github.io/assets/male.vrm',
},
+ {
+ position: [-13, 0, 0],
+ quaternion: new THREE.Quaternion().setFromUnitVectors(new THREE.Vector3(0, 0, 1), new THREE.Vector3(1, 0, 0)).toArray(),
+ start_url: 'https://webaverse.github.io/assets/homespace.glb',
+ },
],
initialScene: {
position: [0, 0, 0],
| 0 |
diff --git a/node/lib/util/push.js b/node/lib/util/push.js @@ -246,6 +246,10 @@ exports.push = co.wrap(function *(repo, remoteName, source, target, force) {
// Resolve the submodule's URL against the URL of the meta-repo,
// ignoring the remote that is configured in the open submodule.
+ if (!(subName in urls)) {
+ throw new UserError(
+ `The submodule {subName} doesn't have an entry in .gitmodules`);
+ }
const subUrl = SubmoduleConfigUtil.resolveSubmoduleUrl(remoteUrl,
urls[subName]);
| 7 |
diff --git a/src/encoded/static/components/matrix.js b/src/encoded/static/components/matrix.js @@ -283,8 +283,9 @@ class Matrix extends React.Component {
// this.state.yGroupOpen[key]), extract just the
// group rows that are under the display limit.
const groupRows = (this.state.yGroupOpen[group.key] || this.state.allYGroupsOpen) ? groupBuckets : groupBuckets.slice(0, yLimit);
+ const yGroupQueryComponent = `${primaryYGrouping}=${globals.encodedURIComponent(group.key)}`;
rows.push(...groupRows.map((yb) => {
- const href = `${searchBase}&${secondaryYGrouping}=${globals.encodedURIComponent(yb.key)}`;
+ const href = `${searchBase}&${secondaryYGrouping}=${globals.encodedURIComponent(yb.key)}&${yGroupQueryComponent}`;
return (
<tr key={`yb-${yb.key}`}>
<th style={{ backgroundColor: '#ddd', border: 'solid 1px white' }}><a href={href}>{yb.key}</a></th>
@@ -295,7 +296,7 @@ class Matrix extends React.Component {
// scale color between white and the series color
cellColor.lightness(cellColor.lightness() + ((1 - (value / matrix.max_cell_doc_count)) * (100 - cellColor.lightness())));
const textColor = cellColor.luminosity() > 0.5 ? '#000' : '#fff';
- const cellHref = `${searchBase}&${secondaryYGrouping}=${globals.encodedURIComponent(yb.key)}&${xGrouping}=${globals.encodedURIComponent(xb.key)}`;
+ const cellHref = `${searchBase}&${secondaryYGrouping}=${globals.encodedURIComponent(yb.key)}&${xGrouping}=${globals.encodedURIComponent(xb.key)}&${yGroupQueryComponent}`;
const title = `${yb.key} / ${xb.key}: ${value}`;
return (
<td key={xb.key} style={{ backgroundColor: cellColor.hexString() }}>
| 0 |
diff --git a/common/types/platform-bufferutils.d.ts b/common/types/platform-bufferutils.d.ts declare module 'platform-bufferutils' {
export const base64CharSet: string;
export const hexCharSet: string;
- export const isBuffer: (buffer: unknown) => buf is Buffer | ArrayBuffer | DataView;
+ export const isBuffer: (buffer: unknown) => buffer is Buffer | ArrayBuffer | DataView;
export const toBuffer: (buffer: Buffer | TypedArray) => Buffer;
export const toArrayBuffer: (buffer: Buffer) => ArrayBuffer;
export const base64Encode: (buffer: Buffer | TypedArray) => string;
| 1 |
diff --git a/test/spec/engine.spec.js b/test/spec/engine.spec.js @@ -23,7 +23,7 @@ describe('Engine', function () {
it('should throw a descriptive error when called with no parameters', function () {
expect(function () {
new Engine(); // eslint-disable-line
- }).toThrowError('new Engine() called with no paramters');
+ }).toThrowError('new Engine() called with no parameters');
});
});
| 1 |
diff --git a/lib/backends/map.js b/lib/backends/map.js @@ -7,13 +7,13 @@ const layerMetadataFactory = require('../metadata');
/**
* @param {RendererCache} rendererCache
* @param {MapStore} mapStore
- * @param {MapValidatorBackend} mapValidatorBackend
+ * @param {MapValidator} mapValidator
* @constructor
*/
-function MapBackend (rendererCache, mapStore, mapValidatorBackend) {
+function MapBackend (rendererCache, mapStore, mapValidator) {
this._rendererCache = rendererCache;
this._mapStore = mapStore;
- this._mapValidatorBackend = mapValidatorBackend;
+ this._mapValidator = mapValidator;
this._layerMetadata = layerMetadataFactory();
}
@@ -47,7 +47,7 @@ MapBackend.prototype.createLayergroup = function (mapConfig, params, validatorMa
}
timer.start('validate');
- this._mapValidatorBackend.validate(validatorMapConfigProvider, (err, isValid) => {
+ this._mapValidator.validate(validatorMapConfigProvider, (err, isValid) => {
timer.end('validate');
if (err || !isValid) {
| 10 |
diff --git a/src/screens/transfer/screen/powerDownScreen.js b/src/screens/transfer/screen/powerDownScreen.js @@ -98,8 +98,8 @@ class PowerDownView extends Component {
_handleAmountChange = ({ hpValue, availableVestingShares }) => {
const { hivePerMVests } = this.props;
- const parsedValue = parseFloat(hpValue);
- const vestsForHp = hpToVests(hpValue, hivePerMVests);
+ const parsedValue = parseFloat(hpValue.replace(',', '.'));
+ const vestsForHp = hpToVests(parsedValue, hivePerMVests);
const totalHP = vestsToHp(availableVestingShares, hivePerMVests).toFixed(3);
if (Number.isNaN(parsedValue)) {
| 14 |
diff --git a/plugin.xml b/plugin.xml <?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.5.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
+<plugin id="cordova-plugin-googlemaps" version="2.5.0-beta-20181020-0912" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>cordova-plugin-googlemaps</name>
<js-module name="Promise" src="www/Promise.js" />
<asset src="www/promise-7.0.4.min.js.map" target="promise-7.0.4.min.js.map" />
| 12 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.