code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/lib/node_modules/@stdlib/_tools/scripts/publish_packages.js b/lib/node_modules/@stdlib/_tools/scripts/publish_packages.js @@ -652,6 +652,10 @@ function publish( pkg, clbk ) { pkgJSON.homepage = 'https://stdlib.io'; pkgJSON.repository.url = 'git://github.com/stdlib-js/'+distPkg+'.git'; + // Ensure `npm install` does not automatically build a native addon... + if ( pkgJSON.gypfile ) { + pkgJSON.gypfile = false; + } command = 'git ls-remote --tags --sort="v:refname" git://github.com/stdlib-js/'+distPkg+'.git | tail -n1 | sed \'s/.*\\///; s/\\^{}//\''; debug( 'Executing command to retrieve last version: %s', command ); version = shell( command ).toString();
12
diff --git a/articles/compliance/gdpr/features-aiding-compliance.md b/articles/compliance/gdpr/features-aiding-compliance.md @@ -31,9 +31,10 @@ See [signUpTerms](https://github.com/auth0/lock/blob/master/src/i18n/en.js) for You can: -* [Delete the end user from Auth0 using the Management API](/api/management/v2#!/Users/delete_users_by_id). +* [Delete the end user from Auth0 using the Management API](/api/management/v2#!/Users/delete_users_by_id). To confirm that the user was successfully deleted, you can attempt to [retrieve the user using its ID](/api/management/v2#!/Users/get_users_by_id). If the endpoint returns an error, then your call to delete the user was successful * Use [rules](/rules) to add the date of user consent withdrawal to the user's metadata during the authorization process +Alternatively, instead of completing deleting the user, you may choose to flag their profile (using the `app_metadata` field) as `deleted`. Then, add a [rule](/rules) that results in authentication failing for any user with this flag. This allows you to keep a record of deleted users, in the event that you need to refer to such information in the future. ## Right to Access Data
0
diff --git a/app/components/DepositWithdraw/gdex/GdexGateway.jsx b/app/components/DepositWithdraw/gdex/GdexGateway.jsx @@ -9,8 +9,8 @@ import SettingsActions from "actions/SettingsActions"; import GdexCache from "../../../lib/common/GdexCache"; import GdexHistory from "./GdexHistory"; import GdexAgreementModal from "./GdexAgreementModal"; -import BaseModal from "../../Modal/BaseModal"; -import ZfApi from "react-foundation-apps/src/utils/foundation-api"; +import {Modal, Button} from "bitshares-ui-style-guide"; +import counterpart from "counterpart"; import { fetchWithdrawRule, userAgreement @@ -33,6 +33,7 @@ class GdexGateway extends React.Component { ); this.state = { + isAgreementVisible: false, coins: null, activeCoinInfo: this._getActiveCoinInfo(props, {action}), action, @@ -47,6 +48,21 @@ class GdexGateway extends React.Component { memo_rule: null }; this.user_info_cache = new GdexCache(); + + this.showAgreement = this.showAgreement.bind(this); + this.hideAgreement = this.hideAgreement.bind(this); + } + + showAgreement() { + this.setState({ + isAgreementVisible: true + }); + } + + hideAgreement() { + this.setState({ + isAgreementVisible: false + }); } _getActiveCoinInfo(props, state) { @@ -76,11 +92,9 @@ class GdexGateway extends React.Component { _transformCoin(data) { var result = []; try { - data - .filter(asset => { + data.filter(asset => { return asset.status != 0; - }) - .forEach(asset => { + }).forEach(asset => { let coin = {}; if (asset.type == 1) { // inner asset @@ -280,7 +294,7 @@ class GdexGateway extends React.Component { } _showUserAgreement() { - ZfApi.publish("gdex_agreement", "open"); + this.showAgreement(); } _registerUser() { @@ -392,14 +406,27 @@ class GdexGateway extends React.Component { /> </span> </div> - <BaseModal id={"gdex_agreement"} overlay={true}> + <Modal + footer={[ + <Button + type="primary" + key="close" + onClick={this.hideAgreement} + > + {counterpart.translate("modal.close")} + </Button> + ]} + visible={this.state.isAgreementVisible} + onCancel={this.hideAgreement} + > <br /> <div className="grid-block vertical"> <GdexAgreementModal + onCancel={this.hideAgreement} locale={this.props.settings.get("locale", "en")} /> </div> - </BaseModal> + </Modal> {supportContent} </div> ); @@ -496,7 +523,8 @@ class GdexGateway extends React.Component { > <Translate content={"gateway.choose_" + action} - />:{" "} + /> + :{" "} </label> <select className="external-coin-types bts-select" @@ -591,7 +619,9 @@ class GdexGateway extends React.Component { } } -export default connect(GdexGateway, { +export default connect( + GdexGateway, + { listenTo() { return [SettingsStore]; }, @@ -601,4 +631,5 @@ export default connect(GdexGateway, { settings: SettingsStore.getState().settings }; } -}); + } +);
14
diff --git a/modules/geo-layers/src/tile-3d-layer/tile-3d-layer.js b/modules/geo-layers/src/tile-3d-layer/tile-3d-layer.js @@ -231,8 +231,8 @@ export default class Tile3DLayer extends CompositeLayer { coordinateSystem: COORDINATE_SYSTEM.METER_OFFSETS, coordinateOrigin: cartographicOrigin, modelMatrix, - - getColor: constantRGBA || getPointColor + getColor: constantRGBA || getPointColor, + _offset: 0 } ); } @@ -259,7 +259,8 @@ export default class Tile3DLayer extends CompositeLayer { coordinateOrigin: cartographicOrigin, modelMatrix, getTransformMatrix: instance => instance.modelMatrix, - getPosition: [0, 0, 0] + getPosition: [0, 0, 0], + _offset: 0 } ); } @@ -293,7 +294,8 @@ export default class Tile3DLayer extends CompositeLayer { modelMatrix, coordinateOrigin: cartographicOrigin, coordinateSystem: COORDINATE_SYSTEM.METER_OFFSETS, - featureIds + featureIds, + _offset: 0 } ); }
0
diff --git a/src/server/service/bolt.js b/src/server/service/bolt.js @@ -217,10 +217,10 @@ class BoltService { }; } - async showEphemeralSearchResults(command, args, offset) { + async showEphemeralSearchResults(command, args, offsetNum) { const { resultPaths, offset, keywords, - } = await this.getSearchResultPaths(command, args, offset); + } = await this.getSearchResultPaths(command, args, offsetNum); if (resultPaths == null) { return;
10
diff --git a/dashboard/apps/configuration.fma/index.html b/dashboard/apps/configuration.fma/index.html <option value="handibot">Handibot 1 (Developer Edition)</option> <option value="handibot2">Handibot 2 (Adventure Edition)</option> <option value="handibot-lst">Handibot Long Sheet Tool</option> + <option value="dt">Desktop</option> </select> </div> </div>
0
diff --git a/src/commands/filters.js b/src/commands/filters.js @@ -9,6 +9,9 @@ const Translator = require('../structs/Translator.js') const GuildProfile = require('../structs/db/GuildProfile.js') const Feed = require('../structs/db/Feed.js') const FailCounter = require('../structs/db/FailCounter.js') +const Format = require('../structs/db/Format.js') +const Subscriber = require('../structs/db/Subscriber.js') +const FilteredFormat = require('../structs/db/FilteredFormat.js') async function feedSelectorFn (m, data) { const { feed, locale } = data @@ -117,20 +120,31 @@ module.exports = async (bot, message, command, role) => { if (await FailCounter.hasFailed(feed.url)) { return await message.channel.send(translate('commands.filters.connectionFailureLimit')) } - const article = await FeedFetcher.fetchRandomArticle(feed.url, feed.filters) + const filters = feed.hasRFilters() ? feed.rfilters : feed.filters + const article = await FeedFetcher.fetchRandomArticle(feed.url, filters) if (!article) { return await message.channel.send(translate('commands.filters.noArticlesPassed')) } log.command.info(`Sending filtered article for ${feed.url}`, message.guild) + const [ format, subscribers, filteredFormats ] = await Promise.all([ + Format.getBy('feed', feed._id), + Subscriber.getManyBy('feed', feed._id), + FilteredFormat.getManyBy('feed', feed._id) + ]) article._delivery = { rssName: feed._id, source: { - ...feed.toObject(), - dateSettings: { - timezone: feed.timezone, - format: feed.dateFormat, - language: feed.dateLanguage - } + ...feed.toJSON(), + format: format ? format.toJSON() : undefined, + filteredFormats: filteredFormats.map(f => f.toJSON()), + subscribers: subscribers.map(s => s.toJSON()), + dateSettings: profile + ? { + timezone: profile.timezone, + format: profile.dateFormat, + language: profile.dateLanguage + } + : {} } }
1
diff --git a/articles/tokens/jwt.md b/articles/tokens/jwt.md @@ -128,6 +128,12 @@ The following diagram shows this process: ![How a JSON Web Token works](/media/articles/jwt/jwt-diagram.png) +## How to implement JWT + +The safest way to implement JWT-based authentication, is to use one of the existing open source libraries. In [JWT.io](https://jwt.io/#libraries-io) you can find several, for .NET, Python, Java, Ruby, Objective-C, Swift, PHP, and more. + +To verify JWT (or manually create one), you can use the [JWT.io Debugger](https://jwt.io/#debugger-io). + ## JWT vs SWT vs SAML Let's talk about the benefits of **JSON Web Tokens (JWT)** when compared to **Simple Web Tokens (SWT)** and **Security Assertion Markup Language Tokens (SAML)**.
0
diff --git a/articles/libraries/auth0js/v9/migration-react.md b/articles/libraries/auth0js/v9/migration-react.md section: libraries title: Migrating React Applications to Auth0.js v9 description: How to migrate React applications to Auth0.js v9 -toc: true --- - # Migrating React Applications to Auth0.js v9 React applications use Auth0.js directly without any kind of wrapper library. -Most React applications will be using Auth0.js v8, so you can follow the [Migrating from Auth0.js v8](migration-v8-v9.md) guide. - -If you were an early React and Auth0 adopter, and are using Auth0.js v7, you can follow the [Migrating from Auth0.js v7](migration-v7-v9.md) guide. +Most React applications will be using Auth0.js v8, so you can follow the [Migrating from Auth0.js v8](/libraries/auth0js/v9/migration-v8-v9) guide. +If you were an early React and Auth0 adopter, and are using Auth0.js v7, you can follow the [Migrating from Auth0.js v7](/libraries/auth0js/v9/migration-v7-v9) guide.
1
diff --git a/generators/client/templates/react/src/main/webapp/app/modules/administration/metrics/metrics.tsx.ejs b/generators/client/templates/react/src/main/webapp/app/modules/administration/metrics/metrics.tsx.ejs @@ -513,7 +513,7 @@ export class MetricsPage extends React.Component<any, IMetricsPageState> { </Row> : ''} - { metrics.gauges && metrics.gauges['HikariPool-1.pool.TotalConnections'].value > 0 ? + { metrics.gauges && metrics.gauges['HikariPool-1.pool.TotalConnections'] && metrics.gauges['HikariPool-1.pool.TotalConnections'].value > 0 ? <Row> <Col sm="12"> <h3>DataSource statistics (time in millisecond)</h3>
2
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -9,6 +9,30 @@ To see all merged commits on the master branch that will be part of the next plo where X.Y.Z is the semver of most recent plotly.js release. +## [1.56.0] -- 2020-09-30 + +### Added + - Introduce period positioning attributes on date axes in various cartesian traces [#5074, #5175], + this feature was anonymously sponsored: thank you to our sponsor! + - Add `minexponent` attribute to improve control over SI prefixes in axis tick labels [#5121], + with thanks to @ignamv for the contribution! + - Add `sort` attribute to `sunburst` and `treemap` traces to disable automatic sort [#5164], + with thanks to @thierryVergult for the contribution! + - Handle `rgba` colors in `colorscale` of `surface` traces [#5166], + with thanks to @lucapinello for the contribution! + +### Changed + - Disable undesirable text selections on graphs [#5165] + - Adjust `tick0` for weekly periods [#5180] + - More informative error messages when creating `sunburst` and `treemap` charts [#5163] + +### Fixed + - Fix positioning `legend` items [#5139], + with thanks to @fredrikw for the contribution! + - Fix rounding big numbers in `pie` and `sunburst` traces [#5152] + - Display `marker` and `line` colors in `scatter3d` and `scattergl` when hovering [#4867] + + ## [1.55.2] -- 2020-09-08 ### Fixed @@ -24,8 +48,10 @@ where X.Y.Z is the semver of most recent plotly.js release. ## [1.55.0] -- 2020-09-02 ### Added - - Introduce "period" `ticklabelmode` on cartesian date axes [#4993, #5055, #5060, #5065, #5088, #5089] - - Add new formatting options for weeks and quarters [#5026] + - Introduce "period" `ticklabelmode` on cartesian date axes [#4993, #5055, #5060, #5065, #5088, #5089], + this feature was anonymously sponsored: thank you to our sponsor! + - Add new formatting options for weeks and quarters [#5026], + this feature was anonymously sponsored: thank you to our sponsor! - Add `source` attribute to `image` traces for fast rendering [#5075] - Add `zsmooth` attribute for discrete `heatmapgl` traces [#4953], with thanks to @ordiology for the contribution! - Add horizontal and vertical markers for arrow charts [#5010] @@ -155,8 +181,10 @@ where X.Y.Z is the semver of most recent plotly.js release. ### Added - Introduce `rangebreaks` on date axes mainly thanks to [#4614] with API revision & improvements in - [#4639, #4641, #4644, #4649, #4652, #4653, #4660, #4661, #4670, #4677, #4684, #4688, #4695, #4696, #4698, #4699] - - Introduce "(x|y) unified" `hovermode` [#4620, #4664, #4669, #4687] + [#4639, #4641, #4644, #4649, #4652, #4653, #4660, #4661, #4670, #4677, #4684, #4688, #4695, #4696, #4698, #4699], + this feature was anonymously sponsored: thank you to our sponsor! + - Introduce "(x|y) unified" `hovermode` [#4620, #4664, #4669, #4687], + this feature was anonymously sponsored: thank you to our sponsor! - Add "hovered data" mode to `spikesnap` [#4665] - Add "full-json" export format to `Plotly.toImage` and `Plotly.dowloadImage` [#4593] - Add `node.customdata` and `link.customdata` to `sankey` traces [#4621]
0
diff --git a/assets/js/components/EntityHeader.js b/assets/js/components/EntityHeader.js @@ -39,7 +39,6 @@ import { CORE_SITE } from '../googlesitekit/datastore/site/constants'; import BackspaceIcon from '../../svg/keyboard-backspace.svg'; import { CORE_LOCATION } from '../googlesitekit/datastore/location/constants'; import Link from './Link'; - const { useSelect, useDispatch } = Data; const EntityHeader = () => {
2
diff --git a/src/views/directMessages/containers/newThread.js b/src/views/directMessages/containers/newThread.js @@ -173,6 +173,9 @@ class NewThread extends Component { }; handleKeyPress = (e: any) => { + // if the thread slider is open, we shouldn't be doing anything in DMs + if (this.props.threadSliderIsOpen) return; + // destructure the whole state object const { searchString,
8
diff --git a/stories/index.tsx b/stories/index.tsx @@ -484,16 +484,31 @@ storiesOf('Griddle main', module) .add('with extra re-render', () => { let data = fakeData; - class customComponent extends React.PureComponent<any, any> { + class customComponent extends React.Component<any, any> { + state = { + timesRendered: 1, + } + + componentWillReceiveProps() { + this.setState(state => ({ + timesRendered: state.timesRendered + 1, + })); + } + render() { const { value, extra } = this.props; + const { timesRendered } = this.state; - console.log('rerender!'); return ( - <span>{value} {extra && <em> {extra}</em>}</span> + <span> + {value} + {extra && <em> {extra}</em>} + {timesRendered} + </span> ); } } + let interval = null; class UpdatingDataTable extends React.Component<any, any> { @@ -503,7 +518,7 @@ storiesOf('Griddle main', module) this.state = { data: this.updateDataWithProgress(props.data, 0), progressValue: 0, - extraData: {extra: 'extra'}, + extraData: {extra: 'times re-rendered: '}, }; } @@ -527,7 +542,6 @@ storiesOf('Griddle main', module) } componentWillUnmount() { - console.log('unmount!'); clearInterval(interval); }
3
diff --git a/src/userscript.ts b/src/userscript.ts @@ -99318,6 +99318,9 @@ var $$IMU_EXPORT$$; // https://upload.wikimedia.org/wikipedia/commons/8/83/Bundesarchiv_-_Wikimedia_Deutschland_-_Pressekonferenz_%285999%29.jpg // https://upload.wikimedia.org/wikipedia/commons/thumb/archive/a/a0/20131028161436%21Pumpkipedia-47.jpg // https://upload.wikimedia.org/wikipedia/commons/archive/a/a0/20131028161436%21Pumpkipedia-47.jpg + // thanks to ayunami2000 on github for reporting: https://github.com/qsniyg/maxurl/issues/868 + // https://upload.wikimedia.org/wikipedia/commons/thumb/c/ce/United_States_Congressional_Districts_in_North_Carolina%2C_2021_-_2023.tif/lossless-page1-400px-United_States_Congressional_Districts_in_North_Carolina%2C_2021_-_2023.tif.png + // https://upload.wikimedia.org/wikipedia/commons/c/ce/United_States_Congressional_Districts_in_North_Carolina%2C_2021_-_2023.tif if (domain === "upload.wikimedia.org" || // https://www.generasia.com/w/images/thumb/4/4d/aiko_-_Shimetta_Natsu_no_Hajimari_promo.jpg/500px-aiko_-_Shimetta_Natsu_no_Hajimari_promo.jpg // https://www.generasia.com/w/images/4/4d/aiko_-_Shimetta_Natsu_no_Hajimari_promo.jpg @@ -99333,8 +99336,8 @@ var $$IMU_EXPORT$$; domain === "i.know.cf" || // http://oyster.ignimgs.com/mediawiki/apis.ign.com/best-of-2017-awards/thumb/8/86/Anime.jpg/610px-Anime.jpg // http://oyster.ignimgs.com/mediawiki/apis.ign.com/best-of-2017-awards/8/86/Anime.jpg - src.match(/\/thumb\/+[0-9a-f]\/+[0-9a-f]{2}\/+[^/]*\.[^/]*\/+[0-9]+px-[^/]*(?:[?#].*)?$/)) { - newsrc = src.replace(/\/(?:thumb\/+(archive\/+)?)?(.)\/+(..)\/+([^/]*)\/+[0-9]+px-.*?$/, "/$1$2/$3/$4"); + src.match(/\/thumb\/+[0-9a-f]\/+[0-9a-f]{2}\/+[^/]*\.[^/]*\/+(?:lossless-page[0-9]+-)?[0-9]+px-[^/]*(?:[?#].*)?$/)) { + newsrc = src.replace(/\/(?:thumb\/+(archive\/+)?)?(.)\/+(..)\/+([^/]*)\/+(?:lossless-page[0-9]+-)?[0-9]+px-.*?$/, "/$1$2/$3/$4"); if (newsrc !== src) return newsrc; } @@ -102578,6 +102581,7 @@ var $$IMU_EXPORT$$; if (!is_extension || settings.redirect_disable_for_responseheader) { if (obj.forces_download || ( (content_type.match(/(?:binary|application|multipart|text)\//) || + content_type === "image/tiff" || // such as [image/png] (server bug) content_type.match(/^ *\[/)) && !obj.head_wrong_contenttype) || (headers["content-disposition"] &&
7
diff --git a/layouts/partials/helpers/section-header.html b/layouts/partials/helpers/section-header.html {{- $align := .params.title_align | default "center" -}} {{- with .params.title }} <div class="row mx-0"> - <div class="col + <div class="col px-0 {{- printf " text-%s" $align -}} {{- partial "helpers/text-color.html" (dict "self" $self) -}} "> {{- end -}} {{- with .params.subtitle -}} <div class="row mx-0"> - <div class="col pt-4 pb-0 + <div class="col pt-4 pb-0 px-0 {{- printf " text-%s" $align -}} {{- partial "helpers/text-color.html" (dict "self" $self) -}} ">
2
diff --git a/src/data-structures/tree/red-black-tree/__test__/RedBlackTree.test.js b/src/data-structures/tree/red-black-tree/__test__/RedBlackTree.test.js @@ -285,4 +285,30 @@ describe('RedBlackTree', () => { expect(tree.isNodeRed(node3)).toBeTruthy(); expect(tree.isNodeRed(node6)).toBeTruthy(); }); + + it('should do left-left rotation with left grand-parent', () => { + const tree = new RedBlackTree(); + + tree.insert(20); + tree.insert(15); + tree.insert(25); + tree.insert(10); + tree.insert(5); + + expect(tree.toString()).toBe('5,10,15,20,25'); + expect(tree.root.height).toBe(2); + }); + + it('should do right-right rotation with left grand-parent', () => { + const tree = new RedBlackTree(); + + tree.insert(20); + tree.insert(15); + tree.insert(25); + tree.insert(17); + tree.insert(19); + + expect(tree.toString()).toBe('15,17,19,20,25'); + expect(tree.root.height).toBe(2); + }); });
7
diff --git a/static/parse-hosting/index.html b/static/parse-hosting/index.html As you all know Facebook's Parse developer platform has been shut down as mentioned on <a href="https://techcrunch.com/2017/01/30/facebooks-parse-developer-platform-is-shutting-down-today/" target="_blank">Techcrunch</a>. </p> <p> - We want to inform you that here at Syncano we are currently working on a solution for hosting your Parse backend. If you are eager to know more about this, sign up and we will let you know once launched (..in near future). + We want to inform you that here at Syncano we are currently working on a solution for hosting your Parse backend. If you are eager to know more about this, sign up and we will let you know once launched (...in the near future). </p> </div> <div class="form jsForm"> <form action="" method="POST" id="form" target="hiddenFrame"> <div class="form__message jsFormMessage"><p></p></div> <input class="input" type="email" id="email-form" required placeholder="E-mail address..."></input> - <input type="submit" name="submit" class="button" value="Send" /> + <input type="submit" name="submit" class="button" value="Subscribe" /> </form> <p> Best regards,<br/> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script> + !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.1.0"; + analytics.load("fLDtpYXRjFYnHlp1gvzl4I3Gv8gDoQ8m"); + analytics.ready(function () { + if (analytics.user().id()) { + analytics.identify(); + } + }); + analytics.page('Parse') + }}(); + $('#form').on('submit', function() { - const emaildata = encodeURIComponent($('#email-form').val()); - const question = 'entry.189509516'; - const messageSent = 'Message sent!'; - const baseURL = 'https://docs.google.com/a/syncano.com/forms/d/e/1FAIpQLSfXdcjVfJiXKQgm1J_pM5Zw8sAv8PKaQIPu1YAKyaTfm1CqfA/formResponse?'; - const submitRef = '&submit=Submit'; - const submitURL = `${baseURL}${question}=${emaildata}${submitRef}`; - $(this)[0].action=submitURL; + const email = $('#email-form').val(); + $('input').click(function(){ $('.jsFormMessage p').html(''); }); $('#email-form').val(''); - $('.jsFormMessage p').html(messageSent); + $('.jsFormMessage p').html('Subscribed!'); $('.jsFormMessage').addClass('form__message--success').show(); $('.jsForm').addClass('form--success'); + + analytics.track('Subscribed to Parse List', { email: email }); }); </script> </body>
14
diff --git a/assets/js/modules/analytics/components/module/ModuleAcquisitionChannelsWidget/index.js b/assets/js/modules/analytics/components/module/ModuleAcquisitionChannelsWidget/index.js @@ -56,7 +56,6 @@ export default function ModuleAcquisitionChannelsWidget( { Widget, WidgetReportZ const reportDateRange = select( CORE_USER ).getDateRange(); const reportArgs = { ...trafficSourcesReportDataDefaults, - url, dateRange: reportDateRange, };
2
diff --git a/app/commands/central_user_commands.rb b/app/commands/central_user_commands.rb @@ -14,7 +14,12 @@ class CentralUserCommands def update_user(message) payload = message.payload Carto::Common::CurrentRequest.with_request_id(message.request_id) do - logger.info(message: 'Processing :update_user', class_name: self.class.name) + logger.info( + message: 'Processing :update_user', + remote_user_id: payload['remote_user_id'], + class_name: self.class.name + ) + user_id = payload.delete('remote_user_id') return unless user_id.present? && payload.any?
7
diff --git a/test/nodes/core/function/89-trigger_spec.js b/test/nodes/core/function/89-trigger_spec.js @@ -645,30 +645,39 @@ describe('trigger node', function() { }); it('should be able to reset correctly having not output anything on second edge', function(done) { - var flow = [{"id":"n1", "type":"trigger", "name":"triggerNode", op2type:"nul", op1:"true",op1type:"val", op2:"false", duration:"35", wires:[["n2"]] }, + var flow = [{"id":"n1", "type":"trigger", "name":"triggerNode", op2type:"nul", op1:"true",op1type:"val", op2:"false", duration:"100", wires:[["n2"]] }, {id:"n2", type:"helper"} ]; helper.load(triggerNode, flow, function() { var n1 = helper.getNode("n1"); var n2 = helper.getNode("n2"); var c = 0; + var errors = []; n2.on("input", function(msg) { try { + msg.should.have.a.property("topic", "pass") msg.should.have.a.property("payload", true); c += 1; } - catch(err) { done(err); } + catch(err) { errors.push(err) } }); setTimeout( function() { - c.should.equal(3); // should only have had one output. + if (errors.length > 0) { + done(errors[0]) + } else { + c.should.equal(2); done(); - },300); - n1.emit("input", {payload:1}); + } + },350); + n1.emit("input", {payload:1, topic:"pass"}); setTimeout( function() { - n1.emit("input", {payload:2}); - },100); + n1.emit("input", {payload:2, topic:"should-block"}); + },50); setTimeout( function() { - n1.emit("input", {payload:3}); + n1.emit("input", {payload:3, topic:"pass"}); },200); + setTimeout( function() { + n1.emit("input", {payload:2, topic:"should-block"}); + },250); }); });
7
diff --git a/server/game/drawcard.js b/server/game/drawcard.js @@ -24,6 +24,8 @@ class DrawCard extends BaseCard { this.contributesToFavor = true; this.bowed = false; this.inConflict = false; + this.isConflict = false; + this.isDynasty = false; this.readysDuringReadying = true; this.challengeOptions = { doesNotBowAs: { @@ -32,6 +34,12 @@ class DrawCard extends BaseCard { } }; this.stealthLimit = 1; + + if(cardData.deck === 'conflict') { + this.isConflict = true; + } else if(cardData.deck === 'dynasty') { + this.isDynasty = true; + } } isLimited() {
12
diff --git a/generators/entity-client/templates/react/src/main/webapp/app/entities/react_validators.ejs b/generators/entity-client/templates/react/src/main/webapp/app/entities/react_validators.ejs @@ -47,12 +47,12 @@ if (field.fieldValidate === true) { if (['Integer', 'Long', 'Float', 'Double', 'BigDecimal'].includes(fieldType)) { validators.push('number: { value: true, errorMessage: translate(\'entity.validation.number\') }'); } - if (rules.includes('minbytes')) { - validators.push('minbytes: { value: ' + field.fieldValidateRulesMinbytes + ', errorMessage: translate(\'entity.validation.minbytes\', { min: ' + field.fieldValidateRulesMinbytes + ' }) }'); - } - if (rules.includes('maxbytes')) { - validators.push('maxbytes: { value: ' + field.fieldValidateRulesMaxbytes + ', errorMessage: translate(\'entity.validation.maxbytes\', { min: ' + field.fieldValidateRulesMaxbytes + ' }) }'); - } + // if (rules.includes('minbytes')) { + // validators.push('minbytes: { value: ' + field.fieldValidateRulesMinbytes + ', errorMessage: translate(\'entity.validation.minbytes\', { min: ' + field.fieldValidateRulesMinbytes + ' }) }'); + // } + // if (rules.includes('maxbytes')) { + // validators.push('maxbytes: { value: ' + field.fieldValidateRulesMaxbytes + ', errorMessage: translate(\'entity.validation.maxbytes\', { min: ' + field.fieldValidateRulesMaxbytes + ' }) }'); + // } result = validators.join(',\n '); result = `validate={{\n ${result}\n }}`;
2
diff --git a/packages/insomnia-app/app/network/o-auth-2/misc.js b/packages/insomnia-app/app/network/o-auth-2/misc.js @@ -45,25 +45,25 @@ export function authorizeUserInWindow( return new Promise((resolve, reject) => { let finalUrl = null; - function _parseUrl(currentUrl) { + function _parseUrl(currentUrl, source) { if (currentUrl.match(urlSuccessRegex)) { console.log( - `[oauth2] Matched success redirect to "${currentUrl}" with ${urlSuccessRegex.toString()}`, + `[oauth2] ${source}: Matched success redirect to "${currentUrl}" with ${urlSuccessRegex.toString()}`, ); finalUrl = currentUrl; child.close(); } else if (currentUrl.match(urlFailureRegex)) { console.log( - `[oauth2] Matched error redirect to "${currentUrl}" with ${urlFailureRegex.toString()}`, + `[oauth2] ${source}: Matched error redirect to "${currentUrl}" with ${urlFailureRegex.toString()}`, ); finalUrl = currentUrl; child.close(); } else if (currentUrl === url) { // It's the first one, so it's not a redirect - console.log(`[oauth2] Loaded "${currentUrl}"`); + console.log(`[oauth2] ${source}: Loaded "${currentUrl}"`); } else { console.log( - `[oauth2] Ignoring URL "${currentUrl}". Didn't match ${urlSuccessRegex.toString()}`, + `[oauth2] ${source}: Ignoring URL "${currentUrl}". Didn't match ${urlSuccessRegex.toString()}`, ); } } @@ -91,12 +91,19 @@ export function authorizeUserInWindow( child.webContents.on('did-navigate', () => { // Be sure to resolve URL so that we can handle redirects with no host like /foo/bar const currentUrl = child.webContents.getURL(); - _parseUrl(currentUrl); + _parseUrl(currentUrl, 'did-navigate'); + }); + + child.webContents.on('will-redirect', (e, url) => { + // Also listen for will-redirect, as some redirections do not trigger 'did-navigate' + // 'will-redirect' does not cover all cases that 'did-navigate' does, so both events are required + // GitHub's flow triggers only 'did-navigate', while Microsoft's only 'will-redirect' + _parseUrl(url, 'will-redirect'); }); child.webContents.on('did-fail-load', (e, errorCode, errorDescription, url) => { // Listen for did-fail-load to be able to parse the URL even when the callback server is unreachable - _parseUrl(url); + _parseUrl(url, 'did-fail-load'); }); // Show the window to the user after it loads
9
diff --git a/src/agent/index.js b/src/agent/index.js @@ -163,6 +163,7 @@ const commandHandlers = { 'T-': traceLogClear, 'T*': traceLog, 'dtS': stalkTraceEverything, + 'dtS?': stalkTraceEverythingHelp, 'dtSj': stalkTraceEverythingJson, 'dtS*': stalkTraceEverythingR2, 'dtSf': stalkTraceFunction, @@ -2596,12 +2597,19 @@ function isPromise(value) { return typeof value == 'object' && typeof value.then === 'function'; } +function stalkTraceEverythingHelp() { +return `Usage: dtS[j*] [symbol|address] - Trace given symbol using the Frida Stalker +dtSf[*j] [sym|addr] Trace address or symbol using the stalker +dtS[*j] seconds Trace all threads for given seconds using the stalker +`; +} + function perform (params) { const {command} = params; const tokens = command.split(/ /); const [name, ...args] = tokens; - if (name.length > 0 && name.endsWith('?')) { + if (name.length > 0 && name.endsWith('?') && !commandHandlers[name]) { const prefix = name.substring(0,name.length - 1); const value = Object.keys(commandHandlers).sort() .filter((k) => {
9
diff --git a/src/state/state.js b/src/state/state.js @@ -520,7 +520,7 @@ var state = { }, /** - * enable/disable transition for a specific state (by default enabled for all) + * enable/disable the transition to a particular state (by default enabled for all) * @name setTransition * @memberof state * @public
7
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml "name": "github-pages", "url": "${{ steps.deployment.outputs.page_url }}" }, + "if": "(github.repository == 'danvk/dygraphs') || (github.repository == 'mirabilos/dygraphs')", "runs-on": "ubuntu-latest", "steps": [ { "on": { "push": { "branches": [ - "debian" + "debian", + "master" ] } },
6
diff --git a/README.md b/README.md @@ -12,7 +12,7 @@ Non-Goals This project is bound by a [Code of Conduct][COC]. -Join us on [#engine262 on freenode][irc] ([web][irc-webchat]). +Join us in `#engine262:matrix.org`. ## Why this exists @@ -155,8 +155,6 @@ included here for reference, though engine262 is not based on any of them. [Babel]: https://babeljs.io/ [COC]: https://github.com/engine262/engine262/blob/master/CODE_OF_CONDUCT.md [do expressions]: https://github.com/tc39/proposal-do-expressions -[irc]: ircs://chat.freenode.net:6697/engine262 -[irc-webchat]: https://webchat.freenode.net/?channels=engine262 [optional chaining]: https://github.com/tc39/proposal-optional-chaining [pattern matching]: https://github.com/tc39/proposal-pattern-matching [the pipeline operator]: https://github.com/tc39/proposal-pipeline-operator
3
diff --git a/generators/server/templates/src/main/java/package/config/CacheConfiguration.java.ejs b/generators/server/templates/src/main/java/package/config/CacheConfiguration.java.ejs @@ -137,7 +137,6 @@ import io.github.jhipster.config.JHipsterProperties; <%_ if (cacheProvider === 'redis') { _%> import org.redisson.Redisson; import org.redisson.config.Config; -import org.redisson.config.SslProvider; import org.redisson.jcache.configuration.RedissonConfiguration; import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer; import org.springframework.context.annotation.Bean; @@ -734,31 +733,7 @@ public class CacheConfiguration<% if (cacheProvider === 'hazelcast') { %> implem public CacheConfiguration(JHipsterProperties jHipsterProperties) { MutableConfiguration<Object, Object> jcacheConfig = new MutableConfiguration<>(); Config config = new Config(); - config.useSingleServer() - .setAddress(jHipsterProperties.getCache().getRedis().getServer()) - .setSubscriptionConnectionMinimumIdleSize(1) - .setSubscriptionConnectionPoolSize(50) - .setConnectionMinimumIdleSize(24) - .setConnectionPoolSize(64) - .setDnsMonitoringInterval(5000) - .setIdleConnectionTimeout(10000) - .setConnectTimeout(10000) - .setTimeout(3000) - .setRetryAttempts(3) - .setRetryInterval(1500) - .setDatabase(0) - .setPassword(null) - .setSubscriptionsPerConnection(5) - .setClientName(null) - .setSslEnableEndpointIdentification(true) - .setSslProvider(SslProvider.JDK) - .setSslTruststore(null) - .setSslTruststorePassword(null) - .setSslKeystore(null) - .setSslKeystorePassword(null) - .setPingConnectionInterval(0) - .setKeepAlive(false) - .setTcpNoDelay(false); + config.useSingleServer().setAddress(jHipsterProperties.getCache().getRedis().getServer()); jcacheConfig.setStatisticsEnabled(true); jcacheConfig.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new Duration(TimeUnit.SECONDS, jHipsterProperties.getCache().getRedis().getExpiration()))); jcacheConfiguration = RedissonConfiguration.fromInstance(Redisson.create(config), jcacheConfig);
2
diff --git a/core/block.js b/core/block.js @@ -806,7 +806,7 @@ Blockly.Block.prototype.getVarModels = function() { * @return {!Array.<!Blockly.BoundVariableAbstract>} List of variables. * @package */ -Blockly.Block.prototype.getBoundVariables = function() { +Blockly.Block.prototype.getVariables = function() { var vars = []; for (var i = 0, input; input = this.inputList[i]; i++) { for (var j = 0, field; field = input.fieldRow[j]; j++) { @@ -1746,7 +1746,7 @@ Blockly.Block.prototype.resolveReference = function(parentConnection, * resolved. Otherwise false. */ Blockly.Block.prototype.resolveReferenceWithEnv_ = function(env, opt_bind) { - var variableList = this.getBoundVariables(); + var variableList = this.getVariables(); var allBound = true; for (var i = 0, variable; variable = variableList[i]; i++) { var name = variable.getVariableName();
10
diff --git a/test/prod/Synthetix.prod.js b/test/prod/Synthetix.prod.js @@ -15,7 +15,7 @@ const { } = require('./utils'); contract('Synthetix (prod tests)', accounts => { - const [, user, user1] = accounts; + const [, user1, user2] = accounts; let owner; @@ -51,13 +51,13 @@ contract('Synthetix (prod tests)', accounts => { }); await ensureAccountHassUSD({ amount: toUnit('1000'), - account: user, + account: user1, fromAccount: owner, network, }); await ensureAccountHasSNX({ amount: toUnit('1000'), - account: user, + account: user1, fromAccount: owner, network, }); @@ -88,19 +88,19 @@ contract('Synthetix (prod tests)', accounts => { addSnapshotBeforeRestoreAfter(); it('can transfer SNX', async () => { - const userBalanceBefore = await Synthetix.balanceOf(user); const user1BalanceBefore = await Synthetix.balanceOf(user1); + const user2BalanceBefore = await Synthetix.balanceOf(user2); const amount = toUnit('100'); - await Synthetix.transfer(user1, amount, { - from: user, + await Synthetix.transfer(user2, amount, { + from: user1, }); - const userBalanceAfter = await Synthetix.balanceOf(user); const user1BalanceAfter = await Synthetix.balanceOf(user1); + const user2BalanceAfter = await Synthetix.balanceOf(user2); - assert.bnEqual(userBalanceAfter, userBalanceBefore.sub(amount)); - assert.bnEqual(user1BalanceAfter, user1BalanceBefore.add(amount)); + assert.bnEqual(user1BalanceAfter, user1BalanceBefore.sub(amount)); + assert.bnEqual(user2BalanceAfter, user2BalanceBefore.add(amount)); }); }); @@ -112,30 +112,30 @@ contract('Synthetix (prod tests)', accounts => { }); it('can issue sUSD', async () => { - const userBalanceBefore = await SynthsUSD.balanceOf(user); + const user1BalanceBefore = await SynthsUSD.balanceOf(user1); const amount = toUnit('100'); await Synthetix.issueSynths(amount, { - from: user, + from: user1, }); - const userBalanceAfter = await SynthsUSD.balanceOf(user); + const user1BalanceAfter = await SynthsUSD.balanceOf(user1); - assert.bnEqual(userBalanceAfter, userBalanceBefore.add(amount)); + assert.bnEqual(user1BalanceAfter, user1BalanceBefore.add(amount)); }); it('can burn sUSD', async () => { await skipStakeTime({ network }); - const userBalanceBefore = await SynthsUSD.balanceOf(user); + const user1BalanceBefore = await SynthsUSD.balanceOf(user1); - await Synthetix.burnSynths(userBalanceBefore, { - from: user, + await Synthetix.burnSynths(user1BalanceBefore, { + from: user1, }); - const userBalanceAfter = await SynthsUSD.balanceOf(user); + const user1BalanceAfter = await SynthsUSD.balanceOf(user1); - assert.bnEqual(userBalanceAfter, toUnit('0')); + assert.bnEqual(user1BalanceAfter, toUnit('0')); }); }); @@ -145,36 +145,36 @@ contract('Synthetix (prod tests)', accounts => { it('can exchange sUSD to sETH', async () => { await skipWaitingPeriod({ network }); - const userBalanceBeforesUSD = await SynthsUSD.balanceOf(user); - const userBalanceBeforesETH = await SynthsETH.balanceOf(user); + const user1BalanceBeforesUSD = await SynthsUSD.balanceOf(user1); + const user1BalanceBeforesETH = await SynthsETH.balanceOf(user1); const amount = toUnit('100'); await Synthetix.exchange(toBytes32('sUSD'), amount, toBytes32('sETH'), { - from: user, + from: user1, }); - const userBalanceAftersUSD = await SynthsUSD.balanceOf(user); - const userBalanceAftersETH = await SynthsETH.balanceOf(user); + const user1BalanceAftersUSD = await SynthsUSD.balanceOf(user1); + const user1BalanceAftersETH = await SynthsETH.balanceOf(user1); - assert.bnEqual(userBalanceAftersUSD, userBalanceBeforesUSD.sub(amount)); - assert.bnGt(userBalanceAftersETH, userBalanceBeforesETH); + assert.bnEqual(user1BalanceAftersUSD, user1BalanceBeforesUSD.sub(amount)); + assert.bnGt(user1BalanceAftersETH, user1BalanceBeforesETH); }); it('can exchange sETH to sUSD', async () => { await skipWaitingPeriod({ network }); - const userBalanceBeforesUSD = await SynthsUSD.balanceOf(user); - const userBalanceBeforesETH = await SynthsETH.balanceOf(user); + const user1BalanceBeforesUSD = await SynthsUSD.balanceOf(user1); + const user1BalanceBeforesETH = await SynthsETH.balanceOf(user1); - await Synthetix.exchange(toBytes32('sETH'), userBalanceBeforesETH, toBytes32('sUSD'), { - from: user, + await Synthetix.exchange(toBytes32('sETH'), user1BalanceBeforesETH, toBytes32('sUSD'), { + from: user1, }); - const userBalanceAftersUSD = await SynthsUSD.balanceOf(user); - const userBalanceAftersETH = await SynthsETH.balanceOf(user); + const user1BalanceAftersUSD = await SynthsUSD.balanceOf(user1); + const user1BalanceAftersETH = await SynthsETH.balanceOf(user1); - assert.bnEqual(userBalanceAftersETH, toUnit('0')); - assert.bnGt(userBalanceAftersUSD, userBalanceBeforesUSD); + assert.bnEqual(user1BalanceAftersETH, toUnit('0')); + assert.bnGt(user1BalanceAftersUSD, user1BalanceBeforesUSD); }); }); });
10
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,39 @@ 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.34.0] -- 2018-02-12 + +### Added +- Add `Plotly.react`, a new do-it-all API method that creates and update graphs + using the same API signature [#2341] +- Add constraint-type contours to `contour` traces [#2270] +- Add `notched` and `notchwidth` attributes to `box` traces [#2305] +- Add localization machinery to auto-formatted date axis ticks [#2261] +- Add support for `text` in `mesh3d` traces [#2327] +- Add support for scalar `text` in `surface` traces [#2327] +- Make mode bar for graphs with multiple subplot types more usable [#2339] +- Add `npm@5` package-lock file [#2323] + +### Changed +- All of gl-vis dependencies now use `[email protected]` [#2293, #2306] +- All our dependencies and source now use `[email protected]` [#2326] + +### Fixed +- Prevent page scroll on mobile device on `gl2d` and `gl3d` subplots [#2296] +- Fix multi-marker `scattergl` selection errors (bug introduced in `1.33.0`) [#2295] +- Fix `Plotly.addTraces` in `scattergl` selection call backs (bug introduced in `1.33.0`) [#2298] +- Fix trace `opacity` restyle for `scattergl` traces (bug introduced in `1.33.0`) [#2299] +- Fix `scattergl` handling of `selectedpoints` across multiple traces [#2311] +- Fix `scattergl` horizontal and vertical line rendering [#2340] +- Fix restyle for scalar `hoverinfo` for `scatter3d`, `surface` and `mesh3d` traces [#2327] +- Fix `table` when content-less cells and headers are supplied [#2314] +- Fix `Plotly.animate` for attribute nested in `dimensions` containers [#2324] +- Fix `hoverformat` on `visible: false` cartesian axes (bug introduced in `1.33.0`) [#2329] +- Fix handling of double negative translate transform values [#2339] +- Fix compare `hovermode` fallback for non-cartesian subplot types [#2339] +- Fix animation error messages when overriding and ignoring frames updates [#2313] + + ## [1.33.1] -- 2018-01-24 ### Fixed
3
diff --git a/docker-compose.yml b/docker-compose.yml @@ -54,7 +54,7 @@ services: - '/etc/localtime:/etc/localtime:ro' - '/etc/timezone:/etc/timezone:ro' environment: - API_KEY: <create this on hypixel.net using /api ingame and paste here> + API_KEY: <Use your own API key - WarpWing> VIRTUAL_HOST: skyblock.domain.tld LETSENCRYPT_HOST: skyblock.domain.tld LETSENCRYPT_EMAIL: <your email>
4
diff --git a/app/src/RoomClient.js b/app/src/RoomClient.js @@ -2405,6 +2405,9 @@ export default class RoomClient const routerRtpCapabilities = await this.sendRequest('getRouterRtpCapabilities'); + routerRtpCapabilities.headerExtensions = routerRtpCapabilities.headerExtensions + .filter((ext) => ext.uri !== 'urn:3gpp:video-orientation'); + await this._mediasoupDevice.load({ routerRtpCapabilities }); if (this._produce)
1
diff --git a/generators/upgrade/index.js b/generators/upgrade/index.js @@ -379,9 +379,8 @@ module.exports = class extends BaseGenerator { done(); }; - const installJhipsterLocally = (version, callback) => { + const installJhipsterLocally = version => { this._installNpmPackageLocally(GENERATOR_JHIPSTER, version); - callback(); }; const installBlueprintsLocally = callback => { @@ -408,7 +407,7 @@ module.exports = class extends BaseGenerator { const regenerate = () => { this._cleanUp(); - installJhipsterLocally(this.currentJhipsterVersion, () => { + installJhipsterLocally(this.currentJhipsterVersion); installBlueprintsLocally(() => { const blueprintInfo = this.blueprints && this.blueprints.length > 0 @@ -418,7 +417,6 @@ module.exports = class extends BaseGenerator { this._gitCheckout(this.sourceBranch); recordCodeHasBeenGenerated(); }); - }); }; const createUpgradeBranch = () => {
2
diff --git a/articles/api/authentication/api-authz/_authz-client.md b/articles/api/authentication/api-authz/_authz-client.md @@ -192,6 +192,8 @@ This is the OAuth 2.0 grant that Client-side web apps utilize in order to access | `state` <br/><span class="label label-primary">Recommended</span> | An opaque value the clients adds to the initial request that Auth0 includes when redirecting the back to the client. This value must be used by the client to prevent CSRF attacks. | | `redirect_uri` | The URL to which Auth0 will redirect the browser after authorization has been granted by the user. | | `nonce` <br/><span class="label label-primary">Recommended</span> | A string value which will be included in the ID token response from Auth0, [used to prevent token replay attacks](/api-auth/tutorials/nonce). It is required for `response_type=id_token token`. | +| `connection` | The name of the connection configured to your client. | +| `prompt` | To initiate a [silent authentication](/api-auth/tutorials/silent-authentication) request, use `prompt=none`. | ### Test with Authentication API Debugger
0
diff --git a/articles/api/authentication/_introduction.md b/articles/api/authentication/_introduction.md @@ -14,7 +14,8 @@ The Authentication API is served over HTTPS. All URLs referenced in the document ## Authentication methods -There are three ways to authenticate with this API: +There are three ways that you can authenticate with this API: + - with an OAuth2 <dfn data-key="access-token">Access Token</dfn> in the `Authorization` request header field (which uses the `Bearer` authentication scheme to transmit the Access Token) - with your Client ID and Client Secret credentials - only with your Client ID @@ -27,7 +28,13 @@ In this case, you have to send a valid Access Token in the `Authorization` heade ### Client ID and Client Secret -In this case, you have to send your Client ID and Client Secret information in the request JSON body. An example is the [Revoke Refresh Token endpoint](#revoke-refresh-token). This option is available only for confidential applications (such as applications that are able to hold credentials in a secure way without exposing them to unauthorized parties). +In this case, you have to send your Client ID and Client Secret. The method you can use to send this data is determined by the [Token Endpoint Authentication Method](https://auth0.com/docs/get-started/applications/confidential-and-public-applications/view-application-type) configured for your application. + +If you are using **Post**, you have to send this data in the JSON body of your request. + +If you are using **Basic**, you have to send this data in the `Authorization` header, using the `Basic` authentication scheme. To generate your credential value, concatenate your Client ID and Client Secret, separated by a colon (`:`), and encode it in Base64. + +An example is the [Revoke Refresh Token endpoint](#revoke-refresh-token). This option is available only for confidential applications (such as applications that are able to hold credentials in a secure way without exposing them to unauthorized parties). ### Client ID
3
diff --git a/js/views/modals/purchase/ShippingOptions.js b/js/views/modals/purchase/ShippingOptions.js @@ -44,7 +44,7 @@ export default class extends baseView { render() { const filteredShipping = this.model.get('shippingOptions').toJSON().filter((option) => - option.regions.indexOf(this.countryCode) !== -1); + option.regions.indexOf(this.countryCode) !== -1 || option.regions.indexOf('ALL') !== -1); if (filteredShipping.length) { const name = filteredShipping[0].name;
9
diff --git a/StackExchangeDarkMode.user.js b/StackExchangeDarkMode.user.js // @description Dark theme for sites and chat on the Stack Exchange Network // @homepage https://github.com/samliew/SO-mod-userscripts // @author @samliew -// @version 3.2 +// @version 3.3 // // @include https://*stackexchange.com/* // @include https://*stackoverflow.com/* @@ -668,8 +668,8 @@ body > div[style*="absolute"], .is-selected { background-color: ${bordercolor}; } -.nav-links .youarehere .nav-links--link { - border-right: 3px solid ${orange}; +.nav-links li.youarehere a div { + background: transparent; } .summary .bounty-indicator { z-index: 2;
1
diff --git a/apps/clock-word.js b/apps/clock-word.js /* jshint esversion: 6 */ (function() { - var buf = Graphics.createArrayBuffer(240, 240, 2, { msb: true }); - - function flip() { - var palette = new Uint16Array([0,,,0xFFFF]); - g.drawImage({ width: buf.getWidth(), height: buf.getHeight(), bpp: 2, palette : palette, buffer: buf.buffer }, 0, 0); - } - const allWords = [ "ATWENTYD", "QUARTERY", var midx; var midxA=[]; - buf.clear(); - buf.setFontVector(wordFontSize); - buf.setColor(passivColor); - buf.setFontAlign(0, -1, 0); + g.setFontVector(wordFontSize); + g.setColor(passivColor); + g.setFontAlign(0, -1, 0); // draw allWords var c; allWords.forEach((line) => { x = xs; for (c in line) { - buf.drawString(line[c], x, y); + g.drawString(line[c], x, y); x += dx; } y += dy; } // write hour in active color - buf.setColor(activeColor); - buf.setFontVector(wordFontSize); + g.setColor(activeColor); + g.setFontVector(wordFontSize); hours[hidx][0].split('').forEach((c, pos) => { x = xs + (hours[hidx][pos + 1] / 10 | 0) * dx; y = ys + (hours[hidx][pos + 1] % 10) * dy; - buf.drawString(c, x, y); + g.drawString(c, x, y); }); // write min words in active color mins[idx][0].split('').forEach((c, pos) => { x = xs + (mins[idx][pos + 1] / 10 | 0) * dx; y = ys + (mins[idx][pos + 1] % 10) * dy; - buf.drawString(c, x, y); + g.drawString(c, x, y); }); }); // display digital time - buf.setColor(activeColor); - buf.setFontVector(timeFontSize); - buf.drawString(time, 120, 200); - - // display buf - flip(); - drawWidgets(); + g.setColor(activeColor); + g.setFontVector(timeFontSize); + g.clearRect(0,200,240,240); + g.drawString(time, 120, 200); } Bangle.on('lcdPower', function(on) {
3
diff --git a/ui/src/components/EntityMapping/EntityMappingMode.jsx b/ui/src/components/EntityMapping/EntityMappingMode.jsx @@ -91,7 +91,7 @@ export class EntityMappingMode extends Component { const mappingsOfSchema = Array.from(mappings.values()).filter(({ schema }) => { console.log(schema, schemaToAssign); return schema === schemaToAssign; }); const schemaMappingsCount = mappingsOfSchema.length; - return `${schemaToAssign.name}${schemaMappingsCount + 1}`; + return schemaMappingsCount ? `${schemaToAssign.label} ${schemaMappingsCount + 1}` : schemaToAssign.label; } onMappingAdd(schema) {
7
diff --git a/tasks/bump-android-version.js b/tasks/bump-android-version.js @@ -3,16 +3,22 @@ const fs = require("fs") const gradlePath = "./android/app/build.gradle" function main() { + const packageJson = JSON.parse(fs.readFileSync("./package.json")) const gradle = fs.readFileSync(gradlePath, "utf8") const currentVersion = /versionCode (\d+)/.exec(gradle)[1] const newVersion = parseInt(currentVersion) + 1 - const updatedGradle = gradle.replace( + const updatedGradle = gradle + .replace( /versionCode (\d+)/, `versionCode ${newVersion}` ) + .replace( + /versionName "(.+)"/, + `versionName "${packageJson.version}"` + ) fs.writeFileSync(gradlePath, updatedGradle) - console.log(`Updated version for Android build to ${newVersion}`) + console.log(`Updated version code for Android build to ${newVersion}`) } main()
3
diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md @@ -64,7 +64,7 @@ Click the "Clone or download" green button in [GitHub](https://github.com/sendgr <a name="error"></a> ## Error Messages -To read the error message returned by SendGrid's API, please see [this example](https://github.com/sendgrid/sendgrid-nodejs/blob/master/packages/mail/USE_CASES.md#successfailureerrors). +To read the error message returned by SendGrid's API, please see [this example](https://github.com/sendgrid/sendgrid-nodejs/blob/master/packages/mail/USE_CASES.md#success-failure-errors). <a name="versions"></a> ## Versions
1
diff --git a/src/ServerlessOffline.js b/src/ServerlessOffline.js @@ -70,8 +70,9 @@ module.exports = class ServerlessOffline { * by downstream plugins. When running sls offline that can be expected, but docs say that * 'sls offline start' will provide the init and end hooks for other plugins to consume * */ - startWithExplicitEnd() { - return this.start().then(() => this.end()); + async startWithExplicitEnd() { + await this.start(); + this.end(); } async _listenForTermination() { @@ -220,12 +221,11 @@ module.exports = class ServerlessOffline { debugLog('options:', this.options); } - end() { + async end() { this.log('Halting offline server'); functionHelper.cleanup(); - this.apiGateway.server - .stop({ timeout: 5000 }) - .then(() => process.exit(this.exitCode)); + await this.apiGateway.server.stop({ timeout: 5000 }); + process.exit(this.exitCode); } _setupEvents() {
14
diff --git a/CHANGES.md b/CHANGES.md - Fixed debug label rendering in `Cesium3dTilesInspector`. [#10246](https://github.com/CesiumGS/cesium/issues/10246) - Fixed a crash that occurred in `ModelExperimental` when loading a Draco-compressed model with tangents. [#10294](https://github.com/CesiumGS/cesium/pull/10294) - Fixed an incorrect model matrix computation for `i3dm` tilesets that are loaded using `ModelExperimental`. [#10302](https://github.com/CesiumGS/cesium/pull/10302) -- Fixed clamping issues with billboards after using mode "Disable depth test when clamped to ground." [#10191](https://github.com/CesiumGS/cesium/issues/10191) +- Fixed race condition during billboard clamping when the height reference changes. [#10191](https://github.com/CesiumGS/cesium/issues/10191) ### 1.92 - 2022-04-01
3
diff --git a/src/js/controllers/walletHome.js b/src/js/controllers/walletHome.js @@ -658,9 +658,6 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi return self.setSendError(gettext(msg)); } - //self.setOngoingProcess(gettext('Creating transaction')); - $timeout(function() { - var asset = $scope.index.arrBalances[$scope.index.assetIndex].asset; console.log("asset "+asset); var address = form.address.$modelValue; @@ -672,12 +669,21 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi amount *= bbUnitValue; amount = Math.round(amount); + var current_payment_key = ''+asset+address+amount; + if (current_payment_key === self.current_payment_key) + return $rootScope.$emit('Local/ShowErrorAlert', "This payment is already under way"); + self.current_payment_key = current_payment_key; + + //self.setOngoingProcess(gettext('Creating transaction')); + $timeout(function() { + profileService.requestTouchid(function(err) { if (err) { profileService.lockFC(); //self.setOngoingProcess(); self.error = err; $timeout(function() { + delete self.current_payment_key; $scope.$digest(); }, 1); return; @@ -716,7 +722,10 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi } }; walletDefinedByAddresses.createNewSharedAddress(arrDefinition, assocSignersByPath, { - ifError: self.setSendError, + ifError: function(err){ + delete self.current_payment_key; + self.setSendError(err); + }, ifOk: function(shared_address){ composeAndSend(shared_address); } @@ -735,14 +744,8 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi }); else if (fc.credentials.n === 1 && indexScope.shared_address) // require only our signature (fix it) arrSigningDeviceAddresses = [indexScope.copayers[0].device_address]; - var current_payment_key = ''+asset+address+amount; - if (current_payment_key === self.current_payment_key){ - $rootScope.$emit('Local/ShowErrorAlert', "This payment is already under way"); - return; - } breadcrumbs.add('sending payment in '+asset); profileService.bKeepUnlocked = true; - self.current_payment_key = current_payment_key; var opts = { shared_address: indexScope.shared_address, asset: asset,
12
diff --git a/src/lib.js b/src/lib.js @@ -2897,24 +2897,18 @@ export async function getPets(profile) { let heldItemObj = await db.collection("items").findOne({ id: heldItem }); if (heldItem in constants.pet_items) { - if ("stats" in constants.pet_items[heldItem]) { - for (const stat in constants.pet_items[heldItem].stats) { + for (const stat in constants.pet_items[heldItem]?.stats) { pet.stats[stat] = (pet.stats[stat] || 0) + constants.pet_items[heldItem].stats[stat]; } - } - if ("statsPerLevel" in constants.pet_items[heldItem]) { - for (const stat in constants.pet_items[heldItem].statsPerLevel) { + for (const stat in constants.pet_items[heldItem]?.statsPerLevel) { pet.stats[stat] = (pet.stats[stat] || 0) + constants.pet_items[heldItem].statsPerLevel[stat] * pet.level.level; } - } - if ("multStats" in constants.pet_items[heldItem]) { - for (const stat in constants.pet_items[heldItem].multStats) { + for (const stat in constants.pet_items[heldItem]?.multStats) { if (pet.stats[stat]) { pet.stats[stat] = (pet.stats[stat] || 0) * constants.pet_items[heldItem].multStats[stat]; } } - } if ("multAllStats" in constants.pet_items[heldItem]) { for (const stat in pet.stats) { pet.stats[stat] *= constants.pet_items[heldItem].multAllStats;
4
diff --git a/src/styles/colors.js b/src/styles/colors.js @@ -349,4 +349,9 @@ export const blueGrey = { 700: '#455a64', 800: '#37474f', 900: '#263238', + A100: '#cfd8dc', + A200: '#b0bec5', + A400: '#78909c', + A700: '#455a64', + contrastDefaultColor: 'light', };
0
diff --git a/assets/src/edit-story/components/dropTargets/provider.js b/assets/src/edit-story/components/dropTargets/provider.js @@ -165,10 +165,8 @@ function DropTargetsProvider({ children }) { secondId: activeDropTargetId, }; - const firstElement = elements.find( - ({ id }) => id === combineArgs.firstId - ); - if (selfId) { + const firstElement = elements.find(({ id }) => id === selfId); + if (firstElement) { combineArgs.firstElement = firstElement; } else { // Create properties as you'd create them for a new element to be added
1
diff --git a/src/translations/en.global.json b/src/translations/en.global.json }, "pending": { "title": "Pending release", - "info": "These tokens have been unstaked, but are not yet ready to withdraw. Tokens are ready to withdraw 36 to 48 hours after unstaking." + "info": "These tokens have been unstaked, but are not yet ready to withdraw. Tokens are ready to withdraw 52 to 65 hours after unstaking." } }, "validatorBox": { "availableBalance": "Available to unstake", "near": "NEAR" }, - "beforeUnstakeDisclaimer": "Unstaked tokens will be made available pending a release period of ~36-48hrs (3 epochs)." + "beforeUnstakeDisclaimer": "Unstaked tokens will be made available pending a release period of ~52-65hrs (3 epochs)." }, "stakeSuccess": { "title": "Success!", "unstakeSuccess": { "title": "Success!", "desc": "<b>${amount} NEAR</b> has successfully been unstaked from this validator:", - "descTwo": "Your tokens are pending release and will be made available within ~36-48hrs (3 epochs).", + "descTwo": "Your tokens are pending release and will be made available within ~52-65hrs (3 epochs).", "button": "Return to Dashboard" }, "validators": { "button": "Stake with validator", "fee": "Validator Fee", "desc": "This is the fee paid to the validator to stake on your behalf. This fee is only charged on your rewards.", - "withdrawalDisclaimer": "Funds pending release will be made available after ~36-48hrs (3 epochs)", + "withdrawalDisclaimer": "Funds pending release will be made available after ~52-65hrs (3 epochs)", "unstake": "You are unstaking", "withdraw": "You are withdrawing" }, "availableBalanceProfile": "This is your spendable NEAR balance, and can be used or transferred immediately. This will be lower than your Total Balance.", "minimumBalance": "This is the minimum NEAR balance your account must maintain to remain active. This balance represents the storage space your account is using on the NEAR blockchain (with a small buffer), and will go up or down as you use more or less space.", "totalBalance": "Your total balance represents all NEAR tokens under your control. In many cases, you will not have immediate access to this entire balance (e.g. if it is locked, delegated, or staked). Check your Available Balance for the NEAR you can actively use, transfer, delegate, and stake.", - "stakedBalance": "This NEAR is actively being used to back a validator and secure the network. When you decide to unstake this NEAR, it will take some time to be shown in your Available Balance, as NEAR takes 3 epochs (~36 hours) to unstake.", + "stakedBalance": "This NEAR is actively being used to back a validator and secure the network. When you decide to unstake this NEAR, it will take some time to be shown in your Available Balance, as NEAR takes 3 epochs (~52-65 hours) to unstake.", "unvestedBalance": "Unvested NEAR is earmarked to you, but not yet under your ownership. You can still delegate or stake this NEAR, and the rewards will be entirely yours. As your NEAR is vested, it will appear in either your Locked or Unlocked balance.", "lockedBalance": "This NEAR is locked in a lockup contract, and cannot be withdrawn. You may still delegate or stake this NEAR. Once the NEAR is unlocked, you can view it in your Unlocked Balance, and chose to withdraw it (moving to your Available Balance).", "unlockedBalance": "This NEAR is still in a lockup contract, and is ready to be withdrawn. If you choose to withdraw this NEAR, it will appear in your Available Balance.",
3
diff --git a/app/shared/actions/wallets.js b/app/shared/actions/wallets.js @@ -3,7 +3,7 @@ import { find, forEach } from 'lodash'; import * as types from './types'; import { getAccount } from './accounts'; import { setSettings } from './settings'; -import { encrypt } from './wallet'; +import { encrypt, setWalletMode } from './wallet'; export function importWallet(account, key = false, password = false, mode = 'hot') { const data = (key && password) ? encrypt(key, password) : false; @@ -42,11 +42,12 @@ export function useWallet(account) { dispatch({ type: types.WALLET_LOCK }); + // Set the wallet mode configuration + dispatch(setWalletMode(wallet.mode)); if (wallet.mode !== 'cold') { // Update the settings for the current account dispatch(setSettings({ - account, - walletMode: wallet.mode + account })); // Update the account in local state dispatch(getAccount(account));
12
diff --git a/OurUmbraco.Site/Views/Download.cshtml b/OurUmbraco.Site/Views/Download.cshtml <!-- Download Umbraco Column --> <div class="col-md-6 col-padding"> - <h2>Download Umbraco</h2> + <h2>Install Umbraco</h2> <p class="download-teaser large-margin-bottom"> - If you want to DIY you can download Umbraco either as a ZIP file or via NuGet. + If you want to DIY you can install Umbraco via NuGet. It's the same version of Umbraco CMS that powers Umbraco cloud, but you'll need to find a place to host yourself and handling deployments and upgrades is all down to you. </p> <p> - <pre class="pre small-margin-bottom"><span>PM></span> Install-Package UmbracoCms</pre> <p class="large-margin-bottom"> - Current Version: - <a id="downloadButton" class="download-link" href="@Url.GetReleaseUrl(latestRelease, true)" onclick="_gaq.push(['_trackEvent', 'Release', 'Download', 'UmbracoCms.@(latestRelease.FullVersion).zip']);">Download @(latestRelease.FullVersion)</a> + <span class="dotnet-nuget pre"> + dotnet add package Umbraco.Cms --version @(latestRelease.FullVersion) + </span> <br /> + + @* Current Version: *@ + @* <a id="downloadButton" class="download-link" href="@Url.GetReleaseUrl(latestRelease, true)" onclick="_gaq.push(['_trackEvent', 'Release', 'Download', 'UmbracoCms.@(latestRelease.FullVersion).zip']);">Download @(latestRelease.FullVersion)</a> *@ - See all <a class="download-link" href="/contribute/releases/">previous releases</a> </p> <p class="medium-margin-bottom"> - We recommend using Microsoft Visual Studio 2017 (15.9.7+) or Microsoft Visual Studio Code - with the IIS Express plugin. Make sure to check the full <a href="/documentation/Getting-Started/Setup/Install/">installation guide</a> + Make sure to check the full <a href="/Documentation/Fundamentals/Setup/Install/">installation guide</a> </p> - - <div class="requirements large-margin-bottom"> - <strong>Requirements:</strong> - <ul> - <li>Microsoft Windows 7+ or Microsoft Windows Server 2012+</li> - <li>Microsoft IIS or Microsoft IIS Express</li> - <li>Microsoft SQL Express 2012+</li> - <li>Microsoft ASP.NET 4.7.2</li> - </ul> - </div> </div> </div> </div>
1
diff --git a/components/system/components/Tag.js b/components/system/components/Tag.js @@ -475,7 +475,7 @@ export const Tag = ({ const _handleChange = (e) => setValue(e.target.value.toLowerCase()); const _handleKeyPress = (e) => { - let regex = /[a-z0-9\s-]/i; + let regex = /[a-z0-9\s]/i; if (e.key === "Enter" && value.length) { _handleAdd(value);
2
diff --git a/src/botPage/view/View.js b/src/botPage/view/View.js @@ -338,7 +338,7 @@ export default class View { globalObserver.emit('ui.log.info', translate('Logged you out!')); clearRealityCheck(); clearActiveTokens(); - location.reload(); // eslint-disable-line no-restricted-globals + window.location.reload(); }); }) .catch(() => {}); @@ -499,7 +499,7 @@ export default class View { showReloadPopup() .then(() => { setStorage(AppConstants.STORAGE_ACTIVE_TOKEN, $(e.currentTarget).attr('value')); - location.reload(); // eslint-disable-line no-restricted-globals + window.location.reload(); }) .catch(() => {}); });
9
diff --git a/utilities/auth-helper.js b/utilities/auth-helper.js 'use strict'; const _ = require('lodash'); -var extend = require('util')._extend; +let extend = require('util')._extend; module.exports = { /** @@ -12,34 +12,34 @@ module.exports = { * @returns {Array}: A list of authorization scopes for the endpoint. */ generateScopeForEndpoint: function(model, type, Log) { - var scope = []; - if (!model.routeOptions.scope) { - model.routeOptions.scope = {}; - } - var rootScope = model.routeOptions.scope.rootScope || model.routeOptions.scope.scope; + //NOTE: As of v0.29.0 routeOptions.scope is replaced with routeOptions.routeScope and + //routeOptions.scope.scope is replaced with routeOptions.routeScope.rootScope + let routeScope = model.routeOptions.routeScope || model.routeOptions.scope || {}; + let rootScope = routeScope.rootScope || routeScope.scope; + let scope = []; - var additionalScope = null; + let additionalScope = null; switch (type) { case 'create': - additionalScope = model.routeOptions.scope.createScope; + additionalScope = routeScope.createScope; break; case 'read': - additionalScope = model.routeOptions.scope.readScope; + additionalScope = routeScope.readScope; break; case 'update': - additionalScope = model.routeOptions.scope.updateScope; + additionalScope = routeScope.updateScope; break; case 'delete': - additionalScope = model.routeOptions.scope.deleteScope; + additionalScope = routeScope.deleteScope; break; case 'associate': - additionalScope = model.routeOptions.scope.associateScope; + additionalScope = routeScope.associateScope; break; default: - if (model.routeOptions.scope[type]) { - scope = model.routeOptions.scope[type]; + if (routeScope[type]) { + scope = routeScope[type]; if (!_.isArray(scope)) { scope = [scope]; } @@ -68,9 +68,12 @@ module.exports = { generateScopeForModel: function(model, Log) { const modelName = model.collectionName[0].toUpperCase() + model.collectionName.slice(1); + //NOTE: As of v0.29.0 routeOptions.scope is replaced with routeOptions.routeScope and + //routeOptions.scope.scope is replaced with routeOptions.routeScope.rootScope + let routeScope = model.routeOptions.routeScope || model.routeOptions.scope || {}; + const scope = {}; - //NOTE: "scope" is deprecated as of v0.29.0 scope.scope = ["root", model.collectionName]; scope.rootScope = ["root", model.collectionName]; scope.createScope = ["create", "create" + modelName]; @@ -89,20 +92,20 @@ module.exports = { } //EXPL: merge any existing scope fields with the generated scope - for (const key in model.routeOptions.scope) { + for (const key in routeScope) { if (scope[key]) { if (!_.isArray(scope[key])) { scope[key] = [scope[key]]; } - if (model.routeOptions.scope[key] && _.isArray(model.routeOptions.scope[key])) { - scope[key] = scope[key].concat(model.routeOptions.scope[key]); + if (routeScope[key] && _.isArray(routeScope[key])) { + scope[key] = scope[key].concat(routeScope[key]); } else { - scope[key].push(model.routeOptions.scope[key]); + scope[key].push(routeScope[key]); } } } - model.routeOptions.scope = scope; + model.routeOptions.routeScope = scope; } };
14
diff --git a/test/jasmine/tests/gl2d_click_test.js b/test/jasmine/tests/gl2d_click_test.js @@ -444,3 +444,149 @@ describe('Test hover and click interactions', function() { .then(done); }); }); + +describe('Test gl2d lasso/select:', function() { + var mockFancy = require('@mocks/gl2d_14.json'); + var mockFast = Lib.extendDeep({}, mockFancy, { + data: [{mode: 'markers'}], + layout: { + xaxis: {type: 'linear'}, + yaxis: {type: 'linear'} + } + }); + + var gd; + var selectPath = [[93, 193], [143, 193]]; + var lassoPath = [[316, 171], [318, 239], [335, 243], [328, 169]]; + var lassoPath2 = [[93, 193], [143, 193], [143, 500], [93, 500], [93, 193]]; + + afterEach(function() { + Plotly.purge(gd); + destroyGraphDiv(); + }); + + function drag(path) { + var len = path.length; + + mouseEvent('mousemove', path[0][0], path[0][1]); + mouseEvent('mousedown', path[0][0], path[0][1]); + + path.slice(1, len).forEach(function(pt) { + mouseEvent('mousemove', pt[0], pt[1]); + }); + + mouseEvent('mouseup', path[len - 1][0], path[len - 1][1]); + } + + function select(path) { + return new Promise(function(resolve, reject) { + gd.once('plotly_selected', resolve); + setTimeout(function() { reject('did not trigger *plotly_selected*');}, 100); + drag(path); + }); + } + + function assertEventData(actual, expected) { + expect(actual.points.length).toBe(expected.points.length); + + expected.points.forEach(function(e, i) { + var a = actual.points[i]; + if(a) { + expect(a.x).toBe(e.x, 'x'); + expect(a.y).toBe(e.y, 'y'); + } + }); + } + + function countGlObjects() { + return gd._fullLayout._plots.xy._scene2d.glplot.objects.length; + } + + it('should work under fast mode with *select* dragmode', function(done) { + var _mock = Lib.extendDeep({}, mockFast); + _mock.layout.dragmode = 'select'; + gd = createGraphDiv(); + + Plotly.plot(gd, _mock).then(function() { + expect(countGlObjects()).toBe(1, 'has on gl-scatter2d object'); + + return select(selectPath); + }) + .then(function(eventData) { + assertEventData(eventData, { + points: [ + {x: 3.911, y: 0.401}, + {x: 5.34, y: 0.403}, + {x: 6.915, y: 0.411} + ] + }); + expect(countGlObjects()).toBe(2, 'adds a dimmed gl-scatter2d objects'); + }) + .catch(fail) + .then(done); + }); + + it('should work under fast mode with *lasso* dragmode', function(done) { + var _mock = Lib.extendDeep({}, mockFast); + _mock.layout.dragmode = 'lasso'; + gd = createGraphDiv(); + + Plotly.plot(gd, _mock).then(function() { + expect(countGlObjects()).toBe(1); + + return select(lassoPath2); + }) + .then(function(eventData) { + assertEventData(eventData, { + points: [ + {x: 3.911, y: 0.401}, + {x: 5.34, y: 0.403}, + {x: 6.915, y: 0.411} + ] + }); + expect(countGlObjects()).toBe(2); + }) + .catch(fail) + .then(done); + }); + + it('should work under fancy mode with *select* dragmode', function(done) { + var _mock = Lib.extendDeep({}, mockFancy); + _mock.layout.dragmode = 'select'; + gd = createGraphDiv(); + + Plotly.plot(gd, _mock).then(function() { + expect(countGlObjects()).toBe(2, 'has a gl-line2d and a gl-scatter2d-sdf'); + + return select(selectPath); + }) + .then(function(eventData) { + assertEventData(eventData, { + points: [{x: 0.004, y: 12.5}] + }); + expect(countGlObjects()).toBe(2, 'only changes colors of gl-scatter2d-sdf object'); + }) + .catch(fail) + .then(done); + }); + + it('should work under fancy mode with *lasso* dragmode', function(done) { + var _mock = Lib.extendDeep({}, mockFancy); + _mock.layout.dragmode = 'lasso'; + gd = createGraphDiv(); + + Plotly.plot(gd, _mock).then(function() { + expect(countGlObjects()).toBe(2, 'has a gl-line2d and a gl-scatter2d-sdf'); + + return select(lassoPath); + }) + .then(function(eventData) { + assertEventData(eventData, { + points: [{ x: 0.099, y: 2.75 }] + }); + expect(countGlObjects()).toBe(2, 'only changes colors of gl-scatter2d-sdf object'); + }) + .catch(fail) + .then(done); + }); +});
0
diff --git a/js/independentreserve.js b/js/independentreserve.js @@ -18,8 +18,10 @@ module.exports = class independentreserve extends Exchange { 'CORS': false, 'createOrder': true, 'fetchBalance': true, + 'fetchClosedOrders': true, 'fetchMarkets': true, 'fetchMyTrades': true, + 'fetchOpenOrders': true, 'fetchOrder': true, 'fetchOrderBook': true, 'fetchTicker': true, @@ -186,6 +188,8 @@ module.exports = class independentreserve extends Exchange { } parseOrder (order, market = undefined) { + //console.log ('order:', order) + //console.log ('market:', market) // // { // "OrderGuid": "c7347e4c-b865-4c94-8f74-d934d4b0b177", @@ -203,7 +207,7 @@ module.exports = class independentreserve extends Exchange { // let symbol = undefined; const baseId = this.safeString (order, 'PrimaryCurrencyCode'); - const quoteId = this.safeString (order, 'PrimaryCurrencyCode'); + const quoteId = this.safeString (order, 'SecondaryCurrencyCode'); let base = undefined; let quote = undefined; if ((baseId !== undefined) && (quoteId !== undefined)) { @@ -215,7 +219,11 @@ module.exports = class independentreserve extends Exchange { base = market['base']; quote = market['quote']; } - let orderType = this.safeValue (order, 'Type'); + let orderType = undefined + orderType = this.safeValue (order, 'Type'); + if (orderType === undefined) { + orderType = this.safeValue (order, 'OrderType'); + } if (orderType.indexOf ('Market') >= 0) { orderType = 'market'; } else if (orderType.indexOf ('Limit') >= 0) { @@ -301,6 +309,28 @@ module.exports = class independentreserve extends Exchange { return this.parseOrder (response, market); } + async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + const pageIndex = this.safeInteger (params, 'pageIndex', 1); + const market = this.market (symbol); + if (limit === undefined) { + limit = 50; + } + const request = this.ordered ({ + 'primaryCurrencyCode': market['baseId'], + 'secondaryCurrencyCode': market['quoteId'], + 'pageIndex': pageIndex, + 'pageSize': limit, + }); + + //console.log ('Request:', request) + const response = await this.privatePostGetOpenOrders (this.extend (request, params)); + + //console.log ('Response:', response) + + return this.parseOrders (response['Data'], market, since, limit); + } + async fetchMyTrades (symbol = undefined, since = undefined, limit = 50, params = {}) { await this.loadMarkets (); const pageIndex = this.safeInteger (params, 'pageIndex', 1);
1
diff --git a/src/app/Http/Controllers/Operations/InlineCreateOperation.php b/src/app/Http/Controllers/Operations/InlineCreateOperation.php namespace Backpack\CRUD\app\Http\Controllers\Operations; use Illuminate\Support\Facades\Route; +use Prologue\Alerts\Facades\Alert; trait InlineCreateOperation { @@ -74,6 +75,11 @@ trait InlineCreateOperation */ public function storeInlineCreate() { - return $this->store(); + $result = $this->store(); + + // do not carry over the flash messages from the Create operation + Alert::flush(); + + return $result; } }
1
diff --git a/gulp-tasks/zip.js b/gulp-tasks/zip.js @@ -30,12 +30,6 @@ function generateFilename() { } -gulp.task( 'pre-zip', () => { - del.sync( [ './release/google-site-kit/**' ] ); - - return gulp.src( 'release/**' ) - .pipe( gulp.dest( 'release/google-site-kit/' ) ); -} ); gulp.task( 'zip', () => { const filename = generateFilename();
2
diff --git a/contracts/contracts/RaidenMicroTransferChannels.sol b/contracts/contracts/RaidenMicroTransferChannels.sol @@ -267,7 +267,7 @@ contract RaidenMicroTransferChannels { /// sender and receiver was created. /// @param _balance The amount of tokens owed by the sender to the receiver. /// @param _balance_msg_sig The balance message signed by the sender. - function close( + function uncooperativeClose( address _receiver, uint32 _open_block_number, uint192 _balance, @@ -293,7 +293,7 @@ contract RaidenMicroTransferChannels { /// @param _balance The amount of tokens owed by the sender to the receiver. /// @param _balance_msg_sig The balance message signed by the sender. /// @param _closing_sig The hash of the signed balance message, signed by the receiver. - function close( + function cooperativeClose( address _receiver, uint32 _open_block_number, uint192 _balance,
10
diff --git a/packages/gatsby/cache-dir/loader.js b/packages/gatsby/cache-dir/loader.js @@ -229,8 +229,8 @@ const queue = { } // Prefetch resources. - prefetchResource(page.jsonName) if (process.env.NODE_ENV === `production`) { + prefetchResource(page.jsonName) prefetchResource(page.componentChunkName) }
5
diff --git a/src/controllers/messages.ts b/src/controllers/messages.ts @@ -140,12 +140,12 @@ export const getAllMessages = async (req, res) => { // console.log("=> found all chats", chats && chats.length); const chatsById = indexBy(chats, 'id') // console.log("=> indexed chats"); - const new_messages = messages.map((message) => + const all_messages = messages.map((message) => jsonUtils.messageToJson(message, chatsById[parseInt(message.chatId)]) ) success(res, { - new_messages: new_messages, - new_messages_total: new_messages.length, + new_messages: all_messages, + new_messages_total: all_messages.length, confirmed_messages: [], }) }
10
diff --git a/package.json b/package.json "postinstall": "electron-builder install-app-deps", "precommit": "lint-staged", "lint": "eslint 'src/**/*.{js,jsx}' --fix", - "pretty-print": "prettier 'src/**/*.{js,jsx,scss,json}' --write" + "format": "prettier 'src/**/*.{js,jsx,scss,json}' --write" }, "keywords": [ "lbry"
10
diff --git a/aws/step/step.go b/aws/step/step.go @@ -17,6 +17,13 @@ import ( "github.com/sirupsen/logrus" ) +// Types of state machines per +// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html +const ( + stateMachineStandard = "STANDARD" + stateMachineExpress = "EXPRESS" +) + // StateError is the reserved type used for AWS Step function error names // Ref: https://states-language.net/spec.html#appendix-a type StateError string @@ -786,6 +793,8 @@ type StateMachine struct { name string comment string stateDefinitionError error + machineType string + loggingConfiguration *gocf.StepFunctionsStateMachineLoggingConfiguration startAt TransitionState uniqueStates map[string]MachineState roleArn gocf.Stringable @@ -962,12 +971,16 @@ func (sm *StateMachine) StateMachineNamedDecorator(stepFunctionResourceName stri stepFunctionResource := &gocf.StepFunctionsStateMachine{ StateMachineName: gocf.String(sm.name), DefinitionString: templateExpr, + LoggingConfiguration: sm.loggingConfiguration, } if iamRoleResourceName != "" { stepFunctionResource.RoleArn = gocf.GetAtt(iamRoleResourceName, "Arn").String() } else if sm.roleArn != nil { stepFunctionResource.RoleArn = sm.roleArn.String() } + if sm.machineType != "" { + stepFunctionResource.StateMachineType = gocf.String(sm.machineType) + } template.AddResource(stepFunctionResourceName, stepFunctionResource) return nil } @@ -990,8 +1003,8 @@ func (sm *StateMachine) MarshalJSON() ([]byte, error) { }) } -// NewStateMachine returns a new StateMachine instance -func NewStateMachine(stateMachineName string, +func createStateMachine(stateMachineName string, + machineType string, startState TransitionState) *StateMachine { uniqueStates := make(map[string]MachineState) pendingStates := []MachineState{startState} @@ -1037,11 +1050,38 @@ func NewStateMachine(stateMachineName string, startAt: startState, uniqueStates: uniqueStates, } + if machineType != "" { + sm.machineType = machineType + } // Store duplicate state names if len(duplicateStateNames) != 0 { sm.stateDefinitionError = fmt.Errorf("duplicate state names: %#v", duplicateStateNames) } return sm + +} + +// NewExpressStateMachine returns a new Express StateMachine instance. See +// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html +// for more information. +func NewExpressStateMachine(stateMachineName string, + loggingConfiguration *gocf.StepFunctionsStateMachineLoggingConfiguration, + startState TransitionState) *StateMachine { + + sm := createStateMachine(stateMachineName, + stateMachineExpress, + startState) + sm.loggingConfiguration = loggingConfiguration + return sm +} + +// NewStateMachine returns a new StateMachine instance +func NewStateMachine(stateMachineName string, + startState TransitionState) *StateMachine { + + return createStateMachine(stateMachineName, + stateMachineStandard, + startState) } ////////////////////////////////////////////////////////////////////////////////
0
diff --git a/src/main/webapp/starter/main-sidebar.html b/src/main/webapp/starter/main-sidebar.html <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span> </a> <ul class="treeview-menu"> - <li ui-sref-active="active" ng-repeat="b in boardList | filter:{userId:user.userId}"> + <li ui-sref-active="active" ng-repeat="b in boardList | filter:{userId:user.userId}:true"> <a ui-sref="mine.view({id:b.id})"><i class="fa fa-dashboard"></i>{{b.name}}</a> </li> </ul>
1
diff --git a/themes/navy/layout/partial/footer.ejs b/themes/navy/layout/partial/footer.ejs </li> <li> <a href="<%= config.discord_url %>" target="_blank"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 245 245"> + <svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 245 245"> <g opacity="0.5"> <rect width="245" height="245" rx="20" fill="white" /> <path fill-rule="evenodd" clip-rule="evenodd"
7
diff --git a/src/error/multiple_error_types/option_result.md b/src/error/multiple_error_types/option_result.md @@ -38,9 +38,7 @@ fn double_first(vec: Vec<&str>) -> Result<Option<i32>, ParseIntError> { first.parse::<i32>().map(|n| 2 * n) }); - let opt = opt.map_or(Ok(None), |r| r.map(Some))?; - - Ok(opt) + opt.map_or(Ok(None), |r| r.map(Some)) } fn main() {
3
diff --git a/includes/Modules/Tag_Manager.php b/includes/Modules/Tag_Manager.php @@ -202,7 +202,7 @@ final class Tag_Manager extends Module implements Module_With_Scopes, Module_Wit 'value' => $settings['containerID'], 'debug' => Debug_Data::redact_debug_value( $settings['containerID'] ), ), - 'tagmanager_amp_id' => array( + 'tagmanager_amp_container_id' => array( 'label' => __( 'Tag Manager AMP container ID', 'google-site-kit' ), 'value' => $settings['ampContainerID'], 'debug' => Debug_Data::redact_debug_value( $settings['ampContainerID'] ),
10
diff --git a/scripts/upcoming.js b/scripts/upcoming.js @@ -141,7 +141,7 @@ const year = /^[0-9]{4}$/; // Build launch time objects to update calculatedTimes = { flight_number: (base_flight_number + manifest_index), - launch_year: zone.year(), + launch_year: (zone.year()).toString(), launch_date_unix: zone.unix(), launch_date_utc: zone.toISOString(), launch_date_local: localTime,
3
diff --git a/packages/frontend/src/redux/slices/ledger/index.js b/packages/frontend/src/redux/slices/ledger/index.js @@ -86,6 +86,24 @@ const ledgerSlice = createSlice({ }, }, extraReducers: ((builder) => { + builder.addCase(getLedgerAccountIds.pending, (state) => { + set(state, ['signInWithLedgerStatus'], 'confirm-public-key'); + }); + builder.addCase(getLedgerAccountIds.fulfilled, (state, { payload }) => { + unset(state, ['txSigned']); + set(state, ['signInWithLedgerStatus'], 'confirm-accounts'); + payload.forEach(accountId => + set(state, ['signInWithLedger', accountId, 'status'], 'waiting') + ); + }); + builder.addCase(getLedgerAccountIds.rejected, (state, { error }) => { + + const noAccounts = error.message === 'No accounts were found.' && !HIDE_SIGN_IN_WITH_LEDGER_ENTER_ACCOUNT_ID_MODAL; + + set(state, ['signInWithLedgerStatus'], noAccounts ? 'enter-accountId' : undefined); + unset(state, ['signInWithLedger']); + unset(state, ['txSigned']); + }); }) });
9
diff --git a/rig-aux.js b/rig-aux.js @@ -33,18 +33,25 @@ class RigAux { gltfLoader.load(srcUrl, accept, function onprogress() {}, reject); }); */ const root = o; - const animations = o.getAnimations(); /* o = o.scene; // o.scale.multiplyScalar(0.2); scene.add(o); */ + let mesh = null; + root.traverse(o => { + if (o.isSkinnedMesh && !mesh) { + mesh = o; + } + }); + if (mesh) { + const animations = o.getAnimations(); const sitComponent = o.components.find(c => c.type === 'sit'); // console.log('got sit component', sitComponent); const {sitBone = 'Spine', walkAnimation = 'walk'} = sitComponent; - const animation = animations.find(a => a.name === walkAnimation); + if (animation) { // hacks { root.position.y = 0; @@ -55,16 +62,10 @@ class RigAux { const action = mixer.clipAction(clip); action.play(); - let mesh = null; - root.traverse(o => { - if (o.isSkinnedMesh && !mesh) { - mesh = o; - } - }); - if (mesh) { const {skeleton} = mesh; const spineBoneIndex = skeleton.bones.findIndex(b => b.name === sitBone); const spineBone = root.getObjectByName(sitBone); + if (spineBoneIndex !== -1 && spineBone) { // const spine = skeleton.bones[spineBoneIndex]; // const spineBoneMatrix = skeleton.boneMatrices[spineBoneIndex]; // const spineBoneMatrixInverse = skeleton.boneInverses[spineBoneIndex]; @@ -104,6 +105,14 @@ class RigAux { this.sittables.push({ update, }); + } else { + console.warn('could not find sit bone in model: ' + sitBone + '; bones available: ' + JSON.stringify(skeleton.bones.map(b => b.name))); + } + } else { + console.warn('could not find walk animation in model: ' + walkAnimation + '; animation available: ' + JSON.stringify(animations.map(a => a.name))); + } + } else { + console.warn('no skinned mesh in model'); } } update(now) {
0
diff --git a/packages/idyll-document/src/runtime.js b/packages/idyll-document/src/runtime.js @@ -154,7 +154,7 @@ const createWrapper = ({ theme, layout }) => { handleFormatComponent(info) { const allProps = Object.keys(info.props); // TODO -- should we display children prop? Probly not - const valuesInParagraphs = allProps.map((prop) => { + const valuesOfProps = allProps.map((prop) => { const val = info.props[prop]; if (val) { let propertyValue = null; @@ -175,7 +175,7 @@ const createWrapper = ({ theme, layout }) => { return ( <p> This component's type is {info.type.name ? info.type.name : info.type} - <ul>{valuesInParagraphs}</ul> + <ul>{valuesOfProps}</ul> </p> ); }
10
diff --git a/login.js b/login.js @@ -374,6 +374,10 @@ class LoginManager extends EventTarget { return userObject && userObject.avatar; } + getAvatarPreview() { + return userObject && userObject.avatar.preview; + } + async setAvatar(id) { if (loginToken) { // const {mnemonic} = loginToken;
0
diff --git a/addon/components/liquid-measured.js b/addon/components/liquid-measured.js @@ -31,8 +31,8 @@ export default Component.extend({ characterData: true }); - this.resizeHandler = this.didResize.bind(this); - window.addEventListener('resize', this.resizeHandler); + this.windowResizeHandler = this.didResize.bind(this); + window.addEventListener('resize', this.windowResizeHandler); let elt = $(this.element); elt.bind('webkitTransitionEnd', function() { self.didMutate(); }); @@ -44,7 +44,7 @@ export default Component.extend({ if (this.observer) { this.observer.disconnect(); } - window.removeEventListener('resize', this.resizeHandler); + window.removeEventListener('resize', this.windowResizeHandler); window.removeEventListener('unload', this._destroyOnUnload); },
10
diff --git a/userscript.user.js b/userscript.user.js @@ -15333,15 +15333,64 @@ var $$IMU_EXPORT$$; .replace(/(\/[0-9]+_p[0-9]+)_[^/]*(\.[^/.]*)$/, "$1$2"); //var referer_url = "https://www.pixiv.net/member_illust.php?mode=medium&illust_id=" + src.replace(/.*\/([0-9]+)_[^/]*$/, "$1"); - var referer_url = "https://www.pixiv.net/artworks/" + src.replace(/.*\/([0-9]+)_[^/]*$/, "$1"); - return fillobj_urls(add_extensions(newsrc), { + var illust_id = src.replace(/.*\/([0-9]+)_[^/]*$/, "$1"); + var referer_url = "https://www.pixiv.net/artworks/" + illust_id; + + obj = { headers: { Referer: referer_url }, extra: { page: referer_url } + }; + + var urls = [src]; + if (newsrc !== src) { + urls = add_extensions(newsrc); + } + + var retobj = fillobj_urls(urls, obj); + + if (options && options.force_page && options.cb && options.do_request) { + options.do_request({ + url: referer_url, + method: "GET", + headers: { + Referer: "" + }, + onload: function(resp) { + if (resp.readyState !== 4) + return; + + if (resp.status !== 200) { + return options.cb(retobj); + } + + var match = resp.responseText.match(/<meta\s+name=\"preload-data\"\s+id=\"meta-preload-data\"\s+content='(.*?)'>/); + if (!match) { + console_error("Unable to find match", resp); + return options.cb(retobj); + } + + try { + var json = JSON_parse(decode_entities(match[1])); + + obj.extra.caption = json.illust[illust_id].illustTitle; + return options.cb(fillobj_urls(urls, obj)); + } catch(e) { + console_error(e); + return options.cb(retobj); + } + } }); + + return { + waiting: true + }; + } + + return retobj; } if (domain_nosub === "booth.pm" && domain.match(/s[0-9]*\.booth\.pm/)) {
7
diff --git a/stories/module-analytics-setup.stories.js b/stories/module-analytics-setup.stories.js @@ -65,10 +65,6 @@ storiesOf( 'Analytics Module/Setup', module ) const setupRegistry = ( registry ) => { registry.dispatch( STORE_NAME ).setSettings( {} ); registry.dispatch( STORE_NAME ).receiveGetExistingTag( null ); - registry.stores[ STORE_NAME ].store.dispatch( { - type: 'START_FETCH_GET_ACCOUNTS_PROPERTIES_PROFILES', - payload: { params: {} }, - } ); }; return <Setup callback={ setupRegistry } />;
2
diff --git a/lib/exp.js b/lib/exp.js @@ -762,10 +762,6 @@ exports.var = (varName) => [ * LIST READ EXPRESSIONS *********************************************************************************/ -function getContextType (ctx, type) { - return type -} - function getListType (type, returnType, isMulti) { let expected = type @@ -806,7 +802,7 @@ const _listRead = (type, returnType, isMulti) => [ const _listModify = (ctx, policy, op, param, extraParam) => [ { op: exp.ops.CALL, count: 5 }, - ..._rtype(getContextType(ctx, exp.type.LIST)), + ..._rtype(exp.type.LIST), ..._int(exp.sys.CALL_CDT | exp.sys.FLAG_MODIFY_LOCAL), { op: exp.ops.CALL_VOP_START, count: 1 + param + (policy ? extraParam : 0), ctx }, ..._int(op) @@ -1409,7 +1405,7 @@ const _mapStart = (ctx, op, param) => [ const _mapModify = (ctx, policy, op, param, extraParam) => [ { op: exp.ops.CALL, count: 5 }, - ..._rtype(getContextType(ctx, exp.type.MAP)), + ..._rtype(exp.type.MAP), ..._int(exp.sys.CALL_CDT | exp.sys.FLAG_MODIFY_LOCAL), { op: exp.ops.CALL_VOP_START, count: 1 + param + (policy ? extraParam : 0), ctx }, ..._int(op)
4
diff --git a/scripts/buildIOSFramework.sh b/scripts/buildIOSFramework.sh @@ -59,7 +59,10 @@ cp -R ../assets/fonts/!(android) $PATH_ASSETS # Move level up ios fonts mv $PATH_ASSETS/ios/* $PATH_ASSETS rm -rf $PATH_ASSETS/ios -mv $PATH_UNIVERSAL/$FRAMEWORK/*.ttf $PATH_ASSETS + +# Move other fonts from framework to assets/fonts directory +find $PATH_UNIVERSAL/$FRAMEWORK/ -name "*.otf" -maxdepth 1 -exec mv {} $PATH_ASSETS \; +find $PATH_UNIVERSAL/$FRAMEWORK/ -name "*.ttf" -maxdepth 1 -exec mv {} $PATH_ASSETS \; # Print the output file echo "ios/$PATH_UNIVERSAL/$FRAMEWORK"
5
diff --git a/README.markdown b/README.markdown [![CI Build Status](https://github.com/handlebars-lang/handlebars.js/actions/workflows/ci.yml/badge.svg)](https://github.com/handlebars-lang/handlebars.js/actions/workflows/ci.yml) [![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/handlebars/badge?style=rounded)](https://www.jsdelivr.com/package/npm/handlebars) -[![npm downloads](https://img.shields.io/npm/dm/handlebars)](https://www.npmjs.com/package/handlebars) -[![npm version](https://img.shields.io/npm/v/handlebars)](https://www.npmjs.com/package/handlebars) -[![Bundle size](https://img.shields.io/bundlephobia/minzip/handlebars?label=minified%20%2B%20gzipped)](https://bundlephobia.com/package/handlebars) +[![npm downloads](https://badgen.net/npm/dm/handlebars)](https://www.npmjs.com/package/handlebars) +[![npm version](https://badgen.net/npm/v/handlebars)](https://www.npmjs.com/package/handlebars) +[![Bundle size](https://badgen.net/bundlephobia/minzip/handlebars?label=minified%20%2B%20gzipped)](https://bundlephobia.com/package/handlebars) [![Install size](https://packagephobia.com/badge?p=handlebars)](https://packagephobia.com/result?p=handlebars) Handlebars.js
14
diff --git a/metaverse_modules/filter/index.js b/metaverse_modules/filter/index.js @@ -111,20 +111,11 @@ export default () => { } }).filter(exit => exit !== null); if (localExitSpecs.length > 0) { - // const outerWidth = 16; - // const outerHeight = 8; - // const boxPosition = new THREE.Vector2(outerWidth / 2, outerHeight / 2); - // const boxSize = new THREE.Vector2(4, 4); - /* const innerBox = new THREE.Box2( - boxPosition.clone().sub(localVector2D.copy(boxSize).divideScalar(2)), - boxPosition.clone().add(localVector2D.copy(boxSize).divideScalar(2)) - ); */ - const scale = _getScaleFromNormal(wallNormal, localVector); const outerWidth = scale.x; const outerHeight = scale.y; - // console.log('got scale', scale.x, scale.y, localExitSpecs); + // XXX this needs to be quantized to voxelWorldSize because path drawing is inaccurate const wallShape = new THREE.Shape(); wallShape.moveTo(-outerWidth / 2, -outerHeight / 2); @@ -144,13 +135,6 @@ export default () => { wallShape.lineTo(-outerWidth / 2, -outerHeight / 2); } - /* wallShape.lineTo(-outerWidth / 2 + innerBox.min.x, -outerHeight / 2 + innerBox.min.y); - wallShape.lineTo(-outerWidth / 2 + innerBox.max.x, -outerHeight / 2 + innerBox.min.y); - wallShape.lineTo(-outerWidth / 2 + innerBox.max.x, -outerHeight / 2 + innerBox.max.y); - wallShape.lineTo(-outerWidth / 2 + innerBox.min.x, -outerHeight / 2 +innerBox.max.y); - wallShape.lineTo(-outerWidth / 2 + innerBox.min.x, -outerHeight / 2 +innerBox.min.y); - wallShape.lineTo(-outerWidth / 2, -outerHeight / 2); */ - const offset = localVector.multiplyVectors(dims, wallNormal) .divideScalar(2); const quaternion = localQuaternion.setFromRotationMatrix(
0
diff --git a/layouts/partials/fragments/items.html b/layouts/partials/fragments/items.html {{- if not (in .Name "/index.md") -}} {{- $item := .Params }} <div class="col-md-4 text-center"> + {{- if $item.icon }} <span class="fa-stack fa-3x m-2"> <i class="fas fa-circle fa-stack-2x {{- if eq $bg "primary" -}} "></i> <i class="{{ $item.icon }} fa-stack-1x fa-inverse"></i> </span> + {{- end }} <h4 class="mb-3 {{- if or (eq $bg "white") (eq $bg "light") (eq $bg "secondary") (eq $bg "primary") -}} {{- printf " text-%s" "dark" -}}
2
diff --git a/animations-baker.js b/animations-baker.js @@ -15,7 +15,7 @@ const {FBXLoader, MMDLoader} = THREE; global.FBXLoader = FBXLoader; global.MMDLoader = MMDLoader; const {CharsetEncoder} = require('three/examples/js/libs/mmdparser.js'); -console.log('got CharsetEncoder', CharsetEncoder); +// console.log('got CharsetEncoder', CharsetEncoder); (async () => { const nodeFetch = await import('node-fetch');
2
diff --git a/modules/user/server-ts/sql.js b/modules/user/server-ts/sql.js @@ -10,12 +10,12 @@ class User { const queryBuilder = knex .select( 'u.id as id', - 'u.username', + 'u.username as username', 'u.role', 'u.is_active', - 'u.email', - 'up.first_name', - 'up.last_name', + 'u.email as email', + 'up.first_name as first_name', + 'up.last_name as last_name', 'ca.serial', 'fa.fb_id', 'fa.display_name AS fbDisplayName', @@ -61,10 +61,10 @@ class User { if (has(filter, 'searchText') && filter.searchText !== '') { queryBuilder.where(function() { - this.where('u.username', 'like', `%${filter.searchText}%`) - .orWhere('u.email', 'like', `%${filter.searchText}%`) - .orWhere('up.first_name', 'like', `%${filter.searchText}%`) - .orWhere('up.last_name', 'like', `%${filter.searchText}%`); + this.where(knex.raw('LOWER(??) LIKE LOWER(?)', ['username', `%${filter.searchText}%`])) + .orWhere(knex.raw('LOWER(??) LIKE LOWER(?)', ['email', `%${filter.searchText}%`])) + .orWhere(knex.raw('LOWER(??) LIKE LOWER(?)', ['first_name', `%${filter.searchText}%`])) + .orWhere(knex.raw('LOWER(??) LIKE LOWER(?)', ['last_name', `%${filter.searchText}%`])); }); } }
7
diff --git a/edit.js b/edit.js @@ -9,6 +9,7 @@ import {TransformControls} from './TransformControls.js'; // import {XRPackage, pe, renderer, scene, camera, parcelMaterial, floorMesh, proxySession, getRealSession, loginManager} from './run.js'; import { tryLogin, loginManager } from './login.js'; import {downloadFile, readFile, bindUploadFileButton} from './util.js'; +import wbn from './wbn.js'; // import {wireframeMaterial, getWireframeMesh, meshIdToArray, decorateRaycastMesh, VolumeRaycaster} from './volume.js'; // import './gif.js'; import {RigManager} from './rig.js'; @@ -43,6 +44,11 @@ import {GuardianMesh} from './land.js'; import {storageHost} from './constants.js'; import atlaspack from './atlaspack.js'; +const _importMapUrl = u => new URL(u, location.protocol + '//' + location.host); +const importMap = { + three: _importMapUrl('./three.module.js'), +}; + const zeroVector = new THREE.Vector3(0, 0, 0); const capsuleUpQuaternion = new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0, 0, 1), Math.PI / 2); const pid4 = Math.PI / 4; @@ -7166,6 +7172,77 @@ const _uploadScript = async file => { console.log('got text', mesh); // eval(text); }; +const _uploadWebBundle = async file => { + const arrayBuffer = await new Promise((accept, reject) => { + const fr = new FileReader(); + fr.onload = function() { + accept(this.result); + }; + fr.onerror = reject; + fr.readAsArrayBuffer(file); + }); + + const urls = []; + const _getUrl = u => { + const mappedUrl = URL.createObjectURL(new Blob([u], { + type: 'text/javascript', + })); + urls.push(mappedUrl); + return mappedUrl; + }; + const urlCache = {}; + const _mapUrl = u => { + const importUrl = importMap[u]; + if (importUrl) { + return importUrl; + } else { + const cachedUrl = urlCache[u]; + if (cachedUrl) { + return cachedUrl; + } else { + const importUrl = new URL(u, 'https://xrpackage.org/').href; + let importResponse; + try { + importResponse = bundle.getResponse(importUrl); + } catch(err) {} + if (importResponse) { + const importBody = importResponse.body; + let importScript = textDecoder.decode(importBody); + importScript = _mapScript(importScript); + const cachedUrl = _getUrl(importScript); + urlCache[u] = cachedUrl; + return cachedUrl; + } else { + throw new Error('failed to find import url: ' + importUrl); + } + } + } + }; + const _mapScript = script => { + const r = /^(\s*import[^\n]+from\s*['"])(.+)(['"])/gm; + script = script.replace(r, function() { + const u = _mapUrl(arguments[2]); + return arguments[1] + u + arguments[3]; + }); + return script; + }; + + const bundle = new wbn.Bundle(arrayBuffer); + const u = _mapUrl(bundle.primaryURL); + console.log('got url', u); + // debugger; + import(u) + .then(() => { + console.log('import returned'); + }, err => { + console.warn('import failed', err); + }) + .finally(() => { + for (const u of urls) { + URL.revokeObjectURL(u); + } + }); +}; const _handleFileUpload = async file => { const match = file.name.match(/\.(.+)$/); const ext = match[1]; @@ -7185,6 +7262,10 @@ const _handleFileUpload = async file => { await _uploadScript(file); break; } + case 'wbn': { + await _uploadWebBundle(file); + break; + } } }; bindUploadFileButton(document.getElementById('load-package-input'), _handleFileUpload);
0
diff --git a/components/Frame/Footer.js b/components/Frame/Footer.js @@ -37,7 +37,7 @@ const styles = { position: 'relative', zIndex: ZINDEX_FOOTER, // goes over sidebar backgroundColor: colors.negative.primaryBg, - borderTop: `0.5px solid ${colors.divider}`, + borderTop: `1px solid ${colors.negative.divider}`, paddingTop: 30, paddingBottom: 30, textRendering: 'optimizeLegibility',
4
diff --git a/lib/assets/javascripts/builder/editor/style/style-converter.js b/lib/assets/javascripts/builder/editor/style/style-converter.js @@ -565,7 +565,7 @@ function animation (style, mapContext) { } function _normalizeValue (v) { - return v.replace(/\n/g, '\\n').replace(/\"/g, '\\"').replace(); + return v.replace(/\n/g, '\\n').replace(/\"/g, '\\"').replace(/'/g, "''").replace(); } for (var i = 0, l = categoryCount; i < l; i++) {
14
diff --git a/src/components/shapes/attributes.js b/src/components/shapes/attributes.js @@ -256,7 +256,8 @@ module.exports = templatedArray('shape', { editType: 'calc+arraydraw', description: [ 'Determines whether the shape could be activated for edit or not.', - 'Please note that setting to *false* has no effect in case `config.editable` is set to true' + 'Has no effect when the older editable shapes mode is enabled via', + '`config.editable` or `config.edits.shapePosition`.' ].join(' ') },
3
diff --git a/src/scripts/content/ticktick.js b/src/scripts/content/ticktick.js 'use strict'; togglbutton.render('#task-detail-view:not(.toggl)', {observe: true}, function (elem) { - var text = $('#tasktitle', elem).textContent, + var text = $('.task-title', elem).textContent, project = $('#project-setting input', elem).getAttribute('value'), link = togglbutton.createTimerLink({
1
diff --git a/packages/app/src/services/xss/xssOption.ts b/packages/app/src/services/xss/xssOption.ts @@ -14,7 +14,7 @@ export default class XssOption { constructor(config: XssOptionConfig) { const recommendedWhitelist = require('~/services/xss/recommended-whitelist'); - const initializedConfig = (config != null) ? config : {}; + const initializedConfig: Partial<XssOptionConfig> = (config != null) ? config : {}; this.isEnabledXssPrevention = initializedConfig.isEnabledXssPrevention || true; this.tagWhiteList = initializedConfig.tagWhiteList || recommendedWhitelist.tags;
7
diff --git a/layouts/partials/fragments/pricing.html b/layouts/partials/fragments/pricing.html href="{{ .Params.button_url | relLangURL }}" class="btn btn-lg btn-block btn-primary" {{- if (not (isset .Params "button_url")) | or (eq .Params.button_url "") -}} - {{ safeHTMLAttr (printf "data-event-args=\"title:%s,price:%s,currency:%s,product:%s\"" .Title .Params.price (.Params.currency | default "") .Title) }} + {{ safeHTMLAttr (printf "data-event-args=\"title:%s,price:%s,currency:%s,product:%s,description:%s\"" .Title .Params.price (.Params.currency | default "") .Title .Params.subtitle) }} {{- end -}}> {{ .Params.button_text }} </a>
0
diff --git a/src/views/SeedPhrase/LoginPhrase.vue b/src/views/SeedPhrase/LoginPhrase.vue <template> <div class="login-wrapper login-phrase h-100"> <div class="login-phrase_logo-wrap mx-auto"> - <Logo /> + <img :src="logo"/> </div> <div class="login-phrase_middle-text mx-auto mt-1"> <h2 class="mt-4 px-5">Sign in to See Seed Phrase</h2> <script> import { mapActions } from 'vuex' -import Logo from '../../assets/icons/logo_wallet.svg' +import LogoWallet from '@/assets/icons/logo_wallet.svg?inline' export default { - components: { - Logo - }, data () { return { loading: false, @@ -56,6 +53,11 @@ export default { checkbox: false } }, + computed: { + logo () { + return LogoWallet + } + }, methods: { ...mapActions(['unlockWallet']), async unlock () {
1
diff --git a/src/traces/isosurface/convert.js b/src/traces/isosurface/convert.js @@ -892,7 +892,7 @@ function generateIsosurfaceMesh(data) { if(near.distRatio === 0) { exactIndices.push(near.id); - } else { + } else if(near.id > 0) { ceilIndices.push(near.id); if(e === 'x') { distRatios.push([near.distRatio, 0, 0]);
0
diff --git a/renderer/pages/settings.js b/renderer/pages/settings.js import PropTypes from 'prop-types' -import React, { useMemo } from 'react' +import React from 'react' import { FormattedMessage } from 'react-intl' import styled from 'styled-components' import { @@ -46,7 +46,7 @@ Section.propTypes = { const Settings = () => { const [maxRuntimeEnabled] = useConfig('nettests.websites_enable_max_runtime') - const [/* maxRuntime */, setMaxRuntime] = useConfig('nettests.websites_max_runtime') + const [maxRuntime, setMaxRuntime] = useConfig('nettests.websites_max_runtime') // This keeps the values of websites_enable_max_runtime(bool) and websites_max_runtime (number) // in sync. Withtout this, `probe-cli` continues to use the number in `websites_max_runtime` @@ -54,6 +54,8 @@ const Settings = () => { const syncMaxRuntimeWidgets = (newValue) => { if (newValue === false) { setMaxRuntime(0) + } else { + setMaxRuntime(90) } } @@ -81,6 +83,7 @@ const Settings = () => { onChange={syncMaxRuntimeWidgets} /> <NumberOption + key={maxRuntime} /* Used to re-render widget when value changes in `syncMaxRuntimeWidgets()` */ label={<FormattedMessage id='Settings.Websites.MaxRuntime' />} optionKey='nettests.websites_max_runtime' min={60}
12
diff --git a/src/MagicMenu.jsx b/src/MagicMenu.jsx import React, {useState, useEffect, useRef} from 'react' import classes from './MagicMenu.module.css' import ioManager from '../io-manager.js'; -import {aiHost} from '../constants.js'; +import * as codeAi from '../ai/code/code-ai.js'; import metaversefile from 'metaversefile'; -function parseQueryString(queryString) { - const query = {}; - const pairs = (queryString[0] === '?' ? queryString.substr(1) : queryString).split('&'); - for (let i = 0; i < pairs.length; i++) { - const pair = pairs[i].split('='); - query[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1] || ''); - } - return query; -} - -// window.metaversefile = metaversefile; // XXX -const makeAi = prompt => { - const es = new EventSource(`${aiHost}/code?p=${encodeURIComponent(prompt)}`); - let fullS = ''; - es.addEventListener('message', e => { - const s = e.data; - if (s !== '[DONE]') { - const j = JSON.parse(s); - const {choices} = j; - const {text} = choices[0]; - fullS += text; - if (!fullS) { - fullS = '// nope'; - } - result.dispatchEvent(new MessageEvent('update', { - data: fullS, - })); - } else { - es.close(); - result.dispatchEvent(new MessageEvent('done')); - } - }); - const result = new EventTarget(); - result.destroy = () => { - es.close(); - }; - return result; -}; - function MagicMenu({open, setOpen}) { const [page, setPage] = useState('input'); const [input, setInput] = useState(''); @@ -70,7 +31,7 @@ function MagicMenu({open, setOpen}) { let newAi = null; try { const input = inputTextarea.current.value; - newAi = makeAi(input); + newAi = codeAi.generateStream(input); setAi(newAi); setPage('output'); setOutput('');
4
diff --git a/components/hero.js b/components/hero.js @@ -120,6 +120,7 @@ function Hero({title, tagline}) { .example { font-size: 1.5em; text-align: center; + padding: .5em; background-color: ${theme.colors.white}; } `}</style>
0
diff --git a/lib/console_web/controllers/router/device_controller.ex b/lib/console_web/controllers/router/device_controller.ex @@ -307,6 +307,7 @@ defmodule ConsoleWeb.Router.DeviceController do if event.data["integration"] != nil and event.data["integration"]["id"] != "no_channel" do event_integration = Channels.get_channel(event.data["integration"]["id"]) + if event_integration != nil do if event_integration.time_first_uplink == nil do Channels.update_channel(event_integration, organization, %{ time_first_uplink: event.reported_at_naive }) { _, time } = Timex.format(event.reported_at_naive, "%H:%M:%S UTC", :strftime) @@ -328,6 +329,7 @@ defmodule ConsoleWeb.Router.DeviceController do Channels.update_channel(event_integration, organization, %{ last_errored: false }) end end + end "downlink" -> if event.sub_category == "downlink_dropped" do details = %{ device_id: event_device.id, device_name: event_device.name }
8
diff --git a/physics-manager.js b/physics-manager.js @@ -680,6 +680,11 @@ physicsManager.simulatePhysics = (timeDiff) => { physicsManager.marchingCubes = (dims, potential, shift, scale) => physx.physxWorker.marchingCubes(dims, potential, shift, scale) +// + +physicsManager.setChunkSize = (x, y, z) => + physx.physxWorker.setChunkSize(x, y, z) + physicsManager.generateChunkDataDualContouring = (x, y, z) => physx.physxWorker.generateChunkDataDualContouring(x, y, z)
0
diff --git a/distribution/tests/tests.sh b/distribution/tests/tests.sh @@ -121,15 +121,15 @@ test_jenkins_logs_is_found_on_disk() { test_essentials_telemetry_logging_is_found_on_disk() { # shellcheck disable=SC2016 result=$( docker exec "$container_under_test" bash -c 'ls $JENKINS_VAR/logs/essentials.log.0' ) - assertEquals "0" "$?" + assertEquals "ls essentials.log.0 didn't work: $result" "0" "$?" # shellcheck disable=SC2016 result=$( docker exec "$container_under_test" bash -c 'cat $JENKINS_VAR/logs/essentials.log.0 | tail -1' ) - assertEquals "0" "$?" - assertNotEquals "" "$result" + assertEquals "cat essentials.log.0 | tail -1 didn't work: $result" "0" "$?" + assertNotEquals "last line of log is empty" "" "$result" echo "$result" | jsonlint > /dev/null - assertEquals "0" "$?" + assertEquals "last line of log is not valid json: $result" "0" "$?" } # not used for health-checking anymore, but kept for smoke testing
0
diff --git a/packages/plugin-logo/package.json b/packages/plugin-logo/package.json { "name": "@freesewing/plugin-logo", - "version": "0.3.3", + "version": "0.3.2", "description": "A freesewing plugin to add skully to your patterns", "author": "Joost De Cock <[email protected]> (https://github.com/joostdecock)", "license": "MIT",
11
diff --git a/contracts/SafeDecimalMath.sol b/contracts/SafeDecimalMath.sol @@ -35,10 +35,10 @@ pragma solidity ^0.4.20; contract SafeDecimalMath { // Number of decimal places in the representation. - uint public constant decimals = 18; + uint8 public constant decimals = 18; // The number representing 1.0. - uint public constant UNIT = 10 ** decimals; + uint public constant UNIT = 10 ** uint(decimals); /* True iff adding x and y will not overflow. */ function addIsSafe(uint x, uint y)
3