code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/token-metadata/0x107c4504cd79C5d2696Ea0030a8dD4e92601B82e/metadata.json b/token-metadata/0x107c4504cd79C5d2696Ea0030a8dD4e92601B82e/metadata.json "symbol": "BLT",
"address": "0x107c4504cd79C5d2696Ea0030a8dD4e92601B82e",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/tests/phpunit/integration/Modules/Subscribe_With_GoogleTest.php b/tests/phpunit/integration/Modules/Subscribe_With_GoogleTest.php @@ -21,26 +21,6 @@ use Google\Site_Kit\Tests\TestCase;
*/
class Subscribe_With_GoogleTest extends TestCase {
- public function test_register() {
- remove_all_actions( 'wp_head' );
-
- $subscribewithgoogle = new Subscribe_With_Google( new Context( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) );
-
- $subscribewithgoogle->register();
- $this->assertFalse( has_action( 'wp_head' ) );
-
- // Add valid required settings.
- $subscribewithgoogle->get_settings()->merge(
- array(
- 'products' => 'basic',
- 'publicationID' => 'example.com',
- )
- );
-
- $subscribewithgoogle->register();
- $this->assertTrue( has_action( 'wp_head' ) );
- }
-
public function test_is_connected() {
$subscribewithgoogle = new Subscribe_With_Google( new Context( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) );
| 2 |
diff --git a/assets/js/util/index.js b/assets/js/util/index.js @@ -23,6 +23,7 @@ import SvgIcon from 'GoogleUtil/svg-icon';
export * from './storage';
+const { apiFetch } = wp;
const {
addFilter,
applyFilters,
@@ -590,27 +591,35 @@ export const findTagInHtmlContent = ( html, module ) => {
* while requesting list of accounts.
*
* @param {string} module Module slug.
+ *
+ * @param {string|null} The tag id if found, otherwise null.
*/
export const getExistingTag = async ( module ) => {
const CACHE_KEY = `${ module }::existingTag`;
- const { homeURL } = googlesitekit.admin;
+ const { homeURL, ampMode } = googlesitekit.admin;
- try {
let tagFound = data.getCache( CACHE_KEY, 300 );
- if ( 'undefined' === typeof tagFound ) {
+ if ( ! tagFound ) {
+ try {
tagFound = await scrapeTag( addQueryArgs( homeURL, { tagverify: 1, timestamp: Date.now() } ), module );
- }
- data.setCache( CACHE_KEY, tagFound );
-
- return new Promise( ( resolve ) => {
- resolve( tagFound );
+ if ( ! tagFound && 'secondary' === ampMode ) {
+ tagFound = await apiFetch( { path: '/wp/v2/posts?per_page=1' } )
+ .then( ( posts ) => {
+ // Scrape the first post in AMP mode, if there is one.
+ return posts.slice( 0, 1 ).map( async ( post ) => {
+ return await scrapeTag( addQueryArgs( post.link, { amp: 1 } ), module );
+ } ).pop();
} );
- } catch ( err ) {
+ }
- // nothing.
+ // Only set/renew the cache if a tag was found.
+ data.setCache( CACHE_KEY, tagFound || undefined );
+ } catch ( err ) {}
}
+
+ return Promise.resolve( tagFound || null );
};
/**
| 3 |
diff --git a/ui/component/claimPreview/view.jsx b/ui/component/claimPreview/view.jsx @@ -352,7 +352,7 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
{pending ? (
<ClaimPreviewTitle uri={uri} />
) : (
- <NavLink {...navLinkProps}>
+ <NavLink aria-current={active && 'page'} {...navLinkProps}>
<ClaimPreviewTitle uri={uri} />
</NavLink>
)}
| 4 |
diff --git a/app/components/new-catalog/template.hbs b/app/components/new-catalog/template.hbs <p class="mt-0">
{{primaryResource.displayName}}
</p>
- <p class="help-block">
- This app requires the specified namespace to be unchanged.
- </p>
{{else}}
{{form-namespace
namespace=primaryResource
| 2 |
diff --git a/story.js b/story.js @@ -109,6 +109,8 @@ class Conversation extends EventTarget {
(async () => {
await _playerSay(this.localPlayer, text);
})();
+
+ cameraManager.setTarget(this.localPlayer.avatar.modelBones.Head, Math.PI/4);
}
addRemotePlayerMessage(text, type = 'chat') {
const message = {
@@ -128,6 +130,10 @@ class Conversation extends EventTarget {
(async () => {
await _playerSay(this.remotePlayer, text);
})();
+
+ /* debugger;
+ cameraManager.setTarget(); */
+ cameraManager.setTarget(this.remotePlayer.avatar.modelBones.Head, -Math.PI/4);
}
async wrapProgress(fn) {
if (!this.progressing) {
@@ -400,6 +406,8 @@ export const listenHack = () => {
currentConversation = new Conversation(localPlayer, remotePlayer);
currentConversation.addEventListener('close', () => {
currentConversation = null;
+
+ cameraManager.setTarget(null);
}, {once: true});
story.dispatchEvent(new MessageEvent('conversationstart', {
data: {
| 0 |
diff --git a/backend/components/pages/routes.js b/backend/components/pages/routes.js @@ -38,7 +38,7 @@ router.get('/courses/:id/edit', authenticateMiddleware, catchAsync(async (reques
response.status(200).json({ course, problems });
}));
-router.get('/courses/:id', authenticateMiddleware, catchAsync(async (request, response) => {
+router.get('/courses/:id', catchAsync(async (request, response) => {
const courseId = request.params['id'];
const course = await Course.select.oneById(courseId);
| 11 |
diff --git a/src/og/control/selection/SelectionScene.js b/src/og/control/selection/SelectionScene.js @@ -79,7 +79,7 @@ class SelectionScene extends RenderNode {
geoObject: {
scale: 1,
instanced: true,
- tag: "ruler",
+ tag: "selection",
color: "rgb(0,305,0)",
vertices: obj3d.vertices,
indices: obj3d.indexes,
@@ -93,7 +93,7 @@ class SelectionScene extends RenderNode {
geoObject: {
scale: 1,
instanced: true,
- tag: "ruler",
+ tag: "selection",
color: "rgb(455,0,0)",
vertices: obj3d.vertices,
indices: obj3d.indexes,
@@ -117,7 +117,9 @@ class SelectionScene extends RenderNode {
this._cornersLayer = new Vector("corners", {
entities: [this._cornerEntity[0], this._cornerEntity[1]],
pickingEnabled: true,
- displayInLayerSwitcher: false
+ displayInLayerSwitcher: false,
+ scaleByDistance: [1.0, 4000000, 0.01],
+ pickingScale: 2
});
}
@@ -153,6 +155,7 @@ class SelectionScene extends RenderNode {
this.renderer.events.on("lup", this._onMouseLup_, this);
this._planet.addLayer(this._trackLayer);
+
this._planet.addLayer(this._cornersLayer);
}
@@ -207,6 +210,8 @@ class SelectionScene extends RenderNode {
this._pickedCorner = null;
this._anchorLonLat = null;
+ this._propsLabel.label.setVisibility(true);
+
if (this._onSelect && typeof this._onSelect === 'function') {
let startLonLat = this._cornerEntity[0].getLonLat();
let endLonLat = this._cornerEntity[1].getLonLat();
@@ -299,30 +304,18 @@ class SelectionScene extends RenderNode {
this._cornerEntity[1].geoObject.setVisibility(false);
}
- getScale(cart) {
- let r = this.renderer;
- let t = 1.0 - (r.activeCamera._lonLat.height - MAX_SCALE_HEIGHT) / (MIN_SCALE_HEIGHT - MAX_SCALE_HEIGHT);
- let _distanceToCamera = cart.distance(r.activeCamera.eye);
- return math.lerp(t < 0 ? 0 : t, MAX_SCALE, MIN_SCALE) * _distanceToCamera;
- }
-
frame() {
let t = this._trackEntity.polyline.getPath3v()[0];
if (t) {
- this._cornerEntity[0].geoObject.setScale(this.getScale(this._cornerEntity[0].getCartesian()));
- this._cornerEntity[1].geoObject.setScale(this.getScale(this._cornerEntity[1].getCartesian()));
-
if (!this._ignoreTerrain) {
let res = 0;
for (let i = 0, len = t.length - 1; i < len; i++) {
res += t[i + 1].distance(t[i]);
}
-// this._propsLabel.setCartesian3v(t[Math.floor(t.length / 2)]);
-// this._propsLabel.label.setText(`${distanceFormat(res)}, ${Math.round(this._heading)} deg`);
+ this._propsLabel.setCartesian3v(t[Math.floor(t.length / 2)]);
+ this._propsLabel.label.setText(`${distanceFormat(res)}, ${Math.round(this._heading)} deg`);
}
-
-
}
}
| 4 |
diff --git a/src/journeys_utils.js b/src/journeys_utils.js @@ -439,7 +439,7 @@ journeys_utils.animateBannerEntrance = function(banner) {
banner.style.top = '0';
}
else if (journeys_utils.position === 'bottom') {
- if(!journeys_utils._isSafeAreaRequired(journeys_utils.journeyLinkData)) {
+ if(!journeys_utils.journeyLinkData.journey_link_data['safeAreaRequired']) {
banner.style.bottom = '0';
} else {
journeys_utils._dynamicallyRepositionBanner();
@@ -451,13 +451,6 @@ journeys_utils.animateBannerEntrance = function(banner) {
setTimeout(onAnimationEnd, journeys_utils.animationDelay);
}
-journeys_utils._isSafeAreaRequired = function(journeyLinkData) {
- if (journeyLinkData['safeAreaRequired'] && journeys_utils._detectSafeAreaDevices()) {
- return true;
- }
- return false;
-}
-
journeys_utils._resizeListener = function () {
if (journeys_utils.isSafeAreaEnabled) {
journeys_utils._resetJourneysBannerPosition(false, false);
@@ -511,22 +504,6 @@ journeys_utils._resetJourneysBannerPosition = function(isPageBottomOverScrolling
}
}
-// generic method to detect which devices should call journey_utls._dynamicallyRepositionBanner()
-journeys_utils._detectSafeAreaDevices = function() {
- var isFormFactoriOS = !!navigator.platform.match(/iPhone|iPod|iPad/);
- var ratio = window.devicePixelRatio || 1;
- var screen = {
- width: journeys_utils.windowWidth * ratio,
- height: journeys_utils.windowHeight * ratio
- };
-
- // iPhone X Detection
- if (isFormFactoriOS && screen.width == 1125 && screen.height === 2436) {
- return true;
- }
- return false;
-}
-
journeys_utils._addSecondsToDate = function(seconds) {
var currentDate = new Date();
return currentDate.setSeconds(currentDate.getSeconds() + seconds);
@@ -675,7 +652,8 @@ journeys_utils._getPageviewMetadata = function(options, additionalMetadata) {
"user_agent": navigator.userAgent,
"language": navigator.language,
"screen_width": screen.width || -1,
- "screen_height": screen.height || -1
+ "screen_height": screen.height || -1,
+ "window_device_pixel_ratio": window.devicePixelRatio || 1
}, additionalMetadata || {});
};
| 2 |
diff --git a/local_modules/Passwords/Views/EnterExistingPasswordView.web.js b/local_modules/Passwords/Views/EnterExistingPasswordView.web.js @@ -171,7 +171,6 @@ class EnterExistingPasswordView extends View
"change",
function(event)
{
- console.log("change")
__updateRightBarButtonSubmittableByLayerContent()
}
)
| 13 |
diff --git a/lib/runtime/completions.js b/lib/runtime/completions.js @@ -11,15 +11,10 @@ import { Point, Range } from 'atom'
import { client } from '../connection'
import modules from './modules'
+const bracketScope = 'meta.bracket.julia'
const completions = client.import('completions')
class AutoCompleteProvider {
- // @NOTE: This automatically respects emebedded Julia code and thus we don't need do something like
- // ```js
- // selector = atom.config.get('julia-client.juliaSyntaxScopes').map(selector => {
- // return `.${selector}`
- // }).join(', ')
- // ```
selector = '.source.julia'
disableForSelector = `.source.julia .comment`
excludeLowerPriority = false
@@ -32,16 +27,19 @@ class AutoCompleteProvider {
// Don't show suggestions if preceding char is a space (unless activate manually)
if (!data.activatedManually) {
- const point = data.bufferPosition
- const { row, column } = point
+ const { editor, bufferPosition } = data
+ const { row, column } = bufferPosition
if (column === 0) return []
- const prevCharPoint = new Point(row, column - 1)
- const range = new Range(prevCharPoint, point)
- const text = data.editor.getTextInBufferRange(range)
- if (text.match(/\s/)) return []
+ const prevCharPosition = new Point(row, column - 1)
+ const range = new Range(prevCharPosition, bufferPosition)
+ const text = editor.getTextInBufferRange(range)
+ // If the current position is in function call, show `REPLCompletions.MethodCompletion`s
+ // whatever whitespaces precede
+ const { scopes } = editor.scopeDescriptorForBufferPosition(bufferPosition)
+ if (!scopes.includes(bracketScope) && text.match(/\s/)) return []
}
- const suggestions = this.rawCompletions(data).then(({ completions, prefix, mod }) => {
+ const suggestions = this.rawCompletions(data).then(({ completions, prefix }) => {
try {
return this.processCompletions(completions, prefix)
} catch (err) {
| 11 |
diff --git a/README.en.md b/README.en.md [Live Preview](http://notes.iissnan.com)
+<!--
## Screenshots
* Desktop
* Mobile

-
+-->
## Installation
@@ -213,8 +214,10 @@ since: 2013
## Browser support
-
+[![browser-image]][browser-url]
+[](https://www.browserstack.com/)
+>**BrowserStack** is a cloud-based cross-browser testing tool that enables developers to test their websites across various browsers on different operating systems and mobile devices, without requiring users to install virtual machines, devices or emulators.
## Contributing
@@ -230,3 +233,6 @@ Contribution is welcome, feel free to open an issue and fork. Waiting for your p
[bower-url]: http://bower.io
[jquery-image]: https://img.shields.io/badge/jquery-1.9-blue.svg?style=flat-square
[jquery-url]: http://jquery.com/
+
+[browser-image]: https://img.shields.io/badge/browser-%20chrome%20%7C%20firefox%20%7C%20opera%20%7C%20safari%20%7C%20ie%20%3E%3D%209-lightgrey.svg
+[browser-url]: https://www.browserstack.com
| 14 |
diff --git a/tests/phpunit/includes/TestCase.php b/tests/phpunit/includes/TestCase.php @@ -146,39 +146,6 @@ class TestCase extends \WP_UnitTestCase {
return $this;
}
- protected function checkRequirements() {
- parent::checkRequirements();
-
- /**
- * Proper handling for MS group annotation handling was fixed in 5.1
- * @see https://core.trac.wordpress.org/ticket/43863
- */
- if ( version_compare( $GLOBALS['wp_version'], '5.1', '<' ) ) {
- $annotations = $this->getAnnotations();
- $groups = array();
-
- if ( ! empty( $annotations['class']['group'] ) ) {
- $groups = array_merge( $groups, $annotations['class']['group'] );
- }
- if ( ! empty( $annotations['method']['group'] ) ) {
- $groups = array_merge( $groups, $annotations['method']['group'] );
- }
-
- if ( ! empty( $groups ) ) {
- if ( in_array( 'ms-required', $groups, true ) ) {
- if ( ! is_multisite() ) {
- $this->markTestSkipped( 'Test only runs on Multisite' );
- }
- }
- if ( in_array( 'ms-excluded', $groups, true ) ) {
- if ( is_multisite() ) {
- $this->markTestSkipped( 'Test does not run on Multisite' );
- }
- }
- }
- }
- }
-
/**
* Capture the output of an action.
*
| 2 |
diff --git a/package.json b/package.json "build:js": "npm-run-all build:lib build:bundle",
"build:lib": "node ./bin/build-lib.js",
"build": "npm-run-all --parallel build:js build:css build:companion --serial build:gzip size",
- "clean": "rm -rf packages/*/lib packages/@uppy/*/lib && rm -rf packages/*/dist packages/@uppy/*/dist",
+ "clean": "rm -rf packages/*/lib packages/@uppy/*/lib packages/*/dist packages/@uppy/*/dist",
"lint:fix": "npm run lint -- --fix",
"lint": "eslint . --cache",
"lint-staged": "lint-staged",
| 2 |
diff --git a/app/views/layouts/public_user_feed.html.erb b/app/views/layouts/public_user_feed.html.erb <meta property="og:image" content="<%= @avatar_url %>" />
<%= stylesheet_link_tag 'cartodb', 'common', 'public_dashboard', 'user_feed' %>
+
+ <% if @most_viewed_vis_map && @most_viewed_vis_map.map.provider == 'googlemaps' %>
+ <script type="text/javascript"
+ src="//maps.googleapis.com/maps/api/js?sensor=false&v=3.12&<%= @most_viewed_vis_map.user.google_maps_query_string %>">
+ </script>
+ <% end %>
</head>
<body class="PublicBody PublicBody--grey">
<%= render 'admin/shared/public_header' %>
| 1 |
diff --git a/src/_data/examples.yml b/src/_data/examples.yml @@ -35,11 +35,9 @@ showcase:
- section: showcase
slug: videosphere
- scene_url: https://aframe.io/aframe/examples/boilerplate/360-video/
- source_url: https://github.com/aframevr/aframe/blob/v0.7.0/examples/boilerplate/360-video/index.html
+ scene_url: https://aframe-360-video-example.glitch.me/
+ source_url: https://glitch.com/~aframe-360-video-example
title: 360° Video
- supports:
- mobile: false
- section: showcase
slug: animation
| 14 |
diff --git a/app/src/renderer/components/common/PageProfile.vue b/app/src/renderer/components/common/PageProfile.vue @@ -19,7 +19,8 @@ page(title="Preferences")
type="select"
v-model="themes.active"
:options="themeSelectOptions"
- placeholder="Select theme...")
+ placeholder="Select theme..."
+ @change="setAppTheme")
list-item(type="field" title="View tutorial for Voyager")
btn#toggle-onboarding(
@click.native="setOnboarding"
| 12 |
diff --git a/docs/plugins/node-api.md b/docs/plugins/node-api.md @@ -283,7 +283,7 @@ An **async** function to modify the CLI state after starting the development ser
export default pluginOptions => ({
beforeRenderToElement: async (App, state) => {
- const NewApp => props => {
+ const NewApp = props => {
return <App {...props} />
}
| 1 |
diff --git a/src/components/signup/SignupState.js b/src/components/signup/SignupState.js import React, { useCallback, useContext, useEffect, useState } from 'react'
import { Platform, ScrollView, StyleSheet, View } from 'react-native'
import { createSwitchNavigator } from '@react-navigation/core'
-import { assign, get, identity, isError, pick, pickBy, toPairs } from 'lodash'
+import { assign, fromPairs, get, identity, isError, pick, pickBy, toPairs } from 'lodash'
import moment from 'moment'
import { t } from '@lingui/macro'
@@ -295,26 +295,42 @@ const Signup = ({ navigation }: { navigation: any, screenProps: any }) => {
// trying to update profile 2 times, if failed anyway - re-throwing exception
await retry(async () => {
- // set reg method and invite code
+ const userProps = { regMethod, inviterInviteCode: inviteCode }
+
+ log.debug('set reg method and invite code', { userProps })
+
const [mnemonic] = await Promise.all([
AsyncStorage.getItem(GD_USER_MNEMONIC).then(_ => _ || ''),
- userProperties.updateAll({ regMethod, inviterInviteCode: inviteCode }),
+ userProperties.updateAll(userProps),
])
- // set profile data
- await userStorage.setProfile({
+ const profile = {
...requestPayload,
walletAddress: goodWallet.account,
mnemonic,
- })
+ }
+
+ log.debug('got mnemonic, updating profile', { mnemonic, profile })
+
+ // set profile data
+ await userStorage.setProfile(profile)
+
+ log.debug('adding tokens', { tokens: fromPairs(tokenFields) })
// set tokens
await Promise.all(
tokenFields.map(([fieldName, fieldValue]) => userStorage.setProfileField(fieldName, fieldValue, 'private')),
)
+ log.debug('setting registered flag')
+
// set registered flag
await Promise.all([userProperties.set('registered', true), AsyncStorage.removeItem(GD_INITIAL_REG_METHOD)])
+
+ log.debug('persist user props', pick(userProperties, 'data', 'lastStored'))
+
+ // persist user props
+ await userProperties.persist()
})
fireSignupEvent('SUCCESS', { torusProvider, inviteCode })
| 0 |
diff --git a/src/core/operations/ContainImage.mjs b/src/core/operations/ContainImage.mjs @@ -72,6 +72,11 @@ class ContainImage extends Operation {
"Bezier"
],
defaultIndex: 1
+ },
+ {
+ name: "Opaque background",
+ type: "boolean",
+ value: true
}
];
}
@@ -82,7 +87,7 @@ class ContainImage extends Operation {
* @returns {byteArray}
*/
async run(input, args) {
- const [width, height, hAlign, vAlign, alg] = args;
+ const [width, height, hAlign, vAlign, alg, opaqueBg] = args;
const resizeMap = {
"Nearest Neighbour": jimp.RESIZE_NEAREST_NEIGHBOR,
@@ -115,6 +120,13 @@ class ContainImage extends Operation {
if (ENVIRONMENT_IS_WORKER())
self.sendStatusMessage("Containing image...");
image.contain(width, height, alignMap[hAlign] | alignMap[vAlign], resizeMap[alg]);
+
+ if (opaqueBg) {
+ const newImage = await jimp.read(width, height, 0x000000FF);
+ newImage.blit(image, 0, 0);
+ image = newImage;
+ }
+
const imageBuffer = await image.getBufferAsync(jimp.AUTO);
return [...imageBuffer];
} catch (err) {
| 0 |
diff --git a/components/button-stateful/index.jsx b/components/button-stateful/index.jsx @@ -164,9 +164,7 @@ class ButtonStateful extends React.Component {
handleClick = (e) => {
if (isFunction(this.props.onClick)) this.props.onClick(e);
if (typeof this.props.active !== 'boolean') {
- this.setState(prevState => ({
- active: !prevState.active
- }));
+ this.setState((prevState) => ({ active: !prevState.active }));
}
};
| 3 |
diff --git a/src/lib/hoc/withHotCodePush.native.js b/src/lib/hoc/withHotCodePush.native.js import codePush from 'react-native-code-push' // eslint-disable-line import/default
+import { t } from '@lingui/macro'
const { CheckFrequency, InstallMode } = codePush
+
const defaultOptions = {
- checkFrequency: CheckFrequency.ON_APP_RESUME,
+ checkFrequency: CheckFrequency.MANUAL,
mandatoryInstallMode: InstallMode.IMMEDIATE,
updateDialog: {
appendReleaseDescription: true,
- title: 'a new update is available!',
+ title: t`A new update is available!`,
},
}
+
const withHotCodePush = (component, options = defaultOptions) => codePush(options)(component)
export default withHotCodePush
| 0 |
diff --git a/ReviewQueueHelper.user.js b/ReviewQueueHelper.user.js // @description Keyboard shortcuts, skips accepted questions and audits (to save review quota)
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 1.8.4
+// @version 1.8.5
//
// @include https://*stackoverflow.com/review*
// @include https://*serverfault.com/review*
@@ -409,10 +409,13 @@ async function waitForSOMU() {
if(settings.url.includes('/close/popup')) {
setTimeout(function() {
- // Select default radio based on previous votes
- let opts = $('#popup-close-question .bounty-indicator-tab').slice(0, -1).get().sort((a, b) => Number(a.innerText) - Number(b.innerText));
+ // Find and add class to off-topic bounty indicator so we can avoid it
+ $('#popup-close-question input[value="OffTopic"]').nextAll('.bounty-indicator-tab').addClass('offtopic-indicator');
+
+ // Select default radio based on previous votes, ignoring the off-topic reason
+ let opts = $('#popup-close-question .bounty-indicator-tab').not('.offtopic-indicator').slice(0, -1).get().sort((a, b) => Number(a.innerText) - Number(b.innerText));
const selOpt = $(opts).last().closest('label').find('input').click();
- console.log(selOpt);
+ //console.log(opts, selOpt);
// If selected option is in a subpane, display off-topic subpane instead
const pane = selOpt.closest('.popup-subpane');
| 8 |
diff --git a/lib/ferryman.js b/lib/ferryman.js @@ -73,12 +73,16 @@ class Ferryman {
log.debug('Received step data: %j', stepData);
assert(stepData);
- Object.assign(this, {
- snapshot: stepData.snapshot || {},
- stepData
- });
+ // Object.assign(this, {
+ // snapshot: stepData.snapshot || {},
+ // stepData
+ // });
+ //
+ // this.stepData = stepData;
+
+ this.snapshot = stepData.snapshot;
- this.stepData = stepData;
+ this.stepData = Object.assign({}, stepData);
if (!skipInit) {await componentReader.init(compPath);}
}
| 14 |
diff --git a/generators/upgrade/index.js b/generators/upgrade/index.js @@ -309,20 +309,15 @@ module.exports = class extends BaseGenerator {
},
assertGitRepository() {
- const done = this.async();
const gitInit = () => {
const gitInit = this.gitExec('init', { silent: this.silent });
if (gitInit.code !== 0) this.error(`Unable to initialize a new Git repository:\n${gitInit.stdout} ${gitInit.stderr}`);
this.success('Initialized a new Git repository');
this._gitCommitAll('Initial');
- done();
};
const gitRevParse = this.gitExec(['rev-parse', '-q', '--is-inside-work-tree'], { silent: this.silent });
if (gitRevParse.code !== 0) gitInit();
- else {
- this.success('Git repository detected');
- done();
- }
+ else this.success('Git repository detected');
},
assertNoLocalChanges() {
| 2 |
diff --git a/src/js/components/box/StyledBox.js b/src/js/components/box/StyledBox.js @@ -156,19 +156,19 @@ const edgeStyle = (kind, data, theme) => {
if (typeof data === 'string') {
return `${kind}: ${theme.global.edgeSize[data]};`;
}
+ let result = '';
if (data.horizontal) {
- return `
+ result += `
${kind}-left: ${theme.global.edgeSize[data.horizontal]};
${kind}-right: ${theme.global.edgeSize[data.horizontal]};
`;
}
if (data.vertical) {
- return `
+ result += `
${kind}-top: ${theme.global.edgeSize[data.vertical]};
${kind}-bottom: ${theme.global.edgeSize[data.vertical]};
`;
}
- let result = '';
if (data.top) {
result += `${kind}-top: ${theme.global.edgeSize[data.top]};`;
}
| 1 |
diff --git a/src/encoded/tests/data/inserts/human_donor.json b/src/encoded/tests/data/inserts/human_donor.json "documents": [
"encode:PanIsletD_Crawford_protocol"
],
- "ethnicity": "unknown",
"health_status": "unknown",
"lab": "j-michael-cherry",
"life_stage": "unknown",
{
"accession": "ENCDO106AAA",
"award": "U41HG006992",
- "ethnicity": "unknown",
"health_status": "unknown",
"lab": "j-michael-cherry",
"life_stage": "unknown",
{
"accession": "ENCDO275AAA",
"award": "U41HG006992",
- "ethnicity": "unknown",
+ "ethnicity": "Black",
"health_status": "unknown",
"lab": "j-michael-cherry",
"life_stage": "unknown",
{
"accession": "ENCDO276AAA",
"award": "U41HG006992",
- "ethnicity": "unknown",
+ "ethnicity": "Asian",
"health_status": "unknown",
"lab": "j-michael-cherry",
"life_stage": "unknown",
| 3 |
diff --git a/_data/categories/meshes.yml b/_data/categories/meshes.yml tracing: "Yes"
encryption: "Yes"
+ - name: App Mesh
+ desc: A multi-service mesh management plane to enable adoption, operation and development of service meshes and services running on them
+ link: https://github.com/layer5io/meshery-app-mesh
+ autoinject: "No"
+ tcp-web: "Yes"
+ grpc: "Yes"
+ h2: "Yes"
+ multi-cluster: "Yes"
+ multi-tenant: "Yes"
+ prometheus: "Yes"
+ tracing: "Yes"
+ encryption: "Yes"
+
- name: AspenMesh
desc: AspenMesh - a commercial offering built on top of Istio. Closed source.
link: https://aspenmesh.io/
| 3 |
diff --git a/bot/paginatedmessages/paginatedinteractions.go b/bot/paginatedmessages/paginatedinteractions.go @@ -30,7 +30,7 @@ func handleInteractionCreate(evt *eventsystem.EventData) {
}
func handlePageChange(ic *discordgo.InteractionCreate, pageMod int) {
- if ic.Member.User.ID == common.BotUser.ID {
+ if (ic.Member != nil && ic.Member.User.ID == common.BotUser.ID) || (ic.User != nil && ic.User.ID == common.BotUser.ID) {
return
}
| 9 |
diff --git a/src/core/Core.js b/src/core/Core.js @@ -947,10 +947,6 @@ class Uppy {
this.log('No uploader type plugins are used', 'warning')
}
- if (Object.keys(this.state.files).length === 0) {
- this.log('No files have been added', 'warning')
- }
-
const isMinNumberOfFilesReached = this.checkMinNumberOfFiles()
if (!isMinNumberOfFilesReached) {
return Promise.reject(new Error('Minimum number of files has not been reached'))
| 2 |
diff --git a/src/apps.json b/src/apps.json "<main id=\"bugzilla-body\"",
"<span id=\"information\" class=\"header_addl_info\">version ([\\d.]+)<\\;version:\\1"
],
+ "cookies": {
+ "Bugzilla_login_request_cookie": ""
+ },
"icon": "Bugzilla.png",
"implies": "Perl",
"js": {
| 7 |
diff --git a/scenes/SceneFilesFolder.js b/scenes/SceneFilesFolder.js @@ -4,7 +4,6 @@ import * as SVG from "~/common/svg";
import * as Events from "~/common/custom-events";
import { css } from "@emotion/react";
-import { PopoverNavigation } from "~/components/system/components/PopoverNavigation";
import { ButtonPrimary, ButtonTertiary } from "~/components/system/components/Buttons";
import { FileTypeGroup } from "~/components/core/FileTypeIcon";
import { TabGroup, PrimaryTabGroup, SecondaryTabGroup } from "~/components/core/TabGroup";
| 2 |
diff --git a/src/server/routes/admin.js b/src/server/routes/admin.js @@ -469,6 +469,10 @@ module.exports = function(crowi, app) {
actions.user = {};
actions.user.index = function(req, res) {
+ const userUpperLimit = crowi.env['USER_UPPER_LIMIT'];
+ User.findAllUsers({status: User.statusActivate})
+ .then(userData => {
+ const activeUsers = userData.length;
var page = parseInt(req.query.page) || 1;
User.findUsersWithPagination({page: page}, function(err, result) {
@@ -476,7 +480,10 @@ module.exports = function(crowi, app) {
return res.render('admin/users', {
users: result.docs,
- pager: pager
+ pager: pager,
+ activeUsers: activeUsers,
+ userUpperLimit: userUpperLimit
+ });
});
});
};
| 12 |
diff --git a/src/commands/view/ComponentDelete.js b/src/commands/view/ComponentDelete.js import { isArray } from 'underscore';
export default {
- run(ed, sender, opts = {}) {
+ run(ed, s, opts = {}) {
const toSelect = [];
let components = opts.component || ed.getSelectedAll();
components = isArray(components) ? [...components] : [components];
- // It's important to deselect components first otherwise,
- // with undo, the component will be set with the wrong `collection`
- ed.select(null);
-
- components.forEach(component => {
- if (!component || !component.get('removable')) {
+ components.filter(Boolean).forEach(component => {
+ if (!component.get('removable')) {
+ toSelect.push(component);
return this.em.logWarning('The element is not removable', {
- component
+ component,
});
}
component.remove();
- component.collection && toSelect.push(component);
});
- toSelect.length && ed.select(toSelect);
+ ed.select(toSelect);
return components;
- }
+ },
};
| 7 |
diff --git a/resource/js/components/PageEditor.js b/resource/js/components/PageEditor.js @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import * as toastr from 'toastr';
-import {debounce} from 'throttle-debounce';
+import { throttle, debounce } from 'throttle-debounce';
import Editor from './PageEditor/Editor';
import Preview from './PageEditor/Preview';
@@ -36,8 +36,12 @@ export default class PageEditor extends React.Component {
this.pageSavedHandler = this.pageSavedHandler.bind(this);
this.apiErrorHandler = this.apiErrorHandler.bind(this);
- // create debounced function
+ // create throttled function
+ this.renderWithDebounce = debounce(50, throttle(100, this.renderPreview));
this.saveDraftWithDebounce = debounce(300, this.saveDraft);
+
+ // initial rendering
+ this.renderPreview(this.state.markdown);
}
componentWillMount() {
@@ -64,12 +68,7 @@ export default class PageEditor extends React.Component {
* @param {string} value
*/
onMarkdownChanged(value) {
- this.setState({
- markdown: value,
- });
-
- this.renderPreview();
-
+ this.renderWithDebounce(value);
this.saveDraftWithDebounce()
}
@@ -231,7 +230,7 @@ export default class PageEditor extends React.Component {
});
}
- renderPreview() {
+ renderPreview(value) {
const config = this.props.crowi.config;
// generate options obj
@@ -244,7 +243,7 @@ export default class PageEditor extends React.Component {
// render html
var context = {
- markdown: this.state.markdown,
+ markdown: value,
dom: this.previewElement,
currentPagePath: decodeURIComponent(location.pathname)
};
@@ -262,7 +261,10 @@ export default class PageEditor extends React.Component {
.then(() => crowi.interceptorManager.process('postRenderPreview', context))
.then(() => crowi.interceptorManager.process('preRenderPreviewHtml', context))
.then(() => {
- this.setState({html: context.parsedHTML});
+ this.setState({
+ markdown: value,
+ html: context.parsedHTML,
+ });
// set html to the hidden input (for submitting to save)
$('#form-body').val(this.state.markdown);
| 7 |
diff --git a/src/se.js b/src/se.js -{
// session
// holds a reference to a Monaco editor instance (.me)
// and processes some of its commands (e.g. .ED(), .ER(), ...)
- function Se(ide) { // constructor
+D.Se = function Se(ide) { // constructor
const se = this;
se.ide = ide;
se.hist = [''];
se.session = me.createContextKey('session', true);
se.tracer = me.createContextKey('tracer', true);
me.listen = true;
- se.oModel = monaco.editor.createModel('');
D.remDefaultMap(me);
D.mapScanCodes(me);
D.mapKeys(se); D.prf.keys(D.mapKeys.bind(this, se));
-
+ se.olines = {};
+ me.onKeyDown(se.stashLines.bind(se));
let mouseL = 0; let mouseC = 0; let mouseTS = 0;
me.onMouseDown((e) => {
const t = e.target;
}
mouseL = l; mouseC = c; mouseTS = e.event.timestamp;
}
+ se.stashLines();
});
+ me.onMouseUp(se.stashLines.bind(se));
me.onDidChangeModelContent((e) => {
if (!me.listen || me.getModel().bqc) return;
e.changes.forEach((c) => {
n = m;
}
if (dl0 < l0 && !se.dirty[dl0]) {
- se.edit([{ range: new monaco.Range(dl0, 1, dl0, 1), text: ' '},
- { range: new monaco.Range(dl0, 1, dl0, 2), text: ''}]);
+ se.edit([
+ { range: new monaco.Range(dl0, 1, dl0, 1), text: ' ' },
+ { range: new monaco.Range(dl0, 1, dl0, 2), text: '' },
+ ]);
}
let l = dl0;
while (l <= dl1) {
const base = se.dirty;
- base[l] == null && (base[l] = se.oModel.getLineContent(l));
+ base[l] == null && (base[l] = se.olines[l]);
l += 1;
}
while (l < l0 + n) se.dirty[l++] = 0;
se.btm = se.me.getContentHeight() + e.scrollTop;
});
me.onDidFocusEditorText(() => { se.focusTS = +new Date(); se.ide.focusedWin = se; });
- me.onDidChangeCursorPosition(e => ide.setCursorPosition(e.position, se.me.getModel().getLineCount()));
+ me.onDidChangeCursorPosition(
+ (e) => ide.setCursorPosition(e.position, se.me.getModel().getLineCount()),
+ );
se.promptType = 0; // see ../docs/protocol.md #SetPromptType
se.processAutocompleteReply = D.ac(me);
// me.viewModel.viewLayout.constructor.LINES_HORIZONTAL_EXTRA_PX = 14;
else document.activeElement.dispatchEvent(k);
setTimeout(se.taReplay, 1);
};
- }
- Se.prototype = {
+};
+D.Se.prototype = {
histRead() {
if (!D.el || !D.prf.persistentHistory()) return;
const fs = nodeRequire('fs');
const se = this;
se.decorations = se.me.deltaDecorations(
se.decorations,
- Object.keys(se.dirty).map(l => ({
+ Object.keys(se.dirty).map((l) => ({
range: new monaco.Range(+l, 1, +l, 1),
options: {
isWholeLine: true,
se.btm = Math.max(se.dom.clientHeight + me.getScrollTop(), me.getTopForLineNumber(ll));
}
se.isReadOnly && me.updateOptions({ readOnly: true });
- se.oModel.setValue(me.getValue());
model._commandManager.clear();
},
edit(edits, sel) {
(promptChanged || !isEmpty)
? [new monaco.Selection(line + !isEmpty, 7, line + !isEmpty, 7)] : me.getSelections(),
);
- se.oModel.setValue(me.getValue());
} else if (t === ssp) {
se.edit([{ range: new monaco.Range(line, 1, line, 7), text: '' }]);
} else {
se.taBuffer.length && se.taReplay();
}
},
+ stashLines() {
+ const se = this;
+ const { me } = se;
+ const model = me.getModel();
+ me.getSelections().forEach((sel) => {
+ for (let ln = sel.startLineNumber; ln <= sel.endLineNumber; ln++) {
+ se.olines[ln] = model.getLineContent(ln);
+ }
+ });
+ },
updSize() {
const se = this;
const { me } = se;
me.setPosition({ lineNumber: l, column: 1 + text.search(/\S|$/) });
delete se.dirty[l];
}
- se.oModel.setValue(me.getValue());
se.hl();
},
EP() { this.ide.focusMRUWin(); },
}
},
};
- D.Se = Se;
-}
| 14 |
diff --git a/assets/src/edit-story/app/media/media3p/providerReducer.js b/assets/src/edit-story/app/media/media3p/providerReducer.js import commonReducer, {
INITIAL_STATE as COMMON_INITIAL_STATE,
} from '../common/reducer';
+import * as types from './types';
const INITIAL_STATE = {
...COMMON_INITIAL_STATE,
@@ -39,7 +40,16 @@ const INITIAL_STATE = {
* @return {Object} The new state
*/
function providerReducer(state = INITIAL_STATE, { type, payload }) {
- return commonReducer(state, { type, payload });
+ state = commonReducer(state, { type, payload });
+
+ if (type === types.SET_SEARCH_TERM) {
+ return {
+ pageToken: undefined,
+ nextPageToken: undefined,
+ ...state,
+ };
+ }
+ return state;
}
export default providerReducer;
| 12 |
diff --git a/.travis.yml b/.travis.yml @@ -11,6 +11,7 @@ env:
before_install:
- if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi
+ - if [[ -n ${NPM_TOKEN} ]]; then echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc; fi
- npm install -g bower grunt-cli
- npm install git+https://github.com/patternfly/patternfly-eng-release.git
| 0 |
diff --git a/devices/lidl.js b/devices/lidl.js @@ -394,7 +394,7 @@ module.exports = [
},
{
fingerprint: [{modelID: 'TY0202', manufacturerName: '_TZ1800_fcdjzz3s'}],
- model: 'HG06335',
+ model: 'HG06335/HG07310',
vendor: 'Lidl',
description: 'Silvercrest smart motion sensor',
fromZigbee: [fz.ias_occupancy_alarm_1, fz.battery],
| 10 |
diff --git a/.travis.yml b/.travis.yml language: node_js
node_js:
- - '10.21.0'
+ - '10.15'
addons:
chrome: stable
@@ -27,18 +27,18 @@ env:
matrix:
include:
- - if: branch =~ /^(master|(autotests.*))$/ AND env(DEPLOY_VERSION) IS NOT present
- script:
- #- cp .env.cypress .env
- - npm run build
- - npx netlify deploy --prod --json --site $NETLIFY_SITE_ID --auth $NETLIFY_ACCESS_TOKEN -d build > test.json
- - URL=`grep -i 'deploy_url' test.json | cut -c18-70`
- - echo "$(cat test.json)"
- - echo "Cypress test site deployed $URL. W3 $W3_LINK"
- #- export CYPRESS_baseUrl=$URL // this is now fixed to goodtest.netlify.app
- - export CYPRESS_w3Link=$W3_LINK
- - cypress run --record false --browser chrome
- #- npm run bundlesize:check
+ # - if: branch =~ /^(master|(autotests.*))$/ AND env(DEPLOY_VERSION) IS NOT present
+ # script:
+ # #- cp .env.cypress .env
+ # - npm run build
+ # - npx netlify deploy --prod --json --site $NETLIFY_SITE_ID --auth $NETLIFY_ACCESS_TOKEN -d build > test.json
+ # - URL=`grep -i 'deploy_url' test.json | cut -c18-70`
+ # - echo "$(cat test.json)"
+ # - echo "Cypress test site deployed $URL. W3 $W3_LINK"
+ # #- export CYPRESS_baseUrl=$URL // this is now fixed to goodtest.netlify.app
+ # - export CYPRESS_w3Link=$W3_LINK
+ # - cypress run --record false --browser chrome
+ # #- npm run bundlesize:check
- if: env(DEPLOY_VERSION) IS NOT present
script:
- npm run test:setup
| 3 |
diff --git a/tarteaucitron.js b/tarteaucitron.js @@ -741,28 +741,28 @@ var tarteaucitron = {
}
if (tarteaucitron.launch[service.key] !== true) {
tarteaucitron.launch[service.key] = true;
- service.js();
+ if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.js(); }
tarteaucitron.sendEvent(service.key + '_loaded');
}
tarteaucitron.state[service.key] = true;
tarteaucitron.userInterface.color(service.key, true);
} else if (isDenied) {
if (typeof service.fallback === 'function') {
- service.fallback();
+ if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.fallback(); }
}
tarteaucitron.state[service.key] = false;
tarteaucitron.userInterface.color(service.key, false);
} else if (!isResponded && isDNTRequested && tarteaucitron.handleBrowserDNTRequest) {
tarteaucitron.cookie.create(service.key, 'false');
if (typeof service.fallback === 'function') {
- service.fallback();
+ if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.fallback(); }
}
tarteaucitron.state[service.key] = false;
tarteaucitron.userInterface.color(service.key, false);
} else if (!isResponded) {
tarteaucitron.cookie.create(service.key, 'wait');
if (typeof service.fallback === 'function') {
- service.fallback();
+ if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + service.key + "_") < 0) { service.fallback(); }
}
tarteaucitron.userInterface.color(service.key, 'wait');
tarteaucitron.userInterface.openAlert();
@@ -867,7 +867,7 @@ var tarteaucitron = {
tarteaucitron.pro('!' + key + '=engage');
tarteaucitron.launch[key] = true;
- tarteaucitron.services[key].js();
+ if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) { tarteaucitron.services[key].js(); }
tarteaucitron.sendEvent(key + '_loaded');
}
tarteaucitron.state[key] = status;
@@ -902,7 +902,7 @@ var tarteaucitron = {
tarteaucitron.launch[key] = true;
tarteaucitron.sendEvent(key + '_loaded');
- tarteaucitron.services[key].js();
+ if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) { tarteaucitron.services[key].js(); }
}
}
tarteaucitron.state[key] = status;
| 6 |
diff --git a/voice-endpoint-voicer.js b/voice-endpoint-voicer.js /* this module is responsible for mapping a remote TTS endpoint to the character. */
import Avatar from './avatars/avatars.js';
-// import {loadAudio} from './util.js';
+import {makePromise} from './util.js';
class VoiceEndpoint {
constructor(url) {
@@ -21,6 +21,7 @@ class VoiceEndpointVoicer {
this.player.avatar.setAudioEnabled(true);
+ const p = makePromise();
(async () => {
const u = new URL(this.voiceEndpoint.url.toString());
u.searchParams.set('s', text);
@@ -34,9 +35,21 @@ class VoiceEndpointVoicer {
const audioBufferSourceNode = audioContext.createBufferSource();
audioBufferSourceNode.buffer = audioBuffer;
+ audioBufferSourceNode.addEventListener('ended', () => {
+ this.cancel = null;
+ p.accept();
+ }, {once: true});
audioBufferSourceNode.connect(this.player.avatar.getAudioInput());
audioBufferSourceNode.start();
+
+ this.cancel = () => {
+ audioBufferSourceNode.stop();
+ audioBufferSourceNode.disconnect();
+
+ this.cancel = null;
+ };
})();
+ return p;
}
stop() {
this.live = false;
| 0 |
diff --git a/webaverse.js b/webaverse.js @@ -44,6 +44,7 @@ import WebaWallet from './src/components/wallet.js';
// import domRenderEngine from './dom-renderer.jsx';
import musicManager from './music-manager.js';
import story from './story.js';
+import zTargeting from './z-targeting.js';
import raycastManager from './raycast-manager.js';
const localVector = new THREE.Vector3();
@@ -82,6 +83,7 @@ export default class Webaverse extends EventTarget {
Avatar.waitForLoad(),
audioManager.waitForLoad(),
sounds.waitForLoad(),
+ zTargeting.waitForLoad(),
particleSystemManager.waitForLoad(),
transformControls.waitForLoad(),
metaverseModules.waitForLoad(),
| 0 |
diff --git a/src/components/auth/torus/AuthTorus.js b/src/components/auth/torus/AuthTorus.js @@ -97,8 +97,10 @@ const AuthTorus = ({ screenProps, navigation, styles }) => {
}
if (!torusUser.privateKey) {
- log.warn('Missing private key from torus response', { torusUser })
- throw new Error('Missing privateKey from torus response')
+ const e = new Error('Missing privateKey from torus response')
+
+ log.error('torus login failed', e.message, e, { torusUser, provider, curSeed, curMnemonic })
+ throw e
}
// set masterseed so wallet can use it in 'ready' where we check if user exists
| 0 |
diff --git a/test/stubs/.eleventyignore b/test/stubs/.eleventyignore ignoredFolder
-ignoredFolder/ignored.md
\ No newline at end of file
+./ignoredFolder/ignored.md
\ No newline at end of file
| 0 |
diff --git a/packages/2019-disaster-game/src/components/Game/DefaultScreen/index.js b/packages/2019-disaster-game/src/components/Game/DefaultScreen/index.js @@ -5,14 +5,7 @@ import { PropTypes } from "prop-types";
import { getActiveChapterData, goToNextChapter } from "../../../state/chapters";
import Timer from "../../../utils/timer";
-import Song from "../../atoms/Audio/Song";
-
-const DefaultScreen = ({
- activeChapter,
- endChapter,
- chapterDuration = 60,
- songFile
-}) => {
+const DefaultScreen = ({ activeChapter, endChapter, chapterDuration = 60 }) => {
const [chapterTimer] = useState(new Timer());
// start a timer for the _entire_ chapter
@@ -28,7 +21,6 @@ const DefaultScreen = ({
return (
<>
<h1>{activeChapter.title} screen</h1>
- {songFile && <Song songFile={songFile} />}
</>
);
};
@@ -38,8 +30,7 @@ DefaultScreen.propTypes = {
title: PropTypes.string
}),
endChapter: PropTypes.func,
- chapterDuration: PropTypes.number,
- songFile: PropTypes.node
+ chapterDuration: PropTypes.number
};
const mapStateToProps = state => ({
| 2 |
diff --git a/server/src/classes/reactor.js b/server/src/classes/reactor.js @@ -53,10 +53,14 @@ export default class Reactor extends HeatMixin(System) {
this.model = params.model || "reactor";
this.powerOutput = params.powerOutput || 120;
this.efficiency = params.efficiency || 1;
- this.externalPower = params.externalPower || true;
+ this.efficiencies = params.efficiencies || [...efficiencies];
+ this.externalPower = !this.efficiencies.find(
+ e => !e.efficiency && e.efficiency !== 0
+ )
+ ? false
+ : params.externalPower || true;
this.batteryChargeLevel = params.batteryChargeLevel || 1;
this.batteryChargeRate = params.batteryChargeRate || 1 / 1000;
- this.efficiencies = params.efficiencies || [...efficiencies];
this.depletion = params.depletion || 0;
if (this.model === "battery") {
this.heat = null;
| 1 |
diff --git a/lib/Client.js b/lib/Client.js @@ -1952,7 +1952,7 @@ class Client extends EventEmitter {
attachment_filename: query.attachmentFilename
}).then((results) => ({
totalResults: results.total_results,
- results: results.messages.map((result) => result.map((message) => new Message(message, this)))
+ results: results.messages && results.messages.map((result) => result.map((message) => new Message(message, this)))
}));
}
@@ -2008,7 +2008,7 @@ class Client extends EventEmitter {
channel_id: query.channelIDs
}).then((results) => ({
totalResults: results.total_results,
- results: results.messages.map((result) => result.map((message) => new Message(message, this)))
+ results: results.messages && results.messages.map((result) => result.map((message) => new Message(message, this)))
}));
}
}
| 9 |
diff --git a/tests/qunit/assets/js/util/index.js b/tests/qunit/assets/js/util/index.js @@ -24,7 +24,7 @@ googlesitekit.modules = {
QUnit.test( 'showErrorNotification!', function ( assert ) {
testFunctions.showErrorNotification();
var value = wp.hooks.applyFilters( 'googlesitekit.ErrorNotification', [] );
- assert.equal( value.toString().replace( /(\r\n|\n|\r)/gm, '' ), 'function InnerComponent(props) { return React.createElement(NewComponent, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, props, newProps, { OriginalComponent: OriginalComponent })); }' );
+ assert.equal( value.toString().replace( /(\r\n|\n|\r)/gm, '' ), 'function (r) {return React.createElement(e,a()({},r,t,{OriginalComponent:n}));}' );
} );
/**
| 13 |
diff --git a/app/templating/utils.js b/app/templating/utils.js @@ -19,6 +19,8 @@ export function getKeys (obj, prefix = '') {
const newPrefix = prefix ? `${prefix}.${key}` : key;
allKeys = [...allKeys, ...getKeys(obj[key], newPrefix)];
}
+ } else if (typeOfObj === '[object Function]') {
+ // Ignore functions
} else if (prefix) {
allKeys.push({name: prefix, value: obj});
}
| 8 |
diff --git a/src/config.js b/src/config.js @@ -167,7 +167,7 @@ exports.set = (override, skipValidation) => {
? feedsOverride.cycleMaxAge
: feeds.cycleMaxAge
feeds.defaultText = process.env.DRSS_FEEDS_DEFAULTTEXT !== undefined
- ? process.env.DRSS_FEEDS_DEFAULTTEXT.replace('\\n', '\n')
+ ? process.env.DRSS_FEEDS_DEFAULTTEXT.replace(/\\n/g, '\n')
: feedsOverride.defaultText || feeds.defaultText
feeds.imgPreviews = process.env.DRSS_FEEDS_IMGPREVIEWS !== undefined
? process.env.DRSS_FEEDS_IMGPREVIEWS === 'true'
| 1 |
diff --git a/source/views/controls/RichTextView.js b/source/views/controls/RichTextView.js @@ -111,8 +111,6 @@ const URLPickerView = Class({
start: 0,
end: this.get( 'value' ).length,
}).focus();
- // IE8 and Safari 6 don't fire this event for some reason.
- this._input.fire( 'focus' );
}
}.nextFrame().observes( 'isInDocument' ),
| 2 |
diff --git a/OurUmbraco.Site/Views/Master.cshtml b/OurUmbraco.Site/Views/Master.cshtml <link rel="alternate" type="application/rss+xml" title="Latest packages" href="//our.umbraco.com/rss/projects" />
<link rel="alternate" type="application/rss+xml" title="Package updates" href="//our.umbraco.com/rss/projectsupdate" />
<link rel="alternate" type="application/rss+xml" title="Active forum topics" href="//our.umbraco.com/rss/activetopics" />
- <link rel="alternate" type="application/rss+xml" title="Community blogs" href="//pipes.yahoo.com/pipes/pipe.run?_id=8llM7pvk3RGFfPy4pgt1Yg&_render=rss" />
<link rel="search" type="application/opensearchdescription+xml" title="our.umbraco.com" href="/scripts/OpenSearch.xml">
| 2 |
diff --git a/README.md b/README.md @@ -163,6 +163,16 @@ node CLI/polymath-cli module_manager
| ModuleRegistry: | [0x719287e2f1dfc7d953d0c1f05fdf27934d9c6f30](https://kovan.etherscan.io/address/0x719287e2f1dfc7d953d0c1f05fdf27934d9c6f30) |
| CappedSTOFactory: | [0x30e2c3fa3297808a2e9f176be6cc587cb76259c4](https://kovan.etherscan.io/address/0x30e2c3fa3297808a2e9f176be6cc587cb76259c4) |
+## Package version requirements for your machine:
+
+Homebrew v1.6.7
+node v9.11.1
+npm v5.6.0
+yarn v1.7.0
+Truffle v4.1.11 (core: 4.1.11)
+Solidity v0.4.24 (solc-js)
+Ganache CLI v6.1.3 (ganache-core: 2.1.2)
+
## Setup
The smart contracts are written in [Solidity](https://github.com/ethereum/solidity) and tested/deployed using [Truffle](https://github.com/trufflesuite/truffle) version 4.1.0. The new version of Truffle doesn't require testrpc to be installed separately so you can just run the following:
| 3 |
diff --git a/lib/utils.js b/lib/utils.js @@ -11,6 +11,7 @@ const inquirer = require('inquirer')
// Local dependencies
const config = require('../app/config.js')
+const { projectDir } = require('./path-utils')
// Are we running on Glitch.com?
const onGlitch = function () {
@@ -253,7 +254,7 @@ var storeData = function (input, data) {
// Get session default data from file
let sessionDataDefaults = {}
-const sessionDataDefaultsFile = path.join(__dirname, '/../app/data/session-data-defaults.js')
+const sessionDataDefaultsFile = path.join(projectDir, 'app', 'data', 'session-data-defaults.js')
try {
sessionDataDefaults = require(sessionDataDefaultsFile)
| 11 |
diff --git a/app/views/stats/cnc2017_stats.html.haml b/app/views/stats/cnc2017_stats.html.haml "aoColumns": [
{ "orderSequence": ["asc", "desc"] },
{ "orderSequence": ["desc", "asc"] },
+ { "orderSequence": ["desc", "asc"] },
{ "orderSequence": ["desc", "asc"] }
]
} )
| 1 |
diff --git a/Specs/Core/Matrix3Spec.js b/Specs/Core/Matrix3Spec.js @@ -149,14 +149,20 @@ defineSuite([
});
it('fromHeadingPitchRoll computed correctly', function() {
- var headingPitchRoll = new HeadingPitchRoll(-CesiumMath.PI_OVER_TWO, -CesiumMath.PI, CesiumMath.PI_OVER_TWO * 3);
- var expected = Matrix3.fromQuaternion(Quaternion.fromHeadingPitchRoll(headingPitchRoll));
+ // Expected generated via STK Components
+ var expected = new Matrix3(
+ 0.754406506735489, 0.418940943945763, 0.505330889696038,
+ 0.133022221559489, 0.656295369162553, -0.742685314912828,
+ -0.642787609686539, 0.627506871597133, 0.439385041770705);
+
+ var headingPitchRoll = new HeadingPitchRoll(-CesiumMath.toRadians(10), -CesiumMath.toRadians(40), CesiumMath.toRadians(55));
var result = new Matrix3();
var returnedResult = Matrix3.fromHeadingPitchRoll(headingPitchRoll, result);
expect(result).toBe(returnedResult);
expect(returnedResult).toEqualEpsilon(expected, CesiumMath.EPSILON15);
});
+
it('fromScale works without a result parameter', function() {
var expected = new Matrix3(
7.0, 0.0, 0.0,
| 3 |
diff --git a/src/components/CodeMirrorForm/index.js b/src/components/CodeMirrorForm/index.js @@ -87,6 +87,14 @@ class CodeMirrorForm extends PureComponent {
};
}
};
+ checkValue = (_, value, callback) => {
+ const { message } = this.props;
+ if (value === '' || !value || (value && value.trim() === '')) {
+ callback(message);
+ return;
+ }
+ callback();
+ };
render() {
const {
@@ -174,7 +182,7 @@ class CodeMirrorForm extends PureComponent {
>
{getFieldDecorator(name, {
initialValue: data || '',
- rules: [{ required: true, message }]
+ rules: [{ required: true, validator: this.checkValue }]
})(<CodeMirror options={options} ref={this.saveRef} />)}
{amplifications}
{isHeader && (
| 1 |
diff --git a/articles/connections/_quickstart-links.md b/articles/connections/_quickstart-links.md ## Next Steps
-Integrate Auth0 with your existing applications:
+Now that you have a working connection, the next step is to configure your application to use it. You can initiate login using [Lock](/libraries/lock), [Auth0.js](/libraries/auth0js), or the [Authentication API endpoint](/api/authentication#social).
+
+For detailed instructions and samples for a variety of technologies, refer to our [quickstarts](/quickstarts):
- Quickstarts for [Mobile / Native Apps](/quickstart/native)
- Quickstarts for [Single Page Apps](/quickstart/spa)
- Quickstarts for [Web Apps](/quickstart/webapp)
-For more information on client authentication refer to [Client Authentication](/client-auth).
\ No newline at end of file
+For more background information on client authentication refer to [Client Authentication](/client-auth).
| 0 |
diff --git a/test/retry.js b/test/retry.js @@ -57,5 +57,30 @@ describe('.retry(count)', function(){
});
});
+ it('should correctly abort a retry attempt', function(done) {
+ var aborted = false;
+ var req = request
+ .get(base + '/delay/200')
+ .timeout(100)
+ .retry(2)
+ .end(function(err, res){
+ try {
+ assert(false, 'should not complete the request');
+ } catch(e) { done(e); }
+ });
+
+ req.on('abort', function() {
+ aborted = true;
+ });
+
+ setTimeout(function() {
+ req.abort();
+ setTimeout(function() {
+ assert(aborted, 'should be aborted');
+ done();
+ }, 150)
+ }, 150);
+ });
+
it('should handle successful redirected request after repeat attempt from server error');
})
\ No newline at end of file
| 0 |
diff --git a/server.js b/server.js @@ -122,7 +122,7 @@ app.prepare().then(async () => {
// });
});
- server.get("/_/object/:id", async (req, res) => {
+ server.get("/_/view/:id", async (req, res) => {
let isMobile = Window.isMobileBrowser(req.headers["user-agent"]);
let isMac = Window.isMac(req.headers["user-agent"]);
| 10 |
diff --git a/js/models/km.js b/js/models/km.js @@ -110,7 +110,7 @@ function segmentedVals(column, data, index, samples, splits) {
uniq = _.without(_.uniq(avg), null, undefined),
colorfn = colorScale(color),
partFn = splits === 3 ? partitionedVals3 : partitionedVals2;
- return {warning, ...partFn(bySampleSortAvg, uniq, colorfn)};
+ return {warning, maySplit: true, ...partFn(bySampleSortAvg, uniq, colorfn)};
}
var toCoded = multi(fs => fs.valueType);
| 11 |
diff --git a/modules/@apostrophecms/area/ui/apos/components/AposAreaWidget.vue b/modules/@apostrophecms/area/ui/apos/components/AposAreaWidget.vue @@ -215,7 +215,7 @@ export default {
widgetLabel() {
return window.apos.modules[`${this.widget.type}-widget`].label;
},
- moduleOptions() {
+ areaOptions() {
return window.apos.area;
},
widgetId() {
@@ -395,13 +395,13 @@ export default {
},
widgetComponent(type) {
- return this.moduleOptions.components.widgets[type];
+ return this.areaOptions.components.widgets[type];
},
widgetEditorComponent(type) {
- return this.moduleOptions.components.widgetEditors[type];
+ return this.areaOptions.components.widgetEditors[type];
},
widgetIsContextual(type) {
- return this.moduleOptions.widgetIsContextual[type];
+ return this.areaOptions.widgetIsContextual[type];
}
}
};
| 10 |
diff --git a/generators/generator-constants.js b/generators/generator-constants.js @@ -29,7 +29,7 @@ const NODE_VERSION = '14.17.6';
const NPM_VERSION = commonPackageJson.devDependencies.npm;
const OPENAPI_GENERATOR_CLI_VERSION = '1.0.13-4.3.1';
-const GRADLE_VERSION = '7.0.2';
+const GRADLE_VERSION = '7.2';
const JIB_VERSION = '3.1.4';
// Libraries version
| 3 |
diff --git a/src/tests/controllers/transportToken.test.ts b/src/tests/controllers/transportToken.test.ts @@ -23,10 +23,45 @@ test.serial(
t.true(Array.isArray(nodes))
await iterate(nodes, async (node1, node2) => {
await checkContactsWithTransportToken(t, node1, node2)
+ await check1MinuteOldRequest(t, node1, node2)
})
}
)
+async function check1MinuteOldRequest(
+ t: ExecutionContext<Context>,
+ node1: NodeConfig,
+ node2: NodeConfig
+) {
+ const body = {
+ alias: `${node2.alias}`,
+ public_key: node2.pubkey,
+ status: 1,
+ route_hint: node2.routeHint || '',
+ }
+ const currentTime = new Date(Date.now() - 1 * 60001)
+ try {
+ await http.post(node1.external_ip + '/contacts', {
+ headers: {
+ 'x-transportToken': rsa.encrypt(
+ node1.transportToken,
+ `${node1.authToken}|${currentTime.toString()}`
+ ),
+ },
+ body,
+ })
+ } catch (error) {
+ t.true(
+ error.statusCode == 401,
+ 'node1 should have failed due to old transportToken and have 401 code'
+ )
+ t.true(
+ error.error == 'Invalid credentials',
+ 'node1 should have failed due to old and should have correct error'
+ )
+ }
+}
+
async function checkContactsWithTransportToken(
t: ExecutionContext<Context>,
node1: NodeConfig,
| 0 |
diff --git a/app_web/src/main.js b/app_web/src/main.js @@ -26,9 +26,9 @@ async function main()
const environmentPaths = fillEnvironmentWithPaths({
"footprint_court_512": "Foodprint Court (512p)",
"footprint_court": "Foodprint Court",
- "pisa": "Pisa courtyard nearing sunset, Italy",
- "doge2": "Courtyard of the Doge's palace",
- "ennis": "Dining room of the Ennis-Brown House",
+ "pisa": "Pisa",
+ "doge2": "Doge's palace",
+ "ennis": "Dining room",
"field": "Field",
"helipad": "Helipad Goldenhour",
"papermill": "Papermill Ruins",
| 10 |
diff --git a/config/locales/en.yml b/config/locales/en.yml @@ -3821,7 +3821,7 @@ en:
taxon_is_threatened_coordinates_hidden_desc: |
One of the taxa suggested in the identifications, or one of the taxa that
contain any of these taxa, is known to be rare and/or threatened, so the
- location of this observation has been obscured.
+ location of this observation has been hidden.
taxon_is_threatened_coordinates_obscured: Taxon is threatened, coordinates obscured by default
taxon_is_threatened_coordinates_obscured_desc: |
One of the taxa suggested in the identifications, or one of the taxa that
@@ -5322,8 +5322,8 @@ en:
iconic_taxon_name: Higher-level taxonomic category for the observed taxon
taxon_id: Unique identifier for the observed taxon
id_please: Whether or not the observer requested ID help
- num_identification_agreements: Number of identifications in concurrence with the observer's identiication
- num_identification_disagreements: Number of identifications conflicting with the observer's identiication
+ num_identification_agreements: Number of identifications in concurrence with the observer's identification
+ num_identification_disagreements: Number of identifications conflicting with the observer's identification
observed_on_string: Date/time as entered by the observer
observed_on: Normalized date of observation
time_observed_at: Normalized datetime of observation
@@ -5604,7 +5604,7 @@ en:
but your child will not be able to contribute observations to
iNaturalist. iNaturalist is a citizen-science social network where
participants share observations and identifications of living things
- to teach each others about nature and generate biodiversity data for
+ to teach each other about nature and generate biodiversity data for
science.
</p>
<p>
@@ -7192,10 +7192,10 @@ en:
value:
dna_only_atcg: "for DNA can only contain the characters A, T, C, or G"
date_format: |
- must by in the form YYYY-MM-DD for a date field ("%{observation_field_name}"
+ must be in the form YYYY-MM-DD for a date field ("%{observation_field_name}"
in your observation of "%{observation_species_guess}")
time_format: |
- must by in the form hh:mm for a time field ("%{observation_field_name}"
+ must be in the form hh:mm for a time field ("%{observation_field_name}"
in your observation of "%{observation_species_guess}")
observation_id:
user_does_not_accept_fields_from_others: user does not accept fields from others
| 1 |
diff --git a/token-metadata/0x03282f2D7834a97369Cad58f888aDa19EeC46ab6/metadata.json b/token-metadata/0x03282f2D7834a97369Cad58f888aDa19EeC46ab6/metadata.json "symbol": "GEX",
"address": "0x03282f2D7834a97369Cad58f888aDa19EeC46ab6",
"decimals": 8,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/NetworkConnection.js b/src/NetworkConnection.js var INetworkAdapter = require('./adapters/INetworkAdapter');
+var ReservedMessage = { Update: 'u', Remove: 'r' };
+
class NetworkConnection {
constructor(networkEntities) {
this.entities = networkEntities;
- this.setupDefaultDCSubs();
+ this.setupDefaultMessageSubs();
this.connectedClients = {};
this.activeMessageChannels = {};
@@ -17,11 +19,14 @@ class NetworkConnection {
this.adapter = adapter;
}
- setupDefaultDCSubs() {
- this.dcSubscribers = {
- 'u': this.entities.updateEntity.bind(this.entities),
- 'r': this.entities.removeRemoteEntity.bind(this.entities)
- };
+ setupDefaultMessageSubs() {
+ this.messageSubs = {};
+
+ this.messageSubs[ReservedMessage.Update]
+ = this.entities.updateEntity.bind(this.entities);
+
+ this.messageSubs[ReservedMessage.Remove]
+ = this.entities.removeRemoteEntity.bind(this.entities);
}
connect(serverUrl, appName, roomName, enableAudio = false) {
@@ -156,24 +161,29 @@ class NetworkConnection {
}
subscribeToDataChannel(dataType, callback) {
- if (dataType == 'u' || dataType == 'r') {
+ if (this.isReservedMessageType(dateType)) {
NAF.log.error('NetworkConnection@subscribeToDataChannel: ' + dataType + ' is a reserved dataType. Choose another');
return;
}
- this.dcSubscribers[dataType] = callback;
+ this.messageSubs[dataType] = callback;
}
unsubscribeFromDataChannel(dataType) {
- if (dataType == 'u' || dataType == 'r') {
+ if (this.isReservedMessageType(dateType)) {
NAF.log.error('NetworkConnection@unsubscribeFromDataChannel: ' + dataType + ' is a reserved dataType. Choose another');
return;
}
- delete this.dcSubscribers[dataType];
+ delete this.messageSubs[dataType];
+ }
+
+ isReservedMessageType(type) {
+ return type == ReservedMessage.Update
+ || type == ReservedMessage.Remove;
}
receiveMessage(fromClient, dataType, data) {
- if (this.dcSubscribers.hasOwnProperty(dataType)) {
- this.dcSubscribers[dataType](fromClient, dataType, data);
+ if (this.messageSubs.hasOwnProperty(dataType)) {
+ this.messageSubs[dataType](fromClient, dataType, data);
} else {
NAF.log.error('NetworkConnection@receiveMessage: ' + dataType + ' has not been subscribed to yet. Call subscribeToDataChannel()');
}
| 10 |
diff --git a/main.js b/main.js @@ -75,8 +75,13 @@ app.on("ready", function() {
console.log("no window size file")
createWindow(null, null, true)
} else {
+ try {
let sizeInfo = JSON.parse(data)
createWindow(sizeInfo.width, sizeInfo.height, sizeInfo.maximized)
+ } catch (e) {
+ console.log("no valid window size data")
+ createWindow(null, null, true)
+ }
}
})
})
| 1 |
diff --git a/packages/neutrine/src/core/field/index.js b/packages/neutrine/src/core/field/index.js @@ -6,16 +6,22 @@ import "@siimple/css/scss/form/field.scss";
//Form field component
export const Field = function (props) {
- return helpers.createMergedElement("div", props, "siimple-field");
+ return helpers.createMergedElement("div", props, {
+ "className": "siimple-field"
+ });
};
//Field label component
export const FieldLabel = function (props) {
- return helpers.createMergedElement("div", props, "siimple-field-label");
+ return helpers.createMergedElement("div", props, {
+ "className": "siimple-field-label"
+ });
};
//Field helper component
export const FieldHelper = function (props) {
- return helpers.createMergedElement("div", props, "siimple-field-helper");
+ return helpers.createMergedElement("div", props, {
+ "className": "siimple-field-helper"
+ });
};
| 1 |
diff --git a/OurUmbraco.Site/Views/ContentLanding.cshtml b/OurUmbraco.Site/Views/ContentLanding.cshtml @{
Layout = "~/Views/Master.cshtml";
}
-
<div id="contribute" class="subpage">
<div id="body" class="markdown-syntax">
<div>
@Html.Raw(Model.Content.GetPropertyValue<string>("bodyText"))
</div>
<div class="options">
- @Umbraco.RenderMacro("ContentLanding-Summary")
+ <div class="row projectGroups">
+ @foreach (var item in Model.Content.Children.Where(x => x.IsVisible()))
+ {
+ <div class="projectGroup col-md-6">
+ <div style="background-image: url('@(item.GetPropertyValue<string>("contentIcon"))">
+ <h3><a href="@item.Url">@item.Name</a></h3>
+ <p>@(item.GetPropertyValue<string>("abstract"))</p>
+ </div>
+ </div>
+ }
+ </div>
</div>
</div>
</div>
\ No newline at end of file
| 2 |
diff --git a/assets/js/googlesitekit-dashboard.js b/assets/js/googlesitekit-dashboard.js @@ -50,24 +50,24 @@ class GoogleSitekitDashboard extends Component {
setLocaleData( googlesitekit.locale, 'google-site-kit' );
}
- componentDidCatch() {
+ componentDidCatch( error, info ) {
// eslint-disable-next-line no-console
console.log( 'componentDidCatch', arguments );
- // this.setState( {
- // hasError: true,
- // error,
- // info,
- // } );
+ this.setState( {
+ hasError: true,
+ error,
+ info,
+ } );
}
- static getDerivedStateFromError( error ) {
+ static getDerivedStateFromError() {
// eslint-disable-next-line no-console
console.log( 'getDerivedStateFromError', arguments );
// Update state so the next render will show the fallback UI.
- return {
- hasError: true,
- error,
- };
+ // return {
+ // hasError: true,
+ // error,
+ // };
}
render() {
@@ -78,6 +78,7 @@ class GoogleSitekitDashboard extends Component {
const {
hasError,
error,
+ info,
} = this.state;
if ( hasError ) {
@@ -85,7 +86,7 @@ class GoogleSitekitDashboard extends Component {
id={ 'googlesitekit-error' }
key={ 'googlesitekit-error' }
title={ error.message }
- description={ error.stack }
+ description={ info.componentStack }
dismiss={ '' }
isDismissable={ false }
format="small"
| 12 |
diff --git a/package.json b/package.json },
"dependencies": {
"@serverless/fdk": "^0.5.1",
- "@serverless/platform-sdk": "file:../platform-sdk",
+ "@serverless/platform-sdk": "^0.0.5",
"archiver": "^1.1.0",
"async": "^1.5.2",
"aws-sdk": "^2.228.0",
| 4 |
diff --git a/assets/js/googlesitekit/widgets/index.js b/assets/js/googlesitekit/widgets/index.js @@ -43,12 +43,6 @@ export function createWidgets( registry ) {
const { dispatch, select } = registry;
const Widgets = {
- /**
- * @since n.e.x.t
- * @private
- */
- registry,
-
/**
* Supported styles for Site Kit widget areas.
*
| 2 |
diff --git a/edit.js b/edit.js @@ -319,7 +319,7 @@ const [
}
});
});
- w.requestLoadPotentials = (seed, meshId, x, y, z, baseHeight, freqs, octaves, scales, uvs, amps, potentials, parcelSize, subparcelSize) => {
+ w.requestLoadPotentials = (seed, meshId, x, y, z, baseHeight, freqs, octaves, scales, uvs, amps, potentials, force, parcelSize, subparcelSize) => {
return w.request({
method: 'loadPotentials',
seed,
@@ -334,6 +334,7 @@ const [
uvs,
amps,
potentials,
+ force,
parcelSize,
subparcelSize
});
@@ -779,7 +780,9 @@ const _makeChunkMesh = (seedString, parcelSize, subparcelSize) => {
let chunksNeedUpdate = false;
let buildMeshesNeedUpdate = false;
let packagesNeedUpdate = false;
- mesh.updateChunks = () => {
+ let subparcelsNeedUpdate = [];
+ mesh.updateSlab = (x, y, z) => {
+ subparcelsNeedUpdate.push([x, y, z]);
chunksNeedUpdate = true;
};
mesh.updateBuildMeshes = () => {
@@ -820,33 +823,13 @@ const _makeChunkMesh = (seedString, parcelSize, subparcelSize) => {
marchesRunning = true;
chunksNeedUpdate = false;
- slabs = slabs.filter(slab => {
- if (neededCoords.some(nc => nc.x === slab.x && nc.y === slab.y && nc.z === slab.z)) {
- return true;
- } else {
- const groupIndex = geometry.groups.findIndex(group => group.start === slab.slabIndex * slabSliceVertices);
- geometry.groups.splice(groupIndex, 1);
- freeSlabs.push(slab);
- physicsWorker && physicsWorker.requestUnloadSlab(meshId, slab.x, slab.y, slab.z);
- return false;
- }
- });
- for (let i = 0; i < neededCoords.length; i++) {
- const {x: ax, y: ay, z: az} = neededCoords[i];
-
- for (let dx = 0; dx <= 1; dx++) {
- const adx = ax + dx;
- for (let dy = 0; dy <= 1; dy++) {
- const ady = ay + dy;
- for (let dz = 0; dz <= 1; dz++) {
- const adz = az + dz;
- const subparcel = planet.getSubparcel(adx, ady, adz);
- if (!subparcel[loadedSymbol]) {
- const {potentials} = subparcel;
+ const _loadSubparcel = (x, y, z, potentials, force) => {
chunkWorker.requestLoadPotentials(
seedNum,
meshId,
- adx, ady, adz,
+ x,
+ y,
+ z,
parcelSize/2-10,
[
1,
@@ -870,16 +853,46 @@ const _makeChunkMesh = (seedString, parcelSize, subparcelSize) => {
4,
],
potentials,
+ force,
parcelSize,
subparcelSize
);
+ };
+ slabs = slabs.filter(slab => {
+ if (neededCoords.some(nc => nc.x === slab.x && nc.y === slab.y && nc.z === slab.z)) {
+ return true;
+ } else {
+ const groupIndex = geometry.groups.findIndex(group => group.start === slab.slabIndex * slabSliceVertices);
+ geometry.groups.splice(groupIndex, 1);
+ freeSlabs.push(slab);
+ physicsWorker && physicsWorker.requestUnloadSlab(meshId, slab.x, slab.y, slab.z);
+ return false;
+ }
+ });
+ for (let i = 0; i < neededCoords.length; i++) {
+ const {x: ax, y: ay, z: az} = neededCoords[i];
+
+ for (let dx = 0; dx <= 1; dx++) {
+ const adx = ax + dx;
+ for (let dy = 0; dy <= 1; dy++) {
+ const ady = ay + dy;
+ for (let dz = 0; dz <= 1; dz++) {
+ const adz = az + dz;
+ const subparcel = planet.getSubparcel(adx, ady, adz);
+ if (!subparcel[loadedSymbol]) {
+ _loadSubparcel(adx, ady, adz, subparcel.potentials, false);
subparcel[loadedSymbol] = true;
+ } else if (subparcelsNeedUpdate.some(([x, y, z]) => x === adx && y === ady && z === adz)) {
+ _loadSubparcel(adx, ady, adz, subparcel.potentials, true);
}
}
}
}
- if (!slabs.some(slab => slab.x === ax && slab.y === ay && slab.z === az)) {
+ if (
+ !slabs.some(slab => slab.x === ax && slab.y === ay && slab.z === az) ||
+ subparcelsNeedUpdate.some(([x, y, z]) => x === ax && y === ay && z === az)
+ ) {
const specs = await chunkWorker.requestMarchLand(
seedNum,
meshId,
@@ -910,6 +923,8 @@ const _makeChunkMesh = (seedString, parcelSize, subparcelSize) => {
}
}
+ subparcelsNeedUpdate.length = 0;
+
lastCoord.copy(coord);
marchesRunning = false;
@@ -1256,7 +1271,7 @@ planet.addEventListener('unload', () => {
});
planet.addEventListener('subparcelupdate', e => {
const {data: subparcel} = e;
- currentChunkMesh.updateChunks();
+ currentChunkMesh.updateSlab(subparcel.x, subparcel.y, subparcel.z);
currentChunkMesh.updateBuildMeshes();
currentChunkMesh.updatePackages();
});
| 0 |
diff --git a/types/getstream/testsGetstream.ts b/types/getstream/testsGetstream.ts new stream.Client('key', undefined, 'apiSecret');
+// prettier-ignore
stream.connect('abc', 'def', 'ghi'); // $ExpectType StreamClient
+// prettier-ignore
const client = stream.connect('abc', 'def', 'ghi');
client.feed('feedSlug', 'user'); // $ExpectType Feed
| 8 |
diff --git a/activities/VideoViewer.activity/util.js b/activities/VideoViewer.activity/util.js @@ -35,6 +35,8 @@ Util.loadContext = function(callback, loaded) {
if (context) {
Util.context = context;
app.loadDatabase();
+ } else {
+ app.loadLibraries();
}
callback();
});
| 9 |
diff --git a/test/schema_validation.js b/test/schema_validation.js @@ -10,6 +10,7 @@ testSchemaItself(ajv.compile(schema));
const nonStringValues = [null, 17, {}, [], true];
const nonBooleanValues = [null, 17, {}, [], 'string'];
+const nonObjectValues = [null, 17, [], true, 'string'];
// this function instructs Ajv on how to load remote sources
function loadSchema(uri) {
@@ -111,22 +112,6 @@ function testSchemaItself(validate) {
});
- test.test('coverage missing country should fail', (t) => {
- const source = {
- coverage: {
- },
- type: 'http',
- data: 'http://xyz.com/'
- };
-
- const valid = validate(source);
-
- t.notOk(valid, 'coverage missing country should fail');
- t.ok(isMissingPropertyError(validate, '.coverage', 'country'), JSON.stringify(validate.errors));
- t.end();
-
- });
-
test.test('unknown field should fail', (t) => {
const source = {
coverage: {
@@ -603,6 +588,59 @@ function testSchemaItself(validate) {
});
+ tape('coverage tests', test => {
+ test.test('missing coverage property should fail', t => {
+ const source = {
+ type: 'ESRI',
+ data: 'http://xyz.com/',
+ };
+
+ const valid = validate(source);
+
+ t.notOk(valid, 'missing coverage property should fail');
+ t.ok(isMissingPropertyError(validate, '', 'coverage'), JSON.stringify(validate.errors));
+ t.end();
+
+ });
+
+ test.test('non-object coverage should fail', t => {
+ nonObjectValues.forEach(value => {
+ const source = {
+ coverage: value,
+ type: 'http',
+ data: 'http://xyz.com/'
+ };
+
+ const valid = validate(source);
+
+ t.notOk(valid, 'non-object coverage should fail');
+ t.ok(isTypeError(validate, '.coverage'), JSON.stringify(validate.errors));
+
+ });
+
+ t.end();
+
+ });
+
+ test.test('missing country should fail', t => {
+ const source = {
+ coverage: {
+ },
+ type: 'http',
+ data: 'http://xyz.com/'
+ };
+
+ const valid = validate(source);
+
+ t.notOk(valid, 'coverage missing country should fail');
+ t.ok(isMissingPropertyError(validate, '.coverage', 'country'), JSON.stringify(validate.errors));
+ t.end();
+
+ });
+
+
+ });
+
tape('prefixed_number function tests', test => {
test.test('missing field property should fail', t => {
const source = {
| 5 |
diff --git a/.eslintrc.js b/.eslintrc.js @@ -37,12 +37,7 @@ module.exports = {
"dashboard/static/js/libs/foundation.min.js",
"dashboard/static/js/libs/backbone.js",
"dashboard/static/js/events.js",
- "dashboard/apps/previewer.fma/js/three.js",
- "dashboard/apps/job_manager.fma/js/moment.js",
- "dashboard/apps/job_manager.fma/js/Sortable.js",
- "dashboard/apps/home.fma/js/Sortable.js",
- "dashboard/apps/editor.fma/js/codemirror.js",
- "dashboard/apps/editor.fma/js/cm-addon/**",
+ "dashboard/apps/",
],
overrides: [
{
| 8 |
diff --git a/login.js b/login.js @@ -4,9 +4,9 @@ const loginEndpoint = 'https://login.exokit.org';
const usersEndpoint = 'https://users.exokit.org';
let loginToken = null;
-async function updateLoginToken() {
+let userObject = null;
+async function pullUserObject() {
const res = await fetch(`${usersEndpoint}/${loginToken.name}`);
- let userObject;
if (res.ok) {
userObject = await res.json();
} else if (res.status === 404) {
@@ -17,7 +17,19 @@ async function updateLoginToken() {
} else {
throw new Error(`invalid status code: ${res.status}`);
}
-
+}
+async function pushUserObject() {
+ const res = await fetch(`${usersEndpoint}/${loginToken.name}`, {
+ method: 'PUT',
+ body: JSON.stringify(userObject),
+ });
+ if (res.ok) {
+ // nothing
+ } else {
+ throw new Error(`invalid status code: ${res.status}`);
+ }
+}
+function updateUserObject() {
const loginEmailStatic = document.getElementById('login-email-static');
const userName = document.getElementById('user-name');
const avatarName = document.getElementById('avatar-name');
@@ -42,7 +54,8 @@ async function doLogin(email, code) {
loginForm.classList.remove('phase-2');
loginForm.classList.add('phase-3');
- await updateLoginToken();
+ await pullUserObject();
+ updateUserObject();
return true;
} else {
@@ -117,7 +130,8 @@ async function tryLogin() {
e.stopPropagation();
});
if (loginToken) {
- await updateLoginToken();
+ await pullUserObject();
+ updateUserObject();
// document.body.classList.add('logged-in');
loginForm.classList.add('phase-3');
@@ -162,7 +176,28 @@ async function tryLogin() {
});
}
+class LoginManager extends EventTarget {
+ constructor() {
+ super();
+ }
+ isLoggedIn() {
+ return !!userObject;
+ }
+ async setUsername(name) {
+ userObject.name = name;
+ await pushUserObject();
+ updateUserObject();
+ }
+ async setAvatar(avatarHash) {
+ userObject.avatarHash = avatarHash;
+ await pushUserObject();
+ updateUserObject();
+ }
+}
+const loginManager = new LoginManager();
+
export {
doLogin,
tryLogin,
+ loginManager,
};
\ No newline at end of file
| 0 |
diff --git a/edit.js b/edit.js @@ -283,7 +283,7 @@ scene.add(worldContainer);
const chunkMeshContainer = new THREE.Object3D();
worldContainer.add(chunkMeshContainer);
let currentChunkMesh = null;
-let capsuleMesh = null;
+// let capsuleMesh = null;
let currentVegetationMesh = null;
let currentVegetationTransparentMesh = null;
const _getCurrentChunkMesh = () => currentChunkMesh;
@@ -2237,7 +2237,7 @@ planet.addEventListener('load', e => {
chunkMeshes.push(chunkMesh);
_setCurrentChunkMesh(chunkMesh);
- {
+ /* {
let geometry = new CapsuleGeometry(0.5, 1, 16)
.applyMatrix4(new THREE.Matrix4().makeRotationFromQuaternion(new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(1, 0, 0), Math.PI/2)))
// .applyMatrix4(new THREE.Matrix4().makeTranslation(0, 0.5/2+0.5, 0))
@@ -2248,7 +2248,7 @@ planet.addEventListener('load', e => {
});
capsuleMesh = new THREE.Mesh(geometry, material);
scene.add(capsuleMesh);
- }
+ } */
_resetCamera();
});
@@ -3280,13 +3280,13 @@ function animate(timestamp, frame) {
skybox2.update();
}
- if (physxWorker && capsuleMesh) {
+ /* if (physxWorker && capsuleMesh) {
capsuleMesh.position.set(-8, -11+Math.sin((Date.now()%10000)/10000*Math.PI*2)*2, 8);
const collision = physxWorker.collide(0.5, 0.5, capsuleMesh.position, capsuleMesh.quaternion, 4);
if (collision) {
capsuleMesh.position.add(localVector.fromArray(collision.direction));
}
- }
+ } */
const now = Date.now();
for (const chunkMesh of chunkMeshes) {
| 2 |
diff --git a/core/mutator.js b/core/mutator.js @@ -275,7 +275,7 @@ Blockly.Mutator.prototype.setVisible = function(visible) {
this.rootBlock_.setDeletable(false);
if (this.workspace_.flyout_) {
var margin = this.workspace_.flyout_.CORNER_RADIUS * 2;
- var x = this.workspace_.getFlyout_().getWidth() + margin;
+ var x = this.workspace_.getFlyout().getWidth() + margin;
} else {
var margin = 16;
var x = margin;
@@ -394,10 +394,10 @@ Blockly.Mutator.prototype.workspaceChanged_ = function(e) {
Blockly.Mutator.prototype.getFlyoutMetrics_ = function() {
return {
viewHeight: this.workspaceHeight_,
- viewWidth: this.workspaceWidth_ - this.workspace_.getFlyout_().getWidth(),
+ viewWidth: this.workspaceWidth_ - this.workspace_.getFlyout().getWidth(),
absoluteTop: 0,
absoluteLeft: this.workspace_.RTL ? 0 :
- this.workspace_.getFlyout_().getWidth()
+ this.workspace_.getFlyout().getWidth()
};
};
| 3 |
diff --git a/README.md b/README.md @@ -37,10 +37,14 @@ Get launch site information
GET https://api.spacexdata.com/sites
```
## Launch information by dates
-Get all past launches
+Get all launches
```http
GET https://api.spacexdata.com/launches
```
+Get all future launches
+```http
+GET https://api.spacexdata.com/launches/upcoming
+```
Get past launches by year
```http
GET https://api.spacexdata.com/launches/year=2017
@@ -84,32 +88,33 @@ GET https://api.spacexdata.com/parts/core=B1021
```json
{
- "flight_number": 38,
- "launch_year": 2017,
- "launch_date": "2017-03-30",
- "time_utc": "22:27",
- "time_local": "",
+ "flight_number": 42,
+ "launch_year": "2017",
+ "launch_date": "2017-06-23",
+ "time_utc": "19:10",
+ "time_local": "03:10 pm EDT",
"rocket": "Falcon 9",
"rocket_type": "FT",
- "core_serial": "B1021",
+ "core_serial": "B1029",
"cap_serial": "",
"launch_site": "KSC LC39A",
- "payload_1": "SES-10",
+ "payload_1": "BulgariaSat-1",
"payload_2": "",
"payload_type": "Satelite",
- "payload_mass_kg": "5300",
- "payload_mass_lbs": "11700",
+ "payload_mass_kg": 3669,
+ "payload_mass_lbs": 8089,
"orbit": "GTO",
- "customer_1": "SES",
+ "customer_1": "Bulgaria Sat",
"customer_2": "",
"launch_success": "Success",
- "reused": "FALSE",
+ "reused": "TRUE",
"land_success": "Success",
"landing_type": "ASDS",
- "article_link": "https://en.wikipedia.org/wiki/SES-10",
- "video_link": "https://www.youtube.com/watch?v=xsZSXav4wI8",
- "details": "First payload to fly on a reused first stage, B1021, previously launched with CRS-8, which also landed a second time. In what is also a first, the payload fairing remained intact after a successful splashdown achieved with thrusters and a steerable parachute."
-}
+ "mission_patch": "http://i.imgur.com/VAvulaO.png",
+ "article_link": "https://en.wikipedia.org/wiki/BulgariaSat-1",
+ "video_link": "https://www.youtube.com/watch?v=Y8mLi-rRTh8",
+ "details": "Second time a booster will be reused: Second flight of B1029 after the Iridium mission of January 2017. The satellite will be the first commercial Bulgarian-owned communications satellite and it will provide television broadcasts and other communications services over southeast Europe."
+},
```
<br></br>
| 3 |
diff --git a/converters/fromZigbee.js b/converters/fromZigbee.js @@ -871,14 +871,14 @@ const converters = {
return {click: 'off'};
},
},
- E1743_brightness_up: {
+ E1743_brightness_down: {
cluster: 'genLevelCtrl',
type: 'commandMove',
convert: (model, msg, publish, options, meta) => {
return {click: 'brightness_down'};
},
},
- E1743_brightness_down: {
+ E1743_brightness_up: {
cluster: 'genLevelCtrl',
type: 'commandMoveWithOnOff',
convert: (model, msg, publish, options, meta) => {
| 10 |
diff --git a/src/govuk/components/accordion/accordion.test.js b/src/govuk/components/accordion/accordion.test.js @@ -173,7 +173,7 @@ describe('/components/accordion', () => {
})
describe('hidden comma', () => {
- it('should contain hidden comma " ," after the heading text for assistive technology', async () => {
+ it('should contain hidden comma " ," after the heading text for when CSS does not load', async () => {
await goToComponent(page, 'accordion')
const commaAfterHeadingTextClassName = await page.evaluate(() => document.body.querySelector('.govuk-accordion__section-heading-text').nextElementSibling.className)
@@ -185,7 +185,7 @@ describe('/components/accordion', () => {
expect(commaAfterHeadingTextContent).toEqual(', ')
})
- it('should contain hidden comma " ," after the summary line for assistive technology', async () => {
+ it('should contain hidden comma " ," after the summary line for when CSS does not load', async () => {
await goToComponent(page, 'accordion', {
exampleName: 'with-additional-descriptions'
})
@@ -244,14 +244,39 @@ describe('/components/accordion', () => {
expect(dataNoSnippetAttribute).toEqual('')
})
- describe('hidden text', () => {
- it('should contain hidden text " this section" for assistive technology', async () => {
+ describe('accessible name', () => {
+ it('Should set the accessible name of the show/hide section buttons', async () => {
await goToComponent(page, 'accordion')
- const numberOfExampleSections = 2
- const hiddenText = await page.evaluate(() => document.body.querySelectorAll('.govuk-accordion .govuk-accordion__section .govuk-accordion__section-toggle-text .govuk-visually-hidden').length)
+ const node = await page.$(
+ 'aria/Section A , Show this section[role="button"]'
+ )
+ expect(node).not.toBeNull()
+
+ await node.click()
+
+ const updatedNode = await page.$(
+ 'aria/Section A , Hide this section[role="button"]'
+ )
+ expect(updatedNode).not.toBeNull()
+ })
+
+ it('Includes the heading summary', async () => {
+ await goToComponent(page, 'accordion', {
+ exampleName: 'with-additional-descriptions'
+ })
- expect(hiddenText).toEqual(numberOfExampleSections)
+ const node = await page.$(
+ 'aria/Test , Additional description , Show this section[role="button"]'
+ )
+ expect(node).not.toBeNull()
+
+ await node.click()
+
+ const updatedNode = await page.$(
+ 'aria/Test , Additional description , Hide this section[role="button"]'
+ )
+ expect(updatedNode).not.toBeNull()
})
})
| 14 |
diff --git a/src/services/milestones/getApprovedKeys.js b/src/services/milestones/getApprovedKeys.js @@ -106,7 +106,7 @@ const getApprovedKeys = (milestone, data, user) => {
}
logger.info(`Marking milestone as complete. Milestone id: ${milestone._id}`);
- return ['status', 'mined', 'message', 'proofItems'];
+ return ['txHash', 'status', 'mined', 'message', 'proofItems'];
}
// Cancel milestone by Campaign or Milestone Reviewer
| 11 |
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/popover.js @@ -278,6 +278,7 @@ RED.popover = (function() {
var closeCallback = options.onclose;
var target = options.target;
var align = options.align || "left";
+ var offset = options.offset || [0,0];
var pos = target.offset();
var targetWidth = target.width();
@@ -285,7 +286,7 @@ RED.popover = (function() {
var panelHeight = panel.height();
var panelWidth = panel.width();
- var top = (targetHeight+pos.top);
+ var top = (targetHeight+pos.top) + offset[1];
if (top+panelHeight > $(window).height()) {
top -= (top+panelHeight)-$(window).height() + 5;
}
@@ -296,12 +297,12 @@ RED.popover = (function() {
if (align === "left") {
panel.css({
top: top+"px",
- left: (pos.left)+"px",
+ left: (pos.left+offset[0])+"px",
});
} else if(align === "right") {
panel.css({
top: top+"px",
- left: (pos.left-panelWidth)+"px",
+ left: (pos.left-panelWidth+offset[0])+"px",
});
}
panel.slideDown(100);
| 11 |
diff --git a/packages/vulcan-core/lib/modules/components/App.jsx b/packages/vulcan-core/lib/modules/components/App.jsx @@ -6,6 +6,7 @@ import withCurrentUser from '../containers/withCurrentUser.js';
import withEdit from '../containers/withEdit.js';
import { withApollo } from 'react-apollo';
import { withCookies } from 'react-cookie';
+import moment from 'moment';
class App extends PureComponent {
constructor(props) {
@@ -13,9 +14,9 @@ class App extends PureComponent {
if (props.currentUser) {
runCallbacks('events.identify', props.currentUser);
}
- this.state = {
- locale: this.initLocale(),
- };
+ const locale = this.initLocale();
+ this.state = { locale };
+ moment.locale(locale);
}
initLocale = () => {
@@ -52,6 +53,7 @@ class App extends PureComponent {
if (this.props.currentUser) {
await this.props.editMutation({ documentId: this.props.currentUser._id, set: { locale }});
}
+ moment.locale(locale);
this.props.client.resetStore()
};
| 12 |
diff --git a/ChatImprovements.user.js b/ChatImprovements.user.js // @description New responsive userlist with usernames and total count, more timestamps, use small signatures only, mods with diamonds, message parser (smart links), timestamps on every message, collapse room description and room tags, mobile improvements, expand starred messages on hover, highlight occurances of same user link, room owner changelog, pretty print styles, and more...
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 2.10
+// @version 2.10.1
//
// @include https://chat.stackoverflow.com/*
// @include https://chat.stackexchange.com/*
@@ -1562,7 +1562,6 @@ html.fixed-header body.with-footer main {
}
#input-area {
height: 100px;
- background-color: #eee;
}
#input {
height: 88px;
| 2 |
diff --git a/website/css/components/_base.scss b/website/css/components/_base.scss @@ -179,28 +179,50 @@ a {
.tippy-tooltip.light-border-theme {
background: white;
- border: 1px solid rgba(0, 8, 16, 0.18);
+ border: 1px solid rgba(0, 8, 16, 0.15);
color: #333;
-}
+ box-shadow: 0 3px 14px -0.5px rgba(0, 8, 16, 0.1);
-.tippy-popper[x-placement^='top']
- .tippy-tooltip.light-border-theme
.tippy-arrow {
- border-top: 8px solid #fff;
- border-right: 8px solid transparent;
- border-left: 8px solid transparent;
transform-style: preserve-3d;
&::after {
content: '';
position: absolute;
- top: -7px;
left: -8px;
- border-top: 8px solid rgba(0, 8, 16, 0.25);
- border-right: 8px solid transparent;
- border-left: 8px solid transparent;
transform: translateZ(-1px);
+ border-left: 8px solid transparent;
+ border-right: 8px solid transparent;
+ }
+ }
+}
+
+.tippy-popper[x-placement^='top']
+ .tippy-tooltip.light-border-theme
+ .tippy-arrow {
+ border-top-color: #fff;
+
+ &::after {
+ top: -7px;
+ border-top: 8px solid rgba(0, 8, 16, 0.15);
+ }
}
+
+.tippy-popper[x-placement^='bottom']
+ .tippy-tooltip.light-border-theme
+ .tippy-arrow {
+ border-bottom-color: #fff;
+
+ &::after {
+ bottom: -7px;
+ border-bottom: 8px solid rgba(0, 8, 16, 0.15);
+ }
+}
+
+.tippy-list {
+ padding-left: 0;
+ list-style-type: none;
+ text-align: left;
}
@media (min-width: 768px) {
| 7 |
diff --git a/app/models/street/StreetEdgeTable.scala b/app/models/street/StreetEdgeTable.scala @@ -147,7 +147,7 @@ object StreetEdgeTable {
* @return
*/
def auditedStreetDistance(auditCount: Int, userType: String = "All", highQualityOnly: Boolean = false): Float = db.withSession { implicit session =>
- val cacheKey = s"auditedStreetDistance($auditCount, $userType)"
+ val cacheKey = s"auditedStreetDistance($auditCount, $userType, $highQualityOnly)"
Cache.getOrElse(cacheKey, 30.minutes.toSeconds.toInt) {
val auditTaskQuery = userType match {
@@ -179,8 +179,6 @@ object StreetEdgeTable {
case (edge, group) => (edge.geom.transform(26918).length, group.length)
}
- println(edgesWithAuditCounts.length.run)
-
// Get length of each street segment, sum the lengths, and convert from meters to miles.
edgesWithAuditCounts.filter(_._2 >= auditCount).map(_._1).sum.run.map(_ * 0.000621371F).getOrElse(0.0F)
}
| 3 |
diff --git a/src/js/components/Markdown/markdown.stories.js b/src/js/components/Markdown/markdown.stories.js @@ -4,19 +4,20 @@ import { storiesOf } from '@storybook/react';
import Markdown from '../Markdown/Markdown';
import Grommet from '../Grommet/Grommet';
-class SimpleMarkdown extends Component {
- render() {
- return (
- <Grommet>
- <Markdown>{`
+const CONTENT = `
# Out of Breath
You know, sometimes in life it seems like there's no way out. Like
a sheep trapped in a maze designed by wolves.
[reference](#)
- `}
- </Markdown>
+`;
+
+class SimpleMarkdown extends Component {
+ render() {
+ return (
+ <Grommet>
+ <Markdown>{CONTENT}</Markdown>
</Grommet>
);
}
| 1 |
diff --git a/lib/router/with-router.js b/lib/router/with-router.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
import hoistStatics from 'hoist-non-react-statics'
import { getDisplayName } from '../utils'
-export default function withRoute (ComposedComponent) {
+export default function withRouter (ComposedComponent) {
const displayName = getDisplayName(ComposedComponent)
class WithRouteWrapper extends Component {
| 10 |
diff --git a/assets/js/modules/tagmanager/datastore/containers.js b/assets/js/modules/tagmanager/datastore/containers.js @@ -53,7 +53,7 @@ const fetchGetContainersStore = createFetchStore( {
...state,
containers: {
...state.containers,
- [ accountID ]: [ ...containers ],
+ [ accountID ]: containers,
},
};
},
| 2 |
diff --git a/shaders.js b/shaders.js @@ -1783,6 +1783,50 @@ const arrowMaterial = new THREE.ShaderMaterial({
// transparent: true,
});
+const glowMaterial = new THREE.ShaderMaterial({
+ uniforms: {
+ uTime: {
+ type: 'f',
+ value: 0,
+ needsUpdate: true,
+ },
+ },
+ vertexShader: `\
+ precision highp float;
+ precision highp int;
+
+ attribute vec3 color;
+
+ varying vec2 vUv;
+ varying vec3 vColor;
+
+ void main() {
+ vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);
+ gl_Position = projectionMatrix * mvPosition;
+
+ vUv = uv;
+ vColor = color;
+ }
+ `,
+ fragmentShader: `\
+ precision highp float;
+ precision highp int;
+
+ uniform float uTime;
+
+ varying vec2 vUv;
+ varying vec3 vColor;
+
+ void main() {
+ gl_FragColor = vec4(vColor, 1. - vUv.y);
+ }
+ `,
+ transparent: true,
+ polygonOffset: true,
+ polygonOffsetFactor: -1,
+ // polygonOffsetUnits: 1,
+});
+
const copyScenePlaneGeometry = new THREE.PlaneGeometry(2, 2);
const copySceneVertexShader = `#version 300 es
precision highp float;
@@ -1845,6 +1889,7 @@ export {
portalMaterial,
arrowGeometry,
arrowMaterial,
+ glowMaterial,
copyScenePlaneGeometry,
copySceneVertexShader,
copyScene,
| 0 |
diff --git a/src/trumbowyg.js b/src/trumbowyg.js @@ -14,7 +14,7 @@ jQuery.trumbowyg = {
bold: 'Bold',
italic: 'Italic',
- strikethrough: 'Stroke',
+ strikethrough: 'Strikethrough',
underline: 'Underline',
strong: 'Strong',
| 10 |
diff --git a/src/drivers/npm/driver.js b/src/drivers/npm/driver.js @@ -684,11 +684,12 @@ class Site {
if (headers.location) {
const _url = new URL(headers.location.slice(-1), url)
+ const redirects = Object.keys(this.analyzedUrls).length - 1
+
if (
_url.hostname.replace(/^www\./, '') ===
this.originalUrl.hostname.replace(/^www\./, '') ||
- (Object.keys(this.analyzedUrls).length === 1 &&
- !this.options.noRedirect)
+ (redirects < 3 && !this.options.noRedirect)
) {
url = _url
| 11 |
diff --git a/app/views/pageflow/pages/_page.html.erb b/app/views/pageflow/pages/_page.html.erb <%= cache page do %>
- <%= content_tag :section, :id => page.perma_id, :class => page_css_class(page), :data => {:template => page.template, :id => page.id, :chapter_id => page.chapter_id} do %>
- <%= render_page_template(page, entry: entry) %>
- <a class="to_top" href="#content"><%= t('pageflow.public.goto_top') %></a>
+ <%= content_tag(:section,
+ id: page.perma_id,
+ class: page_css_class(page),
+ data: {
+ template: page.template,
+ id: page.id, chapter_id: page.chapter_id
+ }) do -%>
+ <% concat(render_page_template(page, entry: entry)) -%>
<% end %>
+ <a class="to_top" href="#content"><%= t('pageflow.public.goto_top') %></a>
<% end %>
| 5 |
diff --git a/src/config.js b/src/config.js const fs = require('fs')
const path = require('path')
+const moment = require('moment-timezone')
const configPath = path.join(__dirname, 'config.json')
const config = JSON.parse(fs.readFileSync(configPath))
const overridePath = path.join(__dirname, '..', 'settings', 'config.json')
@@ -41,7 +42,7 @@ const schema = Joi.object({
timezone: Joi.string().required(),
dateFormat: Joi.string().required(),
dateLanguage: Joi.string().required(),
- dateLanguageList: Joi.array().items(Joi.string()).required(),
+ dateLanguageList: Joi.array().items(Joi.string()).min(1).required(),
dateFallback: Joi.bool().strict().required(),
timeFallback: Joi.bool().strict().required(),
max: Joi.number().strict().greater(-1).required(),
@@ -191,6 +192,7 @@ https.chain = process.env.DRSS_WEB_HTTPS_CHAIN || httpsOverride.chain || https.c
https.port = Number(process.env.DRSS_WEB_HTTPS_PORT) || httpsOverride.port || https.port
if (!process.env.TEST_ENV) {
+ moment.locale(config.feeds.dateLanguage)
const results = schema.validate(config, {
abortEarly: false
})
| 12 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.