code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/NiL.JS/Core/Interop/ExpandoObjectWrapper.cs b/NiL.JS/Core/Interop/ExpandoObjectWrapper.cs @@ -26,7 +26,7 @@ namespace NiL.JS.Core.Interop
public override void Assign(JSValue value)
{
- (_owner._target as IDictionary<string, object>)[_key] = value.Value;
+ _owner.SetProperty(_key, value, false);
base.Assign(value);
}
| 11 |
diff --git a/etc/eslint/rules/best_practices.js b/etc/eslint/rules/best_practices.js @@ -785,8 +785,8 @@ rules[ 'no-magic-numbers' ] = [ 'off', {
*
* @name no-multi-spaces
* @memberof rules
-* @type {string}
-* @default 'error'
+* @type {Array}
+* @default [ 'error', { 'ignoreEOLComments': true } ]
* @see [no-multi-spaces]{@link http://eslint.org/docs/rules/no-multi-spaces}
*
* @example
@@ -797,7 +797,9 @@ rules[ 'no-magic-numbers' ] = [ 'off', {
* // Good...
* var bool = ( x === true );
*/
-rules[ 'no-multi-spaces' ] = 'error';
+rules[ 'no-multi-spaces' ] = [ 'error', {
+ 'ignoreEOLComments': true
+}];
/**
* Never allow using a `\` character to create multi-line strings.
| 8 |
diff --git a/includes/Core/Storage/Cache.php b/includes/Core/Storage/Cache.php @@ -118,9 +118,13 @@ final class Cache {
* @param string $key The key to add.
*/
private function remove_global_cache_key( $key ) {
- unset( $this->global_cache_keys[ $key ] );
+ $key_index = array_search( $key, $this->global_cache_keys, true );
+
+ if ( $key_index ) {
+ unset( $this->global_cache_keys[ $key_index ] );
update_option( self::$global_cache_keys_key, $this->global_cache_keys, false );
}
+ }
/**
* Add a cache key to the global record of cache keys.
| 2 |
diff --git a/lib/recurly/pricing/promise.js b/lib/recurly/pricing/promise.js @@ -4,8 +4,6 @@ import partialRight from 'lodash.partialright';
const debug = require('debug')('recurly:pricing:promise');
-module.exports = PricingPromise;
-
/**
* PricingPromise
*
@@ -15,7 +13,7 @@ module.exports = PricingPromise;
*
* Usage
*
- * var pricing = recurly.Pricing();
+ * let pricing = recurly.Pricing.Subscription();
*
* pricing
* .plan('basic')
@@ -29,25 +27,20 @@ module.exports = PricingPromise;
* @constructor
* @public
*/
-
-function PricingPromise (resolver, pricing) {
- if (!(this instanceof PricingPromise)) return new PricingPromise(resolver, pricing);
+export default class PricingPromise extends Promise {
+ constructor (resolver, pricing) {
debug('create');
+ super(resolver);
this.pricing = pricing;
this.constructor = partialRight(this.constructor, pricing);
- Promise.call(this, resolver);
-
// for each pricing method, create a promise wrapper method
pricing && pricing.PRICING_METHODS.forEach(met => {
this[met] = (...args) => this.then(() => pricing[met](...args));
});
}
-mixin(PricingPromise.prototype, Promise.prototype);
-PricingPromise.prototype.constructor = PricingPromise;
-
/**
* Adds a reprice and completes the control flow
*
@@ -56,12 +49,11 @@ PricingPromise.prototype.constructor = PricingPromise;
* @return {Pricing} bound pricing instance
* @public
*/
-
-PricingPromise.prototype.done = function () {
+ done (...args) {
debug('repricing');
- Promise.prototype.done.apply(this.then(this.reprice), arguments);
+ super.done.apply(this.then(this.reprice), args);
return this.pricing;
-};
+ }
/**
* Adds a reprice if a callback is passed
@@ -69,8 +61,8 @@ PricingPromise.prototype.done = function () {
* @param {Function} [done] callback
* @public
*/
-
-PricingPromise.prototype.nodeify = function (done) {
+ nodeify (done, ...args) {
if (typeof done === 'function') this.reprice();
- return Promise.prototype.nodeify.apply(this, arguments);
-};
+ return super.nodeify.call(this, done, ...args);
+ }
+}
| 3 |
diff --git a/samples/javascript_nodejs/06.using-cards/bot.js b/samples/javascript_nodejs/06.using-cards/bot.js // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-const { ActivityTypes, CardFactory } = require('botbuilder');
+const { AttachmentLayoutTypes, ActivityTypes, CardFactory } = require('botbuilder');
const { ChoicePrompt, DialogSet, DialogTurnStatus, ListStyle } = require('botbuilder-dialogs');
/**
@@ -111,15 +111,18 @@ class RichCardsBot {
await turnContext.sendActivity({ attachments: [this.createVideoCard()] });
break;
case 'All Cards':
- await turnContext.sendActivities([
- { attachments: [this.createAnimationCard()] },
- { attachments: [this.createAudioCard()] },
- { attachments: [this.createHeroCard()] },
- { attachments: [this.createReceiptCard()] },
- { attachments: [this.createSignInCard()] },
- { attachments: [this.createThumbnailCard()] },
- { attachments: [this.createVideoCard()] }
- ]);
+ await turnContext.sendActivity({
+ attachments: [this.createVideoCard(),
+ this.createAnimationCard(),
+ this.createAudioCard(),
+ this.createHeroCard(),
+ this.createReceiptCard(),
+ this.createSignInCard(),
+ this.createThumbnailCard(),
+ this.createVideoCard()
+ ],
+ attachmentLayout: AttachmentLayoutTypes.Carousel
+ });
break;
default:
await turnContext.sendActivity('An invalid selection was parsed. No corresponding Rich Cards were found.');
| 0 |
diff --git a/game.js b/game.js @@ -583,12 +583,6 @@ const _mouseup = () => {
o.untriggerAux && o.untriggerAux();
} */
};
-/* const _aim = () => {
- world.appManager.aimed = true;
-};
-const _unaim = () => {
- world.appManager.aimed = false;
-}; */
/* const _try = async () => {
const o = getGrabbedObject(0);
| 2 |
diff --git a/test/spec.imba b/test/spec.imba @@ -290,6 +290,9 @@ global class SpecAssert < SpecComponent
if a === b
return true
if a isa Array and b isa Array
+ return false if a.length != b.length
+ for item,i in a
+ return false unless self.compare(item,b[i])
return JSON.stringify(a) == JSON.stringify(b)
return false
| 7 |
diff --git a/js/util/trackUtils.js b/js/util/trackUtils.js @@ -269,11 +269,11 @@ function parseLocusString(string) {
const range = {
chr: t1[0],
- start: Number.parseInt(t2[0]) - 1
+ start: Number.parseInt(t2[0].replace(/,/g, '')) - 1
};
if (t2.length > 1) {
- range.end = Number.parseInt(t2[1]);
+ range.end = Number.parseInt(t2[1].replace(/,/g, ''));
} else {
range.end = range.start + 1;
}
| 11 |
diff --git a/src/components/accounts/CreateAccount.js b/src/components/accounts/CreateAccount.js @@ -96,7 +96,14 @@ class CreateAccount extends Component {
const fundingContract = match.params.fundingContract;
const fundingKey = match.params.fundingKey;
+ // arrived from a linkdrop link
+ if (fundingContract && fundingKey) {
setLinkdropData({ fundingContract, fundingKey })
+ } else {
+ // not a linkdrop link, clear any existing linkdrop data (if any)
+ setLinkdropData({})
+ }
+
setTempAccount(accountId)
setFormLoader(false)
| 9 |
diff --git a/userscript.user.js b/userscript.user.js @@ -15168,7 +15168,7 @@ var $$IMU_EXPORT$$;
},
twitter_use_ext: {
name: "Twitter: Use extension",
- description: "Prefers `.jpg?name=orig` over `?format=jpg&name=orig`. This will possibly incur extra requests before succeeding",
+ description: "Prefers `.jpg?name=orig` over `?format=jpg&name=orig`. This will possibly incur extra requests before succeeding. Note that there is no difference in image quality.",
category: "rules",
subcategory: "rule_specific",
onupdate: update_rule_setting
| 7 |
diff --git a/app/components/toolpallete.element.js b/app/components/toolpallete.element.js @@ -96,14 +96,6 @@ export default class ToolPallete extends HTMLElement {
return `
<style>
:host {
- position: fixed;
- top: 1rem;
- left: 1rem;
- z-index: 99998;
-
- background: var(--theme-bg);
- box-shadow: 0 0.25rem 0.5rem hsla(0,0%,0%,10%);
-
--theme-bg: hsl(0,0%,100%);
--theme-color: hotpink;
--theme-icon_color: hsl(0,0%,20%);
@@ -111,12 +103,18 @@ export default class ToolPallete extends HTMLElement {
}
:host > ol {
- margin: 0;
- padding: 0;
- list-style-type: none;
+ position: fixed;
+ top: 1rem;
+ left: 1rem;
+ z-index: 99998;
display: flex;
flex-direction: column;
+
+ box-shadow: 0 0.25rem 0.5rem hsla(0,0%,0%,10%);
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
}
:host li {
@@ -126,11 +124,12 @@ export default class ToolPallete extends HTMLElement {
align-items: center;
justify-content: center;
position: relative;
+ background: var(--theme-bg);
}
:host li[data-tool]:hover {
cursor: pointer;
- background: hsl(0,0%,98%);
+ background: var(--theme-tool_selected);
}
:host li[data-tool]:hover:after,
@@ -145,7 +144,7 @@ export default class ToolPallete extends HTMLElement {
display: inline-flex;
align-items: center;
padding: 0 0.5rem;
- background: hotpink;
+ background: var(--theme-color);
color: white;
font-size: 0.8rem;
white-space: pre;
@@ -176,7 +175,7 @@ export default class ToolPallete extends HTMLElement {
}
:host li.color {
- border-top: 0.25rem solid hsl(0,0%,90%);
+ margin-top: 0.25rem;
}
:host li > svg {
| 5 |
diff --git a/src/lib.js b/src/lib.js @@ -1988,6 +1988,34 @@ module.exports = {
stat.entityName = entityName;
}
+ if('kills_obsidian_wither' in userProfile.stats )
+ killsDeaths.push({
+ type: 'kills',
+ entityId: 'obsidian_defender',
+ entityName: 'Obsidian Defender',
+ amount: (userProfile.stats['kills_obsidian_wither'] || 0)
+ });
+ if('deaths_obsidian_wither' in userProfile.stats )
+ killsDeaths.push({
+ type: 'deaths',
+ entityId: 'obsidian_defender',
+ entityName: 'Obsidian Defender',
+ amount: (userProfile.stats['deaths_obsidian_wither'] || 0)
+ });
+ if('kills_sadan_statue' in userProfile.stats )
+ killsDeaths.push({
+ type: 'kills',
+ entityId: 'terracotta',
+ entityName: 'Terracotta',
+ amount: (userProfile.stats['kills_sadan_statue'] || 0)
+ });
+ if('deaths_sadan_statue' in userProfile.stats )
+ killsDeaths.push({
+ type: 'deaths',
+ entityId: 'terracotta',
+ entityName: 'Terracotta',
+ amount: (userProfile.stats['deaths_sadan_statue'] || 0)
+ });
if('kills_guardian_emperor' in userProfile.stats || 'kills_skeleton_emperor' in userProfile.stats)
killsDeaths.push({
@@ -2010,7 +2038,9 @@ module.exports = {
'guardian_emperor',
'skeleton_emperor',
'chicken_deep',
- 'zombie_deep'
+ 'zombie_deep',
+ 'sadan_statue',
+ 'obsidian_wither'
].includes(a.entityId);
});
| 10 |
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml @@ -76,7 +76,7 @@ jobs:
echo "REACT_APP_CODE_PUSH_KEY=${{ env.APPCENTER_CODEPUSH_TOKEN }}" >> .env.$env_name
- name: Code push release
run: |
- BUILD_VERSION=`node -pe "require('./package.json')['version']" | rev | cut -c5- | rev`
+ BUILD_VERSION=`node -pe "require('./package.json')['version']" | rev | cut -c5- | rev`.x
echo Code push release target version ${BUILD_VERSION}
yarn lingui:compile
npx appcenter codepush release-react --token ${{ env.APPCENTER_TOKEN }} -a ${{ env.APPCENTER_NAME }} -d Production -t ${BUILD_VERSION}
| 3 |
diff --git a/packages/insomnia-app/app/ui/components/codemirror/extensions/nunjucks-tags.js b/packages/insomnia-app/app/ui/components/codemirror/extensions/nunjucks-tags.js @@ -238,7 +238,7 @@ async function _updateElementText (render, mark, text) {
} else {
el.innerHTML = `<label></label>${tagDefinition.displayName || tagData.name}`;
}
- el.title = await render(str);
+ el.title = await render(text);
} else {
el.innerHTML = `<label></label>${cleanedStr}`;
el.title = 'Unrecognized tag';
| 9 |
diff --git a/snippets/layout-baseline.js b/snippets/layout-baseline.js const {TextInput, TextView, ui} = require('tabris');
let textView = new TextView({
- left: 20, top: 20,
+ left: 16, top: 16,
text: 'Label:'
}).appendTo(ui.contentView);
new TextInput({
- left: [textView, 10], width: 300, baseline: textView,
+ left: [textView, 16], right: 16, baseline: textView,
message: 'Text'
}).appendTo(ui.contentView);
| 7 |
diff --git a/CHANGELOG.md b/CHANGELOG.md All notable changes to deck.gl will be documented in this file.
+For a human readable version, visit https://deck.gl/#/documentation/overview/upgrade-guide
+
<!--
Each version should:
List its release date in the above format.
| 0 |
diff --git a/sparta_constants.go b/sparta_constants.go @@ -75,6 +75,8 @@ const (
ElasticLoadBalancingPrincipal = "elasticloadbalancing.amazonaws.com"
// @enum KinesisFirehosePrincipal
KinesisFirehosePrincipal = "firehose.amazonaws.com"
+ // @enum EventBridgePrincipal
+ EventBridgePrincipal = "events.amazonaws.com"
)
type contextKey int
| 0 |
diff --git a/test/integration/client/json-type-parsing-tests.js b/test/integration/client/json-type-parsing-tests.js @@ -7,7 +7,7 @@ pool.connect(assert.success(function (client, done) {
if (!jsonSupported) {
console.log('skip json test on older versions of postgres');
done();
- return helper.pg.end();
+ return pool.end();
}
client.query('CREATE TEMP TABLE stuff(id SERIAL PRIMARY KEY, data JSON)');
var value = { name: 'Brian', age: 250, alive: true, now: new Date() };
| 1 |
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -69,6 +69,18 @@ jobs:
name: Run jasmine tests (part C)
command: .circleci/test.sh flaky-no-gl-jasmine
+ bundle-jasmine:
+ docker:
+ # need '-browsers' version to test in real (xvfb-wrapped) browsers
+ - image: circleci/node:12.22.1-browsers
+ working_directory: ~/plotly.js
+ steps:
+ - attach_workspace:
+ at: ~/
+ - run:
+ name: Run jasmine tests (part D)
+ command: .circleci/test.sh bundle-jasmine
+
make-baselines:
parallelism: 4
docker:
@@ -162,18 +174,6 @@ jobs:
name: Run syntax tests on source files
command: .circleci/test.sh source-syntax
- bundle-jasmine:
- docker:
- # need '-browsers' version to test in real (xvfb-wrapped) browsers
- - image: circleci/node:12.22.1-browsers
- working_directory: ~/plotly.js
- steps:
- - attach_workspace:
- at: ~/
- - run:
- name: Run jasmine tests (part D)
- command: .circleci/test.sh bundle-jasmine
-
publish-dist:
docker:
- image: circleci/node:12.22.1
| 5 |
diff --git a/packages/react-router-dom/docs/guides/scroll-restoration.md b/packages/react-router-dom/docs/guides/scroll-restoration.md @@ -8,7 +8,7 @@ Because browsers are starting to handle the "default case" and apps have varying
## Scroll to top
-Most of the time all you need is to "scroll to the top" because you have a long content page, that when navigated to, stays scrolled down. This is straightforward to handle with a `<ScrollToTop>` component that will scroll the window up on every navigation:
+Most of the time all you need is to "scroll to the top" because you have a long content page, that when navigated to, stays scrolled down. This is straightforward to handle with a `<ScrollToTop>` component that will scroll the window up on every navigation, make sure to wrap it in `withRouter` to give it access to the router's props:
```jsx
class ScrollToTop extends Component {
| 0 |
diff --git a/app/lib/webpack/inject.style-rules.js b/app/lib/webpack/inject.style-rules.js @@ -85,7 +85,8 @@ function injectRule (chain, pref, lang, test, loader, loaderOptions) {
// need a fresh copy, otherwise plugins
// will keep on adding making N duplicates for each one
delete require.cache[postCssConfigFile]
- const postCssOpts = { sourceMap: pref.sourceMap, ...require(postCssConfigFile) }
+ const postCssConfig = require(postCssConfigFile)
+ const postCssOpts = { sourceMap: pref.sourceMap, ...postCssConfig }
if (pref.rtl) {
const postcssRTL = require('postcss-rtlcss')
| 1 |
diff --git a/app/MMB/src/scenes/tripServices/insurance/insuranceOverviewScene/InsuranceOverviewScene.js b/app/MMB/src/scenes/tripServices/insurance/insuranceOverviewScene/InsuranceOverviewScene.js @@ -88,7 +88,10 @@ class InsuranceOverviewScene extends React.Component<Props> {
const { data, passengers, amount } = this.props;
return (
<React.Fragment>
- <ScrollView>
+ <ScrollView
+ contentContainerStyle={styles.container}
+ alwaysBounceVertical={false}
+ >
<LayoutSingleColumn>
<DestinationImage data={data.singleBooking} />
@@ -134,6 +137,9 @@ export default withInsuranceContext(state => ({
}))(InsuranceOverviewScene);
const styles = StyleSheet.create({
+ container: {
+ paddingBottom: 52,
+ },
buttonWrapper: {
padding: 10,
},
| 0 |
diff --git a/README.md b/README.md -[](https://circleci.com/gh/kindlyops/mappamundi) [](http://github.com/badges/stability-badges) [](https://saythanks.io/to/statik) [](https://codeclimate.com/github/kindlyops/mappamundi/maintainability)
+[](https://circleci.com/gh/kindlyops/havengrc) [](http://github.com/badges/stability-badges) [](https://saythanks.io/to/statik) [](https://codeclimate.com/github/kindlyops/havengrc/maintainability)
# Haven GRC is a modern risk & compliance dashboard
@@ -97,7 +97,7 @@ If you don't have docker running, use [these instructions](https://docs.docker.c
We have a tmux session defined with https://github.com/tmux-python/tmuxp/ this may make it easier to monitor logs as you work. This is also handy if you want to do development on a remote VM.
pip install --user tmuxp
- tmuxp load ~/go/src/github.com/kindlyops/mappamundi
+ tmuxp load ~/go/src/github.com/kindlyops/havengrc
### Windows users
| 1 |
diff --git a/src/traces/isosurface/attributes.js b/src/traces/isosurface/attributes.js @@ -34,7 +34,7 @@ function makeSliceAttr(axLetter) {
role: 'info',
description: [
'Specifies the location(s) of slices on the axis.',
- 'When not locations specified slices would be created for',
+ 'When not specified slices would be created for',
'all points of the axis', axLetter, 'except start and end.'
].join(' ')
},
| 1 |
diff --git a/test/jasmine/tests/cartesian_interact_test.js b/test/jasmine/tests/cartesian_interact_test.js @@ -1449,7 +1449,7 @@ describe('axis zoom/pan and main plot zoom', function() {
});
});
- it('panning a matching overlaying axis', function(done) {
+ it('@noCI panning a matching overlaying axis', function(done) {
/*
* y | | y2 y3 |
* | | |
| 0 |
diff --git a/examples/dev/main.js b/examples/dev/main.js @@ -6,9 +6,11 @@ const GoogleDrive = require('./../../packages/@uppy/google-drive/src')
const Url = require('./../../packages/@uppy/url/src')
const Webcam = require('./../../packages/@uppy/webcam/src')
const Tus = require('./../../packages/@uppy/tus/src')
+// const XHRUpload = require('./../../packages/@uppy/xhr-upload/src')
const Form = require('./../../packages/@uppy/form/src')
const TUS_ENDPOINT = 'https://master.tus.io/files/'
+// const XHR_ENDPOINT = 'https://api2.transloadit.com'
const uppy = Uppy({
debug: true,
@@ -35,6 +37,7 @@ const uppy = Uppy({
.use(Url, { target: Dashboard, serverUrl: 'http://localhost:3020' })
.use(Webcam, { target: Dashboard })
.use(Tus, { endpoint: TUS_ENDPOINT })
+ // .use(XHRUpload, { endpoint: XHR_ENDPOINT })
.use(Form, { target: '#upload-form' })
// .use(GoldenRetriever, {serviceWorker: true})
| 0 |
diff --git a/src/views/preview/preview.jsx b/src/views/preview/preview.jsx @@ -435,10 +435,10 @@ class Preview extends React.Component {
assetHost={this.props.assetHost}
backpackOptions={this.props.backpackOptions}
basePath="/"
+ canCreateCopy={this.props.canCreateCopy}
canCreateNew={this.props.canCreateNew}
canRemix={this.props.canRemix}
canSave={this.props.canSave}
- canSaveAsCopy={this.props.canSaveAsCopy}
canShare={this.props.canShare}
className="gui"
enableCommunity={this.props.enableCommunity}
@@ -469,11 +469,11 @@ Preview.propTypes = {
visible: PropTypes.bool
}),
canAddToStudio: PropTypes.bool,
+ canCreateCopy: PropTypes.bool,
canCreateNew: PropTypes.bool,
canRemix: PropTypes.bool,
canReport: PropTypes.bool,
canSave: PropTypes.bool,
- canSaveAsCopy: PropTypes.bool,
canShare: PropTypes.bool,
comments: PropTypes.arrayOf(PropTypes.object),
enableCommunity: PropTypes.bool,
@@ -560,11 +560,11 @@ const mapStateToProps = state => {
return {
canAddToStudio: userOwnsProject,
+ canCreateCopy: userOwnsProject && projectInfoPresent,
canCreateNew: isLoggedIn,
canRemix: isLoggedIn && projectInfoPresent && !userOwnsProject,
canReport: isLoggedIn && !userOwnsProject,
canSave: isLoggedIn && userOwnsProject,
- canSaveAsCopy: userOwnsProject && projectInfoPresent,
canShare: userOwnsProject && state.permissions.social,
comments: state.preview.comments,
enableCommunity: projectInfoPresent,
| 10 |
diff --git a/src/consumer/__tests__/instrumentationEvents.spec.js b/src/consumer/__tests__/instrumentationEvents.spec.js @@ -390,6 +390,19 @@ describe('Consumer > Instrumentation Events', () => {
.catch(e => e),
])
+ // add more concurrent requests to make we increate the requests
+ // on the queue
+ await Promise.all([
+ consumer.describeGroup(),
+ consumer.describeGroup(),
+ consumer.describeGroup(),
+ consumer.describeGroup(),
+ consumer2.describeGroup(),
+ consumer2.describeGroup(),
+ consumer2.describeGroup(),
+ consumer2.describeGroup(),
+ ])
+
await consumer2.disconnect()
expect(requestListener).toHaveBeenCalledWith({
| 7 |
diff --git a/README.md b/README.md @@ -3,7 +3,7 @@ layout: docs
title: Overview of DIYbiosphere
permalink: /docs/introduction/overview/
---
-
+[](https://app.netlify.com/sites/diybiosphere/deploys)
[](https://travis-ci.org/DIYbiosphere/sphere)
[](http://sphere.diybio.org/terms-of-use/)

| 0 |
diff --git a/app/controllers/ValidationTaskController.scala b/app/controllers/ValidationTaskController.scala @@ -92,10 +92,10 @@ class ValidationTaskController @Inject() (implicit val env: Environment[User, Se
def getLabelTypeId(user: Option[User], missionProgress: ValidationMissionProgress): Option[Int] = {
if (missionProgress.completed) {
val possibleLabelTypeIds: ListBuffer[Int] = LabelTable.retrievePossibleLabelTypeIds(user.get.userId, 10)
- val hasNextMission: Boolean = possibleLabelTypeIds.length > 0
+ val hasNextMission: Boolean = possibleLabelTypeIds.nonEmpty
if (hasNextMission) {
- val index: Int = if (possibleLabelTypeIds.size > 0) scala.util.Random.nextInt(possibleLabelTypeIds.size - 1) else 0
+ val index: Int = if (possibleLabelTypeIds.size > 1) scala.util.Random.nextInt(possibleLabelTypeIds.size - 1) else 0
return Some(possibleLabelTypeIds(index))
}
}
| 1 |
diff --git a/src/events/http/lambda-events/LambdaProxyIntegrationEventV2.js b/src/events/http/lambda-events/LambdaProxyIntegrationEventV2.js @@ -28,11 +28,6 @@ export default class LambdaProxyIntegrationEventV2 {
}
create() {
- const authPrincipalId =
- this.#request.auth &&
- this.#request.auth.credentials &&
- this.#request.auth.credentials.principalId
-
const authContext =
(this.#request.auth &&
this.#request.auth.credentials &&
@@ -151,11 +146,6 @@ export default class LambdaProxyIntegrationEventV2 {
claims,
scopes,
},
- // 'principalId' should have higher priority
- principalId:
- authPrincipalId ||
- process.env.PRINCIPAL_ID ||
- 'offlineContext_authorizer_principalId', // See #24
}),
domainName: 'offlineContext_domainName',
domainPrefix: 'offlineContext_domainPrefix',
| 2 |
diff --git a/components/Front/index.js b/components/Front/index.js @@ -3,6 +3,7 @@ import { graphql, compose } from 'react-apollo'
import gql from 'graphql-tag'
import { css } from 'glamor'
import { InlineSpinner } from '@project-r/styleguide'
+import StatusError from '../StatusError'
import createFrontSchema from '@project-r/styleguide/lib/templates/Front'
import InfiniteScroll from 'react-infinite-scroller'
@@ -75,7 +76,14 @@ class Front extends Component {
url={url}
meta={meta}
>
- <Loader loading={data.loading || !front} error={data.error} message={t('pages/magazine/title')} render={() => {
+ <Loader loading={data.loading} error={data.error} message={t('pages/magazine/title')} render={() => {
+ if (!front) {
+ return <StatusError
+ url={url}
+ statusCode={404}
+ serverContext={this.props.serverContext} />
+ }
+
const hasNextPage = front.children.pageInfo.hasNextPage
return <InfiniteScroll
loadMore={fetchMore}
| 9 |
diff --git a/generators/entity-client/templates/angular/src/main/webapp/app/entities/entity-management-update.component.ts.ejs b/generators/entity-client/templates/angular/src/main/webapp/app/entities/entity-management-update.component.ts.ejs @@ -34,7 +34,7 @@ import { DATE_TIME_FORMAT } from 'app/shared/constants/input.constants';
<%_ } _%>
<%_ } _%>
<%_ if (queries && queries.length > 0 || fieldsContainBlob) { _%>
-import { <% if (queries && queries.length > 0) { %>JhiAlertService, <% } %><% if (fieldsContainBlob) { %>JhiDataUtils<% } %> } from 'ng-jhipster';
+import { <% if (fieldsContainBlob || queries && queries.length > 0) { %>JhiAlertService, <% } %><% if (fieldsContainBlob) { %>JhiDataUtils<% } %> } from 'ng-jhipster';
<%_ } _%>
import { I<%= entityAngularName %> } from 'app/shared/model/<%= entityModelFileName %>.model';
import { <%= entityAngularName %>Service } from './<%= entityFileName %>.service';
@@ -88,7 +88,7 @@ export class <%= entityAngularName %>UpdateComponent implements OnInit {
<%_ if (fieldsContainBlob) { _%>
protected dataUtils: JhiDataUtils,
<%_ } _%>
- <%_ if (queries && queries.length > 0) { _%>
+ <%_ if (fieldsContainBlob || queries && queries.length > 0) { _%>
protected jhiAlertService: JhiAlertService,
<%_ } _%>
protected <%= entityInstance %>Service: <%= entityAngularName %>Service,
@@ -138,7 +138,7 @@ export class <%= entityAngularName %>UpdateComponent implements OnInit {
this.dataUtils.setFileData(event, entity, field, isImage)
.then(
modifiedEntity => entity = { ...modifiedEntity },
- error => this.jhiAlertService.error(error, null, null)
+ this.onError
);
}
@@ -184,7 +184,7 @@ export class <%= entityAngularName %>UpdateComponent implements OnInit {
protected onSaveError() {
this.isSaving = false;
}
- <%_ if (queries && queries.length > 0) { _%>
+ <%_ if (fieldsContainBlob || queries && queries.length > 0) { _%>
protected onError(errorMessage: string) {
this.jhiAlertService.error(errorMessage, null, null);
| 3 |
diff --git a/js/modules/projectResliceMask.js b/js/modules/projectResliceMask.js @@ -243,7 +243,6 @@ class ProjectResliceMaskModule extends BaseModule {
"backgroundValue" : 0.0,
"interpolation" : 1
},vals.debug);
- await temp_angio_mask.save('06angio.nii.gz');
} catch(e) {
return Promise.reject('Failed to reslice mask to angio space '+e);
}
@@ -264,7 +263,6 @@ class ProjectResliceMaskModule extends BaseModule {
};
console.log('oooo calling projectImageWASM '+JSON.stringify(obj));
temp_projected_mask=await biswrap.projectImageWASM(temp_angio_mask,0,obj,debug);
- await temp_projected_mask.save('06mask.nii.gz');
} catch(e) {
console.log(e);
return Promise.reject(e);
| 2 |
diff --git a/tests/phpunit/integration/Modules/Analytics_4Test.php b/tests/phpunit/integration/Modules/Analytics_4Test.php @@ -742,10 +742,6 @@ class Analytics_4Test extends TestCase {
$authentication = new Authentication( $context, $options, $user_options );
$analytics = new Analytics_4( $context, $options, $user_options, $authentication );
- $authentication->get_oauth_client()->get_client()->setHttpClient(
- new FakeHttpClient() // Returns 200 by default.
- );
-
$property_id = '123456789';
$analytics->get_settings()->merge(
| 2 |
diff --git a/lib/runtime/console.js b/lib/runtime/console.js @@ -17,7 +17,7 @@ const { changeprompt, changemodule, fullpath } =
const isWindows = process.platform === 'win32'
const uriRegex = isWindows ?
- /(@ ([^\s]+)\s(.*?)\:(\d+)|((([a-zA-Z]:|\.\.?|\~)|([^\0<>\?\|\/\s!$`&*()\[\]+'":;])+)?((\\|\/)([^\0<>\?\|\/\s!$`&*()\[\]+'":;])+)+)(\:\d+)?)/ :
+ /(@ ([^\s]+)\s(.*?)\:(\d+)|((([a-zA-Z]:|\.\.?|\~)|([^\0<>\?\|\/\s!$`&*()\[\]+'":;])+)?((\\|\/)([^\0<>\?\|\/!$`&*()\[\]+'":;])+)+\.[^\s:]+)(\:\d+)?)/ :
/(@ ([^\s]+)\s(.*?)\:(\d+)|(((\.\.?|\~)|([^\0\s!$`&*()\[\]+'":;\\])+)?(\/([^\0\s!$`&*()\[\]+'":;\\])+)+)(\:\d+)?)/
var whitelistedKeybindingsREPL = []
| 9 |
diff --git a/guide/english/accessibility/accessibility-basics/index.md b/guide/english/accessibility/accessibility-basics/index.md @@ -71,7 +71,7 @@ The Web Content Accessibility Guidelines or <a href='https://www.wuhcag.com/web-
The HTML specification is a document that describes how the language should be used to build websites. Assistive technologies, like screen-readers, speech recognition programs etc. are aware of this document. Web developers however, often are not, or at least not enough, and think something like this is ok:
```html
- <div class="awesome-button"></div>
+ <div class="epic-button"></div>
<span><strong>Huge heading I will style with CSS later</strong></span>
| 14 |
diff --git a/index.html b/index.html </div>
</div>
</div>
-
-<div class="collapse" id="woods">
- <h1 style="color: white;font-family:mathfont">Woodall Number</h2><p> </p>
- <input style="color: white; font-family:mathfont" type="text"id="wood1" placeholder="Enter the input number" class="form__field"><p> </p>
- <button class="btn btn-dark" onclick="woodfind()">FInd</button><p> </p>
- <p style="font-family:mathfont" id="woodans"></p><br>
+<div class="collapse" id="woods" style="text-align: center;">
+ <div class="container">
+ <h2 style="color: white;font-family:mathfont;text-align: center;">Woodall Number</h2>
+ <br>
+ <p>A Woodall number (W<sub>n</sub>) is any natural number of the form
+ \[W_n = n \cdot 2^n - 1\]
+ for some natural number n. </p>
+ <br>
+ <form action="">
+ <div class="form-group">
+ <input style="color: white; font-family:mathfont" type="number" id="wood1" placeholder="Enter the input number" class="form__field">
+ </div>
+ <div class="form-group">
+ <button type="button" class="btn btn-light" onclick="woodfind()">Find</button>
+ <button type="button" class="btn btn-light" onclick="this.form.reset();">
+ Reset
+ </button>
</div>
+ </form>
+ <br>
+ <div class="form-group text-center">
+ <p class="stopwrap" style="color:white;" id="woodans"></p><br>
+ </div>
+ </div>
+</div>
+
<!-- doubling time starts -->
<div class="collapse" id="dbltime" style="text-align: center;">
| 7 |
diff --git a/server/game/deck.js b/server/game/deck.js @@ -11,24 +11,34 @@ class Deck {
prepare(player) {
var result = {
- conflictdrawCards: [],
- dynastydrawCards: [],
+ conflictDrawCards: [],
+ dynastyDrawCards: [],
provinceCards: []
};
+ //conflict
this.eachRepeatedCard(this.data.drawCards, cardData => {
- if(['attachment', 'character', 'event', 'location'].includes(cardData.type_code)) {
+ if(['conflict'].includes(cardData.deck)) {
var drawCard = this.createCard(DrawCard, player, cardData);
- drawCard.location = 'draw deck';
- result.drawCards.push(drawCard);
+ drawCard.location = 'conflict draw deck';
+ result.conflictDrawCards.push(drawCard);
+ }
+ });
+
+ //dynasty
+ this.eachRepeatedCard(this.data.drawCards, cardData => {
+ if(['dynsaty'].includes(cardData.deck)) {
+ var drawCard = this.createCard(DrawCard, player, cardData);
+ drawCard.location = 'dynasty draw deck';
+ result.dynastyDrawCards.push(drawCard);
}
});
this.eachRepeatedCard(this.data.plotCards, cardData => {
- if(cardData.type_code === 'plot') {
- var plotCard = this.createCard(PlotCard, player, cardData);
- plotCard.location = 'plot deck';
- result.plotCards.push(plotCard);
+ if(cardData.type_code === 'province') {
+ var provinceCard = this.createCard(ProvinceCard, player, cardData);
+ provinceCard.location = 'province deck';
+ result.provinceCards.push(provinceCard);
}
});
| 6 |
diff --git a/src/components/table-ajax/table-ajax.js b/src/components/table-ajax/table-ajax.js @@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
import Request from 'superagent';
import serialize from './../../utils/helpers/serialize';
import { Table, TableRow, TableCell, TableHeader, TableSubheader } from './../table';
+import Logger from './../../utils/logger';
/**
* A Table Ajax Widget
@@ -338,7 +339,7 @@ class TableAjax extends Table {
} else if (this.props.onAjaxError) {
this.props.onAjaxError(err, response);
} else {
- console.warn(`${err.status} - ${response}`); // eslint-disable-line no-console
+ Logger.warn(`${err.status} - ${response}`);
}
}
| 14 |
diff --git a/src/pages/workshops.js b/src/pages/workshops.js @@ -96,7 +96,8 @@ export default ({ data: { allMarkdownRemark: { edges } } }) => {
const title = 'Hack Club Workshops'
const desc =
- 'Get coding tutorials, project ideas, and programming club activities.'
+ 'Get free coding tutorials, project ideas, and programming club activities ' +
+ 'from Hack Club, a community of high school developers.'
return (
<Fragment>
| 7 |
diff --git a/js/webcomponents/bisweb_filetreepanel.js b/js/webcomponents/bisweb_filetreepanel.js @@ -392,11 +392,13 @@ class FileTreePanel extends HTMLElement {
'callback': (f) => {
this.exportStudy(f);
},
- }, {
+ },
+ {
'title': 'Export study',
'filters': 'DIRECTORY',
'suffix': 'DIRECTORY',
'save': true,
+ initialCallback: () => { return this.getDefaultFilename(); },
});
saveStudyButton.addClass('save-study-button');
@@ -675,6 +677,17 @@ class FileTreePanel extends HTMLElement {
console.log('default selection', defaultSelection);
}
+ getDefaultFilename() {
+ let date = new Date();
+ let parsedDate = 'ExportedStudy' + date.getFullYear() + '-' + date.getMonth() + 1 + '-' + zeroPadLeft(date.getDate()) + 'T' + zeroPadLeft(date.getHours()) + ':' + zeroPadLeft(date.getMinutes()) + ':' + zeroPadLeft(date.getSeconds());
+ console.log('date', parsedDate);
+ return parsedDate + '.json';
+
+ function zeroPadLeft(num) {
+ let pad = '00', numStr = '' + num;
+ return pad.substring(0, pad.length - numStr.length) + numStr;
+ }
+ }
}
bis_webutil.defineElement('bisweb-filetreepanel', FileTreePanel);
| 1 |
diff --git a/javascript/utils/index.js b/javascript/utils/index.js @@ -58,6 +58,11 @@ export function cloneReactChildrenWithProps (children, propsToAdd = {}) {
if (!children) {
return null;
}
+
+ if (!Array.isArray(children)) {
+ children = [children];
+ }
+
const filteredChildren = children.filter((child) => !!child); // filter out falsy children, since some can be null
return React.Children.map(filteredChildren, (child) => React.cloneElement(child, propsToAdd));
}
| 3 |
diff --git a/src/components/ChangeLogComponent/ChangeLogComponent.js b/src/components/ChangeLogComponent/ChangeLogComponent.js @@ -5,12 +5,11 @@ import React, { useState, useEffect } from 'react';
import moment from "moment";
import { Form } from "components/Formset";
-import { sortByDate, groupBy } from "common/utils";
+import { sortByDate, groupBy, sort } from "common/utils";
import {
- Container,
- MainContent,
- SideContent
+ Container, MainContent, SideContent,
+ MonthlyGroup, MonthlyHeader
} from './ChangeLogComponent.styles';
import type { ChangeLogInputProps } from "./ChangeLogComponent.types";
@@ -20,22 +19,26 @@ import { ChangeLogItem } from "./ChangeLogItem";
import { ChangeLogTextSearch, searchContent } from "./ChangeLogTextSearch";
-const ChangeLogItemHeader: ComponentType = ({ change }) => {
+const ChangeLogItemHeader: ComponentType = ({ date }) => {
- return <header>
- <hr className={ "govuk-section-break govuk-section-break--m govuk-section-break--visible" }/>
- <h2 className={ "govuk-heading-s" }>
- { change }
+ return <MonthlyHeader>
+ <h2 className={ "govuk-heading-m" } id={ `monthly_${date}` }>
+ <time dateTime={ date }>
+ <span className={ "govuk-visually-hidden" }>
+ List of changes in the month of
+ </span>
+ { moment(date).format("MMMM YYYY") }
+ </time>
</h2>
- </header>
+ </MonthlyHeader>
}; // ChangeLogItemHeader
const DateGroup: ComponentType = ({ data, group, colours, changeTypes }) => {
- return <article>
- <ChangeLogItemHeader change={ group }/>
+ return <MonthlyGroup aria-describedby={ `monthly_${group}` }>
+ <ChangeLogItemHeader date={ group }/>
{
data.map((change, index ) =>
<ChangeLogItem id={ `cl-item-${ index }` }
@@ -46,7 +49,7 @@ const DateGroup: ComponentType = ({ data, group, colours, changeTypes }) => {
colour={ colours.find(element => element.type === change.type) }/>
)
}
- </article>
+ </MonthlyGroup>
}; // DateGroup
@@ -74,12 +77,13 @@ const ChangeLogComponent: ComponentType = ({ data, colours }: ChangeLogInputProp
useEffect(() => {
setGroupedData(groupBy(
- data.sort(sortByDate).filter(item => searchContent(item, changeLogSearch)),
- item => moment(item.date).format("MMMM YYYY")
+ data.filter(item => searchContent(item, changeLogSearch)),
+ item => item.date.substring(0, 7)
))
}, [changeLogSearch, data])
+
return <>
<Container>
@@ -94,6 +98,7 @@ const ChangeLogComponent: ComponentType = ({ data, colours }: ChangeLogInputProp
{
Object
.keys(groupedData)
+ .sort(sort)
.map(groupKey =>
<DateGroup data={ groupedData[groupKey] }
group={ groupKey }
| 7 |
diff --git a/azure-pipelines.yml b/azure-pipelines.yml @@ -28,7 +28,7 @@ jobs:
variables:
JHI_PROFILE: dev,webpack
JHI_RUN_APP: 1
- JHI_CYPRESS: 0
+ JHI_E2E: 0
JHI_JDK: 11
# if JHI_LIB_BRANCH value is release, use the release from Maven
JHI_LIB_REPO: https://github.com/jhipster/jhipster.git
@@ -50,12 +50,12 @@ jobs:
JHI_APP: ms-ngx-gateway-eureka-jwt
JHI_ENTITY: sqllight
JHI_PROFILE: prod
- JHI_CYPRESS: 1
+ JHI_E2E: 1
ms-ngx-gateway-eureka-oauth2:
JHI_APP: ms-ngx-gateway-eureka-oauth2
JHI_ENTITY: sqllight
JHI_PROFILE: prod
- JHI_CYPRESS: 1
+ JHI_E2E: 1
ms-ngx-gateway-eureka-uaa:
JHI_APP: ms-ngx-gateway-eureka-uaa
JHI_ENTITY: uaa
@@ -69,17 +69,17 @@ jobs:
JHI_APP: ms-react-gateway-consul-jwt
JHI_ENTITY: sqllight
JHI_PROFILE: prod
- JHI_CYPRESS: 1
+ JHI_E2E: 1
ms-react-gateway-consul-oauth2:
JHI_APP: ms-react-gateway-consul-oauth2
JHI_ENTITY: sqllight
JHI_PROFILE: prod
- JHI_CYPRESS: 1
+ JHI_E2E: 1
jdl-default:
JHI_APP: jdl-default
JHI_ENTITY: jdl
JHI_PROFILE: prod
- JHI_CYPRESS: 1
+ JHI_E2E: 1
JHI_TESTCONTAINERS: 1
steps:
#----------------------------------------------------------------------
| 10 |
diff --git a/package.json b/package.json {
"name": "nativescript-doctor",
- "version": "0.3.1",
+ "version": "0.3.2",
"description": "Library that helps identifying if the environment can be used for development of {N} apps.",
"main": "lib/index.js",
"types": "./typings/nativescript-doctor.d.ts",
| 12 |
diff --git a/modules/keyboard.js b/modules/keyboard.js @@ -233,13 +233,13 @@ Keyboard.DEFAULTS = {
key: ' ',
collapsed: true,
format: { list: false },
- prefix: /^\s*?(1\.|-|\[ \]|\[x\])$/,
+ prefix: /^\s*?(1\.|-|\[ ?\]|\[x\])$/,
handler: function(range, context) {
if (this.quill.scroll.whitelist != null && !this.quill.scroll.whitelist['list']) return true;
let length = context.prefix.length;
let value;
switch (context.prefix.trim()) {
- case '[ ]':
+ case '[]': case '[ ]':
value = 'unchecked';
break;
case '[x]':
| 11 |
diff --git a/html/options.html b/html/options.html <!DOCTYPE html>
<html>
<head>
- <title>DuckDuckGo for Chrome - Options</title>
+ <title>DuckDuckGo Options</title>
<link rel="stylesheet" type="text/css" href="../public/css/base.css">
<link rel="stylesheet" type="text/css" href="../public/css/options.css">
</head>
</p>
<p class="options-info">
- DuckDuckGo for Chrome protects your privacy online with
+ DuckDuckGo protects your privacy online with
private search,
tracker blocking,
and secure browsing.
| 2 |
diff --git a/server/game/cards/02.3-ItFC/Censure.js b/server/game/cards/02.3-ItFC/Censure.js @@ -4,7 +4,7 @@ class Censure extends DrawCard {
setupCardAbilities() {
this.interrupt({
when: {
- onCardAbilityInitiated: event => event.card.type === 'event' && this.controller.opponent && this.controller.imperialFavor !== ''
+ onCardAbilityInitiated: event => event.card.type === 'event' && this.controller.imperialFavor !== ''
},
canCancel: true,
handler: context => {
| 2 |
diff --git a/core/server/api/v3/memberSigninUrls.js b/core/server/api/v3/memberSigninUrls.js const tpl = require('@tryghost/tpl');
const errors = require('@tryghost/errors');
const membersService = require('../../services/members');
+const messages = {
+ memberNotFound: 'Member not found.'
+};
const messages = {
memberNotFound: 'Member not found.'
| 14 |
diff --git a/token-metadata/0x8Ab7404063Ec4DBcfd4598215992DC3F8EC853d7/metadata.json b/token-metadata/0x8Ab7404063Ec4DBcfd4598215992DC3F8EC853d7/metadata.json "symbol": "AKRO",
"address": "0x8Ab7404063Ec4DBcfd4598215992DC3F8EC853d7",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/packages/openneuro-app/src/scripts/front-page/front-page.jsx b/packages/openneuro-app/src/scripts/front-page/front-page.jsx @@ -84,13 +84,30 @@ class FrontPage extends React.Component {
// template functions ----------------------------------------------------
_logoLayers() {
+ if (
+ frontPage.titlePanel &&
+ frontPage.titlePanel.logos &&
+ frontPage.titlePanel.logos.length
+ ) {
+ if (frontPage.titlePanel.logos.length > 1) {
let logoLayers = frontPage.titlePanel.logos.map((item, index) => {
return (
- <img key={index} className={item.class} src={item.src} alt={item.alt} />
+ <img
+ key={index}
+ className={item.class}
+ src={item.src}
+ alt={item.alt}
+ />
)
})
-
return <div className="logo-layers">{logoLayers}</div>
+ } else {
+ let logo = frontPage.titlePanel.logos[0]
+ return <img className={logo.class} src={logo.src} alt={logo.alt} />
+ }
+ } else {
+ return null
+ }
}
_logoText() {
| 9 |
diff --git a/test/jasmine/tests/splom_test.js b/test/jasmine/tests/splom_test.js @@ -549,6 +549,21 @@ describe('@gl Test splom interactions:', function() {
.catch(failTest)
.then(done);
});
+
+ it('should work with typed arrays', function(done) {
+ Plotly.plot(gd, [{
+ type: 'splom',
+ dimensions: [{
+ label: 'A',
+ values: new Int32Array([1, 2, 3])
+ }, {
+ label: 'B',
+ values: new Int32Array([2, 5, 6])
+ }]
+ }])
+ .catch(failTest)
+ .then(done);
+ });
});
describe('@gl Test splom hover:', function() {
| 0 |
diff --git a/packages/react/src/components/TimePicker/ListSpinner.test.e2e.jsx b/packages/react/src/components/TimePicker/ListSpinner.test.e2e.jsx @@ -31,11 +31,23 @@ describe('ListSpinner', () => {
onClick,
};
mount(<ListSpinner {...commonProps} />);
+
cy.findByTestId('my-list-list').trigger('wheel', {
deltaX: 0,
deltaY: 1000,
});
cy.get('@my-cb').should('have.been.called');
+ });
+
+ it('updates selected when swiped', () => {
+ const onClick = cy.stub().as('my-cb2');
+ const commonProps = {
+ testId: 'my-list',
+ list: listItems,
+ defaultSelectedId: '03',
+ onClick,
+ };
+ mount(<ListSpinner {...commonProps} />);
cy.findByTestId('my-list-list')
.trigger('touchstart', {
@@ -44,6 +56,6 @@ describe('ListSpinner', () => {
.trigger('touchmove', {
touches: [{ pageY: 1000, pageX: 0 }],
});
- cy.get('@my-cb').should('have.been.called');
+ cy.get('@my-cb2').should('have.been.called');
});
});
| 1 |
diff --git a/packages/cra-template-rmw/template/firebase/database.rules.json b/packages/cra-template-rmw/template/firebase/database.rules.json ".write": "auth != null && $uid===auth.uid"
}
},
+ "test_path": {
+ ".read": "auth != null",
+ ".write": "auth != null"
+ },
"users_count": {
".read": true,
".write": false
| 3 |
diff --git a/src/content/eth2/shard-chains/index.md b/src/content/eth2/shard-chains/index.md @@ -33,7 +33,7 @@ With lower hardware requirements, sharding will make it easier to run [clients](
<br />
-<Warning>At first, running an Eth2 client will also require you to run an Eth1 client. You will need at least 140 GB SSD available. This is only a requirement while other upgrades are in progress. </Warning>
+<Warning>At first, to run an Eth2 client you'll also need to run a mainnet client. The launchpad will walk you through running your own, but you'll need at least 140 GB SSD available. Alternatively you can use a <a href="/developers/docs/apis/backend/#available-libraries">backend API</a>.</Warning>
## Shard chains version 1: data availability {#data-availability}
| 7 |
diff --git a/packages/mjml/src/index.js b/packages/mjml/src/index.js @@ -55,7 +55,8 @@ try {
const custom_comps = JSON.parse(mjmlConfig).packages
custom_comps.forEach((compPath) => {
- registerComponent(require(path.join(process.cwd(), compPath)));
+ const requiredComp = require(path.join(process.cwd(), compPath))
+ registerComponent(requiredComp.default || requiredComp)
})
} catch(e) {
if (e.code !== 'ENOENT') {
| 9 |
diff --git a/tests/browser/ops.js b/tests/browser/ops.js @@ -198,8 +198,9 @@ module.exports = {
// testOp(browser, "MD4", "test input", "test_output");
// testOp(browser, "MD5", "test input", "test_output");
// testOp(browser, "MD6", "test input", "test_output");
- // testOpHtml(browser, "Magic", "dGVzdCBvdXRwdXQ=", "td", /Result snippet/);
- testOpHtml(browser, "Magic", "dGVzdCBvdXRwdXQ=", "tr:{1} td:{2}", "Result snippet");
+ testOpHtml(browser, "Magic", "dGVzdF9vdXRwdXQ=", "tr:nth-of-type(1) th:nth-of-type(2)", "Result snippet");
+ testOpHtml(browser, "Magic", "dGVzdF9vdXRwdXQ=", "tr:nth-of-type(2) td:nth-of-type(2)", "test_output");
+ testOpHtml(browser, "Magic", "dGVzdF9vdXRwdXQ=", "tr:nth-of-type(2) td:nth-of-type(1)", /Base64/);
// testOp(browser, "Mean", "test input", "test_output");
// testOp(browser, "Median", "test input", "test_output");`
// testOp(browser, "Merge", "test input", "test_output");`
@@ -374,26 +375,30 @@ module.exports = {
}
};
-/**
+/** @function
* Clears the current recipe and bakes a new operation.
*
- * @param {string} opName
- * @param {Browser} browser
+ * @param {Browser} browser - Nightwatch client
+ * @param {string|Array<string>} opName - name of operation to be tested, array for pre & post ops
+ * @param {string} input - input text for test
+ * @param {Array.<string>} args - arguments for test
*/
function bakeOp(browser, opName, input, args=[]) {
- let recipeConfig;
+ let op, recipeConfig;
/*
* Create recipeConfig as single operation
* or wrapped with a pre-op and
* possibly a post-op too
*/
if (typeof(opName) === "string") {
+ op = opName;
recipeConfig = JSON.stringify([{
"op": opName,
"args": args
}]);
} else if (opName.length === 2) {
+ op = opName[1];
recipeConfig = JSON.stringify([{
"op": opName[0],
"args": []
@@ -402,6 +407,7 @@ function bakeOp(browser, opName, input, args=[]) {
"args": args
}]);
} else {
+ op = opName[1];
recipeConfig = JSON.stringify([{
"op": opName[0],
"args": []
@@ -411,7 +417,6 @@ function bakeOp(browser, opName, input, args=[]) {
}, {
"op": opName[2],
"args": []
-
}]);
}
@@ -419,18 +424,22 @@ function bakeOp(browser, opName, input, args=[]) {
.useCss()
.click("#clr-recipe")
.click("#clr-io")
+ .perform(function() {
+ console.log("\nCurrent Operation: ", op);
+ })
.waitForElementNotPresent("#rec-list li.operation")
.expect.element("#input-text").to.have.property("value").that.equals("");
+ let currentUrl;
browser
.urlHash("recipe=" + recipeConfig)
+ // get the current URL
.url(function(result) {
currentUrl = result;
})
+ // and put it out
.perform(function() {
- console.log(currentUrl);
- console.log(opName);
- console.log(recipeConfig);
+ console.log("Current URL: ", currentUrl.value);
})
.setValue("#input-text", input)
.waitForElementPresent("#rec-list li.operation")
@@ -443,22 +452,16 @@ function bakeOp(browser, opName, input, args=[]) {
.pause(100)
.waitForElementPresent("#stale-indicator.hidden", 5000)
.waitForElementNotVisible("#output-loader", 5000);
-
- let currentUrl="";
- browser
- .url(function(result) {
- currentUrl = result;
- })
- .perform(function() {
- console.log(currentUrl.value);
- });
}
-/**
+/** @function
* Clears the current recipe and tests a new operation.
*
- * @param {string} opName
- * @param {Browser} browser
+ * @param {Browser} browser - Nightwatch client
+ * @param {string|Array<string>} opName - name of operation to be tested, array for pre & post ops
+ * @param {string} input - input text for test
+ * @param {string} output - expected output
+ * @param {Array.<string>} args - arguments for test
*/
function testOp(browser, opName, input, output, args=[]) {
@@ -471,19 +474,23 @@ function testOp(browser, opName, input, output, args=[]) {
}
}
-/**
+/** @function
* Clears the current recipe and tests a new operation.
*
- * @param {string} opName
- * @param {Browser} browser
+ * @param {Browser} browser - Nightwatch client
+ * @param {string} opName - name of operation to be tested
+ * @param {string} input - input text for test
+ * @param {string} cssSelector - CSS selector for HTML output
+ * @param {string} output - expected output
+ * @param {Array.<string>} args - arguments for test
*/
-function testOpHtml(browser, opName, input, element, output, args=[]) {
+function testOpHtml(browser, opName, input, cssSelector, output, args=[]) {
bakeOp(browser, opName, input, args);
- browser.waitForElementPresent("#output-html", 5000);
+
if (typeof output === "string") {
- browser.expect.element("#output-html " + element).to.have.value.that.equals(output);
+ browser.expect.element("#output-html " + cssSelector).text.that.equals(output);
} else if (output instanceof RegExp) {
- browser.expect.element("#output-html " + element).to.have.value.that.matches(output);
+ browser.expect.element("#output-html " + cssSelector).text.that.matches(output);
}
}
| 0 |
diff --git a/packages/dashboard/src/app/views/myStories/content/storyGridItem/index.js b/packages/dashboard/src/app/views/myStories/content/storyGridItem/index.js @@ -141,7 +141,7 @@ const StoryGridItem = ({
ref={(el) => {
itemRefs.current[story.id] = el;
}}
- title={sprintf(
+ aria-label={sprintf(
/* translators: %s: story title.*/
__('Details about %s', 'web-stories'),
formattedTitle
| 4 |
diff --git a/token-metadata/0xd28cFec79dB8d0A225767D06140aee280718AB7E/metadata.json b/token-metadata/0xd28cFec79dB8d0A225767D06140aee280718AB7E/metadata.json "symbol": "BZKY",
"address": "0xd28cFec79dB8d0A225767D06140aee280718AB7E",
"decimals": 16,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/client/js/components/Admin/ImportData/GrowiZipImportForm.jsx b/src/client/js/components/Admin/ImportData/GrowiZipImportForm.jsx @@ -350,17 +350,17 @@ class GrowiImportForm extends React.Component {
return (
<div className="row">
{collectionNames.map((collectionName) => {
- const collectionProgress = progressMap[collectionName] || {};
- const errors = errorsMap[collectionName] || [];
+ const collectionProgress = progressMap[collectionName];
+ const errors = errorsMap[collectionName];
return (
<div className="col-xs-6 my-1" key={collectionName}>
<GrowiZipImportItem
isImporting={isImporting}
- isImported={isImported}
- insertedCount={collectionProgress.insertedCount}
- modifiedCount={collectionProgress.modifiedCount}
- errorsCount={errors.length}
+ isImported={collectionProgress ? isImported : false}
+ insertedCount={collectionProgress ? collectionProgress.insertedCount : 0}
+ modifiedCount={collectionProgress ? collectionProgress.modifiedCount : 0}
+ errorsCount={errors ? errors.length : 0}
collectionName={collectionName}
isSelected={selectedCollections.has(collectionName)}
| 7 |
diff --git a/ui/js/component/common.js b/ui/js/component/common.js @@ -72,26 +72,28 @@ export class CreditAmount extends React.PureComponent {
};
static defaultProps = {
- precision: 3,
+ precision: 2,
label: true,
showFree: false,
look: "indicator",
};
render() {
- const formattedAmount = formatCredits(
- this.props.amount,
- this.props.precision
- );
+ const minimumRenderableAmount = Math.pow(10, -1 * this.props.precision);
+ const { amount, precision } = this.props;
+
+ let formattedAmount = amount > 0 && amount < minimumRenderableAmount
+ ? "<" + minimumRenderableAmount
+ : formatCredits(amount, precision);
let amountText;
- if (this.props.showFree && parseFloat(formattedAmount) === 0) {
+ if (this.props.showFree && parseFloat(this.props.amount) === 0) {
amountText = __("free");
} else if (this.props.label) {
amountText =
formattedAmount +
" " +
- (parseFloat(formattedAmount) == 1 ? __("credit") : __("credits"));
+ (parseFloat(amount) == 1 ? __("credit") : __("credits"));
} else {
amountText = formattedAmount;
}
| 12 |
diff --git a/packages/rmw-shell/src/components/MenuHeader/MenuHeader.js b/packages/rmw-shell/src/components/MenuHeader/MenuHeader.js @@ -6,24 +6,6 @@ import { useTheme as useAppTheme } from 'material-ui-shell/lib/providers/Theme'
import { makeStyles, useTheme } from '@material-ui/core/styles'
import clsx from 'clsx'
-/* import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown'
-import ArrowDropUpIcon from '@material-ui/icons/ArrowDropUp'
-import Brightness4Icon from '@material-ui/icons/Brightness4'
-import BrightnessHighIcon from '@material-ui/icons/BrightnessHigh'
-import ChevronLeft from '@material-ui/icons/ChevronLeft'
-import ChevronRight from '@material-ui/icons/ChevronRight'
-import ChromeReaderMode from '@material-ui/icons/ChromeReaderMode'
-import PersonIcon from '@material-ui/icons/Person'
- */
-/*
-import Avatar from '@material-ui/core/Avatar'
-import IconButton from '@material-ui/core/IconButton'
-import List from '@material-ui/core/List'
-import ListItem from '@material-ui/core/ListItem'
-import ListItemAvatar from '@material-ui/core/ListItemAvatar'
-import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction'
-import ListItemText from '@material-ui/core/ListItemText'
-import Paper from '@material-ui/core/Paper' */
import {
Avatar,
IconButton,
@@ -86,9 +68,7 @@ const MenuHeader = () => {
isMiniSwitchVisibility,
isAuthMenuOpen,
isAuthMenuOpen,
- // setAuthMenuOpen,
} = useMenu()
- // } = useContext(MenuContext)
const isAuthenticated = auth.isAuthenticated
@@ -104,7 +84,6 @@ const MenuHeader = () => {
<ListItemAvatar
onClick={() => {
toggleThis('isAuthMenuOpen')
- // setAuthMenuOpen(!isAuthMenuOpen)
}}
>
<Avatar src={authData.photoURL} alt="user" />
@@ -113,7 +92,6 @@ const MenuHeader = () => {
{!authData.photoURL && (
<ListItemAvatar
onClick={() => {
- // setAuthMenuOpen(!isAuthMenuOpen)
toggleThis('isAuthMenuOpen')
}}
>
@@ -132,26 +110,18 @@ const MenuHeader = () => {
<ListItemSecondaryAction>
<IconButton
onClick={() => {
- // setType(type === 'light' ? 'dark' : 'light')
toggleThisTheme('isDarkMode')
}}
>
-{/* {type === 'light' && (
- <Brightness4Icon classes={{ root: classes.icon }} />
- )}
- {type === 'dark' && (
- <BrightnessHighIcon classes={{ root: classes.icon }} />
- )} */}
{isDarkMode
? <BrightnessHighIcon classes={{ root: classes.icon }} />
: <Brightness4Icon classes={{ root: classes.icon }} />}
</IconButton>
- {/* menuStore.menuOpen *//* isDesktop */isMenuOpen /*james- check which works better */ && (
+ {isMenuOpen /* james-pretty sure this isn't needed */&& (
<>
{isMiniSwitchVisibility && (
<IconButton
onClick={() => {
- // setMiniMode(dispatch, true)
toggleThis('isMiniMode', true)
toggleThis('isMenuOpen', false)
}}
@@ -162,16 +132,9 @@ const MenuHeader = () => {
<IconButton
color="inherit"
onClick={() => {
- // setMenuOpen(dispatch,true)
toggleThis('isMenuOpen', false)
}}
>
-{/* {theme.direction === 'rtl' && (
- <ChevronRight classes={{ root: classes.icon }} />
- )}
- {theme.direction !== 'rtl' && (
- <ChevronLeft classes={{ root: classes.icon }} />
- )} */}
{isRTL
? <ChevronRight classes={{ root: classes.icon }} />
: <ChevronLeft classes={{ root: classes.icon }} />}
@@ -182,26 +145,21 @@ const MenuHeader = () => {
)}
</ListItem>
)}
-
{isAuthenticated && (
<ListItem
onClick={() => {
- // setAuthMenuOpen(!isAuthMenuOpen)
toggleThis('isAuthMenuOpen')
}}
>
- {/* {!menuStore.menuOpen && isDesktop && authData.photoURL && ( */}
{!isMenuOpen && isMiniMode && isDesktop && (
<ListItemAvatar>
<Avatar
src={authData.photoURL}
alt="person"
- //style={{ marginLeft: 0, marginTop: 0 }}
/>
</ListItemAvatar>
)}
-
- {/* !menuStore.miniMode */!isMiniMode && (
+ {!isMiniMode && (
<ListItemText
classes={{
primary: classes.listItem,
@@ -209,7 +167,7 @@ const MenuHeader = () => {
}}
style={{
marginLeft:
- !isMenuOpen /* menuStore.menuOpen */ && isDesktop && authData.photoURL
+ !isMenuOpen && isDesktop && authData.photoURL
? 7
: undefined,
}}
@@ -217,20 +175,13 @@ const MenuHeader = () => {
secondary={authData.email}
/>
)}
- {/* menuStore.menuOpen */isMenuOpen && (
+ {isMenuOpen && (
<ListItemSecondaryAction
onClick={() => {
- // setAuthMenuOpen(!isAuthMenuOpen)
toggleThis('isAuthMenuOpen')
}}
>
<IconButton>
-{/* {isAuthMenuOpen && (
- <ArrowDropUpIcon classes={{ root: classes.icon }} />
- )}
- {!isAuthMenuOpen && (
- <ArrowDropDownIcon classes={{ root: classes.icon }} />
- )} */}
{isAuthMenuOpen
? <ArrowDropUpIcon classes={{ root: classes.icon }} />
: <ArrowDropDownIcon classes={{ root: classes.icon }} />}
| 2 |
diff --git a/examples/js/acroforms.js b/examples/js/acroforms.js -/* global jsPDF, ComboBox, ListBox, CheckBox, PushButton, TextField, PasswordField, RadioButton, AcroForm */
+/* global jsPDF */
var doc = new jsPDF();
+var {
+ ComboBox,
+ ListBox,
+ CheckBox,
+ PushButton,
+ TextField,
+ PasswordField,
+ RadioButton,
+ Appearance,
+} = jsPDF.AcroForm;
doc.setFontSize(12);
doc.text("ComboBox:", 10, 105);
@@ -66,4 +76,4 @@ radioButton2.Rect = [50, 180, 30, 10];
var radioButton3 = radioGroup.createOption("Test3");
radioButton3.Rect = [50, 190, 20, 10];
-radioGroup.setAppearance(AcroForm.Appearance.RadioButton.Cross);
+radioGroup.setAppearance(Appearance.RadioButton.Cross);
| 4 |
diff --git a/README.md b/README.md @@ -46,7 +46,7 @@ Also check out [No Whiteboards](https://nowhiteboards.io) to search for jobs at
- [Adthena](http://adthena.com) | London, UK | Takehome project and discussion on-site
- [AdWyze](https://angel.co/adwyze/jobs) | Bangalore, India | Short takehome project + (for fulltime) onsite pairing
- [AeroFS](https://www.aerofs.com/company/careers) | San Francisco, CA | Short takehome project + phone interview
-- [Affinity](https://affinity.recruiterbox.com/#content) | San Francisco, CA | Implementation of a children's game, then take-home project OR real-world design questions
+- [Affinity](https://www.affinity.co/company/careers) | San Francisco, CA | Implementation of a children's game, then take-home project OR real-world design questions
- [Ageno](https://ageno.pl) | Bielsko-Biala, Poland | Simple Magento Take-home project and discussion on the real world problems.
- [AgileMD](https://angel.co/agilemd/jobs) | San Francisco, CA | Takehome project
- [Agoda](https://careersatagoda.com/departments/technology) | Bangkok, Thailand | Take-home project, then a discussion onsite round.
| 1 |
diff --git a/ui/app/actions.js b/ui/app/actions.js @@ -745,26 +745,27 @@ function updateGasData ({
}) {
return (dispatch) => {
dispatch(actions.gasLoadingStarted())
- let gasPrice
return new Promise((resolve, reject) => {
background.getGasPrice((err, data) => {
- if (err !== null) return reject(err)
+ if (err) return reject(err)
return resolve(data)
})
})
.then(estimateGasPrice => {
- gasPrice = estimateGasPrice
- return estimateGas({
+ return Promise.all([
+ Promise.resolve(estimateGasPrice),
+ estimateGas({
estimateGasMethod: background.estimateGas,
blockGasLimit,
selectedAddress,
selectedToken,
to,
value,
- gasPrice,
+ estimateGasPrice,
+ }),
+ ])
})
- })
- .then(gas => {
+ .then(([gasPrice, gas]) => {
dispatch(actions.setGasPrice(gasPrice))
dispatch(actions.setGasLimit(gas))
return calcGasTotal(gas, gasPrice)
| 7 |
diff --git a/README.md b/README.md @@ -13,7 +13,9 @@ Works with HTML, Markdown, Liquid, Nunjucks, Handlebars, Mustache, EJS, Haml, Pu
- Support [11ty on Open Collective](https://opencollective.com/11ty)
- [11ty on npm](https://www.npmjs.com/org/11ty)
- [11ty on GitHub](https://github.com/11ty)
-- [11ty/eleventy on Travis CI](https://travis-ci.org/11ty/eleventy)
+- Continuous Integration:
+ - [Travis CI](https://travis-ci.org/11ty/eleventy)
+ - [GitHub Actions](https://github.com/11ty/eleventy/actions?query=workflow%3A.github%2Fworkflows%2Fci.yml)
[](https://www.npmjs.com/package/@11ty/eleventy) [](https://github.com/11ty/eleventy/issues) [](https://github.com/prettier/prettier) [](https://www.npmjs.com/package/@11ty/eleventy)
| 0 |
diff --git a/policykit/integrations/slack/models.py b/policykit/integrations/slack/models.py @@ -21,6 +21,9 @@ SLACK_PROPOSE_PERMS = ['Can add slack post message', 'Can add slack schedule mes
SLACK_EXECUTE_PERMS = ['Can execute slack post message', 'Can execute slack schedule message', 'Can execute slack rename conversation', 'Can execute slack kick conversation', 'Can execute slack join conversation', 'Can execute slack pin message']
+class SlackUser(CommunityUser):
+ pass
+
class SlackCommunity(Community):
API = 'https://slack.com/api/'
@@ -53,7 +56,7 @@ class SlackCommunity(Community):
def execute_platform_action(self, action, delete_policykit_post=True):
- from policyengine.models import LogAPICall, CommunityUser
+ from policyengine.models import LogAPICall
from policyengine.views import clean_up_proposals
obj = action
@@ -87,7 +90,7 @@ class SlackCommunity(Community):
if obj.AUTH == "user":
data['token'] = action.proposal.author.access_token
if not data['token']:
- admin_user = CommunityUser.objects.filter(is_community_admin=True)[0]
+ admin_user = SlackUser.objects.filter(community=action.community, is_community_admin=True)[0]
data['token'] = admin_user.access_token
elif obj.AUTH == "admin_bot":
if action.proposal.author.is_community_admin:
@@ -95,7 +98,7 @@ class SlackCommunity(Community):
else:
data['token'] = self.access_token
elif obj.AUTH == "admin_user":
- admin_user = CommunityUser.objects.filter(is_community_admin=True)[0]
+ admin_user = SlackUser.objects.filter(community=action.community, is_community_admin=True)[0]
data['token'] = admin_user.access_token
else:
data['token'] = self.access_token
@@ -123,7 +126,7 @@ class SlackCommunity(Community):
posted_action = action
if posted_action.community_post:
- admin_user = CommunityUser.objects.filter(is_community_admin=True)[0]
+ admin_user = SlackUser.objects.filter(community=action.community, is_community_admin=True)[0]
values = {'token': admin_user.access_token,
'ts': posted_action.community_post,
'channel': obj.channel
@@ -142,9 +145,6 @@ class SlackCommunity(Community):
clean_up_proposals(action, True)
-class SlackUser(CommunityUser):
- pass
-
class SlackPostMessage(PlatformAction):
ACTION = 'chat.postMessage'
AUTH = 'admin_bot'
@@ -160,7 +160,7 @@ class SlackPostMessage(PlatformAction):
)
def revert(self):
- admin_user = SlackUser.objects.filter(is_community_admin=True)[0]
+ admin_user = SlackUser.objects.filter(community=self.community, is_community_admin=True)[0]
values = {'token': admin_user.access_token,
'ts': self.time_stamp,
'channel': self.channel
@@ -218,7 +218,7 @@ class SlackJoinConversation(PlatformAction):
)
def revert(self):
- admin_user = SlackUser.objects.filter(is_community_admin=True)[0]
+ admin_user = SlackUser.objects.filter(community=self.community, is_community_admin=True)[0]
values = {'user': self.users,
'token': admin_user.access_token,
'channel': self.channel
| 1 |
diff --git a/apps/dg/components/graph/data_model/attribute_stats.js b/apps/dg/components/graph/data_model/attribute_stats.js @@ -295,7 +295,7 @@ DG.AttributeStats = SC.Object.extend(
// We have to determine whether iCaseValue is a date.
// If it is numeric, it is not a date
var tValue = Number(iCaseValue);
- tDataIsDateTime = tDataIsDateTime && (DG.isDate(iCaseValue) || DG.isDateString( iCaseValue));
+ tDataIsDateTime = tDataIsDateTime && (SC.empty(iCaseValue) || DG.isDate(iCaseValue) || DG.isDateString( iCaseValue));
if (!SC.empty(iCaseValue) && (typeof iCaseValue !== 'boolean') && isFinite(tValue)) {
tNumericCaseCount++;
if (tValue < tMin) tMin = tValue;
@@ -308,7 +308,7 @@ DG.AttributeStats = SC.Object.extend(
tPositiveMax = Math.max(tValue, tPositiveMax);
}
}
- else if (tDataIsDateTime) {
+ else if (tDataIsDateTime && (!SC.empty(iCaseValue))) {
var tDate = DG.isDate( iCaseValue) ? iCaseValue : DG.createDate( iCaseValue);
tNumericCaseCount++;
if (tDate.valueOf() < tMin) tMin = tDate.valueOf();
| 7 |
diff --git a/test/slack/renderer/messageBuilderGenerator.js b/test/slack/renderer/messageBuilderGenerator.js @@ -8,8 +8,6 @@ const path = require('path');
const { named } = require('named-regexp');
const RJSON = require('relaxed-json');
-process.setMaxListeners(0);
-
async function getMessageBuilderImage(page, message, localPath) {
await page.goto(`https://api.slack.com/docs/messages/builder?msg=${encodeURIComponent(message)}`);
await page.waitForNavigation({ waitUntil: 'networkidle' });
@@ -17,7 +15,9 @@ async function getMessageBuilderImage(page, message, localPath) {
// https://github.com/GoogleChrome/puppeteer/issues/306#issuecomment-322929342
async function screenshotDOMElement(selector, padding = 0) {
+ // eslint-disable-next-line no-shadow
const rect = await page.evaluate((selector) => {
+ // eslint-disable-next-line no-undef
const element = document.querySelector(selector);
const { x, y, width, height } = element.getBoundingClientRect();
return { left: x, top: y, width, height, id: element.id };
@@ -38,11 +38,12 @@ async function getMessageBuilderImage(page, message, localPath) {
}
async function main() {
+ console.log('Getting images from message builder');
const blackList = ['AbstractIssue', 'Message'];
const browser = await puppeteer.launch({ headless: true });
const page = await browser.newPage();
page.setViewport({ width: 1000, height: 600, deviceScaleFactor: 2 });
- let snapshotsByFile = {}
+ const snapshotsByFile = {};
fs.readdirSync(path.join(__dirname, '__snapshots__')).forEach(async (file) => {
// eslint-disable-next-line no-useless-escape
const match = named(new RegExp('^(:<class>[A-Za-z]+).test\.js\.snap')).exec(file);
@@ -56,6 +57,7 @@ async function main() {
fs.mkdirSync(path.join(__dirname, folderName));
}
+ // eslint-disable-next-line
const snapshots = require(path.join(__dirname, `__snapshots__/${file}`));
Object.keys(snapshots).forEach((snapshot) => {
const cleaned = snapshots[snapshot]
@@ -69,6 +71,7 @@ async function main() {
snapshotsByFile[`${folderName}/${snapshot}.png`] = message;
// below code is to generate examples.md. To be re-integrated somewhere else
// const dataToAppend = `<a href="https://api.slack.com/docs/messages/builder?msg=${encodeURIComponent(JSON.stringify(message))}">${snapshot}</a>\n\n`;
+ // eslint-disable-next-line max-len
// fs.appendFile(path.join(__dirname, '../../../lib/slack/renderer/examples.md'), dataToAppend, (err) => {
// if (err) throw err;
// });
@@ -85,6 +88,7 @@ async function main() {
}
/* eslint-enable */
await browser.close();
+ console.log('Message builder fetching complete!');
}
main();
| 8 |
diff --git a/generators/entity-client/files.js b/generators/entity-client/files.js @@ -95,7 +95,7 @@ const angularFiles = {
},
{
file: 'entities/entity.service.ts',
- renameTo: generator => `entities/${generator.entityFolderName}/${generator.entityServiceFileName}.service.ts`
+ renameTo: generator => `entities/${generator.entityFolderName}/${generator.entityFileName}.service.ts`
}
]
}
| 2 |
diff --git a/src/components/TopBar/Controls.js b/src/components/TopBar/Controls.js @@ -81,7 +81,7 @@ export const Controls = controlsInjector(observer(({ store, history, annotation
const submitDisabled = store.hasInterface("annotations:deny-empty") && results.length === 0;
const RejectButton = useMemo(() => {
- if (isFF(FF_DEV_1593)) {
+ if (isFF(FF_DEV_1593) && store.hasInterface("comments:reject")) {
return (
<ActionDialog
type="reject"
| 4 |
diff --git a/protocols/swap/package.json b/protocols/swap/package.json "@airswap/types": "0.1.0",
"openzeppelin-solidity": "^v2.2",
"solidity-coverage": "^0.6.3",
- "solidity-docgen": "0.3.0-beta.3"
+ "solidity-docgen": "0.3.0-beta.3",
+ "truffle-flattener": "^1.4.0",
+ "truffle-hdwallet-provider-privkey": "1.0.3",
+ "truffle": "^5.0.30"
}
}
| 2 |
diff --git a/src/v2-routes/v2-rockets.js b/src/v2-routes/v2-rockets.js @@ -23,34 +23,4 @@ v2.get("/:rocket", asyncHandle(async (req, res) => {
res.json(data)
}))
-// // Returns Falcon 1 info
-// v2.get("/falcon1", (req, res, next) => {
-// global.db.collection("rocket").find({"id": "falcon1"},{"_id": 0 }).toArray((err, doc) => {
-// if (err) {
-// return next(err)
-// }
-// res.json(doc[0])
-// })
-// })
-
-// // Returns Falcon 9 info
-// v2.get("/falcon9", (req, res, next) => {
-// global.db.collection("rocket").find({"id": "falcon9"},{"_id": 0 }).toArray((err, doc) => {
-// if (err) {
-// return next(err)
-// }
-// res.json(doc[0])
-// })
-// })
-
-// // Returns Falcon Heavy info
-// v2.get("/falconheavy", (req, res, next) => {
-// global.db.collection("rocket").find({"id": "falconheavy"},{"_id": 0 }).toArray((err, doc) => {
-// if (err) {
-// return next(err)
-// }
-// res.json(doc[0])
-// })
-// })
-
module.exports = v2
| 3 |
diff --git a/app/src/renderer/components/staking/PageBond.vue b/app/src/renderer/components/staking/PageBond.vue @@ -16,7 +16,7 @@ page.page-bond(title="Bond Atoms")
span(v-if="willUnbondAtoms > 0")
| You will begin unbonding #[.reserved-atoms__number {{ willUnbondAtoms }}] atoms, which will be available in 30 days.
span
- | #[a(@click="resetAlloc") (start over?)]
+ | #[a.reserved-atoms__restart(@click="resetAlloc") (start over?)]
form-struct(:submit="onSubmit")
form-group(v-for='(delegate, index) in fields.delegates' key='delegate.id'
@@ -214,11 +214,14 @@ export default {
margin 0 0 1rem
color dim
-.reserved-atoms__number
+ &__number
display inline
color bright
font-weight 500
-.reserved-atoms__number--error
+ &__number--error
color danger
+
+ &__restart
+ cursor pointer
</style>
| 7 |
diff --git a/src/views/navbar/index.js b/src/views/navbar/index.js @@ -129,10 +129,6 @@ class Navbar extends Component {
notifications &&
notifications.length > 0 &&
notifications
- .filter(
- notification =>
- notification.context.type !== 'DIRECT_MESSAGE_THREAD'
- )
.filter(notification => notification.isSeen === false)
.filter(notification => {
// SEE NOTE ABOVE
| 1 |
diff --git a/apps/authentiwatch/app.js b/apps/authentiwatch/app.js @@ -115,7 +115,7 @@ function drawToken(id, r) {
var y1 = r.y;
var x2 = r.x + r.w - 1;
var y2 = r.y + r.h - 1;
- var adj;
+ var adj, sz;
g.setClipRect(Math.max(x1, Bangle.appRect.x ), Math.max(y1, Bangle.appRect.y ),
Math.min(x2, Bangle.appRect.x2), Math.min(y2, Bangle.appRect.y2));
if (id == state.curtoken) {
@@ -135,7 +135,7 @@ function drawToken(id, r) {
adj = (y1 + y2) / 2;
}
g.clearRect(x1, y1, x2, y2);
- g.drawString(tokens[id].label, (x1 + x2) / 2, adj, false);
+ g.drawString(tokens[id].label.substr(0, 10), (x1 + x2) / 2, adj, false);
if (id == state.curtoken) {
if (tokens[id].period > 0) {
// timed - draw progress bar
@@ -149,7 +149,10 @@ function drawToken(id, r) {
adj = 5;
}
// digits just below label
- g.setFont("Vector", (state.otp.length > 8) ? 26 : 30);
+ sz = 30;
+ do {
+ g.setFont("Vector", sz--);
+ } while (g.stringWidth(state.otp) > r.w);
g.drawString(state.otp, (x1 + x2) / 2 + adj, y1 + 16, false);
}
// shaded lines top and bottom
| 7 |
diff --git a/test/useTranslation.ready.spec.js b/test/useTranslation.ready.spec.js @@ -71,6 +71,10 @@ describe('useTranslation', () => {
it('should ignore suspense if failed loading ns and no fallback lng is defined', () => {
const instance2 = { ...instance };
+ instance2.services.backendConnector = {
+ backend: {},
+ state: { 'en|notLoadedNS': -1 },
+ };
instance2.services.options = { fallbackLng: false };
const { result } = renderHook(() =>
useTranslation(['notLoadedNS', 'alreadyLoadedNS'], { i18n: instance2 }),
| 1 |
diff --git a/validators/tsv.js b/validators/tsv.js @@ -77,7 +77,7 @@ var TSV = function TSV(file, contents, fileList, callback) {
file: file,
evidence: row,
line: i + 1,
- character: 'at column # ' + (j + 1),
+ reason: 'at column # ' + (j + 1),
code: 23,
}),
)
@@ -95,7 +95,7 @@ var TSV = function TSV(file, contents, fileList, callback) {
file: file,
evidence: row,
line: i + 1,
- character: 'at column # ' + (j + 1),
+ reason: 'at column # ' + (j + 1),
code: 24,
}),
)
@@ -309,7 +309,7 @@ var checkage89_plus = function(rows, file, issues) {
file: file,
evidence: line,
line: a + 1,
- character: 'age of partcipant is above 89 ',
+ reason: 'age of partcipant is above 89 ',
code: 56,
}),
)
@@ -333,7 +333,7 @@ const checkAcqTimeFormat = function(rows, file, issues) {
file: file,
evidence: file,
line: i + 2,
- character: 'acq_time is not in the format YYYY-MM-DDTHH:mm:ss ',
+ reason: 'acq_time is not in the format YYYY-MM-DDTHH:mm:ss ',
code: 84,
}),
)
| 5 |
diff --git a/versions/3.0.md b/versions/3.0.md @@ -411,15 +411,15 @@ All objects defined within the components object will have no effect on the API
Field Name | Type | Description
---|:---|---
-<a name="componentsSchemas"></a> schemas | Map[`string`, [Schema Object](#schemaObject)] | An object to hold reusable [Schema Objects](#schemaObject).
-<a name="componentsResponses"></a> responses | Map[`string`, [Response Object](#responseObject)] | An object to hold reusable [Response Objects](#responseObject).
-<a name="componentsParameters"></a> parameters | Map[`string`, [Parameter Object](#parameterObject)] | An object to hold reusable [Parameter Objects](#parameterObject).
-<a name="componentsExamples"></a> examples | Map[`string`, [Example Object](#exampleObject)] | An object to hold reusable [Example Objects](#exampleObject).
-<a name="componentsRequestBodies"></a> requestBodies | Map[`string`, [Request Body Object](#requestBodyObject)] | An object to hold reusable [Request Body Objects](#requestBodyObject).
-<a name="componentsHeaders"></a> headers | Map[`string`, [Header Object](#headerObject)] | An object to hold reusable [Header Objects](#headerObject).
-<a name="componentsSecuritySchemes"></a> securitySchemes| Map[`string`, [Security Scheme Object](#securitySchemeObject)] | An object to hold reusable [Security Scheme Objects](#securitySchemeObject).
-<a name="componentsLinks"></a> links | Map[`string`, [Link Object](#linkObject)] | An object to hold reusable [Link Objects](#linkObject).
-<a name="componentsCallbacks"></a> callbacks | Map[`string`, [Callback Object](#callbackObject)] | An object to hold reusable [Callback Objects](#callbackObject).
+<a name="componentsSchemas"></a> schemas | Map[`string`, [Schema Object](#schemaObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Schema Objects](#schemaObject).
+<a name="componentsResponses"></a> responses | Map[`string`, [Response Object](#responseObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Response Objects](#responseObject).
+<a name="componentsParameters"></a> parameters | Map[`string`, [Parameter Object](#parameterObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Parameter Objects](#parameterObject).
+<a name="componentsExamples"></a> examples | Map[`string`, [Example Object](#exampleObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Example Objects](#exampleObject).
+<a name="componentsRequestBodies"></a> requestBodies | Map[`string`, [Request Body Object](#requestBodyObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Request Body Objects](#requestBodyObject).
+<a name="componentsHeaders"></a> headers | Map[`string`, [Header Object](#headerObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Header Objects](#headerObject).
+<a name="componentsSecuritySchemes"></a> securitySchemes| Map[`string`, [Security Scheme Object](#securitySchemeObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Security Scheme Objects](#securitySchemeObject).
+<a name="componentsLinks"></a> links | Map[`string`, [Link Object](#linkObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Link Objects](#linkObject).
+<a name="componentsCallbacks"></a> callbacks | Map[`string`, [Callback Object](#callbackObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Callback Objects](#callbackObject).
This object can be extended with [Specification Extensions](#specificationExtensions).
| 11 |
diff --git a/learn/what_is_meilisearch/features.md b/learn/what_is_meilisearch/features.md @@ -20,11 +20,11 @@ Instead of letting typos ruin your search experience, Meilisearch will always fi
## Geosearch
-Explore the physical world. [Geosearch](/learn/advanced/geosearch.md) allows you to filter and sort results based on their physical location.
+Explore the physical world. [Geosearch](/learn/advanced/geosearch.md) allows you to filter and sort results based on their geographic location.
## Filters
-Define [filters](/learn/advanced/filtering_and_faceted_search.md) to refine results based on user-defined criteria.
+Create [filters](/learn/advanced/filtering_and_faceted_search.md) to refine results based on user-defined criteria.
## Faceting
@@ -60,4 +60,4 @@ Manage complex multi-user applications handling sensitive data. [Tenant tokens](
## Index swapping
-Deploy major database updates with zero search downtime! Our [index swapping](/learn/core_concepts/indexes.md#swapping-indexes) functionality helps you make big changes seamlessly.
+Use [index swapping](/learn/core_concepts/indexes.md#swapping-indexes) to deploy major database updates with zero search downtime.
| 7 |
diff --git a/contracts/IssuanceController.sol b/contracts/IssuanceController.sol @@ -304,7 +304,7 @@ contract IssuanceController is SafeDecimalMath, SelfDestructible, Pausable {
returns (uint)
{
uint nominsReceived = nomin.amountReceived(amount);
- return safeMul_dec(safeDiv_dec(nominsReceived, usdToHavPrice), UNIT);
+ return safeDiv_dec(nominsReceived, usdToHavPrice);
}
/**
| 2 |
diff --git a/src/components/FormAlertWithSubmitButton.js b/src/components/FormAlertWithSubmitButton.js @@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
import styles from '../styles/styles';
import Button from './Button';
import FormAlertWrapper from './FormAlertWrapper';
-import OfflineIndicator from './OfflineIndicator';
const propTypes = {
/** Text for the button */
@@ -45,21 +44,19 @@ const defaultProps = {
const FormAlertWithSubmitButton = props => (
<FormAlertWrapper
- containerStyles={[styles.mh5, styles.flex1, styles.justifyContentEnd, ...props.containerStyles]}
+ containerStyles={[styles.mh5, styles.mb5, styles.flex1, styles.justifyContentEnd, ...props.containerStyles]}
isAlertVisible={props.isAlertVisible}
isMessageHtml={props.isMessageHtml}
message={props.message}
onFixTheErrorsPressed={props.onFixTheErrorsPressed}
>
{isOffline => (isOffline ? (
- <>
<Button
success
isDisabled
text={props.buttonText}
+ style={[styles.mb3]}
/>
- <OfflineIndicator containerStyles={[styles.mv1]} />
- </>
) : (
<Button
success
| 13 |
diff --git a/deepfence_agent/tools/apache/scope/probe/host/secret_scanner.go b/deepfence_agent/tools/apache/scope/probe/host/secret_scanner.go @@ -157,6 +157,8 @@ func getAndPublishSecretScanResults(client pb.SecretScannerClient, req pb.FindRe
if err != nil {
secretScanLogDoc["scan_status"] = "ERROR"
secretScanLogDoc["scan_message"] = err.Error()
+ secretScanLogDoc["time_stamp"] = getTimestamp()
+ secretScanLogDoc["@timestamp"] = getCurrentTime()
byteJson, _ = json.Marshal(secretScanLogDoc)
ingestScanData(string(byteJson), secretScanLogsIndexName)
return
| 3 |
diff --git a/src/js/vdom_hoz.js b/src/js/vdom_hoz.js @@ -42,10 +42,10 @@ VDomHoz.prototype.compatabilityCheck = function(){
ok = false;
}
- if(options.rowFormatter){
- console.warn("Horizontal Vitrual DOM is not compatible with row formatters");
- ok = false;
- }
+ // if(options.rowFormatter){
+ // console.warn("Horizontal Vitrual DOM is not compatible with row formatters");
+ // ok = false;
+ // }
if(options.columns){
frozen = options.columns.find((col) => {
| 11 |
diff --git a/src/resources/views/base/inc/sidebar.blade.php b/src/resources/views/base/inc/sidebar.blade.php <script>
// Set active state on menu element
var full_url = "{{ Request::fullUrl() }}";
- var $navLinks = $(".sidebar-nav li a, header li a");
+ var $navLinks = $(".sidebar-nav li a, .app-header li a");
// First look for an exact match including the search string
var $curentPageLink = $navLinks.filter(
| 5 |
diff --git a/src/core/operations/XPathExpression.mjs b/src/core/operations/XPathExpression.mjs @@ -57,7 +57,7 @@ class XPathExpression extends Operation {
let nodes;
try {
- nodes = xpath.select(query, doc);
+ nodes = xpath.parse(query).select({ node: doc, allowAnyNamespaceForNoPrefix: true });
} catch (err) {
throw new OperationError(`Invalid XPath. Details:\n${err.message}.`);
}
| 0 |
diff --git a/data/brands/shop/supermarket.json b/data/brands/shop/supermarket.json {
"displayName": "Dia",
"id": "dia-986a24",
- "locationSet": {"include": ["001"]},
+ "locationSet": {"include": ["ar", "br", "es"]},
"matchNames": ["supermercado dia"],
"tags": {
"brand": "Dia",
| 12 |
diff --git a/packages/vulcan-users/lib/server/mutations.js b/packages/vulcan-users/lib/server/mutations.js @@ -87,7 +87,18 @@ const specificResolvers = {
if (!email) {
throw new Error('Invalid email');
}
- return await authenticateWithPassword(email, password);
+ const authResult = await authenticateWithPassword(email, password);
+ // set an HTTP-only cookie so the user is authenticated
+ const { /*userId,*/ token } = authResult;
+ const tokenCookie = {
+ path: '/',
+ httpOnly: true,
+ secure: process.env.NODE_ENV === 'development' ? false : true,
+ // expires: //
+ //sameSite: ''
+ };
+ context.req.res.cookie('meteor_login_token', token, tokenCookie);
+ return authResult;
},
async logout(root, args, context) {
if (!(context && context.userId)) {
| 12 |
diff --git a/src/web/util/validation/filterSchema.js b/src/web/util/validation/filterSchema.js const Joi = require('@hapi/joi')
-module.exports = Joi.object().pattern(/^/, Joi.array().items(Joi.string()))
+module.exports = Joi.object().pattern(/^/, Joi.alternatives(
+ Joi.string().valid(''),
+ Joi.array().items(Joi.string())
+))
| 11 |
diff --git a/token-metadata/0x0bf6261297198D91D4FA460242C69232146A5703/metadata.json b/token-metadata/0x0bf6261297198D91D4FA460242C69232146A5703/metadata.json "symbol": "LIB",
"address": "0x0bf6261297198D91D4FA460242C69232146A5703",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/test/routes/v2/launchpad.test.js b/test/routes/v2/launchpad.test.js @@ -15,7 +15,7 @@ beforeAll(done => {
test('It should return all launchpads', async () => {
const response = await request(app.callback()).get('/v2/launchpads');
expect(response.statusCode).toBe(200);
- expect(response.body).toHaveLength(8);
+ expect(response.body).toHaveLength(6);
response.body.forEach(item => {
expect(item).toHaveProperty('id');
expect(item).toHaveProperty('full_name');
| 3 |
diff --git a/commands/autoresponse.js b/commands/autoresponse.js @@ -6,7 +6,7 @@ const command = {};
command.description = 'Adds and lists auto-responses';
-command.usage = '<list|add|edit|remove>';
+command.usage = '<list|add|edit|remove> <id>';
command.names = ['autoresponse','response'];
@@ -23,15 +23,15 @@ command.execute = async (message, args, database, bot) => {
let guildConfig = await util.getGuildConfig(message);
let responses = guildConfig.responses;
- switch (args[0].toLowerCase()) {
+ switch (args.shift().toLowerCase()) {
case 'list':
if (!responses.length) {
return await message.channel.send("No auto-responses!");
}
let text = '';
- for (const response of responses) {
- text += `${response.trigger.type}: \`${response.trigger.content.replace('`','\`')}\`, `;
+ for (const [key, response] of responses.entries()) {
+ text += `[${key}] (${response.trigger.type}): \`${response.trigger.content.replace('`','\`')}\` \n`;
}
await message.channel.send(text.substring(0, 2000));
break;
@@ -75,7 +75,7 @@ command.execute = async (message, args, database, bot) => {
try {
options.response = (await message.channel.awaitMessages(response => {
return response.author.id === message.author.id
- }, { max: 1, time: 15000, errors: ['time'] })).first().content;
+ }, { max: 1, time: 60000, errors: ['time'] })).first().content;
}
catch {
return await message.channel.send("You took to long to respond.");
@@ -86,7 +86,7 @@ command.execute = async (message, args, database, bot) => {
try {
channels = (await message.channel.awaitMessages(async response => {
return response.author.id === message.author.id && (await util.channelMentions(message.guild,response.content.split(" "))).length || response.content.toLowerCase() === 'global'
- }, { max: 1, time: 15000, errors: ['time'] })).first().content;
+ }, { max: 1, time: 60000, errors: ['time'] })).first().content;
}
catch {
return await message.channel.send("You took to long to respond.");
@@ -115,17 +115,52 @@ command.execute = async (message, args, database, bot) => {
await message.channel.send(embed);
break;
- case 'edit':
- await message.channel.send("WIP!");
- break;
-
case 'remove':
- await message.channel.send("WIP!");
+ if (!args.length) {
+ await message.channel.send("Provide the id of the response you want to add");
+ return;
+ }
+ let id = parseInt(args.shift());
+ if (!responses[id]) {
+ await message.channel.send("Invalid id!");
+ return;
+ }
+ let response = responses[id];
+
+ let confirmation = await message.channel.send("Do you really want to delete this response?",new Discord.MessageEmbed()
+ .setTitle("Added new auto-response")
+ .setColor(util.color.green)
+ .addFields([
+ {name: "Trigger", value: `${response.trigger.type}: ${response.trigger.content}`},
+ {name: "Response", value: response.response.substring(0,1000)},
+ {name: "Channels", value: response.global ? "global" : '<#' + response.channels.join('>, <#') + '>'}
+ ]));
+ {
+ let yes = confirmation.react(util.icons.yes);
+ let no = confirmation.react(util.icons.no);
+ await Promise.all([yes,no]);
+ }
+
+ let confirmed;
+ try {
+ confirmed = (await confirmation.awaitReactions((reaction, user) => {
+ return user.id === message.author.id && (reaction.emoji.name === util.icons.yes || reaction.emoji.name === util.icons.no)
+ }, { max: 1, time: 15000, errors: ['time'] })).first().emoji.name === util.icons.yes;
+ }
+ catch {
+ return await message.channel.send("You took to long to react!");
+ }
+ if (!confirmed) {
+ return await message.channel.send("Cancelled!");
+ }
+ guildConfig.responses = responses.slice(0, id).concat(responses.slice(id + 1, responses.length));
+ await util.saveGuildConfig(guildConfig);
+ await message.channel.send("Removed!");
break;
default:
return await message.channel.send(await util.usage(message,command.names[0]));
- };
+ }
};
module.exports = command;
| 11 |
diff --git a/metaverse_modules/ki/index.js b/metaverse_modules/ki/index.js import * as THREE from 'three';
// import Simplex from './simplex-noise.js';
import metaversefile from 'metaversefile';
-const {useApp, useFrame, useLocalPlayer, useMaterials} = metaversefile;
+const {useApp, useFrame, useLocalPlayer, useLoaders, useMaterials} = metaversefile;
// const localVector = new THREE.Vector3();
// const simplex = new Simplex('lol');
@@ -13,8 +13,11 @@ const localEuler = new THREE.Euler(0, 0, 0, 'YXZ');
export default () => {
const app = useApp();
+ // const {textureLoader} = useLoaders();
const {WebaverseShaderMaterial} = useMaterials();
+ const textureLoader = new THREE.TextureLoader();
+
const count = 32;
const animationSpeed = 3;
const hideFactor = 1;
@@ -83,7 +86,6 @@ export default () => {
varying float vStartTimes;
- float offset = 0.;
const float animationSpeed = ${animationSpeed.toFixed(8)};
void main() {
@@ -162,7 +164,6 @@ export default () => {
varying float vStartTimes;
- float offset = 0.;
const float animationSpeed = ${animationSpeed.toFixed(8)};
vec4 pow4(vec4 v, float n) {
@@ -206,6 +207,7 @@ export default () => {
let kiGlbApp = null;
let groundWind = null;
let capsule = null;
+ let aura = null;
(async () => {
kiGlbApp = await metaversefile.load(baseUrl + 'ki.glb');
app.add(kiGlbApp);
@@ -254,6 +256,86 @@ export default () => {
);
parent.add(capsule);
}
+
+ {
+ const texture = textureLoader.load(baseUrl + 'ki.png');
+ // await metaversefile.load(baseUrl + 'ki.glb');
+ let geometry = new THREE.PlaneBufferGeometry(2, 2)
+ .applyMatrix4(new THREE.Matrix4().makeTranslation(0, 2/2, 1));
+ geometry = _getKiWindGeometry(geometry);
+ const now = performance.now();
+ const material = new WebaverseShaderMaterial({
+ uniforms: {
+ uTex: {
+ value: texture,
+ needsUpdate: true,
+ },
+ uTime: {
+ value: now,
+ needsUpdate: true,
+ },
+ },
+ vertexShader: `\
+ attribute vec3 positions;
+ attribute vec4 quaternions;
+ attribute float startTimes;
+ varying vec2 vUv;
+ varying float vStartTimes;
+
+ uniform float uTime;
+
+ void main() {
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
+ }
+ `,
+ fragmentShader: `
+ uniform sampler2D uTex;
+ uniform float uTime;
+ varying vec2 vUv;
+
+ varying float vStartTimes;
+
+ const float animationSpeed = ${animationSpeed.toFixed(8)};
+
+ vec4 pow4(vec4 v, float n) {
+ return vec4(pow(v.x, n), pow(v.y, n), pow(v.z, n), pow(v.w, n));
+ }
+
+ void main() {
+ if (vStartTimes >= 0.) {
+ float t = uTime;
+ float timeDiff = t - vStartTimes;
+
+ vec2 uv = vUv;
+ // uv.y *= 2.;
+ uv.y += timeDiff * animationSpeed;
+ // uv.y *= 2.;
+ // uv.y = 0.2 + pow(uv.y, 0.7);
+
+ float distanceToMiddle = abs(vUv.y - 0.5);
+
+ vec4 c = texture2D(uTex, uv);
+ c *= min(max(1.-pow(timeDiff*${(animationSpeed * 1).toFixed(8)}, 2.), 0.), 1.);
+ if (vUv.y < .3) {
+ c *= pow(vUv.y/.3, 0.5);
+ }
+ // c *= pow(0.5-distanceToMiddle, 3.);
+ c = pow4(c, 6.) * 2.;
+ // c *= 1.-pow(distanceToMiddle, 2.)*4.;
+ // c.a = min(c.a, f);
+ gl_FragColor = c;
+ } else {
+ discard;
+ }
+ }
+ `,
+ side: THREE.DoubleSide,
+ depthWrite: false,
+ transparent: true,
+ });
+ aura = new THREE.Mesh(geometry, material);
+ app.add(aura);
+ }
})();
/* const silkMesh = new THREE.Mesh(new THREE.BoxBufferGeometry(0.1, 0.05, 0.1, 10, 10, 10), new THREE.MeshNormalMaterial());
| 0 |
diff --git a/apps/viewer/dataloaders.js b/apps/viewer/dataloaders.js @@ -52,7 +52,6 @@ let _l = false;
function HumanlayersLoader() {
function loadingOverlayers() {
$CAMIC.store.findMarkTypes($D.params.slideId, 'human').then(function(layers) {
- typeIds = {};
if (!$D.overlayers) $D.overlayers = [];
// convert part not nesscary
$D.overlayers.push(...layers.map(covertToHumanLayer));
@@ -73,12 +72,11 @@ function HumanlayersLoader() {
}
}, 500);
}
-
+let typeIds = {};
let _c = false;
function ComputerlayersLoader() {
function loadingOverlayers() {
$CAMIC.store.findMarkTypes($D.params.slideId, 'computer').then(function(layers) {
- typeIds = {};
if (!$D.overlayers) $D.overlayers = [];
// convert part not nesscary
$D.overlayers.push(...layers.map(covertToCumputerLayer));
| 1 |
diff --git a/token-metadata/0xbbFF862d906E348E9946Bfb2132ecB157Da3D4b4/metadata.json b/token-metadata/0xbbFF862d906E348E9946Bfb2132ecB157Da3D4b4/metadata.json "symbol": "SS",
"address": "0xbbFF862d906E348E9946Bfb2132ecB157Da3D4b4",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,17 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master
where X.Y.Z is the semver of most recent plotly.js release.
+## [1.38.3] -- 2018-06-11
+
+### Fixed
+- Fix `cone` axis padding when under `sizemode: 'absolute'` [#2715]
+- Fix `cone` scaling on irregular grids [#2715]
+- Fix `cone` `sizemode: 'absolute'` scaling and attribute description [#2715]
+- Improve `cone` hover picking [#2715]
+- Fix exception during histogram cross-trace computation [#2724]
+- Fix handling of custom transforms that make their own data arrays [#2714]
+
+
## [1.38.2] -- 2018-06-04
### Fixed
| 3 |
diff --git a/src/discord_commands/pronounce.js b/src/discord_commands/pronounce.js @@ -53,7 +53,7 @@ function underlineStringAtTrueIndices(string, indices) {
}
function createLHString(pronounceInfo) {
- return pronounceInfo.pitchAccent.map(bool => (bool ? 'H' : 'L')).join(' ');
+ return pronounceInfo.pitchAccent.map(bool => (bool ? 'H' : 'L')).join('_');
}
function addPitchField(fields, pronounceInfo) {
| 14 |
diff --git a/userscript.user.js b/userscript.user.js @@ -68318,7 +68318,11 @@ var $$IMU_EXPORT$$;
}
stop_processing();
+
+ if (!options.new_popup || settings.mouseover_wait_use_el) {
+ // don't recalculate style until after the popup is open
stop_waiting();
+ }
if (!delay_mouseonly && delay_handle) {
clearTimeout(delay_handle);
@@ -70387,7 +70391,10 @@ var $$IMU_EXPORT$$;
can_close_popup[1] = true;
}
+ setTimeout(function() {
stop_waiting();
+ }, 1);
+
popups_active = true;
//console_log(div);
| 7 |
diff --git a/spec/requests/carto/api/public/federated_tables_controller_spec.rb b/spec/requests/carto/api/public/federated_tables_controller_spec.rb @@ -297,7 +297,6 @@ describe Carto::Api::Public::FederatedTablesController do
expect(response.body[:total] > 0)
found = response.body[:result].select {|schema| schema[:remote_schema_name] == 'public'}.first
expect(found[:remote_schema_name]).to eq('public')
- puts response.body[:result]
end
end
end
@@ -440,7 +439,6 @@ describe Carto::Api::Public::FederatedTablesController do
payload = {}
post_json api_v4_federated_servers_register_table_url(params), payload do |response|
- puts response.body
expect(response.status).to eq(422)
end
end
@@ -460,7 +458,6 @@ describe Carto::Api::Public::FederatedTablesController do
username: @user2.database_username,
password: @user2.database_password
}
- puts api_v4_federated_servers_register_server_url(params_register_server)
post_json api_v4_federated_servers_register_server_url(params_register_server), payload_register_server do |response|
expect(response.status).to eq(201)
| 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.