code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/app/features/measurements.js b/app/features/measurements.js -let distances = []
+const state = {
+ distances: [],
+ target: null,
+}
export function createMeasurements({$anchor, $target}) {
- const observer = new IntersectionObserver(([anchor, target], observer) => {
- if (!target || !target.boundingClientRect || !anchor || !anchor.boundingClientRect) {
- observer.unobserve($anchor)
- observer.unobserve($target)
- return
- }
+ if (state.target == $target && state.distances.length) return
+ else state.target = $target
- const anchorBounds = anchor.boundingClientRect
- const targetBounds = target.boundingClientRect
+ if (state.distances.length) clearMeasurements()
- if (distances[parseInt(anchor.target.getAttribute('data-label-id'))])
- return
+ const anchorBounds = $anchor.getBoundingClientRect()
+ const targetBounds = $target.getBoundingClientRect()
const measurements = []
@@ -136,23 +134,15 @@ export function createMeasurements({$anchor, $target}) {
$measurement.position = {
line_model: measurement,
- node_label_id: distances.length,
+ node_label_id: state.distances.length,
}
document.body.appendChild($measurement)
- distances[distances.length] = $measurement
+ state.distances[state.distances.length] = $measurement
})
-
- observer.unobserve($anchor)
- observer.unobserve($target)
- })
-
- observer.observe($anchor)
- observer.observe($target)
}
export function clearMeasurements() {
- distances.forEach(node =>
- node.remove())
- distances = []
+ state.distances.forEach(node => node.remove())
+ state.distances = []
}
| 7 |
diff --git a/notes.md b/notes.md * `F` 2D image import
* `P` bail on decimation if it's proving ineffective
* `P` improve decimation speed by avoiding in/out of Point?
-* `P` server-side processing (determine protocol and storage)
* `P` duplicate objects should share same slice data unless rotated or scaled
# FDM
* `B` outline slicing should be distinct from roughing which handles flats
* `B` excessive moves with tabs. allow reversing in open polys or do not nest them
-* `B` fails in pancaking (clone) when there are no sliced layers (like z bottom too high)
* `B` contouring should extend beyond part boundaries by tool radius
* `B` outside cutting direction in roughing mode inverted
-* `F` provide planar or other visual hint of current z bottom offset
-* `F` redo collision code use fixed slices and path/poly intersection instead of a topo map
* `F` z bounded slices (extension of z bottom offset feature)
* `F` z planar settings visualizations
* `F` use arcs to connect hard angles
* `F` add endmill spiral direction to fully respect climb vs conventional
* `F` add support for tapered ball mills
* `F` warn when part > stock or cuts go outside bed
-* `P` refactor slicing around flats w/ interpolation instead of culling
-* `P` disable topo generation when no contour xy and no depth first
* `P` crossing open space check point is outside camshell before returning max z
* `P` background worker to speculatively generate topo maps (and maybe pre-slicing)
| 3 |
diff --git a/doc/Client-Portal Protocol.md b/doc/Client-Portal Protocol.md @@ -570,7 +570,7 @@ This a format for client reconnects.
object(P2PQuicParametersMessage)::
{
- type: "p2p-quic-parameters",
+ type: "quic-p2p-parameters",
clientTransportParameters: object(P2PQuicClientParametersMessage) | undefined,
serverTransportParameters: object(P2PQuicServerParametersMessage) | undefined
}
@@ -651,7 +651,7 @@ Step 3: Send client QUIC transport parameters.
{
id: 'b1ff706f-7352-4d02-a6dc-dc840fb3963e',
signaling: {
- type: "p2p-quic-parameters",
+ type: "quic-p2p-parameters",
clientTransportParameters: {
quicKey: 'key',
iceParameters: {
@@ -670,7 +670,7 @@ Step 4: Receive server QUIC transport paramters.
id: ''
status: 'soac',
data: {
- type: "p2p-quic-parameters",
+ type: "quic-p2p-parameters",
serverTransportParameters: {
iceParameters: {
usernameFragment: 'userfrag',
| 10 |
diff --git a/magda-authorization-api/src/createOpaRouter.ts b/magda-authorization-api/src/createOpaRouter.ts @@ -278,28 +278,28 @@ export default function createOpaRouter(options: OpaRouterOptions): Router {
* > - `input.user`
* > - `input.timestamp`
*
- * @apiSuccess (Success JSON Response Body) {bool} partialEvaluation indicates whether or not the policy engine can make a conclusive/unconditional auth decision.
- * When a conclusive/unconditional auth decision is made (i.e. `partialEvaluation`=`false`), the auth decision is returned as policy evaluation value in `result` field.
+ * @apiSuccess (Success JSON Response Body) {bool} hasResidualRules indicates whether or not the policy engine can make a conclusive/unconditional auth decision.
+ * When a conclusive/unconditional auth decision is made (i.e. `hasResidualRules`=`false`), the auth decision is returned as policy evaluation value in `result` field.
* Usually, `true` means the operation should be `allowed`.
*
- * @apiSuccess (Success JSON Response Body) {any} [result] Only presents when `partialEvaluation`=`false`.
+ * @apiSuccess (Success JSON Response Body) {any} [result] Only presents when `hasResidualRules`=`false`.
* The result field contains the policy evaluation result value. `true` means th eoperation is allowed and `false` means otherwise.
* By default, it should be in `bool` type. However, you can opt to overwite the policy to return other type of data.
*
- * @apiSuccess (Success JSON Response Body) {object[]} [residualRules] Only presents when `partialEvaluation`=`true`.
+ * @apiSuccess (Success JSON Response Body) {object[]} [residualRules] Only presents when `hasResidualRules`=`true`.
* A list of residual rules as the result of the partial evaluation of policy due to `unknowns`.
* The residual rules can be used to generate storage engine DSL (e.g. SQL or Elasticsearch DSL) for policy enforcement.
*
* @apiSuccessExample {json} Successful Response Example: a conclusive/unconditional auth decision is made
* {
- * "partialEvaluation" : false,
+ * "hasResidualRules" : false,
* "result": true // -- the evaluation value of the policy. By default, `true` means operation should be `allowed`.
* }
*
* @apiSuccessExample {json} Successful Response Example: Partial Evaluation Result
*
* {
- * "partialEvaluation": true,
+ * "hasResidualRules": true,
* "residualRules": [{"default":true,"head":{"name":"allow","value":{"type":"boolean","value":false}},"body":[{"terms":{"type":"boolean","value":true},"index":0}]},{"head":{"name":"allow","value":{"type":"boolean","value":true}},"body":[{"terms":[{"type":"ref","value":[{"type":"var","value":"eq"}]},{"type":"ref","value":[{"type":"var","value":"input"},{"type":"string","value":"object"},{"type":"string","value":"dataset"},{"type":"string","value":"publishingState"}]},{"type":"string","value":"published"}],"index":0}]}]
* }
*
| 10 |
diff --git a/modules/mapbox/src/deck-utils.js b/modules/mapbox/src/deck-utils.js @@ -40,6 +40,7 @@ export function getDeckInstance({map, gl, deck}) {
gl,
width: false,
height: false,
+ touchAction: 'unset',
viewState: getViewState(map)
});
deck = new Deck(deckProps);
| 0 |
diff --git a/src/components/Histogram/histogram.js b/src/components/Histogram/histogram.js @@ -230,7 +230,7 @@ class Histogram extends Component {
select(this.tooltipNode)
.style('opacity', 1)
.style('left', `${x + 10}px`)
- .style('top', `${y + 5}px`);
+ .style('top', `${y + 20}px`);
}
renderTooltip() {
| 7 |
diff --git a/scripts/collect_all.js b/scripts/collect_all.js @@ -74,7 +74,7 @@ function collect(tag, fromKeys, threshold) {
if (!n) return;
// 'ncn','rcn','lcn', etc.. these are special and not actual networks - ignore them.
- if (tag === 'network' && /^[nrl][cw]n$/.test(n)) return;
+ if (tag === 'network' && /^[inrl][chw]n$/.test(n)) return;
const v = entity.tags(k);
if (!v) return;
| 8 |
diff --git a/src/commands/mention.js b/src/commands/mention.js @@ -102,7 +102,8 @@ async function deleteSubscription (message, profile, feeds, role, user) {
const userID = user ? user.id : undefined
const matchID = roleID || userID
const prefix = profile && profile.prefix ? profile.prefix : config.bot.prefix
- const translate = Translator.createLocaleTranslator(profile.locale)
+ const locale = profile ? profile.locale : undefined
+ const translate = Translator.createLocaleTranslator(locale)
const allSubscribers = await Promise.all(feeds.map(feed => feed.getSubscribers()))
@@ -241,7 +242,8 @@ async function getUserOrRoleFn (m, data) {
async function feedSelectorFn (m, data) {
const { profile, feed, role, user } = data
- const translate = Translator.createLocaleTranslator(profile.locale)
+ const locale = profile ? profile.locale : undefined
+ const translate = Translator.createLocaleTranslator(locale)
return {
...data,
next: {
| 1 |
diff --git a/articles/universal-login/text-customization.md b/articles/universal-login/text-customization.md @@ -18,7 +18,7 @@ Auth0 provides an API that you can use to customize all the text displayed in th
The API is defined with the following structure:
```
-PUT '/api/v2/prompts/PROMPT/custom-texts',
+PUT '/api/v2/prompts/PROMPT/custom-text',
{
"SCREEN": {
"TEXT1_ID": {
@@ -61,7 +61,7 @@ If you want to change the **description** field for the `login` prompt so that i
```har
{
"method": "POST",
- "url": "https://${account.namespace}/api/v2/prompts/login/custom-texts",
+ "url": "https://${account.namespace}/api/v2/prompts/login/custom-text",
"httpVersion": "HTTP/1.1",
"cookies": [],
"headers": [{
@@ -84,7 +84,7 @@ If you want to delete all custom text for the `login` prompt you can send an emp
```har
{
"method": "POST",
- "url": "https://${account.namespace}/api/v2/prompts/login/custom-texts",
+ "url": "https://${account.namespace}/api/v2/prompts/login/custom-text",
"httpVersion": "HTTP/1.1",
"cookies": [],
"headers": [{
| 10 |
diff --git a/app/models/carto/user.rb b/app/models/carto/user.rb @@ -786,6 +786,6 @@ class Carto::User < ActiveRecord::Base
date_from = (options[:from] ? options[:from].to_date : last_billing_cycle)
date_to = (options[:to] ? options[:to].to_date : Date.today)
orgwise = options.fetch(:orgwise, true)
- return date_from, date_to, orgwise
+ [date_from, date_to, orgwise]
end
end
| 4 |
diff --git a/src/init.js b/src/init.js @@ -5,18 +5,26 @@ import goodWallet from './lib/wallet/GoodWallet'
import userStorage from './lib/gundb/UserStorage'
import Config from './config/config'
declare var amplitude
+
+declare var __insp
+declare var FS
export const init = () => {
- return Promise.all([goodWallet.ready, userStorage.ready]).then(() => {
+ return Promise.all([goodWallet.ready, userStorage.ready]).then(async ([wallet, storage]) => {
global.wallet = goodWallet
+ const identifier = goodWallet.getAccountForType('login')
+ const email = (await userStorage.getProfileFieldValue('email')) || ''
if (global.Rollbar && Config.env !== 'test') {
global.Rollbar.configure({
payload: {
person: {
- id: goodWallet.getAccountForType('login')
+ id: identifier
}
}
})
}
- amplitude.getInstance().setUserId(goodWallet.getAccountForType('login'))
+ FS.identify(identifier, {
+ email
+ })
+ amplitude.getInstance().setUserId(identifier)
})
}
| 0 |
diff --git a/src/Tracker.js b/src/Tracker.js @@ -5,7 +5,7 @@ const request = require('request-promise');
const carbonToken = process.env.DISCORD_CARBON_TOKEN;
const botsDiscordPwToken = process.env.DISCORD_BOTS_WEB_TOKEN;
const botsDiscordPwUser = process.env.DISCORD_BOTS_WEB_USER;
-const updateInterval = process.env.TRACKERS_UPDATE_INTERVAL || 260000;
+const updateInterval = process.env.TRACKERS_UPDATE_INTERVAL || 2600000;
/**
* Describes a tracking service for updating remote sites
@@ -75,9 +75,9 @@ class Tracker {
Authorization: botsDiscordPwToken,
},
body: {
- server_count: guildsLen,
- shard_id: this.shardId,
- shard_count: this.shardCount,
+ shard_id: parseInt(this.shardId, 10),
+ shard_count: parseInt(this.shardCount, 10),
+ server_count: parseInt(guildsLen, 10),
},
json: true,
};
| 1 |
diff --git a/sirepo/pkcli/service.py b/sirepo/pkcli/service.py @@ -13,8 +13,9 @@ from pykern import pkconfig
from pykern import pkio
from pykern import pkjinja
from pykern import pksubprocess
+from pykern.pkcollections import PKDict
from pykern.pkdebug import pkdc, pkdexc, pkdp, pkdlog
-import errno
+import contextlib
import os
import py
import re
@@ -22,12 +23,12 @@ import signal
import sirepo.srdb
import socket
import subprocess
-import sys
def flask():
from sirepo import server
+ with pkio.save_chdir(_run_dir()):
use_reloader = pkconfig.channel_in('dev')
app = server.init(use_reloader=use_reloader)
# avoid WARNING: Do not use the development server in a production environment.
@@ -45,23 +46,21 @@ def http():
Used for development only.
"""
- def _env():
- e = os.environ
- e.update(
- SIREPO_JOB_DRIVER_MODULES='local',
- )
- return e
-
- def _signal_exit(*args):
- _exit(*args)
- sys.exit(1)
+ @contextlib.contextmanager
+ def _handle_signals(signums):
+ o = [(x, signal.getsignal(x)) for x in signums]
+ try:
+ [signal.signal(x[0], _kill) for x in o]
+ yield
+ finally:
+ [signal.signal(x[0], x[1]) for x in o]
- def _exit(*args):
+ def _kill(*args):
for p in processes:
try:
p.terminate()
p.wait(1)
- except ProcessLookupError:
+ except (ProcessLookupError, ChildProcessError):
continue
except subprocess.TimeoutExpired:
p.kill()
@@ -72,16 +71,24 @@ def http():
processes.append(subprocess.Popen(
c,
cwd=str(_run_dir()),
- env=_env(),
+ env=e,
))
+ e = PKDict(os.environ)
+ e. SIREPO_JOB_DRIVER_MODULES = 'local'
processes = []
- signal.signal(signal.SIGINT, _signal_exit)
- signal.signal(signal.SIGTERM, _signal_exit)
+ with pkio.save_chdir(_run_dir()), _handle_signals(
+ (signal.SIGINT, signal.SIGTERM),
+ ):
+ try:
_start(['job_supervisor'])
_start(['service', 'flask'])
p, _ = os.wait()
- _exit(signal.SIGTERM)
+ except ChildProcessError:
+ pass
+ finally:
+ _kill()
+
def nginx_proxy():
@@ -106,26 +113,6 @@ def nginx_proxy():
pksubprocess.check_call_with_signals(cmd)
-def rabbitmq():
- assert pkconfig.channel_in('dev')
- run_dir = _run_dir().join('rabbitmq').ensure(dir=True)
- with pkio.save_chdir(run_dir):
- cmd = [
- 'docker',
- 'run',
- '--env=RABBITMQ_NODE_IP_ADDRESS=' + cfg.ip,
- '--net=host',
- '--rm',
- '--volume={}:/var/lib/rabbitmq'.format(run_dir),
- 'rabbitmq:management',
- ]
- try:
- pksubprocess.check_call_with_signals(cmd)
- except OSError as e:
- if e.errno == errno.ENOENT:
- pkcli.command_error('docker is not installed')
-
-
def uwsgi():
"""Starts UWSGI server"""
run_dir = _run_dir()
| 12 |
diff --git a/src/common/mining-pools/pool/pool-management/pool-work/rewards/Payout/Pool-Payouts.js b/src/common/mining-pools/pool/pool-management/pool-work/rewards/Payout/Pool-Payouts.js @@ -199,9 +199,9 @@ class PoolPayouts{
//add rewardConfirmedOther
this.poolData.miners.forEach((miner)=>{
- if ( (miner.__tempRewardConfirmedOther + miner.rewardConfirmedOther) >= consts.MINING_POOL.MINING.MINING_POOL_MINIMUM_PAYOUT ) {
+ if ( (miner.rewardConfirmed) >= consts.MINING_POOL.MINING.MINING_POOL_MINIMUM_PAYOUT ) {
- this._addAddressTo(miner.address).amount += miner.__tempRewardConfirmedOther + miner.rewardConfirmedOther;
+ this._addAddressTo(miner.address).amount += miner.rewardConfirmed;
miner.__tempRewardConfirmedOther = 0;
miner.rewardConfirmedOther = 0;
| 13 |
diff --git a/src/plugin-api.js b/src/plugin-api.js @@ -508,6 +508,14 @@ export default class PluginAPI {
async dockerServiceInfo(serviceName) {
const manager = await this.getManagerSession();
+
+ if (!manager) {
+ const error = new Error('no-manager');
+
+ error.solution = 'Enable swarm in your config and run "mup setup"';
+ throw error;
+ }
+
const result = await this.runSSHCommand(manager, `docker service inspect ${serviceName}`);
let serviceInfo = null;
| 7 |
diff --git a/character-controller.js b/character-controller.js +/*
+character controller is responisible for maintaining player state that is network-replicated.
+*/
+
import * as THREE from 'three';
import {getRenderer, camera, dolly} from './renderer.js';
import physicsManager from './physics-manager.js';
| 0 |
diff --git a/src/framework/components/element/text-element.js b/src/framework/components/element/text-element.js @@ -751,7 +751,8 @@ class TextElement {
const isLineBreak = LINE_BREAK_CHAR.test(char);
if (isLineBreak) {
numBreaksThisLine++;
- if (this._maxLines < 0 || lines < this._maxLines) {
+ // If we are not line wrapping then we should be ignoring maxlines
+ if (!this._wrapLines || this._maxLines < 0 || lines < this._maxLines) {
breakLine(this._symbols, i, _xMinusTrailingWhitespace);
wordStartIndex = i + 1;
lineStartIndex = i + 1;
| 8 |
diff --git a/js/templates/modals/wallet/transaction.html b/js/templates/modals/wallet/transaction.html fiatBtcPairing: `<span class="txB">${priceFrag}</span>`,
});
} else {
+ const fiatBtcPairing = `<span class="txB">${priceFrag}</span>`;
+
+ if (ob.address) {
infoLine = ob.polyT('wallet.transactions.transaction.outgoingText', {
- fiatBtcPairing: `<span class="txB">${priceFrag}</span>`,
+ fiatBtcPairing,
address: `<span class="toAddress noOverflow clrTEmph1">${ob.address}</span>`,
});
+ } else {
+ infoLine = fiatBtcPairing;
+ }
}
%>
<div class="rowTn"><%= infoLine %></div>
| 9 |
diff --git a/includes/Modules/AdSense.php b/includes/Modules/AdSense.php @@ -441,8 +441,16 @@ tag_partner: "site_kit"
return true;
};
case 'GET:clients':
+ if ( ! isset( $data['accountID'] ) ) {
+ return new WP_Error(
+ 'missing_required_param',
+ /* translators: %s: Missing parameter name */
+ sprintf( __( 'Request parameter is empty: %s.', 'google-site-kit' ), 'accountID' ),
+ array( 'status' => 400 )
+ );
+ }
$service = $this->get_service( 'adsense' );
- return $service->adclients->listAdclients();
+ return $service->accounts_adclients->listAccountsAdclients( $data['accountID'] );
case 'GET:connection':
return function() {
$option = $this->get_settings()->get();
@@ -569,12 +577,24 @@ tag_partner: "site_kit"
return true;
};
case 'GET:urlchannels':
+ if ( ! isset( $data['accountID'] ) ) {
+ return new WP_Error(
+ 'missing_required_param',
+ /* translators: %s: Missing parameter name */
+ sprintf( __( 'Request parameter is empty: %s.', 'google-site-kit' ), 'accountID' ),
+ array( 'status' => 400 )
+ );
+ }
if ( ! isset( $data['clientID'] ) ) {
+ return new WP_Error(
+ 'missing_required_param',
/* translators: %s: Missing parameter name */
- return new WP_Error( 'missing_required_param', sprintf( __( 'Request parameter is empty: %s.', 'google-site-kit' ), 'clientID' ), array( 'status' => 400 ) );
+ sprintf( __( 'Request parameter is empty: %s.', 'google-site-kit' ), 'clientID' ),
+ array( 'status' => 400 )
+ );
}
$service = $this->get_service( 'adsense' );
- return $service->urlchannels->listUrlchannels( $data['clientID'] );
+ return $service->accounts_urlchannels->listAccountsUrlchannels( $data['accountID'], $data['clientID'] );
case 'GET:use-snippet':
return function() {
$option = $this->get_settings()->get();
| 4 |
diff --git a/.github/VISION.md b/.github/VISION.md @@ -77,5 +77,9 @@ Thanks for your support!
* Finish the implementation for Tooltips; Rectangle utility class (see <a href="https://github.com/neomjs/neo/issues/51">#51</a>)
* Finish the implementation for form.field.Chip (see <a href="https://github.com/neomjs/neo/issues/31">#31</a>)
* Create a coding style guide (see <a href="https://github.com/neomjs/neo/issues/93">#93</a>)
+* Virtual Dom Engine enhancements
+ 1. Add a 2nd mode where ids do get ignored (e.g. for comparing content on fixed positions like grid rows)
+ 2. Add an option to specify the the tree depth to compare (e.g. only the first level for containers)
+ 3. Refactor vdom.Helper: createDeltas
Copyright (c) 2015 - today, Tobias Uhlig & Rich Waters
\ No newline at end of file
| 12 |
diff --git a/src/plots/layout_attributes.js b/src/plots/layout_attributes.js @@ -233,14 +233,14 @@ module.exports = {
min: 0,
dflt: 64,
editType: 'plot',
- description: 'TODO'
+ description: 'Minimum width of the plot with automargin applied.'
},
minreducedheight: {
valType: 'number',
min: 0,
dflt: 64,
editType: 'plot',
- description: 'TODO'
+ description: 'Minimum height of the plot with automargin applied.'
},
autoexpand: {
valType: 'boolean',
| 0 |
diff --git a/configs/celo.json b/configs/celo.json "sitemap_urls": [
"https://docs.celo.org/sitemap.xml"
],
- "stop_urls": [],
+ "exclusionPatterns": [
+ "https://docs.celo.org/es/**"
+ ],
"selectors": {
"lvl0": {
"selector": "(//ul[contains(@class,'menu__list')]//a[contains(@class, 'menu__link menu__link--sublist menu__link--active')]/text() | //nav[contains(@class, 'navbar')]//a[contains(@class, 'navbar__link--active')]/text())[last()]",
| 8 |
diff --git a/frontend/src/app/components/node/node-summary/node-summary.js b/frontend/src/app/components/node/node-summary/node-summary.js @@ -181,7 +181,7 @@ class NodeSummaryViewModel extends BaseViewModel {
);
this.trust = ko.pureComputed(
- () => trustMapping[node().trusted ? 'TRUSTED' : 'UNTRESTED']
+ () => trustMapping[node().trusted ? 'TRUSTED' : 'UNTRUSTED']
);
this.accessibility = ko.pureComputed(
| 1 |
diff --git a/accessibility-checker-engine/src/v2/aria/ARIAMapper.ts b/accessibility-checker-engine/src/v2/aria/ARIAMapper.ts @@ -564,15 +564,18 @@ export class ARIAMapper extends CommonMapper {
// to that text alternative.
// Append the result to the accumulated text.
if (elem.nodeName.toUpperCase() === "SLOT") {
- //first calculate the its own text if any
+ //if no assignedNode, check its own text
+ if (!(elem as HTMLSlotElement).assignedNodes() || (elem as HTMLSlotElement).assignedNodes().length === 0) {
let innerText = RPTUtil.getInnerText(elem);
if (innerText && innerText !== null && innerText.trim().length > 0)
accumulated += " " + innerText;
- // then calculate assigned text
+ } else {
+ // check text from all assigned nodes
for (const slotChild of (elem as HTMLSlotElement).assignedNodes()) {
let nextChildContent = ARIAMapper.computeNameHelp(walkId, slotChild, labelledbyTraverse, true);
accumulated += " " + nextChildContent;
}
+ }
} else {
let walkChild = elem.firstChild;
while (walkChild) {
| 3 |
diff --git a/module/modifier-bucket/tooltip-window.js b/module/modifier-bucket/tooltip-window.js @@ -65,7 +65,8 @@ export default class ModifierBucketEditor extends Application {
data.isTooltip = !this.options.popOut
data.gmod = this
data.tabIndex = this.tabIndex
- data.journals = this.journals
+ data.journals = game.data.journal.filter(it => ModifierBucketJournals.getJournalIds().includes(it._id))
+ // this.journals
data.stack = this.bucket.modifierStack
data.meleemods = ModifierLiterals.MeleeMods.split('\n')
data.rangedmods = ModifierLiterals.RangedMods.split('\n')
| 11 |
diff --git a/components/Header.js b/components/Header.js @@ -2,7 +2,7 @@ import React from 'react'
import Head from 'next/head'
-const description = 'OONI Explorer is an open data resource on internet censorship around the world. Consisting of millions of network measurements collected from more than 200 countries since 2012, OONI Explorer sheds light on internet censorship and other forms of network interference worldwide.'
+const description = 'OONI Explorer is an open data resource on Internet censorship around the world consisting of millions of measurements on network inteference.'
export default class Header extends React.Component {
render() {
| 7 |
diff --git a/src/utils/order.js b/src/utils/order.js @@ -48,6 +48,10 @@ export function encodeForPrinter(order) {
.codepage(CODEPAGE)
.line(hr)
.align('center')
+ // Set double height text size
+ // @see https://github.com/mike42/escpos-php/blob/dcb569a123d75f9f6a4a927aae7625ca6b7fdcf3/src/Mike42/Escpos/Printer.php#L954-L960
+ // @see https://github.com/NielsLeenheer/EscPosEncoder/pull/21
+ .raw([ 0x1b, 0x21, 16 ])
.line(i18n.t('RECEIPT_HEADING_ORDER_NUMBER', { number: order.number, id: order.id }))
.line(i18n.t('RECEIPT_CUSTOMER_NAME', {customer: order.customer.email}))
.line(hr)
| 12 |
diff --git a/lib/ModuleTemplate.js b/lib/ModuleTemplate.js @@ -126,7 +126,7 @@ class ModuleTemplate {
(options, fn) => {
compilation.hooks.fullHash.tap(options, fn);
},
- "ModuleTemplate.hooks.package is deprecated (use Compilation.hooks.fullHash instead)",
+ "ModuleTemplate.hooks.hash is deprecated (use Compilation.hooks.fullHash instead)",
"DEP_MODULE_TEMPLATE_HASH"
)
}
| 1 |
diff --git a/avatars/microphone-worker.js b/avatars/microphone-worker.js class MicrophoneWorker extends EventTarget {
- constructor(mediaStream, options = {}) {
+ constructor(o, options = {}) {
super();
this.live = true;
+ if (o instanceof MediaStream) {
const audio = document.createElement('audio');
- audio.srcObject = mediaStream;
+ audio.srcObject = o;
audio.muted = true;
+ } else {
+ const oldO = o;
+ oldO.play = (play => function() {
+ play.apply(oldO, arguments);
+ play.apply(o, arguments);
+ })(oldO.play);
+ oldO.pause = (pause => function() {
+ pause.apply(oldO, arguments);
+ pause.apply(o, arguments);
+ })(oldO.pause);
+ o = o.cloneNode();
+ }
this.audioContext = new AudioContext();
- const mediaStreamSource = this.audioContext.createMediaStreamSource(mediaStream);
+ const mediaStreamSource = (() => {
+ if (o instanceof MediaStream) {
+ return this.audioContext.createMediaStreamSource(o);
+ } else {
+ return this.audioContext.createMediaElementSource(o);
+ }
+ })();
this.audioContext.audioWorklet.addModule(options.microphoneWorkletUrl || 'avatars/microphone-worklet.js')
.then(() => {
| 0 |
diff --git a/config/sidebar.yml b/config/sidebar.yml @@ -330,6 +330,45 @@ articles:
- title: "Professional Services"
url: "/services"
+ children:
+ - title: "Overview"
+ url: "/services"
+
+ - title: "Architectural Design Sessions"
+ url: "/services/architectural-design"
+
+ - title: "Performance and Scalability"
+ url: "/services/performance-scalability"
+
+ - title: "Geo High Availability"
+ url: "/services/geo-ha"
+
+ - title: "Advisory Hours: Scenario guidance"
+ url: "/services/scenario-guidance"
+
+ - title: "Advisory Hours: Code Review"
+ url: "/services/code-review"
+
+ - title: "Advisory Hours: Pair Programming"
+ url: "/services/pair-programming"
+
+ - title: "Advisory Hours: Private SaaS reconfiguration"
+ url: "/services/private-saas-configuration"
+
+ - title: "Training: Auth0 Introduction"
+ url: "/services/auth0-introduction"
+
+ - title: "Training: Auth0 Advanced Topics"
+ url: "/services/auth0-advanced"
+
+ - title: "Training: Private SaaS Introduction"
+ url: "/services/private-saas-introduction"
+
+ - title: "Training: Private SaaS Management Workshop"
+ url: "/services/private-saas-management"
+
+ - title: "Jumpstart"
+ url: "/services/jumpstart"
apis:
| 0 |
diff --git a/src/collections/landscape/tools-data.js b/src/collections/landscape/tools-data.js @@ -113,7 +113,7 @@ export const tools_data = [
},
{
tool: "Nighthawk",
- link: "https://github.com/layer5io/nighthawk",
+ link: "https://github.com/layer5io/getnighthawk",
language: "C++",
written_for: "L7 (HTTP/HTTPS/HTTP2) performance characterization tool",
supported_by: "Envoy, CNCF",
| 1 |
diff --git a/CHANGES.md b/CHANGES.md @@ -3,7 +3,7 @@ Change Log
### 1.40 - 2017-12-01
-* Added a reverse geocoder to the Custom Geocoder in Sandcastle, as well as a Reverse Geocoder based on the Bing Maps API as a separate demo. [#5976](https://github.com/AnalyticalGraphicsInc/cesium/pull/5976)
+* Added a Reverse Geocoder based on the Bing Maps API as a Sandcastle demo. [#5976](https://github.com/AnalyticalGraphicsInc/cesium/pull/5976)
* Added `Globe.material` to apply materials to the globe/terrain for shading such as height- or slope-based color ramps. See the new [Sandcastle example](https://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Globe%20Materials.html&label=Showcases). [#5919](https://github.com/AnalyticalGraphicsInc/cesium/pull/5919/fil
* Added ability to support touch event in Imagery Layers Split demo application. [#5948](https://github.com/AnalyticalGraphicsInc/cesium/pull/5948)
* Added `file:` scheme compatibility to `joinUrls`. [#5989](https://github.com/AnalyticalGraphicsInc/cesium/pull/5989)
| 3 |
diff --git a/content/troubleshooting/common-issues.md b/content/troubleshooting/common-issues.md @@ -20,7 +20,7 @@ When building for iOS, the build gets stuck after showing `Xcode build done` in
Running Xcode build...
Xcode build done. 203.6s
-**Flutter**: 1.7.8+hotfix.3, 1.7.8+hotfix.4
+**Flutter**: 1.7.8+hotfix.3, 1.7.8+hotfix.4, 1.9.1+hotfix.2
**Xcode**: N/A
| 3 |
diff --git a/app-manager.js b/app-manager.js @@ -237,14 +237,14 @@ class AppManager extends EventTarget {
if (!live) return _bailout(null);
const app = metaversefile.createApp({
name: contentId,
- type: (() => {
+ /* type: (() => {
const match = contentId.match(/\.([a-z0-9]+)$/i);
if (match) {
return match[1];
} else {
return '';
}
- })(),
+ })(), */
});
app.position.fromArray(position);
| 2 |
diff --git a/README.md b/README.md # Webaverse client app
Uses NodeJS, with vite.js on the backend, serving up index.js and index.html and other types of imports to the end-client. We also have [Totum](https://github.com/webaverse/Totum/) which accepts requests to decode or load various types of files and represent it as a javascript file, and [wsrtc](https://github.com/webaverse/wsrtc/) handling the multiplayer over websockets. Users can join rooms and share CRDT [z.js](https://github.com/webaverse/zjs) state data to one another across the network. Also utilised by wsrtc are web codecs used to perform voice encoding and decoding.
-Once the app is installed all you need to do is go to localhost:3000 to launch the client. ThreeJS is used as a Renderer, physx-wasm for physics calculations as well as VRM models for avatars.
+Once the app is installed all you need to do is go to local.webaverse.com:3000 to launch the client. ThreeJS is used as a Renderer, physx-wasm for physics calculations as well as VRM models for avatars.
## Client Quick Start
| 0 |
diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js @@ -279,7 +279,7 @@ function invite(logins, welcomeNote, policyID) {
}
/**
- * Uploads the image of Avatar to S3 bucket and sets the url locally
+ * Uploads the avatar image to S3 bucket and sets the url locally
*
* @param {String} policyID
* @param {Object} file
| 7 |
diff --git a/src/readonly.js b/src/readonly.js @@ -4,7 +4,7 @@ import dotProp from 'dot-prop';
const readOnly = {
connections: [
'provisioning_ticket_url',
- 'realms'
+ 'realms',
],
tenant: [
'sandbox_versions_available',
@@ -16,7 +16,8 @@ const readOnly = {
'signing_keys',
'global',
'tenant',
- 'custom_login_page_preview'
+ 'custom_login_page_preview',
+ 'config_route'
]
};
| 8 |
diff --git a/src/generators/textStyle.js b/src/generators/textStyle.js @@ -3,17 +3,24 @@ import defineClasses from '../util/defineClasses'
export default function() {
return defineClasses({
'italic': { 'font-style': 'italic' },
- 'normal': { 'font-style': 'normal' },
+ 'not-italic': { 'font-style': 'normal' },
+
'uppercase': { 'text-transform': 'uppercase' },
'lowercase': { 'text-transform': 'lowercase' },
'capitalize': { 'text-transform': 'capitalize' },
- 'transform-none': { 'text-transform': 'none' },
+ 'normal-case': { 'text-transform': 'none' },
+
'underline': { 'text-decoration': 'underline' },
'line-through': { 'text-decoration': 'line-through' },
- 'decoration-none': { 'text-decoration': 'none' },
+ 'no-underline': { 'text-decoration': 'none' },
+
'antialiased': {
'-webkit-font-smoothing': 'antialiased',
'-moz-osx-font-smoothing': 'grayscale'
},
+ 'subpixel-antialiased': {
+ '-webkit-font-smoothing': 'auto',
+ '-moz-osx-font-smoothing': 'auto'
+ }
})
}
| 4 |
diff --git a/aura-components/src/main/components/ui/listSorter/listSorterHelper.js b/aura-components/src/main/components/ui/listSorter/listSorterHelper.js handleOnOpen : function(cmp, force) {
var items = cmp.get('v.items');
- //changed to OR !force to make sure component is rendered before doing
- //dom calculations, in this component force is always true
- if (cmp.get('v.visible') || !cmp.isRendered() || !force) {
+ if ((cmp.get('v.visible') || !cmp.isRendered()) && !force) {
return;
}
this.attachEventHandler(cmp);
| 13 |
diff --git a/src/components/mdx/youtube.js b/src/components/mdx/youtube.js @@ -13,7 +13,7 @@ export default props => {
<iframe
className="AspectRatio--content"
src={`https://www.youtube.com/embed/${props.id}`}
- title={`YouTube video with ID ${props.id}`} /* TODO: do better here */
+ title={props.title || `YouTube video with ID ${props.id}`}
frameBorder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen/>
| 11 |
diff --git a/package.json b/package.json "README.md"
],
"peerDependencies": {
- "apollo-client": "^0.4.21 || ^0.5.1 || ^0.6.0",
+ "apollo-client": "^0.6.0",
"react": "0.14.x || 15.* || ^15.0.0",
"react-dom": "0.14.x || 15.* || ^15.0.0",
"redux": "^2.0.0 || ^3.0.0"
| 11 |
diff --git a/app/views/stats/project_slideshow.html.haml b/app/views/stats/project_slideshow.html.haml UMBRELLA_SUB_PROJECTS = #{ @sub_projects.to_json };
ALL_SUB_PROJECTS = #{ @all_sub_projects.to_json };
LOGO_PATHS = #{ @logo_paths.to_json };
+ TILESERVER = "#{ CONFIG.tile_servers.elasticsearch }";
#app
- content_for :delayed_js do
= javascript_include_tag 'i18n/translations'
| 1 |
diff --git a/assets/js/components/PostSearcher.js b/assets/js/components/PostSearcher.js @@ -49,11 +49,9 @@ function PostSearcher() {
if ( match && match.ID ) {
const {
- ID: id,
permalink: permaLink,
} = match;
- args.id = id;
args.permaLink = permaLink;
}
| 2 |
diff --git a/lib/cartodb/central.rb b/lib/cartodb/central.rb @@ -4,8 +4,8 @@ module Cartodb
class Central
def self.sync_data_with_cartodb_central?
- Cartodb.get_config(:cartodb_central_api, 'username').present? &&
- Cartodb.get_config(:cartodb_central_api, 'password').present?
+ Cartodb.get_config(:message_broker, 'project_id').present? &&
+ Cartodb.get_config(:message_broker, 'central_subscription_name').present?
end
def initialize
@@ -72,26 +72,43 @@ module Cartodb
end
def create_organization_user(organization_name, user_attributes)
- body = {user: user_attributes}
- send_request("api/organizations/#{ organization_name }/users", body, :post, [201])
+ payload = {
+ organization_name: organization_name
+ }.merge(user_attributes)
+ topic = Carto::Common::MessageBroker.new(logger: Rails.logger).get_topic(:cartodb_central)
+ topic.publish(:create_org_user, payload)
end
def update_organization_user(organization_name, username, user_attributes)
- body = {user: user_attributes}
- send_request("api/organizations/#{ organization_name }/users/#{ username }", body, :put, [204])
+ payload = {
+ organization_name: organization_name,
+ username: username
+ }.merge(user_attributes)
+ cartodb_central_topic.publish(:update_org_user, payload)
end
def delete_organization_user(organization_name, username)
- send_request("api/organizations/#{organization_name}/users/#{username}", nil, :delete, [204, 404])
+ payload = {
+ organization_name: organization_name,
+ username: username
+ }
+ cartodb_central_topic.publish(:delete_org_user, payload)
end
def update_user(username, user_attributes)
- body = {user: user_attributes}
- send_request("api/users/#{username}", body, :put, [204])
+ payload = {
+ username: username
+ }.merge(user_attributes)
+ cartodb_central_topic.publish(:update_user, payload)
end
def delete_user(username)
- send_request("api/users/#{username}", nil, :delete, [204, 404])
+ remote_data = Carto::User.where(username: username).first
+ payload = {
+ username: username,
+ remote_data: remote_data
+ }
+ cartodb_central_topic.publish(:delete_user, payload)
end
def check_do_enabled(username)
@@ -132,12 +149,17 @@ module Cartodb
end
def update_organization(organization_name, organization_attributes)
- body = {organization: organization_attributes}
- send_request("api/organizations/#{ organization_name }", body, :put, [204])
+ payload = {
+ organization_name: organization_name
+ }.merge(organization_attributes)
+ cartodb_central_topic.publish(:update_organization, payload)
end
def delete_organization(organization_name)
- send_request("api/organizations/#{organization_name}", nil, :delete, [204, 404])
+ payload = {
+ organization_name: organization_name
+ }
+ cartodb_central_topic.publish(:delete_organization, payload)
end
############################################################################
@@ -181,5 +203,11 @@ module Cartodb
def delete_oauth_app(username, app_id)
send_request("api/users/#{username}/oauth_apps/#{app_id}", nil, :delete, [204])
end
+
+ private
+
+ def cartodb_central_topic
+ Carto::Common::MessageBroker.new(logger: Rails.logger).get_topic(:cartodb_central)
+ end
end
end
| 14 |
diff --git a/docs/source/examples/alerts.blade.md b/docs/source/examples/alerts.blade.md @@ -5,11 +5,11 @@ title: "Alerts"
# Alerts
-We don't ship alert components because every app has it's own visual style, and they are so easy to build out of utilities.
+We don't ship alert components because every app has it's own visual style and they are so easy to build out of utilities.
Here's a bunch of examples:
-### Bootstrap-style
+### Traditional
@component('_partials.code-sample', ['lang' => 'html'])
<div class="bg-red-lightest border border-red-light text-red px-4 py-3 rounded relative">
@@ -22,7 +22,7 @@ Here's a bunch of examples:
---
-### HelpScout-style
+### Left Accent Border
@component('_partials.code-sample', ['lang' => 'html'])
<div class="bg-orange-lightest border-l-4 border-orange text-orange-dark p-4">
@@ -33,7 +33,7 @@ Here's a bunch of examples:
---
-### HelpScout-style
+### Titled
@component('_partials.code-sample', ['lang' => 'html'])
<div>
@@ -48,7 +48,7 @@ Here's a bunch of examples:
---
-### Heroku-style
+### Solid
@component('_partials.code-sample', ['lang' => 'html'])
<div class="bg-blue text-light text-sm text-bold px-4 py-3">
@@ -58,7 +58,7 @@ Here's a bunch of examples:
---
-### Shopify-style
+### Top Accent Border
@component('_partials.code-sample', ['lang' => 'html'])
<div class="bg-teal-lightest border-t-4 border-teal rounded-b text-dark px-4 py-3 shadow-2">
@@ -74,7 +74,7 @@ Here's a bunch of examples:
---
-### Banner-style
+### Banner
@component('_partials.code-sample', ['lang' => 'html'])
<div class="bg-blue-lightest border-t border-b border-blue text-blue px-4 py-3">
| 10 |
diff --git a/src/workingtitle-vcockpits-instruments-cj4/html_ui/Pages/VCockpit/Instruments/Airliners/CJ4/Shared/Autopilot/WT_VnavAutopilot.js b/src/workingtitle-vcockpits-instruments-cj4/html_ui/Pages/VCockpit/Instruments/Airliners/CJ4/Shared/Autopilot/WT_VnavAutopilot.js @@ -96,6 +96,10 @@ class WT_VerticalAutopilot {
return Math.floor(this._navModeSelector.selectedAlt2);
}
+ get lockedAltitude() {
+ return Math.floor(SimVar.GetSimVarValue("AUTOPILOT ALTITUDE LOCK VAR:3", "feet"));
+ }
+
get path() {
return this._vnav.trackPath();
}
@@ -622,15 +626,11 @@ class WT_VerticalAutopilot {
}
}
else if (this._vnavPathStatus === VnavPathStatus.PATH_ACTIVE) {
- this.setVerticalNavModeState(VerticalNavModeState.PATH);
- this._navModeSelector.setProperAltitudeArmedState();
- if (this.altSlot !== AltitudeSlot.SELECTED) {
- this.setAltitudeAndSlot(AltitudeSlot.SELECTED);
- }
- if (this._navModeSelector.isAltitudeLocked && this.indicatedAltitude < this.targetAltitude + 1000) {
+ if (this._navModeSelector.isAltitudeLocked && this.indicatedAltitude < this.selectedAltitude + 1000) {
console.log("setting PathInterceptStatus.LEVELING because of alt select");
this.setAltitudeAndSlot(AltitudeSlot.SELECTED, this.targetAltitude);
this._pathInterceptStatus = PathInterceptStatus.LEVELING;
+ break;
}
else if (this.indicatedAltitude < this.targetAltitude + 500 && this.path.endsLevel) {
console.log("setting PathInterceptStatus.LEVELING");
@@ -642,6 +642,11 @@ class WT_VerticalAutopilot {
this._pathInterceptStatus = PathInterceptStatus.CONTINUOUS;
this._continuousIndex = this._vnav.flightplan.activeWaypointIndex;
}
+ this.setVerticalNavModeState(VerticalNavModeState.PATH);
+ this._navModeSelector.setProperAltitudeArmedState();
+ if (this.altSlot !== AltitudeSlot.SELECTED) {
+ this.setAltitudeAndSlot(AltitudeSlot.SELECTED);
+ }
}
else {
this._pathInterceptStatus = PathInterceptStatus.NONE;
@@ -681,12 +686,15 @@ class WT_VerticalAutopilot {
this.vsSlot2Value = 0;
console.log("RESETTING FROM LEVELED");
}
- // else if (this.path.fpa == 0) {
- // this.setAltitudeAndSlot(AltitudeSlot.LOCK, -1000, true);
- // this.currentAltitudeTracking = AltitudeState.MANAGED;
- // this._navModeSelector.currentArmedVnavState = VerticalNavModeState.PATH;
- // this._navModeSelector.currentVerticalActiveState = VerticalNavModeState.ALTV;
- // }
+ else if (this.lockedAltitude == this.selectedAltitude && this.targetAltitude < this.lockedAltitude) {
+ this.vsSlot = 1;
+ this.vsSlot2Value = 0;
+ this.altSlot = AltitudeSlot.LOCK;
+ this._pathInterceptStatus = PathInterceptStatus.NONE;
+ this.verticalMode = VerticalNavModeState.ALTS;
+ this._vnavPathStatus = VnavPathStatus.NONE;
+ this._navModeSelector.currentArmedVnavState = VerticalNavModeState.NONE;
+ }
break;
}
}
| 9 |
diff --git a/src/views/dashboard/components/inboxThread/header/timestamp.js b/src/views/dashboard/components/inboxThread/header/timestamp.js @@ -35,7 +35,7 @@ class ThreadTimestamp extends React.Component<Props> {
if (
!isAuthor &&
!thread.currentUserLastSeen &&
- !createdWithinLastDay &&
+ createdWithinLastDay &&
!active
) {
return (
| 1 |
diff --git a/src/mapping.js b/src/mapping.js import { Ok } from 'lemons';
-import { makeErr } from './error';
+import DecodeError, { isDecodeError, makeErr } from './error';
import { pojo } from './object';
import type { Decoder } from './types';
import { compose } from './utils';
@@ -18,17 +18,35 @@ import { compose } from './utils';
*/
export function mapping<T>(decoder: Decoder<T>): Decoder<Map<string, T>> {
return compose(pojo, (blob: Object) => {
- try {
- return Ok(
- new Map(
- Object.keys(blob).map((key: string) => {
+ let tuples: Array<[string, T]> = [];
+ let errors: Array<[string, DecodeError]> = [];
+
+ Object.keys(blob).forEach((key: string) => {
const value: T = blob[key];
- return [key, decoder(value).unwrap()];
- })
- )
- );
+ const result = decoder(value);
+ try {
+ const okValue = result.unwrap();
+ if (errors.length === 0) {
+ tuples.push([key, okValue]);
+ }
} catch (e) {
- return makeErr('Unexpected value', blob, [e]);
+ if (isDecodeError(e)) {
+ tuples.length = 0; // Clear the tuples array
+ errors.push([key, ((e: any): DecodeError)]);
+ } else {
+ // Otherwise, simply rethrow it
+ throw e;
+ }
+ }
+ });
+
+ if (errors.length > 0) {
+ let keys = errors.map(([key]) => key);
+ keys.sort();
+ keys = keys.map(s => `"${s}"`); // quote keys
+ return makeErr(`Unexpected value under keys ${keys.join(', ')}`, blob, errors.map(([, e]) => e));
+ } else {
+ return Ok(new Map(tuples));
}
});
}
| 7 |
diff --git a/src/commands/test/run/manifest.ts b/src/commands/test/run/manifest.ts @@ -59,7 +59,7 @@ export default class RunManifestTestsCommand extends RunTestsCommand {
});
if (!xmlUtil) {
- throw new Error("Arficats folder doesn't contain an archive with test results");
+ throw new Error("\"test-output-dir\" doesn't contain any mergeable test results (.zip archives containing .xml documents)");
}
const outputDir = generateAbsolutePath(this.testOutputDir);
| 1 |
diff --git a/src/providers/queries/notificationQueries.ts b/src/providers/queries/notificationQueries.ts @@ -52,7 +52,13 @@ export const useNotificationsQuery = (filter: NotificationFilters) => {
};
const _fetchNextPage = () => {
- const lastId = _getNextPageParam(notificationQueries.lastItem.data);
+ const lastPage = notificationQueries.lastItem;
+
+ if (!lastPage || lastPage.isFetching) {
+ return;
+ }
+
+ const lastId = _getNextPageParam(lastPage.data);
if (!pageParams.includes(lastId)) {
pageParams.push(lastId);
setPageParams([...pageParams]);
| 8 |
diff --git a/assets/js/modules/analytics/dashboard/dashboard-widget-popular-pages-table.js b/assets/js/modules/analytics/dashboard/dashboard-widget-popular-pages-table.js @@ -57,6 +57,7 @@ class AnalyticsDashboardWidgetPopularPagesTable extends Component {
render() {
const { data } = this.props;
+ const { siteURL: siteUrl } = googlesitekit.admin;
if ( ! data || ! data.length ) {
return null;
@@ -73,9 +74,9 @@ class AnalyticsDashboardWidgetPopularPagesTable extends Component {
const links = [];
const dataMapped = map( data[ 0 ].data.rows, ( row, i ) => {
- const url = row.dimensions[ 0 ];
- const title = row.dimensions[ 1 ];
- links[ i ] = url;
+ const [ title, url ] = row.dimensions;
+ links[ i ] = siteUrl + url;
+
return [
title,
numberFormat( row.metrics[ 0 ].values[ 0 ] ),
| 3 |
diff --git a/app/models/synchronization/adapter.rb b/app/models/synchronization/adapter.rb @@ -37,7 +37,7 @@ module CartoDB
overwrite(table_name, result)
setup_table(table_name, geo_type)
run_index_statements(index_statements)
- recreate_overviews(result)
+ recreate_overviews(table_name)
end
self
rescue => exception
@@ -50,8 +50,8 @@ module CartoDB
raise exception
end
- def recreate_overviews(result)
- dataset = @overviews_creator.dataset(result.name)
+ def recreate_overviews(table_name)
+ dataset = @overviews_creator.dataset(table_name)
dataset.delete_overviews!
if dataset.should_create_overviews?
dataset.create_overviews!
@@ -68,7 +68,7 @@ module CartoDB
message: "Overviews recreation failed",
exception: exception,
user: @user,
- table_name: result.name
+ table_name: table_name
)
end
| 1 |
diff --git a/renderer/reducers/transaction.js b/renderer/reducers/transaction.js @@ -57,6 +57,7 @@ const decorateTransaction = transaction => {
const decoration = {
type: 'transaction',
isReceived,
+ isSent,
isToSelf,
}
return {
@@ -110,7 +111,10 @@ export const fetchTransactions = updateOnly => async dispatch => {
* (ones whose timestamp is greater than the newest known one)
* @returns {(dispatch:Function, getState:Function) => void} Thunk
*/
-export const receiveTransactions = (transactions, updateOnly = false) => (dispatch, getState) => {
+export const receiveTransactions = (transactions, updateOnly = false) => async (
+ dispatch,
+ getState
+) => {
const state = getState()
const currentAddresses = addressSelectors.currentAddresses(state)
@@ -143,8 +147,8 @@ export const receiveTransactions = (transactions, updateOnly = false) => (dispat
})
// Fetch updated channels and balance.
- dispatch(fetchBalance())
- dispatch(fetchChannels())
+ await dispatch(fetchBalance())
+ await dispatch(fetchChannels())
}
/**
@@ -240,26 +244,38 @@ export const transactionFailed = ({ internalId, error }) => async (dispatch, get
* @param {object} transaction Transaction
* @returns {(dispatch:Function, getState:Function) => void} Thunk
*/
-export const receiveTransactionData = transaction => (dispatch, getState) => {
- // add the transaction if we are not already aware of it, otherwise update existing transaction.
+export const receiveTransactionData = transaction => async (dispatch, getState) => {
const state = getState()
const intl = getIntl()
+ const decoratedTransaction = decorateTransaction(transaction)
+ const { isSent, isReceived } = decoratedTransaction
+ const isNew = !transactionsSelector(state).find(tx => tx.txHash === transaction.txHash)
- dispatch(receiveTransactions([transaction]))
+ // Add/Update the transaction.
+ await dispatch(receiveTransactions([transaction]))
- if (!state.transaction.transactions.find(tx => tx.txHash === transaction.txHash)) {
- // HTML 5 desktop notification for the new transaction
- if (CoinBig(transaction.amount).gt(0)) {
+ if (isNew) {
+ // Send HTML 5 desktop notification for newly received transactions.
+ if (isReceived) {
showSystemNotification(intl.formatMessage(messages.transaction_received_title), {
body: intl.formatMessage(messages.transaction_received_body),
})
- } else {
+ }
+ // Send HTML 5 desktop notification for newly sent transactions.
+ // (excluding channel opening or channel closing transactions)
+ else if (isSent) {
+ const poc = channelsSelectors.pendingOpenChannelsRaw(getState())
+ const isChannelOpen = poc.some(
+ c => c.channel.channelPoint.split(':')[0] === transaction.txHash
+ )
+ if (!isChannelOpen) {
showSystemNotification(intl.formatMessage(messages.transaction_sent_title), {
body: intl.formatMessage(messages.transaction_sent_body),
})
}
}
}
+}
// ------------------------------------
// Action Handlers
| 1 |
diff --git a/src/Components/Navigation/NavChild.js b/src/Components/Navigation/NavChild.js @@ -104,14 +104,10 @@ const Dropdown = Scrivito.connect(
);
function isActive(page) {
- if (!Scrivito.currentPage()) return false;
+ const currentPage = Scrivito.currentPage();
+ if (!currentPage) return false;
- const currentPath = Scrivito.currentPage().path();
- if (currentPath) return currentPath.startsWith(page.path());
+ if (currentPage.objClass() === "BlogPost") return page.objClass() === "Blog";
- if (Scrivito.currentPage().objClass() === "BlogPost") {
- return page.objClass() === "Blog";
- }
-
- return false;
+ return Scrivito.isOnCurrentPath(page);
}
| 4 |
diff --git a/package.json b/package.json "types": "./types/index.d.ts",
"scripts": {
"test": "make lint test",
- "prepublishOnly": "make build",
- "postinstall": "node scripts/support-fetch-mock.js"
+ "prepublishOnly": "make build"
+ },
+ "funding": {
+ "type": "charity",
+ "url": "https://www.justgiving.com/refugee-support-europe"
},
"babel": {
"presets": [
| 4 |
diff --git a/lib/webdav.js b/lib/webdav.js @@ -148,13 +148,24 @@ function deployCodeCLI(instance, archive, sync) {
}
}
+ // by default we do not ignore local file paths for code upload
+ // this will acknowledge any dirs and sub dirs and will retain them
+ // when deploying code onto the server (e.g. it will create those dirs
+ // and sub dirs if they do not exist)
+ var ignoreLocalFilePath = false;
+ // however, if we upload a zipped custom code file, we ignore the local
+ // path forcing the zip file to be uploaded to the webdav code repo as is
+ if (path.extname(file) === 'zip') {
+ ignoreLocalFilePath = true;
+ }
+
if (!sync) {
// progress
progress.start();
}
// initiate the post request first...
- postFile(instance, WEBDAV_CODE, file, auth.getToken(), false, function (err, res, body) {
+ postFile(instance, WEBDAV_CODE, file, auth.getToken(), ignoreLocalFilePath, function (err, res, body) {
if (!sync) {
progress.stop();
}
| 8 |
diff --git a/src/_data/community/global-data-tannerdolby.js b/src/_data/community/global-data-tannerdolby.js @@ -2,5 +2,5 @@ module.exports = {
url: "https://tannerdolby.com/writing/generate-page-content-from-a-global-data-file-using-eleventy/",
author: "tannerdolby",
title: "Generate Page Content from a Global Data File",
- key: "global-data"
+ key: "data"
};
\ No newline at end of file
| 4 |
diff --git a/activity/views.py b/activity/views.py @@ -727,7 +727,7 @@ def update_user_access(request, pk, status):
if user_grp is None:
activity_user = ActivityUser.objects.get(pk=int(pk))
group = Group.objects.filter(name='Editor').first()
- ActivityUserOrganizationGroup.objects.create(
+ user_grp = ActivityUserOrganizationGroup.objects.create(
activity_user=activity_user,
organization=activity_user.organization, group=group)
| 1 |
diff --git a/login.js b/login.js @@ -54,7 +54,7 @@ async function pullUserObject() {
}),
});
const response = await res.json();
- const name = response.encodedData.value[0].value;
+ const name = response.encodedData.value[0].value || 'Anonymous';
const avatarHash = response.encodedData.value[1].value;
userObject = {
name,
| 0 |
diff --git a/packages/material-ui-shell/src/containers/Menu/Menu.js b/packages/material-ui-shell/src/containers/Menu/Menu.js @@ -54,15 +54,15 @@ const Menu = (props) => {
return (
<ResponsiveMenu>
{/*James- this seems redundant with the div below, check later */}
- <div style={{direction: isRTL ? 'rtl' : 'ltr'}}>
+ {/* <div style={{direction: isRTL ? 'rtl' : 'ltr'}}> */}
{MenuHeader && <MenuHeader />}
- </div>
+ {/* </div> */}
<div
style={{
display: 'flex',
flexDirection: 'column',
height: '100%',
- direction: isRTL ? 'rtl' : 'ltr'
+ /* direction: isRTL ? 'rtl' : 'ltr' */
}}
>
<Scrollbar style={{ flex: 1 }}>
| 2 |
diff --git a/package.json b/package.json "build": "npm run build:babel && cp ./package.json ./dist/package.json",
"build:babel": "NODE_ENV=production babel ./src --out-dir=./dist",
"build:app": "react-scripts build",
- "dist": "npm run build && cd dist && npm publish",
+ "release": "npm run build && cd dist && npm publish",
"test": "react-scripts test",
"storybook": "start-storybook -p 6002 -s public",
"build-storybook": "build-storybook -s public",
| 10 |
diff --git a/src/client/js/components/PageComment/CommentEditor.jsx b/src/client/js/components/PageComment/CommentEditor.jsx @@ -253,12 +253,12 @@ class CommentEditor extends React.Component {
<div className="comment-write">
<Nav tabs>
<NavItem>
- <NavLink className={activeTab === 1 ? 'active' : ''} onClick={() => this.handleSelect(1)}>
+ <NavLink type="button" className={activeTab === 1 ? 'active' : ''} onClick={() => this.handleSelect(1)}>
Write
</NavLink>
</NavItem>
<NavItem>
- <NavLink className={activeTab === 2 ? 'active' : ''} onClick={() => this.handleSelect(2)}>
+ <NavLink type="button" className={activeTab === 2 ? 'active' : ''} onClick={() => this.handleSelect(2)}>
Preview
</NavLink>
</NavItem>
| 12 |
diff --git a/bin/publish b/bin/publish @@ -15,11 +15,15 @@ function publish() {
popd > /dev/null
}
+if [[ -n "$1" ]]; then
+ package="$1"
+else
ls -1 packages
echo ''
read -p 'Which package would you like to publish? ' package
+fi
package_dir="packages/$package"
if [[ ! -d "$package_dir" ]]; then
@@ -27,6 +31,9 @@ if [[ ! -d "$package_dir" ]]; then
exit 1
fi
+if [[ -n "$2" ]]; then
+ bump="$2"
+else
echo '
major
minor
@@ -34,6 +41,7 @@ patch
'
read -p 'Which version bump to use? ' bump
+fi
case "$bump" in
major|minor|patch);;
| 11 |
diff --git a/packages/react/src/playground/fixtures/sideNavFixtures.js b/packages/react/src/playground/fixtures/sideNavFixtures.js @@ -93,6 +93,20 @@ export const modules = [
groupId: "4",
icon: "project-management",
title: "Project Admin"
+ },
+ {
+ id: "1-17",
+ groupId: "5",
+ icon: "help",
+ title: "Knowledge Base",
+ link: "https://knowledge.autodesk.com/",
+ target: "_blank"
+ },
+ {
+ id: "1-18",
+ groupId: "5",
+ icon: "layout",
+ title: "Style Guide"
}
];
@@ -252,6 +266,20 @@ export const submodules = [
id: "1-9-31",
moduleId: "1-9",
title: "Activities"
+ },
+ {
+ id: "1-18-32",
+ moduleId: "1-18",
+ title: "Web",
+ link: "http://www.autodesk.com",
+ target: "_blank"
+ },
+ {
+ id: "1-18-33",
+ moduleId: "1-18",
+ title: "Desktop",
+ link: "http://www.autodesk.com",
+ target: "_blank"
}
];
| 12 |
diff --git a/src/make/cards.js b/src/make/cards.js @@ -391,7 +391,7 @@ function doCard(rawCard, cards, code, set) {
&& rawCard.number.indexOf('b') > -1)
return
- if (rawCard.layout === 'split')
+ if (rawCard.layout === 'split' || rawCard.layout === 'aftermath')
name = rawCard.names.join(' // ')
name = _.ascii(name)
| 9 |
diff --git a/tasks/gulp/generate-readme.js b/tasks/gulp/generate-readme.js const configPath = require('../../config/paths.json')
const gulp = require('gulp')
-const nunjucksRender = require('gulp-nunjucks-render')
const rename = require('gulp-rename')
const data = require('gulp-data')
const vinylPaths = require('vinyl-paths')
const path = require('path')
const fs = require('fs')
const toMarkdown = require('gulp-to-markdown')
+const gulpNunjucks = require('gulp-nunjucks')
+const nunjucks = require('nunjucks')
const vinylInfo = {}
function getDataForFile (file) {
@@ -17,11 +18,10 @@ function getDataForFile (file) {
return finalData
}
-const manageEnvironment = function (environment) {
+var environment = new nunjucks.Environment(
+ new nunjucks.FileSystemLoader([configPath.src + 'views', configPath.components])
+)
environment.addGlobal('isReadme', 'true')
- environment.opts.lstripBlocks = true
- environment.opts.trimBlocks = true
-}
gulp.task('generate:readme', () => {
return gulp.src(['!' + configPath.components + '_component-example/index.njk', configPath.components + '**/index.njk'])
@@ -32,9 +32,10 @@ gulp.task('generate:readme', () => {
return Promise.resolve()
}))
.pipe(data(getDataForFile))
- .pipe(nunjucksRender({
- path: [configPath.src + 'views', configPath.components],
- manageEnv: manageEnvironment
+ .pipe(gulpNunjucks.compile('', {
+ trimBlocks: true, // automatically remove trailing newlines from a block/tag
+ lstripBlocks: true, // automatically remove leading whitespace from a block/tag
+ env: environment
}))
.pipe(toMarkdown({
gfm: true // github flavoured markdown https://github.com/domchristie/to-markdown#gfm-boolean
| 14 |
diff --git a/lighthouse-cli/chrome-finder.ts b/lighthouse-cli/chrome-finder.ts @@ -106,6 +106,7 @@ export function linux() {
'google-chrome',
];
executables.forEach((executable: string) => {
+ try {
const chromePath = execFileSync('which', [executable])
.toString()
.split(newLineRegex)[0];
@@ -113,6 +114,9 @@ export function linux() {
if (canAccess(chromePath)) {
installations.push(chromePath);
}
+ } catch (e) {
+ // Not installed.
+ }
});
if (!installations.length) {
| 8 |
diff --git a/CHANGELOG.md b/CHANGELOG.md ## Recurly.js CHANGELOG
-### Version 4.8.1 (Jan 5,2018)
+### Version 4.8.1 (Jan 16,2018)
-* Adds support for tabbing between hosted fields on mobile devices [#396][396]
+* Adds support for setting PayPal logo in Express Checkout flow [#418][418]
### Version 4.8.0 (Nov 28, 2017)
* Full rewrite for Billing Info tokenization
+[418]: https://github.com/recurly/recurly-js/commit/617e326976255277d68b479ad29f564ee2dae766
[412]: https://github.com/recurly/recurly-js/commit/22ae5fec78a8d45586f170b28eef59593fcd883d
[409]: https://github.com/recurly/recurly-js/commit/67d1bd09dc74162eff143755c74b53cc8ea551fc
[404]: https://github.com/recurly/recurly-js/commit/b4c54b41cf4b8992e81c226d3e7b4fb98656d616
| 3 |
diff --git a/bin/util.js b/bin/util.js @@ -137,14 +137,14 @@ exports.schemaFormat = function(schema) {
};
/**
- * Wrap with quotations in the value is a string.
+ * Wrap with quotations if the value is a string.
* @param value
* @returns {*}
*/
exports.smart = function(value) {
if (typeof value === 'string') return "'" + value.replace(/'/g, "\\'") + "'";
if (value instanceof Date) return value.toISOString();
- return value;
+ return String(value);
};
exports.traverse = function(object, callback) {
| 7 |
diff --git a/README.md b/README.md @@ -1584,7 +1584,6 @@ binance.withdraw("BTC", "1C5gqLRs96Xq4V2ZZAR1347yUCpHie7sa", 0.2);
[newOrderRespType example](https://github.com/jaggedsoft/node-binance-api/blob/master/examples/advanced.md#neworderresptype-example-when-placing-orders)\
[Recent Trades (historicalTrades, recentTrades, aggTrades functions)](https://github.com/jaggedsoft/node-binance-api/blob/master/examples/advanced.md#recent-trades-historicaltrades-recenttrades-aggtrades-functions)\
[Terminate WebSocket connections](https://github.com/jaggedsoft/node-binance-api/blob/master/examples/advanced.md#terminate-websocket-connections)\
-[User Data: Account Balance Updates, Trade Updates, New Orders, Filled Orders, Cancelled Orders via WebSocket](https://github.com/jaggedsoft/node-binance-api/blob/master/examples/advanced.md#user-data-account-balance-updates-trade-updates-new-orders-filled-orders-cancelled-orders-via-websocket)
[User Data: Account Balance Updates, Trade Updates, New Orders, Filled Orders, Cancelled Orders via WebSocket](https://github.com/jaggedsoft/node-binance-api/blob/master/examples/advanced.md#user-data-account-balance-updates-trade-updates-new-orders-filled-orders-cancelled-orders-via-websocket)\
[Asynchronous Syntax Options](https://github.com/jaggedsoft/node-binance-api/blob/master/examples/advanced.md#asynchronous-syntax-options)
| 1 |
diff --git a/src/styles/interactive-video.css b/src/styles/interactive-video.css .h5p-interactive-video .h5p-table {
font-size: 0.875em;
border-collapse: collapse;
+ width: max-content;
}
.h5p-interactive-video .h5p-table th {
border-bottom: 2px solid #191919;
| 2 |
diff --git a/includes/Modules/Search_Console/Settings.php b/includes/Modules/Search_Console/Settings.php @@ -23,6 +23,25 @@ class Settings extends Module_Settings {
const OPTION = 'googlesitekit_search-console_settings';
+ /**
+ * Registers the setting in WordPress.
+ *
+ * @since n.e.x.t
+ */
+ public function register() {
+ parent::register();
+
+ // Backwards compatibility with previous dedicated option.
+ add_filter(
+ 'default_option_' . self::OPTION,
+ function ( $default ) {
+ $default['propertyID'] = $this->options->get( 'googlesitekit_search_console_property' ) ?: '';
+
+ return $default;
+ }
+ );
+ }
+
/**
* Gets the default value.
*
@@ -32,8 +51,7 @@ class Settings extends Module_Settings {
*/
protected function get_default() {
return array(
- // Backwards compatibility with previous dedicated option.
- 'propertyID' => $this->options->get( 'googlesitekit_search_console_property' ) ?: '',
+ 'propertyID' => '',
);
}
}
| 14 |
diff --git a/app/components/Wallet/ImportKeys.jsx b/app/components/Wallet/ImportKeys.jsx @@ -20,6 +20,8 @@ import {Notification} from "bitshares-ui-style-guide";
import GenesisFilter from "chain/GenesisFilter";
+import {Button, Input} from "bitshares-ui-style-guide";
+
require("./ImportKeys.scss");
let import_keys_assert_checking = false;
@@ -659,12 +661,9 @@ class ImportKeys extends Component {
<BalanceClaimActive />
<div style={{paddingTop: 15}}>
- <div
- className="button success"
- onClick={this.onCancel.bind(this)}
- >
+ <Button type="primary" onClick={this.onCancel.bind(this)}>
<Translate content="wallet.done" />
- </div>
+ </Button>
</div>
</div>
);
@@ -741,9 +740,9 @@ class ImportKeys extends Component {
}
let cancelButton = (
- <div className="button success" onClick={this.onCancel.bind(this)}>
+ <Button onClick={this.onCancel.bind(this)}>
<Translate content="wallet.cancel" />
- </div>
+ </Button>
);
let tabIndex = 1;
@@ -811,19 +810,21 @@ class ImportKeys extends Component {
component="label"
content="wallet.paste_private"
/>
- <input
+ <Input
ref="wifInput"
type="password"
id="wif"
tabIndex={tabIndex++}
+ style={{marginBottom: "16px"}}
/>
- <button
- className="button"
- type="submit"
+ <Button
+ type="primary"
+ htmlType="submit"
+ style={{marginRight: "16px"}}
>
<Translate content="wallet.submit" />
- </button>
+ </Button>
{cancelButton}
</form>
) : (
@@ -864,7 +865,7 @@ class ImportKeys extends Component {
</div>
{!this.state.no_file ? (
<div>
- <input
+ <Input
type="password"
ref="password"
key={
@@ -897,15 +898,14 @@ class ImportKeys extends Component {
</div>
) : null}
<div className="button-group">
- <button
- className={cname("button", {
- disabled: !!this.state
- .no_file
- })}
- type="submit"
+ <Button
+ type="primary"
+ disabled={!!this.state.no_file}
+ htmlType="submit"
+ style={{marginRight: "16px"}}
>
<Translate content="wallet.submit" />
- </button>
+ </Button>
{cancelButton}
</div>
</form>
| 14 |
diff --git a/docs/example-react-router.mdx b/docs/example-react-router.mdx @@ -169,7 +169,7 @@ In React Router v5, you need to pass the history object as a whole to the Route
test('full app rendering/navigating', () => {
const history = createMemoryHistory()
render(
- <Router history={history} />
+ <Router history={history}>
<App />
</Router>,
)
| 1 |
diff --git a/lib/slack/renderer/deployment-status.js b/lib/slack/renderer/deployment-status.js @@ -27,25 +27,31 @@ class DeploymentStatus extends Message {
}
getCore() {
+ let center = `${this.shortSha}`;
+ let centerWithLink = `<${this.commitLink}|\`${this.shortSha}\`>`;
+ if (this.deployment.environment) {
+ center += ` to ${this.deployment.environment}`;
+ centerWithLink += ` to <${this.deploymentStatus.target_url}|${this.deployment.environment}>`;
+ }
if (this.deploymentStatus.state === 'pending') {
return {
- fallback: `Deploying ${this.shortSha} to ${this.deployment.environment}`,
- text: `Deploying <${this.commitLink}|\`${this.shortSha}\`> to <${this.deploymentStatus.target_url}|${this.deployment.environment}>`,
+ fallback: `Deploying ${center}`,
+ text: `Deploying ${centerWithLink}`,
};
} else if (this.deploymentStatus.state === 'success') {
return {
- fallback: `Successfully deployed ${this.shortSha} to ${this.deployment.environment}`,
- text: `Successfully deployed <${this.commitLink}|\`${this.shortSha}\`> to <${this.deploymentStatus.target_url}|${this.deployment.environment}>`,
+ fallback: `Successfully deployed ${center}`,
+ text: `Successfully deployed ${centerWithLink}`,
};
} else if (this.deploymentStatus.state === 'error') {
return {
- fallback: `Error when deploying ${this.shortSha} to ${this.deployment.environment}`,
- text: `Error when deploying <${this.commitLink}|\`${this.shortSha}\`> to <${this.deploymentStatus.target_url}|${this.deployment.environment}>`,
+ fallback: `Error when deploying ${center}`,
+ text: `Error when deploying ${centerWithLink}`,
};
} else if (this.deploymentStatus.state === 'failure') {
return {
- fallback: `Deploying ${this.shortSha} to ${this.deployment.environment} failed`,
- text: `Deploying <${this.commitLink}|\`${this.shortSha}\`> to <${this.deploymentStatus.target_url}|${this.deployment.environment}> failed`,
+ fallback: `Deploying ${center} failed`,
+ text: `Deploying ${centerWithLink} failed`,
};
}
}
| 7 |
diff --git a/src/application/Component.mjs b/src/application/Component.mjs @@ -488,6 +488,58 @@ export default class Component extends Element {
return Component.getComponent(element.parent);
}
+ toJSON() {
+ let ref = [`${this.constructor.name}`];
+ const tree = {[ref]: {}};
+
+ if (this.hasChildren()) {
+ Component.collectChildren(
+ tree[ref], this.__childList
+ );
+ }
+ return tree;
+ }
+
+ static collectChildren(tree, children) {
+ const childList = children;
+ for (let i = 0, j = childList.length; i < j; i++) {
+ const element = childList.getAt(i);
+ const ref = `${element.__ref || `Element-${element.id}`}`;
+ const properties = this.getProperties(element);
+
+ tree[ref] = {...properties};
+
+ if (element.hasChildren()) {
+ tree[ref].children = {};
+ this.collectChildren(
+ tree[ref].children, element.__childList
+ );
+ }
+ }
+ }
+
+ static getProperties(element) {
+ const props = {};
+ const list = [
+ "id", "tag", "ref", "boundsMargin", "x", "y", "w", "h", "scaleX", "scaleY", "scale", "pivotX", "pivotY",
+ "pivot", "mountX", "mountY", "mount", "alpha", "visible", "color", "zIndex", "clipping",
+ "renderToTexture", "renderOfScreen", "!!flex", "!!flexItem"
+ ];
+ let n = list.length;
+
+ while (n--) {
+ let key = list[n];
+ const getBoolean = /^!{2}/;
+ if (getBoolean.test(key)) {
+ key = key.substring(2, key.length);
+ props[key] = !!element[key];
+ } else {
+ props[key] = element[key];
+ }
+ }
+ return {...props, ...element.getNonDefaults()};
+ }
+
}
Component.prototype.isComponent = true;
| 0 |
diff --git a/src/connection.js b/src/connection.js 'use strict'
let Connection = function(props, options) {
- this.from
- this.to
- this.weight = Math.random()
- this.forward = {
+ let self = this
+
+ self.from = props ? (props.from || undefined) : undefined
+ self.to = props ? (props.to || undefined) : undefined
+ self.weight = props ? (props.weight || Math.random()) : Math.random()
+
+ self.forward = {
queue: [],
states: []
}
- this.backward = {
+ self.backward = {
queue: [],
states: []
}
if(props) {
- this.from = props.from || this.from
- this.to = props.to || this.to
- this.weight = props.weight || this.weight
- this.forward = props.forward || this.forward
- this.backward = props.backward || this.backward
+ self.forward = props.forward || self.forward
+ self.backward = props.backward || self.backward
}
}
| 7 |
diff --git a/src/components/topic/words/InfluentialWordsContainer.js b/src/components/topic/words/InfluentialWordsContainer.js @@ -22,8 +22,8 @@ const localMessages = {
class InfluentialWordsContainer extends React.Component {
componentWillReceiveProps(nextProps) {
- const { fetchData, filters } = this.props;
- if (nextProps.filters.timespanId !== filters.timespanId) {
+ const { fetchData, filters, selectedTimespan } = this.props;
+ if ((nextProps.filters.timespanId !== filters.timespanId) || (nextProps.selectedTimespan !== selectedTimespan)) {
fetchData(nextProps);
}
}
@@ -31,6 +31,9 @@ class InfluentialWordsContainer extends React.Component {
render() {
const { wordCounts, totalWordCounts, handleWordCloudClick, selectedTimespan } = this.props;
const { formatMessage } = this.props.intl;
+ if ((selectedTimespan === undefined) || (selectedTimespan === null)) {
+ return (<div />);
+ }
const titleHandler = parentTitle => `${formatMessage(localMessages.title)} | ${parentTitle}`;
let comparisonContent;
if (selectedTimespan.period === 'overall') {
@@ -96,7 +99,7 @@ InfluentialWordsContainer.propTypes = {
fetchStatus: React.PropTypes.string.isRequired,
wordCounts: React.PropTypes.array.isRequired,
totalWordCounts: React.PropTypes.array.isRequired,
- selectedTimespan: React.PropTypes.object.isRequired,
+ selectedTimespan: React.PropTypes.object,
// from dispatch
fetchData: React.PropTypes.func.isRequired,
handleWordCloudClick: React.PropTypes.func.isRequired,
| 9 |
diff --git a/app/addons/documents/routes-doc-editor.js b/app/addons/documents/routes-doc-editor.js @@ -41,8 +41,8 @@ const DocEditorRouteObject = FauxtonAPI.RouteObject.extend({
'database/:database/_design/:ddoc': 'showDesignDoc',
'database/:database/_local/:doc': 'showLocalDoc',
'database/:database/:doc': 'codeEditor',
- 'database/:database/_new': 'codeEditor',
- 'database/:database/_new?(:extra)': 'codeEditor'
+ 'database/:database/_new': 'codeEditorNewDoc',
+ 'database/:database/_new?(:extra)': 'codeEditorNewDoc'
},
revisionBrowser: function (databaseName, docId) {
@@ -66,6 +66,10 @@ const DocEditorRouteObject = FauxtonAPI.RouteObject.extend({
return this.revisionBrowser(databaseName, '_design/' + ddoc);
},
+ codeEditorNewDoc: function (databaseName, options) {
+ return this.codeEditor(databaseName, null, options);
+ },
+
codeEditor: function (databaseName, docId, options) {
const urlParams = app.getParams(options);
const backLink = FauxtonAPI.urls('allDocs', 'app', FauxtonAPI.url.encode(databaseName));
| 1 |
diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md @@ -16,7 +16,7 @@ The objective of these tests is to know automatically what works and what doesn'
In order to add an external test now you only need to create a file in [test/externalTests](test/externalTests)
-An example : [test/externalTests/digAndBuild.js](test/externalTests/digAndBuild.js)
+An example : [test/externalTests/digAndBuild.js](https://github.com/PrismarineJS/mineflayer/blob/master/test/externalTests/digAndBuild.js)
That file needs to export a function returning a function or an array of function taking as parameter the bot object and a done callback,
it should contain asserts to test if the tested functionality failed.
| 1 |
diff --git a/docs/documentation/plugins/index.html b/docs/documentation/plugins/index.html @@ -764,19 +764,27 @@ $('#my-editor').trumbowyg({
<script src="node_modules/trumbowyg/dist/plugins/template/trumbowyg.template.min.js"></script>
</code></pre>
<p>
- Then you can use the new button definition <code>template</code>
+ Then you can use the new button definition <code>template</code> and can add your template code.
</p>
<pre><code class="javascript">
$('#my-editor').trumbowyg({
btns: [
['template']
+ ],
+ plugins: {
+ templates: [
+ {
+ name: 'Template 1',
+ html: '<p>I am a template!</p>'
+ },
+ {
+ name: 'Template 2',
+ html: '<p>I am a different template!</p>'
+ }
]
+ }
});
</code></pre>
- <p class="note">
- Some doc to write about template options/definition... <br>
- You can contribute to this documentation by submitting a Pull Request :)
- </p>
</div>
<div class="feature">
| 7 |
diff --git a/src/components/views/CommInternal/core.js b/src/components/views/CommInternal/core.js @@ -113,7 +113,8 @@ class InternalCommCore extends Component {
style={{
background: "lightgray",
height: "16px",
- padding: "0 5px"
+ padding: "0 5px",
+ color: "black"
}}
>
{internalComm.outgoing}
| 7 |
diff --git a/server/libs/aws/batch.js b/server/libs/aws/batch.js @@ -265,13 +265,13 @@ export default aws => {
analysisLevels,
parallelSubmit,
singleSubmit,
- (err, batchJobIds) => {
+ (err, submitLevelIds) => {
if (err) {
return callback(err)
} else {
- // When all jobs are submitted, update job state with the last set
- this._updateJobOnSubmitSuccessful(jobId, batchJobIds)
- return callback(null, batchJobIds)
+ // When all jobs are submitted, update job state with all batch ids
+ this._updateJobOnSubmitSuccessful(jobId, submitLevelIds.all)
+ return callback(null, submitLevelIds.all)
}
},
)
@@ -291,8 +291,8 @@ export default aws => {
) {
reduce(
analysisLevels,
- [],
- (deps, level, callback) => {
+ { last: [], all: [] }, // Reduction includes previous step state
+ (submittedJobs, level, callback) => {
let submitter
let levelName = level.value
@@ -308,12 +308,16 @@ export default aws => {
submitter = singleSubmit
}
- submitter(batchJob, deps, (err, batchJobIds) => {
+ // Submit this level with the previous level as arguments
+ submitter(batchJob, submittedJobs.last, (err, batchJobIds) => {
if (err) {
return callback(err)
} else {
// Submit the next set of jobs including the previous as deps
- return callback(null, deps.concat(batchJobIds))
+ return callback(null, {
+ last: batchJobIds,
+ all: submittedJobs.all.concat(batchJobIds),
+ })
}
})
},
| 1 |
diff --git a/src/core/lib/FileSignatures.mjs b/src/core/lib/FileSignatures.mjs @@ -736,7 +736,7 @@ export const FILE_SIGNATURES = {
10: 0x56,
11: 0x45
},
- extractor: null
+ extractor: extractWAV
},
{
name: "OGG audio",
@@ -2642,6 +2642,22 @@ export function extractBMP(bytes, offset) {
return stream.carve();
}
+/**
+ * WAV extractor.
+ *
+ * @param {Uint8Array} bytes
+ * @param {Number} offset
+ * @returns {Uint8Array}
+ */
+export function extractWAV(bytes, offset) {
+ const stream = new Stream(bytes.slice(offset));
+ stream.moveTo(4);
+
+ // Move to file size.
+ stream.moveTo(stream.readInt(4, "le")-4);
+ return stream.carve();
+}
+
/**
* FLV extractor.
| 0 |
diff --git a/generators/client/templates/angular/src/main/webapp/app/admin/admin-routing.module.ts.ejs b/generators/client/templates/angular/src/main/webapp/app/admin/admin-routing.module.ts.ejs -%>
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
-import { <%=angularXAppName%>SharedModule } from 'app/shared/shared.module';
/* jhipster-needle-add-admin-module-import - JHipster will add admin modules imports here */
@NgModule({
imports: [
- <%=angularXAppName%>SharedModule,
/* jhipster-needle-add-admin-module - JHipster will add admin modules here */
RouterModule.forChild(
[
@@ -64,7 +62,6 @@ import { <%=angularXAppName%>SharedModule } from 'app/shared/shared.module';
<%_ if (websocket === 'spring-websocket') { _%>
{
path: 'tracker',
-
loadChildren: () => import('./tracker/tracker.module').then(m => m.TrackerModule)
},
<%_ } _%>
| 2 |
diff --git a/test/image/mocks/z-new_tickmode_sync.json b/test/image/mocks/z-new_tickmode_sync.json "width": 700,
"showlegend": false,
"xaxis": {
+ "showgrid": true,
"ticklen": 10,
"tickwidth": 3,
"ticklabelmode": "period"
| 0 |
diff --git a/components/hero.js b/components/hero.js import PropTypes from 'prop-types'
import dynamic from 'next/dynamic'
-import {Download, Edit3, Database} from 'react-feather'
+import {Download, MapPin, Database} from 'react-feather'
import theme from '@/styles/theme'
@@ -33,7 +33,7 @@ function Hero({title, tagline}) {
</CircleLink>
<CircleLink
href='/gerer-mes-adresses'
- icon={<Edit3 size={48} color={theme.colors.white} alt='' aria-hidden='true' />}
+ icon={<MapPin size={48} color={theme.colors.white} alt='' aria-hidden='true' />}
isImportant
size='80'
>
| 14 |
diff --git a/lib/cartodb/models/dataview/date-histogram.js b/lib/cartodb/models/dataview/date-histogram.js @@ -218,7 +218,7 @@ module.exports = class DateHistogram extends BaseDataview {
return this._columnType === 'date' && (this.aggregation !== undefined || override.aggregation !== undefined);
}
- _buildDateHistogramQueryTpl (ctx) {
+ _buildQueryTpl (ctx) {
return `
WITH
${ctx._override && ctx._override.hasOwnProperty('start') && ctx._override.hasOwnProperty('end') ?
@@ -253,7 +253,7 @@ module.exports = class DateHistogram extends BaseDataview {
return null;
}
- const histogramSql = this._buildDateHistogramQueryTpl({
+ const histogramSql = this._buildQueryTpl({
_override: override,
_query: this.query,
_column: this.column,
| 10 |
diff --git a/packages/material-ui-shell/src/components/MenuHeader/MenuHeader.js b/packages/material-ui-shell/src/components/MenuHeader/MenuHeader.js @@ -112,8 +112,9 @@ const MenuHeader = () => {
<BrightnessHighIcon classes={{ root: classes.icon }} />
)}
</IconButton>
- {isDesktop && useMiniMode && (
+ {isDesktop && (
<>
+ {useMiniMode && (
<IconButton
onClick={() => {
setMini(true)
@@ -122,7 +123,7 @@ const MenuHeader = () => {
>
<ChromeReaderMode classes={{ root: classes.icon }} />
</IconButton>
-
+ )}
<IconButton
color="inherit"
| 1 |
diff --git a/packages/app/src/server/routes/apiv3/in-app-notification.ts b/packages/app/src/server/routes/apiv3/in-app-notification.ts @@ -30,7 +30,7 @@ module.exports = (crowi) => {
};
// set in-app-notification status to categorize
- if (req.query.status) {
+ if (req.query.status != null) {
Object.assign(queryOptions, { status: req.query.status });
}
| 7 |
diff --git a/src/web/App.js b/src/web/App.js @@ -124,14 +124,14 @@ App.prototype.bake = async function(step) {
this.handleError(err);
}
+ this.setBakingStatus(false);
+
if (!response) return;
if (response.error) {
this.handleError(response.error);
}
- this.setBakingStatus(false);
-
this.options = response.options;
this.dishStr = response.type === "html" ? Utils.stripHtmlTags(response.result, true) : response.result;
this.progress = response.progress;
| 1 |
diff --git a/public/angular/js/config.js b/public/angular/js/config.js angular.module('Aggie')
-.value('mediaOptions', ['twitter', 'facebook', 'rss', 'elmo', 'smsgh', 'whatsapp', 'crowdtangle'])
+.value('mediaOptions', ['twitter', 'rss', 'elmo', 'smsgh', 'whatsapp', 'crowdtangle'])
-.value('apiSettingsOptions', ['twitter', 'facebook', 'elmo', 'gplaces'])
+.value('apiSettingsOptions', ['twitter', 'elmo', 'gplaces', 'crowdtangle'])
.value('widgetSettingsOptions', ['incident map'])
| 14 |
diff --git a/assets/js/modules/analytics/common/account-create.js b/assets/js/modules/analytics/common/account-create.js @@ -74,9 +74,11 @@ const AccountCreate = () => {
} );
} );
+ const url = new URL( siteURL );
+
const [ isSubmitting, setIsSubmitting ] = useState( false );
const [ accountName, setAccountName ] = useState( siteName );
- const [ propertyName, setPropertyName ] = useState( siteURL );
+ const [ propertyName, setPropertyName ] = useState( url.hostname );
const [ profileName, setProfileName ] = useState( __( 'All website traffic', 'google-site-kit' ) );
const [ timezone, setTimezone ] = useState( tz );
const [ validationIssues, setValidationIssues ] = useState( {
| 4 |
diff --git a/helpers/10015-tools.json b/helpers/10015-tools.json "desc": "10015 Tools is an all-in-one toolbox offering web tools from different categories including text, image, CSS, code, color, social media tools and so on.",
"url": "https://10015.io",
"tags": [
- "Tool Collection"
+ "Tool Collections"
],
"maintainers": [
"fatihtelis"
| 10 |
diff --git a/src/style/apply.js b/src/style/apply.js @@ -277,7 +277,7 @@ styfn.updateStyleHints = function(ele){
// - raise up small numbers so more significant digits are seen by hashing
// - make small numbers larger than a normal value to avoid collisions
// - works in practice and it's relatively cheap
- let N = 2147483647;
+ let N = 2000000000;
let cleanNum = val => (-128 < val && val < 128) && Math.floor(val) !== val ? N - ((val * 1024) | 0) : val;
for( let i = 0; i < propNames.length; i++ ){
| 4 |
diff --git a/README.md b/README.md @@ -437,7 +437,7 @@ Then the route uses the connection pool in the `app.locals` object:
const sql = require('mssql');
module.exports = function(req, res) {
- req.locals.db.query('SELECT TOP 10 * FROM table_name', function(err, recordset) {
+ req.app.locals.db.query('SELECT TOP 10 * FROM table_name', function(err, recordset) {
if (err) {
console.error(err)
res.status(500).send('SERVER ERROR')
| 1 |
diff --git a/src/components/_classes/component/Component.js b/src/components/_classes/component/Component.js @@ -1649,7 +1649,8 @@ export default class Component extends Element {
toolbar: ['imageTextAlternative', '|', 'imageStyle:full', 'imageStyle:alignLeft', 'imageStyle:alignCenter', 'imageStyle:alignRight'],
styles: ['full', 'alignLeft', 'alignCenter', 'alignRight']
};
- return Formio.requireLibrary('ckeditor', 'ClassicEditor', CKEDITOR, true)
+ settings = _.merge(_.get(this.options, 'editors.ckeditor.settings', {}), settings);
+ return Formio.requireLibrary('ckeditor', 'ClassicEditor', _.get(this.options, 'editors.ckeditor.src', CKEDITOR), true)
.then(() => {
if (!element.parentNode) {
return NativePromise.reject();
@@ -1663,6 +1664,7 @@ export default class Component extends Element {
addQuill(element, settings, onChange) {
settings = _.isEmpty(settings) ? this.wysiwygDefault : settings;
+ settings = _.merge(_.get(this.options, 'editors.quill.settings', {}), settings);
// Lazy load the quill css.
if (!settings.theme) {
@@ -1673,7 +1675,7 @@ export default class Component extends Element {
], true);
// Lazy load the quill library.
- return Formio.requireLibrary('quill', 'Quill', `${QUILL_URL}/quill.min.js`, true)
+ return Formio.requireLibrary('quill', 'Quill', _.get(this.options, 'editors.quill.src', `${QUILL_URL}/quill.min.js`), true)
.then(() => {
if (!element.parentNode) {
return NativePromise.reject();
@@ -1715,7 +1717,8 @@ export default class Component extends Element {
}
addAce(element, settings, onChange) {
- return Formio.requireLibrary('ace', 'ace', ACE_URL, true)
+ settings = _.merge(_.get(this.options, 'editors.ace.settings', {}), settings || {});
+ return Formio.requireLibrary('ace', 'ace', _.get(this.options, 'editors.ace.src', ACE_URL), true)
.then((editor) => {
editor = editor.edit(element);
editor.removeAllListeners('change');
| 11 |
diff --git a/protocols/types/README.md b/protocols/types/README.md | wallet | `address` | Wallet address of the party |
| token | `address` | Contract address of the token |
| param | `uint256` | Value (ERC-20) or ID (ERC-721) |
+| kind | `bytes4` | Interface ID of the token |
### Order Struct
| 3 |
diff --git a/content/intro-to-storybook/react/en/screen.md b/content/intro-to-storybook/react/en/screen.md @@ -321,7 +321,7 @@ const Mockstore = configureStore({
export default {
component: PureInboxScreen,
- decorators: [story => <Provider store={store}>{Mockstore()}</Provider>],
+ decorators: [story => <Provider store={Mockstore}>{story()}</Provider>],
title: 'PureInboxScreen',
};
| 3 |
diff --git a/lib/assets/core/javascripts/cartodb3/editor/widgets/widgets-form/schema/widgets-form-time-series-schema-model.js b/lib/assets/core/javascripts/cartodb3/editor/widgets/widgets-form/schema/widgets-form-time-series-schema-model.js @@ -36,7 +36,6 @@ var AGGREGATION_OPTIONS = [
module.exports = WidgetsFormBaseSchema.extend({
defaults: {
schema: {},
- aggregation: 'month',
bins: 48
},
@@ -147,7 +146,7 @@ module.exports = WidgetsFormBaseSchema.extend({
_filterAttributesForWidgetDefinition: function () {
var attrToFilter = this._getColumnType() === 'date' ? 'bins' : 'aggregation';
- var attrs = _.clone(this.attributes);
+ var attrs = this.toJSON();
attrs[attrToFilter] = undefined;
return attrs;
| 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.