code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/articles/libraries/lock/v10/customization.md b/articles/libraries/lock/v10/customization.md @@ -50,7 +50,8 @@ var lock = new Auth0Lock('clientID', 'account.auth0.com', options);
| Option | Description |
| --- | --- |
| [auth](#auth-object-) | The auth object contains the below auth options |
-| [autoParseHash](#autoparsehash-boolean-) | Whether or not to automatically parse hash and continue
+| [audience](#audience-string-) | The API which will be consuming your `access_token` |
+| [autoParseHash](#autoparsehash-boolean-) | Whether or not to automatically parse hash and continue |
| [connectionScopes](#connectionscopes-object-) | Specify connection scopes |
| [params](#params-object-) | Option to send parameters at login |
| [redirect](#redirect-boolean-) | Whether or not to use redirect mode |
@@ -434,6 +435,18 @@ var options = {
};
```
+### audience {String}
+
+The `audience` option indicates the API which will be consuming the `access_token` that is received after authentication.
+
+```js
+var options = {
+ auth: {
+ audience: 'https://${account.namespace}/userinfo',
+ }
+}
+```
+
#### autoParseHash {Boolean}
When `autoParseHash` is set to `true`, Lock will parse the `window.location.hash` string when instantiated. If set to `false`, you'll have to manually resume authentication using the [resumeAuth](/libraries/lock/v10/api#resumeauth-) method.
| 0 |
diff --git a/config/bis_createutil.js b/config/bis_createutil.js @@ -122,7 +122,7 @@ let initialize=function(DIR) {
copyFileSync2(WASMDIR, `libbiswasm.wasm`, DIR, `wasm`);
copyFileSync2(WASMDIR, `libbiswasm_nongpl.wasm`, DIR, `wasm`);
copyFileSync2(WASMDIR, `libbiswasm_wrapper.js`, DIR, `wasm`);
-}
+};
module.exports = {
makeDir: makeDir,
| 1 |
diff --git a/create-snowpack-app/cli/README.md b/create-snowpack-app/cli/README.md @@ -37,4 +37,5 @@ npx create-snowpack-app new-dir --template @snowpack/app-template-NAME [--use-ya
- [snowpack-template-tailwind](https://github.com/jonalvarezz/snowpack-template-tailwind) (Snowpack + TailwindCSS + Autopublish to GitHub Pages)
- [glimmer-snowpack](https://github.com/rajasegar/glimmer-snowpack) (Snowpack + [Glimmer.js](https://glimmerjs.com))
- [snowpack-cycle](https://github.com/rajasegar/snowpack-cycle]) (A pre-configured Snowpack app template for [Cycle.js](https://cycle.js.org))
+- [snowpack-angular-template](https://github.com/YogliB/snowpack-template-angular]) (A preconfigured template for Snowpack with [Angular](https://angular.io))
- PRs that add a link to this list are welcome!
| 0 |
diff --git a/src/interfaces/plugins.ts b/src/interfaces/plugins.ts @@ -276,6 +276,9 @@ module.exports = (theApp: any) => {
debug('Plugins disabled by configuration')
options.enabled = false
}
+ if (!options.configuration) {
+ options.configuration = {}
+ }
debug(optionsAsString)
return options
} catch (e) {
| 1 |
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/code-editors/monaco.js @@ -97,8 +97,8 @@ RED.editor.codeEditor.monaco = (function() {
}
const defaultServerSideTypes = [ knownModules["node-red-util"], knownModules["node-red-func"], knownModules["globals"], knownModules["console"], knownModules["buffer"] ];
- var modulesCache = {};
- window.modulesCache = modulesCache;//DEBUGGING
+ const modulesCache = {};
+
/**
* Helper function to load/reload types.
* @param {string} mod - type lib to load. Only known libs are currently supported.
| 2 |
diff --git a/assets/sass/components/adminbar/_googlesitekit-adminbar.scss b/assets/sass/components/adminbar/_googlesitekit-adminbar.scss @include shadow;
background: $c-base;
color: $c-black;
- display: none;
left: 0;
padding: 0;
position: absolute;
}
}
- // Display sub menu on hover.
- &:not(.nojs) .googlesitekit-wp-adminbar:hover .googlesitekit-adminbar {
- display: block;
-
- &.--has-error {
- display: none;
- }
- }
-
// Handle links on mobile.
&:not(.mobile) .googlesitekit-plugin .googlesitekit-adminbar .googlesitekit-adminbar__link {
display: inline-block;
| 2 |
diff --git a/test/jasmine/tests/mock_test.js b/test/jasmine/tests/mock_test.js @@ -1313,6 +1313,7 @@ figs['date_axes_period_breaks_automargin'] = require('@mocks/date_axes_period_br
figs['date_histogram'] = require('@mocks/date_histogram');
// figs['dendrogram'] = require('@mocks/dendrogram');
figs['display-text_zero-number'] = require('@mocks/display-text_zero-number');
+figs['domain_refs'] = require("@mocks/domain_refs");
figs['earth_heatmap'] = require('@mocks/earth_heatmap');
figs['electric_heatmap'] = require('@mocks/electric_heatmap');
figs['empty'] = require('@mocks/empty');
| 0 |
diff --git a/articles/multifactor-authentication/factors/email.md b/articles/multifactor-authentication/factors/email.md @@ -9,25 +9,22 @@ contentType:
---
# MFA with Email
-Using email as an MFA factor is useful when you want to provide users a way to perform MFA when they don't have a mobile device.
+Using email as an MFA factor is useful when you want to provide users a way to perform MFA when they don't have their primary factor available (e.g. they don't have their phone to receive an SMS or push notification).
-Once Email is enabled as an MFA factor:
+You can only enable email as an MFA factor is there already another factor enabled.
-- Users with verified emails will get the option of getting a code in their email to complete the MFA challenge.
-- Users from Database Connections without verified emails will get prompted to verify their emails.
-- Users from social / enterprise connections that don't provide verified emails, will not be able to use MFA with email. If Email MFA is the ONLY enabled factor, they will get an error when logging-in, and they will not be able to complete the login flow. You should not enable Email MFA as the only factor if you have social/enterprise connections that don't provide verified emails.
-- Users will never get the option to enroll with email through Universal Login. If there are other factors enabled, they'll get prompted to enroll one of the other factors. If email is the only enabled factor, they'll receive an code in their email, and they'll need to enter it to continue.
+Once Email MFA is enabled user will be prompted to complete MFA with the other enabled factor. If they have a verified email they will be given the option to select Email, and get an one time code in their email which they can then enter to complete MFA.
+
+Users do not need to explicitly enroll with email MFA. They will get be able to use it when they have a verified email. This happens when they completed the email verification flow, when the updated the email_verified field using the Management API, or when they logged-in with a connection that provides verified emails (e.g. Google).
Note that Email is not true 'Multi-factor Authentication' as it does not represent a different factor than the password. It does not represent 'something I have' or 'something I am', but rather just another 'something I know' (the email password). It is also weaker than other factors, in that it's only as secure as the email itself (e.g. is it encrypted end-to-end?).
## End-user experience
-After the login step, users will be presented with the most secure enabled factor. If they select 'Other login options', and then pick Email, they will be sent an email with a six-digit code that they will need to enter to complete the authentication flow.
+After the login step, users will be prompted with the most secure enabled factor. If they select 'Try another method', and then pick Email, they will be sent an email with a six-digit code that they will need to enter to complete the authentication flow.

-After Email MFA is enabled, all new or existing users from Database Connections that do not have verified emails will get prompted to verify their emails after they log in. They will get a code in their email they'll need to enter in the login page to continue.
-
## Using the MFA API
You can explicitly enroll an email for MFA [using the MFA API](/multifactor-authentication/api/email). If users have a verified email and one or more explicitly enrolled emails, they'll be able to select which email they want to use to complete MFA when logging-in using Universal Login.
| 3 |
diff --git a/apps.json b/apps.json "name": "Test User Input",
"shortName":"Test User Input",
"icon": "app.png",
- "version":"0.02",
- "description": "Basic app to test the bangle.js input interface. It displays the result in text or a switch on/off image.",
+ "version":"0.03",
+ "description": "Basic app to test the bangle.js input interface. It displays the user action in text or an "on/off" switch image for swipe movement.",
"readme": "README.md",
"tags": "input,interface,buttons,touch",
"storage": [
| 3 |
diff --git a/docs/api/helper.md b/docs/api/helper.md @@ -46,9 +46,3 @@ Performs a shallow lexical comparison between two arrays. Returns `-1` iff `a <
* `input` `<String>`
Converts `'\r\n'`, `'\n\r'`, and `'\r'` into simple linebreaks `'\n'`.
-
-### helper.markdown(input)
-
-* `input` `<String>`
-
-Returns the HTML according to [Sabaki's Markdown rules](https://github.com/SabakiHQ/Sabaki/wiki/Markdown-in-Sabaki).
| 2 |
diff --git a/src/components/Timeline.js b/src/components/Timeline.js @@ -167,8 +167,19 @@ function Timeline({date, setDate, dates, isTimelineMode, setIsTimelineMode}) {
};
const transitions = useTransition(showCalendar, {
- from: {paddingTop: 0, marginBottom: 0, height: 0, opacity: 0},
- enter: {paddingTop: 36, marginBottom: 400, opacity: 1},
+ from: {
+ pointerEvents: 'none',
+ paddingTop: 0,
+ marginBottom: 0,
+ height: 0,
+ opacity: 0,
+ },
+ enter: {
+ pointerEvents: 'all',
+ paddingTop: 36,
+ marginBottom: 400,
+ opacity: 1,
+ },
leave: {
pointerEvents: 'none',
paddingTop: 0,
| 1 |
diff --git a/packages/idyll-document/src/index.js b/packages/idyll-document/src/index.js @@ -143,7 +143,7 @@ class Wrapper extends React.PureComponent {
}
const { __expr__, __vars__, hasError, ...state } = this.state
- const { children, ...passThruProps } = this.props
+ const { children, __expr__: _e, __vars__: _v, ...passThruProps } = this.props
return React.Children.map(children, (c, i) => {
return React.cloneElement(c, {
key: `${this.key}-${i}`,
| 2 |
diff --git a/packages/idyll-cli/test/multiple-component-dirs/expected-output/build/index.html b/packages/idyll-cli/test/multiple-component-dirs/expected-output/build/index.html <link rel="stylesheet" href="static/__idyll_styles.css">
</head>
<body>
- <div id="idyll-mount"><div data-reactroot=""><div class="idyll-root"><div style="max-width:600px;margin:0 auto" class=" idyll-text-container"><div class="article-header"><h1 class="hed">Welcome to Idyll</h1><h2 class="dek">Open index.idl to start writing</h2><div class="byline">By: <a href="https://idyll-lang.github.io">Your Name Here</a></div></div><p>This is an Idyll file. Write text
+ <div id="idyll-mount"><div data-reactroot=""><div class="idyll-root"><div style="max-width:600px;margin-top:0;margin-right:auto;margin-bottom:0;margin-left:auto" class=" idyll-text-container"><div class="article-header"><h1 class="hed">Welcome to Idyll</h1><h2 class="dek">Open index.idl to start writing</h2><div class="byline">By: <a href="https://idyll-lang.github.io">Your Name Here</a></div></div><p>This is an Idyll file. Write text
as you please in here. To add interactivity,
you can add different components to the text.</p><div class="ReactTable table "><div class="rt-table"><div class="rt-thead -header" style="min-width:200px"><div class="rt-tr"><div class="rt-th rt-resizable-header -cursor-pointer" role="heading" style="flex:100 0 auto;width:100px"><div class="rt-resizable-header-content">x</div><div class="rt-resizer"></div></div><div class="rt-th rt-resizable-header -cursor-pointer" role="heading" style="flex:100 0 auto;width:100px"><div class="rt-resizable-header-content">y</div><div class="rt-resizer"></div></div></div></div><div class="rt-tbody" style="min-width:200px"><div class="rt-tr-group"><div class="rt-tr -odd"><div class="rt-td" style="flex:100 0 auto;width:100px">0</div><div class="rt-td" style="flex:100 0 auto;width:100px">0</div></div></div><div class="rt-tr-group"><div class="rt-tr -even"><div class="rt-td" style="flex:100 0 auto;width:100px">1</div><div class="rt-td" style="flex:100 0 auto;width:100px">1</div></div></div></div></div><div class="-loading"><div class="-loading-inner">Loading...</div></div></div><p>Here is how you can use a variable:</p><input type="range" value="5" min="0" max="10" step="1"/><span>5.00</span><pre style="display:block;overflow-x:auto;padding:0.5em;color:#333;background:#f8f8f8"><code><span style="color:#333;font-weight:bold">var</span> code = <span style="color:#008080">true</span>;</code></pre><p>And here is a custom component:</p><div>This is a custom component</div><p>You can use standard html tags if a
component with the same name
| 3 |
diff --git a/content/specs/machine-type.md b/content/specs/machine-type.md @@ -16,6 +16,8 @@ For Flutter projects configured via the Flutter workflow editor, the build machi
Codemagic offers two types of macOS machines for running builds: Mac mini (macOS standard VM, default) and Mac Pro (macOS premium VM). Specifications for these machines are available for [Xcode 11.x](../specs/versions/#hardware), [Xcode 12.0 - 12.4](../specs/versions2/#hardware), [Xcode 12.5](../specs/versions3/#hardware), and [Xcode 13.0+](../specs/versions4/).
+Xcode 13 images and above have System Integrity Protection (SIP) disabled in order to run macOS UI tests, which require accessibility permissions. Older images with Xcode 12 and below do not have SIP disabled and are unsuitable for UI testing macOS apps.
+
{{<notebox>}}
Mac Pro machines are only available for teams and users that have [billing enabled](../billing/billing). See the [pricing page](https://codemagic.io/pricing/) for the per minute rate.
{{</notebox>}}
| 3 |
diff --git a/components/admin/data/widgets/table/component.js b/components/admin/data/widgets/table/component.js @@ -39,38 +39,7 @@ class WidgetsTable extends PureComponent {
}
componentDidMount() {
- const { dataset, user: { token } } = this.props;
- const { pagination } = this.state;
-
- fetchWidgets({
- includes: 'user',
- 'page[number]': pagination.page,
- 'page[size]': pagination.limit,
- application: process.env.APPLICATIONS,
- ...dataset && { dataset }
- }, { Authorization: token }, true)
- .then(({ widgets, meta }) => {
- const {
- 'total-pages': pages,
- 'total-items': size
- } = meta;
- const nextPagination = {
- ...pagination,
- size,
- pages
- };
-
- this.setState({
- loading: false,
- pagination: nextPagination,
- widgets: widgets.map(_widget => ({
- ..._widget,
- owner: _widget.user ? _widget.user.name || (_widget.user.email || '').split('@')[0] : '',
- role: _widget.user ? _widget.user.role || '' : ''
- }))
- });
- })
- .catch((error) => { this.setState({ error }); });
+ this.loadWidgets();
}
/**
@@ -171,17 +140,19 @@ class WidgetsTable extends PureComponent {
}
onRemoveWidget = () => {
- const { dataset, user: { token } } = this.props;
- const { pagination, filters } = this.state;
-
this.setState({ loading: true });
+ this.loadWidgets();
+ }
+
+ loadWidgets = () => {
+ const { dataset, user: { token } } = this.props;
+ const { pagination } = this.state;
fetchWidgets({
includes: 'user',
'page[number]': pagination.page,
'page[size]': pagination.limit,
application: process.env.APPLICATIONS,
- ...filters,
...dataset && { dataset }
}, { Authorization: token }, true)
.then(({ widgets, meta }) => {
@@ -205,7 +176,7 @@ class WidgetsTable extends PureComponent {
}))
});
})
- .catch(({ message }) => { this.setState({ error: message }); });
+ .catch((error) => { this.setState({ error }); });
}
render() {
| 7 |
diff --git a/src/sweetalert2.js b/src/sweetalert2.js @@ -418,7 +418,7 @@ const sweetAlert = (...args) => {
if (params.input === 'email' && params.inputValidator === null) {
const inputValidator = (email) => {
return new Promise((resolve, reject) => {
- const emailRegex = /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/
+ const emailRegex = /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/
if (emailRegex.test(email)) {
resolve()
} else {
| 11 |
diff --git a/renderer/components/test-info.js b/renderer/components/test-info.js @@ -43,14 +43,6 @@ const renderWebsitesSummary = (summary) => {
}
const DescriptionContainer = styled.div`
-a {
- color: ${props => props.theme.colors.blue5};
- text-decoration: none;
-}
-
-a:hover {
- color: ${props => props.theme.colors.blue3};
-}
`
const LongDescription = ({name}) => {
| 2 |
diff --git a/src/content/developers/tutorials/create-and-deploy-a-defi-app/index.md b/src/content/developers/tutorials/create-and-deploy-a-defi-app/index.md @@ -26,3 +26,23 @@ In this tutorial we will build a DeFi Application with Solidity where users can
If this is the first time you are writing a smart contract, you will need to set up your environment. We are going to use two tools: [Truffle](https://www.trufflesuite.com/) and [Ganache](https://www.trufflesuite.com/ganache).
Truffle is a development environment and testing framework for developing smart contracts for Ethereum. With Truffle it is easy to build and deploy smart contracts to the blockchain. Ganache allow us to create a local Ethereum blockchain in order to test smart contracts. It simulates the features of the real network and the first 10 accounts are funded with 100 test Ether, thus making the smart contract deployment and testing free and easy. Ganache is available as a desktop application and a command-line tool. For this article we will be using the UI desktop application.
+
+*Ganache UI desktop application*
+
+To create the project, run the following commands
+
+```Powershell
+mkdir YourProjectName
+cd YourProjectName
+truffle init
+```
+
+This will create a blank project for the development and deployment of our smart contracts. The created project structure is the following:
+
+* `contracts`: Folder for the solidity smart contracts
+
+* `migrations`: Folder for the deployment scripts
+
+* `test`: Folder for testing our smart contracts
+
+* `truffle-config.js`: Truffle configuration file
| 7 |
diff --git a/tests/test_IssuanceController.py b/tests/test_IssuanceController.py @@ -164,7 +164,6 @@ class TestIssuanceController(HavvenTestCase):
def test_cannotUpdatePricesIfUnauthorised(self):
randomUser = fresh_accounts(1)[0]
self.assertReverts(self.issuanceController.updatePrices, randomUser, self.usdToEthPrice, self.usdToHavPrice, block_time())
- self.assertReverts(self.issuanceController.updatePrices, self.contractOwner, self.usdToEthPrice, self.usdToHavPrice, block_time())
def test_updatePricesEvents(self):
timeSent = block_time()
| 2 |
diff --git a/helpers/peer-frontend/contracts/PeerFrontend.sol b/helpers/peer-frontend/contracts/PeerFrontend.sol */
pragma solidity 0.5.10;
+pragma experimental ABIEncoderV2;
+import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "@airswap/indexer/contracts/interfaces/IIndexer.sol";
-import "@airswap/swap/contracts/interfaces/ISwap.sol";
import "@airswap/peer/contracts/interfaces/IPeer.sol";
+import "@airswap/swap/contracts/interfaces/ISwap.sol";
/**
- * @title PeerFrontEnd: Onchain Liquidity provider for the Swap Protocol
+ * @title PeerFrontend: Onchain Liquidity provider for the Swap Protocol
*/
-contract PeerFrontEnd {
+contract PeerFrontend {
uint256 constant public MAX_INT = 2**256 - 1;
IIndexer indexer;
- ISwap swap;
+ ISwap swapContract;
constructor(IIndexer _indexer, ISwap _swap) public {
indexer = _indexer;
- swap = _swap;
+ swapContract = _swap;
}
function getBestTakerSideQuote(
@@ -40,7 +42,7 @@ contract PeerFrontEnd {
address _takerToken,
address _makerToken,
uint256 _maxIntents
- ) external view returns (bytes32 peerAddress, uint256 lowestCost) {
+ ) public view returns (bytes32 peerAddress, uint256 lowestCost) {
// use the indexer to query peers
lowestCost = MAX_INT;
@@ -76,7 +78,7 @@ contract PeerFrontEnd {
address _makerToken,
address _takerToken,
uint256 _maxIntents
- ) external view returns (bytes32 peerAddress, uint256 lowestCost) {
+ ) public view returns (bytes32 peerLocator, uint256 lowestCost) {
// use the indexer to query peers
lowestCost = MAX_INT;
@@ -97,13 +99,13 @@ contract PeerFrontEnd {
// Update the lowest cost.
if (makerAmount > 0 && makerAmount < lowestCost) {
- peerAddress = locators[i];
+ peerLocator = locators[i];
lowestCost = makerAmount;
}
}
// Return the Peer address and amount.
- return (peerAddress, lowestCost);
+ return (peerLocator, lowestCost);
}
@@ -114,6 +116,48 @@ contract PeerFrontEnd {
uint256 _maxIntents
) external {
+ // Find the best buy among Indexed Peers.
+ (bytes32 peerLocator, uint256 makerAmount) = getBestTakerSideQuote(_takerAmount, _takerToken, _makerToken, _maxIntents);
+
+ // check if peerLocator exists
+ require(peerLocator != bytes32(0), "NO_LOCATOR, BAILING");
+
+ address peerContract = address(bytes20(peerLocator));
+
+ // User transfers amount to the contract.
+ IERC20(_makerToken).transferFrom(msg.sender, address(this), makerAmount);
+
+ // PeerFrontend approves Swap to move its new tokens.
+ IERC20(_makerToken).approve(address(swapContract), makerAmount);
+
+ // PeerFrontend authorizes the Peer.
+ swapContract.authorize(peerContract, block.timestamp + 1);
+
+ // Consumer provides unsigned order to Peer.
+ IPeer(peerContract).provideOrder(Types.Order(
+ 1,
+ block.timestamp + 1,
+ Types.Party(
+ address(this), // consumer is acting as the maker in this case
+ _makerToken,
+ makerAmount,
+ 0x277f8169
+ ),
+ Types.Party(
+ IPeer(peerContract).owner(),
+ _takerToken,
+ _takerAmount,
+ 0x277f8169
+ ),
+ Types.Party(address(0), address(0), 0, bytes4(0)),
+ Types.Signature(address(0), 0, 0, 0, 0)
+ ));
+
+ // PeerFrontend revokes the authorization of the Peer.
+ swapContract.revoke(peerContract);
+
+ // PeerFrontend transfers received amount to the User.
+ IERC20(_takerToken).transfer(msg.sender, _takerAmount);
}
function fillBestMakerSideOrder(
@@ -123,5 +167,47 @@ contract PeerFrontEnd {
uint256 _maxIntents
) external {
+ // Find the best buy among Indexed Peers.
+ (bytes32 peerLocator, uint256 takerAmount) = getBestMakerSideQuote(_makerAmount, _makerToken, _takerToken, _maxIntents);
+
+ // check if peerLocator exists
+ require(peerLocator != bytes32(0), "NO_LOCATOR, BAILING");
+
+ address peerContract = address(bytes20(peerLocator));
+
+ // User transfers amount to the contract.
+ IERC20(_makerToken).transferFrom(msg.sender, address(this), _makerAmount);
+
+ // PeerFrontend approves Swap to move its new tokens.
+ IERC20(_makerToken).approve(address(swapContract), _makerAmount);
+
+ // PeerFrontend authorizes the Peer.
+ swapContract.authorize(peerContract, block.timestamp + 1);
+
+ // Consumer provides unsigned order to Peer.
+ IPeer(peerContract).provideOrder(Types.Order(
+ 1,
+ block.timestamp + 1,
+ Types.Party(
+ address(this), // consumer is acting as the maker in this case
+ _makerToken,
+ _makerAmount,
+ 0x277f8169
+ ),
+ Types.Party(
+ IPeer(peerContract).owner(),
+ _takerToken,
+ takerAmount,
+ 0x277f8169
+ ),
+ Types.Party(address(0), address(0), 0, bytes4(0)),
+ Types.Signature(address(0), 0, 0, 0, 0)
+ ));
+
+ // PeerFrontend revokes the authorization of the Peer.
+ swapContract.revoke(peerContract);
+
+ // PeerFrontend transfers received amount to the User.
+ IERC20(_takerToken).transfer(msg.sender, takerAmount);
}
}
\ No newline at end of file
| 3 |
diff --git a/src/libs/actions/User.js b/src/libs/actions/User.js @@ -241,19 +241,19 @@ function validateLogin(accountID, validateCode) {
* Checks the blockedFromConcierge object to see if it has an expiresAt key,
* and if so whether the expiresAt date of a user's ban is before right now
*
- * @param {Object} blockedFromConcierge
+ * @param {Object} blockedFromConciergeNVP
* @returns {Boolean}
*/
-function isBlockedFromConcierge(blockedFromConcierge) {
- if (_.isEmpty(blockedFromConcierge)) {
+function isBlockedFromConcierge(blockedFromConciergeNVP) {
+ if (_.isEmpty(blockedFromConciergeNVP)) {
return false;
}
- if (!blockedFromConcierge.expiresAt) {
+ if (!blockedFromConciergeNVP.expiresAt) {
return false;
}
- return moment().isBefore(moment(blockedFromConcierge.expiresAt), 'day');
+ return moment().isBefore(moment(blockedFromConciergeNVP.expiresAt), 'day');
}
/**
| 10 |
diff --git a/components/component-docs.json b/components/component-docs.json {
"value": "'checkbox'",
"computed": false
+ },
+ {
+ "value": "'list'",
+ "computed": false
}
]
},
{
"value": "'learnMore'",
"computed": false
+ },
+ {
+ "value": "'list-item'",
+ "computed": false
}
]
},
| 3 |
diff --git a/src/registry/domain/storage-adapter.ts b/src/registry/domain/storage-adapter.ts @@ -13,9 +13,12 @@ type LegacyStorageAdapter = {
};
const officialAdapters = {
- s3: { name: 'oc-s3-storage-adapter', version: '1.2.0' },
- gs: { name: 'oc-gs-storage-adapter', version: '1.1.0' },
- 'azure-blob-storage': { name: 'oc-azure-storage-adapter', version: '0.1.0' }
+ s3: { name: 'oc-s3-storage-adapter', firstPromiseBasedVersion: '1.2.0' },
+ gs: { name: 'oc-gs-storage-adapter', firstPromiseBasedVersion: '1.1.0' },
+ 'azure-blob-storage': {
+ name: 'oc-azure-storage-adapter',
+ firstPromiseBasedVersion: '0.1.0'
+ }
};
type OfficialAdapter = keyof typeof officialAdapters;
@@ -65,7 +68,7 @@ export default function getPromiseBasedAdapter(
if (isOfficialAdapter(adapter)) {
const pkg = officialAdapters[adapter.adapterType];
process.emitWarning(
- `Adapters now should work with promises. Consider upgrading your package ${pkg.name} to at least version ${pkg.version}`,
+ `Adapters now should work with promises. Consider upgrading your package ${pkg.name} to at least version ${pkg.firstPromiseBasedVersion}`,
'DeprecationWarning'
);
} else {
| 10 |
diff --git a/src/server/routes/search.js b/src/server/routes/search.js @@ -50,7 +50,7 @@ module.exports = function(crowi, app) {
*
* /_api/search:
* get:
- * tags: [Pages, CrowiCompatibles]
+ * tags: [Search, CrowiCompatibles]
* operationId: searchPages
* summary: /_api/search
* description: Search pages
| 10 |
diff --git a/packages/bitcore-node/src/routes/api/block.ts b/packages/bitcore-node/src/routes/api/block.ts @@ -52,16 +52,14 @@ router.get('/:blockId', async function(req: Request, res: Response) {
}
});
-router.get('before-time/:time', async function(req: Request, res: Response) {
+router.get('/before-time/:time', async function(req: Request, res: Response) {
let { time, chain, network } = req.params;
try {
const [block] = await BlockStorage.collection
.find({
- $query: {
chain,
network,
timeNormalized: { $lte: new Date(time) }
- }
})
.limit(1)
.sort({ timeNormalized: -1 })
| 1 |
diff --git a/lib/queryBuilder/operations/eager/RelationJoinBuilder.js b/lib/queryBuilder/operations/eager/RelationJoinBuilder.js @@ -131,7 +131,7 @@ class RelationJoinBuilder {
const id = pInfo.idGetter(row);
let model;
- if (!id) {
+ if (id === null) {
continue;
}
@@ -521,7 +521,7 @@ function createSingleIdGetter(idCols) {
return (row) => {
const val = row[idCol];
- if (!val) {
+ if (isNullOrUndefined(val)) {
return null;
} else {
return `id:${val}`;
@@ -537,7 +537,7 @@ function createTwoIdGetter(idCols) {
const val1 = row[idCol1];
const val2 = row[idCol2];
- if (!val1 || !val2) {
+ if (isNullOrUndefined(val1) || isNullOrUndefined(val2)) {
return null;
} else {
return `id:${val1},${val2}`;
@@ -555,7 +555,7 @@ function createThreeIdGetter(idCols) {
const val2 = row[idCol2];
const val3 = row[idCol3];
- if (!val1 || !val2 || !val3) {
+ if (isNullOrUndefined(val1) || isNullOrUndefined(val2) || isNullOrUndefined(val3)) {
return null;
} else {
return `id:${val1},${val2},${val3}`;
@@ -570,7 +570,7 @@ function createNIdGetter(idCols) {
for (let i = 0, l = idCols.length; i < l; ++i) {
const val = row[idCols[i]];
- if (!val) {
+ if (isNullOrUndefined(val)) {
return null;
}
@@ -581,6 +581,10 @@ function createNIdGetter(idCols) {
};
}
+function isNullOrUndefined(val) {
+ return val === null || val === undefined;
+}
+
function createFilterQuery(args) {
const builder = args.builder;
const modelClass = args.modelClass;
| 11 |
diff --git a/app-manager.js b/app-manager.js @@ -30,6 +30,7 @@ class AppManager extends EventTarget {
this.pendingAddPromise = null;
this.pushingLocalUpdates = false;
+ this.lastTimestamp = performance.now();
}
pretick(timestamp, frame) {
localData.timestamp = timestamp;
| 0 |
diff --git a/packages/@uppy/aws-s3-multipart/types/index.d.ts b/packages/@uppy/aws-s3-multipart/types/index.d.ts @@ -10,6 +10,7 @@ declare module AwsS3Multipart {
}
interface AwsS3MultipartOptions extends Uppy.PluginOptions {
+ companionHeaders?: { [type: string]: string }
companionUrl?: string
getChunkSize?: (file: Uppy.UppyFile) => number
createMultipartUpload?: (
| 0 |
diff --git a/test/nodejs/systemHandlerTests.js b/test/nodejs/systemHandlerTests.js @@ -34,8 +34,6 @@ describe('systemHandler', () => {
let dataSent;
let bigIpMock;
let activeCalled;
- let dnsStub = null;
- let stubs = [];
before(() => {
cloudUtilMock = require('@f5devcentral/f5-cloud-libs').util;
@@ -58,10 +56,7 @@ describe('systemHandler', () => {
return Promise.resolve();
}
};
- dnsStub = sinon.stub(dns, 'lookup').callsFake((address, callback) => {
- callback();
- });
- stubs = [];
+ sinon.stub(dns, 'lookup').callsArg(1);
});
after(() => {
@@ -71,8 +66,7 @@ describe('systemHandler', () => {
});
afterEach(() => {
- dnsStub.restore();
- stubs.forEach((stub) => { stub.restore(); });
+ sinon.restore();
});
it('should handle DbVariables', () => {
@@ -148,10 +142,8 @@ describe('systemHandler', () => {
});
it('should reject NTP if bad hostname is sent', () => {
- dnsStub.restore();
- dnsStub = sinon.stub(dns, 'lookup').callsFake((address, callback) => {
- callback(new Error('bad hostname'));
- });
+ dns.lookup.restore();
+ sinon.stub(dns, 'lookup').callsArgWith(1, new Error('bad hostname'));
const testServers = [
'example.cant',
@@ -183,16 +175,14 @@ describe('systemHandler', () => {
it('should reject if DNS configured after NTP is configured', () => {
let isDnsConfigured = false;
- dnsStub.restore();
- stubs.push(
sinon.stub(bigIpMock, 'replace').callsFake((path) => {
if (path === PATHS.DNS) {
isDnsConfigured = true;
}
return Promise.resolve();
- })
- );
- dnsStub = sinon.stub(dns, 'lookup').callsFake((address, callback) => {
+ });
+ dns.lookup.restore();
+ sinon.stub(dns, 'lookup').callsFake((address, callback) => {
const message = 'DNS must be configured before NTP, so server hostnames can be checked';
assert.strictEqual(isDnsConfigured, true, message);
callback();
@@ -570,10 +560,8 @@ describe('systemHandler', () => {
});
it('should reject if the bigIqHost is given a bad hostname', () => {
- dnsStub.restore();
- dnsStub = sinon.stub(dns, 'lookup').callsFake((address, callback) => {
- callback(new Error('bad hostname'));
- });
+ dns.lookup.restore();
+ sinon.stub(dns, 'lookup').callsArgWith(1, new Error('bad hostname'));
const testCase = 'example.cant';
const declaration = {
| 7 |
diff --git a/website/src/_posts/2019-04-liftoff-23.md b/website/src/_posts/2019-04-liftoff-23.md @@ -37,7 +37,7 @@ var uppy = Uppy.Core({
<script>
```
-While the new locale packs weren't finished, we had to reject updates to the old locales, and quickly [became outdated](https://github.com/transloadit/uppy/tree/master/packages/%40uppy/locales/legacy) for which we are very sorry. To all language contributors, we hope you can forgive us, and that you're willing to translate the [updated en_US locale](https://github.com/transloadit/uppy/blob/master/packages/%40uppy/locales/src/en_US.js) to your own language! This time we promise your contributions will make it to 1.0!
+While the new locale packs weren't finished, we had to reject updates to the old locales, and quickly became outdated for which we are very sorry. To all language contributors, we hope you can forgive us, and that you're willing to translate the [updated en_US locale](https://github.com/transloadit/uppy/blob/master/packages/%40uppy/locales/src/en_US.js) to your own language! This time we promise your contributions will make it to 1.0!
- [Alex](https://github.com/nqst) continues to work on a [new design for the uppy.io website](https://github.com/transloadit/uppy/pull/1452).
| 2 |
diff --git a/index.js b/index.js @@ -2,9 +2,9 @@ import * as THREE from 'three';
// import * as BufferGeometryUtils from 'three/examples/jsm/utils/BufferGeometryUtils.js';
// import easing from './easing.js';
import metaversefile from 'metaversefile';
-const {useApp, useLocalPlayer, useInternals, useGeometries, useMaterials, useFrame, useActivate, useLoaders, usePhysics, addTrackedApp, useDefaultModules, useCleanup} = metaversefile;
+const {useApp, useLocalPlayer, useInternals, useGeometries, useMaterials, useFrame, useActivate, useLoaders, usePhysics, useCleanup} = metaversefile;
-const baseUrl = import.meta.url.replace(/(\/)[^\/\\]*$/, '$1');
+// const baseUrl = import.meta.url.replace(/(\/)[^\/\\]*$/, '$1');
const localVector = new THREE.Vector3();
const localVector2 = new THREE.Vector3();
@@ -71,7 +71,6 @@ const ClippedPlane = (() => {
if (uv !== null) {
const direction = localVector.copy(line.end)
.sub(line.start);
- // console.log('dot', direction.dot(this.normal));
if (direction.dot(this.normal) < 0) {
return target.copy(this.normal)
.multiplyScalar(-1);
@@ -133,6 +132,18 @@ export default () => {
value: 0,
needsUpdate: false,
},
+ uStartTimeS: {
+ value: 0,
+ needsUpdate: false,
+ },
+ uDirection: {
+ value: new THREE.Vector3(0, 0, 0),
+ needsUpdate: false,
+ },
+ uSpeed: {
+ value: 0,
+ needsUpdate: false,
+ },
/* cameraDirection: {
value: new THREE.Vector3(),
needsUpdate: true,
@@ -142,10 +153,15 @@ export default () => {
precision highp float;
precision highp int;
+ uniform float iTime;
+ uniform float uStartTimeS;
+ uniform vec3 uDirection;
+ uniform float uSpeed;
varying vec3 vPosition;
varying vec2 vUv;
// varying vec3 vNormal;
// varying vec3 vCameraDirection;
+ varying float darkening;
float getBezierT(float x, float a, float b, float c, float d) {
return float(sqrt(3.) *
@@ -163,21 +179,11 @@ export default () => {
// const float moveDistance = 20.;
// const float q = 0.1;
- /* void main() {
- gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.);
- vUv = uv;
- vNormal = normalize(normalMatrix * normal);
- vCameraDirection = normalize(normalMatrix * vec3(0., 0., -1.));
- vPosition = position;
- } */
-
-
-
- varying float darkening;
-
void main(){
+ vec3 p = position;
+ p += uDirection * uSpeed * (iTime - uStartTimeS);
- vec4 view_pos = modelViewMatrix * vec4(position, 1.0);
+ vec4 view_pos = modelViewMatrix * vec4(p, 1.0);
vec3 view_dir = normalize(-view_pos.xyz); // vec3(0.0) - view_pos;
vec3 view_nv = normalize(normalMatrix * normal.xyz);
@@ -347,10 +353,23 @@ export default () => {
} else {
highlight = 0;
}
- // const highlightValue = animationSpec ? animationSpec.highlight : 1;
barrierMesh.material.uniforms.uHighlight.value = highlight;
barrierMesh.material.uniforms.uHighlight.needsUpdate = true;
+ if (animationSpec) {
+ barrierMesh.material.uniforms.uStartTimeS.value = animationSpec.startTimeS;
+ barrierMesh.material.uniforms.uStartTimeS.needsUpdate = true;
+
+ barrierMesh.material.uniforms.uDirection.value.copy(animationSpec.direction);
+ barrierMesh.material.uniforms.uDirection.needsUpdate = true;
+
+ barrierMesh.material.uniforms.uSpeed.value = animationSpec.speed;
+ barrierMesh.material.uniforms.uSpeed.needsUpdate = true;
+ } else {
+ barrierMesh.material.uniforms.uSpeed.value = 0;
+ barrierMesh.material.uniforms.uSpeed.needsUpdate = true;
+ }
+
barrierMesh.visible = animationSpec ? animationSpec.visible : true;
};
/* const material2 = new THREE.MeshPhongMaterial({
@@ -437,6 +456,9 @@ export default () => {
const cooldownTime = 2000;
// let playing = false;
useFrame(({timestamp, timeDiff}) => {
+ const timestampS = timestamp/1000;
+ const timeDiffS = timeDiff/1000;
+
if (animationSpec) {
if (timestamp >= animationSpec.endTime) {
if (animationSpec.type === 'trigger') {
@@ -447,6 +469,9 @@ export default () => {
visible: false,
startTime: timestamp,
endTime: timestamp + cooldownTime,
+ startTimeS: timestampS,
+ direction: new THREE.Vector3(0, 0, 0),
+ speed: 0,
};
} else {
animationSpec = null;
@@ -474,6 +499,9 @@ export default () => {
visible: true,
startTime: timestamp,
endTime: timestamp + 1000,
+ startTimeS: timestampS,
+ direction: penetrationNormalVector.clone(),
+ speed: localLine.start.distanceTo(localLine.end) / timeDiffS,
};
} else if (animationSpec && animationSpec.type === 'cooldown') {
animationSpec.startTime = timestamp;
| 0 |
diff --git a/README.md b/README.md [](https://nodei.co/npm/vue-gl/)
[](https://greenkeeper.io/)
[](https://circleci.com/gh/vue-gl/vue-gl)
+[](https://saucelabs.com/beta/builds/83bac1e5dafc467eb5594259690c5a96)
[Vue.js](https://vuejs.org/) components rendering 3D graphics reactively via [three.js](https://threejs.org/). See the [documents](https://vue-gl.github.io/vue-gl/) for more details.
## Usage
Define objects by tags.
| 4 |
diff --git a/magefile/doc.go b/magefile/doc.go +/**Package magefile exposes Mage (https://magefile.org) compatible
+functions that can be re-used by embedding applications. See https://github.com/mweagle/SpartaHelloWorld/blob/master/magefile.go
+for an example.
+**/
+
package magefile
| 0 |
diff --git a/packages/inferno/src/DOM/mounting.ts b/packages/inferno/src/DOM/mounting.ts @@ -109,6 +109,19 @@ export function mountElement(
const dom = documentCreateElement(vNode.type, isSVG);
vNode.dom = dom;
+
+ if (!isNullOrUndef(className) && className !== '') {
+ if (isSVG) {
+ dom.setAttribute('class', className);
+ } else {
+ dom.className = className;
+ }
+ }
+
+ if (!isNull(parentDom)) {
+ appendChild(parentDom, dom);
+ }
+
if ((childFlags & ChildFlags.HasInvalidChildren) === 0) {
const childrenIsSVG = isSVG === true && vNode.type !== 'foreignObject';
@@ -122,14 +135,6 @@ export function mountElement(
mountProps(vNode, flags, props, dom, isSVG);
}
- if (!isNullOrUndef(className) && className !== '') {
- if (isSVG) {
- dom.setAttribute('class', className);
- } else {
- dom.className = className;
- }
- }
-
if (process.env.NODE_ENV !== 'production') {
if (isString(ref)) {
throwError(
@@ -140,9 +145,6 @@ export function mountElement(
if (isFunction(ref)) {
mountRef(dom, ref, lifecycle);
}
- if (!isNull(parentDom)) {
- appendChild(parentDom, dom);
- }
return dom;
}
| 7 |
diff --git a/test/shared/testHelpers.js b/test/shared/testHelpers.js @@ -94,6 +94,12 @@ export function doesNotThrowInNodejs (t, fn, descr) {
if (platform.inNodeJS) {
t.doesNotThrow(fn, descr)
} else {
+ let success = false
+ try {
fn()
+ success = true
+ } finally {
+ t.ok(success, descr)
+ }
}
}
| 7 |
diff --git a/app/src/renderer/connectors/lcdClientMock.js b/app/src/renderer/connectors/lcdClientMock.js @@ -980,53 +980,41 @@ module.exports = {
// ============= TOTAL PROPOSAL's DEPOSIT =============
// Increment total deposit of the proposal
- let depositIndex = proposal.total_deposit.findIndex(
+ let deposit = proposal.total_deposit.find(
deposit => deposit.denom === coin.denom
)
- if (depositIndex === -1) {
+ if (!deposit) {
// if there's no previous deposit in that denom we just append it to the total deposit
proposal.total_deposit.push(coin)
} else {
// if there's an existing deposit with that denom we add the submited deposit amount to it
- let newAmt = String(
- parseInt(proposal.total_deposit[depositIndex].amount) +
- parseInt(coin.amount)
- )
- proposal.total_deposit[depositIndex].amount = newAmt
+ let newAmt = String(parseInt(deposit.amount) + parseInt(coin.amount))
+ deposit.amount = newAmt
}
// ============= USER'S DEPOSITS =============
// check if there's an existing deposit by the depositer
- let prevDepositIndex = state.deposits[proposal_id].findIndex(
+ let prevDeposit = state.deposits[proposal_id].find(
deposit => deposit.depositer === depositer
)
- if (prevDepositIndex === -1) {
+ if (!prevDeposit) {
// if no previous deposit by the depositer, we add it to the existing deposits
state.deposits[proposal_id].push(submittedDeposit)
break // break since no need to iterate over other coins
} else {
// ============= USER'S DEPOSITS WITH SAME COIN DENOM =============
// if there's a prev deposit, add the new amount to the corresponding coin
- let prevDepCoinIdx = state.deposits[proposal_id][
- prevDepositIndex
- ].amount.findIndex(prevDepCoin => {
+ let prevDepCoin = prevDeposit.amount.find(prevDepCoin => {
return prevDepCoin.denom === coin.denom
})
- if (prevDepCoinIdx === -1) {
- state.deposits[proposal_id][prevDepositIndex].amount.push(coin)
+ if (!prevDepCoin) {
+ prevDeposit.amount.push(coin)
} else {
// there's a previous deposit from the depositer with the same coin
- let newAmt =
- parseInt(
- state.deposits[proposal_id][prevDepositIndex].amount[
- prevDepCoinIdx
- ].amount
- ) + parseInt(coin.amount)
-
- state.deposits[proposal_id][prevDepositIndex].amount[
- prevDepCoinIdx
- ].amount = String(newAmt)
+ let newAmt = parseInt(prevDepCoin.amount) + parseInt(coin.amount)
+
+ prevDepCoin.amount = String(newAmt)
}
}
}
| 14 |
diff --git a/lib/jiff-client.js b/lib/jiff-client.js for (var i = 1; i <= jiff.party_count; i++) {
holders.push(i);
}
+ if (id_list == null) {
+ id_list = [];
+ }
for (i = 0; i < count; i++) {
var id = id_list[i];
if (id == null) {
| 9 |
diff --git a/src/display/svg.js b/src/display/svg.js @@ -903,7 +903,9 @@ SVGGraphics = (function SVGGraphicsClosure() {
// Path properties
setLineWidth: function SVGGraphics_setLineWidth(width) {
+ if (width > 0) {
this.current.lineWidth = width;
+ }
},
setLineCap: function SVGGraphics_setLineCap(style) {
this.current.lineCap = LINE_CAP_STYLES[style];
| 9 |
diff --git a/source/package.json b/source/package.json "@rollup/plugin-node-resolve": "^11.1.0",
"concurrently": "^5.1.0",
"eslint": "^6.8.0",
- "rollup": "^2.30.0",
+ "rollup": "^2.37.0",
"rollup-plugin-glslify": "^1.2.0",
"rollup-plugin-terser": "^7.0.2",
"serve": "^11.3.0"
| 3 |
diff --git a/contracts/consumer/test/Consumer.unit.js b/contracts/consumer/test/Consumer.unit.js @@ -77,13 +77,6 @@ contract('Consumer Unit Tests', async () => {
indexer_getIntents = indexerTemplate.contract.methods
.getIntents(EMPTY_ADDRESS, EMPTY_ADDRESS, 0)
.encodeABI()
- await mockIndexer.givenMethodReturn(
- indexer_getIntents,
- abi.rawEncode(
- ['bytes32[]'],
- [[mockDelegateHigh.address, mockDelegateLow.address]]
- )
- )
}
async function setupMocks() {
@@ -182,9 +175,7 @@ contract('Consumer Unit Tests', async () => {
indexer_getIntents,
abi.rawEncode(['bytes32[]'], [[low_locator, high_locator]])
)
- })
- it('test takeBestBuy()', async () => {
let trx = await consumer.takeBestBuy(
180,
mockUserSendToken.address,
| 2 |
diff --git a/data/repositories.yml b/data/repositories.yml - group: Smart Contracts
items:
- - name: ocean-contracts
+ - name: contracts
-- group: Ocean Market & Services
+- group: Ocean Market
items:
- name: market
+
+- group: Services
+ items:
+ - name: barge
- name: aquarius
links:
- name: API reference
url: /references/aquarius/
-
- - name: provider-py
+ - name: provider
- group: Compute-to-Data
items:
| 10 |
diff --git a/sirepo/comsol_register.py b/sirepo/comsol_register.py @@ -18,7 +18,9 @@ _mail = None
@api_perm.allow_visitor
def api_comsol():
- return http_reply.gen_redirect_for_anchor('/old#/comsol')
+ return http_reply.gen_redirect(
+ 'https://www.radiasoft.net/services/comsol-certified-consulting/',
+ )
@api_perm.allow_visitor
| 1 |
diff --git a/src/components/character-count/_character-count.scss b/src/components/character-count/_character-count.scss @include govuk-exports("govuk/component/character-count") {
.govuk-character-count {
+ @include govuk-responsive-margin(6, "bottom");
+
.govuk-form-group,
.govuk-textarea {
margin-bottom: govuk-spacing(1);
| 12 |
diff --git a/index.js b/index.js @@ -132,11 +132,13 @@ http.listen(3000, function(){
// Mod instead of javascript's remainder (%)
function mod(x, y) {
+ return x;
+ /*
if (x < 0) {
return ((x%y)+y)%y;
}
- return x%y;
+ return x%y;*/
}
/*
| 8 |
diff --git a/contribs/gmf/src/directives/print.js b/contribs/gmf/src/directives/print.js @@ -137,7 +137,7 @@ gmf.printComponent = {
'rotateMask': '<?gmfPrintRotatemask',
'fieldValues': '<?gmfPrintFieldvalues',
'hiddenAttributeNames': '<?gmfPrintHiddenattributes',
- 'attributesOut': '<?gmfPrintAttributesOut'
+ 'attributesOut': '=?gmfPrintAttributesOut'
},
controller: 'GmfPrintController',
templateUrl: gmfPrintTemplateUrl,
| 12 |
diff --git a/package.json b/package.json "devtools-protocol": "0.0.678506",
"dom-walk": "^0.1.1",
"escape-string-regexp": "^4.0.0",
- "eslint-plugin-hammerhead": "0.3.1",
+ "eslint-plugin-hammerhead": "0.4.0",
"eslint-plugin-no-only-tests": "^2.0.1",
"express": "^4.13.3",
"express-ntlm": "2.4.0",
| 3 |
diff --git a/config/application.rb b/config/application.rb @@ -174,11 +174,7 @@ module CartoDB
frontend_assets_version = JSON::parse(File.read(Rails.root.join('package.json')))['version']
config.action_controller.relative_url_root = "/assets/#{frontend_assets_version}"
- custom_views_path = Cartodb.get_config(:paths, 'custom_views_path') ||
- 'app/views/custom'
-
- ActionController::Base.prepend_view_path(custom_views_path)
- ActionMailer::Base.prepend_view_path(custom_views_path)
+ config.paths['app/views'].unshift('app/views/custom')
end
end
| 4 |
diff --git a/README.md b/README.md @@ -82,7 +82,7 @@ Or, you can install it locally and use the API:
```js
'use strict';
-const { Agent, Realm } = require('engine262');
+const { Agent, Realm, Abstract, Value, inspect } = require('engine262');
const agent = new Agent({
// onDebugger() {},
@@ -101,6 +101,13 @@ const realm = new Realm({
// randomSeed() {},
});
+// Add print function from host
+const print = new Value(realm, (args) => {
+ console.log(...args.map((tmp) => inspect(tmp)));
+ return Value.undefined;
+});
+Abstract.CreateDataProperty(realm.global, new Value(realm, 'print'), print);
+
realm.evaluateScript(`
'use strict';
| 3 |
diff --git a/assets/js/googlesitekit/datastore/user/user-info.test.js b/assets/js/googlesitekit/datastore/user/user-info.test.js @@ -376,7 +376,6 @@ describe( 'core/user userInfo', () => {
global[ userDataGlobal ] = userData;
const testURL = 'https://analytics.google.com/dashboard/';
- const userEmail = global[ userDataGlobal ].user.email;
registry.select( CORE_USER ).getAccountChooserURL( testURL );
@@ -392,10 +391,8 @@ describe( 'core/user userInfo', () => {
.select( CORE_USER )
.getAccountChooserURL( testURL );
- expect( accountChooserURL ).toBe(
- `https://accounts.google.com/accountchooser?continue=${ encodeURIComponent(
- testURL
- ) }&Email=${ encodeURIComponent( userEmail ) }`
+ expect( accountChooserURL ).toMatchInlineSnapshot(
+ '"https://accounts.google.com/accountchooser?continue=https%3A%2F%2Fanalytics.google.com%2Fdashboard%2F&Email=admin%40example.com"'
);
} );
| 4 |
diff --git a/src/pages/RequestCallPage.js b/src/pages/RequestCallPage.js @@ -51,12 +51,11 @@ class RequestCallPage extends React.Component {
const [firstName, lastName] = props.myPersonalDetails.displayName !== props.myPersonalDetails.login
? props.myPersonalDetails.displayName.split(' ')
: [];
-
- //
this.state = {
firstName: firstName ?? '',
lastName: lastName ?? '',
- phoneNumber: '',
+ phoneNumber: this.getPhoneNumber(props.user.loginList) ?? '',
+ isLoading: false,
};
this.conciergeReport = _.find(
@@ -64,24 +63,44 @@ class RequestCallPage extends React.Component {
report => report.participants.length === 1 && report.participants[0] === CONST.EMAIL.CONCIERGE,
);
+ this.getPhoneNumber = this.getPhoneNumber.bind(this);
this.onSubmit = this.onSubmit.bind(this);
}
onSubmit() {
+ this.setState({isLoading: true});
if (!this.state.firstName.length || !this.state.lastName.length) {
Growl.show(this.props.translate('requestCallPage.growlMessageEmptyName'), CONST.GROWL.ERROR);
+ this.setState({isLoading: false});
return;
}
- if (!Str.isValidPhone(this.state.phoneNumber)) {
- Growl.show(this.props.translate('requestCallPage.growlMessageInvalidPhone'), CONST.GROWL.ERROR);
- return;
- }
+
requestConciergeDMCall('', this.state.firstName, this.state.lastName, this.state.phoneNumber)
.then((result) => {
- console.log(">>>> result", result);
+ this.setState({isLoading: false});
+ if (result.jsonCode === 200) {
+ Growl.show(this.props.translate('requestCallPage.growlMessageOnSave'), CONST.GROWL.SUCCESS);
+ Navigation.navigate(ROUTES.getReportRoute(this.conciergeReport.reportID));
+ return;
+ }
+
+ // Phone number validation is handled by the API
+ Growl.show(result.message, CONST.GROWL.ERROR, 3000);
});
}
+ /**
+ * Gets the user's phone number from their secondary login.
+ * Returns null if it doesn't exist.
+ * @param {Array<Object>} loginList
+ *
+ * @returns {String|null}
+ */
+ getPhoneNumber(loginList) {
+ const secondaryLogin = _.find(loginList, login => Str.isSMSLogin(login.partnerUserID));
+ return secondaryLogin ? Str.removeSMSDomain(secondaryLogin.partnerUserID) : null;
+ }
+
render() {
const isButtonDisabled = false;
return (
@@ -125,6 +144,7 @@ class RequestCallPage extends React.Component {
onPress={this.onSubmit}
style={[styles.w100]}
text={this.props.translate('requestCallPage.callMe')}
+ isLoading={this.state.isLoading}
/>
</FixedFooter>
</ScreenWrapper>
@@ -150,5 +170,8 @@ export default compose(
reports: {
key: ONYXKEYS.COLLECTION.REPORT,
},
+ user: {
+ key: ONYXKEYS.USER,
+ },
}),
)(RequestCallPage);
| 9 |
diff --git a/lib/carto/connector/providers.rb b/lib/carto/connector/providers.rb @@ -42,12 +42,13 @@ module Carto
name: 'Hive',
class: HiveProvider,
public: true
- },
- 'bigquery' => {
- name: 'Google BigQuery 64',
- class: BigQueryProvider,
- public: true
}
+ #,
+ # 'bigquery' => {
+ # name: 'Google BigQuery 64',
+ # class: BigQueryProvider,
+ # public: true
+ # }
}
DEFAULT_PROVIDER = nil # No default provider
| 2 |
diff --git a/articles/protocols/oauth2/index.md b/articles/protocols/oauth2/index.md @@ -156,6 +156,8 @@ The [OAuth 2.0 Multiple Response Type Encoding Practices](https://openid.net/spe
</html>
```
+- `web_message`: This response mode is defined by the [OAuth 2.0 Web Message Response Mode specification](https://tools.ietf.org/html/draft-sakimura-oauth-wmrm-00). It uses HTML5 Web Messaging instead of the redirect for the Authorization Response from the Authorization Endpoint. Basically it enables your single-page application to perform a sign-in flow in an iFrame or a popup window, and get the tokens in the parent page securely, and without leaving the context of that page. To use this response mode you have to register your app's URL at the __Allowed Web Origins__ field of your [Client's settings](${manage_url}/#/clients/${account.clientId}/settings).
+
### Token Endpoint
The Token endpoint is used by the client in order to get an [access token](/tokens/access-token) or a [refresh token](/tokens/refresh-token). It is used by all grant types, except for [Implicit](/api-auth/grant/implicit) grant (since an access token is issued directly).
| 0 |
diff --git a/src/extensions/default/CSSPseudoSelectorHints/main.js b/src/extensions/default/CSSPseudoSelectorHints/main.js @@ -27,18 +27,20 @@ define(function (require, exports, module) {
// Load dependent modules
var AppInit = brackets.getModule("utils/AppInit"),
CodeHintManager = brackets.getModule("editor/CodeHintManager"),
+ TokenUtils = brackets.getModule("utils/TokenUtils"),
PseudoRulesText = require("text!PseudoSelectors.json"),
PseudoRules = JSON.parse(PseudoRulesText);
var TOKEN_TYPE_PSEUDO_SELECTOR = 0,
- TOKEN_TYPE_PSEUDO_ELEMENT = 1;
+ TOKEN_TYPE_PSEUDO_ELEMENT = 1,
+ PUNCTUATION_CHAR = ':';
- function _getPseudoContext(token, cursorText) {
+ function _getPseudoContext(token, cursorText, ctx) {
var slicedToken,
contextType = -1;
- // Magic code to get around CM's redundant 'pseudo' identification logic
+ // Magic code to get around CM's 'pseudo' identification logic
// As per CSS3 spec :
// -> ':' identifies pseudo slectors
// -> '::' identifies pseudo elements
@@ -51,11 +53,23 @@ define(function (require, exports, module) {
slicedToken = cursorText.substr(0, token.start).slice(-3);
}
+ if (!slicedToken) {
+ //We get here when in SCSS mode and the cursor is right after ':'
+ //Test the previous token first
+ TokenUtils.movePrevToken(ctx);
+ if (ctx.token.string === PUNCTUATION_CHAR) {
+ //We are in pseudo elemnt context ('::')
+ contextType = TOKEN_TYPE_PSEUDO_ELEMENT;
+ } else {
+ contextType = TOKEN_TYPE_PSEUDO_SELECTOR;
+ }
+ } else {
if (slicedToken.slice(-2) === "::") {
contextType = TOKEN_TYPE_PSEUDO_ELEMENT;
} else if (slicedToken.slice(-1) === ":") {
contextType = TOKEN_TYPE_PSEUDO_SELECTOR;
}
+ }
return contextType;
}
@@ -75,21 +89,22 @@ define(function (require, exports, module) {
this.editor = editor;
// Check if we are at ':' pseudo rule or in 'variable-3' 'def' context
- return token.state.state === "pseudo" || token.type === "variable-3";
+ return token.state.state === "pseudo" || token.type === "variable-3" || token.string === PUNCTUATION_CHAR;
};
PsudoSelectorHints.prototype.getHints = function (implicitChar) {
var pos = this.editor.getCursorPos(),
token = this.editor._codeMirror.getTokenAt(pos),
filter = token.type === "variable-3" ? token.string : "",
- lineTillCursor = this.editor._codeMirror.getLine(pos.line);
+ lineTillCursor = this.editor._codeMirror.getLine(pos.line),
+ ctx = TokenUtils.getInitialContext(this.editor._codeMirror, pos);
- if (!(token.state.state === "pseudo" || token.type === "variable-3")) {
+ if (!(token.state.state === "pseudo" || token.type === "variable-3" || token.string === PUNCTUATION_CHAR)) {
return null;
}
// validate and keep the context in scope so that it can be used while getting description
- this.context = _getPseudoContext(token, lineTillCursor);
+ this.context = _getPseudoContext(token, lineTillCursor, ctx);
// If we are not able to find context, don't proceed
if (this.context === -1) {
| 9 |
diff --git a/src/sections/Meshery/Meshery-platforms/index.js b/src/sections/Meshery/Meshery-platforms/index.js @@ -39,7 +39,9 @@ const supported_platforms = [
steps: (
<>
<h2>Docker User</h2>
- <Code codeString={dedent`mesheryctl system start`}
+ <Code codeString={dedent`curl -L https://git.io/meshery | PLATFORM=docker bash -
+ mesheryctl system start`
+ }
/>
</>
)
@@ -62,7 +64,8 @@ const supported_platforms = [
steps: (
<>
<h2>Google Kubernetes Engine User</h2>
- <Code codeString={dedent`mesheryctl system config gke
+ <Code codeString={dedent` mesheryctl system config gke --token *PATH_TO_TOKEN*
+ ./generate_kubeconfig_gke.sh cluster-admin-sa-gke default
mesheryctl system start`}
/>
</>
@@ -75,36 +78,22 @@ const supported_platforms = [
<>
<h2>Helm Chart</h2>
<p>Install on Kubernetes using Helm:</p>
- <Code codeString={dedent`kubectl create namespace meshery
- helm repo add meshery https://meshery.io/charts/
- helm install meshery meshery/meshery -n meshery`} />
- </>
- )
- },
- {
- icon: HomeBrew,
- name: "HomeBrew",
- steps: (
- <>
- <h3>Brew User</h3>
- <p>Install on Mac or Linux using Homebrew:</p>
- <Code codeString={dedent`brew tap layer5io/tap
- brew install mesheryctl
- mesheryctl system start`}
- />
+ <Code codeString={dedent`helm repo add meshery https://meshery.io/charts/
+ helm install my-meshery meshery/meshery --version 2.1.2`
+ } />
</>
)
},
+
{
icon: Kind,
- name: "Kind",
+ name: "KinD",
steps: (
<>
<h2>KinD User</h2>
<Code codeString={dedent`export KUBECONFIG=$HOME/.kube/config
kubectl create namespace meshery
- helm repo add meshery https://meshery.io/charts/
- helm install meshery meshery/meshery`}
+ helm install meshery --namespace meshery install/kubernetes/helm/meshery`}
/>
</>
)
@@ -115,7 +104,9 @@ const supported_platforms = [
steps: (
<>
<h2>Kubernetes User</h2>
- <Code codeString={dedent`mesheryctl system start`}
+ <Code codeString={dedent`curl -L https://git.io/meshery | PLATFORM=kubernetes bash -
+ mesheryctl system start`
+ }
/>
</>
)
@@ -138,7 +129,7 @@ const supported_platforms = [
<>
<h2>Minikube User</h2>
- <Code codeString={dedent`mesheryctl system config minikube`
+ <Code codeString={dedent`mesheryctl system config minikube -t ~/Downloads/auth.json`
}
/>
</>
@@ -162,7 +153,7 @@ const supported_platforms = [
name: "WSL2",
steps: (
<>
- <h2>Winddows User</h2>
+ <h2>Windows User</h2>
<p>
Download and unzip mesheryctl from the <a href="https://github.com/layer5io/meshery/releases/">Meshery releases page</a>. Add mesheryctl to your PATH for ease of use. Then, execute:</p>
<Code codeString={dedent`./mesheryctl system start`}
| 1 |
diff --git a/config.js b/config.js @@ -48,10 +48,13 @@ function getConfig(env) {
case 'localnet':
return {
networkId: 'local',
- nodeUrl: 'http://localhost:3030',
+ nodeUrl: process.env.NEAR_NODE_URL || 'http://localhost:3030',
keyPath: `${process.env.HOME}/.near/validator_key.json`,
- walletUrl: 'http://localhost:4000/wallet',
+ walletUrl: process.env.NEAR_WALLET_URL || 'http://localhost:4000/wallet',
contractName: CONTRACT_NAME,
+ helperUrl: process.env.NEAR_HELPER_URL || 'http://localhost:3000',
+ helperAccount: process.env.NEAR_HELPER_ACCOUNT || 'node0',
+ explorerUrl: process.env.NEAR_EXPLORER_URL || 'http://localhost:9001',
};
case 'test':
case 'ci':
| 7 |
diff --git a/runtime.js b/runtime.js @@ -299,6 +299,31 @@ const _loadMetaversefile = async (file, {contentId = null, instanceId = null, au
monetizationPointer,
});
};
+// Error.stackTraceLimit = 300;
+class ErrorBoundary extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = { hasError: false };
+ }
+
+ static getDerivedStateFromError(error) {
+ // Update state so the next render will show the fallback UI.
+ return { hasError: true };
+ }
+
+ componentDidCatch(error, errorInfo) {
+ // You can also log the error to an error reporting service
+ // logErrorToMyService(error, errorInfo);
+ console.warn(error);
+ }
+
+ render() {
+ if (this.state.hasError) {
+ return null;
+ }
+ return this.props.children;
+ }
+}
const _loadRtfjs = async (file, {contentId = null, instanceId = null, parentUrl = null, autoScale = true, monetizationPointer = null, ownerAddress = null} = {}) => {
let srcUrl = file.url || URL.createObjectURL(file);
| 0 |
diff --git a/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/control_bar.scss b/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/control_bar.scss @@ -151,7 +151,7 @@ $slim-player-controls-progress-bar-load-progress-color: rgba(255, 255, 255, 0.2)
&-load_progress {
position: absolute;
left: 0;
- top: 10px;
+ top: 8px;
height: 3px;
}
@@ -166,7 +166,7 @@ $slim-player-controls-progress-bar-load-progress-color: rgba(255, 255, 255, 0.2)
&-progress_bar_handle {
position: absolute;
left: 0;
- top: 11px;
+ top: 9px;
width: 0;
height: 0;
@include transform(scale(0));
@@ -188,7 +188,7 @@ $slim-player-controls-progress-bar-load-progress-color: rgba(255, 255, 255, 0.2)
%player_controls-progress_bar:before,
%player_controls-play_progress,
%player_controls-load_progress {
- top: 9px;
+ top: 7px;
height: 5px;
}
| 7 |
diff --git a/src/geo/ui/overlays-view.js b/src/geo/ui/overlays-view.js @@ -105,8 +105,8 @@ var OverlaysView = View.extend({
},
_getOverlayViewByType: function (type) {
- return _.find(this._overlayViews, function (overlay) {
- return overlay.type === type;
+ return _.find(this._overlayViews, function (overlayView) {
+ return overlayView.type === type;
});
},
| 10 |
diff --git a/changelog/55_UNRELEASED_2019-xx-xx.md b/changelog/55_UNRELEASED_2019-xx-xx.md - A huge THANK YOU goes to @kriddles for the work on this feature
### New feature: Scan mode
+- Just scan one product after another, no manual input required and audio feedback is provided
- New switch-button on the purchase and consume page
- When enabled
- The amount will always be filled with `1` after changing/scanning a product
- If all fields could be automatically populated (means for purchase the product has a default best before date set), the transaction is automatically submitted
- If not, a warning is displayed and you can fill in the missing information
- Audio feedback is provided after scanning and on success/error of the transaction
+- => Quick video demo: https://www.youtube.com/watch?v=83dm9iD718k
### New feature: Self produced products
- To a recipe a product can be attached
| 0 |
diff --git a/src/components/SimpleInput.js b/src/components/SimpleInput.js @@ -49,20 +49,12 @@ const Input = React.createClass({
},
_onFocus () {
- if (this.input) {
- this.input.focus();
- }
-
this.setState({
focus: true
});
},
_onBlur () {
- if (this.input) {
- this.input.blur();
- }
-
this.setState({
focus: false
});
@@ -74,16 +66,15 @@ const Input = React.createClass({
return (
<div
- onBlur={this._onBlur}
- onFocus={this._onFocus}
style={Object.assign({}, styles.wrapper, this.state.focus ? styles.activeWrapper : null)}
- tabIndex={0}
>
{this.props.icon ? (
<Icon size={20} style={styles.icon} type={this.props.icon} />
) : null}
<input
{...elementProps}
+ onBlur={this._onBlur}
+ onFocus={this._onFocus}
ref={(ref) => {
this.input = ref;
}}
| 1 |
diff --git a/tests/helpers/setup-no-deprecations.js b/tests/helpers/setup-no-deprecations.js @@ -4,12 +4,17 @@ import { registerDeprecationHandler } from '@ember/debug';
let isRegistered = false;
let deprecations;
+// Ignore deprecations that are not caused by our own code, and which we cannot fix easily.
+const ignoredDeprecations = [/Versions of modifier manager capabilities prior to 3\.22 have been deprecated/];
+
export default function setupNoDeprecations({ beforeEach, afterEach }) {
beforeEach(function () {
deprecations = [];
if (!isRegistered) {
registerDeprecationHandler((message, options, next) => {
+ if (!ignoredDeprecations.some((regex) => message.match(regex))) {
deprecations.push(message);
+ }
next(message, options);
});
isRegistered = true;
| 8 |
diff --git a/src/functionHelper.js b/src/functionHelper.js @@ -13,7 +13,7 @@ module.exports = {
funName,
handlerName, // i.e. run
handlerPath: `${servicePath}/${handlerPath}`,
- funTimeout: (fun.timeout || 6) * 1000,
+ funTimeout: (fun.timeout || 30) * 1000,
babelOptions: ((fun.custom || {}).runtime || {}).babel,
};
},
| 12 |
diff --git a/packages/bpk-component-theme-toggle/src/BpkThemeToggle.js b/packages/bpk-component-theme-toggle/src/BpkThemeToggle.js @@ -71,8 +71,10 @@ class BpkThemeToggle extends React.Component {
: 0;
if (selectedIndex >= availableThemes.length) {
selectedIndex = 0;
- }
+ selectedTheme = null;
+ } else {
selectedTheme = availableThemes[selectedIndex];
+ }
this.setState({ selectedTheme });
setTheme(bpkCustomThemes[selectedTheme]);
};
| 11 |
diff --git a/src/pages/ReimbursementAccount/CompanyStep.js b/src/pages/ReimbursementAccount/CompanyStep.js @@ -70,6 +70,10 @@ class CompanyStep extends React.Component {
// These fields need to be filled out in order to submit the form
this.requiredFields = [
'companyName',
+ 'addressStreet',
+ 'addressCity',
+ 'addressState',
+ 'addressZipCode',
'website',
'companyTaxID',
'incorporationDate',
@@ -82,6 +86,10 @@ class CompanyStep extends React.Component {
// Map a field to the key of the error's translation
this.errorTranslationKeys = {
companyName: 'bankAccount.error.companyName',
+ companyAddressStreet: 'bankAccount.error.addressStreet',
+ companyAddressCity: 'bankAccount.error.addressCity',
+ companyAddressState: 'bankAccount.error.addressState',
+ companyAddressZIP: 'bankAccount.error.zipCode',
companyPhone: 'bankAccount.error.phoneNumber',
website: 'bankAccount.error.website',
companyTaxID: 'bankAccount.error.taxID',
@@ -185,6 +193,7 @@ class CompanyStep extends React.Component {
containerStyles={[styles.mt4]}
value={`${this.state.addressStreet}, ${this.state.addressCity}, ${this.state.addressState}, ${this.state.addressZipCode}`}
onChangeText={(fieldName, value) => this.clearErrorAndSetValue(fieldName, value)}
+ errorText={this.getErrorText('companyAddress')}
/>
<ExpensiTextInput
label={this.props.translate('common.phoneNumber')}
| 12 |
diff --git a/articles/security/bulletins/2020-03-31_wpauth0.md b/articles/security/bulletins/2020-03-31_wpauth0.md ---
-title: Auth0 Security Bulletin CVE 2019-20173
-description: Security Update for WordPress Plugin for Auth0 (CVE 2019-20173)
+title: Auth0 Security Bulletin CVE-2020-5391, CVE-2020-5392, CVE-2020-6753, CVE-2020-7948, CVE-2020-7947
+description: Security Update for WordPress Plugin for Auth0 (CVE-2020-5391, CVE-2020-5392, CVE-2020-6753, CVE-2020-7948, CVE-2020-7947)
toc: true
topics:
- security
@@ -23,6 +23,7 @@ useCase:
**Credit**: Muhamad Visat
## Overview
+
Auth0 has released a new major version of WordPress Plugin for Auth0 to address several vulnerabilities.
We recommend you review the following security advisories and upgrade to the new major version:
@@ -34,11 +35,14 @@ We recommend you review the following security advisories and upgrade to the new
- Insecure direct object reference in Auth0 WP plugin: [CVE-2020-7948](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7948)
## Am I affected?
+
Customers using any version of the WordPress Plugin for Auth0 3.11.3 or earlier can be affected.
## How to fix that?
+
Customers using WordPress Plugin for Auth0 need to upgrade to version 4.0.0 or higher.
## Will this update impact my users?
+
The [release notes](https://github.com/auth0/wp-auth0/blob/master/CHANGELOG.md) provide more in-depth information about the changes that were made, and the [migration instructions](https://github.com/auth0/wp-auth0/blob/master/MIGRATE-v3-TO-v4.md) provide more in-depth information about the upgrade path.
| 3 |
diff --git a/userscript.user.js b/userscript.user.js @@ -3647,6 +3647,9 @@ var $$IMU_EXPORT$$;
};
var mediainfo_api = function(id, cb) {
+ if (!use_app_api)
+ return cb(null);
+
var cache_key = "instagram_mediainfo:" + id;
api_cache.fetch(cache_key, cb, function (done) {
var url = "https://i.instagram.com/api/v1/media/" + id + "/info/";
@@ -3671,6 +3674,9 @@ var $$IMU_EXPORT$$;
};
var get_all_stories_api = function(uid, cb) {
+ if (!use_app_api)
+ return cb(null);
+
var story_cache_key = "instagram_story_uid:" + uid;
api_cache.fetch(story_cache_key, cb, function (done) {
var url = "https://i.instagram.com/api/v1/feed/user/" + uid + "/reel_media/";
@@ -3973,7 +3979,7 @@ var $$IMU_EXPORT$$;
if (app_response !== null) {
images = get_maxsize_app(app_response.items[0]);
- } else {
+ } else if (use_app_api) {
console_log("Unable to use API to find Instagram image, you may need to login to Instagram");
}
| 4 |
diff --git a/js/core/bis_bidsutils.js b/js/core/bis_bidsutils.js 'use strict';
const bis_genericio = require('bis_genericio');
+const colors=bis_genericio.getcolorsmodule();
// DICOM2BIDS
/**
@@ -40,7 +41,7 @@ let dicom2BIDS = async function (opts) {
console.log('opts=', opts);
- console.log('Conversion done, now converting files to BIDS format.');
+ console.log(colors.yellow('.... Now converting files to BIDS format.'));
let matchniix = bis_genericio.joinFilenames(indir, '*.nii.gz');
let matchsupp = bis_genericio.joinFilenames(indir, '*');
@@ -48,10 +49,8 @@ let dicom2BIDS = async function (opts) {
let flist = await bis_genericio.getMatchingFiles(matchniix);
let suppfiles = await bis_genericio.getMatchingFiles(matchsupp);
- console.log('Flist=', flist.join('\n\t'));
- console.log('supp files', suppfiles);
-
-
+ console.log(colors.green('.... Flist : '+flist.join('\n\t')));
+ console.log(colors.yellow('... Supporting files : '+suppfiles.join('\n\t')));
//wait for all files to move and hashes to finish calculating
let makeHash = calculateChecksums(flist);
@@ -73,11 +72,12 @@ let dicom2BIDS = async function (opts) {
let outputdirectory = bis_genericio.joinFilenames(outdir, 'source');
try {
await makeDir(outputdirectory);
+ console.log(colors.green('....\nCreated output directory : '+outputdirectory));
} catch (e) {
return errorfn('Failed to make directory ' + e);
}
- console.log('+++++', 'Created directory', outputdirectory);
+
let funcdir = bis_genericio.joinFilenames(outputdirectory, 'func');
let anatdir = bis_genericio.joinFilenames(outputdirectory, 'anat');
@@ -238,24 +238,6 @@ let dicom2BIDS = async function (opts) {
console.log('----- output directory', outputdirectory);
- //delete input folder if it lives in /tmp
- let splitindir = indir.split('/');
- if (splitindir[0] === '') { splitindir.shift(); } //trim a leading slash if needs be
- if (splitindir[0] === 'tmp') {
-
- //remove the top level folder in /tmp, i.e. /home/[username]
- let containingFolder = splitindir.splice(0, 2).join('/');
- containingFolder = '/' + containingFolder;
-
-
- //TODO: Figure out inconsistency between Promises and async / await here (doesn't delete on node)
- bis_genericio.deleteDirectory(containingFolder).then(() => {
- console.log('Deleted', containingFolder, 'successfully');
- }).catch((e) => {
- console.log('An Error occured trying to delete', containingFolder, e);
- });
- }
-
return outputdirectory;
} catch (e) {
| 2 |
diff --git a/src/components/listing-detail.js b/src/components/listing-detail.js @@ -11,6 +11,14 @@ import UserCard from './user-card'
// not using a global singleton
import origin from '../services/origin'
+/* linking to contract Etherscan requires knowledge of which network we're on */
+const etherscanDomains = {
+ 1: 'etherscan.io',
+ 3: 'ropsten.etherscan.io',
+ 4: 'rinkeby.etherscan.io',
+ 42: 'kovan.etherscan.io',
+}
+
class ListingsDetail extends Component {
constructor(props) {
@@ -25,6 +33,7 @@ class ListingsDetail extends Component {
}
this.state = {
+ etherscanDomain: null,
loading: true,
pictures: [],
reviews: [],
@@ -97,9 +106,9 @@ class ListingsDetail extends Component {
// Listing json passed in directly
this.setState(obj)
}
- const networkName = await web3.eth.net.getNetworkType() // Actually returns name, e.g. 'ropsten'
+ const networkId = await web3.eth.net.getId()
this.setState({
- networkName: networkName,
+ etherscanDomain: etherscanDomains[networkId],
})
}
@@ -207,9 +216,9 @@ class ListingsDetail extends Component {
</a>
</div>
}
- {this.state.address &&
+ {this.state.address && this.state.etherscanDomain &&
<div className="etherscan link-container">
- <a href={`https://${(this.state.networkName)}.etherscan.io/address/${(this.state.address)}#internaltx`} target="_blank">
+ <a href={`https://${(this.state.etherscanDomain)}/address/${(this.state.address)}#internaltx`} target="_blank">
View on Etherscan<img src="images/carat-blue.svg" className="carat" alt="right carat" />
</a>
</div>
| 9 |
diff --git a/src/components/nodes/sequenceFlow/sequenceFlow.vue b/src/components/nodes/sequenceFlow/sequenceFlow.vue @@ -23,8 +23,6 @@ import linkConfig from '@/mixins/linkConfig';
import get from 'lodash/get';
import { id as laneId } from '../poolLane';
import { namePosition } from './sequenceFlowConfig';
-import store from '@/store';
-import { id as subProcessId } from '@/components/nodes/subProcess';
import CrownConfig from '@/components/crown/crownConfig/crownConfig';
export default {
@@ -72,19 +70,11 @@ export default {
});
},
},
- targetIsCallActivity() {
- return this.targetType === subProcessId;
- },
},
watch: {
'node.definition': {
- handler({ startEvent: startEventId }) {
- const startEvent = store.getters.globalProcessEvents.find(event => event.id == startEventId);
- const newNameLabel = this.shapeName || get(startEvent, 'name');
-
- if (this.targetIsCallActivity ) {
- this.nameLabel = get(startEvent, 'name');
- }
+ handler() {
+ const newNameLabel = this.shapeName;
if (newNameLabel !== this.nameLabel) {
this.nameLabel = newNameLabel;
| 2 |
diff --git a/views/email/add_new_user.hbs b/views/email/add_new_user.hbs @@ -6,5 +6,11 @@ Hello {{new_user.name}},
Please contact {{admin_user.name}} about your new password and login at http://timeoff.management
+Alternatively follow link below to set new password:
+
+{{# with new_user ~}}
+http://app.timeoff.management/reset-password/?t={{this.get_reset_password_token}}
+{{/ with }}
+
This message was sent by
http://TimeOff.Management
| 11 |
diff --git a/src/js/modules/Edit/List.js b/src/js/modules/Edit/List.js @@ -27,6 +27,8 @@ export default class Edit{
this.values = [];
this.popup = null;
+ this.listIteration = 0;
+
this.blurable = true;
this.actions = {
@@ -200,11 +202,10 @@ export default class Edit{
}
}
- if(params.filterRemote && !(typeof params.values === "function" || typeof params.values === "string")){
+ if(params.filterRemote && !(typeof params.valuesLookup === "function" || typeof params.valuesURL)){
params.filterRemote = false;
console.warn("list editor config error - filterRemote option should only be used when values list is populated from a remote source");
}
-
return params;
}
//////////////////////////////////////
@@ -435,7 +436,9 @@ export default class Edit{
.then(this._buildList.bind(this))
.then(this._showList.bind(this))
.catch((e) => {
- console.error("List generation error", e)
+ if(!Number.isInteger(e)){
+ console.error("List generation error", e);
+ }
})
}
@@ -445,7 +448,8 @@ export default class Edit{
}
_generateOptions(silent){
- var paramValues = this.params.values;
+ var values = [];
+ var itteration = ++ this.listIteration;
this.filtered = false;
@@ -453,16 +457,29 @@ export default class Edit{
this._addPlaceholder(this.params.placeholderLoading);
}
- if(typeof paramValues === "function"){
- paramValues = paramValues(cell, this.input.value);
- }else if (typeof paramValues === "string"){
- paramValues = this._ajaxRequest(paramValues, this.input.value);
+ if(this.params.values){
+ values = this.params.values;
+ }else if (this.params.valuesURL){
+ values = this._ajaxRequest(this.params.valuesURL, this.input.value);
+ }else{
+ if(typeof this.params.valuesLookup === "function"){
+ values = this.params.valuesLookup(cell, this.input.value);
+ }else if(this.params.valuesLookup){
+ values = this._uniqueColumnValues(this.params.valuesLookupField);
+ }
}
- if(paramValues instanceof Promise){
- return paramValues.then(this._lookupValues.bind(this))
+ if(values instanceof Promise){
+ return values.then()
+ .then((responseValues) => {
+ if(this.listIteration === itteration){
+ return this._parseList(responseValues);
+ }else{
+ return Promise.reject(itteration);
+ }
+ });
}else{
- return Promise.resolve(this._lookupValues(paramValues));
+ return Promise.resolve(this._parseList(values))
}
}
@@ -512,19 +529,9 @@ export default class Edit{
});
}
- _lookupValues(paramValues){
- if(paramValues === true){
- paramValues = this._uniqueColumnValues();//lookup this column
- }else if(typeof paramValues === "string"){
- paramValues = this._uniqueColumnValues(paramValues);//lookup specific column
- }
-
- return this._parseList(paramValues);
- }
-
_uniqueColumnValues(field){
var output = {},
- data = this.table.getData(this.params.valueLookupRange),
+ data = this.table.getData(this.params.valuesLookup),
column;
if(field){
| 3 |
diff --git a/src/components/NavBar/NavBar.jsx b/src/components/NavBar/NavBar.jsx @@ -18,7 +18,7 @@ import Modal from '../Modals/Modal';
import { VscSettingsGear } from 'react-icons/vsc'
import { FaFileExport, FaUserCircle } from 'react-icons/fa'
import { GoFileSubmodule } from 'react-icons/go'
-import { ImArrowLeft } from "react-icons/im"
+import { ImHome3 } from "react-icons/im"
import { Switch } from '@material-ui/core';
import { useToggleModal } from '../TestMenu/testMenuHooks';
import { setTestCase } from '../../context/actions/globalActions';
@@ -76,8 +76,8 @@ const NavBar = ({ inAboutPage }) => {
<div id={styles[`navBar${theme}`]}>
{/* File Explorer */}
<div className={styles.btnContainer}>
- <span onClick={openModal} title='Go back'>
- <ImArrowLeft size={'1.5rem'}/>
+ <span onClick={openModal} title='Home'>
+ <ImHome3 size={'1.5rem'}/>
</span>
<span id={isFileDirectoryOpen ? styles.activeEffect : ''} onClick={handleToggleFileDirectory} title='Expand file explorer'>
<GoFileSubmodule size={'1.5rem'}/>
| 3 |
diff --git a/src/core/util/util.js b/src/core/util/util.js @@ -70,17 +70,13 @@ let callImmediateFn, clearCallImmediateFn;
if (typeof (setImmediate) !== 'undefined') {
callImmediateFn = setImmediate;
} else {
- callImmediateFn = function (fn) {
- setTimeout(fn, 1);
- };
+ callImmediateFn = requestAnimFrame;
}
if (typeof (clearImmediate) !== 'undefined') {
clearCallImmediateFn = clearImmediate;
} else {
- clearCallImmediateFn = function (id) {
- clearTimeout(id);
- };
+ clearCallImmediateFn = cancelAnimFrame;
}
})();
| 7 |
diff --git a/docker/DockerfileTmpl b/docker/DockerfileTmpl @@ -9,7 +9,7 @@ ADD ${APP_DOWNLOAD_URL}/service-ui_linux_amd64 /service-ui
ADD ${APP_DOWNLOAD_URL}/ui.tar.gz /
RUN chmod +x /service-ui
-RUN tar -zxvf ui.tar.gz -C /
+RUN tar -zxvf ui.tar.gz -C / && rm -f ui.tar.gz
ENV RP_STATICSPATH=/public
| 7 |
diff --git a/OurUmbraco.Site/config/IISRewriteMaps.config b/OurUmbraco.Site/config/IISRewriteMaps.config <add key="documentation/implementation/routing/pipeline" value="/documentation/implementation/Routing/Default-Routing/" />
<add key="documentation/implementation/routing/pipeline/ishortstringhelper" value="/documentation/Legacy/" />
+ <add key="documentation/Add-ons/UmbracoForms/Developer/Field-Types" value="/documentation/Add-ons/UmbracoForms/Editor/Creating-a-form/Fieldtypes/" />
+
<!-- Add-ons Courier -->
<add key="documentation/Add-ons/UmbracoCourier/Architecture/Index" value="/documentation/Add-ons/UmbracoCourier/" />
<add key="documentation/Add-ons/UmbracoCourier/Index/Developer" value="/documentation/Add-ons/UmbracoCourier/Developer/" />
| 2 |
diff --git a/js/index.js b/js/index.js });
}
+ i18next.on('languageChanged', function(detectedLanguage) {
+ // detected + fallbacks, e.g. ["de-DE", "de", "en"]
+ for (i = 0; i < i18next.languages.length; i++) {
+ var language = i18next.languages[i];
+
+ // set first (fallback) language, for which a bundle was found
+ if (i18next.hasResourceBundle(language, 'translation')) {
+ var htmlElem = document.documentElement;
+ if (htmlElem.getAttribute('lang') !== language) {
+ htmlElem.setAttribute('lang', language);
+ }
+ break;
+ }
+ }
+ });
+
i18next
.use(window.i18nextXHRBackend)
.use(window.i18nextBrowserLanguageDetector)
| 12 |
diff --git a/inventory.js b/inventory.js @@ -2,6 +2,7 @@ import * as THREE from './three.module.js';
import {bindUploadFileButton} from './util.js';
import {loginManager} from './login.js';
import {planet} from './planet.js';
+import {getContractSource} from './blockchain.js';
import {renderer, scene, camera} from './app-object.js';
import {storageHost} from './constants.js';
@@ -42,6 +43,29 @@ inventory.discardFile = async id => {
let files = [];
inventory.getOwnedFiles = () => files;
+inventory.getFiles = async (start, end) => {
+ const contractSource = await getContractSource('getNfts.cdc');
+
+ const res = await fetch(`https://accounts.exokit.org/sendTransaction`, {
+ method: 'POST',
+ body: JSON.stringify({
+ limit: 100,
+ script: contractSource
+ .replace(/ARG0/g, start)
+ .replace(/ARG1/g, end),
+ wait: true,
+ }),
+ });
+ const response2 = await res.json();
+ const items = response2.encodedData.value.map(value => {
+ const {fields} = value.value;
+ const id = parseInt(fields.find(field => field.name === 'id').value.value, 10);
+ const hash = fields.find(field => field.name === 'hash').value.value;
+ const filename = fields.find(field => field.name === 'filename').value.value;
+ return {id, hash, filename};
+ });
+ return items;
+};
loginManager.addEventListener('inventorychange', async e => {
files = await loginManager.getInventory();
| 0 |
diff --git a/assets/sass/components/dashboard/_googlesitekit-DashboardPageSpeed.scss b/assets/sass/components/dashboard/_googlesitekit-DashboardPageSpeed.scss line-height: 1.25rem;
}
- &.googlesitekit-pagespeed-report__row--first {
+ &--first {
padding: 12px $grid-gap-phone 8px $grid-gap-phone;
@media ( min-width: $bp-tablet ) {
padding: 18px $grid-gap-desktop 12px $grid-gap-desktop;
}
-
- p {
- margin-left: 3px;
- }
}
- &.googlesitekit-pagespeed-report__row--last {
+ &--last {
padding: 8px $grid-gap-phone 12px $grid-gap-phone;
@media ( min-width: $bp-tablet ) {
padding: 12px $grid-gap-desktop 18px $grid-gap-desktop;
}
-
- p {
- margin-left: 4px;
- }
}
}
- table {
+ .googlesitekit-table {
+ border-spacing: 0;
padding: 0;
width: 100%;
| 2 |
diff --git a/src/graphql/mutations/CreateOrUpdateArticleReplyFeedback.js b/src/graphql/mutations/CreateOrUpdateArticleReplyFeedback.js @@ -117,6 +117,8 @@ export default {
},
_source: true,
});
+
+ /* istanbul ignore if */
if (articleReplyUpdateResult.result !== 'updated') {
throw new Error(
`Cannot article ${articleId}'s feedback count for feedback ID = ${id}`
@@ -127,6 +129,7 @@ export default {
articleReply => articleReply.replyId === replyId
);
+ /* istanbul ignore if */
if (!updatedArticleReply) {
throw new Error(
`Cannot get updated article reply with article ID = ${articleId} and reply ID = ${replyId}`
| 8 |
diff --git a/Model/TemplateResolver.php b/Model/TemplateResolver.php @@ -10,6 +10,7 @@ use Magento\Framework\Registry;
use Magento\Framework\View\Element\Template;
use Magento\Framework\View\Element\Template\File\Validator;
use Magento\Framework\Filesystem\Driver\File as DriverFile;
+use Magento\Framework\Filesystem\Io\File as IoFile;
use Magento\Framework\View\Asset\Repository as AssetRepository;
use Magento\Framework\View\Design\Fallback\RulePool;
use Magento\Framework\Exception\FileSystemException;
@@ -29,6 +30,11 @@ class TemplateResolver
*/
private $driverFile;
+ /**
+ * @var IoFile
+ */
+ private $ioFile;
+
/**
* @var Registry
*/
@@ -57,12 +63,14 @@ class TemplateResolver
public function __construct(
Validator $validator,
DriverFile $driverFile,
+ IoFile $ioFile,
Registry $registry,
AssetRepository $assetRepo,
RulePool $rulePool
) {
$this->validator = $validator;
$this->driverFile = $driverFile;
+ $this->ioFile = $ioFile;
$this->registry = $registry;
$this->assetRepo = $assetRepo;
$this->rulePool = $rulePool;
@@ -143,7 +151,7 @@ class TemplateResolver
continue;
}
- $extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));
+ $extension = strtolower($this->ioFile->getPathInfo($file)['extension']);
if (!in_array($extension, ['phtml'])) {
continue;
}
| 14 |
diff --git a/drop-manager.js b/drop-manager.js @@ -83,7 +83,7 @@ const loadPromise = (async () => {
// polygonOffsetUnits: 1,
});
- const addSilk = (p, v) => {
+ const addSilk = (p, v, r) => {
const velocity = v.clone();
let grounded = false;
@@ -109,6 +109,10 @@ const loadPromise = (async () => {
grounded = true;
} else {
velocity.add(localVector.copy(physicsManager.getGravity()).multiplyScalar(timeDiff));
+
+ // o.rotation.x += r.x;
+ o.rotation.y += r.y;
+ // o.rotation.z += r.z;
}
}
@@ -172,7 +176,7 @@ const loadPromise = (async () => {
tickers.push(o);
};
- const addDrop = (p, v) => {
+ const addDrop = (p, v, r) => {
const o = new THREE.Mesh(cardModel.geometry, cardModel.material);
const velocity = v.clone();
@@ -211,6 +215,10 @@ const loadPromise = (async () => {
grounded = true;
} else {
velocity.add(localVector.copy(physicsManager.getGravity()).multiplyScalar(timeDiff));
+
+ /* o.rotation.x += r.x;
+ o.rotation.y += r.y;
+ o.rotation.z += r.z; */
}
}
@@ -279,8 +287,9 @@ const drop = async o => {
const {addSilk, addDrop} = await loadPromise;
for (let i = 0; i < 10; i++) {
const v = new THREE.Vector3(-1 + Math.random() * 2, 0, -1 + Math.random() * 2).normalize().multiplyScalar((0.3 + Math.random() * 0.7) * 4).add(new THREE.Vector3(0, (0.5 + Math.random() * 0.5) * 6, 0));
+ const r = new THREE.Vector3(-1 + Math.random() * 2, -1 + Math.random() * 2, -1 + Math.random() * 2).normalize().multiplyScalar(0.03);
const fn = Math.random() < 0.5 ? addSilk : addDrop;
- fn(o.position.clone().add(new THREE.Vector3(0, 0.5, 0)), v);
+ fn(o.position.clone().add(new THREE.Vector3(0, 0.5, 0)), v, r);
}
};
const update = () => {
| 0 |
diff --git a/articles/quickstart/native/xamarin-ios/01-login.md b/articles/quickstart/native/xamarin-ios/01-login.md @@ -18,6 +18,24 @@ budicon: 448
This tutorial explains how to integrate the Auth0 OIDC Client with a Xamarin iOS C# application. The NuGet package `Auth0.OidcClient.iOS` helps you authenticate users with any [Auth0 supported identity provider](/identityproviders).
+## Switching token signature algorithm to RS256
+
+The Auth0 OIDC Client requires that the __JsonWebToken Signature Algorithm__ for your client be set to `RS256`.
+
+::: panel-warning Before Changing the Signing Algorithm
+Please note that altering the signing algorithm for your client will immediately change the way your user's tokens are signed. This means that if you have already implemented JWT verification for your client somewhere, your tokens will not be verifiable until you update the logic to account for the new signing algorithm.
+:::
+
+To switch from HS256 to RS256 for a specific client, follow these instructions:
+1. Go to [Dashboard > Clients](https://manage.auth0.com/#/clients)
+1. Select your client
+1. Go to _Settings_
+1. Click on __Show Advanced Settings__
+1. Click on the _OAuth_ tab in Advanced Settings
+1. Change the __JsonWebToken Signature Algorithm__ to `RS256`
+
+Remember that if the token is being validated anywhere else, changes might be needed there as well in order to comply.
+
## Install the Auth0.OidcClient.iOS NuGet Package
${snippet(meta.snippets.dependencies)}
| 0 |
diff --git a/app/assets/stylesheets/observations/identify/observation_modal.css.scss b/app/assets/stylesheets/observations/identify/observation_modal.css.scss @@ -42,6 +42,9 @@ body > div > [role="dialog"] .ObservationModal {
}
.left-col {
padding: 15px 20px 10px;
+ .obs-modal-header {
+ margin-bottom: 12px;
+ }
}
.right-col {
border-left: 2px solid #ddd;
@@ -169,7 +172,7 @@ body > div > [role="dialog"] .ObservationModal {
margin-bottom: 10px;
flex: 2;
display: flex;
- flex-direction: column;
+ flex-direction: row;
overflow: hidden;
align-items: center;
.sounds {
| 1 |
diff --git a/.vscode/launch.json b/.vscode/launch.json "version": "0.2.0",
"configurations": [
{
- "type": "chrome",
- "name": "Tests",
+ "type": "node",
"request": "launch",
- "url": "http://localhost:8080/Specs/SpecRunner.html?spec=Core",
- "webRoot": "${workspaceFolder}",
+ "name": "Launch Program",
+ "cwd": "${workspaceFolder}",
+ "runtimeExecutable": "npm",
+ "runtimeArgs": ["run-script", "start"],
+ "noDebug": true
}
- // {
- // "type": "node",
- // "request": "launch",
- // "name": "Launch Program",
- // "cwd": "${workspaceFolder}",
- // "runtimeExecutable": "npm",
- // "runtimeArgs": ["run-script", "start"],
- // "noDebug": true
- // }
]
}
| 13 |
diff --git a/frontend/imports/ui/client/widgets/chart.js b/frontend/imports/ui/client/widgets/chart.js @@ -81,23 +81,14 @@ Template.chart.viewmodel({
const tooltipEl = this.prepareTooltip(tooltip, 'market-chart-price');
if (tooltipEl && tooltip.body) {
const date = parseInt(tooltip.dataPoints[0].xLabel, 10);
- let quoteAmount = null;
- let baseAmount = null;
- quoteAmount = formatNumber(web3.fromWei(volumes.quote[date]), 5);
- baseAmount = formatNumber(web3.fromWei(volumes.base[date]), 5);
-
tooltipEl.innerHTML =
`<div class="row-custom-tooltip">
<span class="left">Date</span>
- <span class="right">${moment(date).format('ll')}</span>
+ <span class="right">${moment(date * 1000).format('ll')}</span>
</div>
<div class="row-custom-tooltip middle">
- <span class="left">SUM(${Session.get('quoteCurrency')})</span>
- <span class="right">${quoteAmount}</span>
- </div>
- <div class="row-custom-tooltip">
- <span class="left">SUM(${Session.get('baseCurrency')})</span>
- <span class="right">${baseAmount}</span>
+ <span class="left">Price</span>
+ <span class="right">${tooltip.dataPoints[0].yLabel}</span>
</div>`;
tooltipEl.style.opacity = 1;
@@ -138,14 +129,12 @@ Template.chart.viewmodel({
trade.buyHowMuch / trade.sellHowMuch :
trade.sellHowMuch / trade.buyHowMuch;
});
- charts.price.data.labels = prices;
+ charts.price.data.labels = trades.map(trade => trade.timestamp);
charts.price.data.datasets = [{
- label: 'Volume',
data: prices,
- backgroundColor: 'rgba(140, 133, 200, 0.1)',
borderColor: '#8D86C9',
borderWidth: 3,
- // fill: false,
+ fill: false,
pointBackgroundColor: '#8D86C9',
pointRadius: 3,
}];
| 12 |
diff --git a/src/transformers/safeClassNames.js b/src/transformers/safeClassNames.js @@ -3,7 +3,7 @@ const { getPropValue } = require('../utils/helpers')
const safeClassNames = require('posthtml-safe-class-names')
module.exports = async (html, config) => {
- if (config.env !== 'local') {
+ if (typeof config.env === 'string' && config.env !== 'local') {
const replacements = config.safeClassNames || {}
const options = getPropValue(config, 'build.posthtml.options') || {}
| 1 |
diff --git a/spec/requests/warden_spec.rb b/spec/requests/warden_spec.rb @@ -94,7 +94,7 @@ describe 'Warden' do
expect(response.status).to eq 302
follow_redirect!
- expect(request.fullpath).to end_with "/password_change/#{@user.username}"
+ expect(request.fullpath).to end_with "/login?error=session_expired"
Delorean.back_to_the_present
end
end
@@ -113,5 +113,16 @@ describe 'Warden' do
Delorean.back_to_the_present
end
end
+
+ it 'does not allow access password_change if password is not expired' do
+ login
+
+ Cartodb.with_config(passwords: { 'expiration_in_s' => nil }) do
+ host! "#{@user.username}.localhost.lan"
+ get edit_password_change_path(@user.username)
+
+ expect(response.status).to eq 403
+ end
+ end
end
end
| 3 |
diff --git a/src/traces/surface/convert.js b/src/traces/surface/convert.js @@ -237,9 +237,6 @@ proto.estimateScale = function(width, height) {
// console.log("yLCM=", yLCM);
var resDst = 1 + leastCommonMultiple(xLCM, yLCM);
- if(resDst === 2) {
- resDst = MIN_RESOLUTION; // remember having 120 is better than 128 in this case because it is a highly composite number
- }
// console.log("BEFORE: resDst=", resDst);
while(resDst < MIN_RESOLUTION) {
| 13 |
diff --git a/magda-registry-api/src/main/scala/au/csiro/data61/magda/registry/RecordsService.scala b/magda-registry-api/src/main/scala/au/csiro/data61/magda/registry/RecordsService.scala @@ -42,22 +42,34 @@ class RecordsService(config: Config, webHookActor: ActorRef, authClient: AuthApi
@ApiImplicitParams(Array(
new ApiImplicitParam(name = "aspect", required = false, dataType = "string", paramType = "query", allowMultiple = true, value = "The aspects for which to retrieve data, specified as multiple occurrences of this query parameter. Only records that have all of these aspects will be included in the response."),
new ApiImplicitParam(name = "optionalAspect", required = false, dataType = "string", paramType = "query", allowMultiple = true, value = "The optional aspects for which to retrieve data, specified as multiple occurrences of this query parameter. These aspects will be included in a record if available, but a record will be included even if it is missing these aspects."),
- new ApiImplicitParam(name = "pageToken", required = false, dataType = "number", paramType = "query", value = "A token that identifies the start of a page of results. This token should not be interpreted as having any meaning, but it can be obtained from a previous page of results."),
+ new ApiImplicitParam(name = "pageToken", required = false, dataType = "string", paramType = "query", value = "A token that identifies the start of a page of results. This token should not be interpreted as having any meaning, but it can be obtained from a previous page of results."),
new ApiImplicitParam(name = "start", required = false, dataType = "number", paramType = "query", value = "The index of the first record to retrieve. When possible, specify pageToken instead as it will result in better performance. If this parameter and pageToken are both specified, this parameter is interpreted as the index after the pageToken of the first record to retrieve."),
new ApiImplicitParam(name = "limit", required = false, dataType = "number", paramType = "query", value = "The maximum number of records to receive. The response will include a token that can be passed as the pageToken parameter to a future request to continue receiving results where this query leaves off."),
new ApiImplicitParam(name = "dereference", required = false, dataType = "boolean", paramType = "query", value = "true to automatically dereference links to other records; false to leave them as links. Dereferencing a link means including the record itself where the link would be. Dereferencing only happens one level deep, regardless of the value of this parameter."),
new ApiImplicitParam(name = "aspectQuery", required = false, dataType = "string", paramType = "query", allowMultiple = true, value = "Filter the records returned by a value within the aspect JSON. Expressed as 'aspectId.path.to.field:value', url encoded. NOTE: This is an early stage API and may change greatly in the future")))
def getAll = get {
pathEnd {
- parameters('aspect.*, 'optionalAspect.*, 'pageToken.as[Long].?, 'start.as[Int].?, 'limit.as[Int].?, 'dereference.as[Boolean].?, 'aspectQuery.*) {
+ parameters('aspect.*, 'optionalAspect.*, 'pageToken.?, 'start.as[Int].?, 'limit.as[Int].?, 'dereference.as[Boolean].?, 'aspectQuery.*) {
(aspects, optionalAspects, pageToken, start, limit, dereference, aspectQueries) =>
val parsedAspectQueries = aspectQueries.map(AspectQuery.parse)
-
+ try{
+ val pageTokenConverted = pageToken.map(_.toLong)
complete {
DB readOnly { session =>
- recordPersistence.getAllWithAspects(session, aspects, optionalAspects, pageToken, start, limit, dereference, parsedAspectQueries)
+ recordPersistence.getAllWithAspects(session, aspects, optionalAspects, pageTokenConverted, start, limit, dereference, parsedAspectQueries)
}
}
+ }catch{
+ case e: NumberFormatException =>
+ complete(StatusCodes.BadRequest,
+ s"""The query parameter 'pageToken' was malformed:
+ |'${pageToken.get}' is not a valid 64-bit signed integer value
+ """.stripMargin)
+ case e: Throwable =>
+ logger.error("Error when process `/records` request: {}", e)
+ complete(StatusCodes.InternalServerError)
+ }
+
}
}
}
| 9 |
diff --git a/src/components/lights/PointLight.js b/src/components/lights/PointLight.js @@ -2,11 +2,15 @@ import {PointLight as PointLightNative, PointLightHelper} from 'three';
import {LightComponent} from '../../core/LightComponent';
class PointLight extends LightComponent {
- // static helpers = {
- // default: [PointLightHelper, {
- // size: 0
- // }, ['size']]
- // };
+ static defaults= {
+ ...LightComponent.defaults,
+ light: {
+ color: 0xffffff,
+ intensity: 1,
+ distance: 100,
+ decay: 1
+ }
+ }
constructor(params = {}) {
super(params);
| 3 |
diff --git a/ui/src/components/time/QTime.js b/ui/src/components/time/QTime.js @@ -288,8 +288,6 @@ export default defineComponent({
defaultDateModel.value
)
- console.log({ ...model })
-
if (
model.dateHash !== innerModel.value.dateHash
|| model.timeHash !== innerModel.value.timeHash
| 2 |
diff --git a/assets/js/modules/analytics/util/calculateOverviewData.js b/assets/js/modules/analytics/util/calculateOverviewData.js @@ -37,24 +37,20 @@ const calculateOverviewData = ( reports ) => {
const lastMonth = totals[ 0 ].values;
const previousMonth = totals[ 1 ].values;
- const totalUsers = lastMonth[ 0 ];
const totalSessions = lastMonth[ 1 ];
const averageBounceRate = lastMonth[ 2 ];
const averageSessionDuration = lastMonth[ 3 ];
const goalCompletions = lastMonth[ 4 ];
const totalPageViews = lastMonth[ 5 ];
- const totalUsersChange = changeToPercent( previousMonth[ 0 ], lastMonth[ 0 ] );
const totalSessionsChange = changeToPercent( previousMonth[ 1 ], lastMonth[ 1 ] );
const averageBounceRateChange = changeToPercent( previousMonth[ 2 ], lastMonth[ 2 ] );
const averageSessionDurationChange = changeToPercent( previousMonth[ 3 ], lastMonth[ 3 ] );
const goalCompletionsChange = changeToPercent( previousMonth[ 4 ], lastMonth[ 4 ] );
const totalPageViewsChange = changeToPercent( previousMonth[ 5 ], lastMonth[ 5 ] );
return {
- totalUsers,
totalSessions,
averageBounceRate,
averageSessionDuration,
- totalUsersChange,
totalSessionsChange,
averageBounceRateChange,
averageSessionDurationChange,
| 2 |
diff --git a/src/modules/dex/directives/dexMyOrders/DexMyOrders.js b/src/modules/dex/directives/dexMyOrders/DexMyOrders.js .then((seed) => waves.matcher.getOrders(seed.keyPair))
.then((orders) => {
const active = [];
- const filled = [];
const others = [];
orders.forEach((order) => {
switch (order.status) {
case 'Accepted':
active.push(order);
break;
- case 'Filled':
- filled.push(order);
+ case 'PartiallyFilled':
+ active.push(order);
break;
default:
others.push(order);
});
active.sort(utils.comparators.process(({ timestamp }) => timestamp).desc);
- filled.sort(utils.comparators.process(({ timestamp }) => timestamp).desc);
others.sort(utils.comparators.process(({ timestamp }) => timestamp).desc);
- return active.concat(filled).concat(others);
+ return active.concat(others);
});
}
| 1 |
diff --git a/src/client/vivide/components/vivide-view.js b/src/client/vivide/components/vivide-view.js @@ -282,49 +282,57 @@ export default class VivideView extends Morph {
}
async computeModel(data, script) {
- let transformedData = [];
- let properties = [];
- let children = [];
- let childScript = null;
+ this.modelData = {};
+ this.modelData["transformedData"] = [];
+ this.modelData["properties"] = [];
+ this.modelData["children"] = [];
+ this.modelData["childScript"] = null;
+
+ await this.applyScript(script, data);
+ while (script.nextScript) {
+ script = script.nextScript;
+ await this.applyScript(script, data);
+
+ if (script.lastScript) break;
+ }
+
+ let model = [];
+
+ for (let i = 0; i < data.length; ++i) {
+ model.push({
+ object: data[i],
+ properties: this.modelData["properties"][i],
+ children: this.modelData["children"][i],
+ childScript: this.modelData["childScript"]
+ })
+ }
- for (let i = 0; i < 3; ++i) {
+ return model;
+ }
+
+ async applyScript(script, data) {
let module = await this.evalScript(script);
if (script.type == 'transform') {
- module.value(data, transformedData);
+ module.value(data, this.modelData["transformedData"]);
} else if (script.type == 'extract') {
- transformedData.forEach(data => properties.push([module.value(data)]));
+ this.modelData["transformedData"].forEach(data => this.modelData["properties"].push([module.value(data)]));
} else if (script.type == 'descent') {
let childTransform = await this.evalScript(script.nextScript);
let childExtract = await this.evalScript(script.nextScript.nextScript);
- transformedData.forEach(data => {
+ this.modelData["transformedData"].forEach(data => {
let childrenInput = module.value(data);
if (childrenInput) {
let childrenOutput = [];
childTransform.value(childrenInput, childrenOutput);
- children.push(childrenOutput.map(child => ({ object: child, properties: [childExtract.value(child)], children: [] })));
+ this.modelData["children"].push(childrenOutput.map(child => ({ object: child, properties: [childExtract.value(child)], children: [] })));
}
});
- childScript = script.nextScript;
- }
-
- this.viewConfig.push(module.value.__vivideStepConfig__)
- script = script.nextScript;
+ this.modelData["childScript"] = script.nextScript;
}
- let model = [];
-
- for (let i = 0; i < data.length; ++i) {
- model.push({
- object: data[i],
- properties: properties[i],
- children: children[i],
- childScript: childScript
- })
- }
-
- return model;
+ this.viewConfig.push(module.value.__vivideStepConfig__);
}
findAppropriateWidget(model) {
@@ -356,6 +364,7 @@ export default class VivideView extends Morph {
script = script.nextScript;
}
+ newScript.updateCallback = this.scriptGotUpdated.bind(this);
newScript.nextScript = script.nextScript;
script.nextScript = newScript;
script.lastScript = false;
| 6 |
diff --git a/token-metadata/0x469eDA64aEd3A3Ad6f868c44564291aA415cB1d9/metadata.json b/token-metadata/0x469eDA64aEd3A3Ad6f868c44564291aA415cB1d9/metadata.json "symbol": "FLUX",
"address": "0x469eDA64aEd3A3Ad6f868c44564291aA415cB1d9",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/plots/gl2d/scene2d.js b/src/plots/gl2d/scene2d.js @@ -292,8 +292,9 @@ proto.updateFx = function(options) {
fullLayout.dragmode = options.dragmode;
fullLayout.hovermode = options.hovermode;
-};
+ this.graphDiv._fullLayout = fullLayout;
+};
function relayoutCallback(scene) {
var xrange = scene.xaxis.range,
| 3 |
diff --git a/_includes/head.html b/_includes/head.html <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ '/feed.xml' | prepend: site.baseurl | prepend: site.url }}">
- {% css main %} <!-- CSS and fonts-->
+ <link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/assets/css/main.css"> <!-- CSS and fonts-->
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/assets/semantic/dist/semantic.min.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/assets/owl.carousel.min.css" />
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.2.1/assets/owl.theme.default.css" />
| 2 |
diff --git a/test-complete/nodejs-optic-from-views.js b/test-complete/nodejs-optic-from-views.js @@ -722,7 +722,7 @@ describe('Nodejs Optic from views test', function(){
.then(function(output) {
//console.log(output);
expect(output).to.contain('<plan:plan xmlns:plan=\"http:\/\/marklogic.com\/plan\">');
- expect(output).to.contain('<plan:graph-node type=\"column-def\" name=\"opticFunctionalTest.detail.color\" schema=\"opticFunctionalTest\" column=\"color\" view=\"detail\" column-number=\"4\" column-index=\"4\" static-type=\"STRING\" is-renamed=\"false\"/>');
+ expect(output).to.contain('<plan:graph-node type=\"column-def\" name=\"opticFunctionalTest.detail.color\" schema=\"opticFunctionalTest\" column=\"color\" view=\"detail\" column-number=\"4\" column-index=\"4\" static-type=\"STRING\"\/>');
done();
}, done);
});
| 3 |
diff --git a/packages/transformer-remark/lib/utils.js b/packages/transformer-remark/lib/utils.js @@ -27,8 +27,13 @@ exports.createPlugins = function (options, localOptions) {
return normalizePlugins(userPlugins || [])
}
+ if (options.processFiles !== false) {
plugins.push(require('./plugins/file'))
+ }
+
+ if (options.processImages !== false) {
plugins.push(require('./plugins/image'))
+ }
if (options.slug !== false) {
plugins.push('remark-slug')
| 1 |
diff --git a/src/traces/mesh3d/defaults.js b/src/traces/mesh3d/defaults.js @@ -41,13 +41,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
return;
}
- if(indices) {
- // otherwise, convert all face indices to ints
- indices.forEach(function(index) {
- for(var i = 0; i < index.length; ++i) index[i] |= 0;
- });
- }
-
var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);
| 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.