code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/assets/js/modules/idea-hub/datastore/new-ideas.test.js b/assets/js/modules/idea-hub/datastore/new-ideas.test.js @@ -141,6 +141,25 @@ describe( 'modules/idea-hub new-ideas', () => { expect( newIdeas ).toEqual( fixtures.newIdeas.slice( 0, 3 ) ); } ); + it( 'only fetches once even with different options passed', async () => { + const customOptions = { + offset: 1, + length: 1, + }; + fetchMock.getOnce( + /^\/google-site-kit\/v1\/modules\/idea-hub\/data\/new-ideas/, + { body: fixtures.newIdeas, status: 200 } + ); + + registry.select( STORE_NAME ).getNewIdeas( customOptions ); + await untilResolved( registry, STORE_NAME ).getNewIdeas( customOptions ); + + registry.select( STORE_NAME ).getNewIdeas( customOptions ); + registry.select( STORE_NAME ).getNewIdeas( options ); + + expect( fetchMock ).toHaveFetchedTimes( 1 ); + } ); + it( 'does not make a network request if report for given options is already present', async () => { // Load data into this store so there are matches for the data we're about to select, // even though the selector hasn't fulfilled yet.
11
diff --git a/src/inner-slider.js b/src/inner-slider.js @@ -154,6 +154,15 @@ export class InnerSlider extends React.Component { Array.from(images).forEach(image => { const handler = () => ++loadedCount && (loadedCount >= imagesCount) && this.onWindowResized() + if (!image.onclick) { + image.onclick = () => image.parentNode.focus() + } else { + const prevClick = image.onclick + image.onclick = () => { + prevClick() + image.parentNode.focus() + } + } if (!image.onload) { if (this.props.lazyLoad) { image.onload = () => this.adaptHeight() ||
0
diff --git a/includes/Core/Util/Tracking.php b/includes/Core/Util/Tracking.php @@ -126,14 +126,15 @@ final class Tracking { } /** - * Is tracking active for this plugin install? + * Is tracking active for the current user? * * @since 1.0.0 + * @since n.e.x.t Tracking is now user-specific. * * @return bool True if tracking enabled, and False if not. */ public function is_active() { - return (bool) get_option( self::TRACKING_OPTIN_KEY, false ); + return (bool) $this->user_options->get( self::TRACKING_OPTIN_KEY ); } /**
12
diff --git a/src/App.js b/src/App.js @@ -15,6 +15,8 @@ import Control from './components/Control.jsx'; import Menu from './components/Menu.jsx'; import Barter from './components/Barter.jsx'; +import rawMapData from './map-data.json'; + const makeID = function makeID(length) { let result = ''; const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; @@ -139,6 +141,18 @@ const makeID = function makeID(length) { /> </Helmet> <Switch> + <Route + exact + strict + sensitive + path={rawMapData.map((mapData) => { + return `/map/${mapData.key.toUpperCase()}`; + })} + render = { props => { + const path = props.location.pathname; + return <Redirect to={`${path.toLowerCase()}`} /> + }} + /> <Route exact path={["/ammo/:currentAmmo", "/ammo", '/tarkov-tools', ""]}
9
diff --git a/helpers/peer-frontend/contracts/PeerFrontend.sol b/helpers/peer-frontend/contracts/PeerFrontend.sol @@ -43,10 +43,10 @@ contract PeerFrontend { * @dev if no suitable Peer found, defaults to 0x0 peerLocator * @param _senderAmount uint256 The amount of ERC-20 token the peer would send * @param _senderToken address The address of an ERC-20 token the peer would send - * @param _signerToken address The address of an ERC-20 token the consumer would send + * @param _signerToken address The address of an ERC-20 token the signer would send * @param _maxIntents uint256 The maximum number of Peers to query - * @return peerAddress bytes32 - * @return lowestCost uint256 + * @return peerAddress bytes32 The locator to connect to the peer + * @return lowestCost uint256 The amount of ERC-20 tokens the signer would send */ function getBestSenderSideQuote( uint256 _senderAmount, @@ -89,12 +89,12 @@ contract PeerFrontend { * @notice Get a Signer-Side Quote from the Onchain Liquidity provider * @dev want to fetch the highest _senderAmount for requested _signerAmount * @dev if no suitable Peer found, peerLocator will be 0x0 - * @param _signerAmount uint256 The amount of ERC-20 token the peer would send - * @param _signerToken address The address of an ERC-20 token the peer would send - * @param _senderToken address The address of an ERC-20 token the consumer would send + * @param _signerAmount uint256 The amount of ERC-20 token the signer would send + * @param _signerToken address The address of an ERC-20 token the signer would send + * @param _senderToken address The address of an ERC-20 token the peer would send * @param _maxIntents uint256 The maximum number of Peers to query - * @return peerLocator bytes32 The amount of ERC-20 token the consumer would send - * @return lowestCost uint256 The amount of ERC-20 token the consumer would send + * @return peerLocator bytes32 The locator to connect to the peer + * @return highAmount uint256 The amount of ERC-20 tokens the peer would send */ function getBestSignerSideQuote( uint256 _signerAmount, @@ -137,10 +137,8 @@ contract PeerFrontend { * @dev if no suitable Peer found, will revert by checking peerLocator is 0x0 * @param _senderAmount uint256 The amount of ERC-20 token the peer would send * @param _senderToken address The address of an ERC-20 token the peer would send - * @param _signerToken address The address of an ERC-20 token the consumer would send + * @param _signerToken address The address of an ERC-20 token the signer would send * @param _maxIntents uint256 The maximum number of Peers to query - * @return peerAddress bytes32 - * @return lowestCost uint256 */ function fillBestSenderSideOrder( uint256 _senderAmount, @@ -149,7 +147,7 @@ contract PeerFrontend { uint256 _maxIntents ) external { - // Find the best buy among Indexed Peers. + // Find the best locator and amount on Indexed Peers. (bytes32 peerLocator, uint256 signerAmount) = getBestSenderSideQuote( _senderAmount, _senderToken, @@ -181,7 +179,7 @@ contract PeerFrontend { _senderToken))), block.timestamp + 1, Types.Party( - address(this), // consumer is acting as the signer in this case + address(this), _signerToken, signerAmount, 0x277f8169 @@ -203,6 +201,15 @@ contract PeerFrontend { IERC20(_senderToken).transfer(msg.sender, _senderAmount); } + /** + * @notice Get and fill Signer-Side Quote from the Onchain Liquidity provider + * @dev want to fetch the highest _signerAmount for requested _senderAmount + * @dev if no suitable Peer found, will revert by checking peerLocator is 0x0 + * @param _signerAmount uint256 The amount of ERC-20 token the signer would send + * @param _signerToken address The address of an ERC-20 token the signer would send + * @param _senderToken address The address of an ERC-20 token the peer would send + * @param _maxIntents uint256 The maximum number of Peers to query + */ function fillBestSignerSideOrder( uint256 _signerAmount, address _signerToken, @@ -210,7 +217,7 @@ contract PeerFrontend { uint256 _maxIntents ) external { - // Find the best buy among Indexed Peers. + // Find the best locator and amount on Indexed Peers. (bytes32 peerLocator, uint256 senderAmount) = getBestSignerSideQuote( _signerAmount, _signerToken, @@ -243,7 +250,7 @@ contract PeerFrontend { ))), block.timestamp + 1, Types.Party( - address(this), // consumer is acting as the signer in this case + address(this), _signerToken, _signerAmount, 0x277f8169
2
diff --git a/docs/docs/caching.md b/docs/docs/caching.md @@ -20,7 +20,7 @@ The `cache-control` header should be `cache-control: public,max-age=31536000,imm ## JavaScript -Other files e.g. JavaScript files are _not_ (yet) cachable. Gatsby v1 is using webpack 1 which doesn't make it possible to produce paths tied directly to the content of the file. Gatsby v2 will ship with webpack 3 which [will make possible long-term caching of our JavaScript files](https://medium.com/webpack/predictable-long-term-caching-with-webpack-d3eee1d3fa31). +Other files e.g. JavaScript files are _not_ (yet) cachable. Gatsby v1 is using webpack 1 which doesn't make it possible to produce paths tied directly to the content of the file. Gatsby v2 will ship with webpack 4 which [will make possible long-term caching of our JavaScript files](https://medium.com/webpack/predictable-long-term-caching-with-webpack-d3eee1d3fa31). The `cache-control` header should be `cache-control: public, max-age=0, must-revalidate`
14
diff --git a/edit.js b/edit.js @@ -1233,14 +1233,6 @@ const _resetCamera = () => { pe.camera.updateMatrixWorld(); pe.setCamera(camera); }; -planet.addEventListener('unload', () => { - const oldChunkMesh = _getCurrentChunkMesh(); - if (oldChunkMesh) { - chunkMeshContainer.remove(oldChunkMesh); - chunkMeshes.splice(chunkMeshes.indexOf(oldChunkMesh), 1); - _setCurrentChunkMesh(null); - } -}); planet.addEventListener('load', e => { const {data: chunkSpec} = e; @@ -1254,6 +1246,20 @@ planet.addEventListener('load', e => { _resetCamera(); }); +planet.addEventListener('unload', () => { + const oldChunkMesh = _getCurrentChunkMesh(); + if (oldChunkMesh) { + chunkMeshContainer.remove(oldChunkMesh); + chunkMeshes.splice(chunkMeshes.indexOf(oldChunkMesh), 1); + _setCurrentChunkMesh(null); + } +}); +planet.addEventListener('subparcelupdate', e => { + const {data: subparcel} = e; + currentChunkMesh.updateChunks(); + currentChunkMesh.updateBuildMeshes(); + currentChunkMesh.updatePackages(); +}); planet.connect('lol', { online: false, }).then(() => {
0
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -117,3 +117,17 @@ If you want this to be automatic you can set up some aliases: git config --add alias.amend "commit -s --amend" git config --add alias.c "commit -s" ``` + +# Style Guide + +Prefer to use [flow](https://flow.org/) for new code. + +We use [`prettier`](https://prettier.io/), an "opinionated" code formatter. It +can be applied to both JavaScript and CSS source files via `yarn prettier`. + +Then, most issues will be caught by the linter, which can be applied via `yarn +eslint`. + +Finally, we generally adhere to the +[Airbnb Style Guide](https://github.com/airbnb/javascript), with exceptions as +noted in our `.eslintrc`.
0
diff --git a/Source/DataSources/PolylineVolumeGraphics.js b/Source/DataSources/PolylineVolumeGraphics.js @@ -151,7 +151,7 @@ Object.defineProperties(PolylineVolumeGraphics.prototype, { outlineColor: createPropertyDescriptor("outlineColor"), /** - * Gets or sets the numeric Property specifying the width of the outline. + * Gets or sets the numeric Property specifying the width of the outline. Please note that this property will be ignored on all major browsers that are running on Windows platforms. For technical details, see this {@link https://github.com/CesiumGS/cesium/issues/40|issue} or this {@link https://stackoverflow.com/questions/25394677/how-do-you-change-the-width-on-an-ellipseoutlinegeometry-in-cesium-map/25405483#25405483|Stack Overflow post}. * @memberof PolylineVolumeGraphics.prototype * @type {Property|undefined} * @default 1.0
3
diff --git a/README.md b/README.md @@ -468,7 +468,7 @@ Also check out [No Whiteboards](https://nowhiteboards.io) to search for jobs at - [numberly](https://www.numberly.com) | Paris, France | Series of interviews, that go over technical background, past experiences and cultural knowledge - [numer.ai](https://angel.co/numerai/jobs) | San Francisco, CA - [Nutshell](https://www.nutshell.com/jobs) | Ann Arbor, MI, US | Email screen / take-home programming excercise ([public repo](https://github.com/nutshellcrm/join-the-team)) -- [Nyon](https://www.nyon.nl/vacatures) | Amsterdam, The Netherlands | 1. Skype (or real life) interview 2. Take home exercise (3-4 hours) 3. Meet entire team and pair programming sessions +- [Nyon](https://www.nyon.nl/jobs) | Amsterdam, The Netherlands | 1. Skype (or real life) interview 2. Take home exercise (3-4 hours) 3. Meet entire team and pair programming sessions - [O'Reilly Media](https://oreilly.com/jobs) | Sebastopol, CA; Boston, MA; Remote | Phone conversation, take-home exercise or pair programming session, team interview, all via Google Hangout - [Object Partners, Inc.](https://objectpartners.com/careers/) | Minneapolis, MN; Omaha, NE | Phone interview to gauge mutual interest, followed by a slightly more in-depth technical round-table interview - [Objective, Inc.](https://www.objectiveinc.com/careers) | Salt Lake City, UT | Take-home programming exercise, then onsite friendly chat with team
1
diff --git a/kamu/common_settings.py b/kamu/common_settings.py @@ -89,7 +89,6 @@ REST_FRAMEWORK = { 'rest_framework.permissions.IsAuthenticated', ], 'DEFAULT_PAGINATION_CLASS': ('rest_framework.pagination.PageNumberPagination'), - # TODO lmonteir: reduce pagination 'PAGE_SIZE': 50 }
2
diff --git a/views/recipes.blade.php b/views/recipes.blade.php </th> <th>{{ $__t('Name') }}</th> <th>{{ $__t('Desired servings') }}</th> - <th class="@if(!GROCY_FEATURE_FLAG_STOCK) d-none @endif">{{ $__t('Requirements fulfilled') }}</th> + <th data-shadow-rowgroup-column="7" + class="@if(!GROCY_FEATURE_FLAG_STOCK) d-none @endif">{{ $__t('Requirements fulfilled') }}</th> <th class="d-none">Hidden status for sorting of "Requirements fulfilled" column</th> <th class="d-none">Hidden status for filtering by status</th> <th class="d-none">Hidden recipe ingredient product names</th> + <th class="d-none">Hidden status for grouping by status</th> @include('components.userfields_thead', array( 'userfields' => $userfields {{ FindObjectInArrayByPropertyValue($products, 'id', $recipePos->product_id)->name . ' ' }} @endforeach </td> + <td class="d-none"> + @if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled == 1) {{ $__t('Enough in stock') }} @elseif(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1) {{ $__t('Not enough in stock, but already on the shopping list') }} @else {{ $__t('Not enough in stock') }} @endif + </td> @include('components.userfields_tbody', array( 'userfields' => $userfields,
7
diff --git a/javascript/components/Camera.js b/javascript/components/Camera.js @@ -291,7 +291,7 @@ class Camera extends React.Component { ...pad, }, animationDuration, - animationMode: Camera.Mode.Move, + animationMode: animationDuration === 0.0 ? Camera.Mode.Move : Camera.Mode.Ease, }); }
1
diff --git a/.github/no-response.yml b/.github/no-response.yml # Number of days of inactivity before an Issue is closed for lack of response daysUntilClose: 10 # Label requiring a response -responseRequiredLabel: STATE: Need clarification +responseRequiredLabel: "STATE: Need clarification" # Comment to post when closing an Issue for lack of response. Set to `false` to disable closeComment: > This issue has been automatically closed because there has been no response
1
diff --git a/scenes/treehouse.scn b/scenes/treehouse.scn "start_url": "https://webaverse.github.io/silkworm/", "dynamic": true }, - { - "position": [ - 2, - 1, - 0 - ], - "quaternion": [ - 0, - 0, - 0, - 1 - ], - "physics": false, - "start_url": "https://webaverse.github.io/particle-mesh/", - "dynamic": true - }, { "position": [ 4,
2
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -178,7 +178,7 @@ jobs: docker build -t kindlyops/havenapitest -f havenapi/Dockerfile-hotreload . docker run --volumes-from configs --network container:db -e TEST_DATABASE_URL -e HAVEN_JWK_PATH kindlyops/havenapitest /go/bin/buffalo test docker build -t kindlyops/apitest -f apitest/Dockerfile . - docker run --volumes-from configs --network container:db kindlyops/apitest cucumber + docker run --volumes-from configs --network container:db --workdir /usr/src/app kindlyops/apitest cucumber - run: name: notify failed job command: ./notify-slack notifications "CircleCI pipeline for $CIRCLE_PULL_REQUEST failed in $CIRCLE_JOB" circleci
12
diff --git a/src/parser.coffee b/src/parser.coffee @@ -50,8 +50,8 @@ class VASTParser @parseXmlDocument(null, [], options, xml, cb) @vent = new EventEmitter() - @track: (templates, errorCode, emittedData) -> - @vent.emit 'VAST-error', VASTUtil.merge(DEFAULT_EVENT_DATA, errorCode, emittedData) + @track: (templates, errorCode, data...) -> + @vent.emit 'VAST-error', VASTUtil.merge(DEFAULT_EVENT_DATA, errorCode, data...) VASTUtil.track(templates, errorCode) @on: (eventName, cb) -> @@ -121,7 +121,9 @@ class VASTParser @track( ad.errorURLTemplates.concat(response.errorURLTemplates), { ERRORCODE: ad.errorCode || 303 }, - { extensions : ad.extensions } + { ERRORMESSAGE: ad.errorMessage || '' }, + { extensions : ad.extensions }, + { system: ad.system } ) response.ads.splice(index, 1) @@ -149,6 +151,7 @@ class VASTParser # Timeout of VAST URI provided in Wrapper element, or of VAST URI provided in a subsequent Wrapper element. # (URI was either unavailable or reached a timeout as defined by the video player.) ad.errorCode = 301 + ad.errorMessage = err.message complete() return
0
diff --git a/token-metadata/0xa8892bfc33FA44053a9E402B1839966f4FEc74A4/metadata.json b/token-metadata/0xa8892bfc33FA44053a9E402B1839966f4FEc74A4/metadata.json "symbol": "CUB", "address": "0xa8892bfc33FA44053a9E402B1839966f4FEc74A4", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/accessibility-checker-engine/help-v4/en-US/WCAG20_Elem_Lang_Valid.html b/accessibility-checker-engine/help-v4/en-US/WCAG20_Elem_Lang_Valid.html @@ -63,14 +63,6 @@ For example: </blockquote> ``` -Another example: - -``` -<div> - <p>this is testing if I can add a second copyable example in Help</p> -</div> -``` - </script></mark-down> <!-- End main panel --> <!-- This is where the rule id is injected -->
2
diff --git a/dapps/marketplace/src/components/WaitForTransaction.js b/dapps/marketplace/src/components/WaitForTransaction.js @@ -10,6 +10,8 @@ import withWallet from 'hoc/withWallet' import withConfig from 'hoc/withConfig' import Sentry from 'utils/sentry' +const INVALID_JSON_RPC = 'Invalid JSON RPC response' + const WaitForFirstBlock = () => ( <div className="make-offer-modal"> <div className="spinner light" /> @@ -127,7 +129,11 @@ class WaitForTransaction extends Component { events.find(e => e.event === this.props.event) || events[0] let content - if (error) { + // Catch errors, but ignore one-off JSON-RPC errors + if ( + error && + (error.message && !error.message.indexOf(INVALID_JSON_RPC)) + ) { console.error(error) Sentry.captureException(error) content = <Error />
8
diff --git a/src/kite.js b/src/kite.js @@ -636,7 +636,11 @@ const Kite = { } else if (resp.statusCode === 403) { return null; } else if (resp.statusCode === 404) { - return vscode.workspace.rootPath || os.homedir(); + return ( + vscode.workspace.workspaceFolders + ? vscode.workspace.workspaceFolders[0].uri.fsPath + : vscode.workspace.rootPath + ) || os.homedir(); } else { throw new Error('Invalid status'); }
11
diff --git a/articles/api/management/v2/changes.md b/articles/api/management/v2/changes.md @@ -96,7 +96,8 @@ Auth0's API v2 requires sending an Access Token with specific scope(s). To perfo To use an endpoint, at least one of its available scopes (as listed in [Management API v2 explorer](/api/v2)) must be specified for the JWT. The actions available on an endpoint depend on the JWT scope. For example, if a JWT has the `update:users_app_metadata` scope, the [PATCH users `app_metadata`](/api/v2#!/users/patch_users_by_id) action is available, but not other properties. -Note that the Management API used to support authentication with an ID Token. This was using a subset of scopes for end users so your application can perform a subset of operations on behalf of the user: +There is a subset of scopes that your application can use in order to perform a subset of operations on behalf of the currently logged-in user. These are: + * `read:current_user` * `update:current_user_identities` * `create:current_user_metadata` @@ -105,7 +106,7 @@ Note that the Management API used to support authentication with an ID Token. Th * `create:current_user_device_credentials` * `delete:current_user_device_credentials` -This approach has been deprecated, and now you must call it with an Access Token. For more information on this see [Migration Guide: Management API and ID Tokens](/migrations/guides/calling-api-with-idtokens). +So, for example, if the Access Token contains the scope `update:current_user_metadata` then it can be used to update the metadata of the currently logged-in user. If, on the other hand, it contains the scope `update:users_app_metadata` it can be used to update the metadata of any user. ## User metadata
2
diff --git a/per-seat-subscriptions/client/script.js b/per-seat-subscriptions/client/script.js @@ -445,7 +445,6 @@ function createSubscription(customerId, paymentMethodId, priceId, quantity) { subscription: result, paymentMethodId: paymentMethodId, priceId: priceId, - foo: 'bar', }; }) // Some payment methods require a customer to do additional
2
diff --git a/articles/support/tickets.md b/articles/support/tickets.md @@ -46,3 +46,7 @@ If you are an existing Appliance customer, you will need to create an Auth0 clou 1. Enter any additional details into the text box and then click the **REPLY** button. If you are the ticket requester and the ticket is assigned to an agent, but is not solved or closed, you have the option to change the status of your ticket to **Solved** by checking the **Submit as solved** box next to the **REPLY** button. ![](/media/articles/support/update-ticket.png) + +### Closed Tickets + +If your ticket has been closed, but you'd like to continue working with Auth0 on the issue, please create a new [Support Center ticket](${env.DOMAIN_URL_SUPPORT}). Be sure to include the reference number for the original ticket(s).
0
diff --git a/sirepo/package_data/static/js/sirepo.js b/sirepo/package_data/static/js/sirepo.js @@ -1615,22 +1615,31 @@ SIREPO.app.factory('requestSender', function(cookieService, errorService, localR if (u.indexOf('/') < 0) { u = self.formatUrl(u, params); } - $window.location.href = u; - if (reload) { - // need to reload after location is set, because may - // be in cache iwc the app is still loaded - // https://github.com/radiasoft/sirepo/issues/2071 - $interval( - function () { - $window.location.reload(true); - }, - // avoids an abort message in firefox - // https://github.com/radiasoft/sirepo/issues/2130 - isFirefox() ? 100 : 1, - 1, - false - ); + var i = u.indexOf('#'); + // https://github.com/radiasoft/sirepo/issues/2160 + // hash is persistent even if setting href so explicitly + // set hash before href to avoid loops (e.g. #/server-upgraded) + if (i >= 0) { + $window.location.hash = u.substring(i); + u = u.substring(0, i); + } + else { + $window.location.hash = '#'; } + $window.location.href = u; +// if (reload) { +// // need to reload after location is set, because may +// // be in cache iwc the app is still loaded +// // https://github.com/radiasoft/sirepo/issues/2071 +// $interval( +// function () { +// $window.location.reload(true); +// }, +// 1, +// 1, +// false +// ); +// } }; self.globalRedirectRoot = function() {
1
diff --git a/src/plots/polar/polar.js b/src/plots/polar/polar.js @@ -245,6 +245,10 @@ proto.updateLayout = function(fullLayout, polarLayout) { _this.clipPaths.circle.select('path') .attr('d', pathSectorClosed(radius, sector)) .attr('transform', strTranslate(cx - xOffset2, cy - yOffset2)); + + // remove crispEdges - all the off-square angles in polar plots + // make these counterproductive. + _this.framework.selectAll('.crisp').classed('crisp', 0); }; proto.updateRadialAxis = function(fullLayout, polarLayout) {
2
diff --git a/util.js b/util.js @@ -141,7 +141,17 @@ const _makeAtlas = (size, images) => { export function mergeMeshes(meshes, geometries, textures) { const size = 512; const images = textures.map(texture => texture && texture.image); - const {atlasCanvas, rects} = _makeAtlas(size, images); + const colorsImage = document.createElement('canvas'); + colorsImage.width = size/2; + colorsImage.height = 1; + colorsImage.rigid = true; + const colorsImageCtx = colorsImage.getContext('2d'); + colorsImageCtx.fillStyle = '#FFF'; + colorsImageCtx.fillRect(0, 0, colorsImage.width, colorsImage.height); + const {atlasCanvas, rects} = _makeAtlas(size, images.concat(colorsImage)); + const colorsImageRect = rects[rects.length - 1]; + let colorsImageColorIndex = 0; + const atlasCanvasCtx = atlasCanvas.getContext('2d'); const geometry = new THREE.BufferGeometry(); { @@ -163,6 +173,7 @@ export function mergeMeshes(meshes, geometries, textures) { for (let i = 0; i < meshes.length; i++) { const mesh = meshes[i]; const geometry = geometries[i]; + const {material} = mesh; const rect = rects[i]; geometry.applyMatrix4(mesh.matrixWorld); @@ -180,18 +191,30 @@ export function mergeMeshes(meshes, geometries, textures) { positions.set(geometry.attributes.position.array, positionIndex); positionIndex += geometry.attributes.position.array.length; - if (geometry.attributes.uv) { + if (geometry.attributes.uv && rect) { for (let i = 0; i < geometry.attributes.uv.array.length; i += 2) { - if (rect) { uvs[uvIndex + i] = rect.x / size + geometry.attributes.uv.array[i] * rect.w / size; uvs[uvIndex + i + 1] = rect.y / size + geometry.attributes.uv.array[i + 1] * rect.h / size; - } else { - uvs[uvIndex + i] = 1; - uvs[uvIndex + i + 1] = 1; - } } } else { - uvs.fill(1, uvIndex, geometry.attributes.position.array.length / 3 * 2); + const color = material.color.clone(); + if (material.emissive && material.emissiveIntensity > 0) { + color.lerp(material.emissive, material.emissiveIntensity); + } + atlasCanvasCtx.fillStyle = color.getStyle(); + const uv = new THREE.Vector2(colorsImageRect.x + colorsImageColorIndex, colorsImageRect.y); + atlasCanvasCtx.fillRect( + uv.x, + uv.y, + uv.x + 1, + uv.y + 1 + ); + colorsImageColorIndex++; + + for (let i = 0; i < geometry.attributes.uv.array.length; i += 2) { + uvs[uvIndex + i] = (uv.x + 0.5)/size; + uvs[uvIndex + i + 1] = (uv.y + 0.5)/size; + } } uvIndex += geometry.attributes.position.array.length / 3 * 2; if (geometry.attributes.color) {
0
diff --git a/README.md b/README.md @@ -45,7 +45,7 @@ You can find detailed API reference docs under [Reference > Waterline ORM](http: #### Help -Check out the recommended [community support options](http://sailsjs.com/support) for tutorials and other resources. If you have a specific question, or just need to clarify how something works, [ask for help](https://gitter.im/balderdashy/sails) or reach out to the core team [directly](http://sailsjs.com/flagship). +Check out the recommended [community support options](http://sailsjs.com/support) for tutorials and other resources. If you have a specific question, or just need to clarify [how something works](https://docs.google.com/drawings/d/1u7xb5jDY5i2oeVRP2-iOGGVsFbosqTMWh9wfmY3BTfw/edit), ask [for help](https://gitter.im/balderdashy/sails) or reach out to the [core team](http://sailsjs.com/about) [directly](http://sailsjs.com/flagship). You can keep up to date with security patches, the Waterline release schedule, new database adapters, and events in your area by following us ([@sailsjs](https://twitter.com/sailsjs)) on Twitter.
0
diff --git a/src/docs/data-configuration.md b/src/docs/data-configuration.md @@ -20,6 +20,6 @@ There are a few special data keys you can assign in your data to control how tem ## Advanced -* `eleventyImportCollections`: {% addedin "2.0.0-canary.20" %}Used to inform template dependencies for incremental builds and to render templates in the correct order. Read more about [importing collections](https://github.com/11ty/eleventy/issues/975) +* `eleventyImport.collections`: {% addedin "2.0.0-canary.21" %}An Array of collection names used to inform template dependencies for incremental builds and to render templates in the correct order. Read more about [importing collections](https://github.com/11ty/eleventy/issues/975) * `dynamicPermalink`: Option to disable template syntax for the `permalink` key. Read more about [disabling dynamic permalinks](/docs/permalinks/#disable-templating-in-permalinks). * `permalinkBypassOutputDir`: Write a file to somewhere other than the output directory. Read more about [bypassing the output directory](/docs/permalinks/#ignore-the-output-directory) \ No newline at end of file
10
diff --git a/app/addons/documents/mango/components/ExecutionStats.js b/app/addons/documents/mango/components/ExecutionStats.js // License for the specific language governing permissions and limitations under // the License. import React from 'react'; +import PropTypes from 'prop-types'; import { Popover, OverlayTrigger } from 'react-bootstrap'; const TOO_MANY_DOCS_SCANNED_WARNING = "The number of documents examined is high in proportion to the number of results returned. Consider adding an index to improve this."; @@ -122,6 +123,6 @@ export default class ExecutionStats extends React.Component { }; ExecutionStats.propTypes = { - executionStats: React.PropTypes.object, - warning: React.PropTypes.string + executionStats: PropTypes.object, + warning: PropTypes.string };
2
diff --git a/server/preprocessing/other-scripts/test/params_pubmed.json b/server/preprocessing/other-scripts/test/params_pubmed.json -{"article_types":["autobiography","bibliography","biography","book illustrations","case reports","classical article","clinical conference","clinical study","clinical trial","clinical trial, phase i","clinical trial, phase ii","clinical trial, phase iii","clinical trial, phase iv","collected works","comment","comparative study","congresses","consensus development conference","consensus development conference, nih","controlled clinical trial","corrected and republished article","dataset","dictionary","directory","duplicate publication","editorial","electronic supplementary materials","english abstract","ephemera","evaluation studies","festschrift","government publications","guideline","historical article","interactive tutorial","interview","introductory journal article","journal article","lectures","legal cases","legislation","letter","meta analysis","multicenter study","news","newspaper article","observational study","overall","patient education handout","periodical index","personal narratives","pictorial works","popular works","portraits","practice guideline","pragmatic clinical trial","publication components","publication formats","publication type category","published erratum","randomized controlled trial","research support, american recovery and reinvestment act","research support, n i h, extramural","research support, n i h, intramural","research support, non u s gov't","research support, u s gov't, non p h s","research support, u s gov't, p h s","research support, u s government","retracted publication","retraction of publication","review","scientific integrity review","study characteristics","support of research","technical report","twin study","validation studies","video audio media","webcasts"],"from":"1809-01-01","to":"2017-08-19","sorting":"most-recent"} \ No newline at end of file +{"article_types":["autobiography","bibliography","biography","book illustrations","case reports","classical article","clinical conference","clinical study","clinical trial","clinical trial, phase i","clinical trial, phase ii","clinical trial, phase iii","clinical trial, phase iv","collected works","comment","comparative study","congresses","consensus development conference","consensus development conference, nih","controlled clinical trial","corrected and republished article","dataset","dictionary","directory","duplicate publication","editorial","electronic supplementary materials","english abstract","ephemera","evaluation studies","festschrift","government publications","guideline","historical article","interactive tutorial","interview","introductory journal article","journal article","lectures","legal cases","legislation","letter","meta analysis","multicenter study","news","newspaper article","observational study","overall","patient education handout","periodical index","personal narratives","pictorial works","popular works","portraits","practice guideline","pragmatic clinical trial","publication components","publication formats","publication type category","published erratum","randomized controlled trial","research support, american recovery and reinvestment act","research support, n i h, extramural","research support, n i h, intramural","research support, non u s gov't","research support, u s gov't, non p h s","research support, u s gov't, p h s","research support, u s government","retracted publication","retraction of publication","review","scientific integrity review","study characteristics","support of research","technical report","twin study","validation studies","video audio media","webcasts"],"from":"1809-01-01","to":"2017-12-04","sorting":"most-recent"} \ No newline at end of file
3
diff --git a/smart-contract-extensions/test/hooks/codeRequiredHook.js b/smart-contract-extensions/test/hooks/codeRequiredHook.js @@ -50,6 +50,24 @@ contract('CodeRequiredHook', accounts => { ) }) + it('reverts if adding a zero code', async () => { + await reverts( + hookContract.addCodes(lock.address, [constants.ZERO_ADDRESS], { + from: lockCreator, + }), + 'INVALID_CODE' + ) + }) + + it('reverts if removing a zero code', async () => { + await reverts( + hookContract.removeCodes(lock.address, [constants.ZERO_ADDRESS], { + from: lockCreator, + }), + 'INVALID_CODE' + ) + }) + it('can buy if you know the code', async () => { const messageToSign = web3.utils.keccak256( web3.eth.abi.encodeParameters(['address'], [keyBuyer])
7
diff --git a/bin/multielasticdump b/bin/multielasticdump @@ -162,7 +162,7 @@ var dump = function () { indexCounter++ - var input = options.input + '/' + encodeURIComponent(index) + var input = options.input + '/' + encodeURIComponent(index).toLowerCase() var outputData = options.output + '/' + index + '.json' var outputMapping = options.output + '/' + index + '.mapping.json' var outputAnalyzer = options.output + '/' + index + '.analyzer.json' @@ -253,7 +253,7 @@ var load = function () { indexCounter++ - var output = options.output + '/' + encodeURIComponent(index) + var output = options.output + '/' + encodeURIComponent(index).toLowerCase() var inputData = options.input + '/' + index + '.json' var inputMapping = options.input + '/' + index + '.mapping.json' var inputAnalyzer = options.input + '/' + index + '.analyzer.json'
11
diff --git a/README.md b/README.md @@ -102,12 +102,13 @@ For front-end applications and node <v4, please use `require('fluture/es5')`. [<img src="https://raw.github.com/fantasyland/fantasy-land/master/logo.png" align="right" width="82" height="82" alt="Fantasy Land" />][FL] [<img src="https://raw.githubusercontent.com/rpominov/static-land/master/logo/logo.png" align="right" height="82" alt="Static Land" />][6] -Fluture implements [FantasyLand 1][FL1], [FantasyLand 2][FL2], -[FantasyLand 3][FL3] and [Static Land][6] compatible `Functor`, `Bifunctor`, -`Apply`, `Applicative`, `Chain`, `ChainRec` and `Monad`. - -FantasyLand 0.x is *mostly* supported. Everything but `Apply` (`ap`) is, this -means that dispatchers to FantasyLand 0.x `ap` will not work. +* `Future` implements [Fantasy Land 1][FL1], [Fantasy Land 2][FL2], + [Fantasy Land 3][FL3], and [Static Land][6] -compatible `Bifunctor`, `Monad` + and `ChainRec` (`of`, `ap`, `map`, `bimap`, `chain`, `chainRec`). Fantasy Land + 0.x is *mostly* supported. Everything but `Apply` (`ap`) is, this means that + dispatchers to Fantasy Land 0.x `ap` (like the one in Ramda) will not work. +* `Future.Par` implements [Fantasy Land 3][FL3] `Alternative` (`of`, `zero`, `map`, `ap`, `alt`). +* The Future representative contains a `@@type` property for [Sanctuary Type Identifiers][STI]. ## Documentation @@ -975,6 +976,8 @@ Credits for the logo go to [Erik Fuente][8]. [S:is]: https://sanctuary.js.org/#is [S:create]: https://sanctuary.js.org/#create +[STI]: https://github.com/sanctuary-js/sanctuary-type-identifiers + [Z:Functor]: https://github.com/sanctuary-js/sanctuary-type-classes#Functor [Z:Bifunctor]: https://github.com/sanctuary-js/sanctuary-type-classes#Bifunctor [Z:Chain]: https://github.com/sanctuary-js/sanctuary-type-classes#Chain
7
diff --git a/package.json b/package.json "start": "electron ./local_modules/electron_main/electron_main.js", "dev": "cross-env NODE_ENV=development electron --no-sandbox ./local_modules/electron_main/electron_main.js", "postinstall": "electron-builder install-app-deps && npm run submodules", - "submodules": "git submodule update --init --recursive & git submodule foreach --recursive git fetch & git submodule foreach --recursive git checkout master & git submodule foreach --recursive git pull --ff-only origin master" + "submodules": "git submodule update --init --recursive && git submodule foreach --recursive git fetch && git submodule foreach --recursive git checkout master && git submodule foreach --recursive git pull --ff-only origin master" }, "build": { "appId": "com.mymonero.mymonero-desktop",
3
diff --git a/articles/api-auth/faq.md b/articles/api-auth/faq.md @@ -13,3 +13,12 @@ description: API Authentication and Authorization FAQ **A:** If a single Client needs access tokens for different resource servers, then multiple calls to `/authorize` (that is, multiple executions of the same or different Authorization Flow) needs to be performed. Each authorization will use a different value for `audience`, which will result in a different access token at the end of the flow. For more information, see the [OAuth 2.0: Audience Information Specification](https://tools.ietf.org/html/draft-tschofenig-oauth-audience-00#section-3). + +### Q: Can I try the endpoints before I implement my application? + +**A** Sure! You have two options: +- [Download our Postman collection](https://app.getpostman.com/run-collection/608670c820cda215594c). For more information on how to use our Postman collection refer to [Using the Auth0 API with our Postman Collections](/api/postman). + +- Use our [Authentication API Debugger Extension](/extensions/authentication-api-debugger). You can find detailed instructions per endpoint/grant at our [Authentication API Reference](/api/authentication). + - For the Authorize endpoint, go to [Authorize Client](/api/authentication#authorize-client) and read the _Test this endpoint_ paragraph for the grant you want to test. + - For the Token endpoint, go to [Get Token](/api/authentication#get-token) and read the _Test this endpoint_ paragraph for the grant you want to test.
0
diff --git a/CHANGELOG.md b/CHANGELOG.md -------------------------------------------------- <a name="0.13.5"></a> -# [0.13.5](https://github.com/moleculerjs/moleculer/compare/v0.13.4...v0.13.5) (2018-xx-xx) +# [0.13.5](https://github.com/moleculerjs/moleculer/compare/v0.13.4...v0.13.5) (2018-12-09) # New
3
diff --git a/js/background.js b/js/background.js @@ -115,8 +115,12 @@ function Background() { chrome.tabs.query({ 'currentWindow': true, 'active': true - }, function(tabs) { - var tabId = tabs[0].id; + }, function(currentTabs) { + var tabId = currentTabs[0].id; + if (!tabs[tabId]) { + tabs[tab.id] = {'trackers': {}, "total": 0, 'url': tab.url}; + } + if (!tabs[tabId].whitelist) { tabs[tabId].whitelist = []; }
9
diff --git a/index.js b/index.js -var app = require('express')(); +var express = require('express'); +var app = express(); var http = require('http').Server(app); var io = require('socket.io')(http); var cryptico = require('cryptico'); +// Server static files +app.use(express.static("tests")); + // The modulos to be used in secret sharing and operations on shares. var Zp = 2081; @@ -28,19 +32,36 @@ io.on('connection', function(socket) { // read message var computation_id = msg['computation_id']; var party_id = msg['party_id']; - console.log(party_id); + var party_count = msg['party_count']; + + if(client_map[computation_id] == null) client_map[computation_id] = 0; + if(socket_map[computation_id] == null) socket_map[computation_id] = {}; + if(party_id == null) party_id = ++(client_map[computation_id]); + if(party_count == null) party_count = totalparty_map[computation_id]; - // if party_id has not been claimed yet, claim it. - if(socket_map[computation_id][party_id] == null) { + // no party count given or saved. + if(party_count == null) { + io.to(socket.id).emit('error', "party count is not specified nor pre-saved"); + } + + // given party count contradicts the count that is already saved. + else if(totalparty_map[computation_id] != null && party_count != totalparty_map[computation_id]) { + io.to(socket.id).emit('error', "contradicting party count"); + } + + // given party id is already claimed by someone else. + else if(socket_map[computation_id][party_id] != null) { + io.to(socket.id).emit('error', party_id + " is already taken"); + } + + else { + totalparty_map[computation_id] = party_count; socket_map[computation_id][party_id] = socket.id; computation_map[socket.id] = computation_id; party_map[socket.id] = party_id; - io.to(socket.id).emit('init', party_id); - console.log(party_id); - } else { - io.to(socket.id).emit('error', party_id + " is already taken"); + io.to(socket.id).emit('init', JSON.stringify({ party_id: party_id, party_count: party_count })); } }); @@ -72,6 +93,7 @@ io.on('connection', function(socket) { socket.on('disconnect', function() { console.log('user disconnected'); + try { var computation_id = computation_map[socket.id]; var party_id = party_map[socket.id]; @@ -79,6 +101,7 @@ io.on('connection', function(socket) { computation_map[socket.id] = null; socket_map[computation_id][party_id] = null; key_map[computation_id][party_id] = null; + } catch(ex) { } }); socket.on('share', function(msg) {
11
diff --git a/bin/enforcers/Responses.js b/bin/enforcers/Responses.js const EnforcerRef = require('../enforcer-ref'); const rxCode = /^[1-5]\d{2}$/; -const rxRange = /^[1-5](?:\d|X){2}$/; +const rxRange = /^[1-5]X{2}$/; module.exports = { init: function (data) { @@ -28,15 +28,14 @@ module.exports = { prototype: {}, validator: function (data) { + const { major } = data; return { type: 'object', additionalProperties: EnforcerRef('Response', { allowed: ({ key }) => key === 'default' || rxCode.test(key) || (major === 3 && rxRange.test(key)) - ? true - : 'Invalid response code.' }), errors: ({ exception, definition }) => { - if (Object.keys(definition).length === 0) { + if (Object.keys(definition).length === 0 && !exception.hasException) { exception.message('Response object cannot be empty'); } }
1
diff --git a/package.json b/package.json "prepare": "npm run build", "prepublishOnly": "npm run lint && npm run build && npm test", "test": "jest --verbose --silent --runInBand", - "test:cov": "jest --coverage --silent --runInBand", + "test:cov": "jest --coverage --silent --runInBand --collectCoverageFrom=src/**/*.js", "test:log": "jest --verbose" }, "repository": {
2
diff --git a/js/feature/textFeatureSource.js b/js/feature/textFeatureSource.js @@ -313,7 +313,7 @@ function packFeatures(features, maxRows) { */ function fixFeatures(features, genome) { - if (!features || features.length === 0) return; + if (!features || features.length === 0) return []; const isBedPE = features[0].chr === undefined && features[0].chr1 !== undefined; if (isBedPE) {
1
diff --git a/physics-manager.js b/physics-manager.js @@ -113,8 +113,9 @@ physicsManager.getRigTransforms = () => rigManager.getRigTransforms(); const animals = []; physicsManager.animals = animals; */ +const gravity = new THREE.Vector3(0, -9.8, 0); const _applyGravity = timeDiff => { - localVector.set(0, -9.8, 0); + localVector.copy(gravity); localVector.multiplyScalar(timeDiff); physicsManager.velocity.add(localVector); @@ -214,6 +215,16 @@ const _collideItems = matrix => { geometryManager.currentChunkMesh.update(localVector3); }; */ +physicsManager.setGravity = g => { + if (g === true) { + gravity.set(0, -9.8, 0); + } else if (g === false) { + gravity.setScalar(0); + } else { + gravity.copy(g); + } +}; + const _updatePhysics = timeDiff => { const xrCamera = renderer.xr.getSession() ? renderer.xr.getCamera(camera) : camera; if (renderer.xr.getSession()) {
0
diff --git a/spec/models/user_shared_examples.rb b/spec/models/user_shared_examples.rb @@ -795,59 +795,74 @@ shared_examples_for "user models" do end end - describe '#google_maps_api_key' do - it 'overrides organization if organization is nil or blank' do - user = create_user - user.google_maps_api_key.should eq nil - - user.google_maps_key = 'wadus' - user.google_maps_api_key.should eq 'wadus' - - user.google_maps_key = nil - user.stubs(:organization).returns(mock) - - user.organization.stubs(:google_maps_key).returns(nil) - user.google_maps_api_key.should eq nil - - user.organization.stubs(:google_maps_key).returns('org') - user.google_maps_api_key.should eq 'org' + shared_examples_for 'google maps key inheritance' do + before(:all) do + @user = create_user + end - user.google_maps_key = 'wadus' - user.google_maps_api_key.should eq 'org' + after(:all) do + @user.destroy + end - user.organization.stubs(:google_maps_key).returns('') - user.google_maps_api_key.should eq 'wadus' + def set_user_field(value) + @user.send(write_field + '=', value) + end - user.organization.stubs(:google_maps_key).returns(nil) - user.google_maps_api_key.should eq 'wadus' + def set_organization_field(value) + @user.stubs(:organization).returns(mock) + @user.organization.stubs(write_field).returns(value) end + + def get_field + @user.send(read_field) end - describe '#google_maps_private_key' do - it 'overrides organization if organization is nil or blank' do - user = create_user - user.google_maps_api_key.should eq nil + it 'returns user key for users without organization' do + set_user_field('wadus') + get_field.should eq 'wadus' + end - user.google_maps_private_key = 'wadus' - user.google_maps_private_key.should eq 'wadus' + it 'returns nil for users without organization nor key' do + set_user_field(nil) + get_field.should eq nil + end - user.google_maps_private_key = nil - user.stubs(:organization).returns(mock) + it 'takes key from user if organization is not set' do + set_user_field('wadus') + set_organization_field(nil) + get_field.should eq 'wadus' + end - user.organization.stubs(:google_maps_private_key).returns(nil) - user.google_maps_private_key.should eq nil + it 'takes key from user if organization is blank' do + set_user_field('wadus') + set_organization_field('') + get_field.should eq 'wadus' + end - user.organization.stubs(:google_maps_private_key).returns('org') - user.google_maps_private_key.should eq 'org' + it 'takes key from organization if both set' do + set_user_field('wadus') + set_organization_field('org_key') + get_field.should eq 'org_key' + end - user.google_maps_private_key = 'wadus' - user.google_maps_private_key.should eq 'org' + it 'returns nil if key is not set at user nor organization' do + set_user_field(nil) + set_organization_field(nil) + get_field.should be_nil + end + end - user.organization.stubs(:google_maps_private_key).returns('') - user.google_maps_private_key.should eq 'wadus' + describe '#google_maps_api_key' do + it_behaves_like 'google maps key inheritance' do + let(:write_field) { 'google_maps_key' } + let(:read_field) { 'google_maps_api_key' } + end + end - user.organization.stubs(:google_maps_private_key).returns(nil) - user.google_maps_private_key.should eq 'wadus' + describe '#google_maps_private_key' do + it_behaves_like 'google maps key inheritance' do + let(:write_field) { 'google_maps_private_key' } + let(:read_field) { 'google_maps_private_key' } end end
7
diff --git a/src/lib/notifications/backgroundFetch.native.js b/src/lib/notifications/backgroundFetch.native.js @@ -5,7 +5,6 @@ import { useCallback, useEffect } from 'react' import logger from '../logger/js-logger' import { useUserStorage, useWallet } from '../wallet/GoodWalletProvider' import { fireEvent, NOTIFICATION_ERROR, NOTIFICATION_SENT } from '../analytics/analytics' -import { noopAsync } from '../utils/async' // eslint-disable-next-line import/named import { dailyClaimNotification, NotificationsCategories } from './backgroundActions' @@ -24,8 +23,9 @@ const options = { periodic: true, } +// eslint-disable-next-line require-await +const defaultTaskProcessor = async () => false const DEFAULT_TASK = 'react-native-background-fetch' -const defaultTaskProcessor = noopAsync const log = logger.child({ from: 'backgroundFetch' }) const onTimeout = taskId => { @@ -87,7 +87,9 @@ export const useBackgroundFetch = (auto = false) => { try { const payload = await runTask(taskId) + if (false !== payload) { fireEvent(NOTIFICATION_SENT, pickBy({ payload })) + } } catch (e) { const { message: error, payload } = e
0
diff --git a/lib/classes/PluginManager.test.js b/lib/classes/PluginManager.test.js @@ -387,6 +387,7 @@ describe('PluginManager', () => { } let restoreEnv; + let servicePath; beforeEach(() => { ({ restoreEnv } = overrideEnv({ whitelist: ['APPDATA', 'PATH'] })); @@ -394,7 +395,7 @@ describe('PluginManager', () => { serverless.cli = new CLI(); serverless.processedInput = { commands: [], options: {} }; pluginManager = new PluginManager(serverless); - pluginManager.serverless.config.servicePath = 'foo'; + servicePath = pluginManager.serverless.config.servicePath = 'foo'; }); afterEach(() => restoreEnv()); @@ -451,7 +452,7 @@ describe('PluginManager', () => { }); pluginManager = new PluginManager(serverless); pluginManager.serverless.config = { servicePath: 'somePath' }; - const servicePath = pluginManager.serverless.config.servicePath; + servicePath = pluginManager.serverless.config.servicePath; cacheFilePath = getCacheFilePath(servicePath); getCommandsStub = sinon.stub(pluginManager, 'getCommands'); }); @@ -754,7 +755,6 @@ describe('PluginManager', () => { // eslint-disable-line prefer-arrow-callback mockRequire('ServicePluginMock1', ServicePluginMock1); // Plugins loaded via a relative path should be required relative to the service path - const servicePath = pluginManager.serverless.config.servicePath; mockRequire(`${servicePath}/RelativePath/ServicePluginMock2`, ServicePluginMock2); });
7
diff --git a/environment/core/hlt.hpp b/environment/core/hlt.hpp @@ -111,18 +111,17 @@ namespace hlt { float getDistance(Location l1, Location l2) const { short dx = l1.x - l2.x; short dy = l1.y - l2.y; - return sqrt((dx*dx) + (dy*dy)); + return sqrtf((dx*dx) + (dy*dy)); } float getAngle(Location l1, Location l2) const { short dx = l2.x - l1.x; short dy = l2.y - l1.y; - return atan2(dy, dx); + return atan2f(dy, dx); } //! Damage the given ship, killing it and returning true if the ship health falls below 0 auto damageShip(Ship &ship, unsigned short damage) -> bool { - // TODO: actual damage calculations if (ship.health <= damage) { killShip(ship); return true;
1
diff --git a/generators/server/templates/src/main/java/package/config/WebConfigurer.java.ejs b/generators/server/templates/src/main/java/package/config/WebConfigurer.java.ejs @@ -55,8 +55,10 @@ import org.springframework.core.annotation.Order; <%_ if (!reactive) { _%> import org.springframework.core.env.Environment; import org.springframework.core.env.Profiles; + <%_ if (!skipClient) { _%> import org.springframework.http.MediaType; <%_ } _%> +<%_ } _%> import org.springframework.web.cors.CorsConfiguration; <%_ if (!reactive) { _%> import org.springframework.web.cors.UrlBasedCorsConfigurationSource; @@ -139,6 +141,7 @@ public class WebConfigurer implements <% if (!reactive) { %>ServletContextInitia <%_ } _%> log.info("Web application fully configured"); } + <%_ if (!skipClient) { _%> /** * Customize the Servlet engine: Mime types, the document root, the cache. @@ -146,10 +149,8 @@ public class WebConfigurer implements <% if (!reactive) { %>ServletContextInitia @Override public void customize(WebServerFactory server) { setMimeMappings(server); - <%_ if (!skipClient) { _%> // When running in an IDE or with <% if (buildTool === 'gradle') { %>./gradlew bootRun<% } else { %>./mvnw spring-boot:run<% } %>, set location of the static web assets. setLocationForStaticAssets(server); - <%_ } _%> } private void setMimeMappings(WebServerFactory server) { @@ -163,7 +164,6 @@ public class WebConfigurer implements <% if (!reactive) { %>ServletContextInitia servletWebServer.setMimeMappings(mappings); } } - <%_ if (!skipClient) { _%> private void setLocationForStaticAssets(WebServerFactory server) { if (server instanceof ConfigurableServletWebServerFactory) {
2
diff --git a/assets/js/modules/adsense/index.js b/assets/js/modules/adsense/index.js @@ -39,7 +39,6 @@ import { SettingsSetupIncomplete, SettingsView, } from './components/settings'; -import { AdBlockerWarning } from './components/common'; import { DashboardZeroData, DashboardSummaryWidget, @@ -63,18 +62,6 @@ addFilter( } ) ); -addFilter( - 'googlesitekit.ModuleSettingsWarning', - 'googlesitekit.adsenseSettingsWarning', - fillFilterWithComponent( ( props ) => { - const { slug, context, OriginalComponent } = props; - if ( 'adsense' !== slug ) { - return <OriginalComponent { ...props } />; - } - return <AdBlockerWarning context={ context } />; - } ) -); - addFilter( 'googlesitekit.AdSenseDashboardZeroData', 'googlesitekit.AdSenseDashboardZeroDataRefactored',
2
diff --git a/src/article/shared/FigureComponent.js b/src/article/shared/FigureComponent.js @@ -29,16 +29,23 @@ export default class FigureComponent extends NodeComponent { _renderCurrentPanel ($$) { let panel = this._getCurrentPanel() return renderModelComponent(this.context, $$, { - model: panel + model: panel, + mode: this.props.mode }) } _renderAllPanels ($$) { let model = this.props.model let panels = model.getPanels() - return panels.map(panel => renderModelComponent(this.context, $$, { - model: panel + let els = panels.map(panel => renderModelComponent(this.context, $$, { + model: panel, + mode: this.props.mode })) + if (panels.length > 1) { + let currentPanelIndex = this._getCurrentPanelIndex() + els[currentPanelIndex].addClass('sm-current-panel') + } + return els } _getMode () { @@ -46,19 +53,24 @@ export default class FigureComponent extends NodeComponent { } _getCurrentPanel () { + let model = this.props.model + let currentPanelIndex = this._getCurrentPanelIndex() + let panel = model.getPanels()[currentPanelIndex] + return panel + } + + _getCurrentPanelIndex () { let model = this.props.model let node = model._node let currentPanelIndex = 0 if (node.state) { currentPanelIndex = node.state.currentPanelIndex } - let panel = model.getPanels()[currentPanelIndex] // FIXME: node state is corrupt - if (!panel) { + if (!node.panels[currentPanelIndex]) { console.error('figurePanel.state.currentPanelIndex is corrupt') - node.state.currentPanelIndex = 0 - panel = model.getPanels()[0] + node.state.currentPanelIndex = currentPanelIndex = 0 } - return panel + return currentPanelIndex } }
7
diff --git a/tutorials/5-binarysearch.md b/tutorials/5-binarysearch.md @@ -194,18 +194,3 @@ function binary_search(array, element) { return binary_search(nArray, element); } ``` ----------------------------------------------------------- -We have now implemented linear and binary search. <br> -As a last step, we need to make sure the connecting and computation functions can be accessed by other files, so we wrap all the code in a wrapper. - -```javascript -(function (exports, node) { - ... - function connect() { ... } - function compute() { ... } - - exports.connect = connect; - exports.compute = compute; - -}((typeof exports === 'undefined' ? this.mpc = {} : exports), typeof exports !== 'undefined')); -```
8
diff --git a/src/utils/unescape-html.js b/src/utils/unescape-html.js @@ -9,8 +9,5 @@ module.exports = function (encodedString) { }; return encodedString.replace(translateRe, (match, entity) => { return translate[entity]; - }).replace(/&#(\d+);/gi, (match, numStr) => { - const num = parseInt(numStr, 10); - return String.fromCharCode(num); }); };
2
diff --git a/3.0/resources/fields.md b/3.0/resources/fields.md @@ -504,6 +504,10 @@ DateTime::make('Updated At')->hideFromIndex(), You may customize the display format of your `DateTime` fields using the `format` method. The format must be a format supported by [Moment.js](https://momentjs.com/docs/#/parsing/string-format/): +```php +DateTime::make('Created At')->format('DD MMM YYYY'), +``` + To customize the display format used for the JavaScript date picker widget, you can use the `pickerFormat` method: ```php @@ -512,10 +516,6 @@ DateTime::make('Updated At')->pickerFormat('d.m.Y'), To learn about the available options, you may see the flatpickr reference here: [https://flatpickr.js.org/formatting/](https://flatpickr.js.org/formatting/). -```php -DateTime::make('Created At')->format('DD MMM YYYY'), -``` - ### File Field To learn more about defining file fields and handling uploads, check out the additional [file field documentation](./file-fields.md).
5
diff --git a/codegens/java-okhttp/lib/okhttp.js b/codegens/java-okhttp/lib/okhttp.js @@ -6,7 +6,7 @@ var _ = require('./lodash'), sanitizeOptions = require('./util').sanitizeOptions; // Since Java OkHttp requires to add extralines of code to handle methods with body -const METHODS_WITHOUT_BODY = ['GET', 'HEAD', 'COPY', 'UNLOCK', 'UNLINK', 'PURGE', 'LINK', 'VIEW']; +const METHODS_WITHOUT_BODY = ['HEAD', 'COPY', 'UNLOCK', 'UNLINK', 'PURGE', 'LINK', 'VIEW']; /** * returns snippet of java okhttp by parsing data from Postman-SDK request object
11
diff --git a/docs/api/README.md b/docs/api/README.md @@ -171,6 +171,8 @@ In the case a Saga is cancelled (either manually or using the provided Effects), Creates an Effect description that instructs the middleware to wait for a specified action on the Store. The Generator is suspended until an action that matches `pattern` is dispatched. +The result of `yield take(pattern)` is an action object being dispatched. + `pattern` is interpreted using the following rules: - If `take` is called with no arguments or `'*'` all dispatched actions are matched (e.g. `take()` will match all actions)
3
diff --git a/portal/src/components/ProgramOverview/index.js b/portal/src/components/ProgramOverview/index.js @@ -84,7 +84,7 @@ export default function ProgramOverview() { function displayProgramDetails(data) { - const selectedProgram = programsList.find((program) => program.name.toLowerCase() === data.programId.toLowerCase()); + const selectedProgram = programsList.find((program) => program.name.toLowerCase() === data.name.toLowerCase()); if (selectedProgram) { return ( <Card className="card-container">
9
diff --git a/404.js b/404.js @@ -48,6 +48,7 @@ const _setStoreHtml = async () => { </div> </li> </ul> + <a href="edit.html" class=big-button>Goto HomeSpace</a> <button class=big-button>Mint NFT...</button> </div> <div class=content>
0
diff --git a/src/plugins/submenu/table.js b/src/plugins/submenu/table.js @@ -611,31 +611,85 @@ export default { const vertical = direction === 'vertical'; const contextTable = this.context.table; const currentCell = contextTable._tdElement; + const rows = contextTable._trElements; + const currentRow = contextTable._trElement; + const index = contextTable._logical_cellIndex; + const rowIndex = contextTable._rowIndex; const newCell = this.util.createElement(currentCell.nodeName); newCell.innerHTML = '<div>' + this.util.zeroWidthSpace + '</div>'; if (vertical) { - const colSpan = currentCell.colSpan; - if (colSpan > 1) { - newCell.colSpan = this._w.Math.floor(colSpan/2); + const currentColSpan = currentCell.colSpan; newCell.rowSpan = currentCell.rowSpan; - currentCell.colSpan = colSpan - newCell.colSpan; - contextTable._trElement.insertBefore(newCell, currentCell.nextElementSibling); + + if (currentColSpan > 1) { + newCell.colSpan = this._w.Math.floor(currentColSpan/2); + currentCell.colSpan = currentColSpan - newCell.colSpan; + currentRow.insertBefore(newCell, currentCell.nextElementSibling); } else { + let rowSpanArr = []; + let spanIndex = []; + + for (let i = 0, len = rows.length, cells, colSpan; i < len; i++) { + cells = rows[i].cells; + colSpan = 0; + if (i === rowIndex) continue; + for (let c = 0, cLen = cells.length, cell, cs, rs, logcalIndex; c < cLen; c++) { + cell = cells[c]; + cs = cell.colSpan - 1; + rs = cell.rowSpan - 1; + logcalIndex = c + colSpan; + if (spanIndex.length > 0) { + for (let r = 0, arr; r < spanIndex.length; r++) { + arr = spanIndex[r]; + if (logcalIndex >= arr.index) { + colSpan += arr.cs; + logcalIndex += arr.cs; + arr.rs -= 1; + if (arr.rs < 1) { + spanIndex.splice(r, 1); + r--; + } + } + } + } + + if (logcalIndex <= index && rs > 0) { + rowSpanArr.push({ + index: logcalIndex, + cs: cs + 1, + rs: rs, + }); + } + + if (logcalIndex <= index && logcalIndex + cs >= index + currentColSpan - 1) { + cell.colSpan += 1; + break; + } + + if (logcalIndex > index) break; + + colSpan += cell.colSpan - 1; + } + + spanIndex = spanIndex.concat(rowSpanArr); + rowSpanArr = []; + } + + currentRow.insertBefore(newCell, currentCell.nextElementSibling); } } else { - const rowSpan = currentCell.rowSpan; - if (rowSpan > 1) { - newCell.rowSpan = this._w.Math.floor(rowSpan/2); + const currentRowSpan = currentCell.rowSpan; newCell.colSpan = currentCell.colSpan; - const newRowSpan = rowSpan - newCell.rowSpan; + + if (currentRowSpan > 1) { + newCell.rowSpan = this._w.Math.floor(currentRowSpan/2); + const newRowSpan = currentRowSpan - newCell.rowSpan; const rowSpanArr = []; - const rows = contextTable._trElements; - const nextRowIndex = this.util.getArrayIndex(rows, contextTable._trElement) + newRowSpan; - const index = contextTable._logical_cellIndex; + const nextRowIndex = this.util.getArrayIndex(rows, currentRow) + newRowSpan; for (let i = 0, cells, colSpan; i < nextRowIndex; i++) { cells = rows[i].cells; @@ -658,10 +712,9 @@ export default { const nextRow = rows[nextRowIndex]; const nextCells = nextRow.cells; - let colSpan = 0; let rs = rowSpanArr.shift(); - for (let c = 0, cLen = nextCells.length, cell, cs, logcalIndex, insertIndex; c < cLen; c++) { + for (let c = 0, cLen = nextCells.length, colSpan = 0, cell, cs, logcalIndex, insertIndex; c < cLen; c++) { logcalIndex = c + colSpan; cell = nextCells[c]; cs = cell.colSpan - 1; @@ -683,7 +736,27 @@ export default { currentCell.rowSpan = newRowSpan; } else { + const newRow = this.util.createElement('TR'); + newRow.appendChild(currentCell.cloneNode(false)); + + for (let i = 0, cells; i < rowIndex; i++) { + cells = rows[i].cells; + for (let c = 0, cLen = cells.length; c < cLen; c++) { + if (i + cells[c].rowSpan - 1 >= rowIndex) { + cells[c].rowSpan += 1; + } + } + } + + const physicalIndex = contextTable._physical_cellIndex; + const cells = currentRow.cells; + + for (let c = 0, cLen = cells.length; c < cLen; c++) { + if (c === physicalIndex) continue; + cells[c].rowSpan += 1; + } + currentRow.parentNode.insertBefore(newRow, currentRow.nextElementSibling); } }
3
diff --git a/diorama.js b/diorama.js @@ -1775,6 +1775,46 @@ const createPlayerDiorama = (player, { dioramas.push(diorama); return diorama; }; +function fitCameraToBoundingBox(camera, box, fitOffset = 1.2) { + // const box = new THREE.Box3(); + + // for( const object of selection ) box.expandByObject( object ); + + const size = box.getSize(new THREE.Vector3()); + const center = box.getCenter(new THREE.Vector3()); + + const maxSize = Math.max( size.x, size.y, size.z ); + const fitHeightDistance = maxSize / ( 2 * Math.atan( Math.PI * camera.fov / 360 ) ); + const fitWidthDistance = fitHeightDistance / camera.aspect; + const distance = fitOffset * Math.max(fitHeightDistance, fitWidthDistance); + + const direction = center.clone() + .sub(camera.position) + .normalize() + .multiplyScalar(distance); + + camera.position.copy(center).add(direction); + camera.quaternion.setFromRotationMatrix( + new THREE.Matrix4().lookAt( + camera.position, + center, + camera.up, + ) + ); + + // controls.maxDistance = distance * 10; + // controls.target.copy(center); + + // camera.near = distance / 100; + // camera.far = distance * 100; + // camera.updateProjectionMatrix(); + + // camera.position.copy(controls.target).sub(direction); + // camera.updateMatrixWorld(); + + // controls.update(); +} + const createAppDiorama = (app, { canvas, label = null,
0
diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js @@ -175,6 +175,7 @@ function getSearchText(report, personalDetailList, isChatRoomOrPolicyExpenseChat _.each(personalDetailList, (personalDetail) => { searchTerms.push(personalDetail.displayName); searchTerms.push(personalDetail.login); + searchTerms.push(personalDetail.login.replace(/\./g, '')); }); } if (report) { @@ -333,6 +334,7 @@ function createOption(personalDetailList, report, { function isSearchStringMatch(searchValue, searchText, participantNames = new Set(), isChatRoom = false) { const searchWords = _.map( searchValue + .replace(/\./g, '') .replace(/,/g, ' ') .split(' '), word => word.trim(),
8
diff --git a/test/jasmine/tests/select_test.js b/test/jasmine/tests/select_test.js @@ -62,6 +62,11 @@ function resetEvents(gd) { selectedPromise = new Promise(function(resolve) { gd.on('plotly_selecting', function(data) { + // note that since all of these events test node counts, + // and all of the other tests at some point check that each of + // these event handlers was called (via assertEventCounts), + // we no longer need separate tests that these nodes are created + // and this way *all* subplot variants get the test. assertSelectionNodes(1, 2); selectingCnt++; selectingData = data; @@ -130,88 +135,6 @@ describe('Test select box and lasso in general:', function() { }); } - describe('select elements', function() { - var mockCopy = Lib.extendDeep({}, mock); - mockCopy.layout.dragmode = 'select'; - - var gd; - beforeEach(function(done) { - gd = createGraphDiv(); - - Plotly.plot(gd, mockCopy.data, mockCopy.layout) - .then(done); - }); - - it('should be appended to the zoom layer', function(done) { - var x0 = 100, - y0 = 200, - x1 = 150, - y1 = 250, - x2 = 50, - y2 = 50; - - gd.once('plotly_selecting', function() { - assertSelectionNodes(1, 2); - }); - - gd.once('plotly_selected', function() { - assertSelectionNodes(0, 2); - }); - - gd.once('plotly_deselect', function() { - assertSelectionNodes(0, 0); - }); - - Lib.clearThrottle(); - mouseEvent('mousemove', x0, y0); - assertSelectionNodes(0, 0); - - drag([[x0, y0], [x1, y1]]); - doubleClick(x2, y2).then(done); - }); - }); - - describe('lasso elements', function() { - var mockCopy = Lib.extendDeep({}, mock); - mockCopy.layout.dragmode = 'lasso'; - - var gd; - beforeEach(function(done) { - gd = createGraphDiv(); - - Plotly.plot(gd, mockCopy.data, mockCopy.layout) - .then(done); - }); - - it('should be appended to the zoom layer', function(done) { - var x0 = 100, - y0 = 200, - x1 = 150, - y1 = 250, - x2 = 50, - y2 = 50; - - gd.once('plotly_selecting', function() { - assertSelectionNodes(1, 2); - }); - - gd.once('plotly_selected', function() { - assertSelectionNodes(0, 2); - }); - - gd.once('plotly_deselect', function() { - assertSelectionNodes(0, 0); - }); - - Lib.clearThrottle(); - mouseEvent('mousemove', x0, y0); - assertSelectionNodes(0, 0); - - drag([[x0, y0], [x1, y1]]); - doubleClick(x2, y2).then(done); - }); - }); - describe('select events', function() { var mockCopy = Lib.extendDeep({}, mock); mockCopy.layout.dragmode = 'select';
2
diff --git a/kamu/prod_settings.py b/kamu/prod_settings.py @@ -9,7 +9,7 @@ if os.environ['ENV'] == 'staging': else: DEBUG = False -ALLOWED_HOSTS = ['staging-kamu.herokuapp.com', 'kamu.herokuapp.com'] +ALLOWED_HOSTS = ['staging-kamu.herokuapp.com', 'kamu.herokuapp.com', 'kamu.thoughtworks-labs.net'] SECRET_KEY = os.environ['SECRET_KEY'] SECURE_SSL_REDIRECT = True
0
diff --git a/package.json b/package.json "test-widgets-pages": "node test/browser-tests-runner/cli.js --pages --automated", "test-widgets-pages-deprecated": "node test/browser-tests-runner/cli.js --pagesDeprecated --automated", "test-widgets-browser-dev": "browser-refresh test/browser-tests-runner/cli.js test/widgets-browser-tests.js --server", - "test-widgets-page": "browser-refresh test/browser-tests-runner/cli.js test/widgets-browser-tests.js --server --page", + "test-page": "node test/browser-tests-runner/cli.js test/widgets-browser-tests.js --automated --page", "jshint": "jshint compiler/ runtime/ taglibs/ widgets/", "coveralls": "nyc report --reporter=text-lcov | coveralls" },
7
diff --git a/documentation/assertions/any/to-satisfy.md b/documentation/assertions/any/to-satisfy.md @@ -20,7 +20,41 @@ against the corresponding values in the subject: expect({ bar: 'quux', baz: true }, 'to satisfy', { bar: /QU*X/i }); ``` -Can be combined with `expect.it` or functions to create complex +Arrays in the right-hand side will require all the items to be present: + +```javascript +expect([0,1,2], 'to satisfy', [0,1]); +``` + +```output +expected [ 0, 1, 2 ] to satisfy [ 0, 1 ] + +[ + 0, + 1, + 2 // should be removed +] +``` + +If you want to make assertions about the individual indexes in an array, you can +do it the following way: + +```javascript +expect([0,1,2,3], 'to satisfy', {1: 2, 2: 1}); +``` + +```output +expected [ 0, 1, 2, 3 ] to satisfy { 1: 2, 2: 1 } + +[ + 0, + 1, // should equal 2 + 2, // should equal 1 + 3 +] +``` + +`to satisfy` can be combined with `expect.it` or functions to create complex specifications that delegate to existing assertions: ```javascript
3
diff --git a/Tests/web3swiftTests/localTests/BIP44Tests.swift b/Tests/web3swiftTests/localTests/BIP44Tests.swift @@ -57,7 +57,7 @@ final class BIP44Tests: XCTestCase { } private var mockTransactionChecker: MockTransactionChecker = .init() - func testDeriveNoWarn() async throws { + func testDeriveWithoutThrowOnError() async throws { let rootNode = try rootNode() let childNode = try await rootNode.derive(path: "m/44'/60'/8096'/0/1", throwOnError: false, transactionChecker: mockTransactionChecker) @@ -77,7 +77,7 @@ final class BIP44Tests: XCTestCase { // MARK: - address - func testAccountZeroCanBeDerivedAlways() async throws { + func testZeroAccountNeverThrow() async throws { let rootNode = try rootNode() let childNode = try await rootNode.derive(path: "m/44'/60'/0'/0/255", throwOnError: true, transactionChecker: mockTransactionChecker) @@ -86,7 +86,7 @@ final class BIP44Tests: XCTestCase { XCTAssertEqual(mockTransactionChecker.addresses.count, 0) } - func testAccountOneWithoutTransactionsInAccountZeroWarns() async throws { + func testFirstAccountWithNoPreviousTransactionHistory() async throws { do { let rootNode = try rootNode() let path = "m/44'/60'/1'/0/0" @@ -98,12 +98,11 @@ final class BIP44Tests: XCTestCase { XCTFail("Child must not be created using warns true for the path: \(path)") } catch BIP44Error.warning { - XCTAssertTrue(true) XCTAssertEqual(mockTransactionChecker.addresses, accountZeroScannedAddresses) } } - func testAccountOneWithTransactionsInAccountZeroNotWarns() async throws { + func testFirstAccountWithPreviousTransactionHistory() async throws { do { let rootNode = try rootNode() let path = "m/44'/60'/1'/0/0" @@ -120,7 +119,7 @@ final class BIP44Tests: XCTestCase { } } - func testAccountTwoWithTransactionsInAccountZeroButNotInOneWarns() async throws { + func testSecondAccountWithNoPreviousTransactionHistory() async throws { do { let rootNode = try rootNode() let path = "m/44'/60'/2'/0/0" @@ -133,7 +132,6 @@ final class BIP44Tests: XCTestCase { XCTFail("Child must not be created using warns true for the path: \(path)") } catch BIP44Error.warning { - XCTAssertTrue(true) XCTAssertEqual(mockTransactionChecker.addresses, accountZeroAndOneScannedAddresses) XCTAssertEqual(mockTransactionChecker.addresses.count, 21) } @@ -141,7 +139,7 @@ final class BIP44Tests: XCTestCase { // MARK: - change + addressIndex - func testAccountOneAndInternalAndNotZeroAddressIndexWithTransactionsInAccountZeroNotWarns() async throws { + func testNotZeroChangeAndAddressIndexWithPreviousTransactionHistory() async throws { do { let rootNode = try rootNode() let path = "m/44'/60'/1'/1/128"
7
diff --git a/src/components/Theme.js b/src/components/Theme.js @@ -9,10 +9,10 @@ const { themeShape } = require('../constants/App'); */ export class ThemeProvider extends React.Component { static propTypes = { theme: themeShape } - static childContextTypes = { theme: themeShape } + static childContextTypes = { mxTheme: themeShape } getChildContext () { - return { theme: this.props.theme }; + return { mxTheme: this.props.theme }; } render () { @@ -26,10 +26,10 @@ export class ThemeProvider extends React.Component { */ export class ThemeContext extends React.Component { static contextTypes = { - theme: themeShape + mxTheme: themeShape } render () { - return this.props.children(this.context.theme); + return this.props.children(this.context.mxTheme); } } \ No newline at end of file
10
diff --git a/controllers/BaseController.php b/controllers/BaseController.php @@ -229,12 +229,12 @@ class BaseController if (!is_bool($value) && !is_array($value)) { $value = self::$htmlPurifierInstance->purify($value); - } // Allow some special chars - if (!is_array($value)) - { + // Maybe also possible through HTMLPurifier config (http://htmlpurifier.org/live/configdoc/plain.html) $value = str_replace('&amp;', '&', $value); + $value = str_replace('&gt;', '>', $value); + $value = str_replace('&lt;', '<', $value); } }
11
diff --git a/docs/README.md b/docs/README.md @@ -90,6 +90,6 @@ Cache can be cleared with the following endpoint: Includes raw orbit data from [Space Track](https://www.space-track.org/auth/login), updated hourly. -Space Track data adheres to the standard for [Orbit Data Messages](https://public.ccsds.org/pubs/502x0b2c1.pdf) +Space Track data adheres to the standard for [Orbit Data Messages](https://public.ccsds.org/Pubs/502x0b2c1e2.pdf) ### [History](history) - Detailed info on SpaceX historical events
3
diff --git a/app/components/Registration/AccountRegistrationConfirm.jsx b/app/components/Registration/AccountRegistrationConfirm.jsx @@ -5,12 +5,13 @@ import Clipboard from "react-clipboard.js"; import AccountActions from "actions/AccountActions"; import AccountStore from "stores/AccountStore"; import WalletDb from "stores/WalletDb"; -import notify from "actions/NotificationActions"; +import counterpart from "counterpart"; import TransactionConfirmStore from "stores/TransactionConfirmStore"; import Translate from "react-translate-component"; import {FetchChain} from "bitsharesjs/es"; import WalletUnlockActions from "actions/WalletUnlockActions"; import Icon from "components/Icon/Icon"; +import {Notification} from "bitshares-ui-style-guide"; class AccountRegistrationConfirm extends React.Component { static propTypes = { @@ -90,10 +91,11 @@ class AccountRegistrationConfirm extends React.Component { if (error.remote_ip) { [errorMsg] = error.remote_ip; } - notify.addNotification({ - message: `Failed to create account: ${name} - ${errorMsg}`, - level: "error", - autoDismiss: 10 + Notification.error({ + message: counterpart.translate("account_create_failure", { + account_name: name, + error_msg: errorMsg + }) }); }); }
14
diff --git a/src/scene/materials/standard-material.js b/src/scene/materials/standard-material.js @@ -408,7 +408,7 @@ class StandardMaterial extends Material { } transform = transform || new Vec4(); - transform.set(tiling.x, tiling.y, offset.x, offset.y); + transform.set(tiling.x, tiling.y, offset.x, 1.0 - tiling.y - offset.y); return transform; }
9
diff --git a/lib/cartodb/central.rb b/lib/cartodb/central.rb @@ -138,15 +138,6 @@ module Cartodb send_request("api/organizations/#{ organization_name }", nil, :get, [200]) end - # Returns remote organization attributes if response code is 201 - # otherwise returns nil - # luisico asks: Not sure why organization_name is passed to this method. It's not used - # rilla answers: That's right, but this methods is just a stub: org creation from the editor is still unsupported - def create_organization(organization_name, organization_attributes) - body = {organization: organization_attributes} - send_request("api/organizations", body, :post, [201]) - end - def update_organization(organization_name, organization_attributes) payload = { organization_name: organization_name
2
diff --git a/js/therock.js b/js/therock.js @@ -64,41 +64,40 @@ module.exports = class therock extends Exchange { 'api': { 'public': { 'get': { - // weight of 1 errors - 'funds': 1.05, - 'funds/{id}': 1.05, - 'funds/{id}/orderbook': 1.05, - 'funds/{id}/ticker': 1.05, - 'funds/{id}/trades': 1.05, - 'funds/tickers': 1.05, + 'funds': 1, + 'funds/{id}': 1, + 'funds/{id}/orderbook': 1, + 'funds/{id}/ticker': 1, + 'funds/{id}/trades': 1, + 'funds/tickers': 1, }, }, 'private': { 'get': { - 'balances': 1.05, - 'balances/{id}': 1.05, - 'discounts': 1.05, - 'discounts/{id}': 1.05, - 'funds': 1.05, - 'funds/{id}': 1.05, - 'funds/{id}/trades': 1.05, - 'funds/{fund_id}/orders': 1.05, - 'funds/{fund_id}/orders/{id}': 1.05, - 'funds/{fund_id}/position_balances': 1.05, - 'funds/{fund_id}/positions': 1.05, - 'funds/{fund_id}/positions/{id}': 1.05, - 'transactions': 1.05, - 'transactions/{id}': 1.05, - 'withdraw_limits/{id}': 1.05, - 'withdraw_limits': 1.05, + 'balances': 1, + 'balances/{id}': 1, + 'discounts': 1, + 'discounts/{id}': 1, + 'funds': 1, + 'funds/{id}': 1, + 'funds/{id}/trades': 1, + 'funds/{fund_id}/orders': 1, + 'funds/{fund_id}/orders/{id}': 1, + 'funds/{fund_id}/position_balances': 1, + 'funds/{fund_id}/positions': 1, + 'funds/{fund_id}/positions/{id}': 1, + 'transactions': 1, + 'transactions/{id}': 1, + 'withdraw_limits/{id}': 1, + 'withdraw_limits': 1, }, 'post': { - 'atms/withdraw': 1.05, - 'funds/{fund_id}/orders': 1.05, + 'atms/withdraw': 1, + 'funds/{fund_id}/orders': 1, }, 'delete': { - 'funds/{fund_id}/orders/{id}': 1.05, - 'funds/{fund_id}/orders/remove_all': 1.05, + 'funds/{fund_id}/orders/{id}': 1, + 'funds/{fund_id}/orders/remove_all': 1, }, }, },
13
diff --git a/src/store/factory/client.js b/src/store/factory/client.js @@ -160,7 +160,7 @@ export const createClient = (network, mnemonic) => { } const AdditionalSwapArgs = { - BTC: rpc.BTC[NetworkArgs.BTC], + BTC: [isTestnet ? 'https://liquality.io/testnet/electrs' : 'https://liquality.io/electrs'], ETH: [isTestnet ? 'https://liquality.io/eth-rinkeby-api' : 'https://liquality.io/eth-mainnet-api'], DAI: [isTestnet ? 'https://liquality.io/eth-rinkeby-api' : 'https://liquality.io/eth-mainnet-api'], USDC: [isTestnet ? 'https://liquality.io/eth-rinkeby-api' : 'https://liquality.io/eth-mainnet-api'],
1
diff --git a/app/classifier/tasks/combo/index.cjsx b/app/classifier/tasks/combo/index.cjsx @@ -72,7 +72,7 @@ ComboTask = React.createClass allComboAnnotations.push annotation.value... <g className="combo-task-persist-inside-subject-container"> - {Object.keys(props.taskTypes).map (taskType, idx) -> + {Object.keys(props.taskTypes).map (taskType) -> unless taskType is 'combo' TaskComponent = props.taskTypes[taskType] if TaskComponent.PersistInsideSubject? @@ -83,10 +83,15 @@ ComboTask = React.createClass allComboAnnotations[idx] = annotation props.onChange Object.assign({}, props.annotation, { value: allComboAnnotations }) if props.workflow.tasks[props.annotation?.task]?.type is 'combo' + allTaskTypes = props.task.tasks.map (childTaskKey) -> props.workflow.tasks[childTaskKey].type + idx = allTaskTypes.indexOf(taskType) + if idx > -1 # if the current annotation is for the combo task pass in the `inner` annotations fauxAnnotation = allComboAnnotations[idx] else fauxAnnotation = props.annotation + else + fauxAnnotation = props.annotation <TaskComponent.PersistInsideSubject key={taskType} {...props}
4
diff --git a/lib/core/events.js b/lib/core/events.js @@ -40,9 +40,12 @@ EventEmitter.prototype.request = function() { EventEmitter.prototype.setCommandHandler = function(requestName, cb) { log("setting command handler for: ", requestName); - return this.on('request:' + requestName, function(_cb) { + let listener = function(_cb) { cb.call(this, ...arguments); - }); + } + // unlike events, commands can only have 1 handler + this.removeAllListeners('request:' + requestName); + return this.on('request:' + requestName, listener); }; EventEmitter.prototype.setCommandHandlerOnce = function(requestName, cb) {
2
diff --git a/userscript.user.js b/userscript.user.js @@ -56479,7 +56479,9 @@ var $$IMU_EXPORT$$; // https://www.turboimagehost.com/p/11906711/Asia_2.jpg.html# // http://s5d3.turboimagehost.com/t1/22255196_Margot-Robbie-FocPr5.jpg // http://s5d3.turboimg.net/sp/d00f885d238cb0ecea6f522e9af6b124/Margot-Robbie-FocPr5.jpg - match = src.match(/\/t[0-9]+\/+([0-9]+)_([^/?#]+)(?:[?#].*)?$/); + // https://s3d3.turboimg.net/t/9449152_Ana_Paula_Araujo3.jpg + // https://s3d3.turboimg.net/sp/e257b07c4d358b690d74a45bbd6396ab/Ana_Paula_Araujo3.jpg + match = src.match(/\/t[0-9]*\/+([0-9]+)_([^/?#]+)(?:[?#].*)?$/); if (match) { return { url: "https://www.turboimagehost.com/p/" + match[1] + "/" + match[2] + ".html",
7
diff --git a/app/components/Account/CreateAccountPassword.jsx b/app/components/Account/CreateAccountPassword.jsx @@ -381,7 +381,7 @@ class CreateAccountPassword extends React.Component { return ( <div> - <p style={{fontWeight: "bold"}}><Translate content="wallet.congrat" /></p> + <p style={{fontWeight: "normal", fontFamily: "Roboto-Medium, arial, sans-serif", fontStyle: "normal"}}><Translate content="wallet.congrat" /></p> <p><Translate content="wallet.tips_explore_pass" /></p> @@ -399,7 +399,7 @@ class CreateAccountPassword extends React.Component { return ( <div className="sub-content"> <div> - {step === 2 ? <p style={{fontWeight: "bold"}}> + {step === 2 ? <p style={{fontWeight: "normal", fontFamily: "Roboto-Medium, arial, sans-serif", fontStyle: "normal"}}> <Translate content={"wallet.step_" + step} /> </p> : null}
14
diff --git a/node/lib/util/repo_ast.js b/node/lib/util/repo_ast.js @@ -530,7 +530,6 @@ in commit ${id}.`); const workdir = args.workdir; assert.isObject(workdir); for (let path in workdir) { - assert.isNotNull(this.d_head); assert.isFalse(this.d_bare); const change = workdir[path]; if (null !== change) {
2
diff --git a/sirepo/package_data/static/js/sirepo-plotting.js b/sirepo/package_data/static/js/sirepo-plotting.js @@ -3345,6 +3345,7 @@ SIREPO.app.directive('particle', function(plotting, plot2dService) { }; $scope.load = function(json) { + $scope.aspectRatio = plotting.getAspectRatio($scope.modelName, json, 4.0 / 7); allPoints = []; var xdom = [json.x_range[0], json.x_range[1]]; $scope.axes.x.domain = xdom;
11
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -173,7 +173,7 @@ npm run regl-codegen to regenerate the regl code. This opens a browser window, runs through all traces with 'regl' in the tags, and stores the captured code into -src/generated/regl-codegen. If no updates are necessary, it would be a no-op, but +[src/generated/regl-codegen](https://github.com/plotly/plotly.js/blob/master/src/generated/regl-codegen). If no updates are necessary, it would be a no-op, but if there are changes, you would need to commit them. This is needed because regl performs codegen in runtime which breaks CSP
0
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -12,6 +12,14 @@ Additionally, the default Open Graph image URL meta tag will now only be include This change was introduced in [pull request #2673: Allow Open Graph image URL to be customised](https://github.com/alphagov/govuk-frontend/pull/2673). +#### Localise the content licence and copyright statements + +When using the [footer](https://design-system.service.gov.uk/components/footer/) Nunjucks macro, you can now translate the text of the Open Government Licence (OGL) and Crown copyright statements using the `contentLicence` and `copyright` parameters. + +Visit The National Archives' [documentation on OGL and Crown copyright](https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/open-government-licence/copyright-notices-attribution-statements/) for information on what needs to be included in these statements. + +This was added in [pull request #2702: Allow localisation of content licence and copyright notices in Footer](https://github.com/alphagov/govuk-frontend/pull/2702). + ### Deprecated features #### Remove deprecated `govuk-header__navigation--no-service-name` class in the header
11
diff --git a/js/modules/invertTransformation.js b/js/modules/invertTransformation.js 'use strict'; -const biswrap = require('libbiswasm_wrapper'); const baseutils=require("baseutils"); const BaseModule = require('basemodule.js'); const BisWebLinearTransformation = require('bisweb_lineartransformation.js'); @@ -175,7 +174,7 @@ class InvertTransformationModule extends BaseModule { reject(e.stack); }); }).catch( (e) => { reject(e.stack); }); - }).catch( (e) => { reject(e.stack); }); + }); } }
2
diff --git a/src/util/camera.js b/src/util/camera.js @@ -7,7 +7,8 @@ var key = require('key-pressed') const panSpeed = 0.4 const scaleSpeed = 0.5 const scaleMax = 3 -const scaleMin = 1.15 +// const scaleMin = 1.15 +const scaleMin = 1.03 function attachCamera(canvas, opts) { opts = opts || {}
11
diff --git a/src/App/components/StoryCard/index.js b/src/App/components/StoryCard/index.js @@ -26,7 +26,7 @@ class Story extends Component { render() { const story = this.props.data; - const storyFrequencyName = helpers.getCurrentFrequency(story.frequency, this.props.frequencies.frequencies).name + const frequency = helpers.getCurrentFrequency(story.frequency, this.props.frequencies.frequencies); const timestamp = story.timestamp; let currentTime = Date.now(); @@ -110,8 +110,8 @@ class Story extends Component { : ''} <Link to={`/${story.frequency}`}> <MetaFreq>{ - this.props.frequencies.active === 'all' ? - `~${storyFrequencyName}` + this.props.frequencies.active === 'all' && frequency ? + `~${frequency.name}` : `` }
1
diff --git a/examples/layer-browser/src/utils/grid-aggregator.js b/examples/layer-browser/src/utils/grid-aggregator.js @@ -27,7 +27,7 @@ export function pointsToWorldGrid(points, worldUnitSize) { return accu; }, {}); - const maxHeight = Math.max.apply(null, Object.values(gridHash)); + const maxHeight = Math.max.apply(null, Object.keys(gridHash).map(k => gridHash[k])); const data = Object.keys(gridHash).reduce((accu, key) => { const idxs = key.split('-');
14
diff --git a/package.json b/package.json { "name": "prettier-atom", "main": "./dist/main.js", - "version": "0.57.3", + "version": "0.58.0", "description": "Atom plugin for formatting JavaScript using prettier with (optional) prettier-eslint integration", "keywords": [ "atom",
6
diff --git a/apiserver/apiserver/web/views.py b/apiserver/apiserver/web/views.py @@ -757,7 +757,7 @@ def get_user_match(intended_user, match_id, *, user_id): model.games.c.map_height, model.games.c.time_played, ]).where( - model.games.c.gameID == match_id + model.games.c.id == match_id )).first() result = { @@ -878,7 +878,7 @@ def list_organizations(): def get_organization(org_id): with model.engine.connect() as conn: org = conn.execute(model.organizations.select().where( - model.organizations.c.organizationID == org_id + model.organizations.c.id == org_id )).first() if not org: @@ -956,8 +956,8 @@ def delete_organization(org_id): def list_matches(): with model.engine.connect() as conn: match = conn.execute(sqlalchemy.sql.select([ - model.games.c.gameID, - model.games.c.replayName, + model.games.c.id, + model.games.c.replay_name, ]).order_by(model.games.c.timestamp.desc())).first() blob = gcloud_storage.Blob(match["replayName"], @@ -968,7 +968,7 @@ def list_matches(): buffer.seek(0) return flask.send_file(buffer, mimetype="application/x-halite-2-replay", as_attachment=True, - attachment_filename=str(match["gameID"])+".hlt") + attachment_filename=str(match["id"])+".hlt") @web_api.route("/match/<int:match_id>") @@ -1016,7 +1016,7 @@ def leaderboard(): ]).select_from( model.users.join( model.organizations, - model.users.c.organizationID == model.organizations.c.id) + model.users.c.organization_id == model.organizations.c.id) ).where(where_clause).order_by(*order_clause).offset(offset).limit(limit) players = conn.execute(query) @@ -1024,7 +1024,7 @@ def leaderboard(): result.append({ "user_id": player["id"], "username": player["username"], - "level": player["level"], + "level": player["player_level"], "organization_id": player["organization_id"], "organization": player["organization_name"], # "language": player["language"],
1
diff --git a/src/components/signup/SignupState.js b/src/components/signup/SignupState.js @@ -82,6 +82,10 @@ const Signup = ({ navigation, screenProps }: { navigation: any, screenProps: any log.info('Sending new user data', state) saveProfile() try { + // After sending email to the user for confirmation (transition between Email -> EmailConfirmation) + // user's profile is persisted (`userStorage.setProfile`). + // Then, when the user access the application from the link (in EmailConfirmation), data is recovered and + // saved to the `state` await API.addUser(state) await API.verifyUser({}) const destinationPath = store.get('destinationPath')
0
diff --git a/www/tablet/js/widget_knob.js b/www/tablet/js/widget_knob.js @@ -166,10 +166,9 @@ var Modul_knob = function () { return elem; } - function update_lock(dev, par) { - me.elements.filterDeviceReading('lock', dev, par) - .each(function (idx) { - var elem = $(this); + function updateLock(elem, dev, par) { + $.each(['lock', 'lock-on', 'lock-off'], function (index, key) { + if (elem.matchDeviceReading(key, dev, par)) { var value = elem.getReading('lock').val; var knob_elem = elem.find('input'); if (knob_elem) { @@ -184,20 +183,24 @@ var Modul_knob = function () { }); } } + } }); + } function update(dev, par) { isUpdating = true; - // update from desired temp reading - me.elements.filterDeviceReading('get', dev, par) - .each(function (index) { + me.elements.each(function (index) { var elem = $(this); + var knob_elem = elem.find('input'); + var knob_obj = knob_elem.data('knob'); + + // update from desired temp reading + if (elem.matchDeviceReading('get', dev, par)) { var value = elem.getReading('get').val; if (value) { - var knob_elem = elem.find('input'); if (knob_elem) { var part = elem.data('get-value'); var val = ftui.getPart(value, part); @@ -210,14 +213,13 @@ var Modul_knob = function () { }); } } - }); - - // update from lock reading - me.update_lock(dev, par); + } + //extra reading for lock + me.updateLock(elem, dev, par); //extra reading for reachable - me.update_reachable(dev, par); - + me.updateReachable(elem, dev, par); + }); isUpdating = false; } @@ -237,7 +239,7 @@ var Modul_knob = function () { actualSettings: actualSettings, init_ui: init_ui, update: update, - update_lock: update_lock, + updateLock: updateLock, onRelease: onRelease, onChange: onChange, onFormat: onFormat
1
diff --git a/.storybook/storybook-data.js b/.storybook/storybook-data.js @@ -107,19 +107,6 @@ module.exports = [ }, }, }, - { - id: 'dashboard--module-header', - kind: 'Dashboard', - name: 'Module Header', - story: 'Module Header', - parameters: { - fileName: './stories/dashboard.stories.js', - options: { - hierarchyRootSeparator: '|', - hierarchySeparator: {}, - }, - }, - }, { id: 'global--plugin-header', kind: 'Global',
2
diff --git a/src/core/Core.js b/src/core/Core.js @@ -452,6 +452,24 @@ class Uppy { }) } + /** + * Uninstall and remove a plugin. + * + * @param {Plugin} instance The plugin instance to remove. + */ + removePlugin (instance) { + const list = this.plugins[instance.type] + + if (instance.uninstall) { + instance.uninstall() + } + + const index = list.indexOf(instance) + if (index !== -1) { + list.splice(index, 1) + } + } + /** * Logs stuff to console, only if `debug` is set to true. Silent in production. *
0
diff --git a/src/button/orders.js b/src/button/orders.js @@ -37,11 +37,11 @@ export function validateOrder(orderID : string, { clientID, merchantID, expected const currency = cart.amounts && cart.amounts.total.currencyCode; if (intent !== expectedIntent) { - throw new Error(`Expected intent from order api call to be ${ expectedIntent }, got ${ intent }. Please ensure you are passing ${ SDK_QUERY_KEYS.INTENT }=${ intent } to the sdk`); + throw new Error(`Expected intent from order api call to be ${ expectedIntent }, got ${ intent }. Please ensure you are passing ${ SDK_QUERY_KEYS.INTENT }=${ intent } to the sdk url. https://developer.paypal.com/docs/checkout/reference/customize-sdk/`); } if (currency && currency !== expectedCurrency) { - throw new Error(`Expected currency from order api call to be ${ expectedCurrency }, got ${ currency }. Please ensure you are passing ${ SDK_QUERY_KEYS.CURRENCY }=${ currency } to the sdk`); + throw new Error(`Expected currency from order api call to be ${ expectedCurrency }, got ${ currency }. Please ensure you are passing ${ SDK_QUERY_KEYS.CURRENCY }=${ currency } to the sdk url. https://developer.paypal.com/docs/checkout/reference/customize-sdk/`); } const payeeMerchantID = payee && payee.merchant && payee.merchant.id;
7
diff --git a/bin/test b/bin/test @@ -6,15 +6,18 @@ export PATH="$PWD/node_modules/.bin:$PATH" function test_package() { pushd "$1" > /dev/null + shift npm i - npm run travis-test + npm run "$@" popd > /dev/null } -if [[ -n "$1" ]]; then - test_package "$1" +dir="$1" +if [[ -n "$dir" ]]; then + shift + test_package "$dir" test-watch "$@" else for package in `ls packages`;do - test_package "packages/$package" + test_package "packages/$package" travis-test done fi
7
diff --git a/README.md b/README.md @@ -145,7 +145,7 @@ The component accepts the following props: |:--:|:-----|:-----| |**`title`**|array|Title used to caption table |**`columns`**|array|Columns used to describe table. Must be either an array of simple strings or objects describing a column -|**`data`**|array|Data used to describe table. Must be either an array containing objects of key/value pairs with values that are strings or numbers, or arrays of strings or numbers (Ex: data: [{"Name": "Joe", "Job Title": "Plumber", "Age": 30}, {"Name": "Jane", "Job Title": "Electrician", "Age": 45}] or data: [["Joe", "Plumber", 30], ["Jane", "Electrician", 45]]) **Use of arbitrary objects as data is not supported, and is deprecated. Consider using ids and mapping to external object data in custom renderers instead e.g. `const data = [{"Name": "Joe", "ObjectData": 123}] --> const dataToMapInCustomRender = { 123: { foo: 'bar', baz: 'qux', ... } }`** +|**`data`**|array|Data used to describe table. Must be either an array containing objects of key/value pairs with values that are strings or numbers, or arrays of strings or numbers (Ex: data: [{"Name": "Joe", "Job Title": "Plumber", "Age": 30}, {"Name": "Jane", "Job Title": "Electrician", "Age": 45}] or data: [["Joe", "Plumber", 30], ["Jane", "Electrician", 45]]) |**`options`**|object|Options used to describe table |**`components`**|object|Custom components used to render the table
2
diff --git a/layouts/partials/fragments/copyright.html b/layouts/partials/fragments/copyright.html <ul class="nav ml-lg-auto"> {{- range sort .Site.Menus.copyright_footer }} <li class="nav-item"> - <a class="nav-link py-0 - {{- partial "helpers/text-color.html" (dict "self" $self "light" "white" "dark" "black-50") -}} - " href="{{ .URL | relLangURL }}" + <a class="nav-link py-0" href="{{ .URL | relLangURL }}" {{ if hasPrefix .URL "#" }} class="anchor" {{ end }}>
2
diff --git a/README.md b/README.md @@ -23,6 +23,8 @@ Also install slick-carousel for css and font ```bash npm install slick-carousel +@import "~slick-carousel/slick/slick.css"; +@import "~slick-carousel/slick/slick-theme.css"; ``` or add cdn link in your html @@ -186,4 +188,3 @@ open http://localhost:8080 ### Polyfills for old IE support `matchMedia` support from [media-match](https://github.com/weblinc/media-match) -
0
diff --git a/.travis.yml b/.travis.yml +sudo: required +addons: + chrome: stable + language: node_js +node_js: + - "8" install: - npm install - npm install --prefix ./packages/spark-core - npm install --prefix ./packages/spark-extras/components/highlight-board +- npm install -g @angular/cli before_script: - npm run test --prefix ./packages/spark-core +- npm run test --prefix ./packages/spark-extras/components/highlight-board +- npm run test --prefix ./src/angular/projects/spark-core-angular +- npm run test --prefix ./src/angular/projects/spark-core-extras-award +- npm run test --prefix ./src/angular/projects/spark-core-extras-card +- npm run test --prefix ./src/angular/projects/spark-core-extras-dictionary +- npm run test --prefix ./src/angular/projects/spark-core-extras-highlight-board cache: directories:
3
diff --git a/README.md b/README.md @@ -38,7 +38,7 @@ Table of Contents Installation ====== -Requirements: geth (1.5.5 or higher), node (5.0.0) and npm +Requirements: geth (1.5.8 or higher), node (6.9.1 or higher is recommended) and npm Optional: serpent (develop) if using contracts with Serpent, testrpc or ethersim if using the simulator or the test functionality. Further: depending on the dapp stack you choose: [IPFS](https://ipfs.io/) @@ -58,6 +58,9 @@ Embark's npm package has changed from ```embark-framework``` to ```embark```, th Usage - Demo ====== + +![Embark Demo screenshot](http://i.imgur.com/a9ddSjn.png) + You can easily create a sample working DApp with the following: ```Bash
3
diff --git a/_data/conferences.yml b/_data/conferences.yml place: Sorrento, Italy sub: DM -- title: ICDM - year: 2020 - id: icdm20 - link: http://icdm2020.bigke.org/ - deadline: '2020-06-02 23:59:59' - timezone: UTC-7 - date: November 17-20, 2020 - place: Sorrento, Italy - sub: DM - - title: AACL-IJCNLP year: 2020 id: aacl20
2
diff --git a/exportutils/export to Foundry VTT.gce b/exportutils/export to Foundry VTT.gce 'By Brian Ronnle, enhanced for Foundry VTT by Chris Normand/Nose66 'Based on the original export filter by Graham Brand (Spyke) ' -Const LastUpdated = 20211129 +Const LastUpdated = 20210609 ' Last Updated: June 9, 2021 ' v1 ' @@ -46,7 +46,6 @@ Sub Main() ' in Fantasy Grounds the <name> field must be at the top level Paragraph = "<name type=""string"">" & Char.Name & "</name>" - Paragraph = "<portrait type=""string"">" & Char.Portrait & "</portrait>" ' add the various sections Call PrintAbilities() @@ -468,6 +467,13 @@ Sub PrintReactions() ' ***appearance mods*** ' print appearance reaction out = "" + tmp = "Unappealing" + l1 = Char.ItemPositionByNameAndExt(tmp, Stats) + If l1 > 0 Then + out = out & "|" & Char.Items(l1).TagItem("bonuslist") + out = out & "|" & Char.Items(l1).TagItem("conditionallist") + End If + tmp = "Appealing" l1 = Char.ItemPositionByNameAndExt(tmp, Stats) If l1 > 0 Then @@ -489,6 +495,10 @@ Sub PrintReactions() out = out & "|" & Char.Items(l1).TagItem("conditionallist") End If + ' Cleanup lists by adding "|" instead of "," between items. ~Stevil + out = Replace(out, ", +", "|+") + out = Replace(out, ", -", "|-") + out = Replace(out, ", 0 ", "|0 ") ' and print the whole thing Paragraph = out @@ -803,7 +813,7 @@ End If work = work - CInt(Char.Items(i).TagItem("childpoints")) End If Paragraph = "<points type=""number"">" & CStr(work) & "</points>" - Paragraph = "<text type=""string"">" & mods_text & Char.Items(i).TagItem("usernotes") & "</text>" + Paragraph = "<text type=""string"">" & CreateControlRoll(mods_text & Char.Items(i).TagItem("usernotes")) & "</text>" Paragraph = "<pageref type=""string"">" & Char.Items(i).TagItem("page") & "</pageref>" Paragraph = "<parentuuid>" & Char.Items(i).ParentKey & "</parentuuid>" Paragraph = "<uuid>k" & Char.Items(i).idkey & "</uuid>" @@ -1116,7 +1126,6 @@ Sub PrintHandWeapons() 'print the mode Paragraph = "<name type=""string"">" & Char.Items(i).DamageModeName(CurMode) & "</name>" - ' print the skill level saved_level = Char.Items(i).DamageModeTagItem(CurMode, "charskillscore") Paragraph = "<level type=""number"">" & saved_level & "</level>" @@ -1434,10 +1443,11 @@ Sub PrintNotes() ' NB: need to convert carriage returns to the escape sequence '\r' here ' at the moment double carriage returns are treated as a single space + ' Changed the '\r' to an HTML '<br>'. ~Stevil ' first strip out line feeds tmp = Replace(PlainText(Char.Notes), Chr(10), "") - tmp = Replace(tmp, Chr(13), "\r") + tmp = Replace(tmp, Chr(13), "<br>") ' then print, converting carriage returns to \r ' (I've done this in two steps in case the pairs ever come through the other way round, e.g. after editing in a different app) @@ -1474,6 +1484,54 @@ Sub PrintPointSummary() End Sub + +'**************************************** +'* Function +'* Added to "export to Foundry VTT.gce" +'* ~ Stevil +'**************************************** +Function CreateControlRoll(ByVal MyString) + Dim regexCR + Dim regexLess + + Set regexCR = New RegExp + Set regexLess = New RegExp + + regexCR.IgnoreCase = True + regexLess.Global = True + + regexCR.IgnoreCase = True + regexLess.Global = True + + regexCR.Pattern = "CR: \d{1,2}" + regexLess.Pattern = "\(\d{1,2} or less\)" + + MyString = Replace(MyString, "[", "") + MyString = Replace(MyString, "]", "") + + matchCR = regexCR.Test(MyString) + If matchCR Then + For Each Match In regexCR.Execute(MyString) + MyString = Replace(MyString, Match.Value, "[" & Match.Value & " or less] ") + Next + MyString = Replace(MyString, "] or less", "] ") + End If + + matchLess = regexLess.Test(MyString) + If matchLess Then + For Each Match In regexLess.Execute(MyString) + MyString = Replace(MyString, Match.Value, "[CR: " & Match.Value & "] ") + Next +' MyString = Replace(MyString, matchLess.Value, "[CR: " & matchLess.Value & "] ") + MyString = Replace(MyString, "[CR: (", "[CR: ") + MyString = Replace(MyString, ")]", "]") + MyString = Replace(MyString, "] or less", "]") + End If + + CreateControlRoll = MyString + +End Function + '**************************************** 'Pad string with leading zeroes '****************************************
3